@segment/action-destinations 3.314.0 → 3.315.1-add-subscription-metadata.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 (472) hide show
  1. package/dist/destinations/amazon-ads/generated-types.d.ts +12 -0
  2. package/dist/destinations/amazon-ads/generated-types.js +3 -0
  3. package/dist/destinations/amazon-ads/generated-types.js.map +1 -0
  4. package/dist/destinations/amazon-ads/index.d.ts +4 -0
  5. package/dist/destinations/amazon-ads/index.js +237 -0
  6. package/dist/destinations/amazon-ads/index.js.map +1 -0
  7. package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +15 -0
  8. package/dist/destinations/amazon-ads/syncAudiences/generated-types.js +3 -0
  9. package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +1 -0
  10. package/dist/destinations/amazon-ads/syncAudiences/index.d.ts +5 -0
  11. package/dist/destinations/amazon-ads/syncAudiences/index.js +182 -0
  12. package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -0
  13. package/dist/destinations/amazon-ads/types.d.ts +47 -0
  14. package/dist/destinations/amazon-ads/types.js +11 -0
  15. package/dist/destinations/amazon-ads/types.js.map +1 -0
  16. package/dist/destinations/amazon-ads/utils.d.ts +37 -0
  17. package/dist/destinations/amazon-ads/utils.js +25 -0
  18. package/dist/destinations/amazon-ads/utils.js.map +1 -0
  19. package/dist/destinations/braze/createAliasV2.types.d.ts +5 -0
  20. package/dist/destinations/braze/createAliasV2.types.js +3 -0
  21. package/dist/destinations/braze/createAliasV2.types.js.map +1 -0
  22. package/dist/destinations/braze/identifyUserV2.types.d.ts +8 -0
  23. package/dist/destinations/braze/identifyUserV2.types.js +3 -0
  24. package/dist/destinations/braze/identifyUserV2.types.js.map +1 -0
  25. package/dist/destinations/braze/trackEvent/index.js +5 -1
  26. package/dist/destinations/braze/trackEvent/index.js.map +1 -1
  27. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.d.ts +1 -0
  28. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js +184 -0
  29. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js.map +1 -0
  30. package/dist/destinations/contentstack/constants.d.ts +3 -0
  31. package/dist/destinations/contentstack/constants.js +7 -0
  32. package/dist/destinations/contentstack/constants.js.map +1 -0
  33. package/dist/destinations/contentstack/customAttributesSync/generated-types.d.ts +7 -0
  34. package/dist/destinations/contentstack/customAttributesSync/generated-types.js +3 -0
  35. package/dist/destinations/contentstack/customAttributesSync/generated-types.js.map +1 -0
  36. package/dist/destinations/contentstack/customAttributesSync/index.d.ts +5 -0
  37. package/dist/destinations/contentstack/customAttributesSync/index.js +54 -0
  38. package/dist/destinations/contentstack/customAttributesSync/index.js.map +1 -0
  39. package/dist/destinations/contentstack/customAttributesSync/types.d.ts +14 -0
  40. package/dist/destinations/contentstack/customAttributesSync/types.js +3 -0
  41. package/dist/destinations/contentstack/customAttributesSync/types.js.map +1 -0
  42. package/dist/destinations/contentstack/customAttributesSync/utils.d.ts +4 -0
  43. package/dist/destinations/contentstack/customAttributesSync/utils.js +20 -0
  44. package/dist/destinations/contentstack/customAttributesSync/utils.js.map +1 -0
  45. package/dist/destinations/contentstack/types.d.ts +12 -0
  46. package/dist/destinations/contentstack/types.js +3 -0
  47. package/dist/destinations/contentstack/types.js.map +1 -0
  48. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.d.ts +22 -0
  49. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js +3 -0
  50. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +1 -0
  51. package/dist/destinations/dynamic-yield-audiences/types.d.ts +8 -0
  52. package/dist/destinations/dynamic-yield-audiences/types.js +12 -0
  53. package/dist/destinations/dynamic-yield-audiences/types.js.map +1 -0
  54. package/dist/destinations/engage/sendgrid/Profile.d.ts +6 -0
  55. package/dist/destinations/engage/sendgrid/Profile.js +3 -0
  56. package/dist/destinations/engage/sendgrid/Profile.js.map +1 -0
  57. package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +3 -0
  58. package/dist/destinations/engage/sendgrid/destinationDefinition.js +70 -0
  59. package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +1 -0
  60. package/dist/destinations/engage/sendgrid/generated-types.d.ts +1 -0
  61. package/dist/destinations/engage/sendgrid/generated-types.js +14 -0
  62. package/dist/destinations/engage/sendgrid/generated-types.js.map +1 -0
  63. package/dist/destinations/engage/sendgrid/index.d.ts +2 -0
  64. package/dist/destinations/engage/sendgrid/index.js +5 -0
  65. package/dist/destinations/engage/sendgrid/index.js.map +1 -0
  66. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +4 -0
  67. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +28 -0
  68. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +1 -0
  69. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +21 -0
  70. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +174 -0
  71. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -0
  72. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +1 -0
  73. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +14 -0
  74. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +1 -0
  75. package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +1 -0
  76. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +14 -0
  77. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +1 -0
  78. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +44 -0
  79. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +419 -0
  80. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -0
  81. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +12 -0
  82. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +3 -0
  83. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +1 -0
  84. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +4 -0
  85. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +257 -0
  86. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +1 -0
  87. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +1 -0
  88. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +14 -0
  89. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +1 -0
  90. package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +1 -0
  91. package/dist/destinations/engage/sendgrid/sendEmail/index.js +14 -0
  92. package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +1 -0
  93. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +1 -0
  94. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +23 -0
  95. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +1 -0
  96. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +1 -0
  97. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +14 -0
  98. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +1 -0
  99. package/dist/destinations/engage/twilio/destinationDefinition.d.ts +3 -0
  100. package/dist/destinations/engage/twilio/destinationDefinition.js +172 -0
  101. package/dist/destinations/engage/twilio/destinationDefinition.js.map +1 -0
  102. package/dist/destinations/engage/twilio/generated-types.d.ts +1 -0
  103. package/dist/destinations/engage/twilio/generated-types.js +14 -0
  104. package/dist/destinations/engage/twilio/generated-types.js.map +1 -0
  105. package/dist/destinations/engage/twilio/index.d.ts +2 -0
  106. package/dist/destinations/engage/twilio/index.js +5 -0
  107. package/dist/destinations/engage/twilio/index.js.map +1 -0
  108. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +28 -0
  109. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +151 -0
  110. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +1 -0
  111. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +4 -0
  112. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +250 -0
  113. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +1 -0
  114. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +1 -0
  115. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +14 -0
  116. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +1 -0
  117. package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +1 -0
  118. package/dist/destinations/engage/twilio/sendMobilePush/index.js +14 -0
  119. package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +1 -0
  120. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +9 -0
  121. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +72 -0
  122. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -0
  123. package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +4 -0
  124. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +162 -0
  125. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +1 -0
  126. package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +1 -0
  127. package/dist/destinations/engage/twilio/sendSms/generated-types.js +14 -0
  128. package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +1 -0
  129. package/dist/destinations/engage/twilio/sendSms/index.d.ts +1 -0
  130. package/dist/destinations/engage/twilio/sendSms/index.js +14 -0
  131. package/dist/destinations/engage/twilio/sendSms/index.js.map +1 -0
  132. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +9 -0
  133. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +89 -0
  134. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +1 -0
  135. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +4 -0
  136. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +136 -0
  137. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +1 -0
  138. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +1 -0
  139. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +14 -0
  140. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +1 -0
  141. package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +1 -0
  142. package/dist/destinations/engage/twilio/sendWhatsApp/index.js +14 -0
  143. package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +1 -0
  144. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +16 -0
  145. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +71 -0
  146. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +1 -0
  147. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +16 -0
  148. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +115 -0
  149. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -0
  150. package/dist/destinations/engage/twilio/utils/index.d.ts +2 -0
  151. package/dist/destinations/engage/twilio/utils/index.js +15 -0
  152. package/dist/destinations/engage/twilio/utils/index.js.map +1 -0
  153. package/dist/destinations/engage/twilio/utils/types.d.ts +23 -0
  154. package/dist/destinations/engage/twilio/utils/types.js +3 -0
  155. package/dist/destinations/engage/twilio/utils/types.js.map +1 -0
  156. package/dist/destinations/engage/utils/AggregateError.d.ts +14 -0
  157. package/dist/destinations/engage/utils/AggregateError.js +26 -0
  158. package/dist/destinations/engage/utils/AggregateError.js.map +1 -0
  159. package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +42 -0
  160. package/dist/destinations/engage/utils/EngageActionPerformer.js +148 -0
  161. package/dist/destinations/engage/utils/EngageActionPerformer.js.map +1 -0
  162. package/dist/destinations/engage/utils/EngageLogger.d.ts +18 -0
  163. package/dist/destinations/engage/utils/EngageLogger.js +52 -0
  164. package/dist/destinations/engage/utils/EngageLogger.js.map +1 -0
  165. package/dist/destinations/engage/utils/EngageStats.d.ts +18 -0
  166. package/dist/destinations/engage/utils/EngageStats.js +95 -0
  167. package/dist/destinations/engage/utils/EngageStats.js.map +1 -0
  168. package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +12 -0
  169. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +31 -0
  170. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +1 -0
  171. package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +65 -0
  172. package/dist/destinations/engage/utils/MessageSendPerformer.js +211 -0
  173. package/dist/destinations/engage/utils/MessageSendPerformer.js.map +1 -0
  174. package/dist/destinations/engage/utils/Profile.d.ts +6 -0
  175. package/dist/destinations/engage/utils/Profile.js +3 -0
  176. package/dist/destinations/engage/utils/Profile.js.map +1 -0
  177. package/dist/destinations/engage/utils/ResponseError.d.ts +25 -0
  178. package/dist/destinations/engage/utils/ResponseError.js +22 -0
  179. package/dist/destinations/engage/utils/ResponseError.js.map +1 -0
  180. package/dist/destinations/engage/utils/apiLookups.d.ts +22 -0
  181. package/dist/destinations/engage/utils/apiLookups.js +189 -0
  182. package/dist/destinations/engage/utils/apiLookups.js.map +1 -0
  183. package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +2 -0
  184. package/dist/destinations/engage/utils/getProfileApiEndpoint.js +10 -0
  185. package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +1 -0
  186. package/dist/destinations/engage/utils/index.d.ts +9 -0
  187. package/dist/destinations/engage/utils/index.js +22 -0
  188. package/dist/destinations/engage/utils/index.js.map +1 -0
  189. package/dist/destinations/engage/utils/isDestinationActionService.d.ts +1 -0
  190. package/dist/destinations/engage/utils/isDestinationActionService.js +8 -0
  191. package/dist/destinations/engage/utils/isDestinationActionService.js.map +1 -0
  192. package/dist/destinations/engage/utils/isRetryableError.d.ts +2 -0
  193. package/dist/destinations/engage/utils/isRetryableError.js +33 -0
  194. package/dist/destinations/engage/utils/isRetryableError.js.map +1 -0
  195. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +1 -0
  196. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +3 -0
  197. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +1 -0
  198. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +46 -0
  199. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +46 -0
  200. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +1 -0
  201. package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +12 -0
  202. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +23 -0
  203. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +1 -0
  204. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +12 -0
  205. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +35 -0
  206. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +1 -0
  207. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +14 -0
  208. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +31 -0
  209. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +1 -0
  210. package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +31 -0
  211. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +104 -0
  212. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +1 -0
  213. package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +39 -0
  214. package/dist/destinations/engage/utils/operationTracking/OperationStats.js +130 -0
  215. package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +1 -0
  216. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +1 -0
  217. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +377 -0
  218. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +1 -0
  219. package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +23 -0
  220. package/dist/destinations/engage/utils/operationTracking/OperationTree.js +49 -0
  221. package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +1 -0
  222. package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +6 -0
  223. package/dist/destinations/engage/utils/operationTracking/TrackedError.js +3 -0
  224. package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +1 -0
  225. package/dist/destinations/engage/utils/operationTracking/index.d.ts +10 -0
  226. package/dist/destinations/engage/utils/operationTracking/index.js +23 -0
  227. package/dist/destinations/engage/utils/operationTracking/index.js.map +1 -0
  228. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +21 -0
  229. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +99 -0
  230. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +1 -0
  231. package/dist/destinations/engage/utils/testUtils.d.ts +6 -0
  232. package/dist/destinations/engage/utils/testUtils.js +26 -0
  233. package/dist/destinations/engage/utils/testUtils.js.map +1 -0
  234. package/dist/destinations/engage/utils/track.d.ts +52 -0
  235. package/dist/destinations/engage/utils/track.js +9 -0
  236. package/dist/destinations/engage/utils/track.js.map +1 -0
  237. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +16 -0
  238. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +3 -0
  239. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +1 -0
  240. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +56 -0
  241. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +3 -0
  242. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +1 -0
  243. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +39 -0
  244. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +3 -0
  245. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +1 -0
  246. package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +27 -0
  247. package/dist/destinations/engage-messaging-twilio/sendSms.types.js +3 -0
  248. package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +1 -0
  249. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +25 -0
  250. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +3 -0
  251. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +1 -0
  252. package/dist/destinations/facebook-conversions-api/index.js +6 -0
  253. package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
  254. package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.d.ts +67 -0
  255. package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.js +3 -0
  256. package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.js.map +1 -0
  257. package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.d.ts +5 -0
  258. package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js +111 -0
  259. package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js.map +1 -0
  260. package/dist/destinations/facebook-conversions-api/search2/generated-types.d.ts +67 -0
  261. package/dist/destinations/facebook-conversions-api/search2/generated-types.js +3 -0
  262. package/dist/destinations/facebook-conversions-api/search2/generated-types.js.map +1 -0
  263. package/dist/destinations/facebook-conversions-api/search2/index.d.ts +5 -0
  264. package/dist/destinations/facebook-conversions-api/search2/index.js +115 -0
  265. package/dist/destinations/facebook-conversions-api/search2/index.js.map +1 -0
  266. package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.d.ts +68 -0
  267. package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.js +3 -0
  268. package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.js.map +1 -0
  269. package/dist/destinations/facebook-conversions-api/viewContent2/index.d.ts +5 -0
  270. package/dist/destinations/facebook-conversions-api/viewContent2/index.js +110 -0
  271. package/dist/destinations/facebook-conversions-api/viewContent2/index.js.map +1 -0
  272. package/dist/destinations/facebook-custom-audiences/add/generated-types.d.ts +2 -0
  273. package/dist/destinations/facebook-custom-audiences/add/generated-types.js +3 -0
  274. package/dist/destinations/facebook-custom-audiences/add/generated-types.js.map +1 -0
  275. package/dist/destinations/facebook-custom-audiences/add/index.d.ts +5 -0
  276. package/dist/destinations/facebook-custom-audiences/add/index.js +11 -0
  277. package/dist/destinations/facebook-custom-audiences/add/index.js.map +1 -0
  278. package/dist/destinations/facebook-custom-audiences/remove/generated-types.d.ts +2 -0
  279. package/dist/destinations/facebook-custom-audiences/remove/generated-types.js +3 -0
  280. package/dist/destinations/facebook-custom-audiences/remove/generated-types.js.map +1 -0
  281. package/dist/destinations/facebook-custom-audiences/remove/index.d.ts +5 -0
  282. package/dist/destinations/facebook-custom-audiences/remove/index.js +11 -0
  283. package/dist/destinations/facebook-custom-audiences/remove/index.js.map +1 -0
  284. package/dist/destinations/first-party-dv360/_tests_/index.test.d.ts +1 -0
  285. package/dist/destinations/first-party-dv360/_tests_/index.test.js +48 -0
  286. package/dist/destinations/first-party-dv360/_tests_/index.test.js.map +1 -0
  287. package/dist/destinations/google-enhanced-conversions/uploadCallConversion2/index.js +1 -1
  288. package/dist/destinations/google-enhanced-conversions/uploadCallConversion2/index.js.map +1 -1
  289. package/dist/destinations/google-enhanced-conversions/uploadClickConversion2/index.js +1 -1
  290. package/dist/destinations/google-enhanced-conversions/uploadClickConversion2/index.js.map +1 -1
  291. package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment2/index.js +1 -1
  292. package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment2/index.js.map +1 -1
  293. package/dist/destinations/hubspot/customEvent/client.js.map +1 -1
  294. package/dist/destinations/hubspot/customEvent/hubspot-api.d.ts +62 -0
  295. package/dist/destinations/hubspot/customEvent/hubspot-api.js +305 -0
  296. package/dist/destinations/hubspot/customEvent/hubspot-api.js.map +1 -0
  297. package/dist/destinations/hubspot/customEvent/index.js +2 -2
  298. package/dist/destinations/hubspot/customEvent/index.js.map +1 -1
  299. package/dist/destinations/hubspot/customEvent/utils.js.map +1 -1
  300. package/dist/destinations/hubspot/upsertObject/common-fields.js +1 -2
  301. package/dist/destinations/hubspot/upsertObject/common-fields.js.map +1 -1
  302. package/dist/destinations/hubspot/upsertObject/generated-types.d.ts +1 -1
  303. package/dist/destinations/hubspot/upsertObject/hubspot-api.d.ts +219 -0
  304. package/dist/destinations/hubspot/upsertObject/hubspot-api.js +609 -0
  305. package/dist/destinations/hubspot/upsertObject/hubspot-api.js.map +1 -0
  306. package/dist/destinations/hubspot/upsertObject/index.js +1 -1
  307. package/dist/destinations/hubspot/upsertObject/index.js.map +1 -1
  308. package/dist/destinations/hubspot/upsertObject/utils.js +5 -1
  309. package/dist/destinations/hubspot/upsertObject/utils.js.map +1 -1
  310. package/dist/destinations/klaviyo/orderCompleted/formatters.d.ts +26 -0
  311. package/dist/destinations/klaviyo/orderCompleted/formatters.js +62 -0
  312. package/dist/destinations/klaviyo/orderCompleted/formatters.js.map +1 -0
  313. package/dist/destinations/klaviyo/orderCompleted/types.d.ts +2 -0
  314. package/dist/destinations/klaviyo/orderCompleted/types.js +3 -0
  315. package/dist/destinations/klaviyo/orderCompleted/types.js.map +1 -0
  316. package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +4 -0
  317. package/dist/destinations/klaviyo/removeProfileToList/generated-types.js +3 -0
  318. package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +1 -0
  319. package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +5 -0
  320. package/dist/destinations/klaviyo/removeProfileToList/index.js +43 -0
  321. package/dist/destinations/klaviyo/removeProfileToList/index.js.map +1 -0
  322. package/dist/destinations/mappings-two-test/generated-types.d.ts +3 -0
  323. package/dist/destinations/mappings-two-test/generated-types.js +3 -0
  324. package/dist/destinations/mappings-two-test/generated-types.js.map +1 -0
  325. package/dist/destinations/mappings-two-test/index.d.ts +4 -0
  326. package/dist/destinations/mappings-two-test/index.js +32 -0
  327. package/dist/destinations/mappings-two-test/index.js.map +1 -0
  328. package/dist/destinations/mappings-two-test/kitchenSink/generated-types.d.ts +53 -0
  329. package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js +3 -0
  330. package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js.map +1 -0
  331. package/dist/destinations/mappings-two-test/kitchenSink/index.d.ts +5 -0
  332. package/dist/destinations/mappings-two-test/kitchenSink/index.js +289 -0
  333. package/dist/destinations/mappings-two-test/kitchenSink/index.js.map +1 -0
  334. package/dist/destinations/mappings-two-test/sendEvent/generated-types.d.ts +17 -0
  335. package/dist/destinations/mappings-two-test/sendEvent/generated-types.js +3 -0
  336. package/dist/destinations/mappings-two-test/sendEvent/generated-types.js.map +1 -0
  337. package/dist/destinations/mappings-two-test/sendEvent/index.d.ts +5 -0
  338. package/dist/destinations/mappings-two-test/sendEvent/index.js +343 -0
  339. package/dist/destinations/mappings-two-test/sendEvent/index.js.map +1 -0
  340. package/dist/destinations/mixpanel/utils.d.ts +13 -0
  341. package/dist/destinations/mixpanel/utils.js +117 -0
  342. package/dist/destinations/mixpanel/utils.js.map +1 -0
  343. package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +22 -0
  344. package/dist/destinations/movable-ink/categoryView/generated-types.js +3 -0
  345. package/dist/destinations/movable-ink/categoryView/generated-types.js.map +1 -0
  346. package/dist/destinations/movable-ink/categoryView/index.d.ts +5 -0
  347. package/dist/destinations/movable-ink/categoryView/index.js +43 -0
  348. package/dist/destinations/movable-ink/categoryView/index.js.map +1 -0
  349. package/dist/destinations/movable-ink/conversion/generated-types.d.ts +20 -0
  350. package/dist/destinations/movable-ink/conversion/generated-types.js +3 -0
  351. package/dist/destinations/movable-ink/conversion/generated-types.js.map +1 -0
  352. package/dist/destinations/movable-ink/conversion/index.d.ts +5 -0
  353. package/dist/destinations/movable-ink/conversion/index.js +45 -0
  354. package/dist/destinations/movable-ink/conversion/index.js.map +1 -0
  355. package/dist/destinations/movable-ink/fields.d.ts +21 -0
  356. package/dist/destinations/movable-ink/fields.js +236 -0
  357. package/dist/destinations/movable-ink/fields.js.map +1 -0
  358. package/dist/destinations/movable-ink/identify/generated-types.d.ts +7 -0
  359. package/dist/destinations/movable-ink/identify/generated-types.js +3 -0
  360. package/dist/destinations/movable-ink/identify/generated-types.js.map +1 -0
  361. package/dist/destinations/movable-ink/identify/index.d.ts +5 -0
  362. package/dist/destinations/movable-ink/identify/index.js +32 -0
  363. package/dist/destinations/movable-ink/identify/index.js.map +1 -0
  364. package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +22 -0
  365. package/dist/destinations/movable-ink/productAdded/generated-types.js +3 -0
  366. package/dist/destinations/movable-ink/productAdded/generated-types.js.map +1 -0
  367. package/dist/destinations/movable-ink/productAdded/index.d.ts +5 -0
  368. package/dist/destinations/movable-ink/productAdded/index.js +43 -0
  369. package/dist/destinations/movable-ink/productAdded/index.js.map +1 -0
  370. package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +21 -0
  371. package/dist/destinations/movable-ink/productViewed/generated-types.js +3 -0
  372. package/dist/destinations/movable-ink/productViewed/generated-types.js.map +1 -0
  373. package/dist/destinations/movable-ink/productViewed/index.d.ts +5 -0
  374. package/dist/destinations/movable-ink/productViewed/index.js +43 -0
  375. package/dist/destinations/movable-ink/productViewed/index.js.map +1 -0
  376. package/dist/destinations/movable-ink/search/generated-types.d.ts +12 -0
  377. package/dist/destinations/movable-ink/search/generated-types.js +3 -0
  378. package/dist/destinations/movable-ink/search/generated-types.js.map +1 -0
  379. package/dist/destinations/movable-ink/search/index.d.ts +5 -0
  380. package/dist/destinations/movable-ink/search/index.js +43 -0
  381. package/dist/destinations/movable-ink/search/index.js.map +1 -0
  382. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +25 -0
  383. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +3 -0
  384. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +1 -0
  385. package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +5 -0
  386. package/dist/destinations/movable-ink/sendCustomEvent/index.js +48 -0
  387. package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +1 -0
  388. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +14 -0
  389. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js +3 -0
  390. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +1 -0
  391. package/dist/destinations/responsys/asyncMergePetRecords/index.d.ts +5 -0
  392. package/dist/destinations/responsys/asyncMergePetRecords/index.js +113 -0
  393. package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +1 -0
  394. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +20 -0
  395. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js +3 -0
  396. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +1 -0
  397. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.d.ts +5 -0
  398. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +174 -0
  399. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +1 -0
  400. package/dist/destinations/responsys/rsp-operations.d.ts +14 -0
  401. package/dist/destinations/responsys/rsp-operations.js +33 -0
  402. package/dist/destinations/responsys/rsp-operations.js.map +1 -0
  403. package/dist/destinations/responsys/rsp-properties.d.ts +4 -0
  404. package/dist/destinations/responsys/rsp-properties.js +27 -0
  405. package/dist/destinations/responsys/rsp-properties.js.map +1 -0
  406. package/dist/destinations/salesforce/account2/generated-types.d.ts +32 -0
  407. package/dist/destinations/salesforce/account2/generated-types.js +3 -0
  408. package/dist/destinations/salesforce/account2/generated-types.js.map +1 -0
  409. package/dist/destinations/salesforce/account2/index.d.ts +5 -0
  410. package/dist/destinations/salesforce/account2/index.js +248 -0
  411. package/dist/destinations/salesforce/account2/index.js.map +1 -0
  412. package/dist/destinations/salesforce/cases2/generated-types.d.ts +17 -0
  413. package/dist/destinations/salesforce/cases2/generated-types.js +3 -0
  414. package/dist/destinations/salesforce/cases2/generated-types.js.map +1 -0
  415. package/dist/destinations/salesforce/cases2/index.d.ts +5 -0
  416. package/dist/destinations/salesforce/cases2/index.js +76 -0
  417. package/dist/destinations/salesforce/cases2/index.js.map +1 -0
  418. package/dist/destinations/salesforce/contact2/generated-types.d.ts +25 -0
  419. package/dist/destinations/salesforce/contact2/generated-types.js +3 -0
  420. package/dist/destinations/salesforce/contact2/generated-types.js.map +1 -0
  421. package/dist/destinations/salesforce/contact2/index.d.ts +5 -0
  422. package/dist/destinations/salesforce/contact2/index.js +192 -0
  423. package/dist/destinations/salesforce/contact2/index.js.map +1 -0
  424. package/dist/destinations/salesforce/customObject2/generated-types.d.ts +17 -0
  425. package/dist/destinations/salesforce/customObject2/generated-types.js +3 -0
  426. package/dist/destinations/salesforce/customObject2/generated-types.js.map +1 -0
  427. package/dist/destinations/salesforce/customObject2/index.d.ts +5 -0
  428. package/dist/destinations/salesforce/customObject2/index.js +97 -0
  429. package/dist/destinations/salesforce/customObject2/index.js.map +1 -0
  430. package/dist/destinations/salesforce/lead2/generated-types.d.ts +25 -0
  431. package/dist/destinations/salesforce/lead2/generated-types.js +3 -0
  432. package/dist/destinations/salesforce/lead2/generated-types.js.map +1 -0
  433. package/dist/destinations/salesforce/lead2/index.d.ts +5 -0
  434. package/dist/destinations/salesforce/lead2/index.js +200 -0
  435. package/dist/destinations/salesforce/lead2/index.js.map +1 -0
  436. package/dist/destinations/salesforce/opportunity2/generated-types.d.ts +21 -0
  437. package/dist/destinations/salesforce/opportunity2/generated-types.js +3 -0
  438. package/dist/destinations/salesforce/opportunity2/generated-types.js.map +1 -0
  439. package/dist/destinations/salesforce/opportunity2/index.d.ts +5 -0
  440. package/dist/destinations/salesforce/opportunity2/index.js +112 -0
  441. package/dist/destinations/salesforce/opportunity2/index.js.map +1 -0
  442. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.d.ts +1 -0
  443. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js +381 -0
  444. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js.map +1 -0
  445. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.d.ts +1 -0
  446. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +581 -0
  447. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +1 -0
  448. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.d.ts +4 -0
  449. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js +97 -0
  450. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js.map +1 -0
  451. package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +30 -0
  452. package/dist/destinations/snap-conversions-api/snap-capi-properties.js +316 -0
  453. package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -0
  454. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -0
  455. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +34 -0
  456. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -0
  457. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +3 -0
  458. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +43 -0
  459. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +1 -0
  460. package/dist/destinations/trackey/group.types.d.ts +11 -0
  461. package/dist/destinations/trackey/group.types.js +3 -0
  462. package/dist/destinations/trackey/group.types.js.map +1 -0
  463. package/dist/destinations/trackey/identify.types.d.ts +11 -0
  464. package/dist/destinations/trackey/identify.types.js +3 -0
  465. package/dist/destinations/trackey/identify.types.js.map +1 -0
  466. package/dist/destinations/trackey/track.types.d.ts +12 -0
  467. package/dist/destinations/trackey/track.types.js +3 -0
  468. package/dist/destinations/trackey/track.types.js.map +1 -0
  469. package/dist/destinations/webhook-extensible/types.d.ts +6 -0
  470. package/dist/destinations/webhook-extensible/types.js +3 -0
  471. package/dist/destinations/webhook-extensible/types.js.map +1 -0
  472. package/package.json +4 -4
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.performSnapCAPIv2 = void 0;
4
+ const actions_core_1 = require("@segment/actions-core");
5
+ const snap_capi_properties_1 = require("../snap-capi-properties");
6
+ const utils_1 = require("./utils");
7
+ const conversionType = (oldSettings, event_conversion_type) => {
8
+ const settings = { ...oldSettings };
9
+ if (event_conversion_type === 'MOBILE_APP') {
10
+ if (!settings?.snap_app_id || !settings?.app_id) {
11
+ throw new actions_core_1.IntegrationError('If event conversion type is "MOBILE_APP" then Snap App ID and App ID must be defined', 'Misconfigured required field', 400);
12
+ }
13
+ delete settings?.pixel_id;
14
+ }
15
+ else {
16
+ if (!settings?.pixel_id) {
17
+ throw new actions_core_1.IntegrationError(`If event conversion type is "${event_conversion_type}" then Pixel ID must be defined`, 'Misconfigured required field', 400);
18
+ }
19
+ delete settings?.snap_app_id;
20
+ delete settings?.app_id;
21
+ }
22
+ return settings;
23
+ };
24
+ const formatPayload = (oldPayload) => {
25
+ const payload = { ...oldPayload };
26
+ if (payload.email) {
27
+ payload.email = payload.email.replace(/\s/g, '').toLowerCase();
28
+ }
29
+ if (payload.phone_number) {
30
+ payload.phone_number = payload.phone_number.replace(/\D|^0+/g, '');
31
+ }
32
+ if (payload.mobile_ad_id) {
33
+ payload.mobile_ad_id = payload.mobile_ad_id.toLowerCase();
34
+ }
35
+ let item_ids = undefined;
36
+ let item_category = undefined;
37
+ let brands = undefined;
38
+ const p = payload?.products;
39
+ if (p && Array.isArray(p) && p.length > 0) {
40
+ item_ids = utils_1.transformProperty('item_id', p);
41
+ item_category = utils_1.transformProperty('item_category', p);
42
+ brands = p.map((product) => product.brand ?? '');
43
+ }
44
+ return {
45
+ event_type: payload?.event_type,
46
+ event_conversion_type: payload?.event_conversion_type,
47
+ event_tag: payload?.event_tag,
48
+ timestamp: Date.parse(payload?.timestamp),
49
+ hashed_email: utils_1.isHashedEmail(String(payload?.email)) ? payload?.email : utils_1.hash(payload?.email),
50
+ hashed_mobile_ad_id: utils_1.hash(payload?.mobile_ad_id),
51
+ uuid_c1: payload?.uuid_c1,
52
+ hashed_idfv: utils_1.hash(payload?.idfv),
53
+ hashed_phone_number: utils_1.hash(payload?.phone_number),
54
+ user_agent: payload?.user_agent,
55
+ hashed_ip_address: utils_1.hash(payload?.ip_address),
56
+ item_category: item_category ?? payload?.item_category,
57
+ brands: brands ?? payload?.brands,
58
+ item_ids: item_ids ?? payload?.item_ids,
59
+ description: payload?.description,
60
+ number_items: payload?.number_items,
61
+ price: payload?.price,
62
+ currency: payload?.currency,
63
+ transaction_id: payload?.transaction_id,
64
+ level: payload?.level,
65
+ client_dedup_id: payload?.client_dedup_id,
66
+ search_string: payload?.search_string,
67
+ page_url: payload?.page_url,
68
+ sign_up_method: payload?.sign_up_method,
69
+ device_model: payload?.device_model,
70
+ os_version: payload?.os_version,
71
+ click_id: payload?.click_id
72
+ };
73
+ };
74
+ const CONVERSION_EVENT_URL = 'https://tr.snapchat.com/v2/conversion';
75
+ const performSnapCAPIv2 = (request, data) => {
76
+ if (data.payload.currency && !snap_capi_properties_1.CURRENCY_ISO_4217_CODES.has(data.payload.currency.toUpperCase())) {
77
+ throw new actions_core_1.IntegrationError(`${data.payload.currency} is not a valid currency code.`, 'Misconfigured required field', 400);
78
+ }
79
+ if (!data.payload.email &&
80
+ !data.payload.phone_number &&
81
+ !data.payload.mobile_ad_id &&
82
+ (!data.payload.ip_address || !data.payload.user_agent)) {
83
+ throw new actions_core_1.IntegrationError(`Payload must contain values for Email or Phone Number or Mobile Ad Identifier or both IP Address and User Agent fields`, 'Misconfigured required field', 400);
84
+ }
85
+ const payload = formatPayload(data.payload);
86
+ const settings = conversionType(data.settings, data.payload.event_conversion_type);
87
+ return request(CONVERSION_EVENT_URL, {
88
+ method: 'post',
89
+ json: {
90
+ integration: 'segment',
91
+ ...payload,
92
+ ...settings
93
+ }
94
+ });
95
+ };
96
+ exports.performSnapCAPIv2 = performSnapCAPIv2;
97
+ //# sourceMappingURL=snap-capi-v2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snap-capi-v2.js","sourceRoot":"","sources":["../../../../src/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.ts"],"names":[],"mappings":";;;AAAA,wDAAuG;AAGvG,kEAAiE;AACjE,mCAAgE;AAGhE,MAAM,cAAc,GAAG,CAAC,WAAqB,EAAE,qBAA6B,EAAY,EAAE;IAExF,MAAM,QAAQ,GAAG,EAAE,GAAG,WAAW,EAAE,CAAA;IAEnC,IAAI,qBAAqB,KAAK,YAAY,EAAE;QAC1C,IAAI,CAAC,QAAQ,EAAE,WAAW,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE;YAC/C,MAAM,IAAI,+BAAgB,CACxB,sFAAsF,EACtF,8BAA8B,EAC9B,GAAG,CACJ,CAAA;SACF;QACD,OAAO,QAAQ,EAAE,QAAQ,CAAA;KAC1B;SAAM;QACL,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE;YACvB,MAAM,IAAI,+BAAgB,CACxB,gCAAgC,qBAAqB,iCAAiC,EACtF,8BAA8B,EAC9B,GAAG,CACJ,CAAA;SACF;QACD,OAAO,QAAQ,EAAE,WAAW,CAAA;QAC5B,OAAO,QAAQ,EAAE,MAAM,CAAA;KACxB;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,CAAC,UAAmB,EAAU,EAAE;IAEpD,MAAM,OAAO,GAAG,EAAE,GAAG,UAAU,EAAE,CAAA;IAGjC,IAAI,OAAO,CAAC,KAAK,EAAE;QAEjB,OAAO,CAAC,KAAK,G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IAAI,CAAC,OAAO,CAAC,QAAQ,gCAAgC,EACxD,8BAA8B,EAC9B,GAAG,CACJ,CAAA;KACF;IAED,IACE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK;QACnB,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY;QAC1B,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY;QAC1B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EACtD;QACA,MAAM,IAAI,+BAAgB,CACxB,wHAAwH,EACxH,8BAA8B,EAC9B,GAAG,CACJ,CAAA;KACF;IAED,MAAM,OAAO,GAAW,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACnD,MAAM,QAAQ,GAAa,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAA;IAG5F,OAAO,OAAO,CAAC,oBAAoB,EAAE;QACnC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,WAAW,EAAE,SAAS;YACtB,GAAG,OAAO;YACV,GAAG,QAAQ;SACZ;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AArCY,QAAA,iBAAiB,qBAqC7B"}
@@ -0,0 +1,30 @@
1
+ import { InputField } from '@segment/actions-core/destination-kit/types';
2
+ export declare const CURRENCY_ISO_4217_CODES: Set<string>;
3
+ export declare const products: InputField;
4
+ export declare const event_type: InputField;
5
+ export declare const event_conversion_type: InputField;
6
+ export declare const event_tag: InputField;
7
+ export declare const timestamp: InputField;
8
+ export declare const email: InputField;
9
+ export declare const mobile_ad_id: InputField;
10
+ export declare const uuid_c1: InputField;
11
+ export declare const idfv: InputField;
12
+ export declare const phone_number: InputField;
13
+ export declare const user_agent: InputField;
14
+ export declare const ip_address: InputField;
15
+ export declare const item_category: InputField;
16
+ export declare const brands: InputField;
17
+ export declare const item_ids: InputField;
18
+ export declare const description: InputField;
19
+ export declare const number_items: InputField;
20
+ export declare const price: InputField;
21
+ export declare const currency: InputField;
22
+ export declare const transaction_id: InputField;
23
+ export declare const level: InputField;
24
+ export declare const client_dedup_id: InputField;
25
+ export declare const search_string: InputField;
26
+ export declare const page_url: InputField;
27
+ export declare const sign_up_method: InputField;
28
+ export declare const device_model: InputField;
29
+ export declare const os_version: InputField;
30
+ export declare const click_id: InputField;
@@ -0,0 +1,316 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.click_id = exports.os_version = exports.device_model = exports.sign_up_method = exports.page_url = exports.search_string = exports.client_dedup_id = exports.level = exports.transaction_id = exports.currency = exports.price = exports.number_items = exports.description = exports.item_ids = exports.brands = exports.item_category = exports.ip_address = exports.user_agent = exports.phone_number = exports.idfv = exports.uuid_c1 = exports.mobile_ad_id = exports.email = exports.timestamp = exports.event_tag = exports.event_conversion_type = exports.event_type = exports.products = exports.CURRENCY_ISO_4217_CODES = void 0;
4
+ exports.CURRENCY_ISO_4217_CODES = new Set([
5
+ 'USD',
6
+ 'AED',
7
+ 'AUD',
8
+ 'BGN',
9
+ 'BRL',
10
+ 'CAD',
11
+ 'CHF',
12
+ 'CLP',
13
+ 'CNY',
14
+ 'COP',
15
+ 'CZK',
16
+ 'DKK',
17
+ 'EGP',
18
+ 'EUR',
19
+ 'GBP',
20
+ 'GIP',
21
+ 'HKD',
22
+ 'HRK',
23
+ 'HUF',
24
+ 'IDR',
25
+ 'ILS',
26
+ 'INR',
27
+ 'JPY',
28
+ 'KRW',
29
+ 'KWD',
30
+ 'KZT',
31
+ 'LBP',
32
+ 'MXN',
33
+ 'MYR',
34
+ 'NGN',
35
+ 'NOK',
36
+ 'NZD',
37
+ 'PEN',
38
+ 'PHP',
39
+ 'PKR',
40
+ 'PLN',
41
+ 'QAR',
42
+ 'RON',
43
+ 'RUB',
44
+ 'SAR',
45
+ 'SEK',
46
+ 'SGD',
47
+ 'THB',
48
+ 'TRY',
49
+ 'TWD',
50
+ 'TZS',
51
+ 'UAH',
52
+ 'VND',
53
+ 'ZAR',
54
+ 'ALL',
55
+ 'BHD',
56
+ 'DZD',
57
+ 'GHS',
58
+ 'IQD',
59
+ 'ISK',
60
+ 'JOD',
61
+ 'KES',
62
+ 'MAD',
63
+ 'OMR',
64
+ 'XOF'
65
+ ]);
66
+ exports.products = {
67
+ label: 'Products',
68
+ description: "Use this field to send details of mulitple products / items. This field overrides individual 'Item ID', 'Item Category' and 'Brand' fields. Note: total purchase value is tracked using the 'Price' field",
69
+ type: 'object',
70
+ multiple: true,
71
+ additionalProperties: false,
72
+ properties: {
73
+ item_id: {
74
+ label: 'Item ID',
75
+ type: 'string',
76
+ description: 'Identfier for the item. International Article Number (EAN) when applicable, or other product or category identifier.',
77
+ allowNull: false
78
+ },
79
+ item_category: {
80
+ label: 'Category',
81
+ type: 'string',
82
+ description: 'Category of the item. This field accepts a string.',
83
+ allowNull: false
84
+ },
85
+ brand: {
86
+ label: 'Brand',
87
+ type: 'string',
88
+ description: 'Brand associated with the item. This field accepts a string.',
89
+ allowNull: false
90
+ }
91
+ },
92
+ default: {
93
+ '@arrayPath': [
94
+ '$.properties.products',
95
+ {
96
+ item_id: {
97
+ '@path': 'product_id'
98
+ },
99
+ item_category: {
100
+ '@path': 'category'
101
+ },
102
+ brand: {
103
+ '@path': 'brand'
104
+ }
105
+ }
106
+ ]
107
+ }
108
+ };
109
+ exports.event_type = {
110
+ label: 'Event Type',
111
+ description: 'The conversion event type. For custom events, you must use one of the predefined event types (i.e. CUSTOM_EVENT_1). Please refer to the possible event types in [Snapchat Marketing API docs](https://marketingapi.snapchat.com/docs/conversion.html#conversion-parameters).',
112
+ type: 'string'
113
+ };
114
+ exports.event_conversion_type = {
115
+ label: 'Event Conversion Type',
116
+ description: 'Where the event took place. This must be OFFLINE, WEB, or MOBILE_APP.',
117
+ type: 'string',
118
+ choices: [
119
+ { label: 'Offline', value: 'OFFLINE' },
120
+ { label: 'Web', value: 'WEB' },
121
+ { label: 'Mobile App', value: 'MOBILE_APP' }
122
+ ]
123
+ };
124
+ exports.event_tag = {
125
+ label: 'Event Tag',
126
+ description: 'Custom event label.',
127
+ type: 'string'
128
+ };
129
+ exports.timestamp = {
130
+ label: 'Event Timestamp',
131
+ description: 'The Epoch timestamp for when the conversion happened. The timestamp cannot be more than 28 days in the past.',
132
+ type: 'string',
133
+ default: {
134
+ '@path': '$.timestamp'
135
+ }
136
+ };
137
+ exports.email = {
138
+ label: 'Email',
139
+ description: 'Email address of the user who triggered the conversion event. Segment will normalize and hash this value before sending to Snapchat. [Snapchat requires](https://marketingapi.snapchat.com/docs/conversion.html#conversion-parameters) that every payload contain values for Email or Phone Number or Mobile Ad Identifier or both IP Address and User Agent fields. Also see [Segment documentation](https://segment.com/docs/connections/destinations/catalog/actions-snap-conversions/#required-parameters-and-hashing).',
140
+ type: 'string',
141
+ default: {
142
+ '@if': {
143
+ exists: { '@path': '$.properties.email' },
144
+ then: { '@path': '$.properties.email' },
145
+ else: { '@path': '$.traits.email' }
146
+ }
147
+ }
148
+ };
149
+ exports.mobile_ad_id = {
150
+ label: 'Mobile Ad Identifier',
151
+ description: 'Mobile ad identifier (IDFA or AAID) of the user who triggered the conversion event. Segment will normalize and hash this value before sending to Snapchat. [Snapchat requires](https://marketingapi.snapchat.com/docs/conversion.html#conversion-parameters) that every payload contain values for Email or Phone Number or Mobile Ad Identifier or both IP Address and User Agent fields. Also see [Segment documentation](https://segment.com/docs/connections/destinations/catalog/actions-snap-conversions/#required-parameters-and-hashing).',
152
+ type: 'string',
153
+ default: {
154
+ '@path': '$.context.device.advertisingId'
155
+ }
156
+ };
157
+ exports.uuid_c1 = {
158
+ label: 'uuid_c1 Cookie',
159
+ description: 'Unique user ID cookie. If you are using the Pixel SDK, you can access a cookie1 by looking at the _scid value.',
160
+ type: 'string',
161
+ default: {
162
+ '@path': '$.integrations.Snap Conversions Api.uuid_c1'
163
+ }
164
+ };
165
+ exports.idfv = {
166
+ label: 'Identifier for Vendor',
167
+ description: 'IDFV of the user’s device. Segment will normalize and hash this value before sending to Snapchat.',
168
+ type: 'string',
169
+ default: {
170
+ '@path': '$.context.device.id'
171
+ }
172
+ };
173
+ exports.phone_number = {
174
+ label: 'Phone Number',
175
+ description: 'Phone number of the user who triggered the conversion event. Segment will normalize and hash this value before sending to Snapchat. [Snapchat requires](https://marketingapi.snapchat.com/docs/conversion.html#conversion-parameters) that every payload contain values for Email or Phone Number or Mobile Ad Identifier or both IP Address and User Agent fields. Also see [Segment documentation](https://segment.com/docs/connections/destinations/catalog/actions-snap-conversions/#required-parameters-and-hashing).',
176
+ type: 'string',
177
+ default: {
178
+ '@if': {
179
+ exists: { '@path': '$.properties.phone' },
180
+ then: { '@path': '$.properties.phone' },
181
+ else: { '@path': '$.traits.phone' }
182
+ }
183
+ }
184
+ };
185
+ exports.user_agent = {
186
+ label: 'User Agent',
187
+ description: 'User agent from the user’s device. [Snapchat requires](https://marketingapi.snapchat.com/docs/conversion.html#conversion-parameters) that every payload contain values for Email or Phone Number or Mobile Ad Identifier or both IP Address and User Agent fields. Also see [Segment documentation](https://segment.com/docs/connections/destinations/catalog/actions-snap-conversions/#required-parameters-and-hashing).',
188
+ type: 'string',
189
+ default: {
190
+ '@path': '$.context.userAgent'
191
+ }
192
+ };
193
+ exports.ip_address = {
194
+ label: 'IP Address',
195
+ description: 'IP address of the device or browser. Segment will normalize and hash this value before sending to Snapchat. [Snapchat requires](https://marketingapi.snapchat.com/docs/conversion.html#conversion-parameters) that every payload contain values for Email or Phone Number or Mobile Ad Identifier or both IP Address and User Agent fields. Also see [Segment documentation](https://segment.com/docs/connections/destinations/catalog/actions-snap-conversions/#required-parameters-and-hashing).',
196
+ type: 'string',
197
+ default: {
198
+ '@path': '$.context.ip'
199
+ }
200
+ };
201
+ exports.item_category = {
202
+ label: 'Item Category',
203
+ description: 'Category of the item. This field accepts a string.',
204
+ type: 'string',
205
+ default: {
206
+ '@path': '$.properties.category'
207
+ }
208
+ };
209
+ exports.brands = {
210
+ label: 'Brand',
211
+ description: 'Brand associated with the item. This field accepts a string or a list of strings',
212
+ type: 'string',
213
+ multiple: true,
214
+ default: {
215
+ '@path': '$.properties.brand'
216
+ }
217
+ };
218
+ exports.item_ids = {
219
+ label: 'Item ID',
220
+ description: 'Identfier for the item. International Article Number (EAN) when applicable, or other product or category identifier.',
221
+ type: 'string',
222
+ default: {
223
+ '@path': '$.properties.product_id'
224
+ }
225
+ };
226
+ exports.description = {
227
+ label: 'Description',
228
+ description: 'A string description for additional info.',
229
+ type: 'string'
230
+ };
231
+ exports.number_items = {
232
+ label: 'Number of Items',
233
+ description: 'Number of items. This field accepts a string only. e.g. "5"',
234
+ type: 'string',
235
+ default: {
236
+ '@path': '$.properties.quantity'
237
+ }
238
+ };
239
+ exports.price = {
240
+ label: 'Price',
241
+ description: "Total value of the purchase. This should be a single number. Can be overriden using the 'Track Purchase Value Per Product' field.",
242
+ type: 'number',
243
+ default: {
244
+ '@if': {
245
+ exists: { '@path': '$.properties.revenue' },
246
+ then: { '@path': '$.properties.revenue' },
247
+ else: { '@path': '$.properties.total' }
248
+ }
249
+ }
250
+ };
251
+ exports.currency = {
252
+ label: 'Currency',
253
+ description: 'Currency for the value specified as ISO 4217 code.',
254
+ type: 'string',
255
+ default: {
256
+ '@path': '$.properties.currency'
257
+ }
258
+ };
259
+ exports.transaction_id = {
260
+ label: 'Transaction ID',
261
+ description: 'Transaction ID or order ID tied to the conversion event. Please refer to the [Snapchat Marketing API docs](https://marketingapi.snapchat.com/docs/conversion.html#deduplication) for information on how this field is used for deduplication against Snap Pixel SDK and App Ads Kit events.',
262
+ type: 'string',
263
+ default: {
264
+ '@path': '$.properties.order_id'
265
+ }
266
+ };
267
+ exports.level = {
268
+ label: 'Level',
269
+ description: 'Represents a level in the context of a game.',
270
+ type: 'string'
271
+ };
272
+ exports.client_dedup_id = {
273
+ label: 'Client Deduplication ID',
274
+ description: 'If you are reporting events via more than one method (Snap Pixel, App Ads Kit, Conversions API) you should use the same client_dedup_id across all methods. Please refer to the [Snapchat Marketing API docs](https://marketingapi.snapchat.com/docs/conversion.html#deduplication) for information on how this field is used for deduplication against Snap Pixel SDK and App Adds Kit events.',
275
+ type: 'string'
276
+ };
277
+ exports.search_string = {
278
+ label: 'Search String',
279
+ description: 'The text string that was searched for.',
280
+ type: 'string',
281
+ default: {
282
+ '@path': '$.properties.query'
283
+ }
284
+ };
285
+ exports.page_url = {
286
+ label: 'Page URL',
287
+ description: 'The URL of the web page where the event took place.',
288
+ type: 'string',
289
+ default: {
290
+ '@path': '$.context.page.url'
291
+ }
292
+ };
293
+ exports.sign_up_method = {
294
+ label: 'Sign Up Method',
295
+ description: 'A string indicating the sign up method.',
296
+ type: 'string'
297
+ };
298
+ exports.device_model = {
299
+ label: 'Device Model',
300
+ description: 'The user’s device model.',
301
+ type: 'string'
302
+ };
303
+ exports.os_version = {
304
+ label: 'OS Version',
305
+ description: 'The user’s OS version.',
306
+ type: 'string'
307
+ };
308
+ exports.click_id = {
309
+ label: 'Click ID',
310
+ description: "The ID value stored in the landing page URL's `&ScCid=` query parameter. Using this ID improves ad measurement performance. We also encourage advertisers who are using `click_id` to pass the full url in the `page_url` field. For more details, please refer to [Sending a Click ID](#sending-a-click-id)",
311
+ type: 'string',
312
+ default: {
313
+ '@path': '$.integrations.Snap Conversions Api.click_id'
314
+ }
315
+ };
316
+ //# sourceMappingURL=snap-capi-properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snap-capi-properties.js","sourceRoot":"","sources":["../../../src/destinations/snap-conversions-api/snap-capi-properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,uBAAuB,GAAG,IAAI,GAAG,CAAC;IAC7C,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAA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YAAiY;IACnY,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,aAAa,GAAe;IACvC,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,wCAAwC;IACrD,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,OAAO,EAAE,oBAAoB;KAC9B;CACF,CAAA;AAEY,QAAA,QAAQ,GAAe;IAClC,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,qDAAqD;IAClE,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,OAAO,EAAE,oBAAoB;KAC9B;CACF,CAAA;AAEY,QAAA,cAAc,GAAe;IACxC,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,yCAAyC;IACtD,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,YAAY,GAAe;IACtC,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,0BAA0B;IACvC,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,wBAAwB;IACrC,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,QAAQ,GAAe;IAClC,KAAK,EAAE,UAAU;IACjB,WAAW,EACT,8SAA8S;IAChT,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,OAAO,EAAE,8CAA8C;KACxD;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare function formatEmail(email: string | undefined): string | undefined;
2
+ export declare function formatUserId(userId: string | undefined): string | undefined;
3
+ export declare function formatPhone(phone: string | undefined): string | undefined;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatPhone = exports.formatUserId = exports.formatEmail = void 0;
4
+ const crypto_1 = require("crypto");
5
+ function formatEmail(email) {
6
+ if (email) {
7
+ return hashAndEncode(email.toLowerCase());
8
+ }
9
+ return undefined;
10
+ }
11
+ exports.formatEmail = formatEmail;
12
+ function formatUserId(userId) {
13
+ if (userId) {
14
+ return hashAndEncode(userId.toLowerCase().trim());
15
+ }
16
+ return undefined;
17
+ }
18
+ exports.formatUserId = formatUserId;
19
+ function formatPhone(phone) {
20
+ if (!phone)
21
+ return undefined;
22
+ const validatedPhone = phone.match(/[0-9]{0,14}/g);
23
+ if (validatedPhone === null) {
24
+ throw new Error(`${phone} is not a valid E.164 phone number.`);
25
+ }
26
+ let formattedPhone = `+${phone.replace(/[^0-9]/g, '')}`;
27
+ formattedPhone = formattedPhone.substring(0, 15);
28
+ return hashAndEncode(formattedPhone);
29
+ }
30
+ exports.formatPhone = formatPhone;
31
+ function hashAndEncode(property) {
32
+ return crypto_1.createHash('sha256').update(property).digest('hex');
33
+ }
34
+ //# sourceMappingURL=formatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-conversions/reportWebEvent/formatter.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAKnC,SAAgB,WAAW,CAAC,KAAyB;IACnD,IAAI,KAAK,EAAE;QACT,OAAO,aAAa,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAA;KAC1C;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AALD,kCAKC;AAOD,SAAgB,YAAY,CAAC,MAA0B;IACrD,IAAI,MAAM,EAAE;QACV,OAAO,aAAa,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,CAAA;KAClD;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AALD,oCAKC;AAOD,SAAgB,WAAW,CAAC,KAAyB;IACnD,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAA;IAE5B,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;IAClD,IAAI,cAAc,KAAK,IAAI,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qCAAqC,CAAC,CAAA;KAC/D;IAED,IAAI,cAAc,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAA;IAEvD,cAAc,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAChD,OAAO,aAAa,CAAC,cAAc,CAAC,CAAA;AACtC,CAAC;AAZD,kCAYC;AAED,SAAS,aAAa,CAAC,QAAgB;IACrC,OAAO,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const formatEmails: (email_addresses: string[] | undefined) => string[];
2
+ export declare function formatUserIds(userIds: string[] | undefined): string[];
3
+ export declare const formatPhones: (phone_numbers: string[] | undefined) => string[];
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatPhones = exports.formatUserIds = exports.formatEmails = void 0;
4
+ const crypto_1 = require("crypto");
5
+ const formatEmails = (email_addresses) => {
6
+ const result = [];
7
+ if (email_addresses) {
8
+ email_addresses.forEach((email) => {
9
+ result.push(hashAndEncode(email.toLowerCase()));
10
+ });
11
+ }
12
+ return result;
13
+ };
14
+ exports.formatEmails = formatEmails;
15
+ function formatUserIds(userIds) {
16
+ const result = [];
17
+ if (userIds) {
18
+ userIds.forEach((userId) => {
19
+ result.push(hashAndEncode(userId.toLowerCase()));
20
+ });
21
+ }
22
+ return result;
23
+ }
24
+ exports.formatUserIds = formatUserIds;
25
+ const formatPhones = (phone_numbers) => {
26
+ const result = [];
27
+ if (!phone_numbers)
28
+ return result;
29
+ phone_numbers.forEach((phone) => {
30
+ const validatedPhone = phone.match(/[0-9]{0,14}/g);
31
+ if (validatedPhone === null) {
32
+ throw new Error(`${phone} is not a valid E.164 phone number.`);
33
+ }
34
+ const formattedPhone = `+${phone.replace(/[^0-9]/g, '')}`;
35
+ result.push(hashAndEncode(formattedPhone.substring(0, 15)));
36
+ });
37
+ return result;
38
+ };
39
+ exports.formatPhones = formatPhones;
40
+ function hashAndEncode(property) {
41
+ return crypto_1.createHash('sha256').update(property).digest('hex');
42
+ }
43
+ //# sourceMappingURL=formatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAK5B,MAAM,YAAY,GAAG,CAAC,eAAqC,EAAY,EAAE;IAC9E,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,IAAI,eAAe,EAAE;QACnB,eAAe,CAAC,OAAO,CAAC,CAAC,KAAa,EAAE,EAAE;YACxC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAA;QACjD,CAAC,CAAC,CAAA;KACH;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AARY,QAAA,YAAY,gBAQxB;AAOD,SAAgB,aAAa,CAAC,OAA6B;IACzD,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,IAAI,OAAO,EAAE;QACX,OAAO,CAAC,OAAO,CAAC,CAAC,MAAc,EAAE,EAAE;YACjC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAA;QAClD,CAAC,CAAC,CAAA;KACH;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AARD,sCAQC;AAOM,MAAM,YAAY,GAAG,CAAC,aAAmC,EAAY,EAAE;IAC5E,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,IAAI,CAAC,aAAa;QAAE,OAAO,MAAM,CAAA;IAEjC,aAAa,CAAC,OAAO,CAAC,CAAC,KAAa,EAAE,EAAE;QACtC,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;QAClD,IAAI,cAAc,KAAK,IAAI,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qCAAqC,CAAC,CAAA;SAC/D;QAED,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAA;QAEzD,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;IAC7D,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAhBY,QAAA,YAAY,gBAgBxB;AAED,SAAS,aAAa,CAAC,QAAgB;IACrC,OAAO,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC"}
@@ -0,0 +1,11 @@
1
+ export interface Payload {
2
+ userId: string;
3
+ messageId?: string;
4
+ timestamp: string;
5
+ traits?: {
6
+ [k: string]: unknown;
7
+ };
8
+ groupId: {
9
+ [k: string]: unknown;
10
+ };
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=group.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.types.js","sourceRoot":"","sources":["../../../src/destinations/trackey/group.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export interface Payload {
2
+ userId: string;
3
+ messageId?: string;
4
+ timestamp: string;
5
+ traits?: {
6
+ [k: string]: unknown;
7
+ };
8
+ groupId?: {
9
+ [k: string]: unknown;
10
+ };
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=identify.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identify.types.js","sourceRoot":"","sources":["../../../src/destinations/trackey/identify.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export interface Payload {
2
+ userId: string;
3
+ event: string;
4
+ messageId?: string;
5
+ timestamp: string;
6
+ properties?: {
7
+ [k: string]: unknown;
8
+ };
9
+ groupId?: {
10
+ [k: string]: unknown;
11
+ };
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=track.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"track.types.js","sourceRoot":"","sources":["../../../src/destinations/trackey/track.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export interface RefreshTokenResponse {
2
+ access_token: string;
3
+ scope: string;
4
+ expires_in: number;
5
+ token_type: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/webhook-extensible/types.ts"],"names":[],"mappings":""}