appwrite-cli 17.0.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 (98) hide show
  1. package/.github/workflows/ci.yml +1 -1
  2. package/.github/workflows/publish.yml +1 -1
  3. package/CHANGELOG.md +20 -0
  4. package/README.md +2 -2
  5. package/bun.lock +783 -0
  6. package/cli.ts +19 -1
  7. package/dist/bundle-win-arm64.mjs +1515 -744
  8. package/dist/cli.cjs +1515 -744
  9. package/dist/index.cjs +322 -118
  10. package/dist/index.js +322 -118
  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/commands/services/organizations.d.ts +3 -0
  15. package/dist/lib/commands/services/organizations.d.ts.map +1 -0
  16. package/dist/lib/commands/services/teams.d.ts.map +1 -1
  17. package/dist/lib/constants.d.ts +1 -1
  18. package/dist/lib/emulation/docker.d.ts.map +1 -1
  19. package/dist/lib/emulation/utils.d.ts.map +1 -1
  20. package/dist/lib/parser.d.ts.map +1 -1
  21. package/dist/lib/questions.d.ts.map +1 -1
  22. package/dist/lib/types.d.ts +3 -0
  23. package/dist/lib/types.d.ts.map +1 -1
  24. package/dist/lib/utils.d.ts +12 -0
  25. package/dist/lib/utils.d.ts.map +1 -1
  26. package/docs/examples/organizations/add-credit.md +5 -0
  27. package/docs/examples/organizations/cancel-downgrade.md +4 -0
  28. package/docs/examples/organizations/create-downgrade-feedback.md +8 -0
  29. package/docs/examples/organizations/create-invoice-payment.md +6 -0
  30. package/docs/examples/organizations/create-key.md +6 -0
  31. package/docs/examples/organizations/create.md +6 -0
  32. package/docs/examples/organizations/delete-backup-payment-method.md +4 -0
  33. package/docs/examples/organizations/delete-default-payment-method.md +4 -0
  34. package/docs/examples/organizations/delete-key.md +5 -0
  35. package/docs/examples/organizations/delete.md +4 -0
  36. package/docs/examples/organizations/estimation-create-organization.md +4 -0
  37. package/docs/examples/organizations/estimation-delete-organization.md +4 -0
  38. package/docs/examples/organizations/estimation-update-plan.md +5 -0
  39. package/docs/examples/organizations/get-aggregation.md +5 -0
  40. package/docs/examples/organizations/get-available-credits.md +4 -0
  41. package/docs/examples/organizations/get-credit.md +5 -0
  42. package/docs/examples/organizations/get-invoice-download.md +5 -0
  43. package/docs/examples/organizations/get-invoice-view.md +5 -0
  44. package/docs/examples/organizations/get-invoice.md +5 -0
  45. package/docs/examples/organizations/get-key.md +5 -0
  46. package/docs/examples/organizations/get-plan.md +4 -0
  47. package/docs/examples/organizations/get-scopes.md +4 -0
  48. package/docs/examples/organizations/get-usage.md +4 -0
  49. package/docs/examples/organizations/list-aggregations.md +4 -0
  50. package/docs/examples/organizations/list-credits.md +4 -0
  51. package/docs/examples/organizations/list-keys.md +4 -0
  52. package/docs/examples/organizations/list-regions.md +4 -0
  53. package/docs/examples/organizations/list.md +3 -0
  54. package/docs/examples/organizations/set-backup-payment-method.md +5 -0
  55. package/docs/examples/organizations/set-billing-address.md +5 -0
  56. package/docs/examples/organizations/set-billing-email.md +5 -0
  57. package/docs/examples/organizations/set-billing-tax-id.md +5 -0
  58. package/docs/examples/organizations/set-default-payment-method.md +5 -0
  59. package/docs/examples/organizations/update-budget.md +5 -0
  60. package/docs/examples/organizations/update-key.md +7 -0
  61. package/docs/examples/organizations/update-plan.md +5 -0
  62. package/docs/examples/organizations/validate-invoice.md +5 -0
  63. package/docs/examples/organizations/validate-payment.md +4 -0
  64. package/install.ps1 +2 -2
  65. package/install.sh +1 -1
  66. package/lib/client.ts +12 -0
  67. package/lib/commands/init.ts +109 -2
  68. package/lib/commands/services/account.ts +110 -55
  69. package/lib/commands/services/activities.ts +4 -2
  70. package/lib/commands/services/backups.ts +24 -12
  71. package/lib/commands/services/databases.ts +150 -75
  72. package/lib/commands/services/functions.ts +60 -30
  73. package/lib/commands/services/graphql.ts +4 -2
  74. package/lib/commands/services/health.ts +46 -23
  75. package/lib/commands/services/locale.ts +16 -8
  76. package/lib/commands/services/messaging.ts +96 -48
  77. package/lib/commands/services/migrations.ts +30 -16
  78. package/lib/commands/services/organizations.ts +555 -0
  79. package/lib/commands/services/project.ts +12 -6
  80. package/lib/commands/services/projects.ts +105 -53
  81. package/lib/commands/services/proxy.ts +18 -10
  82. package/lib/commands/services/sites.ts +58 -29
  83. package/lib/commands/services/storage.ts +30 -15
  84. package/lib/commands/services/tables-db.ts +148 -74
  85. package/lib/commands/services/teams.ts +38 -15
  86. package/lib/commands/services/tokens.ts +10 -5
  87. package/lib/commands/services/users.ts +88 -44
  88. package/lib/commands/services/vcs.ts +22 -12
  89. package/lib/commands/services/webhooks.ts +12 -6
  90. package/lib/constants.ts +1 -1
  91. package/lib/emulation/docker.ts +1 -0
  92. package/lib/emulation/utils.ts +3 -2
  93. package/lib/parser.ts +356 -77
  94. package/lib/questions.ts +8 -3
  95. package/lib/types.ts +3 -0
  96. package/lib/utils.ts +234 -0
  97. package/package.json +1 -1
  98. package/scoop/appwrite.config.json +3 -3
