react-native-appwrite 0.10.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/models.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  export declare namespace Models {
2
+ const __default: unique symbol;
2
3
  /**
3
4
  * Documents List
4
5
  */
5
- type DocumentList<Document extends Models.Document> = {
6
+ export type DocumentList<Document extends Models.Document = Models.DefaultDocument> = {
6
7
  /**
7
8
  * Total number of documents documents that matched your query.
8
9
  */
@@ -15,7 +16,7 @@ export declare namespace Models {
15
16
  /**
16
17
  * Sessions List
17
18
  */
18
- type SessionList = {
19
+ export type SessionList = {
19
20
  /**
20
21
  * Total number of sessions documents that matched your query.
21
22
  */
@@ -28,7 +29,7 @@ export declare namespace Models {
28
29
  /**
29
30
  * Identities List
30
31
  */
31
- type IdentityList = {
32
+ export type IdentityList = {
32
33
  /**
33
34
  * Total number of identities documents that matched your query.
34
35
  */
@@ -41,7 +42,7 @@ export declare namespace Models {
41
42
  /**
42
43
  * Logs List
43
44
  */
44
- type LogList = {
45
+ export type LogList = {
45
46
  /**
46
47
  * Total number of logs documents that matched your query.
47
48
  */
@@ -54,7 +55,7 @@ export declare namespace Models {
54
55
  /**
55
56
  * Files List
56
57
  */
57
- type FileList = {
58
+ export type FileList = {
58
59
  /**
59
60
  * Total number of files documents that matched your query.
60
61
  */
@@ -67,7 +68,7 @@ export declare namespace Models {
67
68
  /**
68
69
  * Teams List
69
70
  */
70
- type TeamList<Preferences extends Models.Preferences> = {
71
+ export type TeamList<Preferences extends Models.Preferences = Models.DefaultPreferences> = {
71
72
  /**
72
73
  * Total number of teams documents that matched your query.
73
74
  */
@@ -80,7 +81,7 @@ export declare namespace Models {
80
81
  /**
81
82
  * Memberships List
82
83
  */
83
- type MembershipList = {
84
+ export type MembershipList = {
84
85
  /**
85
86
  * Total number of memberships documents that matched your query.
86
87
  */
@@ -93,7 +94,7 @@ export declare namespace Models {
93
94
  /**
94
95
  * Executions List
95
96
  */
96
- type ExecutionList = {
97
+ export type ExecutionList = {
97
98
  /**
98
99
  * Total number of executions documents that matched your query.
99
100
  */
@@ -106,7 +107,7 @@ export declare namespace Models {
106
107
  /**
107
108
  * Countries List
108
109
  */
109
- type CountryList = {
110
+ export type CountryList = {
110
111
  /**
111
112
  * Total number of countries documents that matched your query.
112
113
  */
@@ -119,7 +120,7 @@ export declare namespace Models {
119
120
  /**
120
121
  * Continents List
121
122
  */
122
- type ContinentList = {
123
+ export type ContinentList = {
123
124
  /**
124
125
  * Total number of continents documents that matched your query.
125
126
  */
@@ -132,7 +133,7 @@ export declare namespace Models {
132
133
  /**
133
134
  * Languages List
134
135
  */
135
- type LanguageList = {
136
+ export type LanguageList = {
136
137
  /**
137
138
  * Total number of languages documents that matched your query.
138
139
  */
@@ -145,7 +146,7 @@ export declare namespace Models {
145
146
  /**
146
147
  * Currencies List
147
148
  */
148
- type CurrencyList = {
149
+ export type CurrencyList = {
149
150
  /**
150
151
  * Total number of currencies documents that matched your query.
151
152
  */
@@ -158,7 +159,7 @@ export declare namespace Models {
158
159
  /**
159
160
  * Phones List
160
161
  */
161
- type PhoneList = {
162
+ export type PhoneList = {
162
163
  /**
163
164
  * Total number of phones documents that matched your query.
164
165
  */
@@ -171,7 +172,7 @@ export declare namespace Models {
171
172
  /**
172
173
  * Locale codes list
173
174
  */
174
- type LocaleCodeList = {
175
+ export type LocaleCodeList = {
175
176
  /**
176
177
  * Total number of localeCodes documents that matched your query.
177
178
  */
@@ -184,11 +185,15 @@ export declare namespace Models {
184
185
  /**
185
186
  * Document
186
187
  */
187
- type Document = {
188
+ export type Document = {
188
189
  /**
189
190
  * Document ID.
190
191
  */
191
192
  $id: string;
193
+ /**
194
+ * Document automatically incrementing ID.
195
+ */
196
+ $sequence: number;
192
197
  /**
193
198
  * Collection ID.
194
199
  */
@@ -209,12 +214,20 @@ export declare namespace Models {
209
214
  * Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
210
215
  */
211
216
  $permissions: string[];
217
+ };
218
+ export type DefaultDocument = Document & {
212
219
  [key: string]: any;
220
+ [__default]: true;
221
+ };
222
+ export type DataWithoutDocumentKeys = {
223
+ [K in string]: any;
224
+ } & {
225
+ [K in keyof Document]?: never;
213
226
  };
214
227
  /**
215
228
  * Log
216
229
  */
217
- type Log = {
230
+ export type Log = {
218
231
  /**
219
232
  * Event name.
220
233
  */
@@ -303,7 +316,7 @@ export declare namespace Models {
303
316
  /**
304
317
  * User
305
318
  */
306
- type User<Preferences extends Models.Preferences> = {
319
+ export type User<Preferences extends Models.Preferences = Models.DefaultPreferences> = {
307
320
  /**
308
321
  * User ID.
309
322
  */
@@ -384,7 +397,7 @@ export declare namespace Models {
384
397
  /**
385
398
  * AlgoMD5
386
399
  */
387
- type AlgoMd5 = {
400
+ export type AlgoMd5 = {
388
401
  /**
389
402
  * Algo type.
390
403
  */
@@ -393,7 +406,7 @@ export declare namespace Models {
393
406
  /**
394
407
  * AlgoSHA
395
408
  */
396
- type AlgoSha = {
409
+ export type AlgoSha = {
397
410
  /**
398
411
  * Algo type.
399
412
  */
@@ -402,7 +415,7 @@ export declare namespace Models {
402
415
  /**
403
416
  * AlgoPHPass
404
417
  */
405
- type AlgoPhpass = {
418
+ export type AlgoPhpass = {
406
419
  /**
407
420
  * Algo type.
408
421
  */
@@ -411,7 +424,7 @@ export declare namespace Models {
411
424
  /**
412
425
  * AlgoBcrypt
413
426
  */
414
- type AlgoBcrypt = {
427
+ export type AlgoBcrypt = {
415
428
  /**
416
429
  * Algo type.
417
430
  */
@@ -420,7 +433,7 @@ export declare namespace Models {
420
433
  /**
421
434
  * AlgoScrypt
422
435
  */
423
- type AlgoScrypt = {
436
+ export type AlgoScrypt = {
424
437
  /**
425
438
  * Algo type.
426
439
  */
@@ -445,7 +458,7 @@ export declare namespace Models {
445
458
  /**
446
459
  * AlgoScryptModified
447
460
  */
448
- type AlgoScryptModified = {
461
+ export type AlgoScryptModified = {
449
462
  /**
450
463
  * Algo type.
451
464
  */
@@ -466,7 +479,7 @@ export declare namespace Models {
466
479
  /**
467
480
  * AlgoArgon2
468
481
  */
469
- type AlgoArgon2 = {
482
+ export type AlgoArgon2 = {
470
483
  /**
471
484
  * Algo type.
472
485
  */
@@ -487,13 +500,20 @@ export declare namespace Models {
487
500
  /**
488
501
  * Preferences
489
502
  */
490
- type Preferences = {
503
+ export type Preferences = {};
504
+ export type DefaultPreferences = Preferences & {
491
505
  [key: string]: any;
506
+ [__default]: true;
507
+ };
508
+ export type DataWithoutPreferencesKeys = {
509
+ [K in string]: any;
510
+ } & {
511
+ [K in keyof Preferences]?: never;
492
512
  };
493
513
  /**
494
514
  * Session
495
515
  */
496
- type Session = {
516
+ export type Session = {
497
517
  /**
498
518
  * Session ID.
499
519
  */
@@ -614,7 +634,7 @@ export declare namespace Models {
614
634
  /**
615
635
  * Identity
616
636
  */
617
- type Identity = {
637
+ export type Identity = {
618
638
  /**
619
639
  * Identity ID.
620
640
  */
@@ -659,7 +679,7 @@ export declare namespace Models {
659
679
  /**
660
680
  * Token
661
681
  */
662
- type Token = {
682
+ export type Token = {
663
683
  /**
664
684
  * Token ID.
665
685
  */
@@ -688,7 +708,7 @@ export declare namespace Models {
688
708
  /**
689
709
  * JWT
690
710
  */
691
- type Jwt = {
711
+ export type Jwt = {
692
712
  /**
693
713
  * JWT encoded string.
694
714
  */
@@ -697,7 +717,7 @@ export declare namespace Models {
697
717
  /**
698
718
  * Locale
699
719
  */
700
- type Locale = {
720
+ export type Locale = {
701
721
  /**
702
722
  * User IP address.
703
723
  */
@@ -730,7 +750,7 @@ export declare namespace Models {
730
750
  /**
731
751
  * LocaleCode
732
752
  */
733
- type LocaleCode = {
753
+ export type LocaleCode = {
734
754
  /**
735
755
  * Locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
736
756
  */
@@ -743,7 +763,7 @@ export declare namespace Models {
743
763
  /**
744
764
  * File
745
765
  */
746
- type File = {
766
+ export type File = {
747
767
  /**
748
768
  * File ID.
749
769
  */
@@ -792,7 +812,7 @@ export declare namespace Models {
792
812
  /**
793
813
  * Team
794
814
  */
795
- type Team<Preferences extends Models.Preferences> = {
815
+ export type Team<Preferences extends Models.Preferences = Models.DefaultPreferences> = {
796
816
  /**
797
817
  * Team ID.
798
818
  */
@@ -821,7 +841,7 @@ export declare namespace Models {
821
841
  /**
822
842
  * Membership
823
843
  */
824
- type Membership = {
844
+ export type Membership = {
825
845
  /**
826
846
  * Membership ID.
827
847
  */
@@ -878,7 +898,7 @@ export declare namespace Models {
878
898
  /**
879
899
  * Execution
880
900
  */
881
- type Execution = {
901
+ export type Execution = {
882
902
  /**
883
903
  * Execution ID.
884
904
  */
@@ -951,7 +971,7 @@ export declare namespace Models {
951
971
  /**
952
972
  * Country
953
973
  */
954
- type Country = {
974
+ export type Country = {
955
975
  /**
956
976
  * Country name.
957
977
  */
@@ -964,7 +984,7 @@ export declare namespace Models {
964
984
  /**
965
985
  * Continent
966
986
  */
967
- type Continent = {
987
+ export type Continent = {
968
988
  /**
969
989
  * Continent name.
970
990
  */
@@ -977,7 +997,7 @@ export declare namespace Models {
977
997
  /**
978
998
  * Language
979
999
  */
980
- type Language = {
1000
+ export type Language = {
981
1001
  /**
982
1002
  * Language name.
983
1003
  */
@@ -994,7 +1014,7 @@ export declare namespace Models {
994
1014
  /**
995
1015
  * Currency
996
1016
  */
997
- type Currency = {
1017
+ export type Currency = {
998
1018
  /**
999
1019
  * Currency symbol.
1000
1020
  */
@@ -1027,7 +1047,7 @@ export declare namespace Models {
1027
1047
  /**
1028
1048
  * Phone
1029
1049
  */
1030
- type Phone = {
1050
+ export type Phone = {
1031
1051
  /**
1032
1052
  * Phone code.
1033
1053
  */
@@ -1044,7 +1064,7 @@ export declare namespace Models {
1044
1064
  /**
1045
1065
  * Headers
1046
1066
  */
1047
- type Headers = {
1067
+ export type Headers = {
1048
1068
  /**
1049
1069
  * Header name.
1050
1070
  */
@@ -1057,7 +1077,7 @@ export declare namespace Models {
1057
1077
  /**
1058
1078
  * MFA Challenge
1059
1079
  */
1060
- type MfaChallenge = {
1080
+ export type MfaChallenge = {
1061
1081
  /**
1062
1082
  * Token ID.
1063
1083
  */
@@ -1078,7 +1098,7 @@ export declare namespace Models {
1078
1098
  /**
1079
1099
  * MFA Recovery Codes
1080
1100
  */
1081
- type MfaRecoveryCodes = {
1101
+ export type MfaRecoveryCodes = {
1082
1102
  /**
1083
1103
  * Recovery codes.
1084
1104
  */
@@ -1087,7 +1107,7 @@ export declare namespace Models {
1087
1107
  /**
1088
1108
  * MFAType
1089
1109
  */
1090
- type MfaType = {
1110
+ export type MfaType = {
1091
1111
  /**
1092
1112
  * Secret token used for TOTP factor.
1093
1113
  */
@@ -1100,7 +1120,7 @@ export declare namespace Models {
1100
1120
  /**
1101
1121
  * MFAFactors
1102
1122
  */
1103
- type MfaFactors = {
1123
+ export type MfaFactors = {
1104
1124
  /**
1105
1125
  * Can TOTP be used for MFA challenge for this account.
1106
1126
  */
@@ -1121,7 +1141,7 @@ export declare namespace Models {
1121
1141
  /**
1122
1142
  * Subscriber
1123
1143
  */
1124
- type Subscriber = {
1144
+ export type Subscriber = {
1125
1145
  /**
1126
1146
  * Subscriber ID.
1127
1147
  */
@@ -1162,7 +1182,7 @@ export declare namespace Models {
1162
1182
  /**
1163
1183
  * Target
1164
1184
  */
1165
- type Target = {
1185
+ export type Target = {
1166
1186
  /**
1167
1187
  * Target ID.
1168
1188
  */
@@ -1200,4 +1220,5 @@ export declare namespace Models {
1200
1220
  */
1201
1221
  expired: boolean;
1202
1222
  };
1223
+ export {};
1203
1224
  }