Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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

## 8.3.0

* Added addon management methods to Organizations service: `listAddons`, `createBaaAddon`, `getAddon`, `deleteAddon`, `confirmAddonPayment`, `getAddonPrice`
* Added `Addon` enum and `BillingPlanSupportedAddons` model
* Added `templateRepository`, `templateOwner`, `templateRootDirectory`, `templateVersion` optional parameters to `functions.create`
* Added `authDisposableEmails`, `authCanonicalEmails`, `authFreeEmails` fields to Project model
* Added `supportForIntegerIds` field to database adapter model
* Added descriptions to `createJSONExport` and `createJSONImport` migration methods
* Updated `ProxyRule` field descriptions for clarity

## 8.2.0

* Added: `createJSONExport()` and `createJSONImport()` methods to Migrations service
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.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@8.2.0"></script>
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@8.3.0"></script>
```


Expand Down
41 changes: 19 additions & 22 deletions docs/examples/avatars/get-screenshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,25 @@ const avatars = new Avatars(client);

const result = avatars.getScreenshot({
url: 'https://example.com',
headers: {
"Authorization": "Bearer token123",
"X-Custom-Header": "value"
}, // optional
viewportWidth: 1920, // optional
viewportHeight: 1080, // optional
scale: 2, // optional
theme: Theme.Dark, // optional
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional
fullpage: true, // optional
locale: 'en-US', // optional
timezone: Timezone.AmericaNewYork, // optional
latitude: 37.7749, // optional
longitude: -122.4194, // optional
accuracy: 100, // optional
touch: true, // optional
permissions: [BrowserPermission.Geolocation, BrowserPermission.Notifications], // optional
sleep: 3, // optional
width: 800, // optional
height: 600, // optional
quality: 85, // optional
output: ImageFormat.Jpeg // optional
headers: {}, // optional
viewportWidth: 1, // optional
viewportHeight: 1, // optional
scale: 0.1, // optional
theme: Theme.Light, // optional
userAgent: '<USER_AGENT>', // optional
fullpage: false, // optional
locale: '<LOCALE>', // optional
timezone: Timezone.AfricaAbidjan, // optional
latitude: -90, // optional
longitude: -180, // optional
accuracy: 0, // optional
touch: false, // optional
permissions: [BrowserPermission.Geolocation], // optional
sleep: 0, // optional
width: 0, // optional
height: 0, // optional
quality: -1, // optional
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Outdated
output: ImageFormat.Jpg // optional
});

console.log(result);
Expand Down
8 changes: 1 addition & 7 deletions docs/examples/databases/create-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ const result = await databases.createDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
data: {},
permissions: [Permission.read(Role.any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
Expand Down
8 changes: 1 addition & 7 deletions docs/examples/databases/update-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ const result = await databases.updateDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 33,
"isAdmin": false
}, // optional
data: {}, // optional
permissions: [Permission.read(Role.any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
Expand Down
8 changes: 1 addition & 7 deletions docs/examples/databases/update-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@ const databases = new Databases(client);
const result = await databases.updateDocuments({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 33,
"isAdmin": false
}, // optional
data: {}, // optional
queries: [], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
Expand Down
8 changes: 1 addition & 7 deletions docs/examples/databases/upsert-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ const result = await databases.upsertDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
}, // optional
data: {}, // optional
permissions: [Permission.read(Role.any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
Expand Down
4 changes: 4 additions & 0 deletions docs/examples/functions/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ const result = await functions.create({
providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional
buildSpecification: '', // optional
runtimeSpecification: '', // optional
templateRepository: '<TEMPLATE_REPOSITORY>', // optional
templateOwner: '<TEMPLATE_OWNER>', // optional
templateRootDirectory: '<TEMPLATE_ROOT_DIRECTORY>', // optional
templateVersion: '<TEMPLATE_VERSION>', // optional
deploymentRetention: 0 // optional
});

Expand Down
16 changes: 16 additions & 0 deletions docs/examples/organizations/confirm-addon-payment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Organizations } from "@appwrite.io/console";

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

const organizations = new Organizations(client);

const result = await organizations.confirmAddonPayment({
organizationId: '<ORGANIZATION_ID>',
addonId: '<ADDON_ID>'
});

console.log(result);
```
15 changes: 15 additions & 0 deletions docs/examples/organizations/create-baa-addon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
import { Client, Organizations } from "@appwrite.io/console";

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

const organizations = new Organizations(client);

const result = await organizations.createBaaAddon({
organizationId: '<ORGANIZATION_ID>'
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/organizations/delete-addon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Organizations } from "@appwrite.io/console";

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

const organizations = new Organizations(client);

const result = await organizations.deleteAddon({
organizationId: '<ORGANIZATION_ID>',
addonId: '<ADDON_ID>'
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/organizations/get-addon-price.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Organizations, Addon } from "@appwrite.io/console";

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

const organizations = new Organizations(client);

const result = await organizations.getAddonPrice({
organizationId: '<ORGANIZATION_ID>',
addon: Addon.Baa
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/organizations/get-addon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Organizations } from "@appwrite.io/console";

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

const organizations = new Organizations(client);

const result = await organizations.getAddon({
organizationId: '<ORGANIZATION_ID>',
addonId: '<ADDON_ID>'
});

console.log(result);
```
15 changes: 15 additions & 0 deletions docs/examples/organizations/list-addons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
import { Client, Organizations } from "@appwrite.io/console";

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

const organizations = new Organizations(client);

const result = await organizations.listAddons({
organizationId: '<ORGANIZATION_ID>'
});

console.log(result);
```
8 changes: 1 addition & 7 deletions docs/examples/tablesdb/create-row.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ const result = await tablesDB.createRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
data: {},
permissions: [Permission.read(Role.any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
Expand Down
8 changes: 1 addition & 7 deletions docs/examples/tablesdb/update-row.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ const result = await tablesDB.updateRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 33,
"isAdmin": false
}, // optional
data: {}, // optional
permissions: [Permission.read(Role.any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
Expand Down
8 changes: 1 addition & 7 deletions docs/examples/tablesdb/update-rows.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@ const tablesDB = new TablesDB(client);
const result = await tablesDB.updateRows({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 33,
"isAdmin": false
}, // optional
data: {}, // optional
queries: [], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
Expand Down
8 changes: 1 addition & 7 deletions docs/examples/tablesdb/upsert-row.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ const result = await tablesDB.upsertRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 33,
"isAdmin": false
}, // optional
data: {}, // optional
permissions: [Permission.read(Role.any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
});
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@appwrite.io/console",
"homepage": "https://appwrite.io/support",
"description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
"version": "8.2.0",
"version": "8.3.0",
"license": "BSD-3-Clause",
"main": "dist/cjs/sdk.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ class Client {
'x-sdk-name': 'Console',
'x-sdk-platform': 'console',
'x-sdk-language': 'web',
'x-sdk-version': '8.2.0',
'x-sdk-version': '8.3.0',
'X-Appwrite-Response-Format': '1.9.0',
};

Expand Down
3 changes: 3 additions & 0 deletions src/enums/addon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export enum Addon {
Baa = 'baa',
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export { AppwriteMigrationResource } from './enums/appwrite-migration-resource';
export { FirebaseMigrationResource } from './enums/firebase-migration-resource';
export { NHostMigrationResource } from './enums/n-host-migration-resource';
export { SupabaseMigrationResource } from './enums/supabase-migration-resource';
export { Addon } from './enums/addon';
export { ProjectUsageRange } from './enums/project-usage-range';
export { Region } from './enums/region';
export { Api } from './enums/api';
Expand Down
Loading
Loading