@@ -26,7 +26,7 @@ export const messaging = new Command("messaging")
26
26
  helpWidth: process.stdout.columns || 80,
27
27
  });
28
28
 
29
- messaging
29
+ const messagingListMessagesCommand = messaging
30
30
  .command(`list-messages`)
31
31
  .description(`Get a list of all messages from the current Appwrite project.`)
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: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType`)
@@ -44,7 +44,8 @@ messaging
44
44
  ),
45
45
  );
46
46
 
47
- messaging
47
+
48
+ const messagingCreateEmailCommand = messaging
48
49
  .command(`create-email`)
49
50
  .description(`Create a new email message.`)
50
51
  .requiredOption(`--message-id <message-id>`, `Message ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -76,7 +77,8 @@ messaging
76
77
  ),
77
78
  );
78
79
 
79
- messaging
80
+
81
+ const messagingUpdateEmailCommand = messaging
80
82
  .command(`update-email`)
81
83
  .description(`Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
82
84
  `)
@@ -109,7 +111,8 @@ messaging
109
111
  ),
110
112
  );
111
113
 
112
- messaging
114
+
115
+ const messagingCreatePushCommand = messaging
113
116
  .command(`create-push`)
114
117
  .description(`Create a new push notification.`)
115
118
  .requiredOption(`--message-id <message-id>`, `Message ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -153,7 +156,8 @@ messaging
153
156
  ),
154
157
  );
155
158
 
156
- messaging
159
+
160
+ const messagingUpdatePushCommand = messaging
157
161
  .command(`update-push`)
158
162
  .description(`Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
159
163
  `)
@@ -198,7 +202,8 @@ messaging
198
202
  ),
199
203
  );
200
204
 
201
- messaging
205
+
206
+ const messagingCreateSmsCommand = messaging
202
207
  .command(`create-sms`)
203
208
  .description(`Create a new SMS message.`)
204
209
  .requiredOption(`--message-id <message-id>`, `Message ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -220,7 +225,8 @@ messaging
220
225
  ),
221
226
  );
222
227
 
