diff --git a/src/routes/blog/post/manage-user-permissions-with-labels-and-teams/+page.markdoc b/src/routes/blog/post/manage-user-permissions-with-labels-and-teams/+page.markdoc index 0ed16eca6a..0960a5b5e9 100644 --- a/src/routes/blog/post/manage-user-permissions-with-labels-and-teams/+page.markdoc +++ b/src/routes/blog/post/manage-user-permissions-with-labels-and-teams/+page.markdoc @@ -106,7 +106,7 @@ const client = //... const Teams = new Teams(client); -const promise = Teams.create('[Team_ID]', '[NAME]'); +const promise = Teams.create('', '[NAME]'); ``` ## Labels @@ -122,7 +122,7 @@ const client = //... const users = new sdk.Users(client); -const promise = users.updateLabels('[USER_ID]', ['subscriber']); +const promise = users.updateLabels('', ['subscriber']); ``` ### Resources diff --git a/src/routes/docs/apis/graphql/+page.markdoc b/src/routes/docs/apis/graphql/+page.markdoc index a80bb9acf1..63dcb788d9 100644 --- a/src/routes/docs/apis/graphql/+page.markdoc +++ b/src/routes/docs/apis/graphql/+page.markdoc @@ -234,7 +234,7 @@ import { Client, Graphql } from "appwrite"; const client = new Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint - .setProject('[PROJECT_ID]'); // Your project ID + .setProject(''); // Your project ID const graphql = new Graphql(client); @@ -271,7 +271,7 @@ import 'package:appwrite/appwrite.dart'; final client = Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint - .setProject('[PROJECT_ID]'); // Your project ID + .setProject(''); // Your project ID final graphql = Graphql(client); @@ -309,7 +309,7 @@ import io.appwrite.services.Graphql val client = Client(context) .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("[PROJECT_ID]") // Your project ID + .setProject("") // Your project ID val graphql = Graphql(client) @@ -346,7 +346,7 @@ import Appwrite let client = Client() .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("[PROJECT_ID]") // Your project ID + .setProject("") // Your project ID let graphql = Graphql(client) diff --git a/src/routes/docs/apis/realtime/+page.markdoc b/src/routes/docs/apis/realtime/+page.markdoc index 2498646157..39a4e58b46 100644 --- a/src/routes/docs/apis/realtime/+page.markdoc +++ b/src/routes/docs/apis/realtime/+page.markdoc @@ -16,7 +16,7 @@ import { Client } from "appwrite"; const client = new Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject('[PROJECT_ID]'); + .setProject(''); // Subscribe to files channel client.subscribe('files', response => { @@ -32,7 +32,7 @@ import 'package:appwrite/appwrite.dart'; final client = Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject('[PROJECT_ID]'); + .setProject(''); final realtime = Realtime(client); @@ -53,7 +53,7 @@ import AppwriteModels let client = Client() .setEndpoint("https://cloud.appwrite.io/v1") - .setProject("[PROJECT_ID]") + .setProject("") let realtime = Realtime(client) @@ -72,7 +72,7 @@ import io.appwrite.services.Realtime val client = Client(context) .setEndpoint("https://cloud.appwrite.io/v1") - .setProject("[PROJECT_ID]") + .setProject("") val realtime = Realtime(client) @@ -118,7 +118,7 @@ import { Client } from "appwrite"; const client = new Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject('[PROJECT_ID]'); + .setProject(''); client.subscribe('account', response => { // Callback will be executed on all account events. @@ -131,7 +131,7 @@ import 'package:appwrite/appwrite.dart'; final client = Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject('[PROJECT_ID]'); + .setProject(''); final realtime = Realtime(client); @@ -149,7 +149,7 @@ import AppwriteModels let client = Client() .setEndpoint("https://cloud.appwrite.io/v1") - .setProject("[PROJECT_ID]") + .setProject("") let realtime = Realtime(client) @@ -165,7 +165,7 @@ import io.appwrite.services.Realtime val client = Client(context) .setEndpoint("https://cloud.appwrite.io/v1") - .setProject("[PROJECT_ID]") + .setProject("") val realtime = Realtime(client) @@ -189,7 +189,7 @@ import { Client } from "appwrite"; const client = new Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject('[PROJECT_ID]'); + .setProject(''); client.subscribe(['collections.A.documents.A', 'files'], response => { // Callback will be executed on changes for documents A and all files. @@ -202,7 +202,7 @@ import 'package:appwrite/appwrite.dart'; final client = Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject('[PROJECT_ID]'); + .setProject(''); final realtime = Realtime(client); @@ -220,7 +220,7 @@ import AppwriteModels let client = Client() .setEndpoint("https://cloud.appwrite.io/v1") - .setProject("[PROJECT_ID]") + .setProject("") let realtime = Realtime(client) @@ -236,7 +236,7 @@ import io.appwrite.services.Realtime val client = Client(context) .setEndpoint("https://cloud.appwrite.io/v1") - .setProject("[PROJECT_ID]") + .setProject("") val realtime = Realtime(client) realtime.subscribe("databases.A.collections.A.documents.A", "files") { @@ -257,7 +257,7 @@ import { Client } from "appwrite"; const client = new Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject('[PROJECT_ID]'); + .setProject(''); const unsubscribe = client.subscribe('files', response => { // Callback will be executed on changes for all files. @@ -273,7 +273,7 @@ import 'package:appwrite/appwrite.dart'; final client = Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject('[PROJECT_ID]'); + .setProject(''); final realtime = Realtime(client); @@ -309,7 +309,7 @@ import io.appwrite.services.Realtime val client = Client(context) .setEndpoint("https://cloud.appwrite.io/v1") - .setProject("[PROJECT_ID]") + .setProject("") val realtime = Realtime(client) diff --git a/src/routes/docs/products/auth/email-otp/+page.markdoc b/src/routes/docs/products/auth/email-otp/+page.markdoc index 7d592c29ed..32f5d8ba17 100644 --- a/src/routes/docs/products/auth/email-otp/+page.markdoc +++ b/src/routes/docs/products/auth/email-otp/+page.markdoc @@ -179,7 +179,7 @@ let session = try await account.createSession( ```graphql mutation { - accountcreateSession(userId: "[USER_ID]", secret: "[SECRET]") { + accountcreateSession(userId: "", secret: "[SECRET]") { _id userId provider diff --git a/src/routes/docs/products/auth/labels/+page.markdoc b/src/routes/docs/products/auth/labels/+page.markdoc index f1d99d904f..528dbdaebb 100644 --- a/src/routes/docs/products/auth/labels/+page.markdoc +++ b/src/routes/docs/products/auth/labels/+page.markdoc @@ -18,7 +18,7 @@ const client = new sdk.Client() const users = new sdk.Users(client); const promise = users.updateLabels( - '[USER_ID]', + '', [ 'subscriber' ] ); @@ -44,7 +44,7 @@ $client $users = new Users($client); $result = $users->updateLabels( - '[USER_ID]', + '', [ 'subscriber' ] ); ``` @@ -65,7 +65,7 @@ client = Client() users = Users(client) result = users.update_labels( - '[USER_ID]', + '', [ 'subscriber' ] ); ``` @@ -82,7 +82,7 @@ client = Client.new users = Users.new(client) response = users.update_labels( - user_id: '[USER_ID]', + user_id: '', labels: [ 'subscriber' ] ); ``` @@ -98,7 +98,7 @@ let client = new sdk.Client() let users = new sdk.Users(client); const promise = users.updateLabels( - '[USER_ID]', + '', [ 'subscriber' ] ); @@ -119,7 +119,7 @@ final client = Client() final users = Users(client); final result = await users.updateLabels( - userId: '[USER_ID]', + userId: '', labels: [ 'subscriber' ], ); ``` @@ -136,7 +136,7 @@ val client = Client() val users = Users(client) val response = users.updateLabels( - userId = "[USER_ID]", + userId = "", labels = [ 'subscriber' ] ); ``` @@ -152,7 +152,7 @@ let client = Client() let users = Users(client) let response = try await users.updateLabels( - userId: "[USER_ID]", + userId: "", labels: [ 'subscriber' ] ); ``` @@ -168,7 +168,7 @@ var client = new Client() var users = new Users(client); var response = await users.UpdateLabels( - userId: "[USER_ID]", + userId: "", labels: [ 'subscriber' ] ); ``` diff --git a/src/routes/docs/products/auth/phone-sms/+page.markdoc b/src/routes/docs/products/auth/phone-sms/+page.markdoc index f878610312..d6fb26daa0 100644 --- a/src/routes/docs/products/auth/phone-sms/+page.markdoc +++ b/src/routes/docs/products/auth/phone-sms/+page.markdoc @@ -167,7 +167,7 @@ let session = try await account.createSession( ```graphql mutation { - accountcreateSession(userId: "[USER_ID]", secret: "[SECRET]") { + accountcreateSession(userId: "", secret: "[SECRET]") { _id userId provider diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index 78c79e1392..a2347f4b15 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -35,7 +35,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -const promise = databases.createCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]'); +const promise = databases.createCollection('', '[COLLECTION_ID]', '[NAME]'); promise.then(function (response) { console.log(response); @@ -58,7 +58,7 @@ client ; -let promise = databases.createCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]'); +let promise = databases.createCollection('', '[COLLECTION_ID]', '[NAME]'); promise.then(function (response) { console.log(response); @@ -82,7 +82,7 @@ $client $databases = new Databases($client); -$result = $databases->createCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]'); +$result = $databases->createCollection('', '[COLLECTION_ID]', '[NAME]'); ``` ```python from appwrite.client import Client @@ -98,7 +98,7 @@ client = Client() databases = Databases(client) -result = databases.create_collection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]') +result = databases.create_collection('', '[COLLECTION_ID]', '[NAME]') ``` ```ruby require 'Appwrite' @@ -112,7 +112,7 @@ client = Client.new databases = Databases.new(client) -response = databases.create_collection(database_id: '[DATABASE_ID]', collection_id: '[COLLECTION_ID]', name: '[NAME]') +response = databases.create_collection(database_id: '', collection_id: '[COLLECTION_ID]', name: '[NAME]') puts response.inspect ``` @@ -129,8 +129,8 @@ var client = new Client() var databases = new Databases(client); Collection result = await databases.CreateCollection( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", name: "[NAME]"); ``` ```dart @@ -147,7 +147,7 @@ void main() { // Init SDK ; Future result = databases.createCollection( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', name: '[NAME]', ); @@ -172,8 +172,8 @@ val client = Client(context) val databases = Databases(client) val response = databases.createCollection( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", name = "[NAME]", ) ``` @@ -190,8 +190,8 @@ Client client = new Client() Databases databases = new Databases(client); databases.createCollection( - "[DATABASE_ID]", - "[COLLECTION_ID]", + "", + "", "[NAME]", new CoroutineCallback<>((result, error) -> { if (error != null) { @@ -214,8 +214,8 @@ let client = Client() let databases = Databases(client) let collection = try await databases.createCollection( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", name: "[NAME]" ) ``` diff --git a/src/routes/docs/products/databases/databases/+page.markdoc b/src/routes/docs/products/databases/databases/+page.markdoc index 5431d48029..5402fad39c 100644 --- a/src/routes/docs/products/databases/databases/+page.markdoc +++ b/src/routes/docs/products/databases/databases/+page.markdoc @@ -31,7 +31,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -const promise = databases.create('[DATABASE_ID]', '[NAME]'); +const promise = databases.create('', '[NAME]'); promise.then(function (response) { console.log(response); @@ -54,7 +54,7 @@ client ; -let promise = databases.create('[DATABASE_ID]', '[NAME]'); +let promise = databases.create('', '[NAME]'); promise.then(function (response) { console.log(response); @@ -78,7 +78,7 @@ $client $databases = new Databases($client); -$result = $databases->create('[DATABASE_ID]', '[NAME]'); +$result = $databases->create('', '[NAME]'); ``` ```python from appwrite.client import Client @@ -94,7 +94,7 @@ client = Client() databases = Databases(client) -result = databases.create('[DATABASE_ID]', '[NAME]') +result = databases.create('', '[NAME]') ``` ```ruby require 'Appwrite' @@ -108,7 +108,7 @@ client = Client.new databases = Databases.new(client) -response = databases.create(database_id: '[DATABASE_ID]', name: '[NAME]') +response = databases.create(database_id: '', name: '[NAME]') puts response.inspect ``` @@ -125,7 +125,7 @@ var client = new Client() var databases = new Databases(client); Database result = await databases.Create( - databaseId: "[DATABASE_ID]", + databaseId: "", name: "[NAME]"); ``` ```dart @@ -142,7 +142,7 @@ void main() { // Init SDK ; Future result = databases.create( - databaseId: '[DATABASE_ID]', + databaseId: '', name: '[NAME]', ); @@ -166,7 +166,7 @@ val client = Client(context) val databases = Databases(client) val response = databases.create( - databaseId = "[DATABASE_ID]", + databaseId = "", name = "[NAME]", ) ``` @@ -183,7 +183,7 @@ Client client = new Client() Databases databases = new Databases(client); databases.create( - "[DATABASE_ID]", + "", "[NAME]", new CoroutineCallback<>((result, error) -> { if (error != null) { @@ -206,7 +206,7 @@ let client = Client() let databases = Databases(client) let database = try await databases.create( - databaseId: "[DATABASE_ID]", + databaseId: "", name: "[NAME]" ) ``` diff --git a/src/routes/docs/products/databases/documents/+page.markdoc b/src/routes/docs/products/databases/documents/+page.markdoc index 3c6d2587c6..8b18b60b07 100644 --- a/src/routes/docs/products/databases/documents/+page.markdoc +++ b/src/routes/docs/products/databases/documents/+page.markdoc @@ -25,7 +25,7 @@ const client = new Client() const databases = new Databases(client); const promise = databases.createDocument( - '[DATABASE_ID]', + '', '[COLLECTION_ID]', ID.unique(), {} @@ -49,7 +49,7 @@ void main() async { try { final document = databases.createDocument( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', documentId: ID.unique(), data: {} @@ -72,8 +72,8 @@ suspend fun main() { try { val document = databases.createDocument( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", documentId = ID.unique(), data = mapOf("a" to "b"), ) @@ -95,8 +95,8 @@ func main() async throws { do { let document = try await databases.createDocument( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", documentId: ID.unique(), data: [:] ) @@ -108,8 +108,8 @@ func main() async throws { ```graphql mutation { databasesCreateDocument( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", documentId: "[DOCUMENT_ID]", data: "{}" ) { @@ -154,8 +154,8 @@ const client = new Client() const databases = new Databases(client); let promise = databases.listDocuments( - "[DATABASE_ID]", - "[COLLECTION_ID]", + "", + "", [ Query.equal('title', 'Avatar') ] @@ -179,7 +179,7 @@ void main() async { try { final documents = await databases.listDocuments( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', queries: [ Query.equal('title', 'Avatar') @@ -204,8 +204,8 @@ suspend fun main() { try { val documents = databases.listDocuments( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", queries = listOf( Query.equal("title", "Avatar") ) @@ -228,8 +228,8 @@ func main() async throws { do { let documents = try await databases.listDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", queries: [ Query.equal("title", "Avatar") ] @@ -242,8 +242,8 @@ func main() async throws { ```graphql query { databasesListDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", queries: ["equal(\"title\", [\"Avatar\"])"] ) { total diff --git a/src/routes/docs/products/databases/order/+page.markdoc b/src/routes/docs/products/databases/order/+page.markdoc index 382ea37bb5..c14ec6c095 100644 --- a/src/routes/docs/products/databases/order/+page.markdoc +++ b/src/routes/docs/products/databases/order/+page.markdoc @@ -23,7 +23,7 @@ const client = new Client() const databases = new Databases(client); databases.listDocuments( - '[DATABASE_ID]', + '', '[COLLECTION_ID]', [ Query.orderAsc('title'), @@ -43,7 +43,7 @@ void main() async { try { final documents = await databases.listDocuments( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', queries: [ Query.orderAsc('title') @@ -69,8 +69,8 @@ suspend fun main() { try { val documents = databases.listDocuments( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", queries = [ Query.orderAsc("title") ] @@ -94,8 +94,8 @@ func main() async throws { do { let documents = try await databases.listDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", queries: [ Query.orderAsc("title") ] @@ -109,8 +109,8 @@ func main() async throws { ```graphql query { databasesListDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]" + databaseId: "", + collectionId: "" queries: ["orderAsc(\"title\")"] ) { total @@ -137,7 +137,7 @@ In the example below, the movies returned will be first sorted by `title` in asc // List documents and sort based on multiple attributes databases.listDocuments( - '[DATABASE_ID]', + '', '[COLLECTION_ID]', [ Query.orderAsc('title'), // Order first by title in ascending order @@ -152,7 +152,7 @@ databases.listDocuments( // List documents and sort based on multiple attributes try { final documents = await databases.listDocuments( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', queries: [ Query.orderAsc('title'), // Order by title in ascending order @@ -170,8 +170,8 @@ try { // List documents and sort based on multiple attributes try { val documents = databases.listDocuments( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", queries = [ Query.orderAsc("title"), // Order by title in ascending order Query.orderDesc("year") // Order by year in descending order @@ -188,8 +188,8 @@ try { // List documents and sort based on multiple attributes do { let documents = try await databases.listDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", queries: [ Query.orderAsc("title"), // Order by title in ascending order Query.orderDesc("year") // Order by year in descending order @@ -202,8 +202,8 @@ do { ```graphql query { databasesListDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", queries: ["orderAsc(\"title\")", "orderDesc(\"year\")"] ) { total diff --git a/src/routes/docs/products/databases/pagination/+page.markdoc b/src/routes/docs/products/databases/pagination/+page.markdoc index 54c6e2b79a..53cd6398be 100644 --- a/src/routes/docs/products/databases/pagination/+page.markdoc +++ b/src/routes/docs/products/databases/pagination/+page.markdoc @@ -31,7 +31,7 @@ const databases = new Databases(client); // Page 1 const page1 = await databases.listDocuments( - '[DATABASE_ID]', + '', '[COLLECTION_ID]', [ Query.limit(25), @@ -41,7 +41,7 @@ const page1 = await databases.listDocuments( // Page 2 const page2 = await databases.listDocuments( - '[DATABASE_ID]', + '', '[COLLECTION_ID]', [ Query.limit(25), @@ -60,7 +60,7 @@ void main() async { final databases = Databases(client); final page1 = await databases.listDocuments( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', queries: [ Query.limit(25), @@ -69,7 +69,7 @@ void main() async { ); final page2 = await databases.listDocuments( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', queries: [ Query.limit(25), @@ -91,8 +91,8 @@ suspend fun main() { val databases = Databases(client) val page1 = databases.listDocuments( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", queries = [ Query.limit(25), Query.offset(0) @@ -100,8 +100,8 @@ suspend fun main() { ) val page2 = databases.listDocuments( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", queries = [ Query.limit(25), Query.offset(25) @@ -121,8 +121,8 @@ func main() async throws { let databases = Databases(client) let page1 = try await databases.listDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", queries: [ Query.limit(25), Query.offset(0) @@ -130,8 +130,8 @@ func main() async throws { ) let page2 = try await databases.listDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", queries: [ Query.limit(25), Query.offset(25) @@ -167,7 +167,7 @@ const databases = new Databases(client); // Page 1 const page1 = await databases.listDocuments( - '[DATABASE_ID]', + '', '[COLLECTION_ID]', [ Query.limit(25), @@ -178,7 +178,7 @@ const lastId = page1.documents[page1.documents.length - 1].$id; // Page 2 const page2 = await databases.listDocuments( - '[DATABASE_ID]', + '', '[COLLECTION_ID]', [ Query.limit(25), @@ -198,7 +198,7 @@ void main() async { final databases = Databases(client); final page1 = await databases.listDocuments( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', queries: [ Query.limit(25) @@ -208,7 +208,7 @@ void main() async { final lastId = page1.documents[page1.documents.length - 1].$id; final page2 = await databases.listDocuments( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', queries: [ Query.limit(25), @@ -233,8 +233,8 @@ suspend fun main() { val databases = Databases(client) val page1 = databases.listDocuments( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", queries = [ Query.limit(25) ] @@ -243,8 +243,8 @@ suspend fun main() { val lastId = page1.documents[page1.documents.size - 1].$id val page2 = databases.listDocuments( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", queries = [ Query.limit(25), Query.cursorAfter(lastId) @@ -264,8 +264,8 @@ func main() async throws { let databases = Databases(client) let page1 = try await databases.listDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", queries: [ Query.limit(25) ] @@ -274,8 +274,8 @@ func main() async throws { let lastId = page1.documents[page1.documents.count - 1].$id let page2 = try await databases.listDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", queries: [ Query.limit(25), Query.cursorAfter(lastId) diff --git a/src/routes/docs/products/databases/queries/+page.markdoc b/src/routes/docs/products/databases/queries/+page.markdoc index 9f2a38dbc3..b824cdc127 100644 --- a/src/routes/docs/products/databases/queries/+page.markdoc +++ b/src/routes/docs/products/databases/queries/+page.markdoc @@ -306,7 +306,7 @@ const client = new Client() const databases = new Databases(client); databases.listDocuments( - '[DATABASE_ID]', + '', '[COLLECTION_ID]', [ Query.equal('title', ['Avatar', 'Lord of the Rings']), @@ -326,7 +326,7 @@ void main() async { try { final documents = await databases.listDocuments( - '[DATABASE_ID]', + '', '[COLLECTION_ID]', [ Query.equal('title', ['Avatar', 'Lord of the Rings']), @@ -352,8 +352,8 @@ suspend fun main() { try { val documents = databases.listDocuments( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", queries = listOf( Query.equal("title", listOf("Avatar", "Lord of the Rings")), Query.greaterThan("year", 1999) @@ -377,8 +377,8 @@ func main() async throws { do { let documents = try await databases.listDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", queries: [ Query.equal("title", ["Avatar", "Lord of the Rings"]), Query.greaterThan("year", 1999) @@ -392,8 +392,8 @@ func main() async throws { ```graphql query { databasesListDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]" + databaseId: "", + collectionId: "" queries: ["equal(\"title\", [\"Avatar\", \"Lord of the Rings\"])", "greaterThan(\"year\", 1999)] ) { total diff --git a/src/routes/docs/products/databases/quick-start/+page.markdoc b/src/routes/docs/products/databases/quick-start/+page.markdoc index 3fd76ebe2a..a50f711575 100644 --- a/src/routes/docs/products/databases/quick-start/+page.markdoc +++ b/src/routes/docs/products/databases/quick-start/+page.markdoc @@ -152,8 +152,8 @@ const client = new Client() const databases = new Databases(client); let promise = databases.listDocuments( - "[DATABASE_ID]" - "[COLLECTION_ID]", + "" + "", [ Query.equal('title', 'Hamlet') ] @@ -177,7 +177,7 @@ void main() async { try { final documents = await databases.listDocuments( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', queries: [ Query.equal('title', 'Hamlet') @@ -202,8 +202,8 @@ suspend fun main() { try { val documents = databases.listDocuments( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", queries = listOf( Query.equal("title", "Hamlet") ) @@ -226,8 +226,8 @@ func main() async throws{ do { let documents = try await databases.listDocuments( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", queries: [ Query.equal("title", "Hamlet") ] diff --git a/src/routes/docs/products/functions/development/+page.markdoc b/src/routes/docs/products/functions/development/+page.markdoc index 27a783fa16..c9e3c4df15 100644 --- a/src/routes/docs/products/functions/development/+page.markdoc +++ b/src/routes/docs/products/functions/development/+page.markdoc @@ -1330,7 +1330,7 @@ export default async ({ req, res, log, error }) => { try { await databases.createDocument( - '[DATABASE_ID]', + '', '[COLLECTION_ID]', ID.unique(), {} @@ -1363,7 +1363,7 @@ return function ($context) { try { $databases->createDocument( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', documentId: ID::unique(), data: [] @@ -1395,8 +1395,8 @@ def main(context): try: databases.create_document( - database_id="[DATABASE_ID]", - collection_id="[COLLECTION_ID]", + database_id="", + collection_id="", document_id=ID.unique(), data={} ) @@ -1421,7 +1421,7 @@ def main(context) begin databases.create_document( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', documentId: ID.unique(), data: {} @@ -1447,8 +1447,8 @@ export default function ({req, res, error}: any){ try { databases.createDocument( - "[DATABASE_ID]", - "[COLLECTION_ID]", + "", + "", ID.unique(), {} ); @@ -1475,7 +1475,7 @@ Future main(final context) async { try { await databases.createDocument( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', documentId: ID.unique(), data: {} @@ -1503,8 +1503,8 @@ func main(context: RuntimeContext) async throws -> RuntimeOutput { do { try await databases.createDocument( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", documentId: ID.unique(), data: [:] ) @@ -1536,8 +1536,8 @@ namespace DotNetRuntime try { await databases.CreateDocument( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", documentId: ID.Unique(), data: new Dictionary()); } catch (Exception e) { @@ -1571,8 +1571,8 @@ class Main { try { databases.createDocument( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", documentId = ID.unique() data = mapOf() ) @@ -1604,8 +1604,8 @@ public class Main { try { databases.createDocument( - "[DATABASE_ID]", - "[COLLECTION_ID]", + "", + "", ID.unique(), new HashMap<>() ); @@ -1647,7 +1647,7 @@ export default async ({ req, res, log }) => { try { await databases.createDocument( - '[DATABASE_ID]', + '', '[COLLECTION_ID]', ID.unique(), {} @@ -1685,7 +1685,7 @@ return function ($context) { try { $databases->createDocument( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', documentId: ID::unique(), data: [] @@ -1721,8 +1721,8 @@ def main(context): try: databases.create_document( - database_id="[DATABASE_ID]", - collection_id="[COLLECTION_ID]", + database_id="", + collection_id="", document_id=ID.unique(), data={} ) @@ -1751,7 +1751,7 @@ def main(context) databases = Appwrite::Databases.new(client) begin - databases.create_document('[DATABASE_ID]', '[COLLECTION_ID]', Appwrite::ID.unique(), {}) + databases.create_document('', '[COLLECTION_ID]', Appwrite::ID.unique(), {}) rescue Appwrite::Exception => e context.error("Failed to create document: " + e.message) return context.response.send("Failed to create document") @@ -1778,8 +1778,8 @@ export default function ({req, res, error}: any){ try { databases.createDocument( - "[DATABASE_ID]", - "[COLLECTION_ID]", + "", + "", ID.unique(), {} ); @@ -1811,7 +1811,7 @@ Future main(final context) async { try { await databases.createDocument( - databaseId: '[DATABASE_ID]', + databaseId: '', collectionId: '[COLLECTION_ID]', documentId: ID.unique(), data: {} @@ -1844,8 +1844,8 @@ func main(context: RuntimeContext) async throws -> RuntimeOutput { do { try await databases.createDocument( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", documentId: ID.unique() data: [:] ) @@ -1882,8 +1882,8 @@ namespace DotNetRuntime try { await databases.CreateDocument( - databaseId: "[DATABASE_ID]", - collectionId: "[COLLECTION_ID]", + databaseId: "", + collectionId: "", documentId: ID.Unique(), data: new Dictionary()); } catch (Exception e) { @@ -1922,8 +1922,8 @@ class Main { try { databases.createDocument( - databaseId = "[DATABASE_ID]", - collectionId = "[COLLECTION_ID]", + databaseId = "", + collectionId = "", documentId = ID.unique(), data = mapOf() ) @@ -1960,8 +1960,8 @@ public class Main { try { databases.createDocument( - "[DATABASE_ID]", - "[COLLECTION_ID]", + "", + "", ID.unique(), new HashMap<>() ); diff --git a/src/routes/docs/products/functions/examples/+page.markdoc b/src/routes/docs/products/functions/examples/+page.markdoc index 508a302927..2e92e486d4 100644 --- a/src/routes/docs/products/functions/examples/+page.markdoc +++ b/src/routes/docs/products/functions/examples/+page.markdoc @@ -552,7 +552,7 @@ export default async function ({ req, res }) { .setKey(process.env.APPWRITE_API_KEY); const databases = new Databases(client); - const document = await databases.createDocument('[DATABASE_ID]', '[MESSAGES_COLLECTION_ID]', ID.unique(), message); + const document = await databases.createDocument('', '[MESSAGES_COLLECTION_ID]', ID.unique(), message); return res.send("Message sent"); } @@ -606,7 +606,7 @@ def main(context): ) databases = Databases(client) - document = databases.create_document('[DATABASE_ID]', '[MESSAGES_COLLECTION_ID]', ID.unique(), message) + document = databases.create_document('', '[MESSAGES_COLLECTION_ID]', ID.unique(), message) return context.res.send("Message sent") @@ -661,7 +661,7 @@ return function ($context) { ->setKey(getenv('APPWRITE_API_KEY')); $databases = new Databases($client); - $document = $databases->createDocument('[DATABASE_ID]', '[MESSAGES_COLLECTION_ID]', ID::unique(), $message); + $document = $databases->createDocument('', '[MESSAGES_COLLECTION_ID]', ID::unique(), $message); return $context->res->send("Message sent"); } @@ -711,7 +711,7 @@ def main(context) .set_key(ENV['APPWRITE_API_KEY']) databases = Appwrite::Database.new(client) - document = databases.create_document('[DATABASE_ID]', '[MESSAGES_COLLECTION_ID]', ID.unique(), message) + document = databases.create_document('', '[MESSAGES_COLLECTION_ID]', ID.unique(), message) return context.res.send("Message sent") end @@ -761,7 +761,7 @@ Future main(final context) async { .setKey(Platform.environment['APPWRITE_API_KEY']); final databases = Database(client); - final document = await databases.createDocument('[DATABASE_ID]', '[MESSAGES_COLLECTION_ID]', ID.unique(), message); + final document = await databases.createDocument('', '[MESSAGES_COLLECTION_ID]', ID.unique(), message); return context.res.send("Message sent"); } diff --git a/src/routes/docs/products/messaging/providers/apns/+page.markdoc b/src/routes/docs/products/messaging/providers/apns/+page.markdoc index c04df63326..e1804e7082 100644 --- a/src/routes/docs/products/messaging/providers/apns/+page.markdoc +++ b/src/routes/docs/products/messaging/providers/apns/+page.markdoc @@ -12,7 +12,12 @@ APNs will save the last [N] messages for [M] days and attempt delivery as soon a {% section #add-provider step=1 title="Add provider" %} To add APNs as a provider, navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **Push notification**. -[SCREENSHOT] +{% only_dark %} +![Add a FCM provider](/images/docs/messaging/providers/apns/dark/provider.png) +{% /only_dark %} +{% only_light %} +![Add a FCM provider](/images/docs/messaging/providers/apns/provider.png) +{% /only_light %} Give your provider a name > choose **APNS** > click **Save and continue**. The provider will be saved to your project, but not enabled until you complete its configuration. @@ -22,8 +27,6 @@ The provider will be saved to your project, but not enabled until you complete i In the **Configure** step, you will need to provide details form your Apple developer account to connect your Appwrite project with your Apple developer account. -[SCREENSHOT] - You will need to provide the following information from the **Apple Developer Member Center**. {% table %} @@ -65,7 +68,7 @@ To send a test message, navigate to **Messaging** > **Messages** > {% icon icon= Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. -Verify that you can receive the message in your inbox. If not +Verify that you can receive the message in your inbox. If not, check for logs in the Appwrite Console or in your provider's logs. {% /tabsitem %} {% tabsitem #server-sdk title="Server SDK" %} diff --git a/src/routes/docs/products/messaging/providers/fcm/+page.markdoc b/src/routes/docs/products/messaging/providers/fcm/+page.markdoc index 0dc07d6885..8847592109 100644 --- a/src/routes/docs/products/messaging/providers/fcm/+page.markdoc +++ b/src/routes/docs/products/messaging/providers/fcm/+page.markdoc @@ -11,7 +11,12 @@ Before you can deliver messages, you must connect to a messaging provider. {% section #add-provider step=1 title="Add provider" %} To add FCM as a provider, navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **Push notification**. -[SCREENSHOT] +{% only_dark %} +![Add a FCM provider](/images/docs/messaging/providers/fcm/dark/provider.png) +{% /only_dark %} +{% only_light %} +![Add a FCM provider](/images/docs/messaging/providers/fcm/provider.png) +{% /only_light %} Give your provider a name > choose **FCM** > click **Save and continue**. The provider will be saved to your project, but not enabled until you complete its configuration. @@ -20,8 +25,6 @@ The provider will be saved to your project, but not enabled until you complete i In the **Configure** step, you will need to provide details form your Firebase console to connect your Appwrite project. -[SCREENSHOT] - You will need to provide the following information from the **Firebase console**. {% info title="Enable FCM" %} @@ -86,7 +89,7 @@ To send a test message, navigate to **Messaging** > **Messages** > {% icon icon= Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. -Verify that you can receive the message in your inbox. If not +Verify that you can receive the message in your inbox. If not, check for logs in the Appwrite Console or in your provider's logs. {% /tabsitem %} {% tabsitem #server-sdk title="Server SDK" %} diff --git a/src/routes/docs/products/messaging/providers/mailgun/+page.markdoc b/src/routes/docs/products/messaging/providers/mailgun/+page.markdoc index 9e0fd92568..2e80f5bab0 100644 --- a/src/routes/docs/products/messaging/providers/mailgun/+page.markdoc +++ b/src/routes/docs/products/messaging/providers/mailgun/+page.markdoc @@ -32,8 +32,6 @@ In the **Configure** step, you will need to provide details form your Mailgun da {% only_light %} ![Configure SMTP provider](/images/docs/messaging/providers/mailgun/Configure-mailgun.png) {% /only_light %} -You will need to provide the following information from your **Sendgrid dashboard**. - You will need to provide the following information from your **Mailgun dashboard**. @@ -52,16 +50,16 @@ Follow [Mailgun's instructions](https://help.mailgun.com/hc/en-us/articles/36002 * Enable the EU region setting if your domain is within the European Union. --- * Sender email -* [TODO] +* The provider sends emails from this sender email. The sender email needs to be an email under the configured domain. --- * Sender name -* [TODO] +* The sender name that appears in the emails sent from this provider. --- * Reply-to email -* [TODO] +* The reply-to email that appears in the emails sent from this provider. The reply-to email needs to be an email under the configured domain. --- * Reply-to name -* [TODO] +* The reply-to name that appears in the emails sent from this provider. {% /table %} After adding the following details, click **Save and continue** to enable the provider. @@ -73,35 +71,220 @@ make sure you've configured [a topic](/docs/products/messaging/topic) and [a tar {% tabs %} {% tabsitem #console title="Console" %} To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **Email**. -[SCREENSHOT] +{% only_dark %} +![Create email message](/images/docs/messaging/messages/dark/create-email-message.png) +{% /only_dark %} +{% only_light %} +![Create email message](/images/docs/messaging/messages/create-email-message.png) +{% /only_light %} Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. -Verify that you can receive the message in your inbox. If not +Verify that you can receive the message in your inbox. If not, check for logs in the Appwrite Console or in your provider's logs. {% /tabsitem %} {% tabsitem #server-sdk title="Server SDK" %} To send a message programmatically, use an [Appwrite Server SDK](/docs/sdks#server). {% multicode %} ```js +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; + +const promise = messaging.createEmail('', '', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); ``` ```deno +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; + +let promise = messaging.createEmail('', '', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); ``` ```php +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey('') // Your secret API key +; + +$messaging = new Messaging($client); + +$result = $messaging->createEmail('', '', ''); ``` ```python +from appwrite.client import Client + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key +) + +messaging = Messaging(client) + +result = messaging.create_email('', '', '') ``` ```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +messaging = Messaging.new(client) + +response = messaging.create_email(message_id: '', subject: '', content: '') + +puts response.inspect ``` ```csharp +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; +using Appwrite.Enums; +using Appwrite.Enums; +using Appwrite.Enums; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +var messaging = new Messaging(client); + +Message result = await messaging.CreateEmail( + messageId: "", + subject: "", + content: ""); ``` ```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Messaging messaging = Messaging(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key + ; + + Future result = messaging.createEmail( + messageId:'' , + subject:'' , + content:'' , + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} ``` ```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createEmail( + messageId = "", + subject = "", + content = "", +) ``` ```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createEmail( + "", + "", + "", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); ``` ```swift +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.createEmail( + messageId: "", + subject: "", + content: "" +) ``` {% /multicode %} {% /tabsitem %} @@ -111,5 +294,316 @@ You can follow the [Send push notifications](TODO) journey to send your first pu {% /section %} {% section #manage-provider step=4 title="Manage provider" %} -[TODO: How to update and delete provider.] +{% tabs %} +{% tabsitem #console title="Console" %} +You can update or delete a provider in the Appwrite Console. + +Navigate to **Messaging** > **Providers** > click your provider. +In the settings, you can update a provider's configuration or delete the provider. +{% /tabsitem %} + +{% tabsitem #server-sdk title="Server SDK" %} +To update or delete providers programmatically, use an [Appwrite Server SDK](/docs/sdks#server). +{% multicode %} +```js +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; + +// update provider +messaging.updateSendgridProvider( + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', +).then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); + +// delete provider +messaging.deleteProvider('') +.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` +```deno +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let messaging = new sdk.Messaging(client); + +// update provider +messaging.updateSendgridProvider( + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', +).then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); + +// delete provider +messaging.deleteProvider('') +.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` +```php +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey('') // Your secret API key +; + +$messaging = new Messaging($client); + +$result = $messaging->updateSendgridProvider( + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', +); +``` +```python +from appwrite.client import Client + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key +) + +messaging = Messaging(client) + +result = messaging.update_sendgrid_provider( + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', +) +``` +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +messaging = Messaging.new(client) + +response = messaging.update_sendgrid_provider( + provider_id: "", + name: "", + api_key: "", + domain: "", + isEuRegion: "", + from_name: "", + from_email: "", + reply_to_name: "", + reply_to_email: "", + enabled: "", +) + +puts response.inspect +``` +```csharp +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; +using Appwrite.Enums; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +var messaging = new Messaging(client); + +Provider result = await messaging.UpdateSendgridProvider( + providerId: "", + name: "", + apiKey: "", + domain: "", + isEuRegion: "", + fromName: "", + fromEmail: "", + replyToName: "", + replyToEmail: "", + enabled: "", +); +``` +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Messaging messaging = Messaging(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key + ; + + Future result = messaging.updateSendgridProvider( + providerId: "", + name: "", + apiKey: "", + domain: "", + isEuRegion: "", + fromName: "", + fromEmail: "", + replyToName: "", + replyToEmail: "", + enabled: "", + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} +``` +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSendgridProvider( + providerId = "", + name = "", + apiKey = "", + domain = "", + isEuRegion = "", + fromName = "", + fromEmail = "", + replyToName = "", + replyToEmail = "", + enabled = "", +) + +``` +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSendgridProvider( + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); +``` +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateSendgridProvider( + providerId: "", + name: "", + apiKey: "", + domain: "", + isEuRegion: "", + fromName: "", + fromEmail: "", + replyToName: "", + replyToEmail: "", + enabled: "", +) +``` +{% /multicode %} +{% /tabsitem %} +{% /tabs %} {% /section %} diff --git a/src/routes/docs/products/messaging/providers/msg91/+page.markdoc b/src/routes/docs/products/messaging/providers/msg91/+page.markdoc index b0711b98cc..429193ea94 100644 --- a/src/routes/docs/products/messaging/providers/msg91/+page.markdoc +++ b/src/routes/docs/products/messaging/providers/msg91/+page.markdoc @@ -12,7 +12,12 @@ You can send SMS messages for purposes like reminders, promotions, announcements {% section #add-provider step=1 title="Add provider" %} To add MSG91 as a provider, navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **SMS**. -[SCREENSHOT] +{% only_dark %} +![Add a MSG91 provider](/images/docs/messaging/providers/msg91/dark/provider.png) +{% /only_dark %} +{% only_light %} +![Add a MSG91 provider](/images/docs/messaging/providers/msg91/provider.png) +{% /only_light %} Give your provider a name > choose **MSG91** > click **Save and continue**. The provider will be saved to your project, but not enabled until you complete its configuration. @@ -21,8 +26,6 @@ The provider will be saved to your project, but not enabled until you complete i In the **Configure** step, you will need to provide details form your MSG91 dashboard to connect your Appwrite project. -[SCREENSHOT] - You will need to provide the following information from your **MSG91 dashboard**. {% table %} @@ -30,10 +33,10 @@ You will need to provide the following information from your **MSG91 dashboard** * --- * Auth key -* Click to open the Username dropdown -> Authkey -> Verify your mobile number -> Create Authkey. +* Click to open the Username dropdown > **Authkey** > **Verify your mobile number** > **Create Authkey**. --- * Sender ID -* Head to MSG91 dashboard -> SMS -> Sender ID -> Create sender ID. +* Head to MSG91 dashboard > **SMS** > **Sender ID** > **Create sender ID**. --- * Sender number * [TODO] @@ -85,6 +88,74 @@ To send a message programmatically, use an [Appwrite Server SDK](/docs/sdks#serv You can follow the [Send push notifications](TODO) journey to send your first push notification and test your provider. {% /section %} + {% section #manage-provider step=4 title="Manage provider" %} -[TODO: How to update and delete provider.] -{% /section %} +{% tabs %} +{% tabsitem #console title="Console" %} +You can update or delete a provider in the Appwrite Console. + +Navigate to **Messaging** > **Providers** > click your provider. +In the settings, you can update a provider's configuration or delete the provider. +{% /tabsitem %} + +{% tabsitem #server-sdk title="Server SDK" %} +To update or delete providers programmatically, use an [Appwrite Server SDK](/docs/sdks#server). +{% multicode %} +```js +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +// update provider +messaging.updateMsg91Provider( + '', + '', + '', + '', + '', + '' +).then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); + +// delete provider +messaging.deleteProvider('[PROVIDER_ID]') +.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` +```deno +``` +```php +``` +```python +``` +```ruby +``` +```csharp +``` +```dart +``` +```kotlin +``` +```java +``` +```swift +``` +{% /multicode %} +{% /tabsitem %} +{% /tabs %} +{% /section %} \ No newline at end of file diff --git a/src/routes/docs/products/messaging/providers/sendgrid/+page.markdoc b/src/routes/docs/products/messaging/providers/sendgrid/+page.markdoc index eef91bf110..0c83676a6a 100644 --- a/src/routes/docs/products/messaging/providers/sendgrid/+page.markdoc +++ b/src/routes/docs/products/messaging/providers/sendgrid/+page.markdoc @@ -46,16 +46,16 @@ You will need to provide the following information from your **Sendgrid dashboar Follow [Mailgun's instructions](https://help.mailgun.com/hc/en-us/articles/360026833053-Domain-Verification-Walkthrough) to verify the domain name. --- * Sender email -* [TODO] +* The provider sends emails from this sender email. The sender email needs to be an email under the configured domain. --- * Sender name -* [TODO] +* The sender name that appears in the emails sent from this provider. --- * Reply-to email -* [TODO] +* The reply-to email that appears in the emails sent from this provider. The reply-to email needs to be an email under the configured domain. --- * Reply-to name -* [TODO] +* The reply-to name that appears in the emails sent from this provider. {% /table %} After adding the following details, click **Save and continue** to enable the provider. @@ -67,43 +67,530 @@ make sure you've configured [a topic](/docs/products/messaging/topic) and [a tar {% tabs %} {% tabsitem #console title="Console" %} To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **Email**. -[SCREENSHOT] +{% only_dark %} +![Create email message](/images/docs/messaging/messages/dark/create-email-message.png) +{% /only_dark %} +{% only_light %} +![Create email message](/images/docs/messaging/messages/create-email-message.png) +{% /only_light %} Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. -Verify that you can receive the message in your inbox. If not +Verify that you can receive the message in your inbox. If not, check for logs in the Appwrite Console or in your provider's logs. {% /tabsitem %} {% tabsitem #server-sdk title="Server SDK" %} To send a message programmatically, use an [Appwrite Server SDK](/docs/sdks#server). {% multicode %} ```js +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; + +const promise = messaging.createEmail('', '', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); ``` ```deno +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; + + +let promise = messaging.createEmail('', '', ''); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); ``` ```php +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey('') // Your secret API key +; + +$messaging = new Messaging($client); + +$result = $messaging->createEmail('', '', ''); ``` ```python +from appwrite.client import Client + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key +) + +messaging = Messaging(client) + +result = messaging.create_email('', '', '') ``` ```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +messaging = Messaging.new(client) + +response = messaging.create_email(message_id: '', subject: '', content: '') + +puts response.inspect ``` ```csharp +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; +using Appwrite.Enums; +using Appwrite.Enums; +using Appwrite.Enums; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +var messaging = new Messaging(client); + +Message result = await messaging.CreateEmail( + messageId: "", + subject: "", + content: ""); ``` ```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Messaging messaging = Messaging(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key + ; + + Future result = messaging.createEmail( + messageId:'' , + subject:'' , + content:'' , + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} ``` ```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createEmail( + messageId = "", + subject = "", + content = "", +) ``` ```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createEmail( + "", + "", + "", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); ``` ```swift +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.createEmail( + messageId: "", + subject: "", + content: "" +) ``` {% /multicode %} {% /tabsitem %} {% /tabs %} -You can follow the [Send push notifications](TODO) journey to send your first push notification and test your provider. +You can follow the [Send email messages](/docs/products/messaging/send-email-messages) journey to send your first push notification and test your provider. {% /section %} {% section #manage-provider step=4 title="Manage provider" %} -[TODO: How to update and delete provider.] -{% /section %} +{% tabs %} +{% tabsitem #console title="Console" %} +You can update or delete a provider in the Appwrite Console. + +Navigate to **Messaging** > **Providers** > click your provider. +In the settings, you can update a provider's configuration or delete the provider. +{% /tabsitem %} + +{% tabsitem #server-sdk title="Server SDK" %} +To update or delete providers programmatically, use an [Appwrite Server SDK](/docs/sdks#server). +{% multicode %} +```js +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; + +// update provider +messaging.updateSendgridProvider( + '', + '', + '', + '', + '', + '', + '', + '', + '', +).then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); + +// delete provider +messaging.deleteProvider('') +.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` +```deno +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let messaging = new sdk.Messaging(client); + +// update provider +messaging.updateSendgridProvider( + '', + '', + '', + '', + '', + '', + '', + '', + '', +).then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); + +// delete provider +messaging.deleteProvider('') +.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` +```php +setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey('') // Your secret API key +; + +$messaging = new Messaging($client); + +$result = $messaging->updateSendgridProvider( + '', + '', + '', + '', + '', + '', + '', + '', + '', +); +``` +```python +from appwrite.client import Client + +client = Client() + +(client + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key +) + +messaging = Messaging(client) + +result = messaging.update_sendgrid_provider( + '', + '', + '', + '', + '', + '', + '', + '', + '', +) +``` +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +messaging = Messaging.new(client) + +response = messaging.update_sendgrid_provider( + provider_id: "", + name: "", + api_key: "", + domain: "", + from_name: "", + from_email: "", + reply_to_name: "", + reply_to_email: "", + enabled: "", +) + +puts response.inspect +``` +```csharp +using Appwrite; +using Appwrite.Services; +using Appwrite.Models; +using Appwrite.Enums; + +var client = new Client() + .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +var messaging = new Messaging(client); + +Provider result = await messaging.UpdateSendgridProvider( + providerId: "", + name: "", + apiKey: "", + domain: "", + fromName: "", + fromEmail: "", + replyToName: "", + replyToEmail: "", + enabled: "", +); +``` +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Messaging messaging = Messaging(client); + + client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key + ; + + Future result = messaging.updateSendgridProvider( + providerId: "", + name: "", + apiKey: "", + domain: "", + fromName: "", + fromEmail: "", + replyToName: "", + replyToEmail: "", + enabled: "", + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} +``` +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSendgridProvider( + providerId = "", + name = "", + apiKey = "", + domain = "", + fromName = "", + fromEmail = "", + replyToName = "", + replyToEmail = "", + enabled = "", +) + +``` +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSendgridProvider( + "", + "", + "", + "", + "", + "", + "", + "", + "", + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); +``` +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateSendgridProvider( + providerId: "", + name: "", + apiKey: "", + domain: "", + fromName: "", + fromEmail: "", + replyToName: "", + replyToEmail: "", + enabled: "", +) +``` +{% /multicode %} +{% /tabsitem %} +{% /tabs %} +{% /section %} \ No newline at end of file diff --git a/src/routes/docs/products/messaging/providers/telesign/+page.markdoc b/src/routes/docs/products/messaging/providers/telesign/+page.markdoc index facc241ffa..636edc5b77 100644 --- a/src/routes/docs/products/messaging/providers/telesign/+page.markdoc +++ b/src/routes/docs/products/messaging/providers/telesign/+page.markdoc @@ -12,7 +12,12 @@ You can send SMS messages for purposes like reminders, promotions, announcements {% section #add-provider step=1 title="Add provider" %} To add Telesign as a provider, navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **SMS**. -[SCREENSHOT] +{% only_dark %} +![Add a Telesign provider](/images/docs/messaging/providers/telesign/dark/provider.png) +{% /only_dark %} +{% only_light %} +![Add a Telesign provider](/images/docs/messaging/providers/telesign/provider.png) +{% /only_light %} Give your provider a name > choose **Telesign** > click **Save and continue**. The provider will be saved to your project, but not enabled until you complete its configuration. @@ -21,8 +26,6 @@ The provider will be saved to your project, but not enabled until you complete i In the **Configure** step, you will need to provide details form your Telesign dashboard to connect your Appwrite project. -[SCREENSHOT] - You will need to provide the following information from your **Telesign dashboard**. {% table %} @@ -52,7 +55,7 @@ To send a test message, navigate to **Messaging** > **Messages** > {% icon icon= Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. -Verify that you can receive the message in your inbox. If not +Verify that you can receive the message in your inbox. If not, check for logs in the Appwrite Console or in your provider's logs. {% /tabsitem %} {% tabsitem #server-sdk title="Server SDK" %} @@ -86,5 +89,72 @@ You can follow the [Send push notifications](TODO) journey to send your first pu {% /section %} {% section #manage-provider step=4 title="Manage provider" %} -[TODO: How to update and delete provider.] +{% tabs %} +{% tabsitem #console title="Console" %} +You can update or delete a provider in the Appwrite Console. + +Navigate to **Messaging** > **Providers** > click your provider. +In the settings, you can update a provider's configuration or delete the provider. +{% /tabsitem %} + +{% tabsitem #server-sdk title="Server SDK" %} +To update or delete providers programmatically, use an [Appwrite Server SDK](/docs/sdks#server). +{% multicode %} +```js +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +// update provider +messaging.updateTelesignProvider( + '', + '', + '', + '', + '', + '' +).then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); + +// delete provider +messaging.deleteProvider('[PROVIDER_ID]') +.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` +```deno +``` +```php +``` +```python +``` +```ruby +``` +```csharp +``` +```dart +``` +```kotlin +``` +```java +``` +```swift +``` +{% /multicode %} +{% /tabsitem %} +{% /tabs %} {% /section %} diff --git a/src/routes/docs/products/messaging/providers/textmagic/+page.markdoc b/src/routes/docs/products/messaging/providers/textmagic/+page.markdoc index 07cc419ea2..b9c8c75950 100644 --- a/src/routes/docs/products/messaging/providers/textmagic/+page.markdoc +++ b/src/routes/docs/products/messaging/providers/textmagic/+page.markdoc @@ -1,29 +1,32 @@ --- layout: article -title: Text Magic -description: Send SMS messages to your Appwrite users using Text Magic and Appwrite Messaging. +title: TextMagic +description: Send SMS messages to your Appwrite users using TextMagic and Appwrite Messaging. back: /docs/products/messaging/providers --- -Text Magic lets you send customized SMS messages to your users. +TextMagic lets you send customized SMS messages to your users. These SMS messages can be sent immediately or scheduled. You can send SMS messages for purposes like reminders, promotions, announcements, and even custom authentication flows. {% section #add-provider step=1 title="Add provider" %} -To add Text Magic as a provider, navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **SMS**. -[SCREENSHOT] +To add TextMagic as a provider, navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **SMS**. +{% only_dark %} +![Add a Textmagic provider](/images/docs/messaging/providers/textmagic/dark/provider.png) +{% /only_dark %} +{% only_light %} +![Add a Textmagic provider](/images/docs/messaging/providers/textmagic/provider.png) +{% /only_light %} -Give your provider a name > choose **Text Magic** > click **Save and continue**. +Give your provider a name > choose **TextMagic** > click **Save and continue**. The provider will be saved to your project, but not enabled until you complete its configuration. {% /section %} {% section #configure-provider step=2 title="Configure provider" %} -In the **Configure** step, you will need to provide details form your Text Magic dashboard to connect your Appwrite project. - -[SCREENSHOT] +In the **Configure** step, you will need to provide details form your TextMagic dashboard to connect your Appwrite project. -You will need to provide the following information from your **Text Magic dashboard**. +You will need to provide the following information from your **TextMagic dashboard**. {% table %} * Field name @@ -52,7 +55,7 @@ To send a test message, navigate to **Messaging** > **Messages** > {% icon icon= Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. -Verify that you can receive the message in your inbox. If not +Verify that you can receive the message in your inbox. If not, check for logs in the Appwrite Console or in your provider's logs. {% /tabsitem %} {% tabsitem #server-sdk title="Server SDK" %} @@ -86,5 +89,72 @@ You can follow the [Send push notifications](TODO) journey to send your first pu {% /section %} {% section #manage-provider step=4 title="Manage provider" %} -[TODO: How to update and delete provider.] +{% tabs %} +{% tabsitem #console title="Console" %} +You can update or delete a provider in the Appwrite Console. + +Navigate to **Messaging** > **Providers** > click your provider. +In the settings, you can update a provider's configuration or delete the provider. +{% /tabsitem %} + +{% tabsitem #server-sdk title="Server SDK" %} +To update or delete providers programmatically, use an [Appwrite Server SDK](/docs/sdks#server). +{% multicode %} +```js +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +// update provider +messaging.updateTextmagicProvider( + '', + '', + '', + '', + '', + '' +).then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); + +// delete provider +messaging.deleteProvider('[PROVIDER_ID]') +.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` +```deno +``` +```php +``` +```python +``` +```ruby +``` +```csharp +``` +```dart +``` +```kotlin +``` +```java +``` +```swift +``` +{% /multicode %} +{% /tabsitem %} +{% /tabs %} {% /section %} diff --git a/src/routes/docs/products/messaging/providers/twilio/+page.markdoc b/src/routes/docs/products/messaging/providers/twilio/+page.markdoc index 10f939a404..6380a02c74 100644 --- a/src/routes/docs/products/messaging/providers/twilio/+page.markdoc +++ b/src/routes/docs/products/messaging/providers/twilio/+page.markdoc @@ -12,7 +12,12 @@ You can send SMS messages for purposes like reminders, promotions, announcements {% section #add-provider step=1 title="Add provider" %} To add Twilio as a provider, navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **SMS**. -[SCREENSHOT] +{% only_dark %} +![Add a Twilio provider](/images/docs/messaging/providers/twilio/dark/provider.png) +{% /only_dark %} +{% only_light %} +![Add a Twilio provider](/images/docs/messaging/providers/twilio/provider.png) +{% /only_light %} Give your provider a name > choose **Twilio** > click **Save and continue**. The provider will be saved to your project, but not enabled until you complete its configuration. @@ -21,8 +26,6 @@ The provider will be saved to your project, but not enabled until you complete i In the **Configure** step, you will need to provide details form your Twilio dashboard to connect your Appwrite project. -[SCREENSHOT] - You will need to provide the following information from your **Twilio dashboard**. {% table %} @@ -30,10 +33,10 @@ You will need to provide the following information from your **Twilio dashboard* * --- * Account SID -* Head to Twilio console -> **Account info** -> **Account SID**. +* Head to Twilio console > **Account info** > **Account SID**. --- * Auth token -* Head to Twilio console -> **Account info** -> **Auth Token**. +* Head to Twilio console > **Account info** > **Auth Token**. --- * Sender number * You can access numbers by navigating to your Twilio console > **Develop** > **Phone Numbers** > **Manage** > **Active Numbers**. @@ -48,17 +51,44 @@ make sure you've configured [a topic](/docs/products/messaging/topic) and [a tar {% tabs %} {% tabsitem #console title="Console" %} To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **SMS**. -[SCREENSHOT] +{% only_dark %} +![Create an sms message](/images/docs/messaging/messages/dark/create-sms-message.png) +{% /only_dark %} +{% only_light %} +![Create an sms message](/images/docs/messaging/messages/create-sms-message.png) +{% /only_light %} Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. -Verify that you can receive the message in your inbox. If not +Verify that you can receive the message in your inbox. If not, check for logs in the Appwrite Console or in your provider's logs. {% /tabsitem %} {% tabsitem #server-sdk title="Server SDK" %} To send a message programmatically, use an [Appwrite Server SDK](/docs/sdks#server). {% multicode %} ```js +import { Messaging, Client, ID } from "node-appwrite"; + +// Init SDK +const client = new Client(); + +const messaging = new Messaging(client); + +client + .setEndpoint('https://qa.appwrite.org/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; + +messaging.createSMS( + ID.unique(), // SMS ID, + 'Hello world!', // Message content + ['65c2592cb669ff954d94'], // List of topic IDs +).then(response => { + console.log('SMS message created successfully:', response); +}).catch(error => { + console.error('Error creating SMS message:', error); +}); ``` ```deno ``` @@ -81,10 +111,75 @@ To send a message programmatically, use an [Appwrite Server SDK](/docs/sdks#serv {% /multicode %} {% /tabsitem %} {% /tabs %} - -You can follow the [Send push notifications](TODO) journey to send your first push notification and test your provider. {% /section %} {% section #manage-provider step=4 title="Manage provider" %} -[TODO: How to update and delete provider.] +{% tabs %} +{% tabsitem #console title="Console" %} +You can update or delete a provider in the Appwrite Console. + +Navigate to **Messaging** > **Providers** > click your provider. +In the settings, you can update a provider's configuration or delete the provider. +{% /tabsitem %} + +{% tabsitem #server-sdk title="Server SDK" %} +To update or delete providers programmatically, use an [Appwrite Server SDK](/docs/sdks#server). +{% multicode %} +```js +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +// update provider +messaging.updateTwilioProvider( + '', + '', + '', + '', + '', + '' +).then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); + +// delete provider +messaging.deleteProvider('[PROVIDER_ID]') +.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` +```deno +``` +```php +``` +```python +``` +```ruby +``` +```csharp +``` +```dart +``` +```kotlin +``` +```java +``` +```swift +``` +{% /multicode %} +{% /tabsitem %} +{% /tabs %} {% /section %} diff --git a/src/routes/docs/products/messaging/providers/vonage/+page.markdoc b/src/routes/docs/products/messaging/providers/vonage/+page.markdoc index 7c1527808a..a8083d9e74 100644 --- a/src/routes/docs/products/messaging/providers/vonage/+page.markdoc +++ b/src/routes/docs/products/messaging/providers/vonage/+page.markdoc @@ -12,7 +12,12 @@ You can send SMS messages for purposes like reminders, promotions, announcements {% section #add-provider step=1 title="Add provider" %} To add Vonage as a provider, navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **SMS**. -[SCREENSHOT] +{% only_dark %} +![Add a Vonage provider](/images/docs/messaging/providers/vonage/dark/provider.png) +{% /only_dark %} +{% only_light %} +![Add a Vonage provider](/images/docs/messaging/providers/vonage/provider.png) +{% /only_light %} Give your provider a name > choose **Vonage** > click **Save and continue**. The provider will be saved to your project, but not enabled until you complete its configuration. @@ -21,8 +26,6 @@ The provider will be saved to your project, but not enabled until you complete i In the **Configure** step, you will need to provide details form your Vonage dashboard to connect your Appwrite project. -[SCREENSHOT] - You will need to provide the following information from your **Vonage dashboard**. {% table %} @@ -53,7 +56,7 @@ To send a test message, navigate to **Messaging** > **Messages** > {% icon icon= Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. -Verify that you can receive the message in your inbox. If not +Verify that you can receive the message in your inbox. If not, check for logs in the Appwrite Console or in your provider's logs. {% /tabsitem %} {% tabsitem #server-sdk title="Server SDK" %} @@ -87,5 +90,72 @@ You can follow the [Send push notifications](TODO) journey to send your first pu {% /section %} {% section #manage-provider step=4 title="Manage provider" %} -[TODO: How to update and delete provider.] -{% /section %} +{% tabs %} +{% tabsitem #console title="Console" %} +You can update or delete a provider in the Appwrite Console. + +Navigate to **Messaging** > **Providers** > click your provider. +In the settings, you can update a provider's configuration or delete the provider. +{% /tabsitem %} + +{% tabsitem #server-sdk title="Server SDK" %} +To update or delete providers programmatically, use an [Appwrite Server SDK](/docs/sdks#server). +{% multicode %} +```js +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +// update provider +messaging.updateVonageProvider( + '', + '', + '', + '', + '', + '' +).then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); + +// delete provider +messaging.deleteProvider('[PROVIDER_ID]') +.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` +```deno +``` +```php +``` +```python +``` +```ruby +``` +```csharp +``` +```dart +``` +```kotlin +``` +```java +``` +```swift +``` +{% /multicode %} +{% /tabsitem %} +{% /tabs %} +{% /section %} \ No newline at end of file diff --git a/src/routes/docs/products/messaging/send-email-messages/+page.markdoc b/src/routes/docs/products/messaging/send-email-messages/+page.markdoc index d461cae37c..b45f02ee88 100644 --- a/src/routes/docs/products/messaging/send-email-messages/+page.markdoc +++ b/src/routes/docs/products/messaging/send-email-messages/+page.markdoc @@ -4,7 +4,7 @@ title: Send email messages description: Send email messages to your users using Appwrite Messaging. --- -You can send custom email messages to your app's uses using Appwrite Messaging and a connected SMTP service. +You can send custom email messages to your app's users using Appwrite Messaging and a connected SMTP service. This guide takes you through the implementation path of adding email messaging to your app. # Add a provider {% #add-a-provider %} @@ -24,7 +24,12 @@ and follow the wizard. You can find more details about configuring in the provid In Appwrite Messaging, each user has **targets** like their email, phone number, and devices with your app installed. You can deliver messages to users through their **targets**. -[SCREENSHOT OF THE TARGETS SCREEN] +{% only_dark %} +![Target overview](/images/docs/messaging/targets/dark/target-overview.png) +{% /only_dark %} +{% only_light %} +![Target overview](/images/docs/messaging/targets/target-overview.png) +{% /only_light %} If the user signed up with email and password, their account would already have email as a target. During development, you can add targets to existing accounts by navigating to **Authentication** > **Users** > **Select a user** > **Targets** > **Add a subscriber**. @@ -35,10 +40,34 @@ During development, you can add targets to existing accounts by navigating to ** ![Add a target](/images/docs/messaging/targets/add-targets.png) {% /only_light %} -You can also implement forms in your app to collect contact information and add it as a target with the [PLACEHOLDER](#TODO) endpoint. +You can also implement forms in your app to collect contact information and add it as a target with the [createSubscriber](#TODO) endpoint. -[PLACE HOLDER FOR CODE EXAMPLE] +```js +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; + +const promise = messaging.createSubscriber( + sdk.ID.unique(), // Create a unique subscriber ID + '', // The topic ID to subscribe to + '' // The target ID will receive messages from the topic + ); +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` # Create topics (optional) {% #create-topics %} You can use topics to organize targets that should receive the same messages, so you can send emails to groups of targets instead of one at time. This step is optional if you plan to only send emails to individual targets. @@ -58,9 +87,20 @@ You can also create topics programmatically using an [Appwrite Server SDK](#TODO You can send emails using a Server SDK. To send an email immediately, you can call the `createEmail` endpoint with `status` set to `'processing'` and `schedule` left empty. ```js -// IMPORTS? +import { Messaging, Client, ID } from "node-appwrite"; -messaging.createEmail({ +// Init SDK +const client = new Client(); + +const messaging = new Messaging(client); + +client + .setEndpoint('https://qa.appwrite.org/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; + +messaging.createEmail( ID.unique(), // Message ID. 'Hello World!', // Email Subject. 'This is the content of the email. It supports up to 64,230 characters.', // Email Content. @@ -71,7 +111,7 @@ messaging.createEmail({ ['targetID1', 'targetID2'], // Array of target IDs to be added as BCC. Optional. 'processing', // Message Status. Optional. false, // Boolean indicating if content is of type HTML. Optional. -}).then(response => { +).then(response => { console.log('Email created successfully:', response); }).catch(error => { console.error('Error creating email:', error); @@ -81,7 +121,18 @@ messaging.createEmail({ # Schedule emails {% #schedule-emails %} To send an scheduled email, you can call the `createEmail` endpoint with `status` set to `'scheduled'` and `schedule` as a ISO 8601 date time string for the scheduled time. ```js -// IMPORTS? +import { Messaging, Client, ID } from "node-appwrite"; + +// Init SDK +const client = new Client(); + +const messaging = new Messaging(client); + +client + .setEndpoint('https://qa.appwrite.org/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; messaging.createEmail({ ID.unique(), // Message ID. diff --git a/src/routes/docs/products/messaging/send-sms-messages/+page.markdoc b/src/routes/docs/products/messaging/send-sms-messages/+page.markdoc index 8e396e997c..18914056a5 100644 --- a/src/routes/docs/products/messaging/send-sms-messages/+page.markdoc +++ b/src/routes/docs/products/messaging/send-sms-messages/+page.markdoc @@ -4,4 +4,151 @@ title: Send SMS messages description: Send SMS messages to your users using Appwrite Messaging. --- +You can send custom sms messages to your app's users using Appwrite Messaging and a connected SMTP service. +This guide takes you through the implementation path of adding sms messaging to your app. +# Add a provider {% #add-a-provider %} +Appwrite supports [Twilio](/docs/products/messaging/providers/twilio/), +[MSG91](/docs/products/messaging/providers/msg91/), +[Telesign](/docs/products/messaging/providers/telesign/), +[TextMagic](/docs/products/messaging/providers/textmagic/), +and [Vonage](/docs/products/messaging/providers/vonage/) +as SMS providers. You must configure one of them as a provider. +{% only_dark %} +![Add a SMTP provider](/images/docs/messaging/providers/twilio/dark/provider.png) +{% /only_dark %} +{% only_light %} +![Add a SMTP provider](/images/docs/messaging/providers/twilio/provider.png) +{% /only_light %} +To add a new provider navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **SMS** +and follow the wizard. You can find more details about configuring in the provider guides for +[Twilio](/docs/products/messaging/providers/twilio/), +[MSG91](/docs/products/messaging/providers/msg91/), +[Telesign](/docs/products/messaging/providers/telesign/), +[TextMagic](/docs/products/messaging/providers/textmagic/), +and [Vonage](/docs/products/messaging/providers/vonage/). + +# Add targets {% #add-targets %} +In Appwrite Messaging, each user has **targets** like their email, phone number, and devices with your app installed. +You can deliver messages to users through their **targets**. + +{% only_dark %} +![Target overview](/images/docs/messaging/targets/dark/target-overview.png) +{% /only_dark %} +{% only_light %} +![Target overview](/images/docs/messaging/targets/target-overview.png) +{% /only_light %} + +If the user signed up with phone (SMS) authentication, their account would already have a phone number as a target. +During development, you can add targets to existing accounts by navigating to **Authentication** > **Users** > **Select a user** > **Targets** > **Add a subscriber**. +{% only_dark %} +![Add a target](/images/docs/messaging/targets/dark/add-targets.png) +{% /only_dark %} +{% only_light %} +![Add a target](/images/docs/messaging/targets/add-targets.png) +{% /only_light %} + +You can also implement forms in your app to collect contact information and add it as a target with the [createSubscriber](#TODO) endpoint. + +```js +const sdk = require('node-appwrite'); + +// Init SDK +const client = new sdk.Client(); + +const messaging = new sdk.Messaging(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; + +const promise = messaging.createSubscriber( + sdk.ID.unique(), // Create a unique subscriber ID + '', // The topic ID to subscribe to + '' // The target ID will receive messages from the topic + ); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` +# Create topics (optional) {% #create-topics %} +You can use topics to organize targets that should receive the same messages, so you can send SMS messages to groups of targets instead of one at time. +This step is optional if you plan to only send SMS messages to individual targets. + +To create a topic in the Appwrite Console, navigate to **Messaging** > **Topics** > {% icon icon="plus" size="m" /%} **Create topic**. +{% only_dark %} +![Add a target](/images/docs/messaging/topics/dark/create-topics.png) +{% /only_dark %} +{% only_light %} +![Add a target](/images/docs/messaging/topics/create-topics.png) +{% /only_light %} + +You can also create topics programmatically using an [Appwrite Server SDK](#TODO). +[PLACE HOLDER FOR CODE EXAMPLE] + +# Send SMS messages {% #send-sms %} +You can send SMS messages using a Server SDK. +To send an SMS messages immediately, you can call the `createSMS` endpoint with `status` set to `'processing'` and `schedule` left empty. +```js +import { Messaging, Client, ID } from "node-appwrite"; + +// Init SDK +const client = new Client(); + +const messaging = new Messaging(client); + +client + .setEndpoint('https://qa.appwrite.org/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; + +messaging.createSMS( + ID.unique(), // SMS ID, + 'Hello world!', // Message content + ['65c2592cb669ff954d94'], // List of topic IDs + [], // List of target IDs + [], // List of user IDs + 'processing' +).then(response => { + console.log('SMS message created successfully:', response); +}).catch(error => { + console.error('Error creating SMS message:', error); +}); +``` + +# Schedule SMS message {% #schedule-sms %} +To send an scheduled SMS message, you can call the `createSMS` endpoint with `status` set to `'scheduled'` and `schedule` as a ISO 8601 date time string for the scheduled time. +```js +import { Messaging, Client, ID } from "node-appwrite"; + +// Init SDK +const client = new Client(); + +const messaging = new Messaging(client); + +client + .setEndpoint('https://qa.appwrite.org/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey('') // Your secret API key +; + +messaging.createSMS( + ID.unique(), // SMS ID, + 'Hello world!', // Message content + ['65c2592cb669ff954d94'], // List of topic IDs + [], // List of target IDs + [], // List of user IDs + 'scheduled', + '2024-04-07T23:41:47+0000' +).then(response => { + console.log('SMS message created successfully:', response); +}).catch(error => { + console.error('Error creating SMS message:', error); +}); +``` \ No newline at end of file diff --git a/src/routes/docs/products/messaging/targets/+page.markdoc b/src/routes/docs/products/messaging/targets/+page.markdoc index 7e70003de5..95898133be 100644 --- a/src/routes/docs/products/messaging/targets/+page.markdoc +++ b/src/routes/docs/products/messaging/targets/+page.markdoc @@ -8,6 +8,13 @@ Targets are different ways a user can be reached. For example, a user might have two emails, a phone number as well as a phone and a tablet with your app installed. This means, the user has five different targets that you can deliver messages to. +{% only_dark %} +![Target overview](/images/docs/messaging/targets/dark/target-overview.png) +{% /only_dark %} +{% only_light %} +![Target overview](/images/docs/messaging/targets/target-overview.png) +{% /only_light %} + # Topics and targets {% #topics-and-targets %} A user can have multiple targets, such as emails, phone numbers, and devices with your app installed. These targets can subscribe to a topic, so when messages are published to a topic, all subscribed targets receive the message. @@ -54,16 +61,12 @@ client .setKey('') // Your secret API key ; -const promise = users.createTarget( - ID.unique(), // target ID - , // user ID - 'email', // provider type, one of 'email', 'sms', 'push' - , // The target's ID - , // The provider that this target subscribes to - , // The new target's name -) - -promise.then(function (response) { +users.createTarget( + '65c287ce3a7bd406963b', // user ID + ID.unique(), // target ID + 'email', // provider type, one of 'email', 'sms', 'push' + 'email1@example.com', // the target's email address +).then(function (response) { console.log(response); }, function (error) { console.log(error); @@ -88,16 +91,12 @@ client .setKey('') // Your secret API key ; -const promise = users.createTarget( - ID.unique(), // target ID - , // user ID - 'sms', // provider type, one of 'email', 'sms', 'push' - , // The target's ID - , // The provider that this target subscribes to - , // The new target's name -) - -promise.then(function (response) { +users.createTarget( + '65c287ce3a7bd406963b', // user ID + ID.unique(), // target ID + 'sms', // provider type, one of 'email', 'sms', 'push' + '+16555555555', // the target's email address +).then(function (response) { console.log(response); }, function (error) { console.log(error); @@ -140,6 +139,4 @@ Push notifications require configuration on both the Appwrite platform and your 1. Create a new key, note down the key ID and download your key. 1. Add push notification capability to your app by clicking your root-level app in XCode > **Signing & Capabilities** > {% icon icon="plus" size="m" /%} Capabilities > Search for **Push Notifications**. {% /tabsitem %} -{% /tabs %} - - +{% /tabs %} \ No newline at end of file diff --git a/src/routes/docs/products/storage/quick-start/+page.markdoc b/src/routes/docs/products/storage/quick-start/+page.markdoc index 7de1207b91..594e2249a1 100644 --- a/src/routes/docs/products/storage/quick-start/+page.markdoc +++ b/src/routes/docs/products/storage/quick-start/+page.markdoc @@ -24,7 +24,7 @@ To upload a file, add this to you web, Flutter, Apple, or Android app. const client = new Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject('[PROJECT_ID]'); + .setProject(''); const storage = new Storage(client); @@ -47,7 +47,7 @@ To upload a file, add this to you web, Flutter, Apple, or Android app. void main() { // Init SDK final client = Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject('[PROJECT_ID]'); + .setProject(''); final storage = Storage(client); @@ -66,7 +66,7 @@ To upload a file, add this to you web, Flutter, Apple, or Android app. suspend fun main() { val client = Client(applicationContext) .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("[PROJECT_ID]") // Your project ID + .setProject("") // Your project ID val storage = Storage(client) @@ -84,7 +84,7 @@ To upload a file, add this to you web, Flutter, Apple, or Android app. func main() async throws { let client = Client() .setEndpoint("https://cloud.appwrite.io/v1") - .setProject("[PROJECT_ID]") + .setProject("") let storage = Storage(client) diff --git a/src/routes/docs/products/storage/upload-download/+page.markdoc b/src/routes/docs/products/storage/upload-download/+page.markdoc index 8dcefd1d15..4ff834f75d 100644 --- a/src/routes/docs/products/storage/upload-download/+page.markdoc +++ b/src/routes/docs/products/storage/upload-download/+page.markdoc @@ -20,7 +20,7 @@ You can also upload files programmatically using our SDKs: const client = new Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject('[PROJECT_ID]'); + .setProject(''); const storage = new Storage(client); @@ -43,7 +43,7 @@ You can also upload files programmatically using our SDKs: void main() { // Init SDK final client = Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject('[PROJECT_ID]'); + .setProject(''); final storage = Storage(client); @@ -62,7 +62,7 @@ You can also upload files programmatically using our SDKs: suspend fun main() { val client = Client(applicationContext) .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("[PROJECT_ID]") // Your project ID + .setProject("") // Your project ID val storage = Storage(client) @@ -80,7 +80,7 @@ You can also upload files programmatically using our SDKs: func main() async throws { let client = Client() .setEndpoint("https://cloud.appwrite.io/v1") - .setProject("[PROJECT_ID]") + .setProject("") let storage = Storage(client) diff --git a/static/images/docs/messaging/messages/create-email-message.png b/static/images/docs/messaging/messages/create-email-message.png new file mode 100644 index 0000000000..f6c359deb8 Binary files /dev/null and b/static/images/docs/messaging/messages/create-email-message.png differ diff --git a/static/images/docs/messaging/messages/create-push-notification.png b/static/images/docs/messaging/messages/create-push-notification.png new file mode 100644 index 0000000000..482af2487b Binary files /dev/null and b/static/images/docs/messaging/messages/create-push-notification.png differ diff --git a/static/images/docs/messaging/messages/create-sms-message.png b/static/images/docs/messaging/messages/create-sms-message.png new file mode 100644 index 0000000000..aa0cabc741 Binary files /dev/null and b/static/images/docs/messaging/messages/create-sms-message.png differ diff --git a/static/images/docs/messaging/messages/dark/create-email-message.png b/static/images/docs/messaging/messages/dark/create-email-message.png new file mode 100644 index 0000000000..07257b014a Binary files /dev/null and b/static/images/docs/messaging/messages/dark/create-email-message.png differ diff --git a/static/images/docs/messaging/messages/dark/create-push-notification.png b/static/images/docs/messaging/messages/dark/create-push-notification.png new file mode 100644 index 0000000000..a4e7057c00 Binary files /dev/null and b/static/images/docs/messaging/messages/dark/create-push-notification.png differ diff --git a/static/images/docs/messaging/messages/dark/create-sms-message.png b/static/images/docs/messaging/messages/dark/create-sms-message.png new file mode 100644 index 0000000000..936e8fda31 Binary files /dev/null and b/static/images/docs/messaging/messages/dark/create-sms-message.png differ diff --git a/static/images/docs/messaging/providers/apns/dark/provider.png b/static/images/docs/messaging/providers/apns/dark/provider.png new file mode 100644 index 0000000000..dfa3bcda50 Binary files /dev/null and b/static/images/docs/messaging/providers/apns/dark/provider.png differ diff --git a/static/images/docs/messaging/providers/apns/provider.png b/static/images/docs/messaging/providers/apns/provider.png new file mode 100644 index 0000000000..567beeb52a Binary files /dev/null and b/static/images/docs/messaging/providers/apns/provider.png differ diff --git a/static/images/docs/messaging/providers/fcm/dark/provider.png b/static/images/docs/messaging/providers/fcm/dark/provider.png new file mode 100644 index 0000000000..21c2dd78ce Binary files /dev/null and b/static/images/docs/messaging/providers/fcm/dark/provider.png differ diff --git a/static/images/docs/messaging/providers/fcm/provider.png b/static/images/docs/messaging/providers/fcm/provider.png new file mode 100644 index 0000000000..6554ecdfca Binary files /dev/null and b/static/images/docs/messaging/providers/fcm/provider.png differ diff --git a/static/images/docs/messaging/providers/msg91/dark/provider.png b/static/images/docs/messaging/providers/msg91/dark/provider.png new file mode 100644 index 0000000000..27518674fc Binary files /dev/null and b/static/images/docs/messaging/providers/msg91/dark/provider.png differ diff --git a/static/images/docs/messaging/providers/msg91/provider.png b/static/images/docs/messaging/providers/msg91/provider.png new file mode 100644 index 0000000000..ceb80d5c6d Binary files /dev/null and b/static/images/docs/messaging/providers/msg91/provider.png differ diff --git a/static/images/docs/messaging/providers/telesign/dark/provider.png b/static/images/docs/messaging/providers/telesign/dark/provider.png new file mode 100644 index 0000000000..7364c5ada7 Binary files /dev/null and b/static/images/docs/messaging/providers/telesign/dark/provider.png differ diff --git a/static/images/docs/messaging/providers/telesign/provider.png b/static/images/docs/messaging/providers/telesign/provider.png new file mode 100644 index 0000000000..ffd50c96cd Binary files /dev/null and b/static/images/docs/messaging/providers/telesign/provider.png differ diff --git a/static/images/docs/messaging/providers/textmagic/dark/provider.png b/static/images/docs/messaging/providers/textmagic/dark/provider.png new file mode 100644 index 0000000000..877381b66a Binary files /dev/null and b/static/images/docs/messaging/providers/textmagic/dark/provider.png differ diff --git a/static/images/docs/messaging/providers/textmagic/provider.png b/static/images/docs/messaging/providers/textmagic/provider.png new file mode 100644 index 0000000000..bd1b105369 Binary files /dev/null and b/static/images/docs/messaging/providers/textmagic/provider.png differ diff --git a/static/images/docs/messaging/providers/twilio/dark/provider.png b/static/images/docs/messaging/providers/twilio/dark/provider.png new file mode 100644 index 0000000000..983fc9ecda Binary files /dev/null and b/static/images/docs/messaging/providers/twilio/dark/provider.png differ diff --git a/static/images/docs/messaging/providers/twilio/provider.png b/static/images/docs/messaging/providers/twilio/provider.png new file mode 100644 index 0000000000..50cacbe303 Binary files /dev/null and b/static/images/docs/messaging/providers/twilio/provider.png differ diff --git a/static/images/docs/messaging/providers/vonage/dark/provider.png b/static/images/docs/messaging/providers/vonage/dark/provider.png new file mode 100644 index 0000000000..7e0bb3d616 Binary files /dev/null and b/static/images/docs/messaging/providers/vonage/dark/provider.png differ diff --git a/static/images/docs/messaging/providers/vonage/provider.png b/static/images/docs/messaging/providers/vonage/provider.png new file mode 100644 index 0000000000..1fdfa7adab Binary files /dev/null and b/static/images/docs/messaging/providers/vonage/provider.png differ diff --git a/static/images/docs/messaging/targets/dark/target-overview.png b/static/images/docs/messaging/targets/dark/target-overview.png new file mode 100644 index 0000000000..8fe5f6a008 Binary files /dev/null and b/static/images/docs/messaging/targets/dark/target-overview.png differ diff --git a/static/images/docs/messaging/targets/target-overview.png b/static/images/docs/messaging/targets/target-overview.png new file mode 100644 index 0000000000..434d944380 Binary files /dev/null and b/static/images/docs/messaging/targets/target-overview.png differ