@capillarytech/creatives-library 7.12.50 → 7.12.53

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 (57) hide show
  1. package/config/app.js +0 -1
  2. package/package.json +1 -1
  3. package/services/api.js +15 -2
  4. package/v2Components/CapImageUpload/index.js +33 -17
  5. package/v2Components/CapImageUpload/messages.js +11 -3
  6. package/v2Components/CapWhatsappCTA/constants.js +12 -1
  7. package/v2Components/CapWhatsappCTA/index.js +88 -29
  8. package/v2Components/CapWhatsappCTA/index.scss +4 -6
  9. package/v2Components/CapWhatsappCTA/messages.js +24 -0
  10. package/v2Components/TemplatePreview/_templatePreview.scss +9 -8
  11. package/v2Components/TemplatePreview/index.js +8 -6
  12. package/v2Components/TemplatePreview/tests/__snapshots__/index.test.js.snap +3 -19
  13. package/v2Components/TemplatePreview/tests/index.test.js +0 -2
  14. package/v2Components/WhatsappStatusContainer/index.js +42 -52
  15. package/v2Containers/Cap/tests/index.test.js +2 -2
  16. package/v2Containers/CreativesContainer/SlideBoxContent.js +8 -8
  17. package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +28 -36
  18. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +165 -344
  19. package/v2Containers/CreativesContainer/tests/index.test.js +0 -3
  20. package/v2Containers/Line/Container/ImageCarousel/Content.js +15 -29
  21. package/v2Containers/Line/Container/ImageCarousel/constants.js +3 -0
  22. package/v2Containers/Line/Container/ImageCarousel/index.js +28 -40
  23. package/v2Containers/Line/Container/ImageCarousel/messages.js +2 -2
  24. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +9851 -0
  25. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +21113 -0
  26. package/v2Containers/Line/Container/ImageCarousel/tests/content.test.js +71 -0
  27. package/v2Containers/Line/Container/ImageCarousel/tests/index.test.js +58 -0
  28. package/v2Containers/Line/Container/ImageCarousel/tests/mockData.js +1322 -0
  29. package/v2Containers/Line/Container/ImageCarousel/tests/utils.test.js +13 -0
  30. package/v2Containers/Line/Container/ImageCarousel/utils.js +12 -0
  31. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +84451 -0
  32. package/v2Containers/Line/Container/Wrapper/tests/index.test.js +58 -0
  33. package/v2Containers/Line/Container/Wrapper/tests/mockData.js +171 -0
  34. package/v2Containers/Line/Container/index.js +5 -1
  35. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +63597 -0
  36. package/v2Containers/Line/Container/tests/index.test.js +105 -0
  37. package/v2Containers/Line/Container/tests/mockData.js +1334 -0
  38. package/v2Containers/Templates/_templates.scss +5 -0
  39. package/v2Containers/Templates/actions.js +7 -0
  40. package/v2Containers/Templates/constants.js +9 -1
  41. package/v2Containers/Templates/index.js +45 -30
  42. package/v2Containers/Templates/messages.js +1 -1
  43. package/v2Containers/Templates/reducer.js +15 -0
  44. package/v2Containers/Templates/sagas.js +32 -0
  45. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1774 -1881
  46. package/v2Containers/Templates/tests/index.test.js +14 -3
  47. package/v2Containers/Whatsapp/actions.js +22 -0
  48. package/v2Containers/Whatsapp/constants.js +56 -23
  49. package/v2Containers/Whatsapp/index.js +204 -66
  50. package/v2Containers/Whatsapp/index.scss +18 -2
  51. package/v2Containers/Whatsapp/messages.js +35 -7
  52. package/v2Containers/Whatsapp/reducer.js +35 -1
  53. package/v2Containers/Whatsapp/sagas.js +30 -1
  54. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +44349 -32926
  55. package/v2Containers/Whatsapp/tests/__snapshots__/utils.test.js.snap +15 -21
  56. package/v2Containers/Whatsapp/utils.js +16 -9
  57. package/v2Containers/mockdata.js +210 -555
