node-appwrite 15.0.0 → 15.0.1

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 (73) hide show
  1. package/dist/client.js +7 -4
  2. package/dist/client.js.map +1 -1
  3. package/dist/client.mjs +7 -4
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/models.d.mts +2 -2
  6. package/dist/models.d.ts +2 -2
  7. package/dist/services/account.d.mts +0 -86
  8. package/dist/services/account.d.ts +0 -86
  9. package/dist/services/account.js +86 -172
  10. package/dist/services/account.js.map +1 -1
  11. package/dist/services/account.mjs +86 -172
  12. package/dist/services/account.mjs.map +1 -1
  13. package/dist/services/avatars.d.mts +0 -14
  14. package/dist/services/avatars.d.ts +0 -14
  15. package/dist/services/avatars.js +14 -28
  16. package/dist/services/avatars.js.map +1 -1
  17. package/dist/services/avatars.mjs +14 -28
  18. package/dist/services/avatars.mjs.map +1 -1
  19. package/dist/services/databases.d.mts +0 -84
  20. package/dist/services/databases.d.ts +0 -84
  21. package/dist/services/databases.js +84 -168
  22. package/dist/services/databases.js.map +1 -1
  23. package/dist/services/databases.mjs +84 -168
  24. package/dist/services/databases.mjs.map +1 -1
  25. package/dist/services/functions.d.mts +0 -48
  26. package/dist/services/functions.d.ts +0 -48
  27. package/dist/services/functions.js +48 -96
  28. package/dist/services/functions.js.map +1 -1
  29. package/dist/services/functions.mjs +48 -96
  30. package/dist/services/functions.mjs.map +1 -1
  31. package/dist/services/graphql.d.mts +0 -4
  32. package/dist/services/graphql.d.ts +0 -4
  33. package/dist/services/graphql.js +4 -8
  34. package/dist/services/graphql.js.map +1 -1
  35. package/dist/services/graphql.mjs +4 -8
  36. package/dist/services/graphql.mjs.map +1 -1
  37. package/dist/services/health.d.mts +0 -46
  38. package/dist/services/health.d.ts +0 -46
  39. package/dist/services/health.js +46 -92
  40. package/dist/services/health.js.map +1 -1
  41. package/dist/services/health.mjs +46 -92
  42. package/dist/services/health.mjs.map +1 -1
  43. package/dist/services/locale.d.mts +0 -16
  44. package/dist/services/locale.d.ts +0 -16
  45. package/dist/services/locale.js +16 -32
  46. package/dist/services/locale.js.map +1 -1
  47. package/dist/services/locale.mjs +16 -32
  48. package/dist/services/locale.mjs.map +1 -1
  49. package/dist/services/messaging.d.mts +3 -95
  50. package/dist/services/messaging.d.ts +3 -95
  51. package/dist/services/messaging.js +95 -187
  52. package/dist/services/messaging.js.map +1 -1
  53. package/dist/services/messaging.mjs +95 -187
  54. package/dist/services/messaging.mjs.map +1 -1
  55. package/dist/services/storage.d.mts +0 -26
  56. package/dist/services/storage.d.ts +0 -26
  57. package/dist/services/storage.js +26 -52
  58. package/dist/services/storage.js.map +1 -1
  59. package/dist/services/storage.mjs +26 -52
  60. package/dist/services/storage.mjs.map +1 -1
  61. package/dist/services/teams.d.mts +0 -26
  62. package/dist/services/teams.d.ts +0 -26
  63. package/dist/services/teams.js +26 -52
  64. package/dist/services/teams.js.map +1 -1
  65. package/dist/services/teams.mjs +26 -52
  66. package/dist/services/teams.mjs.map +1 -1
  67. package/dist/services/users.d.mts +0 -84
  68. package/dist/services/users.d.ts +0 -84
  69. package/dist/services/users.js +84 -168
  70. package/dist/services/users.js.map +1 -1
  71. package/dist/services/users.mjs +84 -168
  72. package/dist/services/users.mjs.map +1 -1
  73. package/package.json +1 -1
