node-appwrite 2.4.0 → 4.0.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/.github/ISSUE_TEMPLATE/bug.yaml +82 -0
- package/.github/ISSUE_TEMPLATE/documentation.yaml +32 -0
- package/.github/ISSUE_TEMPLATE/feature.yaml +40 -0
- package/LICENSE +1 -1
- package/README.md +7 -7
- package/docs/examples/database/create-boolean-attribute.md +20 -0
- package/docs/examples/database/create-collection.md +1 -1
- package/docs/examples/database/create-document.md +1 -1
- package/docs/examples/database/create-email-attribute.md +20 -0
- package/docs/examples/database/create-enum-attribute.md +20 -0
- package/docs/examples/database/create-float-attribute.md +20 -0
- package/docs/examples/database/create-index.md +20 -0
- package/docs/examples/database/create-integer-attribute.md +20 -0
- package/docs/examples/database/create-ip-attribute.md +20 -0
- package/docs/examples/database/create-string-attribute.md +20 -0
- package/docs/examples/database/create-url-attribute.md +20 -0
- package/docs/examples/database/delete-attribute.md +20 -0
- package/docs/examples/database/delete-index.md +20 -0
- package/docs/examples/database/get-attribute.md +20 -0
- package/docs/examples/database/get-index.md +20 -0
- package/docs/examples/database/list-attributes.md +20 -0
- package/docs/examples/database/list-indexes.md +20 -0
- package/docs/examples/database/update-collection.md +1 -1
- package/docs/examples/functions/create-tag.md +1 -1
- package/docs/examples/functions/create.md +1 -1
- package/docs/examples/{health/get-queue-tasks.md → functions/list-runtimes.md} +2 -2
- package/docs/examples/health/{get-anti-virus.md → get-antivirus.md} +1 -1
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/teams/create.md +1 -1
- package/docs/examples/teams/get-membership.md +20 -0
- package/docs/examples/users/create.md +1 -1
- package/docs/examples/users/update-email.md +20 -0
- package/docs/examples/users/update-name.md +20 -0
- package/docs/examples/users/update-password.md +20 -0
- package/docs/examples/users/update-status.md +1 -1
- package/index.d.ts +1693 -235
- package/lib/client.js +5 -5
- package/lib/query.js +34 -0
- package/lib/services/account.js +18 -6
- package/lib/services/database.js +706 -47
- package/lib/services/functions.js +63 -12
- package/lib/services/health.js +4 -22
- package/lib/services/storage.js +21 -2
- package/lib/services/teams.js +93 -31
- package/lib/services/users.js +127 -5
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,4 +1,1294 @@
|
|
|
1
1
|
declare module "node-appwrite" {
|
|
2
|
+
export namespace Models {
|
|
3
|
+
/**
|
|
4
|
+
* Collections List
|
|
5
|
+
*/
|
|
6
|
+
export type CollectionList = {
|
|
7
|
+
/**
|
|
8
|
+
* Total number of items available on the server.
|
|
9
|
+
*/
|
|
10
|
+
sum: number;
|
|
11
|
+
/**
|
|
12
|
+
* List of collections.
|
|
13
|
+
*/
|
|
14
|
+
collections: Collection[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Indexes List
|
|
18
|
+
*/
|
|
19
|
+
export type IndexList = {
|
|
20
|
+
/**
|
|
21
|
+
* Total number of items available on the server.
|
|
22
|
+
*/
|
|
23
|
+
sum: number;
|
|
24
|
+
/**
|
|
25
|
+
* List of indexes.
|
|
26
|
+
*/
|
|
27
|
+
indexes: Index[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Documents List
|
|
31
|
+
*/
|
|
32
|
+
export type DocumentList<Document extends Models.Document> = {
|
|
33
|
+
/**
|
|
34
|
+
* Total number of items available on the server.
|
|
35
|
+
*/
|
|
36
|
+
sum: number;
|
|
37
|
+
/**
|
|
38
|
+
* List of documents.
|
|
39
|
+
*/
|
|
40
|
+
documents: Document[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Users List
|
|
44
|
+
*/
|
|
45
|
+
export type UserList<Preferences extends Models.Preferences> = {
|
|
46
|
+
/**
|
|
47
|
+
* Total number of items available on the server.
|
|
48
|
+
*/
|
|
49
|
+
sum: number;
|
|
50
|
+
/**
|
|
51
|
+
* List of users.
|
|
52
|
+
*/
|
|
53
|
+
users: User<Preferences>[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Sessions List
|
|
57
|
+
*/
|
|
58
|
+
export type SessionList = {
|
|
59
|
+
/**
|
|
60
|
+
* Total number of items available on the server.
|
|
61
|
+
*/
|
|
62
|
+
sum: number;
|
|
63
|
+
/**
|
|
64
|
+
* List of sessions.
|
|
65
|
+
*/
|
|
66
|
+
sessions: Session[];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Logs List
|
|
70
|
+
*/
|
|
71
|
+
export type LogList = {
|
|
72
|
+
/**
|
|
73
|
+
* Total number of items available on the server.
|
|
74
|
+
*/
|
|
75
|
+
sum: number;
|
|
76
|
+
/**
|
|
77
|
+
* List of logs.
|
|
78
|
+
*/
|
|
79
|
+
logs: Log[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Files List
|
|
83
|
+
*/
|
|
84
|
+
export type FileList = {
|
|
85
|
+
/**
|
|
86
|
+
* Total number of items available on the server.
|
|
87
|
+
*/
|
|
88
|
+
sum: number;
|
|
89
|
+
/**
|
|
90
|
+
* List of files.
|
|
91
|
+
*/
|
|
92
|
+
files: File[];
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Teams List
|
|
96
|
+
*/
|
|
97
|
+
export type TeamList = {
|
|
98
|
+
/**
|
|
99
|
+
* Total number of items available on the server.
|
|
100
|
+
*/
|
|
101
|
+
sum: number;
|
|
102
|
+
/**
|
|
103
|
+
* List of teams.
|
|
104
|
+
*/
|
|
105
|
+
teams: Team[];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Memberships List
|
|
109
|
+
*/
|
|
110
|
+
export type MembershipList = {
|
|
111
|
+
/**
|
|
112
|
+
* Total number of items available on the server.
|
|
113
|
+
*/
|
|
114
|
+
sum: number;
|
|
115
|
+
/**
|
|
116
|
+
* List of memberships.
|
|
117
|
+
*/
|
|
118
|
+
memberships: Membership[];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Functions List
|
|
122
|
+
*/
|
|
123
|
+
export type FunctionList = {
|
|
124
|
+
/**
|
|
125
|
+
* Total number of items available on the server.
|
|
126
|
+
*/
|
|
127
|
+
sum: number;
|
|
128
|
+
/**
|
|
129
|
+
* List of functions.
|
|
130
|
+
*/
|
|
131
|
+
functions: Function[];
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Runtimes List
|
|
135
|
+
*/
|
|
136
|
+
export type RuntimeList = {
|
|
137
|
+
/**
|
|
138
|
+
* Total number of items available on the server.
|
|
139
|
+
*/
|
|
140
|
+
sum: number;
|
|
141
|
+
/**
|
|
142
|
+
* List of runtimes.
|
|
143
|
+
*/
|
|
144
|
+
runtimes: Runtime[];
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Tags List
|
|
148
|
+
*/
|
|
149
|
+
export type TagList = {
|
|
150
|
+
/**
|
|
151
|
+
* Total number of items available on the server.
|
|
152
|
+
*/
|
|
153
|
+
sum: number;
|
|
154
|
+
/**
|
|
155
|
+
* List of tags.
|
|
156
|
+
*/
|
|
157
|
+
tags: Tag[];
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Executions List
|
|
161
|
+
*/
|
|
162
|
+
export type ExecutionList = {
|
|
163
|
+
/**
|
|
164
|
+
* Total number of items available on the server.
|
|
165
|
+
*/
|
|
166
|
+
sum: number;
|
|
167
|
+
/**
|
|
168
|
+
* List of executions.
|
|
169
|
+
*/
|
|
170
|
+
executions: Execution[];
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Countries List
|
|
174
|
+
*/
|
|
175
|
+
export type CountryList = {
|
|
176
|
+
/**
|
|
177
|
+
* Total number of items available on the server.
|
|
178
|
+
*/
|
|
179
|
+
sum: number;
|
|
180
|
+
/**
|
|
181
|
+
* List of countries.
|
|
182
|
+
*/
|
|
183
|
+
countries: Country[];
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Continents List
|
|
187
|
+
*/
|
|
188
|
+
export type ContinentList = {
|
|
189
|
+
/**
|
|
190
|
+
* Total number of items available on the server.
|
|
191
|
+
*/
|
|
192
|
+
sum: number;
|
|
193
|
+
/**
|
|
194
|
+
* List of continents.
|
|
195
|
+
*/
|
|
196
|
+
continents: Continent[];
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Languages List
|
|
200
|
+
*/
|
|
201
|
+
export type LanguageList = {
|
|
202
|
+
/**
|
|
203
|
+
* Total number of items available on the server.
|
|
204
|
+
*/
|
|
205
|
+
sum: number;
|
|
206
|
+
/**
|
|
207
|
+
* List of languages.
|
|
208
|
+
*/
|
|
209
|
+
languages: Language[];
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Currencies List
|
|
213
|
+
*/
|
|
214
|
+
export type CurrencyList = {
|
|
215
|
+
/**
|
|
216
|
+
* Total number of items available on the server.
|
|
217
|
+
*/
|
|
218
|
+
sum: number;
|
|
219
|
+
/**
|
|
220
|
+
* List of currencies.
|
|
221
|
+
*/
|
|
222
|
+
currencies: Currency[];
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Phones List
|
|
226
|
+
*/
|
|
227
|
+
export type PhoneList = {
|
|
228
|
+
/**
|
|
229
|
+
* Total number of items available on the server.
|
|
230
|
+
*/
|
|
231
|
+
sum: number;
|
|
232
|
+
/**
|
|
233
|
+
* List of phones.
|
|
234
|
+
*/
|
|
235
|
+
phones: Phone[];
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Collection
|
|
239
|
+
*/
|
|
240
|
+
export type Collection = {
|
|
241
|
+
/**
|
|
242
|
+
* Collection ID.
|
|
243
|
+
*/
|
|
244
|
+
$id: string;
|
|
245
|
+
/**
|
|
246
|
+
* Collection read permissions.
|
|
247
|
+
*/
|
|
248
|
+
$read: string[];
|
|
249
|
+
/**
|
|
250
|
+
* Collection write permissions.
|
|
251
|
+
*/
|
|
252
|
+
$write: string[];
|
|
253
|
+
/**
|
|
254
|
+
* Collection name.
|
|
255
|
+
*/
|
|
256
|
+
name: string;
|
|
257
|
+
/**
|
|
258
|
+
* Collection enabled.
|
|
259
|
+
*/
|
|
260
|
+
enabled: boolean;
|
|
261
|
+
/**
|
|
262
|
+
* Collection permission model. Possible values: `document` or `collection`
|
|
263
|
+
*/
|
|
264
|
+
permission: string;
|
|
265
|
+
/**
|
|
266
|
+
* Collection attributes.
|
|
267
|
+
*/
|
|
268
|
+
attributes: string[];
|
|
269
|
+
/**
|
|
270
|
+
* Collection indexes.
|
|
271
|
+
*/
|
|
272
|
+
indexes: Index[];
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Attributes List
|
|
276
|
+
*/
|
|
277
|
+
export type AttributeList = {
|
|
278
|
+
/**
|
|
279
|
+
* Total sum of items in the list.
|
|
280
|
+
*/
|
|
281
|
+
sum: number;
|
|
282
|
+
/**
|
|
283
|
+
* List of attributes.
|
|
284
|
+
*/
|
|
285
|
+
attributes: string[];
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* AttributeString
|
|
289
|
+
*/
|
|
290
|
+
export type AttributeString = {
|
|
291
|
+
/**
|
|
292
|
+
* Attribute Key.
|
|
293
|
+
*/
|
|
294
|
+
key: string;
|
|
295
|
+
/**
|
|
296
|
+
* Attribute type.
|
|
297
|
+
*/
|
|
298
|
+
type: string;
|
|
299
|
+
/**
|
|
300
|
+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
|
|
301
|
+
*/
|
|
302
|
+
status: string;
|
|
303
|
+
/**
|
|
304
|
+
* Is attribute required?
|
|
305
|
+
*/
|
|
306
|
+
required: boolean;
|
|
307
|
+
/**
|
|
308
|
+
* Is attribute an array?
|
|
309
|
+
*/
|
|
310
|
+
array?: boolean;
|
|
311
|
+
/**
|
|
312
|
+
* Attribute size.
|
|
313
|
+
*/
|
|
314
|
+
size: string;
|
|
315
|
+
/**
|
|
316
|
+
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
317
|
+
*/
|
|
318
|
+
xdefault?: string;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* AttributeInteger
|
|
322
|
+
*/
|
|
323
|
+
export type AttributeInteger = {
|
|
324
|
+
/**
|
|
325
|
+
* Attribute Key.
|
|
326
|
+
*/
|
|
327
|
+
key: string;
|
|
328
|
+
/**
|
|
329
|
+
* Attribute type.
|
|
330
|
+
*/
|
|
331
|
+
type: string;
|
|
332
|
+
/**
|
|
333
|
+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
|
|
334
|
+
*/
|
|
335
|
+
status: string;
|
|
336
|
+
/**
|
|
337
|
+
* Is attribute required?
|
|
338
|
+
*/
|
|
339
|
+
required: boolean;
|
|
340
|
+
/**
|
|
341
|
+
* Is attribute an array?
|
|
342
|
+
*/
|
|
343
|
+
array?: boolean;
|
|
344
|
+
/**
|
|
345
|
+
* Minimum value to enforce for new documents.
|
|
346
|
+
*/
|
|
347
|
+
min?: number;
|
|
348
|
+
/**
|
|
349
|
+
* Maximum value to enforce for new documents.
|
|
350
|
+
*/
|
|
351
|
+
max?: number;
|
|
352
|
+
/**
|
|
353
|
+
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
354
|
+
*/
|
|
355
|
+
xdefault?: number;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* AttributeFloat
|
|
359
|
+
*/
|
|
360
|
+
export type AttributeFloat = {
|
|
361
|
+
/**
|
|
362
|
+
* Attribute Key.
|
|
363
|
+
*/
|
|
364
|
+
key: string;
|
|
365
|
+
/**
|
|
366
|
+
* Attribute type.
|
|
367
|
+
*/
|
|
368
|
+
type: string;
|
|
369
|
+
/**
|
|
370
|
+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
|
|
371
|
+
*/
|
|
372
|
+
status: string;
|
|
373
|
+
/**
|
|
374
|
+
* Is attribute required?
|
|
375
|
+
*/
|
|
376
|
+
required: boolean;
|
|
377
|
+
/**
|
|
378
|
+
* Is attribute an array?
|
|
379
|
+
*/
|
|
380
|
+
array?: boolean;
|
|
381
|
+
/**
|
|
382
|
+
* Minimum value to enforce for new documents.
|
|
383
|
+
*/
|
|
384
|
+
min?: number;
|
|
385
|
+
/**
|
|
386
|
+
* Maximum value to enforce for new documents.
|
|
387
|
+
*/
|
|
388
|
+
max?: number;
|
|
389
|
+
/**
|
|
390
|
+
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
391
|
+
*/
|
|
392
|
+
xdefault?: number;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* AttributeBoolean
|
|
396
|
+
*/
|
|
397
|
+
export type AttributeBoolean = {
|
|
398
|
+
/**
|
|
399
|
+
* Attribute Key.
|
|
400
|
+
*/
|
|
401
|
+
key: string;
|
|
402
|
+
/**
|
|
403
|
+
* Attribute type.
|
|
404
|
+
*/
|
|
405
|
+
type: string;
|
|
406
|
+
/**
|
|
407
|
+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
|
|
408
|
+
*/
|
|
409
|
+
status: string;
|
|
410
|
+
/**
|
|
411
|
+
* Is attribute required?
|
|
412
|
+
*/
|
|
413
|
+
required: boolean;
|
|
414
|
+
/**
|
|
415
|
+
* Is attribute an array?
|
|
416
|
+
*/
|
|
417
|
+
array?: boolean;
|
|
418
|
+
/**
|
|
419
|
+
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
420
|
+
*/
|
|
421
|
+
xdefault?: boolean;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* AttributeEmail
|
|
425
|
+
*/
|
|
426
|
+
export type AttributeEmail = {
|
|
427
|
+
/**
|
|
428
|
+
* Attribute Key.
|
|
429
|
+
*/
|
|
430
|
+
key: string;
|
|
431
|
+
/**
|
|
432
|
+
* Attribute type.
|
|
433
|
+
*/
|
|
434
|
+
type: string;
|
|
435
|
+
/**
|
|
436
|
+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
|
|
437
|
+
*/
|
|
438
|
+
status: string;
|
|
439
|
+
/**
|
|
440
|
+
* Is attribute required?
|
|
441
|
+
*/
|
|
442
|
+
required: boolean;
|
|
443
|
+
/**
|
|
444
|
+
* Is attribute an array?
|
|
445
|
+
*/
|
|
446
|
+
array?: boolean;
|
|
447
|
+
/**
|
|
448
|
+
* String format.
|
|
449
|
+
*/
|
|
450
|
+
format: string;
|
|
451
|
+
/**
|
|
452
|
+
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
453
|
+
*/
|
|
454
|
+
xdefault?: string;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* AttributeEnum
|
|
458
|
+
*/
|
|
459
|
+
export type AttributeEnum = {
|
|
460
|
+
/**
|
|
461
|
+
* Attribute Key.
|
|
462
|
+
*/
|
|
463
|
+
key: string;
|
|
464
|
+
/**
|
|
465
|
+
* Attribute type.
|
|
466
|
+
*/
|
|
467
|
+
type: string;
|
|
468
|
+
/**
|
|
469
|
+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
|
|
470
|
+
*/
|
|
471
|
+
status: string;
|
|
472
|
+
/**
|
|
473
|
+
* Is attribute required?
|
|
474
|
+
*/
|
|
475
|
+
required: boolean;
|
|
476
|
+
/**
|
|
477
|
+
* Is attribute an array?
|
|
478
|
+
*/
|
|
479
|
+
array?: boolean;
|
|
480
|
+
/**
|
|
481
|
+
* Array of elements in enumerated type.
|
|
482
|
+
*/
|
|
483
|
+
elements: string[];
|
|
484
|
+
/**
|
|
485
|
+
* String format.
|
|
486
|
+
*/
|
|
487
|
+
format: string;
|
|
488
|
+
/**
|
|
489
|
+
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
490
|
+
*/
|
|
491
|
+
xdefault?: string;
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* AttributeIP
|
|
495
|
+
*/
|
|
496
|
+
export type AttributeIp = {
|
|
497
|
+
/**
|
|
498
|
+
* Attribute Key.
|
|
499
|
+
*/
|
|
500
|
+
key: string;
|
|
501
|
+
/**
|
|
502
|
+
* Attribute type.
|
|
503
|
+
*/
|
|
504
|
+
type: string;
|
|
505
|
+
/**
|
|
506
|
+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
|
|
507
|
+
*/
|
|
508
|
+
status: string;
|
|
509
|
+
/**
|
|
510
|
+
* Is attribute required?
|
|
511
|
+
*/
|
|
512
|
+
required: boolean;
|
|
513
|
+
/**
|
|
514
|
+
* Is attribute an array?
|
|
515
|
+
*/
|
|
516
|
+
array?: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* String format.
|
|
519
|
+
*/
|
|
520
|
+
format: string;
|
|
521
|
+
/**
|
|
522
|
+
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
523
|
+
*/
|
|
524
|
+
xdefault?: string;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* AttributeURL
|
|
528
|
+
*/
|
|
529
|
+
export type AttributeUrl = {
|
|
530
|
+
/**
|
|
531
|
+
* Attribute Key.
|
|
532
|
+
*/
|
|
533
|
+
key: string;
|
|
534
|
+
/**
|
|
535
|
+
* Attribute type.
|
|
536
|
+
*/
|
|
537
|
+
type: string;
|
|
538
|
+
/**
|
|
539
|
+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
|
|
540
|
+
*/
|
|
541
|
+
status: string;
|
|
542
|
+
/**
|
|
543
|
+
* Is attribute required?
|
|
544
|
+
*/
|
|
545
|
+
required: boolean;
|
|
546
|
+
/**
|
|
547
|
+
* Is attribute an array?
|
|
548
|
+
*/
|
|
549
|
+
array?: boolean;
|
|
550
|
+
/**
|
|
551
|
+
* String format.
|
|
552
|
+
*/
|
|
553
|
+
format: string;
|
|
554
|
+
/**
|
|
555
|
+
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
556
|
+
*/
|
|
557
|
+
xdefault?: string;
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Index
|
|
561
|
+
*/
|
|
562
|
+
export type Index = {
|
|
563
|
+
/**
|
|
564
|
+
* Index Key.
|
|
565
|
+
*/
|
|
566
|
+
key: string;
|
|
567
|
+
/**
|
|
568
|
+
* Index type.
|
|
569
|
+
*/
|
|
570
|
+
type: string;
|
|
571
|
+
/**
|
|
572
|
+
* Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
|
|
573
|
+
*/
|
|
574
|
+
status: string;
|
|
575
|
+
/**
|
|
576
|
+
* Index attributes.
|
|
577
|
+
*/
|
|
578
|
+
attributes: string[];
|
|
579
|
+
/**
|
|
580
|
+
* Index orders.
|
|
581
|
+
*/
|
|
582
|
+
orders: string[];
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* Document
|
|
586
|
+
*/
|
|
587
|
+
export type Document = {
|
|
588
|
+
/**
|
|
589
|
+
* Document ID.
|
|
590
|
+
*/
|
|
591
|
+
$id: string;
|
|
592
|
+
/**
|
|
593
|
+
* Collection ID.
|
|
594
|
+
*/
|
|
595
|
+
$collection: string;
|
|
596
|
+
/**
|
|
597
|
+
* Document read permissions.
|
|
598
|
+
*/
|
|
599
|
+
$read: string[];
|
|
600
|
+
/**
|
|
601
|
+
* Document write permissions.
|
|
602
|
+
*/
|
|
603
|
+
$write: string[];
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Log
|
|
607
|
+
*/
|
|
608
|
+
export type Log = {
|
|
609
|
+
/**
|
|
610
|
+
* Event name.
|
|
611
|
+
*/
|
|
612
|
+
event: string;
|
|
613
|
+
/**
|
|
614
|
+
* User ID.
|
|
615
|
+
*/
|
|
616
|
+
userId: string;
|
|
617
|
+
/**
|
|
618
|
+
* User Email.
|
|
619
|
+
*/
|
|
620
|
+
userEmail: string;
|
|
621
|
+
/**
|
|
622
|
+
* User Name.
|
|
623
|
+
*/
|
|
624
|
+
userName: string;
|
|
625
|
+
/**
|
|
626
|
+
* API mode when event triggered.
|
|
627
|
+
*/
|
|
628
|
+
mode: string;
|
|
629
|
+
/**
|
|
630
|
+
* IP session in use when the session was created.
|
|
631
|
+
*/
|
|
632
|
+
ip: string;
|
|
633
|
+
/**
|
|
634
|
+
* Log creation time in Unix timestamp.
|
|
635
|
+
*/
|
|
636
|
+
time: number;
|
|
637
|
+
/**
|
|
638
|
+
* Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).
|
|
639
|
+
*/
|
|
640
|
+
osCode: string;
|
|
641
|
+
/**
|
|
642
|
+
* Operating system name.
|
|
643
|
+
*/
|
|
644
|
+
osName: string;
|
|
645
|
+
/**
|
|
646
|
+
* Operating system version.
|
|
647
|
+
*/
|
|
648
|
+
osVersion: string;
|
|
649
|
+
/**
|
|
650
|
+
* Client type.
|
|
651
|
+
*/
|
|
652
|
+
clientType: string;
|
|
653
|
+
/**
|
|
654
|
+
* Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).
|
|
655
|
+
*/
|
|
656
|
+
clientCode: string;
|
|
657
|
+
/**
|
|
658
|
+
* Client name.
|
|
659
|
+
*/
|
|
660
|
+
clientName: string;
|
|
661
|
+
/**
|
|
662
|
+
* Client version.
|
|
663
|
+
*/
|
|
664
|
+
clientVersion: string;
|
|
665
|
+
/**
|
|
666
|
+
* Client engine name.
|
|
667
|
+
*/
|
|
668
|
+
clientEngine: string;
|
|
669
|
+
/**
|
|
670
|
+
* Client engine name.
|
|
671
|
+
*/
|
|
672
|
+
clientEngineVersion: string;
|
|
673
|
+
/**
|
|
674
|
+
* Device name.
|
|
675
|
+
*/
|
|
676
|
+
deviceName: string;
|
|
677
|
+
/**
|
|
678
|
+
* Device brand name.
|
|
679
|
+
*/
|
|
680
|
+
deviceBrand: string;
|
|
681
|
+
/**
|
|
682
|
+
* Device model name.
|
|
683
|
+
*/
|
|
684
|
+
deviceModel: string;
|
|
685
|
+
/**
|
|
686
|
+
* Country two-character ISO 3166-1 alpha code.
|
|
687
|
+
*/
|
|
688
|
+
countryCode: string;
|
|
689
|
+
/**
|
|
690
|
+
* Country name.
|
|
691
|
+
*/
|
|
692
|
+
countryName: string;
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* User
|
|
696
|
+
*/
|
|
697
|
+
export type User<Preferences extends Models.Preferences> = {
|
|
698
|
+
/**
|
|
699
|
+
* User ID.
|
|
700
|
+
*/
|
|
701
|
+
$id: string;
|
|
702
|
+
/**
|
|
703
|
+
* User name.
|
|
704
|
+
*/
|
|
705
|
+
name: string;
|
|
706
|
+
/**
|
|
707
|
+
* User registration date in Unix timestamp.
|
|
708
|
+
*/
|
|
709
|
+
registration: number;
|
|
710
|
+
/**
|
|
711
|
+
* User status. Pass `true` for enabled and `false` for disabled.
|
|
712
|
+
*/
|
|
713
|
+
status: boolean;
|
|
714
|
+
/**
|
|
715
|
+
* Unix timestamp of the most recent password update
|
|
716
|
+
*/
|
|
717
|
+
passwordUpdate: number;
|
|
718
|
+
/**
|
|
719
|
+
* User email address.
|
|
720
|
+
*/
|
|
721
|
+
email: string;
|
|
722
|
+
/**
|
|
723
|
+
* Email verification status.
|
|
724
|
+
*/
|
|
725
|
+
emailVerification: boolean;
|
|
726
|
+
/**
|
|
727
|
+
* User preferences as a key-value object
|
|
728
|
+
*/
|
|
729
|
+
prefs: Preferences;
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Preferences
|
|
733
|
+
*/
|
|
734
|
+
export type Preferences = {
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* Session
|
|
738
|
+
*/
|
|
739
|
+
export type Session = {
|
|
740
|
+
/**
|
|
741
|
+
* Session ID.
|
|
742
|
+
*/
|
|
743
|
+
$id: string;
|
|
744
|
+
/**
|
|
745
|
+
* User ID.
|
|
746
|
+
*/
|
|
747
|
+
userId: string;
|
|
748
|
+
/**
|
|
749
|
+
* Session expiration date in Unix timestamp.
|
|
750
|
+
*/
|
|
751
|
+
expire: number;
|
|
752
|
+
/**
|
|
753
|
+
* Session Provider.
|
|
754
|
+
*/
|
|
755
|
+
provider: string;
|
|
756
|
+
/**
|
|
757
|
+
* Session Provider User ID.
|
|
758
|
+
*/
|
|
759
|
+
providerUid: string;
|
|
760
|
+
/**
|
|
761
|
+
* Session Provider Token.
|
|
762
|
+
*/
|
|
763
|
+
providerToken: string;
|
|
764
|
+
/**
|
|
765
|
+
* IP in use when the session was created.
|
|
766
|
+
*/
|
|
767
|
+
ip: string;
|
|
768
|
+
/**
|
|
769
|
+
* Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).
|
|
770
|
+
*/
|
|
771
|
+
osCode: string;
|
|
772
|
+
/**
|
|
773
|
+
* Operating system name.
|
|
774
|
+
*/
|
|
775
|
+
osName: string;
|
|
776
|
+
/**
|
|
777
|
+
* Operating system version.
|
|
778
|
+
*/
|
|
779
|
+
osVersion: string;
|
|
780
|
+
/**
|
|
781
|
+
* Client type.
|
|
782
|
+
*/
|
|
783
|
+
clientType: string;
|
|
784
|
+
/**
|
|
785
|
+
* Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).
|
|
786
|
+
*/
|
|
787
|
+
clientCode: string;
|
|
788
|
+
/**
|
|
789
|
+
* Client name.
|
|
790
|
+
*/
|
|
791
|
+
clientName: string;
|
|
792
|
+
/**
|
|
793
|
+
* Client version.
|
|
794
|
+
*/
|
|
795
|
+
clientVersion: string;
|
|
796
|
+
/**
|
|
797
|
+
* Client engine name.
|
|
798
|
+
*/
|
|
799
|
+
clientEngine: string;
|
|
800
|
+
/**
|
|
801
|
+
* Client engine name.
|
|
802
|
+
*/
|
|
803
|
+
clientEngineVersion: string;
|
|
804
|
+
/**
|
|
805
|
+
* Device name.
|
|
806
|
+
*/
|
|
807
|
+
deviceName: string;
|
|
808
|
+
/**
|
|
809
|
+
* Device brand name.
|
|
810
|
+
*/
|
|
811
|
+
deviceBrand: string;
|
|
812
|
+
/**
|
|
813
|
+
* Device model name.
|
|
814
|
+
*/
|
|
815
|
+
deviceModel: string;
|
|
816
|
+
/**
|
|
817
|
+
* Country two-character ISO 3166-1 alpha code.
|
|
818
|
+
*/
|
|
819
|
+
countryCode: string;
|
|
820
|
+
/**
|
|
821
|
+
* Country name.
|
|
822
|
+
*/
|
|
823
|
+
countryName: string;
|
|
824
|
+
/**
|
|
825
|
+
* Returns true if this the current user session.
|
|
826
|
+
*/
|
|
827
|
+
current: boolean;
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Token
|
|
831
|
+
*/
|
|
832
|
+
export type Token = {
|
|
833
|
+
/**
|
|
834
|
+
* Token ID.
|
|
835
|
+
*/
|
|
836
|
+
$id: string;
|
|
837
|
+
/**
|
|
838
|
+
* User ID.
|
|
839
|
+
*/
|
|
840
|
+
userId: string;
|
|
841
|
+
/**
|
|
842
|
+
* Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
|
|
843
|
+
*/
|
|
844
|
+
secret: string;
|
|
845
|
+
/**
|
|
846
|
+
* Token expiration date in Unix timestamp.
|
|
847
|
+
*/
|
|
848
|
+
expire: number;
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* Locale
|
|
852
|
+
*/
|
|
853
|
+
export type Locale = {
|
|
854
|
+
/**
|
|
855
|
+
* User IP address.
|
|
856
|
+
*/
|
|
857
|
+
ip: string;
|
|
858
|
+
/**
|
|
859
|
+
* Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format
|
|
860
|
+
*/
|
|
861
|
+
countryCode: string;
|
|
862
|
+
/**
|
|
863
|
+
* Country name. This field support localization.
|
|
864
|
+
*/
|
|
865
|
+
country: string;
|
|
866
|
+
/**
|
|
867
|
+
* Continent code. A two character continent code "AF" for Africa, "AN" for Antarctica, "AS" for Asia, "EU" for Europe, "NA" for North America, "OC" for Oceania, and "SA" for South America.
|
|
868
|
+
*/
|
|
869
|
+
continentCode: string;
|
|
870
|
+
/**
|
|
871
|
+
* Continent name. This field support localization.
|
|
872
|
+
*/
|
|
873
|
+
continent: string;
|
|
874
|
+
/**
|
|
875
|
+
* True if country is part of the Europian Union.
|
|
876
|
+
*/
|
|
877
|
+
eu: boolean;
|
|
878
|
+
/**
|
|
879
|
+
* Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format
|
|
880
|
+
*/
|
|
881
|
+
currency: string;
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* File
|
|
885
|
+
*/
|
|
886
|
+
export type File = {
|
|
887
|
+
/**
|
|
888
|
+
* File ID.
|
|
889
|
+
*/
|
|
890
|
+
$id: string;
|
|
891
|
+
/**
|
|
892
|
+
* File read permissions.
|
|
893
|
+
*/
|
|
894
|
+
$read: string[];
|
|
895
|
+
/**
|
|
896
|
+
* File write permissions.
|
|
897
|
+
*/
|
|
898
|
+
$write: string[];
|
|
899
|
+
/**
|
|
900
|
+
* File name.
|
|
901
|
+
*/
|
|
902
|
+
name: string;
|
|
903
|
+
/**
|
|
904
|
+
* File creation date in Unix timestamp.
|
|
905
|
+
*/
|
|
906
|
+
dateCreated: number;
|
|
907
|
+
/**
|
|
908
|
+
* File MD5 signature.
|
|
909
|
+
*/
|
|
910
|
+
signature: string;
|
|
911
|
+
/**
|
|
912
|
+
* File mime type.
|
|
913
|
+
*/
|
|
914
|
+
mimeType: string;
|
|
915
|
+
/**
|
|
916
|
+
* File original size in bytes.
|
|
917
|
+
*/
|
|
918
|
+
sizeOriginal: number;
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* Team
|
|
922
|
+
*/
|
|
923
|
+
export type Team = {
|
|
924
|
+
/**
|
|
925
|
+
* Team ID.
|
|
926
|
+
*/
|
|
927
|
+
$id: string;
|
|
928
|
+
/**
|
|
929
|
+
* Team name.
|
|
930
|
+
*/
|
|
931
|
+
name: string;
|
|
932
|
+
/**
|
|
933
|
+
* Team creation date in Unix timestamp.
|
|
934
|
+
*/
|
|
935
|
+
dateCreated: number;
|
|
936
|
+
/**
|
|
937
|
+
* Total sum of team members.
|
|
938
|
+
*/
|
|
939
|
+
sum: number;
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Membership
|
|
943
|
+
*/
|
|
944
|
+
export type Membership = {
|
|
945
|
+
/**
|
|
946
|
+
* Membership ID.
|
|
947
|
+
*/
|
|
948
|
+
$id: string;
|
|
949
|
+
/**
|
|
950
|
+
* User ID.
|
|
951
|
+
*/
|
|
952
|
+
userId: string;
|
|
953
|
+
/**
|
|
954
|
+
* Team ID.
|
|
955
|
+
*/
|
|
956
|
+
teamId: string;
|
|
957
|
+
/**
|
|
958
|
+
* User name.
|
|
959
|
+
*/
|
|
960
|
+
name: string;
|
|
961
|
+
/**
|
|
962
|
+
* User email address.
|
|
963
|
+
*/
|
|
964
|
+
email: string;
|
|
965
|
+
/**
|
|
966
|
+
* Date, the user has been invited to join the team in Unix timestamp.
|
|
967
|
+
*/
|
|
968
|
+
invited: number;
|
|
969
|
+
/**
|
|
970
|
+
* Date, the user has accepted the invitation to join the team in Unix timestamp.
|
|
971
|
+
*/
|
|
972
|
+
joined: number;
|
|
973
|
+
/**
|
|
974
|
+
* User confirmation status, true if the user has joined the team or false otherwise.
|
|
975
|
+
*/
|
|
976
|
+
confirm: boolean;
|
|
977
|
+
/**
|
|
978
|
+
* User list of roles
|
|
979
|
+
*/
|
|
980
|
+
roles: string[];
|
|
981
|
+
}
|
|
982
|
+
/**
|
|
983
|
+
* Function
|
|
984
|
+
*/
|
|
985
|
+
export type Function = {
|
|
986
|
+
/**
|
|
987
|
+
* Function ID.
|
|
988
|
+
*/
|
|
989
|
+
$id: string;
|
|
990
|
+
/**
|
|
991
|
+
* Execution permissions.
|
|
992
|
+
*/
|
|
993
|
+
execute: string;
|
|
994
|
+
/**
|
|
995
|
+
* Function name.
|
|
996
|
+
*/
|
|
997
|
+
name: string;
|
|
998
|
+
/**
|
|
999
|
+
* Function creation date in Unix timestamp.
|
|
1000
|
+
*/
|
|
1001
|
+
dateCreated: number;
|
|
1002
|
+
/**
|
|
1003
|
+
* Function update date in Unix timestamp.
|
|
1004
|
+
*/
|
|
1005
|
+
dateUpdated: number;
|
|
1006
|
+
/**
|
|
1007
|
+
* Function status. Possible values: `disabled`, `enabled`
|
|
1008
|
+
*/
|
|
1009
|
+
status: string;
|
|
1010
|
+
/**
|
|
1011
|
+
* Function execution runtime.
|
|
1012
|
+
*/
|
|
1013
|
+
runtime: string;
|
|
1014
|
+
/**
|
|
1015
|
+
* Function active tag ID.
|
|
1016
|
+
*/
|
|
1017
|
+
tag: string;
|
|
1018
|
+
/**
|
|
1019
|
+
* Function environment variables.
|
|
1020
|
+
*/
|
|
1021
|
+
vars: string;
|
|
1022
|
+
/**
|
|
1023
|
+
* Function trigger events.
|
|
1024
|
+
*/
|
|
1025
|
+
events: string[];
|
|
1026
|
+
/**
|
|
1027
|
+
* Function execution schedult in CRON format.
|
|
1028
|
+
*/
|
|
1029
|
+
schedule: string;
|
|
1030
|
+
/**
|
|
1031
|
+
* Function next scheduled execution date in Unix timestamp.
|
|
1032
|
+
*/
|
|
1033
|
+
scheduleNext: number;
|
|
1034
|
+
/**
|
|
1035
|
+
* Function next scheduled execution date in Unix timestamp.
|
|
1036
|
+
*/
|
|
1037
|
+
schedulePrevious: number;
|
|
1038
|
+
/**
|
|
1039
|
+
* Function execution timeout in seconds.
|
|
1040
|
+
*/
|
|
1041
|
+
timeout: number;
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* Runtime
|
|
1045
|
+
*/
|
|
1046
|
+
export type Runtime = {
|
|
1047
|
+
/**
|
|
1048
|
+
* Runtime ID.
|
|
1049
|
+
*/
|
|
1050
|
+
$id: string;
|
|
1051
|
+
/**
|
|
1052
|
+
* Runtime Name.
|
|
1053
|
+
*/
|
|
1054
|
+
name: string;
|
|
1055
|
+
/**
|
|
1056
|
+
* Runtime version.
|
|
1057
|
+
*/
|
|
1058
|
+
version: string;
|
|
1059
|
+
/**
|
|
1060
|
+
* Base Docker image used to build the runtime.
|
|
1061
|
+
*/
|
|
1062
|
+
base: string;
|
|
1063
|
+
/**
|
|
1064
|
+
* Image name of Docker Hub.
|
|
1065
|
+
*/
|
|
1066
|
+
image: string;
|
|
1067
|
+
/**
|
|
1068
|
+
* Name of the logo image.
|
|
1069
|
+
*/
|
|
1070
|
+
logo: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* List of supported architectures.
|
|
1073
|
+
*/
|
|
1074
|
+
supports: string[];
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* Tag
|
|
1078
|
+
*/
|
|
1079
|
+
export type Tag = {
|
|
1080
|
+
/**
|
|
1081
|
+
* Tag ID.
|
|
1082
|
+
*/
|
|
1083
|
+
$id: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* Function ID.
|
|
1086
|
+
*/
|
|
1087
|
+
functionId: string;
|
|
1088
|
+
/**
|
|
1089
|
+
* The tag creation date in Unix timestamp.
|
|
1090
|
+
*/
|
|
1091
|
+
dateCreated: number;
|
|
1092
|
+
/**
|
|
1093
|
+
* The entrypoint command in use to execute the tag code.
|
|
1094
|
+
*/
|
|
1095
|
+
command: string;
|
|
1096
|
+
/**
|
|
1097
|
+
* The code size in bytes.
|
|
1098
|
+
*/
|
|
1099
|
+
size: string;
|
|
1100
|
+
}
|
|
1101
|
+
/**
|
|
1102
|
+
* Execution
|
|
1103
|
+
*/
|
|
1104
|
+
export type Execution = {
|
|
1105
|
+
/**
|
|
1106
|
+
* Execution ID.
|
|
1107
|
+
*/
|
|
1108
|
+
$id: string;
|
|
1109
|
+
/**
|
|
1110
|
+
* Execution read permissions.
|
|
1111
|
+
*/
|
|
1112
|
+
$read: string[];
|
|
1113
|
+
/**
|
|
1114
|
+
* Function ID.
|
|
1115
|
+
*/
|
|
1116
|
+
functionId: string;
|
|
1117
|
+
/**
|
|
1118
|
+
* The execution creation date in Unix timestamp.
|
|
1119
|
+
*/
|
|
1120
|
+
dateCreated: number;
|
|
1121
|
+
/**
|
|
1122
|
+
* The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.
|
|
1123
|
+
*/
|
|
1124
|
+
trigger: string;
|
|
1125
|
+
/**
|
|
1126
|
+
* The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.
|
|
1127
|
+
*/
|
|
1128
|
+
status: string;
|
|
1129
|
+
/**
|
|
1130
|
+
* The script exit code.
|
|
1131
|
+
*/
|
|
1132
|
+
exitCode: number;
|
|
1133
|
+
/**
|
|
1134
|
+
* The script stdout output string. Logs the last 4,000 characters of the execution stdout output.
|
|
1135
|
+
*/
|
|
1136
|
+
stdout: string;
|
|
1137
|
+
/**
|
|
1138
|
+
* The script stderr output string. Logs the last 4,000 characters of the execution stderr output
|
|
1139
|
+
*/
|
|
1140
|
+
stderr: string;
|
|
1141
|
+
/**
|
|
1142
|
+
* The script execution time in seconds.
|
|
1143
|
+
*/
|
|
1144
|
+
time: number;
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* Country
|
|
1148
|
+
*/
|
|
1149
|
+
export type Country = {
|
|
1150
|
+
/**
|
|
1151
|
+
* Country name.
|
|
1152
|
+
*/
|
|
1153
|
+
name: string;
|
|
1154
|
+
/**
|
|
1155
|
+
* Country two-character ISO 3166-1 alpha code.
|
|
1156
|
+
*/
|
|
1157
|
+
code: string;
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* Continent
|
|
1161
|
+
*/
|
|
1162
|
+
export type Continent = {
|
|
1163
|
+
/**
|
|
1164
|
+
* Continent name.
|
|
1165
|
+
*/
|
|
1166
|
+
name: string;
|
|
1167
|
+
/**
|
|
1168
|
+
* Continent two letter code.
|
|
1169
|
+
*/
|
|
1170
|
+
code: string;
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Language
|
|
1174
|
+
*/
|
|
1175
|
+
export type Language = {
|
|
1176
|
+
/**
|
|
1177
|
+
* Language name.
|
|
1178
|
+
*/
|
|
1179
|
+
name: string;
|
|
1180
|
+
/**
|
|
1181
|
+
* Language two-character ISO 639-1 codes.
|
|
1182
|
+
*/
|
|
1183
|
+
code: string;
|
|
1184
|
+
/**
|
|
1185
|
+
* Language native name.
|
|
1186
|
+
*/
|
|
1187
|
+
nativeName: string;
|
|
1188
|
+
}
|
|
1189
|
+
/**
|
|
1190
|
+
* Currency
|
|
1191
|
+
*/
|
|
1192
|
+
export type Currency = {
|
|
1193
|
+
/**
|
|
1194
|
+
* Currency symbol.
|
|
1195
|
+
*/
|
|
1196
|
+
symbol: string;
|
|
1197
|
+
/**
|
|
1198
|
+
* Currency name.
|
|
1199
|
+
*/
|
|
1200
|
+
name: string;
|
|
1201
|
+
/**
|
|
1202
|
+
* Currency native symbol.
|
|
1203
|
+
*/
|
|
1204
|
+
symbolNative: string;
|
|
1205
|
+
/**
|
|
1206
|
+
* Number of decimal digits.
|
|
1207
|
+
*/
|
|
1208
|
+
decimalDigits: number;
|
|
1209
|
+
/**
|
|
1210
|
+
* Currency digit rounding.
|
|
1211
|
+
*/
|
|
1212
|
+
rounding: number;
|
|
1213
|
+
/**
|
|
1214
|
+
* Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.
|
|
1215
|
+
*/
|
|
1216
|
+
code: string;
|
|
1217
|
+
/**
|
|
1218
|
+
* Currency plural name
|
|
1219
|
+
*/
|
|
1220
|
+
namePlural: string;
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* Phone
|
|
1224
|
+
*/
|
|
1225
|
+
export type Phone = {
|
|
1226
|
+
/**
|
|
1227
|
+
* Phone code.
|
|
1228
|
+
*/
|
|
1229
|
+
code: string;
|
|
1230
|
+
/**
|
|
1231
|
+
* Country two-character ISO 3166-1 alpha code.
|
|
1232
|
+
*/
|
|
1233
|
+
countryCode: string;
|
|
1234
|
+
/**
|
|
1235
|
+
* Country name.
|
|
1236
|
+
*/
|
|
1237
|
+
countryName: string;
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* Health Antivirus
|
|
1241
|
+
*/
|
|
1242
|
+
export type HealthAntivirus = {
|
|
1243
|
+
/**
|
|
1244
|
+
* Antivirus version.
|
|
1245
|
+
*/
|
|
1246
|
+
version: string;
|
|
1247
|
+
/**
|
|
1248
|
+
* Antivirus status. Possible values can are: `disabled`, `offline`, `online`
|
|
1249
|
+
*/
|
|
1250
|
+
status: string;
|
|
1251
|
+
}
|
|
1252
|
+
/**
|
|
1253
|
+
* Health Queue
|
|
1254
|
+
*/
|
|
1255
|
+
export type HealthQueue = {
|
|
1256
|
+
/**
|
|
1257
|
+
* Amount of actions in the queue.
|
|
1258
|
+
*/
|
|
1259
|
+
size: number;
|
|
1260
|
+
}
|
|
1261
|
+
/**
|
|
1262
|
+
* Health Status
|
|
1263
|
+
*/
|
|
1264
|
+
export type HealthStatus = {
|
|
1265
|
+
/**
|
|
1266
|
+
* Duration in milliseconds how long the health check took.
|
|
1267
|
+
*/
|
|
1268
|
+
ping: number;
|
|
1269
|
+
/**
|
|
1270
|
+
* Service status. Possible values can are: `pass`, `fail`
|
|
1271
|
+
*/
|
|
1272
|
+
status: string;
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* Health Time
|
|
1276
|
+
*/
|
|
1277
|
+
export type HealthTime = {
|
|
1278
|
+
/**
|
|
1279
|
+
* Current unix timestamp on trustful remote server.
|
|
1280
|
+
*/
|
|
1281
|
+
remoteTime: number;
|
|
1282
|
+
/**
|
|
1283
|
+
* Current unix timestamp of local server where Appwrite runs.
|
|
1284
|
+
*/
|
|
1285
|
+
localTime: number;
|
|
1286
|
+
/**
|
|
1287
|
+
* Difference of unix remote and local timestamps in milliseconds.
|
|
1288
|
+
*/
|
|
1289
|
+
diff: number;
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
2
1292
|
export class Client {
|
|
3
1293
|
/**
|
|
4
1294
|
* Set endpoint.
|
|
@@ -73,7 +1363,6 @@ declare module "node-appwrite" {
|
|
|
73
1363
|
}
|
|
74
1364
|
|
|
75
1365
|
export class Account extends Service {
|
|
76
|
-
|
|
77
1366
|
/**
|
|
78
1367
|
* Get Account
|
|
79
1368
|
*
|
|
@@ -82,8 +1371,7 @@ declare module "node-appwrite" {
|
|
|
82
1371
|
* @throws {AppwriteException}
|
|
83
1372
|
* @returns {Promise}
|
|
84
1373
|
*/
|
|
85
|
-
get<
|
|
86
|
-
|
|
1374
|
+
get<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
|
|
87
1375
|
/**
|
|
88
1376
|
* Delete Account
|
|
89
1377
|
*
|
|
@@ -96,36 +1384,37 @@ declare module "node-appwrite" {
|
|
|
96
1384
|
* @throws {AppwriteException}
|
|
97
1385
|
* @returns {Promise}
|
|
98
1386
|
*/
|
|
99
|
-
delete
|
|
100
|
-
|
|
1387
|
+
delete(): Promise<Response>;
|
|
101
1388
|
/**
|
|
102
1389
|
* Update Account Email
|
|
103
1390
|
*
|
|
104
1391
|
* Update currently logged in user account email address. After changing user
|
|
105
|
-
* address, user confirmation status
|
|
106
|
-
*
|
|
107
|
-
*
|
|
1392
|
+
* address, the user confirmation status will get reset. A new confirmation
|
|
1393
|
+
* email is not sent automatically however you can use the send confirmation
|
|
1394
|
+
* email endpoint again to send the confirmation email. For security measures,
|
|
1395
|
+
* user password is required to complete this request.
|
|
108
1396
|
* This endpoint can also be used to convert an anonymous account to a normal
|
|
109
1397
|
* one, by passing an email address and a new password.
|
|
1398
|
+
*
|
|
110
1399
|
*
|
|
111
1400
|
* @param {string} email
|
|
112
1401
|
* @param {string} password
|
|
113
1402
|
* @throws {AppwriteException}
|
|
114
1403
|
* @returns {Promise}
|
|
115
1404
|
*/
|
|
116
|
-
updateEmail<
|
|
117
|
-
|
|
1405
|
+
updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>>;
|
|
118
1406
|
/**
|
|
119
1407
|
* Get Account Logs
|
|
120
1408
|
*
|
|
121
1409
|
* Get currently logged in user list of latest security activity logs. Each
|
|
122
1410
|
* log returns user IP address, location and date and time of log.
|
|
123
1411
|
*
|
|
1412
|
+
* @param {number} limit
|
|
1413
|
+
* @param {number} offset
|
|
124
1414
|
* @throws {AppwriteException}
|
|
125
1415
|
* @returns {Promise}
|
|
126
1416
|
*/
|
|
127
|
-
getLogs
|
|
128
|
-
|
|
1417
|
+
getLogs(limit?: number, offset?: number): Promise<Models.LogList>;
|
|
129
1418
|
/**
|
|
130
1419
|
* Update Account Name
|
|
131
1420
|
*
|
|
@@ -135,8 +1424,7 @@ declare module "node-appwrite" {
|
|
|
135
1424
|
* @throws {AppwriteException}
|
|
136
1425
|
* @returns {Promise}
|
|
137
1426
|
*/
|
|
138
|
-
updateName<
|
|
139
|
-
|
|
1427
|
+
updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.User<Preferences>>;
|
|
140
1428
|
/**
|
|
141
1429
|
* Update Account Password
|
|
142
1430
|
*
|
|
@@ -149,8 +1437,7 @@ declare module "node-appwrite" {
|
|
|
149
1437
|
* @throws {AppwriteException}
|
|
150
1438
|
* @returns {Promise}
|
|
151
1439
|
*/
|
|
152
|
-
updatePassword<
|
|
153
|
-
|
|
1440
|
+
updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
|
|
154
1441
|
/**
|
|
155
1442
|
* Get Account Preferences
|
|
156
1443
|
*
|
|
@@ -159,8 +1446,7 @@ declare module "node-appwrite" {
|
|
|
159
1446
|
* @throws {AppwriteException}
|
|
160
1447
|
* @returns {Promise}
|
|
161
1448
|
*/
|
|
162
|
-
getPrefs<
|
|
163
|
-
|
|
1449
|
+
getPrefs<Preferences extends Models.Preferences>(): Promise<Preferences>;
|
|
164
1450
|
/**
|
|
165
1451
|
* Update Account Preferences
|
|
166
1452
|
*
|
|
@@ -171,8 +1457,7 @@ declare module "node-appwrite" {
|
|
|
171
1457
|
* @throws {AppwriteException}
|
|
172
1458
|
* @returns {Promise}
|
|
173
1459
|
*/
|
|
174
|
-
updatePrefs<
|
|
175
|
-
|
|
1460
|
+
updatePrefs<Preferences extends Models.Preferences>(prefs: object): Promise<Models.User<Preferences>>;
|
|
176
1461
|
/**
|
|
177
1462
|
* Create Password Recovery
|
|
178
1463
|
*
|
|
@@ -190,10 +1475,9 @@ declare module "node-appwrite" {
|
|
|
190
1475
|
* @throws {AppwriteException}
|
|
191
1476
|
* @returns {Promise}
|
|
192
1477
|
*/
|
|
193
|
-
createRecovery
|
|
194
|
-
|
|
1478
|
+
createRecovery(email: string, url: string): Promise<Models.Token>;
|
|
195
1479
|
/**
|
|
196
|
-
*
|
|
1480
|
+
* Create Password Recovery (confirmation)
|
|
197
1481
|
*
|
|
198
1482
|
* Use this endpoint to complete the user account password reset. Both the
|
|
199
1483
|
* **userId** and **secret** arguments will be passed as query parameters to
|
|
@@ -212,8 +1496,7 @@ declare module "node-appwrite" {
|
|
|
212
1496
|
* @throws {AppwriteException}
|
|
213
1497
|
* @returns {Promise}
|
|
214
1498
|
*/
|
|
215
|
-
updateRecovery
|
|
216
|
-
|
|
1499
|
+
updateRecovery(userId: string, secret: string, password: string, passwordAgain: string): Promise<Models.Token>;
|
|
217
1500
|
/**
|
|
218
1501
|
* Get Account Sessions
|
|
219
1502
|
*
|
|
@@ -223,8 +1506,7 @@ declare module "node-appwrite" {
|
|
|
223
1506
|
* @throws {AppwriteException}
|
|
224
1507
|
* @returns {Promise}
|
|
225
1508
|
*/
|
|
226
|
-
getSessions
|
|
227
|
-
|
|
1509
|
+
getSessions(): Promise<Models.SessionList>;
|
|
228
1510
|
/**
|
|
229
1511
|
* Delete All Account Sessions
|
|
230
1512
|
*
|
|
@@ -234,8 +1516,7 @@ declare module "node-appwrite" {
|
|
|
234
1516
|
* @throws {AppwriteException}
|
|
235
1517
|
* @returns {Promise}
|
|
236
1518
|
*/
|
|
237
|
-
deleteSessions
|
|
238
|
-
|
|
1519
|
+
deleteSessions(): Promise<Response>;
|
|
239
1520
|
/**
|
|
240
1521
|
* Get Session By ID
|
|
241
1522
|
*
|
|
@@ -246,8 +1527,7 @@ declare module "node-appwrite" {
|
|
|
246
1527
|
* @throws {AppwriteException}
|
|
247
1528
|
* @returns {Promise}
|
|
248
1529
|
*/
|
|
249
|
-
getSession
|
|
250
|
-
|
|
1530
|
+
getSession(sessionId: string): Promise<Models.Session>;
|
|
251
1531
|
/**
|
|
252
1532
|
* Delete Account Session
|
|
253
1533
|
*
|
|
@@ -259,8 +1539,7 @@ declare module "node-appwrite" {
|
|
|
259
1539
|
* @throws {AppwriteException}
|
|
260
1540
|
* @returns {Promise}
|
|
261
1541
|
*/
|
|
262
|
-
deleteSession
|
|
263
|
-
|
|
1542
|
+
deleteSession(sessionId: string): Promise<Response>;
|
|
264
1543
|
/**
|
|
265
1544
|
* Create Email Verification
|
|
266
1545
|
*
|
|
@@ -284,10 +1563,9 @@ declare module "node-appwrite" {
|
|
|
284
1563
|
* @throws {AppwriteException}
|
|
285
1564
|
* @returns {Promise}
|
|
286
1565
|
*/
|
|
287
|
-
createVerification
|
|
288
|
-
|
|
1566
|
+
createVerification(url: string): Promise<Models.Token>;
|
|
289
1567
|
/**
|
|
290
|
-
*
|
|
1568
|
+
* Create Email Verification (confirmation)
|
|
291
1569
|
*
|
|
292
1570
|
* Use this endpoint to complete the user email verification process. Use both
|
|
293
1571
|
* the **userId** and **secret** parameters that were attached to your app URL
|
|
@@ -299,10 +1577,9 @@ declare module "node-appwrite" {
|
|
|
299
1577
|
* @throws {AppwriteException}
|
|
300
1578
|
* @returns {Promise}
|
|
301
1579
|
*/
|
|
302
|
-
updateVerification
|
|
1580
|
+
updateVerification(userId: string, secret: string): Promise<Models.Token>;
|
|
303
1581
|
}
|
|
304
1582
|
export class Avatars extends Service {
|
|
305
|
-
|
|
306
1583
|
/**
|
|
307
1584
|
* Get Browser Icon
|
|
308
1585
|
*
|
|
@@ -319,7 +1596,6 @@ declare module "node-appwrite" {
|
|
|
319
1596
|
* @returns {Promise}
|
|
320
1597
|
*/
|
|
321
1598
|
getBrowser(code: string, width?: number, height?: number, quality?: number): Promise<Buffer>;
|
|
322
|
-
|
|
323
1599
|
/**
|
|
324
1600
|
* Get Credit Card Icon
|
|
325
1601
|
*
|
|
@@ -335,7 +1611,6 @@ declare module "node-appwrite" {
|
|
|
335
1611
|
* @returns {Promise}
|
|
336
1612
|
*/
|
|
337
1613
|
getCreditCard(code: string, width?: number, height?: number, quality?: number): Promise<Buffer>;
|
|
338
|
-
|
|
339
1614
|
/**
|
|
340
1615
|
* Get Favicon
|
|
341
1616
|
*
|
|
@@ -348,7 +1623,6 @@ declare module "node-appwrite" {
|
|
|
348
1623
|
* @returns {Promise}
|
|
349
1624
|
*/
|
|
350
1625
|
getFavicon(url: string): Promise<Buffer>;
|
|
351
|
-
|
|
352
1626
|
/**
|
|
353
1627
|
* Get Country Flag
|
|
354
1628
|
*
|
|
@@ -364,7 +1638,6 @@ declare module "node-appwrite" {
|
|
|
364
1638
|
* @returns {Promise}
|
|
365
1639
|
*/
|
|
366
1640
|
getFlag(code: string, width?: number, height?: number, quality?: number): Promise<Buffer>;
|
|
367
|
-
|
|
368
1641
|
/**
|
|
369
1642
|
* Get Image from URL
|
|
370
1643
|
*
|
|
@@ -380,7 +1653,6 @@ declare module "node-appwrite" {
|
|
|
380
1653
|
* @returns {Promise}
|
|
381
1654
|
*/
|
|
382
1655
|
getImage(url: string, width?: number, height?: number): Promise<Buffer>;
|
|
383
|
-
|
|
384
1656
|
/**
|
|
385
1657
|
* Get User Initials
|
|
386
1658
|
*
|
|
@@ -404,7 +1676,6 @@ declare module "node-appwrite" {
|
|
|
404
1676
|
* @returns {Promise}
|
|
405
1677
|
*/
|
|
406
1678
|
getInitials(name?: string, width?: number, height?: number, color?: string, background?: string): Promise<Buffer>;
|
|
407
|
-
|
|
408
1679
|
/**
|
|
409
1680
|
* Get QR Code
|
|
410
1681
|
*
|
|
@@ -421,7 +1692,6 @@ declare module "node-appwrite" {
|
|
|
421
1692
|
getQR(text: string, size?: number, margin?: number, download?: boolean): Promise<Buffer>;
|
|
422
1693
|
}
|
|
423
1694
|
export class Database extends Service {
|
|
424
|
-
|
|
425
1695
|
/**
|
|
426
1696
|
* List Collections
|
|
427
1697
|
*
|
|
@@ -433,26 +1703,27 @@ declare module "node-appwrite" {
|
|
|
433
1703
|
* @param {string} search
|
|
434
1704
|
* @param {number} limit
|
|
435
1705
|
* @param {number} offset
|
|
1706
|
+
* @param {string} cursor
|
|
1707
|
+
* @param {string} cursorDirection
|
|
436
1708
|
* @param {string} orderType
|
|
437
1709
|
* @throws {AppwriteException}
|
|
438
1710
|
* @returns {Promise}
|
|
439
1711
|
*/
|
|
440
|
-
listCollections
|
|
441
|
-
|
|
1712
|
+
listCollections(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.CollectionList>;
|
|
442
1713
|
/**
|
|
443
1714
|
* Create Collection
|
|
444
1715
|
*
|
|
445
1716
|
* Create a new Collection.
|
|
446
1717
|
*
|
|
1718
|
+
* @param {string} collectionId
|
|
447
1719
|
* @param {string} name
|
|
1720
|
+
* @param {string} permission
|
|
448
1721
|
* @param {string[]} read
|
|
449
1722
|
* @param {string[]} write
|
|
450
|
-
* @param {string[]} rules
|
|
451
1723
|
* @throws {AppwriteException}
|
|
452
1724
|
* @returns {Promise}
|
|
453
1725
|
*/
|
|
454
|
-
createCollection
|
|
455
|
-
|
|
1726
|
+
createCollection(collectionId: string, name: string, permission: string, read: string[], write: string[]): Promise<Models.Collection>;
|
|
456
1727
|
/**
|
|
457
1728
|
* Get Collection
|
|
458
1729
|
*
|
|
@@ -463,8 +1734,7 @@ declare module "node-appwrite" {
|
|
|
463
1734
|
* @throws {AppwriteException}
|
|
464
1735
|
* @returns {Promise}
|
|
465
1736
|
*/
|
|
466
|
-
getCollection
|
|
467
|
-
|
|
1737
|
+
getCollection(collectionId: string): Promise<Models.Collection>;
|
|
468
1738
|
/**
|
|
469
1739
|
* Update Collection
|
|
470
1740
|
*
|
|
@@ -472,14 +1742,14 @@ declare module "node-appwrite" {
|
|
|
472
1742
|
*
|
|
473
1743
|
* @param {string} collectionId
|
|
474
1744
|
* @param {string} name
|
|
1745
|
+
* @param {string} permission
|
|
475
1746
|
* @param {string[]} read
|
|
476
1747
|
* @param {string[]} write
|
|
477
|
-
* @param {
|
|
1748
|
+
* @param {boolean} enabled
|
|
478
1749
|
* @throws {AppwriteException}
|
|
479
1750
|
* @returns {Promise}
|
|
480
1751
|
*/
|
|
481
|
-
updateCollection
|
|
482
|
-
|
|
1752
|
+
updateCollection(collectionId: string, name: string, permission: string, read?: string[], write?: string[], enabled?: boolean): Promise<Models.Collection>;
|
|
483
1753
|
/**
|
|
484
1754
|
* Delete Collection
|
|
485
1755
|
*
|
|
@@ -490,8 +1760,158 @@ declare module "node-appwrite" {
|
|
|
490
1760
|
* @throws {AppwriteException}
|
|
491
1761
|
* @returns {Promise}
|
|
492
1762
|
*/
|
|
493
|
-
deleteCollection
|
|
494
|
-
|
|
1763
|
+
deleteCollection(collectionId: string): Promise<Response>;
|
|
1764
|
+
/**
|
|
1765
|
+
* List Attributes
|
|
1766
|
+
*
|
|
1767
|
+
* @param {string} collectionId
|
|
1768
|
+
* @throws {AppwriteException}
|
|
1769
|
+
* @returns {Promise}
|
|
1770
|
+
*/
|
|
1771
|
+
listAttributes(collectionId: string): Promise<Models.AttributeList>;
|
|
1772
|
+
/**
|
|
1773
|
+
* Create Boolean Attribute
|
|
1774
|
+
*
|
|
1775
|
+
* Create a boolean attribute.
|
|
1776
|
+
*
|
|
1777
|
+
*
|
|
1778
|
+
* @param {string} collectionId
|
|
1779
|
+
* @param {string} key
|
|
1780
|
+
* @param {boolean} required
|
|
1781
|
+
* @param {boolean} default
|
|
1782
|
+
* @param {boolean} array
|
|
1783
|
+
* @throws {AppwriteException}
|
|
1784
|
+
* @returns {Promise}
|
|
1785
|
+
*/
|
|
1786
|
+
createBooleanAttribute(collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean>;
|
|
1787
|
+
/**
|
|
1788
|
+
* Create Email Attribute
|
|
1789
|
+
*
|
|
1790
|
+
* Create an email attribute.
|
|
1791
|
+
*
|
|
1792
|
+
*
|
|
1793
|
+
* @param {string} collectionId
|
|
1794
|
+
* @param {string} key
|
|
1795
|
+
* @param {boolean} required
|
|
1796
|
+
* @param {string} default
|
|
1797
|
+
* @param {boolean} array
|
|
1798
|
+
* @throws {AppwriteException}
|
|
1799
|
+
* @returns {Promise}
|
|
1800
|
+
*/
|
|
1801
|
+
createEmailAttribute(collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail>;
|
|
1802
|
+
/**
|
|
1803
|
+
* Create Enum Attribute
|
|
1804
|
+
*
|
|
1805
|
+
* @param {string} collectionId
|
|
1806
|
+
* @param {string} key
|
|
1807
|
+
* @param {string[]} elements
|
|
1808
|
+
* @param {boolean} required
|
|
1809
|
+
* @param {string} default
|
|
1810
|
+
* @param {boolean} array
|
|
1811
|
+
* @throws {AppwriteException}
|
|
1812
|
+
* @returns {Promise}
|
|
1813
|
+
*/
|
|
1814
|
+
createEnumAttribute(collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum>;
|
|
1815
|
+
/**
|
|
1816
|
+
* Create Float Attribute
|
|
1817
|
+
*
|
|
1818
|
+
* Create a float attribute. Optionally, minimum and maximum values can be
|
|
1819
|
+
* provided.
|
|
1820
|
+
*
|
|
1821
|
+
*
|
|
1822
|
+
* @param {string} collectionId
|
|
1823
|
+
* @param {string} key
|
|
1824
|
+
* @param {boolean} required
|
|
1825
|
+
* @param {string} min
|
|
1826
|
+
* @param {string} max
|
|
1827
|
+
* @param {string} default
|
|
1828
|
+
* @param {boolean} array
|
|
1829
|
+
* @throws {AppwriteException}
|
|
1830
|
+
* @returns {Promise}
|
|
1831
|
+
*/
|
|
1832
|
+
createFloatAttribute(collectionId: string, key: string, required: boolean, min?: string, max?: string, xdefault?: string, array?: boolean): Promise<Models.AttributeFloat>;
|
|
1833
|
+
/**
|
|
1834
|
+
* Create Integer Attribute
|
|
1835
|
+
*
|
|
1836
|
+
* Create an integer attribute. Optionally, minimum and maximum values can be
|
|
1837
|
+
* provided.
|
|
1838
|
+
*
|
|
1839
|
+
*
|
|
1840
|
+
* @param {string} collectionId
|
|
1841
|
+
* @param {string} key
|
|
1842
|
+
* @param {boolean} required
|
|
1843
|
+
* @param {number} min
|
|
1844
|
+
* @param {number} max
|
|
1845
|
+
* @param {number} default
|
|
1846
|
+
* @param {boolean} array
|
|
1847
|
+
* @throws {AppwriteException}
|
|
1848
|
+
* @returns {Promise}
|
|
1849
|
+
*/
|
|
1850
|
+
createIntegerAttribute(collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger>;
|
|
1851
|
+
/**
|
|
1852
|
+
* Create IP Address Attribute
|
|
1853
|
+
*
|
|
1854
|
+
* Create IP address attribute.
|
|
1855
|
+
*
|
|
1856
|
+
*
|
|
1857
|
+
* @param {string} collectionId
|
|
1858
|
+
* @param {string} key
|
|
1859
|
+
* @param {boolean} required
|
|
1860
|
+
* @param {string} default
|
|
1861
|
+
* @param {boolean} array
|
|
1862
|
+
* @throws {AppwriteException}
|
|
1863
|
+
* @returns {Promise}
|
|
1864
|
+
*/
|
|
1865
|
+
createIpAttribute(collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp>;
|
|
1866
|
+
/**
|
|
1867
|
+
* Create String Attribute
|
|
1868
|
+
*
|
|
1869
|
+
* Create a string attribute.
|
|
1870
|
+
*
|
|
1871
|
+
*
|
|
1872
|
+
* @param {string} collectionId
|
|
1873
|
+
* @param {string} key
|
|
1874
|
+
* @param {number} size
|
|
1875
|
+
* @param {boolean} required
|
|
1876
|
+
* @param {string} default
|
|
1877
|
+
* @param {boolean} array
|
|
1878
|
+
* @throws {AppwriteException}
|
|
1879
|
+
* @returns {Promise}
|
|
1880
|
+
*/
|
|
1881
|
+
createStringAttribute(collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeString>;
|
|
1882
|
+
/**
|
|
1883
|
+
* Create URL Attribute
|
|
1884
|
+
*
|
|
1885
|
+
* Create a URL attribute.
|
|
1886
|
+
*
|
|
1887
|
+
*
|
|
1888
|
+
* @param {string} collectionId
|
|
1889
|
+
* @param {string} key
|
|
1890
|
+
* @param {boolean} required
|
|
1891
|
+
* @param {string} default
|
|
1892
|
+
* @param {boolean} array
|
|
1893
|
+
* @throws {AppwriteException}
|
|
1894
|
+
* @returns {Promise}
|
|
1895
|
+
*/
|
|
1896
|
+
createUrlAttribute(collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl>;
|
|
1897
|
+
/**
|
|
1898
|
+
* Get Attribute
|
|
1899
|
+
*
|
|
1900
|
+
* @param {string} collectionId
|
|
1901
|
+
* @param {string} key
|
|
1902
|
+
* @throws {AppwriteException}
|
|
1903
|
+
* @returns {Promise}
|
|
1904
|
+
*/
|
|
1905
|
+
getAttribute(collectionId: string, key: string): Promise<Response>;
|
|
1906
|
+
/**
|
|
1907
|
+
* Delete Attribute
|
|
1908
|
+
*
|
|
1909
|
+
* @param {string} collectionId
|
|
1910
|
+
* @param {string} key
|
|
1911
|
+
* @throws {AppwriteException}
|
|
1912
|
+
* @returns {Promise}
|
|
1913
|
+
*/
|
|
1914
|
+
deleteAttribute(collectionId: string, key: string): Promise<Response>;
|
|
495
1915
|
/**
|
|
496
1916
|
* List Documents
|
|
497
1917
|
*
|
|
@@ -501,18 +1921,17 @@ declare module "node-appwrite" {
|
|
|
501
1921
|
* modes](/docs/admin).
|
|
502
1922
|
*
|
|
503
1923
|
* @param {string} collectionId
|
|
504
|
-
* @param {string[]}
|
|
1924
|
+
* @param {string[]} queries
|
|
505
1925
|
* @param {number} limit
|
|
506
1926
|
* @param {number} offset
|
|
507
|
-
* @param {string}
|
|
508
|
-
* @param {string}
|
|
509
|
-
* @param {string}
|
|
510
|
-
* @param {string}
|
|
1927
|
+
* @param {string} cursor
|
|
1928
|
+
* @param {string} cursorDirection
|
|
1929
|
+
* @param {string[]} orderAttributes
|
|
1930
|
+
* @param {string[]} orderTypes
|
|
511
1931
|
* @throws {AppwriteException}
|
|
512
1932
|
* @returns {Promise}
|
|
513
1933
|
*/
|
|
514
|
-
listDocuments<
|
|
515
|
-
|
|
1934
|
+
listDocuments<Document extends Models.Document>(collectionId: string, queries?: string[], limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderAttributes?: string[], orderTypes?: string[]): Promise<Models.DocumentList<Document>>;
|
|
516
1935
|
/**
|
|
517
1936
|
* Create Document
|
|
518
1937
|
*
|
|
@@ -522,17 +1941,14 @@ declare module "node-appwrite" {
|
|
|
522
1941
|
* directly from your database console.
|
|
523
1942
|
*
|
|
524
1943
|
* @param {string} collectionId
|
|
1944
|
+
* @param {string} documentId
|
|
525
1945
|
* @param {object} data
|
|
526
1946
|
* @param {string[]} read
|
|
527
1947
|
* @param {string[]} write
|
|
528
|
-
* @param {string} parentDocument
|
|
529
|
-
* @param {string} parentProperty
|
|
530
|
-
* @param {string} parentPropertyType
|
|
531
1948
|
* @throws {AppwriteException}
|
|
532
1949
|
* @returns {Promise}
|
|
533
1950
|
*/
|
|
534
|
-
createDocument<
|
|
535
|
-
|
|
1951
|
+
createDocument<Document extends Models.Document>(collectionId: string, documentId: string, data: object, read?: string[], write?: string[]): Promise<Document>;
|
|
536
1952
|
/**
|
|
537
1953
|
* Get Document
|
|
538
1954
|
*
|
|
@@ -544,8 +1960,7 @@ declare module "node-appwrite" {
|
|
|
544
1960
|
* @throws {AppwriteException}
|
|
545
1961
|
* @returns {Promise}
|
|
546
1962
|
*/
|
|
547
|
-
getDocument<
|
|
548
|
-
|
|
1963
|
+
getDocument<Document extends Models.Document>(collectionId: string, documentId: string): Promise<Document>;
|
|
549
1964
|
/**
|
|
550
1965
|
* Update Document
|
|
551
1966
|
*
|
|
@@ -560,8 +1975,7 @@ declare module "node-appwrite" {
|
|
|
560
1975
|
* @throws {AppwriteException}
|
|
561
1976
|
* @returns {Promise}
|
|
562
1977
|
*/
|
|
563
|
-
updateDocument<
|
|
564
|
-
|
|
1978
|
+
updateDocument<Document extends Models.Document>(collectionId: string, documentId: string, data: object, read?: string[], write?: string[]): Promise<Document>;
|
|
565
1979
|
/**
|
|
566
1980
|
* Delete Document
|
|
567
1981
|
*
|
|
@@ -574,10 +1988,47 @@ declare module "node-appwrite" {
|
|
|
574
1988
|
* @throws {AppwriteException}
|
|
575
1989
|
* @returns {Promise}
|
|
576
1990
|
*/
|
|
577
|
-
deleteDocument
|
|
1991
|
+
deleteDocument(collectionId: string, documentId: string): Promise<Response>;
|
|
1992
|
+
/**
|
|
1993
|
+
* List Indexes
|
|
1994
|
+
*
|
|
1995
|
+
* @param {string} collectionId
|
|
1996
|
+
* @throws {AppwriteException}
|
|
1997
|
+
* @returns {Promise}
|
|
1998
|
+
*/
|
|
1999
|
+
listIndexes(collectionId: string): Promise<Models.IndexList>;
|
|
2000
|
+
/**
|
|
2001
|
+
* Create Index
|
|
2002
|
+
*
|
|
2003
|
+
* @param {string} collectionId
|
|
2004
|
+
* @param {string} key
|
|
2005
|
+
* @param {string} type
|
|
2006
|
+
* @param {string[]} attributes
|
|
2007
|
+
* @param {string[]} orders
|
|
2008
|
+
* @throws {AppwriteException}
|
|
2009
|
+
* @returns {Promise}
|
|
2010
|
+
*/
|
|
2011
|
+
createIndex(collectionId: string, key: string, type: string, attributes: string[], orders?: string[]): Promise<Models.Index>;
|
|
2012
|
+
/**
|
|
2013
|
+
* Get Index
|
|
2014
|
+
*
|
|
2015
|
+
* @param {string} collectionId
|
|
2016
|
+
* @param {string} key
|
|
2017
|
+
* @throws {AppwriteException}
|
|
2018
|
+
* @returns {Promise}
|
|
2019
|
+
*/
|
|
2020
|
+
getIndex(collectionId: string, key: string): Promise<Models.Index>;
|
|
2021
|
+
/**
|
|
2022
|
+
* Delete Index
|
|
2023
|
+
*
|
|
2024
|
+
* @param {string} collectionId
|
|
2025
|
+
* @param {string} key
|
|
2026
|
+
* @throws {AppwriteException}
|
|
2027
|
+
* @returns {Promise}
|
|
2028
|
+
*/
|
|
2029
|
+
deleteIndex(collectionId: string, key: string): Promise<Response>;
|
|
578
2030
|
}
|
|
579
2031
|
export class Functions extends Service {
|
|
580
|
-
|
|
581
2032
|
/**
|
|
582
2033
|
* List Functions
|
|
583
2034
|
*
|
|
@@ -587,12 +2038,13 @@ declare module "node-appwrite" {
|
|
|
587
2038
|
* @param {string} search
|
|
588
2039
|
* @param {number} limit
|
|
589
2040
|
* @param {number} offset
|
|
2041
|
+
* @param {string} cursor
|
|
2042
|
+
* @param {string} cursorDirection
|
|
590
2043
|
* @param {string} orderType
|
|
591
2044
|
* @throws {AppwriteException}
|
|
592
2045
|
* @returns {Promise}
|
|
593
2046
|
*/
|
|
594
|
-
list
|
|
595
|
-
|
|
2047
|
+
list(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.FunctionList>;
|
|
596
2048
|
/**
|
|
597
2049
|
* Create Function
|
|
598
2050
|
*
|
|
@@ -600,6 +2052,7 @@ declare module "node-appwrite" {
|
|
|
600
2052
|
* [permissions](/docs/permissions) to allow different project users or team
|
|
601
2053
|
* with access to execute the function using the client API.
|
|
602
2054
|
*
|
|
2055
|
+
* @param {string} functionId
|
|
603
2056
|
* @param {string} name
|
|
604
2057
|
* @param {string[]} execute
|
|
605
2058
|
* @param {string} runtime
|
|
@@ -610,8 +2063,16 @@ declare module "node-appwrite" {
|
|
|
610
2063
|
* @throws {AppwriteException}
|
|
611
2064
|
* @returns {Promise}
|
|
612
2065
|
*/
|
|
613
|
-
create
|
|
614
|
-
|
|
2066
|
+
create(functionId: string, name: string, execute: string[], runtime: string, vars?: object, events?: string[], schedule?: string, timeout?: number): Promise<Models.Function>;
|
|
2067
|
+
/**
|
|
2068
|
+
* List the currently active function runtimes.
|
|
2069
|
+
*
|
|
2070
|
+
* Get a list of all runtimes that are currently active in your project.
|
|
2071
|
+
*
|
|
2072
|
+
* @throws {AppwriteException}
|
|
2073
|
+
* @returns {Promise}
|
|
2074
|
+
*/
|
|
2075
|
+
listRuntimes(): Promise<Models.RuntimeList>;
|
|
615
2076
|
/**
|
|
616
2077
|
* Get Function
|
|
617
2078
|
*
|
|
@@ -621,8 +2082,7 @@ declare module "node-appwrite" {
|
|
|
621
2082
|
* @throws {AppwriteException}
|
|
622
2083
|
* @returns {Promise}
|
|
623
2084
|
*/
|
|
624
|
-
get
|
|
625
|
-
|
|
2085
|
+
get(functionId: string): Promise<Models.Function>;
|
|
626
2086
|
/**
|
|
627
2087
|
* Update Function
|
|
628
2088
|
*
|
|
@@ -638,8 +2098,7 @@ declare module "node-appwrite" {
|
|
|
638
2098
|
* @throws {AppwriteException}
|
|
639
2099
|
* @returns {Promise}
|
|
640
2100
|
*/
|
|
641
|
-
update
|
|
642
|
-
|
|
2101
|
+
update(functionId: string, name: string, execute: string[], vars?: object, events?: string[], schedule?: string, timeout?: number): Promise<Models.Function>;
|
|
643
2102
|
/**
|
|
644
2103
|
* Delete Function
|
|
645
2104
|
*
|
|
@@ -649,8 +2108,7 @@ declare module "node-appwrite" {
|
|
|
649
2108
|
* @throws {AppwriteException}
|
|
650
2109
|
* @returns {Promise}
|
|
651
2110
|
*/
|
|
652
|
-
delete
|
|
653
|
-
|
|
2111
|
+
delete(functionId: string): Promise<Response>;
|
|
654
2112
|
/**
|
|
655
2113
|
* List Executions
|
|
656
2114
|
*
|
|
@@ -660,15 +2118,15 @@ declare module "node-appwrite" {
|
|
|
660
2118
|
* different API modes](/docs/admin).
|
|
661
2119
|
*
|
|
662
2120
|
* @param {string} functionId
|
|
663
|
-
* @param {string} search
|
|
664
2121
|
* @param {number} limit
|
|
665
2122
|
* @param {number} offset
|
|
666
|
-
* @param {string}
|
|
2123
|
+
* @param {string} search
|
|
2124
|
+
* @param {string} cursor
|
|
2125
|
+
* @param {string} cursorDirection
|
|
667
2126
|
* @throws {AppwriteException}
|
|
668
2127
|
* @returns {Promise}
|
|
669
2128
|
*/
|
|
670
|
-
listExecutions
|
|
671
|
-
|
|
2129
|
+
listExecutions(functionId: string, limit?: number, offset?: number, search?: string, cursor?: string, cursorDirection?: string): Promise<Models.ExecutionList>;
|
|
672
2130
|
/**
|
|
673
2131
|
* Create Execution
|
|
674
2132
|
*
|
|
@@ -682,8 +2140,7 @@ declare module "node-appwrite" {
|
|
|
682
2140
|
* @throws {AppwriteException}
|
|
683
2141
|
* @returns {Promise}
|
|
684
2142
|
*/
|
|
685
|
-
createExecution
|
|
686
|
-
|
|
2143
|
+
createExecution(functionId: string, data?: string): Promise<Models.Execution>;
|
|
687
2144
|
/**
|
|
688
2145
|
* Get Execution
|
|
689
2146
|
*
|
|
@@ -694,8 +2151,7 @@ declare module "node-appwrite" {
|
|
|
694
2151
|
* @throws {AppwriteException}
|
|
695
2152
|
* @returns {Promise}
|
|
696
2153
|
*/
|
|
697
|
-
getExecution
|
|
698
|
-
|
|
2154
|
+
getExecution(functionId: string, executionId: string): Promise<Models.Execution>;
|
|
699
2155
|
/**
|
|
700
2156
|
* Update Function Tag
|
|
701
2157
|
*
|
|
@@ -708,8 +2164,7 @@ declare module "node-appwrite" {
|
|
|
708
2164
|
* @throws {AppwriteException}
|
|
709
2165
|
* @returns {Promise}
|
|
710
2166
|
*/
|
|
711
|
-
updateTag
|
|
712
|
-
|
|
2167
|
+
updateTag(functionId: string, tag: string): Promise<Models.Function>;
|
|
713
2168
|
/**
|
|
714
2169
|
* List Tags
|
|
715
2170
|
*
|
|
@@ -720,12 +2175,13 @@ declare module "node-appwrite" {
|
|
|
720
2175
|
* @param {string} search
|
|
721
2176
|
* @param {number} limit
|
|
722
2177
|
* @param {number} offset
|
|
2178
|
+
* @param {string} cursor
|
|
2179
|
+
* @param {string} cursorDirection
|
|
723
2180
|
* @param {string} orderType
|
|
724
2181
|
* @throws {AppwriteException}
|
|
725
2182
|
* @returns {Promise}
|
|
726
2183
|
*/
|
|
727
|
-
listTags
|
|
728
|
-
|
|
2184
|
+
listTags(functionId: string, search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.TagList>;
|
|
729
2185
|
/**
|
|
730
2186
|
* Create Tag
|
|
731
2187
|
*
|
|
@@ -746,8 +2202,7 @@ declare module "node-appwrite" {
|
|
|
746
2202
|
* @throws {AppwriteException}
|
|
747
2203
|
* @returns {Promise}
|
|
748
2204
|
*/
|
|
749
|
-
createTag
|
|
750
|
-
|
|
2205
|
+
createTag(functionId: string, command: string, code: File): Promise<Models.Tag>;
|
|
751
2206
|
/**
|
|
752
2207
|
* Get Tag
|
|
753
2208
|
*
|
|
@@ -758,8 +2213,7 @@ declare module "node-appwrite" {
|
|
|
758
2213
|
* @throws {AppwriteException}
|
|
759
2214
|
* @returns {Promise}
|
|
760
2215
|
*/
|
|
761
|
-
getTag
|
|
762
|
-
|
|
2216
|
+
getTag(functionId: string, tagId: string): Promise<Models.Tag>;
|
|
763
2217
|
/**
|
|
764
2218
|
* Delete Tag
|
|
765
2219
|
*
|
|
@@ -770,10 +2224,9 @@ declare module "node-appwrite" {
|
|
|
770
2224
|
* @throws {AppwriteException}
|
|
771
2225
|
* @returns {Promise}
|
|
772
2226
|
*/
|
|
773
|
-
deleteTag
|
|
2227
|
+
deleteTag(functionId: string, tagId: string): Promise<Response>;
|
|
774
2228
|
}
|
|
775
2229
|
export class Health extends Service {
|
|
776
|
-
|
|
777
2230
|
/**
|
|
778
2231
|
* Get HTTP
|
|
779
2232
|
*
|
|
@@ -782,18 +2235,16 @@ declare module "node-appwrite" {
|
|
|
782
2235
|
* @throws {AppwriteException}
|
|
783
2236
|
* @returns {Promise}
|
|
784
2237
|
*/
|
|
785
|
-
get
|
|
786
|
-
|
|
2238
|
+
get(): Promise<Models.HealthStatus>;
|
|
787
2239
|
/**
|
|
788
|
-
* Get
|
|
2240
|
+
* Get Antivirus
|
|
789
2241
|
*
|
|
790
|
-
* Check the Appwrite
|
|
2242
|
+
* Check the Appwrite Antivirus server is up and connection is successful.
|
|
791
2243
|
*
|
|
792
2244
|
* @throws {AppwriteException}
|
|
793
2245
|
* @returns {Promise}
|
|
794
2246
|
*/
|
|
795
|
-
|
|
796
|
-
|
|
2247
|
+
getAntivirus(): Promise<Models.HealthAntivirus>;
|
|
797
2248
|
/**
|
|
798
2249
|
* Get Cache
|
|
799
2250
|
*
|
|
@@ -803,8 +2254,7 @@ declare module "node-appwrite" {
|
|
|
803
2254
|
* @throws {AppwriteException}
|
|
804
2255
|
* @returns {Promise}
|
|
805
2256
|
*/
|
|
806
|
-
getCache
|
|
807
|
-
|
|
2257
|
+
getCache(): Promise<Models.HealthStatus>;
|
|
808
2258
|
/**
|
|
809
2259
|
* Get DB
|
|
810
2260
|
*
|
|
@@ -813,10 +2263,9 @@ declare module "node-appwrite" {
|
|
|
813
2263
|
* @throws {AppwriteException}
|
|
814
2264
|
* @returns {Promise}
|
|
815
2265
|
*/
|
|
816
|
-
getDB
|
|
817
|
-
|
|
2266
|
+
getDB(): Promise<Models.HealthStatus>;
|
|
818
2267
|
/**
|
|
819
|
-
* Get
|
|
2268
|
+
* Get Certificates Queue
|
|
820
2269
|
*
|
|
821
2270
|
* Get the number of certificates that are waiting to be issued against
|
|
822
2271
|
* [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
|
|
@@ -825,16 +2274,14 @@ declare module "node-appwrite" {
|
|
|
825
2274
|
* @throws {AppwriteException}
|
|
826
2275
|
* @returns {Promise}
|
|
827
2276
|
*/
|
|
828
|
-
getQueueCertificates
|
|
829
|
-
|
|
2277
|
+
getQueueCertificates(): Promise<Models.HealthQueue>;
|
|
830
2278
|
/**
|
|
831
2279
|
* Get Functions Queue
|
|
832
2280
|
*
|
|
833
2281
|
* @throws {AppwriteException}
|
|
834
2282
|
* @returns {Promise}
|
|
835
2283
|
*/
|
|
836
|
-
getQueueFunctions
|
|
837
|
-
|
|
2284
|
+
getQueueFunctions(): Promise<Models.HealthQueue>;
|
|
838
2285
|
/**
|
|
839
2286
|
* Get Logs Queue
|
|
840
2287
|
*
|
|
@@ -844,19 +2291,7 @@ declare module "node-appwrite" {
|
|
|
844
2291
|
* @throws {AppwriteException}
|
|
845
2292
|
* @returns {Promise}
|
|
846
2293
|
*/
|
|
847
|
-
getQueueLogs
|
|
848
|
-
|
|
849
|
-
/**
|
|
850
|
-
* Get Tasks Queue
|
|
851
|
-
*
|
|
852
|
-
* Get the number of tasks that are waiting to be processed in the Appwrite
|
|
853
|
-
* internal queue server.
|
|
854
|
-
*
|
|
855
|
-
* @throws {AppwriteException}
|
|
856
|
-
* @returns {Promise}
|
|
857
|
-
*/
|
|
858
|
-
getQueueTasks<T extends unknown>(): Promise<T>;
|
|
859
|
-
|
|
2294
|
+
getQueueLogs(): Promise<Models.HealthQueue>;
|
|
860
2295
|
/**
|
|
861
2296
|
* Get Usage Queue
|
|
862
2297
|
*
|
|
@@ -866,8 +2301,7 @@ declare module "node-appwrite" {
|
|
|
866
2301
|
* @throws {AppwriteException}
|
|
867
2302
|
* @returns {Promise}
|
|
868
2303
|
*/
|
|
869
|
-
getQueueUsage
|
|
870
|
-
|
|
2304
|
+
getQueueUsage(): Promise<Models.HealthQueue>;
|
|
871
2305
|
/**
|
|
872
2306
|
* Get Webhooks Queue
|
|
873
2307
|
*
|
|
@@ -877,8 +2311,7 @@ declare module "node-appwrite" {
|
|
|
877
2311
|
* @throws {AppwriteException}
|
|
878
2312
|
* @returns {Promise}
|
|
879
2313
|
*/
|
|
880
|
-
getQueueWebhooks
|
|
881
|
-
|
|
2314
|
+
getQueueWebhooks(): Promise<Models.HealthQueue>;
|
|
882
2315
|
/**
|
|
883
2316
|
* Get Local Storage
|
|
884
2317
|
*
|
|
@@ -887,8 +2320,7 @@ declare module "node-appwrite" {
|
|
|
887
2320
|
* @throws {AppwriteException}
|
|
888
2321
|
* @returns {Promise}
|
|
889
2322
|
*/
|
|
890
|
-
getStorageLocal
|
|
891
|
-
|
|
2323
|
+
getStorageLocal(): Promise<Models.HealthStatus>;
|
|
892
2324
|
/**
|
|
893
2325
|
* Get Time
|
|
894
2326
|
*
|
|
@@ -903,10 +2335,9 @@ declare module "node-appwrite" {
|
|
|
903
2335
|
* @throws {AppwriteException}
|
|
904
2336
|
* @returns {Promise}
|
|
905
2337
|
*/
|
|
906
|
-
getTime
|
|
2338
|
+
getTime(): Promise<Models.HealthTime>;
|
|
907
2339
|
}
|
|
908
2340
|
export class Locale extends Service {
|
|
909
|
-
|
|
910
2341
|
/**
|
|
911
2342
|
* Get User Locale
|
|
912
2343
|
*
|
|
@@ -920,8 +2351,7 @@ declare module "node-appwrite" {
|
|
|
920
2351
|
* @throws {AppwriteException}
|
|
921
2352
|
* @returns {Promise}
|
|
922
2353
|
*/
|
|
923
|
-
get
|
|
924
|
-
|
|
2354
|
+
get(): Promise<Models.Locale>;
|
|
925
2355
|
/**
|
|
926
2356
|
* List Continents
|
|
927
2357
|
*
|
|
@@ -931,8 +2361,7 @@ declare module "node-appwrite" {
|
|
|
931
2361
|
* @throws {AppwriteException}
|
|
932
2362
|
* @returns {Promise}
|
|
933
2363
|
*/
|
|
934
|
-
getContinents
|
|
935
|
-
|
|
2364
|
+
getContinents(): Promise<Models.ContinentList>;
|
|
936
2365
|
/**
|
|
937
2366
|
* List Countries
|
|
938
2367
|
*
|
|
@@ -942,8 +2371,7 @@ declare module "node-appwrite" {
|
|
|
942
2371
|
* @throws {AppwriteException}
|
|
943
2372
|
* @returns {Promise}
|
|
944
2373
|
*/
|
|
945
|
-
getCountries
|
|
946
|
-
|
|
2374
|
+
getCountries(): Promise<Models.CountryList>;
|
|
947
2375
|
/**
|
|
948
2376
|
* List EU Countries
|
|
949
2377
|
*
|
|
@@ -953,8 +2381,7 @@ declare module "node-appwrite" {
|
|
|
953
2381
|
* @throws {AppwriteException}
|
|
954
2382
|
* @returns {Promise}
|
|
955
2383
|
*/
|
|
956
|
-
getCountriesEU
|
|
957
|
-
|
|
2384
|
+
getCountriesEU(): Promise<Models.CountryList>;
|
|
958
2385
|
/**
|
|
959
2386
|
* List Countries Phone Codes
|
|
960
2387
|
*
|
|
@@ -964,8 +2391,7 @@ declare module "node-appwrite" {
|
|
|
964
2391
|
* @throws {AppwriteException}
|
|
965
2392
|
* @returns {Promise}
|
|
966
2393
|
*/
|
|
967
|
-
getCountriesPhones
|
|
968
|
-
|
|
2394
|
+
getCountriesPhones(): Promise<Models.PhoneList>;
|
|
969
2395
|
/**
|
|
970
2396
|
* List Currencies
|
|
971
2397
|
*
|
|
@@ -976,8 +2402,7 @@ declare module "node-appwrite" {
|
|
|
976
2402
|
* @throws {AppwriteException}
|
|
977
2403
|
* @returns {Promise}
|
|
978
2404
|
*/
|
|
979
|
-
getCurrencies
|
|
980
|
-
|
|
2405
|
+
getCurrencies(): Promise<Models.CurrencyList>;
|
|
981
2406
|
/**
|
|
982
2407
|
* List Languages
|
|
983
2408
|
*
|
|
@@ -987,10 +2412,9 @@ declare module "node-appwrite" {
|
|
|
987
2412
|
* @throws {AppwriteException}
|
|
988
2413
|
* @returns {Promise}
|
|
989
2414
|
*/
|
|
990
|
-
getLanguages
|
|
2415
|
+
getLanguages(): Promise<Models.LanguageList>;
|
|
991
2416
|
}
|
|
992
2417
|
export class Storage extends Service {
|
|
993
|
-
|
|
994
2418
|
/**
|
|
995
2419
|
* List Files
|
|
996
2420
|
*
|
|
@@ -1001,12 +2425,13 @@ declare module "node-appwrite" {
|
|
|
1001
2425
|
* @param {string} search
|
|
1002
2426
|
* @param {number} limit
|
|
1003
2427
|
* @param {number} offset
|
|
2428
|
+
* @param {string} cursor
|
|
2429
|
+
* @param {string} cursorDirection
|
|
1004
2430
|
* @param {string} orderType
|
|
1005
2431
|
* @throws {AppwriteException}
|
|
1006
2432
|
* @returns {Promise}
|
|
1007
2433
|
*/
|
|
1008
|
-
listFiles
|
|
1009
|
-
|
|
2434
|
+
listFiles(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.FileList>;
|
|
1010
2435
|
/**
|
|
1011
2436
|
* Create File
|
|
1012
2437
|
*
|
|
@@ -1014,14 +2439,14 @@ declare module "node-appwrite" {
|
|
|
1014
2439
|
* assigned to read and write access unless he has passed custom values for
|
|
1015
2440
|
* read and write arguments.
|
|
1016
2441
|
*
|
|
2442
|
+
* @param {string} fileId
|
|
1017
2443
|
* @param {File} file
|
|
1018
2444
|
* @param {string[]} read
|
|
1019
2445
|
* @param {string[]} write
|
|
1020
2446
|
* @throws {AppwriteException}
|
|
1021
2447
|
* @returns {Promise}
|
|
1022
2448
|
*/
|
|
1023
|
-
createFile
|
|
1024
|
-
|
|
2449
|
+
createFile(fileId: string, file: File, read?: string[], write?: string[]): Promise<Models.File>;
|
|
1025
2450
|
/**
|
|
1026
2451
|
* Get File
|
|
1027
2452
|
*
|
|
@@ -1032,8 +2457,7 @@ declare module "node-appwrite" {
|
|
|
1032
2457
|
* @throws {AppwriteException}
|
|
1033
2458
|
* @returns {Promise}
|
|
1034
2459
|
*/
|
|
1035
|
-
getFile
|
|
1036
|
-
|
|
2460
|
+
getFile(fileId: string): Promise<Models.File>;
|
|
1037
2461
|
/**
|
|
1038
2462
|
* Update File
|
|
1039
2463
|
*
|
|
@@ -1046,8 +2470,7 @@ declare module "node-appwrite" {
|
|
|
1046
2470
|
* @throws {AppwriteException}
|
|
1047
2471
|
* @returns {Promise}
|
|
1048
2472
|
*/
|
|
1049
|
-
updateFile
|
|
1050
|
-
|
|
2473
|
+
updateFile(fileId: string, read: string[], write: string[]): Promise<Models.File>;
|
|
1051
2474
|
/**
|
|
1052
2475
|
* Delete File
|
|
1053
2476
|
*
|
|
@@ -1058,8 +2481,7 @@ declare module "node-appwrite" {
|
|
|
1058
2481
|
* @throws {AppwriteException}
|
|
1059
2482
|
* @returns {Promise}
|
|
1060
2483
|
*/
|
|
1061
|
-
deleteFile
|
|
1062
|
-
|
|
2484
|
+
deleteFile(fileId: string): Promise<Response>;
|
|
1063
2485
|
/**
|
|
1064
2486
|
* Get File for Download
|
|
1065
2487
|
*
|
|
@@ -1072,7 +2494,6 @@ declare module "node-appwrite" {
|
|
|
1072
2494
|
* @returns {Promise}
|
|
1073
2495
|
*/
|
|
1074
2496
|
getFileDownload(fileId: string): Promise<Buffer>;
|
|
1075
|
-
|
|
1076
2497
|
/**
|
|
1077
2498
|
* Get File Preview
|
|
1078
2499
|
*
|
|
@@ -1097,7 +2518,6 @@ declare module "node-appwrite" {
|
|
|
1097
2518
|
* @returns {Promise}
|
|
1098
2519
|
*/
|
|
1099
2520
|
getFilePreview(fileId: string, width?: number, height?: number, gravity?: string, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: string): Promise<Buffer>;
|
|
1100
|
-
|
|
1101
2521
|
/**
|
|
1102
2522
|
* Get File for View
|
|
1103
2523
|
*
|
|
@@ -1112,108 +2532,107 @@ declare module "node-appwrite" {
|
|
|
1112
2532
|
getFileView(fileId: string): Promise<Buffer>;
|
|
1113
2533
|
}
|
|
1114
2534
|
export class Teams extends Service {
|
|
1115
|
-
|
|
1116
2535
|
/**
|
|
1117
2536
|
* List Teams
|
|
1118
2537
|
*
|
|
1119
|
-
* Get a list of all the current user
|
|
1120
|
-
* filter your results.
|
|
1121
|
-
*
|
|
1122
|
-
*
|
|
2538
|
+
* Get a list of all the teams in which the current user is a member. You can
|
|
2539
|
+
* use the parameters to filter your results.
|
|
2540
|
+
*
|
|
2541
|
+
* In admin mode, this endpoint returns a list of all the teams in the current
|
|
2542
|
+
* project. [Learn more about different API modes](/docs/admin).
|
|
1123
2543
|
*
|
|
1124
2544
|
* @param {string} search
|
|
1125
2545
|
* @param {number} limit
|
|
1126
2546
|
* @param {number} offset
|
|
2547
|
+
* @param {string} cursor
|
|
2548
|
+
* @param {string} cursorDirection
|
|
1127
2549
|
* @param {string} orderType
|
|
1128
2550
|
* @throws {AppwriteException}
|
|
1129
2551
|
* @returns {Promise}
|
|
1130
2552
|
*/
|
|
1131
|
-
list
|
|
1132
|
-
|
|
2553
|
+
list(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.TeamList>;
|
|
1133
2554
|
/**
|
|
1134
2555
|
* Create Team
|
|
1135
2556
|
*
|
|
1136
2557
|
* Create a new team. The user who creates the team will automatically be
|
|
1137
|
-
* assigned as the owner of the team.
|
|
1138
|
-
*
|
|
1139
|
-
* project.
|
|
2558
|
+
* assigned as the owner of the team. Only the users with the owner role can
|
|
2559
|
+
* invite new members, add new owners and delete or update the team.
|
|
1140
2560
|
*
|
|
2561
|
+
* @param {string} teamId
|
|
1141
2562
|
* @param {string} name
|
|
1142
2563
|
* @param {string[]} roles
|
|
1143
2564
|
* @throws {AppwriteException}
|
|
1144
2565
|
* @returns {Promise}
|
|
1145
2566
|
*/
|
|
1146
|
-
create
|
|
1147
|
-
|
|
2567
|
+
create(teamId: string, name: string, roles?: string[]): Promise<Models.Team>;
|
|
1148
2568
|
/**
|
|
1149
2569
|
* Get Team
|
|
1150
2570
|
*
|
|
1151
|
-
* Get a team by its
|
|
1152
|
-
* resource.
|
|
2571
|
+
* Get a team by its ID. All team members have read access for this resource.
|
|
1153
2572
|
*
|
|
1154
2573
|
* @param {string} teamId
|
|
1155
2574
|
* @throws {AppwriteException}
|
|
1156
2575
|
* @returns {Promise}
|
|
1157
2576
|
*/
|
|
1158
|
-
get
|
|
1159
|
-
|
|
2577
|
+
get(teamId: string): Promise<Models.Team>;
|
|
1160
2578
|
/**
|
|
1161
2579
|
* Update Team
|
|
1162
2580
|
*
|
|
1163
|
-
* Update a team
|
|
1164
|
-
*
|
|
2581
|
+
* Update a team using its ID. Only members with the owner role can update the
|
|
2582
|
+
* team.
|
|
1165
2583
|
*
|
|
1166
2584
|
* @param {string} teamId
|
|
1167
2585
|
* @param {string} name
|
|
1168
2586
|
* @throws {AppwriteException}
|
|
1169
2587
|
* @returns {Promise}
|
|
1170
2588
|
*/
|
|
1171
|
-
update
|
|
1172
|
-
|
|
2589
|
+
update(teamId: string, name: string): Promise<Models.Team>;
|
|
1173
2590
|
/**
|
|
1174
2591
|
* Delete Team
|
|
1175
2592
|
*
|
|
1176
|
-
* Delete a team
|
|
1177
|
-
*
|
|
2593
|
+
* Delete a team using its ID. Only team members with the owner role can
|
|
2594
|
+
* delete the team.
|
|
1178
2595
|
*
|
|
1179
2596
|
* @param {string} teamId
|
|
1180
2597
|
* @throws {AppwriteException}
|
|
1181
2598
|
* @returns {Promise}
|
|
1182
2599
|
*/
|
|
1183
|
-
delete
|
|
1184
|
-
|
|
2600
|
+
delete(teamId: string): Promise<Response>;
|
|
1185
2601
|
/**
|
|
1186
2602
|
* Get Team Memberships
|
|
1187
2603
|
*
|
|
1188
|
-
*
|
|
1189
|
-
*
|
|
2604
|
+
* Use this endpoint to list a team's members using the team's ID. All team
|
|
2605
|
+
* members have read access to this endpoint.
|
|
1190
2606
|
*
|
|
1191
2607
|
* @param {string} teamId
|
|
1192
2608
|
* @param {string} search
|
|
1193
2609
|
* @param {number} limit
|
|
1194
2610
|
* @param {number} offset
|
|
2611
|
+
* @param {string} cursor
|
|
2612
|
+
* @param {string} cursorDirection
|
|
1195
2613
|
* @param {string} orderType
|
|
1196
2614
|
* @throws {AppwriteException}
|
|
1197
2615
|
* @returns {Promise}
|
|
1198
2616
|
*/
|
|
1199
|
-
getMemberships
|
|
1200
|
-
|
|
2617
|
+
getMemberships(teamId: string, search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.MembershipList>;
|
|
1201
2618
|
/**
|
|
1202
2619
|
* Create Team Membership
|
|
1203
2620
|
*
|
|
1204
|
-
*
|
|
1205
|
-
* link to join the team will be sent to the
|
|
1206
|
-
*
|
|
2621
|
+
* Invite a new member to join your team. If initiated from the client SDK, an
|
|
2622
|
+
* email with a link to join the team will be sent to the member's email
|
|
2623
|
+
* address and an account will be created for them should they not be signed
|
|
2624
|
+
* up already. If initiated from server-side SDKs, the new member will
|
|
2625
|
+
* automatically be added to the team.
|
|
1207
2626
|
*
|
|
1208
|
-
* Use the '
|
|
2627
|
+
* Use the 'url' parameter to redirect the user from the invitation email back
|
|
1209
2628
|
* to your app. When the user is redirected, use the [Update Team Membership
|
|
1210
2629
|
* Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow
|
|
1211
|
-
* the user to accept the invitation to the team.
|
|
2630
|
+
* the user to accept the invitation to the team.
|
|
1212
2631
|
*
|
|
1213
|
-
* Please note that
|
|
1214
|
-
*
|
|
2632
|
+
* Please note that to avoid a [Redirect
|
|
2633
|
+
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
|
|
1215
2634
|
* the only valid redirect URL's are the once from domains you have set when
|
|
1216
|
-
*
|
|
2635
|
+
* adding your platforms in the console interface.
|
|
1217
2636
|
*
|
|
1218
2637
|
* @param {string} teamId
|
|
1219
2638
|
* @param {string} email
|
|
@@ -1223,19 +2642,33 @@ declare module "node-appwrite" {
|
|
|
1223
2642
|
* @throws {AppwriteException}
|
|
1224
2643
|
* @returns {Promise}
|
|
1225
2644
|
*/
|
|
1226
|
-
createMembership
|
|
1227
|
-
|
|
2645
|
+
createMembership(teamId: string, email: string, roles: string[], url: string, name?: string): Promise<Models.Membership>;
|
|
2646
|
+
/**
|
|
2647
|
+
* Get Team Membership
|
|
2648
|
+
*
|
|
2649
|
+
* Get a team member by the membership unique id. All team members have read
|
|
2650
|
+
* access for this resource.
|
|
2651
|
+
*
|
|
2652
|
+
* @param {string} teamId
|
|
2653
|
+
* @param {string} membershipId
|
|
2654
|
+
* @throws {AppwriteException}
|
|
2655
|
+
* @returns {Promise}
|
|
2656
|
+
*/
|
|
2657
|
+
getMembership(teamId: string, membershipId: string): Promise<Models.MembershipList>;
|
|
1228
2658
|
/**
|
|
1229
2659
|
* Update Membership Roles
|
|
1230
2660
|
*
|
|
2661
|
+
* Modify the roles of a team member. Only team members with the owner role
|
|
2662
|
+
* have access to this endpoint. Learn more about [roles and
|
|
2663
|
+
* permissions](/docs/permissions).
|
|
2664
|
+
*
|
|
1231
2665
|
* @param {string} teamId
|
|
1232
2666
|
* @param {string} membershipId
|
|
1233
2667
|
* @param {string[]} roles
|
|
1234
2668
|
* @throws {AppwriteException}
|
|
1235
2669
|
* @returns {Promise}
|
|
1236
2670
|
*/
|
|
1237
|
-
updateMembershipRoles
|
|
1238
|
-
|
|
2671
|
+
updateMembershipRoles(teamId: string, membershipId: string, roles: string[]): Promise<Models.Membership>;
|
|
1239
2672
|
/**
|
|
1240
2673
|
* Delete Team Membership
|
|
1241
2674
|
*
|
|
@@ -1248,13 +2681,12 @@ declare module "node-appwrite" {
|
|
|
1248
2681
|
* @throws {AppwriteException}
|
|
1249
2682
|
* @returns {Promise}
|
|
1250
2683
|
*/
|
|
1251
|
-
deleteMembership
|
|
1252
|
-
|
|
2684
|
+
deleteMembership(teamId: string, membershipId: string): Promise<Response>;
|
|
1253
2685
|
/**
|
|
1254
2686
|
* Update Team Membership Status
|
|
1255
2687
|
*
|
|
1256
2688
|
* Use this endpoint to allow a user to accept an invitation to join a team
|
|
1257
|
-
* after being redirected back to your app from the invitation email
|
|
2689
|
+
* after being redirected back to your app from the invitation email received
|
|
1258
2690
|
* by the user.
|
|
1259
2691
|
*
|
|
1260
2692
|
* @param {string} teamId
|
|
@@ -1264,10 +2696,9 @@ declare module "node-appwrite" {
|
|
|
1264
2696
|
* @throws {AppwriteException}
|
|
1265
2697
|
* @returns {Promise}
|
|
1266
2698
|
*/
|
|
1267
|
-
updateMembershipStatus
|
|
2699
|
+
updateMembershipStatus(teamId: string, membershipId: string, userId: string, secret: string): Promise<Models.Membership>;
|
|
1268
2700
|
}
|
|
1269
2701
|
export class Users extends Service {
|
|
1270
|
-
|
|
1271
2702
|
/**
|
|
1272
2703
|
* List Users
|
|
1273
2704
|
*
|
|
@@ -1277,25 +2708,26 @@ declare module "node-appwrite" {
|
|
|
1277
2708
|
* @param {string} search
|
|
1278
2709
|
* @param {number} limit
|
|
1279
2710
|
* @param {number} offset
|
|
2711
|
+
* @param {string} cursor
|
|
2712
|
+
* @param {string} cursorDirection
|
|
1280
2713
|
* @param {string} orderType
|
|
1281
2714
|
* @throws {AppwriteException}
|
|
1282
2715
|
* @returns {Promise}
|
|
1283
2716
|
*/
|
|
1284
|
-
list<
|
|
1285
|
-
|
|
2717
|
+
list<Preferences extends Models.Preferences>(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.UserList<Preferences>>;
|
|
1286
2718
|
/**
|
|
1287
2719
|
* Create User
|
|
1288
2720
|
*
|
|
1289
2721
|
* Create a new user.
|
|
1290
2722
|
*
|
|
2723
|
+
* @param {string} userId
|
|
1291
2724
|
* @param {string} email
|
|
1292
2725
|
* @param {string} password
|
|
1293
2726
|
* @param {string} name
|
|
1294
2727
|
* @throws {AppwriteException}
|
|
1295
2728
|
* @returns {Promise}
|
|
1296
2729
|
*/
|
|
1297
|
-
create<
|
|
1298
|
-
|
|
2730
|
+
create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
|
|
1299
2731
|
/**
|
|
1300
2732
|
* Get User
|
|
1301
2733
|
*
|
|
@@ -1305,8 +2737,7 @@ declare module "node-appwrite" {
|
|
|
1305
2737
|
* @throws {AppwriteException}
|
|
1306
2738
|
* @returns {Promise}
|
|
1307
2739
|
*/
|
|
1308
|
-
get<
|
|
1309
|
-
|
|
2740
|
+
get<Preferences extends Models.Preferences>(userId: string): Promise<Models.User<Preferences>>;
|
|
1310
2741
|
/**
|
|
1311
2742
|
* Delete User
|
|
1312
2743
|
*
|
|
@@ -1316,19 +2747,52 @@ declare module "node-appwrite" {
|
|
|
1316
2747
|
* @throws {AppwriteException}
|
|
1317
2748
|
* @returns {Promise}
|
|
1318
2749
|
*/
|
|
1319
|
-
delete
|
|
1320
|
-
|
|
2750
|
+
delete(userId: string): Promise<Response>;
|
|
2751
|
+
/**
|
|
2752
|
+
* Update Email
|
|
2753
|
+
*
|
|
2754
|
+
* Update the user email by its unique ID.
|
|
2755
|
+
*
|
|
2756
|
+
* @param {string} userId
|
|
2757
|
+
* @param {string} email
|
|
2758
|
+
* @throws {AppwriteException}
|
|
2759
|
+
* @returns {Promise}
|
|
2760
|
+
*/
|
|
2761
|
+
updateEmail<Preferences extends Models.Preferences>(userId: string, email: string): Promise<Models.User<Preferences>>;
|
|
1321
2762
|
/**
|
|
1322
2763
|
* Get User Logs
|
|
1323
2764
|
*
|
|
1324
|
-
* Get
|
|
2765
|
+
* Get the user activity logs list by its unique ID.
|
|
1325
2766
|
*
|
|
1326
2767
|
* @param {string} userId
|
|
2768
|
+
* @param {number} limit
|
|
2769
|
+
* @param {number} offset
|
|
1327
2770
|
* @throws {AppwriteException}
|
|
1328
2771
|
* @returns {Promise}
|
|
1329
2772
|
*/
|
|
1330
|
-
getLogs
|
|
1331
|
-
|
|
2773
|
+
getLogs(userId: string, limit?: number, offset?: number): Promise<Models.LogList>;
|
|
2774
|
+
/**
|
|
2775
|
+
* Update Name
|
|
2776
|
+
*
|
|
2777
|
+
* Update the user name by its unique ID.
|
|
2778
|
+
*
|
|
2779
|
+
* @param {string} userId
|
|
2780
|
+
* @param {string} name
|
|
2781
|
+
* @throws {AppwriteException}
|
|
2782
|
+
* @returns {Promise}
|
|
2783
|
+
*/
|
|
2784
|
+
updateName<Preferences extends Models.Preferences>(userId: string, name: string): Promise<Models.User<Preferences>>;
|
|
2785
|
+
/**
|
|
2786
|
+
* Update Password
|
|
2787
|
+
*
|
|
2788
|
+
* Update the user password by its unique ID.
|
|
2789
|
+
*
|
|
2790
|
+
* @param {string} userId
|
|
2791
|
+
* @param {string} password
|
|
2792
|
+
* @throws {AppwriteException}
|
|
2793
|
+
* @returns {Promise}
|
|
2794
|
+
*/
|
|
2795
|
+
updatePassword<Preferences extends Models.Preferences>(userId: string, password: string): Promise<Models.User<Preferences>>;
|
|
1332
2796
|
/**
|
|
1333
2797
|
* Get User Preferences
|
|
1334
2798
|
*
|
|
@@ -1338,8 +2802,7 @@ declare module "node-appwrite" {
|
|
|
1338
2802
|
* @throws {AppwriteException}
|
|
1339
2803
|
* @returns {Promise}
|
|
1340
2804
|
*/
|
|
1341
|
-
getPrefs<
|
|
1342
|
-
|
|
2805
|
+
getPrefs<Preferences extends Models.Preferences>(userId: string): Promise<Preferences>;
|
|
1343
2806
|
/**
|
|
1344
2807
|
* Update User Preferences
|
|
1345
2808
|
*
|
|
@@ -1351,8 +2814,7 @@ declare module "node-appwrite" {
|
|
|
1351
2814
|
* @throws {AppwriteException}
|
|
1352
2815
|
* @returns {Promise}
|
|
1353
2816
|
*/
|
|
1354
|
-
updatePrefs<
|
|
1355
|
-
|
|
2817
|
+
updatePrefs<Preferences extends Models.Preferences>(userId: string, prefs: object): Promise<Preferences>;
|
|
1356
2818
|
/**
|
|
1357
2819
|
* Get User Sessions
|
|
1358
2820
|
*
|
|
@@ -1362,8 +2824,7 @@ declare module "node-appwrite" {
|
|
|
1362
2824
|
* @throws {AppwriteException}
|
|
1363
2825
|
* @returns {Promise}
|
|
1364
2826
|
*/
|
|
1365
|
-
getSessions
|
|
1366
|
-
|
|
2827
|
+
getSessions(userId: string): Promise<Models.SessionList>;
|
|
1367
2828
|
/**
|
|
1368
2829
|
* Delete User Sessions
|
|
1369
2830
|
*
|
|
@@ -1373,8 +2834,7 @@ declare module "node-appwrite" {
|
|
|
1373
2834
|
* @throws {AppwriteException}
|
|
1374
2835
|
* @returns {Promise}
|
|
1375
2836
|
*/
|
|
1376
|
-
deleteSessions
|
|
1377
|
-
|
|
2837
|
+
deleteSessions(userId: string): Promise<Response>;
|
|
1378
2838
|
/**
|
|
1379
2839
|
* Delete User Session
|
|
1380
2840
|
*
|
|
@@ -1385,20 +2845,18 @@ declare module "node-appwrite" {
|
|
|
1385
2845
|
* @throws {AppwriteException}
|
|
1386
2846
|
* @returns {Promise}
|
|
1387
2847
|
*/
|
|
1388
|
-
deleteSession
|
|
1389
|
-
|
|
2848
|
+
deleteSession(userId: string, sessionId: string): Promise<Response>;
|
|
1390
2849
|
/**
|
|
1391
2850
|
* Update User Status
|
|
1392
2851
|
*
|
|
1393
2852
|
* Update the user status by its unique ID.
|
|
1394
2853
|
*
|
|
1395
2854
|
* @param {string} userId
|
|
1396
|
-
* @param {
|
|
2855
|
+
* @param {boolean} status
|
|
1397
2856
|
* @throws {AppwriteException}
|
|
1398
2857
|
* @returns {Promise}
|
|
1399
2858
|
*/
|
|
1400
|
-
updateStatus<
|
|
1401
|
-
|
|
2859
|
+
updateStatus<Preferences extends Models.Preferences>(userId: string, status: boolean): Promise<Models.User<Preferences>>;
|
|
1402
2860
|
/**
|
|
1403
2861
|
* Update Email Verification
|
|
1404
2862
|
*
|
|
@@ -1409,6 +2867,6 @@ declare module "node-appwrite" {
|
|
|
1409
2867
|
* @throws {AppwriteException}
|
|
1410
2868
|
* @returns {Promise}
|
|
1411
2869
|
*/
|
|
1412
|
-
updateVerification<
|
|
2870
|
+
updateVerification<Preferences extends Models.Preferences>(userId: string, emailVerification: boolean): Promise<Models.User<Preferences>>;
|
|
1413
2871
|
}
|
|
1414
2872
|
}
|