1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.KafkaRequestDeserializer = void 0;
|
4 | const incoming_request_deserializer_1 = require("./incoming-request.deserializer");
|
5 |
|
6 |
|
7 |
|
8 | class KafkaRequestDeserializer extends incoming_request_deserializer_1.IncomingRequestDeserializer {
|
9 | mapToSchema(data, options) {
|
10 | if (!options) {
|
11 | return {
|
12 | pattern: undefined,
|
13 | data: undefined,
|
14 | };
|
15 | }
|
16 | return {
|
17 | pattern: options.channel,
|
18 | data: data?.value ?? data,
|
19 | };
|
20 | }
|
21 | }
|
22 | exports.KafkaRequestDeserializer = KafkaRequestDeserializer;
|