Skip to content
Closed
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
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
node-version: '24.14.1'
registry-url: 'https://registry.npmjs.org'

- name: Update npm to latest version for OIDC support
run: npm install -g npm@latest
- name: Pin npm for trusted publishing
run: npm install -g npm@11.10.0

- name: Determine release tag
id: release_tag
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Change Log

## 24.0.0

* [BREAKING] Renamed Webhook model fields: `security` → `tls`, `httpUser` → `authUsername`, `httpPass` → `authPassword`, `signatureKey` → `secret`
* [BREAKING] Renamed Webhook service parameters to match: `security` → `tls`, `httpUser` → `authUsername`, `httpPass` → `authPassword`
* [BREAKING] Renamed `Webhooks.updateSignature()` to `Webhooks.updateSecret()` with new optional `secret` parameter
* Added `Client.getHeaders()` method to retrieve request headers
* Added `secret` parameter to Webhook create and update methods
* Added `x` OAuth provider to `OAuthProvider` enum
* Added `userType` field to `Log` model
* Added `purge` parameter to `updateCollection` and `updateTable` for cache invalidation
* Added Project service: platform CRUD, key CRUD, protocol/service status management
* Added new models: `Key`, `KeyList`, `Project`, `DevKey`, `MockNumber`, `AuthProvider`, `PlatformAndroid`, `PlatformApple`, `PlatformLinux`, `PlatformList`, `PlatformWeb`, `PlatformWindows`, `BillingLimits`, `Block`
* Added new enums: `PlatformType`, `ProtocolId`, `ServiceId`
* Updated `BuildRuntime`, `Runtime` enums with `dart-3.11` and `flutter-3.41`
* Updated `Scopes` enum with `keysRead`, `keysWrite`, `platformsRead`, `platformsWrite`
* Updated `X-Appwrite-Response-Format` header to `1.9.1`
* Updated TTL description for list caching in Databases and TablesDB

## 23.1.0

* Added: Added `getHeaders()` method to `Client` to expose current request headers
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Appwrite Node.js SDK

![License](https://img.shields.io/github/license/appwrite/sdk-for-node.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
2 changes: 1 addition & 1 deletion docs/examples/databases/create-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const result = await databases.createDatetimeAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '', // optional
default: '2020-10-15T06:38:00.000+00:00', // optional
array: false // optional
});
```
3 changes: 2 additions & 1 deletion docs/examples/databases/update-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const result = await databases.updateCollection({
name: '<NAME>', // optional
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
documentSecurity: false, // optional
enabled: false // optional
enabled: false, // optional
purge: false // optional
});
```
2 changes: 1 addition & 1 deletion docs/examples/databases/update-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const result = await databases.updateDatetimeAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '',
default: '2020-10-15T06:38:00.000+00:00',
newKey: '' // optional
});
```
2 changes: 1 addition & 1 deletion docs/examples/messaging/create-email.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ const result = await messaging.createEmail({
attachments: [], // optional
draft: false, // optional
html: false, // optional
scheduledAt: '' // optional
scheduledAt: '2020-10-15T06:38:00.000+00:00' // optional
});
```
2 changes: 1 addition & 1 deletion docs/examples/messaging/create-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const result = await messaging.createPush({
tag: '<TAG>', // optional
badge: null, // optional
draft: false, // optional
scheduledAt: '', // optional
scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional
contentAvailable: false, // optional
critical: false, // optional
priority: sdk.MessagePriority.Normal // optional
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/messaging/create-sms.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ const result = await messaging.createSMS({
users: [], // optional
targets: [], // optional
draft: false, // optional
scheduledAt: '' // optional
scheduledAt: '2020-10-15T06:38:00.000+00:00' // optional
});
```
2 changes: 1 addition & 1 deletion docs/examples/messaging/update-email.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const result = await messaging.updateEmail({
html: false, // optional
cc: [], // optional
bcc: [], // optional
scheduledAt: '', // optional
scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional
attachments: [] // optional
});
```
2 changes: 1 addition & 1 deletion docs/examples/messaging/update-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const result = await messaging.updatePush({
tag: '<TAG>', // optional
badge: null, // optional
draft: false, // optional
scheduledAt: '', // optional
scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional
contentAvailable: false, // optional
critical: false, // optional
priority: sdk.MessagePriority.Normal // optional
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/messaging/update-sms.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ const result = await messaging.updateSMS({
targets: [], // optional
content: '<CONTENT>', // optional
draft: false, // optional
scheduledAt: '' // optional
scheduledAt: '2020-10-15T06:38:00.000+00:00' // optional
});
```
16 changes: 16 additions & 0 deletions docs/examples/project/create-android-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.createAndroidPlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
applicationId: '<APPLICATION_ID>'
});
```
16 changes: 16 additions & 0 deletions docs/examples/project/create-apple-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.createApplePlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
bundleIdentifier: '<BUNDLE_IDENTIFIER>'
});
```
17 changes: 17 additions & 0 deletions docs/examples/project/create-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.createKey({
keyId: '<KEY_ID>',
name: '<NAME>',
scopes: [sdk.Scopes.SessionsWrite],
expire: '2020-10-15T06:38:00.000+00:00' // optional
});
```
16 changes: 16 additions & 0 deletions docs/examples/project/create-linux-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.createLinuxPlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
packageName: '<PACKAGE_NAME>'
});
```
16 changes: 16 additions & 0 deletions docs/examples/project/create-web-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.createWebPlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
hostname: 'app.example.com'
});
```
16 changes: 16 additions & 0 deletions docs/examples/project/create-windows-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.createWindowsPlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
packageIdentifierName: '<PACKAGE_IDENTIFIER_NAME>'
});
```
14 changes: 14 additions & 0 deletions docs/examples/project/delete-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.deleteKey({
keyId: '<KEY_ID>'
});
```
14 changes: 14 additions & 0 deletions docs/examples/project/delete-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.deletePlatform({
platformId: '<PLATFORM_ID>'
});
```
14 changes: 14 additions & 0 deletions docs/examples/project/get-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.getKey({
keyId: '<KEY_ID>'
});
```
14 changes: 14 additions & 0 deletions docs/examples/project/get-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.getPlatform({
platformId: '<PLATFORM_ID>'
});
```
15 changes: 15 additions & 0 deletions docs/examples/project/list-keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.listKeys({
queries: [], // optional
total: false // optional
});
```
15 changes: 15 additions & 0 deletions docs/examples/project/list-platforms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.listPlatforms({
queries: [], // optional
total: false // optional
});
```
16 changes: 16 additions & 0 deletions docs/examples/project/update-android-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.updateAndroidPlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
applicationId: '<APPLICATION_ID>'
});
```
16 changes: 16 additions & 0 deletions docs/examples/project/update-apple-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.updateApplePlatform({
platformId: '<PLATFORM_ID>',
name: '<NAME>',
bundleIdentifier: '<BUNDLE_IDENTIFIER>'
});
```
17 changes: 17 additions & 0 deletions docs/examples/project/update-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.updateKey({
keyId: '<KEY_ID>',
name: '<NAME>',
scopes: [sdk.Scopes.SessionsWrite],
expire: '2020-10-15T06:38:00.000+00:00' // optional
});
```
14 changes: 14 additions & 0 deletions docs/examples/project/update-labels.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```javascript
const sdk = require('node-appwrite');

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

const project = new sdk.Project(client);

const result = await project.updateLabels({
labels: []
});
```
Loading
Loading