@asyncapi/cli 1.2.10 → 1.2.13

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 (34) hide show
  1. package/assets/create-glee-app/templates/default/asyncapi.yaml +14 -12
  2. package/assets/create-glee-app/templates/default/package-lock.json +57 -57
  3. package/assets/create-glee-app/templates/default/package.json +1 -1
  4. package/assets/examples/adeo-kafka-request-reply-asyncapi.yml +288 -0
  5. package/assets/examples/anyof-asyncapi.yml +36 -0
  6. package/assets/examples/{application-headers.yml → application-headers-asyncapi.yml} +29 -26
  7. package/assets/examples/{correlation-id.yml → correlation-id-asyncapi.yml} +80 -44
  8. package/assets/examples/examples.json +28 -16
  9. package/assets/examples/gitter-streaming-asyncapi.yml +178 -0
  10. package/assets/examples/kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml +388 -0
  11. package/assets/examples/kraken-websocket-request-reply-multiple-channels-asyncapi.yml +394 -0
  12. package/assets/examples/mercure-asyncapi.yml +58 -0
  13. package/assets/examples/not-asyncapi.yml +29 -0
  14. package/assets/examples/oneof-asyncapi.yml +57 -0
  15. package/assets/examples/{operation-security.yml → operation-security-asyncapi.yml} +32 -21
  16. package/assets/examples/{rpc-client.yml → rpc-client-asyncapi.yml} +41 -38
  17. package/assets/examples/{rpc-server.yml → rpc-server-asyncapi.yml} +38 -35
  18. package/assets/examples/{simple.yml → simple-asyncapi.yml} +13 -5
  19. package/assets/examples/{slack-rtm.yml → slack-rtm-asyncapi.yml} +207 -109
  20. package/assets/examples/streetlights-kafka-asyncapi.yml +199 -0
  21. package/assets/examples/streetlights-mqtt-asyncapi.yml +253 -0
  22. package/assets/examples/streetlights-operation-security-asyncapi.yml +240 -0
  23. package/assets/examples/websocket-gemini-asyncapi.yml +301 -0
  24. package/oclif.manifest.json +3 -3
  25. package/package.json +4 -4
  26. package/assets/examples/anyof.yml +0 -31
  27. package/assets/examples/gitter-streaming.yml +0 -168
  28. package/assets/examples/mercure.yml +0 -49
  29. package/assets/examples/not.yml +0 -24
  30. package/assets/examples/oneof.yml +0 -46
  31. package/assets/examples/streetlights-kafka.yml +0 -188
  32. package/assets/examples/streetlights-mqtt.yml +0 -216
  33. package/assets/examples/streetlights-operation-security.yml +0 -212
  34. package/assets/examples/websocket-gemini.yml +0 -209
