@capillarytech/creatives-library 7.12.51 → 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 (38) hide show
  1. package/package.json +1 -1
  2. package/services/api.js +15 -2
  3. package/v2Components/CapImageUpload/index.js +33 -17
  4. package/v2Components/CapImageUpload/messages.js +11 -3
  5. package/v2Components/CapWhatsappCTA/constants.js +12 -1
  6. package/v2Components/CapWhatsappCTA/index.js +88 -29
  7. package/v2Components/CapWhatsappCTA/index.scss +4 -6
  8. package/v2Components/CapWhatsappCTA/messages.js +24 -0
  9. package/v2Components/TemplatePreview/_templatePreview.scss +9 -8
  10. package/v2Components/TemplatePreview/index.js +8 -6
  11. package/v2Components/TemplatePreview/tests/__snapshots__/index.test.js.snap +3 -19
  12. package/v2Components/TemplatePreview/tests/index.test.js +0 -2
  13. package/v2Components/WhatsappStatusContainer/index.js +42 -52
  14. package/v2Containers/CreativesContainer/SlideBoxContent.js +0 -1
  15. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +5 -7
  16. package/v2Containers/Line/Container/ImageCarousel/index.js +6 -7
  17. package/v2Containers/Line/Container/index.js +3 -1
  18. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +4660 -652
  19. package/v2Containers/Templates/_templates.scss +5 -0
  20. package/v2Containers/Templates/actions.js +7 -0
  21. package/v2Containers/Templates/constants.js +9 -1
  22. package/v2Containers/Templates/index.js +45 -30
  23. package/v2Containers/Templates/messages.js +1 -1
  24. package/v2Containers/Templates/reducer.js +15 -0
  25. package/v2Containers/Templates/sagas.js +32 -0
  26. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1774 -1881
  27. package/v2Containers/Templates/tests/index.test.js +14 -3
  28. package/v2Containers/Whatsapp/actions.js +22 -0
  29. package/v2Containers/Whatsapp/constants.js +56 -23
  30. package/v2Containers/Whatsapp/index.js +204 -66
  31. package/v2Containers/Whatsapp/index.scss +18 -2
  32. package/v2Containers/Whatsapp/messages.js +35 -7
  33. package/v2Containers/Whatsapp/reducer.js +35 -1
  34. package/v2Containers/Whatsapp/sagas.js +30 -1
  35. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +44349 -32926
  36. package/v2Containers/Whatsapp/tests/__snapshots__/utils.test.js.snap +15 -21
  37. package/v2Containers/Whatsapp/utils.js +16 -9
  38. package/v2Containers/mockdata.js +150 -399
@@ -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
  },