node-appwrite 7.0.2 → 8.0.0-RC1

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.
Files changed (69) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -2
  3. package/docs/examples/databases/create-boolean-attribute.md +2 -2
  4. package/docs/examples/databases/create-collection.md +2 -2
  5. package/docs/examples/databases/create-datetime-attribute.md +20 -0
  6. package/docs/examples/databases/create-document.md +2 -2
  7. package/docs/examples/databases/create-email-attribute.md +2 -2
  8. package/docs/examples/databases/create-enum-attribute.md +2 -2
  9. package/docs/examples/databases/create-float-attribute.md +2 -2
  10. package/docs/examples/databases/create-index.md +2 -2
  11. package/docs/examples/databases/create-integer-attribute.md +2 -2
  12. package/docs/examples/databases/create-ip-attribute.md +2 -2
  13. package/docs/examples/databases/create-string-attribute.md +2 -2
  14. package/docs/examples/databases/create-url-attribute.md +2 -2
  15. package/docs/examples/databases/create.md +2 -2
  16. package/docs/examples/databases/delete-attribute.md +2 -2
  17. package/docs/examples/databases/delete-collection.md +2 -2
  18. package/docs/examples/databases/delete-document.md +2 -2
  19. package/docs/examples/databases/delete-index.md +2 -2
  20. package/docs/examples/databases/delete.md +2 -2
  21. package/docs/examples/databases/get-attribute.md +2 -2
  22. package/docs/examples/databases/get-collection.md +2 -2
  23. package/docs/examples/databases/get-document.md +2 -2
  24. package/docs/examples/databases/get-index.md +2 -2
  25. package/docs/examples/databases/get.md +2 -2
  26. package/docs/examples/databases/list-attributes.md +2 -2
  27. package/docs/examples/databases/list-collections.md +2 -2
  28. package/docs/examples/databases/list-documents.md +2 -2
  29. package/docs/examples/databases/list-indexes.md +2 -2
  30. package/docs/examples/databases/list.md +1 -1
  31. package/docs/examples/databases/update-collection.md +2 -2
  32. package/docs/examples/databases/update-document.md +2 -2
  33. package/docs/examples/databases/update.md +2 -2
  34. package/docs/examples/functions/create-deployment.md +1 -1
  35. package/docs/examples/functions/create-variable.md +20 -0
  36. package/docs/examples/functions/create.md +1 -1
  37. package/docs/examples/functions/delete-variable.md +20 -0
  38. package/docs/examples/functions/get-variable.md +20 -0
  39. package/docs/examples/functions/list-variables.md +20 -0
  40. package/docs/examples/functions/update-variable.md +20 -0
  41. package/docs/examples/functions/update.md +1 -1
  42. package/docs/examples/storage/create-bucket.md +1 -1
  43. package/docs/examples/storage/create-file.md +1 -1
  44. package/docs/examples/storage/update-bucket.md +1 -1
  45. package/docs/examples/users/create-argon2user.md +20 -0
  46. package/docs/examples/users/create-bcrypt-user.md +20 -0
  47. package/docs/examples/users/create-m-d5user.md +20 -0
  48. package/docs/examples/users/create-p-h-pass-user.md +20 -0
  49. package/docs/examples/users/create-s-h-a-user.md +20 -0
  50. package/docs/examples/users/create-scrypt-modified-user.md +20 -0
  51. package/docs/examples/users/create-scrypt-user.md +20 -0
  52. package/docs/examples/users/create.md +1 -1
  53. package/index.d.ts +714 -262
  54. package/index.js +6 -0
  55. package/lib/client.js +5 -2
  56. package/lib/id.js +12 -0
  57. package/lib/permission.js +24 -0
  58. package/lib/query.js +30 -12
  59. package/lib/role.js +25 -0
  60. package/lib/services/account.js +43 -42
  61. package/lib/services/avatars.js +22 -20
  62. package/lib/services/databases.js +385 -243
  63. package/lib/services/functions.js +219 -109
  64. package/lib/services/health.js +7 -1
  65. package/lib/services/locale.js +7 -1
  66. package/lib/services/storage.js +78 -129
  67. package/lib/services/teams.js +39 -73
  68. package/lib/services/users.js +482 -63
  69. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -261,6 +261,19 @@ declare module "node-appwrite" {
261
261
  phones: Phone[];
262
262
  }
263
263
  /**
264
+ * Variables List
265
+ */
266
+ export type VariableList = {
267
+ /**
268
+ * Total number of variables documents that matched your query.
269
+ */
270
+ total: number;
271
+ /**
272
+ * List of variables.
273
+ */
274
+ variables: Variable[];
275
+ }
276
+ /**
264
277
  * Database
265
278
  */
