node-appwrite 7.0.0 → 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.
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/docs/examples/databases/create-boolean-attribute.md +2 -2
- package/docs/examples/databases/create-collection.md +2 -2
- package/docs/examples/databases/create-datetime-attribute.md +20 -0
- package/docs/examples/databases/create-document.md +2 -2
- package/docs/examples/databases/create-email-attribute.md +2 -2
- package/docs/examples/databases/create-enum-attribute.md +2 -2
- package/docs/examples/databases/create-float-attribute.md +2 -2
- package/docs/examples/databases/create-index.md +2 -2
- package/docs/examples/databases/create-integer-attribute.md +2 -2
- package/docs/examples/databases/create-ip-attribute.md +2 -2
- package/docs/examples/databases/create-string-attribute.md +2 -2
- package/docs/examples/databases/create-url-attribute.md +2 -2
- package/docs/examples/databases/create.md +2 -2
- package/docs/examples/databases/delete-attribute.md +2 -2
- package/docs/examples/databases/delete-collection.md +2 -2
- package/docs/examples/databases/delete-document.md +2 -2
- package/docs/examples/databases/delete-index.md +2 -2
- package/docs/examples/databases/delete.md +2 -2
- package/docs/examples/databases/get-attribute.md +2 -2
- package/docs/examples/databases/get-collection.md +2 -2
- package/docs/examples/databases/get-document.md +2 -2
- package/docs/examples/databases/get-index.md +2 -2
- package/docs/examples/databases/get.md +2 -2
- package/docs/examples/databases/list-attributes.md +2 -2
- package/docs/examples/databases/list-collections.md +2 -2
- package/docs/examples/databases/list-documents.md +2 -2
- package/docs/examples/databases/list-indexes.md +2 -2
- package/docs/examples/databases/list.md +1 -1
- package/docs/examples/databases/update-collection.md +2 -2
- package/docs/examples/databases/update-document.md +2 -2
- package/docs/examples/databases/update.md +2 -2
- package/docs/examples/functions/create-deployment.md +1 -1
- package/docs/examples/functions/create-variable.md +20 -0
- package/docs/examples/functions/create.md +1 -1
- package/docs/examples/functions/delete-variable.md +20 -0
- package/docs/examples/functions/get-variable.md +20 -0
- package/docs/examples/functions/list-variables.md +20 -0
- package/docs/examples/functions/update-variable.md +20 -0
- package/docs/examples/functions/update.md +1 -1
- package/docs/examples/storage/create-bucket.md +1 -1
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/storage/update-bucket.md +1 -1
- package/docs/examples/users/create-argon2user.md +20 -0
- package/docs/examples/users/create-bcrypt-user.md +20 -0
- package/docs/examples/users/create-m-d5user.md +20 -0
- package/docs/examples/users/create-p-h-pass-user.md +20 -0
- package/docs/examples/users/create-s-h-a-user.md +20 -0
- package/docs/examples/users/create-scrypt-modified-user.md +20 -0
- package/docs/examples/users/create-scrypt-user.md +20 -0
- package/docs/examples/users/create.md +1 -1
- package/index.d.ts +703 -235
- package/index.js +6 -0
- package/lib/client.js +5 -2
- package/lib/id.js +12 -0
- package/lib/permission.js +24 -0
- package/lib/query.js +30 -12
- package/lib/role.js +25 -0
- package/lib/services/account.js +53 -52
- package/lib/services/avatars.js +22 -20
- package/lib/services/databases.js +385 -243
- package/lib/services/functions.js +220 -110
- package/lib/services/health.js +7 -1
- package/lib/services/locale.js +7 -1
- package/lib/services/storage.js +78 -129
- package/lib/services/teams.js +39 -73
- package/lib/services/users.js +482 -63
- 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
|
|
286
|
-
*/
|
|
287
|
-
$createdAt: number;
|
|
288
|
-
/**
|
|
289
|
-
* Collection update date in Unix timestamp.
|
|
306
|
+
* Collection creation date in ISO 8601 format.
|
|
290
307
|
*/
|
|
291
|
-
$
|
|
308
|
+
$createdAt: string;
|
|
292
309
|
/**
|
|
293
|
-
* Collection
|
|
310
|
+
* Collection update date in ISO 8601 format.
|
|
294
311
|
*/
|
|
295
|
-
$
|
|
312
|
+
$updatedAt: string;
|
|
296
313
|
/**
|
|
297
|
-
* Collection
|
|
314
|
+
* Collection permissions. [Learn more about permissions](/docs/permissions).
|
|
298
315
|
*/
|
|
299
|
-
$
|
|
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
|
-
*
|
|
330
|
+
* Whether document-level permissions are enabled. [Learn more about permissions](/docs/permissions).
|
|
314
331
|
*/
|
|
315
|
-
|
|
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
|
|
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
|
|
698
|
+
* Document creation date in ISO 8601 format.
|
|
649
699
|
*/
|
|
650
|
-
$createdAt:
|
|
700
|
+
$createdAt: string;
|
|
651
701
|
/**
|
|
652
|
-
* Document update date in
|
|
702
|
+
* Document update date in ISO 8601 format.
|
|
653
703
|
*/
|
|
654
|
-
$updatedAt:
|
|
704
|
+
$updatedAt: string;
|
|
655
705
|
/**
|
|
656
|
-
* Document
|
|
706
|
+
* Document permissions. [Learn more about permissions](/docs/permissions).
|
|
657
707
|
*/
|
|
658
|
-
$
|
|
659
|
-
/**
|
|
660
|
-
* Document write permissions.
|
|
661
|
-
*/
|
|
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
|
|
739
|
+
* Log creation date in ISO 8601 format.
|
|
694
740
|
*/
|
|
695
|
-
time:
|
|
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
|
|
808
|
+
* User creation date in ISO 8601 format.
|
|
809
|
+
*/
|
|
810
|
+
$createdAt: string;
|
|
811
|
+
/**
|
|
812
|
+
* User update date in ISO 8601 format.
|
|
813
|
+
*/
|
|
814
|
+
$updatedAt: string;
|
|
815
|
+
/**
|
|
816
|
+
* User name.
|
|
817
|
+
*/
|
|
818
|
+
name: string;
|
|
819
|
+
/**
|
|
820
|
+
* Hashed user password.
|
|
821
|
+
*/
|
|
822
|
+
password: string;
|
|
823
|
+
/**
|
|
824
|
+
* Password hashing algorithm.
|
|
825
|
+
*/
|
|
826
|
+
hash: string;
|
|
827
|
+
/**
|
|
828
|
+
* Password hashing algorithm configuration.
|
|
829
|
+
*/
|
|
830
|
+
hashOptions: object;
|
|
831
|
+
/**
|
|
832
|
+
* User registration date in ISO 8601 format.
|
|
833
|
+
*/
|
|
834
|
+
registration: string;
|
|
835
|
+
/**
|
|
836
|
+
* User status. Pass `true` for enabled and `false` for disabled.
|
|
837
|
+
*/
|
|
838
|
+
status: boolean;
|
|
839
|
+
/**
|
|
840
|
+
* Password update time in ISO 8601 format.
|
|
841
|
+
*/
|
|
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.
|
|
763
949
|
*/
|
|
764
|
-
$createdAt:
|
|
950
|
+
$createdAt: string;
|
|
765
951
|
/**
|
|
766
|
-
* User update date in
|
|
952
|
+
* User update date in ISO 8601 format.
|
|
767
953
|
*/
|
|
768
|
-
$updatedAt:
|
|
954
|
+
$updatedAt: string;
|
|
769
955
|
/**
|
|
770
956
|
* User name.
|
|
771
957
|
*/
|
|
772
958
|
name: string;
|
|
773
959
|
/**
|
|
774
|
-
* User registration date in
|
|
960
|
+
* User registration date in ISO 8601 format.
|
|
775
961
|
*/
|
|
776
|
-
registration:
|
|
962
|
+
registration: string;
|
|
777
963
|
/**
|
|
778
964
|
* User status. Pass `true` for enabled and `false` for disabled.
|
|
779
965
|
*/
|
|
780
966
|
status: boolean;
|
|
781
967
|
/**
|
|
782
|
-
*
|
|
968
|
+
* Password update time in ISO 8601 format.
|
|
783
969
|
*/
|
|
784
|
-
passwordUpdate:
|
|
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
|
|
1006
|
+
* Session creation date in ISO 8601 format.
|
|
821
1007
|
*/
|
|
822
|
-
$createdAt:
|
|
1008
|
+
$createdAt: string;
|
|
823
1009
|
/**
|
|
824
1010
|
* User ID.
|
|
825
1011
|
*/
|
|
826
1012
|
userId: string;
|
|
827
1013
|
/**
|
|
828
|
-
* Session expiration date in
|
|
1014
|
+
* Session expiration date in ISO 8601 format.
|
|
829
1015
|
*/
|
|
830
|
-
expire:
|
|
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
|
-
*
|
|
1030
|
+
* The date of when the access token expires in ISO 8601 format.
|
|
845
1031
|
*/
|
|
846
|
-
providerAccessTokenExpiry:
|
|
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
|
|
1111
|
+
* Token creation date in ISO 8601 format.
|
|
926
1112
|
*/
|
|
927
|
-
$createdAt:
|
|
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
|
|
1123
|
+
* Token expiration date in ISO 8601 format.
|
|
938
1124
|
*/
|
|
939
|
-
expire:
|
|
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
|
|
988
|
-
*/
|
|
989
|
-
$createdAt: number;
|
|
990
|
-
/**
|
|
991
|
-
* File update date in Unix timestamp.
|
|
1173
|
+
* File creation date in ISO 8601 format.
|
|
992
1174
|
*/
|
|
993
|
-
$
|
|
1175
|
+
$createdAt: string;
|
|
994
1176
|
/**
|
|
995
|
-
* File
|
|
1177
|
+
* File update date in ISO 8601 format.
|
|
996
1178
|
*/
|
|
997
|
-
$
|
|
1179
|
+
$updatedAt: string;
|
|
998
1180
|
/**
|
|
999
|
-
* File
|
|
1181
|
+
* File permissions. [Learn more about permissions](/docs/permissions).
|
|
1000
1182
|
*/
|
|
1001
|
-
$
|
|
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
|
|
1037
|
-
*/
|
|
1038
|
-
$createdAt: number;
|
|
1039
|
-
/**
|
|
1040
|
-
* Bucket update date in Unix timestamp.
|
|
1218
|
+
* Bucket creation time in ISO 8601 format.
|
|
1041
1219
|
*/
|
|
1042
|
-
$
|
|
1220
|
+
$createdAt: string;
|
|
1043
1221
|
/**
|
|
1044
|
-
*
|
|
1222
|
+
* Bucket update date in ISO 8601 format.
|
|
1045
1223
|
*/
|
|
1046
|
-
$
|
|
1224
|
+
$updatedAt: string;
|
|
1047
1225
|
/**
|
|
1048
|
-
*
|
|
1226
|
+
* Bucket permissions. [Learn more about permissions](/docs/permissions).
|
|
1049
1227
|
*/
|
|
1050
|
-
$
|
|
1228
|
+
$permissions: string[];
|
|
1051
1229
|
/**
|
|
1052
|
-
*
|
|
1230
|
+
* Whether file-level security is enabled. [Learn more about permissions](/docs/permissions).
|
|
1053
1231
|
*/
|
|
1054
|
-
|
|
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
|
|
1271
|
+
* Team creation date in ISO 8601 format.
|
|
1090
1272
|
*/
|
|
1091
|
-
$createdAt:
|
|
1273
|
+
$createdAt: string;
|
|
1092
1274
|
/**
|
|
1093
|
-
* Team update date in
|
|
1275
|
+
* Team update date in ISO 8601 format.
|
|
1094
1276
|
*/
|
|
1095
|
-
$updatedAt:
|
|
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
|
|
1296
|
+
* Membership creation date in ISO 8601 format.
|
|
1115
1297
|
*/
|
|
1116
|
-
$createdAt:
|
|
1298
|
+
$createdAt: string;
|
|
1117
1299
|
/**
|
|
1118
|
-
* Membership update date in
|
|
1300
|
+
* Membership update date in ISO 8601 format.
|
|
1119
1301
|
*/
|
|
1120
|
-
$updatedAt:
|
|
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
|
|
1324
|
+
* Date, the user has been invited to join the team in ISO 8601 format.
|
|
1143
1325
|
*/
|
|
1144
|
-
invited:
|
|
1326
|
+
invited: string;
|
|
1145
1327
|
/**
|
|
1146
|
-
* Date, the user has accepted the invitation to join the team in
|
|
1328
|
+
* Date, the user has accepted the invitation to join the team in ISO 8601 format.
|
|
1147
1329
|
*/
|
|
1148
|
-
joined:
|
|
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
|
|
1349
|
+
* Function creation date in ISO 8601 format.
|
|
1168
1350
|
*/
|
|
1169
|
-
$createdAt:
|
|
1351
|
+
$createdAt: string;
|
|
1170
1352
|
/**
|
|
1171
|
-
* Function update date in
|
|
1353
|
+
* Function update date in ISO 8601 format.
|
|
1172
1354
|
*/
|
|
1173
|
-
$updatedAt:
|
|
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
|
|
1377
|
+
* Function variables.
|
|
1196
1378
|
*/
|
|
1197
|
-
vars:
|
|
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
|
|
1389
|
+
* Function's next scheduled execution time in ISO 8601 format.
|
|
1208
1390
|
*/
|
|
1209
|
-
scheduleNext:
|
|
1391
|
+
scheduleNext: string;
|
|
1210
1392
|
/**
|
|
1211
|
-
* Function
|
|
1393
|
+
* Function's previous scheduled execution time in ISO 8601 format.
|
|
1212
1394
|
*/
|
|
1213
|
-
schedulePrevious:
|
|
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
|
|
1443
|
+
* Deployment creation date in ISO 8601 format.
|
|
1262
1444
|
*/
|
|
1263
|
-
$createdAt:
|
|
1445
|
+
$createdAt: string;
|
|
1264
1446
|
/**
|
|
1265
|
-
* Deployment update date in
|
|
1447
|
+
* Deployment update date in ISO 8601 format.
|
|
1266
1448
|
*/
|
|
1267
|
-
$updatedAt:
|
|
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 "processing", "building", "pending", "ready", and "failed".
|
|
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
|
|
1496
|
+
* Execution creation date in ISO 8601 format.
|
|
1315
1497
|
*/
|
|
1316
|
-
$createdAt:
|
|
1498
|
+
$createdAt: string;
|
|
1317
1499
|
/**
|
|
1318
|
-
* Execution
|
|
1500
|
+
* Execution upate date in ISO 8601 format.
|
|
1319
1501
|
*/
|
|
1320
|
-
$updatedAt:
|
|
1502
|
+
$updatedAt: string;
|
|
1321
1503
|
/**
|
|
1322
|
-
* Execution
|
|
1504
|
+
* Execution roles.
|
|
1323
1505
|
*/
|
|
1324
|
-
$
|
|
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
|
|
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 = {
|
|
@@ -1570,6 +1785,18 @@ declare module "node-appwrite" {
|
|
|
1570
1785
|
constructor(client: Client);
|
|
1571
1786
|
}
|
|
1572
1787
|
|
|
1788
|
+
export class InputFile {
|
|
1789
|
+
static fromPath(filePath: string, filename: string): InputFile;
|
|
1790
|
+
|
|
1791
|
+
static fromBuffer(buffer: Buffer, filename: string): InputFile;
|
|
1792
|
+
|
|
1793
|
+
static fromBlob(blob: Blob, filename: string): InputFile;
|
|
1794
|
+
|
|
1795
|
+
static fromStream(stream: any, filename: string, size: number): InputFile;
|
|
1796
|
+
|
|
1797
|
+
static fromPlainText(content: string, filename: string): InputFile;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1573
1800
|
type QueryTypesSingle = string | number | boolean;
|
|
1574
1801
|
type QueryTypesList = string[] | number[] | boolean[];
|
|
1575
1802
|
type QueryTypes = QueryTypesSingle | QueryTypesList;
|
|
@@ -1579,22 +1806,36 @@ declare module "node-appwrite" {
|
|
|
1579
1806
|
|
|
1580
1807
|
static notEqual(attribute: string, value: QueryTypes): string;
|
|
1581
1808
|
|
|
1582
|
-
static
|
|
1809
|
+
static lessThan(attribute: string, value: QueryTypes): string;
|
|
1583
1810
|
|
|
1584
|
-
static
|
|
1811
|
+
static lessThanEqual(attribute: string, value: QueryTypes): string;
|
|
1585
1812
|
|
|
1586
|
-
static
|
|
1813
|
+
static greaterThan(attribute: string, value: QueryTypes): string;
|
|
1587
1814
|
|
|
1588
|
-
static
|
|
1815
|
+
static greaterThanEqual(attribute: string, value: QueryTypes): string;
|
|
1589
1816
|
|
|
1590
1817
|
static search(attribute: string, value: string): string;
|
|
1591
1818
|
|
|
1592
|
-
|
|
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;
|
|
1593
1832
|
|
|
1594
1833
|
private static parseValues(value: QueryTypes): string;
|
|
1595
1834
|
}
|
|
1596
1835
|
|
|
1597
1836
|
export class Account extends Service {
|
|
1837
|
+
constructor(client: Client);
|
|
1838
|
+
|
|
1598
1839
|
/**
|
|
1599
1840
|
* Get Account
|
|
1600
1841
|
*
|
|
@@ -1603,7 +1844,7 @@ declare module "node-appwrite" {
|
|
|
1603
1844
|
* @throws {AppwriteException}
|
|
1604
1845
|
* @returns {Promise}
|
|
1605
1846
|
*/
|
|
1606
|
-
get<Preferences extends Models.Preferences>(): Promise<Models.
|
|
1847
|
+
get<Preferences extends Models.Preferences>(): Promise<Models.Account<Preferences>>;
|
|
1607
1848
|
/**
|
|
1608
1849
|
* Update Account Email
|
|
1609
1850
|
*
|
|
@@ -1621,19 +1862,18 @@ declare module "node-appwrite" {
|
|
|
1621
1862
|
* @throws {AppwriteException}
|
|
1622
1863
|
* @returns {Promise}
|
|
1623
1864
|
*/
|
|
1624
|
-
updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.
|
|
1865
|
+
updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.Account<Preferences>>;
|
|
1625
1866
|
/**
|
|
1626
1867
|
* Get Account Logs
|
|
1627
1868
|
*
|
|
1628
1869
|
* Get currently logged in user list of latest security activity logs. Each
|
|
1629
1870
|
* log returns user IP address, location and date and time of log.
|
|
1630
1871
|
*
|
|
1631
|
-
* @param {
|
|
1632
|
-
* @param {number} offset
|
|
1872
|
+
* @param {string[]} queries
|
|
1633
1873
|
* @throws {AppwriteException}
|
|
1634
1874
|
* @returns {Promise}
|
|
1635
1875
|
*/
|
|
1636
|
-
getLogs(
|
|
1876
|
+
getLogs(queries?: string[]): Promise<Models.LogList>;
|
|
1637
1877
|
/**
|
|
1638
1878
|
* Update Account Name
|
|
1639
1879
|
*
|
|
@@ -1643,7 +1883,7 @@ declare module "node-appwrite" {
|
|
|
1643
1883
|
* @throws {AppwriteException}
|
|
1644
1884
|
* @returns {Promise}
|
|
1645
1885
|
*/
|
|
1646
|
-
updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.
|
|
1886
|
+
updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.Account<Preferences>>;
|
|
1647
1887
|
/**
|
|
1648
1888
|
* Update Account Password
|
|
1649
1889
|
*
|
|
@@ -1656,21 +1896,22 @@ declare module "node-appwrite" {
|
|
|
1656
1896
|
* @throws {AppwriteException}
|
|
1657
1897
|
* @returns {Promise}
|
|
1658
1898
|
*/
|
|
1659
|
-
updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.
|
|
1899
|
+
updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.Account<Preferences>>;
|
|
1660
1900
|
/**
|
|
1661
1901
|
* Update Account Phone
|
|
1662
1902
|
*
|
|
1663
|
-
* Update currently logged in user
|
|
1664
|
-
* number, the
|
|
1665
|
-
* is not sent automatically however you can use the
|
|
1666
|
-
*
|
|
1903
|
+
* Update the currently logged in user's phone number. After updating the
|
|
1904
|
+
* phone number, the phone verification status will be reset. A confirmation
|
|
1905
|
+
* SMS is not sent automatically, however you can use the [POST
|
|
1906
|
+
* /account/verification/phone](/docs/client/account#accountCreatePhoneVerification)
|
|
1907
|
+
* endpoint to send a confirmation SMS.
|
|
1667
1908
|
*
|
|
1668
|
-
* @param {string}
|
|
1909
|
+
* @param {string} phone
|
|
1669
1910
|
* @param {string} password
|
|
1670
1911
|
* @throws {AppwriteException}
|
|
1671
1912
|
* @returns {Promise}
|
|
1672
1913
|
*/
|
|
1673
|
-
updatePhone<Preferences extends Models.Preferences>(
|
|
1914
|
+
updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.Account<Preferences>>;
|
|
1674
1915
|
/**
|
|
1675
1916
|
* Get Account Preferences
|
|
1676
1917
|
*
|
|
@@ -1691,7 +1932,7 @@ declare module "node-appwrite" {
|
|
|
1691
1932
|
* @throws {AppwriteException}
|
|
1692
1933
|
* @returns {Promise}
|
|
1693
1934
|
*/
|
|
1694
|
-
updatePrefs<Preferences extends Models.Preferences>(prefs: object): Promise<Models.
|
|
1935
|
+
updatePrefs<Preferences extends Models.Preferences>(prefs: object): Promise<Models.Account<Preferences>>;
|
|
1695
1936
|
/**
|
|
1696
1937
|
* Create Password Recovery
|
|
1697
1938
|
*
|
|
@@ -1797,7 +2038,7 @@ declare module "node-appwrite" {
|
|
|
1797
2038
|
* @throws {AppwriteException}
|
|
1798
2039
|
* @returns {Promise}
|
|
1799
2040
|
*/
|
|
1800
|
-
updateStatus<Preferences extends Models.Preferences>(): Promise<Models.
|
|
2041
|
+
updateStatus<Preferences extends Models.Preferences>(): Promise<Models.Account<Preferences>>;
|
|
1801
2042
|
/**
|
|
1802
2043
|
* Create Email Verification
|
|
1803
2044
|
*
|
|
@@ -1839,13 +2080,12 @@ declare module "node-appwrite" {
|
|
|
1839
2080
|
/**
|
|
1840
2081
|
* Create Phone Verification
|
|
1841
2082
|
*
|
|
1842
|
-
* Use this endpoint to send a verification
|
|
1843
|
-
*
|
|
1844
|
-
*
|
|
1845
|
-
*
|
|
1846
|
-
* [complete the verification
|
|
2083
|
+
* Use this endpoint to send a verification SMS to the currently logged in
|
|
2084
|
+
* user. This endpoint is meant for use after updating a user's phone number
|
|
2085
|
+
* using the [accountUpdatePhone](/docs/client/account#accountUpdatePhone)
|
|
2086
|
+
* endpoint. Learn more about how to [complete the verification
|
|
1847
2087
|
* process](/docs/client/account#accountUpdatePhoneVerification). The
|
|
1848
|
-
* verification
|
|
2088
|
+
* verification code sent to the user's phone number is valid for 15 minutes.
|
|
1849
2089
|
*
|
|
1850
2090
|
* @throws {AppwriteException}
|
|
1851
2091
|
* @returns {Promise}
|
|
@@ -1867,6 +2107,8 @@ declare module "node-appwrite" {
|
|
|
1867
2107
|
updatePhoneVerification(userId: string, secret: string): Promise<Models.Token>;
|
|
1868
2108
|
}
|
|
1869
2109
|
export class Avatars extends Service {
|
|
2110
|
+
constructor(client: Client);
|
|
2111
|
+
|
|
1870
2112
|
/**
|
|
1871
2113
|
* Get Browser Icon
|
|
1872
2114
|
*
|
|
@@ -1926,7 +2168,8 @@ declare module "node-appwrite" {
|
|
|
1926
2168
|
*
|
|
1927
2169
|
* You can use this endpoint to show different country flags icons to your
|
|
1928
2170
|
* users. The code argument receives the 2 letter country code. Use width,
|
|
1929
|
-
* 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.
|
|
1930
2173
|
*
|
|
1931
2174
|
* When one dimension is specified and the other is 0, the image is scaled
|
|
1932
2175
|
* with preserved aspect ratio. If both dimensions are 0, the API provides an
|
|
@@ -1986,12 +2229,11 @@ declare module "node-appwrite" {
|
|
|
1986
2229
|
* @param {string} name
|
|
1987
2230
|
* @param {number} width
|
|
1988
2231
|
* @param {number} height
|
|
1989
|
-
* @param {string} color
|
|
1990
2232
|
* @param {string} background
|
|
1991
2233
|
* @throws {AppwriteException}
|
|
1992
2234
|
* @returns {Promise}
|
|
1993
2235
|
*/
|
|
1994
|
-
getInitials(name?: string, width?: number, height?: number,
|
|
2236
|
+
getInitials(name?: string, width?: number, height?: number, background?: string): Promise<Buffer>;
|
|
1995
2237
|
/**
|
|
1996
2238
|
* Get QR Code
|
|
1997
2239
|
*
|
|
@@ -2009,22 +2251,26 @@ declare module "node-appwrite" {
|
|
|
2009
2251
|
getQR(text: string, size?: number, margin?: number, download?: boolean): Promise<Buffer>;
|
|
2010
2252
|
}
|
|
2011
2253
|
export class Databases extends Service {
|
|
2254
|
+
constructor(client: Client);
|
|
2255
|
+
|
|
2012
2256
|
/**
|
|
2013
2257
|
* List Databases
|
|
2014
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
|
|
2015
2263
|
* @param {string} search
|
|
2016
|
-
* @param {number} limit
|
|
2017
|
-
* @param {number} offset
|
|
2018
|
-
* @param {string} cursor
|
|
2019
|
-
* @param {string} cursorDirection
|
|
2020
|
-
* @param {string} orderType
|
|
2021
2264
|
* @throws {AppwriteException}
|
|
2022
2265
|
* @returns {Promise}
|
|
2023
2266
|
*/
|
|
2024
|
-
list(
|
|
2267
|
+
list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
|
|
2025
2268
|
/**
|
|
2026
2269
|
* Create Database
|
|
2027
2270
|
*
|
|
2271
|
+
* Create a new Database.
|
|
2272
|
+
*
|
|
2273
|
+
*
|
|
2028
2274
|
* @param {string} databaseId
|
|
2029
2275
|
* @param {string} name
|
|
2030
2276
|
* @throws {AppwriteException}
|
|
@@ -2034,23 +2280,31 @@ declare module "node-appwrite" {
|
|
|
2034
2280
|
/**
|
|
2035
2281
|
* Get Database
|
|
2036
2282
|
*
|
|
2283
|
+
* Get a database by its unique ID. This endpoint response returns a JSON
|
|
2284
|
+
* object with the database metadata.
|
|
2285
|
+
*
|
|
2037
2286
|
* @param {string} databaseId
|
|
2038
2287
|
* @throws {AppwriteException}
|
|
2039
2288
|
* @returns {Promise}
|
|
2040
2289
|
*/
|
|
2041
|
-
get(databaseId: string): Promise<Models.
|
|
2290
|
+
get(databaseId: string): Promise<Models.Database>;
|
|
2042
2291
|
/**
|
|
2043
2292
|
* Update Database
|
|
2044
2293
|
*
|
|
2294
|
+
* Update a database by its unique ID.
|
|
2295
|
+
*
|
|
2045
2296
|
* @param {string} databaseId
|
|
2046
2297
|
* @param {string} name
|
|
2047
2298
|
* @throws {AppwriteException}
|
|
2048
2299
|
* @returns {Promise}
|
|
2049
2300
|
*/
|
|
2050
|
-
update(databaseId: string, name: string): Promise<Models.
|
|
2301
|
+
update(databaseId: string, name: string): Promise<Models.Database>;
|
|
2051
2302
|
/**
|
|
2052
2303
|
* Delete Database
|
|
2053
2304
|
*
|
|
2305
|
+
* Delete a database by its unique ID. Only API keys with with databases.write
|
|
2306
|
+
* scope can delete a database.
|
|
2307
|
+
*
|
|
2054
2308
|
* @param {string} databaseId
|
|
2055
2309
|
* @throws {AppwriteException}
|
|
2056
2310
|
* @returns {Promise}
|
|
@@ -2059,33 +2313,39 @@ declare module "node-appwrite" {
|
|
|
2059
2313
|
/**
|
|
2060
2314
|
* List Collections
|
|
2061
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
|
+
*
|
|
2062
2319
|
* @param {string} databaseId
|
|
2320
|
+
* @param {string[]} queries
|
|
2063
2321
|
* @param {string} search
|
|
2064
|
-
* @param {number} limit
|
|
2065
|
-
* @param {number} offset
|
|
2066
|
-
* @param {string} cursor
|
|
2067
|
-
* @param {string} cursorDirection
|
|
2068
|
-
* @param {string} orderType
|
|
2069
2322
|
* @throws {AppwriteException}
|
|
2070
2323
|
* @returns {Promise}
|
|
2071
2324
|
*/
|
|
2072
|
-
listCollections(databaseId: string,
|
|
2325
|
+
listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
|
|
2073
2326
|
/**
|
|
2074
2327
|
* Create Collection
|
|
2075
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
|
+
*
|
|
2076
2334
|
* @param {string} databaseId
|
|
2077
2335
|
* @param {string} collectionId
|
|
2078
2336
|
* @param {string} name
|
|
2079
|
-
* @param {string}
|
|
2080
|
-
* @param {
|
|
2081
|
-
* @param {string[]} write
|
|
2337
|
+
* @param {string[]} permissions
|
|
2338
|
+
* @param {boolean} documentSecurity
|
|
2082
2339
|
* @throws {AppwriteException}
|
|
2083
2340
|
* @returns {Promise}
|
|
2084
2341
|
*/
|
|
2085
|
-
createCollection(databaseId: string, collectionId: string, name: string,
|
|
2342
|
+
createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean): Promise<Models.Collection>;
|
|
2086
2343
|
/**
|
|
2087
2344
|
* Get Collection
|
|
2088
2345
|
*
|
|
2346
|
+
* Get a collection by its unique ID. This endpoint response returns a JSON
|
|
2347
|
+
* object with the collection metadata.
|
|
2348
|
+
*
|
|
2089
2349
|
* @param {string} databaseId
|
|
2090
2350
|
* @param {string} collectionId
|
|
2091
2351
|
* @throws {AppwriteException}
|
|
@@ -2095,20 +2355,24 @@ declare module "node-appwrite" {
|
|
|
2095
2355
|
/**
|
|
2096
2356
|
* Update Collection
|
|
2097
2357
|
*
|
|
2358
|
+
* Update a collection by its unique ID.
|
|
2359
|
+
*
|
|
2098
2360
|
* @param {string} databaseId
|
|
2099
2361
|
* @param {string} collectionId
|
|
2100
2362
|
* @param {string} name
|
|
2101
|
-
* @param {string}
|
|
2102
|
-
* @param {
|
|
2103
|
-
* @param {string[]} write
|
|
2363
|
+
* @param {string[]} permissions
|
|
2364
|
+
* @param {boolean} documentSecurity
|
|
2104
2365
|
* @param {boolean} enabled
|
|
2105
2366
|
* @throws {AppwriteException}
|
|
2106
2367
|
* @returns {Promise}
|
|
2107
2368
|
*/
|
|
2108
|
-
updateCollection(databaseId: string, collectionId: string, name: string,
|
|
2369
|
+
updateCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
|
|
2109
2370
|
/**
|
|
2110
2371
|
* Delete Collection
|
|
2111
2372
|
*
|
|
2373
|
+
* Delete a collection by its unique ID. Only users with write permissions
|
|
2374
|
+
* have access to delete this resource.
|
|
2375
|
+
*
|
|
2112
2376
|
* @param {string} databaseId
|
|
2113
2377
|
* @param {string} collectionId
|
|
2114
2378
|
* @throws {AppwriteException}
|
|
@@ -2127,6 +2391,9 @@ declare module "node-appwrite" {
|
|
|
2127
2391
|
/**
|
|
2128
2392
|
* Create Boolean Attribute
|
|
2129
2393
|
*
|
|
2394
|
+
* Create a boolean attribute.
|
|
2395
|
+
*
|
|
2396
|
+
*
|
|
2130
2397
|
* @param {string} databaseId
|
|
2131
2398
|
* @param {string} collectionId
|
|
2132
2399
|
* @param {string} key
|
|
@@ -2137,9 +2404,25 @@ declare module "node-appwrite" {
|
|
|
2137
2404
|
* @returns {Promise}
|
|
2138
2405
|
*/
|
|
2139
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>;
|
|
2140
2420
|
/**
|
|
2141
2421
|
* Create Email Attribute
|
|
2142
2422
|
*
|
|
2423
|
+
* Create an email attribute.
|
|
2424
|
+
*
|
|
2425
|
+
*
|
|
2143
2426
|
* @param {string} databaseId
|
|
2144
2427
|
* @param {string} collectionId
|
|
2145
2428
|
* @param {string} key
|
|
@@ -2167,6 +2450,10 @@ declare module "node-appwrite" {
|
|
|
2167
2450
|
/**
|
|
2168
2451
|
* Create Float Attribute
|
|
2169
2452
|
*
|
|
2453
|
+
* Create a float attribute. Optionally, minimum and maximum values can be
|
|
2454
|
+
* provided.
|
|
2455
|
+
*
|
|
2456
|
+
*
|
|
2170
2457
|
* @param {string} databaseId
|
|
2171
2458
|
* @param {string} collectionId
|
|
2172
2459
|
* @param {string} key
|
|
@@ -2182,6 +2469,10 @@ declare module "node-appwrite" {
|
|
|
2182
2469
|
/**
|
|
2183
2470
|
* Create Integer Attribute
|
|
2184
2471
|
*
|
|
2472
|
+
* Create an integer attribute. Optionally, minimum and maximum values can be
|
|
2473
|
+
* provided.
|
|
2474
|
+
*
|
|
2475
|
+
*
|
|
2185
2476
|
* @param {string} databaseId
|
|
2186
2477
|
* @param {string} collectionId
|
|
2187
2478
|
* @param {string} key
|
|
@@ -2197,6 +2488,9 @@ declare module "node-appwrite" {
|
|
|
2197
2488
|
/**
|
|
2198
2489
|
* Create IP Address Attribute
|
|
2199
2490
|
*
|
|
2491
|
+
* Create IP address attribute.
|
|
2492
|
+
*
|
|
2493
|
+
*
|
|
2200
2494
|
* @param {string} databaseId
|
|
2201
2495
|
* @param {string} collectionId
|
|
2202
2496
|
* @param {string} key
|
|
@@ -2210,6 +2504,9 @@ declare module "node-appwrite" {
|
|
|
2210
2504
|
/**
|
|
2211
2505
|
* Create String Attribute
|
|
2212
2506
|
*
|
|
2507
|
+
* Create a string attribute.
|
|
2508
|
+
*
|
|
2509
|
+
*
|
|
2213
2510
|
* @param {string} databaseId
|
|
2214
2511
|
* @param {string} collectionId
|
|
2215
2512
|
* @param {string} key
|
|
@@ -2224,6 +2521,9 @@ declare module "node-appwrite" {
|
|
|
2224
2521
|
/**
|
|
2225
2522
|
* Create URL Attribute
|
|
2226
2523
|
*
|
|
2524
|
+
* Create a URL attribute.
|
|
2525
|
+
*
|
|
2526
|
+
*
|
|
2227
2527
|
* @param {string} databaseId
|
|
2228
2528
|
* @param {string} collectionId
|
|
2229
2529
|
* @param {string} key
|
|
@@ -2257,35 +2557,41 @@ declare module "node-appwrite" {
|
|
|
2257
2557
|
/**
|
|
2258
2558
|
* List Documents
|
|
2259
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
|
+
*
|
|
2260
2565
|
* @param {string} databaseId
|
|
2261
2566
|
* @param {string} collectionId
|
|
2262
2567
|
* @param {string[]} queries
|
|
2263
|
-
* @param {number} limit
|
|
2264
|
-
* @param {number} offset
|
|
2265
|
-
* @param {string} cursor
|
|
2266
|
-
* @param {string} cursorDirection
|
|
2267
|
-
* @param {string[]} orderAttributes
|
|
2268
|
-
* @param {string[]} orderTypes
|
|
2269
2568
|
* @throws {AppwriteException}
|
|
2270
2569
|
* @returns {Promise}
|
|
2271
2570
|
*/
|
|
2272
|
-
listDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]
|
|
2571
|
+
listDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
|
|
2273
2572
|
/**
|
|
2274
2573
|
* Create Document
|
|
2275
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
|
+
*
|
|
2276
2580
|
* @param {string} databaseId
|
|
2277
2581
|
* @param {string} collectionId
|
|
2278
2582
|
* @param {string} documentId
|
|
2279
2583
|
* @param {object} data
|
|
2280
|
-
* @param {string[]}
|
|
2281
|
-
* @param {string[]} write
|
|
2584
|
+
* @param {string[]} permissions
|
|
2282
2585
|
* @throws {AppwriteException}
|
|
2283
2586
|
* @returns {Promise}
|
|
2284
2587
|
*/
|
|
2285
|
-
createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: object,
|
|
2588
|
+
createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: object, permissions?: string[]): Promise<Document>;
|
|
2286
2589
|
/**
|
|
2287
2590
|
* Get Document
|
|
2288
2591
|
*
|
|
2592
|
+
* Get a document by its unique ID. This endpoint response returns a JSON
|
|
2593
|
+
* object with the document data.
|
|
2594
|
+
*
|
|
2289
2595
|
* @param {string} databaseId
|
|
2290
2596
|
* @param {string} collectionId
|
|
2291
2597
|
* @param {string} documentId
|
|
@@ -2296,19 +2602,23 @@ declare module "node-appwrite" {
|
|
|
2296
2602
|
/**
|
|
2297
2603
|
* Update Document
|
|
2298
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
|
+
*
|
|
2299
2608
|
* @param {string} databaseId
|
|
2300
2609
|
* @param {string} collectionId
|
|
2301
2610
|
* @param {string} documentId
|
|
2302
2611
|
* @param {object} data
|
|
2303
|
-
* @param {string[]}
|
|
2304
|
-
* @param {string[]} write
|
|
2612
|
+
* @param {string[]} permissions
|
|
2305
2613
|
* @throws {AppwriteException}
|
|
2306
2614
|
* @returns {Promise}
|
|
2307
2615
|
*/
|
|
2308
|
-
updateDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data?: object,
|
|
2616
|
+
updateDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data?: object, permissions?: string[]): Promise<Document>;
|
|
2309
2617
|
/**
|
|
2310
2618
|
* Delete Document
|
|
2311
2619
|
*
|
|
2620
|
+
* Delete a document by its unique ID.
|
|
2621
|
+
*
|
|
2312
2622
|
* @param {string} databaseId
|
|
2313
2623
|
* @param {string} collectionId
|
|
2314
2624
|
* @param {string} documentId
|
|
@@ -2360,22 +2670,20 @@ declare module "node-appwrite" {
|
|
|
2360
2670
|
deleteIndex(databaseId: string, collectionId: string, key: string): Promise<Response>;
|
|
2361
2671
|
}
|
|
2362
2672
|
export class Functions extends Service {
|
|
2673
|
+
constructor(client: Client);
|
|
2674
|
+
|
|
2363
2675
|
/**
|
|
2364
2676
|
* List Functions
|
|
2365
2677
|
*
|
|
2366
2678
|
* Get a list of all the project's functions. You can use the query params to
|
|
2367
2679
|
* filter your results.
|
|
2368
2680
|
*
|
|
2681
|
+
* @param {string[]} queries
|
|
2369
2682
|
* @param {string} search
|
|
2370
|
-
* @param {number} limit
|
|
2371
|
-
* @param {number} offset
|
|
2372
|
-
* @param {string} cursor
|
|
2373
|
-
* @param {string} cursorDirection
|
|
2374
|
-
* @param {string} orderType
|
|
2375
2683
|
* @throws {AppwriteException}
|
|
2376
2684
|
* @returns {Promise}
|
|
2377
2685
|
*/
|
|
2378
|
-
list(
|
|
2686
|
+
list(queries?: string[], search?: string): Promise<Models.FunctionList>;
|
|
2379
2687
|
/**
|
|
2380
2688
|
* Create Function
|
|
2381
2689
|
*
|
|
@@ -2387,14 +2695,13 @@ declare module "node-appwrite" {
|
|
|
2387
2695
|
* @param {string} name
|
|
2388
2696
|
* @param {string[]} execute
|
|
2389
2697
|
* @param {string} runtime
|
|
2390
|
-
* @param {object} vars
|
|
2391
2698
|
* @param {string[]} events
|
|
2392
2699
|
* @param {string} schedule
|
|
2393
2700
|
* @param {number} timeout
|
|
2394
2701
|
* @throws {AppwriteException}
|
|
2395
2702
|
* @returns {Promise}
|
|
2396
2703
|
*/
|
|
2397
|
-
create(functionId: string, name: string, execute: string[], runtime: string,
|
|
2704
|
+
create(functionId: string, name: string, execute: string[], runtime: string, events?: string[], schedule?: string, timeout?: number): Promise<Models.Function>;
|
|
2398
2705
|
/**
|
|
2399
2706
|
* List runtimes
|
|
2400
2707
|
*
|
|
@@ -2422,14 +2729,13 @@ declare module "node-appwrite" {
|
|
|
2422
2729
|
* @param {string} functionId
|
|
2423
2730
|
* @param {string} name
|
|
2424
2731
|
* @param {string[]} execute
|
|
2425
|
-
* @param {object} vars
|
|
2426
2732
|
* @param {string[]} events
|
|
2427
2733
|
* @param {string} schedule
|
|
2428
2734
|
* @param {number} timeout
|
|
2429
2735
|
* @throws {AppwriteException}
|
|
2430
2736
|
* @returns {Promise}
|
|
2431
2737
|
*/
|
|
2432
|
-
update(functionId: string, name: string, execute: string[],
|
|
2738
|
+
update(functionId: string, name: string, execute: string[], events?: string[], schedule?: string, timeout?: number): Promise<Models.Function>;
|
|
2433
2739
|
/**
|
|
2434
2740
|
* Delete Function
|
|
2435
2741
|
*
|
|
@@ -2447,16 +2753,12 @@ declare module "node-appwrite" {
|
|
|
2447
2753
|
* params to filter your results.
|
|
2448
2754
|
*
|
|
2449
2755
|
* @param {string} functionId
|
|
2756
|
+
* @param {string[]} queries
|
|
2450
2757
|
* @param {string} search
|
|
2451
|
-
* @param {number} limit
|
|
2452
|
-
* @param {number} offset
|
|
2453
|
-
* @param {string} cursor
|
|
2454
|
-
* @param {string} cursorDirection
|
|
2455
|
-
* @param {string} orderType
|
|
2456
2758
|
* @throws {AppwriteException}
|
|
2457
2759
|
* @returns {Promise}
|
|
2458
2760
|
*/
|
|
2459
|
-
listDeployments(functionId: string,
|
|
2761
|
+
listDeployments(functionId: string, queries?: string[], search?: string): Promise<Models.DeploymentList>;
|
|
2460
2762
|
/**
|
|
2461
2763
|
* Create Deployment
|
|
2462
2764
|
*
|
|
@@ -2489,7 +2791,7 @@ declare module "node-appwrite" {
|
|
|
2489
2791
|
* @throws {AppwriteException}
|
|
2490
2792
|
* @returns {Promise}
|
|
2491
2793
|
*/
|
|
2492
|
-
getDeployment(functionId: string, deploymentId: string): Promise<Models.
|
|
2794
|
+
getDeployment(functionId: string, deploymentId: string): Promise<Models.Deployment>;
|
|
2493
2795
|
/**
|
|
2494
2796
|
* Update Function Deployment
|
|
2495
2797
|
*
|
|
@@ -2533,15 +2835,12 @@ declare module "node-appwrite" {
|
|
|
2533
2835
|
* different API modes](/docs/admin).
|
|
2534
2836
|
*
|
|
2535
2837
|
* @param {string} functionId
|
|
2536
|
-
* @param {
|
|
2537
|
-
* @param {number} offset
|
|
2838
|
+
* @param {string[]} queries
|
|
2538
2839
|
* @param {string} search
|
|
2539
|
-
* @param {string} cursor
|
|
2540
|
-
* @param {string} cursorDirection
|
|
2541
2840
|
* @throws {AppwriteException}
|
|
2542
2841
|
* @returns {Promise}
|
|
2543
2842
|
*/
|
|
2544
|
-
listExecutions(functionId: string,
|
|
2843
|
+
listExecutions(functionId: string, queries?: string[], search?: string): Promise<Models.ExecutionList>;
|
|
2545
2844
|
/**
|
|
2546
2845
|
* Create Execution
|
|
2547
2846
|
*
|
|
@@ -2568,8 +2867,70 @@ declare module "node-appwrite" {
|
|
|
2568
2867
|
* @returns {Promise}
|
|
2569
2868
|
*/
|
|
2570
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>;
|
|
2571
2930
|
}
|
|
2572
2931
|
export class Health extends Service {
|
|
2932
|
+
constructor(client: Client);
|
|
2933
|
+
|
|
2573
2934
|
/**
|
|
2574
2935
|
* Get HTTP
|
|
2575
2936
|
*
|
|
@@ -2671,6 +3032,8 @@ declare module "node-appwrite" {
|
|
|
2671
3032
|
getTime(): Promise<Models.HealthTime>;
|
|
2672
3033
|
}
|
|
2673
3034
|
export class Locale extends Service {
|
|
3035
|
+
constructor(client: Client);
|
|
3036
|
+
|
|
2674
3037
|
/**
|
|
2675
3038
|
* Get User Locale
|
|
2676
3039
|
*
|
|
@@ -2748,22 +3111,20 @@ declare module "node-appwrite" {
|
|
|
2748
3111
|
getLanguages(): Promise<Models.LanguageList>;
|
|
2749
3112
|
}
|
|
2750
3113
|
export class Storage extends Service {
|
|
3114
|
+
constructor(client: Client);
|
|
3115
|
+
|
|
2751
3116
|
/**
|
|
2752
3117
|
* List buckets
|
|
2753
3118
|
*
|
|
2754
3119
|
* Get a list of all the storage buckets. You can use the query params to
|
|
2755
3120
|
* filter your results.
|
|
2756
3121
|
*
|
|
3122
|
+
* @param {string[]} queries
|
|
2757
3123
|
* @param {string} search
|
|
2758
|
-
* @param {number} limit
|
|
2759
|
-
* @param {number} offset
|
|
2760
|
-
* @param {string} cursor
|
|
2761
|
-
* @param {string} cursorDirection
|
|
2762
|
-
* @param {string} orderType
|
|
2763
3124
|
* @throws {AppwriteException}
|
|
2764
3125
|
* @returns {Promise}
|
|
2765
3126
|
*/
|
|
2766
|
-
listBuckets(
|
|
3127
|
+
listBuckets(queries?: string[], search?: string): Promise<Models.BucketList>;
|
|
2767
3128
|
/**
|
|
2768
3129
|
* Create bucket
|
|
2769
3130
|
*
|
|
@@ -2771,18 +3132,18 @@ declare module "node-appwrite" {
|
|
|
2771
3132
|
*
|
|
2772
3133
|
* @param {string} bucketId
|
|
2773
3134
|
* @param {string} name
|
|
2774
|
-
* @param {string}
|
|
2775
|
-
* @param {
|
|
2776
|
-
* @param {string[]} write
|
|
3135
|
+
* @param {string[]} permissions
|
|
3136
|
+
* @param {boolean} fileSecurity
|
|
2777
3137
|
* @param {boolean} enabled
|
|
2778
3138
|
* @param {number} maximumFileSize
|
|
2779
3139
|
* @param {string[]} allowedFileExtensions
|
|
3140
|
+
* @param {string} compression
|
|
2780
3141
|
* @param {boolean} encryption
|
|
2781
3142
|
* @param {boolean} antivirus
|
|
2782
3143
|
* @throws {AppwriteException}
|
|
2783
3144
|
* @returns {Promise}
|
|
2784
3145
|
*/
|
|
2785
|
-
createBucket(bucketId: string, name: string,
|
|
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>;
|
|
2786
3147
|
/**
|
|
2787
3148
|
* Get Bucket
|
|
2788
3149
|
*
|
|
@@ -2801,18 +3162,18 @@ declare module "node-appwrite" {
|
|
|
2801
3162
|
*
|
|
2802
3163
|
* @param {string} bucketId
|
|
2803
3164
|
* @param {string} name
|
|
2804
|
-
* @param {string}
|
|
2805
|
-
* @param {
|
|
2806
|
-
* @param {string[]} write
|
|
3165
|
+
* @param {string[]} permissions
|
|
3166
|
+
* @param {boolean} fileSecurity
|
|
2807
3167
|
* @param {boolean} enabled
|
|
2808
3168
|
* @param {number} maximumFileSize
|
|
2809
3169
|
* @param {string[]} allowedFileExtensions
|
|
3170
|
+
* @param {string} compression
|
|
2810
3171
|
* @param {boolean} encryption
|
|
2811
3172
|
* @param {boolean} antivirus
|
|
2812
3173
|
* @throws {AppwriteException}
|
|
2813
3174
|
* @returns {Promise}
|
|
2814
3175
|
*/
|
|
2815
|
-
updateBucket(bucketId: string, name: string,
|
|
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>;
|
|
2816
3177
|
/**
|
|
2817
3178
|
* Delete Bucket
|
|
2818
3179
|
*
|
|
@@ -2831,23 +3192,19 @@ declare module "node-appwrite" {
|
|
|
2831
3192
|
* project's files. [Learn more about different API modes](/docs/admin).
|
|
2832
3193
|
*
|
|
2833
3194
|
* @param {string} bucketId
|
|
3195
|
+
* @param {string[]} queries
|
|
2834
3196
|
* @param {string} search
|
|
2835
|
-
* @param {number} limit
|
|
2836
|
-
* @param {number} offset
|
|
2837
|
-
* @param {string} cursor
|
|
2838
|
-
* @param {string} cursorDirection
|
|
2839
|
-
* @param {string} orderType
|
|
2840
3197
|
* @throws {AppwriteException}
|
|
2841
3198
|
* @returns {Promise}
|
|
2842
3199
|
*/
|
|
2843
|
-
listFiles(bucketId: string,
|
|
3200
|
+
listFiles(bucketId: string, queries?: string[], search?: string): Promise<Models.FileList>;
|
|
2844
3201
|
/**
|
|
2845
3202
|
* Create File
|
|
2846
3203
|
*
|
|
2847
3204
|
* Create a new file. Before using this route, you should create a new bucket
|
|
2848
3205
|
* resource using either a [server
|
|
2849
|
-
* integration](/docs/server/
|
|
2850
|
-
*
|
|
3206
|
+
* integration](/docs/server/storage#storageCreateBucket) API or directly from
|
|
3207
|
+
* your Appwrite console.
|
|
2851
3208
|
*
|
|
2852
3209
|
* Larger files should be uploaded using multiple requests with the
|
|
2853
3210
|
* [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range)
|
|
@@ -2866,12 +3223,11 @@ declare module "node-appwrite" {
|
|
|
2866
3223
|
* @param {string} bucketId
|
|
2867
3224
|
* @param {string} fileId
|
|
2868
3225
|
* @param {InputFile} file
|
|
2869
|
-
* @param {string[]}
|
|
2870
|
-
* @param {string[]} write
|
|
3226
|
+
* @param {string[]} permissions
|
|
2871
3227
|
* @throws {AppwriteException}
|
|
2872
3228
|
* @returns {Promise}
|
|
2873
3229
|
*/
|
|
2874
|
-
createFile(bucketId: string, fileId: string, file: InputFile,
|
|
3230
|
+
createFile(bucketId: string, fileId: string, file: InputFile, permissions?: string[]): Promise<Models.File>;
|
|
2875
3231
|
/**
|
|
2876
3232
|
* Get File
|
|
2877
3233
|
*
|
|
@@ -2892,12 +3248,11 @@ declare module "node-appwrite" {
|
|
|
2892
3248
|
*
|
|
2893
3249
|
* @param {string} bucketId
|
|
2894
3250
|
* @param {string} fileId
|
|
2895
|
-
* @param {string[]}
|
|
2896
|
-
* @param {string[]} write
|
|
3251
|
+
* @param {string[]} permissions
|
|
2897
3252
|
* @throws {AppwriteException}
|
|
2898
3253
|
* @returns {Promise}
|
|
2899
3254
|
*/
|
|
2900
|
-
updateFile(bucketId: string, fileId: string,
|
|
3255
|
+
updateFile(bucketId: string, fileId: string, permissions?: string[]): Promise<Models.File>;
|
|
2901
3256
|
/**
|
|
2902
3257
|
* Delete File
|
|
2903
3258
|
*
|
|
@@ -2964,6 +3319,8 @@ declare module "node-appwrite" {
|
|
|
2964
3319
|
getFileView(bucketId: string, fileId: string): Promise<Buffer>;
|
|
2965
3320
|
}
|
|
2966
3321
|
export class Teams extends Service {
|
|
3322
|
+
constructor(client: Client);
|
|
3323
|
+
|
|
2967
3324
|
/**
|
|
2968
3325
|
* List Teams
|
|
2969
3326
|
*
|
|
@@ -2973,16 +3330,12 @@ declare module "node-appwrite" {
|
|
|
2973
3330
|
* In admin mode, this endpoint returns a list of all the teams in the current
|
|
2974
3331
|
* project. [Learn more about different API modes](/docs/admin).
|
|
2975
3332
|
*
|
|
3333
|
+
* @param {string[]} queries
|
|
2976
3334
|
* @param {string} search
|
|
2977
|
-
* @param {number} limit
|
|
2978
|
-
* @param {number} offset
|
|
2979
|
-
* @param {string} cursor
|
|
2980
|
-
* @param {string} cursorDirection
|
|
2981
|
-
* @param {string} orderType
|
|
2982
3335
|
* @throws {AppwriteException}
|
|
2983
3336
|
* @returns {Promise}
|
|
2984
3337
|
*/
|
|
2985
|
-
list(
|
|
3338
|
+
list(queries?: string[], search?: string): Promise<Models.TeamList>;
|
|
2986
3339
|
/**
|
|
2987
3340
|
* Create Team
|
|
2988
3341
|
*
|
|
@@ -3037,16 +3390,12 @@ declare module "node-appwrite" {
|
|
|
3037
3390
|
* members have read access to this endpoint.
|
|
3038
3391
|
*
|
|
3039
3392
|
* @param {string} teamId
|
|
3393
|
+
* @param {string[]} queries
|
|
3040
3394
|
* @param {string} search
|
|
3041
|
-
* @param {number} limit
|
|
3042
|
-
* @param {number} offset
|
|
3043
|
-
* @param {string} cursor
|
|
3044
|
-
* @param {string} cursorDirection
|
|
3045
|
-
* @param {string} orderType
|
|
3046
3395
|
* @throws {AppwriteException}
|
|
3047
3396
|
* @returns {Promise}
|
|
3048
3397
|
*/
|
|
3049
|
-
getMemberships(teamId: string,
|
|
3398
|
+
getMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
|
|
3050
3399
|
/**
|
|
3051
3400
|
* Create Team Membership
|
|
3052
3401
|
*
|
|
@@ -3135,22 +3484,20 @@ declare module "node-appwrite" {
|
|
|
3135
3484
|
updateMembershipStatus(teamId: string, membershipId: string, userId: string, secret: string): Promise<Models.Membership>;
|
|
3136
3485
|
}
|
|
3137
3486
|
export class Users extends Service {
|
|
3487
|
+
constructor(client: Client);
|
|
3488
|
+
|
|
3138
3489
|
/**
|
|
3139
3490
|
* List Users
|
|
3140
3491
|
*
|
|
3141
3492
|
* Get a list of all the project's users. You can use the query params to
|
|
3142
3493
|
* filter your results.
|
|
3143
3494
|
*
|
|
3495
|
+
* @param {string[]} queries
|
|
3144
3496
|
* @param {string} search
|
|
3145
|
-
* @param {number} limit
|
|
3146
|
-
* @param {number} offset
|
|
3147
|
-
* @param {string} cursor
|
|
3148
|
-
* @param {string} cursorDirection
|
|
3149
|
-
* @param {string} orderType
|
|
3150
3497
|
* @throws {AppwriteException}
|
|
3151
3498
|
* @returns {Promise}
|
|
3152
3499
|
*/
|
|
3153
|
-
list<Preferences extends Models.Preferences>(
|
|
3500
|
+
list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.UserList<Preferences>>;
|
|
3154
3501
|
/**
|
|
3155
3502
|
* Create User
|
|
3156
3503
|
*
|
|
@@ -3158,12 +3505,134 @@ declare module "node-appwrite" {
|
|
|
3158
3505
|
*
|
|
3159
3506
|
* @param {string} userId
|
|
3160
3507
|
* @param {string} email
|
|
3508
|
+
* @param {string} phone
|
|
3509
|
+
* @param {string} password
|
|
3510
|
+
* @param {string} name
|
|
3511
|
+
* @throws {AppwriteException}
|
|
3512
|
+
* @returns {Promise}
|
|
3513
|
+
*/
|
|
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
|
|
3161
3589
|
* @param {string} password
|
|
3590
|
+
* @param {string} passwordSalt
|
|
3591
|
+
* @param {number} passwordCpu
|
|
3592
|
+
* @param {number} passwordMemory
|
|
3593
|
+
* @param {number} passwordParallel
|
|
3594
|
+
* @param {number} passwordLength
|
|
3162
3595
|
* @param {string} name
|
|
3163
3596
|
* @throws {AppwriteException}
|
|
3164
3597
|
* @returns {Promise}
|
|
3165
3598
|
*/
|
|
3166
|
-
|
|
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>>;
|
|
3167
3636
|
/**
|
|
3168
3637
|
* Get User
|
|
3169
3638
|
*
|
|
@@ -3205,12 +3674,11 @@ declare module "node-appwrite" {
|
|
|
3205
3674
|
* Get the user activity logs list by its unique ID.
|
|
3206
3675
|
*
|
|
3207
3676
|
* @param {string} userId
|
|
3208
|
-
* @param {
|
|
3209
|
-
* @param {number} offset
|
|
3677
|
+
* @param {string[]} queries
|
|
3210
3678
|
* @throws {AppwriteException}
|
|
3211
3679
|
* @returns {Promise}
|
|
3212
3680
|
*/
|
|
3213
|
-
getLogs(userId: string,
|
|
3681
|
+
getLogs(userId: string, queries?: string[]): Promise<Models.LogList>;
|
|
3214
3682
|
/**
|
|
3215
3683
|
* Get User Memberships
|
|
3216
3684
|
*
|