@segment/action-destinations 3.337.2-staging.1 → 3.337.4-staging-1

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 (430) hide show
  1. package/README.md +1 -1
  2. package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js +6 -2
  3. package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js.map +1 -1
  4. package/dist/destinations/acoustic-s3tc/receiveEvents/preCheck.js +7 -1
  5. package/dist/destinations/acoustic-s3tc/receiveEvents/preCheck.js.map +1 -1
  6. package/dist/destinations/aggregations-io/generated-types.d.ts +4 -0
  7. package/dist/destinations/aggregations-io/generated-types.js.map +1 -0
  8. package/dist/destinations/aggregations-io/index.js +58 -0
  9. package/dist/destinations/aggregations-io/index.js.map +1 -0
  10. package/dist/destinations/aggregations-io/send/generated-types.d.ts +7 -0
  11. package/dist/destinations/aggregations-io/send/generated-types.js.map +1 -0
  12. package/dist/destinations/aggregations-io/send/index.js +44 -0
  13. package/dist/destinations/aggregations-io/send/index.js.map +1 -0
  14. package/dist/destinations/aggregations-io/types.d.ts +8 -0
  15. package/dist/destinations/aggregations-io/types.js +8 -0
  16. package/dist/destinations/aggregations-io/types.js.map +1 -0
  17. package/dist/destinations/airship/registerAndAssociate/generated-types.d.ts +3 -0
  18. package/dist/destinations/airship/registerAndAssociate/index.js +35 -7
  19. package/dist/destinations/airship/registerAndAssociate/index.js.map +1 -1
  20. package/dist/destinations/airship/utilities.d.ts +3 -1
  21. package/dist/destinations/airship/utilities.js +76 -41
  22. package/dist/destinations/airship/utilities.js.map +1 -1
  23. package/dist/destinations/algolia-insights/conversionEvents/generated-types.d.ts +2 -2
  24. package/dist/destinations/algolia-insights/conversionEvents/index.js +7 -3
  25. package/dist/destinations/algolia-insights/conversionEvents/index.js.map +1 -1
  26. package/dist/destinations/algolia-insights/index.js +7 -0
  27. package/dist/destinations/algolia-insights/index.js.map +1 -1
  28. package/dist/destinations/algolia-insights/productAddedEvents/generated-types.d.ts +2 -2
  29. package/dist/destinations/algolia-insights/productAddedEvents/index.js +7 -3
  30. package/dist/destinations/algolia-insights/productAddedEvents/index.js.map +1 -1
  31. package/dist/destinations/algolia-insights/productClickedEvents/generated-types.d.ts +2 -2
  32. package/dist/destinations/algolia-insights/productClickedEvents/index.js +7 -3
  33. package/dist/destinations/algolia-insights/productClickedEvents/index.js.map +1 -1
  34. package/dist/destinations/algolia-insights/productListFilteredEvents/generated-types.d.ts +2 -2
  35. package/dist/destinations/algolia-insights/productListFilteredEvents/index.js +7 -3
  36. package/dist/destinations/algolia-insights/productListFilteredEvents/index.js.map +1 -1
  37. package/dist/destinations/algolia-insights/productViewedEvents/generated-types.d.ts +2 -2
  38. package/dist/destinations/algolia-insights/productViewedEvents/index.js +7 -3
  39. package/dist/destinations/algolia-insights/productViewedEvents/index.js.map +1 -1
  40. package/dist/destinations/amazon-ads/generated-types.d.ts +3 -0
  41. package/dist/destinations/amazon-ads/generated-types.js.map +1 -0
  42. package/dist/destinations/amazon-ads/index.d.ts +4 -0
  43. package/dist/destinations/amazon-ads/index.js +87 -0
  44. package/dist/destinations/amazon-ads/index.js.map +1 -0
  45. package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +2 -0
  46. package/dist/destinations/{engage/sendgrid/Profile.js → amazon-ads/syncAudiences/generated-types.js} +1 -1
  47. package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +1 -0
  48. package/dist/destinations/amazon-ads/syncAudiences/index.d.ts +5 -0
  49. package/dist/destinations/amazon-ads/syncAudiences/index.js +15 -0
  50. package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -0
  51. package/dist/destinations/amazon-ads/types.d.ts +22 -0
  52. package/dist/destinations/amazon-ads/types.js +11 -0
  53. package/dist/destinations/amazon-ads/types.js.map +1 -0
  54. package/dist/destinations/braze/index.js +12 -0
  55. package/dist/destinations/braze/index.js.map +1 -1
  56. package/dist/destinations/braze/trackEvent/generated-types.d.ts +1 -0
  57. package/dist/destinations/braze/trackEvent/index.js +8 -0
  58. package/dist/destinations/braze/trackEvent/index.js.map +1 -1
  59. package/dist/destinations/braze/trackPurchase/generated-types.d.ts +1 -0
  60. package/dist/destinations/braze/trackPurchase/index.js +8 -0
  61. package/dist/destinations/braze/trackPurchase/index.js.map +1 -1
  62. package/dist/destinations/braze/utils.js +15 -11
  63. package/dist/destinations/braze/utils.js.map +1 -1
  64. package/dist/destinations/courier/generated-types.d.ts +4 -0
  65. package/dist/destinations/courier/generated-types.js +3 -0
  66. package/dist/destinations/courier/generated-types.js.map +1 -0
  67. package/dist/destinations/courier/index.d.ts +4 -0
  68. package/dist/destinations/courier/index.js +44 -0
  69. package/dist/destinations/courier/index.js.map +1 -0
  70. package/dist/destinations/courier/postToCourier/generated-types.d.ts +5 -0
  71. package/dist/destinations/courier/postToCourier/generated-types.js +3 -0
  72. package/dist/destinations/courier/postToCourier/generated-types.js.map +1 -0
  73. package/dist/destinations/courier/postToCourier/index.js +35 -0
  74. package/dist/destinations/courier/postToCourier/index.js.map +1 -0
  75. package/dist/destinations/criteo-audiences/addUserToAudience/index.js +5 -5
  76. package/dist/destinations/criteo-audiences/addUserToAudience/index.js.map +1 -1
  77. package/dist/destinations/criteo-audiences/criteo-audiences.js +13 -2
  78. package/dist/destinations/criteo-audiences/criteo-audiences.js.map +1 -1
  79. package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js +5 -5
  80. package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js.map +1 -1
  81. package/dist/destinations/customerio/createUpdateDevice/generated-types.d.ts +3 -0
  82. package/dist/destinations/customerio/createUpdateDevice/index.js +25 -16
  83. package/dist/destinations/customerio/createUpdateDevice/index.js.map +1 -1
  84. package/dist/destinations/customerio/createUpdateObject/generated-types.d.ts +3 -0
  85. package/dist/destinations/customerio/createUpdateObject/index.js +76 -39
  86. package/dist/destinations/customerio/createUpdateObject/index.js.map +1 -1
  87. package/dist/destinations/customerio/createUpdatePerson/generated-types.d.ts +4 -1
  88. package/dist/destinations/customerio/createUpdatePerson/index.d.ts +1 -1
  89. package/dist/destinations/customerio/createUpdatePerson/index.js +50 -41
  90. package/dist/destinations/customerio/createUpdatePerson/index.js.map +1 -1
  91. package/dist/destinations/customerio/deleteDevice/index.js +14 -4
  92. package/dist/destinations/customerio/deleteDevice/index.js.map +1 -1
  93. package/dist/destinations/customerio/deleteObject/generated-types.d.ts +4 -0
  94. package/dist/destinations/customerio/deleteObject/generated-types.js +3 -0
  95. package/dist/destinations/customerio/deleteObject/generated-types.js.map +1 -0
  96. package/dist/destinations/customerio/deleteObject/index.d.ts +5 -0
  97. package/dist/destinations/customerio/deleteObject/index.js +48 -0
  98. package/dist/destinations/customerio/deleteObject/index.js.map +1 -0
  99. package/dist/destinations/customerio/deletePerson/generated-types.d.ts +3 -0
  100. package/dist/destinations/customerio/deletePerson/generated-types.js +3 -0
  101. package/dist/destinations/customerio/deletePerson/generated-types.js.map +1 -0
  102. package/dist/destinations/customerio/deletePerson/index.d.ts +5 -0
  103. package/dist/destinations/customerio/deletePerson/index.js +41 -0
  104. package/dist/destinations/customerio/deletePerson/index.js.map +1 -0
  105. package/dist/destinations/customerio/deleteRelationship/generated-types.d.ts +6 -0
  106. package/dist/destinations/customerio/deleteRelationship/generated-types.js +3 -0
  107. package/dist/destinations/customerio/deleteRelationship/generated-types.js.map +1 -0
  108. package/dist/destinations/customerio/deleteRelationship/index.d.ts +5 -0
  109. package/dist/destinations/customerio/deleteRelationship/index.js +82 -0
  110. package/dist/destinations/customerio/deleteRelationship/index.js.map +1 -0
  111. package/dist/destinations/customerio/index.js +39 -15
  112. package/dist/destinations/customerio/index.js.map +1 -1
  113. package/dist/destinations/customerio/mergePeople/generated-types.d.ts +4 -0
  114. package/dist/destinations/customerio/mergePeople/generated-types.js +3 -0
  115. package/dist/destinations/customerio/mergePeople/generated-types.js.map +1 -0
  116. package/dist/destinations/customerio/mergePeople/index.d.ts +5 -0
  117. package/dist/destinations/customerio/mergePeople/index.js +52 -0
  118. package/dist/destinations/customerio/mergePeople/index.js.map +1 -0
  119. package/dist/destinations/customerio/reportDeliveryEvent/generated-types.d.ts +10 -0
  120. package/dist/destinations/customerio/reportDeliveryEvent/generated-types.js +3 -0
  121. package/dist/destinations/customerio/reportDeliveryEvent/generated-types.js.map +1 -0
  122. package/dist/destinations/customerio/reportDeliveryEvent/index.d.ts +5 -0
  123. package/dist/destinations/customerio/reportDeliveryEvent/index.js +125 -0
  124. package/dist/destinations/customerio/reportDeliveryEvent/index.js.map +1 -0
  125. package/dist/destinations/customerio/suppressPerson/generated-types.d.ts +3 -0
  126. package/dist/destinations/customerio/suppressPerson/generated-types.js +3 -0
  127. package/dist/destinations/customerio/suppressPerson/generated-types.js.map +1 -0
  128. package/dist/destinations/customerio/suppressPerson/index.d.ts +5 -0
  129. package/dist/destinations/customerio/suppressPerson/index.js +41 -0
  130. package/dist/destinations/customerio/suppressPerson/index.js.map +1 -0
  131. package/dist/destinations/customerio/test-helper.d.ts +4 -0
  132. package/dist/destinations/customerio/test-helper.js +77 -0
  133. package/dist/destinations/customerio/test-helper.js.map +1 -0
  134. package/dist/destinations/customerio/trackEvent/index.js +26 -32
  135. package/dist/destinations/customerio/trackEvent/index.js.map +1 -1
  136. package/dist/destinations/customerio/trackPageView/generated-types.d.ts +1 -0
  137. package/dist/destinations/customerio/trackPageView/index.js +23 -29
  138. package/dist/destinations/customerio/trackPageView/index.js.map +1 -1
  139. package/dist/destinations/customerio/trackScreenView/generated-types.d.ts +1 -0
  140. package/dist/destinations/customerio/trackScreenView/index.js +22 -29
  141. package/dist/destinations/customerio/trackScreenView/index.js.map +1 -1
  142. package/dist/destinations/customerio/unsuppressPerson/generated-types.d.ts +3 -0
  143. package/dist/destinations/customerio/unsuppressPerson/generated-types.js +3 -0
  144. package/dist/destinations/customerio/unsuppressPerson/generated-types.js.map +1 -0
  145. package/dist/destinations/customerio/unsuppressPerson/index.d.ts +5 -0
  146. package/dist/destinations/customerio/unsuppressPerson/index.js +41 -0
  147. package/dist/destinations/customerio/unsuppressPerson/index.js.map +1 -0
  148. package/dist/destinations/customerio/utils.d.ts +44 -2
  149. package/dist/destinations/customerio/utils.js +89 -13
  150. package/dist/destinations/customerio/utils.js.map +1 -1
  151. package/dist/destinations/devrev/createRevUser/index.js +9 -6
  152. package/dist/destinations/devrev/createRevUser/index.js.map +1 -1
  153. package/dist/destinations/devrev/utils/types.d.ts +9 -0
  154. package/dist/destinations/display-video-360/index.js +1 -1
  155. package/dist/destinations/display-video-360/index.js.map +1 -1
  156. package/dist/destinations/display-video-360/properties.js +4 -4
  157. package/dist/destinations/display-video-360/properties.js.map +1 -1
  158. package/dist/destinations/display-video-360/proto/protofile.d.ts +1 -0
  159. package/dist/destinations/display-video-360/proto/protofile.js +1 -0
  160. package/dist/destinations/display-video-360/proto/protofile.js.map +1 -1
  161. package/dist/destinations/display-video-360/shared.js +1 -0
  162. package/dist/destinations/display-video-360/shared.js.map +1 -1
  163. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +7 -3
  164. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
  165. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +0 -3
  166. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -1
  167. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +8 -2
  168. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -1
  169. package/dist/destinations/engage/utils/EngageStats.js +0 -4
  170. package/dist/destinations/engage/utils/EngageStats.js.map +1 -1
  171. package/dist/destinations/equals/generated-types.d.ts +3 -0
  172. package/dist/destinations/equals/generated-types.js +3 -0
  173. package/dist/destinations/equals/generated-types.js.map +1 -0
  174. package/dist/destinations/equals/index.d.ts +4 -0
  175. package/dist/destinations/equals/index.js +38 -0
  176. package/dist/destinations/equals/index.js.map +1 -0
  177. package/dist/destinations/equals/send/generated-types.d.ts +5 -0
  178. package/dist/destinations/equals/send/generated-types.js +3 -0
  179. package/dist/destinations/equals/send/generated-types.js.map +1 -0
  180. package/dist/destinations/equals/send/index.d.ts +5 -0
  181. package/dist/destinations/equals/send/index.js +38 -0
  182. package/dist/destinations/equals/send/index.js.map +1 -0
  183. package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js +1 -1
  184. package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -1
  185. package/dist/destinations/google-enhanced-conversions/functions.js +1 -1
  186. package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +0 -1
  187. package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
  188. package/dist/destinations/hubspot/utils.d.ts +3 -3
  189. package/dist/destinations/index.js +4 -1
  190. package/dist/destinations/index.js.map +1 -1
  191. package/dist/destinations/kevel/generated-types.d.ts +4 -0
  192. package/dist/destinations/kevel/generated-types.js +3 -0
  193. package/dist/destinations/kevel/generated-types.js.map +1 -0
  194. package/dist/destinations/kevel/index.d.ts +4 -0
  195. package/dist/destinations/kevel/index.js +45 -0
  196. package/dist/destinations/kevel/index.js.map +1 -0
  197. package/dist/destinations/kevel/syncAudience/generated-types.d.ts +8 -0
  198. package/dist/destinations/kevel/syncAudience/generated-types.js +3 -0
  199. package/dist/destinations/kevel/syncAudience/generated-types.js.map +1 -0
  200. package/dist/destinations/kevel/syncAudience/index.d.ts +5 -0
  201. package/dist/destinations/kevel/syncAudience/index.js +64 -0
  202. package/dist/destinations/kevel/syncAudience/index.js.map +1 -0
  203. package/dist/destinations/kevel/syncTraits/generated-types.d.ts +6 -0
  204. package/dist/destinations/kevel/syncTraits/generated-types.js +3 -0
  205. package/dist/destinations/kevel/syncTraits/generated-types.js.map +1 -0
  206. package/dist/destinations/kevel/syncTraits/index.d.ts +5 -0
  207. package/dist/destinations/kevel/syncTraits/index.js +39 -0
  208. package/dist/destinations/kevel/syncTraits/index.js.map +1 -0
  209. package/dist/destinations/linkedin-conversions/api/api.test.js +43 -25
  210. package/dist/destinations/linkedin-conversions/api/api.test.js.map +1 -1
  211. package/dist/destinations/linkedin-conversions/api/index.d.ts +3 -2
  212. package/dist/destinations/linkedin-conversions/api/index.js +31 -15
  213. package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
  214. package/dist/destinations/linkedin-conversions/streamConversion/generated-types.d.ts +1 -1
  215. package/dist/destinations/linkedin-conversions/streamConversion/index.js +2 -1
  216. package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
  217. package/dist/destinations/linkedin-conversions/types.d.ts +6 -7
  218. package/dist/destinations/marketo-static-lists/addToList/index.js +2 -2
  219. package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
  220. package/dist/destinations/marketo-static-lists/functions.js +7 -7
  221. package/dist/destinations/marketo-static-lists/functions.js.map +1 -1
  222. package/dist/destinations/marketo-static-lists/removeFromList/index.js +2 -2
  223. package/dist/destinations/marketo-static-lists/removeFromList/index.js.map +1 -1
  224. package/dist/destinations/mixpanel/incrementProperties/__test__/__snapshots__/snapshot.test.js.snap +18 -0
  225. package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.d.ts +1 -0
  226. package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.js +129 -0
  227. package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.js.map +1 -0
  228. package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.d.ts +1 -0
  229. package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.js +69 -0
  230. package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.js.map +1 -0
  231. package/dist/destinations/mixpanel/incrementProperties/generated-types.d.ts +8 -0
  232. package/dist/destinations/mixpanel/incrementProperties/generated-types.js +3 -0
  233. package/dist/destinations/mixpanel/incrementProperties/generated-types.js.map +1 -0
  234. package/dist/destinations/mixpanel/incrementProperties/index.d.ts +5 -0
  235. package/dist/destinations/mixpanel/incrementProperties/index.js +84 -0
  236. package/dist/destinations/mixpanel/incrementProperties/index.js.map +1 -0
  237. package/dist/destinations/mixpanel/index.js +3 -1
  238. package/dist/destinations/mixpanel/index.js.map +1 -1
  239. package/dist/destinations/mixpanel/mixpanel-types.d.ts +4 -0
  240. package/dist/destinations/moengage/trackEvent/generated-types.d.ts +1 -0
  241. package/dist/destinations/moengage/trackEvent/index.js +10 -2
  242. package/dist/destinations/moengage/trackEvent/index.js.map +1 -1
  243. package/dist/destinations/schematic/generated-types.d.ts +3 -0
  244. package/dist/destinations/schematic/generated-types.js +3 -0
  245. package/dist/destinations/schematic/generated-types.js.map +1 -0
  246. package/dist/destinations/schematic/identifyUser/generated-types.d.ts +18 -0
  247. package/dist/destinations/schematic/identifyUser/generated-types.js +3 -0
  248. package/dist/destinations/schematic/identifyUser/generated-types.js.map +1 -0
  249. package/dist/destinations/schematic/identifyUser/index.d.ts +5 -0
  250. package/dist/destinations/schematic/identifyUser/index.js +114 -0
  251. package/dist/destinations/schematic/identifyUser/index.js.map +1 -0
  252. package/dist/destinations/schematic/index.d.ts +4 -0
  253. package/dist/destinations/schematic/index.js +58 -0
  254. package/dist/destinations/schematic/index.js.map +1 -0
  255. package/dist/destinations/schematic/trackEvent/generated-types.d.ts +13 -0
  256. package/dist/destinations/schematic/trackEvent/generated-types.js +3 -0
  257. package/dist/destinations/schematic/trackEvent/generated-types.js.map +1 -0
  258. package/dist/destinations/schematic/trackEvent/index.d.ts +5 -0
  259. package/dist/destinations/schematic/trackEvent/index.js +89 -0
  260. package/dist/destinations/schematic/trackEvent/index.js.map +1 -0
  261. package/dist/destinations/segment/generated-types.d.ts +0 -1
  262. package/dist/destinations/segment/index.js +3 -13
  263. package/dist/destinations/segment/index.js.map +1 -1
  264. package/dist/destinations/segment/properties.d.ts +1 -1
  265. package/dist/destinations/segment/properties.js +3 -3
  266. package/dist/destinations/segment/properties.js.map +1 -1
  267. package/dist/destinations/segment/sendGroup/index.js +5 -16
  268. package/dist/destinations/segment/sendGroup/index.js.map +1 -1
  269. package/dist/destinations/segment/sendIdentify/index.js +5 -16
  270. package/dist/destinations/segment/sendIdentify/index.js.map +1 -1
  271. package/dist/destinations/segment/sendPage/index.js +5 -16
  272. package/dist/destinations/segment/sendPage/index.js.map +1 -1
  273. package/dist/destinations/segment/sendScreen/index.js +5 -16
  274. package/dist/destinations/segment/sendScreen/index.js.map +1 -1
  275. package/dist/destinations/segment/sendTrack/index.js +5 -16
  276. package/dist/destinations/segment/sendTrack/index.js.map +1 -1
  277. package/dist/destinations/surveysparrow/createContact/generated-types.d.ts +10 -0
  278. package/dist/destinations/surveysparrow/createContact/generated-types.js +3 -0
  279. package/dist/destinations/surveysparrow/createContact/generated-types.js.map +1 -0
  280. package/dist/destinations/surveysparrow/createContact/index.d.ts +5 -0
  281. package/dist/destinations/surveysparrow/createContact/index.js +105 -0
  282. package/dist/destinations/surveysparrow/createContact/index.js.map +1 -0
  283. package/dist/destinations/surveysparrow/generated-types.d.ts +3 -0
  284. package/dist/destinations/surveysparrow/generated-types.js +3 -0
  285. package/dist/destinations/surveysparrow/generated-types.js.map +1 -0
  286. package/dist/destinations/surveysparrow/index.d.ts +4 -0
  287. package/dist/destinations/surveysparrow/index.js +40 -0
  288. package/dist/destinations/surveysparrow/index.js.map +1 -0
  289. package/dist/destinations/surveysparrow/triggerSurvey/generated-types.d.ts +10 -0
  290. package/dist/destinations/surveysparrow/triggerSurvey/generated-types.js +3 -0
  291. package/dist/destinations/surveysparrow/triggerSurvey/generated-types.js.map +1 -0
  292. package/dist/destinations/surveysparrow/triggerSurvey/index.d.ts +8 -0
  293. package/dist/destinations/surveysparrow/triggerSurvey/index.js +165 -0
  294. package/dist/destinations/surveysparrow/triggerSurvey/index.js.map +1 -0
  295. package/dist/destinations/tiktok-conversions/common_fields.d.ts +2 -0
  296. package/dist/destinations/tiktok-conversions/common_fields.js +245 -0
  297. package/dist/destinations/tiktok-conversions/common_fields.js.map +1 -0
  298. package/dist/destinations/tiktok-conversions/formatter.d.ts +3 -0
  299. package/dist/destinations/tiktok-conversions/formatter.js +43 -0
  300. package/dist/destinations/tiktok-conversions/formatter.js.map +1 -0
  301. package/dist/destinations/tiktok-conversions/index.js +3 -92
  302. package/dist/destinations/tiktok-conversions/index.js.map +1 -1
  303. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -3
  304. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +24 -33
  305. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -1
  306. package/dist/destinations/tiktok-conversions/reportWebEvent/generated-types.d.ts +4 -12
  307. package/dist/destinations/tiktok-conversions/reportWebEvent/index.js +40 -113
  308. package/dist/destinations/tiktok-conversions/reportWebEvent/index.js.map +1 -1
  309. package/dist/destinations/tiktok-conversions/utils.d.ts +4 -0
  310. package/dist/destinations/tiktok-conversions/utils.js +65 -0
  311. package/dist/destinations/tiktok-conversions/utils.js.map +1 -0
  312. package/dist/destinations/tiktok-conversions-sandbox/common_fields.d.ts +2 -0
  313. package/dist/destinations/tiktok-conversions-sandbox/common_fields.js +244 -0
  314. package/dist/destinations/tiktok-conversions-sandbox/common_fields.js.map +1 -0
  315. package/dist/destinations/{tiktok-offline-conversions/reportOfflineEvent → tiktok-conversions-sandbox}/formatter.js +11 -11
  316. package/dist/destinations/tiktok-conversions-sandbox/formatter.js.map +1 -0
  317. package/dist/destinations/tiktok-conversions-sandbox/generated-types.d.ts +4 -0
  318. package/dist/destinations/tiktok-conversions-sandbox/generated-types.js +3 -0
  319. package/dist/destinations/tiktok-conversions-sandbox/generated-types.js.map +1 -0
  320. package/dist/destinations/tiktok-conversions-sandbox/index.d.ts +4 -0
  321. package/dist/destinations/tiktok-conversions-sandbox/index.js +247 -0
  322. package/dist/destinations/tiktok-conversions-sandbox/index.js.map +1 -0
  323. package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/generated-types.d.ts +33 -0
  324. package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/generated-types.js +3 -0
  325. package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/generated-types.js.map +1 -0
  326. package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/index.d.ts +5 -0
  327. package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/index.js +16 -0
  328. package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/index.js.map +1 -0
  329. package/dist/destinations/tiktok-conversions-sandbox/utils.d.ts +4 -0
  330. package/dist/destinations/tiktok-conversions-sandbox/utils.js +65 -0
  331. package/dist/destinations/tiktok-conversions-sandbox/utils.js.map +1 -0
  332. package/dist/destinations/tiktok-offline-conversions/common_fields.js +179 -20
  333. package/dist/destinations/tiktok-offline-conversions/common_fields.js.map +1 -1
  334. package/dist/destinations/tiktok-offline-conversions/formatter.d.ts +1 -0
  335. package/dist/destinations/tiktok-offline-conversions/formatter.js +11 -1
  336. package/dist/destinations/tiktok-offline-conversions/formatter.js.map +1 -1
  337. package/dist/destinations/tiktok-offline-conversions/index.js +156 -153
  338. package/dist/destinations/tiktok-offline-conversions/index.js.map +1 -1
  339. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.d.ts +3 -3
  340. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js +4 -305
  341. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js.map +1 -1
  342. package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/generated-types.d.ts +25 -2
  343. package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/index.js +4 -29
  344. package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/index.js.map +1 -1
  345. package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/generated-types.d.ts +18 -5
  346. package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/index.js +5 -126
  347. package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/index.js.map +1 -1
  348. package/dist/destinations/tiktok-offline-conversions/utils.d.ts +8 -0
  349. package/dist/destinations/tiktok-offline-conversions/utils.js +67 -0
  350. package/dist/destinations/tiktok-offline-conversions/utils.js.map +1 -0
  351. package/dist/destinations/tiktok-offline-conversions-sandbox/common_fields.d.ts +2 -0
  352. package/dist/destinations/tiktok-offline-conversions-sandbox/common_fields.js +244 -0
  353. package/dist/destinations/tiktok-offline-conversions-sandbox/common_fields.js.map +1 -0
  354. package/dist/destinations/tiktok-offline-conversions-sandbox/formatter.d.ts +3 -0
  355. package/dist/destinations/tiktok-offline-conversions-sandbox/formatter.js +43 -0
  356. package/dist/destinations/tiktok-offline-conversions-sandbox/formatter.js.map +1 -0
  357. package/dist/destinations/tiktok-offline-conversions-sandbox/generated-types.d.ts +4 -0
  358. package/dist/destinations/tiktok-offline-conversions-sandbox/generated-types.js +3 -0
  359. package/dist/destinations/tiktok-offline-conversions-sandbox/generated-types.js.map +1 -0
  360. package/dist/destinations/tiktok-offline-conversions-sandbox/index.d.ts +4 -0
  361. package/dist/destinations/tiktok-offline-conversions-sandbox/index.js +251 -0
  362. package/dist/destinations/tiktok-offline-conversions-sandbox/index.js.map +1 -0
  363. package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/generated-types.d.ts +33 -0
  364. package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/generated-types.js +3 -0
  365. package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/generated-types.js.map +1 -0
  366. package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/index.d.ts +5 -0
  367. package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/index.js +16 -0
  368. package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/index.js.map +1 -0
  369. package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/generated-types.d.ts +33 -0
  370. package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/generated-types.js +3 -0
  371. package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/generated-types.js.map +1 -0
  372. package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/index.d.ts +5 -0
  373. package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/index.js +16 -0
  374. package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/index.js.map +1 -0
  375. package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/generated-types.d.ts +33 -0
  376. package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/generated-types.js +3 -0
  377. package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/generated-types.js.map +1 -0
  378. package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/index.d.ts +5 -0
  379. package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/index.js +16 -0
  380. package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/index.js.map +1 -0
  381. package/dist/destinations/tiktok-offline-conversions-sandbox/utils.d.ts +8 -0
  382. package/dist/destinations/tiktok-offline-conversions-sandbox/utils.js +68 -0
  383. package/dist/destinations/tiktok-offline-conversions-sandbox/utils.js.map +1 -0
  384. package/dist/destinations/webhook-audiences/index.js +1 -3
  385. package/dist/destinations/webhook-audiences/index.js.map +1 -1
  386. package/dist/destinations/yahoo-audiences/index.js +9 -1
  387. package/dist/destinations/yahoo-audiences/index.js.map +1 -1
  388. package/dist/destinations/yahoo-audiences/updateSegment/generated-types.d.ts +6 -2
  389. package/dist/destinations/yahoo-audiences/updateSegment/index.js +36 -11
  390. package/dist/destinations/yahoo-audiences/updateSegment/index.js.map +1 -1
  391. package/dist/destinations/yahoo-audiences/utils-rt.js +3 -3
  392. package/dist/destinations/yahoo-audiences/utils-rt.js.map +1 -1
  393. package/package.json +3 -3
  394. package/dist/destinations/engage/sendgrid/Profile.d.ts +0 -6
  395. package/dist/destinations/engage/sendgrid/Profile.js.map +0 -1
  396. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +0 -21
  397. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +0 -174
  398. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +0 -1
  399. package/dist/destinations/mixpanel/utils.d.ts +0 -13
  400. package/dist/destinations/mixpanel/utils.js +0 -117
  401. package/dist/destinations/mixpanel/utils.js.map +0 -1
  402. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +0 -14
  403. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +0 -1
  404. package/dist/destinations/responsys/asyncMergePetRecords/index.js +0 -113
  405. package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +0 -1
  406. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +0 -20
  407. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +0 -1
  408. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +0 -174
  409. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +0 -1
  410. package/dist/destinations/responsys/generated-types.d.ts +0 -5
  411. package/dist/destinations/responsys/generated-types.js.map +0 -1
  412. package/dist/destinations/responsys/index.js +0 -62
  413. package/dist/destinations/responsys/index.js.map +0 -1
  414. package/dist/destinations/responsys/rsp-operations.d.ts +0 -14
  415. package/dist/destinations/responsys/rsp-operations.js +0 -33
  416. package/dist/destinations/responsys/rsp-operations.js.map +0 -1
  417. package/dist/destinations/responsys/rsp-properties.d.ts +0 -4
  418. package/dist/destinations/responsys/rsp-properties.js +0 -27
  419. package/dist/destinations/responsys/rsp-properties.js.map +0 -1
  420. package/dist/destinations/responsys/types.d.ts +0 -37
  421. package/dist/destinations/responsys/types.js +0 -3
  422. package/dist/destinations/responsys/types.js.map +0 -1
  423. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +0 -1
  424. package/dist/destinations/{responsys/asyncMergePetRecords → aggregations-io}/generated-types.js +0 -0
  425. package/dist/destinations/{responsys → aggregations-io}/index.d.ts +0 -0
  426. package/dist/destinations/{responsys/asyncMergeProfileListMembers → aggregations-io/send}/generated-types.js +0 -0
  427. package/dist/destinations/{responsys/asyncMergePetRecords → aggregations-io/send}/index.d.ts +0 -0
  428. package/dist/destinations/{responsys → amazon-ads}/generated-types.js +0 -0
  429. package/dist/destinations/{responsys/asyncMergeProfileListMembers → courier/postToCourier}/index.d.ts +0 -0
  430. package/dist/destinations/{tiktok-offline-conversions/reportOfflineEvent → tiktok-conversions-sandbox}/formatter.d.ts +1 -1
