appwrite-cli 17.1.0 → 17.2.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 (56) hide show
  1. package/.github/workflows/ci.yml +1 -1
  2. package/.github/workflows/publish.yml +1 -1
  3. package/CHANGELOG.md +14 -0
  4. package/README.md +2 -2
  5. package/bun.lock +783 -0
  6. package/cli.ts +14 -2
  7. package/dist/bundle-win-arm64.mjs +1137 -733
  8. package/dist/cli.cjs +1137 -733
  9. package/dist/index.cjs +193 -79
  10. package/dist/index.js +193 -79
  11. package/dist/lib/client.d.ts +9 -0
  12. package/dist/lib/client.d.ts.map +1 -1
  13. package/dist/lib/commands/init.d.ts.map +1 -1
  14. package/dist/lib/constants.d.ts +1 -1
  15. package/dist/lib/emulation/docker.d.ts.map +1 -1
  16. package/dist/lib/parser.d.ts.map +1 -1
  17. package/dist/lib/questions.d.ts.map +1 -1
  18. package/dist/lib/types.d.ts +2 -0
  19. package/dist/lib/types.d.ts.map +1 -1
  20. package/dist/lib/utils.d.ts +12 -0
  21. package/dist/lib/utils.d.ts.map +1 -1
  22. package/install.ps1 +2 -2
  23. package/install.sh +1 -1
  24. package/lib/client.ts +12 -0
  25. package/lib/commands/init.ts +109 -2
  26. package/lib/commands/services/account.ts +110 -55
  27. package/lib/commands/services/activities.ts +4 -2
  28. package/lib/commands/services/backups.ts +24 -12
  29. package/lib/commands/services/databases.ts +150 -75
  30. package/lib/commands/services/functions.ts +60 -30
  31. package/lib/commands/services/graphql.ts +4 -2
  32. package/lib/commands/services/health.ts +46 -23
  33. package/lib/commands/services/locale.ts +16 -8
  34. package/lib/commands/services/messaging.ts +96 -48
  35. package/lib/commands/services/migrations.ts +28 -14
  36. package/lib/commands/services/organizations.ts +76 -38
  37. package/lib/commands/services/project.ts +12 -6
  38. package/lib/commands/services/projects.ts +103 -51
  39. package/lib/commands/services/proxy.ts +16 -8
  40. package/lib/commands/services/sites.ts +58 -29
  41. package/lib/commands/services/storage.ts +30 -15
  42. package/lib/commands/services/tables-db.ts +148 -74
  43. package/lib/commands/services/teams.ts +28 -14
  44. package/lib/commands/services/tokens.ts +10 -5
  45. package/lib/commands/services/users.ts +88 -44
  46. package/lib/commands/services/vcs.ts +20 -10
  47. package/lib/commands/services/webhooks.ts +12 -6
  48. package/lib/constants.ts +1 -1
  49. package/lib/emulation/docker.ts +1 -0
  50. package/lib/parser.ts +279 -122
  51. package/lib/questions.ts +8 -3
  52. package/lib/sdks.ts +0 -1
  53. package/lib/types.ts +2 -0
  54. package/lib/utils.ts +234 -0
  55. package/package.json +1 -1
  56. package/scoop/appwrite.config.json +3 -3
@@ -26,7 +26,7 @@ export const databases = new Command("databases")
26
26
  helpWidth: process.stdout.columns || 80,
27
27
  });
28
28
 
29
- databases
29
+ const databasesListCommand = databases
30
30
  .command(`list`)
31
31
  .description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`)
32
32
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name`)
@@ -44,7 +44,8 @@ databases
44
44
  ),
45
45
  );
46
46
 
47
- databases
47
+
48
+ const databasesCreateCommand = databases
48
49
  .command(`create`)
49
50
  .description(`Create a new Database.
50
51
  `)
@@ -63,7 +64,8 @@ databases
63
64
  ),
64
65
  );
65
66
 
