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