@segment/action-destinations 3.411.0 → 3.413.0

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 (131) hide show
  1. package/dist/destinations/aampe/fields.js +1 -1
  2. package/dist/destinations/attentive/functions.js +5 -8
  3. package/dist/destinations/attentive/functions.js.map +1 -1
  4. package/dist/destinations/attentive/index.js +21 -1
  5. package/dist/destinations/attentive/index.js.map +1 -1
  6. package/dist/destinations/attentive/types.d.ts +2 -5
  7. package/dist/destinations/braze/index.js +10 -1
  8. package/dist/destinations/braze/index.js.map +1 -1
  9. package/dist/destinations/braze/triggerCanvas/functions/dynamic-field-functions.d.ts +7 -0
  10. package/dist/destinations/braze/triggerCanvas/functions/dynamic-field-functions.js +46 -0
  11. package/dist/destinations/braze/triggerCanvas/functions/dynamic-field-functions.js.map +1 -0
  12. package/dist/destinations/braze/triggerCanvas/generated-types.d.ts +29 -0
  13. package/dist/destinations/braze/triggerCanvas/generated-types.js +3 -0
  14. package/dist/destinations/braze/triggerCanvas/generated-types.js.map +1 -0
  15. package/dist/destinations/braze/triggerCanvas/index.d.ts +5 -0
  16. package/dist/destinations/braze/triggerCanvas/index.js +199 -0
  17. package/dist/destinations/braze/triggerCanvas/index.js.map +1 -0
  18. package/dist/destinations/braze-cohorts/syncAudiences/index.js +7 -37
  19. package/dist/destinations/braze-cohorts/syncAudiences/index.js.map +1 -1
  20. package/dist/destinations/dotdigital/addContactToList/index.js +1 -1
  21. package/dist/destinations/dotdigital/api/index.d.ts +4 -0
  22. package/dist/destinations/dotdigital/api/index.js +9 -1
  23. package/dist/destinations/dotdigital/api/index.js.map +1 -1
  24. package/dist/destinations/dotdigital/api/resources/dd-campaign-api.d.ts +10 -0
  25. package/dist/destinations/dotdigital/api/resources/dd-campaign-api.js +52 -0
  26. package/dist/destinations/dotdigital/api/resources/dd-campaign-api.js.map +1 -0
  27. package/dist/destinations/dotdigital/api/resources/dd-cpaas-api.d.ts +9 -0
  28. package/dist/destinations/dotdigital/api/resources/dd-cpaas-api.js +17 -0
  29. package/dist/destinations/dotdigital/api/resources/dd-cpaas-api.js.map +1 -0
  30. package/dist/destinations/dotdigital/api/resources/dd-datafields-api.js +9 -21
  31. package/dist/destinations/dotdigital/api/resources/dd-datafields-api.js.map +1 -1
  32. package/dist/destinations/dotdigital/api/resources/dd-email-api.d.ts +9 -0
  33. package/dist/destinations/dotdigital/api/resources/dd-email-api.js +29 -0
  34. package/dist/destinations/dotdigital/api/resources/dd-email-api.js.map +1 -0
  35. package/dist/destinations/dotdigital/api/resources/dd-enrolment-api.js +9 -21
  36. package/dist/destinations/dotdigital/api/resources/dd-enrolment-api.js.map +1 -1
  37. package/dist/destinations/dotdigital/api/resources/dd-lists-api.js +11 -23
  38. package/dist/destinations/dotdigital/api/resources/dd-lists-api.js.map +1 -1
  39. package/dist/destinations/dotdigital/api/resources/dd-sms-api.d.ts +8 -0
  40. package/dist/destinations/dotdigital/api/resources/dd-sms-api.js +21 -0
  41. package/dist/destinations/dotdigital/api/resources/dd-sms-api.js.map +1 -0
  42. package/dist/destinations/dotdigital/api/types.d.ts +34 -0
  43. package/dist/destinations/dotdigital/api/types.js.map +1 -1
  44. package/dist/destinations/dotdigital/enrolContact/index.js +1 -0
  45. package/dist/destinations/dotdigital/enrolContact/index.js.map +1 -1
  46. package/dist/destinations/dotdigital/helpers/functions/checkAndCleanEmail.d.ts +3 -0
  47. package/dist/destinations/dotdigital/helpers/functions/checkAndCleanEmail.js +23 -0
  48. package/dist/destinations/dotdigital/helpers/functions/checkAndCleanEmail.js.map +1 -0
  49. package/dist/destinations/dotdigital/helpers/functions/checkAndCleanMobileNumber.d.ts +2 -0
  50. package/dist/destinations/dotdigital/helpers/functions/checkAndCleanMobileNumber.js +16 -0
  51. package/dist/destinations/dotdigital/helpers/functions/checkAndCleanMobileNumber.js.map +1 -0
  52. package/dist/destinations/dotdigital/helpers/functions/index.d.ts +2 -0
  53. package/dist/destinations/dotdigital/helpers/functions/index.js +12 -0
  54. package/dist/destinations/dotdigital/helpers/functions/index.js.map +1 -0
  55. package/dist/destinations/dotdigital/index.js +13 -4
  56. package/dist/destinations/dotdigital/index.js.map +1 -1
  57. package/dist/destinations/dotdigital/removeContactFromList/index.js +1 -0
  58. package/dist/destinations/dotdigital/removeContactFromList/index.js.map +1 -1
  59. package/dist/destinations/dotdigital/sendEmailCampaign/generated-types.d.ts +6 -0
  60. package/dist/destinations/dotdigital/sendEmailCampaign/generated-types.js +3 -0
  61. package/dist/destinations/dotdigital/sendEmailCampaign/generated-types.js.map +1 -0
  62. package/dist/destinations/dotdigital/sendEmailCampaign/index.d.ts +5 -0
  63. package/dist/destinations/dotdigital/sendEmailCampaign/index.js +57 -0
  64. package/dist/destinations/dotdigital/sendEmailCampaign/index.js.map +1 -0
  65. package/dist/destinations/dotdigital/sendSms/generated-types.d.ts +4 -0
  66. package/dist/destinations/dotdigital/sendSms/generated-types.js +3 -0
  67. package/dist/destinations/dotdigital/sendSms/generated-types.js.map +1 -0
  68. package/dist/destinations/dotdigital/sendSms/index.d.ts +5 -0
  69. package/dist/destinations/dotdigital/sendSms/index.js +35 -0
  70. package/dist/destinations/dotdigital/sendSms/index.js.map +1 -0
  71. package/dist/destinations/dotdigital/sendTransactionalEmail/generated-types.d.ts +9 -0
  72. package/dist/destinations/dotdigital/sendTransactionalEmail/generated-types.js +3 -0
  73. package/dist/destinations/dotdigital/sendTransactionalEmail/generated-types.js.map +1 -0
  74. package/dist/destinations/dotdigital/sendTransactionalEmail/index.d.ts +5 -0
  75. package/dist/destinations/dotdigital/sendTransactionalEmail/index.js +65 -0
  76. package/dist/destinations/dotdigital/sendTransactionalEmail/index.js.map +1 -0
  77. package/dist/destinations/dotdigital/sendTransactionalSms/generated-types.d.ts +7 -0
  78. package/dist/destinations/dotdigital/sendTransactionalSms/generated-types.js +3 -0
  79. package/dist/destinations/dotdigital/sendTransactionalSms/generated-types.js.map +1 -0
  80. package/dist/destinations/dotdigital/sendTransactionalSms/index.d.ts +5 -0
  81. package/dist/destinations/dotdigital/sendTransactionalSms/index.js +76 -0
  82. package/dist/destinations/dotdigital/sendTransactionalSms/index.js.map +1 -0
  83. package/dist/destinations/eagleeye-audiences/triggerBehavioralAction/index.js +2 -1
  84. package/dist/destinations/eagleeye-audiences/triggerBehavioralAction/index.js.map +1 -1
  85. package/dist/destinations/epsilon/generated-types.d.ts +3 -0
  86. package/dist/destinations/epsilon/generated-types.js +3 -0
  87. package/dist/destinations/epsilon/generated-types.js.map +1 -0
  88. package/dist/destinations/epsilon/index.d.ts +4 -0
  89. package/dist/destinations/epsilon/index.js +98 -0
  90. package/dist/destinations/epsilon/index.js.map +1 -0
  91. package/dist/destinations/epsilon/sendEvent/constants.d.ts +1 -0
  92. package/dist/destinations/epsilon/sendEvent/constants.js +5 -0
  93. package/dist/destinations/epsilon/sendEvent/constants.js.map +1 -0
  94. package/dist/destinations/epsilon/sendEvent/fields.d.ts +33 -0
  95. package/dist/destinations/epsilon/sendEvent/fields.js +402 -0
  96. package/dist/destinations/epsilon/sendEvent/fields.js.map +1 -0
  97. package/dist/destinations/epsilon/sendEvent/generated-types.d.ts +38 -0
  98. package/dist/destinations/epsilon/sendEvent/generated-types.js +3 -0
  99. package/dist/destinations/epsilon/sendEvent/generated-types.js.map +1 -0
  100. package/dist/destinations/epsilon/sendEvent/index.d.ts +5 -0
  101. package/dist/destinations/epsilon/sendEvent/index.js +146 -0
  102. package/dist/destinations/epsilon/sendEvent/index.js.map +1 -0
  103. package/dist/destinations/epsilon/sendEvent/types.d.ts +51 -0
  104. package/dist/destinations/epsilon/sendEvent/types.js +3 -0
  105. package/dist/destinations/epsilon/sendEvent/types.js.map +1 -0
  106. package/dist/destinations/index.js +1 -0
  107. package/dist/destinations/index.js.map +1 -1
  108. package/dist/destinations/intercom/identifyContact/index.js +0 -9
  109. package/dist/destinations/intercom/identifyContact/index.js.map +1 -1
  110. package/dist/destinations/linkedin-audiences/updateAudience/index.js +10 -2
  111. package/dist/destinations/linkedin-audiences/updateAudience/index.js.map +1 -1
  112. package/dist/destinations/liveramp-audiences/audienceEnteredS3/generated-types.d.ts +1 -1
  113. package/dist/destinations/liveramp-audiences/audienceEnteredS3/index.js +5 -1
  114. package/dist/destinations/liveramp-audiences/audienceEnteredS3/index.js.map +1 -1
  115. package/dist/destinations/liveramp-audiences/audienceEnteredS3/s3.d.ts +2 -1
  116. package/dist/destinations/liveramp-audiences/audienceEnteredS3/s3.js +34 -0
  117. package/dist/destinations/liveramp-audiences/audienceEnteredS3/s3.js.map +1 -1
  118. package/dist/destinations/singlestore/index.js +8 -8
  119. package/dist/destinations/taboola-actions/index.js +2 -1
  120. package/dist/destinations/taboola-actions/index.js.map +1 -1
  121. package/dist/destinations/taboola-actions/syncAudience/client.js +2 -1
  122. package/dist/destinations/taboola-actions/syncAudience/client.js.map +1 -1
  123. package/dist/destinations/topsort/impressionsList/generated-types.d.ts +11 -0
  124. package/dist/destinations/topsort/impressionsList/generated-types.js +3 -0
  125. package/dist/destinations/topsort/impressionsList/generated-types.js.map +1 -0
  126. package/dist/destinations/topsort/impressionsList/index.d.ts +5 -0
  127. package/dist/destinations/topsort/impressionsList/index.js +84 -0
  128. package/dist/destinations/topsort/impressionsList/index.js.map +1 -0
  129. package/dist/destinations/topsort/index.js +9 -0
  130. package/dist/destinations/topsort/index.js.map +1 -1
  131. package/package.json +2 -2