66
- databases
67
+
68
+ const databasesListTransactionsCommand = databases
67
69
  .command(`list-transactions`)
68
70
  .description(`List transactions across all databases.`)
69
71
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).`)
@@ -74,7 +76,8 @@ databases
74
76
  ),
75
77
  );
76
78
 
77
- databases
79
+
80
+ const databasesCreateTransactionCommand = databases
78
81
  .command(`create-transaction`)
79
82
  .description(`Create a new transaction.`)
80
83
  .option(`--ttl <ttl>`, `Seconds before the transaction expires.`, parseInteger)
@@ -85,7 +88,8 @@ databases
85
88
  ),
86
89
  );
87
90
 
88
- databases
91
+
92
+ const databasesGetTransactionCommand = databases
89
93
  .command(`get-transaction`)
90
94
  .description(`Get a transaction by its unique ID.`)
91
95
  .requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
@@ -96,7 +100,8 @@ databases
96
100
  ),
97
101
  );
98
102
 
99
- databases
103
+
104
+ const databasesUpdateTransactionCommand = databases
100
105
  .command(`update-transaction`)
101
106
  .description(`Update a transaction, to either commit or roll back its operations.`)
102
107
  .requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
@@ -119,7 +124,8 @@ databases
119
124
  ),
120
125
  );
121
126
 
122
- databases
127
+
128
+ const databasesDeleteTransactionCommand = databases
123
129
  .command(`delete-transaction`)
124
130
  .description(`Delete a transaction by its unique ID.`)
125
131
  .requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
@@ -130,7 +136,8 @@ databases
130
136
  ),
131
137
  );
132
138
 
133
- databases
139
+
140
+ const databasesCreateOperationsCommand = databases
134
141
  .command(`create-operations`)
135
142
  .description(`Create multiple operations in a single transaction.`)
136
143
  .requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
@@ -142,7 +149,8 @@ databases
142
149
  ),
143
150
  );
144
151
 
145
- databases
152
+
153
+ const databasesListUsageCommand = databases
146
154
  .command(`list-usage`)
147
155
  .description(`List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
148
156
  .option(`--range <range>`, `Date range.`)
@@ -153,7 +161,8 @@ databases
153
161
  ),
154
162
  );
155
163
 
156
- databases
164
+
165
+ const databasesGetCommand = databases
157
166
  .command(`get`)
158
167
  .description(`Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.`)
159
168
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -164,7 +173,8 @@ databases
164
173
  ),
165
174
  );
166
175
 
167
- databases
176
+
177
+ const databasesUpdateCommand = databases
168
178
  .command(`update`)
169
179
  .description(`Update a database by its unique ID.`)
170
180
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -182,7 +192,8 @@ databases
182
192
  ),
183
193
  );
184
194
 
185
- databases
195
+
196
+ const databasesDeleteCommand = databases
186
197
  .command(`delete`)
187
198
  .description(`Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.`)
188
199
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -193,7 +204,8 @@ databases
193
204
  ),
194
205
  );
195
206
 
196
- databases
207
+
208
+ const databasesListCollectionsCommand = databases
197
209
  .command(`list-collections`)
198
210
  .description(`Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.`)
199
211
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -212,7 +224,8 @@ databases
212
224
  ),
213
225
  );
214
226
 
215
- databases
227
+
228
+ const databasesCreateCollectionCommand = databases
216
229
  .command(`create-collection`)
217
230
  .description(`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.`)
218
231
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -240,7 +253,8 @@ databases
240
253
  ),
241
254
  );
242
255
 
243
- databases
256
+
257
+ const databasesGetCollectionCommand = databases
244
258
  .command(`get-collection`)
245
259
  .description(`Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.`)
246
260
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -252,7 +266,8 @@ databases
252
266
  ),
253
267
  );
254
268
 
255
- databases
269
+
270
+ const databasesUpdateCollectionCommand = databases
256
271
  .command(`update-collection`)
257
272
  .description(`Update a collection by its unique ID.`)
