node-appwrite 3.0.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/LICENSE +1 -1
- package/README.md +6 -6
- 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.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-status.md +1 -1
- package/index.d.ts +771 -141
- package/lib/client.js +3 -3
- package/lib/query.js +34 -0
- package/lib/services/account.js +16 -4
- 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 +89 -30
- package/lib/services/users.js +34 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -14,6 +14,19 @@ declare module "node-appwrite" {
|
|
|
14
14
|
collections: Collection[];
|
|
15
15
|
}
|
|
16
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
|
+
/**
|
|
17
30
|
* Documents List
|
|
18
31
|
*/
|
|
19
32
|
export type DocumentList<Document extends Models.Document> = {
|
|
@@ -56,6 +69,10 @@ declare module "node-appwrite" {
|
|
|
56
69
|
* Logs List
|
|
57
70
|
*/
|
|
58
71
|
export type LogList = {
|
|
72
|
+
/**
|
|
73
|
+
* Total number of items available on the server.
|
|
74
|
+
*/
|
|
75
|
+
sum: number;
|
|
59
76
|
/**
|
|
60
77
|
* List of logs.
|
|
61
78
|
*/
|
|
@@ -114,6 +131,19 @@ declare module "node-appwrite" {
|
|
|
114
131
|
functions: Function[];
|
|
115
132
|
}
|
|
116
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
|
+
/**
|
|
117
147
|
* Tags List
|
|
118
148
|
*/
|
|
119
149
|
export type TagList = {
|
|
@@ -205,104 +235,372 @@ declare module "node-appwrite" {
|
|
|
205
235
|
phones: Phone[];
|
|
206
236
|
}
|
|
207
237
|
/**
|
|
208
|
-
*
|
|
238
|
+
* Collection
|
|
209
239
|
*/
|
|
210
|
-
export type
|
|
240
|
+
export type Collection = {
|
|
241
|
+
/**
|
|
242
|
+
* Collection ID.
|
|
243
|
+
*/
|
|
244
|
+
$id: string;
|
|
211
245
|
/**
|
|
212
|
-
*
|
|
246
|
+
* Collection read permissions.
|
|
213
247
|
*/
|
|
214
|
-
read: string[];
|
|
248
|
+
$read: string[];
|
|
215
249
|
/**
|
|
216
|
-
*
|
|
250
|
+
* Collection write permissions.
|
|
217
251
|
*/
|
|
218
|
-
write: string[];
|
|
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[];
|
|
219
273
|
}
|
|
220
274
|
/**
|
|
221
|
-
*
|
|
275
|
+
* Attributes List
|
|
222
276
|
*/
|
|
223
|
-
export type
|
|
277
|
+
export type AttributeList = {
|
|
224
278
|
/**
|
|
225
|
-
*
|
|
279
|
+
* Total sum of items in the list.
|
|
226
280
|
*/
|
|
227
|
-
|
|
281
|
+
sum: number;
|
|
228
282
|
/**
|
|
229
|
-
*
|
|
283
|
+
* List of attributes.
|
|
230
284
|
*/
|
|
231
|
-
|
|
285
|
+
attributes: string[];
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* AttributeString
|
|
289
|
+
*/
|
|
290
|
+
export type AttributeString = {
|
|
232
291
|
/**
|
|
233
|
-
*
|
|
292
|
+
* Attribute Key.
|
|
234
293
|
*/
|
|
235
|
-
|
|
294
|
+
key: string;
|
|
236
295
|
/**
|
|
237
|
-
*
|
|
296
|
+
* Attribute type.
|
|
238
297
|
*/
|
|
239
|
-
|
|
298
|
+
type: string;
|
|
240
299
|
/**
|
|
241
|
-
*
|
|
300
|
+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
|
|
242
301
|
*/
|
|
243
|
-
|
|
302
|
+
status: string;
|
|
244
303
|
/**
|
|
245
|
-
*
|
|
304
|
+
* Is attribute required?
|
|
246
305
|
*/
|
|
247
|
-
|
|
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;
|
|
248
319
|
}
|
|
249
320
|
/**
|
|
250
|
-
*
|
|
321
|
+
* AttributeInteger
|
|
251
322
|
*/
|
|
252
|
-
export type
|
|
323
|
+
export type AttributeInteger = {
|
|
253
324
|
/**
|
|
254
|
-
*
|
|
325
|
+
* Attribute Key.
|
|
255
326
|
*/
|
|
256
|
-
|
|
327
|
+
key: string;
|
|
257
328
|
/**
|
|
258
|
-
*
|
|
329
|
+
* Attribute type.
|
|
259
330
|
*/
|
|
260
|
-
|
|
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;
|
|
261
352
|
/**
|
|
262
|
-
*
|
|
353
|
+
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
263
354
|
*/
|
|
264
|
-
|
|
355
|
+
xdefault?: number;
|
|
265
356
|
}
|
|
266
357
|
/**
|
|
267
|
-
*
|
|
358
|
+
* AttributeFloat
|
|
268
359
|
*/
|
|
269
|
-
export type
|
|
360
|
+
export type AttributeFloat = {
|
|
270
361
|
/**
|
|
271
|
-
*
|
|
362
|
+
* Attribute Key.
|
|
272
363
|
*/
|
|
273
|
-
|
|
364
|
+
key: string;
|
|
274
365
|
/**
|
|
275
|
-
*
|
|
366
|
+
* Attribute type.
|
|
276
367
|
*/
|
|
277
|
-
|
|
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;
|
|
278
377
|
/**
|
|
279
|
-
*
|
|
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.
|
|
280
404
|
*/
|
|
281
405
|
type: string;
|
|
282
406
|
/**
|
|
283
|
-
*
|
|
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.
|
|
284
499
|
*/
|
|
285
500
|
key: string;
|
|
286
501
|
/**
|
|
287
|
-
*
|
|
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?
|
|
288
511
|
*/
|
|
289
|
-
|
|
512
|
+
required: boolean;
|
|
290
513
|
/**
|
|
291
|
-
*
|
|
514
|
+
* Is attribute an array?
|
|
292
515
|
*/
|
|
293
|
-
|
|
516
|
+
array?: boolean;
|
|
294
517
|
/**
|
|
295
|
-
*
|
|
518
|
+
* String format.
|
|
296
519
|
*/
|
|
297
|
-
|
|
520
|
+
format: string;
|
|
298
521
|
/**
|
|
299
|
-
*
|
|
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?
|
|
300
544
|
*/
|
|
301
545
|
required: boolean;
|
|
302
546
|
/**
|
|
303
|
-
*
|
|
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.
|
|
304
569
|
*/
|
|
305
|
-
|
|
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[];
|
|
306
604
|
}
|
|
307
605
|
/**
|
|
308
606
|
* Log
|
|
@@ -313,6 +611,22 @@ declare module "node-appwrite" {
|
|
|
313
611
|
*/
|
|
314
612
|
event: string;
|
|
315
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
|
+
/**
|
|
316
630
|
* IP session in use when the session was created.
|
|
317
631
|
*/
|
|
318
632
|
ip: string;
|
|
@@ -394,9 +708,9 @@ declare module "node-appwrite" {
|
|
|
394
708
|
*/
|
|
395
709
|
registration: number;
|
|
396
710
|
/**
|
|
397
|
-
* User status.
|
|
711
|
+
* User status. Pass `true` for enabled and `false` for disabled.
|
|
398
712
|
*/
|
|
399
|
-
status:
|
|
713
|
+
status: boolean;
|
|
400
714
|
/**
|
|
401
715
|
* Unix timestamp of the most recent password update
|
|
402
716
|
*/
|
|
@@ -575,9 +889,13 @@ declare module "node-appwrite" {
|
|
|
575
889
|
*/
|
|
576
890
|
$id: string;
|
|
577
891
|
/**
|
|
578
|
-
* File permissions.
|
|
892
|
+
* File read permissions.
|
|
893
|
+
*/
|
|
894
|
+
$read: string[];
|
|
895
|
+
/**
|
|
896
|
+
* File write permissions.
|
|
579
897
|
*/
|
|
580
|
-
$
|
|
898
|
+
$write: string[];
|
|
581
899
|
/**
|
|
582
900
|
* File name.
|
|
583
901
|
*/
|
|
@@ -670,9 +988,9 @@ declare module "node-appwrite" {
|
|
|
670
988
|
*/
|
|
671
989
|
$id: string;
|
|
672
990
|
/**
|
|
673
|
-
*
|
|
991
|
+
* Execution permissions.
|
|
674
992
|
*/
|
|
675
|
-
|
|
993
|
+
execute: string;
|
|
676
994
|
/**
|
|
677
995
|
* Function name.
|
|
678
996
|
*/
|
|
@@ -686,7 +1004,7 @@ declare module "node-appwrite" {
|
|
|
686
1004
|
*/
|
|
687
1005
|
dateUpdated: number;
|
|
688
1006
|
/**
|
|
689
|
-
* Function status. Possible values: disabled
|
|
1007
|
+
* Function status. Possible values: `disabled`, `enabled`
|
|
690
1008
|
*/
|
|
691
1009
|
status: string;
|
|
692
1010
|
/**
|
|
@@ -723,6 +1041,39 @@ declare module "node-appwrite" {
|
|
|
723
1041
|
timeout: number;
|
|
724
1042
|
}
|
|
725
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
|
+
/**
|
|
726
1077
|
* Tag
|
|
727
1078
|
*/
|
|
728
1079
|
export type Tag = {
|
|
@@ -756,9 +1107,9 @@ declare module "node-appwrite" {
|
|
|
756
1107
|
*/
|
|
757
1108
|
$id: string;
|
|
758
1109
|
/**
|
|
759
|
-
* Execution permissions.
|
|
1110
|
+
* Execution read permissions.
|
|
760
1111
|
*/
|
|
761
|
-
$
|
|
1112
|
+
$read: string[];
|
|
762
1113
|
/**
|
|
763
1114
|
* Function ID.
|
|
764
1115
|
*/
|
|
@@ -885,6 +1236,58 @@ declare module "node-appwrite" {
|
|
|
885
1236
|
*/
|
|
886
1237
|
countryName: string;
|
|
887
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
|
+
}
|
|
888
1291
|
}
|
|
889
1292
|
export class Client {
|
|
890
1293
|
/**
|
|
@@ -986,11 +1389,13 @@ declare module "node-appwrite" {
|
|
|
986
1389
|
* Update Account Email
|
|
987
1390
|
*
|
|
988
1391
|
* Update currently logged in user account email address. After changing user
|
|
989
|
-
* address, user confirmation status
|
|
990
|
-
*
|
|
991
|
-
*
|
|
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.
|
|
992
1396
|
* This endpoint can also be used to convert an anonymous account to a normal
|
|
993
1397
|
* one, by passing an email address and a new password.
|
|
1398
|
+
*
|
|
994
1399
|
*
|
|
995
1400
|
* @param {string} email
|
|
996
1401
|
* @param {string} password
|
|
@@ -1004,10 +1409,12 @@ declare module "node-appwrite" {
|
|
|
1004
1409
|
* Get currently logged in user list of latest security activity logs. Each
|
|
1005
1410
|
* log returns user IP address, location and date and time of log.
|
|
1006
1411
|
*
|
|
1412
|
+
* @param {number} limit
|
|
1413
|
+
* @param {number} offset
|
|
1007
1414
|
* @throws {AppwriteException}
|
|
1008
1415
|
* @returns {Promise}
|
|
1009
1416
|
*/
|
|
1010
|
-
getLogs(): Promise<Models.LogList>;
|
|
1417
|
+
getLogs(limit?: number, offset?: number): Promise<Models.LogList>;
|
|
1011
1418
|
/**
|
|
1012
1419
|
* Update Account Name
|
|
1013
1420
|
*
|
|
@@ -1296,24 +1703,27 @@ declare module "node-appwrite" {
|
|
|
1296
1703
|
* @param {string} search
|
|
1297
1704
|
* @param {number} limit
|
|
1298
1705
|
* @param {number} offset
|
|
1706
|
+
* @param {string} cursor
|
|
1707
|
+
* @param {string} cursorDirection
|
|
1299
1708
|
* @param {string} orderType
|
|
1300
1709
|
* @throws {AppwriteException}
|
|
1301
1710
|
* @returns {Promise}
|
|
1302
1711
|
*/
|
|
1303
|
-
listCollections(search?: string, limit?: number, offset?: number, orderType?: string): Promise<Models.CollectionList>;
|
|
1712
|
+
listCollections(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.CollectionList>;
|
|
1304
1713
|
/**
|
|
1305
1714
|
* Create Collection
|
|
1306
1715
|
*
|
|
1307
1716
|
* Create a new Collection.
|
|
1308
1717
|
*
|
|
1718
|
+
* @param {string} collectionId
|
|
1309
1719
|
* @param {string} name
|
|
1720
|
+
* @param {string} permission
|
|
1310
1721
|
* @param {string[]} read
|
|
1311
1722
|
* @param {string[]} write
|
|
1312
|
-
* @param {string[]} rules
|
|
1313
1723
|
* @throws {AppwriteException}
|
|
1314
1724
|
* @returns {Promise}
|
|
1315
1725
|
*/
|
|
1316
|
-
createCollection(name: string,
|
|
1726
|
+
createCollection(collectionId: string, name: string, permission: string, read: string[], write: string[]): Promise<Models.Collection>;
|
|
1317
1727
|
/**
|
|
1318
1728
|
* Get Collection
|
|
1319
1729
|
*
|
|
@@ -1332,13 +1742,14 @@ declare module "node-appwrite" {
|
|
|
1332
1742
|
*
|
|
1333
1743
|
* @param {string} collectionId
|
|
1334
1744
|
* @param {string} name
|
|
1745
|
+
* @param {string} permission
|
|
1335
1746
|
* @param {string[]} read
|
|
1336
1747
|
* @param {string[]} write
|
|
1337
|
-
* @param {
|
|
1748
|
+
* @param {boolean} enabled
|
|
1338
1749
|
* @throws {AppwriteException}
|
|
1339
1750
|
* @returns {Promise}
|
|
1340
1751
|
*/
|
|
1341
|
-
updateCollection(collectionId: string, name: string, read?: string[], write?: string[],
|
|
1752
|
+
updateCollection(collectionId: string, name: string, permission: string, read?: string[], write?: string[], enabled?: boolean): Promise<Models.Collection>;
|
|
1342
1753
|
/**
|
|
1343
1754
|
* Delete Collection
|
|
1344
1755
|
*
|
|
@@ -1350,6 +1761,157 @@ declare module "node-appwrite" {
|
|
|
1350
1761
|
* @returns {Promise}
|
|
1351
1762
|
*/
|
|
1352
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>;
|
|
1353
1915
|
/**
|
|
1354
1916
|
* List Documents
|
|
1355
1917
|
*
|
|
@@ -1359,17 +1921,17 @@ declare module "node-appwrite" {
|
|
|
1359
1921
|
* modes](/docs/admin).
|
|
1360
1922
|
*
|
|
1361
1923
|
* @param {string} collectionId
|
|
1362
|
-
* @param {string[]}
|
|
1924
|
+
* @param {string[]} queries
|
|
1363
1925
|
* @param {number} limit
|
|
1364
1926
|
* @param {number} offset
|
|
1365
|
-
* @param {string}
|
|
1366
|
-
* @param {string}
|
|
1367
|
-
* @param {string}
|
|
1368
|
-
* @param {string}
|
|
1927
|
+
* @param {string} cursor
|
|
1928
|
+
* @param {string} cursorDirection
|
|
1929
|
+
* @param {string[]} orderAttributes
|
|
1930
|
+
* @param {string[]} orderTypes
|
|
1369
1931
|
* @throws {AppwriteException}
|
|
1370
1932
|
* @returns {Promise}
|
|
1371
1933
|
*/
|
|
1372
|
-
listDocuments<Document extends Models.Document>(collectionId: string,
|
|
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>>;
|
|
1373
1935
|
/**
|
|
1374
1936
|
* Create Document
|
|
1375
1937
|
*
|
|
@@ -1379,16 +1941,14 @@ declare module "node-appwrite" {
|
|
|
1379
1941
|
* directly from your database console.
|
|
1380
1942
|
*
|
|
1381
1943
|
* @param {string} collectionId
|
|
1944
|
+
* @param {string} documentId
|
|
1382
1945
|
* @param {object} data
|
|
1383
1946
|
* @param {string[]} read
|
|
1384
1947
|
* @param {string[]} write
|
|
1385
|
-
* @param {string} parentDocument
|
|
1386
|
-
* @param {string} parentProperty
|
|
1387
|
-
* @param {string} parentPropertyType
|
|
1388
1948
|
* @throws {AppwriteException}
|
|
1389
1949
|
* @returns {Promise}
|
|
1390
1950
|
*/
|
|
1391
|
-
createDocument<Document extends Models.Document>(collectionId: string, data: object, read?: string[], write?: string[]
|
|
1951
|
+
createDocument<Document extends Models.Document>(collectionId: string, documentId: string, data: object, read?: string[], write?: string[]): Promise<Document>;
|
|
1392
1952
|
/**
|
|
1393
1953
|
* Get Document
|
|
1394
1954
|
*
|
|
@@ -1429,6 +1989,44 @@ declare module "node-appwrite" {
|
|
|
1429
1989
|
* @returns {Promise}
|
|
1430
1990
|
*/
|
|
1431
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>;
|
|
1432
2030
|
}
|
|
1433
2031
|
export class Functions extends Service {
|
|
1434
2032
|
/**
|
|
@@ -1440,11 +2038,13 @@ declare module "node-appwrite" {
|
|
|
1440
2038
|
* @param {string} search
|
|
1441
2039
|
* @param {number} limit
|
|
1442
2040
|
* @param {number} offset
|
|
2041
|
+
* @param {string} cursor
|
|
2042
|
+
* @param {string} cursorDirection
|
|
1443
2043
|
* @param {string} orderType
|
|
1444
2044
|
* @throws {AppwriteException}
|
|
1445
2045
|
* @returns {Promise}
|
|
1446
2046
|
*/
|
|
1447
|
-
list(search?: string, limit?: number, offset?: number, orderType?: string): Promise<Models.FunctionList>;
|
|
2047
|
+
list(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.FunctionList>;
|
|
1448
2048
|
/**
|
|
1449
2049
|
* Create Function
|
|
1450
2050
|
*
|
|
@@ -1452,6 +2052,7 @@ declare module "node-appwrite" {
|
|
|
1452
2052
|
* [permissions](/docs/permissions) to allow different project users or team
|
|
1453
2053
|
* with access to execute the function using the client API.
|
|
1454
2054
|
*
|
|
2055
|
+
* @param {string} functionId
|
|
1455
2056
|
* @param {string} name
|
|
1456
2057
|
* @param {string[]} execute
|
|
1457
2058
|
* @param {string} runtime
|
|
@@ -1462,7 +2063,16 @@ declare module "node-appwrite" {
|
|
|
1462
2063
|
* @throws {AppwriteException}
|
|
1463
2064
|
* @returns {Promise}
|
|
1464
2065
|
*/
|
|
1465
|
-
create(name: string, execute: string[], runtime: string, vars?: object, events?: string[], schedule?: string, timeout?: number): Promise<Models.Function>;
|
|
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>;
|
|
1466
2076
|
/**
|
|
1467
2077
|
* Get Function
|
|
1468
2078
|
*
|
|
@@ -1508,14 +2118,15 @@ declare module "node-appwrite" {
|
|
|
1508
2118
|
* different API modes](/docs/admin).
|
|
1509
2119
|
*
|
|
1510
2120
|
* @param {string} functionId
|
|
1511
|
-
* @param {string} search
|
|
1512
2121
|
* @param {number} limit
|
|
1513
2122
|
* @param {number} offset
|
|
1514
|
-
* @param {string}
|
|
2123
|
+
* @param {string} search
|
|
2124
|
+
* @param {string} cursor
|
|
2125
|
+
* @param {string} cursorDirection
|
|
1515
2126
|
* @throws {AppwriteException}
|
|
1516
2127
|
* @returns {Promise}
|
|
1517
2128
|
*/
|
|
1518
|
-
listExecutions(functionId: string,
|
|
2129
|
+
listExecutions(functionId: string, limit?: number, offset?: number, search?: string, cursor?: string, cursorDirection?: string): Promise<Models.ExecutionList>;
|
|
1519
2130
|
/**
|
|
1520
2131
|
* Create Execution
|
|
1521
2132
|
*
|
|
@@ -1564,11 +2175,13 @@ declare module "node-appwrite" {
|
|
|
1564
2175
|
* @param {string} search
|
|
1565
2176
|
* @param {number} limit
|
|
1566
2177
|
* @param {number} offset
|
|
2178
|
+
* @param {string} cursor
|
|
2179
|
+
* @param {string} cursorDirection
|
|
1567
2180
|
* @param {string} orderType
|
|
1568
2181
|
* @throws {AppwriteException}
|
|
1569
2182
|
* @returns {Promise}
|
|
1570
2183
|
*/
|
|
1571
|
-
listTags(functionId: string, search?: string, limit?: number, offset?: number, orderType?: string): Promise<Models.TagList>;
|
|
2184
|
+
listTags(functionId: string, search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.TagList>;
|
|
1572
2185
|
/**
|
|
1573
2186
|
* Create Tag
|
|
1574
2187
|
*
|
|
@@ -1622,16 +2235,16 @@ declare module "node-appwrite" {
|
|
|
1622
2235
|
* @throws {AppwriteException}
|
|
1623
2236
|
* @returns {Promise}
|
|
1624
2237
|
*/
|
|
1625
|
-
get(): Promise<
|
|
2238
|
+
get(): Promise<Models.HealthStatus>;
|
|
1626
2239
|
/**
|
|
1627
|
-
* Get
|
|
2240
|
+
* Get Antivirus
|
|
1628
2241
|
*
|
|
1629
|
-
* Check the Appwrite
|
|
2242
|
+
* Check the Appwrite Antivirus server is up and connection is successful.
|
|
1630
2243
|
*
|
|
1631
2244
|
* @throws {AppwriteException}
|
|
1632
2245
|
* @returns {Promise}
|
|
1633
2246
|
*/
|
|
1634
|
-
|
|
2247
|
+
getAntivirus(): Promise<Models.HealthAntivirus>;
|
|
1635
2248
|
/**
|
|
1636
2249
|
* Get Cache
|
|
1637
2250
|
*
|
|
@@ -1641,7 +2254,7 @@ declare module "node-appwrite" {
|
|
|
1641
2254
|
* @throws {AppwriteException}
|
|
1642
2255
|
* @returns {Promise}
|
|
1643
2256
|
*/
|
|
1644
|
-
getCache(): Promise<
|
|
2257
|
+
getCache(): Promise<Models.HealthStatus>;
|
|
1645
2258
|
/**
|
|
1646
2259
|
* Get DB
|
|
1647
2260
|
*
|
|
@@ -1650,9 +2263,9 @@ declare module "node-appwrite" {
|
|
|
1650
2263
|
* @throws {AppwriteException}
|
|
1651
2264
|
* @returns {Promise}
|
|
1652
2265
|
*/
|
|
1653
|
-
getDB(): Promise<
|
|
2266
|
+
getDB(): Promise<Models.HealthStatus>;
|
|
1654
2267
|
/**
|
|
1655
|
-
* Get
|
|
2268
|
+
* Get Certificates Queue
|
|
1656
2269
|
*
|
|
1657
2270
|
* Get the number of certificates that are waiting to be issued against
|
|
1658
2271
|
* [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
|
|
@@ -1661,14 +2274,14 @@ declare module "node-appwrite" {
|
|
|
1661
2274
|
* @throws {AppwriteException}
|
|
1662
2275
|
* @returns {Promise}
|
|
1663
2276
|
*/
|
|
1664
|
-
getQueueCertificates(): Promise<
|
|
2277
|
+
getQueueCertificates(): Promise<Models.HealthQueue>;
|
|
1665
2278
|
/**
|
|
1666
2279
|
* Get Functions Queue
|
|
1667
2280
|
*
|
|
1668
2281
|
* @throws {AppwriteException}
|
|
1669
2282
|
* @returns {Promise}
|
|
1670
2283
|
*/
|
|
1671
|
-
getQueueFunctions(): Promise<
|
|
2284
|
+
getQueueFunctions(): Promise<Models.HealthQueue>;
|
|
1672
2285
|
/**
|
|
1673
2286
|
* Get Logs Queue
|
|
1674
2287
|
*
|
|
@@ -1678,17 +2291,7 @@ declare module "node-appwrite" {
|
|
|
1678
2291
|
* @throws {AppwriteException}
|
|
1679
2292
|
* @returns {Promise}
|
|
1680
2293
|
*/
|
|
1681
|
-
getQueueLogs(): Promise<
|
|
1682
|
-
/**
|
|
1683
|
-
* Get Tasks Queue
|
|
1684
|
-
*
|
|
1685
|
-
* Get the number of tasks that are waiting to be processed in the Appwrite
|
|
1686
|
-
* internal queue server.
|
|
1687
|
-
*
|
|
1688
|
-
* @throws {AppwriteException}
|
|
1689
|
-
* @returns {Promise}
|
|
1690
|
-
*/
|
|
1691
|
-
getQueueTasks(): Promise<Response>;
|
|
2294
|
+
getQueueLogs(): Promise<Models.HealthQueue>;
|
|
1692
2295
|
/**
|
|
1693
2296
|
* Get Usage Queue
|
|
1694
2297
|
*
|
|
@@ -1698,7 +2301,7 @@ declare module "node-appwrite" {
|
|
|
1698
2301
|
* @throws {AppwriteException}
|
|
1699
2302
|
* @returns {Promise}
|
|
1700
2303
|
*/
|
|
1701
|
-
getQueueUsage(): Promise<
|
|
2304
|
+
getQueueUsage(): Promise<Models.HealthQueue>;
|
|
1702
2305
|
/**
|
|
1703
2306
|
* Get Webhooks Queue
|
|
1704
2307
|
*
|
|
@@ -1708,7 +2311,7 @@ declare module "node-appwrite" {
|
|
|
1708
2311
|
* @throws {AppwriteException}
|
|
1709
2312
|
* @returns {Promise}
|
|
1710
2313
|
*/
|
|
1711
|
-
getQueueWebhooks(): Promise<
|
|
2314
|
+
getQueueWebhooks(): Promise<Models.HealthQueue>;
|
|
1712
2315
|
/**
|
|
1713
2316
|
* Get Local Storage
|
|
1714
2317
|
*
|
|
@@ -1717,7 +2320,7 @@ declare module "node-appwrite" {
|
|
|
1717
2320
|
* @throws {AppwriteException}
|
|
1718
2321
|
* @returns {Promise}
|
|
1719
2322
|
*/
|
|
1720
|
-
getStorageLocal(): Promise<
|
|
2323
|
+
getStorageLocal(): Promise<Models.HealthStatus>;
|
|
1721
2324
|
/**
|
|
1722
2325
|
* Get Time
|
|
1723
2326
|
*
|
|
@@ -1732,7 +2335,7 @@ declare module "node-appwrite" {
|
|
|
1732
2335
|
* @throws {AppwriteException}
|
|
1733
2336
|
* @returns {Promise}
|
|
1734
2337
|
*/
|
|
1735
|
-
getTime(): Promise<
|
|
2338
|
+
getTime(): Promise<Models.HealthTime>;
|
|
1736
2339
|
}
|
|
1737
2340
|
export class Locale extends Service {
|
|
1738
2341
|
/**
|
|
@@ -1822,11 +2425,13 @@ declare module "node-appwrite" {
|
|
|
1822
2425
|
* @param {string} search
|
|
1823
2426
|
* @param {number} limit
|
|
1824
2427
|
* @param {number} offset
|
|
2428
|
+
* @param {string} cursor
|
|
2429
|
+
* @param {string} cursorDirection
|
|
1825
2430
|
* @param {string} orderType
|
|
1826
2431
|
* @throws {AppwriteException}
|
|
1827
2432
|
* @returns {Promise}
|
|
1828
2433
|
*/
|
|
1829
|
-
listFiles(search?: string, limit?: number, offset?: number, orderType?: string): Promise<Models.FileList>;
|
|
2434
|
+
listFiles(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.FileList>;
|
|
1830
2435
|
/**
|
|
1831
2436
|
* Create File
|
|
1832
2437
|
*
|
|
@@ -1834,13 +2439,14 @@ declare module "node-appwrite" {
|
|
|
1834
2439
|
* assigned to read and write access unless he has passed custom values for
|
|
1835
2440
|
* read and write arguments.
|
|
1836
2441
|
*
|
|
2442
|
+
* @param {string} fileId
|
|
1837
2443
|
* @param {File} file
|
|
1838
2444
|
* @param {string[]} read
|
|
1839
2445
|
* @param {string[]} write
|
|
1840
2446
|
* @throws {AppwriteException}
|
|
1841
2447
|
* @returns {Promise}
|
|
1842
2448
|
*/
|
|
1843
|
-
createFile(file: File, read?: string[], write?: string[]): Promise<Models.File>;
|
|
2449
|
+
createFile(fileId: string, file: File, read?: string[], write?: string[]): Promise<Models.File>;
|
|
1844
2450
|
/**
|
|
1845
2451
|
* Get File
|
|
1846
2452
|
*
|
|
@@ -1929,38 +2535,40 @@ declare module "node-appwrite" {
|
|
|
1929
2535
|
/**
|
|
1930
2536
|
* List Teams
|
|
1931
2537
|
*
|
|
1932
|
-
* Get a list of all the current user
|
|
1933
|
-
* filter your results.
|
|
1934
|
-
*
|
|
1935
|
-
*
|
|
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).
|
|
1936
2543
|
*
|
|
1937
2544
|
* @param {string} search
|
|
1938
2545
|
* @param {number} limit
|
|
1939
2546
|
* @param {number} offset
|
|
2547
|
+
* @param {string} cursor
|
|
2548
|
+
* @param {string} cursorDirection
|
|
1940
2549
|
* @param {string} orderType
|
|
1941
2550
|
* @throws {AppwriteException}
|
|
1942
2551
|
* @returns {Promise}
|
|
1943
2552
|
*/
|
|
1944
|
-
list(search?: string, limit?: number, offset?: number, orderType?: string): Promise<Models.TeamList>;
|
|
2553
|
+
list(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.TeamList>;
|
|
1945
2554
|
/**
|
|
1946
2555
|
* Create Team
|
|
1947
2556
|
*
|
|
1948
2557
|
* Create a new team. The user who creates the team will automatically be
|
|
1949
|
-
* assigned as the owner of the team.
|
|
1950
|
-
*
|
|
1951
|
-
* 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.
|
|
1952
2560
|
*
|
|
2561
|
+
* @param {string} teamId
|
|
1953
2562
|
* @param {string} name
|
|
1954
2563
|
* @param {string[]} roles
|
|
1955
2564
|
* @throws {AppwriteException}
|
|
1956
2565
|
* @returns {Promise}
|
|
1957
2566
|
*/
|
|
1958
|
-
create(name: string, roles?: string[]): Promise<Models.Team>;
|
|
2567
|
+
create(teamId: string, name: string, roles?: string[]): Promise<Models.Team>;
|
|
1959
2568
|
/**
|
|
1960
2569
|
* Get Team
|
|
1961
2570
|
*
|
|
1962
|
-
* Get a team by its
|
|
1963
|
-
* resource.
|
|
2571
|
+
* Get a team by its ID. All team members have read access for this resource.
|
|
1964
2572
|
*
|
|
1965
2573
|
* @param {string} teamId
|
|
1966
2574
|
* @throws {AppwriteException}
|
|
@@ -1970,8 +2578,8 @@ declare module "node-appwrite" {
|
|
|
1970
2578
|
/**
|
|
1971
2579
|
* Update Team
|
|
1972
2580
|
*
|
|
1973
|
-
* Update a team
|
|
1974
|
-
*
|
|
2581
|
+
* Update a team using its ID. Only members with the owner role can update the
|
|
2582
|
+
* team.
|
|
1975
2583
|
*
|
|
1976
2584
|
* @param {string} teamId
|
|
1977
2585
|
* @param {string} name
|
|
@@ -1982,8 +2590,8 @@ declare module "node-appwrite" {
|
|
|
1982
2590
|
/**
|
|
1983
2591
|
* Delete Team
|
|
1984
2592
|
*
|
|
1985
|
-
* Delete a team
|
|
1986
|
-
*
|
|
2593
|
+
* Delete a team using its ID. Only team members with the owner role can
|
|
2594
|
+
* delete the team.
|
|
1987
2595
|
*
|
|
1988
2596
|
* @param {string} teamId
|
|
1989
2597
|
* @throws {AppwriteException}
|
|
@@ -1993,37 +2601,38 @@ declare module "node-appwrite" {
|
|
|
1993
2601
|
/**
|
|
1994
2602
|
* Get Team Memberships
|
|
1995
2603
|
*
|
|
1996
|
-
*
|
|
1997
|
-
*
|
|
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.
|
|
1998
2606
|
*
|
|
1999
2607
|
* @param {string} teamId
|
|
2000
2608
|
* @param {string} search
|
|
2001
2609
|
* @param {number} limit
|
|
2002
2610
|
* @param {number} offset
|
|
2611
|
+
* @param {string} cursor
|
|
2612
|
+
* @param {string} cursorDirection
|
|
2003
2613
|
* @param {string} orderType
|
|
2004
2614
|
* @throws {AppwriteException}
|
|
2005
2615
|
* @returns {Promise}
|
|
2006
2616
|
*/
|
|
2007
|
-
getMemberships(teamId: string, search?: string, limit?: number, offset?: number, orderType?: string): Promise<Models.MembershipList>;
|
|
2617
|
+
getMemberships(teamId: string, search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.MembershipList>;
|
|
2008
2618
|
/**
|
|
2009
2619
|
* Create Team Membership
|
|
2010
2620
|
*
|
|
2011
|
-
*
|
|
2012
|
-
*
|
|
2013
|
-
*
|
|
2014
|
-
*
|
|
2015
|
-
*
|
|
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.
|
|
2016
2626
|
*
|
|
2017
|
-
* Use the '
|
|
2627
|
+
* Use the 'url' parameter to redirect the user from the invitation email back
|
|
2018
2628
|
* to your app. When the user is redirected, use the [Update Team Membership
|
|
2019
2629
|
* Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow
|
|
2020
|
-
* the user to accept the invitation to the team.
|
|
2021
|
-
* SDKs the redirect url can be empty string.
|
|
2630
|
+
* the user to accept the invitation to the team.
|
|
2022
2631
|
*
|
|
2023
|
-
* Please note that
|
|
2024
|
-
*
|
|
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)
|
|
2025
2634
|
* the only valid redirect URL's are the once from domains you have set when
|
|
2026
|
-
*
|
|
2635
|
+
* adding your platforms in the console interface.
|
|
2027
2636
|
*
|
|
2028
2637
|
* @param {string} teamId
|
|
2029
2638
|
* @param {string} email
|
|
@@ -2034,9 +2643,25 @@ declare module "node-appwrite" {
|
|
|
2034
2643
|
* @returns {Promise}
|
|
2035
2644
|
*/
|
|
2036
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>;
|
|
2037
2658
|
/**
|
|
2038
2659
|
* Update Membership Roles
|
|
2039
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
|
+
*
|
|
2040
2665
|
* @param {string} teamId
|
|
2041
2666
|
* @param {string} membershipId
|
|
2042
2667
|
* @param {string[]} roles
|
|
@@ -2061,7 +2686,7 @@ declare module "node-appwrite" {
|
|
|
2061
2686
|
* Update Team Membership Status
|
|
2062
2687
|
*
|
|
2063
2688
|
* Use this endpoint to allow a user to accept an invitation to join a team
|
|
2064
|
-
* after being redirected back to your app from the invitation email
|
|
2689
|
+
* after being redirected back to your app from the invitation email received
|
|
2065
2690
|
* by the user.
|
|
2066
2691
|
*
|
|
2067
2692
|
* @param {string} teamId
|
|
@@ -2083,23 +2708,26 @@ declare module "node-appwrite" {
|
|
|
2083
2708
|
* @param {string} search
|
|
2084
2709
|
* @param {number} limit
|
|
2085
2710
|
* @param {number} offset
|
|
2711
|
+
* @param {string} cursor
|
|
2712
|
+
* @param {string} cursorDirection
|
|
2086
2713
|
* @param {string} orderType
|
|
2087
2714
|
* @throws {AppwriteException}
|
|
2088
2715
|
* @returns {Promise}
|
|
2089
2716
|
*/
|
|
2090
|
-
list<Preferences extends Models.Preferences>(search?: string, limit?: number, offset?: number, orderType?: string): Promise<Models.UserList<Preferences>>;
|
|
2717
|
+
list<Preferences extends Models.Preferences>(search?: string, limit?: number, offset?: number, cursor?: string, cursorDirection?: string, orderType?: string): Promise<Models.UserList<Preferences>>;
|
|
2091
2718
|
/**
|
|
2092
2719
|
* Create User
|
|
2093
2720
|
*
|
|
2094
2721
|
* Create a new user.
|
|
2095
2722
|
*
|
|
2723
|
+
* @param {string} userId
|
|
2096
2724
|
* @param {string} email
|
|
2097
2725
|
* @param {string} password
|
|
2098
2726
|
* @param {string} name
|
|
2099
2727
|
* @throws {AppwriteException}
|
|
2100
2728
|
* @returns {Promise}
|
|
2101
2729
|
*/
|
|
2102
|
-
create<Preferences extends Models.Preferences>(email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
|
|
2730
|
+
create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
|
|
2103
2731
|
/**
|
|
2104
2732
|
* Get User
|
|
2105
2733
|
*
|
|
@@ -2134,13 +2762,15 @@ declare module "node-appwrite" {
|
|
|
2134
2762
|
/**
|
|
2135
2763
|
* Get User Logs
|
|
2136
2764
|
*
|
|
2137
|
-
* Get
|
|
2765
|
+
* Get the user activity logs list by its unique ID.
|
|
2138
2766
|
*
|
|
2139
2767
|
* @param {string} userId
|
|
2768
|
+
* @param {number} limit
|
|
2769
|
+
* @param {number} offset
|
|
2140
2770
|
* @throws {AppwriteException}
|
|
2141
2771
|
* @returns {Promise}
|
|
2142
2772
|
*/
|
|
2143
|
-
getLogs(userId: string): Promise<Models.LogList>;
|
|
2773
|
+
getLogs(userId: string, limit?: number, offset?: number): Promise<Models.LogList>;
|
|
2144
2774
|
/**
|
|
2145
2775
|
* Update Name
|
|
2146
2776
|
*
|
|
@@ -2222,11 +2852,11 @@ declare module "node-appwrite" {
|
|
|
2222
2852
|
* Update the user status by its unique ID.
|
|
2223
2853
|
*
|
|
2224
2854
|
* @param {string} userId
|
|
2225
|
-
* @param {
|
|
2855
|
+
* @param {boolean} status
|
|
2226
2856
|
* @throws {AppwriteException}
|
|
2227
2857
|
* @returns {Promise}
|
|
2228
2858
|
*/
|
|
2229
|
-
updateStatus<Preferences extends Models.Preferences>(userId: string, status:
|
|
2859
|
+
updateStatus<Preferences extends Models.Preferences>(userId: string, status: boolean): Promise<Models.User<Preferences>>;
|
|
2230
2860
|
/**
|
|
2231
2861
|
* Update Email Verification
|
|
2232
2862
|
*
|