@asyncapi/converter 0.9.0 → 1.0.0

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