258
273
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -278,7 +293,8 @@ databases
278
293
  ),
279
294
  );
280
295
 
281
- databases
296
+
297
+ const databasesDeleteCollectionCommand = databases
282
298
  .command(`delete-collection`)
283
299
  .description(`Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.`)
284
300
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -290,7 +306,8 @@ databases
290
306
  ),
291
307
  );
292
308
 
293
- databases
309
+
310
+ const databasesListAttributesCommand = databases
294
311
  .command(`list-attributes`)
295
312
  .description(`List attributes in the collection.`)
296
313
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -309,7 +326,8 @@ databases
309
326
  ),
310
327
  );
311
328
 
312
- databases
329
+
330
+ const databasesCreateBooleanAttributeCommand = databases
313
331
  .command(`create-boolean-attribute`)
314
332
  .description(`Create a boolean attribute.
315
333
  `)
@@ -336,7 +354,8 @@ databases
336
354
  ),
337
355
  );
338
356
 
339
- databases
357
+
358
+ const databasesUpdateBooleanAttributeCommand = databases
340
359
  .command(`update-boolean-attribute`)
341
360
  .description(`Update a boolean attribute. Changing the \`default\` value will not update already existing documents.`)
342
361
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -352,7 +371,8 @@ databases
352
371
  ),
353
372
  );
354
373
 
355
- databases
374
+
375
+ const databasesCreateDatetimeAttributeCommand = databases
356
376
  .command(`create-datetime-attribute`)
357
377
  .description(`Create a date time attribute according to the ISO 8601 standard.`)
358
378
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -373,7 +393,8 @@ databases
373
393
  ),
374
394
  );
375
395
 
376
- databases
396
+
397
+ const databasesUpdateDatetimeAttributeCommand = databases
377
398
  .command(`update-datetime-attribute`)
378
399
  .description(`Update a date time attribute. Changing the \`default\` value will not update already existing documents.`)
379
400
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -389,7 +410,8 @@ databases
389
410
  ),
390
411
  );
391
412
 
392
- databases
413
+
414
+ const databasesCreateEmailAttributeCommand = databases
393
415
  .command(`create-email-attribute`)
394
416
  .description(`Create an email attribute.
395
417
  `)
@@ -411,7 +433,8 @@ databases
411
433
  ),
412
434
  );
413
435
 
414
- databases
436
+
437
+ const databasesUpdateEmailAttributeCommand = databases
415
438
  .command(`update-email-attribute`)
416
439
  .description(`Update an email attribute. Changing the \`default\` value will not update already existing documents.
417
440
  `)
@@ -428,7 +451,8 @@ databases
428
451
  ),
429
452
  );
430
453
 
431
- databases
454
+
455
+ const databasesCreateEnumAttributeCommand = databases
432
456
  .command(`create-enum-attribute`)
433
457
  .description(`Create an enum attribute. The \`elements\` param acts as a white-list of accepted values for this attribute.
434
458
  `)
@@ -451,7 +475,8 @@ databases
451
475
  ),
452
476
  );
453
477
 
454
- databases
478
+
479
+ const databasesUpdateEnumAttributeCommand = databases
455
480
  .command(`update-enum-attribute`)
456
481
  .description(`Update an enum attribute. Changing the \`default\` value will not update already existing documents.
457
482
  `)
@@ -469,7 +494,8 @@ databases
469
494
  ),
470
495
  );
471
496
 
472
- databases
497
+
498
+ const databasesCreateFloatAttributeCommand = databases
473
499
  .command(`create-float-attribute`)
474
500
  .description(`Create a float attribute. Optionally, minimum and maximum values can be provided.
475
501
  `)
@@ -493,7 +519,8 @@ databases
493
519
  ),
494
520
  );
495
521
 
496
- databases
522
+
523
+ const databasesUpdateFloatAttributeCommand = databases
497
524
  .command(`update-float-attribute`)
498
525
  .description(`Update a float attribute. Changing the \`default\` value will not update already existing documents.
499
526
  `)