@@ -0,0 +1,402 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.standardFields = exports.deviceType = exports.version = exports.appId = exports.id = exports.dtmc_conv_store_location = exports.dtmc_conv_type = exports.dtm_conv_curr = exports.dtm_items = exports.dtm_conv_val = exports.dtmc_transaction_id = exports.dtmc_mpn = exports.dtmc_upc = exports.dtmc_brand = exports.dtmc_product_id = exports.dtmc_sub_category = exports.dtmc_category = exports.dtmc_department = exports.identifiers = exports.customEventName = exports.dtm_event = exports.dtm_promo_id = exports.dtm_fid = void 0;
4
+ exports.dtm_fid = {
5
+ label: 'Form ID',
6
+ description: 'Form ID used in Epsilon’s system to identify app visits vs. conversions.',
7
+ type: 'string',
8
+ required: true
9
+ };
10
+ exports.dtm_promo_id = {
11
+ label: 'Promo ID',
12
+ description: 'Promo ID used in Epsilon’s system to identify the promotion associated with the event.',
13
+ type: 'string',
14
+ default: { '@path': '$.properties.promo_id' }
15
+ };
16
+ exports.dtm_event = {
17
+ label: 'Event Name',
18
+ description: 'The name of the event to send to Epsilon.',
19
+ type: 'string',
20
+ required: true,
21
+ choices: [
22
+ { label: 'Custom event', value: 'custom' },
23
+ { label: 'First App Open/App Download', value: 'firstOpen' },
24
+ { label: 'App Open', value: 'appOpen' },
25
+ { label: 'Sign in/Create Account', value: 'signIn' },
26
+ { label: 'Shop Department View', value: 'department' },
27
+ { label: 'Shop Category View', value: 'category' },
28
+ { label: 'Shop Subcategory View', value: 'subcategory' },
29
+ { label: 'Shop Product View', value: 'product' },
30
+ { label: 'Add to Favorites', value: 'addFavorites' },
31
+ { label: 'Add to Saved List', value: 'addSavedList' },
32
+ { label: 'Find a Store', value: 'store' },
33
+ { label: 'Reward Signup', value: 'rewardSignup' },
34
+ { label: 'Add to Cart', value: 'cart' },
35
+ { label: 'Transaction Complete', value: 'conversion' }
36
+ ]
37
+ };
38
+ exports.customEventName = {
39
+ label: 'Custom Event Name',
40
+ description: 'The name of the custom event to send to Epsilon.',
41
+ type: 'string',
42
+ default: { '@path': '$.event' },
43
+ required: {
44
+ conditions: [{ fieldKey: 'dtm_event', operator: 'is', value: 'custom' }]
45
+ },
46
+ depends_on: {
47
+ conditions: [
48
+ {
49
+ fieldKey: 'dtm_event',
50
+ operator: 'is',
51
+ value: 'custom'
52
+ }
53
+ ]
54
+ }
55
+ };
56
+ exports.identifiers = {
57
+ label: 'Identifiers',
58
+ description: 'Unique identifiers for the user.',
59
+ type: 'object',
60
+ required: true,
61
+ properties: {
62
+ deviceID: {
63
+ label: 'Device ID',
64
+ description: 'Mobile Device ID (IDFV or Google App Set ID).',
65
+ type: 'string'
66
+ },
67
+ advertisingId: {
68
+ label: 'Advertising ID',
69
+ description: 'Mobile Ad ID (IDFA or Google Add ID).',
70
+ type: 'string'
71
+ },
72
+ dtm_user_agent: {
73
+ label: 'User Agent',
74
+ description: 'User agent of the mobile device.',
75
+ type: 'string'
76
+ },
77
+ dtm_user_ip: {
78
+ label: 'IP Address',
79
+ description: 'IP address of the user.',
80
+ type: 'string'
81
+ },
82
+ dtm_email_hash: {
83
+ label: 'Email address',
84
+ description: 'Accepts hashed or unhashed emails. Segment will ensure that a non hashed email is hashed before being sent to Epsilon',
85
+ type: 'string'
86
+ },
87
+ dtm_mobile_hash: {
88
+ label: 'Mobile Hash',
89
+ description: 'Accepts hashed or unhashed mobile numbers. Segment will ensure that a non hashed mobile number is hashed before being sent to Epsilon',
90
+ type: 'string'
91
+ },
92
+ dtm_user_id: {
93
+ label: 'User ID',
94
+ description: 'Unique identifier for the user.',
95
+ type: 'string'
96
+ }
97
+ },
98
+ default: {
99
+ deviceID: { '@path': '$.context.device.id' },
100
+ advertisingId: { '@path': '$.context.device.advertisingId' },
101
+ dtm_user_agent: { '@path': '$.context.userAgent' },
102
+ dtm_user_ip: { '@path': '$.context.ip' },
103
+ dtm_email_hash: {
104
+ '@if': {
105
+ exists: { '@path': '$.context.traits.email' },
106
+ then: { '@path': '$.context.traits.email' },
107
+ else: { '@path': '$.properties.email' }
108
+ }
109
+ },
110
+ dtm_mobile_hash: {
111
+ '@if': {
112
+ exists: { '@path': '$.context.traits.phone' },
113
+ then: { '@path': '$.context.traits.phone' },
114
+ else: { '@path': '$.properties.phone' }
115
+ }
116
+ },
117
+ dtm_user_id: { '@path': '$.userId' }
118
+ }
119
+ };
120
+ exports.dtmc_department = {
121
+ label: 'Department',
122
+ description: 'Department of the product.',
123
+ type: 'string',
124
+ default: { '@path': '$.properties.department' },
125
+ depends_on: {
126
+ conditions: [
127
+ {
128
+ fieldKey: 'dtm_event',
129
+ operator: 'is',
130
+ value: ['custom', 'department', 'category', 'subcategory', 'product', 'addFavorites', 'addSavedList', 'cart']
131
+ }
132
+ ]
133
+ }
134
+ };
135
+ exports.dtmc_category = {
136
+ label: 'Category',
137
+ description: 'Category of the product.',
138
+ type: 'string',
139
+ default: { '@path': '$.properties.category' },
140
+ depends_on: {
141
+ conditions: [
142
+ {
143
+ fieldKey: 'dtm_event',
144
+ operator: 'is',
145
+ value: ['custom', 'category', 'subcategory', 'product', 'addFavorites', 'addSavedList', 'cart']
146
+ }
147
+ ]
148
+ }
149
+ };
150
+ exports.dtmc_sub_category = {
151
+ label: 'Sub Category',
152
+ description: 'Sub-category of the product.',
153
+ type: 'string',
154
+ default: { '@path': '$.properties.sub_category' },
155
+ depends_on: {
156
+ conditions: [
157
+ {
158
+ fieldKey: 'dtm_event',
159
+ operator: 'is',
160
+ value: ['custom', 'subcategory', 'product', 'addFavorites', 'addSavedList', 'cart']
161
+ }
162
+ ]
163
+ }
164
+ };
165
+ exports.dtmc_product_id = {
166
+ label: 'Product ID',
167
+ description: 'Unique identifier for the product',
168
+ type: 'string',
169
+ default: { '@path': '$.properties.product_id' },
170
+ depends_on: {
171
+ conditions: [
172
+ {
173
+ fieldKey: 'dtm_event',
174
+ operator: 'is',
175
+ value: ['custom', 'product', 'addFavorites', 'addSavedList', 'cart']
176
+ }
177
+ ]
178
+ }
179
+ };
180
+ exports.dtmc_brand = {
181
+ label: 'Brand',
182
+ description: 'Brand of the product.',
183
+ type: 'string',
184
+ default: { '@path': '$.properties.brand' },
185
+ depends_on: {
186
+ conditions: [
187
+ {
188
+ fieldKey: 'dtm_event',
189
+ operator: 'is',
190
+ value: ['custom', 'product', 'addFavorites', 'addSavedList', 'cart']
191
+ }
192
+ ]
193
+ }
194
+ };
195
+ exports.dtmc_upc = {
196
+ label: 'Universal Product Code',
197
+ description: 'Manufacturer Universal Product Code for the product.',
198
+ type: 'string',
199
+ default: { '@path': '$.properties.upc' },
200
+ depends_on: {
201
+ conditions: [
202
+ {
203
+ fieldKey: 'dtm_event',
204
+ operator: 'is',
205
+ value: ['custom', 'product', 'addFavorites', 'addSavedList', 'cart']
206
+ }
207
+ ]
208
+ }
209
+ };
210
+ exports.dtmc_mpn = {
211
+ label: 'Manufacturer Model Part Number',
212
+ description: 'Manufacturer Model Part Number for the product.',
213
+ type: 'string',
214
+ default: { '@path': '$.properties.mpn' },
215
+ depends_on: {
216
+ conditions: [
217
+ {
218
+ fieldKey: 'dtm_event',
219
+ operator: 'is',
220
+ value: ['custom', 'product', 'addFavorites', 'addSavedList', 'cart']
221
+ }
222
+ ]
223
+ }
224
+ };
225
+ exports.dtmc_transaction_id = {
226
+ label: 'Transaction ID',
227
+ description: 'Unique identifier for the transaction.',
228
+ type: 'string',
229
+ default: { '@path': '$.properties.order_id' },
230
+ depends_on: {
231
+ conditions: [
232
+ {
233
+ fieldKey: 'dtm_event',
234
+ operator: 'is',
235
+ value: ['custom', 'conversion']
236
+ }
237
+ ]
238
+ }
239
+ };
240
+ exports.dtm_conv_val = {
241
+ label: 'Conversion Value',
242
+ description: 'Contains the total purchase price in decimal format. Do not include any tax or shipping costs.',
243
+ type: 'number',
244
+ default: { '@path': '$.properties.total' },
245
+ required: {
246
+ conditions: [{ fieldKey: 'dtm_event', operator: 'is', value: 'conversion' }]
247
+ },
248
+ depends_on: {
249
+ conditions: [
250
+ {
251
+ fieldKey: 'dtm_event',
252
+ operator: 'is',
253
+ value: ['custom', 'conversion']
254
+ }
255
+ ]
256
+ }
257
+ };
258
+ exports.dtm_items = {
259
+ label: 'Items Purchased',
260
+ description: 'An array of all items in the conversion.',
261
+ type: 'object',
262
+ multiple: true,
263
+ additionalProperties: true,
264
+ properties: {
265
+ product_id: {
266
+ label: 'Product ID',
267
+ description: 'Unique identifier / SKU for the product.',
268
+ type: 'string'
269
+ },
270
+ item_amount: {
271
+ label: 'Item Amount',
272
+ description: 'Unit cost / price for 1 unit of the item.',
273
+ type: 'number'
274
+ },
275
+ item_quantity: {
276
+ label: 'Item Quantity',
277
+ description: 'number of SKU items in the transaction.',
278
+ type: 'integer'
279
+ },
280
+ item_discount: {
281
+ label: 'Item Discount',
282
+ description: 'Discount value from the original amount.',
283
+ type: 'number'
284
+ }
285
+ },
286
+ default: {
287
+ '@arrayPath': [
288
+ '$.properties.products', {
289
+ product_id: { '@path': '$.product_id' },
290
+ price: { '@path': '$.price' },
291
+ quantity: { '@path': '$.quantity' },
292
+ item_discount: { '@path': '$.discount' }
293
+ }
294
+ ]
295
+ },
296
+ depends_on: {
297
+ conditions: [
298
+ {
299
+ fieldKey: 'dtm_event',
300
+ operator: 'is',
301
+ value: ['custom', 'conversion']
302
+ }
303
+ ]
304
+ }
305
+ };
306
+ exports.dtm_conv_curr = {
307
+ label: 'Currency',
308
+ description: 'Currency of the transaction. Use ISO 4217 currency codes (e.g., USD, EUR).',
309
+ type: 'string',
310
+ default: { '@path': '$.properties.currency' },
311
+ required: {
312
+ conditions: [{ fieldKey: 'dtm_event', operator: 'is', value: 'conversion' }]
313
+ },
314
+ depends_on: {
315
+ conditions: [
316
+ {
317
+ fieldKey: 'dtm_event',
318
+ operator: 'is',
319
+ value: ['custom', 'conversion']
320
+ }
321
+ ]
322
+ }
323
+ };
324
+ exports.dtmc_conv_type = {
325
+ label: 'Order Type',
326
+ description: 'Differentiate between types of online purchases (Delivery, Pickup, etc.)',
327
+ type: 'string',
328
+ default: { '@path': '$.properties.order_type' },
329
+ required: {
330
+ conditions: [{ fieldKey: 'dtm_event', operator: 'is', value: 'conversion' }]
331
+ },
332
+ depends_on: {
333
+ conditions: [
334
+ {
335
+ fieldKey: 'dtm_event',
336
+ operator: 'is',
337
+ value: ['custom', 'conversion']
338
+ }
339
+ ]
340
+ }
341
+ };
342
+ exports.dtmc_conv_store_location = {
343
+ label: 'Store Location',
344
+ description: 'For Pickup conversions, denote the store location of the pickup.',
345
+ type: 'string',
346
+ default: { '@path': '$.properties.store_location' },
347
+ required: {
348
+ conditions: [{ fieldKey: 'dtm_event', operator: 'is', value: 'conversion' }]
349
+ },
350
+ depends_on: {
351
+ conditions: [
352
+ {
353
+ fieldKey: 'dtm_event',
354
+ operator: 'is',
355
+ value: ['custom', 'conversion']
356
+ }
357
+ ]
358
+ }
359
+ };
360
+ exports.id = {
361
+ label: 'Cache Buster',
362
+ description: 'Unique identifier for the message. Used for cache busting.',
363
+ type: 'string',
364
+ required: true,
365
+ default: { '@path': '$.messageId' }
366
+ };
367
+ exports.appId = {
368
+ label: 'App ID / Namespace',
369
+ description: 'The namespace of the Mobile App.',
370
+ type: 'string',
371
+ required: true,
372
+ default: { '@path': '$.context.app.namespace' }
373
+ };
374
+ exports.version = {
375
+ label: 'App Version',
376
+ description: 'The version of the Mobile App.',
377
+ type: 'string',
378
+ required: true,
379
+ default: { '@path': '$.context.app.version' }
380
+ };
381
+ exports.deviceType = {
382
+ label: 'Device Type',
383
+ description: 'Type of the device (e.g., iOS, Android).',
384
+ type: 'string',
385
+ required: true,
386
+ choices: [
387
+ { label: 'iOS', value: 'ios' },
388
+ { label: 'Android', value: 'android' }
389
+ ],
390
+ default: { '@path': '$.context.device.type' }
391
+ };
392
+ exports.standardFields = {
393
+ id: exports.id,
394
+ appId: exports.appId,
395
+ dtm_event: exports.dtm_event,
396
+ version: exports.version,
397
+ dtm_fid: exports.dtm_fid,
398
+ dtm_promo_id: exports.dtm_promo_id,
399
+ identifiers: exports.identifiers,
400
+ deviceType: exports.deviceType
401
+ };
402
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../src/destinations/epsilon/sendEvent/fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,OAAO,GAAe;IACjC,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,0EAA0E;IACvF,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,YAAY,GAAe;IACtC,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,wFAAwF;IACrG,IAAI,EAAE,QAAQ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AAU,EAAV,kBAAU;CACX,CAAA"}
@@ -0,0 +1,38 @@
1
+ export interface Payload {
2
+ id: string;
3
+ appId: string;
4
+ dtm_event: string;
5
+ version: string;
6
+ dtm_fid: string;
7
+ dtm_promo_id?: string;
8
+ identifiers: {
9
+ deviceID?: string;
10
+ advertisingId?: string;
11
+ dtm_user_agent?: string;
12
+ dtm_user_ip?: string;
13
+ dtm_email_hash?: string;
14
+ dtm_mobile_hash?: string;
15
+ dtm_user_id?: string;
16
+ };
17
+ deviceType: string;
18
+ dtmc_department?: string;
19
+ dtmc_category?: string;
20
+ dtmc_sub_category?: string;
21
+ dtmc_product_id?: string;
22
+ dtmc_brand?: string;
23
+ dtmc_upc?: string;
24
+ dtmc_mpn?: string;
25
+ dtmc_transaction_id?: string;
26
+ dtm_conv_val?: number;
27
+ dtm_items?: {
28
+ product_id?: string;
29
+ item_amount?: number;
30
+ item_quantity?: number;
31
+ item_discount?: number;
32
+ [k: string]: unknown;
33
+ }[];
34
+ dtm_conv_curr?: string;
35
+ dtmc_conv_type?: string;
36
+ dtmc_conv_store_location?: string;
37
+ customEventName?: string;
38
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/epsilon/sendEvent/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fields_1 = require("./fields");
4
+ const constants_1 = require("./constants");
5
+ const hashing_utils_1 = require("../../../lib/hashing-utils");
6
+ const action = {
7
+ title: 'Standard Fields Event',
8
+ description: 'Sync an event containing standard fields only to Epsilon',
9
+ defaultSubscription: 'type = "track"',
10
+ fields: {
11
+ ...fields_1.standardFields,
12
+ dtmc_department: fields_1.dtmc_department,
13
+ dtmc_category: fields_1.dtmc_category,
14
+ dtmc_sub_category: fields_1.dtmc_sub_category,
15
+ dtmc_product_id: fields_1.dtmc_product_id,
16
+ dtmc_brand: fields_1.dtmc_brand,
17
+ dtmc_upc: fields_1.dtmc_upc,
18
+ dtmc_mpn: fields_1.dtmc_mpn,
19
+ dtmc_transaction_id: fields_1.dtmc_transaction_id,
20
+ dtm_conv_val: fields_1.dtm_conv_val,
21
+ dtm_items: fields_1.dtm_items,
22
+ dtm_conv_curr: fields_1.dtm_conv_curr,
23
+ dtmc_conv_type: fields_1.dtmc_conv_type,
24
+ dtmc_conv_store_location: fields_1.dtmc_conv_store_location,
25
+ customEventName: fields_1.customEventName
26
+ },
27
+ perform: (request, { payload, settings }) => {
28
+ const { id, appId, dtm_event, version, dtm_fid, dtm_promo_id, deviceType, dtmc_department, dtmc_category, dtmc_sub_category, dtmc_product_id, dtmc_brand, dtmc_upc, dtmc_mpn, dtmc_transaction_id, dtm_conv_val, dtm_items, dtm_conv_curr, dtmc_conv_type, dtmc_conv_store_location, customEventName, identifiers: { deviceID, advertisingId, dtm_user_agent, dtm_user_ip, dtm_email_hash, dtm_mobile_hash, dtm_user_id } = {} } = payload;
29
+ const { dtm_cid } = settings;
30
+ let eventData = {
31
+ dtmc_tms: 9,
32
+ dtm_cid: dtm_cid.trim(),
33
+ dtm_cmagic: (0, hashing_utils_1.processHashing)(dtm_cid, 'md5', 'hex', (value) => value?.trim()).substring(0, 6),
34
+ dtm_fid,
35
+ dtm_promo_id,
36
+ idfa: deviceType === 'ios' ? advertisingId : undefined,
37
+ google_play_id: deviceType === 'android' ? advertisingId : undefined,
38
+ idfv: deviceType === 'ios' ? deviceID : undefined,
39
+ google_app_set_id: deviceType === 'android' ? deviceID : undefined,
40
+ dtm_user_agent,
41
+ dtm_user_ip,
42
+ dtm_email_hash: dtm_email_hash
43
+ ? (0, hashing_utils_1.processHashing)(dtm_email_hash, 'sha256', 'hex', (value) => value?.trim().toLowerCase())
44
+ : undefined,
45
+ dtm_mobile_hash: dtm_mobile_hash
46
+ ? (0, hashing_utils_1.processHashing)(dtm_mobile_hash, 'sha256', 'hex', (value) => value?.trim().toLowerCase())
47
+ : undefined,
48
+ dtm_user_id
49
+ };
50
+ switch (dtm_event) {
51
+ case 'department': {
52
+ const updated = {
53
+ ...eventData,
54
+ dtmc_department
55
+ };
56
+ eventData = updated;
57
+ break;
58
+ }
59
+ case 'category': {
60
+ const updated = {
61
+ ...eventData,
62
+ dtmc_department,
63
+ dtmc_category
64
+ };
65
+ eventData = updated;
66
+ break;
67
+ }
68
+ case 'sub_category': {
69
+ const updated = {
70
+ ...eventData,
71
+ dtmc_department,
72
+ dtmc_category,
73
+ dtmc_sub_category
74
+ };
75
+ eventData = updated;
76
+ break;
77
+ }
78
+ case 'product':
79
+ case 'addFavorites':
80
+ case 'addSavedList':
81
+ case 'cart': {
82
+ const updated = {
83
+ ...eventData,
84
+ dtmc_department,
85
+ dtmc_category,
86
+ dtmc_sub_category,
87
+ dtmc_product_id,
88
+ dtmc_brand,
89
+ dtmc_upc,
90
+ dtmc_mpn
91
+ };
92
+ eventData = updated;
93
+ break;
94
+ }
95
+ case 'conversion': {
96
+ const updated = {
97
+ ...eventData,
98
+ dtmc_transaction_id,
99
+ dtm_conv_val: dtm_conv_val,
100
+ dtm_items: dtm_items,
101
+ dtm_conv_curr: dtm_conv_curr,
102
+ dtmc_conv_type: dtmc_conv_type,
103
+ dtmc_conv_store_location: dtmc_conv_store_location
104
+ };
105
+ eventData = updated;
106
+ break;
107
+ }
108
+ case 'custom': {
109
+ const updated = {
110
+ ...eventData,
111
+ dtmc_department,
112
+ dtmc_category,
113
+ dtmc_sub_category,
114
+ dtmc_product_id,
115
+ dtmc_brand,
116
+ dtmc_upc,
117
+ dtmc_mpn,
118
+ dtmc_transaction_id,
119
+ dtm_conv_val,
120
+ dtm_items,
121
+ dtm_conv_curr,
122
+ dtmc_conv_type,
123
+ dtmc_conv_store_location
124
+ };
125
+ eventData = updated;
126
+ }
127
+ }
128
+ const json = {
129
+ id,
130
+ jsonrpc: '2.0',
131
+ method: 'syncEvent',
132
+ params: {
133
+ appId,
134
+ dtm_event: dtm_event === 'custom' ? customEventName : dtm_event,
135
+ version,
136
+ eventData
137
+ }
138
+ };
139
+ return request(constants_1.URL, {
140
+ method: 'post',
141
+ json
142
+ });
143
+ }
144
+ };
145
+ exports.default = action;
146
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/epsilon/sendEvent/index.ts"],"names":[],"mappings":";;AAIA,qCAgBiB;AACjB,2CAAiC;AACjC,8DAA2D;AAE3D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EAAE,0DAA0D;IACvE,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,GAAG,uBAAc;QACjB,eAAe,EAAf,wBAAe;QACf,aAAa,EAAb,sBAAa;QACb,iBAAiB,EAAjB,0BAAiB;QACjB,eAAe,EAAf,wBAAe;QACf,UAAU,EAAV,mBAAU;QACV,QAAQ,EAAR,iBAAQ;QACR,QAAQ,EAAR,iBAAQ;QACR,mBAAmB,EAAnB,4BAAmB;QACnB,YAAY,EAAZ,qBAAY;QACZ,SAAS,EAAT,kBAAS;QACT,aAAa,EAAb,sBAAa;QACb,cAAc,EAAd,uBAAc;QACd,wBAAwB,EAAxB,iCAAwB;QACxB,eAAe,EAAf,wBAAe;KAChB;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,MAAM,EACJ,EAAE,EACF,KAAK,EACL,SAAS,EACT,OAAO,EACP,OAAO,EACP,YAAY,EACZ,UAAU,EACV,eAAe,EACf,aAAa,EAC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AAE,cAAwB;oBACxC,wBAAwB,EAAE,wBAAkC;iBAC7D,CAAA;gBACD,SAAS,GAAG,OAAO,CAAA;gBACnB,MAAK;YACP,CAAC;YACD,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACd,MAAM,OAAO,GAAoB;oBAC/B,GAAG,SAAS;oBACZ,eAAe;oBACf,aAAa;oBACb,iBAAiB;oBACjB,eAAe;oBACf,UAAU;oBACV,QAAQ;oBACR,QAAQ;oBACR,mBAAmB;oBACnB,YAAY;oBACZ,SAAS;oBACT,aAAa;oBACb,cAAc;oBACd,wBAAwB;iBACzB,CAAA;gBACD,SAAS,GAAG,OAAO,CAAA;YACrB,CAAC;QACH,CAAC;QAED,MAAM,IAAI,GAAmB;YAC3B,EAAE;YACF,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,WAAW;YACnB,MAAM,EAAE;gBACN,KAAK;gBACL,SAAS,EAAE,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAE,eAA0B,CAAC,CAAC,CAAC,SAAS;gBAC3E,OAAO;gBACP,SAAS;aACV;SACF,CAAA;QAED,OAAO,OAAO,CAAC,eAAG,EAAE;YAClB,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,51 @@
1
+ export type EpsilonPayload = {
2
+ id: string;
3
+ jsonrpc: '2.0';
4
+ method: 'syncEvent';
5
+ params: {
6
+ appId: string;
7
+ dtm_event: string;
8
+ version: string;
9
+ eventData: BaseEventData | NonTransactionEventData | TransactionEventData;
10
+ };
11
+ };
12
+ export type BaseEventData = {
13
+ dtmc_tms: 9;
14
+ dtm_cid: string;
15
+ dtm_cmagic: string;
16
+ dtm_fid: string;
17
+ dtm_promo_id?: string;
18
+ idfa?: string;
19
+ google_play_id?: string;
20
+ idfv?: string;
21
+ google_app_set_id?: string;
22
+ dtm_user_agent?: string;
23
+ dtm_user_ip?: string;
24
+ dtm_email_hash?: string;
25
+ dtm_mobile_hash?: string;
26
+ dtm_user_id?: string;
27
+ };
28
+ export type NonTransactionEventData = BaseEventData & {
29
+ dtmc_department?: string;
30
+ dtmc_category?: string;
31
+ dtmc_sub_category?: string;
32
+ dtmc_product_id?: string;
33
+ dtmc_brand?: string;
34
+ dtmc_upc?: string;
35
+ dtmc_mpn?: string;
36
+ };
37
+ export type TransactionEventData = BaseEventData & {
38
+ dtmc_transaction_id?: string;
39
+ dtm_conv_val: number;
40
+ dtm_items?: {
41
+ product_id?: string;
42
+ item_amount?: number;
43
+ item_quantity?: number;
44
+ item_discount?: number;
45
+ [k: string]: unknown;
46
+ }[];
47
+ dtm_conv_curr: string;
48
+ dtmc_conv_type: string;
49
+ dtmc_conv_store_location: string;
50
+ };
51
+ export type CustomEventData = BaseEventData & (NonTransactionEventData | TransactionEventData);