Skip to content

Commit

Permalink
Release candidate 4 for 1.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
abnegate committed Feb 21, 2024
1 parent 3a3a030 commit 2a69c35
Show file tree
Hide file tree
Showing 361 changed files with 3,643 additions and 4,496 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Appwrite Console SDK

![License](https://img.shields.io/github/license/appwrite/sdk-for-console.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.4.13-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.5.0-blue.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
Expand Down 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].11"></script>
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/[email protected].12"></script>
```


Expand Down
21 changes: 8 additions & 13 deletions docs/examples/account/add-authenticator.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import { Client, AuthenticatorType, Account } from "@appwrite.io/console";
import { Client, Account, AuthenticatorType } from "@appwrite.io/console";

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

const account = new Account(client);

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

const promise = account.addAuthenticator(AuthenticatorType.Totp);
const result = await account.addAuthenticator(
AuthenticatorType.Totp // type
);

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

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

const account = new Account(client);

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

const promise = account.createAnonymousSession();
const result = await account.createAnonymousSession();

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

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

const account = new Account(client);

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

const promise = account.createEmailPasswordSession('[email protected]', 'password');
const result = await account.createEmailPasswordSession(
'[email protected]', // email
'password' // password
);

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

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

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]');
const result = await account.createEmailToken(
'[USER_ID]', // userId
'[email protected]', // email
false // phrase (optional)
);

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

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

const account = new Account(client);

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

const promise = account.createJWT();
const result = await account.createJWT();

promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
console.log(response);
24 changes: 11 additions & 13 deletions docs/examples/account/create-magic-u-r-l-token.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { Client, Account } from "@appwrite.io/console";
import { Client, Account } from "@appwrite.io/console";

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

const account = new Account(client);

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

const promise = account.createMagicURLToken('[USER_ID]', '[email protected]');
const result = await account.createMagicURLToken(
'[USER_ID]', // userId
'[email protected]', // email
'https://example.com', // url (optional)
false // phrase (optional)
);

promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
console.log(response);
20 changes: 11 additions & 9 deletions docs/examples/account/create-o-auth2session.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { Client, OAuthProvider, Account } from "@appwrite.io/console";
import { Client, Account, OAuthProvider } from "@appwrite.io/console";

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

const account = new Account(client);

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

// Go to OAuth provider login page
account.createOAuth2Session(OAuthProvider.Amazon);
account.createOAuth2Session(
OAuthProvider.Amazon, // provider
'https://example.com', // success (optional)
'https://example.com', // failure (optional)
false, // token (optional)
[] // scopes (optional)
);

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

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

const account = new Account(client);

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

const promise = account.createPhoneToken('[USER_ID]', '+12065550100');
const result = await account.createPhoneToken(
'[USER_ID]', // userId
'+12065550100' // phone
);

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

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

const account = new Account(client);

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

const promise = account.createPhoneVerification();
const result = await account.createPhoneVerification();

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

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

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]');
const result = await account.createPushTarget(
'[TARGET_ID]', // targetId
'[IDENTIFIER]', // identifier
'[PROVIDER_ID]' // providerId (optional)
);

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

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

const account = new Account(client);

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

const promise = account.createRecovery('[email protected]', 'https://example.com');
const result = await account.createRecovery(
'[email protected]', // email
'https://example.com' // url
);

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

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

const account = new Account(client);

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

const promise = account.createSession('[USER_ID]', '[SECRET]');
const result = await account.createSession(
'[USER_ID]', // userId
'[SECRET]' // secret
);

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

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

const account = new Account(client);

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

const promise = account.createVerification('https://example.com');
const result = await account.createVerification(
'https://example.com' // url
);

promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
console.log(response);
Loading

0 comments on commit 2a69c35

Please sign in to comment.