@capillarytech/creatives-library 8.0.65-alpha.7 → 8.0.65
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.
- package/package.json +1 -1
- package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +3 -7
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +2 -2
- package/v2Containers/Templates/constants.js +0 -5
- package/v2Containers/Templates/index.js +104 -198
- package/v2Containers/Templates/messages.js +0 -12
- package/v2Containers/Templates/reducer.js +2 -7
- package/v2Containers/Templates/sagas.js +1 -6
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +83 -241
- package/v2Containers/Templates/tests/mockData.js +0 -31
- package/v2Containers/Templates/tests/reducer.test.js +0 -60
- package/v2Containers/Whatsapp/constants.js +39 -1
- package/v2Containers/Whatsapp/index.js +50 -13
- package/v2Containers/Whatsapp/index.scss +8 -0
- package/v2Containers/Whatsapp/messages.js +21 -0
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +2600 -7738
- package/v2Containers/Whatsapp/tests/utils.test.js +9 -2
- package/v2Containers/Whatsapp/utils.js +13 -4
- package/v2Containers/Zalo/index.js +1 -2
- package/v2Containers/mockdata.js +36 -133
- package/v2Containers/Assets/images/whatsappOrZaloAccountIllustration.svg +0 -11
|
@@ -10,49 +10,11 @@ exports[`Test Templates container Should render correct component for whatsapp c
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
>
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
>
|
|
21
|
-
<CapHeader
|
|
22
|
-
className="select-account-header"
|
|
23
|
-
description="Choose the account to send content"
|
|
24
|
-
descriptionClass=""
|
|
25
|
-
inline={false}
|
|
26
|
-
size="regular"
|
|
27
|
-
title="Whatsapp account"
|
|
28
|
-
titleClass=""
|
|
29
|
-
/>
|
|
30
|
-
<CapRadioCard
|
|
31
|
-
cardHeight="48px"
|
|
32
|
-
cardWidth="276px"
|
|
33
|
-
className="select-account"
|
|
34
|
-
defaultValue=""
|
|
35
|
-
onChange={[Function]}
|
|
36
|
-
panes={
|
|
37
|
-
Array [
|
|
38
|
-
Object {
|
|
39
|
-
"icon": <CapIconAvatar
|
|
40
|
-
backgroundProps={Object {}}
|
|
41
|
-
height="2rem"
|
|
42
|
-
labelProps={Object {}}
|
|
43
|
-
text="W"
|
|
44
|
-
width="auto"
|
|
45
|
-
/>,
|
|
46
|
-
"key": "abc12",
|
|
47
|
-
"title": "WhatsappAccount",
|
|
48
|
-
"value": "WhatsappAccount",
|
|
49
|
-
},
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
selected=""
|
|
53
|
-
size="small"
|
|
54
|
-
/>
|
|
55
|
-
</div>
|
|
13
|
+
<FormattedMessage
|
|
14
|
+
defaultMessage="Whatsapp accounts are not setup for your brand"
|
|
15
|
+
id="creatives.containersV2.Templates.noAccountsPresentWhatsapp"
|
|
16
|
+
values={Object {}}
|
|
17
|
+
/>
|
|
56
18
|
</CapSkeleton>
|
|
57
19
|
`;
|
|
58
20
|
|
|
@@ -228,30 +190,6 @@ exports[`Test Templates container Should render temlates when whatsapp templates
|
|
|
228
190
|
templateInProgress={false}
|
|
229
191
|
>
|
|
230
192
|
<div>
|
|
231
|
-
<CapHeader
|
|
232
|
-
description={
|
|
233
|
-
<React.Fragment>
|
|
234
|
-
<CapHeading
|
|
235
|
-
type="h3"
|
|
236
|
-
>
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
</CapHeading>
|
|
241
|
-
</React.Fragment>
|
|
242
|
-
}
|
|
243
|
-
descriptionClass=""
|
|
244
|
-
inline={false}
|
|
245
|
-
size="regular"
|
|
246
|
-
title={
|
|
247
|
-
<CapHeading
|
|
248
|
-
type="h4"
|
|
249
|
-
>
|
|
250
|
-
Whatsapp account
|
|
251
|
-
</CapHeading>
|
|
252
|
-
}
|
|
253
|
-
titleClass=""
|
|
254
|
-
/>
|
|
255
193
|
<div
|
|
256
194
|
className="action-container"
|
|
257
195
|
>
|
|
@@ -485,30 +423,6 @@ exports[`Test Templates container Should render temlates when whatsapp templates
|
|
|
485
423
|
templateInProgress={false}
|
|
486
424
|
>
|
|
487
425
|
<div>
|
|
488
|
-
<CapHeader
|
|
489
|
-
description={
|
|
490
|
-
<React.Fragment>
|
|
491
|
-
<CapHeading
|
|
492
|
-
type="h3"
|
|
493
|
-
>
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
</CapHeading>
|
|
498
|
-
</React.Fragment>
|
|
499
|
-
}
|
|
500
|
-
descriptionClass=""
|
|
501
|
-
inline={false}
|
|
502
|
-
size="regular"
|
|
503
|
-
title={
|
|
504
|
-
<CapHeading
|
|
505
|
-
type="h4"
|
|
506
|
-
>
|
|
507
|
-
Whatsapp account
|
|
508
|
-
</CapHeading>
|
|
509
|
-
}
|
|
510
|
-
titleClass=""
|
|
511
|
-
/>
|
|
512
426
|
<div
|
|
513
427
|
className="action-container"
|
|
514
428
|
>
|
|
@@ -560,6 +474,24 @@ exports[`Test Templates container Should render temlates when whatsapp templates
|
|
|
560
474
|
/>,
|
|
561
475
|
"value": "rejected",
|
|
562
476
|
},
|
|
477
|
+
Object {
|
|
478
|
+
"key": "pending",
|
|
479
|
+
"label": <FormattedMessage
|
|
480
|
+
defaultMessage="Pending"
|
|
481
|
+
id="creatives.containersV2.Whatsapp.pending"
|
|
482
|
+
values={Object {}}
|
|
483
|
+
/>,
|
|
484
|
+
"value": "pending",
|
|
485
|
+
},
|
|
486
|
+
Object {
|
|
487
|
+
"key": "paused",
|
|
488
|
+
"label": <FormattedMessage
|
|
489
|
+
defaultMessage="Paused"
|
|
490
|
+
id="creatives.containersV2.Whatsapp.paused"
|
|
491
|
+
values={Object {}}
|
|
492
|
+
/>,
|
|
493
|
+
"value": "paused",
|
|
494
|
+
},
|
|
563
495
|
]
|
|
564
496
|
}
|
|
565
497
|
dropdownMaxHeight="320px"
|
|
@@ -868,30 +800,6 @@ exports[`Test Templates container Test max templates exceeded 1`] = `
|
|
|
868
800
|
templateInProgress={false}
|
|
869
801
|
>
|
|
870
802
|
<div>
|
|
871
|
-
<CapHeader
|
|
872
|
-
description={
|
|
873
|
-
<React.Fragment>
|
|
874
|
-
<CapHeading
|
|
875
|
-
type="h3"
|
|
876
|
-
>
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
</CapHeading>
|
|
881
|
-
</React.Fragment>
|
|
882
|
-
}
|
|
883
|
-
descriptionClass=""
|
|
884
|
-
inline={false}
|
|
885
|
-
size="regular"
|
|
886
|
-
title={
|
|
887
|
-
<CapHeading
|
|
888
|
-
type="h4"
|
|
889
|
-
>
|
|
890
|
-
Whatsapp account
|
|
891
|
-
</CapHeading>
|
|
892
|
-
}
|
|
893
|
-
titleClass=""
|
|
894
|
-
/>
|
|
895
803
|
<div
|
|
896
804
|
className="action-container"
|
|
897
805
|
>
|
|
@@ -943,6 +851,24 @@ exports[`Test Templates container Test max templates exceeded 1`] = `
|
|
|
943
851
|
/>,
|
|
944
852
|
"value": "rejected",
|
|
945
853
|
},
|
|
854
|
+
Object {
|
|
855
|
+
"key": "pending",
|
|
856
|
+
"label": <FormattedMessage
|
|
857
|
+
defaultMessage="Pending"
|
|
858
|
+
id="creatives.containersV2.Whatsapp.pending"
|
|
859
|
+
values={Object {}}
|
|
860
|
+
/>,
|
|
861
|
+
"value": "pending",
|
|
862
|
+
},
|
|
863
|
+
Object {
|
|
864
|
+
"key": "paused",
|
|
865
|
+
"label": <FormattedMessage
|
|
866
|
+
defaultMessage="Paused"
|
|
867
|
+
id="creatives.containersV2.Whatsapp.paused"
|
|
868
|
+
values={Object {}}
|
|
869
|
+
/>,
|
|
870
|
+
"value": "paused",
|
|
871
|
+
},
|
|
946
872
|
]
|
|
947
873
|
}
|
|
948
874
|
dropdownMaxHeight="320px"
|
|
@@ -1210,8 +1136,8 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
1210
1136
|
"base": Object {
|
|
1211
1137
|
"content": Object {
|
|
1212
1138
|
"whatsapp": Object {
|
|
1213
|
-
"accessToken": "Bearer
|
|
1214
|
-
"accountId": "
|
|
1139
|
+
"accessToken": "Bearer gDwEuRIm9icV6phixociSw==",
|
|
1140
|
+
"accountId": "107499611940863",
|
|
1215
1141
|
"buttonType": "CTA",
|
|
1216
1142
|
"buttons": Array [
|
|
1217
1143
|
Object {
|
|
@@ -1347,30 +1273,6 @@ exports[`Test Templates container Test max templates not exceeded 1`] = `
|
|
|
1347
1273
|
templateInProgress={false}
|
|
1348
1274
|
>
|
|
1349
1275
|
<div>
|
|
1350
|
-
<CapHeader
|
|
1351
|
-
description={
|
|
1352
|
-
<React.Fragment>
|
|
1353
|
-
<CapHeading
|
|
1354
|
-
type="h3"
|
|
1355
|
-
>
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
</CapHeading>
|
|
1360
|
-
</React.Fragment>
|
|
1361
|
-
}
|
|
1362
|
-
descriptionClass=""
|
|
1363
|
-
inline={false}
|
|
1364
|
-
size="regular"
|
|
1365
|
-
title={
|
|
1366
|
-
<CapHeading
|
|
1367
|
-
type="h4"
|
|
1368
|
-
>
|
|
1369
|
-
Whatsapp account
|
|
1370
|
-
</CapHeading>
|
|
1371
|
-
}
|
|
1372
|
-
titleClass=""
|
|
1373
|
-
/>
|
|
1374
1276
|
<div
|
|
1375
1277
|
className="action-container"
|
|
1376
1278
|
>
|
|
@@ -1422,6 +1324,24 @@ exports[`Test Templates container Test max templates not exceeded 1`] = `
|
|
|
1422
1324
|
/>,
|
|
1423
1325
|
"value": "rejected",
|
|
1424
1326
|
},
|
|
1327
|
+
Object {
|
|
1328
|
+
"key": "pending",
|
|
1329
|
+
"label": <FormattedMessage
|
|
1330
|
+
defaultMessage="Pending"
|
|
1331
|
+
id="creatives.containersV2.Whatsapp.pending"
|
|
1332
|
+
values={Object {}}
|
|
1333
|
+
/>,
|
|
1334
|
+
"value": "pending",
|
|
1335
|
+
},
|
|
1336
|
+
Object {
|
|
1337
|
+
"key": "paused",
|
|
1338
|
+
"label": <FormattedMessage
|
|
1339
|
+
defaultMessage="Paused"
|
|
1340
|
+
id="creatives.containersV2.Whatsapp.paused"
|
|
1341
|
+
values={Object {}}
|
|
1342
|
+
/>,
|
|
1343
|
+
"value": "paused",
|
|
1344
|
+
},
|
|
1425
1345
|
]
|
|
1426
1346
|
}
|
|
1427
1347
|
dropdownMaxHeight="320px"
|
|
@@ -1671,8 +1591,8 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
1671
1591
|
"base": Object {
|
|
1672
1592
|
"content": Object {
|
|
1673
1593
|
"whatsapp": Object {
|
|
1674
|
-
"accessToken": "Bearer
|
|
1675
|
-
"accountId": "
|
|
1594
|
+
"accessToken": "Bearer gDwEuRIm9icV6phixociSw==",
|
|
1595
|
+
"accountId": "107499611940863",
|
|
1676
1596
|
"buttonType": "CTA",
|
|
1677
1597
|
"buttons": Array [
|
|
1678
1598
|
Object {
|
|
@@ -1808,30 +1728,6 @@ exports[`Test Templates container Test max templates warning 1`] = `
|
|
|
1808
1728
|
templateInProgress={false}
|
|
1809
1729
|
>
|
|
1810
1730
|
<div>
|
|
1811
|
-
<CapHeader
|
|
1812
|
-
description={
|
|
1813
|
-
<React.Fragment>
|
|
1814
|
-
<CapHeading
|
|
1815
|
-
type="h3"
|
|
1816
|
-
>
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
</CapHeading>
|
|
1821
|
-
</React.Fragment>
|
|
1822
|
-
}
|
|
1823
|
-
descriptionClass=""
|
|
1824
|
-
inline={false}
|
|
1825
|
-
size="regular"
|
|
1826
|
-
title={
|
|
1827
|
-
<CapHeading
|
|
1828
|
-
type="h4"
|
|
1829
|
-
>
|
|
1830
|
-
Whatsapp account
|
|
1831
|
-
</CapHeading>
|
|
1832
|
-
}
|
|
1833
|
-
titleClass=""
|
|
1834
|
-
/>
|
|
1835
1731
|
<div
|
|
1836
1732
|
className="action-container"
|
|
1837
1733
|
>
|
|
@@ -1883,6 +1779,24 @@ exports[`Test Templates container Test max templates warning 1`] = `
|
|
|
1883
1779
|
/>,
|
|
1884
1780
|
"value": "rejected",
|
|
1885
1781
|
},
|
|
1782
|
+
Object {
|
|
1783
|
+
"key": "pending",
|
|
1784
|
+
"label": <FormattedMessage
|
|
1785
|
+
defaultMessage="Pending"
|
|
1786
|
+
id="creatives.containersV2.Whatsapp.pending"
|
|
1787
|
+
values={Object {}}
|
|
1788
|
+
/>,
|
|
1789
|
+
"value": "pending",
|
|
1790
|
+
},
|
|
1791
|
+
Object {
|
|
1792
|
+
"key": "paused",
|
|
1793
|
+
"label": <FormattedMessage
|
|
1794
|
+
defaultMessage="Paused"
|
|
1795
|
+
id="creatives.containersV2.Whatsapp.paused"
|
|
1796
|
+
values={Object {}}
|
|
1797
|
+
/>,
|
|
1798
|
+
"value": "paused",
|
|
1799
|
+
},
|
|
1886
1800
|
]
|
|
1887
1801
|
}
|
|
1888
1802
|
dropdownMaxHeight="320px"
|
|
@@ -2132,8 +2046,8 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
2132
2046
|
"base": Object {
|
|
2133
2047
|
"content": Object {
|
|
2134
2048
|
"whatsapp": Object {
|
|
2135
|
-
"accessToken": "Bearer
|
|
2136
|
-
"accountId": "
|
|
2049
|
+
"accessToken": "Bearer gDwEuRIm9icV6phixociSw==",
|
|
2050
|
+
"accountId": "107499611940863",
|
|
2137
2051
|
"buttonType": "CTA",
|
|
2138
2052
|
"buttons": Array [
|
|
2139
2053
|
Object {
|
|
@@ -2269,30 +2183,6 @@ exports[`Test Templates container Test removing all whatsapp filterss 1`] = `
|
|
|
2269
2183
|
templateInProgress={false}
|
|
2270
2184
|
>
|
|
2271
2185
|
<div>
|
|
2272
|
-
<CapHeader
|
|
2273
|
-
description={
|
|
2274
|
-
<React.Fragment>
|
|
2275
|
-
<CapHeading
|
|
2276
|
-
type="h3"
|
|
2277
|
-
>
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
</CapHeading>
|
|
2282
|
-
</React.Fragment>
|
|
2283
|
-
}
|
|
2284
|
-
descriptionClass=""
|
|
2285
|
-
inline={false}
|
|
2286
|
-
size="regular"
|
|
2287
|
-
title={
|
|
2288
|
-
<CapHeading
|
|
2289
|
-
type="h4"
|
|
2290
|
-
>
|
|
2291
|
-
Whatsapp account
|
|
2292
|
-
</CapHeading>
|
|
2293
|
-
}
|
|
2294
|
-
titleClass=""
|
|
2295
|
-
/>
|
|
2296
2186
|
<div
|
|
2297
2187
|
className="action-container"
|
|
2298
2188
|
>
|
|
@@ -2552,30 +2442,6 @@ exports[`Test Templates container Test removing all whatsapp filterss 2`] = `
|
|
|
2552
2442
|
templateInProgress={false}
|
|
2553
2443
|
>
|
|
2554
2444
|
<div>
|
|
2555
|
-
<CapHeader
|
|
2556
|
-
description={
|
|
2557
|
-
<React.Fragment>
|
|
2558
|
-
<CapHeading
|
|
2559
|
-
type="h3"
|
|
2560
|
-
>
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
</CapHeading>
|
|
2565
|
-
</React.Fragment>
|
|
2566
|
-
}
|
|
2567
|
-
descriptionClass=""
|
|
2568
|
-
inline={false}
|
|
2569
|
-
size="regular"
|
|
2570
|
-
title={
|
|
2571
|
-
<CapHeading
|
|
2572
|
-
type="h4"
|
|
2573
|
-
>
|
|
2574
|
-
Whatsapp account
|
|
2575
|
-
</CapHeading>
|
|
2576
|
-
}
|
|
2577
|
-
titleClass=""
|
|
2578
|
-
/>
|
|
2579
2445
|
<div
|
|
2580
2446
|
className="action-container"
|
|
2581
2447
|
>
|
|
@@ -2809,30 +2675,6 @@ exports[`Test Templates container Test removing single filter 1`] = `
|
|
|
2809
2675
|
templateInProgress={false}
|
|
2810
2676
|
>
|
|
2811
2677
|
<div>
|
|
2812
|
-
<CapHeader
|
|
2813
|
-
description={
|
|
2814
|
-
<React.Fragment>
|
|
2815
|
-
<CapHeading
|
|
2816
|
-
type="h3"
|
|
2817
|
-
>
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
</CapHeading>
|
|
2822
|
-
</React.Fragment>
|
|
2823
|
-
}
|
|
2824
|
-
descriptionClass=""
|
|
2825
|
-
inline={false}
|
|
2826
|
-
size="regular"
|
|
2827
|
-
title={
|
|
2828
|
-
<CapHeading
|
|
2829
|
-
type="h4"
|
|
2830
|
-
>
|
|
2831
|
-
Whatsapp account
|
|
2832
|
-
</CapHeading>
|
|
2833
|
-
}
|
|
2834
|
-
titleClass=""
|
|
2835
|
-
/>
|
|
2836
2678
|
<div
|
|
2837
2679
|
className="action-container"
|
|
2838
2680
|
>
|
|
@@ -72,34 +72,3 @@ export const getAllTemplatesListFailure = {
|
|
|
72
72
|
"message": "Resource Not Found",
|
|
73
73
|
"error": {},
|
|
74
74
|
};
|
|
75
|
-
|
|
76
|
-
export const senderDetailsWhatsapp = {
|
|
77
|
-
channel: "WHATSAPP",
|
|
78
|
-
domainProperties: {
|
|
79
|
-
connectionProperties: {
|
|
80
|
-
account_sid: "testSourceAccount",
|
|
81
|
-
wabaId: "testSourceAccount",
|
|
82
|
-
userid: "testSourceAccount",
|
|
83
|
-
sourceAccountIdentifier: "testSourceAccount",
|
|
84
|
-
},
|
|
85
|
-
hostname: "testWhatsappHost",
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export const senderDetailsZalo = {
|
|
90
|
-
channel: "ZALO",
|
|
91
|
-
domainProperties: {
|
|
92
|
-
connectionProperties: {
|
|
93
|
-
oa_id: "testSourceAccount",
|
|
94
|
-
sourceAccountIdentifier: "testSourceAccount",
|
|
95
|
-
},
|
|
96
|
-
hostname: "testZaloHost",
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export const senderDetailsSMS = {
|
|
101
|
-
channel: "SMS",
|
|
102
|
-
hostName: "TestSMSHost",
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export const errorMessage = ["Error fetching sender details"];
|
|
@@ -48,63 +48,3 @@ describe("test reducer", () => {
|
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
describe("test reducer - sender details", () => {
|
|
54
|
-
afterEach(() => {
|
|
55
|
-
jest.clearAllMocks();
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
it("should handle GET_SENDER_DETAILS_REQUEST", () => {
|
|
59
|
-
const action = { type: types.GET_SENDER_DETAILS_REQUEST };
|
|
60
|
-
expect(reducer(initialState, action).toJS()).toEqual({
|
|
61
|
-
...initialState.toJS(),
|
|
62
|
-
senderDetails: { status: "REQUEST" },
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it("should handle GET_SENDER_DETAILS_SUCCESS for WHATSAPP (multi-account channel)", () => {
|
|
67
|
-
const action = {
|
|
68
|
-
type: types.GET_SENDER_DETAILS_SUCCESS,
|
|
69
|
-
payload: mockData.senderDetailsWhatsapp,
|
|
70
|
-
};
|
|
71
|
-
expect(reducer(initialState, action).toJS()).toEqual({
|
|
72
|
-
...initialState.toJS(),
|
|
73
|
-
senderDetails: {
|
|
74
|
-
status: "SUCCESS",
|
|
75
|
-
domainProperties: mockData.senderDetailsWhatsapp.domainProperties,
|
|
76
|
-
errors: [],
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
it("should handle GET_SENDER_DETAILS_SUCCESS for non-multi-account channel", () => {
|
|
82
|
-
const action = {
|
|
83
|
-
type: types.GET_SENDER_DETAILS_SUCCESS,
|
|
84
|
-
payload: mockData.senderDetailsSMS.hostName,
|
|
85
|
-
};
|
|
86
|
-
expect(reducer(initialState, action).toJS()).toEqual({
|
|
87
|
-
...initialState.toJS(),
|
|
88
|
-
senderDetails: {
|
|
89
|
-
status: "SUCCESS",
|
|
90
|
-
hostName: mockData.senderDetailsSMS.hostName,
|
|
91
|
-
errors: [],
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
it("should handle GET_SENDER_DETAILS_FAILURE", () => {
|
|
97
|
-
const action = {
|
|
98
|
-
type: types.GET_SENDER_DETAILS_FAILURE,
|
|
99
|
-
payload: mockData.errorMessage,
|
|
100
|
-
};
|
|
101
|
-
expect(reducer(initialState, action).toJS()).toEqual({
|
|
102
|
-
...initialState.toJS(),
|
|
103
|
-
senderDetails: {
|
|
104
|
-
status: "FAILURE",
|
|
105
|
-
hostName: "",
|
|
106
|
-
errors: mockData.errorMessage,
|
|
107
|
-
},
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
});
|
|
@@ -144,12 +144,32 @@ export const TWILIO_CATEGORY_OPTIONS = [
|
|
|
144
144
|
},
|
|
145
145
|
];
|
|
146
146
|
|
|
147
|
+
export const ICS_CATEGORY_OPTIONS = [
|
|
148
|
+
{
|
|
149
|
+
key: 'utility',
|
|
150
|
+
value: WHATSAPP_CATEGORIES.utility,
|
|
151
|
+
label: <FormattedMessage {...messages.utility} />,
|
|
152
|
+
tooltipLabel: <FormattedMessage {...messages.utilityTooltip} />,
|
|
153
|
+
tagColor: CAP_PURPLE03,
|
|
154
|
+
tagTextColor: CAP_PURPLE02,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
key: 'marketing',
|
|
158
|
+
value: WHATSAPP_CATEGORIES.marketing,
|
|
159
|
+
label: <FormattedMessage {...messages.marketing} />,
|
|
160
|
+
tooltipLabel: <FormattedMessage {...messages.marketingTooltip} />,
|
|
161
|
+
tagColor: CAP_ORANGE01,
|
|
162
|
+
tagTextColor: CAP_ORANGE,
|
|
163
|
+
},
|
|
164
|
+
];
|
|
165
|
+
|
|
147
166
|
export const WHATSAPP_STATUSES = {
|
|
148
167
|
awaitingApproval: 'awaitingApproval',
|
|
149
168
|
approved: 'approved',
|
|
150
169
|
rejected: 'rejected',
|
|
151
170
|
pending: 'pending',
|
|
152
171
|
unsubmitted: 'unsubmitted',
|
|
172
|
+
paused: 'paused',
|
|
153
173
|
};
|
|
154
174
|
|
|
155
175
|
export const STATUS_OPTIONS = [
|
|
@@ -168,6 +188,16 @@ export const STATUS_OPTIONS = [
|
|
|
168
188
|
value: WHATSAPP_STATUSES.rejected,
|
|
169
189
|
label: <FormattedMessage {...messages.rejected} />,
|
|
170
190
|
},
|
|
191
|
+
{
|
|
192
|
+
key: 'pending',
|
|
193
|
+
value: WHATSAPP_STATUSES.pending,
|
|
194
|
+
label: <FormattedMessage {...messages.pending} />,
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
key: 'paused',
|
|
198
|
+
value: WHATSAPP_STATUSES.paused,
|
|
199
|
+
label: <FormattedMessage {...messages.paused} />,
|
|
200
|
+
},
|
|
171
201
|
];
|
|
172
202
|
|
|
173
203
|
export const TAG = 'TAG';
|
|
@@ -228,6 +258,7 @@ export const WHATSAPP_DOCUMENT_SIZE = 16000000; // 16MB
|
|
|
228
258
|
export const HOST_TWILIO = 'twiliowhatsapptrans';
|
|
229
259
|
export const HOST_KARIX = 'karixwhatsappbulk';
|
|
230
260
|
export const HOST_GUPSHUP = 'gupshupwhatsappbulk';
|
|
261
|
+
export const HOST_ICS = 'icswababulk';
|
|
231
262
|
export const SIZE_UNITS = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
|
232
263
|
export const DOCUMENT_FORMAT = 'PDF';
|
|
233
264
|
export const DOCUMENT_SIZE = '16 MB';
|
|
@@ -528,4 +559,11 @@ export const LANGUAGE_OPTIONS = [
|
|
|
528
559
|
];
|
|
529
560
|
|
|
530
561
|
export const OTP_CONFIG_URI = "/org/setup/configurations/OTPConfigurations";
|
|
531
|
-
export const AI_CONTENT_BOT_DISABLED = "AI_CONTENT_BOT_DISABLED";
|
|
562
|
+
export const AI_CONTENT_BOT_DISABLED = "AI_CONTENT_BOT_DISABLED";
|
|
563
|
+
export const CORRECT_TEMPLATE_FORMAT_URL = "https://developers.facebook.com/docs/whatsapp/updates-to-pricing/new-template-guidelines";
|
|
564
|
+
export const CATEGORY_OPTIONS_MAP = {
|
|
565
|
+
[HOST_TWILIO]: TWILIO_CATEGORY_OPTIONS,
|
|
566
|
+
[HOST_KARIX]: KARIX_GUPSHUP_CATEGORY_OPTIONS,
|
|
567
|
+
[HOST_GUPSHUP]: KARIX_GUPSHUP_CATEGORY_OPTIONS,
|
|
568
|
+
[HOST_ICS]: ICS_CATEGORY_OPTIONS,
|
|
569
|
+
};
|