node-appwrite 5.1.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/docs/examples/account/create-phone-verification.md +20 -0
- package/docs/examples/account/create-recovery.md +3 -3
- package/docs/examples/account/create-verification.md +3 -3
- package/docs/examples/account/delete-session.md +3 -3
- package/docs/examples/account/delete-sessions.md +3 -3
- package/docs/examples/account/get-logs.md +3 -3
- package/docs/examples/account/get-prefs.md +3 -3
- package/docs/examples/account/get-session.md +3 -3
- package/docs/examples/account/get-sessions.md +3 -3
- package/docs/examples/account/get.md +3 -3
- package/docs/examples/account/update-email.md +3 -3
- package/docs/examples/account/update-name.md +3 -3
- package/docs/examples/account/update-password.md +3 -3
- package/docs/examples/account/update-phone-verification.md +20 -0
- package/docs/examples/{database/create-ip-attribute.md → account/update-phone.md} +4 -4
- package/docs/examples/account/update-prefs.md +3 -3
- package/docs/examples/account/update-recovery.md +3 -3
- package/docs/examples/account/update-session.md +3 -3
- package/docs/examples/account/{delete.md → update-status.md} +3 -3
- package/docs/examples/account/update-verification.md +3 -3
- package/docs/examples/avatars/get-browser.md +3 -3
- package/docs/examples/avatars/get-credit-card.md +3 -3
- package/docs/examples/avatars/get-favicon.md +3 -3
- package/docs/examples/avatars/get-flag.md +3 -3
- package/docs/examples/avatars/get-image.md +3 -3
- package/docs/examples/avatars/get-initials.md +3 -3
- package/docs/examples/avatars/get-q-r.md +3 -3
- package/docs/examples/databases/create-boolean-attribute.md +20 -0
- package/docs/examples/{database → databases}/create-collection.md +3 -3
- package/docs/examples/databases/create-document.md +20 -0
- package/docs/examples/databases/create-email-attribute.md +20 -0
- package/docs/examples/databases/create-enum-attribute.md +20 -0
- package/docs/examples/{database → databases}/create-float-attribute.md +3 -3
- package/docs/examples/{database → databases}/create-index.md +3 -3
- package/docs/examples/{database → databases}/create-integer-attribute.md +3 -3
- package/docs/examples/{database/create-email-attribute.md → databases/create-ip-attribute.md} +3 -3
- package/docs/examples/{database → databases}/create-string-attribute.md +3 -3
- package/docs/examples/{database → databases}/create-url-attribute.md +3 -3
- package/docs/examples/{database/delete-attribute.md → databases/create.md} +3 -3
- package/docs/examples/databases/delete-attribute.md +20 -0
- package/docs/examples/databases/delete-collection.md +20 -0
- package/docs/examples/databases/delete-document.md +20 -0
- package/docs/examples/{database/create-document.md → databases/delete-index.md} +3 -3
- package/docs/examples/{database/delete-index.md → databases/delete.md} +3 -3
- package/docs/examples/databases/get-attribute.md +20 -0
- package/docs/examples/{database → databases}/get-collection.md +3 -3
- package/docs/examples/{database/delete-document.md → databases/get-document.md} +3 -3
- package/docs/examples/{database/create-boolean-attribute.md → databases/get-index.md} +3 -3
- package/docs/examples/{database/get-index.md → databases/get.md} +3 -3
- package/docs/examples/{database → databases}/list-attributes.md +3 -3
- package/docs/examples/databases/list-collections.md +20 -0
- package/docs/examples/{database/create-enum-attribute.md → databases/list-documents.md} +3 -3
- package/docs/examples/{database → databases}/list-indexes.md +3 -3
- package/docs/examples/{database/list-documents.md → databases/list.md} +3 -3
- package/docs/examples/{database → databases}/update-collection.md +3 -3
- package/docs/examples/{database → databases}/update-document.md +3 -3
- package/docs/examples/databases/update.md +20 -0
- package/docs/examples/functions/create-deployment.md +3 -3
- package/docs/examples/functions/create-execution.md +3 -3
- package/docs/examples/functions/create.md +3 -3
- package/docs/examples/functions/delete-deployment.md +3 -3
- package/docs/examples/functions/delete.md +3 -3
- package/docs/examples/functions/get-deployment.md +3 -3
- package/docs/examples/functions/get-execution.md +3 -3
- package/docs/examples/functions/get.md +3 -3
- package/docs/examples/functions/list-deployments.md +3 -3
- package/docs/examples/functions/list-executions.md +3 -3
- package/docs/examples/functions/list-runtimes.md +3 -3
- package/docs/examples/functions/list.md +3 -3
- package/docs/examples/functions/retry-build.md +3 -3
- package/docs/examples/functions/update-deployment.md +3 -3
- package/docs/examples/functions/update.md +3 -3
- package/docs/examples/health/get-antivirus.md +3 -3
- package/docs/examples/health/get-cache.md +3 -3
- package/docs/examples/health/get-d-b.md +3 -3
- package/docs/examples/health/get-queue-certificates.md +3 -3
- package/docs/examples/health/get-queue-functions.md +3 -3
- package/docs/examples/health/get-queue-logs.md +3 -3
- package/docs/examples/health/get-queue-webhooks.md +3 -3
- package/docs/examples/health/get-storage-local.md +3 -3
- package/docs/examples/health/get-time.md +3 -3
- package/docs/examples/health/get.md +3 -3
- package/docs/examples/locale/get-continents.md +3 -3
- package/docs/examples/locale/get-countries-e-u.md +3 -3
- package/docs/examples/locale/get-countries-phones.md +3 -3
- package/docs/examples/locale/get-countries.md +3 -3
- package/docs/examples/locale/get-currencies.md +3 -3
- package/docs/examples/locale/get-languages.md +3 -3
- package/docs/examples/locale/get.md +3 -3
- package/docs/examples/storage/create-bucket.md +3 -3
- package/docs/examples/storage/create-file.md +3 -3
- package/docs/examples/storage/delete-bucket.md +3 -3
- package/docs/examples/storage/delete-file.md +3 -3
- package/docs/examples/storage/get-bucket.md +3 -3
- package/docs/examples/storage/get-file-download.md +3 -3
- package/docs/examples/storage/get-file-preview.md +3 -3
- package/docs/examples/storage/get-file-view.md +3 -3
- package/docs/examples/storage/get-file.md +3 -3
- package/docs/examples/storage/list-buckets.md +3 -3
- package/docs/examples/storage/list-files.md +3 -3
- package/docs/examples/storage/update-bucket.md +3 -3
- package/docs/examples/storage/update-file.md +3 -3
- package/docs/examples/teams/create-membership.md +3 -3
- package/docs/examples/teams/create.md +3 -3
- package/docs/examples/teams/delete-membership.md +3 -3
- package/docs/examples/teams/delete.md +3 -3
- package/docs/examples/teams/get-membership.md +3 -3
- package/docs/examples/teams/get-memberships.md +3 -3
- package/docs/examples/teams/get.md +3 -3
- package/docs/examples/teams/list.md +3 -3
- package/docs/examples/teams/update-membership-roles.md +3 -3
- package/docs/examples/teams/update-membership-status.md +3 -3
- package/docs/examples/teams/update.md +3 -3
- package/docs/examples/users/create.md +3 -3
- package/docs/examples/users/delete-session.md +3 -3
- package/docs/examples/users/delete-sessions.md +3 -3
- package/docs/examples/users/delete.md +3 -3
- package/docs/examples/users/get-logs.md +3 -3
- package/docs/examples/{database/list-collections.md → users/get-memberships.md} +3 -3
- package/docs/examples/users/get-prefs.md +3 -3
- package/docs/examples/users/get-sessions.md +3 -3
- package/docs/examples/users/get.md +3 -3
- package/docs/examples/users/list.md +3 -3
- package/docs/examples/{database/delete-collection.md → users/update-email-verification.md} +3 -3
- package/docs/examples/users/update-email.md +3 -3
- package/docs/examples/users/update-name.md +3 -3
- package/docs/examples/users/update-password.md +3 -3
- package/docs/examples/{database/get-attribute.md → users/update-phone-verification.md} +3 -3
- package/docs/examples/{health/get-queue-usage.md → users/update-phone.md} +3 -3
- package/docs/examples/users/update-prefs.md +3 -3
- package/docs/examples/users/update-status.md +3 -3
- package/index.d.ts +375 -161
- package/index.js +4 -2
- package/lib/client.js +9 -3
- package/lib/inputFile.js +47 -0
- package/lib/services/account.js +127 -24
- package/lib/services/avatars.js +35 -3
- package/lib/services/{database.js → databases.js} +183 -89
- package/lib/services/functions.js +100 -42
- package/lib/services/health.js +2 -18
- package/lib/services/locale.js +2 -0
- package/lib/services/storage.js +108 -50
- package/lib/services/teams.js +2 -0
- package/lib/services/users.js +94 -3
- package/package.json +2 -2
- package/docs/examples/database/get-document.md +0 -20
- package/docs/examples/users/update-verification.md +0 -20
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const sdk = require('node-appwrite');
|
|
2
2
|
|
|
3
3
|
// Init SDK
|
|
4
|
-
|
|
4
|
+
const client = new sdk.Client();
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const users = new sdk.Users(client);
|
|
7
7
|
|
|
8
8
|
client
|
|
9
9
|
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const promise = users.getSessions('[USER_ID]');
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const sdk = require('node-appwrite');
|
|
2
2
|
|
|
3
3
|
// Init SDK
|
|
4
|
-
|
|
4
|
+
const client = new sdk.Client();
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const users = new sdk.Users(client);
|
|
7
7
|
|
|
8
8
|
client
|
|
9
9
|
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const promise = users.get('[USER_ID]');
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const sdk = require('node-appwrite');
|
|
2
2
|
|
|
3
3
|
// Init SDK
|
|
4
|
-
|
|
4
|
+
const client = new sdk.Client();
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const users = new sdk.Users(client);
|
|
7
7
|
|
|
8
8
|
client
|
|
9
9
|
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const promise = users.list();
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const sdk = require('node-appwrite');
|
|
2
2
|
|
|
3
3
|
// Init SDK
|
|
4
|
-
|
|
4
|
+
const client = new sdk.Client();
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const users = new sdk.Users(client);
|
|
7
7
|
|
|
8
8
|
client
|
|
9
9
|
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const promise = users.updateEmailVerification('[USER_ID]', false);
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const sdk = require('node-appwrite');
|
|
2
2
|
|
|
3
3
|
// Init SDK
|
|
4
|
-
|
|
4
|
+
const client = new sdk.Client();
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const users = new sdk.Users(client);
|
|
7
7
|
|
|
8
8
|
client
|
|
9
9
|
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const promise = users.updateEmail('[USER_ID]', 'email@example.com');
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const sdk = require('node-appwrite');
|
|
2
2
|
|
|
3
3
|
// Init SDK
|
|
4
|
-
|
|
4
|
+
const client = new sdk.Client();
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const users = new sdk.Users(client);
|
|
7
7
|
|
|
8
8
|
client
|
|
9
9
|
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const promise = users.updateName('[USER_ID]', '[NAME]');
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const sdk = require('node-appwrite');
|
|
2
2
|
|
|
3
3
|
// Init SDK
|
|
4
|
-
|
|
4
|
+
const client = new sdk.Client();
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const users = new sdk.Users(client);
|
|
7
7
|
|
|
8
8
|
client
|
|
9
9
|
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const promise = users.updatePassword('[USER_ID]', 'password');
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const sdk = require('node-appwrite');
|
|
2
2
|
|
|
3
3
|
// Init SDK
|
|
4
|
-
|
|
4
|
+
const client = new sdk.Client();
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const users = new sdk.Users(client);
|
|
7
7
|
|
|
8
8
|
client
|
|
9
9
|
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const promise = users.updatePhoneVerification('[USER_ID]', false);
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const sdk = require('node-appwrite');
|
|
2
2
|
|
|
3
3
|
// Init SDK
|
|
4
|
-
|
|
4
|
+
const client = new sdk.Client();
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const users = new sdk.Users(client);
|
|
7
7
|
|
|
8
8
|
client
|
|
9
9
|
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const promise = users.updatePhone('[USER_ID]', '');
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const sdk = require('node-appwrite');
|
|
2
2
|
|
|
3
3
|
// Init SDK
|
|
4
|
-
|
|
4
|
+
const client = new sdk.Client();
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const users = new sdk.Users(client);
|
|
7
7
|
|
|
8
8
|
client
|
|
9
9
|
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const promise = users.updatePrefs('[USER_ID]', {});
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const sdk = require('node-appwrite');
|
|
2
2
|
|
|
3
3
|
// Init SDK
|
|
4
|
-
|
|
4
|
+
const client = new sdk.Client();
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const users = new sdk.Users(client);
|
|
7
7
|
|
|
8
8
|
client
|
|
9
9
|
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const promise = users.updateStatus('[USER_ID]', false);
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|