node-appwrite 2.4.0 → 4.0.0
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/.github/ISSUE_TEMPLATE/bug.yaml +82 -0
- package/.github/ISSUE_TEMPLATE/documentation.yaml +32 -0
- package/.github/ISSUE_TEMPLATE/feature.yaml +40 -0
- package/LICENSE +1 -1
- package/README.md +7 -7
- package/docs/examples/database/create-boolean-attribute.md +20 -0
- package/docs/examples/database/create-collection.md +1 -1
- package/docs/examples/database/create-document.md +1 -1
- package/docs/examples/database/create-email-attribute.md +20 -0
- package/docs/examples/database/create-enum-attribute.md +20 -0
- package/docs/examples/database/create-float-attribute.md +20 -0
- package/docs/examples/database/create-index.md +20 -0
- package/docs/examples/database/create-integer-attribute.md +20 -0
- package/docs/examples/database/create-ip-attribute.md +20 -0
- package/docs/examples/database/create-string-attribute.md +20 -0
- package/docs/examples/database/create-url-attribute.md +20 -0
- package/docs/examples/database/delete-attribute.md +20 -0
- package/docs/examples/database/delete-index.md +20 -0
- package/docs/examples/database/get-attribute.md +20 -0
- package/docs/examples/database/get-index.md +20 -0
- package/docs/examples/database/list-attributes.md +20 -0
- package/docs/examples/database/list-indexes.md +20 -0
- package/docs/examples/database/update-collection.md +1 -1
- package/docs/examples/functions/create-tag.md +1 -1
- package/docs/examples/functions/create.md +1 -1
- package/docs/examples/{health/get-queue-tasks.md → functions/list-runtimes.md} +2 -2
- package/docs/examples/health/{get-anti-virus.md → get-antivirus.md} +1 -1
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/teams/create.md +1 -1
- package/docs/examples/teams/get-membership.md +20 -0
- package/docs/examples/users/create.md +1 -1
- package/docs/examples/users/update-email.md +20 -0
- package/docs/examples/users/update-name.md +20 -0
- package/docs/examples/users/update-password.md +20 -0
- package/docs/examples/users/update-status.md +1 -1
- package/index.d.ts +1693 -235
- package/lib/client.js +5 -5
- package/lib/query.js +34 -0
- package/lib/services/account.js +18 -6
- package/lib/services/database.js +706 -47
- package/lib/services/functions.js +63 -12
- package/lib/services/health.js +4 -22
- package/lib/services/storage.js +21 -2
- package/lib/services/teams.js +93 -31
- package/lib/services/users.js +127 -5
- package/package.json +2 -2
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
let promise = users.create('email@example.com', 'password');
|
|
14
|
+
let promise = users.create('[USER_ID]', 'email@example.com', 'password');
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const sdk = require('node-appwrite');
|
|
2
|
+
|
|
3
|
+
// Init SDK
|
|
4
|
+
let client = new sdk.Client();
|
|
5
|
+
|
|
6
|
+
let users = new sdk.Users(client);
|
|
7
|
+
|
|
8
|
+
client
|
|
9
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
10
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
11
|
+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
|
+
;
|
|
13
|
+
|
|
14
|
+
let promise = users.updateEmail('[USER_ID]', 'email@example.com');
|
|
15
|
+
|
|
16
|
+
promise.then(function (response) {
|
|
17
|
+
console.log(response);
|
|
18
|
+
}, function (error) {
|
|
19
|
+
console.log(error);
|
|
20
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const sdk = require('node-appwrite');
|
|
2
|
+
|
|
3
|
+
// Init SDK
|
|
4
|
+
let client = new sdk.Client();
|
|
5
|
+
|
|
6
|
+
let users = new sdk.Users(client);
|
|
7
|
+
|
|
8
|
+
client
|
|
9
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
10
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
11
|
+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
|
+
;
|
|
13
|
+
|
|
14
|
+
let promise = users.updateName('[USER_ID]', '[NAME]');
|
|
15
|
+
|
|
16
|
+
promise.then(function (response) {
|
|
17
|
+
console.log(response);
|
|
18
|
+
}, function (error) {
|
|
19
|
+
console.log(error);
|
|
20
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const sdk = require('node-appwrite');
|
|
2
|
+
|
|
3
|
+
// Init SDK
|
|
4
|
+
let client = new sdk.Client();
|
|
5
|
+
|
|
6
|
+
let users = new sdk.Users(client);
|
|
7
|
+
|
|
8
|
+
client
|
|
9
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
10
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
11
|
+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
|
+
;
|
|
13
|
+
|
|
14
|
+
let promise = users.updatePassword('[USER_ID]', 'password');
|
|
15
|
+
|
|
16
|
+
promise.then(function (response) {
|
|
17
|
+
console.log(response);
|
|
18
|
+
}, function (error) {
|
|
19
|
+
console.log(error);
|
|
20
|
+
});
|
|
@@ -11,7 +11,7 @@ client
|
|
|
11
11
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
|
12
12
|
;
|
|
13
13
|
|
|
14
|
-
let promise = users.updateStatus('[USER_ID]',
|
|
14
|
+
let promise = users.updateStatus('[USER_ID]', false);
|
|
15
15
|
|
|
16
16
|
promise.then(function (response) {
|
|
17
17
|
console.log(response);
|