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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 22.1.0

* Fix doc examples with proper formatting
* Add support for the new `Backups` service

## 22.0.0

* Add array-based enum parameters (e.g., `permissions: BrowserPermission[]`).
Expand Down Expand Up @@ -103,4 +108,4 @@
* Rename `templateBranch` to `templateVersion` in `createFunction()`.
* Rename `downloadDeployment()` to `getDeploymentDownload()`

> You can find the new syntax for breaking changes in the [Appwrite API references](https://appwrite.io/docs/references). Select version `1.6.x`.
> You can find the new syntax for breaking changes in the [Appwrite API references](https://appwrite.io/docs/references). Select version `1.6.x`.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![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 is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-node/releases).**
**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-node/releases).**

> 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
2 changes: 2 additions & 0 deletions docs/examples/account/create-anonymous-session.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -8,3 +9,4 @@ const client = new sdk.Client()
const account = new sdk.Account(client);

const result = await account.createAnonymousSession();
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-email-password-session.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -11,3 +12,4 @@ const result = await account.createEmailPasswordSession({
email: 'email@example.com',
password: 'password'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-email-token.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -12,3 +13,4 @@ const result = await account.createEmailToken({
email: 'email@example.com',
phrase: false // optional
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-email-verification.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -10,3 +11,4 @@ const account = new sdk.Account(client);
const result = await account.createEmailVerification({
url: 'https://example.com'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-jwt.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -10,3 +11,4 @@ const account = new sdk.Account(client);
const result = await account.createJWT({
duration: 0 // optional
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-magic-url-token.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -13,3 +14,4 @@ const result = await account.createMagicURLToken({
url: 'https://example.com', // optional
phrase: false // optional
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-mfa-authenticator.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -10,3 +11,4 @@ const account = new sdk.Account(client);
const result = await account.createMFAAuthenticator({
type: sdk.AuthenticatorType.Totp
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-mfa-challenge.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -10,3 +11,4 @@ const account = new sdk.Account(client);
const result = await account.createMFAChallenge({
factor: sdk.AuthenticationFactor.Email
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-mfa-recovery-codes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -8,3 +9,4 @@ const client = new sdk.Client()
const account = new sdk.Account(client);

const result = await account.createMFARecoveryCodes();
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-o-auth-2-token.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -13,3 +14,4 @@ const result = await account.createOAuth2Token({
failure: 'https://example.com', // optional
scopes: [] // optional
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-phone-token.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -11,3 +12,4 @@ const result = await account.createPhoneToken({
userId: '<USER_ID>',
phone: '+12065550100'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-phone-verification.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -8,3 +9,4 @@ const client = new sdk.Client()
const account = new sdk.Account(client);

const result = await account.createPhoneVerification();
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-recovery.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -11,3 +12,4 @@ const result = await account.createRecovery({
email: 'email@example.com',
url: 'https://example.com'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-session.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -11,3 +12,4 @@ const result = await account.createSession({
userId: '<USER_ID>',
secret: '<SECRET>'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/create-verification.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -10,3 +11,4 @@ const account = new sdk.Account(client);
const result = await account.createVerification({
url: 'https://example.com'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/create.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -13,3 +14,4 @@ const result = await account.create({
password: '',
name: '<NAME>' // optional
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/delete-identity.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -10,3 +11,4 @@ const account = new sdk.Account(client);
const result = await account.deleteIdentity({
identityId: '<IDENTITY_ID>'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/delete-mfa-authenticator.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -10,3 +11,4 @@ const account = new sdk.Account(client);
const result = await account.deleteMFAAuthenticator({
type: sdk.AuthenticatorType.Totp
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/delete-session.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -10,3 +11,4 @@ const account = new sdk.Account(client);
const result = await account.deleteSession({
sessionId: '<SESSION_ID>'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/delete-sessions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -8,3 +9,4 @@ const client = new sdk.Client()
const account = new sdk.Account(client);

const result = await account.deleteSessions();
```
2 changes: 2 additions & 0 deletions docs/examples/account/get-mfa-recovery-codes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -8,3 +9,4 @@ const client = new sdk.Client()
const account = new sdk.Account(client);

const result = await account.getMFARecoveryCodes();
```
2 changes: 2 additions & 0 deletions docs/examples/account/get-prefs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -8,3 +9,4 @@ const client = new sdk.Client()
const account = new sdk.Account(client);

const result = await account.getPrefs();
```
2 changes: 2 additions & 0 deletions docs/examples/account/get-session.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -10,3 +11,4 @@ const account = new sdk.Account(client);
const result = await account.getSession({
sessionId: '<SESSION_ID>'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/get.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -8,3 +9,4 @@ const client = new sdk.Client()
const account = new sdk.Account(client);

const result = await account.get();
```
2 changes: 2 additions & 0 deletions docs/examples/account/list-identities.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -11,3 +12,4 @@ const result = await account.listIdentities({
queries: [], // optional
total: false // optional
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/list-logs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -11,3 +12,4 @@ const result = await account.listLogs({
queries: [], // optional
total: false // optional
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/list-mfa-factors.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -8,3 +9,4 @@ const client = new sdk.Client()
const account = new sdk.Account(client);

const result = await account.listMFAFactors();
```
2 changes: 2 additions & 0 deletions docs/examples/account/list-sessions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -8,3 +9,4 @@ const client = new sdk.Client()
const account = new sdk.Account(client);

const result = await account.listSessions();
```
2 changes: 2 additions & 0 deletions docs/examples/account/update-email-verification.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -11,3 +12,4 @@ const result = await account.updateEmailVerification({
userId: '<USER_ID>',
secret: '<SECRET>'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/update-email.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -11,3 +12,4 @@ const result = await account.updateEmail({
email: 'email@example.com',
password: 'password'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/update-magic-url-session.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -11,3 +12,4 @@ const result = await account.updateMagicURLSession({
userId: '<USER_ID>',
secret: '<SECRET>'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/update-mfa-authenticator.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -11,3 +12,4 @@ const result = await account.updateMFAAuthenticator({
type: sdk.AuthenticatorType.Totp,
otp: '<OTP>'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/update-mfa-challenge.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -11,3 +12,4 @@ const result = await account.updateMFAChallenge({
challengeId: '<CHALLENGE_ID>',
otp: '<OTP>'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/update-mfa-recovery-codes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -8,3 +9,4 @@ const client = new sdk.Client()
const account = new sdk.Account(client);

const result = await account.updateMFARecoveryCodes();
```
2 changes: 2 additions & 0 deletions docs/examples/account/update-mfa.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -10,3 +11,4 @@ const account = new sdk.Account(client);
const result = await account.updateMFA({
mfa: false
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/update-name.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -10,3 +11,4 @@ const account = new sdk.Account(client);
const result = await account.updateName({
name: '<NAME>'
});
```
2 changes: 2 additions & 0 deletions docs/examples/account/update-password.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
Expand All @@ -11,3 +12,4 @@ const result = await account.updatePassword({
password: '',
oldPassword: 'password' // optional
});
```
Loading