react-native-appwrite 0.10.1 → 0.12.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/CHANGELOG.md +7 -1
- package/README.md +84 -3
- package/dist/cjs/sdk.js +1810 -1113
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1810 -1114
- package/dist/esm/sdk.js.map +1 -1
- package/docs/examples/account/create-email-password-session.md +4 -4
- package/docs/examples/account/create-email-token.md +5 -5
- package/docs/examples/account/{create-magic-u-r-l-token.md → create-magic-url-token.md} +6 -6
- package/docs/examples/account/create-mfa-authenticator.md +3 -3
- package/docs/examples/account/create-mfa-challenge.md +3 -3
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/{create-o-auth2token.md → create-o-auth-2-session.md} +6 -6
- package/docs/examples/account/{create-o-auth2session.md → create-o-auth-2-token.md} +6 -6
- package/docs/examples/account/create-phone-token.md +4 -4
- package/docs/examples/account/create-push-target.md +5 -5
- package/docs/examples/account/create-recovery.md +4 -4
- package/docs/examples/account/create-session.md +4 -4
- package/docs/examples/account/create-verification.md +3 -3
- package/docs/examples/account/create.md +6 -6
- package/docs/examples/account/delete-identity.md +3 -3
- package/docs/examples/account/delete-mfa-authenticator.md +3 -3
- package/docs/examples/account/delete-push-target.md +3 -3
- package/docs/examples/account/delete-session.md +3 -3
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/get-session.md +3 -3
- package/docs/examples/account/list-identities.md +3 -3
- package/docs/examples/account/list-logs.md +3 -3
- package/docs/examples/account/list-mfa-factors.md +1 -1
- package/docs/examples/account/update-email.md +4 -4
- package/docs/examples/account/{update-magic-u-r-l-session.md → update-magic-url-session.md} +4 -4
- package/docs/examples/account/update-mfa-authenticator.md +4 -4
- package/docs/examples/account/update-mfa-challenge.md +4 -4
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/{update-m-f-a.md → update-mfa.md} +3 -3
- package/docs/examples/account/update-name.md +3 -3
- package/docs/examples/account/update-password.md +4 -4
- package/docs/examples/account/update-phone-session.md +4 -4
- package/docs/examples/account/update-phone-verification.md +4 -4
- package/docs/examples/account/update-phone.md +4 -4
- package/docs/examples/account/update-prefs.md +3 -3
- package/docs/examples/account/update-push-target.md +4 -4
- package/docs/examples/account/update-recovery.md +5 -5
- package/docs/examples/account/update-session.md +3 -3
- package/docs/examples/account/update-verification.md +4 -4
- package/docs/examples/avatars/get-browser.md +6 -6
- package/docs/examples/avatars/get-credit-card.md +6 -6
- package/docs/examples/avatars/get-favicon.md +3 -3
- package/docs/examples/avatars/get-flag.md +6 -6
- package/docs/examples/avatars/get-image.md +5 -5
- package/docs/examples/avatars/get-initials.md +6 -6
- package/docs/examples/avatars/{get-q-r.md → get-qr.md} +6 -6
- package/docs/examples/databases/create-document.md +8 -10
- package/docs/examples/databases/decrement-document-attribute.md +18 -0
- package/docs/examples/databases/delete-document.md +5 -5
- package/docs/examples/databases/get-document.md +6 -6
- package/docs/examples/databases/increment-document-attribute.md +18 -0
- package/docs/examples/databases/list-documents.md +5 -5
- package/docs/examples/databases/update-document.md +7 -7
- package/docs/examples/databases/upsert-document.md +7 -7
- package/docs/examples/functions/create-execution.md +9 -9
- package/docs/examples/functions/get-execution.md +4 -4
- package/docs/examples/functions/list-executions.md +4 -4
- package/docs/examples/graphql/mutation.md +3 -3
- package/docs/examples/graphql/query.md +3 -3
- package/docs/examples/messaging/create-subscriber.md +5 -5
- package/docs/examples/messaging/delete-subscriber.md +4 -4
- package/docs/examples/storage/create-file.md +6 -6
- package/docs/examples/storage/delete-file.md +4 -4
- package/docs/examples/storage/get-file-download.md +5 -5
- package/docs/examples/storage/get-file-preview.md +16 -16
- package/docs/examples/storage/get-file-view.md +5 -5
- package/docs/examples/storage/get-file.md +4 -4
- package/docs/examples/storage/list-files.md +5 -5
- package/docs/examples/storage/update-file.md +6 -6
- package/docs/examples/tablesdb/create-row.md +17 -0
- package/docs/examples/tablesdb/decrement-row-column.md +18 -0
- package/docs/examples/tablesdb/delete-row.md +15 -0
- package/docs/examples/tablesdb/get-row.md +16 -0
- package/docs/examples/tablesdb/increment-row-column.md +18 -0
- package/docs/examples/tablesdb/list-rows.md +15 -0
- package/docs/examples/tablesdb/update-row.md +17 -0
- package/docs/examples/tablesdb/upsert-row.md +17 -0
- package/docs/examples/teams/create-membership.md +9 -9
- package/docs/examples/teams/create.md +5 -5
- package/docs/examples/teams/delete-membership.md +4 -4
- package/docs/examples/teams/delete.md +3 -3
- package/docs/examples/teams/get-membership.md +4 -4
- package/docs/examples/teams/get-prefs.md +3 -3
- package/docs/examples/teams/get.md +3 -3
- package/docs/examples/teams/list-memberships.md +5 -5
- package/docs/examples/teams/list.md +4 -4
- package/docs/examples/teams/update-membership-status.md +6 -6
- package/docs/examples/teams/update-membership.md +5 -5
- package/docs/examples/teams/update-name.md +4 -4
- package/docs/examples/teams/update-prefs.md +4 -4
- package/package.json +1 -1
- package/src/client.ts +2 -2
- package/src/index.ts +1 -0
- package/src/models.ts +139 -21
- package/src/query.ts +95 -0
- package/src/services/account.ts +1518 -364
- package/src/services/avatars.ts +296 -87
- package/src/services/databases.ts +438 -55
- package/src/services/functions.ts +118 -23
- package/src/services/graphql.ts +54 -6
- package/src/services/locale.ts +16 -27
- package/src/services/messaging.ts +68 -9
- package/src/services/storage.ts +353 -84
- package/src/services/tables-db.ts +621 -0
- package/src/services/teams.ts +467 -106
- package/types/index.d.ts +1 -0
- package/types/models.d.ts +127 -62
- package/types/query.d.ts +77 -0
- package/types/services/account.d.ts +791 -337
- package/types/services/avatars.d.ts +175 -80
- package/types/services/databases.d.ts +220 -53
- package/types/services/functions.d.ts +65 -20
- package/types/services/graphql.d.ts +26 -4
- package/types/services/locale.d.ts +16 -27
- package/types/services/messaging.d.ts +35 -7
- package/types/services/storage.d.ts +209 -76
- package/types/services/tables-db.d.ts +245 -0
- package/types/services/teams.d.ts +261 -99
- /package/docs/examples/account/{create-j-w-t.md → create-jwt.md} +0 -0
- /package/docs/examples/locale/{list-countries-e-u.md → list-countries-eu.md} +0 -0
package/src/models.ts
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
export namespace Models {
|
|
2
|
+
|
|
3
|
+
declare const __default: unique symbol;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Rows List
|
|
7
|
+
*/
|
|
8
|
+
export type RowList<Row extends Models.Row = Models.DefaultRow> = {
|
|
9
|
+
/**
|
|
10
|
+
* Total number of rows that matched your query.
|
|
11
|
+
*/
|
|
12
|
+
total: number;
|
|
13
|
+
/**
|
|
14
|
+
* List of rows.
|
|
15
|
+
*/
|
|
16
|
+
rows: Row[];
|
|
17
|
+
}
|
|
18
|
+
|
|
2
19
|
/**
|
|
3
20
|
* Documents List
|
|
4
21
|
*/
|
|
5
|
-
export type DocumentList<Document extends Models.Document> = {
|
|
22
|
+
export type DocumentList<Document extends Models.Document = Models.DefaultDocument> = {
|
|
6
23
|
/**
|
|
7
|
-
* Total number of documents
|
|
24
|
+
* Total number of documents that matched your query.
|
|
8
25
|
*/
|
|
9
26
|
total: number;
|
|
10
27
|
/**
|
|
@@ -12,12 +29,13 @@ export namespace Models {
|
|
|
12
29
|
*/
|
|
13
30
|
documents: Document[];
|
|
14
31
|
}
|
|
32
|
+
|
|
15
33
|
/**
|
|
16
34
|
* Sessions List
|
|
17
35
|
*/
|
|
18
36
|
export type SessionList = {
|
|
19
37
|
/**
|
|
20
|
-
* Total number of sessions
|
|
38
|
+
* Total number of sessions that matched your query.
|
|
21
39
|
*/
|
|
22
40
|
total: number;
|
|
23
41
|
/**
|
|
@@ -25,12 +43,13 @@ export namespace Models {
|
|
|
25
43
|
*/
|
|
26
44
|
sessions: Session[];
|
|
27
45
|
}
|
|
46
|
+
|
|
28
47
|
/**
|
|
29
48
|
* Identities List
|
|
30
49
|
*/
|
|
31
50
|
export type IdentityList = {
|
|
32
51
|
/**
|
|
33
|
-
* Total number of identities
|
|
52
|
+
* Total number of identities that matched your query.
|
|
34
53
|
*/
|
|
35
54
|
total: number;
|
|
36
55
|
/**
|
|
@@ -38,12 +57,13 @@ export namespace Models {
|
|
|
38
57
|
*/
|
|
39
58
|
identities: Identity[];
|
|
40
59
|
}
|
|
60
|
+
|
|
41
61
|
/**
|
|
42
62
|
* Logs List
|
|
43
63
|
*/
|
|
44
64
|
export type LogList = {
|
|
45
65
|
/**
|
|
46
|
-
* Total number of logs
|
|
66
|
+
* Total number of logs that matched your query.
|
|
47
67
|
*/
|
|
48
68
|
total: number;
|
|
49
69
|
/**
|
|
@@ -51,12 +71,13 @@ export namespace Models {
|
|
|
51
71
|
*/
|
|
52
72
|
logs: Log[];
|
|
53
73
|
}
|
|
74
|
+
|
|
54
75
|
/**
|
|
55
76
|
* Files List
|
|
56
77
|
*/
|
|
57
78
|
export type FileList = {
|
|
58
79
|
/**
|
|
59
|
-
* Total number of files
|
|
80
|
+
* Total number of files that matched your query.
|
|
60
81
|
*/
|
|
61
82
|
total: number;
|
|
62
83
|
/**
|
|
@@ -64,12 +85,13 @@ export namespace Models {
|
|
|
64
85
|
*/
|
|
65
86
|
files: File[];
|
|
66
87
|
}
|
|
88
|
+
|
|
67
89
|
/**
|
|
68
90
|
* Teams List
|
|
69
91
|
*/
|
|
70
|
-
export type TeamList<Preferences extends Models.Preferences> = {
|
|
92
|
+
export type TeamList<Preferences extends Models.Preferences = Models.DefaultPreferences> = {
|
|
71
93
|
/**
|
|
72
|
-
* Total number of teams
|
|
94
|
+
* Total number of teams that matched your query.
|
|
73
95
|
*/
|
|
74
96
|
total: number;
|
|
75
97
|
/**
|
|
@@ -77,12 +99,13 @@ export namespace Models {
|
|
|
77
99
|
*/
|
|
78
100
|
teams: Team<Preferences>[];
|
|
79
101
|
}
|
|
102
|
+
|
|
80
103
|
/**
|
|
81
104
|
* Memberships List
|
|
82
105
|
*/
|
|
83
106
|
export type MembershipList = {
|
|
84
107
|
/**
|
|
85
|
-
* Total number of memberships
|
|
108
|
+
* Total number of memberships that matched your query.
|
|
86
109
|
*/
|
|
87
110
|
total: number;
|
|
88
111
|
/**
|
|
@@ -90,12 +113,13 @@ export namespace Models {
|
|
|
90
113
|
*/
|
|
91
114
|
memberships: Membership[];
|
|
92
115
|
}
|
|
116
|
+
|
|
93
117
|
/**
|
|
94
118
|
* Executions List
|
|
95
119
|
*/
|
|
96
120
|
export type ExecutionList = {
|
|
97
121
|
/**
|
|
98
|
-
* Total number of executions
|
|
122
|
+
* Total number of executions that matched your query.
|
|
99
123
|
*/
|
|
100
124
|
total: number;
|
|
101
125
|
/**
|
|
@@ -103,12 +127,13 @@ export namespace Models {
|
|
|
103
127
|
*/
|
|
104
128
|
executions: Execution[];
|
|
105
129
|
}
|
|
130
|
+
|
|
106
131
|
/**
|
|
107
132
|
* Countries List
|
|
108
133
|
*/
|
|
109
134
|
export type CountryList = {
|
|
110
135
|
/**
|
|
111
|
-
* Total number of countries
|
|
136
|
+
* Total number of countries that matched your query.
|
|
112
137
|
*/
|
|
113
138
|
total: number;
|
|
114
139
|
/**
|
|
@@ -116,12 +141,13 @@ export namespace Models {
|
|
|
116
141
|
*/
|
|
117
142
|
countries: Country[];
|
|
118
143
|
}
|
|
144
|
+
|
|
119
145
|
/**
|
|
120
146
|
* Continents List
|
|
121
147
|
*/
|
|
122
148
|
export type ContinentList = {
|
|
123
149
|
/**
|
|
124
|
-
* Total number of continents
|
|
150
|
+
* Total number of continents that matched your query.
|
|
125
151
|
*/
|
|
126
152
|
total: number;
|
|
127
153
|
/**
|
|
@@ -129,12 +155,13 @@ export namespace Models {
|
|
|
129
155
|
*/
|
|
130
156
|
continents: Continent[];
|
|
131
157
|
}
|
|
158
|
+
|
|
132
159
|
/**
|
|
133
160
|
* Languages List
|
|
134
161
|
*/
|
|
135
162
|
export type LanguageList = {
|
|
136
163
|
/**
|
|
137
|
-
* Total number of languages
|
|
164
|
+
* Total number of languages that matched your query.
|
|
138
165
|
*/
|
|
139
166
|
total: number;
|
|
140
167
|
/**
|
|
@@ -142,12 +169,13 @@ export namespace Models {
|
|
|
142
169
|
*/
|
|
143
170
|
languages: Language[];
|
|
144
171
|
}
|
|
172
|
+
|
|
145
173
|
/**
|
|
146
174
|
* Currencies List
|
|
147
175
|
*/
|
|
148
176
|
export type CurrencyList = {
|
|
149
177
|
/**
|
|
150
|
-
* Total number of currencies
|
|
178
|
+
* Total number of currencies that matched your query.
|
|
151
179
|
*/
|
|
152
180
|
total: number;
|
|
153
181
|
/**
|
|
@@ -155,12 +183,13 @@ export namespace Models {
|
|
|
155
183
|
*/
|
|
156
184
|
currencies: Currency[];
|
|
157
185
|
}
|
|
186
|
+
|
|
158
187
|
/**
|
|
159
188
|
* Phones List
|
|
160
189
|
*/
|
|
161
190
|
export type PhoneList = {
|
|
162
191
|
/**
|
|
163
|
-
* Total number of phones
|
|
192
|
+
* Total number of phones that matched your query.
|
|
164
193
|
*/
|
|
165
194
|
total: number;
|
|
166
195
|
/**
|
|
@@ -168,12 +197,13 @@ export namespace Models {
|
|
|
168
197
|
*/
|
|
169
198
|
phones: Phone[];
|
|
170
199
|
}
|
|
200
|
+
|
|
171
201
|
/**
|
|
172
202
|
* Locale codes list
|
|
173
203
|
*/
|
|
174
204
|
export type LocaleCodeList = {
|
|
175
205
|
/**
|
|
176
|
-
* Total number of localeCodes
|
|
206
|
+
* Total number of localeCodes that matched your query.
|
|
177
207
|
*/
|
|
178
208
|
total: number;
|
|
179
209
|
/**
|
|
@@ -181,6 +211,46 @@ export namespace Models {
|
|
|
181
211
|
*/
|
|
182
212
|
localeCodes: LocaleCode[];
|
|
183
213
|
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Row
|
|
217
|
+
*/
|
|
218
|
+
export type Row = {
|
|
219
|
+
/**
|
|
220
|
+
* Row ID.
|
|
221
|
+
*/
|
|
222
|
+
$id: string;
|
|
223
|
+
/**
|
|
224
|
+
* Row automatically incrementing ID.
|
|
225
|
+
*/
|
|
226
|
+
$sequence: number;
|
|
227
|
+
/**
|
|
228
|
+
* Table ID.
|
|
229
|
+
*/
|
|
230
|
+
$tableId: string;
|
|
231
|
+
/**
|
|
232
|
+
* Database ID.
|
|
233
|
+
*/
|
|
234
|
+
$databaseId: string;
|
|
235
|
+
/**
|
|
236
|
+
* Row creation date in ISO 8601 format.
|
|
237
|
+
*/
|
|
238
|
+
$createdAt: string;
|
|
239
|
+
/**
|
|
240
|
+
* Row update date in ISO 8601 format.
|
|
241
|
+
*/
|
|
242
|
+
$updatedAt: string;
|
|
243
|
+
/**
|
|
244
|
+
* Row permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
245
|
+
*/
|
|
246
|
+
$permissions: string[];
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export type DefaultRow = Row & {
|
|
250
|
+
[key: string]: any;
|
|
251
|
+
[__default]: true;
|
|
252
|
+
};
|
|
253
|
+
|
|
184
254
|
/**
|
|
185
255
|
* Document
|
|
186
256
|
*/
|
|
@@ -189,6 +259,10 @@ export namespace Models {
|
|
|
189
259
|
* Document ID.
|
|
190
260
|
*/
|
|
191
261
|
$id: string;
|
|
262
|
+
/**
|
|
263
|
+
* Document automatically incrementing ID.
|
|
264
|
+
*/
|
|
265
|
+
$sequence: number;
|
|
192
266
|
/**
|
|
193
267
|
* Collection ID.
|
|
194
268
|
*/
|
|
@@ -209,8 +283,13 @@ export namespace Models {
|
|
|
209
283
|
* Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
210
284
|
*/
|
|
211
285
|
$permissions: string[];
|
|
212
|
-
[key: string]: any;
|
|
213
286
|
}
|
|
287
|
+
|
|
288
|
+
export type DefaultDocument = Document & {
|
|
289
|
+
[key: string]: any;
|
|
290
|
+
[__default]: true;
|
|
291
|
+
};
|
|
292
|
+
|
|
214
293
|
/**
|
|
215
294
|
* Log
|
|
216
295
|
*/
|
|
@@ -300,10 +379,11 @@ export namespace Models {
|
|
|
300
379
|
*/
|
|
301
380
|
countryName: string;
|
|
302
381
|
}
|
|
382
|
+
|
|
303
383
|
/**
|
|
304
384
|
* User
|
|
305
385
|
*/
|
|
306
|
-
export type User<Preferences extends Models.Preferences> = {
|
|
386
|
+
export type User<Preferences extends Models.Preferences = Models.DefaultPreferences> = {
|
|
307
387
|
/**
|
|
308
388
|
* User ID.
|
|
309
389
|
*/
|
|
@@ -381,6 +461,7 @@ export namespace Models {
|
|
|
381
461
|
*/
|
|
382
462
|
accessedAt: string;
|
|
383
463
|
}
|
|
464
|
+
|
|
384
465
|
/**
|
|
385
466
|
* AlgoMD5
|
|
386
467
|
*/
|
|
@@ -390,6 +471,7 @@ export namespace Models {
|
|
|
390
471
|
*/
|
|
391
472
|
type: string;
|
|
392
473
|
}
|
|
474
|
+
|
|
393
475
|
/**
|
|
394
476
|
* AlgoSHA
|
|
395
477
|
*/
|
|
@@ -399,6 +481,7 @@ export namespace Models {
|
|
|
399
481
|
*/
|
|
400
482
|
type: string;
|
|
401
483
|
}
|
|
484
|
+
|
|
402
485
|
/**
|
|
403
486
|
* AlgoPHPass
|
|
404
487
|
*/
|
|
@@ -408,6 +491,7 @@ export namespace Models {
|
|
|
408
491
|
*/
|
|
409
492
|
type: string;
|
|
410
493
|
}
|
|
494
|
+
|
|
411
495
|
/**
|
|
412
496
|
* AlgoBcrypt
|
|
413
497
|
*/
|
|
@@ -417,6 +501,7 @@ export namespace Models {
|
|
|
417
501
|
*/
|
|
418
502
|
type: string;
|
|
419
503
|
}
|
|
504
|
+
|
|
420
505
|
/**
|
|
421
506
|
* AlgoScrypt
|
|
422
507
|
*/
|
|
@@ -442,6 +527,7 @@ export namespace Models {
|
|
|
442
527
|
*/
|
|
443
528
|
length: number;
|
|
444
529
|
}
|
|
530
|
+
|
|
445
531
|
/**
|
|
446
532
|
* AlgoScryptModified
|
|
447
533
|
*/
|
|
@@ -463,6 +549,7 @@ export namespace Models {
|
|
|
463
549
|
*/
|
|
464
550
|
signerKey: string;
|
|
465
551
|
}
|
|
552
|
+
|
|
466
553
|
/**
|
|
467
554
|
* AlgoArgon2
|
|
468
555
|
*/
|
|
@@ -484,12 +571,18 @@ export namespace Models {
|
|
|
484
571
|
*/
|
|
485
572
|
threads: number;
|
|
486
573
|
}
|
|
574
|
+
|
|
487
575
|
/**
|
|
488
576
|
* Preferences
|
|
489
577
|
*/
|
|
490
578
|
export type Preferences = {
|
|
491
|
-
[key: string]: any;
|
|
492
579
|
}
|
|
580
|
+
|
|
581
|
+
export type DefaultPreferences = Preferences & {
|
|
582
|
+
[key: string]: any;
|
|
583
|
+
[__default]: true;
|
|
584
|
+
};
|
|
585
|
+
|
|
493
586
|
/**
|
|
494
587
|
* Session
|
|
495
588
|
*/
|
|
@@ -611,6 +704,7 @@ export namespace Models {
|
|
|
611
704
|
*/
|
|
612
705
|
mfaUpdatedAt: string;
|
|
613
706
|
}
|
|
707
|
+
|
|
614
708
|
/**
|
|
615
709
|
* Identity
|
|
616
710
|
*/
|
|
@@ -656,6 +750,7 @@ export namespace Models {
|
|
|
656
750
|
*/
|
|
657
751
|
providerRefreshToken: string;
|
|
658
752
|
}
|
|
753
|
+
|
|
659
754
|
/**
|
|
660
755
|
* Token
|
|
661
756
|
*/
|
|
@@ -685,6 +780,7 @@ export namespace Models {
|
|
|
685
780
|
*/
|
|
686
781
|
phrase: string;
|
|
687
782
|
}
|
|
783
|
+
|
|
688
784
|
/**
|
|
689
785
|
* JWT
|
|
690
786
|
*/
|
|
@@ -694,6 +790,7 @@ export namespace Models {
|
|
|
694
790
|
*/
|
|
695
791
|
jwt: string;
|
|
696
792
|
}
|
|
793
|
+
|
|
697
794
|
/**
|
|
698
795
|
* Locale
|
|
699
796
|
*/
|
|
@@ -727,6 +824,7 @@ export namespace Models {
|
|
|
727
824
|
*/
|
|
728
825
|
currency: string;
|
|
729
826
|
}
|
|
827
|
+
|
|
730
828
|
/**
|
|
731
829
|
* LocaleCode
|
|
732
830
|
*/
|
|
@@ -740,6 +838,7 @@ export namespace Models {
|
|
|
740
838
|
*/
|
|
741
839
|
name: string;
|
|
742
840
|
}
|
|
841
|
+
|
|
743
842
|
/**
|
|
744
843
|
* File
|
|
745
844
|
*/
|
|
@@ -789,10 +888,11 @@ export namespace Models {
|
|
|
789
888
|
*/
|
|
790
889
|
chunksUploaded: number;
|
|
791
890
|
}
|
|
891
|
+
|
|
792
892
|
/**
|
|
793
893
|
* Team
|
|
794
894
|
*/
|
|
795
|
-
export type Team<Preferences extends Models.Preferences> = {
|
|
895
|
+
export type Team<Preferences extends Models.Preferences = Models.DefaultPreferences> = {
|
|
796
896
|
/**
|
|
797
897
|
* Team ID.
|
|
798
898
|
*/
|
|
@@ -818,6 +918,7 @@ export namespace Models {
|
|
|
818
918
|
*/
|
|
819
919
|
prefs: Preferences;
|
|
820
920
|
}
|
|
921
|
+
|
|
821
922
|
/**
|
|
822
923
|
* Membership
|
|
823
924
|
*/
|
|
@@ -875,6 +976,7 @@ export namespace Models {
|
|
|
875
976
|
*/
|
|
876
977
|
roles: string[];
|
|
877
978
|
}
|
|
979
|
+
|
|
878
980
|
/**
|
|
879
981
|
* Execution
|
|
880
982
|
*/
|
|
@@ -888,7 +990,7 @@ export namespace Models {
|
|
|
888
990
|
*/
|
|
889
991
|
$createdAt: string;
|
|
890
992
|
/**
|
|
891
|
-
* Execution
|
|
993
|
+
* Execution update date in ISO 8601 format.
|
|
892
994
|
*/
|
|
893
995
|
$updatedAt: string;
|
|
894
996
|
/**
|
|
@@ -899,6 +1001,10 @@ export namespace Models {
|
|
|
899
1001
|
* Function ID.
|
|
900
1002
|
*/
|
|
901
1003
|
functionId: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* Function's deployment ID used to create the execution.
|
|
1006
|
+
*/
|
|
1007
|
+
deploymentId: string;
|
|
902
1008
|
/**
|
|
903
1009
|
* The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.
|
|
904
1010
|
*/
|
|
@@ -948,6 +1054,7 @@ export namespace Models {
|
|
|
948
1054
|
*/
|
|
949
1055
|
scheduledAt?: string;
|
|
950
1056
|
}
|
|
1057
|
+
|
|
951
1058
|
/**
|
|
952
1059
|
* Country
|
|
953
1060
|
*/
|
|
@@ -961,6 +1068,7 @@ export namespace Models {
|
|
|
961
1068
|
*/
|
|
962
1069
|
code: string;
|
|
963
1070
|
}
|
|
1071
|
+
|
|
964
1072
|
/**
|
|
965
1073
|
* Continent
|
|
966
1074
|
*/
|
|
@@ -974,6 +1082,7 @@ export namespace Models {
|
|
|
974
1082
|
*/
|
|
975
1083
|
code: string;
|
|
976
1084
|
}
|
|
1085
|
+
|
|
977
1086
|
/**
|
|
978
1087
|
* Language
|
|
979
1088
|
*/
|
|
@@ -991,6 +1100,7 @@ export namespace Models {
|
|
|
991
1100
|
*/
|
|
992
1101
|
nativeName: string;
|
|
993
1102
|
}
|
|
1103
|
+
|
|
994
1104
|
/**
|
|
995
1105
|
* Currency
|
|
996
1106
|
*/
|
|
@@ -1024,6 +1134,7 @@ export namespace Models {
|
|
|
1024
1134
|
*/
|
|
1025
1135
|
namePlural: string;
|
|
1026
1136
|
}
|
|
1137
|
+
|
|
1027
1138
|
/**
|
|
1028
1139
|
* Phone
|
|
1029
1140
|
*/
|
|
@@ -1041,6 +1152,7 @@ export namespace Models {
|
|
|
1041
1152
|
*/
|
|
1042
1153
|
countryName: string;
|
|
1043
1154
|
}
|
|
1155
|
+
|
|
1044
1156
|
/**
|
|
1045
1157
|
* Headers
|
|
1046
1158
|
*/
|
|
@@ -1054,6 +1166,7 @@ export namespace Models {
|
|
|
1054
1166
|
*/
|
|
1055
1167
|
value: string;
|
|
1056
1168
|
}
|
|
1169
|
+
|
|
1057
1170
|
/**
|
|
1058
1171
|
* MFA Challenge
|
|
1059
1172
|
*/
|
|
@@ -1075,6 +1188,7 @@ export namespace Models {
|
|
|
1075
1188
|
*/
|
|
1076
1189
|
expire: string;
|
|
1077
1190
|
}
|
|
1191
|
+
|
|
1078
1192
|
/**
|
|
1079
1193
|
* MFA Recovery Codes
|
|
1080
1194
|
*/
|
|
@@ -1084,6 +1198,7 @@ export namespace Models {
|
|
|
1084
1198
|
*/
|
|
1085
1199
|
recoveryCodes: string[];
|
|
1086
1200
|
}
|
|
1201
|
+
|
|
1087
1202
|
/**
|
|
1088
1203
|
* MFAType
|
|
1089
1204
|
*/
|
|
@@ -1097,6 +1212,7 @@ export namespace Models {
|
|
|
1097
1212
|
*/
|
|
1098
1213
|
uri: string;
|
|
1099
1214
|
}
|
|
1215
|
+
|
|
1100
1216
|
/**
|
|
1101
1217
|
* MFAFactors
|
|
1102
1218
|
*/
|
|
@@ -1118,6 +1234,7 @@ export namespace Models {
|
|
|
1118
1234
|
*/
|
|
1119
1235
|
recoveryCode: boolean;
|
|
1120
1236
|
}
|
|
1237
|
+
|
|
1121
1238
|
/**
|
|
1122
1239
|
* Subscriber
|
|
1123
1240
|
*/
|
|
@@ -1159,6 +1276,7 @@ export namespace Models {
|
|
|
1159
1276
|
*/
|
|
1160
1277
|
providerType: string;
|
|
1161
1278
|
}
|
|
1279
|
+
|
|
1162
1280
|
/**
|
|
1163
1281
|
* Target
|
|
1164
1282
|
*/
|
package/src/query.ts
CHANGED
|
@@ -90,9 +90,104 @@ export class Query {
|
|
|
90
90
|
static offset = (offset: number): string =>
|
|
91
91
|
new Query("offset", undefined, offset).toString();
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Filter resources where attribute contains the specified value.
|
|
95
|
+
*
|
|
96
|
+
* @param {string} attribute
|
|
97
|
+
* @param {string | string[]} value
|
|
98
|
+
* @returns {string}
|
|
99
|
+
*/
|
|
93
100
|
static contains = (attribute: string, value: string | string[]): string =>
|
|
94
101
|
new Query("contains", attribute, value).toString();
|
|
95
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Filter resources where attribute does not contain the specified value.
|
|
105
|
+
*
|
|
106
|
+
* @param {string} attribute
|
|
107
|
+
* @param {string | string[]} value
|
|
108
|
+
* @returns {string}
|
|
109
|
+
*/
|
|
110
|
+
static notContains = (attribute: string, value: string | string[]): string =>
|
|
111
|
+
new Query("notContains", attribute, value).toString();
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Filter resources by searching attribute for value (inverse of search).
|
|
115
|
+
* A fulltext index on attribute is required for this query to work.
|
|
116
|
+
*
|
|
117
|
+
* @param {string} attribute
|
|
118
|
+
* @param {string} value
|
|
119
|
+
* @returns {string}
|
|
120
|
+
*/
|
|
121
|
+
static notSearch = (attribute: string, value: string): string =>
|
|
122
|
+
new Query("notSearch", attribute, value).toString();
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Filter resources where attribute is not between start and end (exclusive).
|
|
126
|
+
*
|
|
127
|
+
* @param {string} attribute
|
|
128
|
+
* @param {string | number} start
|
|
129
|
+
* @param {string | number} end
|
|
130
|
+
* @returns {string}
|
|
131
|
+
*/
|
|
132
|
+
static notBetween = (attribute: string, start: string | number, end: string | number): string =>
|
|
133
|
+
new Query("notBetween", attribute, [start, end] as QueryTypesList).toString();
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Filter resources where attribute does not start with value.
|
|
137
|
+
*
|
|
138
|
+
* @param {string} attribute
|
|
139
|
+
* @param {string} value
|
|
140
|
+
* @returns {string}
|
|
141
|
+
*/
|
|
142
|
+
static notStartsWith = (attribute: string, value: string): string =>
|
|
143
|
+
new Query("notStartsWith", attribute, value).toString();
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Filter resources where attribute does not end with value.
|
|
147
|
+
*
|
|
148
|
+
* @param {string} attribute
|
|
149
|
+
* @param {string} value
|
|
150
|
+
* @returns {string}
|
|
151
|
+
*/
|
|
152
|
+
static notEndsWith = (attribute: string, value: string): string =>
|
|
153
|
+
new Query("notEndsWith", attribute, value).toString();
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Filter resources where document was created before date.
|
|
157
|
+
*
|
|
158
|
+
* @param {string} value
|
|
159
|
+
* @returns {string}
|
|
160
|
+
*/
|
|
161
|
+
static createdBefore = (value: string): string =>
|
|
162
|
+
new Query("createdBefore", undefined, value).toString();
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Filter resources where document was created after date.
|
|
166
|
+
*
|
|
167
|
+
* @param {string} value
|
|
168
|
+
* @returns {string}
|
|
169
|
+
*/
|
|
170
|
+
static createdAfter = (value: string): string =>
|
|
171
|
+
new Query("createdAfter", undefined, value).toString();
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Filter resources where document was updated before date.
|
|
175
|
+
*
|
|
176
|
+
* @param {string} value
|
|
177
|
+
* @returns {string}
|
|
178
|
+
*/
|
|
179
|
+
static updatedBefore = (value: string): string =>
|
|
180
|
+
new Query("updatedBefore", undefined, value).toString();
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Filter resources where document was updated after date.
|
|
184
|
+
*
|
|
185
|
+
* @param {string} value
|
|
186
|
+
* @returns {string}
|
|
187
|
+
*/
|
|
188
|
+
static updatedAfter = (value: string): string =>
|
|
189
|
+
new Query("updatedAfter", undefined, value).toString();
|
|
190
|
+
|
|
96
191
|
static or = (queries: string[]) =>
|
|
97
192
|
new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
|
|
98
193
|
|