Skip to content

Commit 3a7ddd2

Browse files
Merge pull request #94 from appwrite/dev
feat: Console SDK update for version 13.1.0
2 parents af44e6d + ca2dd4f commit 3a7ddd2

128 files changed

Lines changed: 3983 additions & 2934 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v6
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818

1919
- name: Use Node.js
20-
uses: actions/setup-node@v6
20+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2121
with:
2222
node-version: '24.14.1'
2323
registry-url: 'https://registry.npmjs.org'

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
min-release-age=7

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite Console SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-console.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.9.4-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.9.5-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
@@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
3333
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:
3434

3535
```html
36-
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@13.0.0"></script>
36+
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@13.1.0"></script>
3737
```
3838

3939

docs/examples/account/create-key.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```javascript
2-
import { Client, Account, Scopes } from "@appwrite.io/console";
2+
import { Client, Account, AccountKeyScopes } from "@appwrite.io/console";
33

44
const client = new Client()
55
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -9,7 +9,7 @@ const account = new Account(client);
99

1010
const result = await account.createKey({
1111
name: '<NAME>',
12-
scopes: [Scopes.Account],
12+
scopes: [AccountKeyScopes.Account],
1313
expire: '2020-10-15T06:38:00.000+00:00' // optional
1414
});
1515

docs/examples/account/update-key.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```javascript
2-
import { Client, Account, Scopes } from "@appwrite.io/console";
2+
import { Client, Account, AccountKeyScopes } from "@appwrite.io/console";
33

44
const client = new Client()
55
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -10,7 +10,7 @@ const account = new Account(client);
1010
const result = await account.updateKey({
1111
keyId: '<KEY_ID>',
1212
name: '<NAME>',
13-
scopes: [Scopes.Account],
13+
scopes: [AccountKeyScopes.Account],
1414
expire: '2020-10-15T06:38:00.000+00:00' // optional
1515
});
1616

docs/examples/avatars/get-screenshot.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```javascript
2-
import { Client, Avatars, Theme, Timezone, BrowserPermission, ImageFormat } from "@appwrite.io/console";
2+
import { Client, Avatars, BrowserTheme, Timezone, BrowserPermission, ImageFormat } from "@appwrite.io/console";
33

44
const client = new Client()
55
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -16,11 +16,11 @@ const result = avatars.getScreenshot({
1616
viewportWidth: 1920, // optional
1717
viewportHeight: 1080, // optional
1818
scale: 2, // optional
19-
theme: Theme.Dark, // optional
19+
theme: BrowserTheme.Dark, // optional
2020
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional
2121
fullpage: true, // optional
2222
locale: 'en-US', // optional
23-
timezone: Timezone.AmericaNewYork, // optional
23+
timezone: Timezone.AfricaAbidjan, // optional
2424
latitude: 37.7749, // optional
2525
longitude: -122.4194, // optional
2626
accuracy: 100, // optional
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
```javascript
2+
import { Client, Console, ProjectEmailTemplateId, ProjectEmailTemplateLocale } from "@appwrite.io/console";
3+
4+
const client = new Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
7+
8+
const xconsole = new Console(client);
9+
10+
const result = await xconsole.getEmailTemplate({
11+
templateId: ProjectEmailTemplateId.Verification,
12+
locale: ProjectEmailTemplateLocale.Af // optional
13+
});
14+
15+
console.log(result);
16+
```
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
```javascript
2+
import { Client, Console } from "@appwrite.io/console";
3+
4+
const client = new Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
7+
8+
const xconsole = new Console(client);
9+
10+
const result = await xconsole.listOrganizationScopes();
11+
12+
console.log(result);
13+
```

docs/examples/documentsdb/list.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const documentsDB = new DocumentsDB(client);
99

1010
const result = await documentsDB.list({
1111
queries: [], // optional
12-
search: '<SEARCH>', // optional
1312
total: false // optional
1413
});
1514

docs/examples/domains/get-price.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```javascript
2-
import { Client, Domains, RegistrationType } from "@appwrite.io/console";
2+
import { Client, Domains, DomainRegistrationType } from "@appwrite.io/console";
33

44
const client = new Client()
55
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -10,7 +10,7 @@ const domains = new Domains(client);
1010
const result = await domains.getPrice({
1111
domain: '',
1212
periodYears: null, // optional
13-
registrationType: RegistrationType.New // optional
13+
registrationType: DomainRegistrationType.New // optional
1414
});
1515

1616
console.log(result);

0 commit comments

Comments
 (0)