223
- messaging
228
+
229
+ const messagingUpdateSmsCommand = messaging
224
230
  .command(`update-sms`)
225
231
  .description(`Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
226
232
  `)
@@ -243,7 +249,8 @@ messaging
243
249
  ),
244
250
  );
245
251
 
246
- messaging
252
+
253
+ const messagingGetMessageCommand = messaging
247
254
  .command(`get-message`)
248
255
  .description(`Get a message by its unique ID.
249
256
  `)
@@ -255,7 +262,8 @@ messaging
255
262
  ),
256
263
  );
257
264
 
258
- messaging
265
+
266
+ const messagingDeleteCommand = messaging
259
267
  .command(`delete`)
260
268
  .description(`Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.`)
261
269
  .requiredOption(`--message-id <message-id>`, `Message ID.`)
@@ -266,7 +274,8 @@ messaging
266
274
  ),
267
275
  );
268
276
 
269
- messaging
277
+
278
+ const messagingListMessageLogsCommand = messaging
270
279
  .command(`list-message-logs`)
271
280
  .description(`Get the message activity logs listed by its unique ID.`)
272
281
  .requiredOption(`--message-id <message-id>`, `Message ID.`)
@@ -284,7 +293,8 @@ messaging
284
293
  ),
285
294
  );
286
295
 
287
- messaging
296
+
297
+ const messagingListTargetsCommand = messaging
288
298
  .command(`list-targets`)
289
299
  .description(`Get a list of the targets associated with a message.`)
290
300
  .requiredOption(`--message-id <message-id>`, `Message ID.`)
@@ -302,7 +312,8 @@ messaging
302
312
  ),
303
313
  );
304
314
 
305
- messaging
315
+
316
+ const messagingListProvidersCommand = messaging
306
317
  .command(`list-providers`)
307
318
  .description(`Get a list of all providers from the current Appwrite project.`)
308
319
  .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, provider, type, enabled`)
@@ -320,7 +331,8 @@ messaging
320
331
  ),
321
332
  );
322
333
 
323
- messaging
334
+
335
+ const messagingCreateApnsProviderCommand = messaging
324
336
  .command(`create-apns-provider`)
325
337
  .description(`Create a new Apple Push Notification service provider.`)
326
338
  .requiredOption(`--provider-id <provider-id>`, `Provider ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -348,7 +360,8 @@ messaging
348
360
  ),
349
361
  );
350
362
 
351
- messaging
363
+
364
+ const messagingUpdateApnsProviderCommand = messaging
352
365
  .command(`update-apns-provider`)
353
366
  .description(`Update a Apple Push Notification service provider by its unique ID.`)
354
367
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -376,7 +389,8 @@ messaging
376
389
  ),
377
390
  );
378
391
 
379
- messaging
392
+
393
+ const messagingCreateFcmProviderCommand = messaging
380
394
  .command(`create-fcm-provider`)
381
395
  .description(`Create a new Firebase Cloud Messaging provider.`)
382
396
  .requiredOption(`--provider-id <provider-id>`, `Provider ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -395,7 +409,8 @@ messaging
395
409
  ),
396
410
  );
397
411
 
398
- messaging
412
+
413
+ const messagingUpdateFcmProviderCommand = messaging
399
414
  .command(`update-fcm-provider`)
400
415
  .description(`Update a Firebase Cloud Messaging provider by its unique ID.`)
401
416
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -414,7 +429,8 @@ messaging
414
429
  ),
415
430
  );
416
431
 
417
- messaging
432
+
433
+ const messagingCreateMailgunProviderCommand = messaging
418
434
  .command(`create-mailgun-provider`)
419
435
  .description(`Create a new Mailgun provider.`)
420
436
  .requiredOption(`--provider-id <provider-id>`, `Provider ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -444,7 +460,8 @@ messaging
444
460
  ),
445
461
  );
446
462
 
447
- messaging
463
+
464
+ const messagingUpdateMailgunProviderCommand = messaging
448
465
  .command(`update-mailgun-provider`)
449
466
  .description(`Update a Mailgun provider by its unique ID.`)
450
467
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -474,7 +491,8 @@ messaging
474
491
  ),
