mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
Merge pull request #10707 from appwrite/update-docs-examples-to-use-permission-class
Update docs examples to use permission class
This commit is contained in:
commit
7047ffe3dd
203 changed files with 987 additions and 211 deletions
30
composer.lock
generated
30
composer.lock
generated
|
|
@ -5318,16 +5318,16 @@
|
|||
"packages-dev": [
|
||||
{
|
||||
"name": "appwrite/sdk-generator",
|
||||
"version": "1.4.11",
|
||||
"version": "1.4.14",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||
"reference": "5970defc3c6e64817fe9847c0b33c87af71709c5"
|
||||
"reference": "b9405ccaeac5619c76558a82b7bfeb440b665b9f"
|
||||
},
|
||||
"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/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.11"
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/1.4.14"
|
||||
},
|
||||
"time": "2025-10-24T10:03:09+00:00"
|
||||
"time": "2025-10-27T11:17:01+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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.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)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
|
|
@ -13,7 +15,7 @@ databases.updateDocument(
|
|||
"<COLLECTION_ID>", // collectionId
|
||||
"<DOCUMENT_ID>", // documentId
|
||||
mapOf( "a" to "b" ), // data (optional)
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
|
|
@ -13,7 +15,7 @@ databases.upsertDocument(
|
|||
"<COLLECTION_ID>", // collectionId
|
||||
"<DOCUMENT_ID>", // documentId
|
||||
mapOf( "a" to "b" ), // data
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
|
|
@ -13,7 +15,7 @@ storage.createFile(
|
|||
"<BUCKET_ID>", // bucketId
|
||||
"<FILE_ID>", // 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();
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
|
|
@ -12,7 +14,7 @@ storage.updateFile(
|
|||
"<BUCKET_ID>", // bucketId
|
||||
"<FILE_ID>", // fileId
|
||||
"<NAME>", // name (optional)
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.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)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
|
|
@ -13,7 +15,7 @@ tablesDB.updateRow(
|
|||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
mapOf( "a" to "b" ), // data (optional)
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
|
|
@ -13,7 +15,7 @@ tablesDB.upsertRow(
|
|||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
mapOf( "a" to "b" ), // data (optional)
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.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 = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
|
|
@ -13,6 +15,6 @@ val result = databases.updateDocument(
|
|||
collectionId = "<COLLECTION_ID>",
|
||||
documentId = "<DOCUMENT_ID>",
|
||||
data = mapOf( "a" to "b" ), // (optional)
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
permissions = listOf(Permission.read(Role.any())), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
|
|
@ -13,6 +15,6 @@ val result = databases.upsertDocument(
|
|||
collectionId = "<COLLECTION_ID>",
|
||||
documentId = "<DOCUMENT_ID>",
|
||||
data = mapOf( "a" to "b" ),
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
permissions = listOf(Permission.read(Role.any())), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
|
|
@ -13,5 +15,5 @@ val result = storage.createFile(
|
|||
bucketId = "<BUCKET_ID>",
|
||||
fileId = "<FILE_ID>",
|
||||
file = InputFile.fromPath("file.png"),
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
permissions = listOf(Permission.read(Role.any())), // (optional)
|
||||
)
|
||||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
|
|
@ -12,5 +14,5 @@ val result = storage.updateFile(
|
|||
bucketId = "<BUCKET_ID>",
|
||||
fileId = "<FILE_ID>",
|
||||
name = "<NAME>", // (optional)
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
permissions = listOf(Permission.read(Role.any())), // (optional)
|
||||
)
|
||||
|
|
@ -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://<REGION>.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 = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
|
|
@ -13,6 +15,6 @@ val result = tablesDB.updateRow(
|
|||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
data = mapOf( "a" to "b" ), // (optional)
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
permissions = listOf(Permission.read(Role.any())), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
|
|
@ -13,6 +15,6 @@ val result = tablesDB.upsertRow(
|
|||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
data = mapOf( "a" to "b" ), // (optional)
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
permissions = listOf(Permission.read(Role.any())), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -17,7 +17,7 @@ let document = try await databases.createDocument(
|
|||
"age": 30,
|
||||
"isAdmin": false
|
||||
],
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ let document = try await databases.updateDocument(
|
|||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
data: [:], // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ let document = try await databases.upsertDocument(
|
|||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
data: [:],
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@ let file = try await storage.createFile(
|
|||
bucketId: "<BUCKET_ID>",
|
||||
fileId: "<FILE_ID>",
|
||||
file: InputFile.fromPath("file.png"),
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: [Permission.read(Role.any())] // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@ let file = try await storage.updateFile(
|
|||
bucketId: "<BUCKET_ID>",
|
||||
fileId: "<FILE_ID>",
|
||||
name: "<NAME>", // optional
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: [Permission.read(Role.any())] // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ let row = try await tablesDB.createRow(
|
|||
"age": 30,
|
||||
"isAdmin": false
|
||||
],
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ let row = try await tablesDB.updateRow(
|
|||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: [:], // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ let row = try await tablesDB.upsertRow(
|
|||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: [:], // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
import 'package:appwrite/permission.dart';
|
||||
import 'package:appwrite/role.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.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: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
import 'package:appwrite/permission.dart';
|
||||
import 'package:appwrite/role.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,6 +13,6 @@ Document result = await databases.updateDocument(
|
|||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
import 'package:appwrite/permission.dart';
|
||||
import 'package:appwrite/role.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,6 +13,6 @@ Document result = await databases.upsertDocument(
|
|||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,5 +13,5 @@ File result = await storage.createFile(
|
|||
bucketId: '<BUCKET_ID>',
|
||||
fileId: '<FILE_ID>',
|
||||
file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'),
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
import 'package:appwrite/permission.dart';
|
||||
import 'package:appwrite/role.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -10,5 +12,5 @@ File result = await storage.updateFile(
|
|||
bucketId: '<BUCKET_ID>',
|
||||
fileId: '<FILE_ID>',
|
||||
name: '<NAME>', // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
import 'package:appwrite/permission.dart';
|
||||
import 'package:appwrite/role.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.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: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
import 'package:appwrite/permission.dart';
|
||||
import 'package:appwrite/role.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,6 +13,6 @@ Row result = await tablesDB.updateRow(
|
|||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import 'package:appwrite/appwrite.dart';
|
||||
import 'package:appwrite/permission.dart';
|
||||
import 'package:appwrite/role.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,6 +13,6 @@ Row result = await tablesDB.upsertRow(
|
|||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Client, Databases } from "appwrite";
|
||||
import { Client, Databases, Permission, Role } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.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: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Client, Databases } from "appwrite";
|
||||
import { Client, Databases, Permission, Role } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,7 +11,7 @@ const result = await databases.updateDocument({
|
|||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Client, Databases } from "appwrite";
|
||||
import { Client, Databases, Permission, Role } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,7 +11,7 @@ const result = await databases.upsertDocument({
|
|||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Client, Storage } from "appwrite";
|
||||
import { Client, Storage, Permission, Role } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -10,7 +10,7 @@ const result = await storage.createFile({
|
|||
bucketId: '<BUCKET_ID>',
|
||||
fileId: '<FILE_ID>',
|
||||
file: document.getElementById('uploader').files[0],
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: [Permission.read(Role.any())] // optional
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Client, Storage } from "appwrite";
|
||||
import { Client, Storage, Permission, Role } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -10,7 +10,7 @@ const result = await storage.updateFile({
|
|||
bucketId: '<BUCKET_ID>',
|
||||
fileId: '<FILE_ID>',
|
||||
name: '<NAME>', // optional
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: [Permission.read(Role.any())] // optional
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Client, TablesDB } from "appwrite";
|
||||
import { Client, TablesDB, Permission, Role } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.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: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Client, TablesDB } from "appwrite";
|
||||
import { Client, TablesDB, Permission, Role } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,7 +11,7 @@ const result = await tablesDB.updateRow({
|
|||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Client, TablesDB } from "appwrite";
|
||||
import { Client, TablesDB, Permission, Role } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,7 +11,7 @@ const result = await tablesDB.upsertRow({
|
|||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
appwrite messaging create-resend-provider \
|
||||
--provider-id <PROVIDER_ID> \
|
||||
--name <NAME>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
appwrite messaging update-resend-provider \
|
||||
--provider-id <PROVIDER_ID>
|
||||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -10,7 +10,7 @@ const result = await databases.createCollection({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
documentSecurity: false, // optional
|
||||
enabled: false // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.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: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -10,7 +10,7 @@ const result = await databases.updateCollection({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
documentSecurity: false, // optional
|
||||
enabled: false // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,7 +11,7 @@ const result = await databases.updateDocument({
|
|||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,7 +11,7 @@ const result = await databases.upsertDocument({
|
|||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
import { Client, Messaging } from "@appwrite.io/console";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
|
||||
const messaging = new Messaging(client);
|
||||
|
||||
const result = await messaging.createResendProvider({
|
||||
providerId: '<PROVIDER_ID>',
|
||||
name: '<NAME>',
|
||||
apiKey: '<API_KEY>', // optional
|
||||
fromName: '<FROM_NAME>', // optional
|
||||
fromEmail: 'email@example.com', // optional
|
||||
replyToName: '<REPLY_TO_NAME>', // optional
|
||||
replyToEmail: 'email@example.com', // optional
|
||||
enabled: false // optional
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
import { Client, Messaging } from "@appwrite.io/console";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
|
||||
const messaging = new Messaging(client);
|
||||
|
||||
const result = await messaging.updateResendProvider({
|
||||
providerId: '<PROVIDER_ID>',
|
||||
name: '<NAME>', // optional
|
||||
enabled: false, // optional
|
||||
apiKey: '<API_KEY>', // optional
|
||||
fromName: '<FROM_NAME>', // optional
|
||||
fromEmail: 'email@example.com', // optional
|
||||
replyToName: '<REPLY_TO_NAME>', // optional
|
||||
replyToEmail: '<REPLY_TO_EMAIL>' // optional
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -9,7 +9,7 @@ const storage = new Storage(client);
|
|||
const result = await storage.createBucket({
|
||||
bucketId: '<BUCKET_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
fileSecurity: false, // optional
|
||||
enabled: false, // optional
|
||||
maximumFileSize: 1, // optional
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -10,7 +10,7 @@ const result = await storage.createFile({
|
|||
bucketId: '<BUCKET_ID>',
|
||||
fileId: '<FILE_ID>',
|
||||
file: document.getElementById('uploader').files[0],
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: [Permission.read(Role.any())] // optional
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -9,7 +9,7 @@ const storage = new Storage(client);
|
|||
const result = await storage.updateBucket({
|
||||
bucketId: '<BUCKET_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
fileSecurity: false, // optional
|
||||
enabled: false, // optional
|
||||
maximumFileSize: 1, // optional
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -10,7 +10,7 @@ const result = await storage.updateFile({
|
|||
bucketId: '<BUCKET_ID>',
|
||||
fileId: '<FILE_ID>',
|
||||
name: '<NAME>', // optional
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: [Permission.read(Role.any())] // optional
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.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: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -10,7 +10,7 @@ const result = await tablesDB.createTable({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
rowSecurity: false, // optional
|
||||
enabled: false // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,7 +11,7 @@ const result = await tablesDB.updateRow({
|
|||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -10,7 +10,7 @@ const result = await tablesDB.updateTable({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
rowSecurity: false, // optional
|
||||
enabled: false // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,7 +11,7 @@ const result = await tablesDB.upsertRow({
|
|||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,7 +13,7 @@ Collection result = await databases.createCollection(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
documentSecurity: false, // (optional)
|
||||
enabled: false, // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.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: '<TRANSACTION_ID>', // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,7 +13,7 @@ Collection result = await databases.updateCollection(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
documentSecurity: false, // (optional)
|
||||
enabled: false, // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -12,6 +14,6 @@ Document result = await databases.updateDocument(
|
|||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {}, // (optional)
|
||||
permissions: ["read("any")"], // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
transactionId: '<TRANSACTION_ID>', // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -12,6 +14,6 @@ Document result = await databases.upsertDocument(
|
|||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
permissions: ["read("any")"], // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
transactionId: '<TRANSACTION_ID>', // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
import 'package:dart_appwrite/dart_appwrite.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setKey('<YOUR_API_KEY>'); // Your secret API key
|
||||
|
||||
Messaging messaging = Messaging(client);
|
||||
|
||||
Provider result = await messaging.createResendProvider(
|
||||
providerId: '<PROVIDER_ID>',
|
||||
name: '<NAME>',
|
||||
apiKey: '<API_KEY>', // (optional)
|
||||
fromName: '<FROM_NAME>', // (optional)
|
||||
fromEmail: 'email@example.com', // (optional)
|
||||
replyToName: '<REPLY_TO_NAME>', // (optional)
|
||||
replyToEmail: 'email@example.com', // (optional)
|
||||
enabled: false, // (optional)
|
||||
);
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
import 'package:dart_appwrite/dart_appwrite.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setKey('<YOUR_API_KEY>'); // Your secret API key
|
||||
|
||||
Messaging messaging = Messaging(client);
|
||||
|
||||
Provider result = await messaging.updateResendProvider(
|
||||
providerId: '<PROVIDER_ID>',
|
||||
name: '<NAME>', // (optional)
|
||||
enabled: false, // (optional)
|
||||
apiKey: '<API_KEY>', // (optional)
|
||||
fromName: '<FROM_NAME>', // (optional)
|
||||
fromEmail: 'email@example.com', // (optional)
|
||||
replyToName: '<REPLY_TO_NAME>', // (optional)
|
||||
replyToEmail: '<REPLY_TO_EMAIL>', // (optional)
|
||||
);
|
||||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -10,7 +12,7 @@ Storage storage = Storage(client);
|
|||
Bucket result = await storage.createBucket(
|
||||
bucketId: '<BUCKET_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
fileSecurity: false, // (optional)
|
||||
enabled: false, // (optional)
|
||||
maximumFileSize: 1, // (optional)
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -12,5 +14,5 @@ File result = await storage.createFile(
|
|||
bucketId: '<BUCKET_ID>',
|
||||
fileId: '<FILE_ID>',
|
||||
file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'),
|
||||
permissions: ["read("any")"], // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -10,7 +12,7 @@ Storage storage = Storage(client);
|
|||
Bucket result = await storage.updateBucket(
|
||||
bucketId: '<BUCKET_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
fileSecurity: false, // (optional)
|
||||
enabled: false, // (optional)
|
||||
maximumFileSize: 1, // (optional)
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,5 +13,5 @@ File result = await storage.updateFile(
|
|||
bucketId: '<BUCKET_ID>',
|
||||
fileId: '<FILE_ID>',
|
||||
name: '<NAME>', // (optional)
|
||||
permissions: ["read("any")"], // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.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: '<TRANSACTION_ID>', // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,7 +13,7 @@ Table result = await tablesDB.createTable(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
rowSecurity: false, // (optional)
|
||||
enabled: false, // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -12,6 +14,6 @@ Row result = await tablesDB.updateRow(
|
|||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // (optional)
|
||||
permissions: ["read("any")"], // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
transactionId: '<TRANSACTION_ID>', // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -11,7 +13,7 @@ Table result = await tablesDB.updateTable(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
rowSecurity: false, // (optional)
|
||||
enabled: false, // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
|
@ -12,6 +14,6 @@ Row result = await tablesDB.upsertRow(
|
|||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // (optional)
|
||||
permissions: ["read("any")"], // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
transactionId: '<TRANSACTION_ID>', // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Collection result = await databases.CreateCollection(
|
|||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
name: "<NAME>",
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) }, // optional
|
||||
documentSecurity: false, // optional
|
||||
enabled: false // optional
|
||||
);
|
||||
|
|
@ -20,6 +20,6 @@ Document result = await databases.CreateDocument(
|
|||
age = 30,
|
||||
isAdmin = false
|
||||
},
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) }, // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
);
|
||||
|
|
@ -13,7 +13,7 @@ Collection result = await databases.UpdateCollection(
|
|||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
name: "<NAME>",
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) }, // optional
|
||||
documentSecurity: false, // optional
|
||||
enabled: false // optional
|
||||
);
|
||||
|
|
@ -14,6 +14,6 @@ Document result = await databases.UpdateDocument(
|
|||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
data: [object], // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) }, // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
);
|
||||
|
|
@ -14,6 +14,6 @@ Document result = await databases.UpsertDocument(
|
|||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
data: [object],
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) }, // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
);
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
using Appwrite.Services;
|
||||
|
||||
Client client = new Client()
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.SetKey("<YOUR_API_KEY>"); // Your secret API key
|
||||
|
||||
Messaging messaging = new Messaging(client);
|
||||
|
||||
Provider result = await messaging.CreateResendProvider(
|
||||
providerId: "<PROVIDER_ID>",
|
||||
name: "<NAME>",
|
||||
apiKey: "<API_KEY>", // optional
|
||||
fromName: "<FROM_NAME>", // optional
|
||||
fromEmail: "email@example.com", // optional
|
||||
replyToName: "<REPLY_TO_NAME>", // optional
|
||||
replyToEmail: "email@example.com", // optional
|
||||
enabled: false // optional
|
||||
);
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
using Appwrite;
|
||||
using Appwrite.Models;
|
||||
using Appwrite.Services;
|
||||
|
||||
Client client = new Client()
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.SetKey("<YOUR_API_KEY>"); // Your secret API key
|
||||
|
||||
Messaging messaging = new Messaging(client);
|
||||
|
||||
Provider result = await messaging.UpdateResendProvider(
|
||||
providerId: "<PROVIDER_ID>",
|
||||
name: "<NAME>", // optional
|
||||
enabled: false, // optional
|
||||
apiKey: "<API_KEY>", // optional
|
||||
fromName: "<FROM_NAME>", // optional
|
||||
fromEmail: "email@example.com", // optional
|
||||
replyToName: "<REPLY_TO_NAME>", // optional
|
||||
replyToEmail: "<REPLY_TO_EMAIL>" // optional
|
||||
);
|
||||
|
|
@ -13,7 +13,7 @@ Storage storage = new Storage(client);
|
|||
Bucket result = await storage.CreateBucket(
|
||||
bucketId: "<BUCKET_ID>",
|
||||
name: "<NAME>",
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) }, // optional
|
||||
fileSecurity: false, // optional
|
||||
enabled: false, // optional
|
||||
maximumFileSize: 1, // optional
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@ File result = await storage.CreateFile(
|
|||
bucketId: "<BUCKET_ID>",
|
||||
fileId: "<FILE_ID>",
|
||||
file: InputFile.FromPath("./path-to-files/image.jpg"),
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) } // optional
|
||||
);
|
||||
|
|
@ -13,7 +13,7 @@ Storage storage = new Storage(client);
|
|||
Bucket result = await storage.UpdateBucket(
|
||||
bucketId: "<BUCKET_ID>",
|
||||
name: "<NAME>",
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) }, // optional
|
||||
fileSecurity: false, // optional
|
||||
enabled: false, // optional
|
||||
maximumFileSize: 1, // optional
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@ File result = await storage.UpdateFile(
|
|||
bucketId: "<BUCKET_ID>",
|
||||
fileId: "<FILE_ID>",
|
||||
name: "<NAME>", // optional
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) } // optional
|
||||
);
|
||||
|
|
@ -20,6 +20,6 @@ Row result = await tablesDB.CreateRow(
|
|||
age = 30,
|
||||
isAdmin = false
|
||||
},
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) }, // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
);
|
||||
|
|
@ -13,7 +13,7 @@ Table result = await tablesDB.CreateTable(
|
|||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
name: "<NAME>",
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) }, // optional
|
||||
rowSecurity: false, // optional
|
||||
enabled: false // optional
|
||||
);
|
||||
|
|
@ -14,6 +14,6 @@ Row result = await tablesDB.UpdateRow(
|
|||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: [object], // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) }, // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
);
|
||||
|
|
@ -13,7 +13,7 @@ Table result = await tablesDB.UpdateTable(
|
|||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
name: "<NAME>",
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) }, // optional
|
||||
rowSecurity: false, // optional
|
||||
enabled: false // optional
|
||||
);
|
||||
|
|
@ -14,6 +14,6 @@ Row result = await tablesDB.UpsertRow(
|
|||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: [object], // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: new List<string> { Permission.Read(Role.Any()) }, // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
);
|
||||
|
|
@ -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://<REGION>.cloud.appwrite.io/v1")
|
||||
client.WithProject("<YOUR_PROJECT_ID>")
|
||||
client.WithKey("<YOUR_API_KEY>")
|
||||
)
|
||||
|
||||
service := messaging.New(client)
|
||||
|
||||
response, error := service.CreateResendProvider(
|
||||
"<PROVIDER_ID>",
|
||||
"<NAME>",
|
||||
messaging.WithCreateResendProviderApiKey("<API_KEY>"),
|
||||
messaging.WithCreateResendProviderFromName("<FROM_NAME>"),
|
||||
messaging.WithCreateResendProviderFromEmail("email@example.com"),
|
||||
messaging.WithCreateResendProviderReplyToName("<REPLY_TO_NAME>"),
|
||||
messaging.WithCreateResendProviderReplyToEmail("email@example.com"),
|
||||
messaging.WithCreateResendProviderEnabled(false),
|
||||
)
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue