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
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Change Log

## 9.0.0

* Breaking: Moved `keys`, `labels`, and `platforms` methods from `Projects` to `Project` service
* Breaking: Replaced generic `Platform` model and `PlatformType` enum with typed models: `PlatformWeb`, `PlatformApple`, `PlatformAndroid`, `PlatformWindows`, `PlatformLinux`
* Breaking: Replaced generic `createPlatform`/`updatePlatform` with platform-specific methods: `createAndroidPlatform`, `createApplePlatform`, `createLinuxPlatform`, `createWebPlatform`, `createWindowsPlatform` (and corresponding update variants). The `key` parameter was renamed to platform-specific terminology, such as `bundleIdentifier` or `packageName`
* Breaking: Removed `PlatformList` model from `Projects` service (now returned by `Project` service)
* Breaking: Removed `updateApiStatus`, `updateApiStatusAll`, `updateAPIStatus`, `updateAPIStatusAll` methods and `Api`, `ApiService` enums from `Projects` service
* Breaking: Renamed webhook parameters `security` to `tls`, `httpUser` to `authUsername`, `httpPass` to `authPassword`, `signatureKey` to `secret`
* Breaking: Renamed `updateSignature` to `updateSecret` in `Webhooks` service
* Added `updateCanonicalEmails`, `updateDisposableEmails`, `updateFreeEmails` methods to `Project` service
* Added `updateProtocolStatus`, `updateServiceStatus` methods to `Project` service with new `ProtocolId` and `ServiceId` enums
* Added `purge` parameter to `databases.updateCollection` and `tablesDb.updateTable`
* Added `x` (Twitter/X) to `OAuthProvider` enum
* Added `keys.read`, `keys.write`, `platforms.read`, `platforms.write` to `Scopes` enum
* Added `userType` field to audit log model
* Added service and protocol status fields to `Project` model
* Added `supportsDisposableEmailValidation`, `supportsCanonicalEmailValidation`, `supportsFreeEmailValidation` fields to plan model
* Updated `ttl` parameter description for `databases.listDocuments` and `tablesDb.listRows` with detailed caching behaviour

## 8.3.0

* Added addon management methods to Organizations service: `listAddons`, `createBaaAddon`, `getAddon`, `deleteAddon`, `confirmAddonPayment`, `getAddonPrice`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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.9.0-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.9.1-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)
Expand Down 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.3.0"></script>
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@9.0.0"></script>
```


Expand Down
3 changes: 2 additions & 1 deletion docs/examples/databases/update-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const result = await databases.updateCollection({
name: '<NAME>', // optional
permissions: [Permission.read(Role.any())], // optional
documentSecurity: false, // optional
enabled: false // optional
enabled: false, // optional
purge: false // optional
});

console.log(result);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/organizations/create-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const organizations = new Organizations(client);
const result = await organizations.createKey({
organizationId: '<ORGANIZATION_ID>',
name: '<NAME>',
scopes: [Scopes.PlatformsRead],
scopes: [Scopes.ProjectsRead],
expire: '2020-10-15T06:38:00.000+00:00' // optional
});

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/organizations/update-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const result = await organizations.updateKey({
organizationId: '<ORGANIZATION_ID>',
keyId: '<KEY_ID>',
name: '<NAME>',
scopes: [Scopes.PlatformsRead],
scopes: [Scopes.ProjectsRead],
expire: '2020-10-15T06:38:00.000+00:00' // optional
});

Expand Down
17 changes: 17 additions & 0 deletions docs/examples/project/create-android-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
import { Client, Project } 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 project = new Project(client);

const result = await project.createAndroidPlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
applicationId: '<APPLICATION_ID>'
});

console.log(result);
```
17 changes: 17 additions & 0 deletions docs/examples/project/create-apple-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
import { Client, Project } 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 project = new Project(client);

const result = await project.createApplePlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
bundleIdentifier: '<BUNDLE_IDENTIFIER>'
});

console.log(result);
```
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
```javascript
import { Client, Projects, Scopes } from "@appwrite.io/console";
import { Client, Project, Scopes } 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 projects = new Projects(client);
const project = new Project(client);

