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

## 30.0.0

* Breaking: `account.listLogs`, `users.listLogs`, `Log` and `LogList` removed
* Breaking: `organization` key methods renamed to `createEphemeralProjectKey`, `getProjectKey`, `listProjectKeys`, `updateProjectKey`, `deleteProjectKey`, and `OrganizationKeyScopes` removed
* Breaking: `setDevKey` client method, `DevKey` model and `Project.devKeys` removed
* Breaking: `region`, `reason`, `projectName`, `organizationId`, `organizationName`, `billingPlan` removed from `Block`
* Breaking: `DedicatedDatabaseSpecificationList.pricing` and `DedicatedDatabaseSpecificationPricing` removed; rates now live on each `DedicatedDatabaseSpecification`
* Breaking: `BillingPlanGroup.Starter` replaced by `Free` and `Start`
* Added: `oauth2.introspect` for RFC 7662 token introspection with an API key, returning the `Oauth2Introspection` model
* Added: `domains` service for domains, DNS records, email presets, prices and transfers
* Added: `account.createIdTokenSession` and email verification and recovery OTP methods
* Added: `messaging.createAppwriteProvider` and `messaging.updateAppwriteProvider`
* Added: `project.updatePasswordPwnedPolicy` with `PolicyPasswordPwned` model and `User.passwordPwned`
* Added: Kakao and TikTok OAuth2 providers
* Added: native client IDs on the Apple and Google OAuth2 providers
* Added: reply-to on email messages, `qos` and `expiry` on topics
* Added: `ImageGravity.Auto`, `jaspr` framework, and `dart-3.13` and `flutter-3.47` runtimes
* Updated: requests send `X-Appwrite-Response-Format` `2.3.0`

## 29.0.0

* Stable release of the dedicated database APIs: `mysql`, `postgresql`, `mongo`, `documentsDB`, and `vectorsDB` services, previously released as release candidates
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 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-2.0.0-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-2.3.0-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)

**This SDK targets Appwrite server version 1.9.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-node/releases) when APIs differ.
**This SDK targets Appwrite server version latest as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-node/releases) when APIs differ.

> This is the Node.js SDK for integrating with Appwrite from your Node.js server-side code.
If you're looking to integrate from the browser, you should check [appwrite/sdk-for-web](https://github.com/appwrite/sdk-for-web)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ const client = new sdk.Client()

const account = new sdk.Account(client);