266
279
  export type Database = {
@@ -272,6 +285,14 @@ declare module "node-appwrite" {
272
285
  * Database name.
273
286
  */
274
287
  name: string;
288
+ /**
289
+ * Database creation date in ISO 8601 format.
290
+ */
291
+ $createdAt: string;
292
+ /**
293
+ * Database update date in ISO 8601 format.
294
+ */
295
+ $updatedAt: string;
275
296
  }
276
297
  /**
277
298
  * Collection
@@ -282,21 +303,17 @@ declare module "node-appwrite" {
282
303
  */
283
304
  $id: string;
284
305
  /**
285
- * Collection creation date in Unix timestamp.
306
+ * Collection creation date in ISO 8601 format.
286
307
  */
287
- $createdAt: number;
308
+ $createdAt: string;
288
309
  /**
289
- * Collection update date in Unix timestamp.
310
+ * Collection update date in ISO 8601 format.
290
311
  */
291
- $updatedAt: number;
312
+ $updatedAt: string;
292
313
  /**
293
- * Collection read permissions.
314
+ * Collection permissions. [Learn more about permissions](/docs/permissions).
294
315
  */
295
- $read: string[];
296
- /**
297
- * Collection write permissions.
298
- */
299
- $write: string[];
316
+ $permissions: string[];
300
317
  /**
301
318
  * Database ID.
302
319
  */
@@ -310,9 +327,9 @@ declare module "node-appwrite" {
310
327
  */
311
328
  enabled: boolean;
312
329
  /**
313
- * Collection permission model. Possible values: `document` or `collection`
330
+ * Whether document-level permissions are enabled. [Learn more about permissions](/docs/permissions).
314
331
  */
315
- permission: string;
332
+ documentSecurity: boolean;
316
333
  /**
317
334
  * Collection attributes.
318
335
  */
@@ -608,6 +625,39 @@ declare module "node-appwrite" {
608
625
  xdefault?: string;
609
626
  }
610
627
  /**
628
+ * AttributeDatetime
629
+ */
630
+ export type AttributeDatetime = {
631
+ /**
632
+ * Attribute Key.
633
+ */
634
+ key: string;
635
+ /**
636
+ * Attribute type.
637
+ */
638
+ type: string;
639
+ /**
640
+ * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
641
+ */
642
+ status: string;
643
+ /**
644
+ * Is attribute required?
645
+ */
646
+ required: boolean;
647
+ /**
648
+ * Is attribute an array?
649
+ */
650
+ array?: boolean;
651
+ /**
652
+ * ISO 8601 format.
653
+ */
654
+ format: string;
655
+ /**
656
+ * Default value for attribute when not provided. Only null is optional
657
+ */
658
+ xdefault?: string;
659
+ }
660
+ /**
611
661
  * Index
612
662
  */
613
663
  export type Index = {
@@ -630,7 +680,7 @@ declare module "node-appwrite" {
630
680
  /**
631
681
  * Index orders.
632
682
  */
633
- orders: string[];
683
+ orders?: string[];
634
684
  }
635
685
  /**
636
686
  * Document
@@ -645,21 +695,17 @@ declare module "node-appwrite" {
645
695
  */
646
696
  $collection: string;
647
697
  /**
648
- * Document creation date in Unix timestamp.
649
- */
650
- $createdAt: number;
651
- /**
652
- * Document update date in Unix timestamp.
698
+ * Document creation date in ISO 8601 format.
653
699
  */
654
- $updatedAt: number;
700
+ $createdAt: string;
655
701
  /**
656
- * Document read permissions.
702
+ * Document update date in ISO 8601 format.
657
703
  */
658
- $read: string[];
704
+ $updatedAt: string;
659
705
  /**
660
- * Document write permissions.
706
+ * Document permissions. [Learn more about permissions](/docs/permissions).
661
707
  */
662
- $write: string[];
708
+ $permissions: string[];
663
709
  }
664
710
  /**
665
711
  * Log
@@ -690,9 +736,9 @@ declare module "node-appwrite" {
690
736
  */
691
737
  ip: string;
692
738
  /**
693
- * Log creation time in Unix timestamp.
739
+ * Log creation date in ISO 8601 format.
694
740
  */
695
- time: number;
741
+ time: string;
696
742
  /**
697
743
  * Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).
698
744
  */
@@ -759,29 +805,169 @@ declare module "node-appwrite" {
759
805
  */
760
806
  $id: string;
761
807
  /**
762
- * User creation date in Unix timestamp.
808
+ * User creation date in ISO 8601 format.
763
809
  */
764
- $createdAt: number;
810
+ $createdAt: string;
765
811
  /**
766
- * User update date in Unix timestamp.
812
+ * User update date in ISO 8601 format.
767
813
  */
768
- $updatedAt: number;
814
+ $updatedAt: string;
769
815
  /**
770
816
  * User name.
771
817
  */
772
818
  name: string;
773
819
  /**
774
- * User registration date in Unix timestamp.
820
+ * Hashed user password.
821
+ */
822
+ password: string;
823
+ /**
824
+ * Password hashing algorithm.
825
+ */
826
+ hash: string;
827
+ /**
828
+ * Password hashing algorithm configuration.
775
829
  */
776
- registration: number;
830
+ hashOptions: object;
831
+ /**
832
+ * User registration date in ISO 8601 format.
833
+ */
834
+ registration: string;
777
835
  /**
778
836
  * User status. Pass `true` for enabled and `false` for disabled.
779
837
  */
780
838
  status: boolean;
781
839
  /**
782
- * Unix timestamp of the most recent password update
840
+ * Password update time in ISO 8601 format.
783
841
  */
784
- passwordUpdate: number;
842
+ passwordUpdate: string;
843
+ /**
844
+ * User email address.
845
+ */
846
+ email: string;
847
+ /**
848
+ * User phone number in E.164 format.
849
+ */
850
+ phone: string;
851
+ /**
852
+ * Email verification status.
853
+ */
854
+ emailVerification: boolean;
855
+ /**
856
+ * Phone verification status.
857
+ */
858
+ phoneVerification: boolean;
859
+ /**
860
+ * User preferences as a key-value object
861
+ */
862
+ prefs: Preferences;
863
+ }
864
+ /**
865
+ * AlgoMD5
866
+ */
867
+ export type AlgoMd5 = {
868
+ }
869
+ /**
870
+ * AlgoSHA
871
+ */
872
+ export type AlgoSha = {
873
+ }
874
+ /**
875
+ * AlgoPHPass
876
+ */
877
+ export type AlgoPhpass = {
878
+ }
879
+ /**
880
+ * AlgoBcrypt
881
+ */
882
+ export type AlgoBcrypt = {
883
+ }
884
+ /**
885
+ * AlgoScrypt
886
+ */
887
+ export type AlgoScrypt = {
888
+ /**
889
+ * CPU complexity of computed hash.
890
+ */
891
+ costCpu: number;
892
+ /**
893
+ * Memory complexity of computed hash.
894
+ */
895
+ costMemory: number;
896
+ /**
897
+ * Parallelization of computed hash.
898
+ */
899
+ costParallel: number;
900
+ /**
901
+ * Length used to compute hash.
902
+ */
903
+ length: number;
904
+ }
905
+ /**
906
+ * AlgoScryptModified
907
+ */
908
+ export type AlgoScryptModified = {
909
+ /**
910
+ * Salt used to compute hash.
911
+ */
912
+ salt: string;
913
+ /**
914
+ * Separator used to compute hash.
915
+ */
916
+ saltSeparator: string;
917
+ /**
918
+ * Key used to compute hash.
919
+ */
920
+ signerKey: string;
921
+ }
922
+ /**
923
+ * AlgoArgon2
924
+ */
925
+ export type AlgoArgon2 = {
926
+ /**
927
+ * Memory used to compute hash.
928
+ */
929
+ memoryCost: number;
930
+ /**
931
+ * Amount of time consumed to compute hash
932
+ */
933
+ timeCost: number;
934
+ /**
935
+ * Number of threads used to compute hash.
936
+ */
937
+ threads: number;
938
+ }
939
+ /**
940
+ * Account
941
+ */
942
+ export type Account<Preferences extends Models.Preferences> = {
943
+ /**
944
+ * User ID.
945
+ */
946
+ $id: string;
947
+ /**
948
+ * User creation date in ISO 8601 format.
949
+ */
950
+ $createdAt: string;
951
+ /**
952
+ * User update date in ISO 8601 format.
953
+ */
954
+ $updatedAt: string;
955
+ /**
956
+ * User name.
957
+ */
958
+ name: string;
959
+ /**
960
+ * User registration date in ISO 8601 format.
961
+ */
962
+ registration: string;
963
+ /**
964
+ * User status. Pass `true` for enabled and `false` for disabled.
965
+ */
966
+ status: boolean;
967
+ /**
968
+ * Password update time in ISO 8601 format.
969
+ */
970
+ passwordUpdate: string;
785
971
  /**
786
972
  * User email address.
787
973
  */
@@ -817,17 +1003,17 @@ declare module "node-appwrite" {
817
1003
  */
818
1004
  $id: string;
819
1005
  /**
820
- * Session creation date in Unix timestamp.
1006
+ * Session creation date in ISO 8601 format.
821
1007
  */
822
- $createdAt: number;
1008
+ $createdAt: string;
823
1009
  /**
824
1010
  * User ID.
825
1011
  */
826
1012
  userId: string;
827
1013
  /**
828
- * Session expiration date in Unix timestamp.
1014
+ * Session expiration date in ISO 8601 format.
829
1015
  */
830
- expire: number;
1016
+ expire: string;
831
1017
  /**
832
1018
  * Session Provider.
833
1019
  */
@@ -841,9 +1027,9 @@ declare module "node-appwrite" {
841
1027
  */
842
1028
  providerAccessToken: string;
843
1029
  /**
844
- * Date, the Unix timestamp of when the access token expires.
1030
+ * The date of when the access token expires in ISO 8601 format.
845
1031
  */
846
- providerAccessTokenExpiry: number;
1032
+ providerAccessTokenExpiry: string;
847
1033
  /**
848
1034
  * Session Provider Refresh Token.
849
1035
  */
@@ -922,9 +1108,9 @@ declare module "node-appwrite" {
922
1108
  */
923
1109
  $id: string;
924
1110
  /**
925
- * Token creation date in Unix timestamp.
1111
+ * Token creation date in ISO 8601 format.
926
1112
  */
927
- $createdAt: number;
1113
+ $createdAt: string;
928
1114
  /**
929
1115
  * User ID.
930
1116
  */
@@ -934,9 +1120,9 @@ declare module "node-appwrite" {
934
1120
  */
935
1121
  secret: string;
936
1122
  /**
937
- * Token expiration date in Unix timestamp.
1123
+ * Token expiration date in ISO 8601 format.
938
1124
  */
939
- expire: number;
1125
+ expire: string;
940
1126
  }
941
1127
  /**
942
1128
  * Locale
@@ -984,21 +1170,17 @@ declare module "node-appwrite" {
984
1170
  */
985
1171
  bucketId: string;
986
1172
  /**
987
- * File creation date in Unix timestamp.
1173
+ * File creation date in ISO 8601 format.
988
1174
  */
989
- $createdAt: number;
1175
+ $createdAt: string;
990
1176
  /**
991
- * File update date in Unix timestamp.
1177
+ * File update date in ISO 8601 format.
992
1178
  */
993
- $updatedAt: number;
1179
+ $updatedAt: string;
994
1180
  /**
995
- * File read permissions.
1181
+ * File permissions. [Learn more about permissions](/docs/permissions).
996
1182
  */
997
- $read: string[];
998
- /**
999
- * File write permissions.
1000
- */
1001
- $write: string[];
1183
+ $permissions: string[];
1002
1184
  /**
1003
1185
  * File name.
1004
1186
  */
@@ -1033,25 +1215,21 @@ declare module "node-appwrite" {
1033
1215
  */
1034
1216
  $id: string;
1035
1217
  /**
1036
- * Bucket creation date in Unix timestamp.
1218
+ * Bucket creation time in ISO 8601 format.
1037
1219
  */
1038
- $createdAt: number;
1220
+ $createdAt: string;
1039
1221
  /**
1040
- * Bucket update date in Unix timestamp.
1222
+ * Bucket update date in ISO 8601 format.
1041
1223
  */
1042
- $updatedAt: number;
1224
+ $updatedAt: string;
1043
1225
  /**
1044
- * File read permissions.
1226
+ * Bucket permissions. [Learn more about permissions](/docs/permissions).
1045
1227
  */
1046
- $read: string[];
1228
+ $permissions: string[];
1047
1229
  /**
1048
- * File write permissions.
1230
+ * Whether file-level security is enabled. [Learn more about permissions](/docs/permissions).
1049
1231
  */
1050
- $write: string[];
1051
- /**
1052
- * Bucket permission model. Possible values: `bucket` or `file`
1053
- */
1054
- permission: string;
1232
+ fileSecurity: string;
1055
1233
  /**
1056
1234
  * Bucket name.
1057
1235
  */
@@ -1069,6 +1247,10 @@ declare module "node-appwrite" {
1069
1247
  */
1070
1248
  allowedFileExtensions: string[];
1071
1249
  /**
1250
+ * Compression algorithm choosen for compression. Will be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd).
1251
+ */
1252
+ compression: string;
1253
+ /**
1072
1254
  * Bucket is encrypted.
1073
1255
  */
1074
1256
  encryption: boolean;
@@ -1086,13 +1268,13 @@ declare module "node-appwrite" {
1086
1268
  */
1087
1269
  $id: string;
1088
1270
  /**
1089
- * Team creation date in Unix timestamp.
1271
+ * Team creation date in ISO 8601 format.
1090
1272
  */
1091
- $createdAt: number;
1273
+ $createdAt: string;
1092
1274
  /**
1093
- * Team update date in Unix timestamp.
1275
+ * Team update date in ISO 8601 format.
1094
1276
  */
1095
- $updatedAt: number;
1277
+ $updatedAt: string;
1096
1278
  /**
1097
1279
  * Team name.
1098
1280
  */
@@ -1111,13 +1293,13 @@ declare module "node-appwrite" {
1111
1293
  */
1112
1294
  $id: string;
1113
1295
  /**
1114
- * Membership creation date in Unix timestamp.
1296
+ * Membership creation date in ISO 8601 format.
1115
1297
  */
1116
- $createdAt: number;
1298
+ $createdAt: string;
1117
1299
  /**
1118
- * Membership update date in Unix timestamp.
1300
+ * Membership update date in ISO 8601 format.
1119
1301
  */
1120
- $updatedAt: number;
1302
+ $updatedAt: string;
1121
1303
  /**
1122
1304
  * User ID.
1123
1305
  */
@@ -1139,13 +1321,13 @@ declare module "node-appwrite" {
1139
1321
  */
1140
1322
  teamName: string;
1141
1323
  /**
1142
- * Date, the user has been invited to join the team in Unix timestamp.
1324
+ * Date, the user has been invited to join the team in ISO 8601 format.
1143
1325
  */
1144
- invited: number;
1326
+ invited: string;
1145
1327
  /**
1146
- * Date, the user has accepted the invitation to join the team in Unix timestamp.
1328
+ * Date, the user has accepted the invitation to join the team in ISO 8601 format.
1147
1329
  */
1148
- joined: number;
1330
+ joined: string;
1149
1331
  /**
1150
1332
  * User confirmation status, true if the user has joined the team or false otherwise.
1151
1333
  */
@@ -1164,13 +1346,13 @@ declare module "node-appwrite" {
1164
1346
  */
1165
1347
  $id: string;
1166
1348
  /**
1167
- * Function creation date in Unix timestamp.
1349
+ * Function creation date in ISO 8601 format.
1168
1350
  */
1169
- $createdAt: number;
1351
+ $createdAt: string;
1170
1352
  /**
1171
- * Function update date in Unix timestamp.
1353
+ * Function update date in ISO 8601 format.
1172
1354
  */
1173
- $updatedAt: number;
1355
+ $updatedAt: string;
1174
1356
  /**
1175
1357
  * Execution permissions.
1176
1358
  */
@@ -1192,9 +1374,9 @@ declare module "node-appwrite" {
1192
1374
  */
1193
1375
  deployment: string;
1194
1376
  /**
1195
- * Function environment variables.
1377
+ * Function variables.
1196
1378
  */
1197
- vars: object;
1379
+ vars: Variable[];
1198
1380
  /**
1199
1381
  * Function trigger events.
1200
1382
  */
@@ -1204,13 +1386,13 @@ declare module "node-appwrite" {
1204
1386
  */
1205
1387
  schedule: string;
1206
1388
  /**
1207
- * Function next scheduled execution date in Unix timestamp.
1389
+ * Function&#039;s next scheduled execution time in ISO 8601 format.
1208
1390
  */
1209
- scheduleNext: number;
1391
+ scheduleNext: string;
1210
1392
  /**
1211
- * Function next scheduled execution date in Unix timestamp.
1393
+ * Function&#039;s previous scheduled execution time in ISO 8601 format.
1212
1394
  */
1213
- schedulePrevious: number;
1395
+ schedulePrevious: string;
1214
1396
  /**
1215
1397
  * Function execution timeout in seconds.
1216
1398
  */
@@ -1258,13 +1440,13 @@ declare module "node-appwrite" {
1258
1440
  */
1259
1441
  $id: string;
1260
1442
  /**
1261
- * Deployment creation date in Unix timestamp.
1443
+ * Deployment creation date in ISO 8601 format.
1262
1444
  */
1263
- $createdAt: number;
1445
+ $createdAt: string;
1264
1446
  /**
1265
- * Deployment update date in Unix timestamp.
1447
+ * Deployment update date in ISO 8601 format.
1266
1448
  */
1267
- $updatedAt: number;
1449
+ $updatedAt: string;
1268
1450
  /**
1269
1451
  * Resource ID.
1270
1452
  */
@@ -1290,7 +1472,7 @@ declare module "node-appwrite" {
1290
1472
  */
1291
1473
  activate: boolean;
1292
1474
  /**
1293
- * The deployment status.
1475
+ * The deployment status. Possible values are &quot;processing&quot;, &quot;building&quot;, &quot;pending&quot;, &quot;ready&quot;, and &quot;failed&quot;.
1294
1476
  */
1295
1477
  status: string;
1296
1478
  /**
@@ -1311,17 +1493,17 @@ declare module "node-appwrite" {
1311
1493
  */
1312
1494
  $id: string;
1313
1495
  /**
1314
- * Execution creation date in Unix timestamp.
1496
+ * Execution creation date in ISO 8601 format.
1315
1497
  */
1316
- $createdAt: number;
1498
+ $createdAt: string;
1317
1499
  /**
1318
- * Execution update date in Unix timestamp.
1500
+ * Execution upate date in ISO 8601 format.
1319
1501
  */
1320
- $updatedAt: number;
1502
+ $updatedAt: string;
1321
1503
  /**
1322
- * Execution read permissions.
1504
+ * Execution roles.
1323
1505
  */
1324
- $read: string[];
1506
+ $permissions: string[];
1325
1507
  /**
1326
1508
  * Function ID.
1327
1509
  */
@@ -1343,7 +1525,11 @@ declare module "node-appwrite" {
1343
1525
  */
1344
1526
  response: string;
1345
1527
  /**
1346
- * The script stderr output string. Logs the last 4,000 characters of the execution stderr output
1528
+ * The script stdout output string. Logs the last 4,000 characters of the execution stdout output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
1529
+ */
1530
+ stdout: string;
1531
+ /**
1532
+ * The script stderr output string. Logs the last 4,000 characters of the execution stderr output. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
1347
1533
  */
1348
1534
  stderr: string;
1349
1535
  /**
@@ -1352,6 +1538,35 @@ declare module "node-appwrite" {
1352
1538
  time: number;
1353
1539
  }
1354
1540
  /**
1541
+ * Variable
1542
+ */
1543
+ export type Variable = {
1544
+ /**
1545
+ * Variable ID.
1546
+ */
1547
+ $id: string;
1548
+ /**
1549
+ * Variable creation date in ISO 8601 format.
1550
+ */
1551
+ $createdAt: string;
1552
+ /**
1553
+ * Variable creation date in ISO 8601 format.
1554
+ */
1555
+ $updatedAt: string;
1556
+ /**
1557
+ * Variable key.
1558
+ */
1559
+ key: string;
1560
+ /**
1561
+ * Variable value.
1562
+ */
1563
+ value: string;
1564
+ /**
1565
+ * Function ID.
1566
+ */
1567
+ functionId: string;
1568
+ }
1569
+ /**
1355
1570
  * Country
1356
1571
  */
1357
1572
  export type Country = {
@@ -1591,17 +1806,29 @@ declare module "node-appwrite" {
1591
1806
 
1592
1807
  static notEqual(attribute: string, value: QueryTypes): string;
1593
1808
 
1594
- static lesser(attribute: string, value: QueryTypes): string;
1809
+ static lessThan(attribute: string, value: QueryTypes): string;
1595
1810
 
1596
- static lesserEqual(attribute: string, value: QueryTypes): string;
1811
+ static lessThanEqual(attribute: string, value: QueryTypes): string;
1597
1812
 
1598
- static greater(attribute: string, value: QueryTypes): string;
1813
+ static greaterThan(attribute: string, value: QueryTypes): string;
1599
1814
 
1600
- static greaterEqual(attribute: string, value: QueryTypes): string;
1815
+ static greaterThanEqual(attribute: string, value: QueryTypes): string;
1601
1816
 
1602
1817
  static search(attribute: string, value: string): string;
1603
1818
 
1604
- private static addQuery(attribute: string, oper: string, value: QueryTypes): string;
1819
+ static orderDesc(attribute: string): string;
1820
+
1821
+ static orderAsc(attribute: string): string;
1822
+
1823
+ static cursorAfter(documentId: string): string;
1824
+
1825
+ static cursorBefore(documentId: string): string;
1826
+
1827
+ static limit(value: number): string;
1828
+
1829
+ static offset = (value: number): string;
1830
+
1831
+ private static addQuery(attribute: string, method: string, value: QueryTypes): string;
1605
1832
 
1606
1833
  private static parseValues(value: QueryTypes): string;
1607
1834
  }
@@ -1617,7 +1844,7 @@ declare module "node-appwrite" {
1617
1844
  * @throws {AppwriteException}
1618
1845
  * @returns {Promise}
1619
1846
  */
1620
- get<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
1847
+ get<Preferences extends Models.Preferences>(): Promise<Models.Account<Preferences>>;
1621
1848
  /**
1622
1849
  * Update Account Email
1623
1850
  *
@@ -1635,19 +1862,18 @@ declare module "node-appwrite" {
1635
1862
  * @throws {AppwriteException}
1636
1863
  * @returns {Promise}
1637
1864
  */
1638
- updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>>;
1865
+ updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.Account<Preferences>>;
1639
1866
  /**
1640
1867
  * Get Account Logs
1641
1868
  *
1642
1869
  * Get currently logged in user list of latest security activity logs. Each
1643
1870
  * log returns user IP address, location and date and time of log.
1644
1871
  *
1645
- * @param {number} limit
1646
- * @param {number} offset
1872
+ * @param {string[]} queries
1647
1873
  * @throws {AppwriteException}
1648
1874
  * @returns {Promise}
1649
1875
  */
1650
- getLogs(limit?: number, offset?: number): Promise<Models.LogList>;
1876
+ getLogs(queries?: string[]): Promise<Models.LogList>;
1651
1877
  /**
1652
1878
  * Update Account Name
1653
1879
  *
@@ -1657,7 +1883,7 @@ declare module "node-appwrite" {
1657
1883
  * @throws {AppwriteException}
1658
1884
  * @returns {Promise}
1659
1885
  */
1660
- updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.User<Preferences>>;
1886
+ updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.Account<Preferences>>;
1661
1887
  /**
1662
1888
  * Update Account Password
1663
1889
  *
@@ -1670,7 +1896,7 @@ declare module "node-appwrite" {
1670
1896
  * @throws {AppwriteException}
1671
1897
  * @returns {Promise}
1672
1898
  */
1673
- updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
1899
+ updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.Account<Preferences>>;
1674
1900
  /**
1675
1901
  * Update Account Phone
1676
1902
  *
@@ -1680,12 +1906,12 @@ declare module "node-appwrite" {
1680
1906
  * /account/verification/phone](/docs/client/account#accountCreatePhoneVerification)
1681
1907
  * endpoint to send a confirmation SMS.
1682
1908
  *
1683
- * @param {string} number
1909
+ * @param {string} phone
1684
1910
  * @param {string} password
1685
1911
  * @throws {AppwriteException}
1686
1912
  * @returns {Promise}
1687
1913
  */
1688
- updatePhone<Preferences extends Models.Preferences>(number: string, password: string): Promise<Models.User<Preferences>>;
1914
+ updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.Account<Preferences>>;
1689
1915
  /**
1690
1916
  * Get Account Preferences
1691
1917
  *
@@ -1706,7 +1932,7 @@ declare module "node-appwrite" {
1706
1932
  * @throws {AppwriteException}
1707
1933
  * @returns {Promise}
1708
1934
  */
1709
- updatePrefs<Preferences extends Models.Preferences>(prefs: object): Promise<Models.User<Preferences>>;
1935
+ updatePrefs<Preferences extends Models.Preferences>(prefs: object): Promise<Models.Account<Preferences>>;
1710
1936
  /**
1711
1937
  * Create Password Recovery
1712
1938
  *
@@ -1812,7 +2038,7 @@ declare module "node-appwrite" {
1812
2038
  * @throws {AppwriteException}
1813
2039
  * @returns {Promise}
1814
2040
  */
1815
- updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
2041
+ updateStatus<Preferences extends Models.Preferences>(): Promise<Models.Account<Preferences>>;
1816
2042
  /**
1817
2043
  * Create Email Verification
1818
2044
  *
@@ -1942,7 +2168,8 @@ declare module "node-appwrite" {
1942
2168
  *
1943
2169
  * You can use this endpoint to show different country flags icons to your
1944
2170
  * users. The code argument receives the 2 letter country code. Use width,
1945
- * height and quality arguments to change the output settings.
2171
+ * height and quality arguments to change the output settings. Country codes
2172
+ * follow the [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) standard.
1946
2173
  *
1947
2174
  * When one dimension is specified and the other is 0, the image is scaled
1948
2175
  * with preserved aspect ratio. If both dimensions are 0, the API provides an
@@ -2002,12 +2229,11 @@ declare module "node-appwrite" {
2002
2229
  * @param {string} name
2003
2230
  * @param {number} width
2004
2231
  * @param {number} height
2005
- * @param {string} color
2006
2232
  * @param {string} background
2007
2233
  * @throws {AppwriteException}
2008
2234
  * @returns {Promise}
2009
2235
  */
2010
- getInitials(name?: string, width?: number, height?: number, color?: string, background?: string): Promise<Buffer>;
2236
+ getInitials(name?: string, width?: number, height?: number, background?: string): Promise<Buffer>;
2011
2237
  /**
2012
2238
  * Get QR Code
2013
2239
  *
@@ -2025,131 +2251,150 @@ declare module "node-appwrite" {
2025
2251
  getQR(text: string, size?: number, margin?: number, download?: boolean): Promise<Buffer>;
2026
2252
  }
2027
2253
  export class Databases extends Service {
2028
- constructor(client: Client, databaseId: string);
2254
+ constructor(client: Client);
2029
2255
 
2030
- /**
2031
- * Get databaseId.
2032
- *
2033
- * @returns {string}
2034
- */
2035
- getDatabaseId(): string;
2036
-
2037
- /**
2038
- * Set databaseId.
2039
- *
2040
- * @param {string} databaseId
2041
- * @returns {void}
2042
- */
2043
- setDatabaseId(databaseId: string): void;
2044
-
2045
2256
  /**
2046
2257
  * List Databases
2047
2258
  *
2259
+ * Get a list of all databases from the current Appwrite project. You can use
2260
+ * the search parameter to filter your results.
2261
+ *
2262
+ * @param {string[]} queries
2048
2263
  * @param {string} search
2049
- * @param {number} limit
2050
- * @param {number} offset
2051
- * @param {string} cursor
2052
- * @param {string} cursorDirection
2053
- * @param {string} orderType
2054
2264
  * @throws {AppwriteException}
2055
2265
  * @returns {Promise}
2056
2266
  */
2057
- list(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.DatabaseList>;
2267
+ list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
2058
2268
  /**
2059
2269
  * Create Database
2060
2270
  *
2271
+ * Create a new Database.
2272
+ *
2273
+ *
2274
+ * @param {string} databaseId
2061
2275
  * @param {string} name
2062
2276
  * @throws {AppwriteException}
2063
2277
  * @returns {Promise}
2064
2278
  */
2065
- create(name: string): Promise<Models.Database>;
2279
+ create(databaseId: string, name: string): Promise<Models.Database>;
2066
2280
  /**
2067
2281
  * Get Database
2068
2282
  *
2283
+ * Get a database by its unique ID. This endpoint response returns a JSON
2284
+ * object with the database metadata.
2285
+ *
2286
+ * @param {string} databaseId
2069
2287
  * @throws {AppwriteException}
2070
2288
  * @returns {Promise}
2071
2289
  */
2072
- get(): Promise<Models.Collection>;
2290
+ get(databaseId: string): Promise<Models.Database>;
2073
2291
  /**
2074
2292
  * Update Database
2075
2293
  *
2294
+ * Update a database by its unique ID.
2295
+ *
2296
+ * @param {string} databaseId
2076
2297
  * @param {string} name
2077
2298
  * @throws {AppwriteException}
2078
2299
  * @returns {Promise}
2079
2300
  */
2080
- update(name: string): Promise<Models.Collection>;
2301
+ update(databaseId: string, name: string): Promise<Models.Database>;
2081
2302
  /**
2082
2303
  * Delete Database
2083
2304
  *
2305
+ * Delete a database by its unique ID. Only API keys with with databases.write
2306
+ * scope can delete a database.
2307
+ *
2308
+ * @param {string} databaseId
2084
2309
  * @throws {AppwriteException}
2085
2310
  * @returns {Promise}
2086
2311
  */
2087
- delete(): Promise<Response>;
2312
+ delete(databaseId: string): Promise<Response>;
2088
2313
  /**
2089
2314
  * List Collections
2090
2315
  *
2316
+ * Get a list of all collections that belong to the provided databaseId. You
2317
+ * can use the search parameter to filter your results.
2318
+ *
2319
+ * @param {string} databaseId
2320
+ * @param {string[]} queries
2091
2321
  * @param {string} search
2092
- * @param {number} limit
2093
- * @param {number} offset
2094
- * @param {string} cursor
2095
- * @param {string} cursorDirection
2096
- * @param {string} orderType
2097
2322
  * @throws {AppwriteException}
2098
2323
  * @returns {Promise}
2099
2324
  */
2100
- listCollections(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.CollectionList>;
2325
+ listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
2101
2326
  /**
2102
2327
  * Create Collection
2103
2328
  *
2329
+ * Create a new Collection. Before using this route, you should create a new
2330
+ * database resource using either a [server
2331
+ * integration](/docs/server/databases#databasesCreateCollection) API or
2332
+ * directly from your database console.
2333
+ *
2334
+ * @param {string} databaseId
2104
2335
  * @param {string} collectionId
2105
2336
  * @param {string} name
2106
- * @param {string} permission
2107
- * @param {string[]} read
2108
- * @param {string[]} write
2337
+ * @param {string[]} permissions
2338
+ * @param {boolean} documentSecurity
2109
2339
  * @throws {AppwriteException}
2110
2340
  * @returns {Promise}
2111
2341
  */
2112
- createCollection(collectionId: string, name: string, permission: string, read: string[], write: string[]): Promise<Models.Collection>;
2342
+ createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean): Promise<Models.Collection>;
2113
2343
  /**
2114
2344
  * Get Collection
2115
2345
  *
2346
+ * Get a collection by its unique ID. This endpoint response returns a JSON
2347
+ * object with the collection metadata.
2348
+ *
2349
+ * @param {string} databaseId
2116
2350
  * @param {string} collectionId
2117
2351
  * @throws {AppwriteException}
2118
2352
  * @returns {Promise}
2119
2353
  */
2120
- getCollection(collectionId: string): Promise<Models.Collection>;
2354
+ getCollection(databaseId: string, collectionId: string): Promise<Models.Collection>;
2121
2355
  /**
2122
2356
  * Update Collection
2123
2357
  *
2358
+ * Update a collection by its unique ID.
2359
+ *
2360
+ * @param {string} databaseId
2124
2361
  * @param {string} collectionId
2125
2362
  * @param {string} name
2126
- * @param {string} permission
2127
- * @param {string[]} read
2128
- * @param {string[]} write
2363
+ * @param {string[]} permissions
2364
+ * @param {boolean} documentSecurity
2129
2365
  * @param {boolean} enabled
2130
2366
  * @throws {AppwriteException}
2131
2367
  * @returns {Promise}
2132
2368
  */
2133
- updateCollection(collectionId: string, name: string, permission: string, read?: string[], write?: string[], enabled?: boolean): Promise<Models.Collection>;
2369
+ updateCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
2134
2370
  /**
2135
2371
  * Delete Collection
2136
2372
  *
2373
+ * Delete a collection by its unique ID. Only users with write permissions
2374
+ * have access to delete this resource.
2375
+ *
2376
+ * @param {string} databaseId
2137
2377
  * @param {string} collectionId
2138
2378
  * @throws {AppwriteException}
2139
2379
  * @returns {Promise}
2140
2380
  */
2141
- deleteCollection(collectionId: string): Promise<Response>;
2381
+ deleteCollection(databaseId: string, collectionId: string): Promise<Response>;
2142
2382
  /**
2143
2383
  * List Attributes
2144
2384
  *
2385
+ * @param {string} databaseId
2145
2386
  * @param {string} collectionId
2146
2387
  * @throws {AppwriteException}
2147
2388
  * @returns {Promise}
2148
2389
  */
2149
- listAttributes(collectionId: string): Promise<Models.AttributeList>;
2390
+ listAttributes(databaseId: string, collectionId: string): Promise<Models.AttributeList>;
2150
2391
  /**
2151
2392
  * Create Boolean Attribute
2152
2393
  *
2394
+ * Create a boolean attribute.
2395
+ *
2396
+ *
2397
+ * @param {string} databaseId
2153
2398
  * @param {string} collectionId
2154
2399
  * @param {string} key
2155
2400
  * @param {boolean} required
@@ -2158,10 +2403,27 @@ declare module "node-appwrite" {
2158
2403
  * @throws {AppwriteException}
2159
2404
  * @returns {Promise}
2160
2405
  */
2161
- createBooleanAttribute(collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean>;
2406
+ createBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean>;
2407
+ /**
2408
+ * Create DateTime Attribute
2409
+ *
2410
+ * @param {string} databaseId
2411
+ * @param {string} collectionId
2412
+ * @param {string} key
2413
+ * @param {boolean} required
2414
+ * @param {string} default
2415
+ * @param {boolean} array
2416
+ * @throws {AppwriteException}
2417
+ * @returns {Promise}
2418
+ */
2419
+ createDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeDatetime>;
2162
2420
  /**
2163
2421
  * Create Email Attribute
2164
2422
  *
2423
+ * Create an email attribute.
2424
+ *
2425
+ *
2426
+ * @param {string} databaseId
2165
2427
  * @param {string} collectionId
2166
2428
  * @param {string} key
2167
2429
  * @param {boolean} required
@@ -2170,10 +2432,11 @@ declare module "node-appwrite" {
2170
2432
  * @throws {AppwriteException}
2171
2433
  * @returns {Promise}
2172
2434
  */
2173
- createEmailAttribute(collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail>;
2435
+ createEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail>;
2174
2436
  /**
2175
2437
  * Create Enum Attribute
2176
2438
  *
2439
+ * @param {string} databaseId
2177
2440
  * @param {string} collectionId
2178
2441
  * @param {string} key
2179
2442
  * @param {string[]} elements
@@ -2183,10 +2446,15 @@ declare module "node-appwrite" {
2183
2446
  * @throws {AppwriteException}
2184
2447
  * @returns {Promise}
2185
2448
  */
2186
- createEnumAttribute(collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum>;
2449
+ createEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum>;
2187
2450
  /**
2188
2451
  * Create Float Attribute
2189
2452
  *
2453
+ * Create a float attribute. Optionally, minimum and maximum values can be
2454
+ * provided.
2455
+ *
2456
+ *
2457
+ * @param {string} databaseId
2190
2458
  * @param {string} collectionId
2191
2459
  * @param {string} key
2192
2460
  * @param {boolean} required
@@ -2197,10 +2465,15 @@ declare module "node-appwrite" {
2197
2465
  * @throws {AppwriteException}
2198
2466
  * @returns {Promise}
2199
2467
  */
2200
- createFloatAttribute(collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
2468
+ createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
2201
2469
  /**
2202
2470
  * Create Integer Attribute
2203
2471
  *
2472
+ * Create an integer attribute. Optionally, minimum and maximum values can be
2473
+ * provided.
2474
+ *
2475
+ *
2476
+ * @param {string} databaseId
2204
2477
  * @param {string} collectionId
2205
2478
  * @param {string} key
2206
2479
  * @param {boolean} required
@@ -2211,10 +2484,14 @@ declare module "node-appwrite" {
2211
2484
  * @throws {AppwriteException}
2212
2485
  * @returns {Promise}
2213
2486
  */
2214
- createIntegerAttribute(collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger>;
2487
+ createIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger>;
2215
2488
  /**
2216
2489
  * Create IP Address Attribute
2217
2490
  *
2491
+ * Create IP address attribute.
2492
+ *
2493
+ *
2494
+ * @param {string} databaseId
2218
2495
  * @param {string} collectionId
2219
2496
  * @param {string} key
2220
2497
  * @param {boolean} required
@@ -2223,10 +2500,14 @@ declare module "node-appwrite" {
2223
2500
  * @throws {AppwriteException}
2224
2501
  * @returns {Promise}
2225
2502
  */
2226
- createIpAttribute(collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp>;
2503
+ createIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp>;
2227
2504
  /**
2228
2505
  * Create String Attribute
2229
2506
  *
2507
+ * Create a string attribute.
2508
+ *
2509
+ *
2510
+ * @param {string} databaseId
2230
2511
  * @param {string} collectionId
2231
2512
  * @param {string} key
2232
2513
  * @param {number} size
@@ -2236,10 +2517,14 @@ declare module "node-appwrite" {
2236
2517
  * @throws {AppwriteException}
2237
2518
  * @returns {Promise}
2238
2519
  */
2239
- createStringAttribute(collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeString>;
2520
+ createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeString>;
2240
2521
  /**
2241
2522
  * Create URL Attribute
2242
2523
  *
2524
+ * Create a URL attribute.
2525
+ *
2526
+ *
2527
+ * @param {string} databaseId
2243
2528
  * @param {string} collectionId
2244
2529
  * @param {string} key
2245
2530
  * @param {boolean} required
@@ -2248,93 +2533,112 @@ declare module "node-appwrite" {
2248
2533
  * @throws {AppwriteException}
2249
2534
  * @returns {Promise}
2250
2535
  */
2251
- createUrlAttribute(collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl>;
2536
+ createUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl>;
2252
2537
  /**
2253
2538
  * Get Attribute
2254
2539
  *
2540
+ * @param {string} databaseId
2255
2541
  * @param {string} collectionId
2256
2542
  * @param {string} key
2257
2543
  * @throws {AppwriteException}
2258
2544
  * @returns {Promise}
2259
2545
  */
2260
- getAttribute(collectionId: string, key: string): Promise<Response>;
2546
+ getAttribute(databaseId: string, collectionId: string, key: string): Promise<Response>;
2261
2547
  /**
2262
2548
  * Delete Attribute
2263
2549
  *
2550
+ * @param {string} databaseId
2264
2551
  * @param {string} collectionId
2265
2552
  * @param {string} key
2266
2553
  * @throws {AppwriteException}
2267
2554
  * @returns {Promise}
2268
2555
  */
2269
- deleteAttribute(collectionId: string, key: string): Promise<Response>;
2556
+ deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<Response>;
2270
2557
  /**
2271
2558
  * List Documents
2272
2559
  *
2560
+ * Get a list of all the user's documents in a given collection. You can use
2561
+ * the query params to filter your results. On admin mode, this endpoint will
2562
+ * return a list of all of documents belonging to the provided collectionId.
2563
+ * [Learn more about different API modes](/docs/admin).
2564
+ *
2565
+ * @param {string} databaseId
2273
2566
  * @param {string} collectionId
2274
2567
  * @param {string[]} queries
2275
- * @param {number} limit
2276
- * @param {number} offset
2277
- * @param {string} cursor
2278
- * @param {string} cursorDirection
2279
- * @param {string[]} orderAttributes
2280
- * @param {string[]} orderTypes
2281
2568
  * @throws {AppwriteException}
2282
2569
  * @returns {Promise}
2283
2570
  */
2284
- listDocuments<Document extends Models.Document>(collectionId: string, queries?: string[], limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderAttributes?: string[], orderTypes?: string[]): Promise<Models.DocumentList<Document>>;
2571
+ listDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
2285
2572
  /**
2286
2573
  * Create Document
2287
2574
  *
2575
+ * Create a new Document. Before using this route, you should create a new
2576
+ * collection resource using either a [server
2577
+ * integration](/docs/server/databases#databasesCreateCollection) API or
2578
+ * directly from your database console.
2579
+ *
2580
+ * @param {string} databaseId
2288
2581
  * @param {string} collectionId
2289
2582
  * @param {string} documentId
2290
2583
  * @param {object} data
2291
- * @param {string[]} read
2292
- * @param {string[]} write
2584
+ * @param {string[]} permissions
2293
2585
  * @throws {AppwriteException}
2294
2586
  * @returns {Promise}
2295
2587
  */
2296
- createDocument<Document extends Models.Document>(collectionId: string, documentId: string, data: object, read?: string[], write?: string[]): Promise<Document>;
2588
+ createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: object, permissions?: string[]): Promise<Document>;
2297
2589
  /**
2298
2590
  * Get Document
2299
2591
  *
2592
+ * Get a document by its unique ID. This endpoint response returns a JSON
2593
+ * object with the document data.
2594
+ *
2595
+ * @param {string} databaseId
2300
2596
  * @param {string} collectionId
2301
2597
  * @param {string} documentId
2302
2598
  * @throws {AppwriteException}
2303
2599
  * @returns {Promise}
2304
2600
  */
2305
- getDocument<Document extends Models.Document>(collectionId: string, documentId: string): Promise<Document>;
2601
+ getDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string): Promise<Document>;
2306
2602
  /**
2307
2603
  * Update Document
2308
2604
  *
2605
+ * Update a document by its unique ID. Using the patch method you can pass
2606
+ * only specific fields that will get updated.
2607
+ *
2608
+ * @param {string} databaseId
2309
2609
  * @param {string} collectionId
2310
2610
  * @param {string} documentId
2311
2611
  * @param {object} data
2312
- * @param {string[]} read
2313
- * @param {string[]} write
2612
+ * @param {string[]} permissions
2314
2613
  * @throws {AppwriteException}
2315
2614
  * @returns {Promise}
2316
2615
  */
2317
- updateDocument<Document extends Models.Document>(collectionId: string, documentId: string, data?: object, read?: string[], write?: string[]): Promise<Document>;
2616
+ updateDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data?: object, permissions?: string[]): Promise<Document>;
2318
2617
  /**
2319
2618
  * Delete Document
2320
2619
  *
2620
+ * Delete a document by its unique ID.
2621
+ *
2622
+ * @param {string} databaseId
2321
2623
  * @param {string} collectionId
2322
2624
  * @param {string} documentId
2323
2625
  * @throws {AppwriteException}
2324
2626
  * @returns {Promise}
2325
2627
  */
2326
- deleteDocument(collectionId: string, documentId: string): Promise<Response>;
2628
+ deleteDocument(databaseId: string, collectionId: string, documentId: string): Promise<Response>;
2327
2629
  /**
2328
2630
  * List Indexes
2329
2631
  *
2632
+ * @param {string} databaseId
2330
2633
  * @param {string} collectionId
2331
2634
  * @throws {AppwriteException}
2332
2635
  * @returns {Promise}
2333
2636
  */
2334
- listIndexes(collectionId: string): Promise<Models.IndexList>;
2637
+ listIndexes(databaseId: string, collectionId: string): Promise<Models.IndexList>;
2335
2638
  /**
2336
2639
  * Create Index
2337
2640
  *
2641
+ * @param {string} databaseId
2338
2642
  * @param {string} collectionId
2339
2643
  * @param {string} key
2340
2644
  * @param {string} type
@@ -2343,25 +2647,27 @@ declare module "node-appwrite" {
2343
2647
  * @throws {AppwriteException}
2344
2648
  * @returns {Promise}
2345
2649
  */
2346
- createIndex(collectionId: string, key: string, type: string, attributes: string[], orders?: string[]): Promise<Models.Index>;
2650
+ createIndex(databaseId: string, collectionId: string, key: string, type: string, attributes: string[], orders?: string[]): Promise<Models.Index>;
2347
2651
  /**
2348
2652
  * Get Index
2349
2653
  *
2654
+ * @param {string} databaseId
2350
2655
  * @param {string} collectionId
2351
2656
  * @param {string} key
2352
2657
  * @throws {AppwriteException}
2353
2658
  * @returns {Promise}
2354
2659
  */
2355
- getIndex(collectionId: string, key: string): Promise<Models.Index>;
2660
+ getIndex(databaseId: string, collectionId: string, key: string): Promise<Models.Index>;
2356
2661
  /**
2357
2662
  * Delete Index
2358
2663
  *
2664
+ * @param {string} databaseId
2359
2665
  * @param {string} collectionId
2360
2666
  * @param {string} key
2361
2667
  * @throws {AppwriteException}
2362
2668
  * @returns {Promise}
2363
2669
  */
2364
- deleteIndex(collectionId: string, key: string): Promise<Response>;
2670
+ deleteIndex(databaseId: string, collectionId: string, key: string): Promise<Response>;
2365
2671
  }
2366
2672
  export class Functions extends Service {
2367
2673
  constructor(client: Client);
@@ -2372,16 +2678,12 @@ declare module "node-appwrite" {
2372
2678
  * Get a list of all the project's functions. You can use the query params to
2373
2679
  * filter your results.
2374
2680
  *
2681
+ * @param {string[]} queries
2375
2682
  * @param {string} search
2376
- * @param {number} limit
2377
- * @param {number} offset
2378
- * @param {string} cursor
2379
- * @param {string} cursorDirection
2380
- * @param {string} orderType
2381
2683
  * @throws {AppwriteException}
2382
2684
  * @returns {Promise}
2383
2685
  */
2384
- list(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.FunctionList>;
2686
+ list(queries?: string[], search?: string): Promise<Models.FunctionList>;
2385
2687
  /**
2386
2688
  * Create Function
2387
2689
  *
@@ -2393,14 +2695,13 @@ declare module "node-appwrite" {
2393
2695
  * @param {string} name
2394
2696
  * @param {string[]} execute
2395
2697
  * @param {string} runtime
2396
- * @param {object} vars
2397
2698
  * @param {string[]} events
2398
2699
  * @param {string} schedule
2399
2700
  * @param {number} timeout
2400
2701
  * @throws {AppwriteException}
2401
2702
  * @returns {Promise}
2402
2703
  */
2403
- create(functionId: string, name: string, execute: string[], runtime: string, vars?: object, events?: string[], schedule?: string, timeout?: number): Promise<Models.Function>;
2704
+ create(functionId: string, name: string, execute: string[], runtime: string, events?: string[], schedule?: string, timeout?: number): Promise<Models.Function>;
2404
2705
  /**
2405
2706
  * List runtimes
2406
2707
  *
@@ -2428,14 +2729,13 @@ declare module "node-appwrite" {
2428
2729
  * @param {string} functionId
2429
2730
  * @param {string} name
2430
2731
  * @param {string[]} execute
2431
- * @param {object} vars
2432
2732
  * @param {string[]} events
2433
2733
  * @param {string} schedule
2434
2734
  * @param {number} timeout
2435
2735
  * @throws {AppwriteException}
2436
2736
  * @returns {Promise}
2437
2737
  */
2438
- update(functionId: string, name: string, execute: string[], vars?: object, events?: string[], schedule?: string, timeout?: number): Promise<Models.Function>;
2738
+ update(functionId: string, name: string, execute: string[], events?: string[], schedule?: string, timeout?: number): Promise<Models.Function>;
2439
2739
  /**
2440
2740
  * Delete Function
2441
2741
  *
@@ -2453,16 +2753,12 @@ declare module "node-appwrite" {
2453
2753
  * params to filter your results.
2454
2754
  *
2455
2755
  * @param {string} functionId
2756
+ * @param {string[]} queries
2456
2757
  * @param {string} search
2457
- * @param {number} limit
2458
- * @param {number} offset
2459
- * @param {string} cursor
2460
- * @param {string} cursorDirection
2461
- * @param {string} orderType
2462
2758
  * @throws {AppwriteException}
2463
2759
  * @returns {Promise}
2464
2760
  */
2465
- listDeployments(functionId: string, search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.DeploymentList>;
2761
+ listDeployments(functionId: string, queries?: string[], search?: string): Promise<Models.DeploymentList>;
2466
2762
  /**
2467
2763
  * Create Deployment
2468
2764
  *
@@ -2495,7 +2791,7 @@ declare module "node-appwrite" {
2495
2791
  * @throws {AppwriteException}
2496
2792
  * @returns {Promise}
2497
2793
  */
2498
- getDeployment(functionId: string, deploymentId: string): Promise<Models.DeploymentList>;
2794
+ getDeployment(functionId: string, deploymentId: string): Promise<Models.Deployment>;
2499
2795
  /**
2500
2796
  * Update Function Deployment
2501
2797
  *
@@ -2539,15 +2835,12 @@ declare module "node-appwrite" {
2539
2835
  * different API modes](/docs/admin).
2540
2836
  *
2541
2837
  * @param {string} functionId
2542
- * @param {number} limit
2543
- * @param {number} offset
2838
+ * @param {string[]} queries
2544
2839
  * @param {string} search
2545
- * @param {string} cursor
2546
- * @param {string} cursorDirection
2547
2840
  * @throws {AppwriteException}
2548
2841
  * @returns {Promise}
2549
2842
  */
2550
- listExecutions(functionId: string, limit?: number, offset?: number, search?: string, cursor?: string, cursorDirection?: string): Promise<Models.ExecutionList>;
2843
+ listExecutions(functionId: string, queries?: string[], search?: string): Promise<Models.ExecutionList>;
2551
2844
  /**
2552
2845
  * Create Execution
2553
2846
  *
@@ -2574,6 +2867,66 @@ declare module "node-appwrite" {
2574
2867
  * @returns {Promise}
2575
2868
  */
2576
2869
  getExecution(functionId: string, executionId: string): Promise<Models.Execution>;
2870
+ /**
2871
+ * List Variables
2872
+ *
2873
+ * Get a list of all variables of a specific function.
2874
+ *
2875
+ * @param {string} functionId
2876
+ * @param {string[]} queries
2877
+ * @param {string} search
2878
+ * @throws {AppwriteException}
2879
+ * @returns {Promise}
2880
+ */
2881
+ listVariables(functionId: string, queries?: string[], search?: string): Promise<Models.VariableList>;
2882
+ /**
2883
+ * Create Variable
2884
+ *
2885
+ * Create a new function variable. These variables can be accessed within
2886
+ * function in the `env` object under the request variable.
2887
+ *
2888
+ * @param {string} functionId
2889
+ * @param {string} key
2890
+ * @param {string} value
2891
+ * @throws {AppwriteException}
2892
+ * @returns {Promise}
2893
+ */
2894
+ createVariable(functionId: string, key: string, value: string): Promise<Models.Variable>;
2895
+ /**
2896
+ * Get Variable
2897
+ *
2898
+ * Get a variable by its unique ID.
2899
+ *
2900
+ * @param {string} functionId
2901
+ * @param {string} variableId
2902
+ * @throws {AppwriteException}
2903
+ * @returns {Promise}
2904
+ */
2905
+ getVariable(functionId: string, variableId: string): Promise<Models.Variable>;
2906
+ /**
2907
+ * Update Variable
2908
+ *
2909
+ * Update variable by its unique ID.
2910
+ *
2911
+ * @param {string} functionId
2912
+ * @param {string} variableId
2913
+ * @param {string} key
2914
+ * @param {string} value
2915
+ * @throws {AppwriteException}
2916
+ * @returns {Promise}
2917
+ */
2918
+ updateVariable(functionId: string, variableId: string, key: string, value?: string): Promise<Models.Variable>;
2919
+ /**
2920
+ * Delete Variable
2921
+ *
2922
+ * Delete a variable by its unique ID.
2923
+ *
2924
+ * @param {string} functionId
2925
+ * @param {string} variableId
2926
+ * @throws {AppwriteException}
2927
+ * @returns {Promise}
2928
+ */
2929
+ deleteVariable(functionId: string, variableId: string): Promise<Response>;
2577
2930
  }
2578
2931
  export class Health extends Service {
2579
2932
  constructor(client: Client);
@@ -2766,16 +3119,12 @@ declare module "node-appwrite" {
2766
3119
  * Get a list of all the storage buckets. You can use the query params to
2767
3120
  * filter your results.
2768
3121
  *
3122
+ * @param {string[]} queries
2769
3123
  * @param {string} search
2770
- * @param {number} limit
2771
- * @param {number} offset
2772
- * @param {string} cursor
2773
- * @param {string} cursorDirection
2774
- * @param {string} orderType
2775
3124
  * @throws {AppwriteException}
2776
3125
  * @returns {Promise}
2777
3126
  */
2778
- listBuckets(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.BucketList>;
3127
+ listBuckets(queries?: string[], search?: string): Promise<Models.BucketList>;
2779
3128
  /**
2780
3129
  * Create bucket
2781
3130
  *
@@ -2783,18 +3132,18 @@ declare module "node-appwrite" {
2783
3132
  *
2784
3133
  * @param {string} bucketId
2785
3134
  * @param {string} name
2786
- * @param {string} permission
2787
- * @param {string[]} read
2788
- * @param {string[]} write
3135
+ * @param {string[]} permissions
3136
+ * @param {boolean} fileSecurity
2789
3137
  * @param {boolean} enabled
2790
3138
  * @param {number} maximumFileSize
2791
3139
  * @param {string[]} allowedFileExtensions
3140
+ * @param {string} compression
2792
3141
  * @param {boolean} encryption
2793
3142
  * @param {boolean} antivirus
2794
3143
  * @throws {AppwriteException}
2795
3144
  * @returns {Promise}
2796
3145
  */
2797
- createBucket(bucketId: string, name: string, permission: string, read?: string[], write?: string[], enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
3146
+ createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: string, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
2798
3147
  /**
2799
3148
  * Get Bucket
2800
3149
  *
@@ -2813,18 +3162,18 @@ declare module "node-appwrite" {
2813
3162
  *
2814
3163
  * @param {string} bucketId
2815
3164
  * @param {string} name
2816
- * @param {string} permission
2817
- * @param {string[]} read
2818
- * @param {string[]} write
3165
+ * @param {string[]} permissions
3166
+ * @param {boolean} fileSecurity
2819
3167
  * @param {boolean} enabled
2820
3168
  * @param {number} maximumFileSize
2821
3169
  * @param {string[]} allowedFileExtensions
3170
+ * @param {string} compression
2822
3171
  * @param {boolean} encryption
2823
3172
  * @param {boolean} antivirus
2824
3173
  * @throws {AppwriteException}
2825
3174
  * @returns {Promise}
2826
3175
  */
2827
- updateBucket(bucketId: string, name: string, permission: string, read?: string[], write?: string[], enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
3176
+ updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: string, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
2828
3177
  /**
2829
3178
  * Delete Bucket
2830
3179
  *
@@ -2843,23 +3192,19 @@ declare module "node-appwrite" {
2843
3192
  * project's files. [Learn more about different API modes](/docs/admin).
2844
3193
  *
2845
3194
  * @param {string} bucketId
3195
+ * @param {string[]} queries
2846
3196
  * @param {string} search
2847
- * @param {number} limit
2848
- * @param {number} offset
2849
- * @param {string} cursor
2850
- * @param {string} cursorDirection
2851
- * @param {string} orderType
2852
3197
  * @throws {AppwriteException}
2853
3198
  * @returns {Promise}
2854
3199
  */
2855
- listFiles(bucketId: string, search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.FileList>;
3200
+ listFiles(bucketId: string, queries?: string[], search?: string): Promise<Models.FileList>;
2856
3201
  /**
2857
3202
  * Create File
2858
3203
  *
2859
3204
  * Create a new file. Before using this route, you should create a new bucket
2860
3205
  * resource using either a [server
2861
- * integration](/docs/server/database#storageCreateBucket) API or directly
2862
- * from your Appwrite console.
3206
+ * integration](/docs/server/storage#storageCreateBucket) API or directly from
3207
+ * your Appwrite console.
2863
3208
  *
2864
3209
  * Larger files should be uploaded using multiple requests with the
2865
3210
  * [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range)
@@ -2878,12 +3223,11 @@ declare module "node-appwrite" {
2878
3223
  * @param {string} bucketId
2879
3224
  * @param {string} fileId
2880
3225
  * @param {InputFile} file
2881
- * @param {string[]} read
2882
- * @param {string[]} write
3226
+ * @param {string[]} permissions
2883
3227
  * @throws {AppwriteException}
2884
3228
  * @returns {Promise}
2885
3229
  */
2886
- createFile(bucketId: string, fileId: string, file: InputFile, read?: string[], write?: string[]): Promise<Models.File>;
3230
+ createFile(bucketId: string, fileId: string, file: InputFile, permissions?: string[]): Promise<Models.File>;
2887
3231
  /**
2888
3232
  * Get File
2889
3233
  *
@@ -2904,12 +3248,11 @@ declare module "node-appwrite" {
2904
3248
  *
2905
3249
  * @param {string} bucketId
2906
3250
  * @param {string} fileId
2907
- * @param {string[]} read
2908
- * @param {string[]} write
3251
+ * @param {string[]} permissions
2909
3252
  * @throws {AppwriteException}
2910
3253
  * @returns {Promise}
2911
3254
  */
2912
- updateFile(bucketId: string, fileId: string, read?: string[], write?: string[]): Promise<Models.File>;
3255
+ updateFile(bucketId: string, fileId: string, permissions?: string[]): Promise<Models.File>;
2913
3256
  /**
2914
3257
  * Delete File
2915
3258
  *
@@ -2987,16 +3330,12 @@ declare module "node-appwrite" {
2987
3330
  * In admin mode, this endpoint returns a list of all the teams in the current
2988
3331
  * project. [Learn more about different API modes](/docs/admin).
2989
3332
  *
3333
+ * @param {string[]} queries
2990
3334
  * @param {string} search
2991
- * @param {number} limit
2992
- * @param {number} offset
2993
- * @param {string} cursor
2994
- * @param {string} cursorDirection
2995
- * @param {string} orderType
2996
3335
  * @throws {AppwriteException}
2997
3336
  * @returns {Promise}
2998
3337
  */
2999
- list(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.TeamList>;
3338
+ list(queries?: string[], search?: string): Promise<Models.TeamList>;
3000
3339
  /**
3001
3340
  * Create Team
3002
3341
  *
@@ -3051,16 +3390,12 @@ declare module "node-appwrite" {
3051
3390
  * members have read access to this endpoint.
3052
3391
  *
3053
3392
  * @param {string} teamId
3393
+ * @param {string[]} queries
3054
3394
  * @param {string} search
3055
- * @param {number} limit
3056
- * @param {number} offset
3057
- * @param {string} cursor
3058
- * @param {string} cursorDirection
3059
- * @param {string} orderType
3060
3395
  * @throws {AppwriteException}
3061
3396
  * @returns {Promise}
3062
3397
  */
3063
- getMemberships(teamId: string, search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.MembershipList>;
3398
+ getMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
3064
3399
  /**
3065
3400
  * Create Team Membership
3066
3401
  *
@@ -3157,16 +3492,12 @@ declare module "node-appwrite" {
3157
3492
  * Get a list of all the project's users. You can use the query params to
3158
3493
  * filter your results.
3159
3494
  *
3495
+ * @param {string[]} queries
3160
3496
  * @param {string} search
3161
- * @param {number} limit
3162
- * @param {number} offset
3163
- * @param {string} cursor
3164
- * @param {string} cursorDirection
3165
- * @param {string} orderType
3166
3497
  * @throws {AppwriteException}
3167
3498
  * @returns {Promise}
3168
3499
  */
3169
- list<Preferences extends Models.Preferences>(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.UserList<Preferences>>;
3500
+ list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.UserList<Preferences>>;
3170
3501
  /**
3171
3502
  * Create User
3172
3503
  *
@@ -3174,12 +3505,134 @@ declare module "node-appwrite" {
3174
3505
  *
3175
3506
  * @param {string} userId
3176
3507
  * @param {string} email
3508
+ * @param {string} phone
3177
3509
  * @param {string} password
3178
3510
  * @param {string} name
3179
3511
  * @throws {AppwriteException}
3180
3512
  * @returns {Promise}
3181
3513
  */
3182
- create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
3514
+ create<Preferences extends Models.Preferences>(userId: string, email?: string, phone?: string, password?: string, name?: string): Promise<Models.User<Preferences>>;
3515
+ /**
3516
+ * Create User with Argon2 Password
3517
+ *
3518
+ * Create a new user. Password provided must be hashed with the
3519
+ * [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST
3520
+ * /users](/docs/server/users#usersCreate) endpoint to create users with a
3521
+ * plain text password.
3522
+ *
3523
+ * @param {string} userId
3524
+ * @param {string} email
3525
+ * @param {string} password
3526
+ * @param {string} name
3527
+ * @throws {AppwriteException}
3528
+ * @returns {Promise}
3529
+ */
3530
+ createArgon2User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
3531
+ /**
3532
+ * Create User with Bcrypt Password
3533
+ *
3534
+ * Create a new user. Password provided must be hashed with the
3535
+ * [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST
3536
+ * /users](/docs/server/users#usersCreate) endpoint to create users with a
3537
+ * plain text password.
3538
+ *
3539
+ * @param {string} userId
3540
+ * @param {string} email
3541
+ * @param {string} password
3542
+ * @param {string} name
3543
+ * @throws {AppwriteException}
3544
+ * @returns {Promise}
3545
+ */
3546
+ createBcryptUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
3547
+ /**
3548
+ * Create User with MD5 Password
3549
+ *
3550
+ * Create a new user. Password provided must be hashed with the
3551
+ * [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST
3552
+ * /users](/docs/server/users#usersCreate) endpoint to create users with a
3553
+ * plain text password.
3554
+ *
3555
+ * @param {string} userId
3556
+ * @param {string} email
3557
+ * @param {string} password
3558
+ * @param {string} name
3559
+ * @throws {AppwriteException}
3560
+ * @returns {Promise}
3561
+ */
3562
+ createMD5User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
3563
+ /**
3564
+ * Create User with PHPass Password
3565
+ *
3566
+ * Create a new user. Password provided must be hashed with the
3567
+ * [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST
3568
+ * /users](/docs/server/users#usersCreate) endpoint to create users with a
3569
+ * plain text password.
3570
+ *
3571
+ * @param {string} userId
3572
+ * @param {string} email
3573
+ * @param {string} password
3574
+ * @param {string} name
3575
+ * @throws {AppwriteException}
3576
+ * @returns {Promise}
3577
+ */
3578
+ createPHPassUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
3579
+ /**
3580
+ * Create User with Scrypt Password
3581
+ *
3582
+ * Create a new user. Password provided must be hashed with the
3583
+ * [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST
3584
+ * /users](/docs/server/users#usersCreate) endpoint to create users with a
3585
+ * plain text password.
3586
+ *
3587
+ * @param {string} userId
3588
+ * @param {string} email
3589
+ * @param {string} password
3590
+ * @param {string} passwordSalt
3591
+ * @param {number} passwordCpu
3592
+ * @param {number} passwordMemory
3593
+ * @param {number} passwordParallel
3594
+ * @param {number} passwordLength
3595
+ * @param {string} name
3596
+ * @throws {AppwriteException}
3597
+ * @returns {Promise}
3598
+ */
3599
+ createScryptUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordSalt: string, passwordCpu: number, passwordMemory: number, passwordParallel: number, passwordLength: number, name?: string): Promise<Models.User<Preferences>>;
3600
+ /**
3601
+ * Create User with Scrypt Modified Password
3602
+ *
3603
+ * Create a new user. Password provided must be hashed with the [Scrypt
3604
+ * Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc)
3605
+ * algorithm. Use the [POST /users](/docs/server/users#usersCreate) endpoint
3606
+ * to create users with a plain text password.
3607
+ *
3608
+ * @param {string} userId
3609
+ * @param {string} email
3610
+ * @param {string} password
3611
+ * @param {string} passwordSalt
3612
+ * @param {string} passwordSaltSeparator
3613
+ * @param {string} passwordSignerKey
3614
+ * @param {string} name
3615
+ * @throws {AppwriteException}
3616
+ * @returns {Promise}
3617
+ */
3618
+ createScryptModifiedUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordSalt: string, passwordSaltSeparator: string, passwordSignerKey: string, name?: string): Promise<Models.User<Preferences>>;
3619
+ /**
3620
+ * Create User with SHA Password
3621
+ *
3622
+ * Create a new user. Password provided must be hashed with the
3623
+ * [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use
3624
+ * the [POST /users](/docs/server/users#usersCreate) endpoint to create users
3625
+ * with a plain text password.
3626
+ *
3627
+ * @param {string} userId
3628
+ * @param {string} email
3629
+ * @param {string} password
3630
+ * @param {string} passwordVersion
3631
+ * @param {string} name
3632
+ * @throws {AppwriteException}
3633
+ * @returns {Promise}
3634
+ */
3635
+ createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?: string, name?: string): Promise<Models.User<Preferences>>;
3183
3636
  /**
3184
3637
  * Get User
3185
3638
  *
@@ -3221,12 +3674,11 @@ declare module "node-appwrite" {
3221
3674
  * Get the user activity logs list by its unique ID.
3222
3675
  *
3223
3676
  * @param {string} userId
3224
- * @param {number} limit
3225
- * @param {number} offset
3677
+ * @param {string[]} queries
3226
3678
  * @throws {AppwriteException}
3227
3679
  * @returns {Promise}
3228
3680
  */
3229
- getLogs(userId: string, limit?: number, offset?: number): Promise<Models.LogList>;
3681
+ getLogs(userId: string, queries?: string[]): Promise<Models.LogList>;
3230
3682
  /**
3231
3683
  * Get User Memberships
3232
3684
  *