Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

## 28.2.0-rc.0

* Added: `Push` service for MQTT realtime push messages
* Added: `Topic` and `ResolvedTopic` builders for push topic filters
* Added: `Client.setPushEndpoint()` and `Client.setPushClientId()`
* Added: `Avatars.deletePhoto()` method
* Added: `Models.Account` type
* Added: `Webflow` to the `OAuthProvider` enum
* Updated: `Client.chunkedUpload()` accepts a `responseType`, supports `text`, and falls back without a file

## 28.1.0

* Added: `Apps` service to create and manage OAuth2 apps, their secrets, keys, and installations
Expand Down
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';
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@28.1.0"></script>
<script src="https://cdn.jsdelivr.net/npm/appwrite@28.2.0-rc.0"></script>
```

## Getting Started
Expand Down
1 change: 1 addition & 0 deletions docs/examples/account/create-email-password-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const account = new Account(client);
const result = await account.createEmailPasswordSession({
email: 'email@example.com',
password: 'password',
duration: 60, // optional
});

console.log(result);
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/account/delete-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const client = new Client()

const account = new Account(client);

const result = await account.deleteSessions();
const result = await account.deleteSessions({
current: false, // optional
});

console.log(result);
```
4 changes: 3 additions & 1 deletion docs/examples/account/list-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const client = new Client()

const account = new Account(client);

const result = await account.listSessions();
const result = await account.listSessions({
total: false, // optional
});

console.log(result);
```
13 changes: 13 additions & 0 deletions docs/examples/avatars/delete-photo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```javascript
import { Client, Avatars } from 'appwrite';

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

const avatars = new Avatars(client);

const result = await avatars.deletePhoto();

console.log(result);
```
3 changes: 1 addition & 2 deletions docs/examples/avatars/get-screenshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ const avatars = new Avatars(client);
const result = avatars.getScreenshot({
url: 'https://example.com',
headers: {
Authorization: 'Bearer token123',
'X-Custom-Header': 'value',
'Accept-Language': 'en-US,en;q=0.9',
}, // optional
viewportWidth: 1920, // optional
viewportHeight: 1080, // optional
Expand Down
15 changes: 15 additions & 0 deletions docs/examples/avatars/update-photo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
import { Client, Avatars } from 'appwrite';

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

const avatars = new Avatars(client);

const result = await avatars.updatePhoto({
file: document.getElementById('uploader').files[0],
});

console.log(result);
```
1 change: 1 addition & 0 deletions docs/examples/databases/list-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const databases = new Databases(client);

const result = await databases.listTransactions({
queries: [], // optional
total: false, // optional
});

console.log(result);
Expand Down
11 changes: 10 additions & 1 deletion docs/examples/documentsdb/create-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ const documentsDB = new DocumentsDB(client);
const result = await documentsDB.createDocuments({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documents: [],
documents: [
{
$id: 'example1',
username: 'walter.obrien',
email: 'walter.obrien@example.com',
fullName: "Walter O'Brien",
age: 30,
isAdmin: false,
},
],
transactionId: '<TRANSACTION_ID>', // optional
});

Expand Down
1 change: 1 addition & 0 deletions docs/examples/documentsdb/list-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const documentsDB = new DocumentsDB(client);

const result = await documentsDB.listTransactions({
queries: [], // optional
total: false, // optional
});

console.log(result);
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/graphql/mutation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const client = new Client()
const graphql = new Graphql(client);

const result = await graphql.mutation({
query: {},
query: {
query: 'mutation { accountUpdateName(name: "Walter") { name } }',
},
});

console.log(result);
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/graphql/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const client = new Client()
const graphql = new Graphql(client);

const result = await graphql.query({
query: {},
query: {
query: 'query { localeGet { ip } }',
},
});

console.log(result);
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/locale/list-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const client = new Client()

const locale = new Locale(client);

const result = await locale.listCodes();
const result = await locale.listCodes({
total: false, // optional
});

console.log(result);
```
4 changes: 3 additions & 1 deletion docs/examples/locale/list-continents.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const client = new Client()

const locale = new Locale(client);

const result = await locale.listContinents();
const result = await locale.listContinents({
total: false, // optional
});

console.log(result);
```
4 changes: 3 additions & 1 deletion docs/examples/locale/list-countries-eu.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const client = new Client()

const locale = new Locale(client);

const result = await locale.listCountriesEU();
const result = await locale.listCountriesEU({
total: false, // optional
});

console.log(result);
```
4 changes: 3 additions & 1 deletion docs/examples/locale/list-countries-phones.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const client = new Client()

const locale = new Locale(client);

const result = await locale.listCountriesPhones();
const result = await locale.listCountriesPhones({
total: false, // optional
});

console.log(result);
```
4 changes: 3 additions & 1 deletion docs/examples/locale/list-countries.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const client = new Client()

const locale = new Locale(client);

const result = await locale.listCountries();
const result = await locale.listCountries({
total: false, // optional
});

console.log(result);
```
4 changes: 3 additions & 1 deletion docs/examples/locale/list-currencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const client = new Client()

const locale = new Locale(client);

const result = await locale.listCurrencies();
const result = await locale.listCurrencies({
total: false, // optional
});

console.log(result);
```
4 changes: 3 additions & 1 deletion docs/examples/locale/list-languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const client = new Client()

const locale = new Locale(client);

const result = await locale.listLanguages();
const result = await locale.listLanguages({
total: false, // optional
});

console.log(result);
```
1 change: 1 addition & 0 deletions docs/examples/tablesdb/list-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const tablesDB = new TablesDB(client);

const result = await tablesDB.listTransactions({
queries: [], // optional
total: false, // optional
});

console.log(result);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/teams/create-membership.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const teams = new Teams(client);

const result = await teams.createMembership({
teamId: '<TEAM_ID>',
roles: [],
roles: ['editor'],
email: 'email@example.com', // optional
userId: '<USER_ID>', // optional
phone: '+12065550100', // optional
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/teams/update-membership.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const teams = new Teams(client);
const result = await teams.updateMembership({
teamId: '<TEAM_ID>',
membershipId: '<MEMBERSHIP_ID>',
roles: [],
roles: ['editor'],
});

console.log(result);
Expand Down
5 changes: 4 additions & 1 deletion docs/examples/vectorsdb/create-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ const result = await vectorsDB.createOperations({
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {
name: "Walter O'Brien",
embeddings: [0.12, -0.55, 0.88, 1.02],
metadata: {
name: 'First document',
},
},
},
], // optional
Expand Down
1 change: 1 addition & 0 deletions docs/examples/vectorsdb/list-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const vectorsDB = new VectorsDB(client);

const result = await vectorsDB.listTransactions({
queries: [], // optional
total: false, // optional
});

console.log(result);
Expand Down
Loading