475
492
  );
476
493
 
477
- messaging
494
+
495
+ const messagingCreateMsg91ProviderCommand = messaging
478
496
  .command(`create-msg-91-provider`)
479
497
  .description(`Create a new MSG91 provider.`)
480
498
  .requiredOption(`--provider-id <provider-id>`, `Provider ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -495,7 +513,8 @@ messaging
495
513
  ),
496
514
  );
497
515
 
498
- messaging
516
+
517
+ const messagingUpdateMsg91ProviderCommand = messaging
499
518
  .command(`update-msg-91-provider`)
500
519
  .description(`Update a MSG91 provider by its unique ID.`)
501
520
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -516,7 +535,8 @@ messaging
516
535
  ),
517
536
  );
518
537
 
519
- messaging
538
+
539
+ const messagingCreateResendProviderCommand = messaging
520
540
  .command(`create-resend-provider`)
521
541
  .description(`Create a new Resend provider.`)
522
542
  .requiredOption(`--provider-id <provider-id>`, `Provider ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -539,7 +559,8 @@ messaging
539
559
  ),
540
560
  );
541
561
 
542
- messaging
562
+
563
+ const messagingUpdateResendProviderCommand = messaging
543
564
  .command(`update-resend-provider`)
544
565
  .description(`Update a Resend provider by its unique ID.`)
545
566
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -562,7 +583,8 @@ messaging
562
583
  ),
563
584
  );
564
585
 
565
- messaging
586
+
587
+ const messagingCreateSendgridProviderCommand = messaging
566
588
  .command(`create-sendgrid-provider`)
567
589
  .description(`Create a new Sendgrid provider.`)
568
590
  .requiredOption(`--provider-id <provider-id>`, `Provider ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -585,7 +607,8 @@ messaging
585
607
  ),
586
608
  );
587
609
 
588
- messaging
610
+
611
+ const messagingUpdateSendgridProviderCommand = messaging
589
612
  .command(`update-sendgrid-provider`)
590
613
  .description(`Update a Sendgrid provider by its unique ID.`)
591
614
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -608,7 +631,8 @@ messaging
608
631
  ),
609
632
  );
610
633
 
611
- messaging
634
+
635
+ const messagingCreateSmtpProviderCommand = messaging
612
636
  .command(`create-smtp-provider`)
613
637
  .description(`Create a new SMTP provider.`)
614
638
  .requiredOption(`--provider-id <provider-id>`, `Provider ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -642,7 +666,8 @@ messaging
642
666
  ),
643
667
  );
644
668
 
645
- messaging
669
+
670
+ const messagingUpdateSmtpProviderCommand = messaging
646
671
  .command(`update-smtp-provider`)
647
672
  .description(`Update a SMTP provider by its unique ID.`)
648
673
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -676,7 +701,8 @@ messaging
676
701
  ),
677
702
  );
678
703
 
679
- messaging
704
+
705
+ const messagingCreateTelesignProviderCommand = messaging
680
706
  .command(`create-telesign-provider`)
681
707
  .description(`Create a new Telesign provider.`)
682
708
  .requiredOption(`--provider-id <provider-id>`, `Provider ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -697,7 +723,8 @@ messaging
697
723
  ),
698
724
  );
699
725
 
700
- messaging
726
+
727
+ const messagingUpdateTelesignProviderCommand = messaging
701
728
  .command(`update-telesign-provider`)
702
729
  .description(`Update a Telesign provider by its unique ID.`)
703
730
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -718,7 +745,8 @@ messaging
718
745
  ),
719
746
  );
720
747
 
721
- messaging
748
+
749
+ const messagingCreateTextmagicProviderCommand = messaging
722
750
  .command(`create-textmagic-provider`)
723
751
  .description(`Create a new Textmagic provider.`)
724
752
  .requiredOption(`--provider-id <provider-id>`, `Provider ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -739,7 +767,8 @@ messaging
739
767
  ),
740
768
  );
741
769
 
742
- messaging
770
+
771
+ const messagingUpdateTextmagicProviderCommand = messaging
743
772
  .command(`update-textmagic-provider`)
