@open-rlb/nestjs-amqp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/README.md +300 -0
  2. package/amqp-lib/amqp/connection.d.ts +51 -0
  3. package/amqp-lib/amqp/connection.js +503 -0
  4. package/amqp-lib/amqp/connection.js.map +1 -0
  5. package/amqp-lib/amqp/errorBehaviors.d.ts +9 -0
  6. package/amqp-lib/amqp/errorBehaviors.js +47 -0
  7. package/amqp-lib/amqp/errorBehaviors.js.map +1 -0
  8. package/amqp-lib/amqp/utils.d.ts +7 -0
  9. package/amqp-lib/amqp/utils.js +110 -0
  10. package/amqp-lib/amqp/utils.js.map +1 -0
  11. package/amqp-lib/config/rabbitmq-exchange.config.d.ts +13 -0
  12. package/amqp-lib/config/rabbitmq-exchange.config.js +3 -0
  13. package/amqp-lib/config/rabbitmq-exchange.config.js.map +1 -0
  14. package/amqp-lib/config/rabbitmq-queue.config.d.ts +25 -0
  15. package/amqp-lib/config/rabbitmq-queue.config.js +3 -0
  16. package/amqp-lib/config/rabbitmq-queue.config.js.map +1 -0
  17. package/amqp-lib/config/rabbitmq.config.d.ts +49 -0
  18. package/amqp-lib/config/rabbitmq.config.js +3 -0
  19. package/amqp-lib/config/rabbitmq.config.js.map +1 -0
  20. package/amqp-lib/index.d.ts +4 -0
  21. package/amqp-lib/index.js +21 -0
  22. package/amqp-lib/index.js.map +1 -0
  23. package/amqp-lib/models/correlation-message.model.d.ts +5 -0
  24. package/amqp-lib/models/correlation-message.model.js +3 -0
  25. package/amqp-lib/models/correlation-message.model.js.map +1 -0
  26. package/amqp-lib/models/errors.model.d.ts +15 -0
  27. package/amqp-lib/models/errors.model.js +35 -0
  28. package/amqp-lib/models/errors.model.js.map +1 -0
  29. package/amqp-lib/models/nack.model.d.ts +5 -0
  30. package/amqp-lib/models/nack.model.js +13 -0
  31. package/amqp-lib/models/nack.model.js.map +1 -0
  32. package/amqp-lib/models/rabbitmq-handler.model.d.ts +38 -0
  33. package/amqp-lib/models/rabbitmq-handler.model.js +3 -0
  34. package/amqp-lib/models/rabbitmq-handler.model.js.map +1 -0
  35. package/amqp-lib/models/subscription-result.model.d.ts +4 -0
  36. package/amqp-lib/models/subscription-result.model.js +3 -0
  37. package/amqp-lib/models/subscription-result.model.js.map +1 -0
  38. package/amqp-lib/types.d.ts +45 -0
  39. package/amqp-lib/types.js +11 -0
  40. package/amqp-lib/types.js.map +1 -0
  41. package/amqp.module.d.ts +2 -0
  42. package/amqp.module.js +29 -0
  43. package/amqp.module.js.map +1 -0
  44. package/index.d.ts +4 -0
  45. package/index.js +21 -0
  46. package/index.js.map +1 -0
  47. package/modules/broker/broker.module.d.ts +27 -0
  48. package/modules/broker/broker.module.js +132 -0
  49. package/modules/broker/broker.module.js.map +1 -0
  50. package/modules/broker/config/broker.config.d.ts +3 -0
  51. package/modules/broker/config/broker.config.js +3 -0
  52. package/modules/broker/config/broker.config.js.map +1 -0
  53. package/modules/broker/config/handler-auth.config.d.ts +22 -0
  54. package/modules/broker/config/handler-auth.config.js +3 -0
  55. package/modules/broker/config/handler-auth.config.js.map +1 -0
  56. package/modules/broker/config/topics.config.d.ts +8 -0
  57. package/modules/broker/config/topics.config.js +3 -0
  58. package/modules/broker/config/topics.config.js.map +1 -0
  59. package/modules/broker/const.d.ts +9 -0
  60. package/modules/broker/const.js +13 -0
  61. package/modules/broker/const.js.map +1 -0
  62. package/modules/broker/data/events/messages.d.ts +29 -0
  63. package/modules/broker/data/events/messages.js +3 -0
  64. package/modules/broker/data/events/messages.js.map +1 -0
  65. package/modules/broker/decorators/broker-action.decorator.d.ts +8 -0
  66. package/modules/broker/decorators/broker-action.decorator.js +66 -0
  67. package/modules/broker/decorators/broker-action.decorator.js.map +1 -0
  68. package/modules/broker/decorators/index.d.ts +1 -0
  69. package/modules/broker/decorators/index.js +18 -0
  70. package/modules/broker/decorators/index.js.map +1 -0
  71. package/modules/broker/index.d.ts +9 -0
  72. package/modules/broker/index.js +26 -0
  73. package/modules/broker/index.js.map +1 -0
  74. package/modules/broker/pipes/boolean.pipe.d.ts +4 -0
  75. package/modules/broker/pipes/boolean.pipe.js +23 -0
  76. package/modules/broker/pipes/boolean.pipe.js.map +1 -0
  77. package/modules/broker/pipes/index.d.ts +2 -0
  78. package/modules/broker/pipes/index.js +19 -0
  79. package/modules/broker/pipes/index.js.map +1 -0
  80. package/modules/broker/pipes/number.pipe.d.ts +4 -0
  81. package/modules/broker/pipes/number.pipe.js +10 -0
  82. package/modules/broker/pipes/number.pipe.js.map +1 -0
  83. package/modules/broker/services/auto-discovery.service.d.ts +6 -0
  84. package/modules/broker/services/auto-discovery.service.js +28 -0
  85. package/modules/broker/services/auto-discovery.service.js.map +1 -0
  86. package/modules/broker/services/broker.service.d.ts +31 -0
  87. package/modules/broker/services/broker.service.js +323 -0
  88. package/modules/broker/services/broker.service.js.map +1 -0
  89. package/modules/broker/services/handler-registry.service.d.ts +12 -0
  90. package/modules/broker/services/handler-registry.service.js +58 -0
  91. package/modules/broker/services/handler-registry.service.js.map +1 -0
  92. package/modules/broker/services/metadata-scanner.service.d.ts +23 -0
  93. package/modules/broker/services/metadata-scanner.service.js +238 -0
  94. package/modules/broker/services/metadata-scanner.service.js.map +1 -0
  95. package/modules/broker/services/reflect.service.d.ts +22 -0
  96. package/modules/broker/services/reflect.service.js +195 -0
  97. package/modules/broker/services/reflect.service.js.map +1 -0
  98. package/modules/broker/services/utils.service.d.ts +8 -0
  99. package/modules/broker/services/utils.service.js +28 -0
  100. package/modules/broker/services/utils.service.js.map +1 -0
  101. package/modules/proxy/config/path-definition.config.d.ts +51 -0
  102. package/modules/proxy/config/path-definition.config.js +3 -0
  103. package/modules/proxy/config/path-definition.config.js.map +1 -0
  104. package/modules/proxy/index.d.ts +7 -0
  105. package/modules/proxy/index.js +20 -0
  106. package/modules/proxy/index.js.map +1 -0
  107. package/modules/proxy/proxy.module.d.ts +4 -0
  108. package/modules/proxy/proxy.module.js +38 -0
  109. package/modules/proxy/proxy.module.js.map +1 -0
  110. package/modules/proxy/services/acl.service.d.ts +4 -0
  111. package/modules/proxy/services/acl.service.js +5 -0
  112. package/modules/proxy/services/acl.service.js.map +1 -0
  113. package/modules/proxy/services/http-auth-handler.service.d.ts +19 -0
  114. package/modules/proxy/services/http-auth-handler.service.js +146 -0
  115. package/modules/proxy/services/http-auth-handler.service.js.map +1 -0
  116. package/modules/proxy/services/http-handler.service.d.ts +21 -0
  117. package/modules/proxy/services/http-handler.service.js +210 -0
  118. package/modules/proxy/services/http-handler.service.js.map +1 -0
  119. package/modules/proxy/services/jwt.service.d.ts +12 -0
  120. package/modules/proxy/services/jwt.service.js +107 -0
  121. package/modules/proxy/services/jwt.service.js.map +1 -0
  122. package/modules/proxy/services/websocket.service.d.ts +21 -0
  123. package/modules/proxy/services/websocket.service.js +180 -0
  124. package/modules/proxy/services/websocket.service.js.map +1 -0
  125. package/modules/remote-config/index.d.ts +2 -0
  126. package/modules/remote-config/index.js +19 -0
  127. package/modules/remote-config/index.js.map +1 -0
  128. package/modules/remote-config/remote-config.module.d.ts +2 -0
  129. package/modules/remote-config/remote-config.module.js +22 -0
  130. package/modules/remote-config/remote-config.module.js.map +1 -0
  131. package/modules/remote-config/remote-config.service.d.ts +12 -0
  132. package/modules/remote-config/remote-config.service.js +68 -0
  133. package/modules/remote-config/remote-config.service.js.map +1 -0
  134. package/open-rlb-amqp.schema.json +1297 -0
  135. package/package.json +88 -0
  136. package/tsconfig.build.tsbuildinfo +1 -0