const result = await projects.createKey({
projectId: '<PROJECT_ID>',
const result = await project.createKey({
keyId: '<KEY_ID>',
name: '<NAME>',
scopes: [Scopes.SessionsWrite],
keyId: '<KEY_ID>', // optional
expire: '2020-10-15T06:38:00.000+00:00' // optional
});

Expand Down
17 changes: 17 additions & 0 deletions docs/examples/project/create-linux-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
import { Client, Project } 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 project = new Project(client);

const result = await project.createLinuxPlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
packageName: '<PACKAGE_NAME>'
});

console.log(result);
```
17 changes: 17 additions & 0 deletions docs/examples/project/create-web-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
import { Client, Project } 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 project = new Project(client);

const result = await project.createWebPlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
hostname: 'app.example.com'
});

console.log(result);
```
17 changes: 17 additions & 0 deletions docs/examples/project/create-windows-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
import { Client, Project } 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 project = new Project(client);

const result = await project.createWindowsPlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
packageIdentifierName: '<PACKAGE_IDENTIFIER_NAME>'
});

console.log(result);
```
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
```javascript
import { Client, Projects } from "@appwrite.io/console";
import { Client, Project } 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 projects = new Projects(client);
const project = new Project(client);

const result = await projects.deleteKey({
projectId: '<PROJECT_ID>',
const result = await project.deleteKey({
keyId: '<KEY_ID>'
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
```javascript
import { Client, Projects } from "@appwrite.io/console";
import { Client, Project } 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 projects = new Projects(client);
const project = new Project(client);

const result = await projects.deletePlatform({
projectId: '<PROJECT_ID>',
const result = await project.deletePlatform({
platformId: '<PLATFORM_ID>'
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
```javascript
import { Client, Projects } from "@appwrite.io/console";
import { Client, Project } 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 projects = new Projects(client);
const project = new Project(client);

const result = await projects.getKey({
projectId: '<PROJECT_ID>',
const result = await project.getKey({
keyId: '<KEY_ID>'
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
```javascript
import { Client, Projects } from "@appwrite.io/console";
import { Client, Project } 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 projects = new Projects(client);
const project = new Project(client);

const result = await projects.getPlatform({
projectId: '<PROJECT_ID>',
const result = await project.getPlatform({
platformId: '<PLATFORM_ID>'
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
```javascript
import { Client, Projects } from "@appwrite.io/console";
import { Client, Project } 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 projects = new Projects(client);
const project = new Project(client);

const result = await projects.listKeys({
projectId: '<PROJECT_ID>',
const result = await project.listKeys({
queries: [], // optional
total: false // optional
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
```javascript
import { Client, Projects } from "@appwrite.io/console";
import { Client, Project } 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 projects = new Projects(client);
const project = new Project(client);

const result = await projects.listPlatforms({
projectId: '<PROJECT_ID>',
const result = await project.listPlatforms({
queries: [], // optional
total: false // optional
});

Expand Down
17 changes: 17 additions & 0 deletions docs/examples/project/update-android-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
import { Client, Project } 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 project = new Project(client);

const result = await project.updateAndroidPlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
applicationId: '<APPLICATION_ID>'
});

console.log(result);
```
17 changes: 17 additions & 0 deletions docs/examples/project/update-apple-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
import { Client, Project } 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 project = new Project(client);

const result = await project.updateApplePlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
bundleIdentifier: '<BUNDLE_IDENTIFIER>'
});

console.log(result);
```
15 changes: 15 additions & 0 deletions docs/examples/project/update-canonical-emails.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
import { Client, Project } 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 project = new Project(client);

const result = await project.updateCanonicalEmails({
enabled: false
});

console.log(result);
```
15 changes: 15 additions & 0 deletions docs/examples/project/update-disposable-emails.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
import { Client, Project } 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 project = new Project(client);

const result = await project.updateDisposableEmails({
enabled: false
});

console.log(result);
```
15 changes: 15 additions & 0 deletions docs/examples/project/update-free-emails.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
import { Client, Project } 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 project = new Project(client);

const result = await project.updateFreeEmails({
enabled: false
});

console.log(result);
```
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
```javascript
import { Client, Projects, Scopes } from "@appwrite.io/console";
import { Client, Project, Scopes } 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 projects = new Projects(client);
const project = new Project(client);

const result = await projects.updateKey({
projectId: '<PROJECT_ID>',
const result = await project.updateKey({
keyId: '<KEY_ID>',
name: '<NAME>',
scopes: [Scopes.SessionsWrite],
Expand Down
Loading