@@ -0,0 +1,4 @@
1
+ export interface Settings {
2
+ accessToken: string;
3
+ pixelCode: string;
4
+ }
@@ -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/tiktok-conversions-sandbox/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { DestinationDefinition } from '@segment/actions-core';
2
+ import type { Settings } from './generated-types';
3
+ declare const destination: DestinationDefinition<Settings>;
4
+ export default destination;
@@ -0,0 +1,247 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const actions_core_1 = require("@segment/actions-core");
7
+ const reportWebEvent_1 = __importDefault(require("./reportWebEvent"));
8
+ const productProperties = {
9
+ price: {
10
+ '@path': '$.price'
11
+ },
12
+ quantity: {
13
+ '@path': '$.quantity'
14
+ },
15
+ content_category: {
16
+ '@path': '$.category'
17
+ },
18
+ content_id: {
19
+ '@path': '$.product_id'
20
+ },
21
+ content_name: {
22
+ '@path': '$.name'
23
+ },
24
+ brand: {
25
+ '@path': '$.brand'
26
+ }
27
+ };
28
+ const singleProductContents = {
29
+ ...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
30
+ contents: {
31
+ '@arrayPath': [
32
+ '$.properties',
33
+ {
34
+ ...productProperties
35
+ }
36
+ ]
37
+ }
38
+ };
39
+ const multiProductContents = {
40
+ ...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
41
+ contents: {
42
+ '@arrayPath': [
43
+ '$.properties.products',
44
+ {
45
+ ...productProperties
46
+ }
47
+ ]
48
+ }
49
+ };
50
+ const destination = {
51
+ name: 'Tiktok Conversions Sandbox',
52
+ slug: 'tiktok-conversions-sandbox',
53
+ mode: 'cloud',
54
+ authentication: {
55
+ scheme: 'custom',
56
+ fields: {
57
+ accessToken: {
58
+ label: 'Access Token',
59
+ description: 'Your TikTok Access Token. Please see TikTok’s [Events API documentation](https://ads.tiktok.com/marketing_api/docs?id=1701890979375106) for information on how to generate an access token via the TikTok Ads Manager or API.',
60
+ type: 'string',
61
+ required: true
62
+ },
63
+ pixelCode: {
64
+ label: 'Pixel Code',
65
+ type: 'string',
66
+ description: 'Your TikTok Pixel ID. Please see TikTok’s [Events API documentation](https://ads.tiktok.com/marketing_api/docs?id=1701890979375106) for information on how to find this value.',
67
+ required: true
68
+ }
69
+ },
70
+ testAuthentication: (request, { settings }) => {
71
+ return request('https://business-api.tiktok.com/open_api/v1.3/pixel/track/', {
72
+ method: 'post',
73
+ json: {
74
+ pixel_code: settings.pixelCode,
75
+ event: 'Test Event',
76
+ timestamp: '',
77
+ context: {}
78
+ }
79
+ });
80
+ }
81
+ },
82
+ extendRequest({ settings }) {
83
+ return {
84
+ headers: {
85
+ 'Access-Token': settings.accessToken,
86
+ 'Content-Type': 'application/json'
87
+ }
88
+ };
89
+ },
90
+ presets: [
91
+ {
92
+ name: 'Complete Payment',
93
+ subscribe: 'event = "Payment Completed"',
94
+ partnerAction: 'reportWebEvent',
95
+ mapping: {
96
+ ...multiProductContents,
97
+ event: 'CompletePayment'
98
+ },
99
+ type: 'automatic'
100
+ },
101
+ {
102
+ name: 'Contact',
103
+ subscribe: 'event = "Callback Started"',
104
+ partnerAction: 'reportWebEvent',
105
+ mapping: {
106
+ ...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
107
+ event: 'Contact'
108
+ },
109
+ type: 'automatic'
110
+ },
111
+ {
112
+ name: 'Subscribe',
113
+ subscribe: 'event = "Subscription Created"',
114
+ partnerAction: 'reportWebEvent',
115
+ mapping: {
116
+ ...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
117
+ event: 'Subscribe'
118
+ },
119
+ type: 'automatic'
120
+ },
121
+ {
122
+ name: 'Submit Form',
123
+ subscribe: 'event = "Form Submitted"',
124
+ partnerAction: 'reportWebEvent',
125
+ mapping: {
126
+ ...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
127
+ event: 'SubmitForm'
128
+ },
129
+ type: 'automatic'
130
+ },
131
+ {
132
+ name: 'Page View',
133
+ subscribe: 'type="page"',
134
+ partnerAction: 'reportWebEvent',
135
+ mapping: {
136
+ ...multiProductContents,
137
+ event: 'PageView'
138
+ },
139
+ type: 'automatic'
140
+ },
141
+ {
142
+ name: 'View Content',
143
+ subscribe: 'event = "Product Viewed"',
144
+ partnerAction: 'reportWebEvent',
145
+ mapping: {
146
+ ...singleProductContents,
147
+ event: 'ViewContent'
148
+ },
149
+ type: 'automatic'
150
+ },
151
+ {
152
+ name: 'Click Button',
153
+ subscribe: 'event = "Product Clicked"',
154
+ partnerAction: 'reportWebEvent',
155
+ mapping: {
156
+ ...singleProductContents,
157
+ event: 'ClickButton'
158
+ },
159
+ type: 'automatic'
160
+ },
161
+ {
162
+ name: 'Search',
163
+ subscribe: 'event = "Products Searched"',
164
+ partnerAction: 'reportWebEvent',
165
+ mapping: {
166
+ ...singleProductContents,
167
+ event: 'Search'
168
+ },
169
+ type: 'automatic'
170
+ },
171
+ {
172
+ name: 'Add to Wishlist',
173
+ subscribe: 'event = "Product Added to Wishlist"',
174
+ partnerAction: 'reportWebEvent',
175
+ mapping: {
176
+ ...singleProductContents,
177
+ event: 'AddToWishlist'
178
+ },
179
+ type: 'automatic'
180
+ },
181
+ {
182
+ name: 'Add to Cart',
183
+ subscribe: 'event = "Product Added"',
184
+ partnerAction: 'reportWebEvent',
185
+ mapping: {
186
+ ...singleProductContents,
187
+ event: 'AddToCart'
188
+ },
189
+ type: 'automatic'
190
+ },
191
+ {
192
+ name: 'Initiate Checkout',
193
+ subscribe: 'event = "Checkout Started"',
194
+ partnerAction: 'reportWebEvent',
195
+ mapping: {
196
+ ...multiProductContents,
197
+ event: 'InitiateCheckout'
198
+ },
199
+ type: 'automatic'
200
+ },
201
+ {
202
+ name: 'Add Payment Info',
203
+ subscribe: 'event = "Payment Info Entered"',
204
+ partnerAction: 'reportWebEvent',
205
+ mapping: {
206
+ ...multiProductContents,
207
+ event: 'AddPaymentInfo'
208
+ },
209
+ type: 'automatic'
210
+ },
211
+ {
212
+ name: 'Place an Order',
213
+ subscribe: 'event = "Order Completed"',
214
+ partnerAction: 'reportWebEvent',
215
+ mapping: {
216
+ ...multiProductContents,
217
+ event: 'PlaceAnOrder'
218
+ },
219
+ type: 'automatic'
220
+ },
221
+ {
222
+ name: 'Download',
223
+ subscribe: 'event = "Download Link Clicked"',
224
+ partnerAction: 'reportWebEvent',
225
+ mapping: {
226
+ ...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
227
+ event: 'Download'
228
+ },
229
+ type: 'automatic'
230
+ },
231
+ {
232
+ name: 'Complete Registration',
233
+ subscribe: 'event = "Signed Up"',
234
+ partnerAction: 'reportWebEvent',
235
+ mapping: {
236
+ ...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
237
+ event: 'CompleteRegistration'
238
+ },
239
+ type: 'automatic'
240
+ }
241
+ ],
242
+ actions: {
243
+ reportWebEvent: reportWebEvent_1.default
244
+ }
245
+ };
246
+ exports.default = destination;
247
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-conversions-sandbox/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AAGrD,sE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B;YACxB,SAAS,EAAE,gCAAgC;YAC3C,aAAa,EAAE,gBAAgB;YAC/B,OAAO,EAAE;gBACP,GAAG,oBAAoB;gBACvB,KAAK,EAAE,gBAAgB;aACxB;YACD,IAAI,EAAE,WAAW;SAClB;QACD;YACE,IAAI,EAAE,gBAAgB;YACtB,SAAS,EAAE,2BAA2B;YACtC,aAAa,EAAE,gBAAgB;YAC/B,OAAO,EAAE;gBACP,GAAG,oBAAoB;gBACvB,KAAK,EAAE,cAAc;aACtB;YACD,IAAI,EAAE,WAAW;SAClB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,iCAAiC;YAC5C,aAAa,EAAE,gBAAgB;YAC/B,OAAO,EAAE;gBACP,GAAG,4BAAa,CAAC,wBAAc,CAAC,MAAM,CAAC;gBACvC,KAAK,EAAE,UAAU;aAClB;YACD,IAAI,EAAE,WAAW;SAClB;QACD;YACE,IAAI,EAAE,uBAAuB;YAC7B,SAAS,EAAE,qBAAqB;YAChC,aAAa,EAAE,gBAAgB;YAC/B,OAAO,EAAE;gBACP,GAAG,4BAAa,CAAC,wBAAc,CAAC,MAAM,CAAC;gBACvC,KAAK,EAAE,sBAAsB;aAC9B;YACD,IAAI,EAAE,WAAW;SAClB;KACF;IACD,OAAO,EAAE;QACP,cAAc,EAAd,wBAAc;KACf;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,33 @@
1
+ export interface Payload {
2
+ event: string;
3
+ event_id?: string;
4
+ timestamp?: string;
5
+ phone_number?: string[];
6
+ email?: string[];
7
+ order_id?: string;
8
+ shop_id?: string;
9
+ external_id?: string[];
10
+ ttclid?: string;
11
+ ttp?: string;
12
+ lead_id?: string;
13
+ locale?: string;
14
+ url?: string;
15
+ referrer?: string;
16
+ ip?: string;
17
+ user_agent?: string;
18
+ contents?: {
19
+ price?: number;
20
+ quantity?: number;
21
+ content_category?: string;
22
+ content_id?: string;
23
+ content_name?: string;
24
+ brand?: string;
25
+ }[];
26
+ content_type?: string;
27
+ currency?: string;
28
+ value?: number;
29
+ description?: string;
30
+ query?: string;
31
+ limited_data_use?: boolean;
32
+ test_event_code?: string;
33
+ }
@@ -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/tiktok-conversions-sandbox/reportWebEvent/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { 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,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const common_fields_1 = require("../common_fields");
4
+ const utils_1 = require("../utils");
5
+ const action = {
6
+ title: 'Report Web Event',
7
+ description: 'Report Web events directly to TikTok. Data shared can power TikTok solutions like dynamic product ads, custom targeting, campaign optimization and attribution.',
8
+ fields: {
9
+ ...common_fields_1.commonFields
10
+ },
11
+ perform: (request, { payload, settings }) => {
12
+ return utils_1.performWebEvent(request, settings, payload);
13
+ }
14
+ };
15
+ exports.default = action;
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-conversions-sandbox/reportWebEvent/index.ts"],"names":[],"mappings":";;AAGA,oDAA+C;AAC/C,oCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EACT,iKAAiK;IACnK,MAAM,EAAE;QACN,GAAG,4BAAY;KAChB;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,OAAO,uBAAe,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IACpD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { RequestClient } from '@segment/actions-core';
2
+ import { Settings } from './generated-types';
3
+ import { Payload } from './reportWebEvent/generated-types';
4
+ export declare function performWebEvent(request: RequestClient, settings: Settings, payload: Payload): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.performWebEvent = void 0;
4
+ const formatter_1 = require("./formatter");
5
+ function performWebEvent(request, settings, payload) {
6
+ const phone_numbers = formatter_1.formatPhones(payload.phone_number);
7
+ const emails = formatter_1.formatEmails(payload.email);
8
+ const userIds = formatter_1.formatUserIds(payload.external_id);
9
+ let payloadUrl, urlTtclid;
10
+ if (payload.url) {
11
+ try {
12
+ payloadUrl = new URL(payload.url);
13
+ }
14
+ catch (error) {
15
+ }
16
+ }
17
+ if (payloadUrl)
18
+ urlTtclid = payloadUrl.searchParams.get('ttclid');
19
+ return request('https://business-api.tiktok.com/open_api/v1.3/event/track/', {
20
+ method: 'post',
21
+ json: {
22
+ event_source: 'web',
23
+ event_source_id: settings.pixelCode,
24
+ partner_name: 'Segment',
25
+ data: [
26
+ {
27
+ event: payload.event,
28
+ event_time: payload.timestamp
29
+ ? Math.floor(new Date(payload.timestamp).getTime() / 1000)
30
+ : Math.floor(new Date().getTime() / 1000),
31
+ event_id: payload.event_id ? `${payload.event_id}` : undefined,
32
+ user: {
33
+ ttclid: payload.ttclid ? payload.ttclid : urlTtclid ? urlTtclid : undefined,
34
+ external_id: userIds,
35
+ phone: phone_numbers,
36
+ email: emails,
37
+ lead_id: payload.lead_id ? payload.lead_id : undefined,
38
+ ttp: payload.ttp ? payload.ttp : undefined,
39
+ ip: payload.ip ? payload.ip : undefined,
40
+ user_agent: payload.user_agent ? payload.user_agent : undefined,
41
+ locale: payload.locale ? payload.locale : undefined
42
+ },
43
+ properties: {
44
+ contents: payload.contents ? payload.contents : [],
45
+ content_type: payload.content_type ? payload.content_type : undefined,
46
+ currency: payload.currency ? payload.currency : undefined,
47
+ value: payload.value ? payload.value : undefined,
48
+ query: payload.query ? payload.query : undefined,
49
+ description: payload.description ? payload.description : undefined,
50
+ order_id: payload.order_id ? payload.order_id : undefined,
51
+ shop_id: payload.shop_id ? payload.shop_id : undefined
52
+ },
53
+ page: {
54
+ url: payload.url ? payload.url : undefined,
55
+ referrer: payload.referrer ? payload.referrer : undefined
56
+ },
57
+ limited_data_use: payload.limited_data_use ? payload.limited_data_use : false,
58
+ test_event_code: payload.test_event_code ? payload.test_event_code : undefined
59
+ }
60
+ ]
61
+ }
62
+ });
63
+ }
64
+ exports.performWebEvent = performWebEvent;
65
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-conversions-sandbox/utils.ts"],"names":[],"mappings":";;;AAGA,2CAAuE;AAEvE,SAAgB,eAAe,CAAC,OAAsB,EAAE,QAAkB,EAAE,OAAgB;IAC1F,MAAM,aAAa,GAAG,wBAAY,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;IACxD,MAAM,MAAM,GAAG,wBAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC1C,MAAM,OAAO,GAAG,yBAAa,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;IAElD,IAAI,UAAU,EAAE,SAAS,CAAA;IACzB,IAAI,OAAO,CAAC,GAAG,EAAE;QACf,IAAI;YACF,UAAU,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;SAClC;QAAC,OAAO,KAAK,EAAE;SAEf;KACF;IAED,IAAI,UAAU;QAAE,SAAS,GAAG,UAAU,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAEjE,OAAO,OAAO,CAAC,4DAA4D,EAAE;QAC3E,MAAM,EAAE,MAAM;QACd,I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