@@ -9,8 +9,6 @@ declare class Databases {
9
9
  client: Client;
10
10
  constructor(client: Client);
11
11
  /**
12
- * List databases
13
- *
14
12
  * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
15
13
  *
16
14
  * @param {string[]} queries
@@ -20,8 +18,6 @@ declare class Databases {
20
18
  */
21
19
  list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
22
20
  /**
23
- * Create database
24
- *
25
21
  * Create a new Database.
26
22
 
27
23
  *
@@ -33,8 +29,6 @@ declare class Databases {
33
29
  */
34
30
  create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
35
31
  /**
36
- * Get database
37
- *
38
32
  * Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
39
33
  *
40
34
  * @param {string} databaseId
@@ -43,8 +37,6 @@ declare class Databases {
43
37
  */
44
38
  get(databaseId: string): Promise<Models.Database>;
45
39
  /**
46
- * Update database
47
- *
48
40
  * Update a database by its unique ID.
49
41
  *
50
42
  * @param {string} databaseId
@@ -55,8 +47,6 @@ declare class Databases {
55
47
  */
56
48
  update(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
57
49
  /**
58
- * Delete database
59
- *
60
50
  * Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
61
51
  *
62
52
  * @param {string} databaseId
@@ -65,8 +55,6 @@ declare class Databases {
65
55
  */
66
56
  delete(databaseId: string): Promise<{}>;
67
57
  /**
68
- * List collections
69
- *
70
58
  * Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
71
59
  *
72
60
  * @param {string} databaseId
@@ -77,8 +65,6 @@ declare class Databases {
77
65
  */
78
66
  listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
79
67
  /**
80
- * Create collection
81
- *
82
68
  * Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
83
69
  *
84
70
  * @param {string} databaseId
@@ -92,8 +78,6 @@ declare class Databases {
92
78
  */
93
79
  createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
94
80
  /**
95
- * Get collection
96
- *
97
81
  * Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
98
82
  *
99
83
  * @param {string} databaseId
@@ -103,8 +87,6 @@ declare class Databases {
103
87
  */
104
88
  getCollection(databaseId: string, collectionId: string): Promise<Models.Collection>;
105
89
  /**
106
- * Update collection
107
- *
108
90
  * Update a collection by its unique ID.
109
91
  *
110
92
  * @param {string} databaseId
@@ -118,8 +100,6 @@ declare class Databases {
118
100
  */
119
101
  updateCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
120
102
  /**
121
- * Delete collection
122
- *
123
103
  * Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
124
104
  *
125
105
  * @param {string} databaseId
@@ -129,8 +109,6 @@ declare class Databases {
129
109
  */
130
110
  deleteCollection(databaseId: string, collectionId: string): Promise<{}>;
131
111
  /**
132
- * List attributes
133
- *
134
112
  * List attributes in the collection.
135
113
  *
136
114
  * @param {string} databaseId
@@ -141,8 +119,6 @@ declare class Databases {
141
119
  */
142
120
  listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList>;
143
121
  /**
144
- * Create boolean attribute
145
- *
146
122
  * Create a boolean attribute.
147
123
 
148
124
  *
@@ -157,8 +133,6 @@ declare class Databases {
157
133
  */
158
134
  createBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean>;
159
135
  /**
160
- * Update boolean attribute
161
- *
162
136
  * Update a boolean attribute. Changing the `default` value will not update already existing documents.
163
137
  *
164
138
  * @param {string} databaseId
@@ -172,8 +146,6 @@ declare class Databases {
172
146
  */
173
147
  updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, newKey?: string): Promise<Models.AttributeBoolean>;
174
148
  /**
175
- * Create datetime attribute
176
- *
177
149
  * Create a date time attribute according to the ISO 8601 standard.
178
150
  *
179
151
  * @param {string} databaseId
@@ -187,8 +159,6 @@ declare class Databases {
187
159
  */
188
160
  createDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeDatetime>;
189
161
  /**
190
- * Update dateTime attribute
191
- *
192
162
  * Update a date time attribute. Changing the `default` value will not update already existing documents.
193
163
  *
194
164
  * @param {string} databaseId
@@ -202,8 +172,6 @@ declare class Databases {
202
172
  */
203
173
  updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeDatetime>;
204
174
  /**
205
- * Create email attribute
206
- *
207
175
  * Create an email attribute.
208
176
 
209
177
  *
@@ -218,8 +186,6 @@ declare class Databases {
218
186
  */
219
187
  createEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail>;
220
188
  /**
221
- * Update email attribute
222
- *
223
189
  * Update an email attribute. Changing the `default` value will not update already existing documents.
224
190
 
225
191
  *
@@ -234,8 +200,6 @@ declare class Databases {
234
200
  */
235
201
  updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEmail>;
236
202
  /**
237
- * Create enum attribute
238
- *
239
203
  * Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute.
240
204
 
241
205
  *
@@ -251,8 +215,6 @@ declare class Databases {
251
215
  */
252
216
  createEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum>;
253
217
  /**
254
- * Update enum attribute
255
- *
256
218
  * Update an enum attribute. Changing the `default` value will not update already existing documents.
257
219
 
258
220
  *
@@ -268,8 +230,6 @@ declare class Databases {
268
230
  */
269
231
  updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEnum>;
270
232
  /**
271
- * Create float attribute
272
- *
273
233
  * Create a float attribute. Optionally, minimum and maximum values can be provided.
274
234
 
275
235
  *
@@ -286,8 +246,6 @@ declare class Databases {
286
246
  */
287
247
  createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
288
248
  /**
289
- * Update float attribute
290
- *
291
249
  * Update a float attribute. Changing the `default` value will not update already existing documents.
292
250
 
293
251
  *
@@ -304,8 +262,6 @@ declare class Databases {
304
262
  */
305
263
  updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number, newKey?: string): Promise<Models.AttributeFloat>;
