Skip to content
Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2023 Appwrite (https://appwrite.io) and individual contributors.
Copyright (c) 2024 Appwrite (https://appwrite.io) and individual contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
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.3.8-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.4.13-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.3.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-console/releases).**
**This SDK is compatible with Appwrite server version latest. 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.2.0"></script>
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@0.4.2"></script>
```


Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-anonymous-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-email-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-j-w-t.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-magic-u-r-l-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
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 @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-phone-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-phone-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const client = new Client();
const account = new Account(client);

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

const promise = account.createWithInviteCode('[USER_ID]', 'email@example.com', 'password');
const promise = account.deleteIdentity('[IDENTITY_ID]');

promise.then(function (response) {
console.log(response); // Success
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/delete-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/delete-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
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
});
2 changes: 1 addition & 1 deletion docs/examples/account/get-prefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/get-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
18 changes: 18 additions & 0 deletions docs/examples/account/list-identities.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.listIdentities();

promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
2 changes: 1 addition & 1 deletion docs/examples/account/list-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/list-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-email.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-magic-u-r-l-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-password.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-phone-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-phone-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-phone.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-prefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const account = new Account(client);

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

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

const client = new Client();

const assistant = new Assistant(client);

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

const promise = assistant.chat('[PROMPT]');

promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
2 changes: 1 addition & 1 deletion docs/examples/avatars/get-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const avatars = new Avatars(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/avatars/get-credit-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const avatars = new Avatars(client);

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

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/avatars/get-favicon.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client();
const avatars = new Avatars(client);

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

Expand Down
Loading