Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed Jan 24, 2024
1 parent 8849246 commit 4e17d6b
Show file tree
Hide file tree
Showing 30 changed files with 603 additions and 289 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:

```html
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/[email protected].7"></script>
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/[email protected].8"></script>
```


Expand Down
18 changes: 18 additions & 0 deletions docs/examples/account/create-email-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Client, Account } from "@appwrite.io/console";

const client = new Client();

const account = new Account(client);

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = account.createEmailToken('[USER_ID]', '[email protected]');

promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
18 changes: 18 additions & 0 deletions docs/examples/account/create-push-target.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Client, Account } from "@appwrite.io/console";

const client = new Client();

const account = new Account(client);

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = account.createPushTarget('[TARGET_ID]', '[IDENTIFIER]');

promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
18 changes: 18 additions & 0 deletions docs/examples/account/delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Client, Account } from "@appwrite.io/console";

const client = new Client();

const account = new Account(client);

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = account.delete();

promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
1 change: 1 addition & 0 deletions docs/examples/account/update-push-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const account = new Account(client);

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = account.updatePushTarget('[TARGET_ID]', '[IDENTIFIER]');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = messaging.createApnsProvider('[PROVIDER_ID]', '[NAME]');
const promise = messaging.createAPNSProvider('[PROVIDER_ID]', '[NAME]');

promise.then(function (response) {
console.log(response); // Success
Expand Down
18 changes: 0 additions & 18 deletions docs/examples/messaging/create-email-message.md

This file was deleted.

18 changes: 18 additions & 0 deletions docs/examples/messaging/create-email.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Client, Messaging } from "@appwrite.io/console";

const client = new Client();

const messaging = new Messaging(client);

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = messaging.createEmail('[MESSAGE_ID]', '[SUBJECT]', '[CONTENT]');

promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = messaging.createFcmProvider('[PROVIDER_ID]', '[NAME]');
const promise = messaging.createFCMProvider('[PROVIDER_ID]', '[NAME]');

promise.then(function (response) {
console.log(response); // Success
Expand Down
18 changes: 0 additions & 18 deletions docs/examples/messaging/create-push-message.md

This file was deleted.

18 changes: 18 additions & 0 deletions docs/examples/messaging/create-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Client, Messaging } from "@appwrite.io/console";

const client = new Client();

const messaging = new Messaging(client);

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = messaging.createPush('[MESSAGE_ID]', '[TITLE]', '[BODY]');

promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = messaging.createSMSMessage('[MESSAGE_ID]', '[CONTENT]');
const promise = messaging.createSMS('[MESSAGE_ID]', '[CONTENT]');

promise.then(function (response) {
console.log(response); // Success
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = messaging.updateFcmProvider('[PROVIDER_ID]');
const promise = messaging.listTargets('[MESSAGE_ID]');

promise.then(function (response) {
console.log(response); // Success
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = messaging.updateApnsProvider('[PROVIDER_ID]');
const promise = messaging.updateAPNSProvider('[PROVIDER_ID]');

promise.then(function (response) {
console.log(response); // Success
Expand Down
18 changes: 18 additions & 0 deletions docs/examples/messaging/update-f-c-m-provider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Client, Messaging } from "@appwrite.io/console";

const client = new Client();

const messaging = new Messaging(client);

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = messaging.updateFCMProvider('[PROVIDER_ID]');

promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
2 changes: 1 addition & 1 deletion docs/examples/project/get-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = project.getUsage();
const promise = project.getUsage('', '');

promise.then(function (response) {
console.log(response); // Success
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = projects.updateSmtpConfiguration('[PROJECT_ID]', false);
const promise = projects.createSmtpTest('[PROJECT_ID]', [], '[SENDER_NAME]', '[email protected]', '');

promise.then(function (response) {
console.log(response); // Success
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/projects/create-webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = projects.createWebhook('[PROJECT_ID]', '[NAME]', [], 'https://example.com', false);
const promise = projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '', false);

promise.then(function (response) {
console.log(response); // Success
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = projects.getUsage('[PROJECT_ID]');
const promise = projects.updateSmtp('[PROJECT_ID]', false);

promise.then(function (response) {
console.log(response); // Success
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/projects/update-webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;

const promise = projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], 'https://example.com', false);
const promise = projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], '', false);

promise.then(function (response) {
console.log(response); // Success
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@appwrite.io/console",
"homepage": "https://appwrite.io/support",
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
"version": "0.6.0-rc.7",
"version": "0.6.0-rc.8",
"license": "BSD-3-Clause",
"main": "dist/cjs/sdk.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class Client {
'x-sdk-name': 'Console',
'x-sdk-platform': 'console',
'x-sdk-language': 'web',
'x-sdk-version': '0.6.0-rc.7',
'x-sdk-version': '0.6.0-rc.8',
'X-Appwrite-Response-Format': '1.4.0',
};

Expand Down
Loading

0 comments on commit 4e17d6b

Please sign in to comment.