From 720dfb97e8de814675048ff5c545681646591586 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 27 Oct 2025 14:13:54 +0530 Subject: [PATCH 1/2] feat: improve doc examples to use Permission and Roles helper classes --- composer.lock | 30 +++++++++---------- .../java/databases/create-document.md | 4 ++- .../java/databases/update-document.md | 4 ++- .../java/databases/upsert-document.md | 4 ++- .../java/storage/create-file.md | 4 ++- .../java/storage/update-file.md | 4 ++- .../java/tablesdb/create-row.md | 4 ++- .../java/tablesdb/update-row.md | 4 ++- .../java/tablesdb/upsert-row.md | 4 ++- .../kotlin/databases/create-document.md | 4 ++- .../kotlin/databases/update-document.md | 4 ++- .../kotlin/databases/upsert-document.md | 4 ++- .../kotlin/storage/create-file.md | 4 ++- .../kotlin/storage/update-file.md | 4 ++- .../kotlin/tablesdb/create-row.md | 4 ++- .../kotlin/tablesdb/update-row.md | 4 ++- .../kotlin/tablesdb/upsert-row.md | 4 ++- .../examples/databases/create-document.md | 4 ++- .../examples/databases/update-document.md | 4 ++- .../examples/databases/upsert-document.md | 4 ++- .../examples/storage/create-file.md | 4 ++- .../examples/storage/update-file.md | 4 ++- .../examples/tablesdb/create-row.md | 4 ++- .../examples/tablesdb/update-row.md | 4 ++- .../examples/tablesdb/upsert-row.md | 4 ++- .../examples/databases/create-document.md | 4 ++- .../examples/databases/update-document.md | 4 ++- .../examples/databases/upsert-document.md | 4 ++- .../examples/storage/create-file.md | 4 ++- .../examples/storage/update-file.md | 4 ++- .../examples/tablesdb/create-row.md | 4 ++- .../examples/tablesdb/update-row.md | 4 ++- .../examples/tablesdb/upsert-row.md | 4 ++- .../examples/databases/create-document.md | 2 +- .../examples/databases/update-document.md | 2 +- .../examples/databases/upsert-document.md | 2 +- .../examples/storage/create-file.md | 2 +- .../examples/storage/update-file.md | 2 +- .../examples/tablesdb/create-row.md | 2 +- .../examples/tablesdb/update-row.md | 2 +- .../examples/tablesdb/upsert-row.md | 2 +- .../examples/databases/create-document.md | 4 +-- .../examples/databases/update-document.md | 4 +-- .../examples/databases/upsert-document.md | 4 +-- .../examples/storage/create-file.md | 4 +-- .../examples/storage/update-file.md | 4 +-- .../examples/tablesdb/create-row.md | 4 +-- .../examples/tablesdb/update-row.md | 4 +-- .../examples/tablesdb/upsert-row.md | 4 +-- .../messaging/create-resend-provider.md | 3 ++ .../messaging/update-resend-provider.md | 2 ++ .../examples/databases/create-collection.md | 4 +-- .../examples/databases/create-document.md | 4 +-- .../examples/databases/update-collection.md | 4 +-- .../examples/databases/update-document.md | 4 +-- .../examples/databases/upsert-document.md | 4 +-- .../messaging/create-resend-provider.md | 20 +++++++++++++ .../messaging/update-resend-provider.md | 20 +++++++++++++ .../examples/storage/create-bucket.md | 4 +-- .../examples/storage/create-file.md | 4 +-- .../examples/storage/update-bucket.md | 4 +-- .../examples/storage/update-file.md | 4 +-- .../examples/tablesdb/create-row.md | 4 +-- .../examples/tablesdb/create-table.md | 4 +-- .../examples/tablesdb/update-row.md | 4 +-- .../examples/tablesdb/update-table.md | 4 +-- .../examples/tablesdb/upsert-row.md | 4 +-- .../examples/databases/create-collection.md | 4 ++- .../examples/databases/create-document.md | 4 ++- .../examples/databases/update-collection.md | 4 ++- .../examples/databases/update-document.md | 4 ++- .../examples/databases/upsert-document.md | 4 ++- .../messaging/create-resend-provider.md | 19 ++++++++++++ .../messaging/update-resend-provider.md | 19 ++++++++++++ .../examples/storage/create-bucket.md | 4 ++- .../examples/storage/create-file.md | 4 ++- .../examples/storage/update-bucket.md | 4 ++- .../examples/storage/update-file.md | 4 ++- .../examples/tablesdb/create-row.md | 4 ++- .../examples/tablesdb/create-table.md | 4 ++- .../examples/tablesdb/update-row.md | 4 ++- .../examples/tablesdb/update-table.md | 4 ++- .../examples/tablesdb/upsert-row.md | 4 ++- .../examples/databases/create-collection.md | 4 ++- .../examples/databases/create-document.md | 4 ++- .../examples/databases/update-collection.md | 4 ++- .../examples/databases/update-document.md | 4 ++- .../examples/databases/upsert-document.md | 4 ++- .../messaging/create-resend-provider.md | 21 +++++++++++++ .../messaging/update-resend-provider.md | 21 +++++++++++++ .../examples/storage/create-bucket.md | 4 ++- .../examples/storage/create-file.md | 4 ++- .../examples/storage/update-bucket.md | 4 ++- .../examples/storage/update-file.md | 4 ++- .../examples/tablesdb/create-row.md | 4 ++- .../examples/tablesdb/create-table.md | 4 ++- .../examples/tablesdb/update-row.md | 4 ++- .../examples/tablesdb/update-table.md | 4 ++- .../examples/tablesdb/upsert-row.md | 4 ++- .../messaging/create-resend-provider.md | 26 ++++++++++++++++ .../messaging/update-resend-provider.md | 26 ++++++++++++++++ .../messaging/create-resend-provider.md | 22 ++++++++++++++ .../messaging/update-resend-provider.md | 22 ++++++++++++++ .../java/databases/create-collection.md | 4 ++- .../java/databases/create-document.md | 4 ++- .../java/databases/update-collection.md | 4 ++- .../java/databases/update-document.md | 4 ++- .../java/databases/upsert-document.md | 4 ++- .../java/messaging/create-resend-provider.md | 30 +++++++++++++++++++ .../java/messaging/update-resend-provider.md | 30 +++++++++++++++++++ .../java/storage/create-bucket.md | 4 ++- .../server-kotlin/java/storage/create-file.md | 4 ++- .../java/storage/update-bucket.md | 4 ++- .../server-kotlin/java/storage/update-file.md | 4 ++- .../server-kotlin/java/tablesdb/create-row.md | 4 ++- .../java/tablesdb/create-table.md | 4 ++- .../server-kotlin/java/tablesdb/update-row.md | 4 ++- .../java/tablesdb/update-table.md | 4 ++- .../server-kotlin/java/tablesdb/upsert-row.md | 4 ++- .../kotlin/databases/create-collection.md | 4 ++- .../kotlin/databases/create-document.md | 4 ++- .../kotlin/databases/update-collection.md | 4 ++- .../kotlin/databases/update-document.md | 4 ++- .../kotlin/databases/upsert-document.md | 4 ++- .../messaging/create-resend-provider.md | 21 +++++++++++++ .../messaging/update-resend-provider.md | 21 +++++++++++++ .../kotlin/storage/create-bucket.md | 4 ++- .../kotlin/storage/create-file.md | 4 ++- .../kotlin/storage/update-bucket.md | 4 ++- .../kotlin/storage/update-file.md | 4 ++- .../kotlin/tablesdb/create-row.md | 4 ++- .../kotlin/tablesdb/create-table.md | 4 ++- .../kotlin/tablesdb/update-row.md | 4 ++- .../kotlin/tablesdb/update-table.md | 4 ++- .../kotlin/tablesdb/upsert-row.md | 4 ++- .../messaging/create-resend-provider.md | 19 ++++++++++++ .../messaging/update-resend-provider.md | 19 ++++++++++++ .../examples/databases/create-collection.md | 4 ++- .../examples/databases/create-document.md | 4 ++- .../examples/databases/update-collection.md | 4 ++- .../examples/databases/update-document.md | 4 ++- .../examples/databases/upsert-document.md | 4 ++- .../messaging/create-resend-provider.md | 22 ++++++++++++++ .../messaging/update-resend-provider.md | 22 ++++++++++++++ .../examples/storage/create-bucket.md | 4 ++- .../examples/storage/create-file.md | 4 ++- .../examples/storage/update-bucket.md | 4 ++- .../examples/storage/update-file.md | 4 ++- .../examples/tablesdb/create-row.md | 4 ++- .../examples/tablesdb/create-table.md | 4 ++- .../examples/tablesdb/update-row.md | 4 ++- .../examples/tablesdb/update-table.md | 4 ++- .../examples/tablesdb/upsert-row.md | 4 ++- .../examples/databases/create-collection.md | 4 ++- .../examples/databases/create-document.md | 4 ++- .../examples/databases/update-collection.md | 4 ++- .../examples/databases/update-document.md | 4 ++- .../examples/databases/upsert-document.md | 4 ++- .../messaging/create-resend-provider.md | 20 +++++++++++++ .../messaging/update-resend-provider.md | 20 +++++++++++++ .../examples/storage/create-bucket.md | 4 ++- .../examples/storage/create-file.md | 4 ++- .../examples/storage/update-bucket.md | 4 ++- .../examples/storage/update-file.md | 4 ++- .../examples/tablesdb/create-row.md | 4 ++- .../examples/tablesdb/create-table.md | 4 ++- .../examples/tablesdb/update-row.md | 4 ++- .../examples/tablesdb/update-table.md | 4 ++- .../examples/tablesdb/upsert-row.md | 4 ++- .../messaging/create-resend-provider.md | 17 +++++++++++ .../messaging/update-resend-provider.md | 16 ++++++++++ .../examples/databases/create-collection.md | 4 ++- .../examples/databases/create-document.md | 4 ++- .../examples/databases/update-collection.md | 4 ++- .../examples/databases/update-document.md | 4 ++- .../examples/databases/upsert-document.md | 4 ++- .../messaging/create-resend-provider.md | 21 +++++++++++++ .../messaging/update-resend-provider.md | 21 +++++++++++++ .../examples/storage/create-bucket.md | 4 ++- .../examples/storage/create-file.md | 4 ++- .../examples/storage/update-bucket.md | 4 ++- .../examples/storage/update-file.md | 4 ++- .../examples/tablesdb/create-row.md | 4 ++- .../examples/tablesdb/create-table.md | 4 ++- .../examples/tablesdb/update-row.md | 4 ++- .../examples/tablesdb/update-table.md | 4 ++- .../examples/tablesdb/upsert-row.md | 4 ++- .../examples/databases/create-collection.md | 4 ++- .../examples/databases/create-document.md | 4 ++- .../examples/databases/update-collection.md | 4 ++- .../examples/databases/update-document.md | 4 ++- .../examples/databases/upsert-document.md | 4 ++- .../messaging/create-resend-provider.md | 20 +++++++++++++ .../messaging/update-resend-provider.md | 20 +++++++++++++ .../examples/storage/create-bucket.md | 4 ++- .../examples/storage/create-file.md | 4 ++- .../examples/storage/update-bucket.md | 4 ++- .../examples/storage/update-file.md | 4 ++- .../examples/tablesdb/create-row.md | 4 ++- .../examples/tablesdb/create-table.md | 4 ++- .../examples/tablesdb/update-row.md | 4 ++- .../examples/tablesdb/update-table.md | 4 ++- .../examples/tablesdb/upsert-row.md | 4 ++- 203 files changed, 1059 insertions(+), 211 deletions(-) create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-resend-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-resend-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-resend-provider.md diff --git a/composer.lock b/composer.lock index 36c2c94265..39f5896bdc 100644 --- a/composer.lock +++ b/composer.lock @@ -5318,16 +5318,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.4.11", + "version": "1.4.13", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "5970defc3c6e64817fe9847c0b33c87af71709c5" + "reference": "db1a0f9b4ae003759bc67e15470160f3775536f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/5970defc3c6e64817fe9847c0b33c87af71709c5", - "reference": "5970defc3c6e64817fe9847c0b33c87af71709c5", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/db1a0f9b4ae003759bc67e15470160f3775536f8", + "reference": "db1a0f9b4ae003759bc67e15470160f3775536f8", "shasum": "" }, "require": { @@ -5363,9 +5363,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.4.11" + "source": "https://github.com/appwrite/sdk-generator/tree/1.4.13" }, - "time": "2025-10-24T10:03:09+00:00" + "time": "2025-10-27T08:35:36+00:00" }, { "name": "doctrine/annotations", @@ -6069,16 +6069,16 @@ }, { "name": "phpbench/phpbench", - "version": "1.4.1", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/phpbench/phpbench.git", - "reference": "78cd98a9aa34e0f8f80ca01972a8b88d2c30194b" + "reference": "bb61ae6c54b3d58642be154eb09f4e73c3511018" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpbench/phpbench/zipball/78cd98a9aa34e0f8f80ca01972a8b88d2c30194b", - "reference": "78cd98a9aa34e0f8f80ca01972a8b88d2c30194b", + "url": "https://api.github.com/repos/phpbench/phpbench/zipball/bb61ae6c54b3d58642be154eb09f4e73c3511018", + "reference": "bb61ae6c54b3d58642be154eb09f4e73c3511018", "shasum": "" }, "require": { @@ -6105,7 +6105,7 @@ "ergebnis/composer-normalize": "^2.39", "friendsofphp/php-cs-fixer": "^3.0", "jangregor/phpstan-prophecy": "^1.0", - "phpspec/prophecy": "dev-master", + "phpspec/prophecy": "^1.22", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.0", "phpstan/phpstan-phpunit": "^1.0", @@ -6155,7 +6155,7 @@ ], "support": { "issues": "https://github.com/phpbench/phpbench/issues", - "source": "https://github.com/phpbench/phpbench/tree/1.4.1" + "source": "https://github.com/phpbench/phpbench/tree/1.4.2" }, "funding": [ { @@ -6163,7 +6163,7 @@ "type": "github" } ], - "time": "2025-03-12T08:01:40+00:00" + "time": "2025-10-26T14:21:59+00:00" }, { "name": "phpstan/phpstan", @@ -8832,7 +8832,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -8856,5 +8856,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/docs/examples/1.8.x/client-android/java/databases/create-document.md b/docs/examples/1.8.x/client-android/java/databases/create-document.md index 694d99a089..bfd4601ab4 100644 --- a/docs/examples/1.8.x/client-android/java/databases/create-document.md +++ b/docs/examples/1.8.x/client-android/java/databases/create-document.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -19,7 +21,7 @@ databases.createDocument( "age" to 30, "isAdmin" to false ), // data - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/client-android/java/databases/update-document.md b/docs/examples/1.8.x/client-android/java/databases/update-document.md index a6103e44d1..d3a3967d5b 100644 --- a/docs/examples/1.8.x/client-android/java/databases/update-document.md +++ b/docs/examples/1.8.x/client-android/java/databases/update-document.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ databases.updateDocument( "", // collectionId "", // documentId mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/client-android/java/databases/upsert-document.md b/docs/examples/1.8.x/client-android/java/databases/upsert-document.md index 52be46ebe6..e46afa10a9 100644 --- a/docs/examples/1.8.x/client-android/java/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-android/java/databases/upsert-document.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ databases.upsertDocument( "", // collectionId "", // documentId mapOf( "a" to "b" ), // data - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/client-android/java/storage/create-file.md b/docs/examples/1.8.x/client-android/java/storage/create-file.md index 598e683150..8de00099b0 100644 --- a/docs/examples/1.8.x/client-android/java/storage/create-file.md +++ b/docs/examples/1.8.x/client-android/java/storage/create-file.md @@ -2,6 +2,8 @@ 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; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ storage.createFile( "", // bucketId "", // fileId InputFile.fromPath("file.png"), // file - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/client-android/java/storage/update-file.md b/docs/examples/1.8.x/client-android/java/storage/update-file.md index 14fa77939d..1e21b3fae1 100644 --- a/docs/examples/1.8.x/client-android/java/storage/update-file.md +++ b/docs/examples/1.8.x/client-android/java/storage/update-file.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +14,7 @@ storage.updateFile( "", // bucketId "", // fileId "", // name (optional) - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/client-android/java/tablesdb/create-row.md b/docs/examples/1.8.x/client-android/java/tablesdb/create-row.md index 92a9058401..f7aa10e5c7 100644 --- a/docs/examples/1.8.x/client-android/java/tablesdb/create-row.md +++ b/docs/examples/1.8.x/client-android/java/tablesdb/create-row.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -19,7 +21,7 @@ tablesDB.createRow( "age" to 30, "isAdmin" to false ), // data - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/client-android/java/tablesdb/update-row.md b/docs/examples/1.8.x/client-android/java/tablesdb/update-row.md index cea7baaa16..3abaf90603 100644 --- a/docs/examples/1.8.x/client-android/java/tablesdb/update-row.md +++ b/docs/examples/1.8.x/client-android/java/tablesdb/update-row.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ tablesDB.updateRow( "", // tableId "", // rowId mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/client-android/java/tablesdb/upsert-row.md b/docs/examples/1.8.x/client-android/java/tablesdb/upsert-row.md index 9d6323fffa..6f979fc126 100644 --- a/docs/examples/1.8.x/client-android/java/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/client-android/java/tablesdb/upsert-row.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ tablesDB.upsertRow( "", // tableId "", // rowId mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md index 7d4b04d13a..3e27c44ab2 100644 --- a/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md +++ b/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md @@ -1,6 +1,8 @@ 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 @@ -19,6 +21,6 @@ val result = databases.createDocument( "age" to 30, "isAdmin" to false ), - permissions = listOf("read("any")"), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/update-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/update-document.md index 2cacce6f95..ba6d4d189f 100644 --- a/docs/examples/1.8.x/client-android/kotlin/databases/update-document.md +++ b/docs/examples/1.8.x/client-android/kotlin/databases/update-document.md @@ -1,6 +1,8 @@ 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 @@ -13,6 +15,6 @@ val result = databases.updateDocument( collectionId = "", documentId = "", data = mapOf( "a" to "b" ), // (optional) - permissions = listOf("read("any")"), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md index e5ac4375e8..4d95c9d684 100644 --- a/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md @@ -1,6 +1,8 @@ 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 @@ -13,6 +15,6 @@ val result = databases.upsertDocument( collectionId = "", documentId = "", data = mapOf( "a" to "b" ), - permissions = listOf("read("any")"), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/create-file.md b/docs/examples/1.8.x/client-android/kotlin/storage/create-file.md index 1c78c51e67..8a454b7ee2 100644 --- a/docs/examples/1.8.x/client-android/kotlin/storage/create-file.md +++ b/docs/examples/1.8.x/client-android/kotlin/storage/create-file.md @@ -2,6 +2,8 @@ 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 @@ -13,5 +15,5 @@ val result = storage.createFile( bucketId = "", fileId = "", file = InputFile.fromPath("file.png"), - permissions = listOf("read("any")"), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/update-file.md b/docs/examples/1.8.x/client-android/kotlin/storage/update-file.md index 116d156ead..32c19a8252 100644 --- a/docs/examples/1.8.x/client-android/kotlin/storage/update-file.md +++ b/docs/examples/1.8.x/client-android/kotlin/storage/update-file.md @@ -1,6 +1,8 @@ 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 @@ -12,5 +14,5 @@ val result = storage.updateFile( bucketId = "", fileId = "", name = "", // (optional) - permissions = listOf("read("any")"), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tablesdb/create-row.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/create-row.md index f5850b23be..5c54cdcdca 100644 --- a/docs/examples/1.8.x/client-android/kotlin/tablesdb/create-row.md +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/create-row.md @@ -1,6 +1,8 @@ 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 @@ -19,6 +21,6 @@ val result = tablesDB.createRow( "age" to 30, "isAdmin" to false ), - permissions = listOf("read("any")"), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tablesdb/update-row.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/update-row.md index a17f231418..91b2709058 100644 --- a/docs/examples/1.8.x/client-android/kotlin/tablesdb/update-row.md +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/update-row.md @@ -1,6 +1,8 @@ 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 @@ -13,6 +15,6 @@ val result = tablesDB.updateRow( tableId = "", rowId = "", data = mapOf( "a" to "b" ), // (optional) - permissions = listOf("read("any")"), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tablesdb/upsert-row.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/upsert-row.md index 074fa339cb..6b1a45e5eb 100644 --- a/docs/examples/1.8.x/client-android/kotlin/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/upsert-row.md @@ -1,6 +1,8 @@ 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 @@ -13,6 +15,6 @@ val result = tablesDB.upsertRow( tableId = "", rowId = "", data = mapOf( "a" to "b" ), // (optional) - permissions = listOf("read("any")"), // (optional) + permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-apple/examples/databases/create-document.md b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md index d7fa796ed1..059c166a5c 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -17,7 +19,7 @@ let document = try await databases.createDocument( "age": 30, "isAdmin": false ], - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: "" // optional ) diff --git a/docs/examples/1.8.x/client-apple/examples/databases/update-document.md b/docs/examples/1.8.x/client-apple/examples/databases/update-document.md index d626d7d3c0..74208c6085 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/update-document.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/update-document.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,7 +13,7 @@ let document = try await databases.updateDocument( collectionId: "", documentId: "", data: [:], // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: "" // optional ) diff --git a/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md index 8e2a4a09e9..0ddff28a33 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,7 +13,7 @@ let document = try await databases.upsertDocument( collectionId: "", documentId: "", data: [:], - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: "" // optional ) diff --git a/docs/examples/1.8.x/client-apple/examples/storage/create-file.md b/docs/examples/1.8.x/client-apple/examples/storage/create-file.md index 2db9b20e1b..37c014a04a 100644 --- a/docs/examples/1.8.x/client-apple/examples/storage/create-file.md +++ b/docs/examples/1.8.x/client-apple/examples/storage/create-file.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -10,6 +12,6 @@ let file = try await storage.createFile( bucketId: "", fileId: "", file: InputFile.fromPath("file.png"), - permissions: ["read("any")"] // optional + permissions: [Permission.read(Role.any())] // optional ) diff --git a/docs/examples/1.8.x/client-apple/examples/storage/update-file.md b/docs/examples/1.8.x/client-apple/examples/storage/update-file.md index adef969845..cf6b152754 100644 --- a/docs/examples/1.8.x/client-apple/examples/storage/update-file.md +++ b/docs/examples/1.8.x/client-apple/examples/storage/update-file.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -10,6 +12,6 @@ let file = try await storage.updateFile( bucketId: "", fileId: "", name: "", // optional - permissions: ["read("any")"] // optional + permissions: [Permission.read(Role.any())] // optional ) diff --git a/docs/examples/1.8.x/client-apple/examples/tablesdb/create-row.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/create-row.md index 4d66980bb5..a364e58c17 100644 --- a/docs/examples/1.8.x/client-apple/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/create-row.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -17,7 +19,7 @@ let row = try await tablesDB.createRow( "age": 30, "isAdmin": false ], - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: "" // optional ) diff --git a/docs/examples/1.8.x/client-apple/examples/tablesdb/update-row.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/update-row.md index cd5591db80..8c3d832bad 100644 --- a/docs/examples/1.8.x/client-apple/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/update-row.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,7 +13,7 @@ let row = try await tablesDB.updateRow( tableId: "", rowId: "", data: [:], // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: "" // optional ) diff --git a/docs/examples/1.8.x/client-apple/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/upsert-row.md index 955935adef..2618de440a 100644 --- a/docs/examples/1.8.x/client-apple/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/upsert-row.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,7 +13,7 @@ let row = try await tablesDB.upsertRow( tableId: "", rowId: "", data: [:], // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: "" // optional ) diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md index 0acbe689dc..20a1c3c354 100644 --- a/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md @@ -1,4 +1,6 @@ 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 @@ -17,6 +19,6 @@ Document result = await databases.createDocument( "age": 30, "isAdmin": false }, - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '', // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/update-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/update-document.md index 44ade30c3a..9a5b3ee7dd 100644 --- a/docs/examples/1.8.x/client-flutter/examples/databases/update-document.md +++ b/docs/examples/1.8.x/client-flutter/examples/databases/update-document.md @@ -1,4 +1,6 @@ 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 @@ -11,6 +13,6 @@ Document result = await databases.updateDocument( collectionId: '', documentId: '', data: {}, // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '', // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md index 10117ac78d..7e6eb1aea9 100644 --- a/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md @@ -1,4 +1,6 @@ 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 @@ -11,6 +13,6 @@ Document result = await databases.upsertDocument( collectionId: '', documentId: '', data: {}, - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '', // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/create-file.md b/docs/examples/1.8.x/client-flutter/examples/storage/create-file.md index 661f6b8b1e..ed1021c9a6 100644 --- a/docs/examples/1.8.x/client-flutter/examples/storage/create-file.md +++ b/docs/examples/1.8.x/client-flutter/examples/storage/create-file.md @@ -1,5 +1,7 @@ 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 @@ -11,5 +13,5 @@ File result = await storage.createFile( bucketId: '', fileId: '', file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/update-file.md b/docs/examples/1.8.x/client-flutter/examples/storage/update-file.md index 8e598121c1..8aa292348d 100644 --- a/docs/examples/1.8.x/client-flutter/examples/storage/update-file.md +++ b/docs/examples/1.8.x/client-flutter/examples/storage/update-file.md @@ -1,4 +1,6 @@ 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 @@ -10,5 +12,5 @@ File result = await storage.updateFile( bucketId: '', fileId: '', name: '', // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/tablesdb/create-row.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/create-row.md index 345f0c239a..ede8c4044a 100644 --- a/docs/examples/1.8.x/client-flutter/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/create-row.md @@ -1,4 +1,6 @@ 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 @@ -17,6 +19,6 @@ Row result = await tablesDB.createRow( "age": 30, "isAdmin": false }, - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '', // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/tablesdb/update-row.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/update-row.md index 08ab309363..91f2dd3cdf 100644 --- a/docs/examples/1.8.x/client-flutter/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/update-row.md @@ -1,4 +1,6 @@ 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 @@ -11,6 +13,6 @@ Row result = await tablesDB.updateRow( tableId: '', rowId: '', data: {}, // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '', // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/upsert-row.md index 061bb0b85a..4fb785d744 100644 --- a/docs/examples/1.8.x/client-flutter/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/upsert-row.md @@ -1,4 +1,6 @@ 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 @@ -11,6 +13,6 @@ Row result = await tablesDB.upsertRow( tableId: '', rowId: '', data: {}, // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '', // optional ); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md index 3f7fd9af8f..58ea6ee1ef 100644 --- a/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md @@ -1,4 +1,4 @@ -import { Client, Databases } from "react-native-appwrite"; +import { Client, Databases, Permission, Role } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/update-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/update-document.md index 29674bd3d0..a82fa5238c 100644 --- a/docs/examples/1.8.x/client-react-native/examples/databases/update-document.md +++ b/docs/examples/1.8.x/client-react-native/examples/databases/update-document.md @@ -1,4 +1,4 @@ -import { Client, Databases } from "react-native-appwrite"; +import { Client, Databases, Permission, Role } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md index aa8fd1ca94..b6d2bed4d3 100644 --- a/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md @@ -1,4 +1,4 @@ -import { Client, Databases } from "react-native-appwrite"; +import { Client, Databases, Permission, Role } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/create-file.md b/docs/examples/1.8.x/client-react-native/examples/storage/create-file.md index 965c8d42cf..c1a383d533 100644 --- a/docs/examples/1.8.x/client-react-native/examples/storage/create-file.md +++ b/docs/examples/1.8.x/client-react-native/examples/storage/create-file.md @@ -1,4 +1,4 @@ -import { Client, Storage } from "react-native-appwrite"; +import { Client, Storage, Permission, Role } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/update-file.md b/docs/examples/1.8.x/client-react-native/examples/storage/update-file.md index 2a8092f86d..dd98cdbbfa 100644 --- a/docs/examples/1.8.x/client-react-native/examples/storage/update-file.md +++ b/docs/examples/1.8.x/client-react-native/examples/storage/update-file.md @@ -1,4 +1,4 @@ -import { Client, Storage } from "react-native-appwrite"; +import { Client, Storage, Permission, Role } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/create-row.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/create-row.md index 6be799f547..33f1c8d458 100644 --- a/docs/examples/1.8.x/client-react-native/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/create-row.md @@ -1,4 +1,4 @@ -import { Client, TablesDB } from "react-native-appwrite"; +import { Client, TablesDB, Permission, Role } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/update-row.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/update-row.md index a83e3ea3e1..b53b927b3b 100644 --- a/docs/examples/1.8.x/client-react-native/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/update-row.md @@ -1,4 +1,4 @@ -import { Client, TablesDB } from "react-native-appwrite"; +import { Client, TablesDB, Permission, Role } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/upsert-row.md index 7a82e0711e..28909273a5 100644 --- a/docs/examples/1.8.x/client-react-native/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/upsert-row.md @@ -1,4 +1,4 @@ -import { Client, TablesDB } from "react-native-appwrite"; +import { Client, TablesDB, Permission, Role } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint diff --git a/docs/examples/1.8.x/client-web/examples/databases/create-document.md b/docs/examples/1.8.x/client-web/examples/databases/create-document.md index 8417575ebf..8c1b0ec03a 100644 --- a/docs/examples/1.8.x/client-web/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-web/examples/databases/create-document.md @@ -1,4 +1,4 @@ -import { Client, Databases } from "appwrite"; +import { Client, Databases, Permission, Role } from "appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -17,7 +17,7 @@ const result = await databases.createDocument({ "age": 30, "isAdmin": false }, - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/client-web/examples/databases/update-document.md b/docs/examples/1.8.x/client-web/examples/databases/update-document.md index 33a6d73a12..b5d90fd58d 100644 --- a/docs/examples/1.8.x/client-web/examples/databases/update-document.md +++ b/docs/examples/1.8.x/client-web/examples/databases/update-document.md @@ -1,4 +1,4 @@ -import { Client, Databases } from "appwrite"; +import { Client, Databases, Permission, Role } from "appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await databases.updateDocument({ collectionId: '', documentId: '', data: {}, // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md index e14ad5fc6b..7af42d6337 100644 --- a/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md @@ -1,4 +1,4 @@ -import { Client, Databases } from "appwrite"; +import { Client, Databases, Permission, Role } from "appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await databases.upsertDocument({ collectionId: '', documentId: '', data: {}, - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/client-web/examples/storage/create-file.md b/docs/examples/1.8.x/client-web/examples/storage/create-file.md index 999fcb20ac..565f6ee435 100644 --- a/docs/examples/1.8.x/client-web/examples/storage/create-file.md +++ b/docs/examples/1.8.x/client-web/examples/storage/create-file.md @@ -1,4 +1,4 @@ -import { Client, Storage } from "appwrite"; +import { Client, Storage, Permission, Role } from "appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const result = await storage.createFile({ bucketId: '', fileId: '', file: document.getElementById('uploader').files[0], - permissions: ["read("any")"] // optional + permissions: [Permission.read(Role.any())] // optional }); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/update-file.md b/docs/examples/1.8.x/client-web/examples/storage/update-file.md index 96e1dc5ee2..1f1c460fc0 100644 --- a/docs/examples/1.8.x/client-web/examples/storage/update-file.md +++ b/docs/examples/1.8.x/client-web/examples/storage/update-file.md @@ -1,4 +1,4 @@ -import { Client, Storage } from "appwrite"; +import { Client, Storage, Permission, Role } from "appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const result = await storage.updateFile({ bucketId: '', fileId: '', name: '', // optional - permissions: ["read("any")"] // optional + permissions: [Permission.read(Role.any())] // optional }); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/create-row.md b/docs/examples/1.8.x/client-web/examples/tablesdb/create-row.md index 3bbcf89d4f..2f786b7138 100644 --- a/docs/examples/1.8.x/client-web/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/create-row.md @@ -1,4 +1,4 @@ -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB, Permission, Role } from "appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -17,7 +17,7 @@ const result = await tablesDB.createRow({ "age": 30, "isAdmin": false }, - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/update-row.md b/docs/examples/1.8.x/client-web/examples/tablesdb/update-row.md index ecbcd4fc7a..cda74edb07 100644 --- a/docs/examples/1.8.x/client-web/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/update-row.md @@ -1,4 +1,4 @@ -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB, Permission, Role } from "appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await tablesDB.updateRow({ tableId: '', rowId: '', data: {}, // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/client-web/examples/tablesdb/upsert-row.md index ddac9ff327..c0cb973c79 100644 --- a/docs/examples/1.8.x/client-web/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/upsert-row.md @@ -1,4 +1,4 @@ -import { Client, TablesDB } from "appwrite"; +import { Client, TablesDB, Permission, Role } from "appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await tablesDB.upsertRow({ tableId: '', rowId: '', data: {}, // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-resend-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-resend-provider.md new file mode 100644 index 0000000000..9a16a17a94 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-resend-provider.md @@ -0,0 +1,3 @@ +appwrite messaging create-resend-provider \ + --provider-id \ + --name diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-resend-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-resend-provider.md new file mode 100644 index 0000000000..df22cf075f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-resend-provider.md @@ -0,0 +1,2 @@ +appwrite messaging update-resend-provider \ + --provider-id diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-collection.md b/docs/examples/1.8.x/console-web/examples/databases/create-collection.md index f3c2efaaee..f02b110e51 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-collection.md @@ -1,4 +1,4 @@ -import { Client, Databases } from "@appwrite.io/console"; +import { Client, Databases, Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const result = await databases.createCollection({ databaseId: '', collectionId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional documentSecurity: false, // optional enabled: false // optional }); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-document.md b/docs/examples/1.8.x/console-web/examples/databases/create-document.md index 80f3fe66ad..ae93f274a9 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-document.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-document.md @@ -1,4 +1,4 @@ -import { Client, Databases } from "@appwrite.io/console"; +import { Client, Databases, Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -17,7 +17,7 @@ const result = await databases.createDocument({ "age": 30, "isAdmin": false }, - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-collection.md b/docs/examples/1.8.x/console-web/examples/databases/update-collection.md index 83763e4509..23b55658e1 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-collection.md @@ -1,4 +1,4 @@ -import { Client, Databases } from "@appwrite.io/console"; +import { Client, Databases, Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const result = await databases.updateCollection({ databaseId: '', collectionId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional documentSecurity: false, // optional enabled: false // optional }); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-document.md b/docs/examples/1.8.x/console-web/examples/databases/update-document.md index 8a92d5b9f4..5ab73b3210 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-document.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-document.md @@ -1,4 +1,4 @@ -import { Client, Databases } from "@appwrite.io/console"; +import { Client, Databases, Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await databases.updateDocument({ collectionId: '', documentId: '', data: {}, // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md b/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md index e7a52fd7cd..9c29601d67 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md @@ -1,4 +1,4 @@ -import { Client, Databases } from "@appwrite.io/console"; +import { Client, Databases, Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await databases.upsertDocument({ collectionId: '', documentId: '', data: {}, - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-resend-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-resend-provider.md new file mode 100644 index 0000000000..22a905c2c0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-resend-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +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.createResendProvider({ + providerId: '', + name: '', + apiKey: '', // optional + fromName: '', // optional + fromEmail: 'email@example.com', // optional + replyToName: '', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-resend-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-resend-provider.md new file mode 100644 index 0000000000..daea9920a1 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-resend-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +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.updateResendProvider({ + providerId: '', + name: '', // optional + enabled: false, // optional + apiKey: '', // optional + fromName: '', // optional + fromEmail: 'email@example.com', // optional + replyToName: '', // optional + replyToEmail: '' // optional +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/create-bucket.md b/docs/examples/1.8.x/console-web/examples/storage/create-bucket.md index 7727d1c7bb..343568a408 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/console-web/examples/storage/create-bucket.md @@ -1,4 +1,4 @@ -import { Client, Storage, } from "@appwrite.io/console"; +import { Client, Storage, , Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const storage = new Storage(client); const result = await storage.createBucket({ bucketId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional fileSecurity: false, // optional enabled: false, // optional maximumFileSize: 1, // optional diff --git a/docs/examples/1.8.x/console-web/examples/storage/create-file.md b/docs/examples/1.8.x/console-web/examples/storage/create-file.md index 1dcab62ba4..95a19050d1 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/create-file.md +++ b/docs/examples/1.8.x/console-web/examples/storage/create-file.md @@ -1,4 +1,4 @@ -import { Client, Storage } from "@appwrite.io/console"; +import { Client, Storage, Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const result = await storage.createFile({ bucketId: '', fileId: '', file: document.getElementById('uploader').files[0], - permissions: ["read("any")"] // optional + permissions: [Permission.read(Role.any())] // optional }); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/update-bucket.md b/docs/examples/1.8.x/console-web/examples/storage/update-bucket.md index 58ad29fe15..b2c2eaa885 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/console-web/examples/storage/update-bucket.md @@ -1,4 +1,4 @@ -import { Client, Storage, } from "@appwrite.io/console"; +import { Client, Storage, , Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -9,7 +9,7 @@ const storage = new Storage(client); const result = await storage.updateBucket({ bucketId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional fileSecurity: false, // optional enabled: false, // optional maximumFileSize: 1, // optional diff --git a/docs/examples/1.8.x/console-web/examples/storage/update-file.md b/docs/examples/1.8.x/console-web/examples/storage/update-file.md index b73149db13..b014b0bf62 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/update-file.md +++ b/docs/examples/1.8.x/console-web/examples/storage/update-file.md @@ -1,4 +1,4 @@ -import { Client, Storage } from "@appwrite.io/console"; +import { Client, Storage, Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const result = await storage.updateFile({ bucketId: '', fileId: '', name: '', // optional - permissions: ["read("any")"] // optional + permissions: [Permission.read(Role.any())] // optional }); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-row.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-row.md index 1991d44258..80c8a9763d 100644 --- a/docs/examples/1.8.x/console-web/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-row.md @@ -1,4 +1,4 @@ -import { Client, TablesDB } from "@appwrite.io/console"; +import { Client, TablesDB, Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -17,7 +17,7 @@ const result = await tablesDB.createRow({ "age": 30, "isAdmin": false }, - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-table.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-table.md index aad0eceb73..a203aeb7e4 100644 --- a/docs/examples/1.8.x/console-web/examples/tablesdb/create-table.md +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-table.md @@ -1,4 +1,4 @@ -import { Client, TablesDB } from "@appwrite.io/console"; +import { Client, TablesDB, Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const result = await tablesDB.createTable({ databaseId: '', tableId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional rowSecurity: false, // optional enabled: false // optional }); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-row.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-row.md index 6193d79567..952ed62e64 100644 --- a/docs/examples/1.8.x/console-web/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-row.md @@ -1,4 +1,4 @@ -import { Client, TablesDB } from "@appwrite.io/console"; +import { Client, TablesDB, Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await tablesDB.updateRow({ tableId: '', rowId: '', data: {}, // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-table.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-table.md index 11eec2e343..ee6b193be9 100644 --- a/docs/examples/1.8.x/console-web/examples/tablesdb/update-table.md +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-table.md @@ -1,4 +1,4 @@ -import { Client, TablesDB } from "@appwrite.io/console"; +import { Client, TablesDB, Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const result = await tablesDB.updateTable({ databaseId: '', tableId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional rowSecurity: false, // optional enabled: false // optional }); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-row.md index f56eff55fa..dee8dd0a6b 100644 --- a/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-row.md @@ -1,4 +1,4 @@ -import { Client, TablesDB } from "@appwrite.io/console"; +import { Client, TablesDB, Permission, Role } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const result = await tablesDB.upsertRow({ tableId: '', rowId: '', data: {}, // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: '' // optional }); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-collection.md b/docs/examples/1.8.x/server-dart/examples/databases/create-collection.md index 61401761ec..51a7c12626 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-collection.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +13,7 @@ Collection result = await databases.createCollection( databaseId: '', collectionId: '', name: '', - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) documentSecurity: false, // (optional) enabled: false, // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-document.md b/docs/examples/1.8.x/server-dart/examples/databases/create-document.md index 0f663a67f6..359ef2368c 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-document.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -18,6 +20,6 @@ Document result = await databases.createDocument( "age": 30, "isAdmin": false }, - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) transactionId: '', // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-collection.md b/docs/examples/1.8.x/server-dart/examples/databases/update-collection.md index c3c565b231..ff9b7eb4ee 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-collection.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +13,7 @@ Collection result = await databases.updateCollection( databaseId: '', collectionId: '', name: '', - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) documentSecurity: false, // (optional) enabled: false, // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-document.md b/docs/examples/1.8.x/server-dart/examples/databases/update-document.md index 077a08f606..b48041e228 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-document.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,6 +14,6 @@ Document result = await databases.updateDocument( collectionId: '', documentId: '', data: {}, // (optional) - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) transactionId: '', // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md index be4216da67..95a6d9d4a4 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,6 +14,6 @@ Document result = await databases.upsertDocument( collectionId: '', documentId: '', data: {}, - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) transactionId: '', // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-resend-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-resend-provider.md new file mode 100644 index 0000000000..ca5e2a0e7d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-resend-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createResendProvider( + providerId: '', + name: '', + apiKey: '', // (optional) + fromName: '', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-resend-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-resend-provider.md new file mode 100644 index 0000000000..cd4755280a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-resend-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateResendProvider( + providerId: '', + name: '', // (optional) + enabled: false, // (optional) + apiKey: '', // (optional) + fromName: '', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '', // (optional) + replyToEmail: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-dart/examples/storage/create-bucket.md index c09a4f2c5d..79357d0e4a 100644 --- a/docs/examples/1.8.x/server-dart/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-dart/examples/storage/create-bucket.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +12,7 @@ Storage storage = Storage(client); Bucket result = await storage.createBucket( bucketId: '', name: '', - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) fileSecurity: false, // (optional) enabled: false, // (optional) maximumFileSize: 1, // (optional) diff --git a/docs/examples/1.8.x/server-dart/examples/storage/create-file.md b/docs/examples/1.8.x/server-dart/examples/storage/create-file.md index e631416ecb..25d7ea6fbb 100644 --- a/docs/examples/1.8.x/server-dart/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-dart/examples/storage/create-file.md @@ -1,5 +1,7 @@ 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://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,5 +14,5 @@ File result = await storage.createFile( bucketId: '', fileId: '', file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-dart/examples/storage/update-bucket.md index b4e45e059c..f3eea941a3 100644 --- a/docs/examples/1.8.x/server-dart/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-dart/examples/storage/update-bucket.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +12,7 @@ Storage storage = Storage(client); Bucket result = await storage.updateBucket( bucketId: '', name: '', - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) fileSecurity: false, // (optional) enabled: false, // (optional) maximumFileSize: 1, // (optional) diff --git a/docs/examples/1.8.x/server-dart/examples/storage/update-file.md b/docs/examples/1.8.x/server-dart/examples/storage/update-file.md index 966883a1f9..4ecc9ecf91 100644 --- a/docs/examples/1.8.x/server-dart/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-dart/examples/storage/update-file.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,5 +13,5 @@ File result = await storage.updateFile( bucketId: '', fileId: '', name: '', // (optional) - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-row.md index 255bd9615e..ff91143812 100644 --- a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-row.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -18,6 +20,6 @@ Row result = await tablesDB.createRow( "age": 30, "isAdmin": false }, - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) transactionId: '', // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-table.md index c055e93fec..ee6776f08c 100644 --- a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-table.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-table.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +13,7 @@ Table result = await tablesDB.createTable( databaseId: '', tableId: '', name: '', - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) rowSecurity: false, // (optional) enabled: false, // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-row.md index e4f683cae0..02ba458c0f 100644 --- a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-row.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,6 +14,6 @@ Row result = await tablesDB.updateRow( tableId: '', rowId: '', data: {}, // (optional) - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) transactionId: '', // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-table.md index fd6646a01b..bdaffe9c68 100644 --- a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-table.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-table.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +13,7 @@ Table result = await tablesDB.updateTable( databaseId: '', tableId: '', name: '', - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) rowSecurity: false, // (optional) enabled: false, // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-row.md index f9b8c848ae..72f1ae2064 100644 --- a/docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-row.md @@ -1,4 +1,6 @@ import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,6 +14,6 @@ Row result = await tablesDB.upsertRow( tableId: '', rowId: '', data: {}, // (optional) - permissions: ["read("any")"], // (optional) + permissions: [Permission.read(Role.any())], // (optional) transactionId: '', // (optional) ); diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md index 75a1c5c311..cd7bfe0e8c 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md @@ -1,6 +1,8 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ Collection result = await databases.CreateCollection( databaseId: "", collectionId: "", name: "", - permissions: ["read("any")"], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional documentSecurity: false, // optional enabled: false // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md index 9fcfdd041d..24a709c2bd 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md @@ -1,6 +1,8 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -20,6 +22,6 @@ Document result = await databases.CreateDocument( age = 30, isAdmin = false }, - permissions: ["read("any")"], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional transactionId: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md index 7885ad3969..e8e63c9fee 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md @@ -1,6 +1,8 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ Collection result = await databases.UpdateCollection( databaseId: "", collectionId: "", name: "", - permissions: ["read("any")"], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional documentSecurity: false, // optional enabled: false // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md index 838b2790a9..7ad9073642 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md @@ -1,6 +1,8 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +16,6 @@ Document result = await databases.UpdateDocument( collectionId: "", documentId: "", data: [object], // optional - permissions: ["read("any")"], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional transactionId: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md index e12c5dd0d7..903e5b90b9 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md @@ -1,6 +1,8 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +16,6 @@ Document result = await databases.UpsertDocument( collectionId: "", documentId: "", data: [object], - permissions: ["read("any")"], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional transactionId: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-resend-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-resend-provider.md new file mode 100644 index 0000000000..526e7916b6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-resend-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateResendProvider( + providerId: "", + name: "", + apiKey: "", // optional + fromName: "", // optional + fromEmail: "email@example.com", // optional + replyToName: "", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-resend-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-resend-provider.md new file mode 100644 index 0000000000..0d295cf007 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-resend-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateResendProvider( + providerId: "", + name: "", // optional + enabled: false, // optional + apiKey: "", // optional + fromName: "", // optional + fromEmail: "email@example.com", // optional + replyToName: "", // optional + replyToEmail: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md index 0cc317d9a6..57fbefb61e 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md @@ -2,6 +2,8 @@ using Appwrite; using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ Storage storage = new Storage(client); Bucket result = await storage.CreateBucket( bucketId: "", name: "", - permissions: ["read("any")"], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional fileSecurity: false, // optional enabled: false, // optional maximumFileSize: 1, // optional diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md b/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md index a4cedb8214..94bda90ea6 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md @@ -1,6 +1,8 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,5 +15,5 @@ File result = await storage.CreateFile( bucketId: "", fileId: "", file: InputFile.FromPath("./path-to-files/image.jpg"), - permissions: ["read("any")"] // optional + permissions: new List { Permission.Read(Role.Any()) } // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md index 2a439ba2af..ca919d9f5b 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md @@ -2,6 +2,8 @@ using Appwrite; using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ Storage storage = new Storage(client); Bucket result = await storage.UpdateBucket( bucketId: "", name: "", - permissions: ["read("any")"], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional fileSecurity: false, // optional enabled: false, // optional maximumFileSize: 1, // optional diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md b/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md index 3f6ea608d7..4f9daf5a1f 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md @@ -1,6 +1,8 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,5 +15,5 @@ File result = await storage.UpdateFile( bucketId: "", fileId: "", name: "", // optional - permissions: ["read("any")"] // optional + permissions: new List { Permission.Read(Role.Any()) } // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-row.md index 8d56063f1f..7c53febcaa 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-row.md @@ -1,6 +1,8 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -20,6 +22,6 @@ Row result = await tablesDB.CreateRow( age = 30, isAdmin = false }, - permissions: ["read("any")"], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional transactionId: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-table.md index 7085b9a0f7..e9c7819f69 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-table.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-table.md @@ -1,6 +1,8 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ Table result = await tablesDB.CreateTable( databaseId: "", tableId: "", name: "", - permissions: ["read("any")"], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional rowSecurity: false, // optional enabled: false // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-row.md index 40f4eb4314..9e7f543504 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-row.md @@ -1,6 +1,8 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +16,6 @@ Row result = await tablesDB.UpdateRow( tableId: "", rowId: "", data: [object], // optional - permissions: ["read("any")"], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional transactionId: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-table.md index b2d52b755c..b55e95efc4 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-table.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-table.md @@ -1,6 +1,8 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ Table result = await tablesDB.UpdateTable( databaseId: "", tableId: "", name: "", - permissions: ["read("any")"], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional rowSecurity: false, // optional enabled: false // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-row.md index 18b8419146..8dfb8666c7 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-row.md @@ -1,6 +1,8 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; +using Appwrite.Permission; +using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +16,6 @@ Row result = await tablesDB.UpsertRow( tableId: "", rowId: "", data: [object], // optional - permissions: ["read("any")"], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional transactionId: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-resend-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-resend-provider.md new file mode 100644 index 0000000000..a8ec0ad31e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-resend-provider.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := messaging.New(client) + +response, error := service.CreateResendProvider( + "", + "", + messaging.WithCreateResendProviderApiKey(""), + messaging.WithCreateResendProviderFromName(""), + messaging.WithCreateResendProviderFromEmail("email@example.com"), + messaging.WithCreateResendProviderReplyToName(""), + messaging.WithCreateResendProviderReplyToEmail("email@example.com"), + messaging.WithCreateResendProviderEnabled(false), +) diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-resend-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-resend-provider.md new file mode 100644 index 0000000000..d67320f478 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-resend-provider.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := messaging.New(client) + +response, error := service.UpdateResendProvider( + "", + messaging.WithUpdateResendProviderName(""), + messaging.WithUpdateResendProviderEnabled(false), + messaging.WithUpdateResendProviderApiKey(""), + messaging.WithUpdateResendProviderFromName(""), + messaging.WithUpdateResendProviderFromEmail("email@example.com"), + messaging.WithUpdateResendProviderReplyToName(""), + messaging.WithUpdateResendProviderReplyToEmail(""), +) diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-resend-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-resend-provider.md new file mode 100644 index 0000000000..799cd19f96 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-resend-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingCreateResendProvider( + providerId: "", + name: "", + apiKey: "", + fromName: "", + fromEmail: "email@example.com", + replyToName: "", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-resend-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-resend-provider.md new file mode 100644 index 0000000000..a66316d805 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-resend-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingUpdateResendProvider( + providerId: "", + name: "", + enabled: false, + apiKey: "", + fromName: "", + fromEmail: "email@example.com", + replyToName: "", + replyToEmail: "" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-collection.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-collection.md index 8ec51e698a..10eed04a4f 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/create-collection.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-collection.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ databases.createCollection( "", // databaseId "", // collectionId "", // name - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) false, // documentSecurity (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md index 9c6357dfae..aa6c9ea203 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -20,7 +22,7 @@ databases.createDocument( "age" to 30, "isAdmin" to false ), // data - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-collection.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-collection.md index 6805c1149d..24d312da8c 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/update-collection.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-collection.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ databases.updateCollection( "", // databaseId "", // collectionId "", // name - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) false, // documentSecurity (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-document.md index f3019ab95b..749de99fce 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/update-document.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-document.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +16,7 @@ databases.updateDocument( "", // collectionId "", // documentId mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md index 39864b9ac3..4f156bbf8b 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +16,7 @@ databases.upsertDocument( "", // collectionId "", // documentId mapOf( "a" to "b" ), // data - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-resend-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-resend-provider.md new file mode 100644 index 0000000000..37681f9d33 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-resend-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createResendProvider( + "", // providerId + "", // name + "", // apiKey (optional) + "", // fromName (optional) + "email@example.com", // fromEmail (optional) + "", // 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/docs/examples/1.8.x/server-kotlin/java/messaging/update-resend-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-resend-provider.md new file mode 100644 index 0000000000..3282e5d26a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-resend-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateResendProvider( + "", // providerId + "", // name (optional) + false, // enabled (optional) + "", // apiKey (optional) + "", // fromName (optional) + "email@example.com", // fromEmail (optional) + "", // replyToName (optional) + "", // replyToEmail (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/create-bucket.md b/docs/examples/1.8.x/server-kotlin/java/storage/create-bucket.md index a3a3308420..d48db24094 100644 --- a/docs/examples/1.8.x/server-kotlin/java/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-kotlin/java/storage/create-bucket.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +14,7 @@ Storage storage = new Storage(client); storage.createBucket( "", // bucketId "", // name - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) false, // fileSecurity (optional) false, // enabled (optional) 1, // maximumFileSize (optional) diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/create-file.md b/docs/examples/1.8.x/server-kotlin/java/storage/create-file.md index 583f8569a5..7ddf8913e1 100644 --- a/docs/examples/1.8.x/server-kotlin/java/storage/create-file.md +++ b/docs/examples/1.8.x/server-kotlin/java/storage/create-file.md @@ -2,6 +2,8 @@ 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; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +16,7 @@ storage.createFile( "", // bucketId "", // fileId InputFile.fromPath("file.png"), // file - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/update-bucket.md b/docs/examples/1.8.x/server-kotlin/java/storage/update-bucket.md index 2d80e2648c..586b113578 100644 --- a/docs/examples/1.8.x/server-kotlin/java/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-kotlin/java/storage/update-bucket.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +14,7 @@ Storage storage = new Storage(client); storage.updateBucket( "", // bucketId "", // name - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) false, // fileSecurity (optional) false, // enabled (optional) 1, // maximumFileSize (optional) diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/update-file.md b/docs/examples/1.8.x/server-kotlin/java/storage/update-file.md index 7f325f91fb..d534e0eb64 100644 --- a/docs/examples/1.8.x/server-kotlin/java/storage/update-file.md +++ b/docs/examples/1.8.x/server-kotlin/java/storage/update-file.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ storage.updateFile( "", // bucketId "", // fileId "", // name (optional) - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-row.md index d041511c11..9e47167cd1 100644 --- a/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-row.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-row.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -20,7 +22,7 @@ tablesDB.createRow( "age" to 30, "isAdmin" to false ), // data - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-table.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-table.md index 5bd3b6d0d9..1f9fd10d5c 100644 --- a/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-table.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-table.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ tablesDB.createTable( "", // databaseId "", // tableId "", // name - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) false, // rowSecurity (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-row.md index b4f9631222..835f63b19a 100644 --- a/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-row.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-row.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +16,7 @@ tablesDB.updateRow( "", // tableId "", // rowId mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-table.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-table.md index e593a04641..257803b984 100644 --- a/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-table.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-table.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ tablesDB.updateTable( "", // databaseId "", // tableId "", // name - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) false, // rowSecurity (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-row.md index b6a986ef4d..6ea29e3e8d 100644 --- a/docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-row.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; +import io.appwrite.Permission; +import io.appwrite.Role; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +16,7 @@ tablesDB.upsertRow( "", // tableId "", // rowId mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) + listOf(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-collection.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-collection.md index de9679f559..43031b4a43 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-collection.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-collection.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ val response = databases.createCollection( databaseId = "", collectionId = "", name = "", - permissions = listOf("read("any")"), // optional + permissions = listOf(Permission.read(Role.any())), // optional documentSecurity = false, // optional enabled = false // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md index 46cb711b62..cbdbcaeb9b 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -20,6 +22,6 @@ val response = databases.createDocument( "age" to 30, "isAdmin" to false ), - permissions = listOf("read("any")"), // optional + permissions = listOf(Permission.read(Role.any())), // optional transactionId = "" // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-collection.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-collection.md index bd42ba07f4..f37b71a580 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-collection.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-collection.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ val response = databases.updateCollection( databaseId = "", collectionId = "", name = "", - permissions = listOf("read("any")"), // optional + permissions = listOf(Permission.read(Role.any())), // optional documentSecurity = false, // optional enabled = false // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-document.md index c64a705676..399dfcd970 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-document.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-document.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +16,6 @@ val response = databases.updateDocument( collectionId = "", documentId = "", data = mapOf( "a" to "b" ), // optional - permissions = listOf("read("any")"), // optional + permissions = listOf(Permission.read(Role.any())), // optional transactionId = "" // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md index d6d6800864..8387398193 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +16,6 @@ val response = databases.upsertDocument( collectionId = "", documentId = "", data = mapOf( "a" to "b" ), - permissions = listOf("read("any")"), // optional + permissions = listOf(Permission.read(Role.any())), // optional transactionId = "" // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-resend-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-resend-provider.md new file mode 100644 index 0000000000..2db1dc1b17 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-resend-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createResendProvider( + providerId = "", + name = "", + apiKey = "", // optional + fromName = "", // optional + fromEmail = "email@example.com", // optional + replyToName = "", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-resend-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-resend-provider.md new file mode 100644 index 0000000000..26d6f12a17 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-resend-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateResendProvider( + providerId = "", + name = "", // optional + enabled = false, // optional + apiKey = "", // optional + fromName = "", // optional + fromEmail = "email@example.com", // optional + replyToName = "", // optional + replyToEmail = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-bucket.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-bucket.md index 0bca827872..872932eeff 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-bucket.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +14,7 @@ val storage = Storage(client) val response = storage.createBucket( bucketId = "", name = "", - permissions = listOf("read("any")"), // optional + permissions = listOf(Permission.read(Role.any())), // optional fileSecurity = false, // optional enabled = false, // optional maximumFileSize = 1, // optional diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-file.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-file.md index b22b32a665..e9e986cd26 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-file.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-file.md @@ -2,6 +2,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,5 +16,5 @@ val response = storage.createFile( bucketId = "", fileId = "", file = InputFile.fromPath("file.png"), - permissions = listOf("read("any")") // optional + permissions = listOf(Permission.read(Role.any())) // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-bucket.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-bucket.md index d475a6e5ed..cb8187343e 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-bucket.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +14,7 @@ val storage = Storage(client) val response = storage.updateBucket( bucketId = "", name = "", - permissions = listOf("read("any")"), // optional + permissions = listOf(Permission.read(Role.any())), // optional fileSecurity = false, // optional enabled = false, // optional maximumFileSize = 1, // optional diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-file.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-file.md index e82ea8125c..b019f567a9 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-file.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-file.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,5 +15,5 @@ val response = storage.updateFile( bucketId = "", fileId = "", name = "", // optional - permissions = listOf("read("any")") // optional + permissions = listOf(Permission.read(Role.any())) // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-row.md index b06038964b..e74c07a1ef 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-row.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-row.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -20,6 +22,6 @@ val response = tablesDB.createRow( "age" to 30, "isAdmin" to false ), - permissions = listOf("read("any")"), // optional + permissions = listOf(Permission.read(Role.any())), // optional transactionId = "" // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-table.md index 88b50d22ad..5ff2ba4e08 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-table.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-table.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ val response = tablesDB.createTable( databaseId = "", tableId = "", name = "", - permissions = listOf("read("any")"), // optional + permissions = listOf(Permission.read(Role.any())), // optional rowSecurity = false, // optional enabled = false // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-row.md index 0fefb78e5f..94f3770ed1 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-row.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-row.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +16,6 @@ val response = tablesDB.updateRow( tableId = "", rowId = "", data = mapOf( "a" to "b" ), // optional - permissions = listOf("read("any")"), // optional + permissions = listOf(Permission.read(Role.any())), // optional transactionId = "" // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-table.md index 52389087e7..357d5b965d 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-table.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-table.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ val response = tablesDB.updateTable( databaseId = "", tableId = "", name = "", - permissions = listOf("read("any")"), // optional + permissions = listOf(Permission.read(Role.any())), // optional rowSecurity = false, // optional enabled = false // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-row.md index 5bcc73b4b1..b72ab80c38 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-row.md @@ -1,6 +1,8 @@ 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://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +16,6 @@ val response = tablesDB.upsertRow( tableId = "", rowId = "", data = mapOf( "a" to "b" ), // optional - permissions = listOf("read("any")"), // optional + permissions = listOf(Permission.read(Role.any())), // optional transactionId = "" // optional ) diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-resend-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-resend-provider.md new file mode 100644 index 0000000000..8f00367ea7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-resend-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createResendProvider({ + providerId: '', + name: '', + apiKey: '', // optional + fromName: '', // optional + fromEmail: 'email@example.com', // optional + replyToName: '', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-resend-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-resend-provider.md new file mode 100644 index 0000000000..ab962178c4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-resend-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateResendProvider({ + providerId: '', + name: '', // optional + enabled: false, // optional + apiKey: '', // optional + fromName: '', // optional + fromEmail: 'email@example.com', // optional + replyToName: '', // optional + replyToEmail: '' // optional +}); diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-collection.md b/docs/examples/1.8.x/server-php/examples/databases/create-collection.md index 700d97177b..9ac9e365d1 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-php/examples/databases/create-collection.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\Databases; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,7 +16,7 @@ $result = $databases->createCollection( databaseId: '', collectionId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [Permission::read(Role::any())], // optional documentSecurity: false, // optional enabled: false // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-document.md b/docs/examples/1.8.x/server-php/examples/databases/create-document.md index 19d3cfb566..39fb26f8ad 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-php/examples/databases/create-document.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\Databases; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -21,6 +23,6 @@ $result = $databases->createDocument( 'age' => 30, 'isAdmin' => false ], - permissions: ["read("any")"], // optional + permissions: [Permission::read(Role::any())], // optional transactionId: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-collection.md b/docs/examples/1.8.x/server-php/examples/databases/update-collection.md index dd030c0792..d37f6e2427 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-php/examples/databases/update-collection.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\Databases; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,7 +16,7 @@ $result = $databases->updateCollection( databaseId: '', collectionId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [Permission::read(Role::any())], // optional documentSecurity: false, // optional enabled: false // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-document.md b/docs/examples/1.8.x/server-php/examples/databases/update-document.md index d903252886..2aaada2b52 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-php/examples/databases/update-document.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\Databases; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -15,6 +17,6 @@ $result = $databases->updateDocument( collectionId: '', documentId: '', data: [], // optional - permissions: ["read("any")"], // optional + permissions: [Permission::read(Role::any())], // optional transactionId: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md index 6db7462ac7..8e9d2c9c17 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\Databases; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -15,6 +17,6 @@ $result = $databases->upsertDocument( collectionId: '', documentId: '', data: [], - permissions: ["read("any")"], // optional + permissions: [Permission::read(Role::any())], // optional transactionId: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-resend-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-resend-provider.md new file mode 100644 index 0000000000..e66b0b82d3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-resend-provider.md @@ -0,0 +1,22 @@ +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createResendProvider( + providerId: '', + name: '', + apiKey: '', // optional + fromName: '', // optional + fromEmail: 'email@example.com', // optional + replyToName: '', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-resend-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-resend-provider.md new file mode 100644 index 0000000000..b3f1d1fd4b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-resend-provider.md @@ -0,0 +1,22 @@ +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateResendProvider( + providerId: '', + name: '', // optional + enabled: false, // optional + apiKey: '', // optional + fromName: '', // optional + fromEmail: 'email@example.com', // optional + replyToName: '', // optional + replyToEmail: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-php/examples/storage/create-bucket.md index cd17ffedac..2e7cc1d15c 100644 --- a/docs/examples/1.8.x/server-php/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-php/examples/storage/create-bucket.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\Storage; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -13,7 +15,7 @@ $storage = new Storage($client); $result = $storage->createBucket( bucketId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [Permission::read(Role::any())], // optional fileSecurity: false, // optional enabled: false, // optional maximumFileSize: 1, // optional diff --git a/docs/examples/1.8.x/server-php/examples/storage/create-file.md b/docs/examples/1.8.x/server-php/examples/storage/create-file.md index 2d13305984..33bef04541 100644 --- a/docs/examples/1.8.x/server-php/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-php/examples/storage/create-file.md @@ -3,6 +3,8 @@ use Appwrite\Client; use Appwrite\InputFile; use Appwrite\Services\Storage; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -15,5 +17,5 @@ $result = $storage->createFile( bucketId: '', fileId: '', file: InputFile::withPath('file.png'), - permissions: ["read("any")"] // optional + permissions: [Permission::read(Role::any())] // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-php/examples/storage/update-bucket.md index 1517e36621..819798cb95 100644 --- a/docs/examples/1.8.x/server-php/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-php/examples/storage/update-bucket.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\Storage; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -13,7 +15,7 @@ $storage = new Storage($client); $result = $storage->updateBucket( bucketId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [Permission::read(Role::any())], // optional fileSecurity: false, // optional enabled: false, // optional maximumFileSize: 1, // optional diff --git a/docs/examples/1.8.x/server-php/examples/storage/update-file.md b/docs/examples/1.8.x/server-php/examples/storage/update-file.md index 7b467acfe3..fc84f590a6 100644 --- a/docs/examples/1.8.x/server-php/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-php/examples/storage/update-file.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\Storage; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,5 +16,5 @@ $result = $storage->updateFile( bucketId: '', fileId: '', name: '', // optional - permissions: ["read("any")"] // optional + permissions: [Permission::read(Role::any())] // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-row.md index 873ecaf448..70666d52c0 100644 --- a/docs/examples/1.8.x/server-php/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-row.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\TablesDB; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -21,6 +23,6 @@ $result = $tablesDB->createRow( 'age' => 30, 'isAdmin' => false ], - permissions: ["read("any")"], // optional + permissions: [Permission::read(Role::any())], // optional transactionId: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-table.md index 46cf3885fb..aff821c844 100644 --- a/docs/examples/1.8.x/server-php/examples/tablesdb/create-table.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-table.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\TablesDB; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,7 +16,7 @@ $result = $tablesDB->createTable( databaseId: '', tableId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [Permission::read(Role::any())], // optional rowSecurity: false, // optional enabled: false // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-row.md index c01eba8d57..d92ab78968 100644 --- a/docs/examples/1.8.x/server-php/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-row.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\TablesDB; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -15,6 +17,6 @@ $result = $tablesDB->updateRow( tableId: '', rowId: '', data: [], // optional - permissions: ["read("any")"], // optional + permissions: [Permission::read(Role::any())], // optional transactionId: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-table.md index 294d8d6751..22f1523bd8 100644 --- a/docs/examples/1.8.x/server-php/examples/tablesdb/update-table.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-table.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\TablesDB; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,7 +16,7 @@ $result = $tablesDB->updateTable( databaseId: '', tableId: '', name: '', - permissions: ["read("any")"], // optional + permissions: [Permission::read(Role::any())], // optional rowSecurity: false, // optional enabled: false // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-php/examples/tablesdb/upsert-row.md index bec3c0af92..192463e9be 100644 --- a/docs/examples/1.8.x/server-php/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/upsert-row.md @@ -2,6 +2,8 @@ use Appwrite\Client; use Appwrite\Services\TablesDB; +use Appwrite\Permission; +use Appwrite\Role; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -15,6 +17,6 @@ $result = $tablesDB->upsertRow( tableId: '', rowId: '', data: [], // optional - permissions: ["read("any")"], // optional + permissions: [Permission::read(Role::any())], // optional transactionId: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-collection.md b/docs/examples/1.8.x/server-python/examples/databases/create-collection.md index 596d4a9383..66dc66763b 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-python/examples/databases/create-collection.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,7 +14,7 @@ result = databases.create_collection( database_id = '', collection_id = '', name = '', - permissions = ["read("any")"], # optional + permissions = [Permission.read(Role.any())], # optional document_security = False, # optional enabled = False # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-document.md b/docs/examples/1.8.x/server-python/examples/databases/create-document.md index f42a3d82b6..bd1e1c948a 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-python/examples/databases/create-document.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -19,6 +21,6 @@ result = databases.create_document( "age": 30, "isAdmin": False }, - permissions = ["read("any")"], # optional + permissions = [Permission.read(Role.any())], # optional transaction_id = '' # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-collection.md b/docs/examples/1.8.x/server-python/examples/databases/update-collection.md index 2e5be50581..5f357f504d 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-python/examples/databases/update-collection.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,7 +14,7 @@ result = databases.update_collection( database_id = '', collection_id = '', name = '', - permissions = ["read("any")"], # optional + permissions = [Permission.read(Role.any())], # optional document_security = False, # optional enabled = False # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-document.md b/docs/examples/1.8.x/server-python/examples/databases/update-document.md index c9ef02f72e..a396b9e771 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-python/examples/databases/update-document.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +15,6 @@ result = databases.update_document( collection_id = '', document_id = '', data = {}, # optional - permissions = ["read("any")"], # optional + permissions = [Permission.read(Role.any())], # optional transaction_id = '' # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md index e1a2f44d8c..ac53ae1172 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +15,6 @@ result = databases.upsert_document( collection_id = '', document_id = '', data = {}, - permissions = ["read("any")"], # optional + permissions = [Permission.read(Role.any())], # optional transaction_id = '' # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-resend-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-resend-provider.md new file mode 100644 index 0000000000..5789f6b91e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-resend-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_resend_provider( + provider_id = '', + name = '', + api_key = '', # optional + from_name = '', # optional + from_email = 'email@example.com', # optional + reply_to_name = '', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-resend-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-resend-provider.md new file mode 100644 index 0000000000..a8ad85954a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-resend-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_resend_provider( + provider_id = '', + name = '', # optional + enabled = False, # optional + api_key = '', # optional + from_name = '', # optional + from_email = 'email@example.com', # optional + reply_to_name = '', # optional + reply_to_email = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-python/examples/storage/create-bucket.md index 9672782b5c..e08b2d0d6b 100644 --- a/docs/examples/1.8.x/server-python/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-python/examples/storage/create-bucket.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -11,7 +13,7 @@ storage = Storage(client) result = storage.create_bucket( bucket_id = '', name = '', - permissions = ["read("any")"], # optional + permissions = [Permission.read(Role.any())], # optional file_security = False, # optional enabled = False, # optional maximum_file_size = 1, # optional diff --git a/docs/examples/1.8.x/server-python/examples/storage/create-file.md b/docs/examples/1.8.x/server-python/examples/storage/create-file.md index 6e57284b85..e37a5921a5 100644 --- a/docs/examples/1.8.x/server-python/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-python/examples/storage/create-file.md @@ -1,6 +1,8 @@ from appwrite.client import Client from appwrite.services.storage import Storage from appwrite.input_file import InputFile +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,5 +15,5 @@ result = storage.create_file( bucket_id = '', file_id = '', file = InputFile.from_path('file.png'), - permissions = ["read("any")"] # optional + permissions = [Permission.read(Role.any())] # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-python/examples/storage/update-bucket.md index f2e741a5aa..bfa7cc3fdb 100644 --- a/docs/examples/1.8.x/server-python/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-python/examples/storage/update-bucket.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -11,7 +13,7 @@ storage = Storage(client) result = storage.update_bucket( bucket_id = '', name = '', - permissions = ["read("any")"], # optional + permissions = [Permission.read(Role.any())], # optional file_security = False, # optional enabled = False, # optional maximum_file_size = 1, # optional diff --git a/docs/examples/1.8.x/server-python/examples/storage/update-file.md b/docs/examples/1.8.x/server-python/examples/storage/update-file.md index cf1e5779bb..25acbef823 100644 --- a/docs/examples/1.8.x/server-python/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-python/examples/storage/update-file.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.storage import Storage +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,5 +14,5 @@ result = storage.update_file( bucket_id = '', file_id = '', name = '', # optional - permissions = ["read("any")"] # optional + permissions = [Permission.read(Role.any())] # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-row.md index d2de58617f..d2448029e3 100644 --- a/docs/examples/1.8.x/server-python/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-row.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.tables_db import TablesDB +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -19,6 +21,6 @@ result = tables_db.create_row( "age": 30, "isAdmin": False }, - permissions = ["read("any")"], # optional + permissions = [Permission.read(Role.any())], # optional transaction_id = '' # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-table.md index f258ed880c..91a15df486 100644 --- a/docs/examples/1.8.x/server-python/examples/tablesdb/create-table.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-table.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.tables_db import TablesDB +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,7 +14,7 @@ result = tables_db.create_table( database_id = '', table_id = '', name = '', - permissions = ["read("any")"], # optional + permissions = [Permission.read(Role.any())], # optional row_security = False, # optional enabled = False # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-row.md index 89dbfb0587..3d342642ab 100644 --- a/docs/examples/1.8.x/server-python/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-row.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.tables_db import TablesDB +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +15,6 @@ result = tables_db.update_row( table_id = '', row_id = '', data = {}, # optional - permissions = ["read("any")"], # optional + permissions = [Permission.read(Role.any())], # optional transaction_id = '' # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-table.md index 7e494f0c43..c3e0115b75 100644 --- a/docs/examples/1.8.x/server-python/examples/tablesdb/update-table.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-table.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.tables_db import TablesDB +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,7 +14,7 @@ result = tables_db.update_table( database_id = '', table_id = '', name = '', - permissions = ["read("any")"], # optional + permissions = [Permission.read(Role.any())], # optional row_security = False, # optional enabled = False # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-python/examples/tablesdb/upsert-row.md index 8539e12e96..a89d657c63 100644 --- a/docs/examples/1.8.x/server-python/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/upsert-row.md @@ -1,5 +1,7 @@ from appwrite.client import Client from appwrite.services.tables_db import TablesDB +from appwrite.permission import Permission +from appwrite.role import Role client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +15,6 @@ result = tables_db.upsert_row( table_id = '', row_id = '', data = {}, # optional - permissions = ["read("any")"], # optional + permissions = [Permission.read(Role.any())], # optional transaction_id = '' # optional ) diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-resend-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-resend-provider.md new file mode 100644 index 0000000000..e18253635a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-resend-provider.md @@ -0,0 +1,17 @@ +POST /v1/messaging/providers/resend HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: +X-Appwrite-Key: + +{ + "providerId": "", + "name": "", + "apiKey": "", + "fromName": "", + "fromEmail": "email@example.com", + "replyToName": "", + "replyToEmail": "email@example.com", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-resend-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-resend-provider.md new file mode 100644 index 0000000000..cd9e87b574 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-resend-provider.md @@ -0,0 +1,16 @@ +PATCH /v1/messaging/providers/resend/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: +X-Appwrite-Key: + +{ + "name": "", + "enabled": false, + "apiKey": "", + "fromName": "", + "fromEmail": "email@example.com", + "replyToName": "", + "replyToEmail": "" +} diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-collection.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-collection.md index c22b34813e..178b5a5221 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-collection.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,7 +15,7 @@ result = databases.create_collection( database_id: '', collection_id: '', name: '', - permissions: ["read("any")"], # optional + permissions: [Permission.read(Role.any())], # optional document_security: false, # optional enabled: false # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md index d12a3dbb8d..c29c5d28df 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -20,6 +22,6 @@ result = databases.create_document( "age" => 30, "isAdmin" => false }, - permissions: ["read("any")"], # optional + permissions: [Permission.read(Role.any())], # optional transaction_id: '' # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-collection.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-collection.md index d42a651cbb..6928b9a006 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-collection.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,7 +15,7 @@ result = databases.update_collection( database_id: '', collection_id: '', name: '', - permissions: ["read("any")"], # optional + permissions: [Permission.read(Role.any())], # optional document_security: false, # optional enabled: false # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-document.md index 5831d68b5d..5a1eb56537 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-document.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -14,6 +16,6 @@ result = databases.update_document( collection_id: '', document_id: '', data: {}, # optional - permissions: ["read("any")"], # optional + permissions: [Permission.read(Role.any())], # optional transaction_id: '' # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md index e5daa554c4..fa2f1cd124 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -14,6 +16,6 @@ result = databases.upsert_document( collection_id: '', document_id: '', data: {}, - permissions: ["read("any")"], # optional + permissions: [Permission.read(Role.any())], # optional transaction_id: '' # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-resend-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-resend-provider.md new file mode 100644 index 0000000000..73c969b638 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-resend-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_resend_provider( + provider_id: '', + name: '', + api_key: '', # optional + from_name: '', # optional + from_email: 'email@example.com', # optional + reply_to_name: '', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-resend-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-resend-provider.md new file mode 100644 index 0000000000..cb72b5c7de --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-resend-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_resend_provider( + provider_id: '', + name: '', # optional + enabled: false, # optional + api_key: '', # optional + from_name: '', # optional + from_email: 'email@example.com', # optional + reply_to_name: '', # optional + reply_to_email: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-ruby/examples/storage/create-bucket.md index 643431ed2c..4a12518fb7 100644 --- a/docs/examples/1.8.x/server-ruby/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-ruby/examples/storage/create-bucket.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,7 +14,7 @@ storage = Storage.new(client) result = storage.create_bucket( bucket_id: '', name: '', - permissions: ["read("any")"], # optional + permissions: [Permission.read(Role.any())], # optional file_security: false, # optional enabled: false, # optional maximum_file_size: 1, # optional diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/create-file.md b/docs/examples/1.8.x/server-ruby/examples/storage/create-file.md index 99e07c33f4..8e045da3d6 100644 --- a/docs/examples/1.8.x/server-ruby/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-ruby/examples/storage/create-file.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,5 +15,5 @@ result = storage.create_file( bucket_id: '', file_id: '', file: InputFile.from_path('dir/file.png'), - permissions: ["read("any")"] # optional + permissions: [Permission.read(Role.any())] # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-ruby/examples/storage/update-bucket.md index 09b915eb5f..2e44aad536 100644 --- a/docs/examples/1.8.x/server-ruby/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-ruby/examples/storage/update-bucket.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,7 +14,7 @@ storage = Storage.new(client) result = storage.update_bucket( bucket_id: '', name: '', - permissions: ["read("any")"], # optional + permissions: [Permission.read(Role.any())], # optional file_security: false, # optional enabled: false, # optional maximum_file_size: 1, # optional diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/update-file.md b/docs/examples/1.8.x/server-ruby/examples/storage/update-file.md index a454499d9d..4aeb1c777b 100644 --- a/docs/examples/1.8.x/server-ruby/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-ruby/examples/storage/update-file.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,5 +15,5 @@ result = storage.update_file( bucket_id: '', file_id: '', name: '', # optional - permissions: ["read("any")"] # optional + permissions: [Permission.read(Role.any())] # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-row.md index 5622711642..a67b821067 100644 --- a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-row.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -20,6 +22,6 @@ result = tables_db.create_row( "age" => 30, "isAdmin" => false }, - permissions: ["read("any")"], # optional + permissions: [Permission.read(Role.any())], # optional transaction_id: '' # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-table.md index c8fcf477b3..6a1a0e901a 100644 --- a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-table.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-table.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,7 +15,7 @@ result = tables_db.create_table( database_id: '', table_id: '', name: '', - permissions: ["read("any")"], # optional + permissions: [Permission.read(Role.any())], # optional row_security: false, # optional enabled: false # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-row.md index 02123051ca..fc6fca6635 100644 --- a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-row.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -14,6 +16,6 @@ result = tables_db.update_row( table_id: '', row_id: '', data: {}, # optional - permissions: ["read("any")"], # optional + permissions: [Permission.read(Role.any())], # optional transaction_id: '' # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-table.md index cb8706d0b4..5385e00fc4 100644 --- a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-table.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-table.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,7 +15,7 @@ result = tables_db.update_table( database_id: '', table_id: '', name: '', - permissions: ["read("any")"], # optional + permissions: [Permission.read(Role.any())], # optional row_security: false, # optional enabled: false # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-row.md index 9feb685927..6201834ea6 100644 --- a/docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-row.md @@ -1,6 +1,8 @@ require 'appwrite' include Appwrite +include Appwrite::Permission +include Appwrite::Role client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -14,6 +16,6 @@ result = tables_db.upsert_row( table_id: '', row_id: '', data: {}, # optional - permissions: ["read("any")"], # optional + permissions: [Permission.read(Role.any())], # optional transaction_id: '' # optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md b/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md index c3335b48cb..43ff3d5ca6 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,7 +13,7 @@ let collection = try await databases.createCollection( databaseId: "", collectionId: "", name: "", - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional documentSecurity: false, // optional enabled: false // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-document.md b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md index 604bacdc2a..d2da412d0a 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -18,7 +20,7 @@ let document = try await databases.createDocument( "age": 30, "isAdmin": false ], - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: "" // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md b/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md index 9109990109..31078525ea 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,7 +13,7 @@ let collection = try await databases.updateCollection( databaseId: "", collectionId: "", name: "", - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional documentSecurity: false, // optional enabled: false // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-document.md b/docs/examples/1.8.x/server-swift/examples/databases/update-document.md index b6260d754d..3dfcd49fb1 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-document.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +14,7 @@ let document = try await databases.updateDocument( collectionId: "", documentId: "", data: [:], // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: "" // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md index 26897f4ca5..10e811b75b 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +14,7 @@ let document = try await databases.upsertDocument( collectionId: "", documentId: "", data: [:], - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: "" // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-resend-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-resend-provider.md new file mode 100644 index 0000000000..c43e1e8417 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-resend-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createResendProvider( + providerId: "", + name: "", + apiKey: "", // optional + fromName: "", // optional + fromEmail: "email@example.com", // optional + replyToName: "", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-resend-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-resend-provider.md new file mode 100644 index 0000000000..ee392f689a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-resend-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateResendProvider( + providerId: "", + name: "", // optional + enabled: false, // optional + apiKey: "", // optional + fromName: "", // optional + fromEmail: "email@example.com", // optional + replyToName: "", // optional + replyToEmail: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md index a664e14f5f..a37cb5e7ac 100644 --- a/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md @@ -1,5 +1,7 @@ import Appwrite import AppwriteEnums +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,7 +13,7 @@ let storage = Storage(client) let bucket = try await storage.createBucket( bucketId: "", name: "", - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional fileSecurity: false, // optional enabled: false, // optional maximumFileSize: 1, // optional diff --git a/docs/examples/1.8.x/server-swift/examples/storage/create-file.md b/docs/examples/1.8.x/server-swift/examples/storage/create-file.md index 540c869fab..9ee9ea112c 100644 --- a/docs/examples/1.8.x/server-swift/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-swift/examples/storage/create-file.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,6 +13,6 @@ let file = try await storage.createFile( bucketId: "", fileId: "", file: InputFile.fromPath("file.png"), - permissions: ["read("any")"] // optional + permissions: [Permission.read(Role.any())] // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md index de3b5bf0e5..3ba36a1b55 100644 --- a/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md @@ -1,5 +1,7 @@ import Appwrite import AppwriteEnums +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,7 +13,7 @@ let storage = Storage(client) let bucket = try await storage.updateBucket( bucketId: "", name: "", - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional fileSecurity: false, // optional enabled: false, // optional maximumFileSize: 1, // optional diff --git a/docs/examples/1.8.x/server-swift/examples/storage/update-file.md b/docs/examples/1.8.x/server-swift/examples/storage/update-file.md index d4d7484bd3..ad29edbbac 100644 --- a/docs/examples/1.8.x/server-swift/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-swift/examples/storage/update-file.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,6 +13,6 @@ let file = try await storage.updateFile( bucketId: "", fileId: "", name: "", // optional - permissions: ["read("any")"] // optional + permissions: [Permission.read(Role.any())] // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-row.md index 049ef2da3d..f59bb61864 100644 --- a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-row.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -18,7 +20,7 @@ let row = try await tablesDB.createRow( "age": 30, "isAdmin": false ], - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: "" // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-table.md index 11d14e1881..3078500ba9 100644 --- a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-table.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-table.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,7 +13,7 @@ let table = try await tablesDB.createTable( databaseId: "", tableId: "", name: "", - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional rowSecurity: false, // optional enabled: false // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-row.md index 3ebd9e0970..c125ece91f 100644 --- a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-row.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +14,7 @@ let row = try await tablesDB.updateRow( tableId: "", rowId: "", data: [:], // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: "" // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-table.md index 278d6e6b4e..bafb560398 100644 --- a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-table.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-table.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,7 +13,7 @@ let table = try await tablesDB.updateTable( databaseId: "", tableId: "", name: "", - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional rowSecurity: false, // optional enabled: false // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-row.md index 1b076266a3..5dac80e2d6 100644 --- a/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-row.md @@ -1,4 +1,6 @@ import Appwrite +import AppwritePermission +import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +14,7 @@ let row = try await tablesDB.upsertRow( tableId: "", rowId: "", data: [:], // optional - permissions: ["read("any")"], // optional + permissions: [Permission.read(Role.any())], // optional transactionId: "" // optional ) From 73e3f2869f2c862e515a451d57d41a97def379ff Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 27 Oct 2025 17:41:33 +0530 Subject: [PATCH 2/2] fix: imports --- composer.lock | 12 ++++++------ .../examples/databases/create-document.md | 2 -- .../examples/databases/update-document.md | 2 -- .../examples/databases/upsert-document.md | 2 -- .../client-apple/examples/storage/create-file.md | 2 -- .../client-apple/examples/storage/update-file.md | 2 -- .../client-apple/examples/tablesdb/create-row.md | 2 -- .../client-apple/examples/tablesdb/update-row.md | 2 -- .../client-apple/examples/tablesdb/upsert-row.md | 2 -- .../examples/databases/create-collection.md | 2 -- .../examples/databases/create-document.md | 2 -- .../examples/databases/update-collection.md | 2 -- .../examples/databases/update-document.md | 2 -- .../examples/databases/upsert-document.md | 2 -- .../server-dotnet/examples/storage/create-bucket.md | 2 -- .../server-dotnet/examples/storage/create-file.md | 2 -- .../server-dotnet/examples/storage/update-bucket.md | 2 -- .../server-dotnet/examples/storage/update-file.md | 2 -- .../server-dotnet/examples/tablesdb/create-row.md | 2 -- .../server-dotnet/examples/tablesdb/create-table.md | 2 -- .../server-dotnet/examples/tablesdb/update-row.md | 2 -- .../server-dotnet/examples/tablesdb/update-table.md | 2 -- .../server-dotnet/examples/tablesdb/upsert-row.md | 2 -- .../examples/databases/create-collection.md | 2 -- .../examples/databases/create-document.md | 2 -- .../examples/databases/update-collection.md | 2 -- .../examples/databases/update-document.md | 2 -- .../examples/databases/upsert-document.md | 2 -- .../server-swift/examples/storage/create-bucket.md | 2 -- .../server-swift/examples/storage/create-file.md | 2 -- .../server-swift/examples/storage/update-bucket.md | 2 -- .../server-swift/examples/storage/update-file.md | 2 -- .../server-swift/examples/tablesdb/create-row.md | 2 -- .../server-swift/examples/tablesdb/create-table.md | 2 -- .../server-swift/examples/tablesdb/update-row.md | 2 -- .../server-swift/examples/tablesdb/update-table.md | 2 -- .../server-swift/examples/tablesdb/upsert-row.md | 2 -- 37 files changed, 6 insertions(+), 78 deletions(-) diff --git a/composer.lock b/composer.lock index 39f5896bdc..2d565fcd72 100644 --- a/composer.lock +++ b/composer.lock @@ -5318,16 +5318,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.4.13", + "version": "1.4.14", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "db1a0f9b4ae003759bc67e15470160f3775536f8" + "reference": "b9405ccaeac5619c76558a82b7bfeb440b665b9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/db1a0f9b4ae003759bc67e15470160f3775536f8", - "reference": "db1a0f9b4ae003759bc67e15470160f3775536f8", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/b9405ccaeac5619c76558a82b7bfeb440b665b9f", + "reference": "b9405ccaeac5619c76558a82b7bfeb440b665b9f", "shasum": "" }, "require": { @@ -5363,9 +5363,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.4.13" + "source": "https://github.com/appwrite/sdk-generator/tree/1.4.14" }, - "time": "2025-10-27T08:35:36+00:00" + "time": "2025-10-27T11:17:01+00:00" }, { "name": "doctrine/annotations", diff --git a/docs/examples/1.8.x/client-apple/examples/databases/create-document.md b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md index 059c166a5c..7513244e0d 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/client-apple/examples/databases/update-document.md b/docs/examples/1.8.x/client-apple/examples/databases/update-document.md index 74208c6085..33dce44031 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/update-document.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/update-document.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md index 0ddff28a33..e678632df2 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/client-apple/examples/storage/create-file.md b/docs/examples/1.8.x/client-apple/examples/storage/create-file.md index 37c014a04a..938783eb7c 100644 --- a/docs/examples/1.8.x/client-apple/examples/storage/create-file.md +++ b/docs/examples/1.8.x/client-apple/examples/storage/create-file.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/client-apple/examples/storage/update-file.md b/docs/examples/1.8.x/client-apple/examples/storage/update-file.md index cf6b152754..9859d2ab63 100644 --- a/docs/examples/1.8.x/client-apple/examples/storage/update-file.md +++ b/docs/examples/1.8.x/client-apple/examples/storage/update-file.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/client-apple/examples/tablesdb/create-row.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/create-row.md index a364e58c17..ade012c4a1 100644 --- a/docs/examples/1.8.x/client-apple/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/create-row.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/client-apple/examples/tablesdb/update-row.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/update-row.md index 8c3d832bad..90bf66a966 100644 --- a/docs/examples/1.8.x/client-apple/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/update-row.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/client-apple/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/upsert-row.md index 2618de440a..5665f929e2 100644 --- a/docs/examples/1.8.x/client-apple/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/upsert-row.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md index cd7bfe0e8c..bfb24faf82 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md @@ -1,8 +1,6 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md index 24a709c2bd..7efb16c10c 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md @@ -1,8 +1,6 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md index e8e63c9fee..5448723b30 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md @@ -1,8 +1,6 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md index 7ad9073642..85f3ba5d2f 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md @@ -1,8 +1,6 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md index 903e5b90b9..9ebcafe87f 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md @@ -1,8 +1,6 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md index 57fbefb61e..f009f694ad 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md @@ -2,8 +2,6 @@ using Appwrite; using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md b/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md index 94bda90ea6..d7cc86e199 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md @@ -1,8 +1,6 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md index ca919d9f5b..d41a45961c 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md @@ -2,8 +2,6 @@ using Appwrite; using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md b/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md index 4f9daf5a1f..36552b529b 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md @@ -1,8 +1,6 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-row.md index 7c53febcaa..f0070e3233 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-row.md @@ -1,8 +1,6 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-table.md index e9c7819f69..0df89acc12 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-table.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-table.md @@ -1,8 +1,6 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-row.md index 9e7f543504..328469923b 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-row.md @@ -1,8 +1,6 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-table.md index b55e95efc4..24948fd8cf 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-table.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-table.md @@ -1,8 +1,6 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-row.md index 8dfb8666c7..88ef7146c2 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-row.md @@ -1,8 +1,6 @@ using Appwrite; using Appwrite.Models; using Appwrite.Services; -using Appwrite.Permission; -using Appwrite.Role; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md b/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md index 43ff3d5ca6..823913ff2f 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-document.md b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md index d2da412d0a..3cb0825d63 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md b/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md index 31078525ea..d26fbdcfe2 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-document.md b/docs/examples/1.8.x/server-swift/examples/databases/update-document.md index 3dfcd49fb1..dbb954f133 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-document.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md index 10e811b75b..1873d5e015 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md index a37cb5e7ac..a97f450bfe 100644 --- a/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md @@ -1,7 +1,5 @@ import Appwrite import AppwriteEnums -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/storage/create-file.md b/docs/examples/1.8.x/server-swift/examples/storage/create-file.md index 9ee9ea112c..612c56f9f5 100644 --- a/docs/examples/1.8.x/server-swift/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-swift/examples/storage/create-file.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md index 3ba36a1b55..2d89d7c464 100644 --- a/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md @@ -1,7 +1,5 @@ import Appwrite import AppwriteEnums -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/storage/update-file.md b/docs/examples/1.8.x/server-swift/examples/storage/update-file.md index ad29edbbac..6c3b3884e6 100644 --- a/docs/examples/1.8.x/server-swift/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-swift/examples/storage/update-file.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-row.md index f59bb61864..427fc030bd 100644 --- a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-row.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-row.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-table.md index 3078500ba9..a97613e775 100644 --- a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-table.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-table.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-row.md index c125ece91f..d13df3a96f 100644 --- a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-row.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-row.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-table.md index bafb560398..1f843b240b 100644 --- a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-table.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-table.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-row.md index 5dac80e2d6..e6fec83c08 100644 --- a/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-row.md +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-row.md @@ -1,6 +1,4 @@ import Appwrite -import AppwritePermission -import AppwriteRole let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint