diff --git a/README.md b/README.md index f975207..d77ecca 100644 --- a/README.md +++ b/README.md @@ -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-1.5.6-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.6.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 is compatible with Appwrite server version 1.5.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-node/releases).** +**This SDK is compatible with Appwrite server version 1.6.x. 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) diff --git a/docs/examples/account/create-anonymous-session.md b/docs/examples/account/create-anonymous-session.md index de09b8a..90a9161 100644 --- a/docs/examples/account/create-anonymous-session.md +++ b/docs/examples/account/create-anonymous-session.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2'); // Your project ID + .setProject(''); // Your project ID const account = new sdk.Account(client); diff --git a/docs/examples/account/create-email-password-session.md b/docs/examples/account/create-email-password-session.md index 7280898..34aabdd 100644 --- a/docs/examples/account/create-email-password-session.md +++ b/docs/examples/account/create-email-password-session.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2'); // Your project ID + .setProject(''); // Your project ID const account = new sdk.Account(client); diff --git a/docs/examples/account/create-email-token.md b/docs/examples/account/create-email-token.md index ee95c24..0f218a2 100644 --- a/docs/examples/account/create-email-token.md +++ b/docs/examples/account/create-email-token.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2'); // Your project ID + .setProject(''); // Your project ID const account = new sdk.Account(client); diff --git a/docs/examples/account/create-j-w-t.md b/docs/examples/account/create-j-w-t.md index 6df2696..673e1e0 100644 --- a/docs/examples/account/create-j-w-t.md +++ b/docs/examples/account/create-j-w-t.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2'); // Your project ID + .setProject(''); // Your project ID const account = new sdk.Account(client); diff --git a/docs/examples/account/create-magic-u-r-l-token.md b/docs/examples/account/create-magic-u-r-l-token.md index 1a0be7c..cb6ef36 100644 --- a/docs/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/account/create-magic-u-r-l-token.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2'); // Your project ID + .setProject(''); // Your project ID const account = new sdk.Account(client); diff --git a/docs/examples/account/create-mfa-authenticator.md b/docs/examples/account/create-mfa-authenticator.md index 54f32dc..0305e02 100644 --- a/docs/examples/account/create-mfa-authenticator.md +++ b/docs/examples/account/create-mfa-authenticator.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/create-mfa-challenge.md b/docs/examples/account/create-mfa-challenge.md index 8ba2380..301d83d 100644 --- a/docs/examples/account/create-mfa-challenge.md +++ b/docs/examples/account/create-mfa-challenge.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2'); // Your project ID + .setProject(''); // Your project ID const account = new sdk.Account(client); diff --git a/docs/examples/account/create-mfa-recovery-codes.md b/docs/examples/account/create-mfa-recovery-codes.md index 4cbd163..c653ae5 100644 --- a/docs/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/account/create-mfa-recovery-codes.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/create-o-auth2token.md b/docs/examples/account/create-o-auth2token.md index 62dc22a..7538a9d 100644 --- a/docs/examples/account/create-o-auth2token.md +++ b/docs/examples/account/create-o-auth2token.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2'); // Your project ID + .setProject(''); // Your project ID const account = new sdk.Account(client); diff --git a/docs/examples/account/create-phone-token.md b/docs/examples/account/create-phone-token.md index 5258ee7..04d5bc0 100644 --- a/docs/examples/account/create-phone-token.md +++ b/docs/examples/account/create-phone-token.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2'); // Your project ID + .setProject(''); // Your project ID const account = new sdk.Account(client); diff --git a/docs/examples/account/create-phone-verification.md b/docs/examples/account/create-phone-verification.md index c1940fd..15dcf8a 100644 --- a/docs/examples/account/create-phone-verification.md +++ b/docs/examples/account/create-phone-verification.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/create-recovery.md b/docs/examples/account/create-recovery.md index 6595eaf..ed83848 100644 --- a/docs/examples/account/create-recovery.md +++ b/docs/examples/account/create-recovery.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/create-session.md b/docs/examples/account/create-session.md index 8ad93ce..8b2751b 100644 --- a/docs/examples/account/create-session.md +++ b/docs/examples/account/create-session.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2'); // Your project ID + .setProject(''); // Your project ID const account = new sdk.Account(client); diff --git a/docs/examples/account/create-verification.md b/docs/examples/account/create-verification.md index 2c3421c..14456ef 100644 --- a/docs/examples/account/create-verification.md +++ b/docs/examples/account/create-verification.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/create.md b/docs/examples/account/create.md index c32343e..860e341 100644 --- a/docs/examples/account/create.md +++ b/docs/examples/account/create.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2'); // Your project ID + .setProject(''); // Your project ID const account = new sdk.Account(client); diff --git a/docs/examples/account/delete-identity.md b/docs/examples/account/delete-identity.md index 436a5e1..0711334 100644 --- a/docs/examples/account/delete-identity.md +++ b/docs/examples/account/delete-identity.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/delete-mfa-authenticator.md b/docs/examples/account/delete-mfa-authenticator.md index 7d756df..1cf8154 100644 --- a/docs/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/account/delete-mfa-authenticator.md @@ -2,12 +2,11 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); const result = await account.deleteMfaAuthenticator( - sdk.AuthenticatorType.Totp, // type - '' // otp + sdk.AuthenticatorType.Totp // type ); diff --git a/docs/examples/account/delete-session.md b/docs/examples/account/delete-session.md index bbe3d07..d29810f 100644 --- a/docs/examples/account/delete-session.md +++ b/docs/examples/account/delete-session.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/delete-sessions.md b/docs/examples/account/delete-sessions.md index 943f4bb..496bd4a 100644 --- a/docs/examples/account/delete-sessions.md +++ b/docs/examples/account/delete-sessions.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/get-mfa-recovery-codes.md b/docs/examples/account/get-mfa-recovery-codes.md index 9fe1d11..2bada1b 100644 --- a/docs/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/account/get-mfa-recovery-codes.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/get-prefs.md b/docs/examples/account/get-prefs.md index 4b21918..9ed003c 100644 --- a/docs/examples/account/get-prefs.md +++ b/docs/examples/account/get-prefs.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/get-session.md b/docs/examples/account/get-session.md index acef3ab..aeaaa14 100644 --- a/docs/examples/account/get-session.md +++ b/docs/examples/account/get-session.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/get.md b/docs/examples/account/get.md index a72e90e..b1fc61f 100644 --- a/docs/examples/account/get.md +++ b/docs/examples/account/get.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/list-identities.md b/docs/examples/account/list-identities.md index 019cacb..642034d 100644 --- a/docs/examples/account/list-identities.md +++ b/docs/examples/account/list-identities.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/list-logs.md b/docs/examples/account/list-logs.md index 04e4797..08dcf81 100644 --- a/docs/examples/account/list-logs.md +++ b/docs/examples/account/list-logs.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/list-mfa-factors.md b/docs/examples/account/list-mfa-factors.md index c6be1f2..e2c9683 100644 --- a/docs/examples/account/list-mfa-factors.md +++ b/docs/examples/account/list-mfa-factors.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/list-sessions.md b/docs/examples/account/list-sessions.md index 17793ca..a8b423f 100644 --- a/docs/examples/account/list-sessions.md +++ b/docs/examples/account/list-sessions.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-email.md b/docs/examples/account/update-email.md index 53dcc45..4c0c6c2 100644 --- a/docs/examples/account/update-email.md +++ b/docs/examples/account/update-email.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-m-f-a.md b/docs/examples/account/update-m-f-a.md index 318976d..30c3623 100644 --- a/docs/examples/account/update-m-f-a.md +++ b/docs/examples/account/update-m-f-a.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-magic-u-r-l-session.md b/docs/examples/account/update-magic-u-r-l-session.md index 4bcda8f..56d2b02 100644 --- a/docs/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/account/update-magic-u-r-l-session.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2'); // Your project ID + .setProject(''); // Your project ID const account = new sdk.Account(client); diff --git a/docs/examples/account/update-mfa-authenticator.md b/docs/examples/account/update-mfa-authenticator.md index dc2e5f1..c8f1773 100644 --- a/docs/examples/account/update-mfa-authenticator.md +++ b/docs/examples/account/update-mfa-authenticator.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-mfa-challenge.md b/docs/examples/account/update-mfa-challenge.md index aeb5f2b..bdb1a53 100644 --- a/docs/examples/account/update-mfa-challenge.md +++ b/docs/examples/account/update-mfa-challenge.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-mfa-recovery-codes.md b/docs/examples/account/update-mfa-recovery-codes.md index bc3af02..16a3d3c 100644 --- a/docs/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/account/update-mfa-recovery-codes.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-name.md b/docs/examples/account/update-name.md index 9341214..df51002 100644 --- a/docs/examples/account/update-name.md +++ b/docs/examples/account/update-name.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index 797eb9a..76021bc 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-phone-session.md b/docs/examples/account/update-phone-session.md index f38c1f0..40fccba 100644 --- a/docs/examples/account/update-phone-session.md +++ b/docs/examples/account/update-phone-session.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2'); // Your project ID + .setProject(''); // Your project ID const account = new sdk.Account(client); diff --git a/docs/examples/account/update-phone-verification.md b/docs/examples/account/update-phone-verification.md index 0144cbd..93f35a8 100644 --- a/docs/examples/account/update-phone-verification.md +++ b/docs/examples/account/update-phone-verification.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-phone.md b/docs/examples/account/update-phone.md index f305df7..11982b7 100644 --- a/docs/examples/account/update-phone.md +++ b/docs/examples/account/update-phone.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-prefs.md b/docs/examples/account/update-prefs.md index b8a94c8..6f27003 100644 --- a/docs/examples/account/update-prefs.md +++ b/docs/examples/account/update-prefs.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-recovery.md b/docs/examples/account/update-recovery.md index c932694..09bfc64 100644 --- a/docs/examples/account/update-recovery.md +++ b/docs/examples/account/update-recovery.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-session.md b/docs/examples/account/update-session.md index 2ae0425..64ec68e 100644 --- a/docs/examples/account/update-session.md +++ b/docs/examples/account/update-session.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-status.md b/docs/examples/account/update-status.md index b569262..cf65e82 100644 --- a/docs/examples/account/update-status.md +++ b/docs/examples/account/update-status.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/account/update-verification.md b/docs/examples/account/update-verification.md index 3c7303e..cc3678e 100644 --- a/docs/examples/account/update-verification.md +++ b/docs/examples/account/update-verification.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const account = new sdk.Account(client); diff --git a/docs/examples/avatars/get-browser.md b/docs/examples/avatars/get-browser.md index da49225..ad6d0d4 100644 --- a/docs/examples/avatars/get-browser.md +++ b/docs/examples/avatars/get-browser.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const avatars = new sdk.Avatars(client); diff --git a/docs/examples/avatars/get-credit-card.md b/docs/examples/avatars/get-credit-card.md index d3aa637..5ffcc34 100644 --- a/docs/examples/avatars/get-credit-card.md +++ b/docs/examples/avatars/get-credit-card.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const avatars = new sdk.Avatars(client); diff --git a/docs/examples/avatars/get-favicon.md b/docs/examples/avatars/get-favicon.md index aac0795..0980403 100644 --- a/docs/examples/avatars/get-favicon.md +++ b/docs/examples/avatars/get-favicon.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const avatars = new sdk.Avatars(client); diff --git a/docs/examples/avatars/get-flag.md b/docs/examples/avatars/get-flag.md index f2b3ea9..53b912f 100644 --- a/docs/examples/avatars/get-flag.md +++ b/docs/examples/avatars/get-flag.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const avatars = new sdk.Avatars(client); diff --git a/docs/examples/avatars/get-image.md b/docs/examples/avatars/get-image.md index ee3b07d..5a72fe3 100644 --- a/docs/examples/avatars/get-image.md +++ b/docs/examples/avatars/get-image.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const avatars = new sdk.Avatars(client); diff --git a/docs/examples/avatars/get-initials.md b/docs/examples/avatars/get-initials.md index 9225048..b9d41fc 100644 --- a/docs/examples/avatars/get-initials.md +++ b/docs/examples/avatars/get-initials.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const avatars = new sdk.Avatars(client); diff --git a/docs/examples/avatars/get-q-r.md b/docs/examples/avatars/get-q-r.md index ff3dc25..0a27235 100644 --- a/docs/examples/avatars/get-q-r.md +++ b/docs/examples/avatars/get-q-r.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const avatars = new sdk.Avatars(client); diff --git a/docs/examples/databases/create-boolean-attribute.md b/docs/examples/databases/create-boolean-attribute.md index 382322d..7a04ed0 100644 --- a/docs/examples/databases/create-boolean-attribute.md +++ b/docs/examples/databases/create-boolean-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create-collection.md b/docs/examples/databases/create-collection.md index 2f37e3e..7119a4e 100644 --- a/docs/examples/databases/create-collection.md +++ b/docs/examples/databases/create-collection.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create-datetime-attribute.md b/docs/examples/databases/create-datetime-attribute.md index 01119ab..ba40de8 100644 --- a/docs/examples/databases/create-datetime-attribute.md +++ b/docs/examples/databases/create-datetime-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create-document.md b/docs/examples/databases/create-document.md index a99748e..3e1c769 100644 --- a/docs/examples/databases/create-document.md +++ b/docs/examples/databases/create-document.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create-email-attribute.md b/docs/examples/databases/create-email-attribute.md index cbb8fe2..6f2da81 100644 --- a/docs/examples/databases/create-email-attribute.md +++ b/docs/examples/databases/create-email-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create-enum-attribute.md b/docs/examples/databases/create-enum-attribute.md index 468c915..9439f8f 100644 --- a/docs/examples/databases/create-enum-attribute.md +++ b/docs/examples/databases/create-enum-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create-float-attribute.md b/docs/examples/databases/create-float-attribute.md index a85114f..7ed6223 100644 --- a/docs/examples/databases/create-float-attribute.md +++ b/docs/examples/databases/create-float-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create-index.md b/docs/examples/databases/create-index.md index b29265c..73cdf39 100644 --- a/docs/examples/databases/create-index.md +++ b/docs/examples/databases/create-index.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create-integer-attribute.md b/docs/examples/databases/create-integer-attribute.md index ad0532b..479b9d8 100644 --- a/docs/examples/databases/create-integer-attribute.md +++ b/docs/examples/databases/create-integer-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create-ip-attribute.md b/docs/examples/databases/create-ip-attribute.md index 870d724..c88087f 100644 --- a/docs/examples/databases/create-ip-attribute.md +++ b/docs/examples/databases/create-ip-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create-relationship-attribute.md b/docs/examples/databases/create-relationship-attribute.md index 1cbf17b..7be4bae 100644 --- a/docs/examples/databases/create-relationship-attribute.md +++ b/docs/examples/databases/create-relationship-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create-string-attribute.md b/docs/examples/databases/create-string-attribute.md index 3abde18..03905f4 100644 --- a/docs/examples/databases/create-string-attribute.md +++ b/docs/examples/databases/create-string-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create-url-attribute.md b/docs/examples/databases/create-url-attribute.md index 9223af1..741249b 100644 --- a/docs/examples/databases/create-url-attribute.md +++ b/docs/examples/databases/create-url-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/create.md b/docs/examples/databases/create.md index 36f01c7..792bbf1 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/delete-attribute.md b/docs/examples/databases/delete-attribute.md index b67c0ab..b8b2d47 100644 --- a/docs/examples/databases/delete-attribute.md +++ b/docs/examples/databases/delete-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/delete-collection.md b/docs/examples/databases/delete-collection.md index 1dd41af..bb72b9e 100644 --- a/docs/examples/databases/delete-collection.md +++ b/docs/examples/databases/delete-collection.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/delete-document.md b/docs/examples/databases/delete-document.md index ddc6625..05183b5 100644 --- a/docs/examples/databases/delete-document.md +++ b/docs/examples/databases/delete-document.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/delete-index.md b/docs/examples/databases/delete-index.md index 2e98d49..0f50d7d 100644 --- a/docs/examples/databases/delete-index.md +++ b/docs/examples/databases/delete-index.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/delete.md b/docs/examples/databases/delete.md index ff14436..79ca89d 100644 --- a/docs/examples/databases/delete.md +++ b/docs/examples/databases/delete.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/get-attribute.md b/docs/examples/databases/get-attribute.md index ab530a8..86dccff 100644 --- a/docs/examples/databases/get-attribute.md +++ b/docs/examples/databases/get-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/get-collection.md b/docs/examples/databases/get-collection.md index b2622cc..f107c14 100644 --- a/docs/examples/databases/get-collection.md +++ b/docs/examples/databases/get-collection.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/get-document.md b/docs/examples/databases/get-document.md index b4fe065..edd2cb2 100644 --- a/docs/examples/databases/get-document.md +++ b/docs/examples/databases/get-document.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/get-index.md b/docs/examples/databases/get-index.md index b14322f..3c1039c 100644 --- a/docs/examples/databases/get-index.md +++ b/docs/examples/databases/get-index.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/get.md b/docs/examples/databases/get.md index 223f09c..ca5dd32 100644 --- a/docs/examples/databases/get.md +++ b/docs/examples/databases/get.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/list-attributes.md b/docs/examples/databases/list-attributes.md index 02e65dd..fb0264f 100644 --- a/docs/examples/databases/list-attributes.md +++ b/docs/examples/databases/list-attributes.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/list-collections.md b/docs/examples/databases/list-collections.md index 6f44cce..e5f725d 100644 --- a/docs/examples/databases/list-collections.md +++ b/docs/examples/databases/list-collections.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/list-documents.md b/docs/examples/databases/list-documents.md index 066e273..346fba0 100644 --- a/docs/examples/databases/list-documents.md +++ b/docs/examples/databases/list-documents.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/list-indexes.md b/docs/examples/databases/list-indexes.md index 08fa9fe..7acfc91 100644 --- a/docs/examples/databases/list-indexes.md +++ b/docs/examples/databases/list-indexes.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/list.md b/docs/examples/databases/list.md index 23c4299..f887719 100644 --- a/docs/examples/databases/list.md +++ b/docs/examples/databases/list.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index 1298c51..ae4a91c 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/databases/update-boolean-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update-collection.md b/docs/examples/databases/update-collection.md index 9af17fe..b9bbeb8 100644 --- a/docs/examples/databases/update-collection.md +++ b/docs/examples/databases/update-collection.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index 2395bfd..9dfcf75 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/databases/update-datetime-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update-document.md b/docs/examples/databases/update-document.md index b80b103..2e087ca 100644 --- a/docs/examples/databases/update-document.md +++ b/docs/examples/databases/update-document.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index c06a213..f42c464 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/examples/databases/update-email-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index b048264..e8dd97d 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/examples/databases/update-enum-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index 9534923..67cb29f 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index fcdc509..baf374e 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index 91d928a..64bde38 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/examples/databases/update-ip-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index 72b6a70..403f591 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/databases/update-relationship-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index 5d9bb73..c21784b 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index f7acda3..6a8434a 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/examples/databases/update-url-attribute.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/databases/update.md b/docs/examples/databases/update.md index d57e811..4b24cdd 100644 --- a/docs/examples/databases/update.md +++ b/docs/examples/databases/update.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/functions/create-build.md b/docs/examples/functions/create-build.md index 9466124..c026a96 100644 --- a/docs/examples/functions/create-build.md +++ b/docs/examples/functions/create-build.md @@ -2,13 +2,13 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); const result = await functions.createBuild( '', // functionId '', // deploymentId - '' // buildId + '' // buildId (optional) ); diff --git a/docs/examples/functions/create-deployment.md b/docs/examples/functions/create-deployment.md index 89ae42d..1928e4c 100644 --- a/docs/examples/functions/create-deployment.md +++ b/docs/examples/functions/create-deployment.md @@ -3,8 +3,8 @@ const fs = require('fs'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/create-execution.md b/docs/examples/functions/create-execution.md index 72b6d66..4eec409 100644 --- a/docs/examples/functions/create-execution.md +++ b/docs/examples/functions/create-execution.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const functions = new sdk.Functions(client); @@ -13,5 +13,6 @@ const result = await functions.createExecution( false, // async (optional) '', // path (optional) sdk.ExecutionMethod.GET, // method (optional) - {} // headers (optional) + {}, // headers (optional) + '' // scheduledAt (optional) ); diff --git a/docs/examples/functions/create-variable.md b/docs/examples/functions/create-variable.md index 6290edc..60a9366 100644 --- a/docs/examples/functions/create-variable.md +++ b/docs/examples/functions/create-variable.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/create.md b/docs/examples/functions/create.md index 8f8aea8..cb44648 100644 --- a/docs/examples/functions/create.md +++ b/docs/examples/functions/create.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); @@ -19,6 +19,7 @@ const result = await functions.create( false, // logging (optional) '', // entrypoint (optional) '', // commands (optional) + [], // scopes (optional) '', // installationId (optional) '', // providerRepositoryId (optional) '', // providerBranch (optional) @@ -27,5 +28,6 @@ const result = await functions.create( '', // templateRepository (optional) '', // templateOwner (optional) '', // templateRootDirectory (optional) - '' // templateBranch (optional) + '', // templateVersion (optional) + '' // specification (optional) ); diff --git a/docs/examples/functions/delete-deployment.md b/docs/examples/functions/delete-deployment.md index f84b635..a9038bc 100644 --- a/docs/examples/functions/delete-deployment.md +++ b/docs/examples/functions/delete-deployment.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/delete-execution.md b/docs/examples/functions/delete-execution.md new file mode 100644 index 0000000..28b5e41 --- /dev/null +++ b/docs/examples/functions/delete-execution.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.deleteExecution( + '', // functionId + '' // executionId +); diff --git a/docs/examples/functions/delete-variable.md b/docs/examples/functions/delete-variable.md index 87b69e4..f3cf018 100644 --- a/docs/examples/functions/delete-variable.md +++ b/docs/examples/functions/delete-variable.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/delete.md b/docs/examples/functions/delete.md index c793aa8..43acc4b 100644 --- a/docs/examples/functions/delete.md +++ b/docs/examples/functions/delete.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/download-deployment.md b/docs/examples/functions/get-deployment-download.md similarity index 60% rename from docs/examples/functions/download-deployment.md rename to docs/examples/functions/get-deployment-download.md index 496f349..a15215d 100644 --- a/docs/examples/functions/download-deployment.md +++ b/docs/examples/functions/get-deployment-download.md @@ -2,12 +2,12 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); -const result = await functions.downloadDeployment( +const result = await functions.getDeploymentDownload( '', // functionId '' // deploymentId ); diff --git a/docs/examples/functions/get-deployment.md b/docs/examples/functions/get-deployment.md index c801f57..1c10a92 100644 --- a/docs/examples/functions/get-deployment.md +++ b/docs/examples/functions/get-deployment.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/get-execution.md b/docs/examples/functions/get-execution.md index b1168ed..7be4378 100644 --- a/docs/examples/functions/get-execution.md +++ b/docs/examples/functions/get-execution.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/get-variable.md b/docs/examples/functions/get-variable.md index 9a8932b..64150e0 100644 --- a/docs/examples/functions/get-variable.md +++ b/docs/examples/functions/get-variable.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/get.md b/docs/examples/functions/get.md index a6e561b..26807e7 100644 --- a/docs/examples/functions/get.md +++ b/docs/examples/functions/get.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/list-deployments.md b/docs/examples/functions/list-deployments.md index ff524ba..67c3c3c 100644 --- a/docs/examples/functions/list-deployments.md +++ b/docs/examples/functions/list-deployments.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/list-executions.md b/docs/examples/functions/list-executions.md index a837455..26aa02e 100644 --- a/docs/examples/functions/list-executions.md +++ b/docs/examples/functions/list-executions.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/list-runtimes.md b/docs/examples/functions/list-runtimes.md index f128b1c..729cce7 100644 --- a/docs/examples/functions/list-runtimes.md +++ b/docs/examples/functions/list-runtimes.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/list-specifications.md b/docs/examples/functions/list-specifications.md new file mode 100644 index 0000000..4942bc3 --- /dev/null +++ b/docs/examples/functions/list-specifications.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listSpecifications(); diff --git a/docs/examples/functions/list-variables.md b/docs/examples/functions/list-variables.md index feeaa11..f213d0c 100644 --- a/docs/examples/functions/list-variables.md +++ b/docs/examples/functions/list-variables.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/list.md b/docs/examples/functions/list.md index f6751ca..ba7365f 100644 --- a/docs/examples/functions/list.md +++ b/docs/examples/functions/list.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/update-deployment-build.md b/docs/examples/functions/update-deployment-build.md new file mode 100644 index 0000000..b492af8 --- /dev/null +++ b/docs/examples/functions/update-deployment-build.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.updateDeploymentBuild( + '', // functionId + '' // deploymentId +); diff --git a/docs/examples/functions/update-deployment.md b/docs/examples/functions/update-deployment.md index 00eafd3..8254390 100644 --- a/docs/examples/functions/update-deployment.md +++ b/docs/examples/functions/update-deployment.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/update-variable.md b/docs/examples/functions/update-variable.md index 068abee..657b0bd 100644 --- a/docs/examples/functions/update-variable.md +++ b/docs/examples/functions/update-variable.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); diff --git a/docs/examples/functions/update.md b/docs/examples/functions/update.md index dc1da25..b82dc35 100644 --- a/docs/examples/functions/update.md +++ b/docs/examples/functions/update.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const functions = new sdk.Functions(client); @@ -19,9 +19,11 @@ const result = await functions.update( false, // logging (optional) '', // entrypoint (optional) '', // commands (optional) + [], // scopes (optional) '', // installationId (optional) '', // providerRepositoryId (optional) '', // providerBranch (optional) false, // providerSilentMode (optional) - '' // providerRootDirectory (optional) + '', // providerRootDirectory (optional) + '' // specification (optional) ); diff --git a/docs/examples/graphql/mutation.md b/docs/examples/graphql/mutation.md index ee32b9e..64b2393 100644 --- a/docs/examples/graphql/mutation.md +++ b/docs/examples/graphql/mutation.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const graphql = new sdk.Graphql(client); diff --git a/docs/examples/graphql/query.md b/docs/examples/graphql/query.md index 887b5bd..24a6e56 100644 --- a/docs/examples/graphql/query.md +++ b/docs/examples/graphql/query.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const graphql = new sdk.Graphql(client); diff --git a/docs/examples/health/get-antivirus.md b/docs/examples/health/get-antivirus.md index 1555b6d..fc98ff9 100644 --- a/docs/examples/health/get-antivirus.md +++ b/docs/examples/health/get-antivirus.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-cache.md b/docs/examples/health/get-cache.md index c418a49..9289cad 100644 --- a/docs/examples/health/get-cache.md +++ b/docs/examples/health/get-cache.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-certificate.md b/docs/examples/health/get-certificate.md index 9f25b69..637f30b 100644 --- a/docs/examples/health/get-certificate.md +++ b/docs/examples/health/get-certificate.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-d-b.md b/docs/examples/health/get-d-b.md index 36519bd..6cca907 100644 --- a/docs/examples/health/get-d-b.md +++ b/docs/examples/health/get-d-b.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-failed-jobs.md b/docs/examples/health/get-failed-jobs.md index 0cff488..2ce2dfb 100644 --- a/docs/examples/health/get-failed-jobs.md +++ b/docs/examples/health/get-failed-jobs.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-pub-sub.md b/docs/examples/health/get-pub-sub.md index a17f5c6..36dc5ba 100644 --- a/docs/examples/health/get-pub-sub.md +++ b/docs/examples/health/get-pub-sub.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue-builds.md b/docs/examples/health/get-queue-builds.md index 93b2763..ef09f92 100644 --- a/docs/examples/health/get-queue-builds.md +++ b/docs/examples/health/get-queue-builds.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue-certificates.md b/docs/examples/health/get-queue-certificates.md index efb52c6..1095c39 100644 --- a/docs/examples/health/get-queue-certificates.md +++ b/docs/examples/health/get-queue-certificates.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue-databases.md b/docs/examples/health/get-queue-databases.md index c3ae629..fcd113a 100644 --- a/docs/examples/health/get-queue-databases.md +++ b/docs/examples/health/get-queue-databases.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue-deletes.md b/docs/examples/health/get-queue-deletes.md index 4a7f96a..6a6f517 100644 --- a/docs/examples/health/get-queue-deletes.md +++ b/docs/examples/health/get-queue-deletes.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue-functions.md b/docs/examples/health/get-queue-functions.md index 9459939..05cd6e6 100644 --- a/docs/examples/health/get-queue-functions.md +++ b/docs/examples/health/get-queue-functions.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue-logs.md b/docs/examples/health/get-queue-logs.md index 2ee3693..e0a75b8 100644 --- a/docs/examples/health/get-queue-logs.md +++ b/docs/examples/health/get-queue-logs.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue-mails.md b/docs/examples/health/get-queue-mails.md index 6c099d3..253e9ba 100644 --- a/docs/examples/health/get-queue-mails.md +++ b/docs/examples/health/get-queue-mails.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue-messaging.md b/docs/examples/health/get-queue-messaging.md index 9494c63..3db1f6f 100644 --- a/docs/examples/health/get-queue-messaging.md +++ b/docs/examples/health/get-queue-messaging.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue-migrations.md b/docs/examples/health/get-queue-migrations.md index 6e94b98..a203449 100644 --- a/docs/examples/health/get-queue-migrations.md +++ b/docs/examples/health/get-queue-migrations.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue-usage-dump.md b/docs/examples/health/get-queue-usage-dump.md index e7651be..412015c 100644 --- a/docs/examples/health/get-queue-usage-dump.md +++ b/docs/examples/health/get-queue-usage-dump.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue-usage.md b/docs/examples/health/get-queue-usage.md index 6902e1d..919d097 100644 --- a/docs/examples/health/get-queue-usage.md +++ b/docs/examples/health/get-queue-usage.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue-webhooks.md b/docs/examples/health/get-queue-webhooks.md index 4e53e28..54b6ba4 100644 --- a/docs/examples/health/get-queue-webhooks.md +++ b/docs/examples/health/get-queue-webhooks.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-queue.md b/docs/examples/health/get-queue.md index 46fd991..b63d2f1 100644 --- a/docs/examples/health/get-queue.md +++ b/docs/examples/health/get-queue.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-storage-local.md b/docs/examples/health/get-storage-local.md index 29daa87..d04610d 100644 --- a/docs/examples/health/get-storage-local.md +++ b/docs/examples/health/get-storage-local.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-storage.md b/docs/examples/health/get-storage.md index 7b7ad5c..cd6d494 100644 --- a/docs/examples/health/get-storage.md +++ b/docs/examples/health/get-storage.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get-time.md b/docs/examples/health/get-time.md index 5768c15..71caa3f 100644 --- a/docs/examples/health/get-time.md +++ b/docs/examples/health/get-time.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/health/get.md b/docs/examples/health/get.md index 75e5726..d92cb94 100644 --- a/docs/examples/health/get.md +++ b/docs/examples/health/get.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const health = new sdk.Health(client); diff --git a/docs/examples/locale/get.md b/docs/examples/locale/get.md index 27e8f06..eb7353d 100644 --- a/docs/examples/locale/get.md +++ b/docs/examples/locale/get.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const locale = new sdk.Locale(client); diff --git a/docs/examples/locale/list-codes.md b/docs/examples/locale/list-codes.md index 9bcbd72..c95a852 100644 --- a/docs/examples/locale/list-codes.md +++ b/docs/examples/locale/list-codes.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const locale = new sdk.Locale(client); diff --git a/docs/examples/locale/list-continents.md b/docs/examples/locale/list-continents.md index 3ba7f79..ffce38e 100644 --- a/docs/examples/locale/list-continents.md +++ b/docs/examples/locale/list-continents.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const locale = new sdk.Locale(client); diff --git a/docs/examples/locale/list-countries-e-u.md b/docs/examples/locale/list-countries-e-u.md index 309cca6..3bd63b3 100644 --- a/docs/examples/locale/list-countries-e-u.md +++ b/docs/examples/locale/list-countries-e-u.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const locale = new sdk.Locale(client); diff --git a/docs/examples/locale/list-countries-phones.md b/docs/examples/locale/list-countries-phones.md index dca1489..be39d0f 100644 --- a/docs/examples/locale/list-countries-phones.md +++ b/docs/examples/locale/list-countries-phones.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const locale = new sdk.Locale(client); diff --git a/docs/examples/locale/list-countries.md b/docs/examples/locale/list-countries.md index 808d3ea..5496a1f 100644 --- a/docs/examples/locale/list-countries.md +++ b/docs/examples/locale/list-countries.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const locale = new sdk.Locale(client); diff --git a/docs/examples/locale/list-currencies.md b/docs/examples/locale/list-currencies.md index 2e1216b..ff67f9f 100644 --- a/docs/examples/locale/list-currencies.md +++ b/docs/examples/locale/list-currencies.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const locale = new sdk.Locale(client); diff --git a/docs/examples/locale/list-languages.md b/docs/examples/locale/list-languages.md index b01c5f0..d6753d3 100644 --- a/docs/examples/locale/list-languages.md +++ b/docs/examples/locale/list-languages.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const locale = new sdk.Locale(client); diff --git a/docs/examples/messaging/create-apns-provider.md b/docs/examples/messaging/create-apns-provider.md index 11622df..fedbc55 100644 --- a/docs/examples/messaging/create-apns-provider.md +++ b/docs/examples/messaging/create-apns-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-email.md b/docs/examples/messaging/create-email.md index fbec7a3..35ac684 100644 --- a/docs/examples/messaging/create-email.md +++ b/docs/examples/messaging/create-email.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-fcm-provider.md b/docs/examples/messaging/create-fcm-provider.md index a296b77..80ffa58 100644 --- a/docs/examples/messaging/create-fcm-provider.md +++ b/docs/examples/messaging/create-fcm-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-mailgun-provider.md b/docs/examples/messaging/create-mailgun-provider.md index 2ce3bb1..2b5f657 100644 --- a/docs/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/messaging/create-mailgun-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-msg91provider.md b/docs/examples/messaging/create-msg91provider.md index 5e6a44a..c8dcb38 100644 --- a/docs/examples/messaging/create-msg91provider.md +++ b/docs/examples/messaging/create-msg91provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-push.md b/docs/examples/messaging/create-push.md index af57507..54103e1 100644 --- a/docs/examples/messaging/create-push.md +++ b/docs/examples/messaging/create-push.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-sendgrid-provider.md b/docs/examples/messaging/create-sendgrid-provider.md index 125c8e3..65d4f40 100644 --- a/docs/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/messaging/create-sendgrid-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-sms.md b/docs/examples/messaging/create-sms.md index 786aac4..75dce90 100644 --- a/docs/examples/messaging/create-sms.md +++ b/docs/examples/messaging/create-sms.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-smtp-provider.md b/docs/examples/messaging/create-smtp-provider.md index d03d2e6..9c69f27 100644 --- a/docs/examples/messaging/create-smtp-provider.md +++ b/docs/examples/messaging/create-smtp-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-subscriber.md b/docs/examples/messaging/create-subscriber.md index 75b9321..e5d2a97 100644 --- a/docs/examples/messaging/create-subscriber.md +++ b/docs/examples/messaging/create-subscriber.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...'); // Your secret JSON Web Token + .setProject('') // Your project ID + .setJWT(''); // Your secret JSON Web Token const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-telesign-provider.md b/docs/examples/messaging/create-telesign-provider.md index 5642b48..544be15 100644 --- a/docs/examples/messaging/create-telesign-provider.md +++ b/docs/examples/messaging/create-telesign-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-textmagic-provider.md b/docs/examples/messaging/create-textmagic-provider.md index d3f301d..ef41b80 100644 --- a/docs/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/messaging/create-textmagic-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-topic.md b/docs/examples/messaging/create-topic.md index 1bbd1b5..22fe412 100644 --- a/docs/examples/messaging/create-topic.md +++ b/docs/examples/messaging/create-topic.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-twilio-provider.md b/docs/examples/messaging/create-twilio-provider.md index dbaa0aa..908f09e 100644 --- a/docs/examples/messaging/create-twilio-provider.md +++ b/docs/examples/messaging/create-twilio-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/create-vonage-provider.md b/docs/examples/messaging/create-vonage-provider.md index 68b8dba..78270b7 100644 --- a/docs/examples/messaging/create-vonage-provider.md +++ b/docs/examples/messaging/create-vonage-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/delete-provider.md b/docs/examples/messaging/delete-provider.md index 3967839..fd66451 100644 --- a/docs/examples/messaging/delete-provider.md +++ b/docs/examples/messaging/delete-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/delete-subscriber.md b/docs/examples/messaging/delete-subscriber.md index 22ed0af..aec3a7e 100644 --- a/docs/examples/messaging/delete-subscriber.md +++ b/docs/examples/messaging/delete-subscriber.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...'); // Your secret JSON Web Token + .setProject('') // Your project ID + .setJWT(''); // Your secret JSON Web Token const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/delete-topic.md b/docs/examples/messaging/delete-topic.md index fa38995..7b4a360 100644 --- a/docs/examples/messaging/delete-topic.md +++ b/docs/examples/messaging/delete-topic.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/delete.md b/docs/examples/messaging/delete.md index 22a3d35..d4f8bfc 100644 --- a/docs/examples/messaging/delete.md +++ b/docs/examples/messaging/delete.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/get-message.md b/docs/examples/messaging/get-message.md index 4f0b92c..7b46622 100644 --- a/docs/examples/messaging/get-message.md +++ b/docs/examples/messaging/get-message.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/get-provider.md b/docs/examples/messaging/get-provider.md index 17d1e58..796bcbc 100644 --- a/docs/examples/messaging/get-provider.md +++ b/docs/examples/messaging/get-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/get-subscriber.md b/docs/examples/messaging/get-subscriber.md index 96ca08a..3930e54 100644 --- a/docs/examples/messaging/get-subscriber.md +++ b/docs/examples/messaging/get-subscriber.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/get-topic.md b/docs/examples/messaging/get-topic.md index 8075b0c..68fda14 100644 --- a/docs/examples/messaging/get-topic.md +++ b/docs/examples/messaging/get-topic.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/list-message-logs.md b/docs/examples/messaging/list-message-logs.md index e83f316..01b941b 100644 --- a/docs/examples/messaging/list-message-logs.md +++ b/docs/examples/messaging/list-message-logs.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/list-messages.md b/docs/examples/messaging/list-messages.md index d09b3e5..4c0ee7a 100644 --- a/docs/examples/messaging/list-messages.md +++ b/docs/examples/messaging/list-messages.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/list-provider-logs.md b/docs/examples/messaging/list-provider-logs.md index 8e267da..625fedb 100644 --- a/docs/examples/messaging/list-provider-logs.md +++ b/docs/examples/messaging/list-provider-logs.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/list-providers.md b/docs/examples/messaging/list-providers.md index b9273f1..4d3a63b 100644 --- a/docs/examples/messaging/list-providers.md +++ b/docs/examples/messaging/list-providers.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/list-subscriber-logs.md b/docs/examples/messaging/list-subscriber-logs.md index 17f8fef..61077f2 100644 --- a/docs/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/messaging/list-subscriber-logs.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/list-subscribers.md b/docs/examples/messaging/list-subscribers.md index 05e27aa..85b91ca 100644 --- a/docs/examples/messaging/list-subscribers.md +++ b/docs/examples/messaging/list-subscribers.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/list-targets.md b/docs/examples/messaging/list-targets.md index 0e509ab..cafdf9b 100644 --- a/docs/examples/messaging/list-targets.md +++ b/docs/examples/messaging/list-targets.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/list-topic-logs.md b/docs/examples/messaging/list-topic-logs.md index 9f63540..fe0a094 100644 --- a/docs/examples/messaging/list-topic-logs.md +++ b/docs/examples/messaging/list-topic-logs.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/list-topics.md b/docs/examples/messaging/list-topics.md index ae16c26..5d0419a 100644 --- a/docs/examples/messaging/list-topics.md +++ b/docs/examples/messaging/list-topics.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-apns-provider.md b/docs/examples/messaging/update-apns-provider.md index 8498b4f..23d806e 100644 --- a/docs/examples/messaging/update-apns-provider.md +++ b/docs/examples/messaging/update-apns-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-email.md b/docs/examples/messaging/update-email.md index 9211711..a6798ee 100644 --- a/docs/examples/messaging/update-email.md +++ b/docs/examples/messaging/update-email.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-fcm-provider.md b/docs/examples/messaging/update-fcm-provider.md index fc084ff..3d34399 100644 --- a/docs/examples/messaging/update-fcm-provider.md +++ b/docs/examples/messaging/update-fcm-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-mailgun-provider.md b/docs/examples/messaging/update-mailgun-provider.md index 850fcf6..5bcc4d1 100644 --- a/docs/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/messaging/update-mailgun-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-msg91provider.md b/docs/examples/messaging/update-msg91provider.md index 7f84b5d..02f091f 100644 --- a/docs/examples/messaging/update-msg91provider.md +++ b/docs/examples/messaging/update-msg91provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-push.md b/docs/examples/messaging/update-push.md index c2de910..ec87ecf 100644 --- a/docs/examples/messaging/update-push.md +++ b/docs/examples/messaging/update-push.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-sendgrid-provider.md b/docs/examples/messaging/update-sendgrid-provider.md index b9c9439..22a5fe5 100644 --- a/docs/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/messaging/update-sendgrid-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-sms.md b/docs/examples/messaging/update-sms.md index 172dcb6..03c266b 100644 --- a/docs/examples/messaging/update-sms.md +++ b/docs/examples/messaging/update-sms.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-smtp-provider.md b/docs/examples/messaging/update-smtp-provider.md index 3f8f20c..35b7443 100644 --- a/docs/examples/messaging/update-smtp-provider.md +++ b/docs/examples/messaging/update-smtp-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-telesign-provider.md b/docs/examples/messaging/update-telesign-provider.md index 2f33168..dd668f8 100644 --- a/docs/examples/messaging/update-telesign-provider.md +++ b/docs/examples/messaging/update-telesign-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-textmagic-provider.md b/docs/examples/messaging/update-textmagic-provider.md index 788c0dd..d90c95d 100644 --- a/docs/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/messaging/update-textmagic-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-topic.md b/docs/examples/messaging/update-topic.md index eeb34f6..08690a1 100644 --- a/docs/examples/messaging/update-topic.md +++ b/docs/examples/messaging/update-topic.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-twilio-provider.md b/docs/examples/messaging/update-twilio-provider.md index ec18761..c6d2b8c 100644 --- a/docs/examples/messaging/update-twilio-provider.md +++ b/docs/examples/messaging/update-twilio-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/messaging/update-vonage-provider.md b/docs/examples/messaging/update-vonage-provider.md index 4b5dc9a..ba9f102 100644 --- a/docs/examples/messaging/update-vonage-provider.md +++ b/docs/examples/messaging/update-vonage-provider.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const messaging = new sdk.Messaging(client); diff --git a/docs/examples/storage/create-bucket.md b/docs/examples/storage/create-bucket.md index c961c79..91a5126 100644 --- a/docs/examples/storage/create-bucket.md +++ b/docs/examples/storage/create-bucket.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const storage = new sdk.Storage(client); diff --git a/docs/examples/storage/create-file.md b/docs/examples/storage/create-file.md index 7440143..067307c 100644 --- a/docs/examples/storage/create-file.md +++ b/docs/examples/storage/create-file.md @@ -3,7 +3,7 @@ const fs = require('fs'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const storage = new sdk.Storage(client); diff --git a/docs/examples/storage/delete-bucket.md b/docs/examples/storage/delete-bucket.md index f3db8ca..606ffba 100644 --- a/docs/examples/storage/delete-bucket.md +++ b/docs/examples/storage/delete-bucket.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const storage = new sdk.Storage(client); diff --git a/docs/examples/storage/delete-file.md b/docs/examples/storage/delete-file.md index c7dbe9e..c5b9df9 100644 --- a/docs/examples/storage/delete-file.md +++ b/docs/examples/storage/delete-file.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const storage = new sdk.Storage(client); diff --git a/docs/examples/storage/get-bucket.md b/docs/examples/storage/get-bucket.md index f9d0385..711753d 100644 --- a/docs/examples/storage/get-bucket.md +++ b/docs/examples/storage/get-bucket.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const storage = new sdk.Storage(client); diff --git a/docs/examples/storage/get-file-download.md b/docs/examples/storage/get-file-download.md index e94ba95..cbd4c16 100644 --- a/docs/examples/storage/get-file-download.md +++ b/docs/examples/storage/get-file-download.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const storage = new sdk.Storage(client); diff --git a/docs/examples/storage/get-file-preview.md b/docs/examples/storage/get-file-preview.md index 7ce7371..be7b974 100644 --- a/docs/examples/storage/get-file-preview.md +++ b/docs/examples/storage/get-file-preview.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const storage = new sdk.Storage(client); diff --git a/docs/examples/storage/get-file-view.md b/docs/examples/storage/get-file-view.md index 1ddfa1c..f5722d0 100644 --- a/docs/examples/storage/get-file-view.md +++ b/docs/examples/storage/get-file-view.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const storage = new sdk.Storage(client); diff --git a/docs/examples/storage/get-file.md b/docs/examples/storage/get-file.md index 54d41b1..61b14e6 100644 --- a/docs/examples/storage/get-file.md +++ b/docs/examples/storage/get-file.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const storage = new sdk.Storage(client); diff --git a/docs/examples/storage/list-buckets.md b/docs/examples/storage/list-buckets.md index beaea21..ce012c4 100644 --- a/docs/examples/storage/list-buckets.md +++ b/docs/examples/storage/list-buckets.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const storage = new sdk.Storage(client); diff --git a/docs/examples/storage/list-files.md b/docs/examples/storage/list-files.md index 001c186..a9dbaa8 100644 --- a/docs/examples/storage/list-files.md +++ b/docs/examples/storage/list-files.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const storage = new sdk.Storage(client); diff --git a/docs/examples/storage/update-bucket.md b/docs/examples/storage/update-bucket.md index 483b4cc..31e1316 100644 --- a/docs/examples/storage/update-bucket.md +++ b/docs/examples/storage/update-bucket.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const storage = new sdk.Storage(client); diff --git a/docs/examples/storage/update-file.md b/docs/examples/storage/update-file.md index d508bbb..c60b2e4 100644 --- a/docs/examples/storage/update-file.md +++ b/docs/examples/storage/update-file.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const storage = new sdk.Storage(client); diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md index 642fb0a..4606624 100644 --- a/docs/examples/teams/create-membership.md +++ b/docs/examples/teams/create-membership.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/teams/create.md b/docs/examples/teams/create.md index dc30f10..cecf4f6 100644 --- a/docs/examples/teams/create.md +++ b/docs/examples/teams/create.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/teams/delete-membership.md b/docs/examples/teams/delete-membership.md index 08dcf39..933cd7c 100644 --- a/docs/examples/teams/delete-membership.md +++ b/docs/examples/teams/delete-membership.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/teams/delete.md b/docs/examples/teams/delete.md index 6956f5f..50963b3 100644 --- a/docs/examples/teams/delete.md +++ b/docs/examples/teams/delete.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/teams/get-membership.md b/docs/examples/teams/get-membership.md index 1fbd993..b638ade 100644 --- a/docs/examples/teams/get-membership.md +++ b/docs/examples/teams/get-membership.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/teams/get-prefs.md b/docs/examples/teams/get-prefs.md index aea7830..68f19a4 100644 --- a/docs/examples/teams/get-prefs.md +++ b/docs/examples/teams/get-prefs.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/teams/get.md b/docs/examples/teams/get.md index 2fbfb3e..38ee6e4 100644 --- a/docs/examples/teams/get.md +++ b/docs/examples/teams/get.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/teams/list-memberships.md b/docs/examples/teams/list-memberships.md index 22ce299..c66ec7d 100644 --- a/docs/examples/teams/list-memberships.md +++ b/docs/examples/teams/list-memberships.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/teams/list.md b/docs/examples/teams/list.md index 51f200f..d50527b 100644 --- a/docs/examples/teams/list.md +++ b/docs/examples/teams/list.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/teams/update-membership-status.md b/docs/examples/teams/update-membership-status.md index c97f0fd..80660e9 100644 --- a/docs/examples/teams/update-membership-status.md +++ b/docs/examples/teams/update-membership-status.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/teams/update-membership.md b/docs/examples/teams/update-membership.md index bb8edcc..068cc55 100644 --- a/docs/examples/teams/update-membership.md +++ b/docs/examples/teams/update-membership.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/teams/update-name.md b/docs/examples/teams/update-name.md index ed349bb..2174120 100644 --- a/docs/examples/teams/update-name.md +++ b/docs/examples/teams/update-name.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/teams/update-prefs.md b/docs/examples/teams/update-prefs.md index 3f396b6..9d6a6f5 100644 --- a/docs/examples/teams/update-prefs.md +++ b/docs/examples/teams/update-prefs.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID + .setProject('') // Your project ID .setSession(''); // The user session to authenticate with const teams = new sdk.Teams(client); diff --git a/docs/examples/users/create-argon2user.md b/docs/examples/users/create-argon2user.md index 942f3d0..e96a797 100644 --- a/docs/examples/users/create-argon2user.md +++ b/docs/examples/users/create-argon2user.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/create-bcrypt-user.md b/docs/examples/users/create-bcrypt-user.md index 2ab4974..be14d21 100644 --- a/docs/examples/users/create-bcrypt-user.md +++ b/docs/examples/users/create-bcrypt-user.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/create-j-w-t.md b/docs/examples/users/create-j-w-t.md new file mode 100644 index 0000000..e615b1e --- /dev/null +++ b/docs/examples/users/create-j-w-t.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createJWT( + '', // userId + '', // sessionId (optional) + 0 // duration (optional) +); diff --git a/docs/examples/users/create-m-d5user.md b/docs/examples/users/create-m-d5user.md index e862f56..77a7d70 100644 --- a/docs/examples/users/create-m-d5user.md +++ b/docs/examples/users/create-m-d5user.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/create-mfa-recovery-codes.md b/docs/examples/users/create-mfa-recovery-codes.md index ad7d0d4..4294529 100644 --- a/docs/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/users/create-mfa-recovery-codes.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/create-p-h-pass-user.md b/docs/examples/users/create-p-h-pass-user.md index 20f9676..a5784d7 100644 --- a/docs/examples/users/create-p-h-pass-user.md +++ b/docs/examples/users/create-p-h-pass-user.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/create-s-h-a-user.md b/docs/examples/users/create-s-h-a-user.md index 3e2707f..a72e373 100644 --- a/docs/examples/users/create-s-h-a-user.md +++ b/docs/examples/users/create-s-h-a-user.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/create-scrypt-modified-user.md b/docs/examples/users/create-scrypt-modified-user.md index b012154..b27fe31 100644 --- a/docs/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/users/create-scrypt-modified-user.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/create-scrypt-user.md b/docs/examples/users/create-scrypt-user.md index 0920b59..60b61be 100644 --- a/docs/examples/users/create-scrypt-user.md +++ b/docs/examples/users/create-scrypt-user.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/create-session.md b/docs/examples/users/create-session.md index 0a79f5c..2672905 100644 --- a/docs/examples/users/create-session.md +++ b/docs/examples/users/create-session.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/create-target.md b/docs/examples/users/create-target.md index 79e889c..099b003 100644 --- a/docs/examples/users/create-target.md +++ b/docs/examples/users/create-target.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/create-token.md b/docs/examples/users/create-token.md index 971ad96..a399313 100644 --- a/docs/examples/users/create-token.md +++ b/docs/examples/users/create-token.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/create.md b/docs/examples/users/create.md index 95e6c4c..e8fb4cd 100644 --- a/docs/examples/users/create.md +++ b/docs/examples/users/create.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/delete-identity.md b/docs/examples/users/delete-identity.md index 611039b..46f5203 100644 --- a/docs/examples/users/delete-identity.md +++ b/docs/examples/users/delete-identity.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/delete-mfa-authenticator.md b/docs/examples/users/delete-mfa-authenticator.md index 5be1ed4..1f00e96 100644 --- a/docs/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/users/delete-mfa-authenticator.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/delete-session.md b/docs/examples/users/delete-session.md index ec24ea9..168f494 100644 --- a/docs/examples/users/delete-session.md +++ b/docs/examples/users/delete-session.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/delete-sessions.md b/docs/examples/users/delete-sessions.md index 4ad7e16..4c320fc 100644 --- a/docs/examples/users/delete-sessions.md +++ b/docs/examples/users/delete-sessions.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/delete-target.md b/docs/examples/users/delete-target.md index d857d7f..6505a8b 100644 --- a/docs/examples/users/delete-target.md +++ b/docs/examples/users/delete-target.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/delete.md b/docs/examples/users/delete.md index e30be84..4d6c996 100644 --- a/docs/examples/users/delete.md +++ b/docs/examples/users/delete.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/get-mfa-recovery-codes.md b/docs/examples/users/get-mfa-recovery-codes.md index ef67a0a..3e97065 100644 --- a/docs/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/users/get-mfa-recovery-codes.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/get-prefs.md b/docs/examples/users/get-prefs.md index 04ed004..fda205b 100644 --- a/docs/examples/users/get-prefs.md +++ b/docs/examples/users/get-prefs.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/get-target.md b/docs/examples/users/get-target.md index ef44e9b..1d93a1b 100644 --- a/docs/examples/users/get-target.md +++ b/docs/examples/users/get-target.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/get.md b/docs/examples/users/get.md index 3d3eb15..9d36157 100644 --- a/docs/examples/users/get.md +++ b/docs/examples/users/get.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/list-identities.md b/docs/examples/users/list-identities.md index 1ead975..0ba1345 100644 --- a/docs/examples/users/list-identities.md +++ b/docs/examples/users/list-identities.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/list-logs.md b/docs/examples/users/list-logs.md index ad90cfe..5636e02 100644 --- a/docs/examples/users/list-logs.md +++ b/docs/examples/users/list-logs.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/list-memberships.md b/docs/examples/users/list-memberships.md index 51631be..bc4ce5e 100644 --- a/docs/examples/users/list-memberships.md +++ b/docs/examples/users/list-memberships.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/list-mfa-factors.md b/docs/examples/users/list-mfa-factors.md index 601410b..6396a69 100644 --- a/docs/examples/users/list-mfa-factors.md +++ b/docs/examples/users/list-mfa-factors.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/list-sessions.md b/docs/examples/users/list-sessions.md index b07fb87..de4aa3d 100644 --- a/docs/examples/users/list-sessions.md +++ b/docs/examples/users/list-sessions.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/list-targets.md b/docs/examples/users/list-targets.md index 547f496..2d2a6d2 100644 --- a/docs/examples/users/list-targets.md +++ b/docs/examples/users/list-targets.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/list.md b/docs/examples/users/list.md index a1ba8bd..664d32c 100644 --- a/docs/examples/users/list.md +++ b/docs/examples/users/list.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/update-email-verification.md b/docs/examples/users/update-email-verification.md index f8c9988..560ca3e 100644 --- a/docs/examples/users/update-email-verification.md +++ b/docs/examples/users/update-email-verification.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/update-email.md b/docs/examples/users/update-email.md index ec27032..eef1761 100644 --- a/docs/examples/users/update-email.md +++ b/docs/examples/users/update-email.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/update-labels.md b/docs/examples/users/update-labels.md index 9bfb286..ec27094 100644 --- a/docs/examples/users/update-labels.md +++ b/docs/examples/users/update-labels.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/update-mfa-recovery-codes.md b/docs/examples/users/update-mfa-recovery-codes.md index bc64df3..56ef9b2 100644 --- a/docs/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/users/update-mfa-recovery-codes.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/update-mfa.md b/docs/examples/users/update-mfa.md index 2726e58..7c79444 100644 --- a/docs/examples/users/update-mfa.md +++ b/docs/examples/users/update-mfa.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/update-name.md b/docs/examples/users/update-name.md index 388c82d..5478a78 100644 --- a/docs/examples/users/update-name.md +++ b/docs/examples/users/update-name.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/update-password.md b/docs/examples/users/update-password.md index 40fa2fb..856e3a8 100644 --- a/docs/examples/users/update-password.md +++ b/docs/examples/users/update-password.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/update-phone-verification.md b/docs/examples/users/update-phone-verification.md index fdfa816..654e783 100644 --- a/docs/examples/users/update-phone-verification.md +++ b/docs/examples/users/update-phone-verification.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/update-phone.md b/docs/examples/users/update-phone.md index c1d3276..8cc4af0 100644 --- a/docs/examples/users/update-phone.md +++ b/docs/examples/users/update-phone.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/update-prefs.md b/docs/examples/users/update-prefs.md index 4114565..f80dae1 100644 --- a/docs/examples/users/update-prefs.md +++ b/docs/examples/users/update-prefs.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/update-status.md b/docs/examples/users/update-status.md index 0b56965..04a18a2 100644 --- a/docs/examples/users/update-status.md +++ b/docs/examples/users/update-status.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/docs/examples/users/update-target.md b/docs/examples/users/update-target.md index c7d995d..3322867 100644 --- a/docs/examples/users/update-target.md +++ b/docs/examples/users/update-target.md @@ -2,8 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key + .setProject('') // Your project ID + .setKey(''); // Your secret API key const users = new sdk.Users(client); diff --git a/package.json b/package.json index f550d89..5223d01 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "node-appwrite", "homepage": "https://appwrite.io/support", "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "13.0.0", + "version": "14.0.0", "license": "BSD-3-Clause", "main": "dist/index.js", "type": "commonjs", diff --git a/src/client.ts b/src/client.ts index 770edb4..1e19619 100644 --- a/src/client.ts +++ b/src/client.ts @@ -33,7 +33,7 @@ class AppwriteException extends Error { } function getUserAgent() { - let ua = 'AppwriteNodeJSSDK/13.0.0'; + let ua = 'AppwriteNodeJSSDK/14.0.0'; // `process` is a global in Node.js, but not fully available in all runtimes. const platform: string[] = []; @@ -82,9 +82,9 @@ class Client { 'x-sdk-name': 'Node.js', 'x-sdk-platform': 'server', 'x-sdk-language': 'nodejs', - 'x-sdk-version': '13.0.0', + 'x-sdk-version': '14.0.0', 'user-agent' : getUserAgent(), - 'X-Appwrite-Response-Format': '1.5.0', + 'X-Appwrite-Response-Format': '1.6.0', }; /** @@ -327,6 +327,11 @@ class Client { const response = await fetch(uri, options); + const warnings = response.headers.get('x-appwrite-warning'); + if (warnings) { + warnings.split(';').forEach((warning: string) => console.warn('Warning: ' + warning)); + } + if (response.headers.get('content-type')?.includes('application/json')) { data = await response.json(); } else if (responseType === 'arrayBuffer') { diff --git a/src/enums/name.ts b/src/enums/name.ts index 4a5eccc..52e91aa 100644 --- a/src/enums/name.ts +++ b/src/enums/name.ts @@ -6,7 +6,7 @@ export enum Name { V1functions = 'v1-functions', V1usage = 'v1-usage', V1usagedump = 'v1-usage-dump', - Webhooksv1 = 'webhooksv1', + V1webhooks = 'v1-webhooks', V1certificates = 'v1-certificates', V1builds = 'v1-builds', V1messaging = 'v1-messaging', diff --git a/src/enums/runtime.ts b/src/enums/runtime.ts index 113d655..f0524b5 100644 --- a/src/enums/runtime.ts +++ b/src/enums/runtime.ts @@ -44,4 +44,5 @@ export enum Runtime { Cpp17 = 'cpp-17', Cpp20 = 'cpp-20', Bun10 = 'bun-1.0', + Go123 = 'go-1.23', } \ No newline at end of file diff --git a/src/id.ts b/src/id.ts index 199f00a..33495cc 100644 --- a/src/id.ts +++ b/src/id.ts @@ -1,6 +1,13 @@ +/** + * Helper class to generate ID strings for resources. + */ export class ID { - // Generate an hex ID based on timestamp - // Recreated from https://www.php.net/manual/en/function.uniqid.php + /** + * Generate an hex ID based on timestamp. + * Recreated from https://www.php.net/manual/en/function.uniqid.php + * + * @returns {string} + */ static #hexTimestamp(): string { const now = new Date(); const sec = Math.floor(now.getTime() / 1000); @@ -11,10 +18,22 @@ export class ID { return hexTimestamp; } + /** + * Uses the provided ID as the ID for the resource. + * + * @param {string} id + * @returns {string} + */ public static custom(id: string): string { return id } + /** + * Have Appwrite generate a unique ID for you. + * + * @param {number} padding. Default is 7. + * @returns {string} + */ public static unique(padding: number = 7): string { // Generate a unique ID with padding to have a longer ID const baseId = ID.#hexTimestamp(); diff --git a/src/models.ts b/src/models.ts index 5ef97b9..1cbd00c 100644 --- a/src/models.ts +++ b/src/models.ts @@ -1,3 +1,6 @@ +/** + * Appwrite Models + */ export namespace Models { /** * Documents List @@ -363,6 +366,19 @@ export namespace Models { */ targets: Target[]; } + /** + * Specifications List + */ + export type SpecificationList = { + /** + * Total number of specifications documents that matched your query. + */ + total: number; + /** + * List of specifications. + */ + specifications: Specification[]; + } /** * Database */ @@ -1660,6 +1676,10 @@ export namespace Models { * Function's active deployment ID. */ deployment: string; + /** + * Allowed permission scopes. + */ + scopes: string[]; /** * Function variables. */ @@ -1708,6 +1728,10 @@ export namespace Models { * Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests */ providerSilentMode: boolean; + /** + * Machine specification for builds and executions. + */ + specification: string; } /** * Runtime @@ -1717,6 +1741,10 @@ export namespace Models { * Runtime ID. */ $id: string; + /** + * Parent runtime key. + */ + key: string; /** * Runtime Name. */ @@ -1778,6 +1806,10 @@ export namespace Models { * The code size in bytes. */ size: number; + /** + * The build output size in bytes. + */ + buildSize: number; /** * The current build ID. */ @@ -1907,6 +1939,51 @@ export namespace Models { * Function execution duration in seconds. */ duration: number; + /** + * The scheduled time for execution. If left empty, execution will be queued immediately. + */ + scheduledAt?: string; + } + /** + * Build + */ + export type Build = { + /** + * Build ID. + */ + $id: string; + /** + * The deployment that created this build. + */ + deploymentId: string; + /** + * The build status. There are a few different types and each one means something different. \nFailed - The deployment build has failed. More details can usually be found in buildStderr\nReady - The deployment build was successful and the deployment is ready to be deployed\nProcessing - The deployment is currently waiting to have a build triggered\nBuilding - The deployment is currently being built + */ + status: string; + /** + * The stdout of the build. + */ + stdout: string; + /** + * The stderr of the build. + */ + stderr: string; + /** + * The deployment creation date in ISO 8601 format. + */ + startTime: string; + /** + * The time the build was finished in ISO 8601 format. + */ + endTime: string; + /** + * The build duration in seconds. + */ + duration: number; + /** + * The code size in bytes. + */ + size: number; } /** * Variable @@ -2132,6 +2209,27 @@ export namespace Models { */ value: string; } + /** + * Specification + */ + export type Specification = { + /** + * Memory size in MB. + */ + memory: number; + /** + * Number of CPUs. + */ + cpus: number; + /** + * Is size enabled. + */ + enabled: boolean; + /** + * Size slug. + */ + slug: string; + } /** * MFA Challenge */ diff --git a/src/permission.ts b/src/permission.ts index bfc330a..94d9ced 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -1,22 +1,57 @@ +/** + * Helper class to generate permission strings for resources. + */ export class Permission { - + /** + * Generate read permission string for the provided role. + * + * @param {string} role + * @returns {string} + */ static read = (role: string): string => { - return `read("${role}")` + return `read("${role}")`; } + /** + * Generate write permission string for the provided role. + * + * This is an alias of update, delete, and possibly create. + * Don't use write in combination with update, delete, or create. + * + * @param {string} role + * @returns {string} + */ static write = (role: string): string => { - return `write("${role}")` + return `write("${role}")`; } + /** + * Generate create permission string for the provided role. + * + * @param {string} role + * @returns {string} + */ static create = (role: string): string => { - return `create("${role}")` + return `create("${role}")`; } + /** + * Generate update permission string for the provided role. + * + * @param {string} role + * @returns {string} + */ static update = (role: string): string => { - return `update("${role}")` + return `update("${role}")`; } + /** + * Generate delete permission string for the provided role. + * + * @param {string} role + * @returns {string} + */ static delete = (role: string): string => { - return `delete("${role}")` + return `delete("${role}")`; } } diff --git a/src/query.ts b/src/query.ts index 229d6c8..acad038 100644 --- a/src/query.ts +++ b/src/query.ts @@ -3,11 +3,21 @@ export type QueryTypesList = string[] | number[] | boolean[] | Query[]; export type QueryTypes = QueryTypesSingle | QueryTypesList; type AttributesTypes = string | string[]; +/** + * Helper class to generate query strings. + */ export class Query { method: string; attribute: AttributesTypes | undefined; values: QueryTypesList | undefined; + /** + * Constructor for Query class. + * + * @param {string} method + * @param {AttributesTypes} attribute + * @param {QueryTypes} values + */ constructor( method: string, attribute?: AttributesTypes, @@ -25,6 +35,11 @@ export class Query { } } + /** + * Convert the query object to a JSON string. + * + * @returns {string} + */ toString(): string { return JSON.stringify({ method: this.method, @@ -33,69 +48,214 @@ export class Query { }); } + /** + * Filter resources where attribute is equal to value. + * + * @param {string} attribute + * @param {QueryTypes} value + * @returns {string} + */ static equal = (attribute: string, value: QueryTypes): string => new Query("equal", attribute, value).toString(); + /** + * Filter resources where attribute is not equal to value. + * + * @param {string} attribute + * @param {QueryTypes} value + * @returns {string} + */ static notEqual = (attribute: string, value: QueryTypes): string => new Query("notEqual", attribute, value).toString(); + /** + * Filter resources where attribute is less than value. + * + * @param {string} attribute + * @param {QueryTypes} value + * @returns {string} + */ static lessThan = (attribute: string, value: QueryTypes): string => new Query("lessThan", attribute, value).toString(); + /** + * Filter resources where attribute is less than or equal to value. + * + * @param {string} attribute + * @param {QueryTypes} value + * @returns {string} + */ static lessThanEqual = (attribute: string, value: QueryTypes): string => new Query("lessThanEqual", attribute, value).toString(); + /** + * Filter resources where attribute is greater than value. + * + * @param {string} attribute + * @param {QueryTypes} value + * @returns {string} + */ static greaterThan = (attribute: string, value: QueryTypes): string => new Query("greaterThan", attribute, value).toString(); + /** + * Filter resources where attribute is greater than or equal to value. + * + * @param {string} attribute + * @param {QueryTypes} value + * @returns {string} + */ static greaterThanEqual = (attribute: string, value: QueryTypes): string => new Query("greaterThanEqual", attribute, value).toString(); + /** + * Filter resources where attribute is null. + * + * @param {string} attribute + * @returns {string} + */ static isNull = (attribute: string): string => new Query("isNull", attribute).toString(); + /** + * Filter resources where attribute is not null. + * + * @param {string} attribute + * @returns {string} + */ static isNotNull = (attribute: string): string => new Query("isNotNull", attribute).toString(); - static between = (attribute: string, start: string | number, end: string | number) => + /** + * Filter resources where attribute is between start and end (inclusive). + * + * @param {string} attribute + * @param {string | number} start + * @param {string | number} end + * @returns {string} + */ + static between = (attribute: string, start: string | number, end: string | number): string => new Query("between", attribute, [start, end] as QueryTypesList).toString(); + /** + * Filter resources where attribute starts with value. + * + * @param {string} attribute + * @param {string} value + * @returns {string} + */ static startsWith = (attribute: string, value: string): string => new Query("startsWith", attribute, value).toString(); + /** + * Filter resources where attribute ends with value. + * + * @param {string} attribute + * @param {string} value + * @returns {string} + */ static endsWith = (attribute: string, value: string): string => new Query("endsWith", attribute, value).toString(); + /** + * Specify which attributes should be returned by the API call. + * + * @param {string[]} attributes + * @returns {string} + */ static select = (attributes: string[]): string => new Query("select", undefined, attributes).toString(); + /** + * Filter resources by searching attribute for value. + * A fulltext index on attribute is required for this query to work. + * + * @param {string} attribute + * @param {string} value + * @returns {string} + */ static search = (attribute: string, value: string): string => new Query("search", attribute, value).toString(); + /** + * Sort results by attribute descending. + * + * @param {string} attribute + * @returns {string} + */ static orderDesc = (attribute: string): string => new Query("orderDesc", attribute).toString(); + /** + * Sort results by attribute ascending. + * + * @param {string} attribute + * @returns {string} + */ static orderAsc = (attribute: string): string => new Query("orderAsc", attribute).toString(); + /** + * Return results after documentId. + * + * @param {string} documentId + * @returns {string} + */ static cursorAfter = (documentId: string): string => new Query("cursorAfter", undefined, documentId).toString(); + /** + * Return results before documentId. + * + * @param {string} documentId + * @returns {string} + */ static cursorBefore = (documentId: string): string => new Query("cursorBefore", undefined, documentId).toString(); + /** + * Return only limit results. + * + * @param {number} limit + * @returns {string} + */ static limit = (limit: number): string => new Query("limit", undefined, limit).toString(); + /** + * Filter resources by skipping the first offset results. + * + * @param {number} offset + * @returns {string} + */ static offset = (offset: number): string => new Query("offset", undefined, offset).toString(); + /** + * Filter resources where attribute contains the specified value. + * + * @param {string} attribute + * @param {string | string[]} value + * @returns {string} + */ static contains = (attribute: string, value: string | string[]): string => new Query("contains", attribute, value).toString(); + /** + * Combine multiple queries using logical OR operator. + * + * @param {string[]} queries + * @returns {string} + */ static or = (queries: string[]) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString(); + /** + * Combine multiple queries using logical AND operator. + * + * @param {string[]} queries + * @returns {string} + */ static and = (queries: string[]) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString(); } diff --git a/src/services/account.ts b/src/services/account.ts index b01877a..213b137 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -189,7 +189,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, * @returns {Promise} */ async createJWT(): Promise { - const apiPath = '/account/jwt'; + const apiPath = '/account/jwts'; const payload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); @@ -264,7 +264,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, ); } /** - * Add Authenticator + * Create Authenticator * * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method. * @@ -294,7 +294,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, /** * Verify Authenticator * - * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. add + * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. * * @param {AuthenticatorType} type * @param {string} otp @@ -332,22 +332,15 @@ This endpoint can also be used to convert an anonymous account to a normal one, * Delete an authenticator for a user by ID. * * @param {AuthenticatorType} type - * @param {string} otp * @throws {AppwriteException} * @returns {Promise<{}>} */ - async deleteMfaAuthenticator(type: AuthenticatorType, otp: string): Promise<{}> { + async deleteMfaAuthenticator(type: AuthenticatorType): Promise<{}> { if (typeof type === 'undefined') { throw new AppwriteException('Missing required parameter: "type"'); } - if (typeof otp === 'undefined') { - throw new AppwriteException('Missing required parameter: "otp"'); - } const apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type); const payload: Payload = {}; - if (typeof otp !== 'undefined') { - payload['otp'] = otp; - } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -362,7 +355,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, ); } /** - * Create 2FA Challenge + * Create MFA Challenge * * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. * @@ -1378,7 +1371,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ ); } /** - * Create phone verification (confirmation) + * Update phone verification (confirmation) * * Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code. * diff --git a/src/services/avatars.ts b/src/services/avatars.ts index c9a9cbb..3111f49 100644 --- a/src/services/avatars.ts +++ b/src/services/avatars.ts @@ -103,6 +103,7 @@ When one dimension is specified and the other is 0, the image is scaled with pre * * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL. +This endpoint does not follow HTTP redirects. * * @param {string} url * @throws {AppwriteException} @@ -182,6 +183,7 @@ When one dimension is specified and the other is 0, the image is scaled with pre When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px. +This endpoint does not follow HTTP redirects. * * @param {string} url * @param {number} width diff --git a/src/services/functions.ts b/src/services/functions.ts index afe10e3..f78e272 100644 --- a/src/services/functions.ts +++ b/src/services/functions.ts @@ -58,6 +58,7 @@ export class Functions { * @param {boolean} logging * @param {string} entrypoint * @param {string} commands + * @param {string[]} scopes * @param {string} installationId * @param {string} providerRepositoryId * @param {string} providerBranch @@ -66,11 +67,12 @@ export class Functions { * @param {string} templateRepository * @param {string} templateOwner * @param {string} templateRootDirectory - * @param {string} templateBranch + * @param {string} templateVersion + * @param {string} specification * @throws {AppwriteException} * @returns {Promise} */ - async create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, templateRepository?: string, templateOwner?: string, templateRootDirectory?: string, templateBranch?: string): Promise { + async create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, templateRepository?: string, templateOwner?: string, templateRootDirectory?: string, templateVersion?: string, specification?: string): Promise { if (typeof functionId === 'undefined') { throw new AppwriteException('Missing required parameter: "functionId"'); } @@ -115,6 +117,9 @@ export class Functions { if (typeof commands !== 'undefined') { payload['commands'] = commands; } + if (typeof scopes !== 'undefined') { + payload['scopes'] = scopes; + } if (typeof installationId !== 'undefined') { payload['installationId'] = installationId; } @@ -139,8 +144,11 @@ export class Functions { if (typeof templateRootDirectory !== 'undefined') { payload['templateRootDirectory'] = templateRootDirectory; } - if (typeof templateBranch !== 'undefined') { - payload['templateBranch'] = templateBranch; + if (typeof templateVersion !== 'undefined') { + payload['templateVersion'] = templateVersion; + } + if (typeof specification !== 'undefined') { + payload['specification'] = specification; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -179,6 +187,31 @@ export class Functions { payload, ); } + /** + * List available function runtime specifications + * + * List allowed function specifications for this instance. + + * + * @throws {AppwriteException} + * @returns {Promise} + */ + async listSpecifications(): Promise { + const apiPath = '/functions/specifications'; + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + } + + return await this.client.call( + 'get', + uri, + apiHeaders, + payload, + ); + } /** * Get function * @@ -223,15 +256,17 @@ export class Functions { * @param {boolean} logging * @param {string} entrypoint * @param {string} commands + * @param {string[]} scopes * @param {string} installationId * @param {string} providerRepositoryId * @param {string} providerBranch * @param {boolean} providerSilentMode * @param {string} providerRootDirectory + * @param {string} specification * @throws {AppwriteException} * @returns {Promise} */ - async update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string): Promise { + async update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise { if (typeof functionId === 'undefined') { throw new AppwriteException('Missing required parameter: "functionId"'); } @@ -270,6 +305,9 @@ export class Functions { if (typeof commands !== 'undefined') { payload['commands'] = commands; } + if (typeof scopes !== 'undefined') { + payload['scopes'] = scopes; + } if (typeof installationId !== 'undefined') { payload['installationId'] = installationId; } @@ -285,6 +323,9 @@ export class Functions { if (typeof providerRootDirectory !== 'undefined') { payload['providerRootDirectory'] = providerRootDirectory; } + if (typeof specification !== 'undefined') { + payload['specification'] = specification; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -450,7 +491,7 @@ Use the "command" param to set the entrypoint used to execute your cod ); } /** - * Update function deployment + * Update deployment * * Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint. * @@ -514,9 +555,8 @@ Use the "command" param to set the entrypoint used to execute your cod ); } /** - * Create build + * Rebuild deployment * - * Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build. * * @param {string} functionId * @param {string} deploymentId @@ -524,18 +564,18 @@ Use the "command" param to set the entrypoint used to execute your cod * @throws {AppwriteException} * @returns {Promise<{}>} */ - async createBuild(functionId: string, deploymentId: string, buildId: string): Promise<{}> { + async createBuild(functionId: string, deploymentId: string, buildId?: string): Promise<{}> { if (typeof functionId === 'undefined') { throw new AppwriteException('Missing required parameter: "functionId"'); } if (typeof deploymentId === 'undefined') { throw new AppwriteException('Missing required parameter: "deploymentId"'); } - if (typeof buildId === 'undefined') { - throw new AppwriteException('Missing required parameter: "buildId"'); - } - const apiPath = '/functions/{functionId}/deployments/{deploymentId}/builds/{buildId}'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId).replace('{buildId}', buildId); + const apiPath = '/functions/{functionId}/deployments/{deploymentId}/build'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId); const payload: Payload = {}; + if (typeof buildId !== 'undefined') { + payload['buildId'] = buildId; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -550,7 +590,38 @@ Use the "command" param to set the entrypoint used to execute your cod ); } /** - * Download Deployment + * Cancel deployment + * + * + * @param {string} functionId + * @param {string} deploymentId + * @throws {AppwriteException} + * @returns {Promise} + */ + async updateDeploymentBuild(functionId: string, deploymentId: string): Promise { + if (typeof functionId === 'undefined') { + throw new AppwriteException('Missing required parameter: "functionId"'); + } + if (typeof deploymentId === 'undefined') { + throw new AppwriteException('Missing required parameter: "deploymentId"'); + } + const apiPath = '/functions/{functionId}/deployments/{deploymentId}/build'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + } + + return await this.client.call( + 'patch', + uri, + apiHeaders, + payload, + ); + } + /** + * Download deployment * * Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download. * @@ -559,7 +630,7 @@ Use the "command" param to set the entrypoint used to execute your cod * @throws {AppwriteException} * @returns {Promise} */ - async downloadDeployment(functionId: string, deploymentId: string): Promise { + async getDeploymentDownload(functionId: string, deploymentId: string): Promise { if (typeof functionId === 'undefined') { throw new AppwriteException('Missing required parameter: "functionId"'); } @@ -629,10 +700,11 @@ Use the "command" param to set the entrypoint used to execute your cod * @param {string} xpath * @param {ExecutionMethod} method * @param {object} headers + * @param {string} scheduledAt * @throws {AppwriteException} * @returns {Promise} */ - async createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object): Promise { + async createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string): Promise { if (typeof functionId === 'undefined') { throw new AppwriteException('Missing required parameter: "functionId"'); } @@ -653,6 +725,9 @@ Use the "command" param to set the entrypoint used to execute your cod if (typeof headers !== 'undefined') { payload['headers'] = headers; } + if (typeof scheduledAt !== 'undefined') { + payload['scheduledAt'] = scheduledAt; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -698,6 +773,39 @@ Use the "command" param to set the entrypoint used to execute your cod payload, ); } + /** + * Delete execution + * + * Delete a function execution by its unique ID. + + * + * @param {string} functionId + * @param {string} executionId + * @throws {AppwriteException} + * @returns {Promise<{}>} + */ + async deleteExecution(functionId: string, executionId: string): Promise<{}> { + if (typeof functionId === 'undefined') { + throw new AppwriteException('Missing required parameter: "functionId"'); + } + if (typeof executionId === 'undefined') { + throw new AppwriteException('Missing required parameter: "executionId"'); + } + const apiPath = '/functions/{functionId}/executions/{executionId}'.replace('{functionId}', functionId).replace('{executionId}', executionId); + const payload: Payload = {}; + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + } + + return await this.client.call( + 'delete', + uri, + apiHeaders, + payload, + ); + } /** * List variables * diff --git a/src/services/users.ts b/src/services/users.ts index 9e3581b..ba1843f 100644 --- a/src/services/users.ts +++ b/src/services/users.ts @@ -644,6 +644,42 @@ export class Users { payload, ); } + /** + * Create user JWT + * + * Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted. + * + * @param {string} userId + * @param {string} sessionId + * @param {number} duration + * @throws {AppwriteException} + * @returns {Promise} + */ + async createJWT(userId: string, sessionId?: string, duration?: number): Promise { + if (typeof userId === 'undefined') { + throw new AppwriteException('Missing required parameter: "userId"'); + } + const apiPath = '/users/{userId}/jwts'.replace('{userId}', userId); + const payload: Payload = {}; + if (typeof sessionId !== 'undefined') { + payload['sessionId'] = sessionId; + } + if (typeof duration !== 'undefined') { + payload['duration'] = duration; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'content-type': 'application/json', + } + + return await this.client.call( + 'post', + uri, + apiHeaders, + payload, + ); + } /** * Update user labels *