@@ -0,0 +1,388 @@
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
+ currencyExchange:
23
+ address: /
24
+ messages:
25
+ ping:
26
+ $ref: '#/components/messages/ping'
27
+ pong:
28
+ $ref: '#/components/messages/pong'
29
+ heartbeat:
30
+ $ref: '#/components/messages/heartbeat'
31
+ systemStatus:
32
+ $ref: '#/components/messages/systemStatus'
33
+ subscriptionStatus:
34
+ $ref: '#/components/messages/subscriptionStatus'
35
+ subscribe:
36
+ $ref: '#/components/messages/subscribe'
37
+ unsubscribe:
38
+ $ref: '#/components/messages/unsubscribe'
39
+ dummyCurrencyInfo:
40
+ $ref: '#/components/messages/dummyCurrencyInfo'
41
+
42
+
43
+ operations:
44
+ receivePing:
45
+ action: receive
46
+ channel:
47
+ $ref: '#/channels/currencyExchange'
48
+ reply:
49
+ channel:
50
+ $ref: '#/channels/currencyExchange'
51
+ messages:
52
+ - $ref: '#/channels/currencyExchange/messages/pong'
53
+ messages:
54
+ - $ref: '#/channels/currencyExchange/messages/ping'
55
+ sendHeartbeat:
56
+ action: send
57
+ channel:
58
+ $ref: '#/channels/currencyExchange'
59
+ messages:
60
+ - $ref: '#/channels/currencyExchange/messages/heartbeat'
61
+ systemStatus:
62
+ action: send
63
+ channel:
64
+ $ref: '#/channels/currencyExchange'
65
+ messages:
66
+ - $ref: '#/channels/currencyExchange/messages/systemStatus'
67
+ receiveSubscribeRequest:
68
+ action: receive
69
+ channel:
70
+ $ref: '#/channels/currencyExchange'
71
+ reply:
72
+ channel:
73
+ $ref: '#/channels/currencyExchange'
74
+ messages:
75
+ - $ref: '#/channels/currencyExchange/messages/subscriptionStatus'
76
+ - $ref: '#/channels/currencyExchange/messages/dummyCurrencyInfo'
77
+ messages:
78
+ - $ref: '#/channels/currencyExchange/messages/subscribe'
79
+ receiveUnsubscribeRequest:
80
+ action: receive
81
+ channel:
82
+ $ref: '#/channels/currencyExchange'
83
+ reply:
84
+ channel:
85
+ $ref: '#/channels/currencyExchange'
86
+ messages:
87
+ - $ref: '#/channels/currencyExchange/messages/subscriptionStatus'
88
+ messages:
89
+ - $ref: '#/channels/currencyExchange/messages/unsubscribe'
90
+
91
+
92
+ components:
93
+ messages:
94
+ dummyCurrencyInfo:
95
+ summary: Dummy message with no real life details
96
+ 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.
97
+ payload:
98
+ type: object
99
+ properties:
100
+ event:
101
+ type: string
102
+ const: currencyInfo
103
+ reqid:
104
+ $ref: '#/components/schemas/reqid'
105
+ data:
106
+ type: object
107
+ required:
108
+ - event
109
+ correlationId:
110
+ location: '$message.payload#/reqid'
111
+
112
+ ping:
113
+ summary: Ping server to determine whether connection is alive
114
+ 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
115
+ payload:
116
+ $ref: '#/components/schemas/ping'
117
+ correlationId:
118
+ location: '$message.payload#/reqid'
119
+
120
+ pong:
121
+ summary: Pong is a response to ping message
122
+ 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
123
+ payload:
124
+ $ref: '#/components/schemas/pong'
125
+ correlationId:
126
+ location: '$message.payload#/reqid'
127
+
128
+ subscribe:
129
+ description: Subscribe to a topic on a single or multiple currency pairs.
130
+ payload:
131
+ $ref: '#/components/schemas/subscribe'
132
+ correlationId:
133
+ location: '$message.payload#/reqid'
134
+ unsubscribe:
135
+ description: Unsubscribe, can specify a channelID or multiple currency pairs.
136
+ payload:
137
+ $ref: '#/components/schemas/unsubscribe'
138
+ correlationId:
139
+ location: '$message.payload#/reqid'
140
+ subscriptionStatus:
141
+ description: Subscription status response to subscribe, unsubscribe or exchange initiated unsubscribe.
142
+ payload:
143
+ $ref: '#/components/schemas/subscriptionStatus'
144
+ examples:
145
+ - payload:
146
+ channelID: 10001
147
+ channelName: ohlc-5
148
+ event: subscriptionStatus
149
+ pair: XBT/EUR
150
+ reqid: 42
151
+ status: unsubscribed
152
+ subscription:
153
+ interval: 5
154
+ name: ohlc
155
+ - payload:
156
+ errorMessage: Subscription depth not supported
157
+ event: subscriptionStatus
158
+ pair: XBT/USD
159
+ status: error
160
+ subscription:
161
+ depth: 42
162
+ name: book
163
+
164
+ systemStatus:
165
+ description: Status sent on connection or system status changes.
166
+ payload:
167
+ $ref: '#/components/schemas/systemStatus'
168
+
169
+ heartbeat:
170
+ description: Server heartbeat sent if no subscription traffic within 1 second (approximately)
171
+ payload:
172
+ $ref: '#/components/schemas/heartbeat'
173
+
174
+
175
+ schemas:
176
+ ping:
177
+ type: object
178
+ properties:
179
+ event:
180
+ type: string
181
+ const: ping
182
+ reqid:
183
+ $ref: '#/components/schemas/reqid'
184
+ required:
185
+ - event
186
+ heartbeat:
187
+ type: object
188
+ properties:
189
+ event:
190
+ type: string
191
+ const: heartbeat
192
+ pong:
193
+ type: object
194
+ properties:
195
+ event:
196
+ type: string
197
+ const: pong
198
+ reqid:
199
+ $ref: '#/components/schemas/reqid'
200
+ systemStatus:
201
+ type: object
202
+ properties:
203
+ event:
204
+ type: string
205
+ const: systemStatus
206
+ connectionID:
207
+ type: integer
208
+ description: The ID of the connection
209
+ status:
210
+ $ref: '#/components/schemas/status'
211
+ version:
212
+ type: string
213
+ status:
214
+ type: string
215
+ enum:
216
+ - online
217
+ - maintenance
218
+ - cancel_only
219
+ - limit_only
220
+ - post_only
221
+ subscribe:
222
+ type: object
223
+ properties:
224
+ event:
225
+ type: string
226
+ const: subscribe
227
+ reqid:
228
+ $ref: '#/components/schemas/reqid'
229
+ pair:
230
+ $ref: '#/components/schemas/pair'
231
+ subscription:
232
+ type: object
233
+ properties:
234
+ depth:
235
+ $ref: '#/components/schemas/depth'
236
+ interval:
237
+ $ref: '#/components/schemas/interval'
238
+ name:
239
+ $ref: '#/components/schemas/name'
240
+ ratecounter:
241
+ $ref: '#/components/schemas/ratecounter'
242
+ snapshot:
243
+ $ref: '#/components/schemas/snapshot'
244
+ token:
245
+ $ref: '#/components/schemas/token'
246
+ required:
247
+ - name
248
+ required:
249
+ - event
250
+ unsubscribe:
251
+ type: object
252
+ properties:
253
+ event:
254
+ type: string
255
+ const: unsubscribe
256
+ reqid:
257
+ $ref: '#/components/schemas/reqid'
258
+ pair:
259
+ $ref: '#/components/schemas/pair'
260
+ subscription:
261
+ type: object
262
+ properties:
263
+ depth:
264
+ $ref: '#/components/schemas/depth'
265
+ interval:
266
+ $ref: '#/components/schemas/interval'
267
+ name:
268
+ $ref: '#/components/schemas/name'
269
+ token:
270
+ $ref: '#/components/schemas/token'
271
+ required:
272
+ - name
273
+ required:
274
+ - event
275
+ subscriptionStatus:
276
+ type: object
277
+ oneOf:
278
+ - $ref: '#/components/schemas/subscriptionStatusError'
279
+ - $ref: '#/components/schemas/subscriptionStatusSuccess'
280
+ subscriptionStatusError:
281
+ allOf:
282
+ - properties:
283
+ errorMessage:
284
+ type: string
285
+ required:
286
+ - errorMessage
287
+ - $ref: '#/components/schemas/subscriptionStatusCommon'
288
+ subscriptionStatusSuccess:
289
+ allOf:
290
+ - properties:
291
+ channelID:
292
+ type: integer
293
+ description: ChannelID on successful subscription, applicable to public messages only.
294
+ channelName:
295
+ type: string
296
+ description: Channel Name on successful subscription. For payloads 'ohlc' and 'book', respective interval or depth will be added as suffix.
297
+ required:
298
+ - channelID
299
+ - channelName
300
+ - $ref: '#/components/schemas/subscriptionStatusCommon'
301
+ subscriptionStatusCommon:
302
+ type: object
303
+ required:
304
+ - event
305
+ properties:
306
+ event:
307
+ type: string
308
+ const: subscriptionStatus
309
+ reqid:
310
+ $ref: '#/components/schemas/reqid'
311
+ pair:
312
+ $ref: '#/components/schemas/pair'
313
+ status:
314
+ $ref: '#/components/schemas/status'
315
+ subscription:
316
+ required:
317
+ - name
318
+ type: object
319
+ properties:
320
+ depth:
321
+ $ref: '#/components/schemas/depth'
322
+ interval:
323
+ $ref: '#/components/schemas/interval'
324
+ maxratecount:
325
+ $ref: '#/components/schemas/maxratecount'
326
+ name:
327
+ $ref: '#/components/schemas/name'
328
+ token:
329
+ $ref: '#/components/schemas/token'
330
+ interval:
331
+ type: integer
332
+ description: Time interval associated with ohlc subscription in minutes.
333
+ default: 1
334
+ enum:
335
+ - 1
336
+ - 5
337
+ - 15
338
+ - 30
339
+ - 60
340
+ - 240
341
+ - 1440
342
+ - 10080
343
+ - 21600
344
+ name:
345
+ type: string
346
+ description: The name of the channel you subscribe too.
347
+ enum:
348
+ - book
349
+ - ohlc
350
+ - openOrders
351
+ - ownTrades
352
+ - spread
353
+ - ticker
354
+ - trade
355
+ token:
356
+ type: string
357
+ description: base64-encoded authentication token for private-data endpoints.
358
+ depth:
359
+ type: integer
360
+ default: 10
361
+ enum:
362
+ - 10
363
+ - 25
364
+ - 100
365
+ - 500
366
+ - 1000
367
+ description: Depth associated with book subscription in number of levels each side.
368
+ maxratecount:
369
+ type: integer
370
+ description: Max rate-limit budget. Compare to the ratecounter field in the openOrders updates to check whether you are approaching the rate limit.
371
+ ratecounter:
372
+ type: boolean
373
+ default: false
374
+ description: Whether to send rate-limit counter in updates (supported only for openOrders subscriptions)
375
+ snapshot:
376
+ type: boolean
377
+ default: true
378
+ description: Whether to send historical feed data snapshot upon subscription (supported only for ownTrades subscriptions)
379
+ reqid:
380
+ type: integer
381
+ description: client originated ID reflected in response message.
382
+ pair:
383
+ type: array
384
+ description: Array of currency pairs.
385
+ items:
386
+ type: string
387
+ 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.
388
+ pattern: '[A-Z\s]+\/[A-Z\s]+'