306
264
  /**
307
- * Create integer attribute
308
- *
309
265
  * Create an integer attribute. Optionally, minimum and maximum values can be provided.
310
266
 
311
267
  *
@@ -322,8 +278,6 @@ declare class Databases {
322
278
  */
323
279
  createIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger>;
324
280
  /**
325
- * Update integer attribute
326
- *
327
281
  * Update an integer attribute. Changing the `default` value will not update already existing documents.
328
282
 
329
283
  *
@@ -340,8 +294,6 @@ declare class Databases {
340
294
  */
341
295
  updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number, newKey?: string): Promise<Models.AttributeInteger>;
342
296
  /**
343
- * Create IP address attribute
344
- *
345
297
  * Create IP address attribute.
346
298
 
347
299
  *
@@ -356,8 +308,6 @@ declare class Databases {
356
308
  */
357
309
  createIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp>;
358
310
  /**
359
- * Update IP address attribute
360
- *
361
311
  * Update an ip attribute. Changing the `default` value will not update already existing documents.
362
312
 
363
313
  *
@@ -372,8 +322,6 @@ declare class Databases {
372
322
  */
373
323
  updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeIp>;
374
324
  /**
375
- * Create relationship attribute
376
- *
377
325
  * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
378
326
 
379
327
  *
@@ -390,8 +338,6 @@ declare class Databases {
390
338
  */
391
339
  createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
392
340
  /**
393
- * Create string attribute
394
- *
395
341
  * Create a string attribute.
396
342
 
397
343
  *
@@ -408,8 +354,6 @@ declare class Databases {
408
354
  */
409
355
  createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString>;