@@ -4,205 +4,96 @@ import { FormattedMessage } from 'react-intl';
4
4
  export default {
5
5
  whatsappTemplates: {
6
6
  selectedWhatsappAccount: {
7
- sourceTypeName: 'WHATSAPP',
8
- name: 'WhatsppTest',
9
- isActive: true,
10
- sourceTypeId: 19,
11
- configs: {
12
- accessToken: '4676323eb5d1f975b0987070c03a8efc',
13
- },
14
- toMirror: false,
15
- id: 12673,
16
- uuid: '6ac077dbdc7849ccb8db0d38917a6ed5',
17
- sourceAccountIdentifier: 'AC41030cebba9e2f1ce37c78235da0ee18',
18
- commChannels: ['whatsapp'],
19
- attribution: {
20
- createDate: '2022-01-05T00:00:00+05:30',
21
- createdBy: {
22
- adminType: 'GENERAL',
23
- name: '1371622280_Ashish',
24
- currencyId: 0,
25
- code: '1371622280_919866643044',
26
- isActive: true,
27
- isOuEnabled: false,
28
- languageId: 0,
29
- timeZoneId: 0,
30
- type: 'ADMIN_USER',
31
- id: 15000449,
32
- description: '',
33
- },
34
- modifiedBy: {
35
- adminType: 'GENERAL',
36
- name: '1371622280_Ashish',
37
- currencyId: 0,
38
- code: '1371622280_919866643044',
39
- isActive: true,
40
- isOuEnabled: false,
41
- languageId: 0,
42
- timeZoneId: 0,
43
- type: 'ADMIN_USER',
44
- id: 15000449,
45
- description: '',
46
- },
47
- modifiedDate: '2022-01-05T00:00:00+05:30',
7
+ connectionProperties: {
8
+ account_sid: 'AC41030cebba9e2f1ce37c78235da0ee18',
9
+ auth_token: '4676323eb5d1f975b0987070c03a8efc',
10
+ messaging_service_sid: 'MG1dc01b34988f9f1c6c246830a18c1f5c',
48
11
  },
12
+ hostName: 'twiliowhatsapptrans',
49
13
  },
50
14
  getAllTemplatesInProgress: false,
51
- weCrmAccountFetchingError: false,
52
15
  weCRMtemplates: [],
53
16
  userList: {
54
17
  orgUsers: [
55
18
  {
56
- userId: 50012994,
57
- firstName: 'firstUser',
19
+ userId: 50015493,
20
+ firstName: 'SUPER USER',
58
21
  lastName: '',
59
- loginName: 'firstUser@capillarytech.com',
60
- email: 'firstUser@capillarytech.com',
61
- mobile: '918888802132',
22
+ loginName: '',
23
+ email: '',
24
+ mobile: '',
62
25
  isMobileValidated: 0,
63
26
  isEmailValidated: 0,
64
27
  },
65
28
  ],
66
29
  capUsers: [
67
30
  {
68
- userId: 15000449,
69
- firstName: 'Ashish',
70
- lastName: 'Karan fd',
71
- loginName: 'cap@coin.com',
72
- email: 'cap@coin.com',
73
- mobile: '919957676767',
31
+ userId: 4,
32
+ firstName: 'Krishna',
33
+ lastName: 'Mehra',
34
+ loginName: 'kmehra@capillary.co.in',
35
+ email: 'kmehra@capillary.co.in',
36
+ mobile: '918227337383',
74
37
  isMobileValidated: 1,
75
38
  isEmailValidated: 1,
76
39
  },
77
40
  ],
78
41
  },
79
- templateError: {},
80
- fetchingWeCrmAccounts: false,
81
- fetchingUserList: false,
82
- isSearch: false,
83
- weCrmAccounts: [
84
- {
85
- sourceTypeName: 'WHATSAPP',
86
- name: 'WhatsppTest',
87
- isActive: true,
88
- sourceTypeId: 19,
89
- configs: {
90
- accessToken: '4676323eb5d1f975b0987070c03a8efc',
91
- },
92
- toMirror: false,
93
- id: 12673,
94
- uuid: '6ac077dbdc7849ccb8db0d38917a6ed5',
95
- sourceAccountIdentifier: 'AC41030cebba9e2f1ce37c78235da0ee18',
96
- commChannels: ['whatsapp'],
97
- attribution: {
98
- createDate: '2022-01-05T00:00:00+05:30',
99
- createdBy: {
100
- adminType: 'GENERAL',
101
- name: '1371622280_Ashish',
102
- currencyId: 0,
103
- code: '1371622280_919866643044',
104
- isActive: true,
105
- isOuEnabled: false,
106
- languageId: 0,
107
- timeZoneId: 0,
108
- type: 'ADMIN_USER',
109
- id: 15000449,
110
- description: '',
111
- },
112
- modifiedBy: {
113
- adminType: 'GENERAL',
114
- name: '1371622280_Ashish',
115
- currencyId: 0,
116
- code: '1371622280_919866643044',
117
- isActive: true,
118
- isOuEnabled: false,
119
- languageId: 0,
120
- timeZoneId: 0,
121
- type: 'ADMIN_USER',
122
- id: 15000449,
123
- description: '',
124
- },
125
- modifiedDate: '2022-01-05T00:00:00+05:30',
126
- },
127
- },
128
- ],
129
- userListFetchError: false,
130
- templates: [
131
- {
132
- _id: '620b88327ecc279198099117',
133
- name: 'saad',
134
- type: 'WHATSAPP',
135
- versions: {
136
- $init: true,
137
- history: [],
138
- base: {
139
- content: {
140
- whatsapp: {
141
- status: 'approved',
142
- templateId: 'HTc5068cbaa813f931ed887f19922ca19d',
143
- accountName: 'WhatsppTest',
144
- accessToken: '4676323eb5d1f975b0987070c03a8efc',
145
- accountId: 'AC41030cebba9e2f1ce37c78235da0ee18',
146
- mediaType: 'text',
147
- languages: [
148
- {
149
- content: "$'asdasd\nClick {{1}} to unsubscribe'",
150
- language: 'en',
151
- },
152
- ],
153
- category: 'ACCOUNT_UPDATE',
154
- rejection_reason: null,
42
+ senderDetails: {
43
+ status: 'SUCCESS',
44
+ data: [
45
+ {
46
+ id: 208767,
47
+ orgId: 50371,
48
+ label: '',
49
+ domainProperties: {
50
+ id: 3868,
51
+ domainName: 'whatsapp_twilio',
52
+ description: 'whatsapp_twilio',
53
+ contactInfo: [
54
+ {
55
+ id: 100566,
56
+ domainPropId: 3868,
57
+ messageClass: 'WHATSAPP',
58
+ type: 'gsm_sender_id',
59
+ label: 'whatsapp_twilio',
60
+ value: '918431027963',
61
+ valid: true,
62
+ default: true,
155
63
  },
156
- },
157
- },
158
- },
159
- isActive: true,
160
- orgId: 50146,
161
- createdBy: '15000449',
162
- updatedBy: '15000449',
163
- createdAt: '2022-02-15T11:02:11.190Z',
164
- updatedAt: '2022-02-15T11:02:11.190Z',
165
- totalCount: 12,
166
- },
167
- {
168
- _id: '620b59b37ecc273edd099102',
169
- name: 'sdad',
170
- type: 'WHATSAPP',
171
- versions: {
172
- $init: true,
173
- history: [],
174
- base: {
175
- content: {
176
- whatsapp: {
177
- status: 'approved',
178
- templateId: 'HT27ff217529be534258c84e1769a20a41',
179
- accountName: 'WhatsppTest',
180
- accessToken: '4676323eb5d1f975b0987070c03a8efc',
181
- accountId: 'AC41030cebba9e2f1ce37c78235da0ee18',
182
- mediaType: 'text',
183
- languages: [
184
- {
185
- content: "$'!@#$%^&*_\nClick {{1}} to unsubscribe'",
186
- language: 'en',
187
- },
188
- ],
189
- category: 'ACCOUNT_UPDATE',
190
- rejection_reason: null,
64
+ {
65
+ id: 100567,
66
+ domainPropId: 3868,
67
+ messageClass: 'WHATSAPP',
68
+ type: 'cdma_sender_id',
69
+ label: 'whatsapp_twilio',
70
+ value: '918431027963',
71
+ valid: true,
72
+ default: true,
191
73
  },
74
+ ],
75
+ xengageEnabled: false,
76
+ connectionProperties: {
77
+ account_sid: 'AC41030cebba9e2f1ce37c78235da0ee18',
78
+ auth_token: '4676323eb5d1f975b0987070c03a8efc',
79
+ messaging_service_sid: 'MG1dc01b34988f9f1c6c246830a18c1f5c',
192
80
  },
81
+ hostName: 'twiliowhatsapptrans',
193
82
  },
83
+ priority: 1,
84
+ valid: true,
194
85
  },
195
- isActive: true,
196
- orgId: 50146,
197
- createdBy: '15000449',
198
- updatedBy: '15000449',
199
- createdAt: '2022-02-15T07:43:47.658Z',
200
- updatedAt: '2022-02-15T07:43:47.658Z',
201
- totalCount: 12,
202
- },
86
+ ],
87
+ errors: [],
88
+ },
89
+ templateError: {},
90
+ fetchingUserList: false,
91
+ isSearch: false,
92
+ userListFetchError: false,
93
+ templates: [
203
94
  {
204
- _id: '620b59637ecc27e0cc0990ff',
205
- name: 'adsdd',
95
+ _id: '62a029da22c5bf8cce6a5b5d',
96
+ name: 'test_946137',
206
97
  type: 'WHATSAPP',
207
98
  versions: {
208
99
  $init: true,
@@ -211,107 +102,51 @@ export default {
211
102
  content: {
212
103
  whatsapp: {
213
104
  status: 'approved',
214
- templateId: 'HT92d060ab715e2fc03fc49ee045943f9a',
215
- accountName: 'WhatsppTest',
105
+ templateId: 'HT2ded6c498665b071fb61416e3b66a539',
106
+ accountName: 'whatsappTest',
216
107
  accessToken: '4676323eb5d1f975b0987070c03a8efc',
217
108
  accountId: 'AC41030cebba9e2f1ce37c78235da0ee18',
218
- mediaType: 'text',
219
- languages: [
109
+ templateEditor: false,
110
+ mediaType: 'TEXT',
111
+ buttons: [
220
112
  {
221
- content: "$'!@#$%^&*()_+\nClick {{1}} to unsubscribe'",
222
- language: 'en',
113
+ url: 'https://www.google.com',
114
+ text: 'View menu',
115
+ type: 'STATIC_URL',
116
+ index: 0,
223
117
  },
224
- ],
225
- category: 'ALERT_UPDATE',
226
- rejection_reason: null,
227
- },
228
- },
229
- },
230
- },
231
- isActive: true,
232
- orgId: 50146,
233
- createdBy: '15000449',
234
- updatedBy: '15000449',
235
- createdAt: '2022-02-15T07:42:27.634Z',
236
- updatedAt: '2022-02-15T07:42:27.634Z',
237
- totalCount: 12,
238
- },
239
- {
240
- _id: '620b592c7ecc2758610990fe',
241
- name: 'sdfsdf',
242
- type: 'WHATSAPP',
243
- versions: {
244
- $init: true,
245
- history: [],
246
- base: {
247
- content: {
248
- whatsapp: {
249
- status: 'approved',
250
- templateId: 'HTe9afa93dbae9c8008d9b48fa9634e8cc',
251
- accountName: 'WhatsppTest',
252
- accessToken: '4676323eb5d1f975b0987070c03a8efc',
253
- accountId: 'AC41030cebba9e2f1ce37c78235da0ee18',
254
- mediaType: 'text',
255
- languages: [
256
118
  {
257
- content: "$'!@#$%^&*()_+\nClick {{1}} to unsubscribe'",
258
- language: 'en',
119
+ phone_number: '+917892303868',
120
+ text: 'Call for info',
121
+ type: 'PHONE_NUMBER',
122
+ index: 1,
259
123
  },
260
124
  ],
261
- category: 'ACCOUNT_UPDATE',
262
- rejection_reason: null,
263
- },
264
- },
265
- },
266
- },
267
- isActive: true,
268
- orgId: 50146,
269
- createdBy: '15000449',
270
- updatedBy: '15000449',
271
- createdAt: '2022-02-15T07:41:32.794Z',
272
- updatedAt: '2022-02-15T07:41:32.794Z',
273
- totalCount: 12,
274
- },
275
- {
276
- _id: '620b45a37ecc2790760990f3',
277
- name: 'demo123_',
278
- type: 'WHATSAPP',
279
- versions: {
280
- $init: true,
281
- history: [],
282
- base: {
283
- content: {
284
- whatsapp: {
285
- status: 'rejected',
286
- templateId: 'HT0e13521c16f501edcddb3834bf39b7a0',
287
- accountName: 'WhatsppTest',
288
- accessToken: '4676323eb5d1f975b0987070c03a8efc',
289
- accountId: 'AC41030cebba9e2f1ce37c78235da0ee18',
290
- mediaType: 'text',
125
+ buttonType: 'CTA',
291
126
  languages: [
292
127
  {
293
128
  content:
294
- "$'sasdad {{1}} and {{2}}\nClick {{3}} to unsubscribe'",
129
+ '{{1}} your reservation is confirmed\nClick {{2}} to unsubscribe',
295
130
  language: 'en',
296
131
  },
297
132
  ],
298
- category: 'ALERT_UPDATE',
299
- rejection_reason: 'INVALID_FORMAT',
133
+ category: 'RESERVATION_UPDATE',
134
+ rejection_reason: null,
300
135
  },
301
136
  },
302
137
  },
303
138
  },
304
139
  isActive: true,
305
- orgId: 50146,
140
+ orgId: 50371,
306
141
  createdBy: '15000449',
307
142
  updatedBy: '15000449',
308
- createdAt: '2022-02-15T06:18:11.404Z',
309
- updatedAt: '2022-02-15T06:20:00.566Z',
310
- totalCount: 12,
143
+ createdAt: '2022-06-08T04:47:22.672Z',
144
+ updatedAt: '2022-06-09T04:38:01.242Z',
145
+ totalCount: 79,
311
146
  },
312
147
  {
313
- _id: '6206293583c7567293240513',
314
- name: 'hiaqwe23123',
148
+ _id: '629c401a7542be75b4a56284',
149
+ name: 'no_unsub_test',
315
150
  type: 'WHATSAPP',
316
151
  versions: {
317
152
  $init: true,
@@ -320,15 +155,16 @@ export default {
320
155
  content: {
321
156
  whatsapp: {
322
157
  status: 'approved',
323
- templateId: 'HT5d4dc726d77452b062833d662769bd96',
324
- accountName: 'WhatsppTest',
158
+ templateId: 'HTbdd5d43cbb082bbb9646a3b5d2c1f208',
159
+ accountName: 'whatsappTest',
325
160
  accessToken: '4676323eb5d1f975b0987070c03a8efc',
326
161
  accountId: 'AC41030cebba9e2f1ce37c78235da0ee18',
327
- templateEditor: 'dfsdfdsf',
162
+ templateEditor: false,
328
163
  mediaType: 'TEXT',
329
164
  languages: [
330
165
  {
331
- content: "$'dfsdfdsf\nClick {{1}} to unsubscribe'",
166
+ content:
167
+ 'Hi {{1}}, You have received {{2}} offer which is valid till {{3}}. Make use of it.',
332
168
  language: 'en',
333
169
  },
334
170
  ],
@@ -339,16 +175,16 @@ export default {
339
175
  },
340
176
  },
341
177
  isActive: true,
342
- orgId: 50146,
178
+ orgId: 50371,
343
179
  createdBy: '15000449',
344
180
  updatedBy: '15000449',
345
- createdAt: '2022-02-11T09:15:34.151Z',
346
- updatedAt: '2022-02-11T09:15:34.151Z',
347
- totalCount: 12,
181
+ createdAt: '2022-06-05T05:33:14.742Z',
182
+ updatedAt: '2022-06-06T02:03:14.615Z',
183
+ totalCount: 79,
348
184
  },
349
185
  {
350
- _id: '62034e0d83c756035f2404ef',
351
- name: 'payment_status',
186
+ _id: '629b1a1e7542be2a3da56273',
187
+ name: 'test_741254',
352
188
  type: 'WHATSAPP',
353
189
  versions: {
354
190
  $init: true,
@@ -357,72 +193,44 @@ export default {
357
193
  content: {
358
194
  whatsapp: {
359
195
  status: 'approved',
360
- templateId: 'HT79d91d09938365fbade7e5fd208311da',
361
- accountName: 'WhatsppTest',
196
+ templateId: 'HT740631406f0704eb4643ae5d1a8a98aa',
197
+ accountName: 'whatsappTest',
362
198
  accessToken: '4676323eb5d1f975b0987070c03a8efc',
363
199
  accountId: 'AC41030cebba9e2f1ce37c78235da0ee18',
364
- mediaType: 'text',
365
- languages: [
200
+ templateEditor: false,
201
+ mediaType: 'TEXT',
202
+ buttons: [
366
203
  {
367
- content:
368
- "$'Purchase successful @ {{1}}\nCongrats!!\n{{2}} added to your Vishal Mega Mart account\nRedeem on {{3}}\nValid only for {{4}}\nTerms and conditions apply\n{{5}}\nClick {{6}} to unsubscribe'",
369
- language: 'en',
204
+ phone_number: '+919738752617',
205
+ text: 'Call',
206
+ type: 'PHONE_NUMBER',
207
+ index: 0,
370
208
  },
371
209
  ],
372
- category: 'PAYMENT_UPDATE',
373
- rejection_reason: null,
374
- },
375
- },
376
- },
377
- },
378
- isActive: true,
379
- orgId: 50146,
380
- createdBy: '15000449',
381
- updatedBy: '15000449',
382
- createdAt: '2022-02-09T05:15:57.700Z',
383
- updatedAt: '2022-02-09T05:15:57.700Z',
384
- totalCount: 12,
385
- },
386
- {
387
- _id: '62034bf683c75682f82404ee',
388
- name: 'reservation_update',
389
- type: 'WHATSAPP',
390
- versions: {
391
- $init: true,
392
- history: [],
393
- base: {
394
- content: {
395
- whatsapp: {
396
- status: 'approved',
397
- templateId: 'HT41de93f2b9fce551026be8ef53c38cd5',
398
- accountName: 'WhatsppTest',
399
- accessToken: '4676323eb5d1f975b0987070c03a8efc',
400
- accountId: 'AC41030cebba9e2f1ce37c78235da0ee18',
401
- mediaType: 'text',
210
+ buttonType: 'CTA',
402
211
  languages: [
403
212
  {
404
- content:
405
- "$'Hi {{1}}, your reservation at {{2}} is confirmed for {{3}} at {{4}}\nClick {{5}} to unsubscribe'",
213
+ content: 'You have received {{1}} points',
406
214
  language: 'en',
407
215
  },
408
216
  ],
409
- category: 'RESERVATION_UPDATE',
217
+ category: 'ALERT_UPDATE',
410
218
  rejection_reason: null,
411
219
  },
412
220
  },
413
221
  },
414
222
  },
415
223
  isActive: true,
416
- orgId: 50146,
224
+ orgId: 50371,
417
225
  createdBy: '15000449',
418
226
  updatedBy: '15000449',
419
- createdAt: '2022-02-09T05:07:02.525Z',
420
- updatedAt: '2022-02-09T05:07:02.525Z',
421
- totalCount: 12,
227
+ createdAt: '2022-06-04T08:38:54.564Z',
228
+ updatedAt: '2022-06-05T05:32:15.670Z',
229
+ totalCount: 79,
422
230
  },
423
231
  {
424
- _id: '62034b8583c7566fbb2404ed',
425
- name: 'optout_update',
232
+ _id: '6299780f7542be0254a5624a',
233
+ name: 'test_5555',
426
234
  type: 'WHATSAPP',
427
235
  versions: {
428
236
  $init: true,
@@ -431,35 +239,36 @@ export default {
431
239
  content: {
432
240
  whatsapp: {
433
241
  status: 'approved',
434
- templateId: 'HT6562fb8f7267a51d5de099f7ea4e3077',
435
- accountName: 'WhatsppTest',
242
+ templateId: 'HT02430f63059215b79e770f3a30ae5823',
243
+ accountName: 'whatsappTest',
436
244
  accessToken: '4676323eb5d1f975b0987070c03a8efc',
437
245
  accountId: 'AC41030cebba9e2f1ce37c78235da0ee18',
438
- mediaType: 'text',
246
+ templateEditor: false,
247
+ mediaType: 'TEXT',
439
248
  languages: [
440
249
  {
441
250
  content:
442
- "$'Dear Customer you have been opted out to receive messages from us. To Opt in give a missed call at +918067006166. Don't miss out on our offers & SHOP FOR FREE!\nClick {{1}} to unsubscribe'",
443
- language: 'en',
251
+ 'ಪಾವತಿ ಯಶಸ್ವಿಯಾಗಿದೆ {{1}}\nClick {{2}} to unsubscribe',
252
+ language: 'kn',
444
253
  },
445
254
  ],
446
- category: 'ACCOUNT_UPDATE',
255
+ category: 'PAYMENT_UPDATE',
447
256
  rejection_reason: null,
448
257
  },
449
258
  },
450
259
  },
451
260
  },
452
261
  isActive: true,
453
- orgId: 50146,
262
+ orgId: 50371,
454
263
  createdBy: '15000449',
455
264
  updatedBy: '15000449',
456
- createdAt: '2022-02-09T05:05:09.446Z',
457
- updatedAt: '2022-02-09T05:05:09.446Z',
458
- totalCount: 12,
265
+ createdAt: '2022-06-03T02:55:12.283Z',
266
+ updatedAt: '2022-06-03T04:59:27.534Z',
267
+ totalCount: 79,
459
268
  },
460
269
  {
461
- _id: '62034b4683c75608cf2404ec',
462
- name: 'points_update',
270
+ _id: '62988c2f7d11ed69168252a6',
271
+ name: 'test_206',
463
272
  type: 'WHATSAPP',
464
273
  versions: {
465
274
  $init: true,
@@ -468,105 +277,47 @@ export default {
468
277
  content: {
469
278
  whatsapp: {
470
279
  status: 'approved',
471
- templateId: 'HT9bb4d61eea1699d2dbcaecd1cb558345',
472
- accountName: 'WhatsppTest',
280
+ templateId: 'HTcb9eeef7858d0a32deafe0f1b727cb2b',
281
+ accountName: 'whatsappTest',
473
282
  accessToken: '4676323eb5d1f975b0987070c03a8efc',
474
283
  accountId: 'AC41030cebba9e2f1ce37c78235da0ee18',
475
- mediaType: 'text',
476
- languages: [
284
+ templateEditor: false,
285
+ mediaType: 'TEXT',
286
+ buttons: [
477
287
  {
478
- content:
479
- "$'Dear Customer, your{{1}} points are about to expire. Redeem before {{2}} at nearest Vishal Mega Mart and SHOP FOR FREE!\nT&C\nClick {{3}} to unsubscribe'",
480
- language: 'en',
288
+ phone_number: '+919738752617',
289
+ text: 'Call',
290
+ type: 'PHONE_NUMBER',
291
+ index: 0,
481
292
  },
482
- ],
483
- category: 'ACCOUNT_UPDATE',
484
- rejection_reason: null,
485
- },
486
- },
487
- },
488
- },
489
- isActive: true,
490
- orgId: 50146,
491
- createdBy: '15000449',
492
- updatedBy: '15000449',
493
- createdAt: '2022-02-09T05:04:06.579Z',
494
- updatedAt: '2022-02-09T05:04:06.579Z',
495
- totalCount: 12,
496
- },
497
- {
498
- _id: '62026d1283c7566ce92404de',
499
- name: 'test_rejected_message_3',
500
- type: 'WHATSAPP',
501
- versions: {
502
- $init: true,
503
- history: [],
504
- base: {
505
- content: {
506
- whatsapp: {
507
- status: 'rejected',
508
- templateId: 'HT9012f1c7290beb0286b7c4138baf675d',
509
- accountName: 'WhatsppTest',
510
- accessToken: '4676323eb5d1f975b0987070c03a8efc',
511
- accountId: 'AC41030cebba9e2f1ce37c78235da0ee18',
512
- mediaType: 'text',
513
- languages: [
514
293
  {
515
- content:
516
- "$'Hello {{1}} and {{2}}\nClick {{3}} to unsubscribe'",
517
- language: 'en',
294
+ url: 'https://fast.com/',
295
+ text: 'More info',
296
+ type: 'STATIC_URL',
297
+ index: 1,
518
298
  },
519
299
  ],
520
- category: 'ALERT_UPDATE',
521
- rejection_reason: 'INVALID_FORMAT',
522
- },
523
- },
524
- },
525
- },
526
- isActive: true,
527
- orgId: 50146,
528
- createdBy: '15000449',
529
- updatedBy: '15000449',
530
- createdAt: '2022-02-08T13:16:02.366Z',
531
- updatedAt: '2022-02-08T13:16:02.366Z',
532
- totalCount: 12,
533
- },
534
- {
535
- _id: '62025d0583c756f73f2404d8',
536
- name: 'test_rejected_message_1',
537
- type: 'WHATSAPP',
538
- versions: {
539
- $init: true,
540
- history: [],
541
- base: {
542
- content: {
543
- whatsapp: {
544
- status: 'rejected',
545
- templateId: 'HT5196572bf61ebcc6b8c6216522226b14',
546
- accountName: 'WhatsppTest',
547
- accessToken: '4676323eb5d1f975b0987070c03a8efc',
548
- accountId: 'AC41030cebba9e2f1ce37c78235da0ee18',
549
- mediaType: 'text',
300
+ buttonType: 'CTA',
550
301
  languages: [
551
302
  {
552
303
  content:
553
- "$'hi {{1}} and {{2}}\nClick {{3}} to unsubscribe'",
304
+ 'You have received {{1}} points\nClick {{2}} to unsubscribe',
554
305
  language: 'en',
555
306
  },
556
307
  ],
557
308
  category: 'ALERT_UPDATE',
558
- rejection_reason: 'INVALID_FORMAT',
309
+ rejection_reason: null,
559
310
  },
560
311
  },
561
312
  },
562
313
  },
563
314
  isActive: true,
564
- orgId: 50146,
315
+ orgId: 50371,
565
316
  createdBy: '15000449',
566
317
  updatedBy: '15000449',
567
- createdAt: '2022-02-08T12:07:34.192Z',
568
- updatedAt: '2022-02-08T12:07:34.192Z',
569
- totalCount: 12,
318
+ createdAt: '2022-06-02T10:08:48.259Z',
319
+ updatedAt: '2022-06-03T02:48:34.166Z',
320
+ totalCount: 79,
570
321
  },
571
322
  ],
572
323
  },
@@ -1191,14 +942,6 @@ export default {
1191
942
  channel: 'RCS',
1192
943
  validity: true,
1193
944
  },
1194
- lineEditTemplateData: {
1195
- mode: 'edit',
1196
- _id: '629f7ecf134738019b2e332e',
1197
- modeType: '',
1198
- type: 'LINE',
1199
- channel: 'LINE',
1200
- validity: true,
1201
- },
1202
945
  getWhatsappContentOutput: '1234567890\nClick {{unsubscribe}} to unsubscribe',
1203
946
  getWhatsappStatusOutput: {
1204
947
  key: 'approved',
@@ -1432,68 +1175,8 @@ export default {
1432
1175
  },
1433
1176
  linePreviewTemplateData1: {
1434
1177
  mode: 'preview',
1435
- _id: '629f7ecf134738019b2e332e',
1436
- name: 'ggg1',
1437
- type: 'LINE',
1438
- versions: {
1439
- history: [],
1440
- base: {
1441
- content: {
1442
- to: '{{line_id}}',
1443
- messages: [
1444
- {
1445
- type: 'flex',
1446
- altText: 'ggg',
1447
- contents: {
1448
- contents: [
1449
- {
1450
- type: 'bubble',
1451
- hero: {
1452
- type: 'image',
1453
- url: 'https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/b9f2aa7a-3f1a-4a20-a737-8d50841.jpeg',
1454
- size: 'full',
1455
- aspectRatio: '1:1',
1456
- aspectMode: 'cover',
1457
- },
1458
- footer: {
1459
- type: 'box',
1460
- layout: 'vertical',
1461
- spacing: 'xs',
1462
- contents: [
1463
- {
1464
- type: 'button',
1465
- style: 'link',
1466
- height: 'sm',
1467
- action: {
1468
- type: 'message',
1469
- label: 'ggg',
1470
- text: 'ggg',
1471
- },
1472
- },
1473
- ],
1474
- },
1475
- },
1476
- ],
1477
- type: "carousel",
1478
- },
1479
- },
1480
- ],
1481
- },
1482
- },
1483
- },
1484
- isActive: true,
1485
- orgId: 1604,
1486
- createdBy: '15000449',
1487
- updatedBy: '15000449',
1488
- createdAt: '2022-06-07T16:37:35.447Z',
1489
- updatedAt: '2022-06-07T16:42:02.243Z',
1490
- totalCount: 31,
1491
- updatedByName: 'Ashish Karan fd',
1492
- },
1493
- linePreviewTemplateData2: {
1494
- mode: 'preview',
1495
- _id: '62a2e0dd22c5bf412b6a5bae',
1496
- name: 'rkrkrk',
1178
+ _id: '62a810e4d4715c768d6ee9cf',
1179
+ name: 'Demo Old Template 2(Multiple images)',
1497
1180
  type: 'LINE',
1498
1181
  versions: {
1499
1182
  $init: true,
@@ -1502,21 +1185,24 @@ export default {
1502
1185
  content: {
1503
1186
  messages: [
1504
1187
  {
1505
- altText: 'rlrlr',
1188
+ altText: 'Demo Old Template 2(Multiple images)',
1506
1189
  template: {
1507
1190
  type: 'image_carousel',
1508
1191
  columns: [
1509
1192
  {
1510
1193
  action: {
1511
- text: 'rkrk',
1512
- label: 'rkr',
1513
- type: 'message',
1194
+ uri: 'https://www.demo.com',
1195
+ label: 'Demo Old 2',
1196
+ type: 'uri',
1514
1197
  },
1515
- imageUrl: 'https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/a7be98a7-c138-4f9a-a1ab-47b8995.jpeg',
1198
+ imageUrl:
1199
+ 'https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/f374edfe-1fd4-4b15-a6f7-74d5d86.jpeg',
1200
+ },
1201
+ {
1202
+ imageUrl: '',
1516
1203
  },
1517
1204
  ],
1518
1205
  },
1519
- type: 'template',
1520
1206
  },
1521
1207
  ],
1522
1208
  to: '{{line_id}}',
@@ -1527,17 +1213,21 @@ export default {
1527
1213
  orgId: 1604,
1528
1214
  createdBy: '15000449',
1529
1215
  updatedBy: '15000449',
1530
- createdAt: '2022-06-10T06:12:46.099Z',
1531
- updatedAt: '2022-06-10T06:12:46.099Z',
1532
- totalCount: 41,
1216
+ createdAt: '2022-06-14T04:39:00.665Z',
1217
+ updatedAt: '2022-06-14T04:39:00.665Z',
1218
+ definition: {
1219
+ mode: 'template',
1220
+ },
1221
+ totalCount: 1,
1533
1222
  updatedByName: 'Ashish Karan fd',
1534
1223
  },
1535
- linePreviewTemplateData3: {
1224
+ linePreviewTemplateData2: {
1536
1225
  mode: 'preview',
1537
1226
  _id: '629f7ecf134738019b2e332e',
1538
1227
  name: 'ggg1',
1539
1228
  type: 'LINE',
1540
1229
  versions: {
1230
+ $init: true,
1541
1231
  history: [],
1542
1232
  base: {
1543
1233
  content: {
@@ -1548,11 +1238,48 @@ export default {
1548
1238
  altText: 'ggg',
1549
1239
  contents: {
1550
1240
  contents: [
1241
+ {
1242
+ type: 'bubble',
1243
+ hero: {
1244
+ type: 'image',
1245
+ url: 'https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/b9f2aa7a-3f1a-4a20-a737-8d50841.jpeg',
1246
+ size: 'full',
1247
+ aspectRatio: '1:1',
1248
+ aspectMode: 'cover',
1249
+ },
1250
+ footer: {
1251
+ type: 'box',
1252
+ layout: 'vertical',
1253
+ spacing: 'xs',
1254
+ contents: [
1255
+ {
1256
+ type: 'button',
1257
+ style: 'link',
1258
+ height: 'sm',
1259
+ action: {
1260
+ type: 'message',
1261
+ label: 'ggg',
1262
+ text: 'ggg',
1263
+ },
1264
+ },
1265
+ ],
1266
+ },
1267
+ },
1268
+ {
1269
+ type: 'bubble',
1270
+ hero: {},
1271
+ footer: {
1272
+ type: 'box',
1273
+ layout: 'vertical',
1274
+ spacing: 'xs',
1275
+ contents: [{}],
1276
+ },
1277
+ },
1551
1278
  {
1552
1279
  type: 'bubble',
1553
1280
  },
1554
1281
  ],
1555
- type: "carousel",
1282
+ type: 'carousel',
1556
1283
  },
1557
1284
  },
1558
1285
  ],
@@ -1565,82 +1292,10 @@ export default {
1565
1292
  updatedBy: '15000449',
1566
1293
  createdAt: '2022-06-07T16:37:35.447Z',
1567
1294
  updatedAt: '2022-06-07T16:42:02.243Z',
1568
- totalCount: 31,
1569
- updatedByName: 'Ashish Karan fd',
1570
- },
1571
- linePreviewTemplateData4: {
1572
- mode: 'preview',
1573
- _id: '62a2e0dd22c5bf412b6a5bae',
1574
- name: 'rkrkrk',
1575
- type: 'LINE',
1576
- versions: {
1577
- $init: true,
1578
- history: [],
1579
- base: {
1580
- content: {
1581
- messages: [
1582
- {
1583
- altText: 'rlrlr',
1584
- template: {
1585
- type: 'image_carousel',
1586
- },
1587
- type: 'template',
1588
- },
1589
- ],
1590
- to: '{{line_id}}',
1591
- },
1592
- },
1593
- },
1594
- isActive: true,
1595
- orgId: 1604,
1596
- createdBy: '15000449',
1597
- updatedBy: '15000449',
1598
- createdAt: '2022-06-10T06:12:46.099Z',
1599
- updatedAt: '2022-06-10T06:12:46.099Z',
1600
- totalCount: 41,
1601
- updatedByName: 'Ashish Karan fd',
1602
- },
1603
- linePreviewTemplateContent: {
1604
- mode: 'preview',
1605
- selectedSticker: {},
1606
- imageCarousel: [
1607
- {
1608
- imageUrl: 'https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/a7be98a7-c138-4f9a-a1ab-47b8995.jpeg',
1609
- actionLabel: 'rkr',
1610
- },
1611
- ],
1612
- type: 'image_carousel',
1613
- },
1614
- viberPreviewTemplateData: {
1615
- mode: 'preview',
1616
- _id: '6238426399910ee787e92a87',
1617
- name: 'testetsetst',
1618
- type: 'VIBER',
1619
- versions: {
1620
- $init: true,
1621
- history: [],
1622
- base: {
1623
- content: {
1624
- viber: {
1625
- text: 'testetsetst',
1626
- },
1627
- destinations: [
1628
- {
1629
- to: {
1630
- phoneNumber: '{{viber_user_id}}',
1631
- },
1632
- },
1633
- ],
1634
- },
1635
- },
1295
+ definition: {
1296
+ mode: 'template',
1636
1297
  },
1637
- isActive: true,
1638
- orgId: 1604,
1639
- createdBy: '15000449',
1640
- updatedBy: '15000449',
1641
- createdAt: '2022-03-21T09:16:19.972Z',
1642
- updatedAt: '2022-03-21T09:16:19.972Z',
1643
- totalCount: 2,
1298
+ totalCount: 1,
1644
1299
  updatedByName: 'Ashish Karan fd',
1645
1300
  },
1646
1301
  };