@walkeros/server-destination-kafka 3.4.0-next-1776749829492

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.
@@ -0,0 +1,840 @@
1
+ {
2
+ "$meta": {
3
+ "package": "@walkeros/server-destination-kafka",
4
+ "version": "3.4.0-next-1776749829492",
5
+ "type": "destination",
6
+ "platform": [
7
+ "server"
8
+ ],
9
+ "docs": "https://www.walkeros.io/docs/destinations/server/kafka",
10
+ "source": "https://github.com/elbwalker/walkerOS/tree/main/packages/server/destinations/kafka/src"
11
+ },
12
+ "schemas": {
13
+ "mapping": {
14
+ "$schema": "http://json-schema.org/draft-07/schema#",
15
+ "type": "object",
16
+ "properties": {
17
+ "key": {
18
+ "description": "Override message key mapping path for this rule (e.g. data.id). Takes precedence over settings.kafka.key.",
19
+ "type": "string"
20
+ },
21
+ "topic": {
22
+ "description": "Override Kafka topic for this rule. Takes precedence over settings.kafka.topic.",
23
+ "type": "string"
24
+ }
25
+ },
26
+ "additionalProperties": false
27
+ },
28
+ "settings": {
29
+ "$schema": "http://json-schema.org/draft-07/schema#",
30
+ "type": "object",
31
+ "properties": {
32
+ "kafka": {
33
+ "type": "object",
34
+ "properties": {
35
+ "brokers": {
36
+ "minItems": 1,
37
+ "type": "array",
38
+ "items": {
39
+ "type": "string",
40
+ "minLength": 1
41
+ },
42
+ "description": "Kafka broker addresses (host:port). At least one required."
43
+ },
44
+ "clientId": {
45
+ "description": "Kafka client ID. Default: walkeros.",
46
+ "type": "string"
47
+ },
48
+ "ssl": {
49
+ "description": "TLS configuration. Set true for default TLS, or provide a tls.ConnectionOptions object for mTLS.",
50
+ "anyOf": [
51
+ {
52
+ "type": "boolean"
53
+ },
54
+ {
55
+ "type": "object",
56
+ "propertyNames": {
57
+ "type": "string"
58
+ },
59
+ "additionalProperties": {}
60
+ }
61
+ ]
62
+ },
63
+ "sasl": {
64
+ "description": "SASL authentication config. Required for Confluent Cloud, AWS MSK with IAM, etc.",
65
+ "type": "object",
66
+ "properties": {
67
+ "mechanism": {
68
+ "type": "string",
69
+ "enum": [
70
+ "plain",
71
+ "scram-sha-256",
72
+ "scram-sha-512",
73
+ "aws",
74
+ "oauthbearer"
75
+ ],
76
+ "description": "SASL authentication mechanism."
77
+ },
78
+ "username": {
79
+ "description": "Username for plain/scram mechanisms.",
80
+ "type": "string"
81
+ },
82
+ "password": {
83
+ "description": "Password for plain/scram mechanisms.",
84
+ "type": "string"
85
+ },
86
+ "accessKeyId": {
87
+ "description": "AWS access key ID for IAM auth (mechanism: aws).",
88
+ "type": "string"
89
+ },
90
+ "secretAccessKey": {
91
+ "description": "AWS secret access key for IAM auth (mechanism: aws).",
92
+ "type": "string"
93
+ },
94
+ "sessionToken": {
95
+ "description": "AWS session token for temporary credentials (mechanism: aws).",
96
+ "type": "string"
97
+ },
98
+ "authorizationIdentity": {
99
+ "description": "AWS authorization identity (mechanism: aws).",
100
+ "type": "string"
101
+ }
102
+ },
103
+ "required": [
104
+ "mechanism"
105
+ ],
106
+ "additionalProperties": false
107
+ },
108
+ "connectionTimeout": {
109
+ "description": "Connection timeout in ms. Default: 1000.",
110
+ "type": "integer",
111
+ "exclusiveMinimum": 0,
112
+ "maximum": 9007199254740991
113
+ },
114
+ "requestTimeout": {
115
+ "description": "Request timeout in ms. Default: 30000.",
116
+ "type": "integer",
117
+ "exclusiveMinimum": 0,
118
+ "maximum": 9007199254740991
119
+ },
120
+ "topic": {
121
+ "type": "string",
122
+ "minLength": 1,
123
+ "description": "Target Kafka topic name."
124
+ },
125
+ "acks": {
126
+ "description": "Acknowledgement level. -1 = all replicas, 0 = fire-and-forget, 1 = leader only. Default: -1.",
127
+ "type": "integer",
128
+ "minimum": -1,
129
+ "maximum": 1
130
+ },
131
+ "timeout": {
132
+ "description": "Broker response timeout in ms. Default: 30000.",
133
+ "type": "integer",
134
+ "exclusiveMinimum": 0,
135
+ "maximum": 9007199254740991
136
+ },
137
+ "compression": {
138
+ "description": "Message compression codec. Default: gzip. Snappy/LZ4/ZSTD require additional npm packages.",
139
+ "type": "string",
140
+ "enum": [
141
+ "none",
142
+ "gzip",
143
+ "snappy",
144
+ "lz4",
145
+ "zstd"
146
+ ]
147
+ },
148
+ "idempotent": {
149
+ "description": "Enable idempotent producer for exactly-once delivery. Default: false.",
150
+ "type": "boolean"
151
+ },
152
+ "allowAutoTopicCreation": {
153
+ "description": "Allow auto-creation of topics on the broker. Default: false.",
154
+ "type": "boolean"
155
+ },
156
+ "key": {
157
+ "description": "Mapping value path for message key derivation (e.g. user.id, data.userId). Default: entity_action.",
158
+ "type": "string"
159
+ },
160
+ "headers": {
161
+ "description": "Static headers added to every message.",
162
+ "type": "object",
163
+ "propertyNames": {
164
+ "type": "string"
165
+ },
166
+ "additionalProperties": {
167
+ "type": "string"
168
+ }
169
+ },
170
+ "retry": {
171
+ "description": "Retry configuration for transient failures.",
172
+ "type": "object",
173
+ "properties": {
174
+ "maxRetryTime": {
175
+ "description": "Max total retry wait in ms. Default: 30000.",
176
+ "type": "integer",
177
+ "exclusiveMinimum": 0,
178
+ "maximum": 9007199254740991
179
+ },
180
+ "initialRetryTime": {
181
+ "description": "First retry delay in ms. Default: 300.",
182
+ "type": "integer",
183
+ "exclusiveMinimum": 0,
184
+ "maximum": 9007199254740991
185
+ },
186
+ "retries": {
187
+ "description": "Max retry count. Default: 5.",
188
+ "type": "integer",
189
+ "minimum": 0,
190
+ "maximum": 9007199254740991
191
+ }
192
+ },
193
+ "additionalProperties": false
194
+ }
195
+ },
196
+ "required": [
197
+ "brokers",
198
+ "topic"
199
+ ],
200
+ "additionalProperties": false,
201
+ "description": "Kafka connection and producer settings."
202
+ }
203
+ },
204
+ "required": [
205
+ "kafka"
206
+ ],
207
+ "additionalProperties": false
208
+ }
209
+ },
210
+ "examples": {
211
+ "env": {
212
+ "push": {
213
+ "Kafka": {
214
+ "Kafka": {
215
+ "$code": "class{constructor(e){}producer(e){return v()}}"
216
+ },
217
+ "CompressionTypes": {
218
+ "None": 0,
219
+ "GZIP": 1,
220
+ "Snappy": 2,
221
+ "LZ4": 3,
222
+ "ZSTD": 4
223
+ }
224
+ }
225
+ },
226
+ "simulation": [
227
+ "call:producer.send"
228
+ ]
229
+ },
230
+ "step": {
231
+ "defaultEvent": {
232
+ "in": {
233
+ "name": "page view",
234
+ "data": {
235
+ "domain": "www.example.com",
236
+ "title": "walkerOS documentation",
237
+ "referrer": "https://www.walkeros.io/",
238
+ "search": "?foo=bar",
239
+ "hash": "#hash",
240
+ "id": "/docs/"
241
+ },
242
+ "context": {
243
+ "dev": [
244
+ "test",
245
+ 1
246
+ ]
247
+ },
248
+ "globals": {
249
+ "pagegroup": "docs"
250
+ },
251
+ "custom": {
252
+ "completely": "random"
253
+ },
254
+ "user": {
255
+ "id": "us3r",
256
+ "device": "c00k13",
257
+ "session": "s3ss10n"
258
+ },
259
+ "nested": [
260
+ {
261
+ "entity": "child",
262
+ "data": {
263
+ "is": "subordinated"
264
+ },
265
+ "nested": [],
266
+ "context": {
267
+ "element": [
268
+ "child",
269
+ 0
270
+ ]
271
+ }
272
+ }
273
+ ],
274
+ "consent": {
275
+ "functional": true
276
+ },
277
+ "id": "1700000100-gr0up-1",
278
+ "trigger": "load",
279
+ "entity": "page",
280
+ "action": "view",
281
+ "timestamp": 1700000100,
282
+ "timing": 3.14,
283
+ "group": "gr0up",
284
+ "count": 1,
285
+ "version": {
286
+ "source": "3.4.0-next-1776749829492",
287
+ "tagging": 1
288
+ },
289
+ "source": {
290
+ "type": "web",
291
+ "id": "https://localhost:80",
292
+ "previous_id": "http://remotehost:9001"
293
+ }
294
+ },
295
+ "out": [
296
+ [
297
+ "producer.send",
298
+ {
299
+ "topic": "walkeros-events",
300
+ "messages": [
301
+ {
302
+ "key": "page_view",
303
+ "value": "json:event",
304
+ "headers": {
305
+ "content-type": "application/json"
306
+ },
307
+ "timestamp": "1700000100"
308
+ }
309
+ ],
310
+ "acks": -1,
311
+ "compression": 1
312
+ }
313
+ ]
314
+ ]
315
+ },
316
+ "ignoredEvent": {
317
+ "in": {
318
+ "name": "debug noise",
319
+ "data": {
320
+ "string": "foo",
321
+ "number": 1,
322
+ "boolean": true,
323
+ "array": [
324
+ 0,
325
+ "text",
326
+ false
327
+ ]
328
+ },
329
+ "context": {
330
+ "dev": [
331
+ "test",
332
+ 1
333
+ ]
334
+ },
335
+ "globals": {
336
+ "lang": "elb"
337
+ },
338
+ "custom": {
339
+ "completely": "random"
340
+ },
341
+ "user": {
342
+ "id": "us3r",
343
+ "device": "c00k13",
344
+ "session": "s3ss10n"
345
+ },
346
+ "nested": [
347
+ {
348
+ "entity": "child",
349
+ "data": {
350
+ "is": "subordinated"
351
+ },
352
+ "nested": [],
353
+ "context": {
354
+ "element": [
355
+ "child",
356
+ 0
357
+ ]
358
+ }
359
+ }
360
+ ],
361
+ "consent": {
362
+ "functional": true
363
+ },
364
+ "id": "1700000105-gr0up-1",
365
+ "trigger": "test",
366
+ "entity": "debug",
367
+ "action": "noise",
368
+ "timestamp": 1700000105,
369
+ "timing": 3.14,
370
+ "group": "gr0up",
371
+ "count": 1,
372
+ "version": {
373
+ "source": "3.4.0-next-1776749829492",
374
+ "tagging": 1
375
+ },
376
+ "source": {
377
+ "type": "web",
378
+ "id": "https://localhost:80",
379
+ "previous_id": "http://remotehost:9001"
380
+ }
381
+ },
382
+ "mapping": {
383
+ "ignore": true
384
+ },
385
+ "out": []
386
+ },
387
+ "keyFromUser": {
388
+ "in": {
389
+ "name": "user signup",
390
+ "data": {
391
+ "plan": "pro"
392
+ },
393
+ "context": {
394
+ "dev": [
395
+ "test",
396
+ 1
397
+ ]
398
+ },
399
+ "globals": {
400
+ "lang": "elb"
401
+ },
402
+ "custom": {
403
+ "completely": "random"
404
+ },
405
+ "user": {
406
+ "id": "usr-789"
407
+ },
408
+ "nested": [
409
+ {
410
+ "entity": "child",
411
+ "data": {
412
+ "is": "subordinated"
413
+ },
414
+ "nested": [],
415
+ "context": {
416
+ "element": [
417
+ "child",
418
+ 0
419
+ ]
420
+ }
421
+ }
422
+ ],
423
+ "consent": {
424
+ "functional": true
425
+ },
426
+ "id": "1700000103-gr0up-1",
427
+ "trigger": "test",
428
+ "entity": "user",
429
+ "action": "signup",
430
+ "timestamp": 1700000103,
431
+ "timing": 3.14,
432
+ "group": "gr0up",
433
+ "count": 1,
434
+ "version": {
435
+ "source": "3.4.0-next-1776749829492",
436
+ "tagging": 1
437
+ },
438
+ "source": {
439
+ "type": "web",
440
+ "id": "https://localhost:80",
441
+ "previous_id": "http://remotehost:9001"
442
+ }
443
+ },
444
+ "settings": {
445
+ "kafka": {
446
+ "brokers": [
447
+ "localhost:9092"
448
+ ],
449
+ "topic": "walkeros-events",
450
+ "key": "user.id"
451
+ }
452
+ },
453
+ "out": [
454
+ [
455
+ "producer.send",
456
+ {
457
+ "topic": "walkeros-events",
458
+ "messages": [
459
+ {
460
+ "key": "usr-789",
461
+ "value": "json:event",
462
+ "headers": {
463
+ "content-type": "application/json"
464
+ },
465
+ "timestamp": "1700000103"
466
+ }
467
+ ],
468
+ "acks": -1,
469
+ "compression": 1
470
+ }
471
+ ]
472
+ ]
473
+ },
474
+ "mappedData": {
475
+ "in": {
476
+ "name": "order complete",
477
+ "data": {
478
+ "id": "ORD-400",
479
+ "total": 99.99,
480
+ "currency": "EUR"
481
+ },
482
+ "context": {
483
+ "shopping": [
484
+ "complete",
485
+ 0
486
+ ]
487
+ },
488
+ "globals": {
489
+ "pagegroup": "shop"
490
+ },
491
+ "custom": {
492
+ "completely": "random"
493
+ },
494
+ "user": {
495
+ "id": "us3r",
496
+ "device": "c00k13",
497
+ "session": "s3ss10n"
498
+ },
499
+ "nested": [
500
+ {
501
+ "entity": "product",
502
+ "data": {
503
+ "id": "ers",
504
+ "name": "Everyday Ruck Snack",
505
+ "color": "black",
506
+ "size": "l",
507
+ "price": 420
508
+ },
509
+ "context": {
510
+ "shopping": [
511
+ "complete",
512
+ 0
513
+ ]
514
+ },
515
+ "nested": []
516
+ },
517
+ {
518
+ "entity": "product",
519
+ "data": {
520
+ "id": "cc",
521
+ "name": "Cool Cap",
522
+ "size": "one size",
523
+ "price": 42
524
+ },
525
+ "context": {
526
+ "shopping": [
527
+ "complete",
528
+ 0
529
+ ]
530
+ },
531
+ "nested": []
532
+ },
533
+ {
534
+ "entity": "gift",
535
+ "data": {
536
+ "name": "Surprise"
537
+ },
538
+ "context": {
539
+ "shopping": [
540
+ "complete",
541
+ 0
542
+ ]
543
+ },
544
+ "nested": []
545
+ }
546
+ ],
547
+ "consent": {
548
+ "functional": true
549
+ },
550
+ "id": "1700000102-gr0up-1",
551
+ "trigger": "load",
552
+ "entity": "order",
553
+ "action": "complete",
554
+ "timestamp": 1700000102,
555
+ "timing": 3.14,
556
+ "group": "gr0up",
557
+ "count": 1,
558
+ "version": {
559
+ "source": "3.4.0-next-1776749829492",
560
+ "tagging": 1
561
+ },
562
+ "source": {
563
+ "type": "web",
564
+ "id": "https://localhost:80",
565
+ "previous_id": "http://remotehost:9001"
566
+ }
567
+ },
568
+ "mapping": {
569
+ "name": "purchase",
570
+ "data": {
571
+ "map": {
572
+ "order_id": "data.id",
573
+ "revenue": "data.total",
574
+ "currency": "data.currency"
575
+ }
576
+ }
577
+ },
578
+ "out": [
579
+ [
580
+ "producer.send",
581
+ {
582
+ "topic": "walkeros-events",
583
+ "messages": [
584
+ {
585
+ "key": "purchase",
586
+ "value": "json:data",
587
+ "headers": {
588
+ "content-type": "application/json"
589
+ },
590
+ "timestamp": "1700000102"
591
+ }
592
+ ],
593
+ "acks": -1,
594
+ "compression": 1
595
+ }
596
+ ]
597
+ ]
598
+ },
599
+ "mappedEventName": {
600
+ "in": {
601
+ "name": "order complete",
602
+ "data": {
603
+ "id": "0rd3r1d",
604
+ "currency": "EUR",
605
+ "shipping": 5.22,
606
+ "taxes": 73.76,
607
+ "total": 555
608
+ },
609
+ "context": {
610
+ "shopping": [
611
+ "complete",
612
+ 0
613
+ ]
614
+ },
615
+ "globals": {
616
+ "pagegroup": "shop"
617
+ },
618
+ "custom": {
619
+ "completely": "random"
620
+ },
621
+ "user": {
622
+ "id": "us3r",
623
+ "device": "c00k13",
624
+ "session": "s3ss10n"
625
+ },
626
+ "nested": [
627
+ {
628
+ "entity": "product",
629
+ "data": {
630
+ "id": "ers",
631
+ "name": "Everyday Ruck Snack",
632
+ "color": "black",
633
+ "size": "l",
634
+ "price": 420
635
+ },
636
+ "context": {
637
+ "shopping": [
638
+ "complete",
639
+ 0
640
+ ]
641
+ },
642
+ "nested": []
643
+ },
644
+ {
645
+ "entity": "product",
646
+ "data": {
647
+ "id": "cc",
648
+ "name": "Cool Cap",
649
+ "size": "one size",
650
+ "price": 42
651
+ },
652
+ "context": {
653
+ "shopping": [
654
+ "complete",
655
+ 0
656
+ ]
657
+ },
658
+ "nested": []
659
+ },
660
+ {
661
+ "entity": "gift",
662
+ "data": {
663
+ "name": "Surprise"
664
+ },
665
+ "context": {
666
+ "shopping": [
667
+ "complete",
668
+ 0
669
+ ]
670
+ },
671
+ "nested": []
672
+ }
673
+ ],
674
+ "consent": {
675
+ "functional": true
676
+ },
677
+ "id": "1700000101-gr0up-1",
678
+ "trigger": "load",
679
+ "entity": "order",
680
+ "action": "complete",
681
+ "timestamp": 1700000101,
682
+ "timing": 3.14,
683
+ "group": "gr0up",
684
+ "count": 1,
685
+ "version": {
686
+ "source": "3.4.0-next-1776749829492",
687
+ "tagging": 1
688
+ },
689
+ "source": {
690
+ "type": "web",
691
+ "id": "https://localhost:80",
692
+ "previous_id": "http://remotehost:9001"
693
+ }
694
+ },
695
+ "mapping": {
696
+ "name": "purchase"
697
+ },
698
+ "out": [
699
+ [
700
+ "producer.send",
701
+ {
702
+ "topic": "walkeros-events",
703
+ "messages": [
704
+ {
705
+ "key": "purchase",
706
+ "value": "json:event",
707
+ "headers": {
708
+ "content-type": "application/json"
709
+ },
710
+ "timestamp": "1700000101"
711
+ }
712
+ ],
713
+ "acks": -1,
714
+ "compression": 1
715
+ }
716
+ ]
717
+ ]
718
+ },
719
+ "topicOverride": {
720
+ "in": {
721
+ "name": "order complete",
722
+ "data": {
723
+ "id": "ORD-500",
724
+ "total": 42
725
+ },
726
+ "context": {
727
+ "shopping": [
728
+ "complete",
729
+ 0
730
+ ]
731
+ },
732
+ "globals": {
733
+ "pagegroup": "shop"
734
+ },
735
+ "custom": {
736
+ "completely": "random"
737
+ },
738
+ "user": {
739
+ "id": "us3r",
740
+ "device": "c00k13",
741
+ "session": "s3ss10n"
742
+ },
743
+ "nested": [
744
+ {
745
+ "entity": "product",
746
+ "data": {
747
+ "id": "ers",
748
+ "name": "Everyday Ruck Snack",
749
+ "color": "black",
750
+ "size": "l",
751
+ "price": 420
752
+ },
753
+ "context": {
754
+ "shopping": [
755
+ "complete",
756
+ 0
757
+ ]
758
+ },
759
+ "nested": []
760
+ },
761
+ {
762
+ "entity": "product",
763
+ "data": {
764
+ "id": "cc",
765
+ "name": "Cool Cap",
766
+ "size": "one size",
767
+ "price": 42
768
+ },
769
+ "context": {
770
+ "shopping": [
771
+ "complete",
772
+ 0
773
+ ]
774
+ },
775
+ "nested": []
776
+ },
777
+ {
778
+ "entity": "gift",
779
+ "data": {
780
+ "name": "Surprise"
781
+ },
782
+ "context": {
783
+ "shopping": [
784
+ "complete",
785
+ 0
786
+ ]
787
+ },
788
+ "nested": []
789
+ }
790
+ ],
791
+ "consent": {
792
+ "functional": true
793
+ },
794
+ "id": "1700000104-gr0up-1",
795
+ "trigger": "load",
796
+ "entity": "order",
797
+ "action": "complete",
798
+ "timestamp": 1700000104,
799
+ "timing": 3.14,
800
+ "group": "gr0up",
801
+ "count": 1,
802
+ "version": {
803
+ "source": "3.4.0-next-1776749829492",
804
+ "tagging": 1
805
+ },
806
+ "source": {
807
+ "type": "web",
808
+ "id": "https://localhost:80",
809
+ "previous_id": "http://remotehost:9001"
810
+ }
811
+ },
812
+ "mapping": {
813
+ "settings": {
814
+ "topic": "orders-stream"
815
+ }
816
+ },
817
+ "out": [
818
+ [
819
+ "producer.send",
820
+ {
821
+ "topic": "orders-stream",
822
+ "messages": [
823
+ {
824
+ "key": "order_complete",
825
+ "value": "json:event",
826
+ "headers": {
827
+ "content-type": "application/json"
828
+ },
829
+ "timestamp": "1700000104"
830
+ }
831
+ ],
832
+ "acks": -1,
833
+ "compression": 1
834
+ }
835
+ ]
836
+ ]
837
+ }
838
+ }
839
+ }
840
+ }