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
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24.14.1'
registry-url: 'https://registry.npmjs.org'
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

## 27.1.0

* Added: `Apps` service for managing OAuth2 applications, keys, and installations
* Added: `OAuth2` service with authorize, grant, device authorization, and consent flows
* Added: account OAuth2 consent methods `listConsents`, `getConsent`, `deleteConsent`, and consent token methods
* Added: app installation management methods to `Organization` and `Teams` services
* Added: `installationAccessTokenDuration` parameter to `project.updateOAuth2Server`
* Added: `token` parameter to `sites.getDeploymentDownload`
* Added: `oauth2.introspect` and organization installation key scopes

## 27.0.0

* Breaking: removed `Health` service, health enums, and health response models
Expand Down
15 changes: 15 additions & 0 deletions docs/examples/account/delete-consent-token.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
.setSession(''); // The user session to authenticate with

const account = new sdk.Account(client);

const result = await account.deleteConsentToken({
consentId: '<CONSENT_ID>',
tokenId: '<TOKEN_ID>'
});
```
14 changes: 14 additions & 0 deletions docs/examples/account/delete-consent.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
.setSession(''); // The user session to authenticate with

const account = new sdk.Account(client);

const result = await account.deleteConsent({
consentId: '<CONSENT_ID>'
});
```
15 changes: 15 additions & 0 deletions docs/examples/account/get-consent-token.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
.setSession(''); // The user session to authenticate with

const account = new sdk.Account(client);

const result = await account.getConsentToken({
consentId: '<CONSENT_ID>',
tokenId: '<TOKEN_ID>'
});
```
14 changes: 14 additions & 0 deletions docs/examples/account/get-consent.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
.setSession(''); // The user session to authenticate with

const account = new sdk.Account(client);

const result = await account.getConsent({
consentId: '<CONSENT_ID>'
});
```
16 changes: 16 additions & 0 deletions docs/examples/account/list-consent-tokens.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
.setSession(''); // The user session to authenticate with

const account = new sdk.Account(client);

const result = await account.listConsentTokens({
consentId: '<CONSENT_ID>',
queries: [], // optional
total: false // optional
});
```
15 changes: 15 additions & 0 deletions docs/examples/account/list-consents.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
.setSession(''); // The user session to authenticate with

const account = new sdk.Account(client);

const result = await account.listConsents({
queries: [], // optional
total: false // optional
});
```
15 changes: 15 additions & 0 deletions docs/examples/apps/create-installation-token.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 apps = new sdk.Apps(client);

const result = await apps.createInstallationToken({
appId: '<APP_ID>',
installationId: '<INSTALLATION_ID>'
});
```
14 changes: 14 additions & 0 deletions docs/examples/apps/create-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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.createKey({
appId: '<APP_ID>'
});
```
14 changes: 14 additions & 0 deletions docs/examples/apps/create-secret.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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.createSecret({
appId: '<APP_ID>'
});
```
32 changes: 32 additions & 0 deletions docs/examples/apps/create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
```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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.create({
appId: '<APP_ID>',
name: '<NAME>',
redirectUris: [],
description: '<DESCRIPTION>', // optional
clientUri: 'https://example.com', // optional
logoUri: 'https://example.com', // optional
privacyPolicyUrl: 'https://example.com', // optional
termsUrl: 'https://example.com', // optional
contacts: [], // optional
tagline: '<TAGLINE>', // optional
tags: [], // optional
images: [], // optional
supportUrl: 'https://example.com', // optional
dataDeletionUrl: 'https://example.com', // optional
postLogoutRedirectUris: [], // optional
enabled: false, // optional
type: 'public', // optional
deviceFlow: false, // optional
teamId: '<TEAM_ID>' // optional
});
```
15 changes: 15 additions & 0 deletions docs/examples/apps/delete-key.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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.deleteKey({
appId: '<APP_ID>',
keyId: '<KEY_ID>'
});
```
15 changes: 15 additions & 0 deletions docs/examples/apps/delete-secret.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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.deleteSecret({
appId: '<APP_ID>',
secretId: '<SECRET_ID>'
});
```
14 changes: 14 additions & 0 deletions docs/examples/apps/delete-tokens.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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.deleteTokens({
appId: '<APP_ID>'
});
```
14 changes: 14 additions & 0 deletions docs/examples/apps/delete.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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.delete({
appId: '<APP_ID>'
});
```
15 changes: 15 additions & 0 deletions docs/examples/apps/get-installation.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 apps = new sdk.Apps(client);

const result = await apps.getInstallation({
appId: '<APP_ID>',
installationId: '<INSTALLATION_ID>'
});
```
15 changes: 15 additions & 0 deletions docs/examples/apps/get-key.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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.getKey({
appId: '<APP_ID>',
keyId: '<KEY_ID>'
});
```
15 changes: 15 additions & 0 deletions docs/examples/apps/get-secret.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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.getSecret({
appId: '<APP_ID>',
secretId: '<SECRET_ID>'
});
```
14 changes: 14 additions & 0 deletions docs/examples/apps/get.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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.get({
appId: '<APP_ID>'
});
```
12 changes: 12 additions & 0 deletions docs/examples/apps/list-installation-scopes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.listInstallationScopes();
```
16 changes: 16 additions & 0 deletions docs/examples/apps/list-installations.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 apps = new sdk.Apps(client);

const result = await apps.listInstallations({
appId: '<APP_ID>',
queries: [], // optional
total: false // optional
});
```
16 changes: 16 additions & 0 deletions docs/examples/apps/list-keys.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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.listKeys({
appId: '<APP_ID>',
queries: [], // optional
total: false // optional
});
```
12 changes: 12 additions & 0 deletions docs/examples/apps/list-o-auth-2-scopes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```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
.setSession(''); // The user session to authenticate with

const apps = new sdk.Apps(client);

const result = await apps.listOAuth2Scopes();
```
Loading