@appwrite.io/console 0.4.2 → 0.6.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +2 -2
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/cjs/sdk.js +2115 -109
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +2115 -110
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +2115 -109
- package/docs/examples/account/add-authenticator.md +18 -0
- package/docs/examples/account/create-challenge.md +18 -0
- package/docs/examples/account/list-providers.md +18 -0
- package/docs/examples/account/update-challenge.md +18 -0
- package/docs/examples/account/update-m-f-a.md +18 -0
- package/docs/examples/account/update-recovery.md +1 -1
- package/docs/examples/account/verify-authenticator.md +18 -0
- package/docs/examples/messaging/create-apns-provider.md +18 -0
- package/docs/examples/messaging/create-email-message.md +18 -0
- package/docs/examples/messaging/create-fcm-provider.md +18 -0
- package/docs/examples/messaging/create-mailgun-provider.md +18 -0
- package/docs/examples/messaging/create-msg91provider.md +18 -0
- package/docs/examples/messaging/create-push-message.md +18 -0
- package/docs/examples/messaging/create-s-m-s-message.md +18 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +18 -0
- package/docs/examples/messaging/create-subscriber.md +18 -0
- package/docs/examples/messaging/create-telesign-provider.md +18 -0
- package/docs/examples/messaging/create-textmagic-provider.md +18 -0
- package/docs/examples/messaging/create-topic.md +18 -0
- package/docs/examples/messaging/create-twilio-provider.md +18 -0
- package/docs/examples/messaging/create-vonage-provider.md +18 -0
- package/docs/examples/messaging/delete-provider.md +18 -0
- package/docs/examples/messaging/delete-subscriber.md +18 -0
- package/docs/examples/messaging/delete-topic.md +18 -0
- package/docs/examples/messaging/get-message.md +18 -0
- package/docs/examples/messaging/get-provider.md +18 -0
- package/docs/examples/messaging/get-subscriber.md +18 -0
- package/docs/examples/messaging/get-topic.md +18 -0
- package/docs/examples/messaging/list-message-logs.md +18 -0
- package/docs/examples/messaging/list-messages.md +18 -0
- package/docs/examples/messaging/list-provider-logs.md +18 -0
- package/docs/examples/messaging/list-providers.md +18 -0
- package/docs/examples/messaging/list-subscriber-logs.md +18 -0
- package/docs/examples/messaging/list-subscribers.md +18 -0
- package/docs/examples/messaging/list-topic-logs.md +18 -0
- package/docs/examples/messaging/list-topics.md +18 -0
- package/docs/examples/messaging/update-apns-provider.md +18 -0
- package/docs/examples/messaging/update-email.md +18 -0
- package/docs/examples/messaging/update-fcm-provider.md +18 -0
- package/docs/examples/messaging/update-mailgun-provider.md +18 -0
- package/docs/examples/messaging/update-msg91provider.md +18 -0
- package/docs/examples/messaging/update-push-notification.md +18 -0
- package/docs/examples/messaging/update-s-m-s.md +18 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +18 -0
- package/docs/examples/messaging/update-telesign-provider.md +18 -0
- package/docs/examples/messaging/update-textmagic-provider.md +18 -0
- package/docs/examples/messaging/update-topic.md +18 -0
- package/docs/examples/messaging/update-twilio-provider.md +18 -0
- package/docs/examples/messaging/update-vonage-provider.md +18 -0
- package/docs/examples/project/get-usage.md +1 -1
- package/docs/examples/projects/get-usage.md +18 -0
- package/docs/examples/projects/update-auth-mfa-factors.md +18 -0
- package/docs/examples/users/create-target.md +18 -0
- package/docs/examples/users/delete-target.md +18 -0
- package/docs/examples/users/get-target.md +18 -0
- package/docs/examples/users/list-targets.md +18 -0
- package/docs/examples/users/update-target.md +18 -0
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/index.ts +1 -0
- package/src/models.ts +547 -151
- package/src/services/account.ts +158 -0
- package/src/services/messaging.ts +1901 -0
- package/src/services/project.ts +4 -22
- package/src/services/projects.ts +58 -0
- package/src/services/storage.ts +1 -1
- package/src/services/users.ts +188 -1
- package/types/index.d.ts +1 -0
- package/types/models.d.ts +547 -151
- package/types/services/account.d.ts +56 -0
- package/types/services/messaging.d.ts +553 -0
- package/types/services/project.d.ts +2 -4
- package/types/services/projects.d.ts +20 -0
- package/types/services/storage.d.ts +1 -1
- package/types/services/users.d.ts +59 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Account } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const account = new Account(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = account.addAuthenticator('totp');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Account } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const account = new Account(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = account.createChallenge('totp');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Account } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const account = new Account(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = account.listProviders();
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Account } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const account = new Account(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = account.updateChallenge('[CHALLENGE_ID]', '[OTP]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Account } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const account = new Account(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = account.updateMFA(false);
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -9,7 +9,7 @@ client
|
|
|
9
9
|
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
10
|
;
|
|
11
11
|
|
|
12
|
-
const promise = account.updateRecovery('[USER_ID]', '[SECRET]', '
|
|
12
|
+
const promise = account.updateRecovery('[USER_ID]', '[SECRET]', '', '');
|
|
13
13
|
|
|
14
14
|
promise.then(function (response) {
|
|
15
15
|
console.log(response); // Success
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Account } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const account = new Account(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = account.verifyAuthenticator('totp', '[OTP]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createApnsProvider('[PROVIDER_ID]', '[NAME]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createEmailMessage('[MESSAGE_ID]', '[SUBJECT]', '[CONTENT]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createFcmProvider('[PROVIDER_ID]', '[NAME]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createMailgunProvider('[PROVIDER_ID]', '[NAME]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createMsg91Provider('[PROVIDER_ID]', '[NAME]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createPushMessage('[MESSAGE_ID]', '[TITLE]', '[BODY]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createSMSMessage('[MESSAGE_ID]', '[CONTENT]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createSendgridProvider('[PROVIDER_ID]', '[NAME]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createSubscriber('[TOPIC_ID]', '[SUBSCRIBER_ID]', '[TARGET_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createTelesignProvider('[PROVIDER_ID]', '[NAME]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createTextmagicProvider('[PROVIDER_ID]', '[NAME]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createTopic('[TOPIC_ID]', '[NAME]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createTwilioProvider('[PROVIDER_ID]', '[NAME]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.createVonageProvider('[PROVIDER_ID]', '[NAME]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.deleteProvider('[PROVIDER_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.deleteSubscriber('[TOPIC_ID]', '[SUBSCRIBER_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.deleteTopic('[TOPIC_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.getMessage('[MESSAGE_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.getProvider('[PROVIDER_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.getSubscriber('[TOPIC_ID]', '[SUBSCRIBER_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.getTopic('[TOPIC_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.listMessageLogs('[MESSAGE_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.listMessages();
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.listProviderLogs('[PROVIDER_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.listProviders();
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.listSubscriberLogs('[SUBSCRIBER_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Messaging } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const messaging = new Messaging(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = messaging.listSubscribers('[TOPIC_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|