@appwrite.io/console 0.0.1 → 0.1.0-preview-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.
Files changed (56) hide show
  1. package/.travis.yml +32 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/sdk.js +7743 -0
  4. package/dist/cjs/sdk.js.map +1 -0
  5. package/dist/esm/sdk.js +7725 -0
  6. package/dist/esm/sdk.js.map +1 -0
  7. package/dist/iife/sdk.js +7744 -0
  8. package/docs/examples/account/create.md +1 -1
  9. package/docs/examples/account/update-password.md +1 -1
  10. package/docs/examples/databases/update-boolean-attribute.md +18 -0
  11. package/docs/examples/databases/update-datetime-attribute.md +18 -0
  12. package/docs/examples/databases/update-email-attribute.md +18 -0
  13. package/docs/examples/databases/update-enum-attribute.md +18 -0
  14. package/docs/examples/databases/update-float-attribute.md +18 -0
  15. package/docs/examples/databases/update-integer-attribute.md +18 -0
  16. package/docs/examples/databases/update-ip-attribute.md +18 -0
  17. package/docs/examples/databases/update-string-attribute.md +18 -0
  18. package/docs/examples/databases/update-url-attribute.md +18 -0
  19. package/docs/examples/functions/create.md +1 -1
  20. package/docs/examples/functions/update.md +1 -1
  21. package/docs/examples/projects/update-auth-password-dictionary.md +18 -0
  22. package/docs/examples/projects/update-auth-password-history.md +18 -0
  23. package/docs/examples/teams/create-membership.md +1 -1
  24. package/docs/examples/teams/get-prefs.md +18 -0
  25. package/docs/examples/teams/update-name.md +18 -0
  26. package/docs/examples/teams/update-prefs.md +18 -0
  27. package/docs/examples/teams/update.md +1 -1
  28. package/docs/examples/users/update-password.md +1 -1
  29. package/package.json +1 -1
  30. package/src/client.ts +1 -1
  31. package/src/models.ts +15 -3
  32. package/src/services/account.ts +7 -7
  33. package/src/services/databases.ts +516 -0
  34. package/src/services/functions.ts +3 -11
  35. package/src/services/projects.ts +62 -0
  36. package/src/services/teams.ts +92 -22
  37. package/types/client.d.ts +135 -0
  38. package/types/id.d.ts +4 -0
  39. package/types/index.d.ts +17 -0
  40. package/types/models.d.ts +2552 -0
  41. package/types/permission.d.ts +7 -0
  42. package/types/query.d.ts +21 -0
  43. package/types/role.d.ts +8 -0
  44. package/types/service.d.ts +8 -0
  45. package/types/services/account.d.ts +442 -0
  46. package/types/services/avatars.d.ts +145 -0
  47. package/types/services/databases.d.ts +637 -0
  48. package/types/services/functions.d.ts +280 -0
  49. package/types/services/graphql.d.ts +25 -0
  50. package/types/services/health.d.ts +106 -0
  51. package/types/services/locale.d.ts +81 -0
  52. package/types/services/projects.d.ts +400 -0
  53. package/types/services/storage.d.ts +229 -0
  54. package/types/services/teams.d.ts +207 -0
  55. package/types/services/users.d.ts +340 -0
  56. package/.github/workflows/publish.yml +0 -18
