node-appwrite 11.0.0 → 11.1.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/README.md +1 -1
- package/docs/examples/health/get-queue-builds.md +20 -0
- package/docs/examples/health/get-queue-databases.md +20 -0
- package/docs/examples/health/get-queue-deletes.md +20 -0
- package/docs/examples/health/get-queue-mails.md +20 -0
- package/docs/examples/health/get-queue-messaging.md +20 -0
- package/docs/examples/health/get-queue-migrations.md +20 -0
- package/index.d.ts +294 -211
- package/lib/client.js +7 -7
- package/lib/query.js +1 -1
- package/lib/services/account.js +35 -31
- package/lib/services/avatars.js +11 -10
- package/lib/services/databases.js +48 -48
- package/lib/services/functions.js +26 -22
- package/lib/services/graphql.js +2 -2
- package/lib/services/health.js +177 -14
- package/lib/services/locale.js +7 -7
- package/lib/services/storage.js +12 -12
- package/lib/services/teams.js +17 -17
- package/lib/services/users.js +44 -42
- package/package.json +1 -1
package/lib/services/users.js
CHANGED
|
@@ -15,7 +15,7 @@ class Users extends Service {
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* List
|
|
18
|
+
* List users
|
|
19
19
|
*
|
|
20
20
|
* Get a list of all the project's users. You can use the query params to
|
|
21
21
|
* filter your results.
|
|
@@ -43,7 +43,7 @@ class Users extends Service {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
* Create
|
|
46
|
+
* Create user
|
|
47
47
|
*
|
|
48
48
|
* Create a new user.
|
|
49
49
|
*
|
|
@@ -89,12 +89,12 @@ class Users extends Service {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
|
-
* Create
|
|
92
|
+
* Create user with Argon2 password
|
|
93
93
|
*
|
|
94
94
|
* Create a new user. Password provided must be hashed with the
|
|
95
95
|
* [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST
|
|
96
|
-
* /users](/docs/server/users#usersCreate) endpoint to
|
|
97
|
-
* plain text password.
|
|
96
|
+
* /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to
|
|
97
|
+
* create users with a plain text password.
|
|
98
98
|
*
|
|
99
99
|
* @param {string} userId
|
|
100
100
|
* @param {string} email
|
|
@@ -141,12 +141,12 @@ class Users extends Service {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
|
-
* Create
|
|
144
|
+
* Create user with bcrypt password
|
|
145
145
|
*
|
|
146
146
|
* Create a new user. Password provided must be hashed with the
|
|
147
147
|
* [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST
|
|
148
|
-
* /users](/docs/server/users#usersCreate) endpoint to
|
|
149
|
-
* plain text password.
|
|
148
|
+
* /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to
|
|
149
|
+
* create users with a plain text password.
|
|
150
150
|
*
|
|
151
151
|
* @param {string} userId
|
|
152
152
|
* @param {string} email
|
|
@@ -242,12 +242,12 @@ class Users extends Service {
|
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
/**
|
|
245
|
-
* Create
|
|
245
|
+
* Create user with MD5 password
|
|
246
246
|
*
|
|
247
247
|
* Create a new user. Password provided must be hashed with the
|
|
248
248
|
* [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST
|
|
249
|
-
* /users](/docs/server/users#usersCreate) endpoint to
|
|
250
|
-
* plain text password.
|
|
249
|
+
* /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to
|
|
250
|
+
* create users with a plain text password.
|
|
251
251
|
*
|
|
252
252
|
* @param {string} userId
|
|
253
253
|
* @param {string} email
|
|
@@ -294,12 +294,12 @@ class Users extends Service {
|
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
/**
|
|
297
|
-
* Create
|
|
297
|
+
* Create user with PHPass password
|
|
298
298
|
*
|
|
299
299
|
* Create a new user. Password provided must be hashed with the
|
|
300
300
|
* [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST
|
|
301
|
-
* /users](/docs/server/users#usersCreate) endpoint to
|
|
302
|
-
* plain text password.
|
|
301
|
+
* /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to
|
|
302
|
+
* create users with a plain text password.
|
|
303
303
|
*
|
|
304
304
|
* @param {string} userId
|
|
305
305
|
* @param {string} email
|
|
@@ -346,12 +346,12 @@ class Users extends Service {
|
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
/**
|
|
349
|
-
* Create
|
|
349
|
+
* Create user with Scrypt password
|
|
350
350
|
*
|
|
351
351
|
* Create a new user. Password provided must be hashed with the
|
|
352
352
|
* [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST
|
|
353
|
-
* /users](/docs/server/users#usersCreate) endpoint to
|
|
354
|
-
* plain text password.
|
|
353
|
+
* /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to
|
|
354
|
+
* create users with a plain text password.
|
|
355
355
|
*
|
|
356
356
|
* @param {string} userId
|
|
357
357
|
* @param {string} email
|
|
@@ -443,12 +443,13 @@ class Users extends Service {
|
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
/**
|
|
446
|
-
* Create
|
|
446
|
+
* Create user with Scrypt modified password
|
|
447
447
|
*
|
|
448
448
|
* Create a new user. Password provided must be hashed with the [Scrypt
|
|
449
449
|
* Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc)
|
|
450
|
-
* algorithm. Use the [POST
|
|
451
|
-
*
|
|
450
|
+
* algorithm. Use the [POST
|
|
451
|
+
* /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to
|
|
452
|
+
* create users with a plain text password.
|
|
452
453
|
*
|
|
453
454
|
* @param {string} userId
|
|
454
455
|
* @param {string} email
|
|
@@ -522,12 +523,12 @@ class Users extends Service {
|
|
|
522
523
|
}
|
|
523
524
|
|
|
524
525
|
/**
|
|
525
|
-
* Create
|
|
526
|
+
* Create user with SHA password
|
|
526
527
|
*
|
|
527
528
|
* Create a new user. Password provided must be hashed with the
|
|
528
529
|
* [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use
|
|
529
|
-
* the [POST /users](/docs/server/users#usersCreate)
|
|
530
|
-
* with a plain text password.
|
|
530
|
+
* the [POST /users](https://appwrite.io/docs/server/users#usersCreate)
|
|
531
|
+
* endpoint to create users with a plain text password.
|
|
531
532
|
*
|
|
532
533
|
* @param {string} userId
|
|
533
534
|
* @param {string} email
|
|
@@ -579,7 +580,7 @@ class Users extends Service {
|
|
|
579
580
|
}
|
|
580
581
|
|
|
581
582
|
/**
|
|
582
|
-
* Get
|
|
583
|
+
* Get user
|
|
583
584
|
*
|
|
584
585
|
* Get a user by its unique ID.
|
|
585
586
|
*
|
|
@@ -601,12 +602,13 @@ class Users extends Service {
|
|
|
601
602
|
}
|
|
602
603
|
|
|
603
604
|
/**
|
|
604
|
-
* Delete
|
|
605
|
+
* Delete user
|
|
605
606
|
*
|
|
606
607
|
* Delete a user by its unique ID, thereby releasing it's ID. Since ID is
|
|
607
608
|
* released and can be reused, all user-related resources like documents or
|
|
608
609
|
* storage files should be deleted before user deletion. If you want to keep
|
|
609
|
-
* ID reserved, use the
|
|
610
|
+
* ID reserved, use the
|
|
611
|
+
* [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus)
|
|
610
612
|
* endpoint instead.
|
|
611
613
|
*
|
|
612
614
|
* @param {string} userId
|
|
@@ -627,7 +629,7 @@ class Users extends Service {
|
|
|
627
629
|
}
|
|
628
630
|
|
|
629
631
|
/**
|
|
630
|
-
* Update
|
|
632
|
+
* Update email
|
|
631
633
|
*
|
|
632
634
|
* Update the user email by its unique ID.
|
|
633
635
|
*
|
|
@@ -658,14 +660,14 @@ class Users extends Service {
|
|
|
658
660
|
}
|
|
659
661
|
|
|
660
662
|
/**
|
|
661
|
-
* Update
|
|
663
|
+
* Update user labels
|
|
662
664
|
*
|
|
663
665
|
* Update the user labels by its unique ID.
|
|
664
666
|
*
|
|
665
667
|
* Labels can be used to grant access to resources. While teams are a way for
|
|
666
668
|
* user's to share access to a resource, labels can be defined by the
|
|
667
669
|
* developer to grant access without an invitation. See the [Permissions
|
|
668
|
-
* docs](/docs/permissions) for more info.
|
|
670
|
+
* docs](https://appwrite.io/docs/permissions) for more info.
|
|
669
671
|
*
|
|
670
672
|
* @param {string} userId
|
|
671
673
|
* @param {string[]} labels
|
|
@@ -694,7 +696,7 @@ class Users extends Service {
|
|
|
694
696
|
}
|
|
695
697
|
|
|
696
698
|
/**
|
|
697
|
-
* List
|
|
699
|
+
* List user logs
|
|
698
700
|
*
|
|
699
701
|
* Get the user activity logs list by its unique ID.
|
|
700
702
|
*
|
|
@@ -721,7 +723,7 @@ class Users extends Service {
|
|
|
721
723
|
}
|
|
722
724
|
|
|
723
725
|
/**
|
|
724
|
-
* List
|
|
726
|
+
* List user memberships
|
|
725
727
|
*
|
|
726
728
|
* Get the user membership list by its unique ID.
|
|
727
729
|
*
|
|
@@ -743,7 +745,7 @@ class Users extends Service {
|
|
|
743
745
|
}
|
|
744
746
|
|
|
745
747
|
/**
|
|
746
|
-
* Update
|
|
748
|
+
* Update name
|
|
747
749
|
*
|
|
748
750
|
* Update the user name by its unique ID.
|
|
749
751
|
*
|
|
@@ -774,7 +776,7 @@ class Users extends Service {
|
|
|
774
776
|
}
|
|
775
777
|
|
|
776
778
|
/**
|
|
777
|
-
* Update
|
|
779
|
+
* Update password
|
|
778
780
|
*
|
|
779
781
|
* Update the user password by its unique ID.
|
|
780
782
|
*
|
|
@@ -805,7 +807,7 @@ class Users extends Service {
|
|
|
805
807
|
}
|
|
806
808
|
|
|
807
809
|
/**
|
|
808
|
-
* Update
|
|
810
|
+
* Update phone
|
|
809
811
|
*
|
|
810
812
|
* Update the user phone by its unique ID.
|
|
811
813
|
*
|
|
@@ -836,7 +838,7 @@ class Users extends Service {
|
|
|
836
838
|
}
|
|
837
839
|
|
|
838
840
|
/**
|
|
839
|
-
* Get
|
|
841
|
+
* Get user preferences
|
|
840
842
|
*
|
|
841
843
|
* Get the user preferences by its unique ID.
|
|
842
844
|
*
|
|
@@ -858,7 +860,7 @@ class Users extends Service {
|
|
|
858
860
|
}
|
|
859
861
|
|
|
860
862
|
/**
|
|
861
|
-
* Update
|
|
863
|
+
* Update user preferences
|
|
862
864
|
*
|
|
863
865
|
* Update the user preferences by its unique ID. The object you pass is stored
|
|
864
866
|
* as is, and replaces any previous value. The maximum allowed prefs size is
|
|
@@ -891,7 +893,7 @@ class Users extends Service {
|
|
|
891
893
|
}
|
|
892
894
|
|
|
893
895
|
/**
|
|
894
|
-
* List
|
|
896
|
+
* List user sessions
|
|
895
897
|
*
|
|
896
898
|
* Get the user sessions list by its unique ID.
|
|
897
899
|
*
|
|
@@ -913,7 +915,7 @@ class Users extends Service {
|
|
|
913
915
|
}
|
|
914
916
|
|
|
915
917
|
/**
|
|
916
|
-
* Delete
|
|
918
|
+
* Delete user sessions
|
|
917
919
|
*
|
|
918
920
|
* Delete all user's sessions by using the user's unique ID.
|
|
919
921
|
*
|
|
@@ -935,7 +937,7 @@ class Users extends Service {
|
|
|
935
937
|
}
|
|
936
938
|
|
|
937
939
|
/**
|
|
938
|
-
* Delete
|
|
940
|
+
* Delete user session
|
|
939
941
|
*
|
|
940
942
|
* Delete a user sessions by its unique ID.
|
|
941
943
|
*
|
|
@@ -962,7 +964,7 @@ class Users extends Service {
|
|
|
962
964
|
}
|
|
963
965
|
|
|
964
966
|
/**
|
|
965
|
-
* Update
|
|
967
|
+
* Update user status
|
|
966
968
|
*
|
|
967
969
|
* Update the user status by its unique ID. Use this endpoint as an
|
|
968
970
|
* alternative to deleting a user if you want to keep user's ID reserved.
|
|
@@ -994,7 +996,7 @@ class Users extends Service {
|
|
|
994
996
|
}
|
|
995
997
|
|
|
996
998
|
/**
|
|
997
|
-
* Update
|
|
999
|
+
* Update email verification
|
|
998
1000
|
*
|
|
999
1001
|
* Update the user email verification status by its unique ID.
|
|
1000
1002
|
*
|
|
@@ -1025,7 +1027,7 @@ class Users extends Service {
|
|
|
1025
1027
|
}
|
|
1026
1028
|
|
|
1027
1029
|
/**
|
|
1028
|
-
* Update
|
|
1030
|
+
* Update phone verification
|
|
1029
1031
|
*
|
|
1030
1032
|
* Update the user phone verification status by its unique ID.
|
|
1031
1033
|
*
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "node-appwrite",
|
|
3
3
|
"homepage": "https://appwrite.io/support",
|
|
4
4
|
"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",
|
|
5
|
-
"version": "11.
|
|
5
|
+
"version": "11.1.0",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"types": "./index.d.ts",
|