@@ -512,7 +539,8 @@ databases
512
539
  ),
513
540
  );
514
541
 
515
- databases
542
+
543
+ const databasesCreateIntegerAttributeCommand = databases
516
544
  .command(`create-integer-attribute`)
517
545
  .description(`Create an integer attribute. Optionally, minimum and maximum values can be provided.
518
546
  `)
@@ -536,7 +564,8 @@ databases
536
564
  ),
537
565
  );
538
566
 
539
- databases
567
+
568
+ const databasesUpdateIntegerAttributeCommand = databases
540
569
  .command(`update-integer-attribute`)
541
570
  .description(`Update an integer attribute. Changing the \`default\` value will not update already existing documents.
542
571
  `)
@@ -555,7 +584,8 @@ databases
555
584
  ),
556
585
  );
557
586
 
558
- databases
587
+
588
+ const databasesCreateIpAttributeCommand = databases
559
589
  .command(`create-ip-attribute`)
560
590
  .description(`Create IP address attribute.
561
591
  `)
@@ -577,7 +607,8 @@ databases
577
607
  ),
578
608
  );
579
609
 
580
- databases
610
+
611
+ const databasesUpdateIpAttributeCommand = databases
581
612
  .command(`update-ip-attribute`)
582
613
  .description(`Update an ip attribute. Changing the \`default\` value will not update already existing documents.
583
614
  `)
@@ -594,7 +625,8 @@ databases
594
625
  ),
595
626
  );
596
627
 
597
- databases
628
+
629
+ const databasesCreateLineAttributeCommand = databases
598
630
  .command(`create-line-attribute`)
599
631
  .description(`Create a geometric line attribute.`)
600
632
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -609,7 +641,8 @@ databases
609
641
  ),
610
642
  );
611
643
 
612
- databases
644
+
645
+ const databasesUpdateLineAttributeCommand = databases
613
646
  .command(`update-line-attribute`)
614
647
  .description(`Update a line attribute. Changing the \`default\` value will not update already existing documents.`)
615
648
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -625,7 +658,8 @@ databases
625
658
  ),
626
659
  );
627
660
 
628
- databases
661
+
662
+ const databasesCreateLongtextAttributeCommand = databases
629
663
  .command(`create-longtext-attribute`)
630
664
  .description(`Create a longtext attribute.
631
665
  `)
@@ -653,7 +687,8 @@ databases
653
687
  ),
654
688
  );
655
689
 
656
- databases
690
+
691
+ const databasesUpdateLongtextAttributeCommand = databases
657
692
  .command(`update-longtext-attribute`)
658
693
  .description(`Update a longtext attribute. Changing the \`default\` value will not update already existing documents.
659
694
  `)
@@ -670,7 +705,8 @@ databases
670
705
  ),
671
706
  );
672
707
 
673
- databases
708
+
709
+ const databasesCreateMediumtextAttributeCommand = databases
674
710
  .command(`create-mediumtext-attribute`)
675
711
  .description(`Create a mediumtext attribute.
676
712
  `)
@@ -698,7 +734,8 @@ databases
698
734
  ),
699
735
  );
700
736
 
701
- databases
737
+
738
+ const databasesUpdateMediumtextAttributeCommand = databases
702
739
  .command(`update-mediumtext-attribute`)
703
740
  .description(`Update a mediumtext attribute. Changing the \`default\` value will not update already existing documents.
704
741
  `)
@@ -715,7 +752,8 @@ databases
715
752
  ),
716
753
  );
717
754
 
718
- databases
755
+
756
+ const databasesCreatePointAttributeCommand = databases
719
757
  .command(`create-point-attribute`)
720
758
  .description(`Create a geometric point attribute.`)
721
759
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -730,7 +768,8 @@ databases
730
768
  ),
731
769
  );
732
770
 
733
- databases
771
+
772
+ const databasesUpdatePointAttributeCommand = databases
734
773
  .command(`update-point-attribute`)