744
773
  .description(`Update a Textmagic provider by its unique ID.`)
745
774
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -760,7 +789,8 @@ messaging
760
789
  ),
761
790
  );
762
791
 
763
- messaging
792
+
793
+ const messagingCreateTwilioProviderCommand = messaging
764
794
  .command(`create-twilio-provider`)
765
795
  .description(`Create a new Twilio provider.`)
766
796
  .requiredOption(`--provider-id <provider-id>`, `Provider ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -781,7 +811,8 @@ messaging
781
811
  ),
782
812
  );
783
813
 
784
- messaging
814
+
815
+ const messagingUpdateTwilioProviderCommand = messaging
785
816
  .command(`update-twilio-provider`)
786
817
  .description(`Update a Twilio provider by its unique ID.`)
787
818
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -802,7 +833,8 @@ messaging
802
833
  ),
803
834
  );
804
835
 
805
- messaging
836
+
837
+ const messagingCreateVonageProviderCommand = messaging
806
838
  .command(`create-vonage-provider`)
807
839
  .description(`Create a new Vonage provider.`)
808
840
  .requiredOption(`--provider-id <provider-id>`, `Provider ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -823,7 +855,8 @@ messaging
823
855
  ),
824
856
  );
825
857
 
826
- messaging
858
+
859
+ const messagingUpdateVonageProviderCommand = messaging
827
860
  .command(`update-vonage-provider`)
828
861
  .description(`Update a Vonage provider by its unique ID.`)
829
862
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -844,7 +877,8 @@ messaging
844
877
  ),
845
878
  );
846
879
 
847
- messaging
880
+
881
+ const messagingGetProviderCommand = messaging
848
882
  .command(`get-provider`)
849
883
  .description(`Get a provider by its unique ID.
850
884
  `)
@@ -856,7 +890,8 @@ messaging
856
890
  ),
857
891
  );
858
892
 
859
- messaging
893
+
894
+ const messagingDeleteProviderCommand = messaging
860
895
  .command(`delete-provider`)
861
896
  .description(`Delete a provider by its unique ID.`)
862
897
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -867,7 +902,8 @@ messaging
867
902
  ),
868
903
  );
869
904
 
870
- messaging
905
+
906
+ const messagingListProviderLogsCommand = messaging
871
907
  .command(`list-provider-logs`)
872
908
  .description(`Get the provider activity logs listed by its unique ID.`)
873
909
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
@@ -885,7 +921,8 @@ messaging
885
921
  ),
886
922
  );
887
923
 
888
- messaging
924
+
925
+ const messagingListSubscriberLogsCommand = messaging
889
926
  .command(`list-subscriber-logs`)
890
927
  .description(`Get the subscriber activity logs listed by its unique ID.`)
891
928
  .requiredOption(`--subscriber-id <subscriber-id>`, `Subscriber ID.`)
@@ -903,7 +940,8 @@ messaging
903
940
  ),
904
941
  );
905
942
 
906
- messaging
943
+
944
+ const messagingListTopicsCommand = messaging
907
945
  .command(`list-topics`)
908
946
  .description(`Get a list of all topics from the current Appwrite project.`)
909
947
  .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, description, emailTotal, smsTotal, pushTotal`)
@@ -921,7 +959,8 @@ messaging
921
959
  ),
922
960
  );
923
961
 
924
- messaging
962
+
963
+ const messagingCreateTopicCommand = messaging
925
964
  .command(`create-topic`)
926
965
  .description(`Create a new topic.`)
927
966
  .requiredOption(`--topic-id <topic-id>`, `Topic ID. Choose a custom Topic ID or a new Topic ID.`)
@@ -934,7 +973,8 @@ messaging
934
973
  ),
935
974
  );
936
975
 
937
- messaging
976
+
977
+ const messagingGetTopicCommand = messaging
938
978
  .command(`get-topic`)
939
979
  .description(`Get a topic by its unique ID.
940
980
  `)
@@ -946,7 +986,8 @@ messaging
946
986
  ),
947
987
  );
948
988
 
949
- messaging
989
+
990
+ const messagingUpdateTopicCommand = messaging
950
991
  .command(`update-topic`)
951
992
  .description(`Update a topic by its unique ID.
