@asyncapi-actions-test/trusted-publishing-test_asyncapi-cli 4.1.3

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 (257) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +117 -0
  3. package/assets/create-template/templates/default/asyncapi.yaml +34 -0
  4. package/assets/create-template/templates/default/package-lock.json +4062 -0
  5. package/assets/create-template/templates/default/package.json +10 -0
  6. package/assets/create-template/templates/default/readme.md +4 -0
  7. package/assets/create-template/templates/default/template/index.js +11 -0
  8. package/assets/examples/adeo-kafka-request-reply-asyncapi.yml +298 -0
  9. package/assets/examples/anyof-asyncapi.yml +36 -0
  10. package/assets/examples/application-headers-asyncapi.yml +86 -0
  11. package/assets/examples/correlation-id-asyncapi.yml +180 -0
  12. package/assets/examples/default-example.json +51 -0
  13. package/assets/examples/default-example.yaml +31 -0
  14. package/assets/examples/examples.json +82 -0
  15. package/assets/examples/gitter-streaming-asyncapi.yml +178 -0
  16. package/assets/examples/kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml +388 -0
  17. package/assets/examples/kraken-websocket-request-reply-multiple-channels-asyncapi.yml +394 -0
  18. package/assets/examples/mercure-asyncapi.yml +58 -0
  19. package/assets/examples/not-asyncapi.yml +29 -0
  20. package/assets/examples/oneof-asyncapi.yml +57 -0
  21. package/assets/examples/operation-security-asyncapi.yml +117 -0
  22. package/assets/examples/rpc-client-asyncapi.yml +72 -0
  23. package/assets/examples/rpc-server-asyncapi.yml +69 -0
  24. package/assets/examples/simple-asyncapi.yml +31 -0
  25. package/assets/examples/slack-rtm-asyncapi.yml +982 -0
  26. package/assets/examples/streetlights-kafka-asyncapi.yml +199 -0
  27. package/assets/examples/streetlights-mqtt-asyncapi.yml +253 -0
  28. package/assets/examples/streetlights-operation-security-asyncapi.yml +240 -0
  29. package/assets/examples/tutorial.yml +41 -0
  30. package/assets/examples/websocket-gemini-asyncapi.yml +301 -0
  31. package/assets/logo.png +0 -0
  32. package/assets/server-api.png +0 -0
  33. package/bin/dev +17 -0
  34. package/bin/dev.cmd +3 -0
  35. package/bin/run +12 -0
  36. package/bin/run.cmd +3 -0
  37. package/bin/run_bin +13 -0
  38. package/bin/run_bin.cmd +3 -0
  39. package/lib/apps/api/app.d.ts +15 -0
  40. package/lib/apps/api/app.js +91 -0
  41. package/lib/apps/api/configs/development.json +16 -0
  42. package/lib/apps/api/configs/production.json +16 -0
  43. package/lib/apps/api/configs/test.json +16 -0
  44. package/lib/apps/api/constants.d.ts +1 -0
  45. package/lib/apps/api/constants.js +4 -0
  46. package/lib/apps/api/controllers/bundle.controller.d.ts +7 -0
  47. package/lib/apps/api/controllers/bundle.controller.js +44 -0
  48. package/lib/apps/api/controllers/convert.controller.d.ts +11 -0
  49. package/lib/apps/api/controllers/convert.controller.js +69 -0
  50. package/lib/apps/api/controllers/diff.controller.d.ts +7 -0
  51. package/lib/apps/api/controllers/diff.controller.js +42 -0
  52. package/lib/apps/api/controllers/docs.controller.d.ts +6 -0
  53. package/lib/apps/api/controllers/docs.controller.js +24 -0
  54. package/lib/apps/api/controllers/generate.controller.d.ts +22 -0
  55. package/lib/apps/api/controllers/generate.controller.js +174 -0
  56. package/lib/apps/api/controllers/help.controller.d.ts +6 -0
  57. package/lib/apps/api/controllers/help.controller.js +101 -0
  58. package/lib/apps/api/controllers/parse.controller.d.ts +10 -0
  59. package/lib/apps/api/controllers/parse.controller.js +35 -0
  60. package/lib/apps/api/controllers/validate.controller.d.ts +10 -0
  61. package/lib/apps/api/controllers/validate.controller.js +50 -0
  62. package/lib/apps/api/controllers/version.controller.d.ts +8 -0
  63. package/lib/apps/api/controllers/version.controller.js +69 -0
  64. package/lib/apps/api/exceptions/problem.exception.d.ts +14 -0
  65. package/lib/apps/api/exceptions/problem.exception.js +10 -0
  66. package/lib/apps/api/index.d.ts +10 -0
  67. package/lib/apps/api/index.js +23 -0
  68. package/lib/apps/api/middlewares/logger.middleware.d.ts +2 -0
  69. package/lib/apps/api/middlewares/logger.middleware.js +12 -0
  70. package/lib/apps/api/middlewares/problem.middleware.d.ts +6 -0
  71. package/lib/apps/api/middlewares/problem.middleware.js +27 -0
  72. package/lib/apps/api/middlewares/validation.middleware.d.ts +12 -0
  73. package/lib/apps/api/middlewares/validation.middleware.js +245 -0
  74. package/lib/apps/api/server.d.ts +3 -0
  75. package/lib/apps/api/server.js +19 -0
  76. package/lib/apps/cli/commands/bundle.d.ts +15 -0
  77. package/lib/apps/cli/commands/bundle.js +75 -0
  78. package/lib/apps/cli/commands/config/analytics.d.ts +11 -0
  79. package/lib/apps/cli/commands/config/analytics.js +61 -0
  80. package/lib/apps/cli/commands/config/auth/add.d.ts +13 -0
  81. package/lib/apps/cli/commands/config/auth/add.js +68 -0
  82. package/lib/apps/cli/commands/config/context/add.d.ts +13 -0
  83. package/lib/apps/cli/commands/config/context/add.js +46 -0
  84. package/lib/apps/cli/commands/config/context/current.d.ts +8 -0
  85. package/lib/apps/cli/commands/config/context/current.js +37 -0
  86. package/lib/apps/cli/commands/config/context/edit.d.ts +12 -0
  87. package/lib/apps/cli/commands/config/context/edit.js +44 -0
  88. package/lib/apps/cli/commands/config/context/index.d.ts +5 -0
  89. package/lib/apps/cli/commands/config/context/index.js +16 -0
  90. package/lib/apps/cli/commands/config/context/init.d.ts +12 -0
  91. package/lib/apps/cli/commands/config/context/init.js +31 -0
  92. package/lib/apps/cli/commands/config/context/list.d.ts +8 -0
  93. package/lib/apps/cli/commands/config/context/list.js +36 -0
  94. package/lib/apps/cli/commands/config/context/remove.d.ts +11 -0
  95. package/lib/apps/cli/commands/config/context/remove.js +39 -0
  96. package/lib/apps/cli/commands/config/context/use.d.ts +11 -0
  97. package/lib/apps/cli/commands/config/context/use.js +40 -0
  98. package/lib/apps/cli/commands/config/index.d.ts +5 -0
  99. package/lib/apps/cli/commands/config/index.js +16 -0
  100. package/lib/apps/cli/commands/config/versions.d.ts +8 -0
  101. package/lib/apps/cli/commands/config/versions.js +56 -0
  102. package/lib/apps/cli/commands/convert.d.ts +21 -0
  103. package/lib/apps/cli/commands/convert.js +85 -0
  104. package/lib/apps/cli/commands/diff.d.ts +36 -0
  105. package/lib/apps/cli/commands/diff.js +335 -0
  106. package/lib/apps/cli/commands/format.d.ts +18 -0
  107. package/lib/apps/cli/commands/format.js +97 -0
  108. package/lib/apps/cli/commands/generate/client.d.ts +30 -0
  109. package/lib/apps/cli/commands/generate/client.js +94 -0
  110. package/lib/apps/cli/commands/generate/fromTemplate.d.ts +29 -0
  111. package/lib/apps/cli/commands/generate/fromTemplate.js +91 -0
  112. package/lib/apps/cli/commands/generate/index.d.ts +5 -0
  113. package/lib/apps/cli/commands/generate/index.js +15 -0
  114. package/lib/apps/cli/commands/generate/models.d.ts +16 -0
  115. package/lib/apps/cli/commands/generate/models.js +166 -0
  116. package/lib/apps/cli/commands/new/file.d.ts +16 -0
  117. package/lib/apps/cli/commands/new/file.js +180 -0
  118. package/lib/apps/cli/commands/new/index.d.ts +5 -0
  119. package/lib/apps/cli/commands/new/index.js +15 -0
  120. package/lib/apps/cli/commands/new/template.d.ts +18 -0
  121. package/lib/apps/cli/commands/new/template.js +102 -0
  122. package/lib/apps/cli/commands/optimize.d.ts +41 -0
  123. package/lib/apps/cli/commands/optimize.js +289 -0
  124. package/lib/apps/cli/commands/pretty.d.ts +12 -0
  125. package/lib/apps/cli/commands/pretty.js +70 -0
  126. package/lib/apps/cli/commands/start/api.d.ts +11 -0
  127. package/lib/apps/cli/commands/start/api.js +23 -0
  128. package/lib/apps/cli/commands/start/index.d.ts +5 -0
  129. package/lib/apps/cli/commands/start/index.js +15 -0
  130. package/lib/apps/cli/commands/start/preview.d.ts +17 -0
  131. package/lib/apps/cli/commands/start/preview.js +41 -0
  132. package/lib/apps/cli/commands/start/studio.d.ts +16 -0
  133. package/lib/apps/cli/commands/start/studio.js +94 -0
  134. package/lib/apps/cli/commands/validate.d.ts +23 -0
  135. package/lib/apps/cli/commands/validate.js +95 -0
  136. package/lib/apps/cli/internal/args/generate.args.d.ts +3 -0
  137. package/lib/apps/cli/internal/args/generate.args.js +10 -0
  138. package/lib/apps/cli/internal/base/BaseGeneratorCommand.d.ts +42 -0
  139. package/lib/apps/cli/internal/base/BaseGeneratorCommand.js +119 -0
  140. package/lib/apps/cli/internal/base.d.ts +20 -0
  141. package/lib/apps/cli/internal/base.js +173 -0
  142. package/lib/apps/cli/internal/flags/bundle.flags.d.ts +7 -0
  143. package/lib/apps/cli/internal/flags/bundle.flags.js +26 -0
  144. package/lib/apps/cli/internal/flags/config/analytics.flags.d.ts +6 -0
  145. package/lib/apps/cli/internal/flags/config/analytics.flags.js +24 -0
  146. package/lib/apps/cli/internal/flags/config/context.flags.d.ts +4 -0
  147. package/lib/apps/cli/internal/flags/config/context.flags.js +16 -0
  148. package/lib/apps/cli/internal/flags/convert.flags.d.ts +7 -0
  149. package/lib/apps/cli/internal/flags/convert.flags.js +32 -0
  150. package/lib/apps/cli/internal/flags/diff.flags.d.ts +13 -0
  151. package/lib/apps/cli/internal/flags/diff.flags.js +29 -0
  152. package/lib/apps/cli/internal/flags/format.flags.d.ts +6 -0
  153. package/lib/apps/cli/internal/flags/format.flags.js +22 -0
  154. package/lib/apps/cli/internal/flags/generate/clients.flags.d.ts +16 -0
  155. package/lib/apps/cli/internal/flags/generate/clients.flags.js +8 -0
  156. package/lib/apps/cli/internal/flags/generate/fromTemplate.flags.d.ts +16 -0
  157. package/lib/apps/cli/internal/flags/generate/fromTemplate.flags.js +8 -0
  158. package/lib/apps/cli/internal/flags/generate/models.flags.d.ts +1 -0
  159. package/lib/apps/cli/internal/flags/generate/models.flags.js +14 -0
  160. package/lib/apps/cli/internal/flags/generate/sharedFlags.d.ts +16 -0
  161. package/lib/apps/cli/internal/flags/generate/sharedFlags.js +57 -0
  162. package/lib/apps/cli/internal/flags/global.flags.d.ts +4 -0
  163. package/lib/apps/cli/internal/flags/global.flags.js +18 -0
  164. package/lib/apps/cli/internal/flags/new/file.flags.d.ts +8 -0
  165. package/lib/apps/cli/internal/flags/new/file.flags.js +20 -0
  166. package/lib/apps/cli/internal/flags/new/template.flags.d.ts +7 -0
  167. package/lib/apps/cli/internal/flags/new/template.flags.js +28 -0
  168. package/lib/apps/cli/internal/flags/optimize.flags.d.ts +21 -0
  169. package/lib/apps/cli/internal/flags/optimize.flags.js +51 -0
  170. package/lib/apps/cli/internal/flags/parser.flags.d.ts +10 -0
  171. package/lib/apps/cli/internal/flags/parser.flags.js +28 -0
  172. package/lib/apps/cli/internal/flags/pretty.flags.d.ts +3 -0
  173. package/lib/apps/cli/internal/flags/pretty.flags.js +13 -0
  174. package/lib/apps/cli/internal/flags/proxy.flags.d.ts +4 -0
  175. package/lib/apps/cli/internal/flags/proxy.flags.js +17 -0
  176. package/lib/apps/cli/internal/flags/start/api.flags.d.ts +5 -0
  177. package/lib/apps/cli/internal/flags/start/api.flags.js +20 -0
  178. package/lib/apps/cli/internal/flags/start/preview.flags.d.ts +9 -0
  179. package/lib/apps/cli/internal/flags/start/preview.flags.js +32 -0
  180. package/lib/apps/cli/internal/flags/start/studio.flags.d.ts +7 -0
  181. package/lib/apps/cli/internal/flags/start/studio.flags.js +25 -0
  182. package/lib/apps/cli/internal/flags/validate.flags.d.ts +11 -0
  183. package/lib/apps/cli/internal/flags/validate.flags.js +22 -0
  184. package/lib/apps/cli/internal/globals.d.ts +10 -0
  185. package/lib/apps/cli/internal/globals.js +46 -0
  186. package/lib/apps/cli/internal/hooks/command_not_found/myhook.d.ts +4 -0
  187. package/lib/apps/cli/internal/hooks/command_not_found/myhook.js +85 -0
  188. package/lib/domains/models/Context.d.ts +21 -0
  189. package/lib/domains/models/Context.js +321 -0
  190. package/lib/domains/models/Preview.d.ts +2 -0
  191. package/lib/domains/models/Preview.js +227 -0
  192. package/lib/domains/models/SpecificationFile.d.ts +40 -0
  193. package/lib/domains/models/SpecificationFile.js +295 -0
  194. package/lib/domains/models/Studio.d.ts +2 -0
  195. package/lib/domains/models/Studio.js +182 -0
  196. package/lib/domains/models/generate/ClientLanguages.d.ts +12 -0
  197. package/lib/domains/models/generate/ClientLanguages.js +17 -0
  198. package/lib/domains/models/generate/Flags.d.ts +9 -0
  199. package/lib/domains/models/generate/Flags.js +2 -0
  200. package/lib/domains/services/archiver.service.d.ts +17 -0
  201. package/lib/domains/services/archiver.service.js +53 -0
  202. package/lib/domains/services/base.service.d.ts +6 -0
  203. package/lib/domains/services/base.service.js +26 -0
  204. package/lib/domains/services/config.service.d.ts +42 -0
  205. package/lib/domains/services/config.service.js +95 -0
  206. package/lib/domains/services/convert.service.d.ts +12 -0
  207. package/lib/domains/services/convert.service.js +65 -0
  208. package/lib/domains/services/generator.service.d.ts +15 -0
  209. package/lib/domains/services/generator.service.js +75 -0
  210. package/lib/domains/services/validation.service.d.ts +54 -0
  211. package/lib/domains/services/validation.service.js +375 -0
  212. package/lib/errors/context-error.d.ts +26 -0
  213. package/lib/errors/context-error.js +71 -0
  214. package/lib/errors/diff-error.d.ts +9 -0
  215. package/lib/errors/diff-error.js +27 -0
  216. package/lib/errors/generator-error.d.ts +3 -0
  217. package/lib/errors/generator-error.js +11 -0
  218. package/lib/errors/specification-file.d.ts +18 -0
  219. package/lib/errors/specification-file.js +65 -0
  220. package/lib/errors/validation-error.d.ts +11 -0
  221. package/lib/errors/validation-error.js +55 -0
  222. package/lib/index.d.ts +1 -0
  223. package/lib/index.js +11 -0
  224. package/lib/interfaces/index.d.ts +87 -0
  225. package/lib/interfaces/index.js +7 -0
  226. package/lib/utils/ajv.d.ts +2 -0
  227. package/lib/utils/ajv.js +18 -0
  228. package/lib/utils/app-openapi.d.ts +4 -0
  229. package/lib/utils/app-openapi.js +28 -0
  230. package/lib/utils/generate/flags.d.ts +2 -0
  231. package/lib/utils/generate/flags.js +14 -0
  232. package/lib/utils/generate/mapBaseUrl.d.ts +6 -0
  233. package/lib/utils/generate/mapBaseUrl.js +34 -0
  234. package/lib/utils/generate/parseParams.d.ts +3 -0
  235. package/lib/utils/generate/parseParams.js +58 -0
  236. package/lib/utils/generate/prompts.d.ts +4 -0
  237. package/lib/utils/generate/prompts.js +77 -0
  238. package/lib/utils/generate/registry.d.ts +2 -0
  239. package/lib/utils/generate/registry.js +30 -0
  240. package/lib/utils/generate/watcher.d.ts +51 -0
  241. package/lib/utils/generate/watcher.js +230 -0
  242. package/lib/utils/logger.d.ts +6 -0
  243. package/lib/utils/logger.js +33 -0
  244. package/lib/utils/retrieve-language.d.ts +1 -0
  245. package/lib/utils/retrieve-language.js +9 -0
  246. package/lib/utils/scoreCalculator.d.ts +2 -0
  247. package/lib/utils/scoreCalculator.js +22 -0
  248. package/lib/utils/temp-dir.d.ts +2 -0
  249. package/lib/utils/temp-dir.js +26 -0
  250. package/oclif.manifest.json +2137 -0
  251. package/openapi.yaml +713 -0
  252. package/package.json +203 -0
  253. package/scripts/enableAutoComplete.js +160 -0
  254. package/scripts/fetch-asyncapi-example.js +126 -0
  255. package/scripts/generateTypesForGenerateCommand.js +40 -0
  256. package/scripts/releasePackagesRename.js +88 -0
  257. package/scripts/updateUsageDocs.js +73 -0
