Skip to content

Commit 2f041f8

Browse files
authored
Merge pull request #71 from appwrite/dev
feat: Console SDK update for version 6.0.0
2 parents 7e26de1 + 90fe52a commit 2f041f8

24 files changed

+852
-575
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Change Log
22

3+
## 6.0.0
4+
5+
* Breaking: Renamed `domains.confirmPurchase()` to `domains.updatePurchase()`
6+
* Breaking: Renamed `domains.confirmTransferIn()` to `domains.updateTransferIn()`
7+
* Breaking: Replaced `Projects` API with `Webhooks` for webhook usage
8+
* Breaking: Renamed `updateWebhook()` to `update()` on `Webhooks`
9+
* Breaking: Renamed `listWebhooks()` to `list()` on `Webhooks`
10+
* Breaking: Replaced `DomainPurchasePaymentStatus` with `DomainPurchaseStatus`
11+
* Breaking: Renamed `DomainTransferStatusStatus` to `DomainTransferStatus`
12+
* Breaking: Removed `Deno121`, `Deno124`, `Deno135` from `BuildRuntime`/`Runtime` enums
13+
* Updated README badge to API version `1.8.2`
14+
* Added `queries` option to `webhooks.list()`
15+
316
## 5.0.0
417

518
* Breaking: Functions and Sites now require `specification` parameter and support `deploymentRetention`

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.8.1-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.8.2-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@5.0.0"></script>
36+
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@6.0.0"></script>
3737
```
3838

3939

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const client = new Client()
77

88
const domains = new Domains(client);
99

10-
const result = await domains.confirmPurchase({
10+
const result = await domains.updatePurchase({
1111
domainId: '<DOMAIN_ID>',
1212
organizationId: '<ORGANIZATION_ID>'
1313
});

docs/examples/domains/confirm-transfer-in.md renamed to docs/examples/domains/update-transfer-in.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const client = new Client()
77

88
const domains = new Domains(client);
99

10-
const result = await domains.confirmTransferIn({
10+
const result = await domains.updateTransferIn({
1111
domainId: '<DOMAIN_ID>',
1212
organizationId: '<ORGANIZATION_ID>'
1313
});
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
```javascript
2-
import { Client, Projects } from "@appwrite.io/console";
2+
import { Client, Webhooks } from "@appwrite.io/console";
33

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

8-
const projects = new Projects(client);
8+
const webhooks = new Webhooks(client);
99

10-
const result = await projects.updateWebhook({
11-
projectId: '<PROJECT_ID>',
10+
const result = await webhooks.create({
1211
webhookId: '<WEBHOOK_ID>',
12+
url: '',
1313
name: '<NAME>',
1414
events: [],
15-
url: '',
16-
security: false,
1715
enabled: false, // optional
16+
security: false, // optional
1817
httpUser: '<HTTP_USER>', // optional
1918
httpPass: '<HTTP_PASS>' // optional
2019
});
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
```javascript
2-
import { Client, Projects } from "@appwrite.io/console";
2+
import { Client, Webhooks } from "@appwrite.io/console";
33

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

8-
const projects = new Projects(client);
8+
const webhooks = new Webhooks(client);
99

10-
const result = await projects.getWebhook({
11-
projectId: '<PROJECT_ID>',
10+
const result = await webhooks.delete({
1211
webhookId: '<WEBHOOK_ID>'
1312
});
1413

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
```javascript
2-
import { Client, Projects } from "@appwrite.io/console";
2+
import { Client, Webhooks } from "@appwrite.io/console";
33

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

8-
const projects = new Projects(client);
8+
const webhooks = new Webhooks(client);
99

10-
const result = await projects.deleteWebhook({
11-
projectId: '<PROJECT_ID>',
10+
const result = await webhooks.get({
1211
webhookId: '<WEBHOOK_ID>'
1312
});
1413

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

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

8-
const projects = new Projects(client);
8+
const webhooks = new Webhooks(client);
99

10-
const result = await projects.listWebhooks({
11-
projectId: '<PROJECT_ID>',
10+
const result = await webhooks.list({
11+
queries: [], // optional
1212
total: false // optional
1313
});
1414

docs/examples/projects/update-webhook-signature.md renamed to docs/examples/webhooks/update-signature.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
```javascript
2-
import { Client, Projects } from "@appwrite.io/console";
2+
import { Client, Webhooks } from "@appwrite.io/console";
33

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

8-
const projects = new Projects(client);
8+
const webhooks = new Webhooks(client);
99

10-
const result = await projects.updateWebhookSignature({
11-
projectId: '<PROJECT_ID>',
10+
const result = await webhooks.updateSignature({
1211
webhookId: '<WEBHOOK_ID>'
1312
});
1413

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

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

8-
const projects = new Projects(client);
8+
const webhooks = new Webhooks(client);
99

10-
const result = await projects.createWebhook({
11-
projectId: '<PROJECT_ID>',
10+
const result = await webhooks.update({
11+
webhookId: '<WEBHOOK_ID>',
1212
name: '<NAME>',
13-
events: [],
1413
url: '',
15-
security: false,
14+
events: [],
1615
enabled: false, // optional
16+
security: false, // optional
1717
httpUser: '<HTTP_USER>', // optional
1818
httpPass: '<HTTP_PASS>' // optional
1919
});

0 commit comments

Comments
 (0)