@@ -0,0 +1,1297 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "./schema.json",
4
+ "title": "RLB NestJS AMQP Configuration",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "app": {
9
+ "$ref": "#/definitions/appConfig"
10
+ },
11
+ "auth-providers": {
12
+ "type": "array",
13
+ "items": {
14
+ "$ref": "#/definitions/handlerAuthConfig"
15
+ }
16
+ },
17
+ "broker": {
18
+ "$ref": "#/definitions/rabbitMqConfig"
19
+ },
20
+ "topics": {
21
+ "type": "array",
22
+ "minItems": 1,
23
+ "items": {
24
+ "$ref": "#/definitions/brokerTopic"
25
+ }
26
+ },
27
+ "gateway": {
28
+ "$ref": "#/definitions/gatewayConfig"
29
+ }
30
+ },
31
+ "required": [
32
+ "broker",
33
+ "topics"
34
+ ],
35
+ "definitions": {
36
+ "appConfig": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "properties": {
40
+ "environment": {
41
+ "type": "string",
42
+ "enum": [
43
+ "development",
44
+ "production",
45
+ "test"
46
+ ]
47
+ },
48
+ "host": {
49
+ "type": "string"
50
+ },
51
+ "port": {
52
+ "type": "integer",
53
+ "minimum": 1,
54
+ "maximum": 65535
55
+ }
56
+ },
57
+ "required": [
58
+ "environment"
59
+ ]
60
+ },
61
+ "headerValue": {
62
+ "oneOf": [
63
+ {
64
+ "type": "string"
65
+ },
66
+ {
67
+ "type": "number"
68
+ },
69
+ {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "string"
73
+ }
74
+ }
75
+ ]
76
+ },
77
+ "messageHandlerErrorBehavior": {
78
+ "type": "string",
79
+ "description": "Prefer uppercase values from MessageHandlerErrorBehavior enum.",
80
+ "enum": [
81
+ "ACK",
82
+ "NACK",
83
+ "REQUEUE",
84
+ "ack",
85
+ "nack",
86
+ "requeue"
87
+ ]
88
+ },
89
+ "handlerAuthConfig": {
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "properties": {
93
+ "name": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ },
97
+ "type": {
98
+ "type": "string",
99
+ "enum": [
100
+ "jwt",
101
+ "jwks",
102
+ "basic",
103
+ "str-compare",
104
+ "none"
105
+ ]
106
+ },
107
+ "issuer": {
108
+ "type": "string"
109
+ },
110
+ "audience": {
111
+ "oneOf": [
112
+ {
113
+ "type": "string"
114
+ },
115
+ {
116
+ "type": "array",
117
+ "items": {
118
+ "type": "string"
119
+ }
120
+ }
121
+ ]
122
+ },
123
+ "algorithms": {
124
+ "type": "array",
125
+ "items": {
126
+ "type": "string"
127
+ },
128
+ "minItems": 1
129
+ },
130
+ "secret": {
131
+ "type": "string"
132
+ },
133
+ "jwksUri": {
134
+ "type": "string",
135
+ "format": "uri"
136
+ },
137
+ "httpsAllowUnauthorized": {
138
+ "type": "boolean"
139
+ },
140
+ "clientSecret": {
141
+ "type": "string"
142
+ },
143
+ "clientId": {
144
+ "type": "string"
145
+ },
146
+ "scopes": {
147
+ "type": "array",
148
+ "items": {
149
+ "type": "string"
150
+ }
151
+ },
152
+ "tokenUrl": {
153
+ "type": "string",
154
+ "format": "uri"
155
+ },
156
+ "jwtMap": {
157
+ "type": "array",
158
+ "items": {
159
+ "type": "string",
160
+ "pattern": "^[^:]+\\s*:\\s*[^:]+$"
161
+ }
162
+ },
163
+ "headerPrefix": {
164
+ "type": "string"
165
+ },
166
+ "usernameClaim": {
167
+ "type": "string"
168
+ },
169
+ "uidClaim": {
170
+ "type": "string"
171
+ },
172
+ "aclTopic": {
173
+ "type": "string"
174
+ },
175
+ "aclAction": {
176
+ "type": "string"
177
+ },
178
+ "rolesClaim": {
179
+ "type": "string",
180
+ "description": "Legacy/documentation field."
181
+ },
182
+ "outProp": {
183
+ "type": "string",
184
+ "description": "Legacy/documentation field."
185
+ }
186
+ },
187
+ "required": [
188
+ "name",
189
+ "type"
190
+ ],
191
+ "allOf": [
192
+ {
193
+ "if": {
194
+ "properties": {
195
+ "type": {
196
+ "const": "jwt"
197
+ }
198
+ },
199
+ "required": [
200
+ "type"
201
+ ]
202
+ },
203
+ "then": {
204
+ "required": [
205
+ "headerPrefix",
206
+ "issuer",
207
+ "algorithms",
208
+ "secret",
209
+ "jwtMap"
210
+ ]
211
+ }
212
+ },
213
+ {
214
+ "if": {
215
+ "properties": {
216
+ "type": {
217
+ "const": "jwks"
218
+ }
219
+ },
220
+ "required": [
221
+ "type"
222
+ ]
223
+ },
224
+ "then": {
225
+ "required": [
226
+ "headerPrefix",
227
+ "issuer",
228
+ "algorithms",
229
+ "jwksUri",
230
+ "jwtMap"
231
+ ]
232
+ }
233
+ },
234
+ {
235
+ "if": {
236
+ "properties": {
237
+ "type": {
238
+ "const": "basic"
239
+ }
240
+ },
241
+ "required": [
242
+ "type"
243
+ ]
244
+ },
245
+ "then": {
246
+ "required": [
247
+ "headerPrefix",
248
+ "clientId",
249
+ "clientSecret"
250
+ ]
251
+ }
252
+ },
253
+ {
254
+ "if": {
255
+ "properties": {
256
+ "type": {
257
+ "const": "str-compare"
258
+ }
259
+ },
260
+ "required": [
261
+ "type"
262
+ ]
263
+ },
264
+ "then": {
265
+ "required": [
266
+ "headerPrefix",
267
+ "secret"
268
+ ]
269
+ }
270
+ }
271
+ ]
272
+ },
273
+ "rabbitMqConfig": {
274
+ "type": "object",
275
+ "additionalProperties": false,
276
+ "properties": {
277
+ "name": {
278
+ "type": "string",
279
+ "description": "Legacy field from previous interfaces and README examples."
280
+ },
281
+ "uri": {
282
+ "$ref": "#/definitions/rabbitMqUriConfig"
283
+ },
284
+ "prefetchCount": {
285
+ "type": "integer",
286
+ "minimum": 1
287
+ },
288
+ "exchanges": {
289
+ "type": "array",
290
+ "items": {
291
+ "$ref": "#/definitions/rabbitMqExchangeConfig"
292
+ }
293
+ },
294
+ "exchangeBindings": {
295
+ "type": "array",
296
+ "items": {
297
+ "$ref": "#/definitions/rabbitMqExchangeBindingConfig"
298
+ }
299
+ },
300
+ "queues": {
301
+ "type": "array",
302
+ "items": {
303
+ "$ref": "#/definitions/rabbitMqQueueConfig"
304
+ }
305
+ },
306
+ "defaultRpcTimeout": {
307
+ "type": "integer",
308
+ "minimum": 1
309
+ },
310
+ "defaultExchangeType": {
311
+ "type": "string",
312
+ "enum": [
313
+ "direct",
314
+ "fanout",
315
+ "topic",
316
+ "headers"
317
+ ]
318
+ },
319
+ "defaultSubscribeErrorBehavior": {
320
+ "$ref": "#/definitions/messageHandlerErrorBehavior"
321
+ },
322
+ "defaultPublishErrorBehavior": {
323
+ "description": "Legacy/documentation field.",
324
+ "type": "string",
325
+ "enum": [
326
+ "ACK",
327
+ "NACK",
328
+ "REQUEUE",
329
+ "REJECT",
330
+ "ack",
331
+ "nack",
332
+ "requeue",
333
+ "reject"
334
+ ]
335
+ },
336
+ "connectionInitOptions": {
337
+ "$ref": "#/definitions/connectionInitOptions"
338
+ },
339
+ "connectionManagerOptions": {
340
+ "$ref": "#/definitions/connectionManagerOptions"
341
+ },
342
+ "registerHandlers": {
343
+ "type": "boolean"
344
+ },
345
+ "enableDirectReplyTo": {
346
+ "type": "boolean"
347
+ },
348
+ "enableControllerDiscovery": {
349
+ "type": "boolean"
350
+ },
351
+ "channels": {
352
+ "$ref": "#/definitions/rabbitMqChannels"
353
+ },
354
+ "handlers": {
355
+ "$ref": "#/definitions/rabbitMqHandlers"
356
+ },
357
+ "defaultHandler": {
358
+ "type": "string"
359
+ },
360
+ "replyQueues": {
361
+ "type": "object",
362
+ "additionalProperties": {
363
+ "type": "string"
364
+ }
365
+ }
366
+ },
367
+ "required": [
368
+ "uri"
369
+ ]
370
+ },
371
+ "rabbitMqUriConfig": {
372
+ "oneOf": [
373
+ {
374
+ "type": "string",
375
+ "minLength": 1
376
+ },
377
+ {
378
+ "type": "array",
379
+ "minItems": 1,
380
+ "items": {
381
+ "type": "string",
382
+ "minLength": 1
383
+ }
384
+ },
385
+ {
386
+ "$ref": "#/definitions/rabbitMqUriObject"
387
+ },
388
+ {
389
+ "type": "array",
390
+ "minItems": 1,
391
+ "items": {
392
+ "$ref": "#/definitions/rabbitMqUriObject"
393
+ }
394
+ }
395
+ ]
396
+ },
397
+ "rabbitMqUriObject": {
398
+ "type": "object",
399
+ "additionalProperties": true,
400
+ "properties": {
401
+ "protocol": {
402
+ "type": "string"
403
+ },
404
+ "hostname": {
405
+ "type": "string"
406
+ },
407
+ "port": {
408
+ "type": "integer",
409
+ "minimum": 1,
410
+ "maximum": 65535
411
+ },
412
+ "username": {
413
+ "type": "string"
414
+ },
415
+ "password": {
416
+ "type": "string"
417
+ },
418
+ "locale": {
419
+ "type": "string"
420
+ },
421
+ "frameMax": {
422
+ "type": "integer",
423
+ "minimum": 0
424
+ },
425
+ "heartbeat": {
426
+ "type": "integer",
427
+ "minimum": 0
428
+ },
429
+ "vhost": {
430
+ "type": "string"
431
+ },
432
+ "clientProperties": {
433
+ "type": "object",
434
+ "additionalProperties": true
435
+ }
436
+ }
437
+ },
438
+ "rabbitMqExchangeConfig": {
439
+ "type": "object",
440
+ "additionalProperties": false,
441
+ "properties": {
442
+ "name": {
443
+ "type": "string",
444
+ "minLength": 1
445
+ },
446
+ "type": {
447
+ "type": "string",
448
+ "description": "Defines the type of the exchange. If not specified, it will use the defaultExchangeType defined in the broker config, or 'direct' if that's also not specified.",
449
+ "oneOf": [
450
+ {
451
+ "const": "direct",
452
+ "description": "Direct exchange type. Routes messages with a specific routing key to the queues that are bound with that key."
453
+ },
454
+ {
455
+ "const": "fanout",
456
+ "description": "Fanout exchange type. Routes messages to all bound queues indiscriminately."
457
+ },
458
+ {
459
+ "const": "topic",
460
+ "description": "Topic exchange type. Routes messages to queues based on wildcard matches between the routing key and the queue binding pattern."
461
+ },
462
+ {
463
+ "const": "headers",
464
+ "description": "Headers exchange type. Routes messages based on message header values instead of the routing key."
465
+ }
466
+ ]
467
+ },
468
+ "createExchangeIfNotExists": {
469
+ "type": "boolean"
470
+ },
471
+ "options": {
472
+ "$ref": "#/definitions/assertExchangeOptions"
473
+ }
474
+ },
475
+ "required": [
476
+ "name"
477
+ ]
478
+ },
479
+ "assertExchangeOptions": {
480
+ "type": "object",
481
+ "additionalProperties": true,
482
+ "properties": {
483
+ "durable": {
484
+ "type": "boolean"
485
+ },
486
+ "internal": {
487
+ "type": "boolean"
488
+ },
489
+ "autoDelete": {
490
+ "type": "boolean"
491
+ },
492
+ "alternateExchange": {
493
+ "type": "string"
494
+ },
495
+ "arguments": {
496
+ "type": "object",
497
+ "additionalProperties": true
498
+ }
499
+ }
500
+ },
501
+ "rabbitMqExchangeBindingConfig": {
502
+ "type": "object",
503
+ "additionalProperties": false,
504
+ "properties": {
505
+ "destination": {
506
+ "type": "string",
507
+ "minLength": 1
508
+ },
509
+ "source": {
510
+ "type": "string",
511
+ "minLength": 1
512
+ },
513
+ "pattern": {
514
+ "type": "string",
515
+ "minLength": 1
516
+ },
517
+ "args": {
518
+ "type": "object",
519
+ "additionalProperties": true
520
+ }
521
+ },
522
+ "required": [
523
+ "destination",
524
+ "source",
525
+ "pattern"
526
+ ]
527
+ },
528
+ "rabbitMqQueueConfig": {
529
+ "type": "object",
530
+ "additionalProperties": false,
531
+ "properties": {
532
+ "name": {
533
+ "type": "string",
534
+ "minLength": 1
535
+ },
536
+ "createQueueIfNotExists": {
537
+ "type": "boolean"
538
+ },
539
+ "options": {
540
+ "$ref": "#/definitions/assertQueueOptions"
541
+ },
542
+ "exchange": {
543
+ "type": "string"
544
+ },
545
+ "routingKey": {
546
+ "oneOf": [
547
+ {
548
+ "type": "string"
549
+ },
550
+ {
551
+ "type": "array",
552
+ "items": {
553
+ "type": "string"
554
+ },
555
+ "minItems": 1
556
+ }
557
+ ]
558
+ },
559
+ "bindQueueArguments": {
560
+ "type": "object",
561
+ "additionalProperties": true
562
+ },
563
+ "consumerTag": {
564
+ "type": "string"
565
+ }
566
+ },
567
+ "required": [
568
+ "name"
569
+ ]
570
+ },
571
+ "assertQueueOptions": {
572
+ "type": "object",
573
+ "additionalProperties": true,
574
+ "properties": {
575
+ "durable": {
576
+ "type": "boolean"
577
+ },
578
+ "exclusive": {
579
+ "type": "boolean"
580
+ },
581
+ "autoDelete": {
582
+ "type": "boolean"
583
+ },
584
+ "arguments": {
585
+ "type": "object",
586
+ "additionalProperties": true
587
+ },
588
+ "messageTtl": {
589
+ "type": "integer",
590
+ "minimum": 0
591
+ },
592
+ "expires": {
593
+ "type": "integer",
594
+ "minimum": 0
595
+ },
596
+ "deadLetterExchange": {
597
+ "type": "string"
598
+ },
599
+ "deadLetterRoutingKey": {
600
+ "type": "string"
601
+ },
602
+ "maxLength": {
603
+ "type": "integer",
604
+ "minimum": 0
605
+ },
606
+ "maxPriority": {
607
+ "type": "integer",
608
+ "minimum": 0
609
+ },
610
+ "bindQueueArguments": {
611
+ "type": "object",
612
+ "additionalProperties": true
613
+ },
614
+ "channel": {
615
+ "type": "string"
616
+ },
617
+ "consumerOptions": {
618
+ "$ref": "#/definitions/consumeOptions"
619
+ }
620
+ }
621
+ },
622
+ "consumeOptions": {
623
+ "type": "object",
624
+ "additionalProperties": true,
625
+ "properties": {
626
+ "noAck": {
627
+ "type": "boolean"
628
+ },
629
+ "exclusive": {
630
+ "type": "boolean"
631
+ },
632
+ "priority": {
633
+ "type": "integer"
634
+ },
635
+ "consumerTag": {
636
+ "type": "string"
637
+ },
638
+ "arguments": {
639
+ "type": "object",
640
+ "additionalProperties": true
641
+ }
642
+ }
643
+ },
644
+ "connectionInitOptions": {
645
+ "type": "object",
646
+ "additionalProperties": false,
647
+ "properties": {
648
+ "wait": {
649
+ "type": "boolean"
650
+ },
651
+ "timeout": {
652
+ "type": "integer",
653
+ "minimum": 0
654
+ },
655
+ "reject": {
656
+ "type": "boolean"
657
+ },
658
+ "skipConnectionFailedLogging": {
659
+ "type": "boolean"
660
+ },
661
+ "skipDisconnectFailedLogging": {
662
+ "type": "boolean"
663
+ }
664
+ }
665
+ },
666
+ "connectionManagerOptions": {
667
+ "type": "object",
668
+ "additionalProperties": true,
669
+ "properties": {
670
+ "heartbeatIntervalInSeconds": {
671
+ "type": "number",
672
+ "minimum": 0
673
+ },
674
+ "reconnectTimeInSeconds": {
675
+ "type": "number",
676
+ "minimum": 0
677
+ },
678
+ "connectionOptions": {
679
+ "$ref": "#/definitions/amqpConnectionOptions"
680
+ }
681
+ }
682
+ },
683
+ "amqpConnectionOptions": {
684
+ "type": "object",
685
+ "additionalProperties": true,
686
+ "properties": {
687
+ "protocol": {
688
+ "type": "string"
689
+ },
690
+ "hostname": {
691
+ "type": "string"
692
+ },
693
+ "port": {
694
+ "type": "integer",
695
+ "minimum": 1,
696
+ "maximum": 65535
697
+ },
698
+ "username": {
699
+ "type": "string"
700
+ },
701
+ "password": {
702
+ "type": "string"
703
+ },
704
+ "vhost": {
705
+ "type": "string"
706
+ },
707
+ "locale": {
708
+ "type": "string"
709
+ },
710
+ "frameMax": {
711
+ "type": "integer"
712
+ },
713
+ "heartbeat": {
714
+ "type": "integer"
715
+ },
716
+ "channelMax": {
717
+ "type": "integer"
718
+ },
719
+ "clientProperties": {
720
+ "type": "object",
721
+ "additionalProperties": true
722
+ },
723
+ "credentials": {
724
+ "$ref": "#/definitions/amqpCredentials"
725
+ }
726
+ }
727
+ },
728
+ "amqpCredentials": {
729
+ "type": "object",
730
+ "additionalProperties": true,
731
+ "properties": {
732
+ "mechanism": {
733
+ "type": "string",
734
+ "enum": [
735
+ "PLAIN",
736
+ "plain",
737
+ "EXTERNAL",
738
+ "external",
739
+ "AMQPLAIN",
740
+ "amqplain"
741
+ ]
742
+ },
743
+ "username": {
744
+ "type": "string"
745
+ },
746
+ "password": {
747
+ "type": "string"
748
+ }
749
+ }
750
+ },
751
+ "rabbitMqChannelConfig": {
752
+ "type": "object",
753
+ "additionalProperties": false,
754
+ "properties": {
755
+ "prefetchCount": {
756
+ "type": "integer",
757
+ "minimum": 1
758
+ },
759
+ "default": {
760
+ "type": "boolean"
761
+ }
762
+ }
763
+ },
764
+ "rabbitMqChannels": {
765
+ "type": "object",
766
+ "additionalProperties": {
767
+ "$ref": "#/definitions/rabbitMqChannelConfig"
768
+ }
769
+ },
770
+ "rabbitMqHandlers": {
771
+ "type": "object",
772
+ "additionalProperties": {
773
+ "oneOf": [
774
+ {
775
+ "$ref": "#/definitions/messageHandlerOptions"
776
+ },
777
+ {
778
+ "type": "array",
779
+ "minItems": 1,
780
+ "items": {
781
+ "$ref": "#/definitions/messageHandlerOptions"
782
+ }
783
+ }
784
+ ]
785
+ }
786
+ },
787
+ "messageHandlerOptions": {
788
+ "type": "object",
789
+ "additionalProperties": false,
790
+ "properties": {
791
+ "name": {
792
+ "type": "string"
793
+ },
794
+ "connection": {
795
+ "type": "string"
796
+ },
797
+ "exchange": {
798
+ "type": "string"
799
+ },
800
+ "routingKey": {
801
+ "oneOf": [
802
+ {
803
+ "type": "string"
804
+ },
805
+ {
806
+ "type": "array",
807
+ "items": {
808
+ "type": "string"
809
+ },
810
+ "minItems": 1
811
+ }
812
+ ]
813
+ },
814
+ "queue": {
815
+ "type": "string"
816
+ },
817
+ "queueOptions": {
818
+ "$ref": "#/definitions/assertQueueOptions"
819
+ },
820
+ "errorBehavior": {
821
+ "$ref": "#/definitions/messageHandlerErrorBehavior"
822
+ },
823
+ "allowNonJsonMessages": {
824
+ "type": "boolean"
825
+ },
826
+ "createQueueIfNotExists": {
827
+ "type": "boolean"
828
+ },
829
+ "usePersistentReplyTo": {
830
+ "type": "boolean"
831
+ },
832
+ "batchOptions": {
833
+ "$ref": "#/definitions/batchOptions"
834
+ }
835
+ }
836
+ },
837
+ "batchOptions": {
838
+ "type": "object",
839
+ "additionalProperties": false,
840
+ "properties": {
841
+ "size": {
842
+ "type": "integer",
843
+ "minimum": 1
844
+ },
845
+ "timeout": {
846
+ "type": "integer",
847
+ "minimum": 1
848
+ }
849
+ },
850
+ "required": [
851
+ "size"
852
+ ]
853
+ },
854
+ "brokerTopic": {
855
+ "type": "object",
856
+ "additionalProperties": false,
857
+ "properties": {
858
+ "name": {
859
+ "type": "string",
860
+ "minLength": 1
861
+ },
862
+ "mode": {
863
+ "type": "string",
864
+ "markdownDescription": "Defines the communication pattern for this topic.",
865
+ "oneOf": [
866
+ {
867
+ "const": "rpc",
868
+ "description": "Request-response pattern. The sender expects a reply from the receiver. Messages are sent to a queue and consumed by a handler that processes the message and sends back a response."
869
+ },
870
+ {
871
+ "const": "event",
872
+ "description": "Event-driven pattern. The sender does not expect a reply. Messages are sent to an exchange and routed to one or more queues based on bindings. Handlers consume messages from these queues and process them without sending a response."
873
+ },
874
+ {
875
+ "const": "broadcast",
876
+ "description": "Broadcast pattern. Similar to event-driven, but specifically for fanout exchanges where messages are broadcast to all bound queues regardless of routing keys."
877
+ },
878
+ {
879
+ "const": "handle",
880
+ "description": "Simple handling pattern. Messages are sent to a specific queue and consumed by a handler. No response is expected, and routing is straightforward to a single queue."
881
+ }
882
+ ]
883
+ },
884
+ "toObservable": {
885
+ "type": "boolean"
886
+ },
887
+ "queue": {
888
+ "type": "string"
889
+ },
890
+ "routingKey": {
891
+ "type": "string"
892
+ },
893
+ "exchange": {
894
+ "type": "string"
895
+ }
896
+ },
897
+ "required": [
898
+ "name",
899
+ "mode"
900
+ ],
901
+ "allOf": [
902
+ {
903
+ "if": {
904
+ "properties": {
905
+ "mode": {
906
+ "const": "rpc"
907
+ }
908
+ },
909
+ "required": [
910
+ "mode"
911
+ ]
912
+ },
913
+ "then": {
914
+ "anyOf": [
915
+ {
916
+ "required": [
917
+ "queue"
918
+ ]
919
+ },
920
+ {
921
+ "required": [
922
+ "exchange",
923
+ "routingKey"
924
+ ]
925
+ }
926
+ ]
927
+ }
928
+ },
929
+ {
930
+ "if": {
931
+ "properties": {
932
+ "mode": {
933
+ "const": "handle"
934
+ }
935
+ },
936
+ "required": [
937
+ "mode"
938
+ ]
939
+ },
940
+ "then": {
941
+ "required": [
942
+ "queue"
943
+ ]
944
+ }
945
+ },
946
+ {
947
+ "if": {
948
+ "properties": {
949
+ "mode": {
950
+ "const": "broadcast"
951
+ }
952
+ },
953
+ "required": [
954
+ "mode"
955
+ ]
956
+ },
957
+ "then": {
958
+ "required": [
959
+ "exchange",
960
+ "routingKey"
961
+ ]
962
+ }
963
+ },
964
+ {
965
+ "if": {
966
+ "properties": {
967
+ "mode": {
968
+ "const": "event"
969
+ }
970
+ },
971
+ "required": [
972
+ "mode"
973
+ ]
974
+ },
975
+ "then": {
976
+ "anyOf": [
977
+ {
978
+ "required": [
979
+ "queue"
980
+ ]
981
+ },
982
+ {
983
+ "required": [
984
+ "exchange",
985
+ "routingKey"
986
+ ]
987
+ }
988
+ ]
989
+ }
990
+ }
991
+ ]
992
+ },
993
+ "gatewayConfig": {
994
+ "type": "object",
995
+ "additionalProperties": false,
996
+ "properties": {
997
+ "mode": {
998
+ "type": "string",
999
+ "enum": [
1000
+ "gateway"
1001
+ ],
1002
+ "description": "Legacy marker used in README examples."
1003
+ },
1004
+ "headerPrefix": {
1005
+ "type": "string"
1006
+ },
1007
+ "loadConfig": {
1008
+ "$ref": "#/definitions/gatewayConfigLoader"
1009
+ },
1010
+ "paths": {
1011
+ "type": "array",
1012
+ "items": {
1013
+ "$ref": "#/definitions/pathDefinition"
1014
+ }
1015
+ },
1016
+ "events": {
1017
+ "type": "array",
1018
+ "items": {
1019
+ "$ref": "#/definitions/webSocketEvent"
1020
+ }
1021
+ }
1022
+ },
1023
+ "required": [
1024
+ "paths",
1025
+ "events"
1026
+ ]
1027
+ },
1028
+ "gatewayConfigLoader": {
1029
+ "type": "object",
1030
+ "additionalProperties": false,
1031
+ "properties": {
1032
+ "paths": {
1033
+ "$ref": "#/definitions/gatewayConfigSource"
1034
+ },
1035
+ "events": {
1036
+ "$ref": "#/definitions/gatewayConfigSource"
1037
+ }
1038
+ }
1039
+ },
1040
+ "gatewayConfigSource": {
1041
+ "type": "object",
1042
+ "additionalProperties": false,
1043
+ "properties": {
1044
+ "topic": {
1045
+ "type": "string"
1046
+ },
1047
+ "action": {
1048
+ "type": "string"
1049
+ },
1050
+ "tags": {
1051
+ "type": "array",
1052
+ "items": {
1053
+ "type": "string"
1054
+ }
1055
+ }
1056
+ },
1057
+ "required": [
1058
+ "topic",
1059
+ "action"
1060
+ ]
1061
+ },
1062
+ "pathDefinition": {
1063
+ "type": "object",
1064
+ "additionalProperties": false,
1065
+ "properties": {
1066
+ "name": {
1067
+ "type": "string",
1068
+ "minLength": 1
1069
+ },
1070
+ "method": {
1071
+ "type": "string",
1072
+ "enum": [
1073
+ "GET",
1074
+ "POST",
1075
+ "PUT",
1076
+ "DELETE",
1077
+ "PATCH",
1078
+ "OPTIONS",
1079
+ "HEAD"
1080
+ ]
1081
+ },
1082
+ "path": {
1083
+ "type": "string",
1084
+ "pattern": "^/"
1085
+ },
1086
+ "parseRaw": {
1087
+ "type": "boolean"
1088
+ },
1089
+ "topic": {
1090
+ "type": "string",
1091
+ "minLength": 1
1092
+ },
1093
+ "action": {
1094
+ "type": "string",
1095
+ "minLength": 1
1096
+ },
1097
+ "dataSource": {
1098
+ "type": "string",
1099
+ "markdownDescription": "Specifies the source of the data for the request.",
1100
+ "oneOf": [
1101
+ {
1102
+ "const": "body",
1103
+ "description": "Merge body + params."
1104
+ },
1105
+ {
1106
+ "const": "query",
1107
+ "description": "Merge query + params."
1108
+ },
1109
+ {
1110
+ "const": "params",
1111
+ "description": "Use params only."
1112
+ },
1113
+ {
1114
+ "const": "body-query",
1115
+ "description": "Merge params + query + body (body prevails)."
1116
+ },
1117
+ {
1118
+ "const": "query-body",
1119
+ "description": "Merge params + body + query (query prevails)."
1120
+ }
1121
+ ]
1122
+ },
1123
+ "mode": {
1124
+ "type": "string",
1125
+ "enum": [
1126
+ "event",
1127
+ "rpc"
1128
+ ]
1129
+ },
1130
+ "auth": {
1131
+ "type": "string"
1132
+ },
1133
+ "allowAnonymous": {
1134
+ "type": "boolean",
1135
+ "description": "If true, allows access to this path even without authentication. If auth is also specified, it will attempt to authenticate but won't reject if authentication fails."
1136
+ },
1137
+ "roles": {
1138
+ "type": "array",
1139
+ "items": {
1140
+ "type": "string"
1141
+ },
1142
+ "minItems": 1
1143
+ },
1144
+ "timeout": {
1145
+ "type": "integer",
1146
+ "minimum": 1
1147
+ },
1148
+ "binary": {
1149
+ "type": "boolean"
1150
+ },
1151
+ "headers": {
1152
+ "type": "object",
1153
+ "additionalProperties": {
1154
+ "$ref": "#/definitions/headerValue"
1155
+ }
1156
+ },
1157
+ "forwardHeaders": {
1158
+ "type": "object",
1159
+ "additionalProperties": {
1160
+ "type": "string"
1161
+ }
1162
+ },
1163
+ "redirect": {
1164
+ "type": "integer",
1165
+ "minimum": 300,
1166
+ "maximum": 399
1167
+ }
1168
+ },
1169
+ "required": [
1170
+ "name",
1171
+ "method",
1172
+ "path",
1173
+ "topic",
1174
+ "dataSource",
1175
+ "mode"
1176
+ ],
1177
+ "allOf": [
1178
+ {
1179
+ "if": {
1180
+ "properties": {
1181
+ "mode": {
1182
+ "const": "rpc"
1183
+ }
1184
+ },
1185
+ "required": [
1186
+ "mode"
1187
+ ]
1188
+ },
1189
+ "then": {
1190
+ "required": [
1191
+ "action"
1192
+ ]
1193
+ }
1194
+ },
1195
+ {
1196
+ "if": {
1197
+ "required": [
1198
+ "roles"
1199
+ ]
1200
+ },
1201
+ "then": {
1202
+ "required": [
1203
+ "auth"
1204
+ ]
1205
+ }
1206
+ }
1207
+ ]
1208
+ },
1209
+ "webSocketEvent": {
1210
+ "type": "object",
1211
+ "additionalProperties": false,
1212
+ "properties": {
1213
+ "type": {
1214
+ "type": "string",
1215
+ "enum": [
1216
+ "ws",
1217
+ "mqtt",
1218
+ "http"
1219
+ ]
1220
+ },
1221
+ "exchange": {
1222
+ "type": "string",
1223
+ "minLength": 1
1224
+ },
1225
+ "routingKey": {
1226
+ "type": "string",
1227
+ "minLength": 1
1228
+ },
1229
+ "name": {
1230
+ "type": "string",
1231
+ "minLength": 1
1232
+ },
1233
+ "auth": {
1234
+ "type": "string"
1235
+ },
1236
+ "roles": {
1237
+ "type": "array",
1238
+ "items": {
1239
+ "type": "string"
1240
+ }
1241
+ },
1242
+ "url": {
1243
+ "type": "string",
1244
+ "format": "uri"
1245
+ },
1246
+ "method": {
1247
+ "type": "string",
1248
+ "enum": [
1249
+ "GET",
1250
+ "POST",
1251
+ "PUT",
1252
+ "DELETE",
1253
+ "PATCH",
1254
+ "OPTIONS",
1255
+ "HEAD"
1256
+ ]
1257
+ },
1258
+ "headers": {
1259
+ "type": "object",
1260
+ "additionalProperties": {
1261
+ "$ref": "#/definitions/headerValue"
1262
+ }
1263
+ },
1264
+ "timeout": {
1265
+ "type": "integer",
1266
+ "minimum": 1
1267
+ }
1268
+ },
1269
+ "required": [
1270
+ "type",
1271
+ "exchange",
1272
+ "routingKey",
1273
+ "name"
1274
+ ],
1275
+ "allOf": [
1276
+ {
1277
+ "if": {
1278
+ "properties": {
1279
+ "type": {
1280
+ "const": "http"
1281
+ }
1282
+ },
1283
+ "required": [
1284
+ "type"
1285
+ ]
1286
+ },
1287
+ "then": {
1288
+ "required": [
1289
+ "url",
1290
+ "method"
1291
+ ]
1292
+ }
1293
+ }
1294
+ ]
1295
+ }
1296
+ }
1297
+ }