735
774
  .description(`Update a point attribute. Changing the \`default\` value will not update already existing documents.`)
736
775
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -746,7 +785,8 @@ databases
746
785
  ),
747
786
  );
748
787
 
749
- databases
788
+
789
+ const databasesCreatePolygonAttributeCommand = databases
750
790
  .command(`create-polygon-attribute`)
751
791
  .description(`Create a geometric polygon attribute.`)
752
792
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -761,7 +801,8 @@ databases
761
801
  ),
762
802
  );
763
803
 
764
- databases
804
+
805
+ const databasesUpdatePolygonAttributeCommand = databases
765
806
  .command(`update-polygon-attribute`)
766
807
  .description(`Update a polygon attribute. Changing the \`default\` value will not update already existing documents.`)
767
808
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -777,7 +818,8 @@ databases
777
818
  ),
778
819
  );
779
820
 
780
- databases
821
+
822
+ const databasesCreateRelationshipAttributeCommand = databases
781
823
  .command(`create-relationship-attribute`)
782
824
  .description(`Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
783
825
  `)
@@ -801,7 +843,8 @@ databases
801
843
  ),
802
844
  );
803
845
 
804
- databases
846
+
847
+ const databasesUpdateRelationshipAttributeCommand = databases
805
848
  .command(`update-relationship-attribute`)
806
849
  .description(`Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
807
850
  `)
@@ -817,7 +860,8 @@ databases
817
860
  ),
818
861
  );
819
862
 
820
- databases
863
+
864
+ const databasesCreateStringAttributeCommand = databases
821
865
  .command(`create-string-attribute`)
822
866
  .description(`Create a string attribute.
823
867
  `)
@@ -846,7 +890,8 @@ databases
846
890
  ),
847
891
  );
848
892
 
849
- databases
893
+
894
+ const databasesUpdateStringAttributeCommand = databases
850
895
  .command(`update-string-attribute`)
851
896
  .description(`Update a string attribute. Changing the \`default\` value will not update already existing documents.
852
897
  `)
@@ -864,7 +909,8 @@ databases
864
909
  ),
865
910
  );
866
911
 
867
- databases
912
+
913
+ const databasesCreateTextAttributeCommand = databases
868
914
  .command(`create-text-attribute`)
869
915
  .description(`Create a text attribute.
870
916
  `)
@@ -892,7 +938,8 @@ databases
892
938
  ),
893
939
  );
894
940
 
895
- databases
941
+
942
+ const databasesUpdateTextAttributeCommand = databases
896
943
  .command(`update-text-attribute`)
897
944
  .description(`Update a text attribute. Changing the \`default\` value will not update already existing documents.
898
945
  `)
@@ -909,7 +956,8 @@ databases
909
956
  ),
910
957
  );
911
958
 
912
- databases
959
+
960
+ const databasesCreateUrlAttributeCommand = databases
913
961
  .command(`create-url-attribute`)
914
962
  .description(`Create a URL attribute.
915
963
  `)
@@ -931,7 +979,8 @@ databases
931
979
  ),
932
980
  );
933
981
 
934
- databases
982
+
983
+ const databasesUpdateUrlAttributeCommand = databases
935
984
  .command(`update-url-attribute`)
936
985
  .description(`Update an url attribute. Changing the \`default\` value will not update already existing documents.
937
986
  `)
@@ -948,7 +997,8 @@ databases
948
997
  ),
949
998
  );
950
999
 
951
- databases
1000
+
1001
+ const databasesCreateVarcharAttributeCommand = databases
952
1002
  .command(`create-varchar-attribute`)
953
1003
  .description(`Create a varchar attribute.
954
1004
  `)
@@ -977,7 +1027,8 @@ databases
977
1027
  ),
978
1028
  );
979
1029
 
980
- databases
1030
+
1031
+ const databasesUpdateVarcharAttributeCommand = databases
981
1032
  .command(`update-varchar-attribute`)
982
1033
  .description(`Update a varchar attribute. Changing the \`default\` value will not update already existing documents.
983
1034
  `)