410
356
  /**
411
- * Update string attribute
412
- *
413
357
  * Update a string attribute. Changing the `default` value will not update already existing documents.
414
358
 
415
359
  *
@@ -425,8 +369,6 @@ declare class Databases {
425
369
  */
426
370
  updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.AttributeString>;
427
371
  /**
428
- * Create URL attribute
429
- *
430
372
  * Create a URL attribute.
431
373
 
432
374
  *
@@ -441,8 +383,6 @@ declare class Databases {
441
383
  */
442
384
  createUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl>;
443
385
  /**
444
- * Update URL attribute
445
- *
446
386
  * Update an url attribute. Changing the `default` value will not update already existing documents.
447
387
 
448
388
  *
@@ -457,8 +397,6 @@ declare class Databases {
457
397
  */
458
398
  updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeUrl>;
459
399
  /**
460
- * Get attribute
461
- *
462
400
  * Get attribute by ID.
463
401
  *
464
402
  * @param {string} databaseId
@@ -469,8 +407,6 @@ declare class Databases {
469
407
  */
470
408
  getAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
471
409
  /**
472
- * Delete attribute
473
- *
474
410
  * Deletes an attribute.
475
411
  *
476
412
  * @param {string} databaseId
@@ -481,8 +417,6 @@ declare class Databases {
481
417
  */
482
418
  deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
483
419
  /**
484
- * Update relationship attribute
485
- *
486
420
  * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
487
421
 
488
422
  *
@@ -496,8 +430,6 @@ declare class Databases {
496
430
  */
497
431
  updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
498
432
  /**
499
- * List documents
500
- *
501
433
  * Get a list of all the user&#039;s documents in a given collection. You can use the query params to filter your results.
502
434
  *
503
435
  * @param {string} databaseId
@@ -508,8 +440,6 @@ declare class Databases {
508
440
  */
509
441
  listDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
510
442
  /**
511
- * Create document
512
- *
513
443
  * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
514
444
  *
515
445
  * @param {string} databaseId
@@ -522,8 +452,6 @@ declare class Databases {
522
452
  */
523
453
  createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>;
524
454
  /**
525
- * Get document
526
- *
527
455
  * Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
528
456
  *
529
457
  * @param {string} databaseId
@@ -535,8 +463,6 @@ declare class Databases {
535
463
  */
536
464
  getDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document>;
537
465
  /**
538
- * Update document
539
- *
540
466
  * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
541
467
  *
542
468
  * @param {string} databaseId
@@ -549,8 +475,6 @@ declare class Databases {
549
475
  */
550
476
  updateDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data?: Partial<Omit<Document, keyof Models.Document>>, permissions?: string[]): Promise<Document>;
551
477
  /**
552
- * Delete document
553
- *
554
478
  * Delete a document by its unique ID.
555
479
  *
556
480
  * @param {string} databaseId
@@ -561,8 +485,6 @@ declare class Databases {
561
485
  */
562
486
  deleteDocument(databaseId: string, collectionId: string, documentId: string): Promise<{}>;
563
487
  /**
564
- * List indexes
565
- *
566
488
  * List indexes in the collection.
567
489
  *
568
490
  * @param {string} databaseId
@@ -573,8 +495,6 @@ declare class Databases {
573
495
  */
574
496
  listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList>;
575
497
  /**
576
- * Create index
577
- *
578
498
  * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
579
499
  Attributes can be `key`, `fulltext`, and `unique`.
580
500
  *
@@ -589,8 +509,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
589
509
  */
590
510
  createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[]): Promise<Models.Index>;
591
511
  /**
592
- * Get index
593
- *
594
512
  * Get index by ID.
595
513
  *
596
514
  * @param {string} databaseId
@@ -601,8 +519,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
601
519
  */
602
520
  getIndex(databaseId: string, collectionId: string, key: string): Promise<Models.Index>;
603
521
  /**
604
- * Delete index
605
- *
606
522
  * Delete an index.
607
523
  *
608
524
  * @param {string} databaseId