@@ -43,13 +43,15 @@ describe('Subscribe Profile', () => {
43
43
44
44
phone_number : '+17067675219' ,
45
45
list_id : '' ,
46
- timestamp : '2024-04-01T18:37:06.558Z'
46
+ timestamp : '2024-04-01T18:37:06.558Z' ,
47
+ historical_import : true
47
48
}
48
49
const requestBody = {
49
50
data : {
50
51
type : 'profile-subscription-bulk-create-job' ,
51
52
attributes : {
52
53
custom_source : 'Marketing Event' ,
54
+ historical_import : true ,
53
55
profiles : {
54
56
data : [
55
57
{
@@ -88,6 +90,9 @@ describe('Subscribe Profile', () => {
88
90
email : payload . email ,
89
91
phone_number : payload . phone_number
90
92
}
93
+ } ,
94
+ properties : {
95
+ historical_import : payload . historical_import
91
96
}
92
97
} )
93
98
const mapping = {
@@ -103,6 +108,9 @@ describe('Subscribe Profile', () => {
103
108
} ,
104
109
custom_source : {
105
110
'@path' : '$.event'
111
+ } ,
112
+ historical_import : {
113
+ '@path' : '$.properties.historical_import'
106
114
}
107
115
}
108
116
await expect (
@@ -114,13 +122,15 @@ describe('Subscribe Profile', () => {
114
122
115
123
phone_number : '+17067675219' ,
116
124
list_id : '12345' ,
117
- timestamp : '2024-04-01T18:37:06.558Z'
125
+ timestamp : '2024-04-01T18:37:06.558Z' ,
126
+ historical_import : true
118
127
}
119
128
const requestBody = {
120
129
data : {
121
130
type : 'profile-subscription-bulk-create-job' ,
122
131
attributes : {
123
132
custom_source : '-59' ,
133
+ historical_import : true ,
124
134
profiles : {
125
135
data : [
126
136
{
@@ -166,6 +176,9 @@ describe('Subscribe Profile', () => {
166
176
email : payload . email ,
167
177
phone_number : payload . phone_number
168
178
}
179
+ } ,
180
+ properties : {
181
+ historical_import : payload . historical_import
169
182
}
170
183
} )
171
184
const mapping = {
@@ -178,6 +191,9 @@ describe('Subscribe Profile', () => {
178
191
} ,
179
192
phone_number : {
180
193
'@path' : '$.context.traits.phone_number'
194
+ } ,
195
+ historical_import : {
196
+ '@path' : '$.properties.historical_import'
181
197
}
182
198
}
183
199
await expect (
@@ -188,12 +204,14 @@ describe('Subscribe Profile', () => {
188
204
const payload = {
189
205
190
206
list_id : '12345' ,
191
- timestamp : '2024-04-01T18:37:06.558Z'
207
+ timestamp : '2024-04-01T18:37:06.558Z' ,
208
+ historical_import : true
192
209
}
193
210
const requestBody = {
194
211
data : {
195
212
type : 'profile-subscription-bulk-create-job' ,
196
213
attributes : {
214
+ historical_import : true ,
197
215
custom_source : 'Marketing Event' ,
198
216
profiles : {
199
217
data : [
@@ -232,6 +250,9 @@ describe('Subscribe Profile', () => {
232
250
traits : {
233
251
email : payload . email
234
252
}
253
+ } ,
254
+ properties : {
255
+ historical_import : payload . historical_import
235
256
}
236
257
} )
237
258
const mapping = {
@@ -245,6 +266,9 @@ describe('Subscribe Profile', () => {
245
266
phone_number : {
246
267
'@path' : '$.context.traits.phone_number'
247
268
} ,
269
+ historical_import : {
270
+ '@path' : '$.properties.historical_import'
271
+ } ,
248
272
custom_source : 'Marketing Event'
249
273
}
250
274
await expect (
@@ -255,12 +279,14 @@ describe('Subscribe Profile', () => {
255
279
const payload = {
256
280
phone_number : '+17067675219' ,
257
281
list_id : '12345' ,
258
- timestamp : '2024-04-01T18:37:06.558Z'
282
+ timestamp : '2024-04-01T18:37:06.558Z' ,
283
+ historical_import : true
259
284
}
260
285
const requestBody = {
261
286
data : {
262
287
type : 'profile-subscription-bulk-create-job' ,
263
288
attributes : {
289
+ historical_import : true ,
264
290
custom_source : '-59' ,
265
291
profiles : {
266
292
data : [
@@ -299,6 +325,9 @@ describe('Subscribe Profile', () => {
299
325
traits : {
300
326
phone_number : payload . phone_number
301
327
}
328
+ } ,
329
+ properties : {
330
+ historical_import : payload . historical_import
302
331
}
303
332
} )
304
333
const mapping = {
@@ -311,6 +340,9 @@ describe('Subscribe Profile', () => {
311
340
} ,
312
341
phone_number : {
313
342
'@path' : '$.context.traits.phone_number'
343
+ } ,
344
+ historical_import : {
345
+ '@path' : '$.properties.historical_import'
314
346
}
315
347
}
316
348
await expect (
@@ -463,6 +495,7 @@ describe('Subscribe Profile', () => {
463
495
data : {
464
496
type : 'profile-subscription-bulk-create-job' ,
465
497
attributes : {
498
+ historical_import : false ,
466
499
profiles : {
467
500
data : [
468
501
{
@@ -511,6 +544,9 @@ describe('Subscribe Profile', () => {
511
544
} ,
512
545
phone_number : {
513
546
'@path' : '$.context.traits.phone_number'
547
+ } ,
548
+ historical_import : {
549
+ '@path' : '$.properties.historical_import'
514
550
}
515
551
}
516
552
const events = [
@@ -521,6 +557,9 @@ describe('Subscribe Profile', () => {
521
557
traits : {
522
558
523
559
}
560
+ } ,
561
+ properties : {
562
+ historical_import : true
524
563
}
525
564
} ) ,
526
565
createTestEvent ( {
@@ -530,6 +569,9 @@ describe('Subscribe Profile', () => {
530
569
traits : {
531
570
phone_number : '+17067675129'
532
571
}
572
+ } ,
573
+ properties : {
574
+ historical_import : true
533
575
}
534
576
} ) ,
535
577
createTestEvent ( {
@@ -540,13 +582,17 @@ describe('Subscribe Profile', () => {
540
582
541
583
phone_number : '+17067665437'
542
584
}
585
+ } ,
586
+ properties : {
587
+ historical_import : true
543
588
}
544
589
} )
545
590
]
546
591
const requestBody = {
547
592
data : {
548
593
type : 'profile-subscription-bulk-create-job' ,
549
594
attributes : {
595
+ historical_import : true ,
550
596
custom_source : '-59' ,
551
597
profiles : {
552
598
data : [
@@ -634,6 +680,9 @@ describe('Subscribe Profile', () => {
634
680
} ,
635
681
custom_source : {
636
682
'@path' : '$.event'
683
+ } ,
684
+ historical_import : {
685
+ '@path' : '$.properties.historical_import'
637
686
}
638
687
}
639
688
const events = [
@@ -645,6 +694,9 @@ describe('Subscribe Profile', () => {
645
694
646
695
list_id : '1'
647
696
}
697
+ } ,
698
+ properties : {
699
+ historical_import : true
648
700
}
649
701
} ) ,
650
702
createTestEvent ( {
@@ -655,6 +707,9 @@ describe('Subscribe Profile', () => {
655
707
phone_number : '+17067675129' ,
656
708
list_id : '2'
657
709
}
710
+ } ,
711
+ properties : {
712
+ historical_import : true
658
713
}
659
714
} ) ,
660
715
createTestEvent ( {
@@ -665,13 +720,17 @@ describe('Subscribe Profile', () => {
665
720
traits : {
666
721
667
722
}
723
+ } ,
724
+ properties : {
725
+ historical_import : true
668
726
}
669
727
} )
670
728
]
671
729
const requestBody1 = {
672
730
data : {
673
731
type : 'profile-subscription-bulk-create-job' ,
674
732
attributes : {
733
+ historical_import : true ,
675
734
custom_source : 'Test Event' ,
676
735
profiles : {
677
736
data : [
@@ -706,6 +765,7 @@ describe('Subscribe Profile', () => {
706
765
data : {
707
766
type : 'profile-subscription-bulk-create-job' ,
708
767
attributes : {
768
+ historical_import : true ,
709
769
custom_source : 'Test Event' ,
710
770
profiles : {
711
771
data : [
@@ -741,6 +801,7 @@ describe('Subscribe Profile', () => {
741
801
data : {
742
802
type : 'profile-subscription-bulk-create-job' ,
743
803
attributes : {
804
+ historical_import : true ,
744
805
custom_source : 'Marketing Event' ,
745
806
profiles : {
746
807
data : [
0 commit comments