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