@@ -995,7 +1046,8 @@ databases
995
1046
  ),
996
1047
  );
997
1048
 
998
- databases
1049
+
1050
+ const databasesGetAttributeCommand = databases
999
1051
  .command(`get-attribute`)
1000
1052
  .description(`Get attribute by ID.`)
1001
1053
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1008,7 +1060,8 @@ databases
1008
1060
  ),
1009
1061
  );
1010
1062
 
1011
- databases
1063
+
1064
+ const databasesDeleteAttributeCommand = databases
1012
1065
  .command(`delete-attribute`)
1013
1066
  .description(`Deletes an attribute.`)
1014
1067
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1021,7 +1074,8 @@ databases
1021
1074
  ),
1022
1075
  );
1023
1076
 
1024
- databases
1077
+
1078
+ const databasesListDocumentsCommand = databases
1025
1079
  .command(`list-documents`)
1026
1080
  .description(`Get a list of all the user's documents in a given collection. You can use the query params to filter your results.`)
1027
1081
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1042,7 +1096,8 @@ databases
1042
1096
  ),
1043
1097
  );
1044
1098
 
1045
- databases
1099
+
1100
+ const databasesCreateDocumentCommand = databases
1046
1101
  .command(`create-document`)
1047
1102
  .description(`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.`)
1048
1103
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1058,7 +1113,8 @@ databases
1058
1113
  ),
1059
1114
  );
1060
1115
 
1061
- databases
1116
+
1117
+ const databasesCreateDocumentsCommand = databases
1062
1118
  .command(`create-documents`)
1063
1119
  .description(`Create new Documents. 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.`)
1064
1120
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1072,7 +1128,8 @@ databases
1072
1128
  ),
1073
1129
  );
1074
1130
 
1075
- databases
1131
+
1132
+ const databasesUpsertDocumentsCommand = databases
1076
1133
  .command(`upsert-documents`)
1077
1134
  .description(`Create or update Documents. 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.
1078
1135
  `)
@@ -1087,7 +1144,8 @@ databases
1087
1144
  ),
1088
1145
  );
1089
1146
 
1090
- databases
1147
+
1148
+ const databasesUpdateDocumentsCommand = databases
1091
1149
  .command(`update-documents`)
1092
1150
  .description(`Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.`)
1093
1151
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1102,7 +1160,8 @@ databases
1102
1160
  ),
1103
1161
  );
1104
1162
 
1105
- databases
1163
+
1164
+ const databasesDeleteDocumentsCommand = databases
1106
1165
  .command(`delete-documents`)
1107
1166
  .description(`Bulk delete documents using queries, if no queries are passed then all documents are deleted.`)
1108
1167
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1116,7 +1175,8 @@ databases
1116
1175
  ),
1117
1176
  );
1118
1177
 
1119
- databases
1178
+
1179
+ const databasesGetDocumentCommand = databases
1120
1180
  .command(`get-document`)
1121
1181
  .description(`Get a document by its unique ID. This endpoint response returns a JSON object with the document data.`)
1122
1182
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1131,7 +1191,8 @@ databases
1131
1191
  ),
1132
1192
  );
1133
1193
 
1134
- databases
1194
+
1195
+ const databasesUpsertDocumentCommand = databases
1135
1196
  .command(`upsert-document`)
1136
1197
  .description(`Create or update a 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.`)
1137
1198
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1147,7 +1208,8 @@ databases
1147
1208
  ),
1148
1209
  );
1149
1210
 
1150
- databases
1211
+
1212
+ const databasesUpdateDocumentCommand = databases
1151
1213
  .command(`update-document`)
1152
1214
  .description(`Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.`)
1153
1215
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1163,7 +1225,8 @@ databases
1163
1225
  ),
1164
1226
  );
1165
1227
 
1166
- databases
1228
+
1229
+ const databasesDeleteDocumentCommand = databases
1167
1230
  .command(`delete-document`)
