@asyncapi/cli 0.8.0 → 0.9.2

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 (42) hide show
  1. package/README.md +9 -47
  2. package/assets/examples/anyof.yml +31 -0
  3. package/assets/examples/application-headers.yml +83 -0
  4. package/assets/examples/correlation-id.yml +144 -0
  5. package/assets/examples/default-example.yaml +23 -0
  6. package/assets/examples/examples.json +58 -0
  7. package/assets/examples/gitter-streaming.yml +164 -0
  8. package/assets/examples/mercure.yml +49 -0
  9. package/assets/examples/not.yml +24 -0
  10. package/assets/examples/oneof.yml +46 -0
  11. package/assets/examples/rpc-client.yml +69 -0
  12. package/assets/examples/rpc-server.yml +66 -0
  13. package/assets/examples/simple.yml +23 -0
  14. package/assets/examples/slack-rtm.yml +884 -0
  15. package/assets/examples/streetlights-kafka.yml +163 -0
  16. package/assets/examples/streetlights-mqtt.yml +209 -0
  17. package/assets/examples/websocket-gemini.yml +213 -0
  18. package/lib/base.js +2 -1
  19. package/lib/commands/config/context/add.js +2 -1
  20. package/lib/commands/config/context/current.js +2 -1
  21. package/lib/commands/config/context/list.js +2 -1
  22. package/lib/commands/config/context/remove.js +2 -1
  23. package/lib/commands/config/context/use.js +2 -1
  24. package/lib/commands/config/context.js +2 -1
  25. package/lib/commands/config.js +2 -1
  26. package/lib/commands/new.d.ts +17 -0
  27. package/lib/commands/new.js +126 -0
  28. package/lib/commands/start/studio.d.ts +12 -0
  29. package/lib/commands/start/studio.js +23 -0
  30. package/lib/commands/validate.js +3 -2
  31. package/lib/errors/specification-file.d.ts +1 -1
  32. package/lib/errors/specification-file.js +6 -1
  33. package/lib/models/Context.js +8 -7
  34. package/lib/models/SpecificationFile.js +16 -8
  35. package/lib/models/Studio.d.ts +2 -0
  36. package/lib/models/Studio.js +110 -0
  37. package/oclif.manifest.json +1 -1
  38. package/package.json +16 -12
  39. package/lib/help/command.d.ts +0 -5
  40. package/lib/help/command.js +0 -58
  41. package/lib/help/index.d.ts +0 -8
  42. package/lib/help/index.js +0 -49
