beem-component 2.1.20 → 2.1.22
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.
|
@@ -446,14 +446,49 @@ const QuickReplyRender = _ref24 => {
|
|
|
446
446
|
isImg: true
|
|
447
447
|
}, /*#__PURE__*/_react.default.createElement(ConnectorRenderer, null));
|
|
448
448
|
};
|
|
449
|
-
const
|
|
449
|
+
const ImageRender = _ref25 => {
|
|
450
|
+
let {
|
|
451
|
+
type,
|
|
452
|
+
state,
|
|
453
|
+
rest,
|
|
454
|
+
isInteractive,
|
|
455
|
+
connector,
|
|
456
|
+
caption,
|
|
457
|
+
originalUrl
|
|
458
|
+
} = _ref25;
|
|
459
|
+
const renderers = {
|
|
460
|
+
dotgo_v3: () => {
|
|
461
|
+
var _caption$text;
|
|
462
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, originalUrl && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(BmImageChat, _extends({
|
|
463
|
+
state: state,
|
|
464
|
+
src: originalUrl
|
|
465
|
+
}, rest))), caption && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, caption === null || caption === void 0 || (_caption$text = caption.text) === null || _caption$text === void 0 ? void 0 : _caption$text.split('\n').map((line, idx) => /*#__PURE__*/_react.default.createElement("p", {
|
|
466
|
+
key: "body-line-".concat(idx)
|
|
467
|
+
}, line, /*#__PURE__*/_react.default.createElement("br", null)))));
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
const FallbackRenderer = () => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, originalUrl && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(BmImageChat, _extends({
|
|
471
|
+
state: state,
|
|
472
|
+
src: originalUrl
|
|
473
|
+
}, rest))), caption && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, caption === null || caption === void 0 ? void 0 : caption.split('\n').map((line, idx) => /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", {
|
|
474
|
+
key: "content-line-".concat(idx)
|
|
475
|
+
}, line, /*#__PURE__*/_react.default.createElement("br", null))))));
|
|
476
|
+
const ConnectorRenderer = renderers[connector] || FallbackRenderer;
|
|
477
|
+
return /*#__PURE__*/_react.default.createElement(Messages, {
|
|
478
|
+
type: type,
|
|
479
|
+
state: state,
|
|
480
|
+
isInteractive: isInteractive,
|
|
481
|
+
isImg: true
|
|
482
|
+
}, /*#__PURE__*/_react.default.createElement(ConnectorRenderer, null));
|
|
483
|
+
};
|
|
484
|
+
const ProductDetailRender = _ref26 => {
|
|
450
485
|
let {
|
|
451
486
|
type,
|
|
452
487
|
state,
|
|
453
488
|
header,
|
|
454
489
|
body,
|
|
455
490
|
isInteractive
|
|
456
|
-
} =
|
|
491
|
+
} = _ref26;
|
|
457
492
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Messages, {
|
|
458
493
|
type: type,
|
|
459
494
|
state: state,
|
|
@@ -462,7 +497,7 @@ const ProductDetailRender = _ref25 => {
|
|
|
462
497
|
state: state
|
|
463
498
|
}, /*#__PURE__*/_react.default.createElement(_ShoppingCartOutlined.default, null), "Catalog")));
|
|
464
499
|
};
|
|
465
|
-
const ListReplyRender =
|
|
500
|
+
const ListReplyRender = _ref27 => {
|
|
466
501
|
let {
|
|
467
502
|
title,
|
|
468
503
|
body,
|
|
@@ -474,7 +509,7 @@ const ListReplyRender = _ref26 => {
|
|
|
474
509
|
header,
|
|
475
510
|
action,
|
|
476
511
|
footer
|
|
477
|
-
} =
|
|
512
|
+
} = _ref27;
|
|
478
513
|
const renderers = {
|
|
479
514
|
dotgo_v3: () => {
|
|
480
515
|
var _header$header$type3, _body$text2;
|
|
@@ -498,7 +533,7 @@ const ListReplyRender = _ref26 => {
|
|
|
498
533
|
isInteractive: isInteractive
|
|
499
534
|
}, /*#__PURE__*/_react.default.createElement(ConnectorRenderer, null)));
|
|
500
535
|
};
|
|
501
|
-
const OrderRender =
|
|
536
|
+
const OrderRender = _ref28 => {
|
|
502
537
|
let {
|
|
503
538
|
amount,
|
|
504
539
|
type,
|
|
@@ -507,14 +542,14 @@ const OrderRender = _ref27 => {
|
|
|
507
542
|
product_items,
|
|
508
543
|
connector,
|
|
509
544
|
isInteractive
|
|
510
|
-
} =
|
|
545
|
+
} = _ref28;
|
|
511
546
|
const renderers = {
|
|
512
|
-
dotgo_v3:
|
|
547
|
+
dotgo_v3: _ref29 => {
|
|
513
548
|
let {
|
|
514
549
|
displayItems,
|
|
515
550
|
sumQuantities,
|
|
516
551
|
setDisplayItems
|
|
517
|
-
} =
|
|
552
|
+
} = _ref29;
|
|
518
553
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(OrderBody, {
|
|
519
554
|
state: state
|
|
520
555
|
}, /*#__PURE__*/_react.default.createElement(CartContent, {
|
|
@@ -544,12 +579,12 @@ const OrderRender = _ref27 => {
|
|
|
544
579
|
}, /*#__PURE__*/_react.default.createElement("p", null, displayItems ? 'HIDE' : 'SHOW', " CART ITEMS")));
|
|
545
580
|
}
|
|
546
581
|
};
|
|
547
|
-
const FallbackRenderer =
|
|
582
|
+
const FallbackRenderer = _ref30 => {
|
|
548
583
|
let {
|
|
549
584
|
sumQuantities,
|
|
550
585
|
displayItems,
|
|
551
586
|
setDisplayItems
|
|
552
|
-
} =
|
|
587
|
+
} = _ref30;
|
|
553
588
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(OrderBody, {
|
|
554
589
|
state: state
|
|
555
590
|
}, /*#__PURE__*/_react.default.createElement(CartContent, {
|
|
@@ -596,7 +631,7 @@ const OrderRender = _ref27 => {
|
|
|
596
631
|
items: items
|
|
597
632
|
})));
|
|
598
633
|
};
|
|
599
|
-
BmChat.Details =
|
|
634
|
+
BmChat.Details = _ref31 => {
|
|
600
635
|
var _children$message, _children$message2;
|
|
601
636
|
let {
|
|
602
637
|
children,
|
|
@@ -615,8 +650,8 @@ BmChat.Details = _ref30 => {
|
|
|
615
650
|
isInteractive,
|
|
616
651
|
type,
|
|
617
652
|
extension
|
|
618
|
-
} =
|
|
619
|
-
rest = _objectWithoutProperties(
|
|
653
|
+
} = _ref31,
|
|
654
|
+
rest = _objectWithoutProperties(_ref31, _excluded3);
|
|
620
655
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Details, _extends({
|
|
621
656
|
state: state
|
|
622
657
|
}, rest), /*#__PURE__*/_react.default.createElement(MessageState, null, state === 'inbound' && session && handleState({
|
|
@@ -655,10 +690,16 @@ BmChat.Details = _ref30 => {
|
|
|
655
690
|
type: type,
|
|
656
691
|
state: state,
|
|
657
692
|
connector: metadata.connector
|
|
693
|
+
})) : metadata.message.type === 'image' ? /*#__PURE__*/_react.default.createElement(ImageRender, _extends({
|
|
694
|
+
isInteractive: true
|
|
695
|
+
}, metadata.message, {
|
|
696
|
+
type: type,
|
|
697
|
+
state: state,
|
|
698
|
+
connector: metadata === null || metadata === void 0 ? void 0 : metadata.connector
|
|
658
699
|
})) : /*#__PURE__*/_react.default.createElement(Messages, {
|
|
659
700
|
metadata: metadata,
|
|
660
701
|
state: state
|
|
661
|
-
}, metadata.message), children) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, type && (type === 'interactive' || type === 'order') ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ((children === null || children === void 0 || (_children$message = children.message) === null || _children$message === void 0 ? void 0 : _children$message.type) === 'quick_reply' || (children === null || children === void 0 || (_children$message2 = children.message) === null || _children$message2 === void 0 ? void 0 : _children$message2.type) === 'button') && /*#__PURE__*/_react.default.createElement(QuickReplyRender, _extends({
|
|
702
|
+
}, metadata.message.text), children) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, type && (type === 'interactive' || type === 'order') ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ((children === null || children === void 0 || (_children$message = children.message) === null || _children$message === void 0 ? void 0 : _children$message.type) === 'quick_reply' || (children === null || children === void 0 || (_children$message2 = children.message) === null || _children$message2 === void 0 ? void 0 : _children$message2.type) === 'button') && /*#__PURE__*/_react.default.createElement(QuickReplyRender, _extends({
|
|
662
703
|
rest: rest
|
|
663
704
|
}, children.message, {
|
|
664
705
|
type: type,
|
|
@@ -675,6 +716,10 @@ BmChat.Details = _ref30 => {
|
|
|
675
716
|
type: type,
|
|
676
717
|
state: state,
|
|
677
718
|
connector: children === null || children === void 0 ? void 0 : children.connector
|
|
719
|
+
})), children.message.type === 'image' && /*#__PURE__*/_react.default.createElement(ImageRender, _extends({}, children.message, {
|
|
720
|
+
type: type,
|
|
721
|
+
state: state,
|
|
722
|
+
connector: children === null || children === void 0 ? void 0 : children.connector
|
|
678
723
|
}))) : type === 'pdf' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactPdf.Document, {
|
|
679
724
|
file: {
|
|
680
725
|
url: "".concat(file)
|
package/package.json
CHANGED
package/src/App.js
CHANGED
|
@@ -42,130 +42,467 @@ import { BmChat, GlobalStyle } from './lib/components';
|
|
|
42
42
|
// console.log(datsa);
|
|
43
43
|
|
|
44
44
|
const Chat = () => {
|
|
45
|
+
// const metaQuickReply = [
|
|
46
|
+
// {
|
|
47
|
+
// id: 104342,
|
|
48
|
+
// message:
|
|
49
|
+
// '{\n "type":"list",\n "body":{\n "text":"Please select a service from the options below:"\n },\n "footer":{\n "text":"You can only select one option"\n },\n "action":{\n "button":"Choose Service",\n "sections":[\n {\n "title":"Financial Services",\n "rows":[\n {\n "id":"loan_services",\n "title":"Loan Services",\n "description":"Get personal or business loans"\n },\n {\n "id":"savings_services",\n "title":"Savings & Investments",\n "description":"Grow your money with our plans"\n }\n ]\n },\n {\n "title":"Customer Support",\n "rows":[\n {\n "id":"support_faq",\n "title":"FAQ",\n "description":"Common questions answered"\n },\n {\n "id":"contact_agent",\n "title":"Contact an Agent",\n "description":"Chat with a live support agent"\n }\n ]\n },\n {\n "title":"Promotions",\n "rows":[\n {\n "id":"discounts",\n "title":"Discounts & Offers",\n "description":"Check out latest promotions"\n }\n ]\n }\n ]\n }\n}',
|
|
50
|
+
|
|
51
|
+
// time: '2025-09-17T10:08:10.000Z',
|
|
52
|
+
// direction: 'inbound',
|
|
53
|
+
// message_type: 'interactive',
|
|
54
|
+
// messageId: 'ac498221-3dd9-4b09-ad2b-826c0d1e3e29',
|
|
55
|
+
// is_live_agent: 0,
|
|
56
|
+
// is_deleted: 0,
|
|
57
|
+
// is_comment: 0,
|
|
58
|
+
// channel: 'whatsapp',
|
|
59
|
+
// sent_to_vendor: 1,
|
|
60
|
+
// replyMessageId: null,
|
|
61
|
+
// agent_name: null,
|
|
62
|
+
// df_agent_name: null,
|
|
63
|
+
// resolve_time: null,
|
|
64
|
+
// metadata: null,
|
|
65
|
+
// statusDetails: {
|
|
66
|
+
// statusCode: 3,
|
|
67
|
+
// },
|
|
68
|
+
// },
|
|
69
|
+
// {
|
|
70
|
+
// id: 104342,
|
|
71
|
+
|
|
72
|
+
// message:
|
|
73
|
+
// '{"type":"button","header":{"type":"image","image":{"link":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/cook.jpg"}},"body":{"text":"Hey there! This is a Breakfast bot. \\nWhat would you like to have?"},"action":{"buttons":[{"type":"reply","reply":{"id":"dev-defined-postback1","title":"Tea"}},{"type":"reply","reply":{"id":"dev-defined-postback2","title":"Coffee"}},{"type":"reply","reply":{"id":"dev-defined-postback3","title":"Chat with Agent"}}]}}',
|
|
74
|
+
|
|
75
|
+
// time: '2025-09-17T10:08:10.000Z',
|
|
76
|
+
// direction: 'inbound',
|
|
77
|
+
// message_type: 'interactive',
|
|
78
|
+
// messageId: 'ac498221-3dd9-4b09-ad2b-826c0d1e3e29',
|
|
79
|
+
// is_live_agent: 0,
|
|
80
|
+
// is_deleted: 0,
|
|
81
|
+
// is_comment: 0,
|
|
82
|
+
// channel: 'whatsapp',
|
|
83
|
+
// sent_to_vendor: 1,
|
|
84
|
+
// replyMessageId: null,
|
|
85
|
+
// agent_name: null,
|
|
86
|
+
// df_agent_name: null,
|
|
87
|
+
// resolve_time: null,
|
|
88
|
+
// metadata: null,
|
|
89
|
+
// statusDetails: {
|
|
90
|
+
// statusCode: 3,
|
|
91
|
+
// },
|
|
92
|
+
// },
|
|
93
|
+
// {
|
|
94
|
+
// id: 104342,
|
|
95
|
+
// message:
|
|
96
|
+
// '{\n "type":"button",\n "body":{\n "text":"Hey there! This is a Breakfast bot. \\nWhat would you like to have?"\n },\n "action":{\n "buttons":[\n {\n "type":"reply",\n "reply":{\n "id":"dev-defined-postback1",\n "title":"Tea"\n }\n },\n {\n "type":"reply",\n "reply":{\n "id":"dev-defined-postback2",\n "title":"Coffee"\n }\n },\n {\n "type":"reply",\n "reply":{\n "id":"dev-defined-postback3",\n "title":"Chat with Agent"\n }\n }\n ]\n }\n}',
|
|
97
|
+
// time: '2025-09-17T10:08:10.000Z',
|
|
98
|
+
// direction: 'inbound',
|
|
99
|
+
// message_type: 'interactive',
|
|
100
|
+
// messageId: 'ac498221-3dd9-4b09-ad2b-826c0d1e3e29',
|
|
101
|
+
// is_live_agent: 0,
|
|
102
|
+
// is_deleted: 0,
|
|
103
|
+
// is_comment: 0,
|
|
104
|
+
// channel: 'whatsapp',
|
|
105
|
+
// sent_to_vendor: 1,
|
|
106
|
+
// replyMessageId: null,
|
|
107
|
+
// agent_name: null,
|
|
108
|
+
// df_agent_name: null,
|
|
109
|
+
// resolve_time: null,
|
|
110
|
+
// metadata: null,
|
|
111
|
+
// statusDetails: {
|
|
112
|
+
// statusCode: 3,
|
|
113
|
+
// },
|
|
114
|
+
// },
|
|
115
|
+
|
|
116
|
+
// {
|
|
117
|
+
// id: 104342,
|
|
118
|
+
// message:
|
|
119
|
+
// '{"dotgoV2":{"type":"quick_reply","content":{"type":"text","header":"","text":"We value your opinion! Would you be willing to take a short survey to help us improve?","caption":""},"options":[{"type":"text","title":"Give Feedback","postbackText":"bm-feedback|0|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"No Thank You","postbackText":"dev-defined-postback2"}]}}',
|
|
120
|
+
// time: '2025-09-17T10:08:10.000Z',
|
|
121
|
+
// direction: 'outbound',
|
|
122
|
+
// message_type: 'interactive',
|
|
123
|
+
// messageId: 'ac498221-3dd9-4b09-ad2b-826c0d1e3e29',
|
|
124
|
+
// is_live_agent: 0,
|
|
125
|
+
// is_deleted: 0,
|
|
126
|
+
// is_comment: 0,
|
|
127
|
+
// channel: 'whatsapp',
|
|
128
|
+
// sent_to_vendor: 1,
|
|
129
|
+
// replyMessageId: null,
|
|
130
|
+
// agent_name: null,
|
|
131
|
+
// df_agent_name: null,
|
|
132
|
+
// resolve_time: null,
|
|
133
|
+
// metadata: null,
|
|
134
|
+
// statusDetails: {
|
|
135
|
+
// statusCode: 3,
|
|
136
|
+
// },
|
|
137
|
+
// },
|
|
138
|
+
// {
|
|
139
|
+
// id: 104342,
|
|
140
|
+
// message:
|
|
141
|
+
// '{"dotgoV2":{"type":"list","title":"Question 3 of 7","body":"No oh ny","globalButtons":[{"type":"text","title":"Responses"}],"items":[{"title":"Responses","subtitle":"","options":[{"type":"text","title":"1","postbackText":"bm-feedback|3|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"2","postbackText":"bm-feedback|3|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"3","postbackText":"bm-feedback|3|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"4","postbackText":"bm-feedback|3|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"5","postbackText":"bm-feedback|3|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"6","postbackText":"bm-feedback|3|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"7","postbackText":"bm-feedback|3|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"8","postbackText":"bm-feedback|3|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"9","postbackText":"bm-feedback|3|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"10","postbackText":"bm-feedback|3|fd4858ed-0fbd-4da1-9453-ecf3a1371874"}]}]}}',
|
|
142
|
+
// time: '2025-09-17T10:08:10.000Z',
|
|
143
|
+
// direction: 'outbound',
|
|
144
|
+
// message_type: 'interactive',
|
|
145
|
+
// messageId: 'ac498221-3dd9-4b09-ad2b-826c0d1e3e29',
|
|
146
|
+
// is_live_agent: 0,
|
|
147
|
+
// is_deleted: 0,
|
|
148
|
+
// is_comment: 0,
|
|
149
|
+
// channel: 'whatsapp',
|
|
150
|
+
// sent_to_vendor: 1,
|
|
151
|
+
// replyMessageId: null,
|
|
152
|
+
// agent_name: null,
|
|
153
|
+
// df_agent_name: null,
|
|
154
|
+
// resolve_time: null,
|
|
155
|
+
// metadata: null,
|
|
156
|
+
// statusDetails: {
|
|
157
|
+
// statusCode: 3,
|
|
158
|
+
// },
|
|
159
|
+
// },
|
|
160
|
+
// {
|
|
161
|
+
// id: 104342,
|
|
162
|
+
// message:
|
|
163
|
+
// '{"dotgoV2":{"type":"quick_reply","content":{"type":"image","header":"yest","url":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/cook.jpg","text":"We value your opinion! Would you be willing to take a short survey to help us improve?","caption":""},"options":[{"type":"text","title":"Give Feedback","postbackText":"bm-feedback|0|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"No Thank You","postbackText":"dev-defined-postback2"}]}}',
|
|
164
|
+
// time: '2025-09-17T10:08:10.000Z',
|
|
165
|
+
// direction: 'outbound',
|
|
166
|
+
// message_type: 'interactive',
|
|
167
|
+
// messageId: 'ac498221-3dd9-4b09-ad2b-826c0d1e3e29',
|
|
168
|
+
// is_live_agent: 0,
|
|
169
|
+
// is_deleted: 0,
|
|
170
|
+
// is_comment: 0,
|
|
171
|
+
// channel: 'whatsapp',
|
|
172
|
+
// sent_to_vendor: 1,
|
|
173
|
+
// replyMessageId: null,
|
|
174
|
+
// agent_name: null,
|
|
175
|
+
// df_agent_name: null,
|
|
176
|
+
// resolve_time: null,
|
|
177
|
+
// metadata: null,
|
|
178
|
+
// statusDetails: {
|
|
179
|
+
// statusCode: 3,
|
|
180
|
+
// },
|
|
181
|
+
// },
|
|
182
|
+
// {
|
|
183
|
+
// id: 104429,
|
|
184
|
+
// message: 'Give Feedback',
|
|
185
|
+
// time: '2025-09-18T02:48:51.000Z',
|
|
186
|
+
// direction: 'inbound',
|
|
187
|
+
// message_type: 'text',
|
|
188
|
+
// messageId:
|
|
189
|
+
// 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNBRTE0QjVENTkxM0ZDNDUxMkY3RTA0NEU4NzEyQzUA',
|
|
190
|
+
// is_live_agent: 1,
|
|
191
|
+
// is_deleted: 0,
|
|
192
|
+
// is_comment: 0,
|
|
193
|
+
// channel: 'whatsapp',
|
|
194
|
+
// sent_to_vendor: 1,
|
|
195
|
+
// replyMessageId: 'eaf92cdf-32c7-4524-a11e-dd9cdf37d717',
|
|
196
|
+
// agent_name: null,
|
|
197
|
+
// df_agent_name: null,
|
|
198
|
+
// resolve_time: null,
|
|
199
|
+
// metadata: null,
|
|
200
|
+
// },
|
|
201
|
+
// {
|
|
202
|
+
// id: 104429,
|
|
203
|
+
// message:
|
|
204
|
+
// '{"catalog_id":"3567267706900621","product_items":[{"id":182,"currency":"TZS","amount":10000,"quantity":1,"description":"1 Burger Kalimiz Burger Philly Beef","imgURL":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/a6176a3a-a918-4623-b22d-99ceca7b9fad 1.jpg"},{"id":181,"currency":"TZS","amount":10000,"quantity":1,"description":"1 Burger Kalimiz Burger Bollywood Paneer","imgURL":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/fed84589-31c5-4ea9-8505-75ceb4932906 1.jpg"}],"type":"order"}',
|
|
205
|
+
// time: '2025-09-18T02:48:51.000Z',
|
|
206
|
+
// direction: 'inbound',
|
|
207
|
+
// message_type: 'order',
|
|
208
|
+
// messageId:
|
|
209
|
+
// 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNBRTE0QjVENTkxM0ZDNDUxMkY3RTA0NEU4NzEyQzUA',
|
|
210
|
+
// is_live_agent: 1,
|
|
211
|
+
// is_deleted: 0,
|
|
212
|
+
// is_comment: 0,
|
|
213
|
+
// channel: 'whatsapp',
|
|
214
|
+
// sent_to_vendor: 1,
|
|
215
|
+
// replyMessageId: 'eaf92cdf-32c7-4524-a11e-dd9cdf37d717',
|
|
216
|
+
// agent_name: null,
|
|
217
|
+
// df_agent_name: null,
|
|
218
|
+
// resolve_time: null,
|
|
219
|
+
// metadata: null,
|
|
220
|
+
// },
|
|
221
|
+
// {
|
|
222
|
+
// id: 104429,
|
|
223
|
+
// message:
|
|
224
|
+
// '{"dotgoV2":{"type":"order","catalog":{"id":"3567267706900621","order":{"items":[{"id":181,"currency":"TZS","amount":"10000","quantity":"1","description":"1 Burger Kalimiz Burger Bollywood Paneer","imgURL":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/fed84589-31c5-4ea9-8505-75ceb4932906 1.jpg"},{"id":182,"currency":"TZS","amount":"10000","quantity":"1","description":"1 Burger Kalimiz Burger Philly Beef","imgURL":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/a6176a3a-a918-4623-b22d-99ceca7b9fad 1.jpg"}]}},"forwarded":false,"frequently_forwarded":false}}',
|
|
225
|
+
// time: '2025-09-18T02:48:51.000Z',
|
|
226
|
+
// direction: 'outbound',
|
|
227
|
+
// message_type: 'order',
|
|
228
|
+
// messageId:
|
|
229
|
+
// 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNBRTE0QjVENTkxM0ZDNDUxMkY3RTA0NEU4NzEyQzUA',
|
|
230
|
+
// is_live_agent: 1,
|
|
231
|
+
// is_deleted: 0,
|
|
232
|
+
// is_comment: 0,
|
|
233
|
+
// channel: 'whatsapp',
|
|
234
|
+
// sent_to_vendor: 1,
|
|
235
|
+
// replyMessageId: 'eaf92cdf-32c7-4524-a11e-dd9cdf37d717',
|
|
236
|
+
// agent_name: null,
|
|
237
|
+
// df_agent_name: null,
|
|
238
|
+
// resolve_time: null,
|
|
239
|
+
// metadata: null,
|
|
240
|
+
// },
|
|
241
|
+
// {
|
|
242
|
+
// id: 104429,
|
|
243
|
+
|
|
244
|
+
// message:
|
|
245
|
+
// '{"dotgoV2":{"type":"product_details","subType":"product_list","catalogId":"3567267706900621","header":{"text":"View Menu"},"body":{"text":"Menu included \\n "},"footer":{"text":"sdefsdfsdf"},"sections":[{"title":"Title 1","productList":[{"productId":181},{"productId":182},{"productId":183}]}]}}',
|
|
246
|
+
// time: '2025-09-18T02:48:51.000Z',
|
|
247
|
+
// direction: 'outbound',
|
|
248
|
+
// message_type: 'interactive',
|
|
249
|
+
// messageId:
|
|
250
|
+
// 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNBRTE0QjVENTkxM0ZDNDUxMkY3RTA0NEU4NzEyQzUA',
|
|
251
|
+
// is_live_agent: 1,
|
|
252
|
+
// is_deleted: 0,
|
|
253
|
+
// is_comment: 0,
|
|
254
|
+
// channel: 'whatsapp',
|
|
255
|
+
// sent_to_vendor: 1,
|
|
256
|
+
// replyMessageId: 'eaf92cdf-32c7-4524-a11e-dd9cdf37d717',
|
|
257
|
+
// agent_name: null,
|
|
258
|
+
// df_agent_name: null,
|
|
259
|
+
// resolve_time: null,
|
|
260
|
+
// metadata: null,
|
|
261
|
+
// },
|
|
262
|
+
// {
|
|
263
|
+
// id: 104704,
|
|
264
|
+
// message: '3',
|
|
265
|
+
// time: '2025-09-19T03:51:43.000Z',
|
|
266
|
+
// direction: 'inbound',
|
|
267
|
+
// message_type: 'text',
|
|
268
|
+
// messageId:
|
|
269
|
+
// 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNEMkRFMTEyQUI1OTMxQTQwMzc1Rjk1QjY4M0MyNjYA',
|
|
270
|
+
// is_live_agent: 1,
|
|
271
|
+
// is_deleted: 0,
|
|
272
|
+
// is_comment: 0,
|
|
273
|
+
// channel: 'whatsapp',
|
|
274
|
+
// sent_to_vendor: 1,
|
|
275
|
+
// replyMessageId: 'c39b331f-629d-4244-98a2-eeda660fcd7d',
|
|
276
|
+
// agent_name: null,
|
|
277
|
+
// df_agent_name: null,
|
|
278
|
+
// resolve_time: null,
|
|
279
|
+
// metadata: {
|
|
280
|
+
// id: 'c39b331f-629d-4244-98a2-eeda660fcd7d',
|
|
281
|
+
// prev_message:
|
|
282
|
+
// '{"type":"list","header":{"type":"text","text":"Question 1 of 7"},"body":{"text":"No wway"},"footer":{"text":"Responses"},"action":{"button":"Select an option","sections":[{"title":"Responses","rows":[{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|0","title":"1","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|1","title":"2","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|2","title":"3","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|3","title":"4","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|4","title":"5","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|5","title":"6","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|6","title":"7","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|7","title":"8","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|8","title":"9","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|9","title":"10","description":""}]}]}}',
|
|
283
|
+
// },
|
|
284
|
+
// },
|
|
285
|
+
// {
|
|
286
|
+
// id: 104702,
|
|
287
|
+
// message: 'Give Feedback',
|
|
288
|
+
// time: '2025-09-19T03:51:23.000Z',
|
|
289
|
+
// direction: 'outbound',
|
|
290
|
+
// message_type: 'text',
|
|
291
|
+
// messageId:
|
|
292
|
+
// 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUM0RkMzNERFODBCQTI3RTdBMUQzMUY4MzEyQ0FBNzgA',
|
|
293
|
+
// is_live_agent: 1,
|
|
294
|
+
// is_deleted: 0,
|
|
295
|
+
// is_comment: 0,
|
|
296
|
+
// channel: 'whatsapp',
|
|
297
|
+
// sent_to_vendor: 1,
|
|
298
|
+
// replyMessageId: '283d451e-3fe2-478c-8d7a-433a703dbab4',
|
|
299
|
+
// agent_name: null,
|
|
300
|
+
// df_agent_name: null,
|
|
301
|
+
// resolve_time: null,
|
|
302
|
+
// metadata: {
|
|
303
|
+
// id: '283d451e-3fe2-478c-8d7a-433a703dbab4',
|
|
304
|
+
// prev_message:
|
|
305
|
+
// '{"dotgoV2":{"type":"quick_reply","content":{"type":"text","header":"","text":"We value your opinion! Would you be willing to take a short survey to help us improve?","caption":""},"options":[{"type":"text","title":"Give Feedback","postbackText":"bm-feedback|0|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"No Thank You","postbackText":"dev-defined-postback2"}]}}',
|
|
306
|
+
// },
|
|
307
|
+
// },
|
|
308
|
+
// {
|
|
309
|
+
// id: 104709,
|
|
310
|
+
// message: 'Test',
|
|
311
|
+
// time: '2025-09-19T04:16:06.000Z',
|
|
312
|
+
// direction: 'inbound',
|
|
313
|
+
// message_type: 'text',
|
|
314
|
+
// messageId:
|
|
315
|
+
// 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUMxQkQ0NzRGNjBBMkU2NDcwNjEzNTQ1NUJGMzYzNjIA',
|
|
316
|
+
// is_live_agent: 1,
|
|
317
|
+
// is_deleted: 0,
|
|
318
|
+
// is_comment: 0,
|
|
319
|
+
// channel: 'whatsapp',
|
|
320
|
+
// sent_to_vendor: 1,
|
|
321
|
+
// replyMessageId: 'f556a647-a115-453f-8461-c2caafc6aeaf',
|
|
322
|
+
// agent_name: null,
|
|
323
|
+
// df_agent_name: null,
|
|
324
|
+
// resolve_time: null,
|
|
325
|
+
// metadata: {
|
|
326
|
+
// id: 'f556a647-a115-453f-8461-c2caafc6aeaf',
|
|
327
|
+
// prev_message:
|
|
328
|
+
// '{"dotgoV2":{"type":"product_details","subType":"product_list","catalogId":"3567267706900621","header":{"text":"View Menu"},"body":{"text":"Menu included \\n "},"footer":{"text":"sdefsdfsdf"},"sections":[{"title":"Title 1","productList":[{"productId":182}]}]}}',
|
|
329
|
+
// },
|
|
330
|
+
// },
|
|
331
|
+
// {
|
|
332
|
+
// id: 104729,
|
|
333
|
+
// message: 'Test',
|
|
334
|
+
// time: '2025-09-19T04:36:32.000Z',
|
|
335
|
+
// direction: 'inbound',
|
|
336
|
+
// message_type: 'text',
|
|
337
|
+
// messageId:
|
|
338
|
+
// 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUM1QTU1MTBBM0M2MkE1NUY3M0YyMzI1NkU1RTVEQjQA',
|
|
339
|
+
// is_live_agent: 0,
|
|
340
|
+
// is_deleted: 0,
|
|
341
|
+
// is_comment: 0,
|
|
342
|
+
// channel: 'whatsapp',
|
|
343
|
+
// sent_to_vendor: 1,
|
|
344
|
+
// replyMessageId:
|
|
345
|
+
// 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNFODBDNTNBREMyRDFCODNBNEM1NzI4QTgxNERGMTgA',
|
|
346
|
+
// agent_name: null,
|
|
347
|
+
// df_agent_name: null,
|
|
348
|
+
// resolve_time: null,
|
|
349
|
+
// metadata: {
|
|
350
|
+
// id: 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNFODBDNTNBREMyRDFCODNBNEM1NzI4QTgxNERGMTgA',
|
|
351
|
+
// prev_message:
|
|
352
|
+
// '{"catalog_id":"3567267706900621","product_items":[{"id":193,"currency":"TZS","amount":10000,"quantity":1,"description":"1 Salad Kalimiz Salad Assian Noodle Salad","imgURL":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/384d26b3-87cd-407f-a9d3-7b2977ab0a22 1.jpg"}],"type":"order"}',
|
|
353
|
+
// },
|
|
354
|
+
// },
|
|
355
|
+
// {
|
|
356
|
+
// id: 104729,
|
|
357
|
+
// message: 'Test',
|
|
358
|
+
// time: '2025-09-19T04:36:32.000Z',
|
|
359
|
+
// direction: 'inbound',
|
|
360
|
+
// message_type: 'text',
|
|
361
|
+
// messageId:
|
|
362
|
+
// 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUM1QTU1MTBBM0M2MkE1NUY3M0YyMzI1NkU1RTVEQjQA',
|
|
363
|
+
// is_live_agent: 0,
|
|
364
|
+
// is_deleted: 0,
|
|
365
|
+
// is_comment: 0,
|
|
366
|
+
// channel: 'whatsapp',
|
|
367
|
+
// sent_to_vendor: 1,
|
|
368
|
+
// replyMessageId:
|
|
369
|
+
// 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNFODBDNTNBREMyRDFCODNBNEM1NzI4QTgxNERGMTgA',
|
|
370
|
+
// agent_name: null,
|
|
371
|
+
// df_agent_name: null,
|
|
372
|
+
// resolve_time: null,
|
|
373
|
+
// metadata: {
|
|
374
|
+
// id: 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNFODBDNTNBREMyRDFCODNBNEM1NzI4QTgxNERGMTgA',
|
|
375
|
+
// prev_message:
|
|
376
|
+
// '{"dotgoV2":{"type":"order","catalog":{"id":"3567267706900621","order":{"items":[{"id":181,"currency":"TZS","amount":"10000","quantity":"1","description":"1 Burger Kalimiz Burger Bollywood Paneer","imgURL":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/fed84589-31c5-4ea9-8505-75ceb4932906 1.jpg"},{"id":182,"currency":"TZS","amount":"10000","quantity":"1","description":"1 Burger Kalimiz Burger Philly Beef","imgURL":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/a6176a3a-a918-4623-b22d-99ceca7b9fad 1.jpg"}]}},"forwarded":false,"frequently_forwarded":false}}',
|
|
377
|
+
// },
|
|
378
|
+
// },
|
|
379
|
+
// ];
|
|
380
|
+
|
|
45
381
|
const metaQuickReply = [
|
|
46
382
|
{
|
|
47
|
-
id:
|
|
48
|
-
message:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
time: '2025-09-17T10:08:10.000Z',
|
|
383
|
+
id: 104759,
|
|
384
|
+
message: 'Second outbound',
|
|
385
|
+
time: '2025-09-20T05:22:38.000Z',
|
|
52
386
|
direction: 'inbound',
|
|
53
|
-
message_type: '
|
|
54
|
-
messageId:
|
|
387
|
+
message_type: 'text',
|
|
388
|
+
messageId:
|
|
389
|
+
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUM4M0JFNzM1QjI4QkQzQjcyQUE4ODdBQzJGMDBBQjQA',
|
|
55
390
|
is_live_agent: 0,
|
|
56
391
|
is_deleted: 0,
|
|
57
392
|
is_comment: 0,
|
|
58
393
|
channel: 'whatsapp',
|
|
59
394
|
sent_to_vendor: 1,
|
|
60
|
-
replyMessageId:
|
|
395
|
+
replyMessageId: '36222689-a3e0-4597-8872-9af486fd1fd7',
|
|
61
396
|
agent_name: null,
|
|
62
397
|
df_agent_name: null,
|
|
63
398
|
resolve_time: null,
|
|
64
|
-
metadata:
|
|
65
|
-
|
|
66
|
-
|
|
399
|
+
metadata: {
|
|
400
|
+
id: '36222689-a3e0-4597-8872-9af486fd1fd7',
|
|
401
|
+
prev_message: 'second outbound initiated',
|
|
67
402
|
},
|
|
68
403
|
},
|
|
69
404
|
{
|
|
70
|
-
id:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
'{"type":"button","header":{"type":"image","image":{"link":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/cook.jpg"}},"body":{"text":"Hey there! This is a Breakfast bot. \\nWhat would you like to have?"},"action":{"buttons":[{"type":"reply","reply":{"id":"dev-defined-postback1","title":"Tea"}},{"type":"reply","reply":{"id":"dev-defined-postback2","title":"Coffee"}},{"type":"reply","reply":{"id":"dev-defined-postback3","title":"Chat with Agent"}}]}}',
|
|
74
|
-
|
|
75
|
-
time: '2025-09-17T10:08:10.000Z',
|
|
405
|
+
id: 104758,
|
|
406
|
+
message: 'Bounce',
|
|
407
|
+
time: '2025-09-20T05:19:44.000Z',
|
|
76
408
|
direction: 'inbound',
|
|
77
|
-
message_type: '
|
|
78
|
-
messageId:
|
|
409
|
+
message_type: 'text',
|
|
410
|
+
messageId:
|
|
411
|
+
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUMxMjAyOUQ0MDQ4MUVBNDM4NTdGNTE2NTlFMUY3REUA',
|
|
79
412
|
is_live_agent: 0,
|
|
80
413
|
is_deleted: 0,
|
|
81
414
|
is_comment: 0,
|
|
82
415
|
channel: 'whatsapp',
|
|
83
416
|
sent_to_vendor: 1,
|
|
84
|
-
replyMessageId:
|
|
417
|
+
replyMessageId:
|
|
418
|
+
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUM2M0Y2OUI3RkU0RDI2MjFBMDVGRDg1N0RBQkQyMEUA',
|
|
85
419
|
agent_name: null,
|
|
86
420
|
df_agent_name: null,
|
|
87
421
|
resolve_time: null,
|
|
88
|
-
metadata:
|
|
89
|
-
|
|
90
|
-
|
|
422
|
+
metadata: {
|
|
423
|
+
id: 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUM2M0Y2OUI3RkU0RDI2MjFBMDVGRDg1N0RBQkQyMEUA',
|
|
424
|
+
prev_message: 'Refeto secomd',
|
|
91
425
|
},
|
|
92
426
|
},
|
|
93
427
|
{
|
|
94
|
-
id:
|
|
95
|
-
message:
|
|
96
|
-
|
|
97
|
-
time: '2025-09-17T10:08:10.000Z',
|
|
428
|
+
id: 104757,
|
|
429
|
+
message: 'Chai',
|
|
430
|
+
time: '2025-09-20T05:15:05.000Z',
|
|
98
431
|
direction: 'inbound',
|
|
99
|
-
message_type: '
|
|
100
|
-
messageId:
|
|
432
|
+
message_type: 'text',
|
|
433
|
+
messageId:
|
|
434
|
+
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNFNzhDMkRBOUU5OEVDQzhBNThCODhDMzg2RTNCREEA',
|
|
101
435
|
is_live_agent: 0,
|
|
102
436
|
is_deleted: 0,
|
|
103
437
|
is_comment: 0,
|
|
104
438
|
channel: 'whatsapp',
|
|
105
439
|
sent_to_vendor: 1,
|
|
106
|
-
replyMessageId:
|
|
440
|
+
replyMessageId: '65352cb5-3800-4e78-aaba-f01dc9aadd58',
|
|
107
441
|
agent_name: null,
|
|
108
442
|
df_agent_name: null,
|
|
109
443
|
resolve_time: null,
|
|
110
|
-
metadata:
|
|
111
|
-
|
|
112
|
-
|
|
444
|
+
metadata: {
|
|
445
|
+
id: '65352cb5-3800-4e78-aaba-f01dc9aadd58',
|
|
446
|
+
prev_message:
|
|
447
|
+
'{\n "type":"button",\n "header":{\n "type":"image",\n "image":{\n "link":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/cook.jpg"\n }\n },\n "body":{\n "text":"Hey there! This is a Breakfast bot. \\nWhat would you like to have?"\n },\n "action":{\n "buttons":[\n {\n "type":"reply",\n "reply":{\n "id":"dev-defined-postback1",\n "title":"Tea"\n }\n },\n {\n "type":"reply",\n "reply":{\n "id":"dev-defined-postback2",\n "title":"Coffee"\n }\n },\n {\n "type":"reply",\n "reply":{\n "id":"dev-defined-postback3",\n "title":"Chat with Agent"\n }\n }\n ]\n }\n}',
|
|
113
448
|
},
|
|
114
449
|
},
|
|
115
|
-
|
|
116
450
|
{
|
|
117
|
-
id:
|
|
118
|
-
message:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
451
|
+
id: 104756,
|
|
452
|
+
message: 'Price',
|
|
453
|
+
time: '2025-09-20T05:11:36.000Z',
|
|
454
|
+
direction: 'inbound',
|
|
455
|
+
message_type: 'text',
|
|
456
|
+
messageId:
|
|
457
|
+
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNFMkM5NTA0NzU2MTU2RjA2MTEwRDBDM0QxOTQxODIA',
|
|
124
458
|
is_live_agent: 0,
|
|
125
459
|
is_deleted: 0,
|
|
126
460
|
is_comment: 0,
|
|
127
461
|
channel: 'whatsapp',
|
|
128
462
|
sent_to_vendor: 1,
|
|
129
|
-
replyMessageId:
|
|
463
|
+
replyMessageId:
|
|
464
|
+
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUMwMzk1RjQxQjg1RTU5QzAwM0M5Q0FFMTg2NEFCNDgA',
|
|
130
465
|
agent_name: null,
|
|
131
466
|
df_agent_name: null,
|
|
132
467
|
resolve_time: null,
|
|
133
|
-
metadata:
|
|
134
|
-
|
|
135
|
-
|
|
468
|
+
metadata: {
|
|
469
|
+
id: 'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUMwMzk1RjQxQjg1RTU5QzAwM0M5Q0FFMTg2NEFCNDgA',
|
|
470
|
+
prev_message:
|
|
471
|
+
'{"catalog_id":"3567267706900621","product_items":[{"id":193,"currency":"TZS","amount":10000,"quantity":2,"description":"1 Salad Kalimiz Salad Assian Noodle Salad","imgURL":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/384d26b3-87cd-407f-a9d3-7b2977ab0a22 1.jpg"}],"type":"order"}',
|
|
136
472
|
},
|
|
137
473
|
},
|
|
138
474
|
{
|
|
139
|
-
id:
|
|
140
|
-
message:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
475
|
+
id: 104755,
|
|
476
|
+
message: 'Test',
|
|
477
|
+
time: '2025-09-20T05:11:22.000Z',
|
|
478
|
+
direction: 'inbound',
|
|
479
|
+
message_type: 'text',
|
|
480
|
+
messageId:
|
|
481
|
+
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUMxMERENThDNDk0QjExNTE5MUFFNjgwM0M1OUU3NTMA',
|
|
146
482
|
is_live_agent: 0,
|
|
147
483
|
is_deleted: 0,
|
|
148
484
|
is_comment: 0,
|
|
149
485
|
channel: 'whatsapp',
|
|
150
486
|
sent_to_vendor: 1,
|
|
151
|
-
replyMessageId:
|
|
487
|
+
replyMessageId: '47a32fc1-7684-47e7-bff7-6eb0951663cb',
|
|
152
488
|
agent_name: null,
|
|
153
489
|
df_agent_name: null,
|
|
154
490
|
resolve_time: null,
|
|
155
|
-
metadata:
|
|
156
|
-
|
|
157
|
-
|
|
491
|
+
metadata: {
|
|
492
|
+
id: '47a32fc1-7684-47e7-bff7-6eb0951663cb',
|
|
493
|
+
prev_message:
|
|
494
|
+
'{"dotgoV2":{"type":"product_details","subType":"product_list","catalogId":"3567267706900621","header":{"text":"View Menu"},"body":{"text":"Menu included \\n "},"footer":{"text":"sdefsdfsdf"},"sections":[{"title":"Title 1","productList":[{"productId":181}]}]}}',
|
|
158
495
|
},
|
|
159
496
|
},
|
|
160
497
|
{
|
|
161
|
-
id:
|
|
498
|
+
id: 104754,
|
|
162
499
|
message:
|
|
163
|
-
'{"dotgoV2":{"type":"quick_reply","content":{"type":"
|
|
164
|
-
time: '2025-09-
|
|
500
|
+
'{"dotgoV2":{"type":"quick_reply","content":{"type":"text","header":"","text":"Successfully end the session.","caption":""},"options":[{"type":"text","title":"Main Menu","postbackText":"dev-defined-postback1"}]}}',
|
|
501
|
+
time: '2025-09-20T02:20:00.000Z',
|
|
165
502
|
direction: 'outbound',
|
|
166
503
|
message_type: 'interactive',
|
|
167
|
-
messageId:
|
|
168
|
-
is_live_agent:
|
|
504
|
+
messageId: null,
|
|
505
|
+
is_live_agent: 1,
|
|
169
506
|
is_deleted: 0,
|
|
170
507
|
is_comment: 0,
|
|
171
508
|
channel: 'whatsapp',
|
|
@@ -180,204 +517,156 @@ const Chat = () => {
|
|
|
180
517
|
},
|
|
181
518
|
},
|
|
182
519
|
{
|
|
183
|
-
id:
|
|
184
|
-
message:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
is_live_agent:
|
|
520
|
+
id: 104752,
|
|
521
|
+
message:
|
|
522
|
+
'{"dotgoV2":{"type":"product_details","subType":"product_list","catalogId":"3567267706900621","header":{"text":"View Menu"},"body":{"text":"Menu included \\n "},"footer":{"text":"sdefsdfsdf"},"sections":[{"title":"Title 1","productList":[{"productId":181}]}]}}',
|
|
523
|
+
time: '2025-09-19T08:24:49.000Z',
|
|
524
|
+
direction: 'outbound',
|
|
525
|
+
message_type: 'interactive',
|
|
526
|
+
messageId: '47a32fc1-7684-47e7-bff7-6eb0951663cb',
|
|
527
|
+
is_live_agent: 0,
|
|
191
528
|
is_deleted: 0,
|
|
192
529
|
is_comment: 0,
|
|
193
530
|
channel: 'whatsapp',
|
|
194
531
|
sent_to_vendor: 1,
|
|
195
|
-
replyMessageId:
|
|
196
|
-
agent_name:
|
|
197
|
-
df_agent_name:
|
|
532
|
+
replyMessageId: null,
|
|
533
|
+
agent_name: 'mustafa.s@beem.africa',
|
|
534
|
+
df_agent_name: 'Mustafa Saifuddin',
|
|
198
535
|
resolve_time: null,
|
|
199
536
|
metadata: null,
|
|
537
|
+
statusDetails: {
|
|
538
|
+
statusCode: 3,
|
|
539
|
+
},
|
|
200
540
|
},
|
|
201
541
|
{
|
|
202
|
-
id:
|
|
542
|
+
id: 104751,
|
|
203
543
|
message:
|
|
204
|
-
'{"catalog_id":"3567267706900621","product_items":[{"id":
|
|
205
|
-
time: '2025-09-
|
|
544
|
+
'{"catalog_id":"3567267706900621","product_items":[{"id":193,"currency":"TZS","amount":10000,"quantity":2,"description":"1 Salad Kalimiz Salad Assian Noodle Salad","imgURL":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/384d26b3-87cd-407f-a9d3-7b2977ab0a22 1.jpg"}],"type":"order"}',
|
|
545
|
+
time: '2025-09-19T06:30:24.000Z',
|
|
206
546
|
direction: 'inbound',
|
|
207
547
|
message_type: 'order',
|
|
208
548
|
messageId:
|
|
209
|
-
'wamid.
|
|
210
|
-
is_live_agent:
|
|
549
|
+
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUMwMzk1RjQxQjg1RTU5QzAwM0M5Q0FFMTg2NEFCNDgA',
|
|
550
|
+
is_live_agent: 0,
|
|
211
551
|
is_deleted: 0,
|
|
212
552
|
is_comment: 0,
|
|
213
553
|
channel: 'whatsapp',
|
|
214
554
|
sent_to_vendor: 1,
|
|
215
|
-
replyMessageId:
|
|
555
|
+
replyMessageId: null,
|
|
216
556
|
agent_name: null,
|
|
217
557
|
df_agent_name: null,
|
|
218
558
|
resolve_time: null,
|
|
219
559
|
metadata: null,
|
|
220
560
|
},
|
|
221
561
|
{
|
|
222
|
-
id:
|
|
562
|
+
id: 104750,
|
|
223
563
|
message:
|
|
224
|
-
'{"
|
|
225
|
-
time: '2025-09-
|
|
226
|
-
direction: '
|
|
564
|
+
'{"catalog_id":"3567267706900621","product_items":[{"id":193,"currency":"TZS","amount":10000,"quantity":1,"description":"1 Salad Kalimiz Salad Assian Noodle Salad","imgURL":"https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/384d26b3-87cd-407f-a9d3-7b2977ab0a22 1.jpg"}],"type":"order"}',
|
|
565
|
+
time: '2025-09-19T06:29:51.000Z',
|
|
566
|
+
direction: 'inbound',
|
|
227
567
|
message_type: 'order',
|
|
228
568
|
messageId:
|
|
229
|
-
'wamid.
|
|
230
|
-
is_live_agent:
|
|
569
|
+
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUM1RDIwQjEyQTY1N0FFMDQzMkU1QUI0MTBENTIyRDkA',
|
|
570
|
+
is_live_agent: 0,
|
|
231
571
|
is_deleted: 0,
|
|
232
572
|
is_comment: 0,
|
|
233
573
|
channel: 'whatsapp',
|
|
234
574
|
sent_to_vendor: 1,
|
|
235
|
-
replyMessageId:
|
|
575
|
+
replyMessageId: null,
|
|
236
576
|
agent_name: null,
|
|
237
577
|
df_agent_name: null,
|
|
238
578
|
resolve_time: null,
|
|
239
579
|
metadata: null,
|
|
240
580
|
},
|
|
241
581
|
{
|
|
242
|
-
id:
|
|
243
|
-
|
|
582
|
+
id: 104749,
|
|
244
583
|
message:
|
|
245
|
-
'{"dotgoV2":{"type":"product_details","subType":"product_list","catalogId":"3567267706900621","header":{"text":"View Menu"},"body":{"text":"Menu included \\n "},"footer":{"text":"sdefsdfsdf"},"sections":[{"title":"Title 1","productList":[{"productId":
|
|
246
|
-
time: '2025-09-
|
|
584
|
+
'{"dotgoV2":{"type":"product_details","subType":"product_list","catalogId":"3567267706900621","header":{"text":"View Menu"},"body":{"text":"Menu included \\n "},"footer":{"text":"sdefsdfsdf"},"sections":[{"title":"Title 1","productList":[{"productId":193}]}]}}',
|
|
585
|
+
time: '2025-09-19T06:29:35.000Z',
|
|
247
586
|
direction: 'outbound',
|
|
248
587
|
message_type: 'interactive',
|
|
249
|
-
messageId:
|
|
250
|
-
|
|
251
|
-
is_live_agent: 1,
|
|
588
|
+
messageId: '5f8f5ccc-3a34-44f1-acd6-92c7cad311c8',
|
|
589
|
+
is_live_agent: 0,
|
|
252
590
|
is_deleted: 0,
|
|
253
591
|
is_comment: 0,
|
|
254
592
|
channel: 'whatsapp',
|
|
255
593
|
sent_to_vendor: 1,
|
|
256
|
-
replyMessageId:
|
|
257
|
-
agent_name:
|
|
258
|
-
df_agent_name:
|
|
594
|
+
replyMessageId: null,
|
|
595
|
+
agent_name: 'mustafa.s@beem.africa',
|
|
596
|
+
df_agent_name: 'Mustafa Saifuddin',
|
|
259
597
|
resolve_time: null,
|
|
260
598
|
metadata: null,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
id: 104704,
|
|
264
|
-
message: '3',
|
|
265
|
-
time: '2025-09-19T03:51:43.000Z',
|
|
266
|
-
direction: 'inbound',
|
|
267
|
-
message_type: 'text',
|
|
268
|
-
messageId:
|
|
269
|
-
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNEMkRFMTEyQUI1OTMxQTQwMzc1Rjk1QjY4M0MyNjYA',
|
|
270
|
-
is_live_agent: 1,
|
|
271
|
-
is_deleted: 0,
|
|
272
|
-
is_comment: 0,
|
|
273
|
-
channel: 'whatsapp',
|
|
274
|
-
sent_to_vendor: 1,
|
|
275
|
-
replyMessageId: 'c39b331f-629d-4244-98a2-eeda660fcd7d',
|
|
276
|
-
agent_name: null,
|
|
277
|
-
df_agent_name: null,
|
|
278
|
-
resolve_time: null,
|
|
279
|
-
metadata: {
|
|
280
|
-
id: 'c39b331f-629d-4244-98a2-eeda660fcd7d',
|
|
281
|
-
prev_message:
|
|
282
|
-
'{"type":"list","header":{"type":"text","text":"Question 1 of 7"},"body":{"text":"No wway"},"footer":{"text":"Responses"},"action":{"button":"Select an option","sections":[{"title":"Responses","rows":[{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|0","title":"1","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|1","title":"2","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|2","title":"3","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|3","title":"4","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|4","title":"5","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|5","title":"6","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|6","title":"7","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|7","title":"8","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|8","title":"9","description":""},{"id":"bm-feedback|1|fd4858ed-0fbd-4da1-9453-ecf3a1371874|9","title":"10","description":""}]}]}}',
|
|
599
|
+
statusDetails: {
|
|
600
|
+
statusCode: 3,
|
|
283
601
|
},
|
|
284
602
|
},
|
|
285
603
|
{
|
|
286
|
-
id:
|
|
287
|
-
message:
|
|
288
|
-
|
|
604
|
+
id: 109370,
|
|
605
|
+
message:
|
|
606
|
+
'{ "dotgoV2": { "type": "image", "caption": "To register for AzamTV MAX, you need to download the AzamTV MAX App from Google Play Store or Apple App Store. \\n\\nOnce you have downloaded the App, follow these steps to register: \\n1. Open the App and click on REGISTER. \\n2. Enter your mobile number. \\n3. Enter the OTP sent to your mobile number. \\n4. Enter your details (Name, Surname, Email, Password) \\n5. Click on REGISTER. \\n\\nDo you need any further assistance?", "originalUrl": "https://imgur.com/JyXrxLv.png", "previewUrl": "https://imgur.com/JyXrxLv.png" }}',
|
|
607
|
+
time: '2025-10-06T10:53:38.000Z',
|
|
289
608
|
direction: 'outbound',
|
|
290
|
-
message_type: '
|
|
291
|
-
messageId:
|
|
292
|
-
|
|
293
|
-
is_live_agent: 1,
|
|
294
|
-
is_deleted: 0,
|
|
295
|
-
is_comment: 0,
|
|
296
|
-
channel: 'whatsapp',
|
|
297
|
-
sent_to_vendor: 1,
|
|
298
|
-
replyMessageId: '283d451e-3fe2-478c-8d7a-433a703dbab4',
|
|
299
|
-
agent_name: null,
|
|
300
|
-
df_agent_name: null,
|
|
301
|
-
resolve_time: null,
|
|
302
|
-
metadata: {
|
|
303
|
-
id: '283d451e-3fe2-478c-8d7a-433a703dbab4',
|
|
304
|
-
prev_message:
|
|
305
|
-
'{"dotgoV2":{"type":"quick_reply","content":{"type":"text","header":"","text":"We value your opinion! Would you be willing to take a short survey to help us improve?","caption":""},"options":[{"type":"text","title":"Give Feedback","postbackText":"bm-feedback|0|fd4858ed-0fbd-4da1-9453-ecf3a1371874"},{"type":"text","title":"No Thank You","postbackText":"dev-defined-postback2"}]}}',
|
|
306
|
-
},
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
id: 104709,
|
|
310
|
-
message: 'Test',
|
|
311
|
-
time: '2025-09-19T04:16:06.000Z',
|
|
312
|
-
direction: 'inbound',
|
|
313
|
-
message_type: 'text',
|
|
314
|
-
messageId:
|
|
315
|
-
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUMxQkQ0NzRGNjBBMkU2NDcwNjEzNTQ1NUJGMzYzNjIA',
|
|
316
|
-
is_live_agent: 1,
|
|
609
|
+
message_type: 'interactive',
|
|
610
|
+
messageId: '121302f4-50ca-48c3-a32a-2d570064a000',
|
|
611
|
+
is_live_agent: 0,
|
|
317
612
|
is_deleted: 0,
|
|
318
613
|
is_comment: 0,
|
|
319
614
|
channel: 'whatsapp',
|
|
320
615
|
sent_to_vendor: 1,
|
|
321
|
-
replyMessageId:
|
|
616
|
+
replyMessageId: null,
|
|
322
617
|
agent_name: null,
|
|
323
618
|
df_agent_name: null,
|
|
324
619
|
resolve_time: null,
|
|
325
|
-
metadata:
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
'{"dotgoV2":{"type":"product_details","subType":"product_list","catalogId":"3567267706900621","header":{"text":"View Menu"},"body":{"text":"Menu included \\n "},"footer":{"text":"sdefsdfsdf"},"sections":[{"title":"Title 1","productList":[{"productId":182}]}]}}',
|
|
620
|
+
metadata: null,
|
|
621
|
+
statusDetails: {
|
|
622
|
+
statusCode: 3,
|
|
329
623
|
},
|
|
330
624
|
},
|
|
331
625
|
{
|
|
332
|
-
id:
|
|
333
|
-
message: '
|
|
334
|
-
time: '2025-
|
|
626
|
+
id: 109414,
|
|
627
|
+
message: 'Reply',
|
|
628
|
+
time: '2025-10-06T11:31:15.000Z',
|
|
335
629
|
direction: 'inbound',
|
|
336
630
|
message_type: 'text',
|
|
337
|
-
messageId:
|
|
338
|
-
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUM1QTU1MTBBM0M2MkE1NUY3M0YyMzI1NkU1RTVEQjQA',
|
|
631
|
+
messageId: null,
|
|
339
632
|
is_live_agent: 0,
|
|
340
633
|
is_deleted: 0,
|
|
341
634
|
is_comment: 0,
|
|
342
635
|
channel: 'whatsapp',
|
|
343
636
|
sent_to_vendor: 1,
|
|
344
|
-
replyMessageId:
|
|
345
|
-
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNFODBDNTNBREMyRDFCODNBNEM1NzI4QTgxNERGMTgA',
|
|
637
|
+
replyMessageId: '121302f4-50ca-48c3-a32a-2d570064a000',
|
|
346
638
|
agent_name: null,
|
|
347
639
|
df_agent_name: null,
|
|
348
640
|
resolve_time: null,
|
|
349
641
|
metadata: {
|
|
350
|
-
id: '
|
|
642
|
+
id: '121302f4-50ca-48c3-a32a-2d570064a000',
|
|
351
643
|
prev_message:
|
|
352
|
-
'{"
|
|
644
|
+
'{ "dotgoV2": { "type": "image", "caption": "To register for AzamTV MAX, you need to download the AzamTV MAX App from Google Play Store or Apple App Store. \\n\\nOnce you have downloaded the App, follow these steps to register: \\n1. Open the App and click on REGISTER. \\n2. Enter your mobile number. \\n3. Enter the OTP sent to your mobile number. \\n4. Enter your details (Name, Surname, Email, Password) \\n5. Click on REGISTER. \\n\\nDo you need any further assistance?", "originalUrl": "https://imgur.com/JyXrxLv.png", "previewUrl": "https://imgur.com/JyXrxLv.png" }}',
|
|
353
645
|
},
|
|
354
646
|
},
|
|
355
647
|
{
|
|
356
|
-
id:
|
|
357
|
-
message: '
|
|
358
|
-
time: '2025-
|
|
648
|
+
id: 109469,
|
|
649
|
+
message: 'Image reply',
|
|
650
|
+
time: '2025-10-06T11:38:34.000Z',
|
|
359
651
|
direction: 'inbound',
|
|
360
652
|
message_type: 'text',
|
|
361
|
-
messageId:
|
|
362
|
-
|
|
363
|
-
is_live_agent: 0,
|
|
653
|
+
messageId: null,
|
|
654
|
+
is_live_agent: 1,
|
|
364
655
|
is_deleted: 0,
|
|
365
656
|
is_comment: 0,
|
|
366
657
|
channel: 'whatsapp',
|
|
367
658
|
sent_to_vendor: 1,
|
|
368
|
-
replyMessageId:
|
|
369
|
-
'wamid.HBgMMjU1NzgyMjcwMDUyFQIAEhggQUNFODBDNTNBREMyRDFCODNBNEM1NzI4QTgxNERGMTgA',
|
|
659
|
+
replyMessageId: null,
|
|
370
660
|
agent_name: null,
|
|
371
661
|
df_agent_name: null,
|
|
372
662
|
resolve_time: null,
|
|
373
663
|
metadata: {
|
|
374
|
-
id: 'wamid.
|
|
664
|
+
id: 'wamid.HBgMMjU1Njg3MzQ5NTgxFQIAEhgUM0E1NTVGOThBMzk0NTM1OTgyQTMA',
|
|
375
665
|
prev_message:
|
|
376
|
-
'
|
|
666
|
+
'https://bm-chatbot-images.s3.eu-west-1.amazonaws.com/081c00de-cc02-44f2-bd91-5cf3a5a73d09.jpeg',
|
|
377
667
|
},
|
|
378
668
|
},
|
|
379
669
|
];
|
|
380
|
-
|
|
381
670
|
const isJson = (itemOg) => {
|
|
382
671
|
let item = itemOg;
|
|
383
672
|
item = typeof item !== 'string' ? JSON.stringify(item) : item;
|
|
@@ -445,7 +734,7 @@ const Chat = () => {
|
|
|
445
734
|
|
|
446
735
|
const renderMetadataJsonMessage = (metadata) => {
|
|
447
736
|
let parsedMessage;
|
|
448
|
-
|
|
737
|
+
|
|
449
738
|
try {
|
|
450
739
|
parsedMessage = JSON.parse(metadata.prev_message);
|
|
451
740
|
} catch (error) {
|
|
@@ -483,7 +772,7 @@ const Chat = () => {
|
|
|
483
772
|
: finalMessage?.product_items || [];
|
|
484
773
|
|
|
485
774
|
const summary = calculateOrderSummary(items);
|
|
486
|
-
|
|
775
|
+
|
|
487
776
|
if (summary === 0) return { amount: 0, type: 'order', count: 0 };
|
|
488
777
|
|
|
489
778
|
return {
|
|
@@ -505,7 +794,7 @@ const Chat = () => {
|
|
|
505
794
|
if (isJson(metadata?.prev_message) === true) {
|
|
506
795
|
return renderMetadataJsonMessage(metadata);
|
|
507
796
|
}
|
|
508
|
-
return metadata.prev_message;
|
|
797
|
+
return { message: { type: 'text', text: metadata.prev_message } };
|
|
509
798
|
}
|
|
510
799
|
};
|
|
511
800
|
const determineMetadataIsInteractive = (metadata) => {
|
|
@@ -517,6 +517,68 @@ const QuickReplyRender = ({
|
|
|
517
517
|
</Messages>
|
|
518
518
|
);
|
|
519
519
|
};
|
|
520
|
+
const ImageRender = ({
|
|
521
|
+
type,
|
|
522
|
+
state,
|
|
523
|
+
rest,
|
|
524
|
+
isInteractive,
|
|
525
|
+
connector,
|
|
526
|
+
caption,
|
|
527
|
+
originalUrl,
|
|
528
|
+
}) => {
|
|
529
|
+
const renderers = {
|
|
530
|
+
dotgo_v3: () => (
|
|
531
|
+
<>
|
|
532
|
+
{originalUrl && (
|
|
533
|
+
<>
|
|
534
|
+
<BmImageChat state={state} src={originalUrl} {...rest} />
|
|
535
|
+
</>
|
|
536
|
+
)}
|
|
537
|
+
|
|
538
|
+
{caption && (
|
|
539
|
+
<>
|
|
540
|
+
{caption?.text?.split('\n').map((line, idx) => (
|
|
541
|
+
<p key={`body-line-${idx}`}>
|
|
542
|
+
{line}
|
|
543
|
+
<br />
|
|
544
|
+
</p>
|
|
545
|
+
))}
|
|
546
|
+
</>
|
|
547
|
+
)}
|
|
548
|
+
</>
|
|
549
|
+
),
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
const FallbackRenderer = () => (
|
|
553
|
+
<>
|
|
554
|
+
{originalUrl && (
|
|
555
|
+
<div>
|
|
556
|
+
<BmImageChat state={state} src={originalUrl} {...rest} />
|
|
557
|
+
</div>
|
|
558
|
+
)}
|
|
559
|
+
|
|
560
|
+
{caption && (
|
|
561
|
+
<>
|
|
562
|
+
{caption?.split('\n').map((line, idx) => (
|
|
563
|
+
<div>
|
|
564
|
+
<p key={`content-line-${idx}`}>
|
|
565
|
+
{line}
|
|
566
|
+
<br />
|
|
567
|
+
</p>
|
|
568
|
+
</div>
|
|
569
|
+
))}
|
|
570
|
+
</>
|
|
571
|
+
)}
|
|
572
|
+
</>
|
|
573
|
+
);
|
|
574
|
+
|
|
575
|
+
const ConnectorRenderer = renderers[connector] || FallbackRenderer;
|
|
576
|
+
return (
|
|
577
|
+
<Messages type={type} state={state} isInteractive={isInteractive} isImg>
|
|
578
|
+
<ConnectorRenderer />
|
|
579
|
+
</Messages>
|
|
580
|
+
);
|
|
581
|
+
};
|
|
520
582
|
const ProductDetailRender = ({ type, state, header, body, isInteractive }) => {
|
|
521
583
|
return (
|
|
522
584
|
<>
|
|
@@ -820,9 +882,17 @@ BmChat.Details = ({
|
|
|
820
882
|
state={state}
|
|
821
883
|
connector={metadata.connector}
|
|
822
884
|
/>
|
|
885
|
+
) : metadata.message.type === 'image' ? (
|
|
886
|
+
<ImageRender
|
|
887
|
+
isInteractive
|
|
888
|
+
{...metadata.message}
|
|
889
|
+
type={type}
|
|
890
|
+
state={state}
|
|
891
|
+
connector={metadata?.connector}
|
|
892
|
+
/>
|
|
823
893
|
) : (
|
|
824
894
|
<Messages metadata={metadata} state={state}>
|
|
825
|
-
{metadata.message}
|
|
895
|
+
{metadata.message.text}
|
|
826
896
|
</Messages>
|
|
827
897
|
)}
|
|
828
898
|
|
|
@@ -865,6 +935,14 @@ BmChat.Details = ({
|
|
|
865
935
|
connector={children?.connector}
|
|
866
936
|
/>
|
|
867
937
|
)}
|
|
938
|
+
{children.message.type === 'image' && (
|
|
939
|
+
<ImageRender
|
|
940
|
+
{...children.message}
|
|
941
|
+
type={type}
|
|
942
|
+
state={state}
|
|
943
|
+
connector={children?.connector}
|
|
944
|
+
/>
|
|
945
|
+
)}
|
|
868
946
|
</>
|
|
869
947
|
) : type === 'pdf' ? (
|
|
870
948
|
<>
|