952
993
  `)
@@ -960,7 +1001,8 @@ messaging
960
1001
  ),
961
1002
  );
962
1003
 
963
- messaging
1004
+
1005
+ const messagingDeleteTopicCommand = messaging
964
1006
  .command(`delete-topic`)
965
1007
  .description(`Delete a topic by its unique ID.`)
966
1008
  .requiredOption(`--topic-id <topic-id>`, `Topic ID.`)
@@ -971,7 +1013,8 @@ messaging
971
1013
  ),
972
1014
  );
973
1015
 
974
- messaging
1016
+
1017
+ const messagingListTopicLogsCommand = messaging
975
1018
  .command(`list-topic-logs`)
976
1019
  .description(`Get the topic activity logs listed by its unique ID.`)
977
1020
  .requiredOption(`--topic-id <topic-id>`, `Topic ID.`)
@@ -989,7 +1032,8 @@ messaging
989
1032
  ),
990
1033
  );
991
1034
 
992
- messaging
1035
+
1036
+ const messagingListSubscribersCommand = messaging
993
1037
  .command(`list-subscribers`)
994
1038
  .description(`Get a list of all subscribers from the current Appwrite project.`)
995
1039
  .requiredOption(`--topic-id <topic-id>`, `Topic ID. The topic ID subscribed to.`)
@@ -1008,7 +1052,8 @@ messaging
1008
1052
  ),
1009
1053
  );
1010
1054
 
1011
- messaging
1055
+
1056
+ const messagingCreateSubscriberCommand = messaging
1012
1057
  .command(`create-subscriber`)
1013
1058
  .description(`Create a new subscriber.`)
1014
1059
  .requiredOption(`--topic-id <topic-id>`, `Topic ID. The topic ID to subscribe to.`)
@@ -1021,7 +1066,8 @@ messaging
1021
1066
  ),
1022
1067
  );
1023
1068
 
1024
- messaging
1069
+
1070
+ const messagingGetSubscriberCommand = messaging
1025
1071
  .command(`get-subscriber`)
1026
1072
  .description(`Get a subscriber by its unique ID.
1027
1073
  `)
@@ -1034,7 +1080,8 @@ messaging
1034
1080
  ),
1035
1081
  );
1036
1082
 
1037
- messaging
1083
+
1084
+ const messagingDeleteSubscriberCommand = messaging
1038
1085
  .command(`delete-subscriber`)
1039
1086
  .description(`Delete a subscriber by its unique ID.`)
1040
1087
  .requiredOption(`--topic-id <topic-id>`, `Topic ID. The topic ID subscribed to.`)
@@ -1046,3 +1093,4 @@ messaging
1046
1093
  ),
1047
1094
  );
1048
1095
 
1096
+
@@ -1,5 +1,5 @@
1
1
  import { Command } from "commander";
2
- import { sdkForProject } from "../../sdks.js";
2
+ import { sdkForConsole } from "../../sdks.js";
3
3
  import {
4
4
  actionRunner,
5
5
  commandDescriptions,
@@ -14,7 +14,7 @@ let migrationsClient: Migrations | null = null;
14
14
 
15
15
  const getMigrationsClient = async (): Promise<Migrations> => {
16
16
  if (!migrationsClient) {
17
- const sdkClient = await sdkForProject();
17
+ const sdkClient = await sdkForConsole();
18
18
  migrationsClient = new Migrations(sdkClient);
19
19
  }
20
20
  return migrationsClient;
@@ -26,7 +26,7 @@ export const migrations = new Command("migrations")
26
26
  helpWidth: process.stdout.columns || 80,
27
27
  });
28
28
 
29
- migrations
29
+ const migrationsListCommand = migrations
30
30
  .command(`list`)
31
31
  .description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`)
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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors`)
@@ -44,7 +44,8 @@ migrations
44
44
  ),
45
45
  );
46
46
 
47
- migrations
47
+
48
+ const migrationsCreateAppwriteMigrationCommand = migrations
48
49
  .command(`create-appwrite-migration`)
49
50
  .description(`Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. `)
50
51
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
@@ -58,7 +59,8 @@ migrations
58
59
  ),
59
60
  );
60
61
 
61
- migrations
62
+
63
+ const migrationsGetAppwriteReportCommand = migrations
62
64
  .command(`get-appwrite-report`)
63
65
  .description(`Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.`)
64
66
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
@@ -72,7 +74,8 @@ migrations
72
74
  ),
73
75
  );
74
76
 
75
- migrations
77
+
78
+ const migrationsCreateCSVExportCommand = migrations
76
79
  .command(`create-csv-export`)
77
80
  .description(`Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.`)
78
81
  .requiredOption(`--resource-id <resource-id>`, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.`)
