Skip to content

Commit 20b60d1

Browse files
authored
Merge pull request #145 from appwrite/dev
2 parents ae25f4a + b9a5684 commit 20b60d1

Some content is hidden

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

61 files changed

+11915
-376
lines changed

CHANGELOG.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
# Change Log
22

3-
## 22.2.0
4-
5-
* Added ttl option to listDocuments for cached responses
6-
* Added getConsolePausing health status endpoint in Health service
7-
* Added Health.getConsolePausing overloads (object and positional)
8-
* Added updateRelationshipAttribute for Databases to manage relationship attributes
9-
* Added console pausing example to health docs
10-
* Made activate optional in createDeployment object parameter
3+
## 23.0.0
4+
5+
* [BREAKING] Changed `$sequence` type from `number` to `string` for `Row` and `Document` models
6+
* [BREAKING] Renamed `IndexType` enum: split into `DatabasesIndexType` (with new `Spatial` value) and `TablesDBIndexType`
7+
* [BREAKING] Replaced `specification` parameter with `buildSpecification` and `runtimeSpecification` in `Functions.create()`, `Functions.update()`, `Sites.create()`, `Sites.update()`
8+
* Added new `Project` service with full CRUD for project-level environment variables
9+
* Added new `Webhooks` service with full CRUD for project webhooks (including `updateSignature`)
10+
* Added `Users.updateImpersonator()` method for enabling/disabling user impersonation
11+
* Added impersonation support: `setImpersonateUserId()`, `setImpersonateUserEmail()`, `setImpersonateUserPhone()` on `Client`
12+
* Added `impersonator` and `impersonatorUserId` optional fields to `User` model
13+
* Added `deploymentRetention` parameter to Functions and Sites create/update
14+
* Added `startCommand` parameter to Sites create/update
15+
* Added `Webhook` and `WebhookList` models
16+
* Added `Documentsdb`, `Vectorsdb` values to `BackupServices` and `DatabaseType` enums
17+
* Added `WebhooksRead`, `WebhooksWrite`, `ProjectRead`, `ProjectWrite` scopes
18+
* Added custom `toString()` on response data using `JSONbig.stringify` for BigInt support
19+
* Removed `getQueueBillingProjectAggregation`, `getQueueBillingTeamAggregation`, `getQueuePriorityBuilds`, `getQueueRegionManager`, `getQueueThreats` from `Health` service
20+
* Updated `Log` model field descriptions to clarify impersonation behavior
21+
* Updated `X-Appwrite-Response-Format` header to `1.9.0`
1122

1223
## 22.1.2
1324

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Appwrite Node.js SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-node.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.9.0-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)
88

9-
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-node/releases).**
9+
**This SDK is compatible with Appwrite server version 1.9.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-node/releases).**
1010

1111
> This is the Node.js SDK for integrating with Appwrite from your Node.js server-side code.
1212
If you're looking to integrate from the browser, you should check [appwrite/sdk-for-web](https://github.com/appwrite/sdk-for-web)

docs/examples/databases/create-index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const result = await databases.createIndex({
1212
databaseId: '<DATABASE_ID>',
1313
collectionId: '<COLLECTION_ID>',
1414
key: '',
15-
type: sdk.IndexType.Key,
15+
type: sdk.DatabasesIndexType.Key,
1616
attributes: [],
1717
orders: [sdk.OrderBy.Asc], // optional
1818
lengths: [] // optional

docs/examples/functions/create.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ const result = await functions.create({
2626
providerBranch: '<PROVIDER_BRANCH>', // optional
2727
providerSilentMode: false, // optional
2828
providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional
29-
specification: '' // optional
29+
buildSpecification: '', // optional
30+
runtimeSpecification: '', // optional
31+
deploymentRetention: 0 // optional
3032
});
3133
```

docs/examples/functions/update.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ const result = await functions.update({
2626
providerBranch: '<PROVIDER_BRANCH>', // optional
2727
providerSilentMode: false, // optional
2828
providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional
29-
specification: '' // optional
29+
buildSpecification: '', // optional
30+
runtimeSpecification: '', // optional
31+
deploymentRetention: 0 // optional
3032
});
3133
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
```javascript
2+
const sdk = require('node-appwrite');
3+
4+
const client = new sdk.Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>') // Your project ID
7+
.setKey('<YOUR_API_KEY>'); // Your secret API key
8+
9+
const project = new sdk.Project(client);
10+
11+
const result = await project.createVariable({
12+
variableId: '<VARIABLE_ID>',
13+
key: '<KEY>',
14+
value: '<VALUE>',
15+
secret: false // optional
16+
});
17+
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
```javascript
2+
const sdk = require('node-appwrite');
3+
4+
const client = new sdk.Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>') // Your project ID
7+
.setKey('<YOUR_API_KEY>'); // Your secret API key
8+
9+
const project = new sdk.Project(client);
10+
11+
const result = await project.deleteVariable({
12+
variableId: '<VARIABLE_ID>'
13+
});
14+
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
```javascript
2+
const sdk = require('node-appwrite');
3+
4+
const client = new sdk.Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>') // Your project ID
7+
.setKey('<YOUR_API_KEY>'); // Your secret API key
8+
9+
const project = new sdk.Project(client);
10+
11+
const result = await project.getVariable({
12+
variableId: '<VARIABLE_ID>'
13+
});
14+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
```javascript
2+
const sdk = require('node-appwrite');
3+
4+
const client = new sdk.Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>') // Your project ID
7+
.setKey('<YOUR_API_KEY>'); // Your secret API key
8+
9+
const project = new sdk.Project(client);
10+
11+
const result = await project.listVariables({
12+
queries: [], // optional
13+
total: false // optional
14+
});
15+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
```javascript
2+
const sdk = require('node-appwrite');
3+
4+
const client = new sdk.Client()
5+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6+
.setProject('<YOUR_PROJECT_ID>') // Your project ID
7+
.setKey('<YOUR_API_KEY>'); // Your secret API key
8+
9+
const project = new sdk.Project(client);
10+
11+
const result = await project.updateVariable({
12+
variableId: '<VARIABLE_ID>',
13+
key: '<KEY>', // optional
14+
value: '<VALUE>', // optional
15+
secret: false // optional
16+
});
17+
```

0 commit comments

Comments
 (0)