const result = await account.listLogs({
queries: [], // optional
total: false, // optional
const result = await account.createEmailVerificationOTP({
phrase: false, // optional
});
```
19 changes: 19 additions & 0 deletions docs/examples/account/create-id-token-session.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```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.createIdTokenSession({
provider: sdk.IdTokenProvider.Apple,
idToken: '<ID_TOKEN>',
nonce: '<NONCE>', // optional
accessToken: '<ACCESS_TOKEN>', // optional
accessTokenExpiry: 0, // optional
name: '<NAME>', // optional
});
```
15 changes: 15 additions & 0 deletions docs/examples/account/create-recovery-otp.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.createRecoveryOTP({
email: 'email@example.com',
phrase: false, // optional
});
```
15 changes: 15 additions & 0 deletions docs/examples/account/update-email-verification-otp.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.updateEmailVerificationOTP({
userId: '<USER_ID>',
secret: '<SECRET>',
});
```
16 changes: 16 additions & 0 deletions docs/examples/account/update-recovery-otp.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.updateRecoveryOTP({
userId: '<USER_ID>',
secret: '<SECRET>',
password: 'password',
});
```
14 changes: 14 additions & 0 deletions docs/examples/domains/create-preset-google-workspace.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 domains = new sdk.Domains(client);

const result = await domains.createPresetGoogleWorkspace({
domainId: '<DOMAIN_ID>',
});
```
14 changes: 14 additions & 0 deletions docs/examples/domains/create-preset-i-cloud.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 domains = new sdk.Domains(client);

const result = await domains.createPresetICloud({
domainId: '<DOMAIN_ID>',
});
```
14 changes: 14 additions & 0 deletions docs/examples/domains/create-preset-mailgun.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 domains = new sdk.Domains(client);

const result = await domains.createPresetMailgun({
domainId: '<DOMAIN_ID>',
});
```
14 changes: 14 additions & 0 deletions docs/examples/domains/create-preset-outlook.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 domains = new sdk.Domains(client);

const result = await domains.createPresetOutlook({
domainId: '<DOMAIN_ID>',
});
```
14 changes: 14 additions & 0 deletions docs/examples/domains/create-preset-proton-mail.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 domains = new sdk.Domains(client);

const result = await domains.createPresetProtonMail({
domainId: '<DOMAIN_ID>',
});
```
14 changes: 14 additions & 0 deletions docs/examples/domains/create-preset-zoho.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 domains = new sdk.Domains(client);

const result = await domains.createPresetZoho({
domainId: '<DOMAIN_ID>',
});
```
18 changes: 18 additions & 0 deletions docs/examples/domains/create-record-a.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```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 domains = new sdk.Domains(client);

const result = await domains.createRecordA({
domainId: '<DOMAIN_ID>',
name: '',
value: '',
ttl: 1,
comment: '<COMMENT>', // optional
});
```
18 changes: 18 additions & 0 deletions docs/examples/domains/create-record-aaaa.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```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 domains = new sdk.Domains(client);

const result = await domains.createRecordAAAA({
domainId: '<DOMAIN_ID>',
name: '',
value: '',
ttl: 1,
comment: '<COMMENT>', // optional
});
```
18 changes: 18 additions & 0 deletions docs/examples/domains/create-record-alias.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```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 domains = new sdk.Domains(client);

const result = await domains.createRecordAlias({
domainId: '<DOMAIN_ID>',
name: '',
value: '<VALUE>',
ttl: 1,
comment: '<COMMENT>', // optional
});
```
18 changes: 18 additions & 0 deletions docs/examples/domains/create-record-caa.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```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 domains = new sdk.Domains(client);

const result = await domains.createRecordCAA({
domainId: '<DOMAIN_ID>',
name: '',
value: '',
ttl: 1,
comment: '<COMMENT>', // optional
});
```
18 changes: 18 additions & 0 deletions docs/examples/domains/create-record-cname.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```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 domains = new sdk.Domains(client);

const result = await domains.createRecordCNAME({
domainId: '<DOMAIN_ID>',
name: '',
value: '<VALUE>',
ttl: 1,
comment: '<COMMENT>', // optional
});
```
18 changes: 18 additions & 0 deletions docs/examples/domains/create-record-https.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```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 domains = new sdk.Domains(client);

const result = await domains.createRecordHTTPS({
domainId: '<DOMAIN_ID>',
name: '',
value: '<VALUE>',
ttl: 1,
comment: '<COMMENT>', // optional
});
```
19 changes: 19 additions & 0 deletions docs/examples/domains/create-record-mx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```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 domains = new sdk.Domains(client);

const result = await domains.createRecordMX({
domainId: '<DOMAIN_ID>',
name: '',
value: '<VALUE>',
ttl: 1,
priority: 0,
comment: '<COMMENT>', // optional
});
```
18 changes: 18 additions & 0 deletions docs/examples/domains/create-record-ns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```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 domains = new sdk.Domains(client);

const result = await domains.createRecordNS({
domainId: '<DOMAIN_ID>',
name: '',
value: '<VALUE>',
ttl: 1,
comment: '<COMMENT>', // optional
});
```
21 changes: 21 additions & 0 deletions docs/examples/domains/create-record-srv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
```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 domains = new sdk.Domains(client);

const result = await domains.createRecordSRV({
domainId: '<DOMAIN_ID>',
name: '',
value: '<VALUE>',
ttl: 1,
priority: 0,
weight: 0,
port: 0,
comment: '<COMMENT>', // optional
});
```
Loading
Loading