@@ -0,0 +1,884 @@
1
+ asyncapi: '2.2.0'
2
+ id: 'urn:com:slack:rtm:api'
3
+ info:
4
+ title: Slack Real Time Messaging API
5
+ version: '1.0.0'
6
+
7
+ servers:
8
+ production:
9
+ url: https://slack.com/api/rtm.connect
10
+ protocol: https
11
+ protocolVersion: '1.1'
12
+ security:
13
+ - token: []
14
+
15
+ channels:
16
+ /:
17
+ publish:
18
+ message:
19
+ $ref: '#/components/messages/outgoingMessage'
20
+ subscribe:
21
+ message:
22
+ oneOf:
23
+ - $ref: '#/components/messages/hello'
24
+ - $ref: '#/components/messages/connectionError'
25
+ - $ref: '#/components/messages/accountsChanged'
26
+ - $ref: '#/components/messages/botAdded'
27
+ - $ref: '#/components/messages/botChanged'
28
+ - $ref: '#/components/messages/channelArchive'
29
+ - $ref: '#/components/messages/channelCreated'
30
+ - $ref: '#/components/messages/channelDeleted'
31
+ - $ref: '#/components/messages/channelHistoryChanged'
32
+ - $ref: '#/components/messages/channelJoined'
33
+ - $ref: '#/components/messages/channelLeft'
34
+ - $ref: '#/components/messages/channelMarked'
35
+ - $ref: '#/components/messages/channelRename'
36
+ - $ref: '#/components/messages/channelUnarchive'
37
+ - $ref: '#/components/messages/commandsChanged'
38
+ - $ref: '#/components/messages/dndUpdated'
39
+ - $ref: '#/components/messages/dndUpdatedUser'
40
+ - $ref: '#/components/messages/emailDomainChanged'
41
+ - $ref: '#/components/messages/emojiRemoved'
42
+ - $ref: '#/components/messages/emojiAdded'
43
+ - $ref: '#/components/messages/fileChange'
44
+ - $ref: '#/components/messages/fileCommentAdded'
45
+ - $ref: '#/components/messages/fileCommentDeleted'
46
+ - $ref: '#/components/messages/fileCommentEdited'
47
+ - $ref: '#/components/messages/fileCreated'
48
+ - $ref: '#/components/messages/fileDeleted'
49
+ - $ref: '#/components/messages/filePublic'
50
+ - $ref: '#/components/messages/fileShared'
51
+ - $ref: '#/components/messages/fileUnshared'
52
+ - $ref: '#/components/messages/goodbye'
53
+ - $ref: '#/components/messages/groupArchive'
54
+ - $ref: '#/components/messages/groupClose'
55
+ - $ref: '#/components/messages/groupHistoryChanged'
56
+ - $ref: '#/components/messages/groupJoined'
57
+ - $ref: '#/components/messages/groupLeft'
58
+ - $ref: '#/components/messages/groupMarked'
59
+ - $ref: '#/components/messages/groupOpen'
60
+ - $ref: '#/components/messages/groupRename'
61
+ - $ref: '#/components/messages/groupUnarchive'
62
+ - $ref: '#/components/messages/imClose'
63
+ - $ref: '#/components/messages/imCreated'
64
+ - $ref: '#/components/messages/imMarked'
65
+ - $ref: '#/components/messages/imOpen'
66
+ - $ref: '#/components/messages/manualPresenceChange'
67
+ - $ref: '#/components/messages/memberJoinedChannel'
68
+ - $ref: '#/components/messages/message'
69
+
70
+ components:
71
+ securitySchemes:
72
+ token:
73
+ type: httpApiKey
74
+ name: token
75
+ in: query
76
+
77
+ schemas:
78
+ attachment:
79
+ type: object
80
+ properties:
81
+ fallback:
82
+ type: string
83
+ color:
84
+ type: string
85
+ pretext:
86
+ type: string
87
+ author_name:
88
+ type: string
89
+ author_link:
90
+ type: string
91
+ format: uri
92
+ author_icon:
93
+ type: string
94
+ format: uri
95
+ title:
96
+ type: string
97
+ title_link:
98
+ type: string
99
+ format: uri
100
+ text:
101
+ type: string
102
+ fields:
103
+ type: array
104
+ items:
105
+ type: object
106
+ properties:
107
+ title:
108
+ type: string
109
+ value:
110
+ type: string
111
+ short:
112
+ type: boolean
113
+ image_url:
114
+ type: string
115
+ format: uri
116
+ thumb_url:
117
+ type: string
118
+ format: uri
119
+ footer:
120
+ type: string
121
+ footer_icon:
122
+ type: string
123
+ format: uri
124
+ ts:
125
+ type: number
126
+
127
+ messages:
128
+ hello:
129
+ summary: 'First event received upon connection.'
130
+ payload:
131
+ type: object
132
+ properties:
133
+ type:
134
+ type: string
135
+ enum:
136
+ - hello
137
+ connectionError:
138
+ summary: 'Event received when a connection error happens.'
139
+ payload:
140
+ type: object
141
+ properties:
142
+ type:
143
+ type: string
144
+ enum:
145
+ - error
146
+ error:
147
+ type: object
148
+ properties:
149
+ code:
150
+ type: number
151
+ msg:
152
+ type: string
153
+ accountsChanged:
154
+ summary: 'The list of accounts a user is signed into has changed.'
155
+ payload:
156
+ type: object
157
+ properties:
158
+ type:
159
+ type: string
160
+ enum:
161
+ - accounts_changed
162
+ botAdded:
163
+ summary: 'A bot user was added.'
164
+ payload:
165
+ type: object
166
+ properties:
167
+ type:
168
+ type: string
169
+ enum:
170
+ - bot_added
171
+ bot:
172
+ type: object
173
+ properties:
174
+ id:
175
+ type: string
176
+ app_id:
177
+ type: string
178
+ name:
179
+ type: string
180
+ icons:
181
+ type: object
182
+ additionalProperties:
183
+ type: string
184
+ botChanged:
185
+ summary: 'A bot user was changed.'
186
+ payload:
187
+ type: object
188
+ properties:
189
+ type:
190
+ type: string
191
+ enum:
192
+ - bot_added
193
+ bot:
194
+ type: object
195
+ properties:
196
+ id:
197
+ type: string
198
+ app_id:
199
+ type: string
200
+ name:
201
+ type: string
202
+ icons:
203
+ type: object
204
+ additionalProperties:
205
+ type: string
206
+ channelArchive:
207
+ summary: 'A channel was archived.'
208
+ payload:
209
+ type: object
210
+ properties:
211
+ type:
212
+ type: string
213
+ enum:
214
+ - channel_archive
215
+ channel:
216
+ type: string
217
+ user:
218
+ type: string
219
+ channelCreated:
220
+ summary: 'A channel was created.'
221
+ payload:
222
+ type: object
223
+ properties:
224
+ type:
225
+ type: string
226
+ enum:
227
+ - channel_created
228
+ channel:
229
+ type: object
230
+ properties:
231
+ id:
232
+ type: string
233
+ name:
234
+ type: string
235
+ created:
236
+ type: number
237
+ creator:
238
+ type: string
239
+ channelDeleted:
240
+ summary: 'A channel was deleted.'
241
+ payload:
242
+ type: object
243
+ properties:
244
+ type:
245
+ type: string
246
+ enum:
247
+ - channel_deleted
248
+ channel:
249
+ type: string
250
+ channelHistoryChanged:
251
+ summary: 'Bulk updates were made to a channel''s history.'
252
+ payload:
253
+ type: object
254
+ properties:
255
+ type:
256
+ type: string
257
+ enum:
258
+ - channel_history_changed
259
+ latest:
260
+ type: string
261
+ ts:
262
+ type: string
263
+ event_ts:
264
+ type: string
265
+ channelJoined:
266
+ summary: 'You joined a channel.'
267
+ payload:
268
+ type: object
269
+ properties:
270
+ type:
271
+ type: string
272
+ enum:
273
+ - channel_joined
274
+ channel:
275
+ type: object
276
+ properties:
277
+ id:
278
+ type: string
279
+ name:
280
+ type: string
281
+ created:
282
+ type: number
283
+ creator:
284
+ type: string
285
+ channelLeft:
286
+ summary: 'You left a channel.'
287
+ payload:
288
+ type: object
289
+ properties:
290
+ type:
291
+ type: string
292
+ enum:
293
+ - channel_left
294
+ channel:
295
+ type: string
296
+ channelMarked:
297
+ summary: 'Your channel read marker was updated.'
298
+ payload:
299
+ type: object
300
+ properties:
301
+ type:
302
+ type: string
303
+ enum:
304
+ - channel_marked
305
+ channel:
306
+ type: string
307
+ ts:
308
+ type: string
309
+ channelRename:
310
+ summary: 'A channel was renamed.'
311
+ payload:
312
+ type: object
313
+ properties:
314
+ type:
315
+ type: string
316
+ enum:
317
+ - channel_rename
318
+ channel:
319
+ type: object
320
+ properties:
321
+ id:
322
+ type: string
323
+ name:
324
+ type: string
325
+ created:
326
+ type: number
327
+ channelUnarchive:
328
+ summary: 'A channel was unarchived.'
329
+ payload:
330
+ type: object
331
+ properties:
332
+ type:
333
+ type: string
334
+ enum:
335
+ - channel_unarchive
336
+ channel:
337
+ type: string
338
+ user:
339
+ type: string
340
+ commandsChanged:
341
+ summary: 'A slash command has been added or changed.'
342
+ payload:
343
+ type: object
344
+ properties:
345
+ type:
346
+ type: string
347
+ enum:
348
+ - commands_changed
349
+ event_ts:
350
+ type: string
351
+ dndUpdated:
352
+ summary: 'Do not Disturb settings changed for the current user.'
353
+ payload:
354
+ type: object
355
+ properties:
356
+ type:
357
+ type: string
358
+ enum:
359
+ - dnd_updated
360
+ user:
361
+ type: string
362
+ dnd_status:
363
+ type: object
364
+ properties:
365
+ dnd_enabled:
366
+ type: boolean
367
+ next_dnd_start_ts:
368
+ type: number
369
+ next_dnd_end_ts:
370
+ type: number
371
+ snooze_enabled:
372
+ type: boolean
373
+ snooze_endtime:
374
+ type: number
375
+ dndUpdatedUser:
376
+ summary: 'Do not Disturb settings changed for a member.'
377
+ payload:
378
+ type: object
379
+ properties:
380
+ type:
381
+ type: string
382
+ enum:
383
+ - dnd_updated_user
384
+ user:
385
+ type: string
386
+ dnd_status:
387
+ type: object
388
+ properties:
389
+ dnd_enabled:
390
+ type: boolean
391
+ next_dnd_start_ts:
392
+ type: number
393
+ next_dnd_end_ts:
394
+ type: number
395
+ emailDomainChanged:
396
+ summary: 'The workspace email domain has changed.'
397
+ payload:
398
+ type: object
399
+ properties:
400
+ type:
401
+ type: string
402
+ enum:
403
+ - email_domain_changed
404
+ email_domain:
405
+ type: string
406
+ event_ts:
407
+ type: string
408
+ emojiRemoved:
409
+ summary: 'A custom emoji has been removed.'
410
+ payload:
411
+ type: object
412
+ properties:
413
+ type:
414
+ type: string
415
+ enum:
416
+ - emoji_changed
417
+ subtype:
418
+ type: string
419
+ enum:
420
+ - remove
421
+ names:
422
+ type: array
423
+ items:
424
+ type: string
425
+ event_ts:
426
+ type: string
427
+ emojiAdded:
428
+ summary: 'A custom emoji has been added.'
429
+ payload:
430
+ type: object
431
+ properties:
432
+ type:
433
+ type: string
434
+ enum:
435
+ - emoji_changed
436
+ subtype:
437
+ type: string
438
+ enum:
439
+ - add
440
+ name:
441
+ type: string
442
+ value:
443
+ type: string
444
+ format: uri
445
+ event_ts:
446
+ type: string
447
+ fileChange:
448
+ summary: 'A file was changed.'
449
+ payload:
450
+ type: object
451
+ properties:
452
+ type:
453
+ type: string
454
+ enum:
455
+ - file_change
456
+ file_id:
457
+ type: string
458
+ file:
459
+ type: object
460
+ properties:
461
+ id:
462
+ type: string
463
+ fileCommentAdded:
464
+ summary: 'A file comment was added.'
465
+ payload:
466
+ type: object
467
+ properties:
468
+ type:
469
+ type: string
470
+ enum:
471
+ - file_comment_added
472
+ comment: {}
473
+ file_id:
474
+ type: string
475
+ file:
476
+ type: object
477
+ properties:
478
+ id:
479
+ type: string
480
+ fileCommentDeleted:
481
+ summary: 'A file comment was deleted.'
482
+ payload:
483
+ type: object
484
+ properties:
485
+ type:
486
+ type: string
487
+ enum:
488
+ - file_comment_deleted
489
+ comment:
490
+ type: string
491
+ file_id:
492
+ type: string
493
+ file:
494
+ type: object
495
+ properties:
496
+ id:
497
+ type: string
498
+ fileCommentEdited:
499
+ summary: 'A file comment was edited.'
500
+ payload:
501
+ type: object
502
+ properties:
503
+ type:
504
+ type: string
505
+ enum:
506
+ - file_comment_edited
507
+ comment: {}
508
+ file_id:
509
+ type: string
510
+ file:
511
+ type: object
512
+ properties:
513
+ id:
514
+ type: string
515
+ fileCreated:
516
+ summary: 'A file was created.'
517
+ payload:
518
+ type: object
519
+ properties:
520
+ type:
521
+ type: string
522
+ enum:
523
+ - file_created
524
+ file_id:
525
+ type: string
526
+ file:
527
+ type: object
528
+ properties:
529
+ id:
530
+ type: string
531
+ fileDeleted:
532
+ summary: 'A file was deleted.'
533
+ payload:
534
+ type: object
535
+ properties:
536
+ type:
537
+ type: string
538
+ enum:
539
+ - file_deleted
540
+ file_id:
541
+ type: string
542
+ event_ts:
543
+ type: string
544
+ filePublic:
545
+ summary: 'A file was made public.'
546
+ payload:
547
+ type: object
548
+ properties:
549
+ type:
550
+ type: string
551
+ enum:
552
+ - file_public
553
+ file_id:
554
+ type: string
555
+ file:
556
+ type: object
557
+ properties:
558
+ id:
559
+ type: string
560
+ fileShared:
561
+ summary: 'A file was shared.'
562
+ payload:
563
+ type: object
564
+ properties:
565
+ type:
566
+ type: string
567
+ enum:
568
+ - file_shared
569
+ file_id:
570
+ type: string
571
+ file:
572
+ type: object
573
+ properties:
574
+ id:
575
+ type: string
576
+ fileUnshared:
577
+ summary: 'A file was unshared.'
578
+ payload:
579
+ type: object
580
+ properties:
581
+ type:
582
+ type: string
583
+ enum:
584
+ - file_unshared
585
+ file_id:
586
+ type: string
587
+ file:
588
+ type: object
589
+ properties:
590
+ id:
591
+ type: string
592
+ goodbye:
593
+ summary: 'The server intends to close the connection soon.'
594
+ payload:
595
+ type: object
596
+ properties:
597
+ type:
598
+ type: string
599
+ enum:
600
+ - goodbye
601
+ groupArchive:
602
+ summary: 'A private channel was archived.'
603
+ payload:
604
+ type: object
605
+ properties:
606
+ type:
607
+ type: string
608
+ enum:
609
+ - group_archive
610
+ channel:
611
+ type: string
612
+ groupClose:
613
+ summary: 'You closed a private channel.'
614
+ payload:
615
+ type: object
616
+ properties:
617
+ type:
618
+ type: string
619
+ enum:
620
+ - group_close
621
+ user:
622
+ type: string
623
+ channel:
624
+ type: string
625
+ groupHistoryChanged:
626
+ summary: 'Bulk updates were made to a private channel''s history.'
627
+ payload:
628
+ type: object
629
+ properties:
630
+ type:
631
+ type: string
632
+ enum:
633
+ - group_history_changed
634
+ latest:
635
+ type: string
636
+ ts:
637
+ type: string
638
+ event_ts:
639
+ type: string
640
+ groupJoined:
641
+ summary: 'You joined a private channel.'
642
+ payload:
643
+ type: object
644
+ properties:
645
+ type:
646
+ type: string
647
+ enum:
648
+ - group_joined
649
+ channel:
650
+ type: object
651
+ properties:
652
+ id:
653
+ type: string
654
+ name:
655
+ type: string
656
+ created:
657
+ type: number
658
+ creator:
659
+ type: string
660
+ groupLeft:
661
+ summary: 'You left a private channel.'
662
+ payload:
663
+ type: object
664
+ properties:
665
+ type:
666
+ type: string
667
+ enum:
668
+ - group_left
669
+ channel:
670
+ type: string
671
+ groupMarked:
672
+ summary: 'A private channel read marker was updated.'
673
+ payload:
674
+ type: object
675
+ properties:
676
+ type:
677
+ type: string
678
+ enum:
679
+ - group_marked
680
+ channel:
681
+ type: string
682
+ ts:
683
+ type: string
684
+ groupOpen:
685
+ summary: 'You opened a private channel.'
686
+ payload:
687
+ type: object
688
+ properties:
689
+ type:
690
+ type: string
691
+ enum:
692
+ - group_open
693
+ user:
694
+ type: string
695
+ channel:
696
+ type: string
697
+ groupRename:
698
+ summary: 'A private channel was renamed.'
699
+ payload:
700
+ type: object
701
+ properties:
702
+ type:
703
+ type: string
704
+ enum:
705
+ - group_rename
706
+ channel:
707
+ type: object
708
+ properties:
709
+ id:
710
+ type: string
711
+ name:
712
+ type: string
713
+ created:
714
+ type: number
715
+ groupUnarchive:
716
+ summary: 'A private channel was unarchived.'
717
+ payload:
718
+ type: object
719
+ properties:
720
+ type:
721
+ type: string
722
+ enum:
723
+ - group_unarchive
724
+ channel:
725
+ type: string
726
+ user:
727
+ type: string
728
+ imClose:
729
+ summary: 'You closed a DM.'
730
+ payload:
731
+ type: object
732
+ properties:
733
+ type:
734
+ type: string
735
+ enum:
736
+ - im_close
737
+ channel:
738
+ type: string
739
+ user:
740
+ type: string
741
+ imCreated:
742
+ summary: 'A DM was created.'
743
+ payload:
744
+ type: object
745
+ properties:
746
+ type:
747
+ type: string
748
+ enum:
749
+ - im_created
750
+ channel:
751
+ type: object
752
+ properties:
753
+ id:
754
+ type: string
755
+ name:
756
+ type: string
757
+ created:
758
+ type: number
759
+ creator:
760
+ type: string
761
+ user:
762
+ type: string
763
+ imMarked:
764
+ summary: 'A direct message read marker was updated.'
765
+ payload:
766
+ type: object
767
+ properties:
768
+ type:
769
+ type: string
770
+ enum:
771
+ - im_marked
772
+ channel:
773
+ type: string
774
+ ts:
775
+ type: string
776
+ imOpen:
777
+ summary: 'You opened a DM.'
778
+ payload:
779
+ type: object
780
+ properties:
781
+ type:
782
+ type: string
783
+ enum:
784
+ - im_open
785
+ channel:
786
+ type: string
787
+ user:
788
+ type: string
789
+ manualPresenceChange:
790
+ summary: 'You manually updated your presence.'
791
+ payload:
792
+ type: object
793
+ properties:
794
+ type:
795
+ type: string
796
+ enum:
797
+ - manual_presence_change
798
+ presence:
799
+ type: string
800
+ memberJoinedChannel:
801
+ summary: 'A user joined a public or private channel.'
802
+ payload:
803
+ type: object
804
+ properties:
805
+ type:
806
+ type: string
807
+ enum:
808
+ - member_joined_channel
809
+ user:
810
+ type: string
811
+ channel:
812
+ type: string
813
+ channel_type:
814
+ type: string
815
+ enum:
816
+ - C
817
+ - G
818
+ team:
819
+ type: string
820
+ inviter:
821
+ type: string
822
+ memberLeftChannel:
823
+ summary: 'A user left a public or private channel.'
824
+ payload:
825
+ type: object
826
+ properties:
827
+ type:
828
+ type: string
829
+ enum:
830
+ - member_left_channel
831
+ user:
832
+ type: string
833
+ channel:
834
+ type: string
835
+ channel_type:
836
+ type: string
837
+ enum:
838
+ - C
839
+ - G
840
+ team:
841
+ type: string
842
+ message:
843
+ summary: 'A message was sent to a channel.'
844
+ payload:
845
+ type: object
846
+ properties:
847
+ type:
848
+ type: string
849
+ enum:
850
+ - message
851
+ user:
852
+ type: string
853
+ channel:
854
+ type: string
855
+ text:
856
+ type: string
857
+ ts:
858
+ type: string
859
+ attachments:
860
+ type: array
861
+ items:
862
+ $ref: '#/components/schemas/attachment'
863
+ edited:
864
+ type: object
865
+ properties:
866
+ user:
867
+ type: string
868
+ ts:
869
+ type: string
870
+ outgoingMessage:
871
+ summary: 'A message was sent to a channel.'
872
+ payload:
873
+ type: object
874
+ properties:
875
+ id:
876
+ type: number
877
+ type:
878
+ type: string
879
+ enum:
880
+ - message
881
+ channel:
882
+ type: string
883
+ text:
884
+ type: string