@@ -0,0 +1,394 @@
1
+ asyncapi: 3.0.0
2
+
3
+ info:
4
+ title: Kraken Websockets API
5
+ version: '1.8.0'
6
+ description: |
7
+ WebSockets API offers real-time market data updates. WebSockets is a bidirectional protocol offering fastest real-time data, helping you build real-time applications. The public message types presented below do not require authentication. Private-data messages can be subscribed on a separate authenticated endpoint.
8
+
9
+ ### General Considerations
10
+
11
+ - TLS with SNI (Server Name Indication) is required in order to establish a Kraken WebSockets API connection. See Cloudflare's [What is SNI?](https://www.cloudflare.com/learning/ssl/what-is-sni/) guide for more details.
12
+ - All messages sent and received via WebSockets are encoded in JSON format
13
+ - All decimal fields (including timestamps) are quoted to preserve precision.
14
+ - Timestamps should not be considered unique and not be considered as aliases for transaction IDs. Also, the granularity of timestamps is not representative of transaction rates.
15
+ - At least one private message should be subscribed to keep the authenticated client connection open.
16
+ - Please use REST API endpoint [AssetPairs](https://www.kraken.com/features/api#get-tradable-pairs) to fetch the list of pairs which can be subscribed via WebSockets API. For example, field 'wsname' gives the supported pairs name which can be used to subscribe.
17
+ - Cloudflare imposes a connection/re-connection rate limit (per IP address) of approximately 150 attempts per rolling 10 minutes. If this is exceeded, the IP is banned for 10 minutes.
18
+ - Recommended reconnection behaviour is to (1) attempt reconnection instantly up to a handful of times if the websocket is dropped randomly during normal operation but (2) after maintenance or extended downtime, attempt to reconnect no more quickly than once every 5 seconds. There is no advantage to reconnecting more rapidly after maintenance during cancel_only mode.
19
+
20
+
21
+ channels:
22
+ ping:
23
+ address: /
24
+ messages:
25
+ ping:
26
+ $ref: '#/components/messages/ping'
27
+ pong:
28
+ address: /
29
+ messages:
30
+ pong:
31
+ $ref: '#/components/messages/pong'
32
+
33
+ heartbeat:
34
+ address: /
35
+ messages:
36
+ heartbeat:
37
+ $ref: '#/components/messages/heartbeat'
38
+
39
+ systemStatus:
40
+ address: /
41
+ messages:
42
+ systemStatus:
43
+ $ref: '#/components/messages/systemStatus'
44
+
45
+ currencyInfo:
46
+ address: /
47
+ messages:
48
+ subscriptionStatus:
49
+ $ref: '#/components/messages/subscriptionStatus'
50
+ dummyCurrencyInfo:
51
+ $ref: '#/components/messages/dummyCurrencyInfo'
52
+
53
+ subscribe:
54
+ address: /
55
+ messages:
56
+ subscribe:
57
+ $ref: '#/components/messages/subscribe'
58
+
59
+ unsubscribe:
60
+ address: /
61
+ messages:
62
+ unsubscribe:
63
+ $ref: '#/components/messages/unsubscribe'
64
+
65
+ operations:
66
+ receivePing:
67
+ action: receive
68
+ channel:
69
+ $ref: '#/channels/ping'
70
+ reply:
71
+ channel:
72
+ $ref: '#/channels/pong'
73
+ heartbeat:
74
+ action: send
75
+ channel:
76
+ $ref: '#/channels/heartbeat'
77
+ systemStatus:
78
+ action: send
79
+ channel:
80
+ $ref: '#/channels/systemStatus'
81
+ subscribe:
82
+ action: receive
83
+ channel:
84
+ $ref: '#/channels/subscribe'
85
+ reply:
86
+ channel:
87
+ $ref: '#/channels/currencyInfo'
88
+ unsubscribe:
89
+ action: receive
90
+ channel:
91
+ $ref: '#/channels/unsubscribe'
92
+ reply:
93
+ channel:
94
+ $ref: '#/channels/currencyInfo'
95
+ messages:
96
+ - $ref: '#/channels/currencyInfo/messages/subscriptionStatus'
97
+
98
+
99
+ components:
100
+ messages:
101
+ dummyCurrencyInfo:
102
+ summary: Dummy message with no real life details
103
+ description: It is here in this example to showcase that there is an additional message that normally is of a complex structure. It represents actually currency exchange value to show a reply to operation receiveSubscribeRequest with more than one possible message.
104
+ payload:
105
+ type: object
106
+ properties:
107
+ event:
108
+ type: string
109
+ const: currencyInfo
110
+ reqid:
111
+ $ref: '#/components/schemas/reqid'
112
+ data:
113
+ type: object
114
+ required:
115
+ - event
116
+ correlationId:
117
+ location: '$message.payload#/reqid'
118
+ ping:
119
+ summary: Ping server to determine whether connection is alive
120
+ description: Client can ping server to determine whether connection is alive, server responds with pong. This is an application level ping as opposed to default ping in websockets standard which is server initiated
121
+ payload:
122
+ $ref: '#/components/schemas/ping'
123
+ correlationId:
124
+ location: $message.payload#/reqid
125
+
126
+ pong:
127
+ summary: Pong is a response to ping message
128
+ description: Server pong response to a ping to determine whether connection is alive. This is an application level pong as opposed to default pong in websockets standard which is sent by client in response to a ping
129
+ payload:
130
+ $ref: '#/components/schemas/pong'
131
+ correlationId:
132
+ location: $message.payload#/reqid
133
+
134
+ subscribe:
135
+ description: Subscribe to a topic on a single or multiple currency pairs.
136
+ payload:
137
+ $ref: '#/components/schemas/subscribe'
138
+ correlationId:
139
+ location: $message.payload#/reqid
140
+ unsubscribe:
141
+ description: Unsubscribe, can specify a channelID or multiple currency pairs.
142
+ payload:
143
+ $ref: '#/components/schemas/unsubscribe'
144
+ correlationId:
145
+ location: $message.payload#/reqid
146
+ subscriptionStatus:
147
+ description: Subscription status response to subscribe, unsubscribe or exchange initiated unsubscribe.
148
+ payload:
149
+ $ref: '#/components/schemas/subscriptionStatus'
150
+ examples:
151
+ - payload:
152
+ channelID: 10001
153
+ channelName: ohlc-5
154
+ event: subscriptionStatus
155
+ pair: XBT/EUR
156
+ reqid: 42
157
+ status: unsubscribed
158
+ subscription:
159
+ interval: 5
160
+ name: ohlc
161
+ - payload:
162
+ errorMessage: Subscription depth not supported
163
+ event: subscriptionStatus
164
+ pair: XBT/USD
165
+ status: error
166
+ subscription:
167
+ depth: 42
168
+ name: book
169
+
170
+ systemStatus:
171
+ description: Status sent on connection or system status changes.
172
+ payload:
173
+ $ref: '#/components/schemas/systemStatus'
174
+
175
+ heartbeat:
176
+ description: Server heartbeat sent if no subscription traffic within 1 second (approximately)
177
+ payload:
178
+ $ref: '#/components/schemas/heartbeat'
179
+
180
+
181
+ schemas:
182
+ ping:
183
+ type: object
184
+ properties:
185
+ event:
186
+ type: string
187
+ const: ping
188
+ reqid:
189
+ $ref: '#/components/schemas/reqid'
190
+ required:
191
+ - event
192
+ heartbeat:
193
+ type: object
194
+ properties:
195
+ event:
196
+ type: string
197
+ const: heartbeat
198
+ pong:
199
+ type: object
200
+ properties:
201
+ event:
202
+ type: string
203
+ const: pong
204
+ reqid:
205
+ $ref: '#/components/schemas/reqid'
206
+ systemStatus:
207
+ type: object
208
+ properties:
209
+ event:
210
+ type: string
211
+ const: systemStatus
212
+ connectionID:
213
+ type: integer
214
+ description: The ID of the connection
215
+ status:
216
+ $ref: '#/components/schemas/status'
217
+ version:
218
+ type: string
219
+ status:
220
+ type: string
221
+ enum:
222
+ - online
223
+ - maintenance
224
+ - cancel_only
225
+ - limit_only
226
+ - post_only
227
+ subscribe:
228
+ type: object
229
+ properties:
230
+ event:
231
+ type: string
232
+ const: subscribe
233
+ reqid:
234
+ $ref: '#/components/schemas/reqid'
235
+ pair:
236
+ $ref: '#/components/schemas/pair'
237
+ subscription:
238
+ type: object
239
+ properties:
240
+ depth:
241
+ $ref: '#/components/schemas/depth'
242
+ interval:
243
+ $ref: '#/components/schemas/interval'
244
+ name:
245
+ $ref: '#/components/schemas/name'
246
+ ratecounter:
247
+ $ref: '#/components/schemas/ratecounter'
248
+ snapshot:
249
+ $ref: '#/components/schemas/snapshot'
250
+ token:
251
+ $ref: '#/components/schemas/token'
252
+ required:
253
+ - name
254
+ required:
255
+ - event
256
+ unsubscribe:
257
+ type: object
258
+ properties:
259
+ event:
260
+ type: string
261
+ const: unsubscribe
262
+ reqid:
263
+ $ref: '#/components/schemas/reqid'
264
+ pair:
265
+ $ref: '#/components/schemas/pair'
266
+ subscription:
267
+ type: object
268
+ properties:
269
+ depth:
270
+ $ref: '#/components/schemas/depth'
271
+ interval:
272
+ $ref: '#/components/schemas/interval'
273
+ name:
274
+ $ref: '#/components/schemas/name'
275
+ token:
276
+ $ref: '#/components/schemas/token'
277
+ required:
278
+ - name
279
+ required:
280
+ - event
281
+ subscriptionStatus:
282
+ type: object
283
+ oneOf:
284
+ - $ref: '#/components/schemas/subscriptionStatusError'
285
+ - $ref: '#/components/schemas/subscriptionStatusSuccess'
286
+ subscriptionStatusError:
287
+ allOf:
288
+ - properties:
289
+ errorMessage:
290
+ type: string
291
+ required:
292
+ - errorMessage
293
+ - $ref: '#/components/schemas/subscriptionStatusCommon'
294
+ subscriptionStatusSuccess:
295
+ allOf:
296
+ - properties:
297
+ channelID:
298
+ type: integer
299
+ description: ChannelID on successful subscription, applicable to public messages only.
300
+ channelName:
301
+ type: string
302
+ description: Channel Name on successful subscription. For payloads 'ohlc' and 'book', respective interval or depth will be added as suffix.
303
+ required:
304
+ - channelID
305
+ - channelName
306
+ - $ref: '#/components/schemas/subscriptionStatusCommon'
307
+ subscriptionStatusCommon:
308
+ type: object
309
+ required:
310
+ - event
311
+ properties:
312
+ event:
313
+ type: string
314
+ const: subscriptionStatus
315
+ reqid:
316
+ $ref: '#/components/schemas/reqid'
317
+ pair:
318
+ $ref: '#/components/schemas/pair'
319
+ status:
320
+ $ref: '#/components/schemas/status'
321
+ subscription:
322
+ required:
323
+ - name
324
+ type: object
325
+ properties:
326
+ depth:
327
+ $ref: '#/components/schemas/depth'
328
+ interval:
329
+ $ref: '#/components/schemas/interval'
330
+ maxratecount:
331
+ $ref: '#/components/schemas/maxratecount'
332
+ name:
333
+ $ref: '#/components/schemas/name'
334
+ token:
335
+ $ref: '#/components/schemas/token'
336
+ interval:
337
+ type: integer
338
+ description: Time interval associated with ohlc subscription in minutes.
339
+ default: 1
340
+ enum:
341
+ - 1
342
+ - 5
343
+ - 15
344
+ - 30
345
+ - 60
346
+ - 240
347
+ - 1440
348
+ - 10080
349
+ - 21600
350
+ name:
351
+ type: string
352
+ description: The name of the channel you subscribe too.
353
+ enum:
354
+ - book
355
+ - ohlc
356
+ - openOrders
357
+ - ownTrades
358
+ - spread
359
+ - ticker
360
+ - trade
361
+ token:
362
+ type: string
363
+ description: base64-encoded authentication token for private-data endpoints.
364
+ depth:
365
+ type: integer
366
+ default: 10
367
+ enum:
368
+ - 10
369
+ - 25
370
+ - 100
371
+ - 500
372
+ - 1000
373
+ description: Depth associated with book subscription in number of levels each side.
374
+ maxratecount:
375
+ type: integer
376
+ description: Max rate-limit budget. Compare to the ratecounter field in the openOrders updates to check whether you are approaching the rate limit.
377
+ ratecounter:
378
+ type: boolean
379
+ default: false
380
+ description: Whether to send rate-limit counter in updates (supported only for openOrders subscriptions)
381
+ snapshot:
382
+ type: boolean
383
+ default: true
384
+ description: Whether to send historical feed data snapshot upon subscription (supported only for ownTrades subscriptions)
385
+ reqid:
386
+ type: integer
387
+ description: client originated ID reflected in response message.
388
+ pair:
389
+ type: array
390
+ description: Array of currency pairs.
391
+ items:
392
+ type: string
393
+ description: Format of each pair is "A/B", where A and B are ISO 4217-A3 for standardized assets and popular unique symbol if not standardized.
394
+ pattern: '[A-Z\s]+\/[A-Z\s]+'
@@ -0,0 +1,58 @@
1
+ asyncapi: 3.0.0
2
+ info:
3
+ title: Mercure Hub Example
4
+ version: 1.0.0
5
+ description: This example demonstrates how to define a Mercure hub.
6
+ defaultContentType: application/ld+json
7
+ servers:
8
+ production:
9
+ host: demo.mercure.rocks
10
+ pathname: /.well-known/mercure
11
+ protocol: mercure
12
+ channels:
13
+ books:
14
+ address: 'https://example.com/books/{id}'
15
+ messages:
16
+ book:
17
+ $ref: '#/components/messages/book'
18
+ description: >-
19
+ Every time a resource of type `http://schema.org/Book` is created or
20
+ modified, a JSON-LD representation of the new version of this resource
21
+ must be pushed in this Mercure topic.
22
+ parameters:
23
+ id:
24
+ description: ID of the book
25
+ operations:
26
+ ReceiveBooksInfo:
27
+ action: receive
28
+ channel:
29
+ $ref: '#/channels/books'
30
+ messages:
31
+ - $ref: '#/channels/books/messages/book'
32
+ SendBooksInfo:
33
+ action: send
34
+ channel:
35
+ $ref: '#/channels/books'
36
+ messages:
37
+ - $ref: '#/channels/books/messages/book'
38
+ components:
39
+ messages:
40
+ book:
41
+ summary: The content of a book resource.
42
+ externalDocs:
43
+ url: 'https://schema.org/Book'
44
+ payload:
45
+ type: object
46
+ properties:
47
+ '@id':
48
+ type: string
49
+ format: iri-reference
50
+ '@type':
51
+ type: string
52
+ format: iri-reference
53
+ name:
54
+ type: string
55
+ isbn:
56
+ type: string
57
+ abstract:
58
+ type: string
@@ -0,0 +1,29 @@
1
+ asyncapi: 3.0.0
2
+ info:
3
+ title: Not example
4
+ version: 1.0.0
5
+ channels:
6
+ test:
7
+ address: test
8
+ messages:
9
+ testMessages:
10
+ $ref: '#/components/messages/testMessages'
11
+ operations:
12
+ onTestMsg:
13
+ action: receive
14
+ channel:
15
+ $ref: '#/channels/test'
16
+ messages:
17
+ - $ref: '#/channels/test/messages/testMessages'
18
+ components:
19
+ messages:
20
+ testMessages:
21
+ payload:
22
+ $ref: '#/components/schemas/testSchema'
23
+ schemas:
24
+ testSchema:
25
+ type: object
26
+ properties:
27
+ key:
28
+ not:
29
+ type: integer
@@ -0,0 +1,57 @@
1
+ asyncapi: 3.0.0
2
+ info:
3
+ title: OneOf example
4
+ version: 1.0.0
5
+ channels:
6
+ test:
7
+ address: test
8
+ messages:
9
+ testMessages:
10
+ $ref: '#/components/messages/testMessages'
11
+ test2:
12
+ address: test2
13
+ messages:
14
+ objectWithKey:
15
+ payload:
16
+ $ref: '#/components/schemas/objectWithKey'
17
+ objectWithKey2:
18
+ payload:
19
+ $ref: '#/components/schemas/objectWithKey2'
20
+ operations:
21
+ onTestMsg:
22
+ action: receive
23
+ channel:
24
+ $ref: '#/channels/test'
25
+ messages:
26
+ - $ref: '#/channels/test/messages/testMessages'
27
+ sendTest:
28
+ action: send
29
+ channel:
30
+ $ref: '#/channels/test2'
31
+ messages:
32
+ - $ref: '#/channels/test2/messages/objectWithKey'
33
+ - $ref: '#/channels/test2/messages/objectWithKey2'
34
+ components:
35
+ messages:
36
+ testMessages:
37
+ payload:
38
+ oneOf:
39
+ - $ref: '#/components/schemas/objectWithKey'
40
+ - $ref: '#/components/schemas/objectWithKey2'
41
+ testMessage1:
42
+ payload:
43
+ $ref: '#/components/schemas/objectWithKey'
44
+ testMessage2:
45
+ payload:
46
+ $ref: '#/components/schemas/objectWithKey2'
47
+ schemas:
48
+ objectWithKey:
49
+ type: object
50
+ properties:
51
+ key:
52
+ type: string
53
+ objectWithKey2:
54
+ type: object
55
+ properties:
56
+ key2:
57
+ type: string
@@ -0,0 +1,117 @@
1
+ asyncapi: 3.0.0
2
+ info:
3
+ title: Notifications
4
+ version: 1.0.0
5
+ description: >-
6
+ This contract defines HTTP Push notification for application authorization
7
+ revocation topic
8
+ channels:
9
+ authRevoke:
10
+ address: AUTHORIZATION_REVOCATION
11
+ messages:
12
+ message:
13
+ $ref: '#/components/messages/message'
14
+ operations:
15
+ sendAuthRevoke:
16
+ action: send
17
+ channel:
18
+ $ref: '#/channels/authRevoke'
19
+ security:
20
+ - type: oauth2
21
+ description: The oauth security descriptions
22
+ flows:
23
+ clientCredentials:
24
+ tokenUrl: 'https://example.com/api/oauth/dialog'
25
+ availableScopes:
26
+ 'subscribe:auth_revocations': Scope required for authorization revocation topic
27
+ scopes:
28
+ - 'subscribe:auth_revocations'
29
+ bindings:
30
+ http:
31
+ method: POST
32
+ messages:
33
+ - $ref: '#/channels/authRevoke/messages/message'
34
+ components:
35
+ messages:
36
+ message:
37
+ headers:
38
+ type: object
39
+ properties:
40
+ X-SIGNATURE:
41
+ description: ECC message signature
42
+ type: string
43
+ Content-Type:
44
+ type: string
45
+ enum:
46
+ - application/json
47
+ payload:
48
+ type: object
49
+ properties:
50
+ metadata:
51
+ $ref: '#/components/schemas/MetaData'
52
+ notification:
53
+ $ref: '#/components/schemas/Notification'
54
+ schemas:
55
+ MetaData:
56
+ type: object
57
+ properties:
58
+ topic:
59
+ type: string
60
+ description: Topic subscribed to.
61
+ schemaVersion:
62
+ type: string
63
+ description: The schema for this topic.
64
+ deprecated:
65
+ type: boolean
66
+ description: If this is a deprecated schema or topic.
67
+ default: 'false'
68
+ Notification:
69
+ type: object
70
+ properties:
71
+ notificationId:
72
+ type: string
73
+ description: The notification Id.
74
+ eventDate:
75
+ type: string
76
+ description: The event date associated with this notification in UTC.
77
+ publishDate:
78
+ type: string
79
+ description: The message publish date in UTC.
80
+ publishAttemptCount:
81
+ type: integer
82
+ description: The number of attempts made to publish this message.
83
+ data:
84
+ $ref: '#/components/schemas/AuthorizationRevocationData'
85
+ AuthorizationRevocationData:
86
+ type: object
87
+ description: The Authorization Revocation payload.
88
+ properties:
89
+ username:
90
+ type: string
91
+ description: The username for the user.
92
+ userId:
93
+ type: string
94
+ description: The immutable public userId for the user
95
+ eiasToken:
96
+ type: string
97
+ description: The legacy eiasToken specific to the user
98
+ revokeReason:
99
+ type: string
100
+ enum:
101
+ - REVOKED_BY_APP
102
+ - REVOKED_BY_USER
103
+ - REVOKED_BY_ADMIN
104
+ - PASSWORD_CHANGE
105
+ description: The reason for authorization revocation
106
+ revocationDate:
107
+ type: string
108
+ description: Date and time when the authorization was revoked
109
+ securitySchemes:
110
+ petstore_auth:
111
+ type: oauth2
112
+ description: The oauth security descriptions
113
+ flows:
114
+ clientCredentials:
115
+ tokenUrl: 'https://example.com/api/oauth/dialog'
116
+ availableScopes:
117
+ 'subscribe:auth_revocations': Scope required for authorization revocation topic