@@ -0,0 +1,637 @@
1
+ import { Service } from '../service';
2
+ import { Client } from '../client';
3
+ import type { Models } from '../models';
4
+ export declare class Databases extends Service {
5
+ constructor(client: Client);
6
+ /**
7
+ * List Databases
8
+ *
9
+ * Get a list of all databases from the current Appwrite project. You can use
10
+ * the search parameter to filter your results.
11
+ *
12
+ * @param {string[]} queries
13
+ * @param {string} search
14
+ * @throws {AppwriteException}
15
+ * @returns {Promise}
16
+ */
17
+ list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
18
+ /**
19
+ * Create Database
20
+ *
21
+ * Create a new Database.
22
+ *
23
+ *
24
+ * @param {string} databaseId
25
+ * @param {string} name
26
+ * @throws {AppwriteException}
27
+ * @returns {Promise}
28
+ */
29
+ create(databaseId: string, name: string): Promise<Models.Database>;
30
+ /**
31
+ * Get usage stats for the database
32
+ *
33
+ *
34
+ * @param {string} range
35
+ * @throws {AppwriteException}
36
+ * @returns {Promise}
37
+ */
38
+ getUsage(range?: string): Promise<Models.UsageDatabases>;
39
+ /**
40
+ * Get Database
41
+ *
42
+ * Get a database by its unique ID. This endpoint response returns a JSON
43
+ * object with the database metadata.
44
+ *
45
+ * @param {string} databaseId
46
+ * @throws {AppwriteException}
47
+ * @returns {Promise}
48
+ */
49
+ get(databaseId: string): Promise<Models.Database>;
50
+ /**
51
+ * Update Database
52
+ *
53
+ * Update a database by its unique ID.
54
+ *
55
+ * @param {string} databaseId
56
+ * @param {string} name
57
+ * @throws {AppwriteException}
58
+ * @returns {Promise}
59
+ */
60
+ update(databaseId: string, name: string): Promise<Models.Database>;
61
+ /**
62
+ * Delete Database
63
+ *
64
+ * Delete a database by its unique ID. Only API keys with with databases.write
65
+ * scope can delete a database.
66
+ *
67
+ * @param {string} databaseId
68
+ * @throws {AppwriteException}
69
+ * @returns {Promise}
70
+ */
71
+ delete(databaseId: string): Promise<{}>;
72
+ /**
73
+ * List Collections
74
+ *
75
+ * Get a list of all collections that belong to the provided databaseId. You
76
+ * can use the search parameter to filter your results.
77
+ *
78
+ * @param {string} databaseId
79
+ * @param {string[]} queries
80
+ * @param {string} search
81
+ * @throws {AppwriteException}
82
+ * @returns {Promise}
83
+ */
84
+ listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
85
+ /**
86
+ * Create Collection
87
+ *
88
+ * Create a new Collection. Before using this route, you should create a new
89
+ * database resource using either a [server
90
+ * integration](/docs/server/databases#databasesCreateCollection) API or
91
+ * directly from your database console.
92
+ *
93
+ * @param {string} databaseId
94
+ * @param {string} collectionId
95
+ * @param {string} name
96
+ * @param {string[]} permissions
97
+ * @param {boolean} documentSecurity
98
+ * @throws {AppwriteException}
99
+ * @returns {Promise}
100
+ */
101
+ createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean): Promise<Models.Collection>;
102
+ /**
103
+ * Get Collection
104
+ *
105
+ * Get a collection by its unique ID. This endpoint response returns a JSON
106
+ * object with the collection metadata.
107
+ *
108
+ * @param {string} databaseId
109
+ * @param {string} collectionId
110
+ * @throws {AppwriteException}
111
+ * @returns {Promise}
112
+ */
113
+ getCollection(databaseId: string, collectionId: string): Promise<Models.Collection>;
114
+ /**
115
+ * Update Collection
116
+ *
117
+ * Update a collection by its unique ID.
118
+ *
119
+ * @param {string} databaseId
120
+ * @param {string} collectionId
121
+ * @param {string} name
122
+ * @param {string[]} permissions
123
+ * @param {boolean} documentSecurity
124
+ * @param {boolean} enabled
125
+ * @throws {AppwriteException}
126
+ * @returns {Promise}
127
+ */
128
+ updateCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
129
+ /**
130
+ * Delete Collection
131
+ *
132
+ * Delete a collection by its unique ID. Only users with write permissions
133
+ * have access to delete this resource.
134
+ *
135
+ * @param {string} databaseId
136
+ * @param {string} collectionId
137
+ * @throws {AppwriteException}
138
+ * @returns {Promise}
139
+ */
140
+ deleteCollection(databaseId: string, collectionId: string): Promise<{}>;
141
+ /**
142
+ * List Attributes
143
+ *
144
+ *
145
+ * @param {string} databaseId
146
+ * @param {string} collectionId
147
+ * @throws {AppwriteException}
148
+ * @returns {Promise}
149
+ */
150
+ listAttributes(databaseId: string, collectionId: string): Promise<Models.AttributeList>;
151
+ /**
152
+ * Create Boolean Attribute
153
+ *
154
+ * Create a boolean attribute.
155
+ *
156
+ *
157
+ * @param {string} databaseId
158
+ * @param {string} collectionId
159
+ * @param {string} key
160
+ * @param {boolean} required
161
+ * @param {boolean} xdefault
162
+ * @param {boolean} array
163
+ * @throws {AppwriteException}
164
+ * @returns {Promise}
165
+ */
166
+ createBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean>;
167
+ /**
168
+ * Update Boolean Attribute
169
+ *
170
+ *
171
+ * @param {string} databaseId
172
+ * @param {string} collectionId
173
+ * @param {string} key
174
+ * @param {boolean} required
175
+ * @param {boolean} xdefault
176
+ * @throws {AppwriteException}
177
+ * @returns {Promise}
178
+ */
179
+ updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault: boolean): Promise<Models.AttributeBoolean>;
180
+ /**
181
+ * Create DateTime Attribute
182
+ *
183
+ *
184
+ * @param {string} databaseId
185
+ * @param {string} collectionId
186
+ * @param {string} key
187
+ * @param {boolean} required
188
+ * @param {string} xdefault
189
+ * @param {boolean} array
190
+ * @throws {AppwriteException}
191
+ * @returns {Promise}
192
+ */
193
+ createDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeDatetime>;
194
+ /**
195
+ * Update DateTime Attribute
196
+ *
197
+ *
198
+ * @param {string} databaseId
199
+ * @param {string} collectionId
200
+ * @param {string} key
201
+ * @param {boolean} required
202
+ * @param {string} xdefault
203
+ * @throws {AppwriteException}
204
+ * @returns {Promise}
205
+ */
206
+ updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault: string): Promise<Models.AttributeDatetime>;
207
+ /**
208
+ * Create Email Attribute
209
+ *
210
+ * Create an email attribute.
211
+ *
212
+ *
213
+ * @param {string} databaseId
214
+ * @param {string} collectionId
215
+ * @param {string} key
216
+ * @param {boolean} required
217
+ * @param {string} xdefault
218
+ * @param {boolean} array
219
+ * @throws {AppwriteException}
220
+ * @returns {Promise}
221
+ */
222
+ createEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail>;
223
+ /**
224
+ * Update Email Attribute
225
+ *
226
+ * Update an email attribute. Changing the `default` value will not update
227
+ * already existing documents.
228
+ *
229
+ *
230
+ * @param {string} databaseId
231
+ * @param {string} collectionId
232
+ * @param {string} key
233
+ * @param {boolean} required
234
+ * @param {string} xdefault
235
+ * @throws {AppwriteException}
236
+ * @returns {Promise}
237
+ */
238
+ updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault: string): Promise<Models.AttributeEmail>;
239
+ /**
240
+ * Create Enum Attribute
241
+ *
242
+ *
243
+ * @param {string} databaseId
244
+ * @param {string} collectionId
245
+ * @param {string} key
246
+ * @param {string[]} elements
247
+ * @param {boolean} required
248
+ * @param {string} xdefault
249
+ * @param {boolean} array
250
+ * @throws {AppwriteException}
251
+ * @returns {Promise}
252
+ */
253
+ createEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum>;
254
+ /**
255
+ * Update Enum Attribute
256
+ *
257
+ * Update an enum attribute. Changing the `default` value will not update
258
+ * already existing documents.
259
+ *
260
+ *
261
+ * @param {string} databaseId
262
+ * @param {string} collectionId
263
+ * @param {string} key
264
+ * @param {string[]} elements
265
+ * @param {boolean} required
266
+ * @param {string} xdefault
267
+ * @throws {AppwriteException}
268
+ * @returns {Promise}
269
+ */
270
+ updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault: string): Promise<Models.AttributeEnum>;
271
+ /**
272
+ * Create Float Attribute
273
+ *
274
+ * Create a float attribute. Optionally, minimum and maximum values can be
275
+ * provided.
276
+ *
277
+ *
278
+ * @param {string} databaseId
279
+ * @param {string} collectionId
280
+ * @param {string} key
281
+ * @param {boolean} required
282
+ * @param {number} min
283
+ * @param {number} max
284
+ * @param {number} xdefault
285
+ * @param {boolean} array
286
+ * @throws {AppwriteException}
287
+ * @returns {Promise}
288
+ */
289
+ createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
290
+ /**
291
+ * Update Float Attribute
292
+ *
293
+ * Update a float attribute. Changing the `default` value will not update
294
+ * already existing documents.
295
+ *
296
+ *
297
+ * @param {string} databaseId
298
+ * @param {string} collectionId
299
+ * @param {string} key
300
+ * @param {boolean} required
301
+ * @param {number} min
302
+ * @param {number} max
303
+ * @param {number} xdefault
304
+ * @throws {AppwriteException}
305
+ * @returns {Promise}
306
+ */
307
+ updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault: number): Promise<Models.AttributeFloat>;
308
+ /**
309
+ * Create Integer Attribute
310
+ *
311
+ * Create an integer attribute. Optionally, minimum and maximum values can be
312
+ * provided.
313
+ *
314
+ *
315
+ * @param {string} databaseId
316
+ * @param {string} collectionId
317
+ * @param {string} key
318
+ * @param {boolean} required
319
+ * @param {number} min
320
+ * @param {number} max
321
+ * @param {number} xdefault
322
+ * @param {boolean} array
323
+ * @throws {AppwriteException}
324
+ * @returns {Promise}
325
+ */
326
+ createIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger>;
327
+ /**
328
+ * Update Integer Attribute
329
+ *
330
+ * Update an integer attribute. Changing the `default` value will not update
331
+ * already existing documents.
332
+ *
333
+ *
334
+ * @param {string} databaseId
335
+ * @param {string} collectionId
336
+ * @param {string} key
337
+ * @param {boolean} required
338
+ * @param {number} min
339
+ * @param {number} max
340
+ * @param {number} xdefault
341
+ * @throws {AppwriteException}
342
+ * @returns {Promise}
343
+ */
344
+ updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault: number): Promise<Models.AttributeInteger>;
345
+ /**
346
+ * Create IP Address Attribute
347
+ *
348
+ * Create IP address attribute.
349
+ *
350
+ *
351
+ * @param {string} databaseId
352
+ * @param {string} collectionId
353
+ * @param {string} key
354
+ * @param {boolean} required
355
+ * @param {string} xdefault
356
+ * @param {boolean} array
357
+ * @throws {AppwriteException}
358
+ * @returns {Promise}
359
+ */
360
+ createIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp>;
361
+ /**
362
+ * Update IP Address Attribute
363
+ *
364
+ * Update an ip attribute. Changing the `default` value will not update
365
+ * already existing documents.
366
+ *
367
+ *
368
+ * @param {string} databaseId
369
+ * @param {string} collectionId
370
+ * @param {string} key
371
+ * @param {boolean} required
372
+ * @param {string} xdefault
373
+ * @throws {AppwriteException}
374
+ * @returns {Promise}
375
+ */
376
+ updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault: string): Promise<Models.AttributeIp>;
377
+ /**
378
+ * Create String Attribute
379
+ *
380
+ * Create a string attribute.
381
+ *
382
+ *
383
+ * @param {string} databaseId
384
+ * @param {string} collectionId
385
+ * @param {string} key
386
+ * @param {number} size
387
+ * @param {boolean} required
388
+ * @param {string} xdefault
389
+ * @param {boolean} array
390
+ * @throws {AppwriteException}
391
+ * @returns {Promise}
392
+ */
393
+ createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeString>;
394
+ /**
395
+ * Update String Attribute
396
+ *
397
+ * Update a string attribute. Changing the `default` value will not update
398
+ * already existing documents.
399
+ *
400
+ *
401
+ * @param {string} databaseId
402
+ * @param {string} collectionId
403
+ * @param {string} key
404
+ * @param {boolean} required
405
+ * @param {string} xdefault
406
+ * @throws {AppwriteException}
407
+ * @returns {Promise}
408
+ */
409
+ updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault: string): Promise<Models.AttributeString>;
410
+ /**
411
+ * Create URL Attribute
412
+ *
413
+ * Create a URL attribute.
414
+ *
415
+ *
416
+ * @param {string} databaseId
417
+ * @param {string} collectionId
418
+ * @param {string} key
419
+ * @param {boolean} required
420
+ * @param {string} xdefault
421
+ * @param {boolean} array
422
+ * @throws {AppwriteException}
423
+ * @returns {Promise}
424
+ */
425
+ createUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl>;
426
+ /**
427
+ * Update URL Attribute
428
+ *
429
+ * Update an url attribute. Changing the `default` value will not update
430
+ * already existing documents.
431
+ *
432
+ *
433
+ * @param {string} databaseId
434
+ * @param {string} collectionId
435
+ * @param {string} key
436
+ * @param {boolean} required
437
+ * @param {string} xdefault
438
+ * @throws {AppwriteException}
439
+ * @returns {Promise}
440
+ */
441
+ updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault: string): Promise<Models.AttributeUrl>;
442
+ /**
443
+ * Get Attribute
444
+ *
445
+ *
446
+ * @param {string} databaseId
447
+ * @param {string} collectionId
448
+ * @param {string} key
449
+ * @throws {AppwriteException}
450
+ * @returns {Promise}
451
+ */
452
+ getAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
453
+ /**
454
+ * Delete Attribute
455
+ *
456
+ *
457
+ * @param {string} databaseId
458
+ * @param {string} collectionId
459
+ * @param {string} key
460
+ * @throws {AppwriteException}
461
+ * @returns {Promise}
462
+ */
463
+ deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
464
+ /**
465
+ * List Documents
466
+ *
467
+ * Get a list of all the user's documents in a given collection. You can use
468
+ * the query params to filter your results.
469
+ *
470
+ * @param {string} databaseId
471
+ * @param {string} collectionId
472
+ * @param {string[]} queries
473
+ * @throws {AppwriteException}
474
+ * @returns {Promise}
475
+ */
476
+ listDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
477
+ /**
478
+ * Create Document
479
+ *
480
+ * Create a new Document. Before using this route, you should create a new
481
+ * collection resource using either a [server
482
+ * integration](/docs/server/databases#databasesCreateCollection) API or
483
+ * directly from your database console.
484
+ *
485
+ * @param {string} databaseId
486
+ * @param {string} collectionId
487
+ * @param {string} documentId
488
+ * @param {Omit<Document, keyof Models.Document>} data
489
+ * @param {string[]} permissions
490
+ * @throws {AppwriteException}
491
+ * @returns {Promise}
492
+ */
493
+ createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>;
494
+ /**
495
+ * Get Document
496
+ *
497
+ * Get a document by its unique ID. This endpoint response returns a JSON
498
+ * object with the document data.
499
+ *
500
+ * @param {string} databaseId
501
+ * @param {string} collectionId
502
+ * @param {string} documentId
503
+ * @throws {AppwriteException}
504
+ * @returns {Promise}
505
+ */
506
+ getDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string): Promise<Document>;
507
+ /**
508
+ * Update Document
509
+ *
510
+ * Update a document by its unique ID. Using the patch method you can pass
511
+ * only specific fields that will get updated.
512
+ *
513
+ * @param {string} databaseId
514
+ * @param {string} collectionId
515
+ * @param {string} documentId
516
+ * @param {Partial<Omit<Document, keyof Models.Document>>} data
517
+ * @param {string[]} permissions
518
+ * @throws {AppwriteException}
519
+ * @returns {Promise}
520
+ */
521
+ updateDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data?: Partial<Omit<Document, keyof Models.Document>>, permissions?: string[]): Promise<Document>;
522
+ /**
523
+ * Delete Document
524
+ *
525
+ * Delete a document by its unique ID.
526
+ *
527
+ * @param {string} databaseId
528
+ * @param {string} collectionId
529
+ * @param {string} documentId
530
+ * @throws {AppwriteException}
531
+ * @returns {Promise}
532
+ */
533
+ deleteDocument(databaseId: string, collectionId: string, documentId: string): Promise<{}>;
534
+ /**
535
+ * List Document Logs
536
+ *
537
+ * Get the document activity logs list by its unique ID.
538
+ *
539
+ * @param {string} databaseId
540
+ * @param {string} collectionId
541
+ * @param {string} documentId
542
+ * @param {string[]} queries
543
+ * @throws {AppwriteException}
544
+ * @returns {Promise}
545
+ */
546
+ listDocumentLogs(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Models.LogList>;
547
+ /**
548
+ * List Indexes
549
+ *
550
+ *
551
+ * @param {string} databaseId
552
+ * @param {string} collectionId
553
+ * @throws {AppwriteException}
554
+ * @returns {Promise}
555
+ */
556
+ listIndexes(databaseId: string, collectionId: string): Promise<Models.IndexList>;
557
+ /**
558
+ * Create Index
559
+ *
560
+ *
561
+ * @param {string} databaseId
562
+ * @param {string} collectionId
563
+ * @param {string} key
564
+ * @param {string} type
565
+ * @param {string[]} attributes
566
+ * @param {string[]} orders
567
+ * @throws {AppwriteException}
568
+ * @returns {Promise}
569
+ */
570
+ createIndex(databaseId: string, collectionId: string, key: string, type: string, attributes: string[], orders?: string[]): Promise<Models.Index>;
571
+ /**
572
+ * Get Index
573
+ *
574
+ *
575
+ * @param {string} databaseId
576
+ * @param {string} collectionId
577
+ * @param {string} key
578
+ * @throws {AppwriteException}
579
+ * @returns {Promise}
580
+ */
581
+ getIndex(databaseId: string, collectionId: string, key: string): Promise<Models.Index>;
582
+ /**
583
+ * Delete Index
584
+ *
585
+ *
586
+ * @param {string} databaseId
587
+ * @param {string} collectionId
588
+ * @param {string} key
589
+ * @throws {AppwriteException}
590
+ * @returns {Promise}
591
+ */
592
+ deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
593
+ /**
594
+ * List Collection Logs
595
+ *
596
+ * Get the collection activity logs list by its unique ID.
597
+ *
598
+ * @param {string} databaseId
599
+ * @param {string} collectionId
600
+ * @param {string[]} queries
601
+ * @throws {AppwriteException}
602
+ * @returns {Promise}
603
+ */
604
+ listCollectionLogs(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.LogList>;
605
+ /**
606
+ * Get usage stats for a collection
607
+ *
608
+ *
609
+ * @param {string} databaseId
610
+ * @param {string} collectionId
611
+ * @param {string} range
612
+ * @throws {AppwriteException}
613
+ * @returns {Promise}
614
+ */
615
+ getCollectionUsage(databaseId: string, collectionId: string, range?: string): Promise<Models.UsageCollection>;
616
+ /**
617
+ * List Database Logs
618
+ *
619
+ * Get the database activity logs list by its unique ID.
620
+ *
621
+ * @param {string} databaseId
622
+ * @param {string[]} queries
623
+ * @throws {AppwriteException}
624
+ * @returns {Promise}
625
+ */
626
+ listLogs(databaseId: string, queries?: string[]): Promise<Models.LogList>;
627
+ /**
628
+ * Get usage stats for the database
629
+ *
630
+ *
631
+ * @param {string} databaseId
632
+ * @param {string} range
633
+ * @throws {AppwriteException}
634
+ * @returns {Promise}
635
+ */
636
+ getDatabaseUsage(databaseId: string, range?: string): Promise<Models.UsageDatabase>;
637
+ }