1168
1231
  .description(`Delete a document by its unique ID.`)
1169
1232
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1177,7 +1240,8 @@ databases
1177
1240
  ),
1178
1241
  );
1179
1242
 
1180
- databases
1243
+
1244
+ const databasesListDocumentLogsCommand = databases
1181
1245
  .command(`list-document-logs`)
1182
1246
  .description(`Get the document activity logs list by its unique ID.`)
1183
1247
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1191,7 +1255,8 @@ databases
1191
1255
  ),
1192
1256
  );
1193
1257
 
1194
- databases
1258
+
1259
+ const databasesDecrementDocumentAttributeCommand = databases
1195
1260
  .command(`decrement-document-attribute`)
1196
1261
  .description(`Decrement a specific attribute of a document by a given value.`)
1197
1262
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1208,7 +1273,8 @@ databases
1208
1273
  ),
1209
1274
  );
1210
1275
 
1211
- databases
1276
+
1277
+ const databasesIncrementDocumentAttributeCommand = databases
1212
1278
  .command(`increment-document-attribute`)
1213
1279
  .description(`Increment a specific attribute of a document by a given value.`)
1214
1280
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1225,7 +1291,8 @@ databases
1225
1291
  ),
1226
1292
  );
1227
1293
 
1228
- databases
1294
+
1295
+ const databasesListIndexesCommand = databases
1229
1296
  .command(`list-indexes`)
1230
1297
  .description(`List indexes in the collection.`)
1231
1298
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1244,7 +1311,8 @@ databases
1244
1311
  ),
1245
1312
  );
1246
1313
 
1247
- databases
1314
+
1315
+ const databasesCreateIndexCommand = databases
1248
1316
  .command(`create-index`)
1249
1317
  .description(`Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
1250
1318
  Attributes can be \`key\`, \`fulltext\`, and \`unique\`.`)
@@ -1262,7 +1330,8 @@ Attributes can be \`key\`, \`fulltext\`, and \`unique\`.`)
1262
1330
  ),
1263
1331
  );
1264
1332
 
1265
- databases
1333
+
1334
+ const databasesGetIndexCommand = databases
1266
1335
  .command(`get-index`)
1267
1336
  .description(`Get an index by its unique ID.`)
1268
1337
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1275,7 +1344,8 @@ databases
1275
1344
  ),
1276
1345
  );
1277
1346
 
1278
- databases
1347
+
1348
+ const databasesDeleteIndexCommand = databases
1279
1349
  .command(`delete-index`)
1280
1350
  .description(`Delete an index.`)
1281
1351
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1288,7 +1358,8 @@ databases
1288
1358
  ),
1289
1359
  );
1290
1360
 
1291
- databases
1361
+
1362
+ const databasesListCollectionLogsCommand = databases
1292
1363
  .command(`list-collection-logs`)
1293
1364
  .description(`Get the collection activity logs list by its unique ID.`)
1294
1365
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1301,7 +1372,8 @@ databases
1301
1372
  ),
1302
1373
  );
1303
1374
 
1304
- databases
1375
+
1376
+ const databasesGetCollectionUsageCommand = databases
1305
1377
  .command(`get-collection-usage`)
1306
1378
  .description(`Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
1307
1379
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1314,7 +1386,8 @@ databases
1314
1386
  ),
1315
1387
  );
1316
1388
 
1317
- databases
1389
+
1390
+ const databasesListLogsCommand = databases
1318
1391
  .command(`list-logs`)
1319
1392
  .description(`Get the database activity logs list by its unique ID.`)
1320
1393
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1326,7 +1399,8 @@ databases
1326
1399
  ),
1327
1400
  );
1328
1401
 
1329
- databases
1402
+
1403
+ const databasesGetUsageCommand = databases
1330
1404
  .command(`get-usage`)
1331
1405
  .description(`Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
1332
1406
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
@@ -1338,3 +1412,4 @@ databases
1338
1412
  ),
1339
1413
  );
1340
1414
 
1415
+