@@ -101,7 +104,8 @@ migrations
101
104
  ),
102
105
  );
103
106
 
104
- migrations
107
+
108
+ const migrationsCreateCSVImportCommand = migrations
105
109
  .command(`create-csv-import`)
106
110
  .description(`Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.`)
107
111
  .requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`)
@@ -120,7 +124,8 @@ migrations
120
124
  ),
121
125
  );
122
126
 
123
- migrations
127
+
128
+ const migrationsCreateFirebaseMigrationCommand = migrations
124
129
  .command(`create-firebase-migration`)
125
130
  .description(`Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. `)
126
131
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
@@ -132,7 +137,8 @@ migrations
132
137
  ),
133
138
  );
134
139
 
135
- migrations
140
+
141
+ const migrationsGetFirebaseReportCommand = migrations
136
142
  .command(`get-firebase-report`)
137
143
  .description(`Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.`)
138
144
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
@@ -144,7 +150,8 @@ migrations
144
150
  ),
145
151
  );
146
152
 
147
- migrations
153
+
154
+ const migrationsCreateNHostMigrationCommand = migrations
148
155
  .command(`create-n-host-migration`)
149
156
  .description(`Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. `)
150
157
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
@@ -162,7 +169,8 @@ migrations
162
169
  ),
163
170
  );
164
171
 
165
- migrations
172
+
173
+ const migrationsGetNHostReportCommand = migrations
166
174
  .command(`get-n-host-report`)
167
175
  .description(`Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. `)
168
176
  .requiredOption(`--resources [resources...]`, `List of resources to migrate.`)
@@ -180,7 +188,8 @@ migrations
180
188
  ),
181
189
  );
182
190
 
183
- migrations
191
+
192
+ const migrationsCreateSupabaseMigrationCommand = migrations
184
193
  .command(`create-supabase-migration`)
185
194
  .description(`Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. `)
186
195
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
@@ -197,7 +206,8 @@ migrations
197
206
  ),
198
207
  );
199
208
 
200
- migrations
209
+
210
+ const migrationsGetSupabaseReportCommand = migrations
201
211
  .command(`get-supabase-report`)
202
212
  .description(`Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. `)
203
213
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
@@ -214,7 +224,8 @@ migrations
214
224
  ),
215
225
  );
216
226
 
217
- migrations
227
+
228
+ const migrationsGetCommand = migrations
218
229
  .command(`get`)
219
230
  .description(`Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. `)
220
231
  .requiredOption(`--migration-id <migration-id>`, `Migration unique ID.`)
@@ -225,7 +236,8 @@ migrations
225
236
  ),
226
237
  );
227
238
 
228
- migrations
239
+
240
+ const migrationsRetryCommand = migrations
229
241
  .command(`retry`)
230
242
  .description(`Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.`)
231
243
  .requiredOption(`--migration-id <migration-id>`, `Migration unique ID.`)
@@ -236,7 +248,8 @@ migrations
236
248
  ),
237
249
  );
238
250
 
239
- migrations
251
+
252
+ const migrationsDeleteCommand = migrations
240
253
  .command(`delete`)
241
254
  .description(`Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. `)
242
255
  .requiredOption(`--migration-id <migration-id>`, `Migration ID.`)
@@ -247,3 +260,4 @@ migrations
247
260
  ),
248
261
  );
249
262
 
263
+