Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.6.x #17

Merged
merged 9 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 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.5.8-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.6.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)

**This SDK is compatible with Appwrite server version 1.5.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-console/releases).**
**This SDK is compatible with Appwrite server version 1.6.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-console/releases).**

Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Console SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

Expand All @@ -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/console@0.6.4"></script>
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@1.0.1"></script>
```


Expand Down
4 changes: 2 additions & 2 deletions docs/examples/account/create-anonymous-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.createAnonymousSession();

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create-email-password-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

Expand All @@ -11,4 +11,4 @@ const result = await account.createEmailPasswordSession(
'password' // password
);

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create-email-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

Expand All @@ -12,4 +12,4 @@ const result = await account.createEmailToken(
false // phrase (optional)
);

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create-j-w-t.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.createJWT();

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create-magic-u-r-l-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

Expand All @@ -13,4 +13,4 @@ const result = await account.createMagicURLToken(
false // phrase (optional)
);

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create-mfa-authenticator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Client, Account, AuthenticatorType } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

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

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create-mfa-challenge.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Client, Account, AuthenticationFactor } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.createMfaChallenge(
AuthenticationFactor.Email // factor
);

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create-mfa-recovery-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.createMfaRecoveryCodes();

console.log(response);
console.log(result);
2 changes: 1 addition & 1 deletion docs/examples/account/create-o-auth2session.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Client, Account, OAuthProvider } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-o-auth2token.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Client, Account, OAuthProvider } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

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

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

Expand All @@ -11,4 +11,4 @@ const result = await account.createPhoneToken(
'+12065550100' // phone
);

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create-phone-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.createPhoneVerification();

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create-push-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

Expand All @@ -12,4 +12,4 @@ const result = await account.createPushTarget(
'<PROVIDER_ID>' // providerId (optional)
);

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

Expand All @@ -11,4 +11,4 @@ const result = await account.createRecovery(
'https://example.com' // url
);

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

Expand All @@ -11,4 +11,4 @@ const result = await account.createSession(
'<SECRET>' // secret
);

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

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

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

Expand All @@ -13,4 +13,4 @@ const result = await account.create(
'<NAME>' // name (optional)
);

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/delete-identity.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.deleteIdentity(
'<IDENTITY_ID>' // identityId
);

console.log(response);
console.log(result);
7 changes: 3 additions & 4 deletions docs/examples/account/delete-mfa-authenticator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import { Client, Account, AuthenticatorType } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.deleteMfaAuthenticator(
AuthenticatorType.Totp, // type
'<OTP>' // otp
AuthenticatorType.Totp // type
);

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/delete-push-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.deletePushTarget(
'<TARGET_ID>' // targetId
);

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/delete-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.deleteSession(
'<SESSION_ID>' // sessionId
);

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/delete-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.deleteSessions();

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.delete();

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/get-mfa-recovery-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.getMfaRecoveryCodes();

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/get-prefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.getPrefs();

console.log(response);
console.log(result);
4 changes: 2 additions & 2 deletions docs/examples/account/get-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Client, Account } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.getSession(
'<SESSION_ID>' // sessionId
);

console.log(response);
console.log(result);
Loading