diff --git a/composer.lock b/composer.lock index 0302e83288..dc36abe409 100644 --- a/composer.lock +++ b/composer.lock @@ -4930,16 +4930,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "8f16ba871856b379c3b33c72ebb175011437e724" + "reference": "e5760ef7f25ef036aeaa0fa4a7c65a13f3390a88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/8f16ba871856b379c3b33c72ebb175011437e724", - "reference": "8f16ba871856b379c3b33c72ebb175011437e724", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/e5760ef7f25ef036aeaa0fa4a7c65a13f3390a88", + "reference": "e5760ef7f25ef036aeaa0fa4a7c65a13f3390a88", "shasum": "" }, "require": { @@ -4975,9 +4975,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.0.0" + "source": "https://github.com/appwrite/sdk-generator/tree/1.1.0" }, - "time": "2025-08-20T05:54:57+00:00" + "time": "2025-08-20T07:11:14+00:00" }, { "name": "doctrine/annotations", diff --git a/docs/examples/1.8.x/client-android/java/databases/decrement-document-attribute.md b/docs/examples/1.8.x/client-android/java/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..de6a4ab48d --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/decrement-document-attribute.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.decrementDocumentAttribute( + "", // databaseId + "", // collectionId + "", // documentId + "", // attribute + 0, // value (optional) + 0, // min (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-android/java/databases/increment-document-attribute.md new file mode 100644 index 0000000000..94ffa9d749 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/increment-document-attribute.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.incrementDocumentAttribute( + "", // databaseId + "", // collectionId + "", // documentId + "", // attribute + 0, // value (optional) + 0, // max (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + 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 new file mode 100644 index 0000000000..4c7d10dde3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tablesdb/create-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createRow( + "", // databaseId + "", // tableId + "", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-android/java/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..67f3601e6e --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tablesdb/decrement-row-column.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.decrementRowColumn( + "", // databaseId + "", // tableId + "", // rowId + "", // column + 0, // value (optional) + 0, // min (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tablesdb/delete-row.md b/docs/examples/1.8.x/client-android/java/tablesdb/delete-row.md new file mode 100644 index 0000000000..776f6bd4ef --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tablesdb/delete-row.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.deleteRow( + "", // databaseId + "", // tableId + "", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tablesdb/get-row.md b/docs/examples/1.8.x/client-android/java/tablesdb/get-row.md new file mode 100644 index 0000000000..a0e20a3f9b --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tablesdb/get-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.getRow( + "", // databaseId + "", // tableId + "", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-android/java/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..b3d1c541bd --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tablesdb/increment-row-column.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.incrementRowColumn( + "", // databaseId + "", // tableId + "", // rowId + "", // column + 0, // value (optional) + 0, // max (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tablesdb/list-rows.md b/docs/examples/1.8.x/client-android/java/tablesdb/list-rows.md new file mode 100644 index 0000000000..9bd6f6d3e2 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tablesdb/list-rows.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.listRows( + "", // databaseId + "", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + 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 new file mode 100644 index 0000000000..fdcd8acaae --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tablesdb/update-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateRow( + "", // databaseId + "", // tableId + "", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + 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 new file mode 100644 index 0000000000..6c60b9ccdf --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tablesdb/upsert-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.upsertRow( + "", // databaseId + "", // tableId + "", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/decrement-document-attribute.md b/docs/examples/1.8.x/client-android/kotlin/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..c500fa8687 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/decrement-document-attribute.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.decrementDocumentAttribute( + databaseId = "", + collectionId = "", + documentId = "", + attribute = "", + value = 0, // (optional) + min = 0, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-android/kotlin/databases/increment-document-attribute.md new file mode 100644 index 0000000000..0ae6b02d3d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.incrementDocumentAttribute( + databaseId = "", + collectionId = "", + documentId = "", + attribute = "", + value = 0, // (optional) + max = 0, // (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 new file mode 100644 index 0000000000..1e84ebd34f --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/create-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDb = TablesDb(client) + +val result = tablesDb.createRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..29c25475b1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/decrement-row-column.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDb = TablesDb(client) + +val result = tablesDb.decrementRowColumn( + databaseId = "", + tableId = "", + rowId = "", + column = "", + value = 0, // (optional) + min = 0, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tablesdb/delete-row.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/delete-row.md new file mode 100644 index 0000000000..af6f5f5798 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/delete-row.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDb = TablesDb(client) + +val result = tablesDb.deleteRow( + databaseId = "", + tableId = "", + rowId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tablesdb/get-row.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/get-row.md new file mode 100644 index 0000000000..3408f1dff5 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/get-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDb = TablesDb(client) + +val result = tablesDb.getRow( + databaseId = "", + tableId = "", + rowId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..7640be001e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/increment-row-column.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDb = TablesDb(client) + +val result = tablesDb.incrementRowColumn( + databaseId = "", + tableId = "", + rowId = "", + column = "", + value = 0, // (optional) + max = 0, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tablesdb/list-rows.md b/docs/examples/1.8.x/client-android/kotlin/tablesdb/list-rows.md new file mode 100644 index 0000000000..b5bc755df6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/list-rows.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDb = TablesDb(client) + +val result = tablesDb.listRows( + databaseId = "", + tableId = "", + queries = listOf(), // (optional) +) \ 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 new file mode 100644 index 0000000000..cc837638fe --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/update-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDb = TablesDb(client) + +val result = tablesDb.updateRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf("read("any")"), // (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 new file mode 100644 index 0000000000..f9f165edd9 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tablesdb/upsert-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tablesDb = TablesDb(client) + +val result = tablesDb.upsertRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-apple/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/client-apple/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..8ef2637bf2 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/decrement-document-attribute.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.decrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, // optional + min: 0 // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-apple/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..f64b2cd76c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/increment-document-attribute.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.incrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, // optional + max: 0 // 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 new file mode 100644 index 0000000000..56442a0713 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/create-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDb = TablesDb(client) + +let row = try await tablesDb.createRow( + databaseId: "", + tableId: "", + rowId: "", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..0e619ce9a9 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDb = TablesDb(client) + +let row = try await tablesDb.decrementRowColumn( + databaseId: "", + tableId: "", + rowId: "", + column: "", + value: 0, // optional + min: 0 // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..11c1587464 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/delete-row.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDb = TablesDb(client) + +let result = try await tablesDb.deleteRow( + databaseId: "", + tableId: "", + rowId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tablesdb/get-row.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..6f8979978c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/get-row.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDb = TablesDb(client) + +let row = try await tablesDb.getRow( + databaseId: "", + tableId: "", + rowId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..ac4b671738 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/increment-row-column.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDb = TablesDb(client) + +let row = try await tablesDb.incrementRowColumn( + databaseId: "", + tableId: "", + rowId: "", + column: "", + value: 0, // optional + max: 0 // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/client-apple/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..b94bdaeef8 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/list-rows.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDb = TablesDb(client) + +let rowList = try await tablesDb.listRows( + databaseId: "", + tableId: "", + queries: [] // optional +) + 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 new file mode 100644 index 0000000000..275ed59e62 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/update-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDb = TablesDb(client) + +let row = try await tablesDb.updateRow( + databaseId: "", + tableId: "", + rowId: "", + data: [:], // optional + permissions: ["read("any")"] // 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 new file mode 100644 index 0000000000..039891989e --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tablesdb/upsert-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tablesDb = TablesDb(client) + +let row = try await tablesDb.upsertRow( + databaseId: "", + tableId: "", + rowId: "", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/client-flutter/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..ec0d9ee300 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/decrement-document-attribute.md @@ -0,0 +1,16 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.decrementDocumentAttribute( + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 0, // optional + min: 0, // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-flutter/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..78f5b0cb6f --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/increment-document-attribute.md @@ -0,0 +1,16 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.incrementDocumentAttribute( + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 0, // optional + max: 0, // 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 new file mode 100644 index 0000000000..74bef62e85 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/create-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDb tablesDb = TablesDb(client); + +Row result = await tablesDb.createRow( + databaseId: '', + tableId: '', + rowId: '', + data: {}, + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..599ee481ff --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,16 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDb tablesDb = TablesDb(client); + +Row result = await tablesDb.decrementRowColumn( + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: 0, // optional + min: 0, // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..58ad1d31fa --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/delete-row.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDb tablesDb = TablesDb(client); + +await tablesDb.deleteRow( + databaseId: '', + tableId: '', + rowId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tablesdb/get-row.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..9988ee2bb5 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/get-row.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDb tablesDb = TablesDb(client); + +Row result = await tablesDb.getRow( + databaseId: '', + tableId: '', + rowId: '', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..34e09f2de6 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/increment-row-column.md @@ -0,0 +1,16 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDb tablesDb = TablesDb(client); + +Row result = await tablesDb.incrementRowColumn( + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: 0, // optional + max: 0, // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/client-flutter/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..1eff6ce2cb --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/list-rows.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDb tablesDb = TablesDb(client); + +RowList result = await tablesDb.listRows( + databaseId: '', + tableId: '', + queries: [], // optional +); 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 new file mode 100644 index 0000000000..2cffb7221f --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/update-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDb tablesDb = TablesDb(client); + +Row result = await tablesDb.updateRow( + databaseId: '', + tableId: '', + rowId: '', + data: {}, // optional + permissions: ["read("any")"], // 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 new file mode 100644 index 0000000000..d8386d5e84 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tablesdb/upsert-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +TablesDb tablesDb = TablesDb(client); + +Row result = await tablesDb.upsertRow( + databaseId: '', + tableId: '', + rowId: '', + data: {}, // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/client-graphql/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..2e7970049d --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/decrement-document-attribute.md @@ -0,0 +1,19 @@ +mutation { + databasesDecrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, + min: 0 + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-graphql/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..322ed69ced --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/increment-document-attribute.md @@ -0,0 +1,19 @@ +mutation { + databasesIncrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, + max: 0 + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tablesdb/create-row.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..1806764e92 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tablesdb/create-row.md @@ -0,0 +1,18 @@ +mutation { + tablesDbCreateRow( + databaseId: "", + tableId: "", + rowId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..5b5344575d --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,19 @@ +mutation { + tablesDbDecrementRowColumn( + databaseId: "", + tableId: "", + rowId: "", + column: "", + value: 0, + min: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..1f18962dc8 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tablesdb/delete-row.md @@ -0,0 +1,9 @@ +mutation { + tablesDbDeleteRow( + databaseId: "", + tableId: "", + rowId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tablesdb/get-row.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..0ef9edc6c4 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tablesdb/increment-row-column.md @@ -0,0 +1,19 @@ +mutation { + tablesDbIncrementRowColumn( + databaseId: "", + tableId: "", + rowId: "", + column: "", + value: 0, + max: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/tablesdb/update-row.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..8382bcf457 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tablesdb/update-row.md @@ -0,0 +1,18 @@ +mutation { + tablesDbUpdateRow( + databaseId: "", + tableId: "", + rowId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/client-graphql/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..f5ad299639 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tablesdb/upsert-row.md @@ -0,0 +1,18 @@ +mutation { + tablesDbUpsertRow( + databaseId: "", + tableId: "", + rowId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-react-native/examples/account/create-email-password-session.md index 217d7873ae..47fb5573b1 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create-email-password-session.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-email-password-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createEmailPasswordSession( - 'email@example.com', // email - 'password' // password -); +const result = await account.createEmailPasswordSession({ + email: 'email@example.com', + password: 'password' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-email-token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-email-token.md index b9bdf3bbe2..fbb79bf8b6 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create-email-token.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-email-token.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.createEmailToken( - '', // userId - 'email@example.com', // email - false // phrase (optional) -); +const result = await account.createEmailToken({ + userId: '', + email: 'email@example.com', + phrase: false +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-magic-u-r-l-token.md index 413e347aef..a6164b0eb9 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-magic-u-r-l-token.md @@ -6,11 +6,11 @@ const client = new Client() const account = new Account(client); -const result = await account.createMagicURLToken( - '', // userId - 'email@example.com', // email - 'https://example.com', // url (optional) - false // phrase (optional) -); +const result = await account.createMagicURLToken({ + userId: '', + email: 'email@example.com', + url: 'https://example.com', + phrase: false +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-authenticator.md index ec243490aa..92905b299b 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-authenticator.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaAuthenticator( - AuthenticatorType.Totp // type -); +const result = await account.createMfaAuthenticator({ + type: AuthenticatorType.Totp +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-challenge.md index 04de25863f..77b071eae7 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-challenge.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaChallenge( - AuthenticationFactor.Email // factor -); +const result = await account.createMfaChallenge({ + factor: AuthenticationFactor.Email +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2session.md index 84bddb4777..c5100f25b5 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2session.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2session.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Session( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +account.createOAuth2Session({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', + failure: 'https://example.com', + scopes: [] +}); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2token.md index cd4ee86aa1..2637166ac8 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2token.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2token.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Token( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +account.createOAuth2Token({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', + failure: 'https://example.com', + scopes: [] +}); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-phone-token.md index d03e5ea4bc..68eaa38dbd 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create-phone-token.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-phone-token.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createPhoneToken( - '', // userId - '+12065550100' // phone -); +const result = await account.createPhoneToken({ + userId: '', + phone: '+12065550100' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-push-target.md b/docs/examples/1.8.x/client-react-native/examples/account/create-push-target.md index 83211ab9f3..a5568db144 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create-push-target.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-push-target.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.createPushTarget( - '', // targetId - '', // identifier - '' // providerId (optional) -); +const result = await account.createPushTarget({ + targetId: '', + identifier: '', + providerId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-recovery.md b/docs/examples/1.8.x/client-react-native/examples/account/create-recovery.md index 802af82fb7..01c5c387e8 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create-recovery.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-recovery.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createRecovery( - 'email@example.com', // email - 'https://example.com' // url -); +const result = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-session.md b/docs/examples/1.8.x/client-react-native/examples/account/create-session.md index bb3040aef6..b6741518d1 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create-session.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createSession( - '', // userId - '' // secret -); +const result = await account.createSession({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-verification.md b/docs/examples/1.8.x/client-react-native/examples/account/create-verification.md index 5fdffcba5c..f4a210be05 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create-verification.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-verification.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createVerification( - 'https://example.com' // url -); +const result = await account.createVerification({ + url: 'https://example.com' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create.md b/docs/examples/1.8.x/client-react-native/examples/account/create.md index eb3d04ac54..43c8f3cda3 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/create.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/create.md @@ -6,11 +6,11 @@ const client = new Client() const account = new Account(client); -const result = await account.create( - '', // userId - 'email@example.com', // email - '', // password - '' // name (optional) -); +const result = await account.create({ + userId: '', + email: 'email@example.com', + password: '', + name: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-identity.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-identity.md index df492a528d..0d9a971225 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/delete-identity.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-identity.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteIdentity( - '' // identityId -); +const result = await account.deleteIdentity({ + identityId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-mfa-authenticator.md index 093ba4d5a2..bf6575f868 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-mfa-authenticator.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteMfaAuthenticator( - AuthenticatorType.Totp // type -); +const result = await account.deleteMfaAuthenticator({ + type: AuthenticatorType.Totp +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-push-target.md index a926ede9c6..dff171b305 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/delete-push-target.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-push-target.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deletePushTarget( - '' // targetId -); +const result = await account.deletePushTarget({ + targetId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-session.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-session.md index 134a2caa56..f1ce4a0a88 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/delete-session.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-session.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteSession( - '' // sessionId -); +const result = await account.deleteSession({ + sessionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/get-session.md b/docs/examples/1.8.x/client-react-native/examples/account/get-session.md index 1db05d5c26..4c0fdfc0b5 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/get-session.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/get-session.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.getSession( - '' // sessionId -); +const result = await account.getSession({ + sessionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/list-identities.md b/docs/examples/1.8.x/client-react-native/examples/account/list-identities.md index 239dbbf21f..c9e742a5f4 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/list-identities.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/list-identities.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listIdentities( - [] // queries (optional) -); +const result = await account.listIdentities({ + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/list-logs.md b/docs/examples/1.8.x/client-react-native/examples/account/list-logs.md index 9cf441453c..4621a613c9 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/list-logs.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/list-logs.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listLogs( - [] // queries (optional) -); +const result = await account.listLogs({ + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-email.md b/docs/examples/1.8.x/client-react-native/examples/account/update-email.md index 4bbe0b03e7..325fa472fe 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-email.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-email.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateEmail( - 'email@example.com', // email - 'password' // password -); +const result = await account.updateEmail({ + email: 'email@example.com', + password: 'password' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-react-native/examples/account/update-m-f-a.md index ebbfc0c8cd..26d26ffe97 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-m-f-a.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-m-f-a.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMFA( - false // mfa -); +const result = await account.updateMFA({ + mfa: false +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-react-native/examples/account/update-magic-u-r-l-session.md index c5e6b61395..4feaa59f52 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-magic-u-r-l-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMagicURLSession( - '', // userId - '' // secret -); +const result = await account.updateMagicURLSession({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-authenticator.md index 07a798e7a6..e2476b1f57 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-authenticator.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaAuthenticator( - AuthenticatorType.Totp, // type - '' // otp -); +const result = await account.updateMfaAuthenticator({ + type: AuthenticatorType.Totp, + otp: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-challenge.md index b93e0bf520..ca254c0aad 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-challenge.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaChallenge( - '', // challengeId - '' // otp -); +const result = await account.updateMfaChallenge({ + challengeId: '', + otp: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-name.md b/docs/examples/1.8.x/client-react-native/examples/account/update-name.md index adbbcab5be..f58f26baae 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-name.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-name.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateName( - '' // name -); +const result = await account.updateName({ + name: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-password.md b/docs/examples/1.8.x/client-react-native/examples/account/update-password.md index 3bde58e68a..0855e98002 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-password.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-password.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePassword( - '', // password - 'password' // oldPassword (optional) -); +const result = await account.updatePassword({ + password: '', + oldPassword: 'password' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-react-native/examples/account/update-phone-session.md index c9c82696fc..b3a3ffffb3 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-phone-session.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-phone-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhoneSession( - '', // userId - '' // secret -); +const result = await account.updatePhoneSession({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-react-native/examples/account/update-phone-verification.md index 0ef7e53e66..2f1be2f345 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-phone-verification.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-phone-verification.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhoneVerification( - '', // userId - '' // secret -); +const result = await account.updatePhoneVerification({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-phone.md b/docs/examples/1.8.x/client-react-native/examples/account/update-phone.md index bf8aae2a3d..4e123547cb 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-phone.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-phone.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhone( - '+12065550100', // phone - 'password' // password -); +const result = await account.updatePhone({ + phone: '+12065550100', + password: 'password' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-prefs.md b/docs/examples/1.8.x/client-react-native/examples/account/update-prefs.md index 01d4fd6878..43fa9fc776 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-prefs.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-prefs.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePrefs( - {} // prefs -); +const result = await account.updatePrefs({ + prefs: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-push-target.md b/docs/examples/1.8.x/client-react-native/examples/account/update-push-target.md index d88e22e04d..c61f65612f 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-push-target.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-push-target.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePushTarget( - '', // targetId - '' // identifier -); +const result = await account.updatePushTarget({ + targetId: '', + identifier: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-recovery.md b/docs/examples/1.8.x/client-react-native/examples/account/update-recovery.md index 9a5ef04f3a..9e0c439714 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-recovery.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-recovery.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.updateRecovery( - '', // userId - '', // secret - '' // password -); +const result = await account.updateRecovery({ + userId: '', + secret: '', + password: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-session.md b/docs/examples/1.8.x/client-react-native/examples/account/update-session.md index 0c8a9e5df3..948514d6f6 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-session.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-session.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateSession( - '' // sessionId -); +const result = await account.updateSession({ + sessionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-verification.md b/docs/examples/1.8.x/client-react-native/examples/account/update-verification.md index c956d5fcd6..287a7feaf7 100644 --- a/docs/examples/1.8.x/client-react-native/examples/account/update-verification.md +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-verification.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateVerification( - '', // userId - '' // secret -); +const result = await account.updateVerification({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-browser.md index 433cbe5999..410e4255ff 100644 --- a/docs/examples/1.8.x/client-react-native/examples/avatars/get-browser.md +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-browser.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getBrowser( - Browser.AvantBrowser, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getBrowser({ + code: Browser.AvantBrowser, + width: 0, + height: 0, + quality: -1 +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-credit-card.md index bbd0007fe0..466dc74b72 100644 --- a/docs/examples/1.8.x/client-react-native/examples/avatars/get-credit-card.md +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-credit-card.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getCreditCard( - CreditCard.AmericanExpress, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getCreditCard({ + code: CreditCard.AmericanExpress, + width: 0, + height: 0, + quality: -1 +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-favicon.md index ff48c76ffc..d3931e3ef4 100644 --- a/docs/examples/1.8.x/client-react-native/examples/avatars/get-favicon.md +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-favicon.md @@ -6,8 +6,8 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFavicon( - 'https://example.com' // url -); +const result = avatars.getFavicon({ + url: 'https://example.com' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-flag.md index 4e6070d190..25732a8816 100644 --- a/docs/examples/1.8.x/client-react-native/examples/avatars/get-flag.md +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-flag.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFlag( - Flag.Afghanistan, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getFlag({ + code: Flag.Afghanistan, + width: 0, + height: 0, + quality: -1 +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-image.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-image.md index 006155effd..9128002ddd 100644 --- a/docs/examples/1.8.x/client-react-native/examples/avatars/get-image.md +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-image.md @@ -6,10 +6,10 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getImage( - 'https://example.com', // url - 0, // width (optional) - 0 // height (optional) -); +const result = avatars.getImage({ + url: 'https://example.com', + width: 0, + height: 0 +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-initials.md index a87a643450..2da8ba379d 100644 --- a/docs/examples/1.8.x/client-react-native/examples/avatars/get-initials.md +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-initials.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getInitials( - '', // name (optional) - 0, // width (optional) - 0, // height (optional) - '' // background (optional) -); +const result = avatars.getInitials({ + name: '', + width: 0, + height: 0, + background: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-q-r.md index 177759d9ef..9fa9f12324 100644 --- a/docs/examples/1.8.x/client-react-native/examples/avatars/get-q-r.md +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-q-r.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getQR( - '', // text - 1, // size (optional) - 0, // margin (optional) - false // download (optional) -); +const result = avatars.getQR({ + text: '', + size: 1, + margin: 0, + download: false +}); console.log(result); 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 1b28231ed3..2576ab5af6 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/client-react-native/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..476b10e009 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/decrement-document-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.decrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, + min: null +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/delete-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/delete-document.md index 9136107a3c..828cefdda8 100644 --- a/docs/examples/1.8.x/client-react-native/examples/databases/delete-document.md +++ b/docs/examples/1.8.x/client-react-native/examples/databases/delete-document.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteDocument( - '', // databaseId - '', // collectionId - '' // documentId -); +const result = await databases.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/get-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/get-document.md index 9993e2c941..962dc08349 100644 --- a/docs/examples/1.8.x/client-react-native/examples/databases/get-document.md +++ b/docs/examples/1.8.x/client-react-native/examples/databases/get-document.md @@ -6,11 +6,11 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getDocument( - '', // databaseId - '', // collectionId - '', // documentId - [] // queries (optional) -); +const result = await databases.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-react-native/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..269e7c88ff --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.incrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, + max: null +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/list-documents.md b/docs/examples/1.8.x/client-react-native/examples/databases/list-documents.md index b2f377e53c..10bf95da8b 100644 --- a/docs/examples/1.8.x/client-react-native/examples/databases/list-documents.md +++ b/docs/examples/1.8.x/client-react-native/examples/databases/list-documents.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listDocuments( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +const result = await databases.listDocuments({ + databaseId: '', + collectionId: '', + queries: [] +}); console.log(result); 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 7676ee109b..d16b2d86fb 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); +const result = await databases.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] +}); console.log(result); 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 ae423d12a7..931d2337dd 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.upsertDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md b/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md index 7d850c8103..4f5de5f4d6 100644 --- a/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md @@ -6,14 +6,14 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createExecution( - '', // functionId - '', // body (optional) - false, // async (optional) - '', // path (optional) - ExecutionMethod.GET, // method (optional) - {}, // headers (optional) - '' // scheduledAt (optional) -); +const result = await functions.createExecution({ + functionId: '', + body: '', + async: false, + path: '', + method: ExecutionMethod.GET, + headers: {}, + scheduledAt: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/functions/get-execution.md b/docs/examples/1.8.x/client-react-native/examples/functions/get-execution.md index 848747ea2f..2ef4e9f817 100644 --- a/docs/examples/1.8.x/client-react-native/examples/functions/get-execution.md +++ b/docs/examples/1.8.x/client-react-native/examples/functions/get-execution.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getExecution( - '', // functionId - '' // executionId -); +const result = await functions.getExecution({ + functionId: '', + executionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/functions/list-executions.md b/docs/examples/1.8.x/client-react-native/examples/functions/list-executions.md index 346f8c7ea8..3fbb91e48d 100644 --- a/docs/examples/1.8.x/client-react-native/examples/functions/list-executions.md +++ b/docs/examples/1.8.x/client-react-native/examples/functions/list-executions.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listExecutions( - '', // functionId - [] // queries (optional) -); +const result = await functions.listExecutions({ + functionId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/graphql/mutation.md b/docs/examples/1.8.x/client-react-native/examples/graphql/mutation.md index 3292a5dad2..dbc27ff120 100644 --- a/docs/examples/1.8.x/client-react-native/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/client-react-native/examples/graphql/mutation.md @@ -6,8 +6,8 @@ const client = new Client() const graphql = new Graphql(client); -const result = await graphql.mutation( - {} // query -); +const result = await graphql.mutation({ + query: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/graphql/query.md b/docs/examples/1.8.x/client-react-native/examples/graphql/query.md index a00c517a46..560b7e5cf1 100644 --- a/docs/examples/1.8.x/client-react-native/examples/graphql/query.md +++ b/docs/examples/1.8.x/client-react-native/examples/graphql/query.md @@ -6,8 +6,8 @@ const client = new Client() const graphql = new Graphql(client); -const result = await graphql.query( - {} // query -); +const result = await graphql.query({ + query: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-react-native/examples/messaging/create-subscriber.md index c950e90bae..2057f1da59 100644 --- a/docs/examples/1.8.x/client-react-native/examples/messaging/create-subscriber.md +++ b/docs/examples/1.8.x/client-react-native/examples/messaging/create-subscriber.md @@ -6,10 +6,10 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createSubscriber( - '', // topicId - '', // subscriberId - '' // targetId -); +const result = await messaging.createSubscriber({ + topicId: '', + subscriberId: '', + targetId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-react-native/examples/messaging/delete-subscriber.md index 5004b59cac..38545f6280 100644 --- a/docs/examples/1.8.x/client-react-native/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.8.x/client-react-native/examples/messaging/delete-subscriber.md @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.deleteSubscriber( - '', // topicId - '' // subscriberId -); +const result = await messaging.deleteSubscriber({ + topicId: '', + subscriberId: '' +}); console.log(result); 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 efbfd607c1..cb71753c7e 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 @@ -6,11 +6,11 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.createFile( - '', // bucketId - '', // fileId - await pickSingle(), // file - ["read("any")"] // permissions (optional) -); +const result = await storage.createFile({ + bucketId: '', + fileId: '', + file: await pickSingle(), + permissions: ["read("any")"] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/delete-file.md b/docs/examples/1.8.x/client-react-native/examples/storage/delete-file.md index 1a436ac8a8..776ec7fa18 100644 --- a/docs/examples/1.8.x/client-react-native/examples/storage/delete-file.md +++ b/docs/examples/1.8.x/client-react-native/examples/storage/delete-file.md @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.deleteFile( - '', // bucketId - '' // fileId -); +const result = await storage.deleteFile({ + bucketId: '', + fileId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-download.md index e21bad67eb..db8157e7fe 100644 --- a/docs/examples/1.8.x/client-react-native/examples/storage/get-file-download.md +++ b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-download.md @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileDownload( - '', // bucketId - '', // fileId - '' // token (optional) -); +const result = storage.getFileDownload({ + bucketId: '', + fileId: '', + token: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-preview.md index 6f116c5df6..cbf9424a08 100644 --- a/docs/examples/1.8.x/client-react-native/examples/storage/get-file-preview.md +++ b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-preview.md @@ -6,21 +6,21 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFilePreview( - '', // bucketId - '', // fileId - 0, // width (optional) - 0, // height (optional) - ImageGravity.Center, // gravity (optional) - -1, // quality (optional) - 0, // borderWidth (optional) - '', // borderColor (optional) - 0, // borderRadius (optional) - 0, // opacity (optional) - -360, // rotation (optional) - '', // background (optional) - ImageFormat.Jpg, // output (optional) - '' // token (optional) -); +const result = storage.getFilePreview({ + bucketId: '', + fileId: '', + width: 0, + height: 0, + gravity: ImageGravity.Center, + quality: -1, + borderWidth: 0, + borderColor: '', + borderRadius: 0, + opacity: 0, + rotation: -360, + background: '', + output: ImageFormat.Jpg, + token: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-view.md index 9b229f6a54..f7f010bef2 100644 --- a/docs/examples/1.8.x/client-react-native/examples/storage/get-file-view.md +++ b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-view.md @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileView( - '', // bucketId - '', // fileId - '' // token (optional) -); +const result = storage.getFileView({ + bucketId: '', + fileId: '', + token: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/get-file.md b/docs/examples/1.8.x/client-react-native/examples/storage/get-file.md index 6d358adabd..f284182479 100644 --- a/docs/examples/1.8.x/client-react-native/examples/storage/get-file.md +++ b/docs/examples/1.8.x/client-react-native/examples/storage/get-file.md @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.getFile( - '', // bucketId - '' // fileId -); +const result = await storage.getFile({ + bucketId: '', + fileId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/list-files.md b/docs/examples/1.8.x/client-react-native/examples/storage/list-files.md index 19099b1288..735b5ba557 100644 --- a/docs/examples/1.8.x/client-react-native/examples/storage/list-files.md +++ b/docs/examples/1.8.x/client-react-native/examples/storage/list-files.md @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.listFiles( - '', // bucketId - [], // queries (optional) - '' // search (optional) -); +const result = await storage.listFiles({ + bucketId: '', + queries: [], + search: '' +}); console.log(result); 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 d4ed68a337..642f9865ae 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 @@ -6,11 +6,11 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.updateFile( - '', // bucketId - '', // fileId - '', // name (optional) - ["read("any")"] // permissions (optional) -); +const result = await storage.updateFile({ + bucketId: '', + fileId: '', + name: '', + permissions: ["read("any")"] +}); console.log(result); 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 new file mode 100644 index 0000000000..0a1f03d398 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/create-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createRow({ + databaseId: '', + tableId: '', + rowId: '', + data: {}, + permissions: ["read("any")"] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..806748cbed --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.decrementRowColumn({ + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: null, + min: null +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..ee1cdb96cd --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/delete-row.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.deleteRow({ + databaseId: '', + tableId: '', + rowId: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/get-row.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..b1c82c86ea --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/get-row.md @@ -0,0 +1,16 @@ +import { Client, TablesDb } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.getRow({ + databaseId: '', + tableId: '', + rowId: '', + queries: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..515b41faa6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/increment-row-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.incrementRowColumn({ + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: null, + max: null +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/client-react-native/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..51ef6d52a4 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/list-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.listRows({ + databaseId: '', + tableId: '', + queries: [] +}); + +console.log(result); 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 new file mode 100644 index 0000000000..9d3e507930 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/update-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateRow({ + databaseId: '', + tableId: '', + rowId: '', + data: {}, + permissions: ["read("any")"] +}); + +console.log(result); 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 new file mode 100644 index 0000000000..41280aef25 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tablesdb/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.upsertRow({ + databaseId: '', + tableId: '', + rowId: '', + data: {}, + permissions: ["read("any")"] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/create-membership.md b/docs/examples/1.8.x/client-react-native/examples/teams/create-membership.md index 680fdb2ad8..ae69fcf399 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/create-membership.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/create-membership.md @@ -6,14 +6,14 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.createMembership( - '', // teamId - [], // roles - 'email@example.com', // email (optional) - '', // userId (optional) - '+12065550100', // phone (optional) - 'https://example.com', // url (optional) - '' // name (optional) -); +const result = await teams.createMembership({ + teamId: '', + roles: [], + email: 'email@example.com', + userId: '', + phone: '+12065550100', + url: 'https://example.com', + name: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/create.md b/docs/examples/1.8.x/client-react-native/examples/teams/create.md index 51aaee358e..1e203efb1d 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/create.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/create.md @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.create( - '', // teamId - '', // name - [] // roles (optional) -); +const result = await teams.create({ + teamId: '', + name: '', + roles: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-react-native/examples/teams/delete-membership.md index 37bdc7f87f..b881c5ac8c 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/delete-membership.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/delete-membership.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.deleteMembership( - '', // teamId - '' // membershipId -); +const result = await teams.deleteMembership({ + teamId: '', + membershipId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/delete.md b/docs/examples/1.8.x/client-react-native/examples/teams/delete.md index fe67eaffd1..8c98139c5b 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/delete.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/delete.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.delete( - '' // teamId -); +const result = await teams.delete({ + teamId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/get-membership.md b/docs/examples/1.8.x/client-react-native/examples/teams/get-membership.md index 2b253c8b51..46cdc4126c 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/get-membership.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/get-membership.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.getMembership( - '', // teamId - '' // membershipId -); +const result = await teams.getMembership({ + teamId: '', + membershipId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-react-native/examples/teams/get-prefs.md index 943ed1a181..0e3b4894cb 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/get-prefs.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/get-prefs.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.getPrefs( - '' // teamId -); +const result = await teams.getPrefs({ + teamId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/get.md b/docs/examples/1.8.x/client-react-native/examples/teams/get.md index 9267b57e2f..6305365688 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/get.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/get.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.get( - '' // teamId -); +const result = await teams.get({ + teamId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-react-native/examples/teams/list-memberships.md index 4444bcd664..3df8a6b709 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/list-memberships.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/list-memberships.md @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.listMemberships( - '', // teamId - [], // queries (optional) - '' // search (optional) -); +const result = await teams.listMemberships({ + teamId: '', + queries: [], + search: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/list.md b/docs/examples/1.8.x/client-react-native/examples/teams/list.md index 779538a70a..83c898264a 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/list.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/list.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.list( - [], // queries (optional) - '' // search (optional) -); +const result = await teams.list({ + queries: [], + search: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-react-native/examples/teams/update-membership-status.md index c8edbf08c7..0aba8065c4 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/update-membership-status.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/update-membership-status.md @@ -6,11 +6,11 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateMembershipStatus( - '', // teamId - '', // membershipId - '', // userId - '' // secret -); +const result = await teams.updateMembershipStatus({ + teamId: '', + membershipId: '', + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/update-membership.md b/docs/examples/1.8.x/client-react-native/examples/teams/update-membership.md index 347cbdd095..ada2863419 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/update-membership.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/update-membership.md @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateMembership( - '', // teamId - '', // membershipId - [] // roles -); +const result = await teams.updateMembership({ + teamId: '', + membershipId: '', + roles: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/update-name.md b/docs/examples/1.8.x/client-react-native/examples/teams/update-name.md index 0ab4aa1c84..251ff26ada 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/update-name.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/update-name.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateName( - '', // teamId - '' // name -); +const result = await teams.updateName({ + teamId: '', + name: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-react-native/examples/teams/update-prefs.md index fda16a05db..490450210f 100644 --- a/docs/examples/1.8.x/client-react-native/examples/teams/update-prefs.md +++ b/docs/examples/1.8.x/client-react-native/examples/teams/update-prefs.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updatePrefs( - '', // teamId - {} // prefs -); +const result = await teams.updatePrefs({ + teamId: '', + prefs: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/client-rest/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/client-rest/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..85ee70588b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/decrement-document-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "value": 0, + "min": 0 +} diff --git a/docs/examples/1.8.x/client-rest/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-rest/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..68b091a31e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/increment-document-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "value": 0, + "max": 0 +} diff --git a/docs/examples/1.8.x/client-rest/examples/tablesdb/create-row.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..1f7943f10c --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/create-row.md @@ -0,0 +1,13 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "rowId": "", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..676e090150 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,12 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "value": 0, + "min": 0 +} diff --git a/docs/examples/1.8.x/client-rest/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..f3ba056f7e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/delete-row.md @@ -0,0 +1,8 @@ +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/tablesdb/get-row.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..8c2187f696 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/get-row.md @@ -0,0 +1,6 @@ +GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..5172cb420b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/increment-row-column.md @@ -0,0 +1,12 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "value": 0, + "max": 0 +} diff --git a/docs/examples/1.8.x/client-rest/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..0d69509ca6 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/list-rows.md @@ -0,0 +1,6 @@ +GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/tablesdb/update-row.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..40d276a0fe --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/update-row.md @@ -0,0 +1,12 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/client-rest/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..581790fc01 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tablesdb/upsert-row.md @@ -0,0 +1,12 @@ +PUT /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-web/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-web/examples/account/create-email-password-session.md index 3438ffbe54..26a745a6b2 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create-email-password-session.md +++ b/docs/examples/1.8.x/client-web/examples/account/create-email-password-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createEmailPasswordSession( - 'email@example.com', // email - 'password' // password -); +const result = await account.createEmailPasswordSession({ + email: 'email@example.com', + password: 'password' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-email-token.md b/docs/examples/1.8.x/client-web/examples/account/create-email-token.md index e7cab7c360..68152310d4 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create-email-token.md +++ b/docs/examples/1.8.x/client-web/examples/account/create-email-token.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.createEmailToken( - '', // userId - 'email@example.com', // email - false // phrase (optional) -); +const result = await account.createEmailToken({ + userId: '', + email: 'email@example.com', + phrase: false +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-web/examples/account/create-magic-u-r-l-token.md index ba87bd9a3f..363bfaf126 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.8.x/client-web/examples/account/create-magic-u-r-l-token.md @@ -6,11 +6,11 @@ const client = new Client() const account = new Account(client); -const result = await account.createMagicURLToken( - '', // userId - 'email@example.com', // email - 'https://example.com', // url (optional) - false // phrase (optional) -); +const result = await account.createMagicURLToken({ + userId: '', + email: 'email@example.com', + url: 'https://example.com', + phrase: false +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-web/examples/account/create-mfa-authenticator.md index 510481511d..d78c61c5b4 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-web/examples/account/create-mfa-authenticator.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaAuthenticator( - AuthenticatorType.Totp // type -); +const result = await account.createMfaAuthenticator({ + type: AuthenticatorType.Totp +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-web/examples/account/create-mfa-challenge.md index e9f6f08b48..a2a8c52669 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.8.x/client-web/examples/account/create-mfa-challenge.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaChallenge( - AuthenticationFactor.Email // factor -); +const result = await account.createMfaChallenge({ + factor: AuthenticationFactor.Email +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-web/examples/account/create-o-auth2session.md index caad309ffd..5d185a21f0 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create-o-auth2session.md +++ b/docs/examples/1.8.x/client-web/examples/account/create-o-auth2session.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Session( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +account.createOAuth2Session({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', + failure: 'https://example.com', + scopes: [] +}); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-web/examples/account/create-o-auth2token.md index 5f0aab36d8..81726a00d4 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create-o-auth2token.md +++ b/docs/examples/1.8.x/client-web/examples/account/create-o-auth2token.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Token( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +account.createOAuth2Token({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', + failure: 'https://example.com', + scopes: [] +}); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-web/examples/account/create-phone-token.md index 481e57d353..60d032ef51 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create-phone-token.md +++ b/docs/examples/1.8.x/client-web/examples/account/create-phone-token.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createPhoneToken( - '', // userId - '+12065550100' // phone -); +const result = await account.createPhoneToken({ + userId: '', + phone: '+12065550100' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-push-target.md b/docs/examples/1.8.x/client-web/examples/account/create-push-target.md index c987e3d2a8..ffc3307ef1 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create-push-target.md +++ b/docs/examples/1.8.x/client-web/examples/account/create-push-target.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.createPushTarget( - '', // targetId - '', // identifier - '' // providerId (optional) -); +const result = await account.createPushTarget({ + targetId: '', + identifier: '', + providerId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-recovery.md b/docs/examples/1.8.x/client-web/examples/account/create-recovery.md index f0a400d86d..2195ed93d5 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create-recovery.md +++ b/docs/examples/1.8.x/client-web/examples/account/create-recovery.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createRecovery( - 'email@example.com', // email - 'https://example.com' // url -); +const result = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-session.md b/docs/examples/1.8.x/client-web/examples/account/create-session.md index b6d7ef8bbb..4858f9f2e0 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create-session.md +++ b/docs/examples/1.8.x/client-web/examples/account/create-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createSession( - '', // userId - '' // secret -); +const result = await account.createSession({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-verification.md b/docs/examples/1.8.x/client-web/examples/account/create-verification.md index 4a3b3144b6..0325e40581 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create-verification.md +++ b/docs/examples/1.8.x/client-web/examples/account/create-verification.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createVerification( - 'https://example.com' // url -); +const result = await account.createVerification({ + url: 'https://example.com' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create.md b/docs/examples/1.8.x/client-web/examples/account/create.md index bf2dbec02a..405eb0301f 100644 --- a/docs/examples/1.8.x/client-web/examples/account/create.md +++ b/docs/examples/1.8.x/client-web/examples/account/create.md @@ -6,11 +6,11 @@ const client = new Client() const account = new Account(client); -const result = await account.create( - '', // userId - 'email@example.com', // email - '', // password - '' // name (optional) -); +const result = await account.create({ + userId: '', + email: 'email@example.com', + password: '', + name: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-identity.md b/docs/examples/1.8.x/client-web/examples/account/delete-identity.md index f34baaaf5e..48434496d2 100644 --- a/docs/examples/1.8.x/client-web/examples/account/delete-identity.md +++ b/docs/examples/1.8.x/client-web/examples/account/delete-identity.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteIdentity( - '' // identityId -); +const result = await account.deleteIdentity({ + identityId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-web/examples/account/delete-mfa-authenticator.md index d11351442c..9adb5eca80 100644 --- a/docs/examples/1.8.x/client-web/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-web/examples/account/delete-mfa-authenticator.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteMfaAuthenticator( - AuthenticatorType.Totp // type -); +const result = await account.deleteMfaAuthenticator({ + type: AuthenticatorType.Totp +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-web/examples/account/delete-push-target.md index 79bb06ed5d..1a09b32ad1 100644 --- a/docs/examples/1.8.x/client-web/examples/account/delete-push-target.md +++ b/docs/examples/1.8.x/client-web/examples/account/delete-push-target.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deletePushTarget( - '' // targetId -); +const result = await account.deletePushTarget({ + targetId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-session.md b/docs/examples/1.8.x/client-web/examples/account/delete-session.md index 4d27221d85..bf17ffce8b 100644 --- a/docs/examples/1.8.x/client-web/examples/account/delete-session.md +++ b/docs/examples/1.8.x/client-web/examples/account/delete-session.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteSession( - '' // sessionId -); +const result = await account.deleteSession({ + sessionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/get-session.md b/docs/examples/1.8.x/client-web/examples/account/get-session.md index 29af11052e..8c4bdd79f6 100644 --- a/docs/examples/1.8.x/client-web/examples/account/get-session.md +++ b/docs/examples/1.8.x/client-web/examples/account/get-session.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.getSession( - '' // sessionId -); +const result = await account.getSession({ + sessionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/list-identities.md b/docs/examples/1.8.x/client-web/examples/account/list-identities.md index 54c569b836..9cfea90929 100644 --- a/docs/examples/1.8.x/client-web/examples/account/list-identities.md +++ b/docs/examples/1.8.x/client-web/examples/account/list-identities.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listIdentities( - [] // queries (optional) -); +const result = await account.listIdentities({ + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/list-logs.md b/docs/examples/1.8.x/client-web/examples/account/list-logs.md index 17c214f949..f6d21b3feb 100644 --- a/docs/examples/1.8.x/client-web/examples/account/list-logs.md +++ b/docs/examples/1.8.x/client-web/examples/account/list-logs.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listLogs( - [] // queries (optional) -); +const result = await account.listLogs({ + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-email.md b/docs/examples/1.8.x/client-web/examples/account/update-email.md index 9e02fc9416..96dcec5bdf 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-email.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-email.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateEmail( - 'email@example.com', // email - 'password' // password -); +const result = await account.updateEmail({ + email: 'email@example.com', + password: 'password' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-web/examples/account/update-m-f-a.md index 58b6a061b1..4d20604da4 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-m-f-a.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-m-f-a.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMFA( - false // mfa -); +const result = await account.updateMFA({ + mfa: false +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-web/examples/account/update-magic-u-r-l-session.md index 47501c528f..c126f7ce80 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-magic-u-r-l-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMagicURLSession( - '', // userId - '' // secret -); +const result = await account.updateMagicURLSession({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-web/examples/account/update-mfa-authenticator.md index 74eedd8dc7..0b958490ab 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-mfa-authenticator.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaAuthenticator( - AuthenticatorType.Totp, // type - '' // otp -); +const result = await account.updateMfaAuthenticator({ + type: AuthenticatorType.Totp, + otp: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-web/examples/account/update-mfa-challenge.md index 01a09dd354..146d4668e9 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-mfa-challenge.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaChallenge( - '', // challengeId - '' // otp -); +const result = await account.updateMfaChallenge({ + challengeId: '', + otp: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-name.md b/docs/examples/1.8.x/client-web/examples/account/update-name.md index d6a6946795..6a9ba82cdc 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-name.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-name.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateName( - '' // name -); +const result = await account.updateName({ + name: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-password.md b/docs/examples/1.8.x/client-web/examples/account/update-password.md index 575779e35c..65100a7021 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-password.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-password.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePassword( - '', // password - 'password' // oldPassword (optional) -); +const result = await account.updatePassword({ + password: '', + oldPassword: 'password' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-web/examples/account/update-phone-session.md index 092205ec6a..39d0d36533 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-phone-session.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-phone-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhoneSession( - '', // userId - '' // secret -); +const result = await account.updatePhoneSession({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-web/examples/account/update-phone-verification.md index 1b85178e76..6be1b777a4 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-phone-verification.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-phone-verification.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhoneVerification( - '', // userId - '' // secret -); +const result = await account.updatePhoneVerification({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-phone.md b/docs/examples/1.8.x/client-web/examples/account/update-phone.md index 0c5ff216d8..912b2e5256 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-phone.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-phone.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhone( - '+12065550100', // phone - 'password' // password -); +const result = await account.updatePhone({ + phone: '+12065550100', + password: 'password' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-prefs.md b/docs/examples/1.8.x/client-web/examples/account/update-prefs.md index b9e88eac28..98ea84181a 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-prefs.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-prefs.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePrefs( - {} // prefs -); +const result = await account.updatePrefs({ + prefs: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-push-target.md b/docs/examples/1.8.x/client-web/examples/account/update-push-target.md index 3475a22ba9..57fdd6b1ef 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-push-target.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-push-target.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePushTarget( - '', // targetId - '' // identifier -); +const result = await account.updatePushTarget({ + targetId: '', + identifier: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-recovery.md b/docs/examples/1.8.x/client-web/examples/account/update-recovery.md index 328e50ea4f..d975647a30 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-recovery.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-recovery.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.updateRecovery( - '', // userId - '', // secret - '' // password -); +const result = await account.updateRecovery({ + userId: '', + secret: '', + password: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-session.md b/docs/examples/1.8.x/client-web/examples/account/update-session.md index 4ccc8295d9..4c9890b216 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-session.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-session.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateSession( - '' // sessionId -); +const result = await account.updateSession({ + sessionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-verification.md b/docs/examples/1.8.x/client-web/examples/account/update-verification.md index 6d15aeec2e..b5fea5c9d6 100644 --- a/docs/examples/1.8.x/client-web/examples/account/update-verification.md +++ b/docs/examples/1.8.x/client-web/examples/account/update-verification.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateVerification( - '', // userId - '' // secret -); +const result = await account.updateVerification({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-web/examples/avatars/get-browser.md index 08512d1dc7..934939d854 100644 --- a/docs/examples/1.8.x/client-web/examples/avatars/get-browser.md +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-browser.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getBrowser( - Browser.AvantBrowser, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getBrowser({ + code: Browser.AvantBrowser, + width: 0, + height: 0, + quality: -1 +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-web/examples/avatars/get-credit-card.md index fb631a4e3e..7a3cd86d00 100644 --- a/docs/examples/1.8.x/client-web/examples/avatars/get-credit-card.md +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-credit-card.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getCreditCard( - CreditCard.AmericanExpress, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getCreditCard({ + code: CreditCard.AmericanExpress, + width: 0, + height: 0, + quality: -1 +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-web/examples/avatars/get-favicon.md index 85317f1383..2e976c6436 100644 --- a/docs/examples/1.8.x/client-web/examples/avatars/get-favicon.md +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-favicon.md @@ -6,8 +6,8 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFavicon( - 'https://example.com' // url -); +const result = avatars.getFavicon({ + url: 'https://example.com' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-web/examples/avatars/get-flag.md index bfbc6c2865..1ab7dc8999 100644 --- a/docs/examples/1.8.x/client-web/examples/avatars/get-flag.md +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-flag.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFlag( - Flag.Afghanistan, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getFlag({ + code: Flag.Afghanistan, + width: 0, + height: 0, + quality: -1 +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-image.md b/docs/examples/1.8.x/client-web/examples/avatars/get-image.md index 36f88ecb52..4e7daa0907 100644 --- a/docs/examples/1.8.x/client-web/examples/avatars/get-image.md +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-image.md @@ -6,10 +6,10 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getImage( - 'https://example.com', // url - 0, // width (optional) - 0 // height (optional) -); +const result = avatars.getImage({ + url: 'https://example.com', + width: 0, + height: 0 +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-web/examples/avatars/get-initials.md index 321c448807..a831e3b11a 100644 --- a/docs/examples/1.8.x/client-web/examples/avatars/get-initials.md +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-initials.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getInitials( - '', // name (optional) - 0, // width (optional) - 0, // height (optional) - '' // background (optional) -); +const result = avatars.getInitials({ + name: '', + width: 0, + height: 0, + background: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-web/examples/avatars/get-q-r.md index cbbabbc2c8..11881896a3 100644 --- a/docs/examples/1.8.x/client-web/examples/avatars/get-q-r.md +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-q-r.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getQR( - '', // text - 1, // size (optional) - 0, // margin (optional) - false // download (optional) -); +const result = avatars.getQR({ + text: '', + size: 1, + margin: 0, + download: false +}); console.log(result); 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 916cc92689..6698dec0c9 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/client-web/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..c7feb904da --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/decrement-document-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.decrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, + min: null +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/delete-document.md b/docs/examples/1.8.x/client-web/examples/databases/delete-document.md index c9a1e9f759..4192085653 100644 --- a/docs/examples/1.8.x/client-web/examples/databases/delete-document.md +++ b/docs/examples/1.8.x/client-web/examples/databases/delete-document.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteDocument( - '', // databaseId - '', // collectionId - '' // documentId -); +const result = await databases.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/get-document.md b/docs/examples/1.8.x/client-web/examples/databases/get-document.md index a2836fc6ef..be1eb90efa 100644 --- a/docs/examples/1.8.x/client-web/examples/databases/get-document.md +++ b/docs/examples/1.8.x/client-web/examples/databases/get-document.md @@ -6,11 +6,11 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getDocument( - '', // databaseId - '', // collectionId - '', // documentId - [] // queries (optional) -); +const result = await databases.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/client-web/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..86a53306ac --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.incrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, + max: null +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/list-documents.md b/docs/examples/1.8.x/client-web/examples/databases/list-documents.md index d00ac56390..099ddf85fb 100644 --- a/docs/examples/1.8.x/client-web/examples/databases/list-documents.md +++ b/docs/examples/1.8.x/client-web/examples/databases/list-documents.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listDocuments( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +const result = await databases.listDocuments({ + databaseId: '', + collectionId: '', + queries: [] +}); console.log(result); 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 c0e06fce40..69696c062b 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); +const result = await databases.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] +}); console.log(result); 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 cfefe06242..33e14a42b0 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.upsertDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/functions/create-execution.md b/docs/examples/1.8.x/client-web/examples/functions/create-execution.md index be9bb508c0..2e6503dbc7 100644 --- a/docs/examples/1.8.x/client-web/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-web/examples/functions/create-execution.md @@ -6,14 +6,14 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createExecution( - '', // functionId - '', // body (optional) - false, // async (optional) - '', // path (optional) - ExecutionMethod.GET, // method (optional) - {}, // headers (optional) - '' // scheduledAt (optional) -); +const result = await functions.createExecution({ + functionId: '', + body: '', + async: false, + path: '', + method: ExecutionMethod.GET, + headers: {}, + scheduledAt: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/functions/get-execution.md b/docs/examples/1.8.x/client-web/examples/functions/get-execution.md index 9b88f81f6c..1e9a367df5 100644 --- a/docs/examples/1.8.x/client-web/examples/functions/get-execution.md +++ b/docs/examples/1.8.x/client-web/examples/functions/get-execution.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getExecution( - '', // functionId - '' // executionId -); +const result = await functions.getExecution({ + functionId: '', + executionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/functions/list-executions.md b/docs/examples/1.8.x/client-web/examples/functions/list-executions.md index 9ec506346c..75f665af87 100644 --- a/docs/examples/1.8.x/client-web/examples/functions/list-executions.md +++ b/docs/examples/1.8.x/client-web/examples/functions/list-executions.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listExecutions( - '', // functionId - [] // queries (optional) -); +const result = await functions.listExecutions({ + functionId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/graphql/mutation.md b/docs/examples/1.8.x/client-web/examples/graphql/mutation.md index 0e7466ac13..5771af061a 100644 --- a/docs/examples/1.8.x/client-web/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/client-web/examples/graphql/mutation.md @@ -6,8 +6,8 @@ const client = new Client() const graphql = new Graphql(client); -const result = await graphql.mutation( - {} // query -); +const result = await graphql.mutation({ + query: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/graphql/query.md b/docs/examples/1.8.x/client-web/examples/graphql/query.md index f9cd9b740f..c367d07d3e 100644 --- a/docs/examples/1.8.x/client-web/examples/graphql/query.md +++ b/docs/examples/1.8.x/client-web/examples/graphql/query.md @@ -6,8 +6,8 @@ const client = new Client() const graphql = new Graphql(client); -const result = await graphql.query( - {} // query -); +const result = await graphql.query({ + query: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-web/examples/messaging/create-subscriber.md index 254870985d..59b760358e 100644 --- a/docs/examples/1.8.x/client-web/examples/messaging/create-subscriber.md +++ b/docs/examples/1.8.x/client-web/examples/messaging/create-subscriber.md @@ -6,10 +6,10 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createSubscriber( - '', // topicId - '', // subscriberId - '' // targetId -); +const result = await messaging.createSubscriber({ + topicId: '', + subscriberId: '', + targetId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-web/examples/messaging/delete-subscriber.md index 3d5d0a4b42..dfe2d0688c 100644 --- a/docs/examples/1.8.x/client-web/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.8.x/client-web/examples/messaging/delete-subscriber.md @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.deleteSubscriber( - '', // topicId - '' // subscriberId -); +const result = await messaging.deleteSubscriber({ + topicId: '', + subscriberId: '' +}); console.log(result); 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 20a42206a2..1b4ffa504e 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 @@ -6,11 +6,11 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.createFile( - '', // bucketId - '', // fileId - document.getElementById('uploader').files[0], // file - ["read("any")"] // permissions (optional) -); +const result = await storage.createFile({ + bucketId: '', + fileId: '', + file: document.getElementById('uploader').files[0], + permissions: ["read("any")"] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/delete-file.md b/docs/examples/1.8.x/client-web/examples/storage/delete-file.md index 373cdc03fc..101b87860b 100644 --- a/docs/examples/1.8.x/client-web/examples/storage/delete-file.md +++ b/docs/examples/1.8.x/client-web/examples/storage/delete-file.md @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.deleteFile( - '', // bucketId - '' // fileId -); +const result = await storage.deleteFile({ + bucketId: '', + fileId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-web/examples/storage/get-file-download.md index 3ebb8f8f71..d8cf2806b6 100644 --- a/docs/examples/1.8.x/client-web/examples/storage/get-file-download.md +++ b/docs/examples/1.8.x/client-web/examples/storage/get-file-download.md @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileDownload( - '', // bucketId - '', // fileId - '' // token (optional) -); +const result = storage.getFileDownload({ + bucketId: '', + fileId: '', + token: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-web/examples/storage/get-file-preview.md index ffc64c9f3a..92481d08bd 100644 --- a/docs/examples/1.8.x/client-web/examples/storage/get-file-preview.md +++ b/docs/examples/1.8.x/client-web/examples/storage/get-file-preview.md @@ -6,21 +6,21 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFilePreview( - '', // bucketId - '', // fileId - 0, // width (optional) - 0, // height (optional) - ImageGravity.Center, // gravity (optional) - -1, // quality (optional) - 0, // borderWidth (optional) - '', // borderColor (optional) - 0, // borderRadius (optional) - 0, // opacity (optional) - -360, // rotation (optional) - '', // background (optional) - ImageFormat.Jpg, // output (optional) - '' // token (optional) -); +const result = storage.getFilePreview({ + bucketId: '', + fileId: '', + width: 0, + height: 0, + gravity: ImageGravity.Center, + quality: -1, + borderWidth: 0, + borderColor: '', + borderRadius: 0, + opacity: 0, + rotation: -360, + background: '', + output: ImageFormat.Jpg, + token: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-web/examples/storage/get-file-view.md index add5a6fba5..c75f7805eb 100644 --- a/docs/examples/1.8.x/client-web/examples/storage/get-file-view.md +++ b/docs/examples/1.8.x/client-web/examples/storage/get-file-view.md @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileView( - '', // bucketId - '', // fileId - '' // token (optional) -); +const result = storage.getFileView({ + bucketId: '', + fileId: '', + token: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/get-file.md b/docs/examples/1.8.x/client-web/examples/storage/get-file.md index 10bd9fb775..41c41b63d1 100644 --- a/docs/examples/1.8.x/client-web/examples/storage/get-file.md +++ b/docs/examples/1.8.x/client-web/examples/storage/get-file.md @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.getFile( - '', // bucketId - '' // fileId -); +const result = await storage.getFile({ + bucketId: '', + fileId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/list-files.md b/docs/examples/1.8.x/client-web/examples/storage/list-files.md index f2c3ccb2b8..d64e0ff525 100644 --- a/docs/examples/1.8.x/client-web/examples/storage/list-files.md +++ b/docs/examples/1.8.x/client-web/examples/storage/list-files.md @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.listFiles( - '', // bucketId - [], // queries (optional) - '' // search (optional) -); +const result = await storage.listFiles({ + bucketId: '', + queries: [], + search: '' +}); 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 1432b85099..1c60d04efd 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 @@ -6,11 +6,11 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.updateFile( - '', // bucketId - '', // fileId - '', // name (optional) - ["read("any")"] // permissions (optional) -); +const result = await storage.updateFile({ + bucketId: '', + fileId: '', + name: '', + permissions: ["read("any")"] +}); 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 new file mode 100644 index 0000000000..8c9ff7f766 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/create-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createRow({ + databaseId: '', + tableId: '', + rowId: '', + data: {}, + permissions: ["read("any")"] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/client-web/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..a3f81cc5a8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.decrementRowColumn({ + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: null, + min: null +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/client-web/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..f77eb1c159 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/delete-row.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.deleteRow({ + databaseId: '', + tableId: '', + rowId: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/get-row.md b/docs/examples/1.8.x/client-web/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..79200e1a9e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/get-row.md @@ -0,0 +1,16 @@ +import { Client, TablesDb } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.getRow({ + databaseId: '', + tableId: '', + rowId: '', + queries: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/client-web/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..672a23c859 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/increment-row-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.incrementRowColumn({ + databaseId: '', + tableId: '', + rowId: '', + column: '', + value: null, + max: null +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/client-web/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..b3c30a06ff --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/list-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.listRows({ + databaseId: '', + tableId: '', + queries: [] +}); + +console.log(result); 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 new file mode 100644 index 0000000000..18f8ce697a --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/update-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateRow({ + databaseId: '', + tableId: '', + rowId: '', + data: {}, + permissions: ["read("any")"] +}); + +console.log(result); 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 new file mode 100644 index 0000000000..0718d3c371 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tablesdb/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.upsertRow({ + databaseId: '', + tableId: '', + rowId: '', + data: {}, + permissions: ["read("any")"] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/create-membership.md b/docs/examples/1.8.x/client-web/examples/teams/create-membership.md index 8802e25af9..490c7a9194 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/create-membership.md +++ b/docs/examples/1.8.x/client-web/examples/teams/create-membership.md @@ -6,14 +6,14 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.createMembership( - '', // teamId - [], // roles - 'email@example.com', // email (optional) - '', // userId (optional) - '+12065550100', // phone (optional) - 'https://example.com', // url (optional) - '' // name (optional) -); +const result = await teams.createMembership({ + teamId: '', + roles: [], + email: 'email@example.com', + userId: '', + phone: '+12065550100', + url: 'https://example.com', + name: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/create.md b/docs/examples/1.8.x/client-web/examples/teams/create.md index b23f2201ac..55b8ca8227 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/create.md +++ b/docs/examples/1.8.x/client-web/examples/teams/create.md @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.create( - '', // teamId - '', // name - [] // roles (optional) -); +const result = await teams.create({ + teamId: '', + name: '', + roles: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-web/examples/teams/delete-membership.md index 2f360c3547..95e5fde3a4 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/delete-membership.md +++ b/docs/examples/1.8.x/client-web/examples/teams/delete-membership.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.deleteMembership( - '', // teamId - '' // membershipId -); +const result = await teams.deleteMembership({ + teamId: '', + membershipId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/delete.md b/docs/examples/1.8.x/client-web/examples/teams/delete.md index 5fd7f5d858..7299f0f791 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/delete.md +++ b/docs/examples/1.8.x/client-web/examples/teams/delete.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.delete( - '' // teamId -); +const result = await teams.delete({ + teamId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/get-membership.md b/docs/examples/1.8.x/client-web/examples/teams/get-membership.md index cd253fd6ef..a6d4186b65 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/get-membership.md +++ b/docs/examples/1.8.x/client-web/examples/teams/get-membership.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.getMembership( - '', // teamId - '' // membershipId -); +const result = await teams.getMembership({ + teamId: '', + membershipId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-web/examples/teams/get-prefs.md index a7f346f11f..98c7605639 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/get-prefs.md +++ b/docs/examples/1.8.x/client-web/examples/teams/get-prefs.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.getPrefs( - '' // teamId -); +const result = await teams.getPrefs({ + teamId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/get.md b/docs/examples/1.8.x/client-web/examples/teams/get.md index 539bdcf051..c910429fd6 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/get.md +++ b/docs/examples/1.8.x/client-web/examples/teams/get.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.get( - '' // teamId -); +const result = await teams.get({ + teamId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-web/examples/teams/list-memberships.md index e8cc39b5d8..8c5cc9378d 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/list-memberships.md +++ b/docs/examples/1.8.x/client-web/examples/teams/list-memberships.md @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.listMemberships( - '', // teamId - [], // queries (optional) - '' // search (optional) -); +const result = await teams.listMemberships({ + teamId: '', + queries: [], + search: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/list.md b/docs/examples/1.8.x/client-web/examples/teams/list.md index 4ca13ce8dd..1e36f738e0 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/list.md +++ b/docs/examples/1.8.x/client-web/examples/teams/list.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.list( - [], // queries (optional) - '' // search (optional) -); +const result = await teams.list({ + queries: [], + search: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-web/examples/teams/update-membership-status.md index 89cc13cac2..8fe61083a8 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/update-membership-status.md +++ b/docs/examples/1.8.x/client-web/examples/teams/update-membership-status.md @@ -6,11 +6,11 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateMembershipStatus( - '', // teamId - '', // membershipId - '', // userId - '' // secret -); +const result = await teams.updateMembershipStatus({ + teamId: '', + membershipId: '', + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/update-membership.md b/docs/examples/1.8.x/client-web/examples/teams/update-membership.md index fd6fffffcb..5db27e064d 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/update-membership.md +++ b/docs/examples/1.8.x/client-web/examples/teams/update-membership.md @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateMembership( - '', // teamId - '', // membershipId - [] // roles -); +const result = await teams.updateMembership({ + teamId: '', + membershipId: '', + roles: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/update-name.md b/docs/examples/1.8.x/client-web/examples/teams/update-name.md index d91939ff73..db1ff4c4ca 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/update-name.md +++ b/docs/examples/1.8.x/client-web/examples/teams/update-name.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateName( - '', // teamId - '' // name -); +const result = await teams.updateName({ + teamId: '', + name: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-web/examples/teams/update-prefs.md index d7d4c36759..0844353546 100644 --- a/docs/examples/1.8.x/client-web/examples/teams/update-prefs.md +++ b/docs/examples/1.8.x/client-web/examples/teams/update-prefs.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updatePrefs( - '', // teamId - {} // prefs -); +const result = await teams.updatePrefs({ + teamId: '', + prefs: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-migration.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-migration.md index 594bc85052..f80c9e940a 100644 --- a/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-migration.md +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-migration.md @@ -1,4 +1,5 @@ appwrite migrations createCsvMigration \ --bucketId \ --fileId \ - --resourceId [ID1:ID2] + --resourceId [ID1:ID2] \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..3e21a3adfd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb createBooleanColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..bee46cb18b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb createDatetimeColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..3d0d4d6c31 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-email-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb createEmailColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..6a8ea71b32 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-enum-column.md @@ -0,0 +1,8 @@ +appwrite tablesDb createEnumColumn \ + --databaseId \ + --tableId \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..a4f7b003f0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-float-column.md @@ -0,0 +1,9 @@ +appwrite tablesDb createFloatColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-index.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..3da867eeee --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-index.md @@ -0,0 +1,8 @@ +appwrite tablesDb createIndex \ + --databaseId \ + --tableId \ + --key '' \ + --type key \ + --columns one two three \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..a5f9a7a585 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-integer-column.md @@ -0,0 +1,9 @@ +appwrite tablesDb createIntegerColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..aa937279d0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-ip-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb createIpColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..c7897d66dc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,9 @@ +appwrite tablesDb createRelationshipColumn \ + --databaseId \ + --tableId \ + --relatedTableId \ + --type oneToOne \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-row.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..0a040309f8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-row.md @@ -0,0 +1,6 @@ +appwrite tablesDb createRow \ + --databaseId \ + --tableId \ + --rowId \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..d8158ad81f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-rows.md @@ -0,0 +1,4 @@ +appwrite tablesDb createRows \ + --databaseId \ + --tableId \ + --rows one two three diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..e28501575a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-string-column.md @@ -0,0 +1,9 @@ +appwrite tablesDb createStringColumn \ + --databaseId \ + --tableId \ + --key '' \ + --size 1 \ + --required false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-table.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-table.md new file mode 100644 index 0000000000..9ae952ab7f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-table.md @@ -0,0 +1,7 @@ +appwrite tablesDb createTable \ + --databaseId \ + --tableId \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..9d229828c0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create-url-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb createUrlColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/create.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/create.md new file mode 100644 index 0000000000..894dee5a21 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/create.md @@ -0,0 +1,4 @@ +appwrite tablesDb create \ + --databaseId \ + --name \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..d232f985ad --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb decrementRowColumn \ + --databaseId \ + --tableId \ + --rowId \ + --column '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..a1e43d4ba5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-column.md @@ -0,0 +1,4 @@ +appwrite tablesDb deleteColumn \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..ecd9afe3ac --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-index.md @@ -0,0 +1,4 @@ +appwrite tablesDb deleteIndex \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..c9e849b696 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-row.md @@ -0,0 +1,4 @@ +appwrite tablesDb deleteRow \ + --databaseId \ + --tableId \ + --rowId diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..f38131607d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-rows.md @@ -0,0 +1,4 @@ +appwrite tablesDb deleteRows \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..ae48ae5002 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete-table.md @@ -0,0 +1,3 @@ +appwrite tablesDb deleteTable \ + --databaseId \ + --tableId diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/delete.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete.md new file mode 100644 index 0000000000..a41c3ec058 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/delete.md @@ -0,0 +1,2 @@ +appwrite tablesDb delete \ + --databaseId diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..102709886f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-column.md @@ -0,0 +1,4 @@ +appwrite tablesDb getColumn \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get-index.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..cf5d2bd944 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-index.md @@ -0,0 +1,4 @@ +appwrite tablesDb getIndex \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get-row.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..655c7d69ef --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-row.md @@ -0,0 +1,5 @@ +appwrite tablesDb getRow \ + --databaseId \ + --tableId \ + --rowId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get-table-usage.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-table-usage.md new file mode 100644 index 0000000000..3d2aab1821 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-table-usage.md @@ -0,0 +1,4 @@ +appwrite tablesDb getTableUsage \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get-table.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..60c3a5a42d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-table.md @@ -0,0 +1,3 @@ +appwrite tablesDb getTable \ + --databaseId \ + --tableId diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get-usage.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-usage.md new file mode 100644 index 0000000000..90be79b0c2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get-usage.md @@ -0,0 +1,3 @@ +appwrite tablesDb getUsage \ + --databaseId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/get.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/get.md new file mode 100644 index 0000000000..46cec46b34 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/get.md @@ -0,0 +1,2 @@ +appwrite tablesDb get \ + --databaseId diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..317fe8939c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/increment-row-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb incrementRowColumn \ + --databaseId \ + --tableId \ + --rowId \ + --column '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..0f5812cd48 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-columns.md @@ -0,0 +1,4 @@ +appwrite tablesDb listColumns \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..a226483b72 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-indexes.md @@ -0,0 +1,4 @@ +appwrite tablesDb listIndexes \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-row-logs.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-row-logs.md new file mode 100644 index 0000000000..baa7e90e6c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-row-logs.md @@ -0,0 +1,5 @@ +appwrite tablesDb listRowLogs \ + --databaseId \ + --tableId \ + --rowId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..496ba61cc2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-rows.md @@ -0,0 +1,4 @@ +appwrite tablesDb listRows \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-table-logs.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-table-logs.md new file mode 100644 index 0000000000..71647b27f3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-table-logs.md @@ -0,0 +1,4 @@ +appwrite tablesDb listTableLogs \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..6d4eb7bd90 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-tables.md @@ -0,0 +1,4 @@ +appwrite tablesDb listTables \ + --databaseId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list-usage.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-usage.md new file mode 100644 index 0000000000..9622b7a6e0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list-usage.md @@ -0,0 +1,2 @@ +appwrite tablesDb listUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/list.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/list.md new file mode 100644 index 0000000000..dd10ab3499 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/list.md @@ -0,0 +1,3 @@ +appwrite tablesDb list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..c3a2994f93 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb updateBooleanColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default false \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..301d5d2768 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb updateDatetimeColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..d9fb44912e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-email-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb updateEmailColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default email@example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..f5879d1f3a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-enum-column.md @@ -0,0 +1,8 @@ +appwrite tablesDb updateEnumColumn \ + --databaseId \ + --tableId \ + --key '' \ + --elements one two three \ + --required false \ + --default \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..9c6de6f14d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-float-column.md @@ -0,0 +1,9 @@ +appwrite tablesDb updateFloatColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..cf0d04e940 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-integer-column.md @@ -0,0 +1,9 @@ +appwrite tablesDb updateIntegerColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..81f5f93b6b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-ip-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb updateIpColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..e079f772a2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,6 @@ +appwrite tablesDb updateRelationshipColumn \ + --databaseId \ + --tableId \ + --key '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-row.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..891d91cafe --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-row.md @@ -0,0 +1,6 @@ +appwrite tablesDb updateRow \ + --databaseId \ + --tableId \ + --rowId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..993c7a3380 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-rows.md @@ -0,0 +1,5 @@ +appwrite tablesDb updateRows \ + --databaseId \ + --tableId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..0d1d6dee7a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-string-column.md @@ -0,0 +1,8 @@ +appwrite tablesDb updateStringColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-table.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-table.md new file mode 100644 index 0000000000..81eced6439 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-table.md @@ -0,0 +1,7 @@ +appwrite tablesDb updateTable \ + --databaseId \ + --tableId \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..07be8e8717 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update-url-column.md @@ -0,0 +1,7 @@ +appwrite tablesDb updateUrlColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default https://example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/update.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/update.md new file mode 100644 index 0000000000..5b1d733353 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/update.md @@ -0,0 +1,4 @@ +appwrite tablesDb update \ + --databaseId \ + --name \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..c3a2633d4e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/upsert-row.md @@ -0,0 +1,6 @@ +appwrite tablesDb upsertRow \ + --databaseId \ + --tableId \ + --rowId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/console-cli/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..42693ac519 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tablesdb/upsert-rows.md @@ -0,0 +1,4 @@ +appwrite tablesDb upsertRows \ + --databaseId \ + --tableId \ + --rows one two three diff --git a/docs/examples/1.8.x/console-web/examples/account/create-email-password-session.md b/docs/examples/1.8.x/console-web/examples/account/create-email-password-session.md index 36a503164b..d8766a4da9 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create-email-password-session.md +++ b/docs/examples/1.8.x/console-web/examples/account/create-email-password-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createEmailPasswordSession( - 'email@example.com', // email - 'password' // password -); +const result = await account.createEmailPasswordSession({ + email: 'email@example.com', + password: 'password' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-email-token.md b/docs/examples/1.8.x/console-web/examples/account/create-email-token.md index 9517000af3..0865401940 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create-email-token.md +++ b/docs/examples/1.8.x/console-web/examples/account/create-email-token.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.createEmailToken( - '', // userId - 'email@example.com', // email - false // phrase (optional) -); +const result = await account.createEmailToken({ + userId: '', + email: 'email@example.com', + phrase: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/console-web/examples/account/create-magic-u-r-l-token.md index 6b1891855e..62f53179d9 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.8.x/console-web/examples/account/create-magic-u-r-l-token.md @@ -6,11 +6,11 @@ const client = new Client() const account = new Account(client); -const result = await account.createMagicURLToken( - '', // userId - 'email@example.com', // email - 'https://example.com', // url (optional) - false // phrase (optional) -); +const result = await account.createMagicURLToken({ + userId: '', + email: 'email@example.com', + url: 'https://example.com', + phrase: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/console-web/examples/account/create-mfa-authenticator.md index 923eb1ee3c..e486c81c64 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.8.x/console-web/examples/account/create-mfa-authenticator.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaAuthenticator( - AuthenticatorType.Totp // type -); +const result = await account.createMfaAuthenticator({ + type: AuthenticatorType.Totp +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/console-web/examples/account/create-mfa-challenge.md index fd6af6ec19..ac03507ad3 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.8.x/console-web/examples/account/create-mfa-challenge.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createMfaChallenge( - AuthenticationFactor.Email // factor -); +const result = await account.createMfaChallenge({ + factor: AuthenticationFactor.Email +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/console-web/examples/account/create-o-auth2session.md index a11bd9880b..572a10c1a8 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create-o-auth2session.md +++ b/docs/examples/1.8.x/console-web/examples/account/create-o-auth2session.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Session( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +account.createOAuth2Session({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', + failure: 'https://example.com', + scopes: [] +}); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/console-web/examples/account/create-o-auth2token.md index 9eb7cfab67..520d62c78f 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create-o-auth2token.md +++ b/docs/examples/1.8.x/console-web/examples/account/create-o-auth2token.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Token( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +account.createOAuth2Token({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', + failure: 'https://example.com', + scopes: [] +}); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-phone-token.md b/docs/examples/1.8.x/console-web/examples/account/create-phone-token.md index 25216ca73c..192a83f6ad 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create-phone-token.md +++ b/docs/examples/1.8.x/console-web/examples/account/create-phone-token.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createPhoneToken( - '', // userId - '+12065550100' // phone -); +const result = await account.createPhoneToken({ + userId: '', + phone: '+12065550100' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-push-target.md b/docs/examples/1.8.x/console-web/examples/account/create-push-target.md index ee35566f8a..99a9e728f9 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create-push-target.md +++ b/docs/examples/1.8.x/console-web/examples/account/create-push-target.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.createPushTarget( - '', // targetId - '', // identifier - '' // providerId (optional) -); +const result = await account.createPushTarget({ + targetId: '', + identifier: '', + providerId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-recovery.md b/docs/examples/1.8.x/console-web/examples/account/create-recovery.md index c2bb4422fa..e7699db34a 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create-recovery.md +++ b/docs/examples/1.8.x/console-web/examples/account/create-recovery.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createRecovery( - 'email@example.com', // email - 'https://example.com' // url -); +const result = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-session.md b/docs/examples/1.8.x/console-web/examples/account/create-session.md index 1c8d8a4480..74e8917612 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create-session.md +++ b/docs/examples/1.8.x/console-web/examples/account/create-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.createSession( - '', // userId - '' // secret -); +const result = await account.createSession({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-verification.md b/docs/examples/1.8.x/console-web/examples/account/create-verification.md index f6eacdce1f..bc873b5263 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create-verification.md +++ b/docs/examples/1.8.x/console-web/examples/account/create-verification.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.createVerification( - 'https://example.com' // url -); +const result = await account.createVerification({ + url: 'https://example.com' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create.md b/docs/examples/1.8.x/console-web/examples/account/create.md index d220aed8d0..c59d11e941 100644 --- a/docs/examples/1.8.x/console-web/examples/account/create.md +++ b/docs/examples/1.8.x/console-web/examples/account/create.md @@ -6,11 +6,11 @@ const client = new Client() const account = new Account(client); -const result = await account.create( - '', // userId - 'email@example.com', // email - '', // password - '' // name (optional) -); +const result = await account.create({ + userId: '', + email: 'email@example.com', + password: '', + name: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-identity.md b/docs/examples/1.8.x/console-web/examples/account/delete-identity.md index 6808b32a1d..c5bcd94525 100644 --- a/docs/examples/1.8.x/console-web/examples/account/delete-identity.md +++ b/docs/examples/1.8.x/console-web/examples/account/delete-identity.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteIdentity( - '' // identityId -); +const result = await account.deleteIdentity({ + identityId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/console-web/examples/account/delete-mfa-authenticator.md index 54610a810c..83d9bd8ee4 100644 --- a/docs/examples/1.8.x/console-web/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/console-web/examples/account/delete-mfa-authenticator.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteMfaAuthenticator( - AuthenticatorType.Totp // type -); +const result = await account.deleteMfaAuthenticator({ + type: AuthenticatorType.Totp +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-push-target.md b/docs/examples/1.8.x/console-web/examples/account/delete-push-target.md index f530b64dad..546813a3f6 100644 --- a/docs/examples/1.8.x/console-web/examples/account/delete-push-target.md +++ b/docs/examples/1.8.x/console-web/examples/account/delete-push-target.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deletePushTarget( - '' // targetId -); +const result = await account.deletePushTarget({ + targetId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-session.md b/docs/examples/1.8.x/console-web/examples/account/delete-session.md index 4eba0515e4..83bc337294 100644 --- a/docs/examples/1.8.x/console-web/examples/account/delete-session.md +++ b/docs/examples/1.8.x/console-web/examples/account/delete-session.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteSession( - '' // sessionId -); +const result = await account.deleteSession({ + sessionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/get-session.md b/docs/examples/1.8.x/console-web/examples/account/get-session.md index d5da237783..803966f165 100644 --- a/docs/examples/1.8.x/console-web/examples/account/get-session.md +++ b/docs/examples/1.8.x/console-web/examples/account/get-session.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.getSession( - '' // sessionId -); +const result = await account.getSession({ + sessionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/list-identities.md b/docs/examples/1.8.x/console-web/examples/account/list-identities.md index 675e902c9f..1e4973e74c 100644 --- a/docs/examples/1.8.x/console-web/examples/account/list-identities.md +++ b/docs/examples/1.8.x/console-web/examples/account/list-identities.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listIdentities( - [] // queries (optional) -); +const result = await account.listIdentities({ + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/list-logs.md b/docs/examples/1.8.x/console-web/examples/account/list-logs.md index 72a0ee12dd..4a77f80917 100644 --- a/docs/examples/1.8.x/console-web/examples/account/list-logs.md +++ b/docs/examples/1.8.x/console-web/examples/account/list-logs.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.listLogs( - [] // queries (optional) -); +const result = await account.listLogs({ + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-email.md b/docs/examples/1.8.x/console-web/examples/account/update-email.md index df1c7f480a..f6631646aa 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-email.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-email.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateEmail( - 'email@example.com', // email - 'password' // password -); +const result = await account.updateEmail({ + email: 'email@example.com', + password: 'password' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-m-f-a.md b/docs/examples/1.8.x/console-web/examples/account/update-m-f-a.md index b813b60bb4..f62374c57e 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-m-f-a.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-m-f-a.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMFA( - false // mfa -); +const result = await account.updateMFA({ + mfa: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/console-web/examples/account/update-magic-u-r-l-session.md index e0ecd66740..7c58ca4db9 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-magic-u-r-l-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMagicURLSession( - '', // userId - '' // secret -); +const result = await account.updateMagicURLSession({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/console-web/examples/account/update-mfa-authenticator.md index b960675914..6f14f1b0aa 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-mfa-authenticator.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaAuthenticator( - AuthenticatorType.Totp, // type - '' // otp -); +const result = await account.updateMfaAuthenticator({ + type: AuthenticatorType.Totp, + otp: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/console-web/examples/account/update-mfa-challenge.md index 5314959f25..cd7afb62b7 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-mfa-challenge.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateMfaChallenge( - '', // challengeId - '' // otp -); +const result = await account.updateMfaChallenge({ + challengeId: '', + otp: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-name.md b/docs/examples/1.8.x/console-web/examples/account/update-name.md index cd36ece113..c370197036 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-name.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-name.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateName( - '' // name -); +const result = await account.updateName({ + name: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-password.md b/docs/examples/1.8.x/console-web/examples/account/update-password.md index 863c5f28b3..0883a56c39 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-password.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-password.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePassword( - '', // password - 'password' // oldPassword (optional) -); +const result = await account.updatePassword({ + password: '', + oldPassword: 'password' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-phone-session.md b/docs/examples/1.8.x/console-web/examples/account/update-phone-session.md index d23c10bbda..8be5b8e43d 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-phone-session.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-phone-session.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhoneSession( - '', // userId - '' // secret -); +const result = await account.updatePhoneSession({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-phone-verification.md b/docs/examples/1.8.x/console-web/examples/account/update-phone-verification.md index 1a05386a9d..0b1b91374f 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-phone-verification.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-phone-verification.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhoneVerification( - '', // userId - '' // secret -); +const result = await account.updatePhoneVerification({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-phone.md b/docs/examples/1.8.x/console-web/examples/account/update-phone.md index 380279d057..19bfd15360 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-phone.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-phone.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePhone( - '+12065550100', // phone - 'password' // password -); +const result = await account.updatePhone({ + phone: '+12065550100', + password: 'password' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-prefs.md b/docs/examples/1.8.x/console-web/examples/account/update-prefs.md index 13d857468d..6f80801e52 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-prefs.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-prefs.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePrefs( - {} // prefs -); +const result = await account.updatePrefs({ + prefs: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-push-target.md b/docs/examples/1.8.x/console-web/examples/account/update-push-target.md index 566d754db7..b9c52b872c 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-push-target.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-push-target.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updatePushTarget( - '', // targetId - '' // identifier -); +const result = await account.updatePushTarget({ + targetId: '', + identifier: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-recovery.md b/docs/examples/1.8.x/console-web/examples/account/update-recovery.md index 53d75f95d2..17fe29b7b3 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-recovery.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-recovery.md @@ -6,10 +6,10 @@ const client = new Client() const account = new Account(client); -const result = await account.updateRecovery( - '', // userId - '', // secret - '' // password -); +const result = await account.updateRecovery({ + userId: '', + secret: '', + password: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-session.md b/docs/examples/1.8.x/console-web/examples/account/update-session.md index 207fc026d8..3f331b1064 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-session.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-session.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const result = await account.updateSession( - '' // sessionId -); +const result = await account.updateSession({ + sessionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-verification.md b/docs/examples/1.8.x/console-web/examples/account/update-verification.md index 4861ca2b81..8d254c1014 100644 --- a/docs/examples/1.8.x/console-web/examples/account/update-verification.md +++ b/docs/examples/1.8.x/console-web/examples/account/update-verification.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const result = await account.updateVerification( - '', // userId - '' // secret -); +const result = await account.updateVerification({ + userId: '', + secret: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/assistant/chat.md b/docs/examples/1.8.x/console-web/examples/assistant/chat.md index 98032043a5..868e3edbe4 100644 --- a/docs/examples/1.8.x/console-web/examples/assistant/chat.md +++ b/docs/examples/1.8.x/console-web/examples/assistant/chat.md @@ -6,8 +6,8 @@ const client = new Client() const assistant = new Assistant(client); -const result = await assistant.chat( - '' // prompt -); +const result = await assistant.chat({ + prompt: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-browser.md b/docs/examples/1.8.x/console-web/examples/avatars/get-browser.md index 65e7c826ff..19b5d3bae2 100644 --- a/docs/examples/1.8.x/console-web/examples/avatars/get-browser.md +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-browser.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getBrowser( - Browser.AvantBrowser, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getBrowser({ + code: Browser.AvantBrowser, + width: 0, + height: 0, + quality: -1 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/console-web/examples/avatars/get-credit-card.md index bda5407b27..00112b48dd 100644 --- a/docs/examples/1.8.x/console-web/examples/avatars/get-credit-card.md +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-credit-card.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getCreditCard( - CreditCard.AmericanExpress, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getCreditCard({ + code: CreditCard.AmericanExpress, + width: 0, + height: 0, + quality: -1 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-favicon.md b/docs/examples/1.8.x/console-web/examples/avatars/get-favicon.md index b23e99a551..40daf096e7 100644 --- a/docs/examples/1.8.x/console-web/examples/avatars/get-favicon.md +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-favicon.md @@ -6,8 +6,8 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFavicon( - 'https://example.com' // url -); +const result = avatars.getFavicon({ + url: 'https://example.com' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-flag.md b/docs/examples/1.8.x/console-web/examples/avatars/get-flag.md index f6c0814abd..49a41283b7 100644 --- a/docs/examples/1.8.x/console-web/examples/avatars/get-flag.md +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-flag.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFlag( - Flag.Afghanistan, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getFlag({ + code: Flag.Afghanistan, + width: 0, + height: 0, + quality: -1 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-image.md b/docs/examples/1.8.x/console-web/examples/avatars/get-image.md index 209e1ea836..5f69d73894 100644 --- a/docs/examples/1.8.x/console-web/examples/avatars/get-image.md +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-image.md @@ -6,10 +6,10 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getImage( - 'https://example.com', // url - 0, // width (optional) - 0 // height (optional) -); +const result = avatars.getImage({ + url: 'https://example.com', + width: 0, + height: 0 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-initials.md b/docs/examples/1.8.x/console-web/examples/avatars/get-initials.md index 6ec70b2143..fc60ef13fc 100644 --- a/docs/examples/1.8.x/console-web/examples/avatars/get-initials.md +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-initials.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getInitials( - '', // name (optional) - 0, // width (optional) - 0, // height (optional) - '' // background (optional) -); +const result = avatars.getInitials({ + name: '', + width: 0, + height: 0, + background: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-q-r.md b/docs/examples/1.8.x/console-web/examples/avatars/get-q-r.md index a255cdc531..a4a2a5d3a0 100644 --- a/docs/examples/1.8.x/console-web/examples/avatars/get-q-r.md +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-q-r.md @@ -6,11 +6,11 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getQR( - '', // text - 1, // size (optional) - 0, // margin (optional) - false // download (optional) -); +const result = avatars.getQR({ + text: '', + size: 1, + margin: 0, + download: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/console/get-resource.md b/docs/examples/1.8.x/console-web/examples/console/get-resource.md index 94a4707081..eb687a827e 100644 --- a/docs/examples/1.8.x/console-web/examples/console/get-resource.md +++ b/docs/examples/1.8.x/console-web/examples/console/get-resource.md @@ -6,9 +6,9 @@ const client = new Client() const console = new Console(client); -const result = await console.getResource( - '', // value - ConsoleResourceType.Rules // type -); +const result = await console.getResource({ + value: '', + type: ConsoleResourceType.Rules +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-boolean-attribute.md index 5b161c6f51..629d2b4a0f 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-boolean-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-boolean-attribute.md @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createBooleanAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); +const result = await databases.createBooleanAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: false, + array: false +}); console.log(result); 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 cd28cf8616..b1d461e835 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createCollection( - '', // databaseId - '', // collectionId - '', // name - ["read("any")"], // permissions (optional) - false, // documentSecurity (optional) - false // enabled (optional) -); +const result = await databases.createCollection({ + databaseId: '', + collectionId: '', + name: '', + permissions: ["read("any")"], + documentSecurity: false, + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-datetime-attribute.md index c431105bdf..dc828b8489 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-datetime-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-datetime-attribute.md @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createDatetimeAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); +const result = await databases.createDatetimeAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: '', + array: false +}); console.log(result); 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 1b96d07899..0d8cacce3a 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-documents.md b/docs/examples/1.8.x/console-web/examples/databases/create-documents.md index 09f3007208..901133ac0a 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-documents.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createDocuments( - '', // databaseId - '', // collectionId - [] // documents -); +const result = await databases.createDocuments({ + databaseId: '', + collectionId: '', + documents: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-email-attribute.md index f11c1a9649..b986671d66 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-email-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-email-attribute.md @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createEmailAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); +const result = await databases.createEmailAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: 'email@example.com', + array: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-enum-attribute.md index d180b1b9f2..53b5485ec9 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-enum-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-enum-attribute.md @@ -6,14 +6,14 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createEnumAttribute( - '', // databaseId - '', // collectionId - '', // key - [], // elements - false, // required - '', // default (optional) - false // array (optional) -); +const result = await databases.createEnumAttribute({ + databaseId: '', + collectionId: '', + key: '', + elements: [], + required: false, + default: '', + array: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-float-attribute.md index 036d3fc201..c2b629ed7e 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-float-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-float-attribute.md @@ -6,15 +6,15 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createFloatAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); +const result = await databases.createFloatAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + min: null, + max: null, + default: null, + array: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-index.md b/docs/examples/1.8.x/console-web/examples/databases/create-index.md index 6a35f55349..f1d462d3d0 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-index.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-index.md @@ -6,14 +6,14 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createIndex( - '', // databaseId - '', // collectionId - '', // key - IndexType.Key, // type - [], // attributes - [], // orders (optional) - [] // lengths (optional) -); +const result = await databases.createIndex({ + databaseId: '', + collectionId: '', + key: '', + type: IndexType.Key, + attributes: [], + orders: [], + lengths: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-integer-attribute.md index 25f474d0aa..cbe49fc401 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-integer-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-integer-attribute.md @@ -6,15 +6,15 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createIntegerAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); +const result = await databases.createIntegerAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + min: null, + max: null, + default: null, + array: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-ip-attribute.md index e8abc80f91..ac32fda135 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-ip-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-ip-attribute.md @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createIpAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); +const result = await databases.createIpAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: '', + array: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-relationship-attribute.md index 358a2df5fc..4dc2b11e56 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-relationship-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-relationship-attribute.md @@ -6,15 +6,15 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createRelationshipAttribute( - '', // databaseId - '', // collectionId - '', // relatedCollectionId - RelationshipType.OneToOne, // type - false, // twoWay (optional) - '', // key (optional) - '', // twoWayKey (optional) - RelationMutate.Cascade // onDelete (optional) -); +const result = await databases.createRelationshipAttribute({ + databaseId: '', + collectionId: '', + relatedCollectionId: '', + type: RelationshipType.OneToOne, + twoWay: false, + key: '', + twoWayKey: '', + onDelete: RelationMutate.Cascade +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-string-attribute.md index ba94b0348b..9bf1c9ea27 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-string-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-string-attribute.md @@ -6,15 +6,15 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createStringAttribute( - '', // databaseId - '', // collectionId - '', // key - 1, // size - false, // required - '', // default (optional) - false, // array (optional) - false // encrypt (optional) -); +const result = await databases.createStringAttribute({ + databaseId: '', + collectionId: '', + key: '', + size: 1, + required: false, + default: '', + array: false, + encrypt: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-url-attribute.md index da80e392d3..524a14fa72 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-url-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-url-attribute.md @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.createUrlAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); +const result = await databases.createUrlAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: 'https://example.com', + array: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create.md b/docs/examples/1.8.x/console-web/examples/databases/create.md index 6d709ddd56..d63cc80b0c 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.create( - '', // databaseId - '', // name - false // enabled (optional) -); +const result = await databases.create({ + databaseId: '', + name: '', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/decrement-document-attribute.md index f090f53b49..e19f56c3b0 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/decrement-document-attribute.md @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.decrementDocumentAttribute( - '', // databaseId - '', // collectionId - '', // documentId - '', // attribute - null, // value (optional) - null // min (optional) -); +const result = await databases.decrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, + min: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/delete-attribute.md index df12b0d2f0..6370b447c5 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/delete-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-attribute.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteAttribute( - '', // databaseId - '', // collectionId - '' // key -); +const result = await databases.deleteAttribute({ + databaseId: '', + collectionId: '', + key: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-collection.md b/docs/examples/1.8.x/console-web/examples/databases/delete-collection.md index f490ae1096..ec9e8e3455 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/delete-collection.md +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-collection.md @@ -6,9 +6,9 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteCollection( - '', // databaseId - '' // collectionId -); +const result = await databases.deleteCollection({ + databaseId: '', + collectionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-document.md b/docs/examples/1.8.x/console-web/examples/databases/delete-document.md index a56a4f23c5..11cf317147 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/delete-document.md +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-document.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteDocument( - '', // databaseId - '', // collectionId - '' // documentId -); +const result = await databases.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-documents.md b/docs/examples/1.8.x/console-web/examples/databases/delete-documents.md index ec520c6cf9..0946e2fe63 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/delete-documents.md +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-documents.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteDocuments( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +const result = await databases.deleteDocuments({ + databaseId: '', + collectionId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-index.md b/docs/examples/1.8.x/console-web/examples/databases/delete-index.md index cdd96a31f0..47e88ab3e9 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/delete-index.md +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-index.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.deleteIndex( - '', // databaseId - '', // collectionId - '' // key -); +const result = await databases.deleteIndex({ + databaseId: '', + collectionId: '', + key: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete.md b/docs/examples/1.8.x/console-web/examples/databases/delete.md index 3bd69657f9..4edf39c5d5 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/delete.md +++ b/docs/examples/1.8.x/console-web/examples/databases/delete.md @@ -6,8 +6,8 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.delete( - '' // databaseId -); +const result = await databases.delete({ + databaseId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/get-attribute.md index 9dac2ad133..ba5c561a92 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/get-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/get-attribute.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getAttribute( - '', // databaseId - '', // collectionId - '' // key -); +const result = await databases.getAttribute({ + databaseId: '', + collectionId: '', + key: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-collection-usage.md b/docs/examples/1.8.x/console-web/examples/databases/get-collection-usage.md index a2f736377a..2408d606e2 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/get-collection-usage.md +++ b/docs/examples/1.8.x/console-web/examples/databases/get-collection-usage.md @@ -1,4 +1,4 @@ -import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; +import { Client, Databases, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getCollectionUsage( - '', // databaseId - '', // collectionId - DatabaseUsageRange.TwentyFourHours // range (optional) -); +const result = await databases.getCollectionUsage({ + databaseId: '', + collectionId: '', + range: UsageRange.TwentyFourHours +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-collection.md b/docs/examples/1.8.x/console-web/examples/databases/get-collection.md index 56d29f05cb..4e31e9e7b1 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/get-collection.md +++ b/docs/examples/1.8.x/console-web/examples/databases/get-collection.md @@ -6,9 +6,9 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getCollection( - '', // databaseId - '' // collectionId -); +const result = await databases.getCollection({ + databaseId: '', + collectionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-document.md b/docs/examples/1.8.x/console-web/examples/databases/get-document.md index 0e90cf785e..4dcdbef3cd 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/get-document.md +++ b/docs/examples/1.8.x/console-web/examples/databases/get-document.md @@ -6,11 +6,11 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getDocument( - '', // databaseId - '', // collectionId - '', // documentId - [] // queries (optional) -); +const result = await databases.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-index.md b/docs/examples/1.8.x/console-web/examples/databases/get-index.md index 4c8c3794af..73f61b8766 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/get-index.md +++ b/docs/examples/1.8.x/console-web/examples/databases/get-index.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getIndex( - '', // databaseId - '', // collectionId - '' // key -); +const result = await databases.getIndex({ + databaseId: '', + collectionId: '', + key: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-usage.md b/docs/examples/1.8.x/console-web/examples/databases/get-usage.md index a0dd3ce983..b520099a31 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/get-usage.md +++ b/docs/examples/1.8.x/console-web/examples/databases/get-usage.md @@ -1,4 +1,4 @@ -import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; +import { Client, Databases, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,8 +6,9 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.getUsage( - DatabaseUsageRange.TwentyFourHours // range (optional) -); +const result = await databases.getUsage({ + databaseId: '', + range: UsageRange.TwentyFourHours +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get.md b/docs/examples/1.8.x/console-web/examples/databases/get.md index 5c72c5639c..a1c4573962 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/get.md +++ b/docs/examples/1.8.x/console-web/examples/databases/get.md @@ -6,8 +6,8 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.get( - '' // databaseId -); +const result = await databases.get({ + databaseId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/increment-document-attribute.md index 62ebd6fe3c..f3504f4afa 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/increment-document-attribute.md @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.incrementDocumentAttribute( - '', // databaseId - '', // collectionId - '', // documentId - '', // attribute - null, // value (optional) - null // max (optional) -); +const result = await databases.incrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, + max: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-attributes.md b/docs/examples/1.8.x/console-web/examples/databases/list-attributes.md index 0c2cd4092c..0cf05c27f3 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/list-attributes.md +++ b/docs/examples/1.8.x/console-web/examples/databases/list-attributes.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listAttributes( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +const result = await databases.listAttributes({ + databaseId: '', + collectionId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-collection-logs.md b/docs/examples/1.8.x/console-web/examples/databases/list-collection-logs.md index b2ef92d677..1374a31d1a 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/list-collection-logs.md +++ b/docs/examples/1.8.x/console-web/examples/databases/list-collection-logs.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listCollectionLogs( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +const result = await databases.listCollectionLogs({ + databaseId: '', + collectionId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-collections.md b/docs/examples/1.8.x/console-web/examples/databases/list-collections.md index f9a0511e3e..b08d713e69 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/list-collections.md +++ b/docs/examples/1.8.x/console-web/examples/databases/list-collections.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listCollections( - '', // databaseId - [], // queries (optional) - '' // search (optional) -); +const result = await databases.listCollections({ + databaseId: '', + queries: [], + search: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-document-logs.md b/docs/examples/1.8.x/console-web/examples/databases/list-document-logs.md index ddb789b3f0..fea932d43f 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/list-document-logs.md +++ b/docs/examples/1.8.x/console-web/examples/databases/list-document-logs.md @@ -6,11 +6,11 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listDocumentLogs( - '', // databaseId - '', // collectionId - '', // documentId - [] // queries (optional) -); +const result = await databases.listDocumentLogs({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-documents.md b/docs/examples/1.8.x/console-web/examples/databases/list-documents.md index 3a77c05faa..8546487b1a 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/list-documents.md +++ b/docs/examples/1.8.x/console-web/examples/databases/list-documents.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listDocuments( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +const result = await databases.listDocuments({ + databaseId: '', + collectionId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-indexes.md b/docs/examples/1.8.x/console-web/examples/databases/list-indexes.md index fbbef1a9d8..f2c4173a86 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/list-indexes.md +++ b/docs/examples/1.8.x/console-web/examples/databases/list-indexes.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listIndexes( - '', // databaseId - '', // collectionId - [] // queries (optional) -); +const result = await databases.listIndexes({ + databaseId: '', + collectionId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-logs.md b/docs/examples/1.8.x/console-web/examples/databases/list-logs.md index 12ccccf87e..a6e6bcab68 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/list-logs.md +++ b/docs/examples/1.8.x/console-web/examples/databases/list-logs.md @@ -6,9 +6,9 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listLogs( - '', // databaseId - [] // queries (optional) -); +const result = await databases.listLogs({ + databaseId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-usage.md b/docs/examples/1.8.x/console-web/examples/databases/list-usage.md index 1be9949a84..1bf48e4a67 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/list-usage.md +++ b/docs/examples/1.8.x/console-web/examples/databases/list-usage.md @@ -1,4 +1,4 @@ -import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; +import { Client, Databases, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,8 +6,8 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.listUsage( - DatabaseUsageRange.TwentyFourHours // range (optional) -); +const result = await databases.listUsage({ + range: UsageRange.TwentyFourHours +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list.md b/docs/examples/1.8.x/console-web/examples/databases/list.md index 58ec7209a3..57fa2a0cf6 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/list.md +++ b/docs/examples/1.8.x/console-web/examples/databases/list.md @@ -6,9 +6,9 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.list( - [], // queries (optional) - '' // search (optional) -); +const result = await databases.list({ + queries: [], + search: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-boolean-attribute.md index 95207fd2ab..e06898c491 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-boolean-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-boolean-attribute.md @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateBooleanAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - false, // default - '' // newKey (optional) -); +const result = await databases.updateBooleanAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: false, + newKey: '' +}); console.log(result); 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 ced992baf4..36064a8b68 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 @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateCollection( - '', // databaseId - '', // collectionId - '', // name - ["read("any")"], // permissions (optional) - false, // documentSecurity (optional) - false // enabled (optional) -); +const result = await databases.updateCollection({ + databaseId: '', + collectionId: '', + name: '', + permissions: ["read("any")"], + documentSecurity: false, + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-datetime-attribute.md index 7c413ee532..ba772e538e 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-datetime-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-datetime-attribute.md @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateDatetimeAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - '', // default - '' // newKey (optional) -); +const result = await databases.updateDatetimeAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: '', + newKey: '' +}); console.log(result); 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 85898ea2a7..eadafaba78 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); +const result = await databases.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-documents.md b/docs/examples/1.8.x/console-web/examples/databases/update-documents.md index 67be1e405c..182aff236f 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-documents.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-documents.md @@ -6,11 +6,11 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateDocuments( - '', // databaseId - '', // collectionId - {}, // data (optional) - [] // queries (optional) -); +const result = await databases.updateDocuments({ + databaseId: '', + collectionId: '', + data: {}, + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-email-attribute.md index e54dba99bd..02ea7a0235 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-email-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-email-attribute.md @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateEmailAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); +const result = await databases.updateEmailAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: 'email@example.com', + newKey: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-enum-attribute.md index aa5330af04..324fd620d6 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-enum-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-enum-attribute.md @@ -6,14 +6,14 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateEnumAttribute( - '', // databaseId - '', // collectionId - '', // key - [], // elements - false, // required - '', // default - '' // newKey (optional) -); +const result = await databases.updateEnumAttribute({ + databaseId: '', + collectionId: '', + key: '', + elements: [], + required: false, + default: '', + newKey: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-float-attribute.md index 344ddb8815..9c2fc80025 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-float-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-float-attribute.md @@ -6,15 +6,15 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateFloatAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); +const result = await databases.updateFloatAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: null, + min: null, + max: null, + newKey: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-integer-attribute.md index 72565bd5f4..0c4bc6d1cc 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-integer-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-integer-attribute.md @@ -6,15 +6,15 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateIntegerAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); +const result = await databases.updateIntegerAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: null, + min: null, + max: null, + newKey: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-ip-attribute.md index ff6dded552..a9cda70bfa 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-ip-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-ip-attribute.md @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateIpAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - '', // default - '' // newKey (optional) -); +const result = await databases.updateIpAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: '', + newKey: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-relationship-attribute.md index acce3fd741..8cca3001f2 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-relationship-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-relationship-attribute.md @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateRelationshipAttribute( - '', // databaseId - '', // collectionId - '', // key - RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); +const result = await databases.updateRelationshipAttribute({ + databaseId: '', + collectionId: '', + key: '', + onDelete: RelationMutate.Cascade, + newKey: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-string-attribute.md index 05601bd4a2..2837cb152a 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-string-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-string-attribute.md @@ -6,14 +6,14 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateStringAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - '', // default - 1, // size (optional) - '' // newKey (optional) -); +const result = await databases.updateStringAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: '', + size: 1, + newKey: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-url-attribute.md index 78b4d92a28..e5d16c430f 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update-url-attribute.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update-url-attribute.md @@ -6,13 +6,13 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.updateUrlAttribute( - '', // databaseId - '', // collectionId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); +const result = await databases.updateUrlAttribute({ + databaseId: '', + collectionId: '', + key: '', + required: false, + default: 'https://example.com', + newKey: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update.md b/docs/examples/1.8.x/console-web/examples/databases/update.md index a29475b816..a3b67818de 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/update.md +++ b/docs/examples/1.8.x/console-web/examples/databases/update.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.update( - '', // databaseId - '', // name - false // enabled (optional) -); +const result = await databases.update({ + databaseId: '', + name: '', + enabled: false +}); console.log(result); 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 3b89ed3aef..aeea91d501 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 @@ -6,12 +6,12 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.upsertDocument( - '', // databaseId - '', // collectionId - '', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md b/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md index 2d12f7caec..b045516281 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md @@ -6,10 +6,10 @@ const client = new Client() const databases = new Databases(client); -const result = await databases.upsertDocuments( - '', // databaseId - '', // collectionId - [] // documents -); +const result = await databases.upsertDocuments({ + databaseId: '', + collectionId: '', + documents: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/create-deployment.md index 62309d5e98..8483cacbf5 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/create-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/functions/create-deployment.md @@ -6,12 +6,12 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createDeployment( - '', // functionId - document.getElementById('uploader').files[0], // code - false, // activate - '', // entrypoint (optional) - '' // commands (optional) -); +const result = await functions.createDeployment({ + functionId: '', + code: document.getElementById('uploader').files[0], + activate: false, + entrypoint: '', + commands: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/create-duplicate-deployment.md index 1b48c27a6f..09f12fe815 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/functions/create-duplicate-deployment.md @@ -6,10 +6,10 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createDuplicateDeployment( - '', // functionId - '', // deploymentId - '' // buildId (optional) -); +const result = await functions.createDuplicateDeployment({ + functionId: '', + deploymentId: '', + buildId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-execution.md b/docs/examples/1.8.x/console-web/examples/functions/create-execution.md index 1886a831f2..bc704e2f60 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/console-web/examples/functions/create-execution.md @@ -6,14 +6,14 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createExecution( - '', // functionId - '', // body (optional) - false, // async (optional) - '', // path (optional) - ExecutionMethod.GET, // method (optional) - {}, // headers (optional) - '' // scheduledAt (optional) -); +const result = await functions.createExecution({ + functionId: '', + body: '', + async: false, + path: '', + method: ExecutionMethod.GET, + headers: {}, + scheduledAt: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/create-template-deployment.md index 98bf957eb1..f667d84cda 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/create-template-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/functions/create-template-deployment.md @@ -6,13 +6,13 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createTemplateDeployment( - '', // functionId - '', // repository - '', // owner - '', // rootDirectory - '', // version - false // activate (optional) -); +const result = await functions.createTemplateDeployment({ + functionId: '', + repository: '', + owner: '', + rootDirectory: '', + version: '', + activate: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-variable.md b/docs/examples/1.8.x/console-web/examples/functions/create-variable.md index 0b562cb93d..812657338a 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/create-variable.md +++ b/docs/examples/1.8.x/console-web/examples/functions/create-variable.md @@ -6,11 +6,11 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createVariable( - '', // functionId - '', // key - '', // value - false // secret (optional) -); +const result = await functions.createVariable({ + functionId: '', + key: '', + value: '', + secret: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/create-vcs-deployment.md index 6a12653de4..e2506adc01 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/create-vcs-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/functions/create-vcs-deployment.md @@ -6,11 +6,11 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.createVcsDeployment( - '', // functionId - VCSDeploymentType.Branch, // type - '', // reference - false // activate (optional) -); +const result = await functions.createVcsDeployment({ + functionId: '', + type: VCSDeploymentType.Branch, + reference: '', + activate: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create.md b/docs/examples/1.8.x/console-web/examples/functions/create.md index 1d9915f978..87edc7a158 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/create.md +++ b/docs/examples/1.8.x/console-web/examples/functions/create.md @@ -6,25 +6,25 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.create( - '', // functionId - '', // name - .Node145, // runtime - ["any"], // execute (optional) - [], // events (optional) - '', // schedule (optional) - 1, // timeout (optional) - false, // enabled (optional) - false, // logging (optional) - '', // entrypoint (optional) - '', // commands (optional) - [], // scopes (optional) - '', // installationId (optional) - '', // providerRepositoryId (optional) - '', // providerBranch (optional) - false, // providerSilentMode (optional) - '', // providerRootDirectory (optional) - '' // specification (optional) -); +const result = await functions.create({ + functionId: '', + name: '', + runtime: .Node145, + execute: ["any"], + events: [], + schedule: '', + timeout: 1, + enabled: false, + logging: false, + entrypoint: '', + commands: '', + scopes: [], + installationId: '', + providerRepositoryId: '', + providerBranch: '', + providerSilentMode: false, + providerRootDirectory: '', + specification: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/delete-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/delete-deployment.md index 1bc26feab0..6558690f2f 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/delete-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/functions/delete-deployment.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.deleteDeployment( - '', // functionId - '' // deploymentId -); +const result = await functions.deleteDeployment({ + functionId: '', + deploymentId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/delete-execution.md b/docs/examples/1.8.x/console-web/examples/functions/delete-execution.md index 0816434637..2791eea9b6 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/delete-execution.md +++ b/docs/examples/1.8.x/console-web/examples/functions/delete-execution.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.deleteExecution( - '', // functionId - '' // executionId -); +const result = await functions.deleteExecution({ + functionId: '', + executionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/delete-variable.md b/docs/examples/1.8.x/console-web/examples/functions/delete-variable.md index 878d15d235..369cdd6cff 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/delete-variable.md +++ b/docs/examples/1.8.x/console-web/examples/functions/delete-variable.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.deleteVariable( - '', // functionId - '' // variableId -); +const result = await functions.deleteVariable({ + functionId: '', + variableId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/delete.md b/docs/examples/1.8.x/console-web/examples/functions/delete.md index 86d616d267..6cad721da9 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/delete.md +++ b/docs/examples/1.8.x/console-web/examples/functions/delete.md @@ -6,8 +6,8 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.delete( - '' // functionId -); +const result = await functions.delete({ + functionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/console-web/examples/functions/get-deployment-download.md index 1ad8fd30cd..d17777fb35 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/get-deployment-download.md +++ b/docs/examples/1.8.x/console-web/examples/functions/get-deployment-download.md @@ -6,10 +6,10 @@ const client = new Client() const functions = new Functions(client); -const result = functions.getDeploymentDownload( - '', // functionId - '', // deploymentId - DeploymentDownloadType.Source // type (optional) -); +const result = functions.getDeploymentDownload({ + functionId: '', + deploymentId: '', + type: DeploymentDownloadType.Source +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/get-deployment.md index 75cb11f741..483b3eb6a8 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/get-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/functions/get-deployment.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getDeployment( - '', // functionId - '' // deploymentId -); +const result = await functions.getDeployment({ + functionId: '', + deploymentId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-execution.md b/docs/examples/1.8.x/console-web/examples/functions/get-execution.md index 58ab917bbd..29a7357415 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/get-execution.md +++ b/docs/examples/1.8.x/console-web/examples/functions/get-execution.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getExecution( - '', // functionId - '' // executionId -); +const result = await functions.getExecution({ + functionId: '', + executionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-template.md b/docs/examples/1.8.x/console-web/examples/functions/get-template.md index 13c95210ab..031f9536d3 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/get-template.md +++ b/docs/examples/1.8.x/console-web/examples/functions/get-template.md @@ -6,8 +6,8 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getTemplate( - '' // templateId -); +const result = await functions.getTemplate({ + templateId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-usage.md b/docs/examples/1.8.x/console-web/examples/functions/get-usage.md index bc010c3bd9..7f1e4ad21a 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/get-usage.md +++ b/docs/examples/1.8.x/console-web/examples/functions/get-usage.md @@ -1,4 +1,4 @@ -import { Client, Functions, FunctionUsageRange } from "@appwrite.io/console"; +import { Client, Functions, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getUsage( - '', // functionId - FunctionUsageRange.TwentyFourHours // range (optional) -); +const result = await functions.getUsage({ + functionId: '', + range: UsageRange.TwentyFourHours +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-variable.md b/docs/examples/1.8.x/console-web/examples/functions/get-variable.md index d80b2bccbf..d813d1250c 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/get-variable.md +++ b/docs/examples/1.8.x/console-web/examples/functions/get-variable.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.getVariable( - '', // functionId - '' // variableId -); +const result = await functions.getVariable({ + functionId: '', + variableId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get.md b/docs/examples/1.8.x/console-web/examples/functions/get.md index 9b852849eb..4a5126b29e 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/get.md +++ b/docs/examples/1.8.x/console-web/examples/functions/get.md @@ -6,8 +6,8 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.get( - '' // functionId -); +const result = await functions.get({ + functionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-deployments.md b/docs/examples/1.8.x/console-web/examples/functions/list-deployments.md index b9f2ec0eaf..71d11afafd 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/list-deployments.md +++ b/docs/examples/1.8.x/console-web/examples/functions/list-deployments.md @@ -6,10 +6,10 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listDeployments( - '', // functionId - [], // queries (optional) - '' // search (optional) -); +const result = await functions.listDeployments({ + functionId: '', + queries: [], + search: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-executions.md b/docs/examples/1.8.x/console-web/examples/functions/list-executions.md index 7d8a6c7a98..9d8cb08417 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/list-executions.md +++ b/docs/examples/1.8.x/console-web/examples/functions/list-executions.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listExecutions( - '', // functionId - [] // queries (optional) -); +const result = await functions.listExecutions({ + functionId: '', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-templates.md b/docs/examples/1.8.x/console-web/examples/functions/list-templates.md index ab7f84b34d..8a6069eed1 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/list-templates.md +++ b/docs/examples/1.8.x/console-web/examples/functions/list-templates.md @@ -6,11 +6,11 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listTemplates( - [], // runtimes (optional) - [], // useCases (optional) - 1, // limit (optional) - 0 // offset (optional) -); +const result = await functions.listTemplates({ + runtimes: [], + useCases: [], + limit: 1, + offset: 0 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-usage.md b/docs/examples/1.8.x/console-web/examples/functions/list-usage.md index 14a880692b..ca250e956d 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/list-usage.md +++ b/docs/examples/1.8.x/console-web/examples/functions/list-usage.md @@ -1,4 +1,4 @@ -import { Client, Functions, FunctionUsageRange } from "@appwrite.io/console"; +import { Client, Functions, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,8 +6,8 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listUsage( - FunctionUsageRange.TwentyFourHours // range (optional) -); +const result = await functions.listUsage({ + range: UsageRange.TwentyFourHours +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-variables.md b/docs/examples/1.8.x/console-web/examples/functions/list-variables.md index 5651dbd1c5..c5fdc226d1 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/list-variables.md +++ b/docs/examples/1.8.x/console-web/examples/functions/list-variables.md @@ -6,8 +6,8 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listVariables( - '' // functionId -); +const result = await functions.listVariables({ + functionId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list.md b/docs/examples/1.8.x/console-web/examples/functions/list.md index 462214449d..381ec7ca0a 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/list.md +++ b/docs/examples/1.8.x/console-web/examples/functions/list.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.list( - [], // queries (optional) - '' // search (optional) -); +const result = await functions.list({ + queries: [], + search: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/console-web/examples/functions/update-deployment-status.md index ba4f37fabf..e9da320ef7 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/update-deployment-status.md +++ b/docs/examples/1.8.x/console-web/examples/functions/update-deployment-status.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.updateDeploymentStatus( - '', // functionId - '' // deploymentId -); +const result = await functions.updateDeploymentStatus({ + functionId: '', + deploymentId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/update-function-deployment.md index 2d714fb43c..c249a279cf 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/update-function-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/functions/update-function-deployment.md @@ -6,9 +6,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.updateFunctionDeployment( - '', // functionId - '' // deploymentId -); +const result = await functions.updateFunctionDeployment({ + functionId: '', + deploymentId: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/update-variable.md b/docs/examples/1.8.x/console-web/examples/functions/update-variable.md index a6be7c0dd2..b131a0edaa 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/update-variable.md +++ b/docs/examples/1.8.x/console-web/examples/functions/update-variable.md @@ -6,12 +6,12 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.updateVariable( - '', // functionId - '', // variableId - '', // key - '', // value (optional) - false // secret (optional) -); +const result = await functions.updateVariable({ + functionId: '', + variableId: '', + key: '', + value: '', + secret: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/update.md b/docs/examples/1.8.x/console-web/examples/functions/update.md index 66d3cd8e8f..cf7d3edbba 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/update.md +++ b/docs/examples/1.8.x/console-web/examples/functions/update.md @@ -6,25 +6,25 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.update( - '', // functionId - '', // name - .Node145, // runtime (optional) - ["any"], // execute (optional) - [], // events (optional) - '', // schedule (optional) - 1, // timeout (optional) - false, // enabled (optional) - false, // logging (optional) - '', // entrypoint (optional) - '', // commands (optional) - [], // scopes (optional) - '', // installationId (optional) - '', // providerRepositoryId (optional) - '', // providerBranch (optional) - false, // providerSilentMode (optional) - '', // providerRootDirectory (optional) - '' // specification (optional) -); +const result = await functions.update({ + functionId: '', + name: '', + runtime: .Node145, + execute: ["any"], + events: [], + schedule: '', + timeout: 1, + enabled: false, + logging: false, + entrypoint: '', + commands: '', + scopes: [], + installationId: '', + providerRepositoryId: '', + providerBranch: '', + providerSilentMode: false, + providerRootDirectory: '', + specification: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/graphql/mutation.md b/docs/examples/1.8.x/console-web/examples/graphql/mutation.md index 5360139b07..24c30e25a6 100644 --- a/docs/examples/1.8.x/console-web/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/console-web/examples/graphql/mutation.md @@ -6,8 +6,8 @@ const client = new Client() const graphql = new Graphql(client); -const result = await graphql.mutation( - {} // query -); +const result = await graphql.mutation({ + query: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/graphql/query.md b/docs/examples/1.8.x/console-web/examples/graphql/query.md index 15434872ab..f4b8ac9b3d 100644 --- a/docs/examples/1.8.x/console-web/examples/graphql/query.md +++ b/docs/examples/1.8.x/console-web/examples/graphql/query.md @@ -6,8 +6,8 @@ const client = new Client() const graphql = new Graphql(client); -const result = await graphql.query( - {} // query -); +const result = await graphql.query({ + query: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-certificate.md b/docs/examples/1.8.x/console-web/examples/health/get-certificate.md index 288c0f8732..8d1809e86f 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-certificate.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-certificate.md @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getCertificate( - '' // domain (optional) -); +const result = await health.getCertificate({ + domain: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/console-web/examples/health/get-failed-jobs.md index d96a5545aa..c0878890c6 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-failed-jobs.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-failed-jobs.md @@ -6,9 +6,9 @@ const client = new Client() const health = new Health(client); -const result = await health.getFailedJobs( - .V1Database, // name - null // threshold (optional) -); +const result = await health.getFailedJobs({ + name: .V1Database, + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-builds.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-builds.md index dfbbfd91a6..ea98ea4db4 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-queue-builds.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-builds.md @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueBuilds( - null // threshold (optional) -); +const result = await health.getQueueBuilds({ + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-certificates.md index b0397f4422..ce5bfde60f 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-queue-certificates.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-certificates.md @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueCertificates( - null // threshold (optional) -); +const result = await health.getQueueCertificates({ + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-databases.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-databases.md index 1b958a9c75..733db857d8 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-queue-databases.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-databases.md @@ -6,9 +6,9 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueDatabases( - '', // name (optional) - null // threshold (optional) -); +const result = await health.getQueueDatabases({ + name: '', + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-deletes.md index 3f34bc2228..f35e376fe7 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-queue-deletes.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-deletes.md @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueDeletes( - null // threshold (optional) -); +const result = await health.getQueueDeletes({ + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-functions.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-functions.md index 2ea3701462..2188218329 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-queue-functions.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-functions.md @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueFunctions( - null // threshold (optional) -); +const result = await health.getQueueFunctions({ + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-logs.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-logs.md index 73bd18589a..1defcad462 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-queue-logs.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-logs.md @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueLogs( - null // threshold (optional) -); +const result = await health.getQueueLogs({ + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-mails.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-mails.md index a6d86c04c7..31a25b899a 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-queue-mails.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-mails.md @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueMails( - null // threshold (optional) -); +const result = await health.getQueueMails({ + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-messaging.md index d25979713d..6ef8dd93e9 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-queue-messaging.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-messaging.md @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueMessaging( - null // threshold (optional) -); +const result = await health.getQueueMessaging({ + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-migrations.md index 3619c56028..783fe6ff15 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-queue-migrations.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-migrations.md @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueMigrations( - null // threshold (optional) -); +const result = await health.getQueueMigrations({ + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-stats-resources.md index cf1c3ee5df..9e3b35b543 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-queue-stats-resources.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-stats-resources.md @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueStatsResources( - null // threshold (optional) -); +const result = await health.getQueueStatsResources({ + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-usage.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-usage.md index f79fd3b5ad..b30238e6c9 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-queue-usage.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-usage.md @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueUsage( - null // threshold (optional) -); +const result = await health.getQueueUsage({ + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-webhooks.md index 72bcc44c9a..28a4bdf813 100644 --- a/docs/examples/1.8.x/console-web/examples/health/get-queue-webhooks.md +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-webhooks.md @@ -6,8 +6,8 @@ const client = new Client() const health = new Health(client); -const result = await health.getQueueWebhooks( - null // threshold (optional) -); +const result = await health.getQueueWebhooks({ + threshold: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-apns-provider.md index 9b238afc9e..77a53bc41f 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-apns-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-apns-provider.md @@ -6,15 +6,15 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createApnsProvider( - '', // providerId - '', // name - '', // authKey (optional) - '', // authKeyId (optional) - '', // teamId (optional) - '', // bundleId (optional) - false, // sandbox (optional) - false // enabled (optional) -); +const result = await messaging.createApnsProvider({ + providerId: '', + name: '', + authKey: '', + authKeyId: '', + teamId: '', + bundleId: '', + sandbox: false, + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-email.md b/docs/examples/1.8.x/console-web/examples/messaging/create-email.md index 108517c89d..0627d831a0 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-email.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-email.md @@ -6,19 +6,19 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createEmail( - '', // messageId - '', // subject - '', // content - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - [], // cc (optional) - [], // bcc (optional) - [], // attachments (optional) - false, // draft (optional) - false, // html (optional) - '' // scheduledAt (optional) -); +const result = await messaging.createEmail({ + messageId: '', + subject: '', + content: '', + topics: [], + users: [], + targets: [], + cc: [], + bcc: [], + attachments: [], + draft: false, + html: false, + scheduledAt: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-fcm-provider.md index 9d67e89fd6..edb95040d5 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-fcm-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-fcm-provider.md @@ -6,11 +6,11 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createFcmProvider( - '', // providerId - '', // name - {}, // serviceAccountJSON (optional) - false // enabled (optional) -); +const result = await messaging.createFcmProvider({ + providerId: '', + name: '', + serviceAccountJSON: {}, + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-mailgun-provider.md index dc165af859..1cc121edab 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-mailgun-provider.md @@ -6,17 +6,17 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createMailgunProvider( - '', // providerId - '', // name - '', // apiKey (optional) - '', // domain (optional) - false, // isEuRegion (optional) - '', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '', // replyToName (optional) - 'email@example.com', // replyToEmail (optional) - false // enabled (optional) -); +const result = await messaging.createMailgunProvider({ + providerId: '', + name: '', + apiKey: '', + domain: '', + isEuRegion: false, + fromName: '', + fromEmail: 'email@example.com', + replyToName: '', + replyToEmail: 'email@example.com', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md index cab468a089..37b26bd335 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md @@ -6,13 +6,13 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createMsg91Provider( - '', // providerId - '', // name - '', // templateId (optional) - '', // senderId (optional) - '', // authKey (optional) - false // enabled (optional) -); +const result = await messaging.createMsg91Provider({ + providerId: '', + name: '', + templateId: '', + senderId: '', + authKey: '', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-push.md b/docs/examples/1.8.x/console-web/examples/messaging/create-push.md index 79c3a20e83..2c386f7762 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-push.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-push.md @@ -6,26 +6,26 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createPush( - '', // messageId - '', // title (optional) - '<BODY>', // body (optional) - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - {}, // data (optional) - '<ACTION>', // action (optional) - '[ID1:ID2]', // image (optional) - '<ICON>', // icon (optional) - '<SOUND>', // sound (optional) - '<COLOR>', // color (optional) - '<TAG>', // tag (optional) - null, // badge (optional) - false, // draft (optional) - '', // scheduledAt (optional) - false, // contentAvailable (optional) - false, // critical (optional) - MessagePriority.Normal // priority (optional) -); +const result = await messaging.createPush({ + messageId: '<MESSAGE_ID>', + title: '<TITLE>', + body: '<BODY>', + topics: [], + users: [], + targets: [], + data: {}, + action: '<ACTION>', + image: '[ID1:ID2]', + icon: '<ICON>', + sound: '<SOUND>', + color: '<COLOR>', + tag: '<TAG>', + badge: null, + draft: false, + scheduledAt: '', + contentAvailable: false, + critical: false, + priority: MessagePriority.Normal +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-sendgrid-provider.md index b93c84b258..eb52bc3a43 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-sendgrid-provider.md @@ -6,15 +6,15 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createSendgridProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '<API_KEY>', // apiKey (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - 'email@example.com', // replyToEmail (optional) - false // enabled (optional) -); +const result = await messaging.createSendgridProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: 'email@example.com', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-sms.md b/docs/examples/1.8.x/console-web/examples/messaging/create-sms.md index 7146ee4ac9..5f2f65e1a8 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-sms.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-sms.md @@ -6,14 +6,14 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createSms( - '<MESSAGE_ID>', // messageId - '<CONTENT>', // content - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - false, // draft (optional) - '' // scheduledAt (optional) -); +const result = await messaging.createSms({ + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], + users: [], + targets: [], + draft: false, + scheduledAt: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-smtp-provider.md index b4bcf14d0b..29bd0c8da3 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-smtp-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-smtp-provider.md @@ -6,21 +6,21 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createSmtpProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '<HOST>', // host - 1, // port (optional) - '<USERNAME>', // username (optional) - '<PASSWORD>', // password (optional) - SmtpEncryption.None, // encryption (optional) - false, // autoTLS (optional) - '<MAILER>', // mailer (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - 'email@example.com', // replyToEmail (optional) - false // enabled (optional) -); +const result = await messaging.createSmtpProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, + username: '<USERNAME>', + password: '<PASSWORD>', + encryption: SmtpEncryption.None, + autoTLS: false, + mailer: '<MAILER>', + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: 'email@example.com', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/console-web/examples/messaging/create-subscriber.md index b1f7239413..2c2796a289 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-subscriber.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-subscriber.md @@ -6,10 +6,10 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>', // subscriberId - '<TARGET_ID>' // targetId -); +const result = await messaging.createSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-telesign-provider.md index 355bc22f85..8f5094d6cd 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-telesign-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-telesign-provider.md @@ -6,13 +6,13 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createTelesignProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '+12065550100', // from (optional) - '<CUSTOMER_ID>', // customerId (optional) - '<API_KEY>', // apiKey (optional) - false // enabled (optional) -); +const result = await messaging.createTelesignProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', + customerId: '<CUSTOMER_ID>', + apiKey: '<API_KEY>', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-textmagic-provider.md index d79cffc316..c55b055855 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-textmagic-provider.md @@ -6,13 +6,13 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createTextmagicProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '+12065550100', // from (optional) - '<USERNAME>', // username (optional) - '<API_KEY>', // apiKey (optional) - false // enabled (optional) -); +const result = await messaging.createTextmagicProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', + username: '<USERNAME>', + apiKey: '<API_KEY>', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-topic.md b/docs/examples/1.8.x/console-web/examples/messaging/create-topic.md index 274714a63b..c3cb6cac40 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-topic.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-topic.md @@ -6,10 +6,10 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createTopic( - '<TOPIC_ID>', // topicId - '<NAME>', // name - ["any"] // subscribe (optional) -); +const result = await messaging.createTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-twilio-provider.md index 9b8f440743..4d5d1bd671 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-twilio-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-twilio-provider.md @@ -6,13 +6,13 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createTwilioProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '+12065550100', // from (optional) - '<ACCOUNT_SID>', // accountSid (optional) - '<AUTH_TOKEN>', // authToken (optional) - false // enabled (optional) -); +const result = await messaging.createTwilioProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', + accountSid: '<ACCOUNT_SID>', + authToken: '<AUTH_TOKEN>', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-vonage-provider.md index 6e115e8eb9..6de1d6014a 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/create-vonage-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-vonage-provider.md @@ -6,13 +6,13 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.createVonageProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '+12065550100', // from (optional) - '<API_KEY>', // apiKey (optional) - '<API_SECRET>', // apiSecret (optional) - false // enabled (optional) -); +const result = await messaging.createVonageProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', + apiKey: '<API_KEY>', + apiSecret: '<API_SECRET>', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/delete-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/delete-provider.md index f71eb65f29..cb173c8077 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/delete-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete-provider.md @@ -6,8 +6,8 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.deleteProvider( - '<PROVIDER_ID>' // providerId -); +const result = await messaging.deleteProvider({ + providerId: '<PROVIDER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/console-web/examples/messaging/delete-subscriber.md index ace9670211..67c0865605 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete-subscriber.md @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.deleteSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>' // subscriberId -); +const result = await messaging.deleteSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/delete-topic.md b/docs/examples/1.8.x/console-web/examples/messaging/delete-topic.md index 8f8e5460d3..de14ac49f6 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/delete-topic.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete-topic.md @@ -6,8 +6,8 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.deleteTopic( - '<TOPIC_ID>' // topicId -); +const result = await messaging.deleteTopic({ + topicId: '<TOPIC_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/delete.md b/docs/examples/1.8.x/console-web/examples/messaging/delete.md index 17324cca7e..8eaef5ce5f 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/delete.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete.md @@ -6,8 +6,8 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.delete( - '<MESSAGE_ID>' // messageId -); +const result = await messaging.delete({ + messageId: '<MESSAGE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/get-message.md b/docs/examples/1.8.x/console-web/examples/messaging/get-message.md index 3282adbe57..32b9306033 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/get-message.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/get-message.md @@ -6,8 +6,8 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.getMessage( - '<MESSAGE_ID>' // messageId -); +const result = await messaging.getMessage({ + messageId: '<MESSAGE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/get-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/get-provider.md index 97ac5fd127..579018678d 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/get-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/get-provider.md @@ -6,8 +6,8 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.getProvider( - '<PROVIDER_ID>' // providerId -); +const result = await messaging.getProvider({ + providerId: '<PROVIDER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/console-web/examples/messaging/get-subscriber.md index b718558d71..985fe87013 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/get-subscriber.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/get-subscriber.md @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.getSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>' // subscriberId -); +const result = await messaging.getSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/get-topic.md b/docs/examples/1.8.x/console-web/examples/messaging/get-topic.md index 802ec1fba4..9ec0a0d66d 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/get-topic.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/get-topic.md @@ -6,8 +6,8 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.getTopic( - '<TOPIC_ID>' // topicId -); +const result = await messaging.getTopic({ + topicId: '<TOPIC_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/console-web/examples/messaging/list-message-logs.md index 8679b267ce..05351f0cd5 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/list-message-logs.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-message-logs.md @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listMessageLogs( - '<MESSAGE_ID>', // messageId - [] // queries (optional) -); +const result = await messaging.listMessageLogs({ + messageId: '<MESSAGE_ID>', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-messages.md b/docs/examples/1.8.x/console-web/examples/messaging/list-messages.md index a537844f81..e4d079aae4 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/list-messages.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-messages.md @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listMessages( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await messaging.listMessages({ + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/console-web/examples/messaging/list-provider-logs.md index 2e4acb38cf..4a3aec87ee 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/list-provider-logs.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-provider-logs.md @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listProviderLogs( - '<PROVIDER_ID>', // providerId - [] // queries (optional) -); +const result = await messaging.listProviderLogs({ + providerId: '<PROVIDER_ID>', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-providers.md b/docs/examples/1.8.x/console-web/examples/messaging/list-providers.md index 5c91f01bbc..0b509a3928 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/list-providers.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-providers.md @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listProviders( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await messaging.listProviders({ + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/console-web/examples/messaging/list-subscriber-logs.md index f722c9a9ed..be4b026d95 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-subscriber-logs.md @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listSubscriberLogs( - '<SUBSCRIBER_ID>', // subscriberId - [] // queries (optional) -); +const result = await messaging.listSubscriberLogs({ + subscriberId: '<SUBSCRIBER_ID>', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/console-web/examples/messaging/list-subscribers.md index f120e9d96d..47680fed37 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/list-subscribers.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-subscribers.md @@ -6,10 +6,10 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listSubscribers( - '<TOPIC_ID>', // topicId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await messaging.listSubscribers({ + topicId: '<TOPIC_ID>', + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-targets.md b/docs/examples/1.8.x/console-web/examples/messaging/list-targets.md index 89baf87cb0..6a99e3e17c 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/list-targets.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-targets.md @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listTargets( - '<MESSAGE_ID>', // messageId - [] // queries (optional) -); +const result = await messaging.listTargets({ + messageId: '<MESSAGE_ID>', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/console-web/examples/messaging/list-topic-logs.md index bc23a09a91..01388438f4 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/list-topic-logs.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-topic-logs.md @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listTopicLogs( - '<TOPIC_ID>', // topicId - [] // queries (optional) -); +const result = await messaging.listTopicLogs({ + topicId: '<TOPIC_ID>', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-topics.md b/docs/examples/1.8.x/console-web/examples/messaging/list-topics.md index d23cca3171..d270253fbe 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/list-topics.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-topics.md @@ -6,9 +6,9 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.listTopics( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await messaging.listTopics({ + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-apns-provider.md index bc69c3ad1e..202ff83bcc 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-apns-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-apns-provider.md @@ -6,15 +6,15 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateApnsProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<AUTH_KEY>', // authKey (optional) - '<AUTH_KEY_ID>', // authKeyId (optional) - '<TEAM_ID>', // teamId (optional) - '<BUNDLE_ID>', // bundleId (optional) - false // sandbox (optional) -); +const result = await messaging.updateApnsProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + authKey: '<AUTH_KEY>', + authKeyId: '<AUTH_KEY_ID>', + teamId: '<TEAM_ID>', + bundleId: '<BUNDLE_ID>', + sandbox: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-email.md b/docs/examples/1.8.x/console-web/examples/messaging/update-email.md index ba9bc7eb48..d4349ed3b6 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-email.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-email.md @@ -6,19 +6,19 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateEmail( - '<MESSAGE_ID>', // messageId - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - '<SUBJECT>', // subject (optional) - '<CONTENT>', // content (optional) - false, // draft (optional) - false, // html (optional) - [], // cc (optional) - [], // bcc (optional) - '', // scheduledAt (optional) - [] // attachments (optional) -); +const result = await messaging.updateEmail({ + messageId: '<MESSAGE_ID>', + topics: [], + users: [], + targets: [], + subject: '<SUBJECT>', + content: '<CONTENT>', + draft: false, + html: false, + cc: [], + bcc: [], + scheduledAt: '', + attachments: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-fcm-provider.md index d2e7382561..4f59496941 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-fcm-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-fcm-provider.md @@ -6,11 +6,11 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateFcmProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - {} // serviceAccountJSON (optional) -); +const result = await messaging.updateFcmProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + serviceAccountJSON: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-mailgun-provider.md index cc48ac52f3..753749e30f 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-mailgun-provider.md @@ -6,17 +6,17 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateMailgunProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - '<API_KEY>', // apiKey (optional) - '<DOMAIN>', // domain (optional) - false, // isEuRegion (optional) - false, // enabled (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - '<REPLY_TO_EMAIL>' // replyToEmail (optional) -); +const result = await messaging.updateMailgunProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', + domain: '<DOMAIN>', + isEuRegion: false, + enabled: false, + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: '<REPLY_TO_EMAIL>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md index c2a6faec24..3c6c66d0a7 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md @@ -6,13 +6,13 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateMsg91Provider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<TEMPLATE_ID>', // templateId (optional) - '<SENDER_ID>', // senderId (optional) - '<AUTH_KEY>' // authKey (optional) -); +const result = await messaging.updateMsg91Provider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + templateId: '<TEMPLATE_ID>', + senderId: '<SENDER_ID>', + authKey: '<AUTH_KEY>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-push.md b/docs/examples/1.8.x/console-web/examples/messaging/update-push.md index e479dcc425..843233a71b 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-push.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-push.md @@ -6,26 +6,26 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updatePush( - '<MESSAGE_ID>', // messageId - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - '<TITLE>', // title (optional) - '<BODY>', // body (optional) - {}, // data (optional) - '<ACTION>', // action (optional) - '[ID1:ID2]', // image (optional) - '<ICON>', // icon (optional) - '<SOUND>', // sound (optional) - '<COLOR>', // color (optional) - '<TAG>', // tag (optional) - null, // badge (optional) - false, // draft (optional) - '', // scheduledAt (optional) - false, // contentAvailable (optional) - false, // critical (optional) - MessagePriority.Normal // priority (optional) -); +const result = await messaging.updatePush({ + messageId: '<MESSAGE_ID>', + topics: [], + users: [], + targets: [], + title: '<TITLE>', + body: '<BODY>', + data: {}, + action: '<ACTION>', + image: '[ID1:ID2]', + icon: '<ICON>', + sound: '<SOUND>', + color: '<COLOR>', + tag: '<TAG>', + badge: null, + draft: false, + scheduledAt: '', + contentAvailable: false, + critical: false, + priority: MessagePriority.Normal +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-sendgrid-provider.md index efe8263718..d508974455 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-sendgrid-provider.md @@ -6,15 +6,15 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateSendgridProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<API_KEY>', // apiKey (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - '<REPLY_TO_EMAIL>' // replyToEmail (optional) -); +const result = await messaging.updateSendgridProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + apiKey: '<API_KEY>', + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: '<REPLY_TO_EMAIL>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-sms.md b/docs/examples/1.8.x/console-web/examples/messaging/update-sms.md index 2c535a014e..df3dad21a3 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-sms.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-sms.md @@ -6,14 +6,14 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateSms( - '<MESSAGE_ID>', // messageId - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - '<CONTENT>', // content (optional) - false, // draft (optional) - '' // scheduledAt (optional) -); +const result = await messaging.updateSms({ + messageId: '<MESSAGE_ID>', + topics: [], + users: [], + targets: [], + content: '<CONTENT>', + draft: false, + scheduledAt: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-smtp-provider.md index 0274337a7b..639301058e 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-smtp-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-smtp-provider.md @@ -6,21 +6,21 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateSmtpProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - '<HOST>', // host (optional) - 1, // port (optional) - '<USERNAME>', // username (optional) - '<PASSWORD>', // password (optional) - SmtpEncryption.None, // encryption (optional) - false, // autoTLS (optional) - '<MAILER>', // mailer (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - '<REPLY_TO_EMAIL>', // replyToEmail (optional) - false // enabled (optional) -); +const result = await messaging.updateSmtpProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, + username: '<USERNAME>', + password: '<PASSWORD>', + encryption: SmtpEncryption.None, + autoTLS: false, + mailer: '<MAILER>', + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: '<REPLY_TO_EMAIL>', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-telesign-provider.md index 5d8bc1602d..2a5d3082e8 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-telesign-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-telesign-provider.md @@ -6,13 +6,13 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateTelesignProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<CUSTOMER_ID>', // customerId (optional) - '<API_KEY>', // apiKey (optional) - '<FROM>' // from (optional) -); +const result = await messaging.updateTelesignProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + customerId: '<CUSTOMER_ID>', + apiKey: '<API_KEY>', + from: '<FROM>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-textmagic-provider.md index 564ad4fc69..c807607875 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-textmagic-provider.md @@ -6,13 +6,13 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateTextmagicProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<USERNAME>', // username (optional) - '<API_KEY>', // apiKey (optional) - '<FROM>' // from (optional) -); +const result = await messaging.updateTextmagicProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + username: '<USERNAME>', + apiKey: '<API_KEY>', + from: '<FROM>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-topic.md b/docs/examples/1.8.x/console-web/examples/messaging/update-topic.md index e0edbae714..0670d57cd9 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-topic.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-topic.md @@ -6,10 +6,10 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateTopic( - '<TOPIC_ID>', // topicId - '<NAME>', // name (optional) - ["any"] // subscribe (optional) -); +const result = await messaging.updateTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-twilio-provider.md index 544a52e4fd..30dd30a561 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-twilio-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-twilio-provider.md @@ -6,13 +6,13 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateTwilioProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<ACCOUNT_SID>', // accountSid (optional) - '<AUTH_TOKEN>', // authToken (optional) - '<FROM>' // from (optional) -); +const result = await messaging.updateTwilioProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + accountSid: '<ACCOUNT_SID>', + authToken: '<AUTH_TOKEN>', + from: '<FROM>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-vonage-provider.md index e831c03184..751f194203 100644 --- a/docs/examples/1.8.x/console-web/examples/messaging/update-vonage-provider.md +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-vonage-provider.md @@ -6,13 +6,13 @@ const client = new Client() const messaging = new Messaging(client); -const result = await messaging.updateVonageProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<API_KEY>', // apiKey (optional) - '<API_SECRET>', // apiSecret (optional) - '<FROM>' // from (optional) -); +const result = await messaging.updateVonageProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + apiKey: '<API_KEY>', + apiSecret: '<API_SECRET>', + from: '<FROM>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-appwrite-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-appwrite-migration.md index db9a4cd0e0..f53ab4aa3c 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/create-appwrite-migration.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-appwrite-migration.md @@ -6,11 +6,11 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.createAppwriteMigration( - [], // resources - 'https://example.com', // endpoint - '<PROJECT_ID>', // projectId - '<API_KEY>' // apiKey -); +const result = await migrations.createAppwriteMigration({ + resources: [], + endpoint: 'https://example.com', + projectId: '<PROJECT_ID>', + apiKey: '<API_KEY>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-csv-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-csv-migration.md index 544f6c8ef6..8673e4d867 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/create-csv-migration.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-csv-migration.md @@ -6,10 +6,11 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.createCsvMigration( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '[ID1:ID2]' // resourceId -); +const result = await migrations.createCsvMigration({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + resourceId: '[ID1:ID2]', + internalFile: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-firebase-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-firebase-migration.md index 20ce3a8b3c..a3722c3839 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/create-firebase-migration.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-firebase-migration.md @@ -6,9 +6,9 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.createFirebaseMigration( - [], // resources - '<SERVICE_ACCOUNT>' // serviceAccount -); +const result = await migrations.createFirebaseMigration({ + resources: [], + serviceAccount: '<SERVICE_ACCOUNT>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-n-host-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-n-host-migration.md index 23b22ff371..091c657f67 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/create-n-host-migration.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-n-host-migration.md @@ -6,15 +6,15 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.createNHostMigration( - [], // resources - '<SUBDOMAIN>', // subdomain - '<REGION>', // region - '<ADMIN_SECRET>', // adminSecret - '<DATABASE>', // database - '<USERNAME>', // username - '<PASSWORD>', // password - null // port (optional) -); +const result = await migrations.createNHostMigration({ + resources: [], + subdomain: '<SUBDOMAIN>', + region: '<REGION>', + adminSecret: '<ADMIN_SECRET>', + database: '<DATABASE>', + username: '<USERNAME>', + password: '<PASSWORD>', + port: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-supabase-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-supabase-migration.md index 18c326ca7e..ba0fd9cf50 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/create-supabase-migration.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-supabase-migration.md @@ -6,14 +6,14 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.createSupabaseMigration( - [], // resources - 'https://example.com', // endpoint - '<API_KEY>', // apiKey - '<DATABASE_HOST>', // databaseHost - '<USERNAME>', // username - '<PASSWORD>', // password - null // port (optional) -); +const result = await migrations.createSupabaseMigration({ + resources: [], + endpoint: 'https://example.com', + apiKey: '<API_KEY>', + databaseHost: '<DATABASE_HOST>', + username: '<USERNAME>', + password: '<PASSWORD>', + port: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/delete.md b/docs/examples/1.8.x/console-web/examples/migrations/delete.md index bb013ddf27..9df30d4178 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/delete.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/delete.md @@ -6,8 +6,8 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.delete( - '<MIGRATION_ID>' // migrationId -); +const result = await migrations.delete({ + migrationId: '<MIGRATION_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get-appwrite-report.md b/docs/examples/1.8.x/console-web/examples/migrations/get-appwrite-report.md index a70b6a45fb..cdd5892a39 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/get-appwrite-report.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/get-appwrite-report.md @@ -6,11 +6,11 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.getAppwriteReport( - [], // resources - 'https://example.com', // endpoint - '<PROJECT_ID>', // projectID - '<KEY>' // key -); +const result = await migrations.getAppwriteReport({ + resources: [], + endpoint: 'https://example.com', + projectID: '<PROJECT_ID>', + key: '<KEY>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get-firebase-report.md b/docs/examples/1.8.x/console-web/examples/migrations/get-firebase-report.md index bf1c85eeb6..4b8ea2118b 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/get-firebase-report.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/get-firebase-report.md @@ -6,9 +6,9 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.getFirebaseReport( - [], // resources - '<SERVICE_ACCOUNT>' // serviceAccount -); +const result = await migrations.getFirebaseReport({ + resources: [], + serviceAccount: '<SERVICE_ACCOUNT>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get-n-host-report.md b/docs/examples/1.8.x/console-web/examples/migrations/get-n-host-report.md index a983088f0d..987c03d633 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/get-n-host-report.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/get-n-host-report.md @@ -6,15 +6,15 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.getNHostReport( - [], // resources - '<SUBDOMAIN>', // subdomain - '<REGION>', // region - '<ADMIN_SECRET>', // adminSecret - '<DATABASE>', // database - '<USERNAME>', // username - '<PASSWORD>', // password - null // port (optional) -); +const result = await migrations.getNHostReport({ + resources: [], + subdomain: '<SUBDOMAIN>', + region: '<REGION>', + adminSecret: '<ADMIN_SECRET>', + database: '<DATABASE>', + username: '<USERNAME>', + password: '<PASSWORD>', + port: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get-supabase-report.md b/docs/examples/1.8.x/console-web/examples/migrations/get-supabase-report.md index d6ea7a9712..ffabd95e86 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/get-supabase-report.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/get-supabase-report.md @@ -6,14 +6,14 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.getSupabaseReport( - [], // resources - 'https://example.com', // endpoint - '<API_KEY>', // apiKey - '<DATABASE_HOST>', // databaseHost - '<USERNAME>', // username - '<PASSWORD>', // password - null // port (optional) -); +const result = await migrations.getSupabaseReport({ + resources: [], + endpoint: 'https://example.com', + apiKey: '<API_KEY>', + databaseHost: '<DATABASE_HOST>', + username: '<USERNAME>', + password: '<PASSWORD>', + port: null +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get.md b/docs/examples/1.8.x/console-web/examples/migrations/get.md index e2c67eb884..e007ac9c73 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/get.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/get.md @@ -6,8 +6,8 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.get( - '<MIGRATION_ID>' // migrationId -); +const result = await migrations.get({ + migrationId: '<MIGRATION_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/list.md b/docs/examples/1.8.x/console-web/examples/migrations/list.md index a978e1843e..f0648765a9 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/list.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/list.md @@ -6,9 +6,9 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await migrations.list({ + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/retry.md b/docs/examples/1.8.x/console-web/examples/migrations/retry.md index f489168d7e..31322a14e5 100644 --- a/docs/examples/1.8.x/console-web/examples/migrations/retry.md +++ b/docs/examples/1.8.x/console-web/examples/migrations/retry.md @@ -6,8 +6,8 @@ const client = new Client() const migrations = new Migrations(client); -const result = await migrations.retry( - '<MIGRATION_ID>' // migrationId -); +const result = await migrations.retry({ + migrationId: '<MIGRATION_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/create-variable.md b/docs/examples/1.8.x/console-web/examples/project/create-variable.md index aa7361ffc2..008a81e06f 100644 --- a/docs/examples/1.8.x/console-web/examples/project/create-variable.md +++ b/docs/examples/1.8.x/console-web/examples/project/create-variable.md @@ -6,10 +6,10 @@ const client = new Client() const project = new Project(client); -const result = await project.createVariable( - '<KEY>', // key - '<VALUE>', // value - false // secret (optional) -); +const result = await project.createVariable({ + key: '<KEY>', + value: '<VALUE>', + secret: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/delete-variable.md b/docs/examples/1.8.x/console-web/examples/project/delete-variable.md index 224691691d..4994eeebf3 100644 --- a/docs/examples/1.8.x/console-web/examples/project/delete-variable.md +++ b/docs/examples/1.8.x/console-web/examples/project/delete-variable.md @@ -6,8 +6,8 @@ const client = new Client() const project = new Project(client); -const result = await project.deleteVariable( - '<VARIABLE_ID>' // variableId -); +const result = await project.deleteVariable({ + variableId: '<VARIABLE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/get-usage.md b/docs/examples/1.8.x/console-web/examples/project/get-usage.md index 300311dd8f..88b399575d 100644 --- a/docs/examples/1.8.x/console-web/examples/project/get-usage.md +++ b/docs/examples/1.8.x/console-web/examples/project/get-usage.md @@ -6,10 +6,10 @@ const client = new Client() const project = new Project(client); -const result = await project.getUsage( - '', // startDate - '', // endDate - ProjectUsageRange.OneHour // period (optional) -); +const result = await project.getUsage({ + startDate: '', + endDate: '', + period: ProjectUsageRange.OneHour +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/get-variable.md b/docs/examples/1.8.x/console-web/examples/project/get-variable.md index bc30baa325..45ab31e614 100644 --- a/docs/examples/1.8.x/console-web/examples/project/get-variable.md +++ b/docs/examples/1.8.x/console-web/examples/project/get-variable.md @@ -6,8 +6,8 @@ const client = new Client() const project = new Project(client); -const result = await project.getVariable( - '<VARIABLE_ID>' // variableId -); +const result = await project.getVariable({ + variableId: '<VARIABLE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/update-variable.md b/docs/examples/1.8.x/console-web/examples/project/update-variable.md index 9dcd62a7c2..f60ccf06fd 100644 --- a/docs/examples/1.8.x/console-web/examples/project/update-variable.md +++ b/docs/examples/1.8.x/console-web/examples/project/update-variable.md @@ -6,11 +6,11 @@ const client = new Client() const project = new Project(client); -const result = await project.updateVariable( - '<VARIABLE_ID>', // variableId - '<KEY>', // key - '<VALUE>', // value (optional) - false // secret (optional) -); +const result = await project.updateVariable({ + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-dev-key.md b/docs/examples/1.8.x/console-web/examples/projects/create-dev-key.md index 28f89aea49..9f1ed21e6f 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/create-dev-key.md +++ b/docs/examples/1.8.x/console-web/examples/projects/create-dev-key.md @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.createDevKey( - '<PROJECT_ID>', // projectId - '<NAME>', // name - '' // expire -); +const result = await projects.createDevKey({ + projectId: '<PROJECT_ID>', + name: '<NAME>', + expire: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-j-w-t.md b/docs/examples/1.8.x/console-web/examples/projects/create-j-w-t.md index 7175e266ae..ad9d9cf7d7 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/create-j-w-t.md +++ b/docs/examples/1.8.x/console-web/examples/projects/create-j-w-t.md @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.createJWT( - '<PROJECT_ID>', // projectId - [], // scopes - 0 // duration (optional) -); +const result = await projects.createJWT({ + projectId: '<PROJECT_ID>', + scopes: [], + duration: 0 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-key.md b/docs/examples/1.8.x/console-web/examples/projects/create-key.md index 25bcc125ed..aab2af98e6 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/create-key.md +++ b/docs/examples/1.8.x/console-web/examples/projects/create-key.md @@ -6,11 +6,11 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.createKey( - '<PROJECT_ID>', // projectId - '<NAME>', // name - [], // scopes - '' // expire (optional) -); +const result = await projects.createKey({ + projectId: '<PROJECT_ID>', + name: '<NAME>', + scopes: [], + expire: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-platform.md b/docs/examples/1.8.x/console-web/examples/projects/create-platform.md index 7e23dd6f9e..af48f85a57 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/create-platform.md +++ b/docs/examples/1.8.x/console-web/examples/projects/create-platform.md @@ -6,13 +6,13 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.createPlatform( - '<PROJECT_ID>', // projectId - PlatformType.Web, // type - '<NAME>', // name - '<KEY>', // key (optional) - '<STORE>', // store (optional) - '' // hostname (optional) -); +const result = await projects.createPlatform({ + projectId: '<PROJECT_ID>', + type: PlatformType.Web, + name: '<NAME>', + key: '<KEY>', + store: '<STORE>', + hostname: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-smtp-test.md b/docs/examples/1.8.x/console-web/examples/projects/create-smtp-test.md index ab0e184432..1e1589a8b8 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/create-smtp-test.md +++ b/docs/examples/1.8.x/console-web/examples/projects/create-smtp-test.md @@ -6,17 +6,17 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.createSmtpTest( - '<PROJECT_ID>', // projectId - [], // emails - '<SENDER_NAME>', // senderName - 'email@example.com', // senderEmail - '', // host - 'email@example.com', // replyTo (optional) - null, // port (optional) - '<USERNAME>', // username (optional) - '<PASSWORD>', // password (optional) - SMTPSecure.Tls // secure (optional) -); +const result = await projects.createSmtpTest({ + projectId: '<PROJECT_ID>', + emails: [], + senderName: '<SENDER_NAME>', + senderEmail: 'email@example.com', + host: '', + replyTo: 'email@example.com', + port: null, + username: '<USERNAME>', + password: '<PASSWORD>', + secure: SMTPSecure.Tls +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-webhook.md b/docs/examples/1.8.x/console-web/examples/projects/create-webhook.md index 62fdac56cd..1f6369ee63 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/create-webhook.md +++ b/docs/examples/1.8.x/console-web/examples/projects/create-webhook.md @@ -6,15 +6,15 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.createWebhook( - '<PROJECT_ID>', // projectId - '<NAME>', // name - [], // events - '', // url - false, // security - false, // enabled (optional) - '<HTTP_USER>', // httpUser (optional) - '<HTTP_PASS>' // httpPass (optional) -); +const result = await projects.createWebhook({ + projectId: '<PROJECT_ID>', + name: '<NAME>', + events: [], + url: '', + security: false, + enabled: false, + httpUser: '<HTTP_USER>', + httpPass: '<HTTP_PASS>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create.md b/docs/examples/1.8.x/console-web/examples/projects/create.md index 58efd0b75f..89379dd5b9 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/create.md +++ b/docs/examples/1.8.x/console-web/examples/projects/create.md @@ -6,20 +6,20 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.create( - '', // projectId - '<NAME>', // name - '<TEAM_ID>', // teamId - .Default, // region (optional) - '<DESCRIPTION>', // description (optional) - '<LOGO>', // logo (optional) - 'https://example.com', // url (optional) - '<LEGAL_NAME>', // legalName (optional) - '<LEGAL_COUNTRY>', // legalCountry (optional) - '<LEGAL_STATE>', // legalState (optional) - '<LEGAL_CITY>', // legalCity (optional) - '<LEGAL_ADDRESS>', // legalAddress (optional) - '<LEGAL_TAX_ID>' // legalTaxId (optional) -); +const result = await projects.create({ + projectId: '', + name: '<NAME>', + teamId: '<TEAM_ID>', + region: .Default, + description: '<DESCRIPTION>', + logo: '<LOGO>', + url: 'https://example.com', + legalName: '<LEGAL_NAME>', + legalCountry: '<LEGAL_COUNTRY>', + legalState: '<LEGAL_STATE>', + legalCity: '<LEGAL_CITY>', + legalAddress: '<LEGAL_ADDRESS>', + legalTaxId: '<LEGAL_TAX_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-dev-key.md b/docs/examples/1.8.x/console-web/examples/projects/delete-dev-key.md index fc2ca4f1a7..2e5c08ab06 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/delete-dev-key.md +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-dev-key.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.deleteDevKey( - '<PROJECT_ID>', // projectId - '<KEY_ID>' // keyId -); +const result = await projects.deleteDevKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-email-template.md b/docs/examples/1.8.x/console-web/examples/projects/delete-email-template.md index 10e3d302ae..5c21e4797b 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/delete-email-template.md +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-email-template.md @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.deleteEmailTemplate( - '<PROJECT_ID>', // projectId - EmailTemplateType.Verification, // type - EmailTemplateLocale.Af // locale -); +const result = await projects.deleteEmailTemplate({ + projectId: '<PROJECT_ID>', + type: EmailTemplateType.Verification, + locale: EmailTemplateLocale.Af +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-key.md b/docs/examples/1.8.x/console-web/examples/projects/delete-key.md index 7ea7dc6fdc..671413f0b5 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/delete-key.md +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-key.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.deleteKey( - '<PROJECT_ID>', // projectId - '<KEY_ID>' // keyId -); +const result = await projects.deleteKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-platform.md b/docs/examples/1.8.x/console-web/examples/projects/delete-platform.md index 5c71747a64..8ed3e23afa 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/delete-platform.md +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-platform.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.deletePlatform( - '<PROJECT_ID>', // projectId - '<PLATFORM_ID>' // platformId -); +const result = await projects.deletePlatform({ + projectId: '<PROJECT_ID>', + platformId: '<PLATFORM_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-sms-template.md b/docs/examples/1.8.x/console-web/examples/projects/delete-sms-template.md index eef3cccae9..824cb14d37 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/delete-sms-template.md +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-sms-template.md @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.deleteSmsTemplate( - '<PROJECT_ID>', // projectId - SmsTemplateType.Verification, // type - SmsTemplateLocale.Af // locale -); +const result = await projects.deleteSmsTemplate({ + projectId: '<PROJECT_ID>', + type: SmsTemplateType.Verification, + locale: SmsTemplateLocale.Af +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-webhook.md b/docs/examples/1.8.x/console-web/examples/projects/delete-webhook.md index 24abaafc66..ec89642a3f 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/delete-webhook.md +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-webhook.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.deleteWebhook( - '<PROJECT_ID>', // projectId - '<WEBHOOK_ID>' // webhookId -); +const result = await projects.deleteWebhook({ + projectId: '<PROJECT_ID>', + webhookId: '<WEBHOOK_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete.md b/docs/examples/1.8.x/console-web/examples/projects/delete.md index d868616db2..c6ccd67cd6 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/delete.md +++ b/docs/examples/1.8.x/console-web/examples/projects/delete.md @@ -6,8 +6,8 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.delete( - '<PROJECT_ID>' // projectId -); +const result = await projects.delete({ + projectId: '<PROJECT_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-dev-key.md b/docs/examples/1.8.x/console-web/examples/projects/get-dev-key.md index a9c38df45a..1e3ab57070 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/get-dev-key.md +++ b/docs/examples/1.8.x/console-web/examples/projects/get-dev-key.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.getDevKey( - '<PROJECT_ID>', // projectId - '<KEY_ID>' // keyId -); +const result = await projects.getDevKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-email-template.md b/docs/examples/1.8.x/console-web/examples/projects/get-email-template.md index 1d27c8c682..3b812045c0 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/get-email-template.md +++ b/docs/examples/1.8.x/console-web/examples/projects/get-email-template.md @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.getEmailTemplate( - '<PROJECT_ID>', // projectId - EmailTemplateType.Verification, // type - EmailTemplateLocale.Af // locale -); +const result = await projects.getEmailTemplate({ + projectId: '<PROJECT_ID>', + type: EmailTemplateType.Verification, + locale: EmailTemplateLocale.Af +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-key.md b/docs/examples/1.8.x/console-web/examples/projects/get-key.md index 79359e298b..a937d8c413 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/get-key.md +++ b/docs/examples/1.8.x/console-web/examples/projects/get-key.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.getKey( - '<PROJECT_ID>', // projectId - '<KEY_ID>' // keyId -); +const result = await projects.getKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-platform.md b/docs/examples/1.8.x/console-web/examples/projects/get-platform.md index a17bcb122d..6d5ca40214 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/get-platform.md +++ b/docs/examples/1.8.x/console-web/examples/projects/get-platform.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.getPlatform( - '<PROJECT_ID>', // projectId - '<PLATFORM_ID>' // platformId -); +const result = await projects.getPlatform({ + projectId: '<PROJECT_ID>', + platformId: '<PLATFORM_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-sms-template.md b/docs/examples/1.8.x/console-web/examples/projects/get-sms-template.md index 0badf1cca4..207edea039 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/get-sms-template.md +++ b/docs/examples/1.8.x/console-web/examples/projects/get-sms-template.md @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.getSmsTemplate( - '<PROJECT_ID>', // projectId - SmsTemplateType.Verification, // type - SmsTemplateLocale.Af // locale -); +const result = await projects.getSmsTemplate({ + projectId: '<PROJECT_ID>', + type: SmsTemplateType.Verification, + locale: SmsTemplateLocale.Af +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-webhook.md b/docs/examples/1.8.x/console-web/examples/projects/get-webhook.md index 6b6530a04e..e8d00d2da6 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/get-webhook.md +++ b/docs/examples/1.8.x/console-web/examples/projects/get-webhook.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.getWebhook( - '<PROJECT_ID>', // projectId - '<WEBHOOK_ID>' // webhookId -); +const result = await projects.getWebhook({ + projectId: '<PROJECT_ID>', + webhookId: '<WEBHOOK_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get.md b/docs/examples/1.8.x/console-web/examples/projects/get.md index dbec5dd543..f55a9677f9 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/get.md +++ b/docs/examples/1.8.x/console-web/examples/projects/get.md @@ -6,8 +6,8 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.get( - '<PROJECT_ID>' // projectId -); +const result = await projects.get({ + projectId: '<PROJECT_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list-dev-keys.md b/docs/examples/1.8.x/console-web/examples/projects/list-dev-keys.md index d3b17706cd..61e2e31c08 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/list-dev-keys.md +++ b/docs/examples/1.8.x/console-web/examples/projects/list-dev-keys.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.listDevKeys( - '<PROJECT_ID>', // projectId - [] // queries (optional) -); +const result = await projects.listDevKeys({ + projectId: '<PROJECT_ID>', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list-keys.md b/docs/examples/1.8.x/console-web/examples/projects/list-keys.md index 5701133ba4..3a47780c1c 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/list-keys.md +++ b/docs/examples/1.8.x/console-web/examples/projects/list-keys.md @@ -6,8 +6,8 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.listKeys( - '<PROJECT_ID>' // projectId -); +const result = await projects.listKeys({ + projectId: '<PROJECT_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list-platforms.md b/docs/examples/1.8.x/console-web/examples/projects/list-platforms.md index 214092b6b3..475bc068ef 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/list-platforms.md +++ b/docs/examples/1.8.x/console-web/examples/projects/list-platforms.md @@ -6,8 +6,8 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.listPlatforms( - '<PROJECT_ID>' // projectId -); +const result = await projects.listPlatforms({ + projectId: '<PROJECT_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list-webhooks.md b/docs/examples/1.8.x/console-web/examples/projects/list-webhooks.md index 11639bfccf..89cdf35b26 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/list-webhooks.md +++ b/docs/examples/1.8.x/console-web/examples/projects/list-webhooks.md @@ -6,8 +6,8 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.listWebhooks( - '<PROJECT_ID>' // projectId -); +const result = await projects.listWebhooks({ + projectId: '<PROJECT_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list.md b/docs/examples/1.8.x/console-web/examples/projects/list.md index 0ade65189a..40109c80bb 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/list.md +++ b/docs/examples/1.8.x/console-web/examples/projects/list.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await projects.list({ + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-api-status-all.md b/docs/examples/1.8.x/console-web/examples/projects/update-api-status-all.md index a51ed2df2b..b8897adc84 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-api-status-all.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-api-status-all.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateApiStatusAll( - '<PROJECT_ID>', // projectId - false // status -); +const result = await projects.updateApiStatusAll({ + projectId: '<PROJECT_ID>', + status: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-api-status.md b/docs/examples/1.8.x/console-web/examples/projects/update-api-status.md index 9cc7dfe8ab..02eade6897 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-api-status.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-api-status.md @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateApiStatus( - '<PROJECT_ID>', // projectId - .Rest, // api - false // status -); +const result = await projects.updateApiStatus({ + projectId: '<PROJECT_ID>', + api: .Rest, + status: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-duration.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-duration.md index d0d8c67b28..a8119d12d3 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-auth-duration.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-duration.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateAuthDuration( - '<PROJECT_ID>', // projectId - 0 // duration -); +const result = await projects.updateAuthDuration({ + projectId: '<PROJECT_ID>', + duration: 0 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-limit.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-limit.md index 80f73f871f..daed702834 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-auth-limit.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-limit.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateAuthLimit( - '<PROJECT_ID>', // projectId - 0 // limit -); +const result = await projects.updateAuthLimit({ + projectId: '<PROJECT_ID>', + limit: 0 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-dictionary.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-dictionary.md index 1e878c2246..06ab09316c 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-dictionary.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-dictionary.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateAuthPasswordDictionary( - '<PROJECT_ID>', // projectId - false // enabled -); +const result = await projects.updateAuthPasswordDictionary({ + projectId: '<PROJECT_ID>', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-history.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-history.md index 26a3adcfde..76c246991f 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-history.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-history.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateAuthPasswordHistory( - '<PROJECT_ID>', // projectId - 0 // limit -); +const result = await projects.updateAuthPasswordHistory({ + projectId: '<PROJECT_ID>', + limit: 0 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-sessions-limit.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-sessions-limit.md index c1b0e14e91..ca5aef7737 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-auth-sessions-limit.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-sessions-limit.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateAuthSessionsLimit( - '<PROJECT_ID>', // projectId - 1 // limit -); +const result = await projects.updateAuthSessionsLimit({ + projectId: '<PROJECT_ID>', + limit: 1 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-status.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-status.md index d4862282a6..75deb5ae5d 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-auth-status.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-status.md @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateAuthStatus( - '<PROJECT_ID>', // projectId - AuthMethod.EmailPassword, // method - false // status -); +const result = await projects.updateAuthStatus({ + projectId: '<PROJECT_ID>', + method: AuthMethod.EmailPassword, + status: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-dev-key.md b/docs/examples/1.8.x/console-web/examples/projects/update-dev-key.md index 9c00474262..3d84fbbc85 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-dev-key.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-dev-key.md @@ -6,11 +6,11 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateDevKey( - '<PROJECT_ID>', // projectId - '<KEY_ID>', // keyId - '<NAME>', // name - '' // expire -); +const result = await projects.updateDevKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', + name: '<NAME>', + expire: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-email-template.md b/docs/examples/1.8.x/console-web/examples/projects/update-email-template.md index 44467c4f8a..c63cfd120c 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-email-template.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-email-template.md @@ -6,15 +6,15 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateEmailTemplate( - '<PROJECT_ID>', // projectId - EmailTemplateType.Verification, // type - EmailTemplateLocale.Af, // locale - '<SUBJECT>', // subject - '<MESSAGE>', // message - '<SENDER_NAME>', // senderName (optional) - 'email@example.com', // senderEmail (optional) - 'email@example.com' // replyTo (optional) -); +const result = await projects.updateEmailTemplate({ + projectId: '<PROJECT_ID>', + type: EmailTemplateType.Verification, + locale: EmailTemplateLocale.Af, + subject: '<SUBJECT>', + message: '<MESSAGE>', + senderName: '<SENDER_NAME>', + senderEmail: 'email@example.com', + replyTo: 'email@example.com' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-key.md b/docs/examples/1.8.x/console-web/examples/projects/update-key.md index 492a0ac23d..42468d1b9c 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-key.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-key.md @@ -6,12 +6,12 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateKey( - '<PROJECT_ID>', // projectId - '<KEY_ID>', // keyId - '<NAME>', // name - [], // scopes - '' // expire (optional) -); +const result = await projects.updateKey({ + projectId: '<PROJECT_ID>', + keyId: '<KEY_ID>', + name: '<NAME>', + scopes: [], + expire: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-memberships-privacy.md b/docs/examples/1.8.x/console-web/examples/projects/update-memberships-privacy.md index 31adcd3855..ca873e7ee1 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-memberships-privacy.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-memberships-privacy.md @@ -6,11 +6,11 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateMembershipsPrivacy( - '<PROJECT_ID>', // projectId - false, // userName - false, // userEmail - false // mfa -); +const result = await projects.updateMembershipsPrivacy({ + projectId: '<PROJECT_ID>', + userName: false, + userEmail: false, + mfa: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-mock-numbers.md b/docs/examples/1.8.x/console-web/examples/projects/update-mock-numbers.md index 245a20c19b..918993be50 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-mock-numbers.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-mock-numbers.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateMockNumbers( - '<PROJECT_ID>', // projectId - [] // numbers -); +const result = await projects.updateMockNumbers({ + projectId: '<PROJECT_ID>', + numbers: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-o-auth2.md b/docs/examples/1.8.x/console-web/examples/projects/update-o-auth2.md index 0671ee38bd..c6d5cc3ac5 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-o-auth2.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-o-auth2.md @@ -6,12 +6,12 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateOAuth2( - '<PROJECT_ID>', // projectId - OAuthProvider.Amazon, // provider - '<APP_ID>', // appId (optional) - '<SECRET>', // secret (optional) - false // enabled (optional) -); +const result = await projects.updateOAuth2({ + projectId: '<PROJECT_ID>', + provider: OAuthProvider.Amazon, + appId: '<APP_ID>', + secret: '<SECRET>', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-personal-data-check.md b/docs/examples/1.8.x/console-web/examples/projects/update-personal-data-check.md index fb0fcffc16..0fe0a35652 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-personal-data-check.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-personal-data-check.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updatePersonalDataCheck( - '<PROJECT_ID>', // projectId - false // enabled -); +const result = await projects.updatePersonalDataCheck({ + projectId: '<PROJECT_ID>', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-platform.md b/docs/examples/1.8.x/console-web/examples/projects/update-platform.md index 2f9cc0a4fd..34e982df42 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-platform.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-platform.md @@ -6,13 +6,13 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updatePlatform( - '<PROJECT_ID>', // projectId - '<PLATFORM_ID>', // platformId - '<NAME>', // name - '<KEY>', // key (optional) - '<STORE>', // store (optional) - '' // hostname (optional) -); +const result = await projects.updatePlatform({ + projectId: '<PROJECT_ID>', + platformId: '<PLATFORM_ID>', + name: '<NAME>', + key: '<KEY>', + store: '<STORE>', + hostname: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-service-status-all.md b/docs/examples/1.8.x/console-web/examples/projects/update-service-status-all.md index 672a1491bc..c4216fcbbc 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-service-status-all.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-service-status-all.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateServiceStatusAll( - '<PROJECT_ID>', // projectId - false // status -); +const result = await projects.updateServiceStatusAll({ + projectId: '<PROJECT_ID>', + status: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-service-status.md b/docs/examples/1.8.x/console-web/examples/projects/update-service-status.md index 5d2189e339..e5b92683d2 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-service-status.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-service-status.md @@ -6,10 +6,10 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateServiceStatus( - '<PROJECT_ID>', // projectId - ApiService.Account, // service - false // status -); +const result = await projects.updateServiceStatus({ + projectId: '<PROJECT_ID>', + service: ApiService.Account, + status: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-session-alerts.md b/docs/examples/1.8.x/console-web/examples/projects/update-session-alerts.md index 65aa353b2b..21e73494fa 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-session-alerts.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-session-alerts.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateSessionAlerts( - '<PROJECT_ID>', // projectId - false // alerts -); +const result = await projects.updateSessionAlerts({ + projectId: '<PROJECT_ID>', + alerts: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-session-invalidation.md b/docs/examples/1.8.x/console-web/examples/projects/update-session-invalidation.md index b0e3ad3e0f..748ac72629 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-session-invalidation.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-session-invalidation.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateSessionInvalidation( - '<PROJECT_ID>', // projectId - false // enabled -); +const result = await projects.updateSessionInvalidation({ + projectId: '<PROJECT_ID>', + enabled: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-sms-template.md b/docs/examples/1.8.x/console-web/examples/projects/update-sms-template.md index cc801a67c5..f1234812ed 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-sms-template.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-sms-template.md @@ -6,11 +6,11 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateSmsTemplate( - '<PROJECT_ID>', // projectId - SmsTemplateType.Verification, // type - SmsTemplateLocale.Af, // locale - '<MESSAGE>' // message -); +const result = await projects.updateSmsTemplate({ + projectId: '<PROJECT_ID>', + type: SmsTemplateType.Verification, + locale: SmsTemplateLocale.Af, + message: '<MESSAGE>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-smtp.md b/docs/examples/1.8.x/console-web/examples/projects/update-smtp.md index 605ba0f5e3..13b52d1f0e 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-smtp.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-smtp.md @@ -6,17 +6,17 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateSmtp( - '<PROJECT_ID>', // projectId - false, // enabled - '<SENDER_NAME>', // senderName (optional) - 'email@example.com', // senderEmail (optional) - 'email@example.com', // replyTo (optional) - '', // host (optional) - null, // port (optional) - '<USERNAME>', // username (optional) - '<PASSWORD>', // password (optional) - SMTPSecure.Tls // secure (optional) -); +const result = await projects.updateSmtp({ + projectId: '<PROJECT_ID>', + enabled: false, + senderName: '<SENDER_NAME>', + senderEmail: 'email@example.com', + replyTo: 'email@example.com', + host: '', + port: null, + username: '<USERNAME>', + password: '<PASSWORD>', + secure: SMTPSecure.Tls +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-team.md b/docs/examples/1.8.x/console-web/examples/projects/update-team.md index b7c5d934e2..6c27714d6d 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-team.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-team.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateTeam( - '<PROJECT_ID>', // projectId - '<TEAM_ID>' // teamId -); +const result = await projects.updateTeam({ + projectId: '<PROJECT_ID>', + teamId: '<TEAM_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-webhook-signature.md b/docs/examples/1.8.x/console-web/examples/projects/update-webhook-signature.md index 593c6c0fce..6ea0ee6969 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-webhook-signature.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-webhook-signature.md @@ -6,9 +6,9 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateWebhookSignature( - '<PROJECT_ID>', // projectId - '<WEBHOOK_ID>' // webhookId -); +const result = await projects.updateWebhookSignature({ + projectId: '<PROJECT_ID>', + webhookId: '<WEBHOOK_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-webhook.md b/docs/examples/1.8.x/console-web/examples/projects/update-webhook.md index 18d10051e9..d30a3d531f 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update-webhook.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update-webhook.md @@ -6,16 +6,16 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.updateWebhook( - '<PROJECT_ID>', // projectId - '<WEBHOOK_ID>', // webhookId - '<NAME>', // name - [], // events - '', // url - false, // security - false, // enabled (optional) - '<HTTP_USER>', // httpUser (optional) - '<HTTP_PASS>' // httpPass (optional) -); +const result = await projects.updateWebhook({ + projectId: '<PROJECT_ID>', + webhookId: '<WEBHOOK_ID>', + name: '<NAME>', + events: [], + url: '', + security: false, + enabled: false, + httpUser: '<HTTP_USER>', + httpPass: '<HTTP_PASS>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update.md b/docs/examples/1.8.x/console-web/examples/projects/update.md index 8b2d2823ca..a714105aff 100644 --- a/docs/examples/1.8.x/console-web/examples/projects/update.md +++ b/docs/examples/1.8.x/console-web/examples/projects/update.md @@ -6,18 +6,18 @@ const client = new Client() const projects = new Projects(client); -const result = await projects.update( - '<PROJECT_ID>', // projectId - '<NAME>', // name - '<DESCRIPTION>', // description (optional) - '<LOGO>', // logo (optional) - 'https://example.com', // url (optional) - '<LEGAL_NAME>', // legalName (optional) - '<LEGAL_COUNTRY>', // legalCountry (optional) - '<LEGAL_STATE>', // legalState (optional) - '<LEGAL_CITY>', // legalCity (optional) - '<LEGAL_ADDRESS>', // legalAddress (optional) - '<LEGAL_TAX_ID>' // legalTaxId (optional) -); +const result = await projects.update({ + projectId: '<PROJECT_ID>', + name: '<NAME>', + description: '<DESCRIPTION>', + logo: '<LOGO>', + url: 'https://example.com', + legalName: '<LEGAL_NAME>', + legalCountry: '<LEGAL_COUNTRY>', + legalState: '<LEGAL_STATE>', + legalCity: '<LEGAL_CITY>', + legalAddress: '<LEGAL_ADDRESS>', + legalTaxId: '<LEGAL_TAX_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/create-a-p-i-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/create-a-p-i-rule.md index e248ebea3d..593601da1f 100644 --- a/docs/examples/1.8.x/console-web/examples/proxy/create-a-p-i-rule.md +++ b/docs/examples/1.8.x/console-web/examples/proxy/create-a-p-i-rule.md @@ -6,8 +6,8 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.createAPIRule( - '' // domain -); +const result = await proxy.createAPIRule({ + domain: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/create-function-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/create-function-rule.md index 2bb0b83f08..4354cdcd5a 100644 --- a/docs/examples/1.8.x/console-web/examples/proxy/create-function-rule.md +++ b/docs/examples/1.8.x/console-web/examples/proxy/create-function-rule.md @@ -6,10 +6,10 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.createFunctionRule( - '', // domain - '<FUNCTION_ID>', // functionId - '<BRANCH>' // branch (optional) -); +const result = await proxy.createFunctionRule({ + domain: '', + functionId: '<FUNCTION_ID>', + branch: '<BRANCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/create-redirect-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/create-redirect-rule.md index 294e496987..396d6dee58 100644 --- a/docs/examples/1.8.x/console-web/examples/proxy/create-redirect-rule.md +++ b/docs/examples/1.8.x/console-web/examples/proxy/create-redirect-rule.md @@ -6,12 +6,12 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.createRedirectRule( - '', // domain - 'https://example.com', // url - .MovedPermanently301, // statusCode - '<RESOURCE_ID>', // resourceId - ProxyResourceType.Site // resourceType -); +const result = await proxy.createRedirectRule({ + domain: '', + url: 'https://example.com', + statusCode: .MovedPermanently301, + resourceId: '<RESOURCE_ID>', + resourceType: ProxyResourceType.Site +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/create-site-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/create-site-rule.md index 4ea806eceb..b6cc126c52 100644 --- a/docs/examples/1.8.x/console-web/examples/proxy/create-site-rule.md +++ b/docs/examples/1.8.x/console-web/examples/proxy/create-site-rule.md @@ -6,10 +6,10 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.createSiteRule( - '', // domain - '<SITE_ID>', // siteId - '<BRANCH>' // branch (optional) -); +const result = await proxy.createSiteRule({ + domain: '', + siteId: '<SITE_ID>', + branch: '<BRANCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/delete-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/delete-rule.md index 783f06d95c..7417ab7ddd 100644 --- a/docs/examples/1.8.x/console-web/examples/proxy/delete-rule.md +++ b/docs/examples/1.8.x/console-web/examples/proxy/delete-rule.md @@ -6,8 +6,8 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.deleteRule( - '<RULE_ID>' // ruleId -); +const result = await proxy.deleteRule({ + ruleId: '<RULE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/get-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/get-rule.md index e69c8210ce..1033693196 100644 --- a/docs/examples/1.8.x/console-web/examples/proxy/get-rule.md +++ b/docs/examples/1.8.x/console-web/examples/proxy/get-rule.md @@ -6,8 +6,8 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.getRule( - '<RULE_ID>' // ruleId -); +const result = await proxy.getRule({ + ruleId: '<RULE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/list-rules.md b/docs/examples/1.8.x/console-web/examples/proxy/list-rules.md index 8c07168292..1af7deb9ed 100644 --- a/docs/examples/1.8.x/console-web/examples/proxy/list-rules.md +++ b/docs/examples/1.8.x/console-web/examples/proxy/list-rules.md @@ -6,9 +6,9 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.listRules( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await proxy.listRules({ + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/update-rule-verification.md b/docs/examples/1.8.x/console-web/examples/proxy/update-rule-verification.md index 349535cec8..4806b3072a 100644 --- a/docs/examples/1.8.x/console-web/examples/proxy/update-rule-verification.md +++ b/docs/examples/1.8.x/console-web/examples/proxy/update-rule-verification.md @@ -6,8 +6,8 @@ const client = new Client() const proxy = new Proxy(client); -const result = await proxy.updateRuleVerification( - '<RULE_ID>' // ruleId -); +const result = await proxy.updateRuleVerification({ + ruleId: '<RULE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/create-deployment.md index 5bc597c20e..de0066b6c1 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/create-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/sites/create-deployment.md @@ -6,13 +6,13 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.createDeployment( - '<SITE_ID>', // siteId - document.getElementById('uploader').files[0], // code - false, // activate - '<INSTALL_COMMAND>', // installCommand (optional) - '<BUILD_COMMAND>', // buildCommand (optional) - '<OUTPUT_DIRECTORY>' // outputDirectory (optional) -); +const result = await sites.createDeployment({ + siteId: '<SITE_ID>', + code: document.getElementById('uploader').files[0], + activate: false, + installCommand: '<INSTALL_COMMAND>', + buildCommand: '<BUILD_COMMAND>', + outputDirectory: '<OUTPUT_DIRECTORY>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/create-duplicate-deployment.md index 3b8347fbf6..43812cfb7c 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/sites/create-duplicate-deployment.md @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.createDuplicateDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.createDuplicateDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/create-template-deployment.md index 990d7cf98b..69db83020c 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/create-template-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/sites/create-template-deployment.md @@ -6,13 +6,13 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.createTemplateDeployment( - '<SITE_ID>', // siteId - '<REPOSITORY>', // repository - '<OWNER>', // owner - '<ROOT_DIRECTORY>', // rootDirectory - '<VERSION>', // version - false // activate (optional) -); +const result = await sites.createTemplateDeployment({ + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-variable.md b/docs/examples/1.8.x/console-web/examples/sites/create-variable.md index d605f2e4aa..18504c1513 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/create-variable.md +++ b/docs/examples/1.8.x/console-web/examples/sites/create-variable.md @@ -6,11 +6,11 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.createVariable( - '<SITE_ID>', // siteId - '<KEY>', // key - '<VALUE>', // value - false // secret (optional) -); +const result = await sites.createVariable({ + siteId: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/create-vcs-deployment.md index dd595db14d..ecb0a9d3f0 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/create-vcs-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/sites/create-vcs-deployment.md @@ -6,11 +6,11 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.createVcsDeployment( - '<SITE_ID>', // siteId - VCSDeploymentType.Branch, // type - '<REFERENCE>', // reference - false // activate (optional) -); +const result = await sites.createVcsDeployment({ + siteId: '<SITE_ID>', + type: VCSDeploymentType.Branch, + reference: '<REFERENCE>', + activate: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create.md b/docs/examples/1.8.x/console-web/examples/sites/create.md index 7880ba361b..967b26f947 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/create.md +++ b/docs/examples/1.8.x/console-web/examples/sites/create.md @@ -6,25 +6,25 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.create( - '<SITE_ID>', // siteId - '<NAME>', // name - .Analog, // framework - .Node145, // buildRuntime - false, // enabled (optional) - false, // logging (optional) - 1, // timeout (optional) - '<INSTALL_COMMAND>', // installCommand (optional) - '<BUILD_COMMAND>', // buildCommand (optional) - '<OUTPUT_DIRECTORY>', // outputDirectory (optional) - .Static, // adapter (optional) - '<INSTALLATION_ID>', // installationId (optional) - '<FALLBACK_FILE>', // fallbackFile (optional) - '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) - '<PROVIDER_BRANCH>', // providerBranch (optional) - false, // providerSilentMode (optional) - '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) - '' // specification (optional) -); +const result = await sites.create({ + siteId: '<SITE_ID>', + name: '<NAME>', + framework: .Analog, + buildRuntime: .Node145, + enabled: false, + logging: false, + timeout: 1, + installCommand: '<INSTALL_COMMAND>', + buildCommand: '<BUILD_COMMAND>', + outputDirectory: '<OUTPUT_DIRECTORY>', + adapter: .Static, + installationId: '<INSTALLATION_ID>', + fallbackFile: '<FALLBACK_FILE>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerBranch: '<PROVIDER_BRANCH>', + providerSilentMode: false, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', + specification: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/delete-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/delete-deployment.md index 357b69c04e..dac0500b73 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/delete-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/sites/delete-deployment.md @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.deleteDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.deleteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/delete-log.md b/docs/examples/1.8.x/console-web/examples/sites/delete-log.md index 25defd1546..18d543775a 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/delete-log.md +++ b/docs/examples/1.8.x/console-web/examples/sites/delete-log.md @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.deleteLog( - '<SITE_ID>', // siteId - '<LOG_ID>' // logId -); +const result = await sites.deleteLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/delete-variable.md b/docs/examples/1.8.x/console-web/examples/sites/delete-variable.md index f6201738d8..a0e6f6fbb0 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/delete-variable.md +++ b/docs/examples/1.8.x/console-web/examples/sites/delete-variable.md @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.deleteVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>' // variableId -); +const result = await sites.deleteVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/delete.md b/docs/examples/1.8.x/console-web/examples/sites/delete.md index e3eff9cbb9..1a289f6ef6 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/delete.md +++ b/docs/examples/1.8.x/console-web/examples/sites/delete.md @@ -6,8 +6,8 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.delete( - '<SITE_ID>' // siteId -); +const result = await sites.delete({ + siteId: '<SITE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/console-web/examples/sites/get-deployment-download.md index 17707eded0..734c371834 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/get-deployment-download.md +++ b/docs/examples/1.8.x/console-web/examples/sites/get-deployment-download.md @@ -6,10 +6,10 @@ const client = new Client() const sites = new Sites(client); -const result = sites.getDeploymentDownload( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>', // deploymentId - DeploymentDownloadType.Source // type (optional) -); +const result = sites.getDeploymentDownload({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.Source +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/get-deployment.md index c3453446e8..dc2a77c29a 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/get-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/sites/get-deployment.md @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.getDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.getDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-log.md b/docs/examples/1.8.x/console-web/examples/sites/get-log.md index eb1cd654c9..18021449cf 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/get-log.md +++ b/docs/examples/1.8.x/console-web/examples/sites/get-log.md @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.getLog( - '<SITE_ID>', // siteId - '<LOG_ID>' // logId -); +const result = await sites.getLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-template.md b/docs/examples/1.8.x/console-web/examples/sites/get-template.md index 4220390d95..1ddc6ec97f 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/get-template.md +++ b/docs/examples/1.8.x/console-web/examples/sites/get-template.md @@ -6,8 +6,8 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.getTemplate( - '<TEMPLATE_ID>' // templateId -); +const result = await sites.getTemplate({ + templateId: '<TEMPLATE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-usage.md b/docs/examples/1.8.x/console-web/examples/sites/get-usage.md index 582a754e07..aa0582d9ed 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/get-usage.md +++ b/docs/examples/1.8.x/console-web/examples/sites/get-usage.md @@ -1,4 +1,4 @@ -import { Client, Sites, SiteUsageRange } from "@appwrite.io/console"; +import { Client, Sites, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.getUsage( - '<SITE_ID>', // siteId - SiteUsageRange.TwentyFourHours // range (optional) -); +const result = await sites.getUsage({ + siteId: '<SITE_ID>', + range: UsageRange.TwentyFourHours +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-variable.md b/docs/examples/1.8.x/console-web/examples/sites/get-variable.md index c0d95326cc..a35bb511c1 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/get-variable.md +++ b/docs/examples/1.8.x/console-web/examples/sites/get-variable.md @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.getVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>' // variableId -); +const result = await sites.getVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get.md b/docs/examples/1.8.x/console-web/examples/sites/get.md index 102cade4c6..07016aab02 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/get.md +++ b/docs/examples/1.8.x/console-web/examples/sites/get.md @@ -6,8 +6,8 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.get( - '<SITE_ID>' // siteId -); +const result = await sites.get({ + siteId: '<SITE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-deployments.md b/docs/examples/1.8.x/console-web/examples/sites/list-deployments.md index 8c0bd8ea2d..0e111db868 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/list-deployments.md +++ b/docs/examples/1.8.x/console-web/examples/sites/list-deployments.md @@ -6,10 +6,10 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.listDeployments( - '<SITE_ID>', // siteId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await sites.listDeployments({ + siteId: '<SITE_ID>', + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-logs.md b/docs/examples/1.8.x/console-web/examples/sites/list-logs.md index 458cc69b2b..a2c0ed91bc 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/list-logs.md +++ b/docs/examples/1.8.x/console-web/examples/sites/list-logs.md @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.listLogs( - '<SITE_ID>', // siteId - [] // queries (optional) -); +const result = await sites.listLogs({ + siteId: '<SITE_ID>', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-templates.md b/docs/examples/1.8.x/console-web/examples/sites/list-templates.md index 58f46bbb4a..b982a18a95 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/list-templates.md +++ b/docs/examples/1.8.x/console-web/examples/sites/list-templates.md @@ -6,11 +6,11 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.listTemplates( - [], // frameworks (optional) - [], // useCases (optional) - 1, // limit (optional) - 0 // offset (optional) -); +const result = await sites.listTemplates({ + frameworks: [], + useCases: [], + limit: 1, + offset: 0 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-usage.md b/docs/examples/1.8.x/console-web/examples/sites/list-usage.md index 7182d78880..1d1f81bf18 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/list-usage.md +++ b/docs/examples/1.8.x/console-web/examples/sites/list-usage.md @@ -1,4 +1,4 @@ -import { Client, Sites, SiteUsageRange } from "@appwrite.io/console"; +import { Client, Sites, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,8 +6,8 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.listUsage( - SiteUsageRange.TwentyFourHours // range (optional) -); +const result = await sites.listUsage({ + range: UsageRange.TwentyFourHours +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-variables.md b/docs/examples/1.8.x/console-web/examples/sites/list-variables.md index de62195aea..0b795d08af 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/list-variables.md +++ b/docs/examples/1.8.x/console-web/examples/sites/list-variables.md @@ -6,8 +6,8 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.listVariables( - '<SITE_ID>' // siteId -); +const result = await sites.listVariables({ + siteId: '<SITE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list.md b/docs/examples/1.8.x/console-web/examples/sites/list.md index fafe3cb229..27ca2c25c1 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/list.md +++ b/docs/examples/1.8.x/console-web/examples/sites/list.md @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await sites.list({ + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/console-web/examples/sites/update-deployment-status.md index 8205c863b0..4b9d2a87db 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/update-deployment-status.md +++ b/docs/examples/1.8.x/console-web/examples/sites/update-deployment-status.md @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.updateDeploymentStatus( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.updateDeploymentStatus({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/update-site-deployment.md index d63541702e..91118ec734 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/update-site-deployment.md +++ b/docs/examples/1.8.x/console-web/examples/sites/update-site-deployment.md @@ -6,9 +6,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.updateSiteDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.updateSiteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/update-variable.md b/docs/examples/1.8.x/console-web/examples/sites/update-variable.md index 1ea9481737..55b5420a39 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/update-variable.md +++ b/docs/examples/1.8.x/console-web/examples/sites/update-variable.md @@ -6,12 +6,12 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.updateVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>', // variableId - '<KEY>', // key - '<VALUE>', // value (optional) - false // secret (optional) -); +const result = await sites.updateVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/update.md b/docs/examples/1.8.x/console-web/examples/sites/update.md index b20a19526d..98ebb2c58c 100644 --- a/docs/examples/1.8.x/console-web/examples/sites/update.md +++ b/docs/examples/1.8.x/console-web/examples/sites/update.md @@ -6,25 +6,25 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.update( - '<SITE_ID>', // siteId - '<NAME>', // name - .Analog, // framework - false, // enabled (optional) - false, // logging (optional) - 1, // timeout (optional) - '<INSTALL_COMMAND>', // installCommand (optional) - '<BUILD_COMMAND>', // buildCommand (optional) - '<OUTPUT_DIRECTORY>', // outputDirectory (optional) - .Node145, // buildRuntime (optional) - .Static, // adapter (optional) - '<FALLBACK_FILE>', // fallbackFile (optional) - '<INSTALLATION_ID>', // installationId (optional) - '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) - '<PROVIDER_BRANCH>', // providerBranch (optional) - false, // providerSilentMode (optional) - '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) - '' // specification (optional) -); +const result = await sites.update({ + siteId: '<SITE_ID>', + name: '<NAME>', + framework: .Analog, + enabled: false, + logging: false, + timeout: 1, + installCommand: '<INSTALL_COMMAND>', + buildCommand: '<BUILD_COMMAND>', + outputDirectory: '<OUTPUT_DIRECTORY>', + buildRuntime: .Node145, + adapter: .Static, + fallbackFile: '<FALLBACK_FILE>', + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerBranch: '<PROVIDER_BRANCH>', + providerSilentMode: false, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', + specification: '' +}); 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 a01bb0945f..2f14cd69d9 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 @@ -6,17 +6,17 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.createBucket( - '<BUCKET_ID>', // bucketId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // fileSecurity (optional) - false, // enabled (optional) - 1, // maximumFileSize (optional) - [], // allowedFileExtensions (optional) - .None, // compression (optional) - false, // encryption (optional) - false // antivirus (optional) -); +const result = await storage.createBucket({ + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: .None, + encryption: false, + antivirus: false +}); console.log(result); 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 8048772389..3182a30927 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 @@ -6,11 +6,11 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.createFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - document.getElementById('uploader').files[0], // file - ["read("any")"] // permissions (optional) -); +const result = await storage.createFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: document.getElementById('uploader').files[0], + permissions: ["read("any")"] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/delete-bucket.md b/docs/examples/1.8.x/console-web/examples/storage/delete-bucket.md index 20084fd7e3..25d4d2023d 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/delete-bucket.md +++ b/docs/examples/1.8.x/console-web/examples/storage/delete-bucket.md @@ -6,8 +6,8 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.deleteBucket( - '<BUCKET_ID>' // bucketId -); +const result = await storage.deleteBucket({ + bucketId: '<BUCKET_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/delete-file.md b/docs/examples/1.8.x/console-web/examples/storage/delete-file.md index 41afa9e375..e8750be3c3 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/delete-file.md +++ b/docs/examples/1.8.x/console-web/examples/storage/delete-file.md @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.deleteFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>' // fileId -); +const result = await storage.deleteFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-bucket-usage.md b/docs/examples/1.8.x/console-web/examples/storage/get-bucket-usage.md index 1007454c2e..0868a2ec91 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/get-bucket-usage.md +++ b/docs/examples/1.8.x/console-web/examples/storage/get-bucket-usage.md @@ -1,4 +1,4 @@ -import { Client, Storage, StorageUsageRange } from "@appwrite.io/console"; +import { Client, Storage, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.getBucketUsage( - '<BUCKET_ID>', // bucketId - StorageUsageRange.TwentyFourHours // range (optional) -); +const result = await storage.getBucketUsage({ + bucketId: '<BUCKET_ID>', + range: UsageRange.TwentyFourHours +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-bucket.md b/docs/examples/1.8.x/console-web/examples/storage/get-bucket.md index ec77dd2bf5..7519b2b1c2 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/get-bucket.md +++ b/docs/examples/1.8.x/console-web/examples/storage/get-bucket.md @@ -6,8 +6,8 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.getBucket( - '<BUCKET_ID>' // bucketId -); +const result = await storage.getBucket({ + bucketId: '<BUCKET_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-file-download.md b/docs/examples/1.8.x/console-web/examples/storage/get-file-download.md index 8e98105ef3..c9d25cc8b9 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/get-file-download.md +++ b/docs/examples/1.8.x/console-web/examples/storage/get-file-download.md @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileDownload( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<TOKEN>' // token (optional) -); +const result = storage.getFileDownload({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-file-preview.md b/docs/examples/1.8.x/console-web/examples/storage/get-file-preview.md index b14a02769e..d224151351 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/get-file-preview.md +++ b/docs/examples/1.8.x/console-web/examples/storage/get-file-preview.md @@ -6,21 +6,21 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFilePreview( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - 0, // width (optional) - 0, // height (optional) - ImageGravity.Center, // gravity (optional) - -1, // quality (optional) - 0, // borderWidth (optional) - '', // borderColor (optional) - 0, // borderRadius (optional) - 0, // opacity (optional) - -360, // rotation (optional) - '', // background (optional) - ImageFormat.Jpg, // output (optional) - '<TOKEN>' // token (optional) -); +const result = storage.getFilePreview({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, + height: 0, + gravity: ImageGravity.Center, + quality: -1, + borderWidth: 0, + borderColor: '', + borderRadius: 0, + opacity: 0, + rotation: -360, + background: '', + output: ImageFormat.Jpg, + token: '<TOKEN>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-file-view.md b/docs/examples/1.8.x/console-web/examples/storage/get-file-view.md index 03db75f044..200414e77b 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/get-file-view.md +++ b/docs/examples/1.8.x/console-web/examples/storage/get-file-view.md @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileView( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<TOKEN>' // token (optional) -); +const result = storage.getFileView({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-file.md b/docs/examples/1.8.x/console-web/examples/storage/get-file.md index 76658edb0b..5f5370dcf3 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/get-file.md +++ b/docs/examples/1.8.x/console-web/examples/storage/get-file.md @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.getFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>' // fileId -); +const result = await storage.getFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-usage.md b/docs/examples/1.8.x/console-web/examples/storage/get-usage.md index b57f8f8b03..373890d6db 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/get-usage.md +++ b/docs/examples/1.8.x/console-web/examples/storage/get-usage.md @@ -1,4 +1,4 @@ -import { Client, Storage, StorageUsageRange } from "@appwrite.io/console"; +import { Client, Storage, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,8 +6,8 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.getUsage( - StorageUsageRange.TwentyFourHours // range (optional) -); +const result = await storage.getUsage({ + range: UsageRange.TwentyFourHours +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/list-buckets.md b/docs/examples/1.8.x/console-web/examples/storage/list-buckets.md index f82c01a879..d498949683 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/list-buckets.md +++ b/docs/examples/1.8.x/console-web/examples/storage/list-buckets.md @@ -6,9 +6,9 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.listBuckets( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await storage.listBuckets({ + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/list-files.md b/docs/examples/1.8.x/console-web/examples/storage/list-files.md index 9076b8997f..010d5012b9 100644 --- a/docs/examples/1.8.x/console-web/examples/storage/list-files.md +++ b/docs/examples/1.8.x/console-web/examples/storage/list-files.md @@ -6,10 +6,10 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.listFiles( - '<BUCKET_ID>', // bucketId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await storage.listFiles({ + bucketId: '<BUCKET_ID>', + queries: [], + search: '<SEARCH>' +}); 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 d6c125a213..92acaa1e42 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 @@ -6,17 +6,17 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.updateBucket( - '<BUCKET_ID>', // bucketId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // fileSecurity (optional) - false, // enabled (optional) - 1, // maximumFileSize (optional) - [], // allowedFileExtensions (optional) - .None, // compression (optional) - false, // encryption (optional) - false // antivirus (optional) -); +const result = await storage.updateBucket({ + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: .None, + encryption: false, + antivirus: false +}); console.log(result); 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 79830f77d2..5398256905 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 @@ -6,11 +6,11 @@ const client = new Client() const storage = new Storage(client); -const result = await storage.updateFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<NAME>', // name (optional) - ["read("any")"] // permissions (optional) -); +const result = await storage.updateFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', + permissions: ["read("any")"] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..b946e38b0d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + array: false +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..cc2b1e71be --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + array: false +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..d73434b66a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-email-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createEmailColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + array: false +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..5008963c85 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-enum-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + array: false +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..41d4e97bf6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-float-column.md @@ -0,0 +1,20 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, + max: null, + default: null, + array: false +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-index.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..5bc28d7382 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-index.md @@ -0,0 +1,19 @@ +import { Client, TablesDb, IndexType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType.Key, + columns: [], + orders: [], + lengths: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..a6aafccd57 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-integer-column.md @@ -0,0 +1,20 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, + max: null, + default: null, + array: false +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..30020e9403 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-ip-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + array: false +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..6a2d0c9641 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,20 @@ +import { Client, TablesDb, RelationshipType, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType.OneToOne, + twoWay: false, + key: '', + twoWayKey: '', + onDelete: RelationMutate.Cascade +}); + +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 new file mode 100644 index 0000000000..f54a428533 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..75499b3d88 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..36e436051c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-string-column.md @@ -0,0 +1,20 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createStringColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', + array: false, + encrypt: false +}); + +console.log(result); 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 new file mode 100644 index 0000000000..fc49449b4f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-table.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], + rowSecurity: false, + enabled: false +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..c623f863b9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create-url-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.createUrlColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + array: false +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/create.md b/docs/examples/1.8.x/console-web/examples/tablesdb/create.md new file mode 100644 index 0000000000..c3fce72556 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/create.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..877f4e283a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.decrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, + min: null +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..f05c59ed10 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-column.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.deleteColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..68c76434ea --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-index.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.deleteIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..1b10d0ba95 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-row.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.deleteRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..992092b471 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.deleteRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..5d035e9de4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/delete-table.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.deleteTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/delete.md b/docs/examples/1.8.x/console-web/examples/tablesdb/delete.md new file mode 100644 index 0000000000..4237e92d37 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/delete.md @@ -0,0 +1,13 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.delete({ + databaseId: '<DATABASE_ID>' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..307cf0a0fd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get-column.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.getColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get-index.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..3599ae7007 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get-index.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.getIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get-row.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..f09122787a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get-row.md @@ -0,0 +1,16 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.getRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get-table-usage.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get-table-usage.md new file mode 100644 index 0000000000..3c8f6875b1 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get-table-usage.md @@ -0,0 +1,15 @@ +import { Client, TablesDb, UsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.getTableUsage({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + range: UsageRange.TwentyFourHours +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get-table.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..bd1ae6f7bf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get-table.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.getTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get-usage.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get-usage.md new file mode 100644 index 0000000000..76cf398c7b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get-usage.md @@ -0,0 +1,14 @@ +import { Client, TablesDb, UsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.getUsage({ + databaseId: '<DATABASE_ID>', + range: UsageRange.TwentyFourHours +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/get.md b/docs/examples/1.8.x/console-web/examples/tablesdb/get.md new file mode 100644 index 0000000000..b97ecdbb57 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/get.md @@ -0,0 +1,13 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.get({ + databaseId: '<DATABASE_ID>' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..61b2d4b9c5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/increment-row-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.incrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, + max: null +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..5c18ef020b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-columns.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.listColumns({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..f555de9585 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-indexes.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.listIndexes({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-row-logs.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-row-logs.md new file mode 100644 index 0000000000..e8eb90802f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-row-logs.md @@ -0,0 +1,16 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.listRowLogs({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..c3030c6f92 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.listRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-table-logs.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-table-logs.md new file mode 100644 index 0000000000..329e7910d6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-table-logs.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.listTableLogs({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..a71c82bf57 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-tables.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.listTables({ + databaseId: '<DATABASE_ID>', + queries: [], + search: '<SEARCH>' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list-usage.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list-usage.md new file mode 100644 index 0000000000..b741479d4c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list-usage.md @@ -0,0 +1,13 @@ +import { Client, TablesDb, UsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.listUsage({ + range: UsageRange.TwentyFourHours +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/list.md b/docs/examples/1.8.x/console-web/examples/tablesdb/list.md new file mode 100644 index 0000000000..683d721c71 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/list.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.list({ + queries: [], + search: '<SEARCH>' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..f28f052737 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + newKey: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..a2f05e8e4f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..9750673d4f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-email-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateEmailColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..8fa1ebbebf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-enum-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..6740b1b5c8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-float-column.md @@ -0,0 +1,20 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, + max: null, + newKey: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..ae698ce68f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-integer-column.md @@ -0,0 +1,20 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, + max: null, + newKey: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..437488a475 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-ip-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..9f34a2548d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate.Cascade, + newKey: '' +}); + +console.log(result); 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 new file mode 100644 index 0000000000..c9707a5194 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..73e963d5d7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-rows.md @@ -0,0 +1,16 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: {}, + queries: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..ab01d7ccdd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-string-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateStringColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, + newKey: '' +}); + +console.log(result); 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 new file mode 100644 index 0000000000..58c65e93a8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-table.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], + rowSecurity: false, + enabled: false +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..51edefa22e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update-url-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.updateUrlColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/update.md b/docs/examples/1.8.x/console-web/examples/tablesdb/update.md new file mode 100644 index 0000000000..5e3c2d51ec --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/update.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false +}); + +console.log(result); 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 new file mode 100644 index 0000000000..d114f37b3c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.upsertRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..c93dffb76e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tablesdb/upsert-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tablesDb = new TablesDb(client); + +const result = await tablesDb.upsertRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +}); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/create-membership.md b/docs/examples/1.8.x/console-web/examples/teams/create-membership.md index 18f6b0ab4d..8774f9aac1 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/create-membership.md +++ b/docs/examples/1.8.x/console-web/examples/teams/create-membership.md @@ -6,14 +6,14 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.createMembership( - '<TEAM_ID>', // teamId - [], // roles - 'email@example.com', // email (optional) - '<USER_ID>', // userId (optional) - '+12065550100', // phone (optional) - 'https://example.com', // url (optional) - '<NAME>' // name (optional) -); +const result = await teams.createMembership({ + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', + userId: '<USER_ID>', + phone: '+12065550100', + url: 'https://example.com', + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/create.md b/docs/examples/1.8.x/console-web/examples/teams/create.md index a33e71ad5f..c03e5d2d48 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/create.md +++ b/docs/examples/1.8.x/console-web/examples/teams/create.md @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.create( - '<TEAM_ID>', // teamId - '<NAME>', // name - [] // roles (optional) -); +const result = await teams.create({ + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/delete-membership.md b/docs/examples/1.8.x/console-web/examples/teams/delete-membership.md index a63ed46749..43edacebde 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/delete-membership.md +++ b/docs/examples/1.8.x/console-web/examples/teams/delete-membership.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.deleteMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>' // membershipId -); +const result = await teams.deleteMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/delete.md b/docs/examples/1.8.x/console-web/examples/teams/delete.md index e97cc05cc7..9ebc45b39a 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/delete.md +++ b/docs/examples/1.8.x/console-web/examples/teams/delete.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.delete( - '<TEAM_ID>' // teamId -); +const result = await teams.delete({ + teamId: '<TEAM_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/get-membership.md b/docs/examples/1.8.x/console-web/examples/teams/get-membership.md index bc31ee1470..a766060bc9 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/get-membership.md +++ b/docs/examples/1.8.x/console-web/examples/teams/get-membership.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.getMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>' // membershipId -); +const result = await teams.getMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/get-prefs.md b/docs/examples/1.8.x/console-web/examples/teams/get-prefs.md index 394848c5c3..a044e8a4d7 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/get-prefs.md +++ b/docs/examples/1.8.x/console-web/examples/teams/get-prefs.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.getPrefs( - '<TEAM_ID>' // teamId -); +const result = await teams.getPrefs({ + teamId: '<TEAM_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/get.md b/docs/examples/1.8.x/console-web/examples/teams/get.md index 8c752a9828..2ec6271f0f 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/get.md +++ b/docs/examples/1.8.x/console-web/examples/teams/get.md @@ -6,8 +6,8 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.get( - '<TEAM_ID>' // teamId -); +const result = await teams.get({ + teamId: '<TEAM_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/list-logs.md b/docs/examples/1.8.x/console-web/examples/teams/list-logs.md index 004e627f0d..34fc89d4f0 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/list-logs.md +++ b/docs/examples/1.8.x/console-web/examples/teams/list-logs.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.listLogs( - '<TEAM_ID>', // teamId - [] // queries (optional) -); +const result = await teams.listLogs({ + teamId: '<TEAM_ID>', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/list-memberships.md b/docs/examples/1.8.x/console-web/examples/teams/list-memberships.md index 22fb731175..53e24dc55c 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/list-memberships.md +++ b/docs/examples/1.8.x/console-web/examples/teams/list-memberships.md @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.listMemberships( - '<TEAM_ID>', // teamId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await teams.listMemberships({ + teamId: '<TEAM_ID>', + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/list.md b/docs/examples/1.8.x/console-web/examples/teams/list.md index c51dfaf389..b4ab80c912 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/list.md +++ b/docs/examples/1.8.x/console-web/examples/teams/list.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await teams.list({ + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/update-membership-status.md b/docs/examples/1.8.x/console-web/examples/teams/update-membership-status.md index c8e608278e..ab6bc93d4f 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/update-membership-status.md +++ b/docs/examples/1.8.x/console-web/examples/teams/update-membership-status.md @@ -6,11 +6,11 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateMembershipStatus( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>', // membershipId - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await teams.updateMembershipStatus({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/update-membership.md b/docs/examples/1.8.x/console-web/examples/teams/update-membership.md index d3e0164a17..9a94f51a96 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/update-membership.md +++ b/docs/examples/1.8.x/console-web/examples/teams/update-membership.md @@ -6,10 +6,10 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>', // membershipId - [] // roles -); +const result = await teams.updateMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/update-name.md b/docs/examples/1.8.x/console-web/examples/teams/update-name.md index 43703d0c98..82d3d0fac2 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/update-name.md +++ b/docs/examples/1.8.x/console-web/examples/teams/update-name.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updateName( - '<TEAM_ID>', // teamId - '<NAME>' // name -); +const result = await teams.updateName({ + teamId: '<TEAM_ID>', + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/update-prefs.md b/docs/examples/1.8.x/console-web/examples/teams/update-prefs.md index e0acff0a30..1519f5398a 100644 --- a/docs/examples/1.8.x/console-web/examples/teams/update-prefs.md +++ b/docs/examples/1.8.x/console-web/examples/teams/update-prefs.md @@ -6,9 +6,9 @@ const client = new Client() const teams = new Teams(client); -const result = await teams.updatePrefs( - '<TEAM_ID>', // teamId - {} // prefs -); +const result = await teams.updatePrefs({ + teamId: '<TEAM_ID>', + prefs: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/create-file-token.md b/docs/examples/1.8.x/console-web/examples/tokens/create-file-token.md index bac4863159..c509c9ec24 100644 --- a/docs/examples/1.8.x/console-web/examples/tokens/create-file-token.md +++ b/docs/examples/1.8.x/console-web/examples/tokens/create-file-token.md @@ -6,10 +6,10 @@ const client = new Client() const tokens = new Tokens(client); -const result = await tokens.createFileToken( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '' // expire (optional) -); +const result = await tokens.createFileToken({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + expire: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/delete.md b/docs/examples/1.8.x/console-web/examples/tokens/delete.md index 0a871d0fe4..8591dce076 100644 --- a/docs/examples/1.8.x/console-web/examples/tokens/delete.md +++ b/docs/examples/1.8.x/console-web/examples/tokens/delete.md @@ -6,8 +6,8 @@ const client = new Client() const tokens = new Tokens(client); -const result = await tokens.delete( - '<TOKEN_ID>' // tokenId -); +const result = await tokens.delete({ + tokenId: '<TOKEN_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/get.md b/docs/examples/1.8.x/console-web/examples/tokens/get.md index ee83fb83c2..33916c1939 100644 --- a/docs/examples/1.8.x/console-web/examples/tokens/get.md +++ b/docs/examples/1.8.x/console-web/examples/tokens/get.md @@ -6,8 +6,8 @@ const client = new Client() const tokens = new Tokens(client); -const result = await tokens.get( - '<TOKEN_ID>' // tokenId -); +const result = await tokens.get({ + tokenId: '<TOKEN_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/list.md b/docs/examples/1.8.x/console-web/examples/tokens/list.md index 33077e26dd..9fbd5dc75b 100644 --- a/docs/examples/1.8.x/console-web/examples/tokens/list.md +++ b/docs/examples/1.8.x/console-web/examples/tokens/list.md @@ -6,10 +6,10 @@ const client = new Client() const tokens = new Tokens(client); -const result = await tokens.list( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - [] // queries (optional) -); +const result = await tokens.list({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/update.md b/docs/examples/1.8.x/console-web/examples/tokens/update.md index ce3b80dd22..49911cd2d2 100644 --- a/docs/examples/1.8.x/console-web/examples/tokens/update.md +++ b/docs/examples/1.8.x/console-web/examples/tokens/update.md @@ -6,9 +6,9 @@ const client = new Client() const tokens = new Tokens(client); -const result = await tokens.update( - '<TOKEN_ID>', // tokenId - '' // expire (optional) -); +const result = await tokens.update({ + tokenId: '<TOKEN_ID>', + expire: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-argon2user.md b/docs/examples/1.8.x/console-web/examples/users/create-argon2user.md index c190225d4b..e9c506f5cd 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-argon2user.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-argon2user.md @@ -6,11 +6,11 @@ const client = new Client() const users = new Users(client); -const result = await users.createArgon2User( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const result = await users.createArgon2User({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/console-web/examples/users/create-bcrypt-user.md index 9c51181890..aa76fe4b09 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-bcrypt-user.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-bcrypt-user.md @@ -6,11 +6,11 @@ const client = new Client() const users = new Users(client); -const result = await users.createBcryptUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const result = await users.createBcryptUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-j-w-t.md b/docs/examples/1.8.x/console-web/examples/users/create-j-w-t.md index 7d50fbce03..a132905534 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-j-w-t.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-j-w-t.md @@ -6,10 +6,10 @@ const client = new Client() const users = new Users(client); -const result = await users.createJWT( - '<USER_ID>', // userId - '<SESSION_ID>', // sessionId (optional) - 0 // duration (optional) -); +const result = await users.createJWT({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', + duration: 0 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-m-d5user.md b/docs/examples/1.8.x/console-web/examples/users/create-m-d5user.md index 610f795ab0..d193f4a5c0 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-m-d5user.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-m-d5user.md @@ -6,11 +6,11 @@ const client = new Client() const users = new Users(client); -const result = await users.createMD5User( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const result = await users.createMD5User({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/users/create-mfa-recovery-codes.md index ea52af9cf8..bf5a169b9d 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-mfa-recovery-codes.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.createMfaRecoveryCodes( - '<USER_ID>' // userId -); +const result = await users.createMfaRecoveryCodes({ + userId: '<USER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/console-web/examples/users/create-p-h-pass-user.md index c9437c5c38..85da361c35 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-p-h-pass-user.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-p-h-pass-user.md @@ -6,11 +6,11 @@ const client = new Client() const users = new Users(client); -const result = await users.createPHPassUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const result = await users.createPHPassUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/console-web/examples/users/create-s-h-a-user.md index b70f09c133..622bc698b8 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-s-h-a-user.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-s-h-a-user.md @@ -6,12 +6,12 @@ const client = new Client() const users = new Users(client); -const result = await users.createSHAUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - PasswordHash.Sha1, // passwordVersion (optional) - '<NAME>' // name (optional) -); +const result = await users.createSHAUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: PasswordHash.Sha1, + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/console-web/examples/users/create-scrypt-modified-user.md index c0a0435b67..51a7afb08a 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-scrypt-modified-user.md @@ -6,14 +6,14 @@ const client = new Client() const users = new Users(client); -const result = await users.createScryptModifiedUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<PASSWORD_SALT>', // passwordSalt - '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator - '<PASSWORD_SIGNER_KEY>', // passwordSignerKey - '<NAME>' // name (optional) -); +const result = await users.createScryptModifiedUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/console-web/examples/users/create-scrypt-user.md index f1cb93637a..ca252a5db1 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-scrypt-user.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-scrypt-user.md @@ -6,16 +6,16 @@ const client = new Client() const users = new Users(client); -const result = await users.createScryptUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<PASSWORD_SALT>', // passwordSalt - null, // passwordCpu - null, // passwordMemory - null, // passwordParallel - null, // passwordLength - '<NAME>' // name (optional) -); +const result = await users.createScryptUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: null, + passwordMemory: null, + passwordParallel: null, + passwordLength: null, + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-session.md b/docs/examples/1.8.x/console-web/examples/users/create-session.md index 5393c4408d..917fbaa341 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-session.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-session.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.createSession( - '<USER_ID>' // userId -); +const result = await users.createSession({ + userId: '<USER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-target.md b/docs/examples/1.8.x/console-web/examples/users/create-target.md index 4c8eac9c45..af87313dab 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-target.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-target.md @@ -6,13 +6,13 @@ const client = new Client() const users = new Users(client); -const result = await users.createTarget( - '<USER_ID>', // userId - '<TARGET_ID>', // targetId - MessagingProviderType.Email, // providerType - '<IDENTIFIER>', // identifier - '<PROVIDER_ID>', // providerId (optional) - '<NAME>' // name (optional) -); +const result = await users.createTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: MessagingProviderType.Email, + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-token.md b/docs/examples/1.8.x/console-web/examples/users/create-token.md index 58e8c9f035..d86f12f4a5 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create-token.md +++ b/docs/examples/1.8.x/console-web/examples/users/create-token.md @@ -6,10 +6,10 @@ const client = new Client() const users = new Users(client); -const result = await users.createToken( - '<USER_ID>', // userId - 4, // length (optional) - 60 // expire (optional) -); +const result = await users.createToken({ + userId: '<USER_ID>', + length: 4, + expire: 60 +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create.md b/docs/examples/1.8.x/console-web/examples/users/create.md index 131ef1290c..cbd2e15647 100644 --- a/docs/examples/1.8.x/console-web/examples/users/create.md +++ b/docs/examples/1.8.x/console-web/examples/users/create.md @@ -6,12 +6,12 @@ const client = new Client() const users = new Users(client); -const result = await users.create( - '<USER_ID>', // userId - 'email@example.com', // email (optional) - '+12065550100', // phone (optional) - '', // password (optional) - '<NAME>' // name (optional) -); +const result = await users.create({ + userId: '<USER_ID>', + email: 'email@example.com', + phone: '+12065550100', + password: '', + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-identity.md b/docs/examples/1.8.x/console-web/examples/users/delete-identity.md index cf7425c843..9961f4a53f 100644 --- a/docs/examples/1.8.x/console-web/examples/users/delete-identity.md +++ b/docs/examples/1.8.x/console-web/examples/users/delete-identity.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.deleteIdentity( - '<IDENTITY_ID>' // identityId -); +const result = await users.deleteIdentity({ + identityId: '<IDENTITY_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/console-web/examples/users/delete-mfa-authenticator.md index 023686ae26..768dd84725 100644 --- a/docs/examples/1.8.x/console-web/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/console-web/examples/users/delete-mfa-authenticator.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.deleteMfaAuthenticator( - '<USER_ID>', // userId - AuthenticatorType.Totp // type -); +const result = await users.deleteMfaAuthenticator({ + userId: '<USER_ID>', + type: AuthenticatorType.Totp +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-session.md b/docs/examples/1.8.x/console-web/examples/users/delete-session.md index ca6880431b..08342e854e 100644 --- a/docs/examples/1.8.x/console-web/examples/users/delete-session.md +++ b/docs/examples/1.8.x/console-web/examples/users/delete-session.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.deleteSession( - '<USER_ID>', // userId - '<SESSION_ID>' // sessionId -); +const result = await users.deleteSession({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-sessions.md b/docs/examples/1.8.x/console-web/examples/users/delete-sessions.md index 1137a8b29b..0f4d5efe0f 100644 --- a/docs/examples/1.8.x/console-web/examples/users/delete-sessions.md +++ b/docs/examples/1.8.x/console-web/examples/users/delete-sessions.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.deleteSessions( - '<USER_ID>' // userId -); +const result = await users.deleteSessions({ + userId: '<USER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-target.md b/docs/examples/1.8.x/console-web/examples/users/delete-target.md index 386d8a90b5..44c65cda48 100644 --- a/docs/examples/1.8.x/console-web/examples/users/delete-target.md +++ b/docs/examples/1.8.x/console-web/examples/users/delete-target.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.deleteTarget( - '<USER_ID>', // userId - '<TARGET_ID>' // targetId -); +const result = await users.deleteTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete.md b/docs/examples/1.8.x/console-web/examples/users/delete.md index 1d4b1d0e1c..dc702403f8 100644 --- a/docs/examples/1.8.x/console-web/examples/users/delete.md +++ b/docs/examples/1.8.x/console-web/examples/users/delete.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.delete( - '<USER_ID>' // userId -); +const result = await users.delete({ + userId: '<USER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/users/get-mfa-recovery-codes.md index 02d17649c8..f2e61362e1 100644 --- a/docs/examples/1.8.x/console-web/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/console-web/examples/users/get-mfa-recovery-codes.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.getMfaRecoveryCodes( - '<USER_ID>' // userId -); +const result = await users.getMfaRecoveryCodes({ + userId: '<USER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get-prefs.md b/docs/examples/1.8.x/console-web/examples/users/get-prefs.md index b24f2bd3ae..61e575b12b 100644 --- a/docs/examples/1.8.x/console-web/examples/users/get-prefs.md +++ b/docs/examples/1.8.x/console-web/examples/users/get-prefs.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.getPrefs( - '<USER_ID>' // userId -); +const result = await users.getPrefs({ + userId: '<USER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get-target.md b/docs/examples/1.8.x/console-web/examples/users/get-target.md index cfa7d3d5cd..c5e209032c 100644 --- a/docs/examples/1.8.x/console-web/examples/users/get-target.md +++ b/docs/examples/1.8.x/console-web/examples/users/get-target.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.getTarget( - '<USER_ID>', // userId - '<TARGET_ID>' // targetId -); +const result = await users.getTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get-usage.md b/docs/examples/1.8.x/console-web/examples/users/get-usage.md index bd87faf10f..9dd7e3e515 100644 --- a/docs/examples/1.8.x/console-web/examples/users/get-usage.md +++ b/docs/examples/1.8.x/console-web/examples/users/get-usage.md @@ -1,4 +1,4 @@ -import { Client, Users, UserUsageRange } from "@appwrite.io/console"; +import { Client, Users, UsageRange } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.getUsage( - UserUsageRange.TwentyFourHours // range (optional) -); +const result = await users.getUsage({ + range: UsageRange.TwentyFourHours +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get.md b/docs/examples/1.8.x/console-web/examples/users/get.md index 77f5006890..0c6ead786b 100644 --- a/docs/examples/1.8.x/console-web/examples/users/get.md +++ b/docs/examples/1.8.x/console-web/examples/users/get.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.get( - '<USER_ID>' // userId -); +const result = await users.get({ + userId: '<USER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-identities.md b/docs/examples/1.8.x/console-web/examples/users/list-identities.md index 34b92900a7..acd5a5b2ed 100644 --- a/docs/examples/1.8.x/console-web/examples/users/list-identities.md +++ b/docs/examples/1.8.x/console-web/examples/users/list-identities.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.listIdentities( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await users.listIdentities({ + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-logs.md b/docs/examples/1.8.x/console-web/examples/users/list-logs.md index 85e6cf5071..7db4242447 100644 --- a/docs/examples/1.8.x/console-web/examples/users/list-logs.md +++ b/docs/examples/1.8.x/console-web/examples/users/list-logs.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.listLogs( - '<USER_ID>', // userId - [] // queries (optional) -); +const result = await users.listLogs({ + userId: '<USER_ID>', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-memberships.md b/docs/examples/1.8.x/console-web/examples/users/list-memberships.md index 01ce244361..abfc1150a3 100644 --- a/docs/examples/1.8.x/console-web/examples/users/list-memberships.md +++ b/docs/examples/1.8.x/console-web/examples/users/list-memberships.md @@ -6,10 +6,10 @@ const client = new Client() const users = new Users(client); -const result = await users.listMemberships( - '<USER_ID>', // userId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await users.listMemberships({ + userId: '<USER_ID>', + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/console-web/examples/users/list-mfa-factors.md index fe1dd23594..03cb9e6a70 100644 --- a/docs/examples/1.8.x/console-web/examples/users/list-mfa-factors.md +++ b/docs/examples/1.8.x/console-web/examples/users/list-mfa-factors.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.listMfaFactors( - '<USER_ID>' // userId -); +const result = await users.listMfaFactors({ + userId: '<USER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-sessions.md b/docs/examples/1.8.x/console-web/examples/users/list-sessions.md index e3d5d6e51d..a506008fd7 100644 --- a/docs/examples/1.8.x/console-web/examples/users/list-sessions.md +++ b/docs/examples/1.8.x/console-web/examples/users/list-sessions.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.listSessions( - '<USER_ID>' // userId -); +const result = await users.listSessions({ + userId: '<USER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-targets.md b/docs/examples/1.8.x/console-web/examples/users/list-targets.md index 58f4079aee..5cf07689b3 100644 --- a/docs/examples/1.8.x/console-web/examples/users/list-targets.md +++ b/docs/examples/1.8.x/console-web/examples/users/list-targets.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.listTargets( - '<USER_ID>', // userId - [] // queries (optional) -); +const result = await users.listTargets({ + userId: '<USER_ID>', + queries: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list.md b/docs/examples/1.8.x/console-web/examples/users/list.md index d2189b9c93..ec0171a805 100644 --- a/docs/examples/1.8.x/console-web/examples/users/list.md +++ b/docs/examples/1.8.x/console-web/examples/users/list.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await users.list({ + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-email-verification.md b/docs/examples/1.8.x/console-web/examples/users/update-email-verification.md index 3fedd4b86f..f5af0085b7 100644 --- a/docs/examples/1.8.x/console-web/examples/users/update-email-verification.md +++ b/docs/examples/1.8.x/console-web/examples/users/update-email-verification.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updateEmailVerification( - '<USER_ID>', // userId - false // emailVerification -); +const result = await users.updateEmailVerification({ + userId: '<USER_ID>', + emailVerification: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-email.md b/docs/examples/1.8.x/console-web/examples/users/update-email.md index 9922376778..ed5c83886b 100644 --- a/docs/examples/1.8.x/console-web/examples/users/update-email.md +++ b/docs/examples/1.8.x/console-web/examples/users/update-email.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updateEmail( - '<USER_ID>', // userId - 'email@example.com' // email -); +const result = await users.updateEmail({ + userId: '<USER_ID>', + email: 'email@example.com' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-labels.md b/docs/examples/1.8.x/console-web/examples/users/update-labels.md index 4fc268fc3c..e25ee6a6b0 100644 --- a/docs/examples/1.8.x/console-web/examples/users/update-labels.md +++ b/docs/examples/1.8.x/console-web/examples/users/update-labels.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updateLabels( - '<USER_ID>', // userId - [] // labels -); +const result = await users.updateLabels({ + userId: '<USER_ID>', + labels: [] +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/users/update-mfa-recovery-codes.md index 041cd9098b..a90f49ea28 100644 --- a/docs/examples/1.8.x/console-web/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/console-web/examples/users/update-mfa-recovery-codes.md @@ -6,8 +6,8 @@ const client = new Client() const users = new Users(client); -const result = await users.updateMfaRecoveryCodes( - '<USER_ID>' // userId -); +const result = await users.updateMfaRecoveryCodes({ + userId: '<USER_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-mfa.md b/docs/examples/1.8.x/console-web/examples/users/update-mfa.md index af710ecd48..56dfb5dd66 100644 --- a/docs/examples/1.8.x/console-web/examples/users/update-mfa.md +++ b/docs/examples/1.8.x/console-web/examples/users/update-mfa.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updateMfa( - '<USER_ID>', // userId - false // mfa -); +const result = await users.updateMfa({ + userId: '<USER_ID>', + mfa: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-name.md b/docs/examples/1.8.x/console-web/examples/users/update-name.md index b57cb33730..7433abca41 100644 --- a/docs/examples/1.8.x/console-web/examples/users/update-name.md +++ b/docs/examples/1.8.x/console-web/examples/users/update-name.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updateName( - '<USER_ID>', // userId - '<NAME>' // name -); +const result = await users.updateName({ + userId: '<USER_ID>', + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-password.md b/docs/examples/1.8.x/console-web/examples/users/update-password.md index e9c7f9b51d..5c620e60f1 100644 --- a/docs/examples/1.8.x/console-web/examples/users/update-password.md +++ b/docs/examples/1.8.x/console-web/examples/users/update-password.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updatePassword( - '<USER_ID>', // userId - '' // password -); +const result = await users.updatePassword({ + userId: '<USER_ID>', + password: '' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-phone-verification.md b/docs/examples/1.8.x/console-web/examples/users/update-phone-verification.md index a29e38591c..a163d34406 100644 --- a/docs/examples/1.8.x/console-web/examples/users/update-phone-verification.md +++ b/docs/examples/1.8.x/console-web/examples/users/update-phone-verification.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updatePhoneVerification( - '<USER_ID>', // userId - false // phoneVerification -); +const result = await users.updatePhoneVerification({ + userId: '<USER_ID>', + phoneVerification: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-phone.md b/docs/examples/1.8.x/console-web/examples/users/update-phone.md index a87780161b..a8a31dcfc9 100644 --- a/docs/examples/1.8.x/console-web/examples/users/update-phone.md +++ b/docs/examples/1.8.x/console-web/examples/users/update-phone.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updatePhone( - '<USER_ID>', // userId - '+12065550100' // number -); +const result = await users.updatePhone({ + userId: '<USER_ID>', + number: '+12065550100' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-prefs.md b/docs/examples/1.8.x/console-web/examples/users/update-prefs.md index 7d9993bbb1..a08e27d10e 100644 --- a/docs/examples/1.8.x/console-web/examples/users/update-prefs.md +++ b/docs/examples/1.8.x/console-web/examples/users/update-prefs.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updatePrefs( - '<USER_ID>', // userId - {} // prefs -); +const result = await users.updatePrefs({ + userId: '<USER_ID>', + prefs: {} +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-status.md b/docs/examples/1.8.x/console-web/examples/users/update-status.md index 5e823e7a48..cdb393dd16 100644 --- a/docs/examples/1.8.x/console-web/examples/users/update-status.md +++ b/docs/examples/1.8.x/console-web/examples/users/update-status.md @@ -6,9 +6,9 @@ const client = new Client() const users = new Users(client); -const result = await users.updateStatus( - '<USER_ID>', // userId - false // status -); +const result = await users.updateStatus({ + userId: '<USER_ID>', + status: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-target.md b/docs/examples/1.8.x/console-web/examples/users/update-target.md index ed33fe9bb0..6163e959d3 100644 --- a/docs/examples/1.8.x/console-web/examples/users/update-target.md +++ b/docs/examples/1.8.x/console-web/examples/users/update-target.md @@ -6,12 +6,12 @@ const client = new Client() const users = new Users(client); -const result = await users.updateTarget( - '<USER_ID>', // userId - '<TARGET_ID>', // targetId - '<IDENTIFIER>', // identifier (optional) - '<PROVIDER_ID>', // providerId (optional) - '<NAME>' // name (optional) -); +const result = await users.updateTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', + name: '<NAME>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/create-repository-detection.md b/docs/examples/1.8.x/console-web/examples/vcs/create-repository-detection.md index 84de3ffb26..f08c6592f9 100644 --- a/docs/examples/1.8.x/console-web/examples/vcs/create-repository-detection.md +++ b/docs/examples/1.8.x/console-web/examples/vcs/create-repository-detection.md @@ -6,11 +6,11 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.createRepositoryDetection( - '<INSTALLATION_ID>', // installationId - '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId - VCSDetectionType.Runtime, // type - '<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional) -); +const result = await vcs.createRepositoryDetection({ + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + type: VCSDetectionType.Runtime, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/create-repository.md b/docs/examples/1.8.x/console-web/examples/vcs/create-repository.md index 1d08ac5b09..7e4e629099 100644 --- a/docs/examples/1.8.x/console-web/examples/vcs/create-repository.md +++ b/docs/examples/1.8.x/console-web/examples/vcs/create-repository.md @@ -6,10 +6,10 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.createRepository( - '<INSTALLATION_ID>', // installationId - '<NAME>', // name - false // private -); +const result = await vcs.createRepository({ + installationId: '<INSTALLATION_ID>', + name: '<NAME>', + private: false +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/delete-installation.md b/docs/examples/1.8.x/console-web/examples/vcs/delete-installation.md index 3f760c09b6..9c49ac9cb5 100644 --- a/docs/examples/1.8.x/console-web/examples/vcs/delete-installation.md +++ b/docs/examples/1.8.x/console-web/examples/vcs/delete-installation.md @@ -6,8 +6,8 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.deleteInstallation( - '<INSTALLATION_ID>' // installationId -); +const result = await vcs.deleteInstallation({ + installationId: '<INSTALLATION_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/get-installation.md b/docs/examples/1.8.x/console-web/examples/vcs/get-installation.md index 4230f2bd9a..2942f5b56e 100644 --- a/docs/examples/1.8.x/console-web/examples/vcs/get-installation.md +++ b/docs/examples/1.8.x/console-web/examples/vcs/get-installation.md @@ -6,8 +6,8 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.getInstallation( - '<INSTALLATION_ID>' // installationId -); +const result = await vcs.getInstallation({ + installationId: '<INSTALLATION_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/get-repository-contents.md b/docs/examples/1.8.x/console-web/examples/vcs/get-repository-contents.md index 6d0cbd19ee..82ebfd55fe 100644 --- a/docs/examples/1.8.x/console-web/examples/vcs/get-repository-contents.md +++ b/docs/examples/1.8.x/console-web/examples/vcs/get-repository-contents.md @@ -6,11 +6,11 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.getRepositoryContents( - '<INSTALLATION_ID>', // installationId - '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId - '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) - '<PROVIDER_REFERENCE>' // providerReference (optional) -); +const result = await vcs.getRepositoryContents({ + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', + providerReference: '<PROVIDER_REFERENCE>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/get-repository.md b/docs/examples/1.8.x/console-web/examples/vcs/get-repository.md index 516265a0c8..e42812e11e 100644 --- a/docs/examples/1.8.x/console-web/examples/vcs/get-repository.md +++ b/docs/examples/1.8.x/console-web/examples/vcs/get-repository.md @@ -6,9 +6,9 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.getRepository( - '<INSTALLATION_ID>', // installationId - '<PROVIDER_REPOSITORY_ID>' // providerRepositoryId -); +const result = await vcs.getRepository({ + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/list-installations.md b/docs/examples/1.8.x/console-web/examples/vcs/list-installations.md index 1ba1e64615..ca8df51ab9 100644 --- a/docs/examples/1.8.x/console-web/examples/vcs/list-installations.md +++ b/docs/examples/1.8.x/console-web/examples/vcs/list-installations.md @@ -6,9 +6,9 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.listInstallations( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await vcs.listInstallations({ + queries: [], + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md b/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md index f414ec316b..1143557639 100644 --- a/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md +++ b/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md @@ -6,10 +6,10 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.listRepositories( - '<INSTALLATION_ID>', // installationId - VCSDetectionType.Runtime, // type - '<SEARCH>' // search (optional) -); +const result = await vcs.listRepositories({ + installationId: '<INSTALLATION_ID>', + type: VCSDetectionType.Runtime, + search: '<SEARCH>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/list-repository-branches.md b/docs/examples/1.8.x/console-web/examples/vcs/list-repository-branches.md index ba6b86a053..d0103afa03 100644 --- a/docs/examples/1.8.x/console-web/examples/vcs/list-repository-branches.md +++ b/docs/examples/1.8.x/console-web/examples/vcs/list-repository-branches.md @@ -6,9 +6,9 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.listRepositoryBranches( - '<INSTALLATION_ID>', // installationId - '<PROVIDER_REPOSITORY_ID>' // providerRepositoryId -); +const result = await vcs.listRepositoryBranches({ + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/update-external-deployments.md b/docs/examples/1.8.x/console-web/examples/vcs/update-external-deployments.md index 31425cb883..2ebcada011 100644 --- a/docs/examples/1.8.x/console-web/examples/vcs/update-external-deployments.md +++ b/docs/examples/1.8.x/console-web/examples/vcs/update-external-deployments.md @@ -6,10 +6,10 @@ const client = new Client() const vcs = new Vcs(client); -const result = await vcs.updateExternalDeployments( - '<INSTALLATION_ID>', // installationId - '<REPOSITORY_ID>', // repositoryId - '<PROVIDER_PULL_REQUEST_ID>' // providerPullRequestId -); +const result = await vcs.updateExternalDeployments({ + installationId: '<INSTALLATION_ID>', + repositoryId: '<REPOSITORY_ID>', + providerPullRequestId: '<PROVIDER_PULL_REQUEST_ID>' +}); console.log(result); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/decrement-document-attribute.md index c8ec38dab8..e46244874d 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/decrement-document-attribute.md @@ -3,7 +3,7 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setSession(''); // The user session to authenticate with Databases databases = Databases(client); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/increment-document-attribute.md index 6e5134b03a..a2d2622629 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/increment-document-attribute.md @@ -3,7 +3,7 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setSession(''); // The user session to authenticate with Databases databases = Databases(client); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..7faac9e067 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnBoolean result = await tablesDb.createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: false, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..9519db81f2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnDatetime result = await tablesDb.createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..6ce8ed3764 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-email-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnEmail result = await tablesDb.createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..9584d81f16 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-enum-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnEnum result = await tablesDb.createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..6092f58478 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-float-column.md @@ -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 + +TablesDb tablesDb = TablesDb(client); + +ColumnFloat result = await tablesDb.createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..014663989e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-index.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnIndex result = await tablesDb.createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType.key, + columns: [], + orders: [], // (optional) + lengths: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..5f4eb0b81a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-integer-column.md @@ -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 + +TablesDb tablesDb = TablesDb(client); + +ColumnInteger result = await tablesDb.createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..44e9ce38b2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-ip-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnIp result = await tablesDb.createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..1b61250d84 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-relationship-column.md @@ -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 + +TablesDb tablesDb = TablesDb(client); + +ColumnRelationship result = await tablesDb.createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType.oneToOne, + twoWay: false, // (optional) + key: '', // (optional) + twoWayKey: '', // (optional) + onDelete: RelationMutate.cascade, // (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 new file mode 100644 index 0000000000..5724e3ed3d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-row.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +TablesDb tablesDb = TablesDb(client); + +Row result = await tablesDb.createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..4f4e1c4572 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +RowList result = await tablesDb.createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..a5d53a0e7d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-string-column.md @@ -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 + +TablesDb tablesDb = TablesDb(client); + +ColumnString result = await tablesDb.createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) + encrypt: false, // (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 new file mode 100644 index 0000000000..bb8206dc4c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-table.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +Table result = await tablesDb.createTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..ac181814bc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create-url-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnUrl result = await tablesDb.createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/create.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/create.md new file mode 100644 index 0000000000..830b5898fc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/create.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +Database result = await tablesDb.create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..1f3a5e91b1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +TablesDb tablesDb = TablesDb(client); + +Row result = await tablesDb.decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: 0, // (optional) + min: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..f86e7f1027 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-column.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +await tablesDb.deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..3727bd4134 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +await tablesDb.deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..8ebdf733f3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-row.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +TablesDb tablesDb = TablesDb(client); + +await tablesDb.deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..932e647541 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +await tablesDb.deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..c9504d3eaf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete-table.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +await tablesDb.deleteTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete.md new file mode 100644 index 0000000000..c8ea781831 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +await tablesDb.delete( + databaseId: '<DATABASE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..898945fa63 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-column.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + + result = await tablesDb.getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..eb8703d2ee --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnIndex result = await tablesDb.getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..abd412b1bf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-row.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +TablesDb tablesDb = TablesDb(client); + +Row result = await tablesDb.getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..becce95148 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/get-table.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +Table result = await tablesDb.getTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/get.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/get.md new file mode 100644 index 0000000000..44628b3c19 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +Database result = await tablesDb.get( + databaseId: '<DATABASE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..35cc48d31e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/increment-row-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +TablesDb tablesDb = TablesDb(client); + +Row result = await tablesDb.incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: 0, // (optional) + max: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..608ff1e6bc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-columns.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnList result = await tablesDb.listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..c78eaddf7c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-indexes.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnIndexList result = await tablesDb.listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..07b2733a45 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +TablesDb tablesDb = TablesDb(client); + +RowList result = await tablesDb.listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..5d18cd5b57 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/list-tables.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +TableList result = await tablesDb.listTables( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/list.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/list.md new file mode 100644 index 0000000000..38b73b4326 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +DatabaseList result = await tablesDb.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..7ca6e5e306 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnBoolean result = await tablesDb.updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: false, + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..0ea38fe98d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnDatetime result = await tablesDb.updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..0fdc6521c4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-email-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnEmail result = await tablesDb.updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..5f4403fe12 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-enum-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnEnum result = await tablesDb.updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..bfb1d7c39c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-float-column.md @@ -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 + +TablesDb tablesDb = TablesDb(client); + +ColumnFloat result = await tablesDb.updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..c1ae288767 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-integer-column.md @@ -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 + +TablesDb tablesDb = TablesDb(client); + +ColumnInteger result = await tablesDb.updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..c1d9123fe2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-ip-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnIp result = await tablesDb.updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..5f0fafb45c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnRelationship result = await tablesDb.updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate.cascade, // (optional) + newKey: '', // (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 new file mode 100644 index 0000000000..31535b4e24 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-row.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +TablesDb tablesDb = TablesDb(client); + +Row result = await tablesDb.updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..b8d47a3596 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-rows.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +RowList result = await tablesDb.updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: {}, // (optional) + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..7ef30e4bda --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-string-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnString result = await tablesDb.updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '<DEFAULT>', + size: 1, // (optional) + newKey: '', // (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 new file mode 100644 index 0000000000..0ff11cdf6e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-table.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +Table result = await tablesDb.updateTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..7075ba157c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update-url-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +ColumnUrl result = await tablesDb.updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/update.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/update.md new file mode 100644 index 0000000000..72b50f0b96 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/update.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +Database result = await tablesDb.update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + 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 new file mode 100644 index 0000000000..95720df089 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-row.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +TablesDb tablesDb = TablesDb(client); + +Row result = await tablesDb.upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..e6e9cb107e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tablesdb/upsert-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +TablesDb tablesDb = TablesDb(client); + +RowList result = await tablesDb.upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-deno/examples/account/create-email-password-session.md index d08a92d2c3..ab71bc3f7a 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/create-email-password-session.md +++ b/docs/examples/1.8.x/server-deno/examples/account/create-email-password-session.md @@ -6,7 +6,7 @@ const client = new Client() const account = new Account(client); -const response = await account.createEmailPasswordSession( - 'email@example.com', // email - 'password' // password -); +const response = await account.createEmailPasswordSession({ + email: 'email@example.com', + password: 'password' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-email-token.md b/docs/examples/1.8.x/server-deno/examples/account/create-email-token.md index 384a3fbbea..5365f4d291 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/create-email-token.md +++ b/docs/examples/1.8.x/server-deno/examples/account/create-email-token.md @@ -6,8 +6,8 @@ const client = new Client() const account = new Account(client); -const response = await account.createEmailToken( - '<USER_ID>', // userId - 'email@example.com', // email - false // phrase (optional) -); +const response = await account.createEmailToken({ + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-deno/examples/account/create-magic-u-r-l-token.md index 29e552a819..364dbaee78 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.8.x/server-deno/examples/account/create-magic-u-r-l-token.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const response = await account.createMagicURLToken( - '<USER_ID>', // userId - 'email@example.com', // email - 'https://example.com', // url (optional) - false // phrase (optional) -); +const response = await account.createMagicURLToken({ + userId: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', + phrase: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-authenticator.md index 52c193a848..471225d01e 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-authenticator.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.createMfaAuthenticator( - AuthenticatorType.Totp // type -); +const response = await account.createMfaAuthenticator({ + type: AuthenticatorType.Totp +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-challenge.md index 296e36dec4..a31896bed3 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-challenge.md @@ -6,6 +6,6 @@ const client = new Client() const account = new Account(client); -const response = await account.createMfaChallenge( - AuthenticationFactor.Email // factor -); +const response = await account.createMfaChallenge({ + factor: AuthenticationFactor.Email +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-deno/examples/account/create-o-auth2token.md index 24e43a9d9c..b5463a7773 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/create-o-auth2token.md +++ b/docs/examples/1.8.x/server-deno/examples/account/create-o-auth2token.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -account.createOAuth2Token( - OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +account.createOAuth2Token({ + provider: OAuthProvider.Amazon, + success: 'https://example.com', + failure: 'https://example.com', + scopes: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-deno/examples/account/create-phone-token.md index 77e4adcb9c..f31ddee329 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/create-phone-token.md +++ b/docs/examples/1.8.x/server-deno/examples/account/create-phone-token.md @@ -6,7 +6,7 @@ const client = new Client() const account = new Account(client); -const response = await account.createPhoneToken( - '<USER_ID>', // userId - '+12065550100' // phone -); +const response = await account.createPhoneToken({ + userId: '<USER_ID>', + phone: '+12065550100' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-recovery.md b/docs/examples/1.8.x/server-deno/examples/account/create-recovery.md index a3d92d866e..cd08f64683 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/create-recovery.md +++ b/docs/examples/1.8.x/server-deno/examples/account/create-recovery.md @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.createRecovery( - 'email@example.com', // email - 'https://example.com' // url -); +const response = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-session.md b/docs/examples/1.8.x/server-deno/examples/account/create-session.md index 888493a21a..ff238a88af 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/create-session.md +++ b/docs/examples/1.8.x/server-deno/examples/account/create-session.md @@ -6,7 +6,7 @@ const client = new Client() const account = new Account(client); -const response = await account.createSession( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const response = await account.createSession({ + userId: '<USER_ID>', + secret: '<SECRET>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-verification.md b/docs/examples/1.8.x/server-deno/examples/account/create-verification.md index 438feee807..002c3f6407 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/create-verification.md +++ b/docs/examples/1.8.x/server-deno/examples/account/create-verification.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.createVerification( - 'https://example.com' // url -); +const response = await account.createVerification({ + url: 'https://example.com' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create.md b/docs/examples/1.8.x/server-deno/examples/account/create.md index c410a0f7c7..1d8bc36f5d 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/create.md +++ b/docs/examples/1.8.x/server-deno/examples/account/create.md @@ -6,9 +6,9 @@ const client = new Client() const account = new Account(client); -const response = await account.create( - '<USER_ID>', // userId - 'email@example.com', // email - '', // password - '<NAME>' // name (optional) -); +const response = await account.create({ + userId: '<USER_ID>', + email: 'email@example.com', + password: '', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/delete-identity.md b/docs/examples/1.8.x/server-deno/examples/account/delete-identity.md index 359c7a3cfa..26490a5e7f 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/delete-identity.md +++ b/docs/examples/1.8.x/server-deno/examples/account/delete-identity.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.deleteIdentity( - '<IDENTITY_ID>' // identityId -); +const response = await account.deleteIdentity({ + identityId: '<IDENTITY_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/account/delete-mfa-authenticator.md index f4b164b43d..8ab5e26d83 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-deno/examples/account/delete-mfa-authenticator.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.deleteMfaAuthenticator( - AuthenticatorType.Totp // type -); +const response = await account.deleteMfaAuthenticator({ + type: AuthenticatorType.Totp +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/delete-session.md b/docs/examples/1.8.x/server-deno/examples/account/delete-session.md index a0b7d19687..8472e579a4 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/delete-session.md +++ b/docs/examples/1.8.x/server-deno/examples/account/delete-session.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.deleteSession( - '<SESSION_ID>' // sessionId -); +const response = await account.deleteSession({ + sessionId: '<SESSION_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/get-session.md b/docs/examples/1.8.x/server-deno/examples/account/get-session.md index c380b72ed5..05d1782593 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/get-session.md +++ b/docs/examples/1.8.x/server-deno/examples/account/get-session.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.getSession( - '<SESSION_ID>' // sessionId -); +const response = await account.getSession({ + sessionId: '<SESSION_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/list-identities.md b/docs/examples/1.8.x/server-deno/examples/account/list-identities.md index 1c612f9737..e4c9b1808f 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/list-identities.md +++ b/docs/examples/1.8.x/server-deno/examples/account/list-identities.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.listIdentities( - [] // queries (optional) -); +const response = await account.listIdentities({ + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/list-logs.md b/docs/examples/1.8.x/server-deno/examples/account/list-logs.md index 28ab351f5a..ce26c4da31 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/list-logs.md +++ b/docs/examples/1.8.x/server-deno/examples/account/list-logs.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.listLogs( - [] // queries (optional) -); +const response = await account.listLogs({ + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-email.md b/docs/examples/1.8.x/server-deno/examples/account/update-email.md index 0753cff9fd..746309ebcf 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-email.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-email.md @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updateEmail( - 'email@example.com', // email - 'password' // password -); +const response = await account.updateEmail({ + email: 'email@example.com', + password: 'password' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-deno/examples/account/update-m-f-a.md index 24611aa43a..ab496cd391 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-m-f-a.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-m-f-a.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.updateMFA( - false // mfa -); +const response = await account.updateMFA({ + mfa: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-deno/examples/account/update-magic-u-r-l-session.md index a83c1d91a4..b40824b1bf 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-magic-u-r-l-session.md @@ -6,7 +6,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updateMagicURLSession( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const response = await account.updateMagicURLSession({ + userId: '<USER_ID>', + secret: '<SECRET>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-authenticator.md index 6b95818e06..48f833057c 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-authenticator.md @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updateMfaAuthenticator( - AuthenticatorType.Totp, // type - '<OTP>' // otp -); +const response = await account.updateMfaAuthenticator({ + type: AuthenticatorType.Totp, + otp: '<OTP>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-challenge.md index 61a7b44fd0..c6325d384f 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-challenge.md @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updateMfaChallenge( - '<CHALLENGE_ID>', // challengeId - '<OTP>' // otp -); +const response = await account.updateMfaChallenge({ + challengeId: '<CHALLENGE_ID>', + otp: '<OTP>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-name.md b/docs/examples/1.8.x/server-deno/examples/account/update-name.md index a02591b3b5..c62bcf1a60 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-name.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-name.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.updateName( - '<NAME>' // name -); +const response = await account.updateName({ + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-password.md b/docs/examples/1.8.x/server-deno/examples/account/update-password.md index 088bea88ac..a61c9fc05e 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-password.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-password.md @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updatePassword( - '', // password - 'password' // oldPassword (optional) -); +const response = await account.updatePassword({ + password: '', + oldPassword: 'password' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-deno/examples/account/update-phone-session.md index 4710a451a8..4a86183e79 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-phone-session.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-phone-session.md @@ -6,7 +6,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updatePhoneSession( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const response = await account.updatePhoneSession({ + userId: '<USER_ID>', + secret: '<SECRET>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-deno/examples/account/update-phone-verification.md index 3b150c8c4a..30f9b40d0a 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-phone-verification.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-phone-verification.md @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updatePhoneVerification( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const response = await account.updatePhoneVerification({ + userId: '<USER_ID>', + secret: '<SECRET>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-phone.md b/docs/examples/1.8.x/server-deno/examples/account/update-phone.md index 9c1923c217..821c279189 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-phone.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-phone.md @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updatePhone( - '+12065550100', // phone - 'password' // password -); +const response = await account.updatePhone({ + phone: '+12065550100', + password: 'password' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-prefs.md b/docs/examples/1.8.x/server-deno/examples/account/update-prefs.md index 4b37a64fe7..f7bb254503 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-prefs.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-prefs.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.updatePrefs( - {} // prefs -); +const response = await account.updatePrefs({ + prefs: {} +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-recovery.md b/docs/examples/1.8.x/server-deno/examples/account/update-recovery.md index 5d0d80f956..031b6a3c90 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-recovery.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-recovery.md @@ -7,8 +7,8 @@ const client = new Client() const account = new Account(client); -const response = await account.updateRecovery( - '<USER_ID>', // userId - '<SECRET>', // secret - '' // password -); +const response = await account.updateRecovery({ + userId: '<USER_ID>', + secret: '<SECRET>', + password: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-session.md b/docs/examples/1.8.x/server-deno/examples/account/update-session.md index cb36b9491e..cccd5d2cbf 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-session.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-session.md @@ -7,6 +7,6 @@ const client = new Client() const account = new Account(client); -const response = await account.updateSession( - '<SESSION_ID>' // sessionId -); +const response = await account.updateSession({ + sessionId: '<SESSION_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-verification.md b/docs/examples/1.8.x/server-deno/examples/account/update-verification.md index 96370858cd..1ef9050479 100644 --- a/docs/examples/1.8.x/server-deno/examples/account/update-verification.md +++ b/docs/examples/1.8.x/server-deno/examples/account/update-verification.md @@ -7,7 +7,7 @@ const client = new Client() const account = new Account(client); -const response = await account.updateVerification( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const response = await account.updateVerification({ + userId: '<USER_ID>', + secret: '<SECRET>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-browser.md index 5443200b39..e1525a63d8 100644 --- a/docs/examples/1.8.x/server-deno/examples/avatars/get-browser.md +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-browser.md @@ -7,9 +7,9 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getBrowser( - Browser.AvantBrowser, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getBrowser({ + code: Browser.AvantBrowser, + width: 0, + height: 0, + quality: -1 +}); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-credit-card.md index 8bcc67e08c..54a266fa1e 100644 --- a/docs/examples/1.8.x/server-deno/examples/avatars/get-credit-card.md +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-credit-card.md @@ -7,9 +7,9 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getCreditCard( - CreditCard.AmericanExpress, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getCreditCard({ + code: CreditCard.AmericanExpress, + width: 0, + height: 0, + quality: -1 +}); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-favicon.md index cca313a9a2..5a1a0020c2 100644 --- a/docs/examples/1.8.x/server-deno/examples/avatars/get-favicon.md +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-favicon.md @@ -7,6 +7,6 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFavicon( - 'https://example.com' // url -); +const result = avatars.getFavicon({ + url: 'https://example.com' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-flag.md index 6837438c10..5b02485c8e 100644 --- a/docs/examples/1.8.x/server-deno/examples/avatars/get-flag.md +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-flag.md @@ -7,9 +7,9 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getFlag( - Flag.Afghanistan, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = avatars.getFlag({ + code: Flag.Afghanistan, + width: 0, + height: 0, + quality: -1 +}); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-image.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-image.md index 2960daba8d..a8a5a7f365 100644 --- a/docs/examples/1.8.x/server-deno/examples/avatars/get-image.md +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-image.md @@ -7,8 +7,8 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getImage( - 'https://example.com', // url - 0, // width (optional) - 0 // height (optional) -); +const result = avatars.getImage({ + url: 'https://example.com', + width: 0, + height: 0 +}); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-initials.md index 10eb2d80b8..5719506242 100644 --- a/docs/examples/1.8.x/server-deno/examples/avatars/get-initials.md +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-initials.md @@ -7,9 +7,9 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getInitials( - '<NAME>', // name (optional) - 0, // width (optional) - 0, // height (optional) - '' // background (optional) -); +const result = avatars.getInitials({ + name: '<NAME>', + width: 0, + height: 0, + background: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-q-r.md index d9ccc0dbca..6f9d404fc1 100644 --- a/docs/examples/1.8.x/server-deno/examples/avatars/get-q-r.md +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-q-r.md @@ -7,9 +7,9 @@ const client = new Client() const avatars = new Avatars(client); -const result = avatars.getQR( - '<TEXT>', // text - 1, // size (optional) - 0, // margin (optional) - false // download (optional) -); +const result = avatars.getQR({ + text: '<TEXT>', + size: 1, + margin: 0, + download: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-boolean-attribute.md index b216c2ead3..8154a6f76b 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-boolean-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-boolean-attribute.md @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createBooleanAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); +const response = await databases.createBooleanAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: false, + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/create-collection.md index c7e8026758..e198c0c8b3 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-collection.md @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createCollection( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // documentSecurity (optional) - false // enabled (optional) -); +const response = await databases.createCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], + documentSecurity: false, + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-datetime-attribute.md index 664da19de2..a3d79846c6 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-datetime-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-datetime-attribute.md @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createDatetimeAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); +const response = await databases.createDatetimeAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-document.md b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md index be8a1bdac9..1b0fa0ce14 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md @@ -7,10 +7,10 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const response = await databases.createDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md index 26c9796cf0..71011dad3f 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // documents -); +const response = await databases.createDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-email-attribute.md index 6c667ed38a..1b86fd57bd 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-email-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-email-attribute.md @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createEmailAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); +const response = await databases.createEmailAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-enum-attribute.md index 6fdd2773c8..cbf8a84687 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-enum-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-enum-attribute.md @@ -7,12 +7,12 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createEnumAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default (optional) - false // array (optional) -); +const response = await databases.createEnumAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-float-attribute.md index c5991d49f6..16f4848f22 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-float-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-float-attribute.md @@ -7,13 +7,13 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createFloatAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); +const response = await databases.createFloatAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + min: null, + max: null, + default: null, + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-index.md b/docs/examples/1.8.x/server-deno/examples/databases/create-index.md index 3ab3c7a3aa..68f29eb7e6 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-index.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-index.md @@ -7,12 +7,12 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createIndex( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - IndexType.Key, // type - [], // attributes - [], // orders (optional) - [] // lengths (optional) -); +const response = await databases.createIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + type: IndexType.Key, + attributes: [], + orders: [], + lengths: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-integer-attribute.md index 4a306cd50d..6f8590d622 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-integer-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-integer-attribute.md @@ -7,13 +7,13 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createIntegerAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); +const response = await databases.createIntegerAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + min: null, + max: null, + default: null, + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-ip-attribute.md index c043b25207..b3361afee6 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-ip-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-ip-attribute.md @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createIpAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); +const response = await databases.createIpAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-relationship-attribute.md index d96ee59a4d..29c7488d20 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-relationship-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-relationship-attribute.md @@ -7,13 +7,13 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createRelationshipAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<RELATED_COLLECTION_ID>', // relatedCollectionId - RelationshipType.OneToOne, // type - false, // twoWay (optional) - '', // key (optional) - '', // twoWayKey (optional) - RelationMutate.Cascade // onDelete (optional) -); +const response = await databases.createRelationshipAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: RelationshipType.OneToOne, + twoWay: false, + key: '', + twoWayKey: '', + onDelete: RelationMutate.Cascade +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-string-attribute.md index 5f8e955541..b7500bd592 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-string-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-string-attribute.md @@ -7,13 +7,13 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createStringAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - 1, // size - false, // required - '<DEFAULT>', // default (optional) - false, // array (optional) - false // encrypt (optional) -); +const response = await databases.createStringAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', + array: false, + encrypt: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-url-attribute.md index 4639f75f5b..2975cfa0bf 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-url-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-url-attribute.md @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.createUrlAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); +const response = await databases.createUrlAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create.md b/docs/examples/1.8.x/server-deno/examples/databases/create.md index 86795eb750..666d19715e 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.create( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); +const response = await databases.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/decrement-document-attribute.md index 0142188185..553baaf843 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/decrement-document-attribute.md @@ -3,15 +3,15 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setSession(''); // The user session to authenticate with const databases = new Databases(client); -const response = await databases.decrementDocumentAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - '', // attribute - null, // value (optional) - null // min (optional) -); +const response = await databases.decrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: null, + min: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-attribute.md index f7ad6b105a..d41c512994 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/delete-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-attribute.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.deleteAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const response = await databases.deleteAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-collection.md index 828d48a7bc..d2a2b7096d 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/delete-collection.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-collection.md @@ -7,7 +7,7 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.deleteCollection( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId -); +const response = await databases.deleteCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-document.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-document.md index 47d5df49f1..6efe03f05b 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/delete-document.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-document.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.deleteDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId -); +const response = await databases.deleteDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-documents.md index 4768ed426b..c958165eb3 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/delete-documents.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-documents.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.deleteDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const response = await databases.deleteDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-index.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-index.md index eee1613a87..c2f2969683 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/delete-index.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-index.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.deleteIndex( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const response = await databases.deleteIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete.md b/docs/examples/1.8.x/server-deno/examples/databases/delete.md index 39b3f5395e..e14a83ce1f 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete.md @@ -7,6 +7,6 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.delete( - '<DATABASE_ID>' // databaseId -); +const response = await databases.delete({ + databaseId: '<DATABASE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/get-attribute.md index f2b801b5f1..efe21550a1 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/get-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/get-attribute.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.getAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const response = await databases.getAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/get-collection.md index b94f4fd5ff..0745ad9f34 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/get-collection.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/get-collection.md @@ -7,7 +7,7 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.getCollection( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId -); +const response = await databases.getCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get-document.md b/docs/examples/1.8.x/server-deno/examples/databases/get-document.md index 5cb02c4de3..7714f9d63b 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/get-document.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/get-document.md @@ -7,9 +7,9 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.getDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - [] // queries (optional) -); +const response = await databases.getDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get-index.md b/docs/examples/1.8.x/server-deno/examples/databases/get-index.md index 6c3a3dec1a..235eed6ff2 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/get-index.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/get-index.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.getIndex( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const response = await databases.getIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get.md b/docs/examples/1.8.x/server-deno/examples/databases/get.md index 403e467e04..0891f72562 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/get.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/get.md @@ -7,6 +7,6 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.get( - '<DATABASE_ID>' // databaseId -); +const response = await databases.get({ + databaseId: '<DATABASE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/increment-document-attribute.md index 9202a94bb9..7c8fbe8b15 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/increment-document-attribute.md @@ -3,15 +3,15 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setSession(''); // The user session to authenticate with const databases = new Databases(client); -const response = await databases.incrementDocumentAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - '', // attribute - null, // value (optional) - null // max (optional) -); +const response = await databases.incrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: null, + max: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-deno/examples/databases/list-attributes.md index 2171ffe4ad..0b402eeffd 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/list-attributes.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/list-attributes.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.listAttributes( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const response = await databases.listAttributes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list-collections.md b/docs/examples/1.8.x/server-deno/examples/databases/list-collections.md index 408ea2d601..7b10446bcf 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/list-collections.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/list-collections.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.listCollections( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await databases.listCollections({ + databaseId: '<DATABASE_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/list-documents.md index 528e979517..d30f262af8 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/list-documents.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/list-documents.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.listDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const response = await databases.listDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/databases/list-indexes.md index 88af3b7f28..b1bb477c60 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/list-indexes.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/list-indexes.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.listIndexes( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const response = await databases.listIndexes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list.md b/docs/examples/1.8.x/server-deno/examples/databases/list.md index dcae151617..9cac22a91a 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/list.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/list.md @@ -7,7 +7,7 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await databases.list({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-boolean-attribute.md index fe1b80073a..1a320af4c3 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-boolean-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-boolean-attribute.md @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateBooleanAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - false, // default - '' // newKey (optional) -); +const response = await databases.updateBooleanAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: false, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/update-collection.md index 47f1c02783..f3de3739e2 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-collection.md @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateCollection( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // documentSecurity (optional) - false // enabled (optional) -); +const response = await databases.updateCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], + documentSecurity: false, + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-datetime-attribute.md index ad18d93865..686add6ad3 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-datetime-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-datetime-attribute.md @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateDatetimeAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default - '' // newKey (optional) -); +const response = await databases.updateDatetimeAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-document.md b/docs/examples/1.8.x/server-deno/examples/databases/update-document.md index 31cce5ed1c..dab3fcd1aa 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-document.md @@ -7,10 +7,10 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); +const response = await databases.updateDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/update-documents.md index 1eef7794fb..fbfcf77c31 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-documents.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-documents.md @@ -7,9 +7,9 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - {}, // data (optional) - [] // queries (optional) -); +const response = await databases.updateDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: {}, + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-email-attribute.md index 116fadc6c7..aab2195689 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-email-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-email-attribute.md @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateEmailAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); +const response = await databases.updateEmailAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-enum-attribute.md index 663e44b530..133f26313a 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-enum-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-enum-attribute.md @@ -7,12 +7,12 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateEnumAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default - '' // newKey (optional) -); +const response = await databases.updateEnumAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-float-attribute.md index d9eab5aac5..3fdf66434c 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-float-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-float-attribute.md @@ -7,13 +7,13 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateFloatAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); +const response = await databases.updateFloatAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, + max: null, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-integer-attribute.md index 369b49d574..ccdbd97606 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-integer-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-integer-attribute.md @@ -7,13 +7,13 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateIntegerAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); +const response = await databases.updateIntegerAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, + max: null, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-ip-attribute.md index 049a527993..d361ceac60 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-ip-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-ip-attribute.md @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateIpAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default - '' // newKey (optional) -); +const response = await databases.updateIpAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-relationship-attribute.md index 7fae26b535..224ae20788 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-relationship-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-relationship-attribute.md @@ -7,10 +7,10 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateRelationshipAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); +const response = await databases.updateRelationshipAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + onDelete: RelationMutate.Cascade, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-string-attribute.md index ec91d3367e..3d814d655c 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-string-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-string-attribute.md @@ -7,12 +7,12 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateStringAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '<DEFAULT>', // default - 1, // size (optional) - '' // newKey (optional) -); +const response = await databases.updateStringAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-url-attribute.md index 32f44b7eaf..5d8ba70146 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update-url-attribute.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-url-attribute.md @@ -7,11 +7,11 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.updateUrlAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); +const response = await databases.updateUrlAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update.md b/docs/examples/1.8.x/server-deno/examples/databases/update.md index b87ad82ec0..078d9b07cc 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/update.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/update.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.update( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); +const response = await databases.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md index f05100e3df..c20edecf89 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md @@ -7,10 +7,10 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.upsertDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const response = await databases.upsertDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md index 0cd804bfb6..ea6fea6e89 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md @@ -7,8 +7,8 @@ const client = new Client() const databases = new Databases(client); -const response = await databases.upsertDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // documents -); +const response = await databases.upsertDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/create-deployment.md index a134a382fa..fadd4f57d5 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/create-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-deployment.md @@ -7,10 +7,10 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.createDeployment( - '<FUNCTION_ID>', // functionId - InputFile.fromPath('/path/to/file.png', 'file.png'), // code - false, // activate - '<ENTRYPOINT>', // entrypoint (optional) - '<COMMANDS>' // commands (optional) -); +const response = await functions.createDeployment({ + functionId: '<FUNCTION_ID>', + code: InputFile.fromPath('/path/to/file.png', 'file.png'), + activate: false, + entrypoint: '<ENTRYPOINT>', + commands: '<COMMANDS>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/create-duplicate-deployment.md index e22d1da72a..7868b044a1 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-duplicate-deployment.md @@ -7,8 +7,8 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.createDuplicateDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>', // deploymentId - '<BUILD_ID>' // buildId (optional) -); +const response = await functions.createDuplicateDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md b/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md index 58c6c494b1..aee235909e 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md @@ -7,12 +7,12 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.createExecution( - '<FUNCTION_ID>', // functionId - '<BODY>', // body (optional) - false, // async (optional) - '<PATH>', // path (optional) - ExecutionMethod.GET, // method (optional) - {}, // headers (optional) - '<SCHEDULED_AT>' // scheduledAt (optional) -); +const response = await functions.createExecution({ + functionId: '<FUNCTION_ID>', + body: '<BODY>', + async: false, + path: '<PATH>', + method: ExecutionMethod.GET, + headers: {}, + scheduledAt: '<SCHEDULED_AT>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/create-template-deployment.md index 69503da6a9..32e6f115e4 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/create-template-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-template-deployment.md @@ -7,11 +7,11 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.createTemplateDeployment( - '<FUNCTION_ID>', // functionId - '<REPOSITORY>', // repository - '<OWNER>', // owner - '<ROOT_DIRECTORY>', // rootDirectory - '<VERSION>', // version - false // activate (optional) -); +const response = await functions.createTemplateDeployment({ + functionId: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/create-variable.md index 28648901ee..274ced2378 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/create-variable.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-variable.md @@ -7,9 +7,9 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.createVariable( - '<FUNCTION_ID>', // functionId - '<KEY>', // key - '<VALUE>', // value - false // secret (optional) -); +const response = await functions.createVariable({ + functionId: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/create-vcs-deployment.md index d501b0ee26..e47d99416b 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-vcs-deployment.md @@ -7,9 +7,9 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.createVcsDeployment( - '<FUNCTION_ID>', // functionId - VCSDeploymentType.Branch, // type - '<REFERENCE>', // reference - false // activate (optional) -); +const response = await functions.createVcsDeployment({ + functionId: '<FUNCTION_ID>', + type: VCSDeploymentType.Branch, + reference: '<REFERENCE>', + activate: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create.md b/docs/examples/1.8.x/server-deno/examples/functions/create.md index 32265deb0b..113da008b6 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/create.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/create.md @@ -7,23 +7,23 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.create( - '<FUNCTION_ID>', // functionId - '<NAME>', // name - .Node145, // runtime - ["any"], // execute (optional) - [], // events (optional) - '', // schedule (optional) - 1, // timeout (optional) - false, // enabled (optional) - false, // logging (optional) - '<ENTRYPOINT>', // entrypoint (optional) - '<COMMANDS>', // commands (optional) - [], // scopes (optional) - '<INSTALLATION_ID>', // installationId (optional) - '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) - '<PROVIDER_BRANCH>', // providerBranch (optional) - false, // providerSilentMode (optional) - '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) - '' // specification (optional) -); +const response = await functions.create({ + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: .Node145, + execute: ["any"], + events: [], + schedule: '', + timeout: 1, + enabled: false, + logging: false, + entrypoint: '<ENTRYPOINT>', + commands: '<COMMANDS>', + scopes: [], + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerBranch: '<PROVIDER_BRANCH>', + providerSilentMode: false, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', + specification: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/delete-deployment.md index 179bbaf303..11c2e9238a 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/delete-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete-deployment.md @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.deleteDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await functions.deleteDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-deno/examples/functions/delete-execution.md index 4ab7c37785..95185ab894 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/delete-execution.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete-execution.md @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.deleteExecution( - '<FUNCTION_ID>', // functionId - '<EXECUTION_ID>' // executionId -); +const response = await functions.deleteExecution({ + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/delete-variable.md index 39a9428ed3..d3387fd256 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/delete-variable.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete-variable.md @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.deleteVariable( - '<FUNCTION_ID>', // functionId - '<VARIABLE_ID>' // variableId -); +const response = await functions.deleteVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/delete.md b/docs/examples/1.8.x/server-deno/examples/functions/delete.md index 94d58c33dd..9270762a4a 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete.md @@ -7,6 +7,6 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.delete( - '<FUNCTION_ID>' // functionId -); +const response = await functions.delete({ + functionId: '<FUNCTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-deno/examples/functions/get-deployment-download.md index d153036c9a..4dfa3223e4 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/get-deployment-download.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/get-deployment-download.md @@ -7,8 +7,8 @@ const client = new Client() const functions = new Functions(client); -const result = functions.getDeploymentDownload( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>', // deploymentId - DeploymentDownloadType.Source // type (optional) -); +const result = functions.getDeploymentDownload({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.Source +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/get-deployment.md index 339b99d4f1..e125fa598d 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/get-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/get-deployment.md @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.getDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await functions.getDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get-execution.md b/docs/examples/1.8.x/server-deno/examples/functions/get-execution.md index adeff0256a..d52b60ea8e 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/get-execution.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/get-execution.md @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.getExecution( - '<FUNCTION_ID>', // functionId - '<EXECUTION_ID>' // executionId -); +const response = await functions.getExecution({ + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/get-variable.md index cbbdd2f847..e5916c7615 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/get-variable.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/get-variable.md @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.getVariable( - '<FUNCTION_ID>', // functionId - '<VARIABLE_ID>' // variableId -); +const response = await functions.getVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get.md b/docs/examples/1.8.x/server-deno/examples/functions/get.md index 8fec17ed15..c4678f0b08 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/get.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/get.md @@ -7,6 +7,6 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.get( - '<FUNCTION_ID>' // functionId -); +const response = await functions.get({ + functionId: '<FUNCTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-deno/examples/functions/list-deployments.md index 849fe232b8..1c04aba826 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/list-deployments.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-deployments.md @@ -7,8 +7,8 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.listDeployments( - '<FUNCTION_ID>', // functionId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await functions.listDeployments({ + functionId: '<FUNCTION_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-executions.md b/docs/examples/1.8.x/server-deno/examples/functions/list-executions.md index cd597fb7a5..03e373f7fb 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/list-executions.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-executions.md @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.listExecutions( - '<FUNCTION_ID>', // functionId - [] // queries (optional) -); +const response = await functions.listExecutions({ + functionId: '<FUNCTION_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-variables.md b/docs/examples/1.8.x/server-deno/examples/functions/list-variables.md index 173d5aa9ef..6bc904b605 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/list-variables.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-variables.md @@ -7,6 +7,6 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.listVariables( - '<FUNCTION_ID>' // functionId -); +const response = await functions.listVariables({ + functionId: '<FUNCTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list.md b/docs/examples/1.8.x/server-deno/examples/functions/list.md index ecc43d1a7c..3b9c401c0f 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/list.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/list.md @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await functions.list({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-deno/examples/functions/update-deployment-status.md index 4c7e8052c1..d6b6cddec0 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/update-deployment-status.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/update-deployment-status.md @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.updateDeploymentStatus( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await functions.updateDeploymentStatus({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/update-function-deployment.md index 55196c148d..1e0b5542a5 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/update-function-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/update-function-deployment.md @@ -7,7 +7,7 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.updateFunctionDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await functions.updateFunctionDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/update-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/update-variable.md index 3da706d5f4..fb80ac95b3 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/update-variable.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/update-variable.md @@ -7,10 +7,10 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.updateVariable( - '<FUNCTION_ID>', // functionId - '<VARIABLE_ID>', // variableId - '<KEY>', // key - '<VALUE>', // value (optional) - false // secret (optional) -); +const response = await functions.updateVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/update.md b/docs/examples/1.8.x/server-deno/examples/functions/update.md index 399af05841..d37701a3ff 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/update.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/update.md @@ -7,23 +7,23 @@ const client = new Client() const functions = new Functions(client); -const response = await functions.update( - '<FUNCTION_ID>', // functionId - '<NAME>', // name - .Node145, // runtime (optional) - ["any"], // execute (optional) - [], // events (optional) - '', // schedule (optional) - 1, // timeout (optional) - false, // enabled (optional) - false, // logging (optional) - '<ENTRYPOINT>', // entrypoint (optional) - '<COMMANDS>', // commands (optional) - [], // scopes (optional) - '<INSTALLATION_ID>', // installationId (optional) - '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) - '<PROVIDER_BRANCH>', // providerBranch (optional) - false, // providerSilentMode (optional) - '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) - '' // specification (optional) -); +const response = await functions.update({ + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: .Node145, + execute: ["any"], + events: [], + schedule: '', + timeout: 1, + enabled: false, + logging: false, + entrypoint: '<ENTRYPOINT>', + commands: '<COMMANDS>', + scopes: [], + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerBranch: '<PROVIDER_BRANCH>', + providerSilentMode: false, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', + specification: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md b/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md index 200120f1e8..67716b21df 100644 --- a/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md @@ -7,6 +7,6 @@ const client = new Client() const graphql = new Graphql(client); -const response = await graphql.mutation( - {} // query -); +const response = await graphql.mutation({ + query: {} +}); diff --git a/docs/examples/1.8.x/server-deno/examples/graphql/query.md b/docs/examples/1.8.x/server-deno/examples/graphql/query.md index bb0116278c..e80f795851 100644 --- a/docs/examples/1.8.x/server-deno/examples/graphql/query.md +++ b/docs/examples/1.8.x/server-deno/examples/graphql/query.md @@ -7,6 +7,6 @@ const client = new Client() const graphql = new Graphql(client); -const response = await graphql.query( - {} // query -); +const response = await graphql.query({ + query: {} +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-certificate.md b/docs/examples/1.8.x/server-deno/examples/health/get-certificate.md index 828e53dd7b..56afdd65aa 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-certificate.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-certificate.md @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getCertificate( - '' // domain (optional) -); +const response = await health.getCertificate({ + domain: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-deno/examples/health/get-failed-jobs.md index 5e40f762e4..a330bcf86b 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-failed-jobs.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-failed-jobs.md @@ -7,7 +7,7 @@ const client = new Client() const health = new Health(client); -const response = await health.getFailedJobs( - .V1Database, // name - null // threshold (optional) -); +const response = await health.getFailedJobs({ + name: .V1Database, + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-builds.md index f6b9388bb3..10ecfd8f88 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-queue-builds.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-builds.md @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueBuilds( - null // threshold (optional) -); +const response = await health.getQueueBuilds({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-certificates.md index e783fa52b3..2268c1e96a 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-queue-certificates.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-certificates.md @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueCertificates( - null // threshold (optional) -); +const response = await health.getQueueCertificates({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-databases.md index e33c7a2929..0ba7ca27f3 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-queue-databases.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-databases.md @@ -7,7 +7,7 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueDatabases( - '<NAME>', // name (optional) - null // threshold (optional) -); +const response = await health.getQueueDatabases({ + name: '<NAME>', + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-deletes.md index ea7da5b587..4afe3ecb7d 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-queue-deletes.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-deletes.md @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueDeletes( - null // threshold (optional) -); +const response = await health.getQueueDeletes({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-functions.md index e075a65602..5885132532 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-queue-functions.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-functions.md @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueFunctions( - null // threshold (optional) -); +const response = await health.getQueueFunctions({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-logs.md index eb7ffb028a..92627fe09d 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-queue-logs.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-logs.md @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueLogs( - null // threshold (optional) -); +const response = await health.getQueueLogs({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-mails.md index d9f61bc088..1ac6e67c58 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-queue-mails.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-mails.md @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueMails( - null // threshold (optional) -); +const response = await health.getQueueMails({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-messaging.md index 8bc76398d9..7351be9b7b 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-queue-messaging.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-messaging.md @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueMessaging( - null // threshold (optional) -); +const response = await health.getQueueMessaging({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-migrations.md index e6f7bf543c..a3758fa5ad 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-queue-migrations.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-migrations.md @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueMigrations( - null // threshold (optional) -); +const response = await health.getQueueMigrations({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-stats-resources.md index ecc7ebd322..227f7f5195 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-queue-stats-resources.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-stats-resources.md @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueStatsResources( - null // threshold (optional) -); +const response = await health.getQueueStatsResources({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-usage.md index 46aa4db5be..c031f63805 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-queue-usage.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-usage.md @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueUsage( - null // threshold (optional) -); +const response = await health.getQueueUsage({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-webhooks.md index 75a1c1f833..a852a551ed 100644 --- a/docs/examples/1.8.x/server-deno/examples/health/get-queue-webhooks.md +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-webhooks.md @@ -7,6 +7,6 @@ const client = new Client() const health = new Health(client); -const response = await health.getQueueWebhooks( - null // threshold (optional) -); +const response = await health.getQueueWebhooks({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-apns-provider.md index e2c33feff8..b854183a71 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-apns-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-apns-provider.md @@ -7,13 +7,13 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createApnsProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '<AUTH_KEY>', // authKey (optional) - '<AUTH_KEY_ID>', // authKeyId (optional) - '<TEAM_ID>', // teamId (optional) - '<BUNDLE_ID>', // bundleId (optional) - false, // sandbox (optional) - false // enabled (optional) -); +const response = await messaging.createApnsProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + authKey: '<AUTH_KEY>', + authKeyId: '<AUTH_KEY_ID>', + teamId: '<TEAM_ID>', + bundleId: '<BUNDLE_ID>', + sandbox: false, + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-email.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-email.md index 8db2879f9c..011e1f6ed5 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-email.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-email.md @@ -7,17 +7,17 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createEmail( - '<MESSAGE_ID>', // messageId - '<SUBJECT>', // subject - '<CONTENT>', // content - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - [], // cc (optional) - [], // bcc (optional) - [], // attachments (optional) - false, // draft (optional) - false, // html (optional) - '' // scheduledAt (optional) -); +const response = await messaging.createEmail({ + messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], + users: [], + targets: [], + cc: [], + bcc: [], + attachments: [], + draft: false, + html: false, + scheduledAt: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-fcm-provider.md index 3f443d6bf5..1e3596f6dc 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-fcm-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-fcm-provider.md @@ -7,9 +7,9 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createFcmProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - {}, // serviceAccountJSON (optional) - false // enabled (optional) -); +const response = await messaging.createFcmProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: {}, + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-mailgun-provider.md index 32f7c94f21..c17a323653 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-mailgun-provider.md @@ -7,15 +7,15 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createMailgunProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '<API_KEY>', // apiKey (optional) - '<DOMAIN>', // domain (optional) - false, // isEuRegion (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - 'email@example.com', // replyToEmail (optional) - false // enabled (optional) -); +const response = await messaging.createMailgunProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', + domain: '<DOMAIN>', + isEuRegion: false, + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: 'email@example.com', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md index 57e94188b9..c076faa236 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md @@ -7,11 +7,11 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createMsg91Provider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '<TEMPLATE_ID>', // templateId (optional) - '<SENDER_ID>', // senderId (optional) - '<AUTH_KEY>', // authKey (optional) - false // enabled (optional) -); +const response = await messaging.createMsg91Provider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + templateId: '<TEMPLATE_ID>', + senderId: '<SENDER_ID>', + authKey: '<AUTH_KEY>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-push.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-push.md index 7523c2978f..2c9004cc04 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-push.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-push.md @@ -7,24 +7,24 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createPush( - '<MESSAGE_ID>', // messageId - '<TITLE>', // title (optional) - '<BODY>', // body (optional) - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - {}, // data (optional) - '<ACTION>', // action (optional) - '[ID1:ID2]', // image (optional) - '<ICON>', // icon (optional) - '<SOUND>', // sound (optional) - '<COLOR>', // color (optional) - '<TAG>', // tag (optional) - null, // badge (optional) - false, // draft (optional) - '', // scheduledAt (optional) - false, // contentAvailable (optional) - false, // critical (optional) - MessagePriority.Normal // priority (optional) -); +const response = await messaging.createPush({ + messageId: '<MESSAGE_ID>', + title: '<TITLE>', + body: '<BODY>', + topics: [], + users: [], + targets: [], + data: {}, + action: '<ACTION>', + image: '[ID1:ID2]', + icon: '<ICON>', + sound: '<SOUND>', + color: '<COLOR>', + tag: '<TAG>', + badge: null, + draft: false, + scheduledAt: '', + contentAvailable: false, + critical: false, + priority: MessagePriority.Normal +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-sendgrid-provider.md index 15fe7b8c7b..62f5ec14b5 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-sendgrid-provider.md @@ -7,13 +7,13 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createSendgridProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '<API_KEY>', // apiKey (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - 'email@example.com', // replyToEmail (optional) - false // enabled (optional) -); +const response = await messaging.createSendgridProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: 'email@example.com', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-sms.md index 264203a8be..5b691122d8 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-sms.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-sms.md @@ -7,12 +7,12 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createSms( - '<MESSAGE_ID>', // messageId - '<CONTENT>', // content - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - false, // draft (optional) - '' // scheduledAt (optional) -); +const response = await messaging.createSms({ + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], + users: [], + targets: [], + draft: false, + scheduledAt: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-smtp-provider.md index 2d6d33c62a..426cc98d7c 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-smtp-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-smtp-provider.md @@ -7,19 +7,19 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createSmtpProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '<HOST>', // host - 1, // port (optional) - '<USERNAME>', // username (optional) - '<PASSWORD>', // password (optional) - SmtpEncryption.None, // encryption (optional) - false, // autoTLS (optional) - '<MAILER>', // mailer (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - 'email@example.com', // replyToEmail (optional) - false // enabled (optional) -); +const response = await messaging.createSmtpProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, + username: '<USERNAME>', + password: '<PASSWORD>', + encryption: SmtpEncryption.None, + autoTLS: false, + mailer: '<MAILER>', + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: 'email@example.com', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-subscriber.md index 8be79f3f9e..671c6ea089 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-subscriber.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-subscriber.md @@ -7,8 +7,8 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>', // subscriberId - '<TARGET_ID>' // targetId -); +const response = await messaging.createSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-telesign-provider.md index 2bb95c4e2d..04c4b63496 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-telesign-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-telesign-provider.md @@ -7,11 +7,11 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createTelesignProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '+12065550100', // from (optional) - '<CUSTOMER_ID>', // customerId (optional) - '<API_KEY>', // apiKey (optional) - false // enabled (optional) -); +const response = await messaging.createTelesignProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', + customerId: '<CUSTOMER_ID>', + apiKey: '<API_KEY>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-textmagic-provider.md index 4657493664..7fcdcfee33 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-textmagic-provider.md @@ -7,11 +7,11 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createTextmagicProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '+12065550100', // from (optional) - '<USERNAME>', // username (optional) - '<API_KEY>', // apiKey (optional) - false // enabled (optional) -); +const response = await messaging.createTextmagicProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', + username: '<USERNAME>', + apiKey: '<API_KEY>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-topic.md index c2ca3a4ed2..08c1c328db 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-topic.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-topic.md @@ -7,8 +7,8 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createTopic( - '<TOPIC_ID>', // topicId - '<NAME>', // name - ["any"] // subscribe (optional) -); +const response = await messaging.createTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-twilio-provider.md index aa7bbf6a18..7ea61ad7e1 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-twilio-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-twilio-provider.md @@ -7,11 +7,11 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createTwilioProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '+12065550100', // from (optional) - '<ACCOUNT_SID>', // accountSid (optional) - '<AUTH_TOKEN>', // authToken (optional) - false // enabled (optional) -); +const response = await messaging.createTwilioProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', + accountSid: '<ACCOUNT_SID>', + authToken: '<AUTH_TOKEN>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-vonage-provider.md index 5fe734fb0c..6b24187914 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/create-vonage-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-vonage-provider.md @@ -7,11 +7,11 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.createVonageProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '+12065550100', // from (optional) - '<API_KEY>', // apiKey (optional) - '<API_SECRET>', // apiSecret (optional) - false // enabled (optional) -); +const response = await messaging.createVonageProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', + apiKey: '<API_KEY>', + apiSecret: '<API_SECRET>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete-provider.md index 7bc99ef3b5..2e0855a00c 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/delete-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete-provider.md @@ -7,6 +7,6 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.deleteProvider( - '<PROVIDER_ID>' // providerId -); +const response = await messaging.deleteProvider({ + providerId: '<PROVIDER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete-subscriber.md index 147456887d..c48c9de4cf 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete-subscriber.md @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.deleteSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>' // subscriberId -); +const response = await messaging.deleteSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete-topic.md index aa1359cf28..5dd1317339 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/delete-topic.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete-topic.md @@ -7,6 +7,6 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.deleteTopic( - '<TOPIC_ID>' // topicId -); +const response = await messaging.deleteTopic({ + topicId: '<TOPIC_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/delete.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete.md index 0442da1e8b..8b4357fd2b 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete.md @@ -7,6 +7,6 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.delete( - '<MESSAGE_ID>' // messageId -); +const response = await messaging.delete({ + messageId: '<MESSAGE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/get-message.md b/docs/examples/1.8.x/server-deno/examples/messaging/get-message.md index 9565a611ae..f0e4c5b8d9 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/get-message.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/get-message.md @@ -7,6 +7,6 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.getMessage( - '<MESSAGE_ID>' // messageId -); +const response = await messaging.getMessage({ + messageId: '<MESSAGE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/get-provider.md index 8e5d426418..18ce92a49b 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/get-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/get-provider.md @@ -7,6 +7,6 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.getProvider( - '<PROVIDER_ID>' // providerId -); +const response = await messaging.getProvider({ + providerId: '<PROVIDER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-deno/examples/messaging/get-subscriber.md index e9377a532f..4916e27700 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/get-subscriber.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/get-subscriber.md @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.getSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>' // subscriberId -); +const response = await messaging.getSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/get-topic.md index 35f1853ada..baf1f39d11 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/get-topic.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/get-topic.md @@ -7,6 +7,6 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.getTopic( - '<TOPIC_ID>' // topicId -); +const response = await messaging.getTopic({ + topicId: '<TOPIC_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-message-logs.md index f39a90037a..5772ddddba 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/list-message-logs.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-message-logs.md @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listMessageLogs( - '<MESSAGE_ID>', // messageId - [] // queries (optional) -); +const response = await messaging.listMessageLogs({ + messageId: '<MESSAGE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-messages.md index 50b1a10f4b..a487cb7c18 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/list-messages.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-messages.md @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listMessages( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await messaging.listMessages({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-provider-logs.md index c4b20a8306..87fbe57904 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/list-provider-logs.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-provider-logs.md @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listProviderLogs( - '<PROVIDER_ID>', // providerId - [] // queries (optional) -); +const response = await messaging.listProviderLogs({ + providerId: '<PROVIDER_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-providers.md index 7c877c25de..7fc1e06452 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/list-providers.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-providers.md @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listProviders( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await messaging.listProviders({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-subscriber-logs.md index 0d14f85777..d0f3d1c75e 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-subscriber-logs.md @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listSubscriberLogs( - '<SUBSCRIBER_ID>', // subscriberId - [] // queries (optional) -); +const response = await messaging.listSubscriberLogs({ + subscriberId: '<SUBSCRIBER_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-subscribers.md index 384bb8fe4f..bd0c8af4a4 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/list-subscribers.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-subscribers.md @@ -7,8 +7,8 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listSubscribers( - '<TOPIC_ID>', // topicId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await messaging.listSubscribers({ + topicId: '<TOPIC_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-targets.md index 5ce2082236..8a18af732d 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/list-targets.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-targets.md @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listTargets( - '<MESSAGE_ID>', // messageId - [] // queries (optional) -); +const response = await messaging.listTargets({ + messageId: '<MESSAGE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-topic-logs.md index d2c771d480..eeebc950e2 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/list-topic-logs.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-topic-logs.md @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listTopicLogs( - '<TOPIC_ID>', // topicId - [] // queries (optional) -); +const response = await messaging.listTopicLogs({ + topicId: '<TOPIC_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-topics.md index 1d0ec43066..cdd1afe822 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/list-topics.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-topics.md @@ -7,7 +7,7 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.listTopics( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await messaging.listTopics({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-apns-provider.md index 71bd038edb..3860fea1db 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-apns-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-apns-provider.md @@ -7,13 +7,13 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateApnsProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<AUTH_KEY>', // authKey (optional) - '<AUTH_KEY_ID>', // authKeyId (optional) - '<TEAM_ID>', // teamId (optional) - '<BUNDLE_ID>', // bundleId (optional) - false // sandbox (optional) -); +const response = await messaging.updateApnsProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + authKey: '<AUTH_KEY>', + authKeyId: '<AUTH_KEY_ID>', + teamId: '<TEAM_ID>', + bundleId: '<BUNDLE_ID>', + sandbox: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-email.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-email.md index c8b0558250..a742160aac 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-email.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-email.md @@ -7,17 +7,17 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateEmail( - '<MESSAGE_ID>', // messageId - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - '<SUBJECT>', // subject (optional) - '<CONTENT>', // content (optional) - false, // draft (optional) - false, // html (optional) - [], // cc (optional) - [], // bcc (optional) - '', // scheduledAt (optional) - [] // attachments (optional) -); +const response = await messaging.updateEmail({ + messageId: '<MESSAGE_ID>', + topics: [], + users: [], + targets: [], + subject: '<SUBJECT>', + content: '<CONTENT>', + draft: false, + html: false, + cc: [], + bcc: [], + scheduledAt: '', + attachments: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-fcm-provider.md index eb71dddd1a..17fb741b33 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-fcm-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-fcm-provider.md @@ -7,9 +7,9 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateFcmProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - {} // serviceAccountJSON (optional) -); +const response = await messaging.updateFcmProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + serviceAccountJSON: {} +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-mailgun-provider.md index f80d6a4b1d..aad80a0d5b 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-mailgun-provider.md @@ -7,15 +7,15 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateMailgunProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - '<API_KEY>', // apiKey (optional) - '<DOMAIN>', // domain (optional) - false, // isEuRegion (optional) - false, // enabled (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - '<REPLY_TO_EMAIL>' // replyToEmail (optional) -); +const response = await messaging.updateMailgunProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', + domain: '<DOMAIN>', + isEuRegion: false, + enabled: false, + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: '<REPLY_TO_EMAIL>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md index 36943f2fa0..8f57eec34f 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md @@ -7,11 +7,11 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateMsg91Provider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<TEMPLATE_ID>', // templateId (optional) - '<SENDER_ID>', // senderId (optional) - '<AUTH_KEY>' // authKey (optional) -); +const response = await messaging.updateMsg91Provider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + templateId: '<TEMPLATE_ID>', + senderId: '<SENDER_ID>', + authKey: '<AUTH_KEY>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-push.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-push.md index c7f068604b..73d2a3ceff 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-push.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-push.md @@ -7,24 +7,24 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updatePush( - '<MESSAGE_ID>', // messageId - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - '<TITLE>', // title (optional) - '<BODY>', // body (optional) - {}, // data (optional) - '<ACTION>', // action (optional) - '[ID1:ID2]', // image (optional) - '<ICON>', // icon (optional) - '<SOUND>', // sound (optional) - '<COLOR>', // color (optional) - '<TAG>', // tag (optional) - null, // badge (optional) - false, // draft (optional) - '', // scheduledAt (optional) - false, // contentAvailable (optional) - false, // critical (optional) - MessagePriority.Normal // priority (optional) -); +const response = await messaging.updatePush({ + messageId: '<MESSAGE_ID>', + topics: [], + users: [], + targets: [], + title: '<TITLE>', + body: '<BODY>', + data: {}, + action: '<ACTION>', + image: '[ID1:ID2]', + icon: '<ICON>', + sound: '<SOUND>', + color: '<COLOR>', + tag: '<TAG>', + badge: null, + draft: false, + scheduledAt: '', + contentAvailable: false, + critical: false, + priority: MessagePriority.Normal +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-sendgrid-provider.md index 0ec96db2f8..708886fece 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-sendgrid-provider.md @@ -7,13 +7,13 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateSendgridProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<API_KEY>', // apiKey (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - '<REPLY_TO_EMAIL>' // replyToEmail (optional) -); +const response = await messaging.updateSendgridProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + apiKey: '<API_KEY>', + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: '<REPLY_TO_EMAIL>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-sms.md index 9c1dc4a5dc..53ac19a18d 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-sms.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-sms.md @@ -7,12 +7,12 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateSms( - '<MESSAGE_ID>', // messageId - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - '<CONTENT>', // content (optional) - false, // draft (optional) - '' // scheduledAt (optional) -); +const response = await messaging.updateSms({ + messageId: '<MESSAGE_ID>', + topics: [], + users: [], + targets: [], + content: '<CONTENT>', + draft: false, + scheduledAt: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-smtp-provider.md index 9d59bb3646..35addb7338 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-smtp-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-smtp-provider.md @@ -7,19 +7,19 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateSmtpProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - '<HOST>', // host (optional) - 1, // port (optional) - '<USERNAME>', // username (optional) - '<PASSWORD>', // password (optional) - SmtpEncryption.None, // encryption (optional) - false, // autoTLS (optional) - '<MAILER>', // mailer (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - '<REPLY_TO_EMAIL>', // replyToEmail (optional) - false // enabled (optional) -); +const response = await messaging.updateSmtpProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, + username: '<USERNAME>', + password: '<PASSWORD>', + encryption: SmtpEncryption.None, + autoTLS: false, + mailer: '<MAILER>', + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: '<REPLY_TO_EMAIL>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-telesign-provider.md index 052d394f05..f41eb545b0 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-telesign-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-telesign-provider.md @@ -7,11 +7,11 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateTelesignProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<CUSTOMER_ID>', // customerId (optional) - '<API_KEY>', // apiKey (optional) - '<FROM>' // from (optional) -); +const response = await messaging.updateTelesignProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + customerId: '<CUSTOMER_ID>', + apiKey: '<API_KEY>', + from: '<FROM>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-textmagic-provider.md index 2163792f83..6c05f5c3f1 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-textmagic-provider.md @@ -7,11 +7,11 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateTextmagicProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<USERNAME>', // username (optional) - '<API_KEY>', // apiKey (optional) - '<FROM>' // from (optional) -); +const response = await messaging.updateTextmagicProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + username: '<USERNAME>', + apiKey: '<API_KEY>', + from: '<FROM>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-topic.md index 5f7f77901b..a8e50668fd 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-topic.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-topic.md @@ -7,8 +7,8 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateTopic( - '<TOPIC_ID>', // topicId - '<NAME>', // name (optional) - ["any"] // subscribe (optional) -); +const response = await messaging.updateTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-twilio-provider.md index 5abdd65a9c..1c4618d418 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-twilio-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-twilio-provider.md @@ -7,11 +7,11 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateTwilioProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<ACCOUNT_SID>', // accountSid (optional) - '<AUTH_TOKEN>', // authToken (optional) - '<FROM>' // from (optional) -); +const response = await messaging.updateTwilioProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + accountSid: '<ACCOUNT_SID>', + authToken: '<AUTH_TOKEN>', + from: '<FROM>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-vonage-provider.md index c8fa90d9ab..c3a2cad8b5 100644 --- a/docs/examples/1.8.x/server-deno/examples/messaging/update-vonage-provider.md +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-vonage-provider.md @@ -7,11 +7,11 @@ const client = new Client() const messaging = new Messaging(client); -const response = await messaging.updateVonageProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<API_KEY>', // apiKey (optional) - '<API_SECRET>', // apiSecret (optional) - '<FROM>' // from (optional) -); +const response = await messaging.updateVonageProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + apiKey: '<API_KEY>', + apiSecret: '<API_SECRET>', + from: '<FROM>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-deployment.md index f674553a10..6e9425648f 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/create-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-deployment.md @@ -7,11 +7,11 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.createDeployment( - '<SITE_ID>', // siteId - InputFile.fromPath('/path/to/file.png', 'file.png'), // code - false, // activate - '<INSTALL_COMMAND>', // installCommand (optional) - '<BUILD_COMMAND>', // buildCommand (optional) - '<OUTPUT_DIRECTORY>' // outputDirectory (optional) -); +const response = await sites.createDeployment({ + siteId: '<SITE_ID>', + code: InputFile.fromPath('/path/to/file.png', 'file.png'), + activate: false, + installCommand: '<INSTALL_COMMAND>', + buildCommand: '<BUILD_COMMAND>', + outputDirectory: '<OUTPUT_DIRECTORY>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-duplicate-deployment.md index 317e80b312..515257170c 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-duplicate-deployment.md @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.createDuplicateDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await sites.createDuplicateDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-template-deployment.md index 4ef245bd16..8890b19d21 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/create-template-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-template-deployment.md @@ -7,11 +7,11 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.createTemplateDeployment( - '<SITE_ID>', // siteId - '<REPOSITORY>', // repository - '<OWNER>', // owner - '<ROOT_DIRECTORY>', // rootDirectory - '<VERSION>', // version - false // activate (optional) -); +const response = await sites.createTemplateDeployment({ + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/create-variable.md index 7b07a088ce..e2bf02da2a 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/create-variable.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-variable.md @@ -7,9 +7,9 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.createVariable( - '<SITE_ID>', // siteId - '<KEY>', // key - '<VALUE>', // value - false // secret (optional) -); +const response = await sites.createVariable({ + siteId: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-vcs-deployment.md index 5c49808811..750a3c04e8 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-vcs-deployment.md @@ -7,9 +7,9 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.createVcsDeployment( - '<SITE_ID>', // siteId - VCSDeploymentType.Branch, // type - '<REFERENCE>', // reference - false // activate (optional) -); +const response = await sites.createVcsDeployment({ + siteId: '<SITE_ID>', + type: VCSDeploymentType.Branch, + reference: '<REFERENCE>', + activate: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create.md b/docs/examples/1.8.x/server-deno/examples/sites/create.md index 420b36290b..5b1d152b73 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/create.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/create.md @@ -7,23 +7,23 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.create( - '<SITE_ID>', // siteId - '<NAME>', // name - .Analog, // framework - .Node145, // buildRuntime - false, // enabled (optional) - false, // logging (optional) - 1, // timeout (optional) - '<INSTALL_COMMAND>', // installCommand (optional) - '<BUILD_COMMAND>', // buildCommand (optional) - '<OUTPUT_DIRECTORY>', // outputDirectory (optional) - .Static, // adapter (optional) - '<INSTALLATION_ID>', // installationId (optional) - '<FALLBACK_FILE>', // fallbackFile (optional) - '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) - '<PROVIDER_BRANCH>', // providerBranch (optional) - false, // providerSilentMode (optional) - '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) - '' // specification (optional) -); +const response = await sites.create({ + siteId: '<SITE_ID>', + name: '<NAME>', + framework: .Analog, + buildRuntime: .Node145, + enabled: false, + logging: false, + timeout: 1, + installCommand: '<INSTALL_COMMAND>', + buildCommand: '<BUILD_COMMAND>', + outputDirectory: '<OUTPUT_DIRECTORY>', + adapter: .Static, + installationId: '<INSTALLATION_ID>', + fallbackFile: '<FALLBACK_FILE>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerBranch: '<PROVIDER_BRANCH>', + providerSilentMode: false, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', + specification: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/delete-deployment.md index cd97673387..4164f478c0 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/delete-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete-deployment.md @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.deleteDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await sites.deleteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/delete-log.md b/docs/examples/1.8.x/server-deno/examples/sites/delete-log.md index 0b70eb30b6..f70a8fb93d 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/delete-log.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete-log.md @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.deleteLog( - '<SITE_ID>', // siteId - '<LOG_ID>' // logId -); +const response = await sites.deleteLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/delete-variable.md index 0bbc2e33dc..226b2f14bc 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/delete-variable.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete-variable.md @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.deleteVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>' // variableId -); +const response = await sites.deleteVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/delete.md b/docs/examples/1.8.x/server-deno/examples/sites/delete.md index af5dbed3f2..2af4f53986 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete.md @@ -7,6 +7,6 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.delete( - '<SITE_ID>' // siteId -); +const response = await sites.delete({ + siteId: '<SITE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-deno/examples/sites/get-deployment-download.md index 4c3ceca8ae..ae4d3b34df 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/get-deployment-download.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/get-deployment-download.md @@ -7,8 +7,8 @@ const client = new Client() const sites = new Sites(client); -const result = sites.getDeploymentDownload( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>', // deploymentId - DeploymentDownloadType.Source // type (optional) -); +const result = sites.getDeploymentDownload({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.Source +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/get-deployment.md index 4e614b0de9..ed23bd15fb 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/get-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/get-deployment.md @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.getDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await sites.getDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get-log.md b/docs/examples/1.8.x/server-deno/examples/sites/get-log.md index 9495030fa3..30cd601868 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/get-log.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/get-log.md @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.getLog( - '<SITE_ID>', // siteId - '<LOG_ID>' // logId -); +const response = await sites.getLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/get-variable.md index 12ab553026..e070d2e1e6 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/get-variable.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/get-variable.md @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.getVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>' // variableId -); +const response = await sites.getVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get.md b/docs/examples/1.8.x/server-deno/examples/sites/get.md index 769f426d1e..80cc792ed0 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/get.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/get.md @@ -7,6 +7,6 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.get( - '<SITE_ID>' // siteId -); +const response = await sites.get({ + siteId: '<SITE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-deno/examples/sites/list-deployments.md index 09cc52194f..0f86956a63 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/list-deployments.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-deployments.md @@ -7,8 +7,8 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.listDeployments( - '<SITE_ID>', // siteId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await sites.listDeployments({ + siteId: '<SITE_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-logs.md b/docs/examples/1.8.x/server-deno/examples/sites/list-logs.md index 3249903c07..2519ed038d 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/list-logs.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-logs.md @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.listLogs( - '<SITE_ID>', // siteId - [] // queries (optional) -); +const response = await sites.listLogs({ + siteId: '<SITE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-variables.md b/docs/examples/1.8.x/server-deno/examples/sites/list-variables.md index 0aac319816..ed7176289f 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/list-variables.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-variables.md @@ -7,6 +7,6 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.listVariables( - '<SITE_ID>' // siteId -); +const response = await sites.listVariables({ + siteId: '<SITE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list.md b/docs/examples/1.8.x/server-deno/examples/sites/list.md index f21433d794..828e9c797e 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/list.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/list.md @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await sites.list({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-deno/examples/sites/update-deployment-status.md index 83fe6f85a0..e634de99b8 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/update-deployment-status.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/update-deployment-status.md @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.updateDeploymentStatus( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await sites.updateDeploymentStatus({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/update-site-deployment.md index 1d9d697d39..c6ee03bfb4 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/update-site-deployment.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/update-site-deployment.md @@ -7,7 +7,7 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.updateSiteDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const response = await sites.updateSiteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/update-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/update-variable.md index 6776af7a65..214dfffa36 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/update-variable.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/update-variable.md @@ -7,10 +7,10 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.updateVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>', // variableId - '<KEY>', // key - '<VALUE>', // value (optional) - false // secret (optional) -); +const response = await sites.updateVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/update.md b/docs/examples/1.8.x/server-deno/examples/sites/update.md index ba7d195cd3..edb6e76c67 100644 --- a/docs/examples/1.8.x/server-deno/examples/sites/update.md +++ b/docs/examples/1.8.x/server-deno/examples/sites/update.md @@ -7,23 +7,23 @@ const client = new Client() const sites = new Sites(client); -const response = await sites.update( - '<SITE_ID>', // siteId - '<NAME>', // name - .Analog, // framework - false, // enabled (optional) - false, // logging (optional) - 1, // timeout (optional) - '<INSTALL_COMMAND>', // installCommand (optional) - '<BUILD_COMMAND>', // buildCommand (optional) - '<OUTPUT_DIRECTORY>', // outputDirectory (optional) - .Node145, // buildRuntime (optional) - .Static, // adapter (optional) - '<FALLBACK_FILE>', // fallbackFile (optional) - '<INSTALLATION_ID>', // installationId (optional) - '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) - '<PROVIDER_BRANCH>', // providerBranch (optional) - false, // providerSilentMode (optional) - '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) - '' // specification (optional) -); +const response = await sites.update({ + siteId: '<SITE_ID>', + name: '<NAME>', + framework: .Analog, + enabled: false, + logging: false, + timeout: 1, + installCommand: '<INSTALL_COMMAND>', + buildCommand: '<BUILD_COMMAND>', + outputDirectory: '<OUTPUT_DIRECTORY>', + buildRuntime: .Node145, + adapter: .Static, + fallbackFile: '<FALLBACK_FILE>', + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerBranch: '<PROVIDER_BRANCH>', + providerSilentMode: false, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', + specification: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/create-bucket.md index e7d3e9006a..e2daa65eb4 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/create-bucket.md @@ -7,15 +7,15 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.createBucket( - '<BUCKET_ID>', // bucketId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // fileSecurity (optional) - false, // enabled (optional) - 1, // maximumFileSize (optional) - [], // allowedFileExtensions (optional) - .None, // compression (optional) - false, // encryption (optional) - false // antivirus (optional) -); +const response = await storage.createBucket({ + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: .None, + encryption: false, + antivirus: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/create-file.md b/docs/examples/1.8.x/server-deno/examples/storage/create-file.md index d8912c6c1e..c8565c746d 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/create-file.md @@ -7,9 +7,9 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.createFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - InputFile.fromPath('/path/to/file.png', 'file.png'), // file - ["read("any")"] // permissions (optional) -); +const response = await storage.createFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile.fromPath('/path/to/file.png', 'file.png'), + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/delete-bucket.md index f0d71467d4..d5f2e365f8 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/delete-bucket.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/delete-bucket.md @@ -7,6 +7,6 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.deleteBucket( - '<BUCKET_ID>' // bucketId -); +const response = await storage.deleteBucket({ + bucketId: '<BUCKET_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/delete-file.md b/docs/examples/1.8.x/server-deno/examples/storage/delete-file.md index 2a1f95ed18..3f9f2ac566 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/delete-file.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/delete-file.md @@ -7,7 +7,7 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.deleteFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>' // fileId -); +const response = await storage.deleteFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/get-bucket.md index a695021b72..ffb191326d 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/get-bucket.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-bucket.md @@ -7,6 +7,6 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.getBucket( - '<BUCKET_ID>' // bucketId -); +const response = await storage.getBucket({ + bucketId: '<BUCKET_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-deno/examples/storage/get-file-download.md index df11f40b80..7e0a55b9fd 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/get-file-download.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-file-download.md @@ -7,8 +7,8 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileDownload( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<TOKEN>' // token (optional) -); +const result = storage.getFileDownload({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-deno/examples/storage/get-file-preview.md index 6457c7831b..1efe6d8e66 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/get-file-preview.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-file-preview.md @@ -7,19 +7,19 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFilePreview( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - 0, // width (optional) - 0, // height (optional) - ImageGravity.Center, // gravity (optional) - -1, // quality (optional) - 0, // borderWidth (optional) - '', // borderColor (optional) - 0, // borderRadius (optional) - 0, // opacity (optional) - -360, // rotation (optional) - '', // background (optional) - ImageFormat.Jpg, // output (optional) - '<TOKEN>' // token (optional) -); +const result = storage.getFilePreview({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, + height: 0, + gravity: ImageGravity.Center, + quality: -1, + borderWidth: 0, + borderColor: '', + borderRadius: 0, + opacity: 0, + rotation: -360, + background: '', + output: ImageFormat.Jpg, + token: '<TOKEN>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-deno/examples/storage/get-file-view.md index 5a1dbac86a..f629b40b7f 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/get-file-view.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-file-view.md @@ -7,8 +7,8 @@ const client = new Client() const storage = new Storage(client); -const result = storage.getFileView( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<TOKEN>' // token (optional) -); +const result = storage.getFileView({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-file.md b/docs/examples/1.8.x/server-deno/examples/storage/get-file.md index 5479dc569d..604696a08c 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/get-file.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-file.md @@ -7,7 +7,7 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.getFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>' // fileId -); +const response = await storage.getFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-deno/examples/storage/list-buckets.md index 9286bd488c..5319459474 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/list-buckets.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/list-buckets.md @@ -7,7 +7,7 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.listBuckets( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await storage.listBuckets({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/list-files.md b/docs/examples/1.8.x/server-deno/examples/storage/list-files.md index 316875cf51..f34a0e110a 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/list-files.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/list-files.md @@ -7,8 +7,8 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.listFiles( - '<BUCKET_ID>', // bucketId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await storage.listFiles({ + bucketId: '<BUCKET_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/update-bucket.md index 1e70f16ef3..fca45d893a 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/update-bucket.md @@ -7,15 +7,15 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.updateBucket( - '<BUCKET_ID>', // bucketId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // fileSecurity (optional) - false, // enabled (optional) - 1, // maximumFileSize (optional) - [], // allowedFileExtensions (optional) - .None, // compression (optional) - false, // encryption (optional) - false // antivirus (optional) -); +const response = await storage.updateBucket({ + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: .None, + encryption: false, + antivirus: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/update-file.md b/docs/examples/1.8.x/server-deno/examples/storage/update-file.md index 683b0b7304..65f4dd3c71 100644 --- a/docs/examples/1.8.x/server-deno/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-deno/examples/storage/update-file.md @@ -7,9 +7,9 @@ const client = new Client() const storage = new Storage(client); -const response = await storage.updateFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<NAME>', // name (optional) - ["read("any")"] // permissions (optional) -); +const response = await storage.updateFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..410cee12a2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..19267e0910 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..22b2a9d24e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-email-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createEmailColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..b2dcc88687 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-enum-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..4cf2b55c5c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-float-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, + max: null, + default: null, + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..efb1f12c85 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-index.md @@ -0,0 +1,18 @@ +import { Client, TablesDb, IndexType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType.Key, + columns: [], + orders: [], + lengths: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..ccbda0b4d2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-integer-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, + max: null, + default: null, + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..c5c2fa6e27 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-ip-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..a50ffcdb29 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDb, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType.OneToOne, + twoWay: false, + key: '', + twoWayKey: '', + onDelete: RelationMutate.Cascade +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..6f0646332c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-row.md @@ -0,0 +1,16 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..87f7d2e52b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-rows.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..3b0bf5b9ab --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-string-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createStringColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', + array: false, + encrypt: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-table.md new file mode 100644 index 0000000000..596f4e3b55 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-table.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], + rowSecurity: false, + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..014f54bd37 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create-url-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.createUrlColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + array: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/create.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/create.md new file mode 100644 index 0000000000..618e4c6789 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/create.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..67fd811bc3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.decrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, + min: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..2ba1140995 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-column.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.deleteColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..e1b77edc5e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-index.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.deleteIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..f18b6ac1ce --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-row.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.deleteRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..659150fb81 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-rows.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.deleteRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..1be63ed274 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete-table.md @@ -0,0 +1,13 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.deleteTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete.md new file mode 100644 index 0000000000..12c92bf5ea --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/delete.md @@ -0,0 +1,12 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.delete({ + databaseId: '<DATABASE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..559953580d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-column.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.getColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..708c22ae78 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-index.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.getIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..0e9f079c46 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-row.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.getRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..91b4957722 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/get-table.md @@ -0,0 +1,13 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.getTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/get.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/get.md new file mode 100644 index 0000000000..b5fc2f7ade --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/get.md @@ -0,0 +1,12 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.get({ + databaseId: '<DATABASE_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..03b59d520b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/increment-row-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.incrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, + max: null +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..7c061e9d25 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-columns.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.listColumns({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..d2b0010d80 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-indexes.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.listIndexes({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..764bfa701f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-rows.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.listRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..3b74c36d54 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/list-tables.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.listTables({ + databaseId: '<DATABASE_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/list.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/list.md new file mode 100644 index 0000000000..5af10e4e62 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/list.md @@ -0,0 +1,13 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.list({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..af6a9625d6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..b704445d3d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..28f243ccf4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-email-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateEmailColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..6f44394051 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-enum-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..8b1c50e1ee --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-float-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, + max: null, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..e2b5af0861 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-integer-column.md @@ -0,0 +1,19 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, + max: null, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..54bf616f57 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-ip-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..de8d3db42e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,16 @@ +import { Client, TablesDb, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate.Cascade, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..35b1b27e69 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-row.md @@ -0,0 +1,16 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..3e5cba802a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-rows.md @@ -0,0 +1,15 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: {}, + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..b763d378ec --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-string-column.md @@ -0,0 +1,18 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateStringColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-table.md new file mode 100644 index 0000000000..54d60ed598 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-table.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], + rowSecurity: false, + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..c09ee6e690 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update-url-column.md @@ -0,0 +1,17 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.updateUrlColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/update.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/update.md new file mode 100644 index 0000000000..8504e63bd3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/update.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..dda7dad592 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/upsert-row.md @@ -0,0 +1,16 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.upsertRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-deno/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..173235105a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tablesdb/upsert-rows.md @@ -0,0 +1,14 @@ +import { Client, TablesDb } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new TablesDb(client); + +const response = await tablesDb.upsertRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/create-membership.md b/docs/examples/1.8.x/server-deno/examples/teams/create-membership.md index d8e855f852..fc3b8b44e6 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/create-membership.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/create-membership.md @@ -7,12 +7,12 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.createMembership( - '<TEAM_ID>', // teamId - [], // roles - 'email@example.com', // email (optional) - '<USER_ID>', // userId (optional) - '+12065550100', // phone (optional) - 'https://example.com', // url (optional) - '<NAME>' // name (optional) -); +const response = await teams.createMembership({ + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', + userId: '<USER_ID>', + phone: '+12065550100', + url: 'https://example.com', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/create.md b/docs/examples/1.8.x/server-deno/examples/teams/create.md index 495f26e006..7247da9d87 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/create.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/create.md @@ -7,8 +7,8 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.create( - '<TEAM_ID>', // teamId - '<NAME>', // name - [] // roles (optional) -); +const response = await teams.create({ + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-deno/examples/teams/delete-membership.md index a5b03875d5..51fcd0c99d 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/delete-membership.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/delete-membership.md @@ -7,7 +7,7 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.deleteMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>' // membershipId -); +const response = await teams.deleteMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/delete.md b/docs/examples/1.8.x/server-deno/examples/teams/delete.md index 556fbb5ea5..e300ad5d69 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/delete.md @@ -7,6 +7,6 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.delete( - '<TEAM_ID>' // teamId -); +const response = await teams.delete({ + teamId: '<TEAM_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/get-membership.md b/docs/examples/1.8.x/server-deno/examples/teams/get-membership.md index 75283bffc7..73b6a240c6 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/get-membership.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/get-membership.md @@ -7,7 +7,7 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.getMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>' // membershipId -); +const response = await teams.getMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-deno/examples/teams/get-prefs.md index 442d8b139a..d2cdd8af10 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/get-prefs.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/get-prefs.md @@ -7,6 +7,6 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.getPrefs( - '<TEAM_ID>' // teamId -); +const response = await teams.getPrefs({ + teamId: '<TEAM_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/get.md b/docs/examples/1.8.x/server-deno/examples/teams/get.md index 2e5803ca7b..41c81bc2ee 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/get.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/get.md @@ -7,6 +7,6 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.get( - '<TEAM_ID>' // teamId -); +const response = await teams.get({ + teamId: '<TEAM_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-deno/examples/teams/list-memberships.md index 0b7e6638e6..1d67b15166 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/list-memberships.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/list-memberships.md @@ -7,8 +7,8 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.listMemberships( - '<TEAM_ID>', // teamId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await teams.listMemberships({ + teamId: '<TEAM_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/list.md b/docs/examples/1.8.x/server-deno/examples/teams/list.md index 6c08b5c80a..0fd5079d2e 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/list.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/list.md @@ -7,7 +7,7 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await teams.list({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-deno/examples/teams/update-membership-status.md index 48fc9cd8be..22ac429361 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/update-membership-status.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/update-membership-status.md @@ -7,9 +7,9 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.updateMembershipStatus( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>', // membershipId - '<USER_ID>', // userId - '<SECRET>' // secret -); +const response = await teams.updateMembershipStatus({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/update-membership.md b/docs/examples/1.8.x/server-deno/examples/teams/update-membership.md index be8651d724..3524cc5b4e 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/update-membership.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/update-membership.md @@ -7,8 +7,8 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.updateMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>', // membershipId - [] // roles -); +const response = await teams.updateMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/update-name.md b/docs/examples/1.8.x/server-deno/examples/teams/update-name.md index 6e2144b897..b7d7e0f837 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/update-name.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/update-name.md @@ -7,7 +7,7 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.updateName( - '<TEAM_ID>', // teamId - '<NAME>' // name -); +const response = await teams.updateName({ + teamId: '<TEAM_ID>', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-deno/examples/teams/update-prefs.md index dea8a368c4..5c7eaecf72 100644 --- a/docs/examples/1.8.x/server-deno/examples/teams/update-prefs.md +++ b/docs/examples/1.8.x/server-deno/examples/teams/update-prefs.md @@ -7,7 +7,7 @@ const client = new Client() const teams = new Teams(client); -const response = await teams.updatePrefs( - '<TEAM_ID>', // teamId - {} // prefs -); +const response = await teams.updatePrefs({ + teamId: '<TEAM_ID>', + prefs: {} +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-deno/examples/tokens/create-file-token.md index 7c24738cb5..52fd3c70cb 100644 --- a/docs/examples/1.8.x/server-deno/examples/tokens/create-file-token.md +++ b/docs/examples/1.8.x/server-deno/examples/tokens/create-file-token.md @@ -7,8 +7,8 @@ const client = new Client() const tokens = new Tokens(client); -const response = await tokens.createFileToken( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '' // expire (optional) -); +const response = await tokens.createFileToken({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + expire: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/delete.md b/docs/examples/1.8.x/server-deno/examples/tokens/delete.md index b5e3adfa35..6c41ea5c0a 100644 --- a/docs/examples/1.8.x/server-deno/examples/tokens/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/tokens/delete.md @@ -7,6 +7,6 @@ const client = new Client() const tokens = new Tokens(client); -const response = await tokens.delete( - '<TOKEN_ID>' // tokenId -); +const response = await tokens.delete({ + tokenId: '<TOKEN_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/get.md b/docs/examples/1.8.x/server-deno/examples/tokens/get.md index 2bb827d870..a7bf23a1c8 100644 --- a/docs/examples/1.8.x/server-deno/examples/tokens/get.md +++ b/docs/examples/1.8.x/server-deno/examples/tokens/get.md @@ -7,6 +7,6 @@ const client = new Client() const tokens = new Tokens(client); -const response = await tokens.get( - '<TOKEN_ID>' // tokenId -); +const response = await tokens.get({ + tokenId: '<TOKEN_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/list.md b/docs/examples/1.8.x/server-deno/examples/tokens/list.md index 7208a53553..93e91d3ba9 100644 --- a/docs/examples/1.8.x/server-deno/examples/tokens/list.md +++ b/docs/examples/1.8.x/server-deno/examples/tokens/list.md @@ -7,8 +7,8 @@ const client = new Client() const tokens = new Tokens(client); -const response = await tokens.list( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - [] // queries (optional) -); +const response = await tokens.list({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/update.md b/docs/examples/1.8.x/server-deno/examples/tokens/update.md index 4464a0ccf8..391118c2a8 100644 --- a/docs/examples/1.8.x/server-deno/examples/tokens/update.md +++ b/docs/examples/1.8.x/server-deno/examples/tokens/update.md @@ -7,7 +7,7 @@ const client = new Client() const tokens = new Tokens(client); -const response = await tokens.update( - '<TOKEN_ID>', // tokenId - '' // expire (optional) -); +const response = await tokens.update({ + tokenId: '<TOKEN_ID>', + expire: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md index 7a6e0fb144..8ec4edcbad 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md @@ -7,9 +7,9 @@ const client = new Client() const users = new Users(client); -const response = await users.createArgon2User( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const response = await users.createArgon2User({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-bcrypt-user.md index ddfb7f3b12..75ef72d22e 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-bcrypt-user.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-bcrypt-user.md @@ -7,9 +7,9 @@ const client = new Client() const users = new Users(client); -const response = await users.createBcryptUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const response = await users.createBcryptUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-deno/examples/users/create-j-w-t.md index 4c433aebdd..4fef1c6a6e 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-j-w-t.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-j-w-t.md @@ -7,8 +7,8 @@ const client = new Client() const users = new Users(client); -const response = await users.createJWT( - '<USER_ID>', // userId - '<SESSION_ID>', // sessionId (optional) - 0 // duration (optional) -); +const response = await users.createJWT({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', + duration: 0 +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-deno/examples/users/create-m-d5user.md index 8cc63cedbd..bf29090692 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-m-d5user.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-m-d5user.md @@ -7,9 +7,9 @@ const client = new Client() const users = new Users(client); -const response = await users.createMD5User( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const response = await users.createMD5User({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/users/create-mfa-recovery-codes.md index 98ba71a845..cb33377d73 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-mfa-recovery-codes.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.createMfaRecoveryCodes( - '<USER_ID>' // userId -); +const response = await users.createMfaRecoveryCodes({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-p-h-pass-user.md index 750b299074..d461887a59 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-p-h-pass-user.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-p-h-pass-user.md @@ -7,9 +7,9 @@ const client = new Client() const users = new Users(client); -const response = await users.createPHPassUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const response = await users.createPHPassUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-s-h-a-user.md index e243a1d6ee..3819016971 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-s-h-a-user.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-s-h-a-user.md @@ -7,10 +7,10 @@ const client = new Client() const users = new Users(client); -const response = await users.createSHAUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - PasswordHash.Sha1, // passwordVersion (optional) - '<NAME>' // name (optional) -); +const response = await users.createSHAUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: PasswordHash.Sha1, + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-modified-user.md index 0d6a65b8b4..7b9c908b0b 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-modified-user.md @@ -7,12 +7,12 @@ const client = new Client() const users = new Users(client); -const response = await users.createScryptModifiedUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<PASSWORD_SALT>', // passwordSalt - '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator - '<PASSWORD_SIGNER_KEY>', // passwordSignerKey - '<NAME>' // name (optional) -); +const response = await users.createScryptModifiedUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-user.md index 87f2dbb09e..63c25f41f4 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-user.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-user.md @@ -7,14 +7,14 @@ const client = new Client() const users = new Users(client); -const response = await users.createScryptUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<PASSWORD_SALT>', // passwordSalt - null, // passwordCpu - null, // passwordMemory - null, // passwordParallel - null, // passwordLength - '<NAME>' // name (optional) -); +const response = await users.createScryptUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: null, + passwordMemory: null, + passwordParallel: null, + passwordLength: null, + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-session.md b/docs/examples/1.8.x/server-deno/examples/users/create-session.md index 37d6948942..962d391185 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-session.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-session.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.createSession( - '<USER_ID>' // userId -); +const response = await users.createSession({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-target.md b/docs/examples/1.8.x/server-deno/examples/users/create-target.md index a36072a5de..cd542d41de 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-target.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-target.md @@ -7,11 +7,11 @@ const client = new Client() const users = new Users(client); -const response = await users.createTarget( - '<USER_ID>', // userId - '<TARGET_ID>', // targetId - MessagingProviderType.Email, // providerType - '<IDENTIFIER>', // identifier - '<PROVIDER_ID>', // providerId (optional) - '<NAME>' // name (optional) -); +const response = await users.createTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: MessagingProviderType.Email, + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-token.md b/docs/examples/1.8.x/server-deno/examples/users/create-token.md index 91885e15f3..2a215d9a89 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create-token.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create-token.md @@ -7,8 +7,8 @@ const client = new Client() const users = new Users(client); -const response = await users.createToken( - '<USER_ID>', // userId - 4, // length (optional) - 60 // expire (optional) -); +const response = await users.createToken({ + userId: '<USER_ID>', + length: 4, + expire: 60 +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create.md b/docs/examples/1.8.x/server-deno/examples/users/create.md index e0eb5856d1..cee05f32b4 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/create.md +++ b/docs/examples/1.8.x/server-deno/examples/users/create.md @@ -7,10 +7,10 @@ const client = new Client() const users = new Users(client); -const response = await users.create( - '<USER_ID>', // userId - 'email@example.com', // email (optional) - '+12065550100', // phone (optional) - '', // password (optional) - '<NAME>' // name (optional) -); +const response = await users.create({ + userId: '<USER_ID>', + email: 'email@example.com', + phone: '+12065550100', + password: '', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-identity.md b/docs/examples/1.8.x/server-deno/examples/users/delete-identity.md index 7aea654645..83efe6a3c5 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/delete-identity.md +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-identity.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.deleteIdentity( - '<IDENTITY_ID>' // identityId -); +const response = await users.deleteIdentity({ + identityId: '<IDENTITY_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/users/delete-mfa-authenticator.md index 2d7595005e..2945d5ce3f 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-mfa-authenticator.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.deleteMfaAuthenticator( - '<USER_ID>', // userId - AuthenticatorType.Totp // type -); +const response = await users.deleteMfaAuthenticator({ + userId: '<USER_ID>', + type: AuthenticatorType.Totp +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-session.md b/docs/examples/1.8.x/server-deno/examples/users/delete-session.md index 0ce82fe50f..1d4adc8063 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/delete-session.md +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-session.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.deleteSession( - '<USER_ID>', // userId - '<SESSION_ID>' // sessionId -); +const response = await users.deleteSession({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-deno/examples/users/delete-sessions.md index f80300b205..ec4453111e 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/delete-sessions.md +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-sessions.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.deleteSessions( - '<USER_ID>' // userId -); +const response = await users.deleteSessions({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-target.md b/docs/examples/1.8.x/server-deno/examples/users/delete-target.md index 9080a962e6..953ade1e02 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/delete-target.md +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-target.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.deleteTarget( - '<USER_ID>', // userId - '<TARGET_ID>' // targetId -); +const response = await users.deleteTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete.md b/docs/examples/1.8.x/server-deno/examples/users/delete.md index 7ac1bf1d3a..5ab1f18726 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/delete.md +++ b/docs/examples/1.8.x/server-deno/examples/users/delete.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.delete( - '<USER_ID>' // userId -); +const response = await users.delete({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/users/get-mfa-recovery-codes.md index f78c0bf1b0..7d00af0db1 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-deno/examples/users/get-mfa-recovery-codes.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.getMfaRecoveryCodes( - '<USER_ID>' // userId -); +const response = await users.getMfaRecoveryCodes({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/get-prefs.md b/docs/examples/1.8.x/server-deno/examples/users/get-prefs.md index ef1be1e18b..d252ffe223 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/get-prefs.md +++ b/docs/examples/1.8.x/server-deno/examples/users/get-prefs.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.getPrefs( - '<USER_ID>' // userId -); +const response = await users.getPrefs({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/get-target.md b/docs/examples/1.8.x/server-deno/examples/users/get-target.md index 301ee6e7ed..7586fae9ad 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/get-target.md +++ b/docs/examples/1.8.x/server-deno/examples/users/get-target.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.getTarget( - '<USER_ID>', // userId - '<TARGET_ID>' // targetId -); +const response = await users.getTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/get.md b/docs/examples/1.8.x/server-deno/examples/users/get.md index 8e41ed6350..c3e58635a1 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/get.md +++ b/docs/examples/1.8.x/server-deno/examples/users/get.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.get( - '<USER_ID>' // userId -); +const response = await users.get({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-identities.md b/docs/examples/1.8.x/server-deno/examples/users/list-identities.md index 6ac439547b..ae7ce5d45e 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/list-identities.md +++ b/docs/examples/1.8.x/server-deno/examples/users/list-identities.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.listIdentities( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await users.listIdentities({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-logs.md b/docs/examples/1.8.x/server-deno/examples/users/list-logs.md index 983ffba299..62e56258e1 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/list-logs.md +++ b/docs/examples/1.8.x/server-deno/examples/users/list-logs.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.listLogs( - '<USER_ID>', // userId - [] // queries (optional) -); +const response = await users.listLogs({ + userId: '<USER_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-memberships.md b/docs/examples/1.8.x/server-deno/examples/users/list-memberships.md index afdd4d4f2d..20993dcce4 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/list-memberships.md +++ b/docs/examples/1.8.x/server-deno/examples/users/list-memberships.md @@ -7,8 +7,8 @@ const client = new Client() const users = new Users(client); -const response = await users.listMemberships( - '<USER_ID>', // userId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await users.listMemberships({ + userId: '<USER_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-deno/examples/users/list-mfa-factors.md index 34b65afac3..e54e9beae9 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/list-mfa-factors.md +++ b/docs/examples/1.8.x/server-deno/examples/users/list-mfa-factors.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.listMfaFactors( - '<USER_ID>' // userId -); +const response = await users.listMfaFactors({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-sessions.md b/docs/examples/1.8.x/server-deno/examples/users/list-sessions.md index 314f277d7a..46f4e5c40d 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/list-sessions.md +++ b/docs/examples/1.8.x/server-deno/examples/users/list-sessions.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.listSessions( - '<USER_ID>' // userId -); +const response = await users.listSessions({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-targets.md b/docs/examples/1.8.x/server-deno/examples/users/list-targets.md index 9ed2dda4ce..a9571dcdcc 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/list-targets.md +++ b/docs/examples/1.8.x/server-deno/examples/users/list-targets.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.listTargets( - '<USER_ID>', // userId - [] // queries (optional) -); +const response = await users.listTargets({ + userId: '<USER_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list.md b/docs/examples/1.8.x/server-deno/examples/users/list.md index 488fbdc09c..9b8b4fe2db 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/list.md +++ b/docs/examples/1.8.x/server-deno/examples/users/list.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const response = await users.list({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-deno/examples/users/update-email-verification.md index 3243f21c6f..df2fd03fd0 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/update-email-verification.md +++ b/docs/examples/1.8.x/server-deno/examples/users/update-email-verification.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updateEmailVerification( - '<USER_ID>', // userId - false // emailVerification -); +const response = await users.updateEmailVerification({ + userId: '<USER_ID>', + emailVerification: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-email.md b/docs/examples/1.8.x/server-deno/examples/users/update-email.md index f609cab463..fbf34cabdd 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/update-email.md +++ b/docs/examples/1.8.x/server-deno/examples/users/update-email.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updateEmail( - '<USER_ID>', // userId - 'email@example.com' // email -); +const response = await users.updateEmail({ + userId: '<USER_ID>', + email: 'email@example.com' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-labels.md b/docs/examples/1.8.x/server-deno/examples/users/update-labels.md index 5a23298179..18cdca2933 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/update-labels.md +++ b/docs/examples/1.8.x/server-deno/examples/users/update-labels.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updateLabels( - '<USER_ID>', // userId - [] // labels -); +const response = await users.updateLabels({ + userId: '<USER_ID>', + labels: [] +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/users/update-mfa-recovery-codes.md index a74577e9cc..9bfd39540c 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-deno/examples/users/update-mfa-recovery-codes.md @@ -7,6 +7,6 @@ const client = new Client() const users = new Users(client); -const response = await users.updateMfaRecoveryCodes( - '<USER_ID>' // userId -); +const response = await users.updateMfaRecoveryCodes({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-mfa.md b/docs/examples/1.8.x/server-deno/examples/users/update-mfa.md index 717f8d6ab7..97a1afc1f9 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/update-mfa.md +++ b/docs/examples/1.8.x/server-deno/examples/users/update-mfa.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updateMfa( - '<USER_ID>', // userId - false // mfa -); +const response = await users.updateMfa({ + userId: '<USER_ID>', + mfa: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-name.md b/docs/examples/1.8.x/server-deno/examples/users/update-name.md index 35fc853e3f..304e833506 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/update-name.md +++ b/docs/examples/1.8.x/server-deno/examples/users/update-name.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updateName( - '<USER_ID>', // userId - '<NAME>' // name -); +const response = await users.updateName({ + userId: '<USER_ID>', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-password.md b/docs/examples/1.8.x/server-deno/examples/users/update-password.md index 8366b5c4c2..8eecca408c 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/update-password.md +++ b/docs/examples/1.8.x/server-deno/examples/users/update-password.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updatePassword( - '<USER_ID>', // userId - '' // password -); +const response = await users.updatePassword({ + userId: '<USER_ID>', + password: '' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-deno/examples/users/update-phone-verification.md index 088fd1eb57..713cdac8d7 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/update-phone-verification.md +++ b/docs/examples/1.8.x/server-deno/examples/users/update-phone-verification.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updatePhoneVerification( - '<USER_ID>', // userId - false // phoneVerification -); +const response = await users.updatePhoneVerification({ + userId: '<USER_ID>', + phoneVerification: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-phone.md b/docs/examples/1.8.x/server-deno/examples/users/update-phone.md index a8e47a62b8..1c3926bc79 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/update-phone.md +++ b/docs/examples/1.8.x/server-deno/examples/users/update-phone.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updatePhone( - '<USER_ID>', // userId - '+12065550100' // number -); +const response = await users.updatePhone({ + userId: '<USER_ID>', + number: '+12065550100' +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-prefs.md b/docs/examples/1.8.x/server-deno/examples/users/update-prefs.md index cb8919a98f..555f9b4e23 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/update-prefs.md +++ b/docs/examples/1.8.x/server-deno/examples/users/update-prefs.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updatePrefs( - '<USER_ID>', // userId - {} // prefs -); +const response = await users.updatePrefs({ + userId: '<USER_ID>', + prefs: {} +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-status.md b/docs/examples/1.8.x/server-deno/examples/users/update-status.md index 1c672a4d25..b6b692e3e1 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/update-status.md +++ b/docs/examples/1.8.x/server-deno/examples/users/update-status.md @@ -7,7 +7,7 @@ const client = new Client() const users = new Users(client); -const response = await users.updateStatus( - '<USER_ID>', // userId - false // status -); +const response = await users.updateStatus({ + userId: '<USER_ID>', + status: false +}); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-target.md b/docs/examples/1.8.x/server-deno/examples/users/update-target.md index 4524748c55..437c614a5c 100644 --- a/docs/examples/1.8.x/server-deno/examples/users/update-target.md +++ b/docs/examples/1.8.x/server-deno/examples/users/update-target.md @@ -7,10 +7,10 @@ const client = new Client() const users = new Users(client); -const response = await users.updateTarget( - '<USER_ID>', // userId - '<TARGET_ID>', // targetId - '<IDENTIFIER>', // identifier (optional) - '<PROVIDER_ID>', // providerId (optional) - '<NAME>' // name (optional) -); +const response = await users.updateTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/decrement-document-attribute.md index c327458f61..2e48d4578e 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/decrement-document-attribute.md @@ -5,7 +5,7 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key + .SetSession(""); // The user session to authenticate with Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/increment-document-attribute.md index be52584aaf..923c8d63e2 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/increment-document-attribute.md @@ -5,7 +5,7 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key + .SetSession(""); // The user session to authenticate with Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..06bc07a8a1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnBoolean result = await tablesDb.CreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..d810517988 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnDatetime result = await tablesDb.CreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..d57f858a9e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-email-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnEmail result = await tablesDb.CreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..149ae86134 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-enum-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnEnum result = await tablesDb.CreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..41dd45edfb --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-float-column.md @@ -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 + +TablesDb tablesDb = new TablesDb(client); + +ColumnFloat result = await tablesDb.CreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..380a07051b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-index.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnIndex result = await tablesDb.CreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: IndexType.Key, + columns: new List<string>(), + orders: new List<string>(), // optional + lengths: new List<long>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..2bae4eae51 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-integer-column.md @@ -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 + +TablesDb tablesDb = new TablesDb(client); + +ColumnInteger result = await tablesDb.CreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..4f94fd9dd5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-ip-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnIp result = await tablesDb.CreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..e3b22f1dd8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,22 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnRelationship result = await tablesDb.CreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: RelationMutate.Cascade // 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 new file mode 100644 index 0000000000..5bf1e0fe38 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-row.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +Row result = await tablesDb.CreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..889437e063 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +RowList result = await tablesDb.CreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: new List<object>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..97ce907de6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-string-column.md @@ -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 + +TablesDb tablesDb = new TablesDb(client); + +ColumnString result = await tablesDb.CreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // 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 new file mode 100644 index 0000000000..8d1dbc9694 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-table.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +Table result = await tablesDb.CreateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("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/create-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..d89ebd33d6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create-url-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnUrl result = await tablesDb.CreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create.md new file mode 100644 index 0000000000..a1fc21fb0a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/create.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +Database result = await tablesDb.Create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..77ebbf7702 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +Row result = await tablesDb.DecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + min: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..e95f483f38 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-column.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +await tablesDb.DeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..da86a942f0 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +await tablesDb.DeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..77a79bb9b9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-row.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +await tablesDb.DeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..f703ebb30b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +await tablesDb.DeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..9be80ed0bf --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete-table.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +await tablesDb.DeleteTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete.md new file mode 100644 index 0000000000..50c36501d8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +await tablesDb.Delete( + databaseId: "<DATABASE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..55b17c2923 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-column.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + + result = await tablesDb.GetColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..724e38d1d9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnIndex result = await tablesDb.GetIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..4cc4ca82ed --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-row.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +Row result = await tablesDb.GetRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..59554e3bc5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get-table.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +Table result = await tablesDb.GetTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get.md new file mode 100644 index 0000000000..2d9c80805a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +Database result = await tablesDb.Get( + databaseId: "<DATABASE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..6d9ce27e2e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/increment-row-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +Row result = await tablesDb.IncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + max: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..9505574efc --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-columns.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnList result = await tablesDb.ListColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..4284d1207f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-indexes.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnIndexList result = await tablesDb.ListIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..596c167a61 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +RowList result = await tablesDb.ListRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..2c74b3b642 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list-tables.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +TableList result = await tablesDb.ListTables( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list.md new file mode 100644 index 0000000000..916d004e84 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +DatabaseList result = await tablesDb.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..3c0de4cba6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnBoolean result = await tablesDb.UpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..ebbf61a7d7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnDatetime result = await tablesDb.UpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..1cf3efff05 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-email-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnEmail result = await tablesDb.UpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..82d1dd81d3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-enum-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnEnum result = await tablesDb.UpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..598c117b7a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-float-column.md @@ -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 + +TablesDb tablesDb = new TablesDb(client); + +ColumnFloat result = await tablesDb.UpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..4c6da922f6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-integer-column.md @@ -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 + +TablesDb tablesDb = new TablesDb(client); + +ColumnInteger result = await tablesDb.UpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..1ab4930f5e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-ip-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnIp result = await tablesDb.UpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..cac1342201 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnRelationship result = await tablesDb.UpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: RelationMutate.Cascade, // optional + newKey: "" // 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 new file mode 100644 index 0000000000..13465195db --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-row.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +Row result = await tablesDb.UpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..67f7a62e49 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-rows.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +RowList result = await tablesDb.UpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [object], // optional + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..aa6c066554 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-string-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnString result = await tablesDb.UpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // 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 new file mode 100644 index 0000000000..cedf3992fd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-table.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +Table result = await tablesDb.UpdateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("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-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..55dc4731cc --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update-url-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +ColumnUrl result = await tablesDb.UpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update.md new file mode 100644 index 0000000000..eb041d4ce8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/update.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +Database result = await tablesDb.Update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + 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 new file mode 100644 index 0000000000..4de1826402 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-row.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +Row result = await tablesDb.UpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..cf9076c7d1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tablesdb/upsert-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +RowList result = await tablesDb.UpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: new List<object>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md index 1d9c094030..fd4ab63aaf 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md @@ -10,7 +10,7 @@ func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithSession("") // The user session to authenticate with ) service := databases.New(client) diff --git a/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md index fa63e9c8df..0ea0312151 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md @@ -10,7 +10,7 @@ func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithSession("") // The user session to authenticate with ) service := databases.New(client) diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..bc2daaf82a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateBooleanColumnDefault(false), + tablesdb.WithCreateBooleanColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..e16e014008 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateDatetimeColumnDefault(""), + tablesdb.WithCreateDatetimeColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..9ffa9be83e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-email-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateEmailColumnDefault("email@example.com"), + tablesdb.WithCreateEmailColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..a817007e98 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-enum-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + tablesdb.WithCreateEnumColumnDefault("<DEFAULT>"), + tablesdb.WithCreateEnumColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..85fe948cd8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-float-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateFloatColumnMin(0), + tablesdb.WithCreateFloatColumnMax(0), + tablesdb.WithCreateFloatColumnDefault(0), + tablesdb.WithCreateFloatColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..a77a0ef303 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-index.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + "key", + []interface{}{}, + tablesdb.WithCreateIndexOrders([]interface{}{}), + tablesdb.WithCreateIndexLengths([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..35cf556486 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-integer-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateIntegerColumnMin(0), + tablesdb.WithCreateIntegerColumnMax(0), + tablesdb.WithCreateIntegerColumnDefault(0), + tablesdb.WithCreateIntegerColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..0df9111c66 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-ip-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateIpColumnDefault(""), + tablesdb.WithCreateIpColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..8b97af6e98 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<RELATED_TABLE_ID>", + "oneToOne", + tablesdb.WithCreateRelationshipColumnTwoWay(false), + tablesdb.WithCreateRelationshipColumnKey(""), + tablesdb.WithCreateRelationshipColumnTwoWayKey(""), + tablesdb.WithCreateRelationshipColumnOnDelete("cascade"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..fe8e0e34f5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-row.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tablesdb.New(client) + response, error := service.CreateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + map[string]interface{}{}, + tablesdb.WithCreateRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..8edf4913c1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..c1025d469f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-string-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + 1, + false, + tablesdb.WithCreateStringColumnDefault("<DEFAULT>"), + tablesdb.WithCreateStringColumnArray(false), + tablesdb.WithCreateStringColumnEncrypt(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-table.md new file mode 100644 index 0000000000..b3b18b2206 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-table.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateTable( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + tablesdb.WithCreateTablePermissions(interface{}{"read("any")"}), + tablesdb.WithCreateTableRowSecurity(false), + tablesdb.WithCreateTableEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..f90b1d843a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create-url-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.CreateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tablesdb.WithCreateUrlColumnDefault("https://example.com"), + tablesdb.WithCreateUrlColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/create.md b/docs/examples/1.8.x/server-go/examples/tablesdb/create.md new file mode 100644 index 0000000000..bb1b1b85b9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/create.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.Create( + "<DATABASE_ID>", + "<NAME>", + tablesdb.WithCreateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..115396aa3c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tablesdb.New(client) + response, error := service.DecrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + tablesdb.WithDecrementRowColumnValue(0), + tablesdb.WithDecrementRowColumnMin(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..a55e0d3932 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-column.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.DeleteColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..a5feb8b746 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.DeleteIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..ac782c3a24 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-row.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tablesdb.New(client) + response, error := service.DeleteRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..b117202604 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.DeleteRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithDeleteRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..ac8e4ece1b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete-table.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.DeleteTable( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-go/examples/tablesdb/delete.md new file mode 100644 index 0000000000..a610eed6a7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.Delete( + "<DATABASE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..977e97d94a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get-column.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.GetColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..c894630e2f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.GetIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..ad7a7014ab --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get-row.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tablesdb.New(client) + response, error := service.GetRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tablesdb.WithGetRowQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..de3bd7ba62 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get-table.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.GetTable( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/get.md b/docs/examples/1.8.x/server-go/examples/tablesdb/get.md new file mode 100644 index 0000000000..c42708f9c8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.Get( + "<DATABASE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..c7fd4da16a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/increment-row-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tablesdb.New(client) + response, error := service.IncrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + tablesdb.WithIncrementRowColumnValue(0), + tablesdb.WithIncrementRowColumnMax(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..9f1da0e3e7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list-columns.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.ListColumns( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithListColumnsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..71fc7ddb08 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list-indexes.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.ListIndexes( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithListIndexesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..2b74bb0412 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tablesdb.New(client) + response, error := service.ListRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithListRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..7f1520de8f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list-tables.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.ListTables( + "<DATABASE_ID>", + tablesdb.WithListTablesQueries([]interface{}{}), + tablesdb.WithListTablesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/list.md b/docs/examples/1.8.x/server-go/examples/tablesdb/list.md new file mode 100644 index 0000000000..dfbd06d06d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.List( + tablesdb.WithListQueries([]interface{}{}), + tablesdb.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..1d127f03a2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpdateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + false, + tablesdb.WithUpdateBooleanColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..6e76c17f8b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpdateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + tablesdb.WithUpdateDatetimeColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..d698153de3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-email-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpdateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "email@example.com", + tablesdb.WithUpdateEmailColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..462132f3fc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-enum-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpdateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + "<DEFAULT>", + tablesdb.WithUpdateEnumColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..14a676146b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-float-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpdateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + tablesdb.WithUpdateFloatColumnMin(0), + tablesdb.WithUpdateFloatColumnMax(0), + tablesdb.WithUpdateFloatColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..da69515d7d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-integer-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpdateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + tablesdb.WithUpdateIntegerColumnMin(0), + tablesdb.WithUpdateIntegerColumnMax(0), + tablesdb.WithUpdateIntegerColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..1aaa70b873 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-ip-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpdateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + tablesdb.WithUpdateIpColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..5b3abbeee4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpdateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + tablesdb.WithUpdateRelationshipColumnOnDelete("cascade"), + tablesdb.WithUpdateRelationshipColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..5230f45ad0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-row.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tablesdb.New(client) + response, error := service.UpdateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tablesdb.WithUpdateRowData(map[string]interface{}{}), + tablesdb.WithUpdateRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..4df16b851d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-rows.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpdateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tablesdb.WithUpdateRowsData(map[string]interface{}{}), + tablesdb.WithUpdateRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..9581868437 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-string-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpdateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "<DEFAULT>", + tablesdb.WithUpdateStringColumnSize(1), + tablesdb.WithUpdateStringColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-table.md new file mode 100644 index 0000000000..9c1406bc07 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-table.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpdateTable( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + tablesdb.WithUpdateTablePermissions(interface{}{"read("any")"}), + tablesdb.WithUpdateTableRowSecurity(false), + tablesdb.WithUpdateTableEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..a9c32fbb2e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update-url-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpdateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "https://example.com", + tablesdb.WithUpdateUrlColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/update.md b/docs/examples/1.8.x/server-go/examples/tablesdb/update.md new file mode 100644 index 0000000000..0fd52e11c2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/update.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.Update( + "<DATABASE_ID>", + "<NAME>", + tablesdb.WithUpdateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..4e09855f3e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-row.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tablesdb.New(client) + response, error := service.UpsertRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tablesdb.WithUpsertRowData(map[string]interface{}{}), + tablesdb.WithUpsertRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..dad9e9904a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tablesdb/upsert-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tablesdb" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tablesdb.New(client) + response, error := service.UpsertRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create.md b/docs/examples/1.8.x/server-graphql/examples/databases/create.md index c48e024e7c..6058ddc8be 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/create.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create.md @@ -9,5 +9,6 @@ mutation { _createdAt _updatedAt enabled + type } } diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update.md b/docs/examples/1.8.x/server-graphql/examples/databases/update.md index 88d286dc8a..bbb7bc6156 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/update.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update.md @@ -9,5 +9,6 @@ mutation { _createdAt _updatedAt enabled + type } } diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..7dff4ecd2d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,20 @@ +mutation { + tablesDbCreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..1da8f084e1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,21 @@ +mutation { + tablesDbCreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..78aa06ade2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-email-column.md @@ -0,0 +1,21 @@ +mutation { + tablesDbCreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..ca3d50536e --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-enum-column.md @@ -0,0 +1,23 @@ +mutation { + tablesDbCreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..5a4eb4d9c1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-float-column.md @@ -0,0 +1,24 @@ +mutation { + tablesDbCreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..3152fed2cc --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-index.md @@ -0,0 +1,22 @@ +mutation { + tablesDbCreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: "key", + columns: [], + orders: [], + lengths: [] + ) { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..caa429bc65 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-integer-column.md @@ -0,0 +1,24 @@ +mutation { + tablesDbCreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..dcd754a3ab --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-ip-column.md @@ -0,0 +1,21 @@ +mutation { + tablesDbCreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..6c5727f60f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,27 @@ +mutation { + tablesDbCreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: "oneToOne", + twoWay: false, + key: "", + twoWayKey: "", + onDelete: "cascade" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..1806764e92 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-row.md @@ -0,0 +1,18 @@ +mutation { + tablesDbCreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..6710016156 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-rows.md @@ -0,0 +1,19 @@ +mutation { + tablesDbCreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..ed39c788c6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-string-column.md @@ -0,0 +1,24 @@ +mutation { + tablesDbCreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-table.md new file mode 100644 index 0000000000..235c0354d3 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-table.md @@ -0,0 +1,32 @@ +mutation { + tablesDbCreateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], + rowSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..11068ab090 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create-url-column.md @@ -0,0 +1,21 @@ +mutation { + tablesDbCreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/create.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create.md new file mode 100644 index 0000000000..0be740f91e --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/create.md @@ -0,0 +1,14 @@ +mutation { + tablesDbCreate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + type + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..5b5344575d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,19 @@ +mutation { + tablesDbDecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, + min: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..121e532adb --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-column.md @@ -0,0 +1,9 @@ +mutation { + tablesDbDeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..15bc0ed99a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-index.md @@ -0,0 +1,9 @@ +mutation { + tablesDbDeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..1f18962dc8 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-row.md @@ -0,0 +1,9 @@ +mutation { + tablesDbDeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..7447220f61 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-rows.md @@ -0,0 +1,19 @@ +mutation { + tablesDbDeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..2c65ae6996 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete-table.md @@ -0,0 +1,8 @@ +mutation { + tablesDbDeleteTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete.md new file mode 100644 index 0000000000..84a0e5af03 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/delete.md @@ -0,0 +1,7 @@ +mutation { + tablesDbDelete( + databaseId: "<DATABASE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/get.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..0ef9edc6c4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/increment-row-column.md @@ -0,0 +1,19 @@ +mutation { + tablesDbIncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, + max: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/list.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..734d6951e0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,20 @@ +mutation { + tablesDbUpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..1922bfd94a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,21 @@ +mutation { + tablesDbUpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..b15877366d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-email-column.md @@ -0,0 +1,21 @@ +mutation { + tablesDbUpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..75096bbcfe --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-enum-column.md @@ -0,0 +1,23 @@ +mutation { + tablesDbUpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..063037cfff --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-float-column.md @@ -0,0 +1,24 @@ +mutation { + tablesDbUpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..ddd0f55f13 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-integer-column.md @@ -0,0 +1,24 @@ +mutation { + tablesDbUpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..ee063d3252 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-ip-column.md @@ -0,0 +1,21 @@ +mutation { + tablesDbUpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..308c2455be --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,24 @@ +mutation { + tablesDbUpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: "cascade", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..8382bcf457 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-row.md @@ -0,0 +1,18 @@ +mutation { + tablesDbUpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..07a9e10d9a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-rows.md @@ -0,0 +1,20 @@ +mutation { + tablesDbUpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: "{}", + queries: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..303d4e12fb --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-string-column.md @@ -0,0 +1,23 @@ +mutation { + tablesDbUpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-table.md new file mode 100644 index 0000000000..96a97e6838 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-table.md @@ -0,0 +1,32 @@ +mutation { + tablesDbUpdateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], + rowSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..3b6595ab83 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update-url-column.md @@ -0,0 +1,21 @@ +mutation { + tablesDbUpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/update.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update.md new file mode 100644 index 0000000000..05901fa652 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/update.md @@ -0,0 +1,14 @@ +mutation { + tablesDbUpdate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + type + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..f5ad299639 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/upsert-row.md @@ -0,0 +1,18 @@ +mutation { + tablesDbUpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-graphql/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..ec1f03ae0c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tablesdb/upsert-rows.md @@ -0,0 +1,19 @@ +mutation { + tablesDbUpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/decrement-document-attribute.md index 34b74726ff..a44cc51260 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/decrement-document-attribute.md @@ -5,7 +5,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key + .setSession(""); // The user session to authenticate with Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/increment-document-attribute.md index ca9c357f19..b5b5054e25 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/increment-document-attribute.md @@ -5,7 +5,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key + .setSession(""); // The user session to authenticate with Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..76976cecb1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..5608fdaf1e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (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/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-email-column.md new file mode 100644 index 0000000000..098a585833 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..1a56df8ba4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default (optional) + false, // array (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/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-float-column.md new file mode 100644 index 0000000000..af9a3e3520 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-index.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-index.md new file mode 100644 index 0000000000..b33ba2cadc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-index.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; +import io.appwrite.enums.IndexType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + IndexType.KEY, // type + listOf(), // columns + listOf(), // orders (optional) + listOf(), // lengths (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/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..313f53d9fa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..d995ea85b9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (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/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..8aa904fe81 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-relationship-column.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; +import io.appwrite.enums.RelationshipType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<RELATED_TABLE_ID>", // relatedTableId + RelationshipType.ONETOONE, // type + false, // twoWay (optional) + "", // key (optional) + "", // twoWayKey (optional) + RelationMutate.CASCADE, // onDelete (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/tablesdb/create-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-row.md new file mode 100644 index 0000000000..6a379cfd30 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (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/tablesdb/create-rows.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-rows.md new file mode 100644 index 0000000000..0e8a46ec7b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // rows + 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/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-string-column.md new file mode 100644 index 0000000000..6388663022 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-string-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + 1, // size + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + false, // encrypt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/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 new file mode 100644 index 0000000000..1c546bf405 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-table.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (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/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-url-column.md new file mode 100644 index 0000000000..6e2caff925 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.createUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/create.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create.md new file mode 100644 index 0000000000..76fac7a818 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.create( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + 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/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..9d75b65a5f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/decrement-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.decrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // min (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/tablesdb/delete-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-column.md new file mode 100644 index 0000000000..2dbfb45230 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.deleteColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + 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/tablesdb/delete-index.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-index.md new file mode 100644 index 0000000000..ac045c1dd7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.deleteIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + 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/tablesdb/delete-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-row.md new file mode 100644 index 0000000000..f0ce9ffcf1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.deleteRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + 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/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-rows.md new file mode 100644 index 0000000000..e6ebd6627b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.deleteRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (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/tablesdb/delete-table.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-table.md new file mode 100644 index 0000000000..e7004659e5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete-table.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.deleteTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete.md new file mode 100644 index 0000000000..8f00c7f74e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.delete( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-column.md new file mode 100644 index 0000000000..4c64195677 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.getColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + 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/tablesdb/get-index.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-index.md new file mode 100644 index 0000000000..469d6aa7aa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.getIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + 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/tablesdb/get-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-row.md new file mode 100644 index 0000000000..5bc6a012fb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.getRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + listOf(), // queries (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/tablesdb/get-table.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-table.md new file mode 100644 index 0000000000..a03f008a85 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get-table.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.getTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/get.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get.md new file mode 100644 index 0000000000..c5c0a6409a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.get( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..0f3cc0897b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/increment-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.incrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // max (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/tablesdb/list-columns.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-columns.md new file mode 100644 index 0000000000..0d5dca61ba --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-columns.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.listColumns( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (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/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-indexes.md new file mode 100644 index 0000000000..3450f1e724 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-indexes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.listIndexes( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (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/tablesdb/list-rows.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-rows.md new file mode 100644 index 0000000000..9173767048 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.listRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (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/tablesdb/list-tables.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-tables.md new file mode 100644 index 0000000000..4b99430eb6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list-tables.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.listTables( + "<DATABASE_ID>", // databaseId + listOf(), // queries (optional) + "<SEARCH>", // search (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/tablesdb/list.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list.md new file mode 100644 index 0000000000..3d69059766 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.list( + listOf(), // queries (optional) + "<SEARCH>", // search (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/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..bd93250e56 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default + "", // newKey (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/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..ac81f43f40 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (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/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-email-column.md new file mode 100644 index 0000000000..a8f5e1341a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default + "", // newKey (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/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..24dd809a5d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default + "", // newKey (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/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-float-column.md new file mode 100644 index 0000000000..5875225e72 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (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/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..ef5f329832 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (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/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..c7010e4871 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (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/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..f417691dda --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-relationship-column.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + RelationMutate.CASCADE, // onDelete (optional) + "", // newKey (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/tablesdb/update-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-row.md new file mode 100644 index 0000000000..9756aa13c3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (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/tablesdb/update-rows.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-rows.md new file mode 100644 index 0000000000..e813de2f18 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-rows.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + mapOf( "a" to "b" ), // data (optional) + listOf(), // queries (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/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-string-column.md new file mode 100644 index 0000000000..115a2595bb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-string-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "<DEFAULT>", // default + 1, // size (optional) + "", // newKey (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/tablesdb/update-table.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-table.md new file mode 100644 index 0000000000..1bcd8a9ac7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-table.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (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/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-url-column.md new file mode 100644 index 0000000000..0b15649a1e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.updateUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default + "", // newKey (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/tablesdb/update.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update.md new file mode 100644 index 0000000000..3c29c3cba1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/update.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.update( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + 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/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-row.md new file mode 100644 index 0000000000..6eaf665fbb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.upsertRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (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/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..4af4f61192 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tablesdb/upsert-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.TablesDb; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +TablesDb tablesDb = new TablesDb(client); + +tablesDb.upsertRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/decrement-document-attribute.md index 05204d76c6..d0226c0bdb 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/decrement-document-attribute.md @@ -5,7 +5,7 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key + .setSession("") // The user session to authenticate with val databases = Databases(client) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/increment-document-attribute.md index 40c1224ae7..b56ed91d75 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/increment-document-attribute.md @@ -5,7 +5,7 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key + .setSession("") // The user session to authenticate with val databases = Databases(client) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..befa843860 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..01130c8f65 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-email-column.md new file mode 100644 index 0000000000..9d47a820c5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..49b7430803 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-float-column.md new file mode 100644 index 0000000000..db2dac01f2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-index.md new file mode 100644 index 0000000000..a0da817eeb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-index.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb +import io.appwrite.enums.IndexType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + type = IndexType.KEY, + columns = listOf(), + orders = listOf(), // optional + lengths = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..6297cdfa63 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..67052c85f4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..c1f130493e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-relationship-column.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb +import io.appwrite.enums.RelationshipType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + relatedTableId = "<RELATED_TABLE_ID>", + type = RelationshipType.ONETOONE, + twoWay = false, // optional + key = "", // optional + twoWayKey = "", // optional + onDelete = "cascade" // 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 new file mode 100644 index 0000000000..217f2eeb12 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.createRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-rows.md new file mode 100644 index 0000000000..01a3554a2f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf() +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-string-column.md new file mode 100644 index 0000000000..9061a1a022 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-string-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + size = 1, + required = false, + default = "<DEFAULT>", // optional + array = false, // optional + encrypt = false // 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 new file mode 100644 index 0000000000..f1603fbb38 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-table.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-url-column.md new file mode 100644 index 0000000000..2c8f7af331 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.createUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create.md new file mode 100644 index 0000000000..b8b58aae83 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.create( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..cab810ad96 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/decrement-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.decrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + min = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-column.md new file mode 100644 index 0000000000..ef3eaaebcf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.deleteColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-index.md new file mode 100644 index 0000000000..4bca972b94 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.deleteIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-row.md new file mode 100644 index 0000000000..4e2eee31dc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.deleteRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-rows.md new file mode 100644 index 0000000000..c73332c104 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.deleteRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-table.md new file mode 100644 index 0000000000..87b20e58f3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete-table.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.deleteTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete.md new file mode 100644 index 0000000000..3af192a0d3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.delete( + databaseId = "<DATABASE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-column.md new file mode 100644 index 0000000000..78710b658c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.getColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-index.md new file mode 100644 index 0000000000..00c9285d77 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.getIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-row.md new file mode 100644 index 0000000000..98e92980ac --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.getRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-table.md new file mode 100644 index 0000000000..6484d40823 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get-table.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.getTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get.md new file mode 100644 index 0000000000..16a0739b01 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.get( + databaseId = "<DATABASE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..44782ddb40 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/increment-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.incrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + max = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-columns.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-columns.md new file mode 100644 index 0000000000..e4b10d980b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-columns.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.listColumns( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-indexes.md new file mode 100644 index 0000000000..231ddcc20b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-indexes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.listIndexes( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-rows.md new file mode 100644 index 0000000000..735c425739 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.listRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-tables.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-tables.md new file mode 100644 index 0000000000..cb7d2d5972 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list-tables.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.listTables( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list.md new file mode 100644 index 0000000000..e23135d794 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..8090da0983 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..14f38d5384 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-email-column.md new file mode 100644 index 0000000000..5214918280 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..2e2be5ac53 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-float-column.md new file mode 100644 index 0000000000..9519eb329a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..db7e172bd7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..bed46752d0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..12a63607c5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-relationship-column.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + onDelete = "cascade", // optional + newKey = "" // 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 new file mode 100644 index 0000000000..51e801444b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-rows.md new file mode 100644 index 0000000000..008665b6f4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-rows.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + data = mapOf( "a" to "b" ), // optional + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-string-column.md new file mode 100644 index 0000000000..9890f9566b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-string-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "<DEFAULT>", + size = 1, // optional + newKey = "" // 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 new file mode 100644 index 0000000000..a38286fd91 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-table.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-url-column.md new file mode 100644 index 0000000000..ac0dcd2ffc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.updateUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update.md new file mode 100644 index 0000000000..931750782b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/update.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.update( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + 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 new file mode 100644 index 0000000000..09286e405a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tablesDb = TablesDb(client) + +val response = tablesDb.upsertRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..cd335841e0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tablesdb/upsert-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.TablesDb + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tablesDb = TablesDb(client) + +val response = tablesDb.upsertRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf() +) diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-email-password-session.md index 6c940f5435..f173d2117a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/create-email-password-session.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-email-password-session.md @@ -6,7 +6,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createEmailPasswordSession( - 'email@example.com', // email - 'password' // password -); +const result = await account.createEmailPasswordSession({ + email: 'email@example.com', + password: 'password' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-email-token.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-email-token.md index b6be71d45c..8c31825b4b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/create-email-token.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-email-token.md @@ -6,8 +6,8 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createEmailToken( - '<USER_ID>', // userId - 'email@example.com', // email - false // phrase (optional) -); +const result = await account.createEmailToken({ + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-magic-u-r-l-token.md index 6dbdc3d9fb..1dab03e8d7 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-magic-u-r-l-token.md @@ -6,9 +6,9 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createMagicURLToken( - '<USER_ID>', // userId - 'email@example.com', // email - 'https://example.com', // url (optional) - false // phrase (optional) -); +const result = await account.createMagicURLToken({ + userId: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', + phrase: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-authenticator.md index e52658b533..83841b114d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-authenticator.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createMfaAuthenticator( - sdk.AuthenticatorType.Totp // type -); +const result = await account.createMfaAuthenticator({ + type: sdk.AuthenticatorType.Totp +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-challenge.md index 79d5e89eed..40c22fd780 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-challenge.md @@ -6,6 +6,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createMfaChallenge( - sdk.AuthenticationFactor.Email // factor -); +const result = await account.createMfaChallenge({ + factor: sdk.AuthenticationFactor.Email +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth2token.md index adae095105..c46d24fab1 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth2token.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth2token.md @@ -6,9 +6,9 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createOAuth2Token( - sdk.OAuthProvider.Amazon, // provider - 'https://example.com', // success (optional) - 'https://example.com', // failure (optional) - [] // scopes (optional) -); +const result = await account.createOAuth2Token({ + provider: sdk.OAuthProvider.Amazon, + success: 'https://example.com', + failure: 'https://example.com', + scopes: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-token.md index aca0bd2d8a..fe88e77b47 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-token.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-token.md @@ -6,7 +6,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createPhoneToken( - '<USER_ID>', // userId - '+12065550100' // phone -); +const result = await account.createPhoneToken({ + userId: '<USER_ID>', + phone: '+12065550100' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-recovery.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-recovery.md index 660942affb..eab8af6de2 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/create-recovery.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-recovery.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createRecovery( - 'email@example.com', // email - 'https://example.com' // url -); +const result = await account.createRecovery({ + email: 'email@example.com', + url: 'https://example.com' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-session.md index 8c6b910089..448f9017b5 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/create-session.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-session.md @@ -6,7 +6,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createSession( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await account.createSession({ + userId: '<USER_ID>', + secret: '<SECRET>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-verification.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-verification.md index 1f1db27e8a..02b9e78ddb 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/create-verification.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-verification.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.createVerification( - 'https://example.com' // url -); +const result = await account.createVerification({ + url: 'https://example.com' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create.md b/docs/examples/1.8.x/server-nodejs/examples/account/create.md index 85e3d2fcca..20a5ec1c4b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/create.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create.md @@ -6,9 +6,9 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.create( - '<USER_ID>', // userId - 'email@example.com', // email - '', // password - '<NAME>' // name (optional) -); +const result = await account.create({ + userId: '<USER_ID>', + email: 'email@example.com', + password: '', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/delete-identity.md b/docs/examples/1.8.x/server-nodejs/examples/account/delete-identity.md index 0424ab247e..222d4bf260 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/delete-identity.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/delete-identity.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.deleteIdentity( - '<IDENTITY_ID>' // identityId -); +const result = await account.deleteIdentity({ + identityId: '<IDENTITY_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/account/delete-mfa-authenticator.md index 5979c3a6d7..63e629dff7 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/delete-mfa-authenticator.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.deleteMfaAuthenticator( - sdk.AuthenticatorType.Totp // type -); +const result = await account.deleteMfaAuthenticator({ + type: sdk.AuthenticatorType.Totp +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/delete-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/delete-session.md index 4276ccad24..82e1bd6787 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/delete-session.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/delete-session.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.deleteSession( - '<SESSION_ID>' // sessionId -); +const result = await account.deleteSession({ + sessionId: '<SESSION_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/get-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/get-session.md index 63b6f0893a..edf3836851 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/get-session.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/get-session.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.getSession( - '<SESSION_ID>' // sessionId -); +const result = await account.getSession({ + sessionId: '<SESSION_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/list-identities.md b/docs/examples/1.8.x/server-nodejs/examples/account/list-identities.md index c49894c8c0..e299c88dee 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/list-identities.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/list-identities.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.listIdentities( - [] // queries (optional) -); +const result = await account.listIdentities({ + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/list-logs.md b/docs/examples/1.8.x/server-nodejs/examples/account/list-logs.md index 4260a72e30..9e205bf027 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/list-logs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/list-logs.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.listLogs( - [] // queries (optional) -); +const result = await account.listLogs({ + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-email.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-email.md index 6111f0e52a..58fea36be5 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-email.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-email.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateEmail( - 'email@example.com', // email - 'password' // password -); +const result = await account.updateEmail({ + email: 'email@example.com', + password: 'password' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-m-f-a.md index 58629cda3b..378c23fc0c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-m-f-a.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-m-f-a.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateMFA( - false // mfa -); +const result = await account.updateMFA({ + mfa: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-magic-u-r-l-session.md index 3e059d88d9..d67d481bf8 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-magic-u-r-l-session.md @@ -6,7 +6,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateMagicURLSession( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await account.updateMagicURLSession({ + userId: '<USER_ID>', + secret: '<SECRET>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-authenticator.md index 7b24dc8712..9901cd17a2 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-authenticator.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateMfaAuthenticator( - sdk.AuthenticatorType.Totp, // type - '<OTP>' // otp -); +const result = await account.updateMfaAuthenticator({ + type: sdk.AuthenticatorType.Totp, + otp: '<OTP>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-challenge.md index 4d30999129..36ebc25c71 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-challenge.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateMfaChallenge( - '<CHALLENGE_ID>', // challengeId - '<OTP>' // otp -); +const result = await account.updateMfaChallenge({ + challengeId: '<CHALLENGE_ID>', + otp: '<OTP>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-name.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-name.md index f47d215288..f812116e7a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-name.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-name.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateName( - '<NAME>' // name -); +const result = await account.updateName({ + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-password.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-password.md index aa9d67aede..1a37a35a9c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-password.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-password.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updatePassword( - '', // password - 'password' // oldPassword (optional) -); +const result = await account.updatePassword({ + password: '', + oldPassword: 'password' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-session.md index c208714a37..7d9680025b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-session.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-session.md @@ -6,7 +6,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updatePhoneSession( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await account.updatePhoneSession({ + userId: '<USER_ID>', + secret: '<SECRET>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-verification.md index 116d171c92..af05baf59d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-verification.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-verification.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updatePhoneVerification( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await account.updatePhoneVerification({ + userId: '<USER_ID>', + secret: '<SECRET>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-phone.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone.md index c6c02fde9a..b1f1daa6c1 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-phone.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updatePhone( - '+12065550100', // phone - 'password' // password -); +const result = await account.updatePhone({ + phone: '+12065550100', + password: 'password' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-prefs.md index ee8b042693..113f8678df 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-prefs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-prefs.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updatePrefs( - {} // prefs -); +const result = await account.updatePrefs({ + prefs: {} +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-recovery.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-recovery.md index bd4a87c3a9..c88b435238 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-recovery.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-recovery.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateRecovery( - '<USER_ID>', // userId - '<SECRET>', // secret - '' // password -); +const result = await account.updateRecovery({ + userId: '<USER_ID>', + secret: '<SECRET>', + password: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-session.md index be80c85750..c189f68e0a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-session.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-session.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateSession( - '<SESSION_ID>' // sessionId -); +const result = await account.updateSession({ + sessionId: '<SESSION_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-verification.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-verification.md index 0abb562a95..d64b402e4b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/account/update-verification.md +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-verification.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.updateVerification( - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await account.updateVerification({ + userId: '<USER_ID>', + secret: '<SECRET>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-browser.md index 1cc825d917..480e5fc69a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-browser.md +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-browser.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getBrowser( - sdk.Browser.AvantBrowser, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = await avatars.getBrowser({ + code: sdk.Browser.AvantBrowser, + width: 0, + height: 0, + quality: -1 +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-credit-card.md index 7d62a96033..332c2b8e2c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-credit-card.md +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-credit-card.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getCreditCard( - sdk.CreditCard.AmericanExpress, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = await avatars.getCreditCard({ + code: sdk.CreditCard.AmericanExpress, + width: 0, + height: 0, + quality: -1 +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-favicon.md index 6056354e9e..6f79cb664a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-favicon.md +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-favicon.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getFavicon( - 'https://example.com' // url -); +const result = await avatars.getFavicon({ + url: 'https://example.com' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-flag.md index a62f56dd47..ecde4a5a50 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-flag.md +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-flag.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getFlag( - sdk.Flag.Afghanistan, // code - 0, // width (optional) - 0, // height (optional) - -1 // quality (optional) -); +const result = await avatars.getFlag({ + code: sdk.Flag.Afghanistan, + width: 0, + height: 0, + quality: -1 +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-image.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-image.md index 7dac2423ba..9b23cb5f6b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-image.md +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-image.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getImage( - 'https://example.com', // url - 0, // width (optional) - 0 // height (optional) -); +const result = await avatars.getImage({ + url: 'https://example.com', + width: 0, + height: 0 +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-initials.md index 2cd45bfac8..ddde2dd56b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-initials.md +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-initials.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getInitials( - '<NAME>', // name (optional) - 0, // width (optional) - 0, // height (optional) - '' // background (optional) -); +const result = await avatars.getInitials({ + name: '<NAME>', + width: 0, + height: 0, + background: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-q-r.md index cfd649ea33..10299b5e07 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-q-r.md +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-q-r.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const avatars = new sdk.Avatars(client); -const result = await avatars.getQR( - '<TEXT>', // text - 1, // size (optional) - 0, // margin (optional) - false // download (optional) -); +const result = await avatars.getQR({ + text: '<TEXT>', + size: 1, + margin: 0, + download: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-boolean-attribute.md index b6239698a5..554f66189f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-boolean-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-boolean-attribute.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createBooleanAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); +const result = await databases.createBooleanAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: false, + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md index fc5c798385..7adaf2207a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createCollection( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // documentSecurity (optional) - false // enabled (optional) -); +const result = await databases.createCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], + documentSecurity: false, + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-datetime-attribute.md index 4c7328ce4b..eb38f59a0c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-datetime-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-datetime-attribute.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createDatetimeAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); +const result = await databases.createDatetimeAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md index a2e77b9241..a3c092c2cc 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md @@ -7,10 +7,10 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.createDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md index d73df44cd1..73d08aa21e 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // documents -); +const result = await databases.createDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-email-attribute.md index 47b27508cd..8802844c4d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-email-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-email-attribute.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createEmailAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); +const result = await databases.createEmailAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-enum-attribute.md index 61c1d77f2c..44a836afd2 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-enum-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-enum-attribute.md @@ -7,12 +7,12 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createEnumAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default (optional) - false // array (optional) -); +const result = await databases.createEnumAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-float-attribute.md index 3e605001e6..19bc0184a4 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-float-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-float-attribute.md @@ -7,13 +7,13 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createFloatAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); +const result = await databases.createFloatAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + min: null, + max: null, + default: null, + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-index.md index ed03322cbd..b5f37dee1c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-index.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-index.md @@ -7,12 +7,12 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createIndex( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - sdk.IndexType.Key, // type - [], // attributes - [], // orders (optional) - [] // lengths (optional) -); +const result = await databases.createIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + type: sdk.IndexType.Key, + attributes: [], + orders: [], + lengths: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-integer-attribute.md index ce62624001..63230c76c0 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-integer-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-integer-attribute.md @@ -7,13 +7,13 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createIntegerAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); +const result = await databases.createIntegerAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + min: null, + max: null, + default: null, + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-ip-attribute.md index e3bbffe227..2ad3d59e7d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-ip-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-ip-attribute.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createIpAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); +const result = await databases.createIpAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-relationship-attribute.md index bb77bc00c3..ed15e29b20 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-relationship-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-relationship-attribute.md @@ -7,13 +7,13 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createRelationshipAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<RELATED_COLLECTION_ID>', // relatedCollectionId - sdk.RelationshipType.OneToOne, // type - false, // twoWay (optional) - '', // key (optional) - '', // twoWayKey (optional) - sdk.RelationMutate.Cascade // onDelete (optional) -); +const result = await databases.createRelationshipAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: sdk.RelationshipType.OneToOne, + twoWay: false, + key: '', + twoWayKey: '', + onDelete: sdk.RelationMutate.Cascade +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-string-attribute.md index 94793e86db..6bb7590696 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-string-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-string-attribute.md @@ -7,13 +7,13 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createStringAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - 1, // size - false, // required - '<DEFAULT>', // default (optional) - false, // array (optional) - false // encrypt (optional) -); +const result = await databases.createStringAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', + array: false, + encrypt: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-url-attribute.md index 6b6b1daaa0..2aa705d681 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-url-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-url-attribute.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.createUrlAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); +const result = await databases.createUrlAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create.md index c1fd4eca43..a87dbddce2 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.create( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); +const result = await databases.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/decrement-document-attribute.md index 6bfc5f17cd..1e782359a2 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/decrement-document-attribute.md @@ -3,15 +3,15 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setSession(''); // The user session to authenticate with const databases = new sdk.Databases(client); -const result = await databases.decrementDocumentAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - '', // attribute - null, // value (optional) - null // min (optional) -); +const result = await databases.decrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: null, + min: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-attribute.md index 8291fc095e..166aa1961b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-attribute.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.deleteAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const result = await databases.deleteAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-collection.md index 9551c558fb..f915076c3a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-collection.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-collection.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.deleteCollection( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId -); +const result = await databases.deleteCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-document.md index 526f00eb3a..429554b74b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-document.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.deleteDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId -); +const result = await databases.deleteDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-documents.md index 01814e5052..2bbb4c0381 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-documents.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-documents.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.deleteDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const result = await databases.deleteDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-index.md index 90353ea44e..24f74c6975 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-index.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-index.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.deleteIndex( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const result = await databases.deleteIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete.md index 65179d2b2a..fc9ace4960 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.delete( - '<DATABASE_ID>' // databaseId -); +const result = await databases.delete({ + databaseId: '<DATABASE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get-attribute.md index 8757265edb..4c683034f8 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/get-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get-attribute.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.getAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const result = await databases.getAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get-collection.md index 79c5674985..4855471977 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/get-collection.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get-collection.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.getCollection( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId -); +const result = await databases.getCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get-document.md index eee515bf36..726fe89963 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/get-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get-document.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.getDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - [] // queries (optional) -); +const result = await databases.getDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get-index.md index a4b3a45eb8..d7edb84e34 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/get-index.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get-index.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.getIndex( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '' // key -); +const result = await databases.getIndex({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get.md index a8e8084673..eb83ef7a85 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/get.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.get( - '<DATABASE_ID>' // databaseId -); +const result = await databases.get({ + databaseId: '<DATABASE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/increment-document-attribute.md index 0ba024514a..72aeae3960 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/increment-document-attribute.md @@ -3,15 +3,15 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setSession(''); // The user session to authenticate with const databases = new sdk.Databases(client); -const result = await databases.incrementDocumentAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - '', // attribute - null, // value (optional) - null // max (optional) -); +const result = await databases.incrementDocumentAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: null, + max: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list-attributes.md index e7b48fb9f0..eb7cf13184 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/list-attributes.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list-attributes.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.listAttributes( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const result = await databases.listAttributes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list-collections.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list-collections.md index bc31eadf9b..22b809aec5 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/list-collections.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list-collections.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.listCollections( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await databases.listCollections({ + databaseId: '<DATABASE_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list-documents.md index d2514850d8..1a922c7c1a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/list-documents.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list-documents.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.listDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const result = await databases.listDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list-indexes.md index 86c6c26ec6..888b64c77e 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/list-indexes.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list-indexes.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.listIndexes( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // queries (optional) -); +const result = await databases.listIndexes({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list.md index 06fe6a8462..344ab6192f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/list.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await databases.list({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-boolean-attribute.md index d0d551c3fd..fec665e382 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-boolean-attribute.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateBooleanAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - false, // default - '' // newKey (optional) -); +const result = await databases.updateBooleanAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: false, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md index 2618fc735e..5fc204a925 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateCollection( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // documentSecurity (optional) - false // enabled (optional) -); +const result = await databases.updateCollection({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], + documentSecurity: false, + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-datetime-attribute.md index d2378f93ca..7b8251ab13 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-datetime-attribute.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateDatetimeAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default - '' // newKey (optional) -); +const result = await databases.updateDatetimeAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md index 96468037e7..dd994b9ab2 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md @@ -7,10 +7,10 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); +const result = await databases.updateDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-documents.md index 62b2271bae..936e38dd1d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-documents.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-documents.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - {}, // data (optional) - [] // queries (optional) -); +const result = await databases.updateDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: {}, + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-email-attribute.md index 8b7afbebb5..9a15d8152e 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-email-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-email-attribute.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateEmailAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); +const result = await databases.updateEmailAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-enum-attribute.md index f328132519..0994def748 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-enum-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-enum-attribute.md @@ -7,12 +7,12 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateEnumAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default - '' // newKey (optional) -); +const result = await databases.updateEnumAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-float-attribute.md index abb93c28fa..15ea7c0545 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-float-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-float-attribute.md @@ -7,13 +7,13 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateFloatAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); +const result = await databases.updateFloatAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, + max: null, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-integer-attribute.md index e126f31fd8..6958b5e7c1 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-integer-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-integer-attribute.md @@ -7,13 +7,13 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateIntegerAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); +const result = await databases.updateIntegerAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, + max: null, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-ip-attribute.md index 1c8ac79dd8..76bef95e35 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-ip-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-ip-attribute.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateIpAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '', // default - '' // newKey (optional) -); +const result = await databases.updateIpAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-relationship-attribute.md index 1a7a26cc92..bd6b681a17 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-relationship-attribute.md @@ -7,10 +7,10 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateRelationshipAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - sdk.RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); +const result = await databases.updateRelationshipAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + onDelete: sdk.RelationMutate.Cascade, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-string-attribute.md index 0e0656ef10..2ca12a058d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-string-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-string-attribute.md @@ -7,12 +7,12 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateStringAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - '<DEFAULT>', // default - 1, // size (optional) - '' // newKey (optional) -); +const result = await databases.updateStringAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-url-attribute.md index 4a2aca0fe9..56d9970915 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update-url-attribute.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-url-attribute.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.updateUrlAttribute( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); +const result = await databases.updateUrlAttribute({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update.md index 9c69bfd2ce..8304d178c6 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/update.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.update( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); +const result = await databases.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md index fcc62d601c..359cd01948 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md @@ -7,10 +7,10 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.upsertDocument( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data - ["read("any")"] // permissions (optional) -); +const result = await databases.upsertDocument({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md index 425b7ba51f..8deec536ff 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const databases = new sdk.Databases(client); -const result = await databases.upsertDocuments( - '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // documents -); +const result = await databases.upsertDocuments({ + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-deployment.md index 5ede954907..ee60723aef 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/create-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-deployment.md @@ -8,10 +8,10 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.createDeployment( - '<FUNCTION_ID>', // functionId - InputFile.fromPath('/path/to/file', 'filename'), // code - false, // activate - '<ENTRYPOINT>', // entrypoint (optional) - '<COMMANDS>' // commands (optional) -); +const result = await functions.createDeployment({ + functionId: '<FUNCTION_ID>', + code: InputFile.fromPath('/path/to/file', 'filename'), + activate: false, + entrypoint: '<ENTRYPOINT>', + commands: '<COMMANDS>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-duplicate-deployment.md index 33f77ffd39..b4cae144b9 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-duplicate-deployment.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.createDuplicateDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>', // deploymentId - '<BUILD_ID>' // buildId (optional) -); +const result = await functions.createDuplicateDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md index 5671483191..d8f0c5e82f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md @@ -7,12 +7,12 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.createExecution( - '<FUNCTION_ID>', // functionId - '<BODY>', // body (optional) - false, // async (optional) - '<PATH>', // path (optional) - sdk.ExecutionMethod.GET, // method (optional) - {}, // headers (optional) - '<SCHEDULED_AT>' // scheduledAt (optional) -); +const result = await functions.createExecution({ + functionId: '<FUNCTION_ID>', + body: '<BODY>', + async: false, + path: '<PATH>', + method: sdk.ExecutionMethod.GET, + headers: {}, + scheduledAt: '<SCHEDULED_AT>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-template-deployment.md index eef7148f94..dc636fdb80 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/create-template-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-template-deployment.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.createTemplateDeployment( - '<FUNCTION_ID>', // functionId - '<REPOSITORY>', // repository - '<OWNER>', // owner - '<ROOT_DIRECTORY>', // rootDirectory - '<VERSION>', // version - false // activate (optional) -); +const result = await functions.createTemplateDeployment({ + functionId: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-variable.md index 5e75d19bf4..015d98fa6c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/create-variable.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-variable.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.createVariable( - '<FUNCTION_ID>', // functionId - '<KEY>', // key - '<VALUE>', // value - false // secret (optional) -); +const result = await functions.createVariable({ + functionId: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-vcs-deployment.md index ba1067f579..b8c957e2f9 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-vcs-deployment.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.createVcsDeployment( - '<FUNCTION_ID>', // functionId - sdk.VCSDeploymentType.Branch, // type - '<REFERENCE>', // reference - false // activate (optional) -); +const result = await functions.createVcsDeployment({ + functionId: '<FUNCTION_ID>', + type: sdk.VCSDeploymentType.Branch, + reference: '<REFERENCE>', + activate: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create.md index 646e2e5b4d..a3c9d418bb 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/create.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create.md @@ -7,23 +7,23 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.create( - '<FUNCTION_ID>', // functionId - '<NAME>', // name - sdk..Node145, // runtime - ["any"], // execute (optional) - [], // events (optional) - '', // schedule (optional) - 1, // timeout (optional) - false, // enabled (optional) - false, // logging (optional) - '<ENTRYPOINT>', // entrypoint (optional) - '<COMMANDS>', // commands (optional) - [], // scopes (optional) - '<INSTALLATION_ID>', // installationId (optional) - '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) - '<PROVIDER_BRANCH>', // providerBranch (optional) - false, // providerSilentMode (optional) - '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) - '' // specification (optional) -); +const result = await functions.create({ + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: sdk..Node145, + execute: ["any"], + events: [], + schedule: '', + timeout: 1, + enabled: false, + logging: false, + entrypoint: '<ENTRYPOINT>', + commands: '<COMMANDS>', + scopes: [], + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerBranch: '<PROVIDER_BRANCH>', + providerSilentMode: false, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', + specification: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-deployment.md index f6768ec739..9f9815b91d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/delete-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-deployment.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.deleteDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await functions.deleteDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-execution.md index c3e77a6860..cf9d1079cf 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/delete-execution.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-execution.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.deleteExecution( - '<FUNCTION_ID>', // functionId - '<EXECUTION_ID>' // executionId -); +const result = await functions.deleteExecution({ + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-variable.md index 7840b1d562..70ee4f7abe 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/delete-variable.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-variable.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.deleteVariable( - '<FUNCTION_ID>', // functionId - '<VARIABLE_ID>' // variableId -); +const result = await functions.deleteVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/delete.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete.md index a2e0a23a2b..635f271a1c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.delete( - '<FUNCTION_ID>' // functionId -); +const result = await functions.delete({ + functionId: '<FUNCTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment-download.md index 5ba1035392..f00c1ce593 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment-download.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment-download.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.getDeploymentDownload( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>', // deploymentId - sdk.DeploymentDownloadType.Source // type (optional) -); +const result = await functions.getDeploymentDownload({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: sdk.DeploymentDownloadType.Source +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment.md index 6a55534af4..c47081c718 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.getDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await functions.getDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get-execution.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get-execution.md index b9fed55799..ad3ff4874c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/get-execution.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get-execution.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.getExecution( - '<FUNCTION_ID>', // functionId - '<EXECUTION_ID>' // executionId -); +const result = await functions.getExecution({ + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get-variable.md index 3b6135f7dc..9f47331204 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/get-variable.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get-variable.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.getVariable( - '<FUNCTION_ID>', // functionId - '<VARIABLE_ID>' // variableId -); +const result = await functions.getVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get.md index b88609252e..463054d425 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/get.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.get( - '<FUNCTION_ID>' // functionId -); +const result = await functions.get({ + functionId: '<FUNCTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-deployments.md index 731d1c46cf..9faf2018f8 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/list-deployments.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-deployments.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.listDeployments( - '<FUNCTION_ID>', // functionId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await functions.listDeployments({ + functionId: '<FUNCTION_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-executions.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-executions.md index 24d3e54ef3..d77a66c485 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/list-executions.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-executions.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.listExecutions( - '<FUNCTION_ID>', // functionId - [] // queries (optional) -); +const result = await functions.listExecutions({ + functionId: '<FUNCTION_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-variables.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-variables.md index 4220918fa6..962a81005c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/list-variables.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-variables.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.listVariables( - '<FUNCTION_ID>' // functionId -); +const result = await functions.listVariables({ + functionId: '<FUNCTION_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list.md index af5082c25e..a3126b6407 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/list.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await functions.list({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update-deployment-status.md index e7ce4a815c..32b8a619cd 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/update-deployment-status.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update-deployment-status.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.updateDeploymentStatus( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await functions.updateDeploymentStatus({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update-function-deployment.md index feef831e5c..b0d31325f1 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/update-function-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update-function-deployment.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.updateFunctionDeployment( - '<FUNCTION_ID>', // functionId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await functions.updateFunctionDeployment({ + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/update-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update-variable.md index d9a7ac7e0b..b7f3b1dc46 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/update-variable.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update-variable.md @@ -7,10 +7,10 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.updateVariable( - '<FUNCTION_ID>', // functionId - '<VARIABLE_ID>', // variableId - '<KEY>', // key - '<VALUE>', // value (optional) - false // secret (optional) -); +const result = await functions.updateVariable({ + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/update.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update.md index b6de177cff..dbbd1cdf51 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/update.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update.md @@ -7,23 +7,23 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.update( - '<FUNCTION_ID>', // functionId - '<NAME>', // name - sdk..Node145, // runtime (optional) - ["any"], // execute (optional) - [], // events (optional) - '', // schedule (optional) - 1, // timeout (optional) - false, // enabled (optional) - false, // logging (optional) - '<ENTRYPOINT>', // entrypoint (optional) - '<COMMANDS>', // commands (optional) - [], // scopes (optional) - '<INSTALLATION_ID>', // installationId (optional) - '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) - '<PROVIDER_BRANCH>', // providerBranch (optional) - false, // providerSilentMode (optional) - '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) - '' // specification (optional) -); +const result = await functions.update({ + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: sdk..Node145, + execute: ["any"], + events: [], + schedule: '', + timeout: 1, + enabled: false, + logging: false, + entrypoint: '<ENTRYPOINT>', + commands: '<COMMANDS>', + scopes: [], + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerBranch: '<PROVIDER_BRANCH>', + providerSilentMode: false, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', + specification: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md b/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md index 8031a5285a..dffb7b3f3b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const graphql = new sdk.Graphql(client); -const result = await graphql.mutation( - {} // query -); +const result = await graphql.mutation({ + query: {} +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/graphql/query.md b/docs/examples/1.8.x/server-nodejs/examples/graphql/query.md index 15456754cb..1f873ed90d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/graphql/query.md +++ b/docs/examples/1.8.x/server-nodejs/examples/graphql/query.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const graphql = new sdk.Graphql(client); -const result = await graphql.query( - {} // query -); +const result = await graphql.query({ + query: {} +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-certificate.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-certificate.md index ec9129344c..cc9e7c1e9c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-certificate.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-certificate.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getCertificate( - '' // domain (optional) -); +const result = await health.getCertificate({ + domain: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-failed-jobs.md index d88b7f2bfd..2e4c8b01d0 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-failed-jobs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-failed-jobs.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getFailedJobs( - sdk..V1Database, // name - null // threshold (optional) -); +const result = await health.getFailedJobs({ + name: sdk..V1Database, + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-builds.md index 929f9769fb..3e1f143dbc 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-builds.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-builds.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueBuilds( - null // threshold (optional) -); +const result = await health.getQueueBuilds({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-certificates.md index 33e71ecac6..682fe0d324 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-certificates.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-certificates.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueCertificates( - null // threshold (optional) -); +const result = await health.getQueueCertificates({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-databases.md index ca409c1ba5..3c8b84189a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-databases.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-databases.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueDatabases( - '<NAME>', // name (optional) - null // threshold (optional) -); +const result = await health.getQueueDatabases({ + name: '<NAME>', + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-deletes.md index 9f2d6f8cf5..0b39bd9187 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-deletes.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-deletes.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueDeletes( - null // threshold (optional) -); +const result = await health.getQueueDeletes({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-functions.md index 0392db1079..1d0492ff91 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-functions.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-functions.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueFunctions( - null // threshold (optional) -); +const result = await health.getQueueFunctions({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-logs.md index a71ff13397..dfcb3016b4 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-logs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-logs.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueLogs( - null // threshold (optional) -); +const result = await health.getQueueLogs({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-mails.md index 8c45c1a194..6fd020ddcc 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-mails.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-mails.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueMails( - null // threshold (optional) -); +const result = await health.getQueueMails({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-messaging.md index 46160a0e88..3100baaf03 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-messaging.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-messaging.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueMessaging( - null // threshold (optional) -); +const result = await health.getQueueMessaging({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-migrations.md index 5f8d262e30..aa143041ab 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-migrations.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-migrations.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueMigrations( - null // threshold (optional) -); +const result = await health.getQueueMigrations({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-stats-resources.md index 1b16e6d5b8..8c0e02f2db 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-stats-resources.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-stats-resources.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueStatsResources( - null // threshold (optional) -); +const result = await health.getQueueStatsResources({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-usage.md index 2a20620cd2..85fe61ce22 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-usage.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-usage.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueUsage( - null // threshold (optional) -); +const result = await health.getQueueUsage({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-webhooks.md index acc2098365..d82a5f6c93 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-webhooks.md +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-webhooks.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const health = new sdk.Health(client); -const result = await health.getQueueWebhooks( - null // threshold (optional) -); +const result = await health.getQueueWebhooks({ + threshold: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-apns-provider.md index a28309023a..208ecdaa56 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-apns-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-apns-provider.md @@ -7,13 +7,13 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createApnsProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '<AUTH_KEY>', // authKey (optional) - '<AUTH_KEY_ID>', // authKeyId (optional) - '<TEAM_ID>', // teamId (optional) - '<BUNDLE_ID>', // bundleId (optional) - false, // sandbox (optional) - false // enabled (optional) -); +const result = await messaging.createApnsProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + authKey: '<AUTH_KEY>', + authKeyId: '<AUTH_KEY_ID>', + teamId: '<TEAM_ID>', + bundleId: '<BUNDLE_ID>', + sandbox: false, + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-email.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-email.md index b4b1f6622a..9ef5fc4b15 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-email.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-email.md @@ -7,17 +7,17 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createEmail( - '<MESSAGE_ID>', // messageId - '<SUBJECT>', // subject - '<CONTENT>', // content - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - [], // cc (optional) - [], // bcc (optional) - [], // attachments (optional) - false, // draft (optional) - false, // html (optional) - '' // scheduledAt (optional) -); +const result = await messaging.createEmail({ + messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], + users: [], + targets: [], + cc: [], + bcc: [], + attachments: [], + draft: false, + html: false, + scheduledAt: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-fcm-provider.md index a8af6ba12c..7e4b213f91 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-fcm-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-fcm-provider.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createFcmProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - {}, // serviceAccountJSON (optional) - false // enabled (optional) -); +const result = await messaging.createFcmProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: {}, + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-mailgun-provider.md index ee49f64f7c..45093c7d22 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-mailgun-provider.md @@ -7,15 +7,15 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createMailgunProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '<API_KEY>', // apiKey (optional) - '<DOMAIN>', // domain (optional) - false, // isEuRegion (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - 'email@example.com', // replyToEmail (optional) - false // enabled (optional) -); +const result = await messaging.createMailgunProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', + domain: '<DOMAIN>', + isEuRegion: false, + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: 'email@example.com', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md index e7075dc3b8..0c1f18f052 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createMsg91Provider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '<TEMPLATE_ID>', // templateId (optional) - '<SENDER_ID>', // senderId (optional) - '<AUTH_KEY>', // authKey (optional) - false // enabled (optional) -); +const result = await messaging.createMsg91Provider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + templateId: '<TEMPLATE_ID>', + senderId: '<SENDER_ID>', + authKey: '<AUTH_KEY>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-push.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-push.md index bd89f761fb..f6bc726a46 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-push.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-push.md @@ -7,24 +7,24 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createPush( - '<MESSAGE_ID>', // messageId - '<TITLE>', // title (optional) - '<BODY>', // body (optional) - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - {}, // data (optional) - '<ACTION>', // action (optional) - '[ID1:ID2]', // image (optional) - '<ICON>', // icon (optional) - '<SOUND>', // sound (optional) - '<COLOR>', // color (optional) - '<TAG>', // tag (optional) - null, // badge (optional) - false, // draft (optional) - '', // scheduledAt (optional) - false, // contentAvailable (optional) - false, // critical (optional) - sdk.MessagePriority.Normal // priority (optional) -); +const result = await messaging.createPush({ + messageId: '<MESSAGE_ID>', + title: '<TITLE>', + body: '<BODY>', + topics: [], + users: [], + targets: [], + data: {}, + action: '<ACTION>', + image: '[ID1:ID2]', + icon: '<ICON>', + sound: '<SOUND>', + color: '<COLOR>', + tag: '<TAG>', + badge: null, + draft: false, + scheduledAt: '', + contentAvailable: false, + critical: false, + priority: sdk.MessagePriority.Normal +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sendgrid-provider.md index 8cde02e80c..3600e11085 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sendgrid-provider.md @@ -7,13 +7,13 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createSendgridProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '<API_KEY>', // apiKey (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - 'email@example.com', // replyToEmail (optional) - false // enabled (optional) -); +const result = await messaging.createSendgridProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: 'email@example.com', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sms.md index 226f47c8d4..59d150f162 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sms.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sms.md @@ -7,12 +7,12 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createSms( - '<MESSAGE_ID>', // messageId - '<CONTENT>', // content - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - false, // draft (optional) - '' // scheduledAt (optional) -); +const result = await messaging.createSms({ + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], + users: [], + targets: [], + draft: false, + scheduledAt: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-smtp-provider.md index 50a8d202c5..9aba10ac45 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-smtp-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-smtp-provider.md @@ -7,19 +7,19 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createSmtpProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '<HOST>', // host - 1, // port (optional) - '<USERNAME>', // username (optional) - '<PASSWORD>', // password (optional) - sdk.SmtpEncryption.None, // encryption (optional) - false, // autoTLS (optional) - '<MAILER>', // mailer (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - 'email@example.com', // replyToEmail (optional) - false // enabled (optional) -); +const result = await messaging.createSmtpProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, + username: '<USERNAME>', + password: '<PASSWORD>', + encryption: sdk.SmtpEncryption.None, + autoTLS: false, + mailer: '<MAILER>', + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: 'email@example.com', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-subscriber.md index 9874d072b8..f86a424c2a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-subscriber.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-subscriber.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>', // subscriberId - '<TARGET_ID>' // targetId -); +const result = await messaging.createSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-telesign-provider.md index b877172163..b1bf20c6be 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-telesign-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-telesign-provider.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createTelesignProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '+12065550100', // from (optional) - '<CUSTOMER_ID>', // customerId (optional) - '<API_KEY>', // apiKey (optional) - false // enabled (optional) -); +const result = await messaging.createTelesignProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', + customerId: '<CUSTOMER_ID>', + apiKey: '<API_KEY>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-textmagic-provider.md index b40d5ee4e7..0c9f741d75 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-textmagic-provider.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createTextmagicProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '+12065550100', // from (optional) - '<USERNAME>', // username (optional) - '<API_KEY>', // apiKey (optional) - false // enabled (optional) -); +const result = await messaging.createTextmagicProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', + username: '<USERNAME>', + apiKey: '<API_KEY>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-topic.md index 35c93eadca..8393e9406f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-topic.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-topic.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createTopic( - '<TOPIC_ID>', // topicId - '<NAME>', // name - ["any"] // subscribe (optional) -); +const result = await messaging.createTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-twilio-provider.md index 4dcb9a841d..5d583f6915 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-twilio-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-twilio-provider.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createTwilioProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '+12065550100', // from (optional) - '<ACCOUNT_SID>', // accountSid (optional) - '<AUTH_TOKEN>', // authToken (optional) - false // enabled (optional) -); +const result = await messaging.createTwilioProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', + accountSid: '<ACCOUNT_SID>', + authToken: '<AUTH_TOKEN>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-vonage-provider.md index 493cd2b660..2d3425f7eb 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-vonage-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-vonage-provider.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.createVonageProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name - '+12065550100', // from (optional) - '<API_KEY>', // apiKey (optional) - '<API_SECRET>', // apiSecret (optional) - false // enabled (optional) -); +const result = await messaging.createVonageProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', + apiKey: '<API_KEY>', + apiSecret: '<API_SECRET>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-provider.md index 23b474f787..590b8078ee 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-provider.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.deleteProvider( - '<PROVIDER_ID>' // providerId -); +const result = await messaging.deleteProvider({ + providerId: '<PROVIDER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-subscriber.md index 1f5e21af93..77f2f8962f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-subscriber.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.deleteSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>' // subscriberId -); +const result = await messaging.deleteSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-topic.md index af39f73491..58ca2fb382 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-topic.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-topic.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.deleteTopic( - '<TOPIC_ID>' // topicId -); +const result = await messaging.deleteTopic({ + topicId: '<TOPIC_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md index fd49104a49..c2c0560d71 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.delete( - '<MESSAGE_ID>' // messageId -); +const result = await messaging.delete({ + messageId: '<MESSAGE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-message.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-message.md index f83ab51c23..503da4828d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-message.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-message.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.getMessage( - '<MESSAGE_ID>' // messageId -); +const result = await messaging.getMessage({ + messageId: '<MESSAGE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-provider.md index 2f52698bfc..f7c70587b4 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-provider.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.getProvider( - '<PROVIDER_ID>' // providerId -); +const result = await messaging.getProvider({ + providerId: '<PROVIDER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-subscriber.md index 5132f1772a..befc566bf9 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-subscriber.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-subscriber.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.getSubscriber( - '<TOPIC_ID>', // topicId - '<SUBSCRIBER_ID>' // subscriberId -); +const result = await messaging.getSubscriber({ + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-topic.md index 98e38383d4..f537973f3c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-topic.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-topic.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.getTopic( - '<TOPIC_ID>' // topicId -); +const result = await messaging.getTopic({ + topicId: '<TOPIC_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-message-logs.md index 56e1288af7..04180c1ec1 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-message-logs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-message-logs.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listMessageLogs( - '<MESSAGE_ID>', // messageId - [] // queries (optional) -); +const result = await messaging.listMessageLogs({ + messageId: '<MESSAGE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-messages.md index db0785ece8..907f7c03a5 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-messages.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-messages.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listMessages( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await messaging.listMessages({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-provider-logs.md index 6cb2a01df4..30cc2a406a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-provider-logs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-provider-logs.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listProviderLogs( - '<PROVIDER_ID>', // providerId - [] // queries (optional) -); +const result = await messaging.listProviderLogs({ + providerId: '<PROVIDER_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-providers.md index aefb41d15a..870cafb628 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-providers.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-providers.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listProviders( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await messaging.listProviders({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscriber-logs.md index 8d46a08578..84b93513e5 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscriber-logs.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listSubscriberLogs( - '<SUBSCRIBER_ID>', // subscriberId - [] // queries (optional) -); +const result = await messaging.listSubscriberLogs({ + subscriberId: '<SUBSCRIBER_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscribers.md index 167b48e978..9cccda0e13 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscribers.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscribers.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listSubscribers( - '<TOPIC_ID>', // topicId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await messaging.listSubscribers({ + topicId: '<TOPIC_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-targets.md index 971285d87c..2431104d59 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-targets.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-targets.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listTargets( - '<MESSAGE_ID>', // messageId - [] // queries (optional) -); +const result = await messaging.listTargets({ + messageId: '<MESSAGE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topic-logs.md index 39e82954d1..719ab1a9c5 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topic-logs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topic-logs.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listTopicLogs( - '<TOPIC_ID>', // topicId - [] // queries (optional) -); +const result = await messaging.listTopicLogs({ + topicId: '<TOPIC_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topics.md index 6fd94bba42..2a07f75206 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topics.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topics.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.listTopics( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await messaging.listTopics({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-apns-provider.md index e782b8c3f7..a2c560fd52 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-apns-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-apns-provider.md @@ -7,13 +7,13 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateApnsProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<AUTH_KEY>', // authKey (optional) - '<AUTH_KEY_ID>', // authKeyId (optional) - '<TEAM_ID>', // teamId (optional) - '<BUNDLE_ID>', // bundleId (optional) - false // sandbox (optional) -); +const result = await messaging.updateApnsProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + authKey: '<AUTH_KEY>', + authKeyId: '<AUTH_KEY_ID>', + teamId: '<TEAM_ID>', + bundleId: '<BUNDLE_ID>', + sandbox: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-email.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-email.md index 2ea2941efd..945ca3b325 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-email.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-email.md @@ -7,17 +7,17 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateEmail( - '<MESSAGE_ID>', // messageId - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - '<SUBJECT>', // subject (optional) - '<CONTENT>', // content (optional) - false, // draft (optional) - false, // html (optional) - [], // cc (optional) - [], // bcc (optional) - '', // scheduledAt (optional) - [] // attachments (optional) -); +const result = await messaging.updateEmail({ + messageId: '<MESSAGE_ID>', + topics: [], + users: [], + targets: [], + subject: '<SUBJECT>', + content: '<CONTENT>', + draft: false, + html: false, + cc: [], + bcc: [], + scheduledAt: '', + attachments: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-fcm-provider.md index 9184f283d0..11b6c77769 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-fcm-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-fcm-provider.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateFcmProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - {} // serviceAccountJSON (optional) -); +const result = await messaging.updateFcmProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + serviceAccountJSON: {} +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-mailgun-provider.md index a1ac18fd60..f7c39ee5ad 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-mailgun-provider.md @@ -7,15 +7,15 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateMailgunProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - '<API_KEY>', // apiKey (optional) - '<DOMAIN>', // domain (optional) - false, // isEuRegion (optional) - false, // enabled (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - '<REPLY_TO_EMAIL>' // replyToEmail (optional) -); +const result = await messaging.updateMailgunProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', + domain: '<DOMAIN>', + isEuRegion: false, + enabled: false, + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: '<REPLY_TO_EMAIL>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md index c66b91f8c0..4bb4baadce 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateMsg91Provider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<TEMPLATE_ID>', // templateId (optional) - '<SENDER_ID>', // senderId (optional) - '<AUTH_KEY>' // authKey (optional) -); +const result = await messaging.updateMsg91Provider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + templateId: '<TEMPLATE_ID>', + senderId: '<SENDER_ID>', + authKey: '<AUTH_KEY>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-push.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-push.md index db52bee373..c8a75d4c0d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-push.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-push.md @@ -7,24 +7,24 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updatePush( - '<MESSAGE_ID>', // messageId - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - '<TITLE>', // title (optional) - '<BODY>', // body (optional) - {}, // data (optional) - '<ACTION>', // action (optional) - '[ID1:ID2]', // image (optional) - '<ICON>', // icon (optional) - '<SOUND>', // sound (optional) - '<COLOR>', // color (optional) - '<TAG>', // tag (optional) - null, // badge (optional) - false, // draft (optional) - '', // scheduledAt (optional) - false, // contentAvailable (optional) - false, // critical (optional) - sdk.MessagePriority.Normal // priority (optional) -); +const result = await messaging.updatePush({ + messageId: '<MESSAGE_ID>', + topics: [], + users: [], + targets: [], + title: '<TITLE>', + body: '<BODY>', + data: {}, + action: '<ACTION>', + image: '[ID1:ID2]', + icon: '<ICON>', + sound: '<SOUND>', + color: '<COLOR>', + tag: '<TAG>', + badge: null, + draft: false, + scheduledAt: '', + contentAvailable: false, + critical: false, + priority: sdk.MessagePriority.Normal +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sendgrid-provider.md index 8420a2fac2..c328423632 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sendgrid-provider.md @@ -7,13 +7,13 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateSendgridProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<API_KEY>', // apiKey (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - '<REPLY_TO_EMAIL>' // replyToEmail (optional) -); +const result = await messaging.updateSendgridProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + apiKey: '<API_KEY>', + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: '<REPLY_TO_EMAIL>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sms.md index 98ee6feb23..6abf0ff9e2 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sms.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sms.md @@ -7,12 +7,12 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateSms( - '<MESSAGE_ID>', // messageId - [], // topics (optional) - [], // users (optional) - [], // targets (optional) - '<CONTENT>', // content (optional) - false, // draft (optional) - '' // scheduledAt (optional) -); +const result = await messaging.updateSms({ + messageId: '<MESSAGE_ID>', + topics: [], + users: [], + targets: [], + content: '<CONTENT>', + draft: false, + scheduledAt: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-smtp-provider.md index 0bbe4cd2cb..8c4444d12e 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-smtp-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-smtp-provider.md @@ -7,19 +7,19 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateSmtpProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - '<HOST>', // host (optional) - 1, // port (optional) - '<USERNAME>', // username (optional) - '<PASSWORD>', // password (optional) - sdk.SmtpEncryption.None, // encryption (optional) - false, // autoTLS (optional) - '<MAILER>', // mailer (optional) - '<FROM_NAME>', // fromName (optional) - 'email@example.com', // fromEmail (optional) - '<REPLY_TO_NAME>', // replyToName (optional) - '<REPLY_TO_EMAIL>', // replyToEmail (optional) - false // enabled (optional) -); +const result = await messaging.updateSmtpProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, + username: '<USERNAME>', + password: '<PASSWORD>', + encryption: sdk.SmtpEncryption.None, + autoTLS: false, + mailer: '<MAILER>', + fromName: '<FROM_NAME>', + fromEmail: 'email@example.com', + replyToName: '<REPLY_TO_NAME>', + replyToEmail: '<REPLY_TO_EMAIL>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-telesign-provider.md index 2f23a3b11f..ff338fa446 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-telesign-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-telesign-provider.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateTelesignProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<CUSTOMER_ID>', // customerId (optional) - '<API_KEY>', // apiKey (optional) - '<FROM>' // from (optional) -); +const result = await messaging.updateTelesignProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + customerId: '<CUSTOMER_ID>', + apiKey: '<API_KEY>', + from: '<FROM>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-textmagic-provider.md index 6fb6c82e8f..0632b6872e 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-textmagic-provider.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateTextmagicProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<USERNAME>', // username (optional) - '<API_KEY>', // apiKey (optional) - '<FROM>' // from (optional) -); +const result = await messaging.updateTextmagicProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + username: '<USERNAME>', + apiKey: '<API_KEY>', + from: '<FROM>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-topic.md index 6330970077..d6d6482da8 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-topic.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-topic.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateTopic( - '<TOPIC_ID>', // topicId - '<NAME>', // name (optional) - ["any"] // subscribe (optional) -); +const result = await messaging.updateTopic({ + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-twilio-provider.md index e4667f56ae..37f817b17d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-twilio-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-twilio-provider.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateTwilioProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<ACCOUNT_SID>', // accountSid (optional) - '<AUTH_TOKEN>', // authToken (optional) - '<FROM>' // from (optional) -); +const result = await messaging.updateTwilioProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + accountSid: '<ACCOUNT_SID>', + authToken: '<AUTH_TOKEN>', + from: '<FROM>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-vonage-provider.md index b95398b4ea..57beebec7b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-vonage-provider.md +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-vonage-provider.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const messaging = new sdk.Messaging(client); -const result = await messaging.updateVonageProvider( - '<PROVIDER_ID>', // providerId - '<NAME>', // name (optional) - false, // enabled (optional) - '<API_KEY>', // apiKey (optional) - '<API_SECRET>', // apiSecret (optional) - '<FROM>' // from (optional) -); +const result = await messaging.updateVonageProvider({ + providerId: '<PROVIDER_ID>', + name: '<NAME>', + enabled: false, + apiKey: '<API_KEY>', + apiSecret: '<API_SECRET>', + from: '<FROM>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-deployment.md index 010da729ed..7244927b42 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/create-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-deployment.md @@ -8,11 +8,11 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.createDeployment( - '<SITE_ID>', // siteId - InputFile.fromPath('/path/to/file', 'filename'), // code - false, // activate - '<INSTALL_COMMAND>', // installCommand (optional) - '<BUILD_COMMAND>', // buildCommand (optional) - '<OUTPUT_DIRECTORY>' // outputDirectory (optional) -); +const result = await sites.createDeployment({ + siteId: '<SITE_ID>', + code: InputFile.fromPath('/path/to/file', 'filename'), + activate: false, + installCommand: '<INSTALL_COMMAND>', + buildCommand: '<BUILD_COMMAND>', + outputDirectory: '<OUTPUT_DIRECTORY>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-duplicate-deployment.md index 3ce35ff559..8d2bd4f604 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-duplicate-deployment.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.createDuplicateDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.createDuplicateDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-template-deployment.md index aebc2b8f4d..b496e4d2dd 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/create-template-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-template-deployment.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.createTemplateDeployment( - '<SITE_ID>', // siteId - '<REPOSITORY>', // repository - '<OWNER>', // owner - '<ROOT_DIRECTORY>', // rootDirectory - '<VERSION>', // version - false // activate (optional) -); +const result = await sites.createTemplateDeployment({ + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-variable.md index 59a51eea76..de86b94db6 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/create-variable.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-variable.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.createVariable( - '<SITE_ID>', // siteId - '<KEY>', // key - '<VALUE>', // value - false // secret (optional) -); +const result = await sites.createVariable({ + siteId: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-vcs-deployment.md index 4bd849777b..9faa3cabfe 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-vcs-deployment.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.createVcsDeployment( - '<SITE_ID>', // siteId - sdk.VCSDeploymentType.Branch, // type - '<REFERENCE>', // reference - false // activate (optional) -); +const result = await sites.createVcsDeployment({ + siteId: '<SITE_ID>', + type: sdk.VCSDeploymentType.Branch, + reference: '<REFERENCE>', + activate: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create.md index ad680592c2..b2c9f31e70 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/create.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create.md @@ -7,23 +7,23 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.create( - '<SITE_ID>', // siteId - '<NAME>', // name - sdk..Analog, // framework - sdk..Node145, // buildRuntime - false, // enabled (optional) - false, // logging (optional) - 1, // timeout (optional) - '<INSTALL_COMMAND>', // installCommand (optional) - '<BUILD_COMMAND>', // buildCommand (optional) - '<OUTPUT_DIRECTORY>', // outputDirectory (optional) - sdk..Static, // adapter (optional) - '<INSTALLATION_ID>', // installationId (optional) - '<FALLBACK_FILE>', // fallbackFile (optional) - '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) - '<PROVIDER_BRANCH>', // providerBranch (optional) - false, // providerSilentMode (optional) - '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) - '' // specification (optional) -); +const result = await sites.create({ + siteId: '<SITE_ID>', + name: '<NAME>', + framework: sdk..Analog, + buildRuntime: sdk..Node145, + enabled: false, + logging: false, + timeout: 1, + installCommand: '<INSTALL_COMMAND>', + buildCommand: '<BUILD_COMMAND>', + outputDirectory: '<OUTPUT_DIRECTORY>', + adapter: sdk..Static, + installationId: '<INSTALLATION_ID>', + fallbackFile: '<FALLBACK_FILE>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerBranch: '<PROVIDER_BRANCH>', + providerSilentMode: false, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', + specification: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-deployment.md index c04a5c38d7..292f9e05d0 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/delete-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-deployment.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.deleteDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.deleteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/delete-log.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-log.md index 88e58a5f62..d1850e1ea3 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/delete-log.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-log.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.deleteLog( - '<SITE_ID>', // siteId - '<LOG_ID>' // logId -); +const result = await sites.deleteLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-variable.md index abc7e3ac47..069ff8dc07 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/delete-variable.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-variable.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.deleteVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>' // variableId -); +const result = await sites.deleteVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/delete.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete.md index 87fd7d23be..7f6ad8bc88 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.delete( - '<SITE_ID>' // siteId -); +const result = await sites.delete({ + siteId: '<SITE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment-download.md index 414d50d4f8..c3c5950afd 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment-download.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment-download.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.getDeploymentDownload( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>', // deploymentId - sdk.DeploymentDownloadType.Source // type (optional) -); +const result = await sites.getDeploymentDownload({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: sdk.DeploymentDownloadType.Source +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment.md index 3f06b1ab07..68b6dcf549 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.getDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.getDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get-log.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get-log.md index 4318882c95..3a22d90ff5 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/get-log.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get-log.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.getLog( - '<SITE_ID>', // siteId - '<LOG_ID>' // logId -); +const result = await sites.getLog({ + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get-variable.md index 287336fd45..7d0a759ec4 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/get-variable.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get-variable.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.getVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>' // variableId -); +const result = await sites.getVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get.md index d382efa2c8..6d8180802f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/get.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.get( - '<SITE_ID>' // siteId -); +const result = await sites.get({ + siteId: '<SITE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-deployments.md index dce44ed134..6df5298399 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/list-deployments.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-deployments.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.listDeployments( - '<SITE_ID>', // siteId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await sites.listDeployments({ + siteId: '<SITE_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-logs.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-logs.md index faaf3d3542..d5a61bc769 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/list-logs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-logs.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.listLogs( - '<SITE_ID>', // siteId - [] // queries (optional) -); +const result = await sites.listLogs({ + siteId: '<SITE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-variables.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-variables.md index 948e977abc..498584ee60 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/list-variables.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-variables.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.listVariables( - '<SITE_ID>' // siteId -); +const result = await sites.listVariables({ + siteId: '<SITE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list.md index 184f4f3fc4..a4ab688f90 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/list.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await sites.list({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update-deployment-status.md index 7756424523..88d55b0d9e 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/update-deployment-status.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update-deployment-status.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.updateDeploymentStatus( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.updateDeploymentStatus({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update-site-deployment.md index bfbc0f3514..bb3adc437d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/update-site-deployment.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update-site-deployment.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.updateSiteDeployment( - '<SITE_ID>', // siteId - '<DEPLOYMENT_ID>' // deploymentId -); +const result = await sites.updateSiteDeployment({ + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/update-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update-variable.md index c790ca10eb..01be41fece 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/update-variable.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update-variable.md @@ -7,10 +7,10 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.updateVariable( - '<SITE_ID>', // siteId - '<VARIABLE_ID>', // variableId - '<KEY>', // key - '<VALUE>', // value (optional) - false // secret (optional) -); +const result = await sites.updateVariable({ + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/update.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update.md index e801aed187..25e7c4ad07 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/sites/update.md +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update.md @@ -7,23 +7,23 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.update( - '<SITE_ID>', // siteId - '<NAME>', // name - sdk..Analog, // framework - false, // enabled (optional) - false, // logging (optional) - 1, // timeout (optional) - '<INSTALL_COMMAND>', // installCommand (optional) - '<BUILD_COMMAND>', // buildCommand (optional) - '<OUTPUT_DIRECTORY>', // outputDirectory (optional) - sdk..Node145, // buildRuntime (optional) - sdk..Static, // adapter (optional) - '<FALLBACK_FILE>', // fallbackFile (optional) - '<INSTALLATION_ID>', // installationId (optional) - '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) - '<PROVIDER_BRANCH>', // providerBranch (optional) - false, // providerSilentMode (optional) - '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) - '' // specification (optional) -); +const result = await sites.update({ + siteId: '<SITE_ID>', + name: '<NAME>', + framework: sdk..Analog, + enabled: false, + logging: false, + timeout: 1, + installCommand: '<INSTALL_COMMAND>', + buildCommand: '<BUILD_COMMAND>', + outputDirectory: '<OUTPUT_DIRECTORY>', + buildRuntime: sdk..Node145, + adapter: sdk..Static, + fallbackFile: '<FALLBACK_FILE>', + installationId: '<INSTALLATION_ID>', + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', + providerBranch: '<PROVIDER_BRANCH>', + providerSilentMode: false, + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', + specification: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md index fc318f169d..0730a29078 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md @@ -7,15 +7,15 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.createBucket( - '<BUCKET_ID>', // bucketId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // fileSecurity (optional) - false, // enabled (optional) - 1, // maximumFileSize (optional) - [], // allowedFileExtensions (optional) - sdk..None, // compression (optional) - false, // encryption (optional) - false // antivirus (optional) -); +const result = await storage.createBucket({ + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: sdk..None, + encryption: false, + antivirus: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md index b84d9ac653..8a2329cdaa 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md @@ -8,9 +8,9 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.createFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - InputFile.fromPath('/path/to/file', 'filename'), // file - ["read("any")"] // permissions (optional) -); +const result = await storage.createFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile.fromPath('/path/to/file', 'filename'), + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/delete-bucket.md index c2067efda2..a59844dd41 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/delete-bucket.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/delete-bucket.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.deleteBucket( - '<BUCKET_ID>' // bucketId -); +const result = await storage.deleteBucket({ + bucketId: '<BUCKET_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/delete-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/delete-file.md index 4d2e7128cd..d973b5a50f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/delete-file.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/delete-file.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.deleteFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>' // fileId -); +const result = await storage.deleteFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-bucket.md index c8a0b1c55d..2dd16cc148 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/get-bucket.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-bucket.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.getBucket( - '<BUCKET_ID>' // bucketId -); +const result = await storage.getBucket({ + bucketId: '<BUCKET_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-download.md index 6935bede48..cedcd7c195 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-download.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-download.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.getFileDownload( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<TOKEN>' // token (optional) -); +const result = await storage.getFileDownload({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-preview.md index fe24419c52..077e7f9905 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-preview.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-preview.md @@ -7,19 +7,19 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.getFilePreview( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - 0, // width (optional) - 0, // height (optional) - sdk.ImageGravity.Center, // gravity (optional) - -1, // quality (optional) - 0, // borderWidth (optional) - '', // borderColor (optional) - 0, // borderRadius (optional) - 0, // opacity (optional) - -360, // rotation (optional) - '', // background (optional) - sdk.ImageFormat.Jpg, // output (optional) - '<TOKEN>' // token (optional) -); +const result = await storage.getFilePreview({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, + height: 0, + gravity: sdk.ImageGravity.Center, + quality: -1, + borderWidth: 0, + borderColor: '', + borderRadius: 0, + opacity: 0, + rotation: -360, + background: '', + output: sdk.ImageFormat.Jpg, + token: '<TOKEN>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-view.md index 9493cfb0a3..def181170a 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-view.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-view.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.getFileView( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<TOKEN>' // token (optional) -); +const result = await storage.getFileView({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file.md index 1a6b500013..a6c54c8670 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.getFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>' // fileId -); +const result = await storage.getFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-nodejs/examples/storage/list-buckets.md index 3c4d4b14f7..d93de623a6 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/list-buckets.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/list-buckets.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.listBuckets( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await storage.listBuckets({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/list-files.md b/docs/examples/1.8.x/server-nodejs/examples/storage/list-files.md index fb595efc05..27fae7a82b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/list-files.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/list-files.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.listFiles( - '<BUCKET_ID>', // bucketId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await storage.listFiles({ + bucketId: '<BUCKET_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md index 24e4872d8d..4d77c1e598 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md @@ -7,15 +7,15 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.updateBucket( - '<BUCKET_ID>', // bucketId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // fileSecurity (optional) - false, // enabled (optional) - 1, // maximumFileSize (optional) - [], // allowedFileExtensions (optional) - sdk..None, // compression (optional) - false, // encryption (optional) - false // antivirus (optional) -); +const result = await storage.updateBucket({ + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: sdk..None, + encryption: false, + antivirus: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md index 7eed687cf5..6cacb7a581 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const storage = new sdk.Storage(client); -const result = await storage.updateFile( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '<NAME>', // name (optional) - ["read("any")"] // permissions (optional) -); +const result = await storage.updateFile({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..f0625707b2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..7bd4fe87e9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..0256fc1d9b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-email-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createEmailColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..c7f40cf6f0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-enum-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..5f94c1c3b9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-float-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, + max: null, + default: null, + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..d261f706c2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-index.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: sdk.IndexType.Key, + columns: [], + orders: [], + lengths: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..8178bf3a6c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-integer-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, + max: null, + default: null, + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..c8eff98a06 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-ip-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..b1d439be50 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: sdk.RelationshipType.OneToOne, + twoWay: false, + key: '', + twoWayKey: '', + onDelete: sdk.RelationMutate.Cascade +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..be5ac27745 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-row.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..a41f591d56 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..a33c4389b3 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-string-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createStringColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', + array: false, + encrypt: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-table.md new file mode 100644 index 0000000000..22758d2029 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-table.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], + rowSecurity: false, + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..2aaf12825e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create-url-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.createUrlColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + array: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create.md new file mode 100644 index 0000000000..ef780a4fd6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/create.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.create({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..d87a3d21e2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.decrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, + min: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..5b79f8e993 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-column.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.deleteColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..981c0e90a5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.deleteIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..251e84d545 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-row.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.deleteRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..7312886f6d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.deleteRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..3498977ca1 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete-table.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.deleteTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete.md new file mode 100644 index 0000000000..fe3c70f8fa --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.delete({ + databaseId: '<DATABASE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..afb568293f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-column.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.getColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..27ecca9e42 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.getIndex({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..83dd9fdd7a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-row.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.getRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..12aa91dc58 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get-table.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.getTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get.md new file mode 100644 index 0000000000..35b732ccb5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.get({ + databaseId: '<DATABASE_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..bce48f90e6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/increment-row-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.incrementRowColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, + max: null +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..d0d584df05 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-columns.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.listColumns({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..cfbf121f84 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-indexes.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.listIndexes({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..fa5cc43061 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.listRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..2575318301 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list-tables.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.listTables({ + databaseId: '<DATABASE_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list.md new file mode 100644 index 0000000000..db2033251f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.list({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..26c6b359ac --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateBooleanColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..2917a4f8ce --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateDatetimeColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..452ddc1b83 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-email-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateEmailColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..9964c243db --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-enum-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateEnumColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..e717e0e42c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-float-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateFloatColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, + max: null, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..97b05ef564 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-integer-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateIntegerColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, + max: null, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..a5b6a173fc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-ip-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateIpColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..a67b8c4f2a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateRelationshipColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: sdk.RelationMutate.Cascade, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..c2e608c275 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-row.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..e756e57646 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-rows.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: {}, + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..648e1d8116 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-string-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateStringColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-table.md new file mode 100644 index 0000000000..04577b801c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-table.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateTable({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], + rowSecurity: false, + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..b1d976ee88 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update-url-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.updateUrlColumn({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update.md new file mode 100644 index 0000000000..0e60bb8194 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/update.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.update({ + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..089b89c9c5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-row.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.upsertRow({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..79f2968499 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tablesdb/upsert-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tablesDb = new sdk.TablesDb(client); + +const result = await tablesDb.upsertRows({ + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/create-membership.md b/docs/examples/1.8.x/server-nodejs/examples/teams/create-membership.md index 7994423be0..0725432d2e 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/create-membership.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/create-membership.md @@ -7,12 +7,12 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.createMembership( - '<TEAM_ID>', // teamId - [], // roles - 'email@example.com', // email (optional) - '<USER_ID>', // userId (optional) - '+12065550100', // phone (optional) - 'https://example.com', // url (optional) - '<NAME>' // name (optional) -); +const result = await teams.createMembership({ + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', + userId: '<USER_ID>', + phone: '+12065550100', + url: 'https://example.com', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/create.md b/docs/examples/1.8.x/server-nodejs/examples/teams/create.md index 94de494bf0..9427e84f36 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/create.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/create.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.create( - '<TEAM_ID>', // teamId - '<NAME>', // name - [] // roles (optional) -); +const result = await teams.create({ + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-nodejs/examples/teams/delete-membership.md index 5264af7f13..6fe5912391 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/delete-membership.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/delete-membership.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.deleteMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>' // membershipId -); +const result = await teams.deleteMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/delete.md b/docs/examples/1.8.x/server-nodejs/examples/teams/delete.md index 151bfb3f70..ebccae91d9 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.delete( - '<TEAM_ID>' // teamId -); +const result = await teams.delete({ + teamId: '<TEAM_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/get-membership.md b/docs/examples/1.8.x/server-nodejs/examples/teams/get-membership.md index a8e9fc7311..a8deb5519f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/get-membership.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/get-membership.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.getMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>' // membershipId -); +const result = await teams.getMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/teams/get-prefs.md index 18afdaa67b..bf9d72207b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/get-prefs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/get-prefs.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.getPrefs( - '<TEAM_ID>' // teamId -); +const result = await teams.getPrefs({ + teamId: '<TEAM_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/get.md b/docs/examples/1.8.x/server-nodejs/examples/teams/get.md index 8afc800aa9..2f4cc115af 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/get.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/get.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.get( - '<TEAM_ID>' // teamId -); +const result = await teams.get({ + teamId: '<TEAM_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-nodejs/examples/teams/list-memberships.md index 4fead97b8f..7e63a2c722 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/list-memberships.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/list-memberships.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.listMemberships( - '<TEAM_ID>', // teamId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await teams.listMemberships({ + teamId: '<TEAM_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/list.md b/docs/examples/1.8.x/server-nodejs/examples/teams/list.md index 17fe585224..6940173321 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/list.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/list.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await teams.list({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership-status.md index 74fd9580fe..f3b8ba2a67 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership-status.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership-status.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.updateMembershipStatus( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>', // membershipId - '<USER_ID>', // userId - '<SECRET>' // secret -); +const result = await teams.updateMembershipStatus({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership.md b/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership.md index 649630ded9..f09e8e9ab2 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.updateMembership( - '<TEAM_ID>', // teamId - '<MEMBERSHIP_ID>', // membershipId - [] // roles -); +const result = await teams.updateMembership({ + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/update-name.md b/docs/examples/1.8.x/server-nodejs/examples/teams/update-name.md index 571f7ce399..aaad80f90f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/update-name.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/update-name.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.updateName( - '<TEAM_ID>', // teamId - '<NAME>' // name -); +const result = await teams.updateName({ + teamId: '<TEAM_ID>', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/teams/update-prefs.md index b054694df5..7f16f62996 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/teams/update-prefs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/update-prefs.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const teams = new sdk.Teams(client); -const result = await teams.updatePrefs( - '<TEAM_ID>', // teamId - {} // prefs -); +const result = await teams.updatePrefs({ + teamId: '<TEAM_ID>', + prefs: {} +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/create-file-token.md index d1409c4a99..32fb68b9e2 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tokens/create-file-token.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/create-file-token.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const tokens = new sdk.Tokens(client); -const result = await tokens.createFileToken( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - '' // expire (optional) -); +const result = await tokens.createFileToken({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + expire: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md index 1249839f65..659c03e5c9 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const tokens = new sdk.Tokens(client); -const result = await tokens.delete( - '<TOKEN_ID>' // tokenId -); +const result = await tokens.delete({ + tokenId: '<TOKEN_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/get.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/get.md index efb2b8c1b4..68371c329e 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tokens/get.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/get.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const tokens = new sdk.Tokens(client); -const result = await tokens.get( - '<TOKEN_ID>' // tokenId -); +const result = await tokens.get({ + tokenId: '<TOKEN_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/list.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/list.md index 8b708f270f..f4a49b6094 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tokens/list.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/list.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const tokens = new sdk.Tokens(client); -const result = await tokens.list( - '<BUCKET_ID>', // bucketId - '<FILE_ID>', // fileId - [] // queries (optional) -); +const result = await tokens.list({ + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/update.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/update.md index ebf5aa9bf8..d16c5e9e25 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tokens/update.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/update.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const tokens = new sdk.Tokens(client); -const result = await tokens.update( - '<TOKEN_ID>', // tokenId - '' // expire (optional) -); +const result = await tokens.update({ + tokenId: '<TOKEN_ID>', + expire: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md index dce3646a48..81811e5829 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createArgon2User( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const result = await users.createArgon2User({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-bcrypt-user.md index d010676d29..0e24a1aad0 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-bcrypt-user.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-bcrypt-user.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createBcryptUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const result = await users.createBcryptUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-j-w-t.md index a2c9b59056..b44b513a13 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-j-w-t.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-j-w-t.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createJWT( - '<USER_ID>', // userId - '<SESSION_ID>', // sessionId (optional) - 0 // duration (optional) -); +const result = await users.createJWT({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', + duration: 0 +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-m-d5user.md index 954374c37d..cf588a8bc1 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-m-d5user.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-m-d5user.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createMD5User( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const result = await users.createMD5User({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-mfa-recovery-codes.md index 8b2ed93b23..9835100520 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-mfa-recovery-codes.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createMfaRecoveryCodes( - '<USER_ID>' // userId -); +const result = await users.createMfaRecoveryCodes({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-p-h-pass-user.md index eca31fe659..1e4d63fa00 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-p-h-pass-user.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-p-h-pass-user.md @@ -7,9 +7,9 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createPHPassUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<NAME>' // name (optional) -); +const result = await users.createPHPassUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-s-h-a-user.md index e7d8588fca..6c3f421dc5 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-s-h-a-user.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-s-h-a-user.md @@ -7,10 +7,10 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createSHAUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - sdk.PasswordHash.Sha1, // passwordVersion (optional) - '<NAME>' // name (optional) -); +const result = await users.createSHAUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: sdk.PasswordHash.Sha1, + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-modified-user.md index 831107b569..4bb7813a4d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-modified-user.md @@ -7,12 +7,12 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createScryptModifiedUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<PASSWORD_SALT>', // passwordSalt - '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator - '<PASSWORD_SIGNER_KEY>', // passwordSignerKey - '<NAME>' // name (optional) -); +const result = await users.createScryptModifiedUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-user.md index 2c2da7e055..e3eeaef0e4 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-user.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-user.md @@ -7,14 +7,14 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createScryptUser( - '<USER_ID>', // userId - 'email@example.com', // email - 'password', // password - '<PASSWORD_SALT>', // passwordSalt - null, // passwordCpu - null, // passwordMemory - null, // passwordParallel - null, // passwordLength - '<NAME>' // name (optional) -); +const result = await users.createScryptUser({ + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: null, + passwordMemory: null, + passwordParallel: null, + passwordLength: null, + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-session.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-session.md index 9d8cc03ba0..869e67f3ba 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-session.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-session.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createSession( - '<USER_ID>' // userId -); +const result = await users.createSession({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-target.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-target.md index 7b9e6b0347..4d7af44fcb 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-target.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-target.md @@ -7,11 +7,11 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createTarget( - '<USER_ID>', // userId - '<TARGET_ID>', // targetId - sdk.MessagingProviderType.Email, // providerType - '<IDENTIFIER>', // identifier - '<PROVIDER_ID>', // providerId (optional) - '<NAME>' // name (optional) -); +const result = await users.createTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: sdk.MessagingProviderType.Email, + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-token.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-token.md index de7d866e8c..4390d3f16b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create-token.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-token.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.createToken( - '<USER_ID>', // userId - 4, // length (optional) - 60 // expire (optional) -); +const result = await users.createToken({ + userId: '<USER_ID>', + length: 4, + expire: 60 +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create.md b/docs/examples/1.8.x/server-nodejs/examples/users/create.md index 025c15ada1..fdbef9b5ec 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/create.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create.md @@ -7,10 +7,10 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.create( - '<USER_ID>', // userId - 'email@example.com', // email (optional) - '+12065550100', // phone (optional) - '', // password (optional) - '<NAME>' // name (optional) -); +const result = await users.create({ + userId: '<USER_ID>', + email: 'email@example.com', + phone: '+12065550100', + password: '', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-identity.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-identity.md index 4c92f27d25..bcd0e9efbf 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/delete-identity.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-identity.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.deleteIdentity( - '<IDENTITY_ID>' // identityId -); +const result = await users.deleteIdentity({ + identityId: '<IDENTITY_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-mfa-authenticator.md index 456242e22d..3fb97de9f1 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-mfa-authenticator.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.deleteMfaAuthenticator( - '<USER_ID>', // userId - sdk.AuthenticatorType.Totp // type -); +const result = await users.deleteMfaAuthenticator({ + userId: '<USER_ID>', + type: sdk.AuthenticatorType.Totp +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-session.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-session.md index 3f08370f3b..ce301fba6c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/delete-session.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-session.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.deleteSession( - '<USER_ID>', // userId - '<SESSION_ID>' // sessionId -); +const result = await users.deleteSession({ + userId: '<USER_ID>', + sessionId: '<SESSION_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-sessions.md index 48714a0db1..5495fcbc9d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/delete-sessions.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-sessions.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.deleteSessions( - '<USER_ID>' // userId -); +const result = await users.deleteSessions({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-target.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-target.md index ba7e6afd9c..33278f4ac9 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/delete-target.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-target.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.deleteTarget( - '<USER_ID>', // userId - '<TARGET_ID>' // targetId -); +const result = await users.deleteTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete.md index 8fdd9e90b8..13210442fa 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/delete.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.delete( - '<USER_ID>' // userId -); +const result = await users.delete({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/users/get-mfa-recovery-codes.md index 233c3375ec..2704e439c7 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get-mfa-recovery-codes.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.getMfaRecoveryCodes( - '<USER_ID>' // userId -); +const result = await users.getMfaRecoveryCodes({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/get-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/users/get-prefs.md index 61933872e4..cb9d54fd25 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/get-prefs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get-prefs.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.getPrefs( - '<USER_ID>' // userId -); +const result = await users.getPrefs({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/get-target.md b/docs/examples/1.8.x/server-nodejs/examples/users/get-target.md index 00dc1f118b..0c320bf480 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/get-target.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get-target.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.getTarget( - '<USER_ID>', // userId - '<TARGET_ID>' // targetId -); +const result = await users.getTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/get.md b/docs/examples/1.8.x/server-nodejs/examples/users/get.md index 640aa6315c..594f034e0d 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/get.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.get( - '<USER_ID>' // userId -); +const result = await users.get({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-identities.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-identities.md index 819b1688ef..c6ecf6a5fc 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/list-identities.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-identities.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.listIdentities( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await users.listIdentities({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-logs.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-logs.md index c1155d55e2..bfe3d246f9 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/list-logs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-logs.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.listLogs( - '<USER_ID>', // userId - [] // queries (optional) -); +const result = await users.listLogs({ + userId: '<USER_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-memberships.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-memberships.md index bbe4ed3711..5d08e3d89c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/list-memberships.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-memberships.md @@ -7,8 +7,8 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.listMemberships( - '<USER_ID>', // userId - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await users.listMemberships({ + userId: '<USER_ID>', + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-mfa-factors.md index 8bffa28834..90278a03a2 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/list-mfa-factors.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-mfa-factors.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.listMfaFactors( - '<USER_ID>' // userId -); +const result = await users.listMfaFactors({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-sessions.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-sessions.md index 51ba0814c4..e1082c5d9e 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/list-sessions.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-sessions.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.listSessions( - '<USER_ID>' // userId -); +const result = await users.listSessions({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-targets.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-targets.md index d991dcca73..7810b653db 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/list-targets.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-targets.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.listTargets( - '<USER_ID>', // userId - [] // queries (optional) -); +const result = await users.listTargets({ + userId: '<USER_ID>', + queries: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list.md b/docs/examples/1.8.x/server-nodejs/examples/users/list.md index 2bf765bea2..bccd2c48ee 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/list.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.list( - [], // queries (optional) - '<SEARCH>' // search (optional) -); +const result = await users.list({ + queries: [], + search: '<SEARCH>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-email-verification.md index 9dac2d0e54..14ab8fb479 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/update-email-verification.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-email-verification.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateEmailVerification( - '<USER_ID>', // userId - false // emailVerification -); +const result = await users.updateEmailVerification({ + userId: '<USER_ID>', + emailVerification: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-email.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-email.md index 0a8b1aa7af..b8990cd10c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/update-email.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-email.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateEmail( - '<USER_ID>', // userId - 'email@example.com' // email -); +const result = await users.updateEmail({ + userId: '<USER_ID>', + email: 'email@example.com' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-labels.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-labels.md index db9e8778ad..8e6588d5aa 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/update-labels.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-labels.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateLabels( - '<USER_ID>', // userId - [] // labels -); +const result = await users.updateLabels({ + userId: '<USER_ID>', + labels: [] +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa-recovery-codes.md index 9d47085370..03846d0785 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa-recovery-codes.md @@ -7,6 +7,6 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateMfaRecoveryCodes( - '<USER_ID>' // userId -); +const result = await users.updateMfaRecoveryCodes({ + userId: '<USER_ID>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa.md index b4acc79938..f4fc223ab7 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateMfa( - '<USER_ID>', // userId - false // mfa -); +const result = await users.updateMfa({ + userId: '<USER_ID>', + mfa: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-name.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-name.md index 581e57b755..914f2a313e 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/update-name.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-name.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateName( - '<USER_ID>', // userId - '<NAME>' // name -); +const result = await users.updateName({ + userId: '<USER_ID>', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-password.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-password.md index f4af49d67e..dd32ede72b 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/update-password.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-password.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updatePassword( - '<USER_ID>', // userId - '' // password -); +const result = await users.updatePassword({ + userId: '<USER_ID>', + password: '' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-phone-verification.md index ecbe7591df..bccc61a747 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/update-phone-verification.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-phone-verification.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updatePhoneVerification( - '<USER_ID>', // userId - false // phoneVerification -); +const result = await users.updatePhoneVerification({ + userId: '<USER_ID>', + phoneVerification: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-phone.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-phone.md index 45e5a6582a..de534f6f96 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/update-phone.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-phone.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updatePhone( - '<USER_ID>', // userId - '+12065550100' // number -); +const result = await users.updatePhone({ + userId: '<USER_ID>', + number: '+12065550100' +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-prefs.md index bb7eff8d6b..9b5d9d4803 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/update-prefs.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-prefs.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updatePrefs( - '<USER_ID>', // userId - {} // prefs -); +const result = await users.updatePrefs({ + userId: '<USER_ID>', + prefs: {} +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-status.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-status.md index 57f64ce942..c222030823 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/update-status.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-status.md @@ -7,7 +7,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateStatus( - '<USER_ID>', // userId - false // status -); +const result = await users.updateStatus({ + userId: '<USER_ID>', + status: false +}); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-target.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-target.md index c6e4d9a1b0..bdf1a47fda 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/users/update-target.md +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-target.md @@ -7,10 +7,10 @@ const client = new sdk.Client() const users = new sdk.Users(client); -const result = await users.updateTarget( - '<USER_ID>', // userId - '<TARGET_ID>', // targetId - '<IDENTIFIER>', // identifier (optional) - '<PROVIDER_ID>', // providerId (optional) - '<NAME>' // name (optional) -); +const result = await users.updateTarget({ + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', + name: '<NAME>' +}); diff --git a/docs/examples/1.8.x/server-php/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/decrement-document-attribute.md index 40e14af844..6464a26818 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-php/examples/databases/decrement-document-attribute.md @@ -6,7 +6,7 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key + ->setSession(''); // The user session to authenticate with $databases = new Databases($client); diff --git a/docs/examples/1.8.x/server-php/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/increment-document-attribute.md index fb61d87295..9ad4bdfdec 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-php/examples/databases/increment-document-attribute.md @@ -6,7 +6,7 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key + ->setSession(''); // The user session to authenticate with $databases = new Databases($client); diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..5a609b6bdb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..9ac6470e73 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..c0102f280c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-email-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..eb299bb70a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-enum-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..3fad52675c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-float-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..ecb9cf8470 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-index.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; +use Appwrite\Enums\IndexType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType::KEY(), + columns: [], + orders: [], // optional + lengths: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..f6ef4b29f4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-integer-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..3b993a145b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-ip-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..713541c3c4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,23 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; +use Appwrite\Enums\RelationshipType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType::ONETOONE(), + twoWay: false, // optional + key: '', // optional + twoWayKey: '', // optional + onDelete: RelationMutate::CASCADE() // 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 new file mode 100644 index 0000000000..bfdd395c42 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-row.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..8b5868a1ee --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..8534713a5a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-string-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', // optional + array: false, // optional + encrypt: false // 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 new file mode 100644 index 0000000000..d72fa62fe1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-table.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("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/create-url-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..e180b08d6c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create-url-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/create.md b/docs/examples/1.8.x/server-php/examples/tablesdb/create.md new file mode 100644 index 0000000000..2c82e73b67 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/create.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..c4c7c633c7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + min: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..84f665c59a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-column.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..f979e897ca --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..f71cd5825c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-row.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..81056edcf6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..3df53e52d5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/delete-table.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->deleteTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-php/examples/tablesdb/delete.md new file mode 100644 index 0000000000..10131084a9 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->delete( + databaseId: '<DATABASE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..9a3af22ae2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/get-column.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-php/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..9847d6ae06 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/get-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-php/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..40487b693a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/get-row.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-php/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..6e85066509 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/get-table.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->getTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/get.md b/docs/examples/1.8.x/server-php/examples/tablesdb/get.md new file mode 100644 index 0000000000..8e79508ecf --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->get( + databaseId: '<DATABASE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..bf986b6d2b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/increment-row-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + max: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-php/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..4e3631ea8e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/list-columns.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-php/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..5a777e9a74 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/list-indexes.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-php/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..7674a4b8ad --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/list-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-php/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..a46fdafa81 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/list-tables.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->listTables( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/list.md b/docs/examples/1.8.x/server-php/examples/tablesdb/list.md new file mode 100644 index 0000000000..d03a68b700 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..ed043ae425 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..3b7aa77f11 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..9833589123 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-email-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..dbbadbaea1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-enum-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..2ac1708962 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-float-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..b81911f709 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-integer-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..2eddf86a77 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-ip-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..c36e79acd9 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate::CASCADE(), // optional + newKey: '' // 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 new file mode 100644 index 0000000000..c6df2e0deb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-row.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..83497276fe --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-rows.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: [], // optional + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..457c4baaa1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-string-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, // optional + newKey: '' // 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 new file mode 100644 index 0000000000..6cd7f0f051 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-table.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("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-url-column.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..43a3e45522 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update-url-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/update.md b/docs/examples/1.8.x/server-php/examples/tablesdb/update.md new file mode 100644 index 0000000000..fe6764ecff --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/update.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + 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 new file mode 100644 index 0000000000..db02dc2aa5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/upsert-row.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-php/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..77d321a6ae --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tablesdb/upsert-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\TablesDb; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tablesDb = new TablesDb($client); + +$result = $tablesDb->upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/decrement-document-attribute.md index 397bdd4bde..3efedf766e 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-python/examples/databases/decrement-document-attribute.md @@ -4,7 +4,7 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_session('') # The user session to authenticate with databases = Databases(client) diff --git a/docs/examples/1.8.x/server-python/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/increment-document-attribute.md index d5700e0b30..9ae1cedfe4 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-python/examples/databases/increment-document-attribute.md @@ -4,7 +4,7 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_session('') # The user session to authenticate with databases = Databases(client) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..bbcb2759b7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = False, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..291f6cf4fa --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..042ef85bb5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-email-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'email@example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..c60fad94dd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-enum-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..b84b79cec5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-float-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..59f85315b6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-index.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb +from appwrite.enums import IndexType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + type = IndexType.KEY, + columns = [], + orders = [], # optional + lengths = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..d0701cd387 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-integer-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..0775c4ae4c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-ip-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..bf77f479d9 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,21 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb +from appwrite.enums import RelationshipType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + related_table_id = '<RELATED_TABLE_ID>', + type = RelationshipType.ONETOONE, + two_way = False, # optional + key = '', # optional + two_way_key = '', # optional + on_delete = RelationMutate.CASCADE # 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 new file mode 100644 index 0000000000..5cdb56993a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-row.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables_db = TablesDb(client) + +result = tables_db.create_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..e6ecd3a33f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [] +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..19e49f03fa --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-string-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + size = 1, + required = False, + default = '<DEFAULT>', # optional + array = False, # optional + encrypt = False # 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 new file mode 100644 index 0000000000..3b3e5790b5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-table.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + row_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..32d5eba5f1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create-url-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'https://example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/create.md b/docs/examples/1.8.x/server-python/examples/tablesdb/create.md new file mode 100644 index 0000000000..043ed4b471 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/create.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..1d5a03f029 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables_db = TablesDb(client) + +result = tables_db.decrement_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '', + value = None, # optional + min = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..1a134aff96 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-column.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.delete_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..84045cfd4d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.delete_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..30fc8dcd03 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-row.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables_db = TablesDb(client) + +result = tables_db.delete_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..05eb0fcaf5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.delete_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..b4728da8bb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/delete-table.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.delete_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-python/examples/tablesdb/delete.md new file mode 100644 index 0000000000..a56ce6fc07 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.delete( + database_id = '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..e3b76c6b12 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/get-column.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.get_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-python/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..5b7e6caca8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/get-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.get_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-python/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..a18da4d05c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/get-row.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables_db = TablesDb(client) + +result = tables_db.get_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-python/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..252df860ef --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/get-table.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.get_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/get.md b/docs/examples/1.8.x/server-python/examples/tablesdb/get.md new file mode 100644 index 0000000000..93ce63c80a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.get( + database_id = '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..af93969c1a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/increment-row-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables_db = TablesDb(client) + +result = tables_db.increment_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '', + value = None, # optional + max = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-python/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..207e367cba --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/list-columns.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.list_columns( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-python/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..9f9f3e64b3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/list-indexes.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.list_indexes( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-python/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..2ad2448a57 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/list-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables_db = TablesDb(client) + +result = tables_db.list_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-python/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..8c61593c99 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/list-tables.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.list_tables( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/list.md b/docs/examples/1.8.x/server-python/examples/tablesdb/list.md new file mode 100644 index 0000000000..27b2a36c51 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..b343e67860 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = False, + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..d6a8a7c210 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..6150f3e7a8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-email-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'email@example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..d856611112 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-enum-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..c6791f5a29 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-float-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..368c8a6f87 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-integer-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..9cefab7d10 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-ip-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..e0c1545de6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + on_delete = RelationMutate.CASCADE, # optional + new_key = '' # 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 new file mode 100644 index 0000000000..74f6a29232 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-row.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables_db = TablesDb(client) + +result = tables_db.update_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..20dd803de7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-rows.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + data = {}, # optional + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..f2ec02e0c7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-string-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '<DEFAULT>', + size = 1, # optional + new_key = '' # 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 new file mode 100644 index 0000000000..b1c8718484 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-table.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + row_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..bd684f4436 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update-url-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'https://example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/update.md b/docs/examples/1.8.x/server-python/examples/tablesdb/update.md new file mode 100644 index 0000000000..7df2c022f9 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/update.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', + 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 new file mode 100644 index 0000000000..a1717b3154 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/upsert-row.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables_db = TablesDb(client) + +result = tables_db.upsert_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-python/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..c4ee151b06 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tablesdb/upsert-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables_db import TablesDb + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb(client) + +result = tables_db.upsert_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [] +) diff --git a/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md index 53ee43c6c5..78694a804d 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md @@ -3,6 +3,8 @@ Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Key: <YOUR_API_KEY> { diff --git a/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md index accfca5b06..cd6b4122eb 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md @@ -3,6 +3,8 @@ Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Key: <YOUR_API_KEY> { diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..8450b65435 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,13 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/boolean HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": false, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..73d80272f9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,13 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/datetime HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..0d1d81c482 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-email-column.md @@ -0,0 +1,13 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "email@example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..6b39abb92d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-enum-column.md @@ -0,0 +1,14 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/enum HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "elements": [], + "required": false, + "default": "<DEFAULT>", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..e890c595d0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-float-column.md @@ -0,0 +1,15 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/float HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..baa06e815f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-index.md @@ -0,0 +1,14 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "type": "key", + "columns": [], + "orders": [], + "lengths": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..f34cf14965 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-integer-column.md @@ -0,0 +1,15 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/integer HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..10a849d073 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-ip-column.md @@ -0,0 +1,13 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/ip HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..8dffdd30a2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,15 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "relatedTableId": "<RELATED_TABLE_ID>", + "type": "oneToOne", + "twoWay": false, + "key": , + "twoWayKey": , + "onDelete": "cascade" +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-row.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-row.md new file mode 100644 index 0000000000..d15cee6065 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-row.md @@ -0,0 +1,14 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rowId": "<ROW_ID>", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..176b4cdb02 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-rows.md @@ -0,0 +1,12 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rows": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..6e3f7e21cd --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-string-column.md @@ -0,0 +1,15 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/string HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "size": 1, + "required": false, + "default": "<DEFAULT>", + "array": false, + "encrypt": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-table.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-table.md new file mode 100644 index 0000000000..1625e8441b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-table.md @@ -0,0 +1,14 @@ +POST /v1/tablesdb/{databaseId}/tables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "tableId": "<TABLE_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..55e9774e51 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create-url-column.md @@ -0,0 +1,13 @@ +POST /v1/tablesdb/{databaseId}/tables/{tableId}/columns/url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "https://example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/create.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/create.md new file mode 100644 index 0000000000..69789b081f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/create.md @@ -0,0 +1,12 @@ +POST /v1/tablesdb HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..26d8e1118c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,13 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "min": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..3b919093b1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-column.md @@ -0,0 +1,7 @@ +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..bc86671c3f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-index.md @@ -0,0 +1,7 @@ +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..3dbbf45a3c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-row.md @@ -0,0 +1,9 @@ +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..c57d62ede3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-rows.md @@ -0,0 +1,10 @@ +DELETE /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..63eb1fd227 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete-table.md @@ -0,0 +1,7 @@ +DELETE /v1/tablesdb/{databaseId}/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete.md new file mode 100644 index 0000000000..bcd4c02663 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/tablesdb/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..92783ce733 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-column.md @@ -0,0 +1,5 @@ +GET /v1/tablesdb/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..0aeaed382d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-index.md @@ -0,0 +1,5 @@ +GET /v1/tablesdb/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..9146d3653d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-row.md @@ -0,0 +1,7 @@ +GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..b8c0668b4e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/get-table.md @@ -0,0 +1,5 @@ +GET /v1/tablesdb/{databaseId}/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/get.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/get.md new file mode 100644 index 0000000000..32ee29126a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/get.md @@ -0,0 +1,5 @@ +GET /v1/tablesdb/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..d687727806 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/increment-row-column.md @@ -0,0 +1,13 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "max": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..ac81b3a157 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-columns.md @@ -0,0 +1,5 @@ +GET /v1/tablesdb/{databaseId}/tables/{tableId}/columns HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..5847bed650 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-indexes.md @@ -0,0 +1,5 @@ +GET /v1/tablesdb/{databaseId}/tables/{tableId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..dcff60e31e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-rows.md @@ -0,0 +1,7 @@ +GET /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..79ee0f6df8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/list-tables.md @@ -0,0 +1,5 @@ +GET /v1/tablesdb/{databaseId}/tables HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/list.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/list.md new file mode 100644 index 0000000000..95cb1bac8d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/list.md @@ -0,0 +1,5 @@ +GET /v1/tablesdb HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..7e1f55b6bb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,12 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": false, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..0063dc1b15 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,12 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..8e7c1ad01f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-email-column.md @@ -0,0 +1,12 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "email@example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..343026a9ef --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-enum-column.md @@ -0,0 +1,13 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "elements": [], + "required": false, + "default": "<DEFAULT>", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..0756262cfd --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-float-column.md @@ -0,0 +1,14 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..252627eb02 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-integer-column.md @@ -0,0 +1,14 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..e43959f511 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-ip-column.md @@ -0,0 +1,12 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..fde5191383 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,11 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/{key}/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "onDelete": "cascade", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-row.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-row.md new file mode 100644 index 0000000000..51f10f7f97 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-row.md @@ -0,0 +1,13 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..2f282d8e13 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-rows.md @@ -0,0 +1,11 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "data": {}, + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..a21b5e7fd1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-string-column.md @@ -0,0 +1,13 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "<DEFAULT>", + "size": 1, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-table.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-table.md new file mode 100644 index 0000000000..e223b0c4ca --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-table.md @@ -0,0 +1,13 @@ +PUT /v1/tablesdb/{databaseId}/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..c5d7001454 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update-url-column.md @@ -0,0 +1,12 @@ +PATCH /v1/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "https://example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/update.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/update.md new file mode 100644 index 0000000000..843387c9da --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/update.md @@ -0,0 +1,11 @@ +PUT /v1/tablesdb/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/upsert-row.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/upsert-row.md new file mode 100644 index 0000000000..edb74043fb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/upsert-row.md @@ -0,0 +1,13 @@ +PUT /v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-rest/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..147e4f66c3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tablesdb/upsert-rows.md @@ -0,0 +1,10 @@ +PUT /v1/tablesdb/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "rows": [] +} diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/decrement-document-attribute.md index 9b5a5f4006..9fd0191a0f 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/decrement-document-attribute.md @@ -5,7 +5,7 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key + .set_session('') # The user session to authenticate with databases = Databases.new(client) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/increment-document-attribute.md index 40d8ba2ab7..3e8bfe0b2a 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/increment-document-attribute.md @@ -5,7 +5,7 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key + .set_session('') # The user session to authenticate with databases = Databases.new(client) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..b99f02afc1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: false, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..bf64312cbf --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..e1eb403c9d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-email-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..f3d35ea49c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-enum-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..9366125038 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-float-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..f1f2ab7262 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-index.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + type: IndexType::KEY, + columns: [], + orders: [], # optional + lengths: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..3a569274cd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-integer-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..056c2fc417 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-ip-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..e73865be07 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,22 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + related_table_id: '<RELATED_TABLE_ID>', + type: RelationshipType::ONETOONE, + two_way: false, # optional + key: '', # optional + two_way_key: '', # optional + on_delete: RelationMutate::CASCADE # 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 new file mode 100644 index 0000000000..02249a8a03 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-row.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables_db = TablesDb.new(client) + +result = tables_db.create_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..b3ece4679d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + rows: [] +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..2824acf71a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-string-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', # optional + array: false, # optional + encrypt: false # 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 new file mode 100644 index 0000000000..c1bf18fcb6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-table.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + row_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..b6e16926d8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create-url-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/create.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create.md new file mode 100644 index 0000000000..bc0b1b35ae --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/create.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.create( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..e4d2fafaa0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables_db = TablesDb.new(client) + +result = tables_db.decrement_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '', + value: null, # optional + min: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..4e161b072c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-column.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.delete_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..46d8b14b3d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.delete_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..39bb574399 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-row.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables_db = TablesDb.new(client) + +result = tables_db.delete_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..3a68fa6264 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.delete_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..c73576cf21 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete-table.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.delete_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete.md new file mode 100644 index 0000000000..eff1b61e93 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.delete( + database_id: '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..7a07b65011 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-column.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.get_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..af4f38b93f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.get_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..04910f45fe --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-row.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables_db = TablesDb.new(client) + +result = tables_db.get_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..2f85cbf9e8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get-table.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.get_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/get.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get.md new file mode 100644 index 0000000000..dbe10327b7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.get( + database_id: '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..d913ecaed4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/increment-row-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables_db = TablesDb.new(client) + +result = tables_db.increment_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '', + value: null, # optional + max: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..84deaf4647 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-columns.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.list_columns( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..0f171d9689 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-indexes.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.list_indexes( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..cfe378f448 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables_db = TablesDb.new(client) + +result = tables_db.list_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..29e3f519a0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list-tables.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.list_tables( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/list.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list.md new file mode 100644 index 0000000000..4f9ec05f82 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..2864d58bf9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: false, + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..96969f40d6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..583c40e7b3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-email-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..1603243081 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-enum-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..5e2a76cf3d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-float-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..cc68bc8980 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-integer-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..b7d7e342c7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-ip-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..6436843417 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + on_delete: RelationMutate::CASCADE, # optional + new_key: '' # 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 new file mode 100644 index 0000000000..eeb4eecf71 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-row.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables_db = TablesDb.new(client) + +result = tables_db.update_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..5084a70b73 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-rows.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + data: {}, # optional + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..8546f091c5 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-string-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, # optional + new_key: '' # 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 new file mode 100644 index 0000000000..a0f32ed59b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-table.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + row_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..1043c74336 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update-url-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/update.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update.md new file mode 100644 index 0000000000..5d11ea89f6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/update.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.update( + database_id: '<DATABASE_ID>', + name: '<NAME>', + 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 new file mode 100644 index 0000000000..281945acdc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-row.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables_db = TablesDb.new(client) + +result = tables_db.upsert_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..48632dc2a1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tablesdb/upsert-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables_db = TablesDb.new(client) + +result = tables_db.upsert_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + rows: [] +) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/decrement-document-attribute.md index 88ba9ae01b..81516fa26a 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/decrement-document-attribute.md @@ -3,7 +3,7 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key + .setSession("") // The user session to authenticate with let databases = Databases(client) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/increment-document-attribute.md index 452b200e34..64ba46b413 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/increment-document-attribute.md @@ -3,7 +3,7 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key + .setSession("") // The user session to authenticate with let databases = Databases(client) diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-boolean-column.md new file mode 100644 index 0000000000..2e25e1bdab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-boolean-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnBoolean = try await tablesDb.createBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-datetime-column.md new file mode 100644 index 0000000000..b60b1dacb2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-datetime-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnDatetime = try await tablesDb.createDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-email-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-email-column.md new file mode 100644 index 0000000000..859fce5667 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-email-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnEmail = try await tablesDb.createEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-enum-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-enum-column.md new file mode 100644 index 0000000000..d19f7244cc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-enum-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnEnum = try await tablesDb.createEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-float-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-float-column.md new file mode 100644 index 0000000000..5a2aee019e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-float-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnFloat = try await tablesDb.createFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-index.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-index.md new file mode 100644 index 0000000000..f01174c3e1 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-index.md @@ -0,0 +1,20 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnIndex = try await tablesDb.createIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: .key, + columns: [], + orders: [], // optional + lengths: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-integer-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-integer-column.md new file mode 100644 index 0000000000..513161722a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-integer-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnInteger = try await tablesDb.createIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-ip-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-ip-column.md new file mode 100644 index 0000000000..2388c895a5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-ip-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnIp = try await tablesDb.createIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-relationship-column.md new file mode 100644 index 0000000000..3dc765a2f3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-relationship-column.md @@ -0,0 +1,21 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnRelationship = try await tablesDb.createRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: .oneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: .cascade // 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 new file mode 100644 index 0000000000..601bd325b3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-row.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tablesDb = TablesDb(client) + +let row = try await tablesDb.createRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-rows.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-rows.md new file mode 100644 index 0000000000..e685ae7d1d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let rowList = try await tablesDb.createRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-string-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-string-column.md new file mode 100644 index 0000000000..c1f308237b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-string-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnString = try await tablesDb.createStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // 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 new file mode 100644 index 0000000000..631afb61aa --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-table.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let table = try await tablesDb.createTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create-url-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-url-column.md new file mode 100644 index 0000000000..b2e991760e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create-url-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnUrl = try await tablesDb.createUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/create.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/create.md new file mode 100644 index 0000000000..2586404fcb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let database = try await tablesDb.create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/decrement-row-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/decrement-row-column.md new file mode 100644 index 0000000000..b7b8ae5d3f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/decrement-row-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tablesDb = TablesDb(client) + +let row = try await tablesDb.decrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + min: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-column.md new file mode 100644 index 0000000000..781b1097cf --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-column.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let result = try await tablesDb.deleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-index.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-index.md new file mode 100644 index 0000000000..8fb2386770 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let result = try await tablesDb.deleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-row.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-row.md new file mode 100644 index 0000000000..e533aa3af7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-row.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tablesDb = TablesDb(client) + +let result = try await tablesDb.deleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-rows.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-rows.md new file mode 100644 index 0000000000..700736975d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let rowList = try await tablesDb.deleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-table.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-table.md new file mode 100644 index 0000000000..2d2df8f185 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete-table.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let result = try await tablesDb.deleteTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/delete.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete.md new file mode 100644 index 0000000000..0c26a0d3c5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let result = try await tablesDb.delete( + databaseId: "<DATABASE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/get-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-column.md new file mode 100644 index 0000000000..21fe88cf50 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-column.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let result = try await tablesDb.getColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/get-index.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-index.md new file mode 100644 index 0000000000..2022d1e1ae --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnIndex = try await tablesDb.getIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/get-row.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-row.md new file mode 100644 index 0000000000..45961f86e9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tablesDb = TablesDb(client) + +let row = try await tablesDb.getRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/get-table.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-table.md new file mode 100644 index 0000000000..391adcd098 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/get-table.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let table = try await tablesDb.getTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/get.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/get.md new file mode 100644 index 0000000000..2442a7d086 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let database = try await tablesDb.get( + databaseId: "<DATABASE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/increment-row-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/increment-row-column.md new file mode 100644 index 0000000000..63054fa55b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/increment-row-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tablesDb = TablesDb(client) + +let row = try await tablesDb.incrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + max: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/list-columns.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/list-columns.md new file mode 100644 index 0000000000..33010e684b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/list-columns.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnList = try await tablesDb.listColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/list-indexes.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/list-indexes.md new file mode 100644 index 0000000000..621ffa1e42 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/list-indexes.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnIndexList = try await tablesDb.listIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/list-rows.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/list-rows.md new file mode 100644 index 0000000000..de9b682456 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/list-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tablesDb = TablesDb(client) + +let rowList = try await tablesDb.listRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/list-tables.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/list-tables.md new file mode 100644 index 0000000000..8fe8d56b6b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/list-tables.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let tableList = try await tablesDb.listTables( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/list.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/list.md new file mode 100644 index 0000000000..cc10b51d17 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let databaseList = try await tablesDb.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-boolean-column.md new file mode 100644 index 0000000000..c3d7e07408 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-boolean-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnBoolean = try await tablesDb.updateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-datetime-column.md new file mode 100644 index 0000000000..a2d71f4232 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-datetime-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnDatetime = try await tablesDb.updateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-email-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-email-column.md new file mode 100644 index 0000000000..d59c83391b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-email-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnEmail = try await tablesDb.updateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-enum-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-enum-column.md new file mode 100644 index 0000000000..5f1b05e411 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-enum-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnEnum = try await tablesDb.updateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-float-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-float-column.md new file mode 100644 index 0000000000..b2459e582d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-float-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnFloat = try await tablesDb.updateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-integer-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-integer-column.md new file mode 100644 index 0000000000..091664ae52 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-integer-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnInteger = try await tablesDb.updateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-ip-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-ip-column.md new file mode 100644 index 0000000000..87f2915ede --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-ip-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnIp = try await tablesDb.updateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-relationship-column.md new file mode 100644 index 0000000000..27e74605cc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-relationship-column.md @@ -0,0 +1,18 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnRelationship = try await tablesDb.updateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: .cascade, // optional + newKey: "" // 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 new file mode 100644 index 0000000000..6e7bd35b9f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-row.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tablesDb = TablesDb(client) + +let row = try await tablesDb.updateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-rows.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-rows.md new file mode 100644 index 0000000000..4d331694b1 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-rows.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let rowList = try await tablesDb.updateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [:], // optional + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-string-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-string-column.md new file mode 100644 index 0000000000..defa48edee --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-string-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnString = try await tablesDb.updateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // 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 new file mode 100644 index 0000000000..348353590a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-table.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let table = try await tablesDb.updateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update-url-column.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-url-column.md new file mode 100644 index 0000000000..e1fe5ce2e8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update-url-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let columnUrl = try await tablesDb.updateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/update.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/update.md new file mode 100644 index 0000000000..041f026d10 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/update.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let database = try await tablesDb.update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + 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 new file mode 100644 index 0000000000..6b1ddaf689 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-row.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tablesDb = TablesDb(client) + +let row = try await tablesDb.upsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-rows.md b/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-rows.md new file mode 100644 index 0000000000..62737e6e9f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tablesdb/upsert-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tablesDb = TablesDb(client) + +let rowList = try await tablesDb.upsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] +) +