@segment/action-destinations 3.285.0 → 3.287.0-staging-a398e1d79

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 (353) hide show
  1. package/README.md +1 -2
  2. package/dist/destinations/amazon-amc/index.js +10 -2
  3. package/dist/destinations/amazon-amc/index.js.map +1 -1
  4. package/dist/destinations/dynamic-yield-audiences/index.js +24 -29
  5. package/dist/destinations/dynamic-yield-audiences/index.js.map +1 -1
  6. package/dist/destinations/dynamic-yield-audiences/syncAudience/index.js +34 -33
  7. package/dist/destinations/dynamic-yield-audiences/syncAudience/index.js.map +1 -1
  8. package/dist/destinations/index.js +1 -0
  9. package/dist/destinations/index.js.map +1 -1
  10. package/dist/destinations/mappings-two-test/generated-types.d.ts +3 -0
  11. package/dist/destinations/mappings-two-test/generated-types.js.map +1 -0
  12. package/dist/destinations/{engage/twilio/destinationDefinition.d.ts → mappings-two-test/index.d.ts} +2 -1
  13. package/dist/destinations/mappings-two-test/index.js +32 -0
  14. package/dist/destinations/mappings-two-test/index.js.map +1 -0
  15. package/dist/destinations/mappings-two-test/kitchenSink/generated-types.d.ts +39 -0
  16. package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js.map +1 -0
  17. package/dist/destinations/mappings-two-test/kitchenSink/index.js +240 -0
  18. package/dist/destinations/mappings-two-test/kitchenSink/index.js.map +1 -0
  19. package/dist/destinations/mappings-two-test/sendEvent/generated-types.d.ts +6 -0
  20. package/dist/destinations/mappings-two-test/sendEvent/generated-types.js.map +1 -0
  21. package/dist/destinations/{movable-ink/conversion → mappings-two-test/sendEvent}/index.d.ts +1 -1
  22. package/dist/destinations/mappings-two-test/sendEvent/index.js +110 -0
  23. package/dist/destinations/mappings-two-test/sendEvent/index.js.map +1 -0
  24. package/dist/destinations/taboola-actions/syncAudience/index.js +7 -3
  25. package/dist/destinations/taboola-actions/syncAudience/index.js.map +1 -1
  26. package/dist/destinations/yahoo-audiences/index.js +2 -1
  27. package/dist/destinations/yahoo-audiences/index.js.map +1 -1
  28. package/package.json +4 -4
  29. package/dist/destinations/amazon-ads/generated-types.d.ts +0 -12
  30. package/dist/destinations/amazon-ads/generated-types.js.map +0 -1
  31. package/dist/destinations/amazon-ads/index.d.ts +0 -4
  32. package/dist/destinations/amazon-ads/index.js +0 -237
  33. package/dist/destinations/amazon-ads/index.js.map +0 -1
  34. package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +0 -15
  35. package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +0 -1
  36. package/dist/destinations/amazon-ads/syncAudiences/index.js +0 -182
  37. package/dist/destinations/amazon-ads/syncAudiences/index.js.map +0 -1
  38. package/dist/destinations/amazon-ads/types.d.ts +0 -47
  39. package/dist/destinations/amazon-ads/types.js +0 -11
  40. package/dist/destinations/amazon-ads/types.js.map +0 -1
  41. package/dist/destinations/amazon-ads/utils.d.ts +0 -37
  42. package/dist/destinations/amazon-ads/utils.js +0 -25
  43. package/dist/destinations/amazon-ads/utils.js.map +0 -1
  44. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.d.ts +0 -1
  45. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js +0 -184
  46. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js.map +0 -1
  47. package/dist/destinations/contentstack/constants.d.ts +0 -3
  48. package/dist/destinations/contentstack/constants.js +0 -7
  49. package/dist/destinations/contentstack/constants.js.map +0 -1
  50. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.d.ts +0 -22
  51. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js +0 -3
  52. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +0 -1
  53. package/dist/destinations/dynamic-yield-audiences/types.d.ts +0 -8
  54. package/dist/destinations/dynamic-yield-audiences/types.js +0 -12
  55. package/dist/destinations/dynamic-yield-audiences/types.js.map +0 -1
  56. package/dist/destinations/engage/sendgrid/Profile.d.ts +0 -6
  57. package/dist/destinations/engage/sendgrid/Profile.js +0 -3
  58. package/dist/destinations/engage/sendgrid/Profile.js.map +0 -1
  59. package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +0 -3
  60. package/dist/destinations/engage/sendgrid/destinationDefinition.js +0 -70
  61. package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +0 -1
  62. package/dist/destinations/engage/sendgrid/generated-types.d.ts +0 -1
  63. package/dist/destinations/engage/sendgrid/generated-types.js +0 -14
  64. package/dist/destinations/engage/sendgrid/generated-types.js.map +0 -1
  65. package/dist/destinations/engage/sendgrid/index.d.ts +0 -2
  66. package/dist/destinations/engage/sendgrid/index.js +0 -5
  67. package/dist/destinations/engage/sendgrid/index.js.map +0 -1
  68. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +0 -4
  69. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +0 -28
  70. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +0 -1
  71. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +0 -21
  72. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +0 -174
  73. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +0 -1
  74. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +0 -1
  75. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +0 -14
  76. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +0 -1
  77. package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +0 -1
  78. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +0 -14
  79. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +0 -1
  80. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +0 -44
  81. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +0 -419
  82. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +0 -1
  83. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +0 -12
  84. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +0 -3
  85. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +0 -1
  86. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +0 -4
  87. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +0 -257
  88. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +0 -1
  89. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +0 -1
  90. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +0 -14
  91. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +0 -1
  92. package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +0 -1
  93. package/dist/destinations/engage/sendgrid/sendEmail/index.js +0 -14
  94. package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +0 -1
  95. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +0 -1
  96. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +0 -23
  97. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +0 -1
  98. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +0 -1
  99. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +0 -14
  100. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +0 -1
  101. package/dist/destinations/engage/twilio/destinationDefinition.js +0 -172
  102. package/dist/destinations/engage/twilio/destinationDefinition.js.map +0 -1
  103. package/dist/destinations/engage/twilio/generated-types.d.ts +0 -1
  104. package/dist/destinations/engage/twilio/generated-types.js +0 -14
  105. package/dist/destinations/engage/twilio/generated-types.js.map +0 -1
  106. package/dist/destinations/engage/twilio/index.d.ts +0 -2
  107. package/dist/destinations/engage/twilio/index.js +0 -5
  108. package/dist/destinations/engage/twilio/index.js.map +0 -1
  109. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +0 -28
  110. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +0 -151
  111. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +0 -1
  112. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +0 -4
  113. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +0 -250
  114. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +0 -1
  115. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +0 -1
  116. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +0 -14
  117. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +0 -1
  118. package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +0 -1
  119. package/dist/destinations/engage/twilio/sendMobilePush/index.js +0 -14
  120. package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +0 -1
  121. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +0 -9
  122. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +0 -72
  123. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +0 -1
  124. package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +0 -4
  125. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +0 -162
  126. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +0 -1
  127. package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +0 -1
  128. package/dist/destinations/engage/twilio/sendSms/generated-types.js +0 -14
  129. package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +0 -1
  130. package/dist/destinations/engage/twilio/sendSms/index.d.ts +0 -1
  131. package/dist/destinations/engage/twilio/sendSms/index.js +0 -14
  132. package/dist/destinations/engage/twilio/sendSms/index.js.map +0 -1
  133. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +0 -9
  134. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +0 -89
  135. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +0 -1
  136. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +0 -4
  137. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +0 -136
  138. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +0 -1
  139. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +0 -1
  140. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +0 -14
  141. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +0 -1
  142. package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +0 -1
  143. package/dist/destinations/engage/twilio/sendWhatsApp/index.js +0 -14
  144. package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +0 -1
  145. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +0 -16
  146. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +0 -71
  147. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +0 -1
  148. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +0 -16
  149. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +0 -115
  150. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +0 -1
  151. package/dist/destinations/engage/twilio/utils/index.d.ts +0 -2
  152. package/dist/destinations/engage/twilio/utils/index.js +0 -15
  153. package/dist/destinations/engage/twilio/utils/index.js.map +0 -1
  154. package/dist/destinations/engage/twilio/utils/types.d.ts +0 -23
  155. package/dist/destinations/engage/twilio/utils/types.js +0 -3
  156. package/dist/destinations/engage/twilio/utils/types.js.map +0 -1
  157. package/dist/destinations/engage/utils/AggregateError.d.ts +0 -14
  158. package/dist/destinations/engage/utils/AggregateError.js +0 -26
  159. package/dist/destinations/engage/utils/AggregateError.js.map +0 -1
  160. package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +0 -42
  161. package/dist/destinations/engage/utils/EngageActionPerformer.js +0 -148
  162. package/dist/destinations/engage/utils/EngageActionPerformer.js.map +0 -1
  163. package/dist/destinations/engage/utils/EngageLogger.d.ts +0 -18
  164. package/dist/destinations/engage/utils/EngageLogger.js +0 -52
  165. package/dist/destinations/engage/utils/EngageLogger.js.map +0 -1
  166. package/dist/destinations/engage/utils/EngageStats.d.ts +0 -18
  167. package/dist/destinations/engage/utils/EngageStats.js +0 -95
  168. package/dist/destinations/engage/utils/EngageStats.js.map +0 -1
  169. package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +0 -12
  170. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +0 -31
  171. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +0 -1
  172. package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +0 -65
  173. package/dist/destinations/engage/utils/MessageSendPerformer.js +0 -211
  174. package/dist/destinations/engage/utils/MessageSendPerformer.js.map +0 -1
  175. package/dist/destinations/engage/utils/Profile.d.ts +0 -6
  176. package/dist/destinations/engage/utils/Profile.js +0 -3
  177. package/dist/destinations/engage/utils/Profile.js.map +0 -1
  178. package/dist/destinations/engage/utils/ResponseError.d.ts +0 -25
  179. package/dist/destinations/engage/utils/ResponseError.js +0 -22
  180. package/dist/destinations/engage/utils/ResponseError.js.map +0 -1
  181. package/dist/destinations/engage/utils/apiLookups.d.ts +0 -22
  182. package/dist/destinations/engage/utils/apiLookups.js +0 -189
  183. package/dist/destinations/engage/utils/apiLookups.js.map +0 -1
  184. package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +0 -2
  185. package/dist/destinations/engage/utils/getProfileApiEndpoint.js +0 -10
  186. package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +0 -1
  187. package/dist/destinations/engage/utils/index.d.ts +0 -9
  188. package/dist/destinations/engage/utils/index.js +0 -22
  189. package/dist/destinations/engage/utils/index.js.map +0 -1
  190. package/dist/destinations/engage/utils/isDestinationActionService.d.ts +0 -1
  191. package/dist/destinations/engage/utils/isDestinationActionService.js +0 -8
  192. package/dist/destinations/engage/utils/isDestinationActionService.js.map +0 -1
  193. package/dist/destinations/engage/utils/isRetryableError.d.ts +0 -2
  194. package/dist/destinations/engage/utils/isRetryableError.js +0 -33
  195. package/dist/destinations/engage/utils/isRetryableError.js.map +0 -1
  196. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +0 -1
  197. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +0 -3
  198. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +0 -1
  199. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +0 -46
  200. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +0 -46
  201. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +0 -1
  202. package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +0 -12
  203. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +0 -23
  204. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +0 -1
  205. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +0 -12
  206. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +0 -35
  207. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +0 -1
  208. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +0 -14
  209. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +0 -31
  210. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +0 -1
  211. package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +0 -31
  212. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +0 -104
  213. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +0 -1
  214. package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +0 -39
  215. package/dist/destinations/engage/utils/operationTracking/OperationStats.js +0 -130
  216. package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +0 -1
  217. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +0 -1
  218. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +0 -377
  219. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +0 -1
  220. package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +0 -23
  221. package/dist/destinations/engage/utils/operationTracking/OperationTree.js +0 -49
  222. package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +0 -1
  223. package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +0 -6
  224. package/dist/destinations/engage/utils/operationTracking/TrackedError.js +0 -3
  225. package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +0 -1
  226. package/dist/destinations/engage/utils/operationTracking/index.d.ts +0 -10
  227. package/dist/destinations/engage/utils/operationTracking/index.js +0 -23
  228. package/dist/destinations/engage/utils/operationTracking/index.js.map +0 -1
  229. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +0 -21
  230. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +0 -99
  231. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +0 -1
  232. package/dist/destinations/engage/utils/testUtils.d.ts +0 -6
  233. package/dist/destinations/engage/utils/testUtils.js +0 -26
  234. package/dist/destinations/engage/utils/testUtils.js.map +0 -1
  235. package/dist/destinations/engage/utils/track.d.ts +0 -52
  236. package/dist/destinations/engage/utils/track.js +0 -9
  237. package/dist/destinations/engage/utils/track.js.map +0 -1
  238. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +0 -16
  239. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +0 -3
  240. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +0 -1
  241. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +0 -56
  242. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +0 -3
  243. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +0 -1
  244. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +0 -39
  245. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +0 -3
  246. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +0 -1
  247. package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +0 -27
  248. package/dist/destinations/engage-messaging-twilio/sendSms.types.js +0 -3
  249. package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +0 -1
  250. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +0 -25
  251. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +0 -3
  252. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +0 -1
  253. package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +0 -4
  254. package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +0 -1
  255. package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +0 -5
  256. package/dist/destinations/klaviyo/removeProfileToList/index.js +0 -43
  257. package/dist/destinations/klaviyo/removeProfileToList/index.js.map +0 -1
  258. package/dist/destinations/mixpanel/utils.d.ts +0 -13
  259. package/dist/destinations/mixpanel/utils.js +0 -117
  260. package/dist/destinations/mixpanel/utils.js.map +0 -1
  261. package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +0 -22
  262. package/dist/destinations/movable-ink/categoryView/generated-types.js +0 -3
  263. package/dist/destinations/movable-ink/categoryView/generated-types.js.map +0 -1
  264. package/dist/destinations/movable-ink/categoryView/index.d.ts +0 -5
  265. package/dist/destinations/movable-ink/categoryView/index.js +0 -43
  266. package/dist/destinations/movable-ink/categoryView/index.js.map +0 -1
  267. package/dist/destinations/movable-ink/conversion/generated-types.d.ts +0 -20
  268. package/dist/destinations/movable-ink/conversion/generated-types.js +0 -3
  269. package/dist/destinations/movable-ink/conversion/generated-types.js.map +0 -1
  270. package/dist/destinations/movable-ink/conversion/index.js +0 -45
  271. package/dist/destinations/movable-ink/conversion/index.js.map +0 -1
  272. package/dist/destinations/movable-ink/fields.d.ts +0 -21
  273. package/dist/destinations/movable-ink/fields.js +0 -236
  274. package/dist/destinations/movable-ink/fields.js.map +0 -1
  275. package/dist/destinations/movable-ink/identify/generated-types.d.ts +0 -7
  276. package/dist/destinations/movable-ink/identify/generated-types.js +0 -3
  277. package/dist/destinations/movable-ink/identify/generated-types.js.map +0 -1
  278. package/dist/destinations/movable-ink/identify/index.d.ts +0 -5
  279. package/dist/destinations/movable-ink/identify/index.js +0 -32
  280. package/dist/destinations/movable-ink/identify/index.js.map +0 -1
  281. package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +0 -22
  282. package/dist/destinations/movable-ink/productAdded/generated-types.js +0 -3
  283. package/dist/destinations/movable-ink/productAdded/generated-types.js.map +0 -1
  284. package/dist/destinations/movable-ink/productAdded/index.d.ts +0 -5
  285. package/dist/destinations/movable-ink/productAdded/index.js +0 -43
  286. package/dist/destinations/movable-ink/productAdded/index.js.map +0 -1
  287. package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +0 -21
  288. package/dist/destinations/movable-ink/productViewed/generated-types.js +0 -3
  289. package/dist/destinations/movable-ink/productViewed/generated-types.js.map +0 -1
  290. package/dist/destinations/movable-ink/productViewed/index.d.ts +0 -5
  291. package/dist/destinations/movable-ink/productViewed/index.js +0 -43
  292. package/dist/destinations/movable-ink/productViewed/index.js.map +0 -1
  293. package/dist/destinations/movable-ink/search/generated-types.d.ts +0 -12
  294. package/dist/destinations/movable-ink/search/generated-types.js +0 -3
  295. package/dist/destinations/movable-ink/search/generated-types.js.map +0 -1
  296. package/dist/destinations/movable-ink/search/index.d.ts +0 -5
  297. package/dist/destinations/movable-ink/search/index.js +0 -43
  298. package/dist/destinations/movable-ink/search/index.js.map +0 -1
  299. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +0 -25
  300. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +0 -3
  301. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +0 -1
  302. package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +0 -5
  303. package/dist/destinations/movable-ink/sendCustomEvent/index.js +0 -48
  304. package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +0 -1
  305. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +0 -14
  306. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js +0 -3
  307. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +0 -1
  308. package/dist/destinations/responsys/asyncMergePetRecords/index.d.ts +0 -5
  309. package/dist/destinations/responsys/asyncMergePetRecords/index.js +0 -113
  310. package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +0 -1
  311. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +0 -20
  312. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js +0 -3
  313. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +0 -1
  314. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.d.ts +0 -5
  315. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +0 -174
  316. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +0 -1
  317. package/dist/destinations/responsys/rsp-operations.d.ts +0 -14
  318. package/dist/destinations/responsys/rsp-operations.js +0 -33
  319. package/dist/destinations/responsys/rsp-operations.js.map +0 -1
  320. package/dist/destinations/responsys/rsp-properties.d.ts +0 -4
  321. package/dist/destinations/responsys/rsp-properties.js +0 -27
  322. package/dist/destinations/responsys/rsp-properties.js.map +0 -1
  323. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.d.ts +0 -1
  324. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js +0 -381
  325. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js.map +0 -1
  326. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.d.ts +0 -1
  327. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +0 -581
  328. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +0 -1
  329. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.d.ts +0 -4
  330. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js +0 -97
  331. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js.map +0 -1
  332. package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +0 -30
  333. package/dist/destinations/snap-conversions-api/snap-capi-properties.js +0 -316
  334. package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +0 -1
  335. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +0 -3
  336. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +0 -34
  337. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +0 -1
  338. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +0 -3
  339. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +0 -43
  340. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +0 -1
  341. package/dist/destinations/trackey/group.types.d.ts +0 -11
  342. package/dist/destinations/trackey/group.types.js +0 -3
  343. package/dist/destinations/trackey/group.types.js.map +0 -1
  344. package/dist/destinations/trackey/identify.types.d.ts +0 -11
  345. package/dist/destinations/trackey/identify.types.js +0 -3
  346. package/dist/destinations/trackey/identify.types.js.map +0 -1
  347. package/dist/destinations/trackey/track.types.d.ts +0 -12
  348. package/dist/destinations/trackey/track.types.js +0 -3
  349. package/dist/destinations/trackey/track.types.js.map +0 -1
  350. /package/dist/destinations/{amazon-ads → mappings-two-test}/generated-types.js +0 -0
  351. /package/dist/destinations/{amazon-ads/syncAudiences → mappings-two-test/kitchenSink}/generated-types.js +0 -0
  352. /package/dist/destinations/{amazon-ads/syncAudiences → mappings-two-test/kitchenSink}/index.d.ts +0 -0
  353. /package/dist/destinations/{klaviyo/removeProfileToList → mappings-two-test/sendEvent}/generated-types.js +0 -0
@@ -1,174 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const rsp_properties_1 = require("../rsp-properties");
4
- const rsp_operations_1 = require("../rsp-operations");
5
- const action = {
6
- title: 'Async Merge Profile List Members',
7
- description: 'Asynchronous Merge Profile List Members API',
8
- fields: {
9
- profileListName: {
10
- label: 'List Name',
11
- description: "Name of the profile extension table's parent profile list.",
12
- type: 'string',
13
- required: true
14
- },
15
- userData: rsp_properties_1.userData,
16
- mapTemplateName: {
17
- label: 'Map Template Name',
18
- description: 'The Map Template in Responsys that can be used to map Field Names of the Profile List to Column Names.',
19
- type: 'string',
20
- default: ''
21
- },
22
- defaultPermissionStatus: {
23
- label: 'Default Permission Status',
24
- description: 'This value must be specified as either OPTIN or OPTOUT and would be applied to all of the records contained in the API call. If this value is not explicitly specified, then it is set to OPTOUT.',
25
- type: 'string',
26
- choices: [
27
- { label: 'Opt In', value: 'OPTIN' },
28
- { label: 'Opt Out', value: 'OPTOUT' }
29
- ],
30
- default: 'OPTOUT'
31
- },
32
- htmlValue: {
33
- label: 'Preferred Email Format',
34
- description: "Value of incoming preferred email format data. For example, 'H' may represent a preference for HTML formatted email.",
35
- type: 'string'
36
- },
37
- insertOnNoMatch: {
38
- label: 'Insert On No Match',
39
- description: 'Indicates what should be done for records where a match is not found.',
40
- type: 'boolean',
41
- default: true
42
- },
43
- matchColumnName1: {
44
- label: 'First Column Match',
45
- description: 'First match column for determining whether an insert or update should occur.',
46
- type: 'string',
47
- choices: [
48
- { label: 'RIID_', value: 'RIID_' },
49
- { label: 'CUSTOMER_ID_', value: 'CUSTOMER_ID_' },
50
- { label: 'EMAIL_ADDRESS_', value: 'EMAIL_ADDRESS_' },
51
- { label: 'MOBILE_NUMBER_', value: 'MOBILE_NUMBER_' },
52
- { label: 'EMAIL_MD5_HASH_', value: 'EMAIL_MD5_HASH_' },
53
- { label: 'EMAIL_SHA256_HASH_', value: 'EMAIL_SHA256_HASH_' }
54
- ]
55
- },
56
- matchColumnName2: {
57
- label: 'Second Column Match',
58
- description: 'Second match column for determining whether an insert or update should occur.',
59
- type: 'string',
60
- choices: [
61
- { label: 'RIID_', value: 'RIID_' },
62
- { label: 'CUSTOMER_ID_', value: 'CUSTOMER_ID_' },
63
- { label: 'EMAIL_ADDRESS_', value: 'EMAIL_ADDRESS_' },
64
- { label: 'MOBILE_NUMBER_', value: 'MOBILE_NUMBER_' },
65
- { label: 'EMAIL_MD5_HASH_', value: 'EMAIL_MD5_HASH_' },
66
- { label: 'EMAIL_SHA256_HASH_', value: 'EMAIL_SHA256_HASH_' }
67
- ]
68
- },
69
- matchOperator: {
70
- label: 'Match Operator',
71
- description: 'Operator to join match column names.',
72
- type: 'string',
73
- choices: [
74
- { label: 'None', value: 'NONE' },
75
- { label: 'And', value: 'AND' }
76
- ]
77
- },
78
- optinValue: {
79
- label: 'Optin Value',
80
- description: "Value of incoming opt-in status data that represents an opt-in status. For example, 'I' may represent an opt-in status.",
81
- type: 'string'
82
- },
83
- optoutValue: {
84
- label: 'Optout Value',
85
- description: "Value of incoming opt-out status data that represents an optout status. For example, '0' may represent an opt-out status.",
86
- type: 'string'
87
- },
88
- rejectRecordIfChannelEmpty: {
89
- label: 'Reject Record If Channel Empty',
90
- description: "String containing comma-separated channel codes that if specified will result in record rejection when the channel address field is null. Channel codes are 'E' (Email), 'M' (Mobile), 'P' (Postal Code). For example 'E,M' would indicate that a record that has a null for Email or Mobile Number value should be rejected. This parameter can also be set to null or to an empty string, which will cause the validation to not be performed for any channel, except if the matchColumnName1 parameter is set to EMAIL_ADDRESS_ or MOBILE_NUMBER_. When matchColumnName1 is set to EMAIL_ADDRESS_ or MOBILE_NUMBER_, then the null or empty string setting is effectively ignored for that channel.",
91
- type: 'string'
92
- },
93
- textValue: {
94
- label: 'Text Value',
95
- description: "Value of incoming preferred email format data. For example, 'T' may represent a preference for Text formatted email.",
96
- type: 'string'
97
- },
98
- updateOnMatch: {
99
- label: 'Update On Match',
100
- description: 'Controls how the existing record should be updated.',
101
- type: 'string',
102
- required: true,
103
- choices: [
104
- { label: 'Replace All', value: 'REPLACE_ALL' },
105
- { label: 'No Update', value: 'NO_UPDATE' }
106
- ]
107
- },
108
- enable_batching: rsp_properties_1.enable_batching,
109
- batch_size: rsp_properties_1.batch_size
110
- },
111
- perform: async (request, { settings, payload, auth }) => {
112
- if (payload && payload.profileListName) {
113
- const { profileListName, defaultPermissionStatus, htmlValue, insertOnNoMatch, matchColumnName1, matchColumnName2, matchOperator, optinValue, optoutValue, rejectRecordIfChannelEmpty, textValue, updateOnMatch, userData, mapTemplateName } = payload;
114
- const baseUrl = (settings.baseUrl?.startsWith('https://') ? settings.baseUrl : `https://${settings.baseUrl}`)?.replace(/\/$/, '');
115
- const endpoint = `${baseUrl}/rest/asyncApi/v1.3/lists/${profileListName}/members`;
116
- const recordData = rsp_operations_1.buildRecordData(userData, mapTemplateName ?? '');
117
- const requestBody = {
118
- recordData: recordData,
119
- mergeRule: {
120
- defaultPermissionStatus,
121
- htmlValue,
122
- insertOnNoMatch,
123
- matchColumnName1,
124
- matchColumnName2,
125
- matchOperator,
126
- optinValue,
127
- optoutValue,
128
- rejectRecordIfChannelEmpty,
129
- textValue,
130
- updateOnMatch
131
- }
132
- };
133
- const token = auth?.accessToken ?? '';
134
- const response = request(endpoint, {
135
- method: 'POST',
136
- headers: {
137
- Authorization: token,
138
- 'Content-Type': 'application/json'
139
- },
140
- body: JSON.stringify(requestBody)
141
- });
142
- return response;
143
- }
144
- },
145
- performBatch: async (request, { settings, payload }) => {
146
- const { profileListName, defaultPermissionStatus, htmlValue, insertOnNoMatch, matchColumnName1, matchColumnName2, matchOperator, optinValue, optoutValue, rejectRecordIfChannelEmpty, textValue, updateOnMatch, mapTemplateName } = payload[0];
147
- const payloadData = payload.map((obj) => obj.userData);
148
- const recordData = rsp_operations_1.buildRecordData(payloadData, mapTemplateName ?? '');
149
- const requestBody = {
150
- recordData: recordData,
151
- mergeRule: {
152
- defaultPermissionStatus,
153
- htmlValue,
154
- insertOnNoMatch,
155
- matchColumnName1,
156
- matchColumnName2,
157
- matchOperator,
158
- optinValue,
159
- optoutValue,
160
- rejectRecordIfChannelEmpty,
161
- textValue,
162
- updateOnMatch
163
- }
164
- };
165
- const baseUrl = (settings.baseUrl?.startsWith('https://') ? settings.baseUrl : `https://${settings.baseUrl}`)?.replace(/\/$/, '');
166
- const endpoint = `${baseUrl}/rest/asyncApi/v1.3/lists/${profileListName}/members`;
167
- return await request(endpoint, {
168
- method: 'POST',
169
- body: JSON.stringify(requestBody)
170
- });
171
- }
172
- };
173
- exports.default = action;
174
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/responsys/asyncMergeProfileListMembers/index.ts"],"names":[],"mappings":";;AAGA,sDAAyE;AAGzE,sDAAmD;AAEnD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kCAAkC;IACzC,WAAW,EAAE,6CAA6C;IAC1D,MAAM,EAAE;QACN,eAAe,EAAE;YACf,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,4DAA4D;YACzE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,QAAQ,EAAE,yBAAQ;QAClB,eAAe,EAAE;YACf,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACT,wGAAwG;YAC1G,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;SACZ;QACD,uBAAuB,EAAE;YACvB,KAAK,EAAE,2BAA2B;YAClC,WAAW,EACT,mMAAmM;YACrM,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;gBACnC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE;aACtC;YACD,OAAO,EAAE,QAAQ;SAClB;QACD,SAAS,EAAE;YACT,KAAK,EAAE,wBAAwB;YAC/B,WAAW,EACT,sHAAsH;YACxH,IAAI,EAAE,QAAQ;SACf;QACD,eAAe,EAAE;YACf,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,uEAAuE;YACpF,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,IAAI;SACd;QACD,gBAAgB,EAAE;YAChB,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,8EAA8E;YAC3F,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;gBAClC,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;gBAChD,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE;gBACpD,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE;gBACpD,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;gBACtD,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;aAC7D;SACF;QACD,gBAAgB,EAAE;YAChB,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,+EAA+E;YAC5F,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;gBAClC,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;gBAChD,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE;gBACpD,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE;gBACpD,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;gBACtD,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;aAC7D;SACF;QACD,aAAa,EAAE;YACb,KAAK,EAAE,gBAAgB;YACvB,WAAW,EAAE,sCAAsC;YACnD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;gBAChC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;aAC/B;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,aAAa;YACpB,WAAW,EACT,yHAAyH;YAC3H,IAAI,EAAE,QAAQ;SACf;QACD,WAAW,EAAE;YACX,KAAK,EAAE,cAAc;YACrB,WAAW,EACT,2HAA2H;YAC7H,IAAI,EAAE,QAAQ;SACf;QACD,0BAA0B,EAAE;YAC1B,KAAK,EAAE,gCAAgC;YACvC,WAAW,EACT,wqBAAwqB;YAC1qB,IAAI,EAAE,QAAQ;SACf;QACD,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,sHAAsH;YACxH,IAAI,EAAE,QAAQ;SACf;QACD,aAAa,EAAE;YACb,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,qDAAqD;YAClE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;gBAC9C,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;aAC3C;SACF;QACD,eAAe,EAAE,gCAAe;QAChC,UAAU,EAAE,2BAAU;KACvB;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;QAKtD,IAAI,OAAO,IAAI,OAAO,CAAC,eAAe,EAAE;YAEtC,MAAM,EACJ,eAAe,EACf,uBAAuB,EACvB,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,WAAW,EACX,0BAA0B,EAC1B,SAAS,EACT,aAAa,EACb,QAAQ,EACR,eAAe,EAChB,GAAG,OAAO,CAAA;YAIX,MAAM,OAAO,GAAG,CACd,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,QAAQ,CAAC,OAAO,EAAE,CAC5F,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;YACrB,MAAM,QAAQ,GAAG,GAAG,OAAO,6BAA6B,eAAe,UAAU,CAAA;YAGjF,MAAM,UAAU,GAAG,gCAAe,CAAC,QAAQ,EAAE,eAAe,IAAI,EAAE,CAAC,CAAA;YAEnE,MAAM,WAAW,GAAgB;gBAC/B,UAAU,EAAE,UAAwB;gBACpC,SAAS,EAAE;oBACT,uBAAuB;oBACvB,SAAS;oBACT,eAAe;oBACf,gBAAgB;oBAChB,gBAAgB;oBAChB,aAAa;oBACb,UAAU;oBACV,WAAW;oBACX,0BAA0B;oBAC1B,SAAS;oBACT,aAAa;iBACd;aACF,CAAA;YAGD,MAAM,KAAK,GAAG,IAAI,EAAE,WAAW,IAAI,EAAE,CAAA;YAIrC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,EAAE;gBACjC,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,aAAa,EAAE,KAAK;oBACpB,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;aAClC,CAAC,CAAA;YACF,OAAO,QAAQ,CAAA;SAIhB;IACH,CAAC;IAED,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAGrD,MAAM,EACJ,eAAe,EACf,uBAAuB,EACvB,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,WAAW,EACX,0BAA0B,EAC1B,SAAS,EACT,aAAa,EACb,eAAe,EAChB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;QACd,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QACtD,MAAM,UAAU,GAAG,gCAAe,CAAC,WAAW,EAAE,eAAe,IAAI,EAAE,CAAC,CAAA;QACtE,MAAM,WAAW,GAAgB;YAC/B,UAAU,EAAE,UAAwB;YACpC,SAAS,EAAE;gBACT,uBAAuB;gBACvB,SAAS;gBACT,eAAe;gBACf,gBAAgB;gBAChB,gBAAgB;gBAChB,aAAa;gBACb,UAAU;gBACV,WAAW;gBACX,0BAA0B;gBAC1B,SAAS;gBACT,aAAa;aACd;SACF,CAAA;QAKD,MAAM,OAAO,GAAG,CACd,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,QAAQ,CAAC,OAAO,EAAE,CAC5F,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QACrB,MAAM,QAAQ,GAAG,GAAG,OAAO,6BAA6B,eAAe,UAAU,CAAA;QAEjF,OAAO,MAAM,OAAO,CAAC,QAAQ,EAAE;YAC7B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;SAClC,CAAC,CAAA;IA0FJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,14 +0,0 @@
1
- import { Payload } from './asyncMergePetRecords/generated-types';
2
- import { DynamicData, RecordData } from './types';
3
- export declare const buildRecordData: (userData: DynamicData, mapTemplateName: string) => {
4
- records: unknown[][];
5
- fieldNames: string[];
6
- mapTemplateName: string;
7
- };
8
- export declare const buildRequestBodyPET: (payload: Payload, recordData: RecordData) => {
9
- recordData: RecordData;
10
- insertOnNoMatch: boolean | undefined;
11
- updateOnMatch: string;
12
- matchColumnName1: string;
13
- matchColumnName2: string;
14
- };
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildRequestBodyPET = exports.buildRecordData = void 0;
4
- const buildRecordData = (userData, mapTemplateName) => {
5
- if (Array.isArray(userData)) {
6
- const keysFromFirstObject = Object.keys(userData[0]);
7
- return {
8
- records: userData.map((record) => Object.values(record)),
9
- fieldNames: keysFromFirstObject,
10
- mapTemplateName: mapTemplateName || ''
11
- };
12
- }
13
- const keysFromFirstObject = Object.keys(userData);
14
- return {
15
- records: [Object.values(userData)],
16
- fieldNames: keysFromFirstObject,
17
- mapTemplateName: mapTemplateName || ''
18
- };
19
- };
20
- exports.buildRecordData = buildRecordData;
21
- const buildRequestBodyPET = (payload, recordData) => {
22
- const matchColumnName1 = payload.matchColumnName1 ? String(payload.matchColumnName1) : '';
23
- const matchColumnName2 = payload.matchColumnName2 ? String(payload.matchColumnName2) : '';
24
- return {
25
- recordData: recordData,
26
- insertOnNoMatch: payload.insertOnNoMatch,
27
- updateOnMatch: payload.updateOnMatch,
28
- matchColumnName1: matchColumnName1.replace(/_+$/, ''),
29
- matchColumnName2: matchColumnName2.replace(/_+$/, '')
30
- };
31
- };
32
- exports.buildRequestBodyPET = buildRequestBodyPET;
33
- //# sourceMappingURL=rsp-operations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rsp-operations.js","sourceRoot":"","sources":["../../../src/destinations/responsys/rsp-operations.ts"],"names":[],"mappings":";;;AAGO,MAAM,eAAe,GAAG,CAAC,QAAqB,EAAE,eAAuB,EAAE,EAAE;IAEhF,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;QAC3B,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;QACpD,OAAO;YACL,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACxD,UAAU,EAAE,mBAAmB;YAC/B,eAAe,EAAE,eAAe,IAAI,EAAE;SACvC,CAAA;KACF;IACD,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACjD,OAAO;QACL,OAAO,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAClC,UAAU,EAAE,mBAAmB;QAC/B,eAAe,EAAE,eAAe,IAAI,EAAE;KACvC,CAAA;AACH,CAAC,CAAA;AAhBY,QAAA,eAAe,mBAgB3B;AAUM,MAAM,mBAAmB,GAAG,CAAC,OAAgB,EAAE,UAAsB,EAAkB,EAAE;IAC9F,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACzF,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACzF,OAAO;QACL,UAAU,EAAE,UAAU;QACtB,eAAe,EAAE,OAAO,CAAC,eAAe;QACxC,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,gBAAgB,EAAE,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;QACrD,gBAAgB,EAAE,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;KACtD,CAAA;AACH,CAAC,CAAA;AAVY,QAAA,mBAAmB,uBAU/B"}
@@ -1,4 +0,0 @@
1
- import { InputField } from '@segment/actions-core/destination-kit/types';
2
- export declare const userData: InputField;
3
- export declare const enable_batching: InputField;
4
- export declare const batch_size: InputField;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.batch_size = exports.enable_batching = exports.userData = void 0;
4
- exports.userData = {
5
- label: 'Recepient Data',
6
- description: 'Record data that represents Field Names and corresponding values for the recipient.',
7
- type: 'object',
8
- defaultObjectUI: 'keyvalue:only',
9
- required: true,
10
- default: { '@path': '$.' }
11
- };
12
- exports.enable_batching = {
13
- label: 'Use Responsys Async API',
14
- description: 'Once enabled, Segment will collect events into batches of 200 before sending to Responsys.',
15
- type: 'boolean',
16
- default: true,
17
- unsafe_hidden: true
18
- };
19
- exports.batch_size = {
20
- label: 'Batch Size',
21
- description: 'Maximum number of events to include in each batch. Actual batch sizes may be lower.',
22
- type: 'number',
23
- required: false,
24
- unsafe_hidden: true,
25
- default: 200
26
- };
27
- //# sourceMappingURL=rsp-properties.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rsp-properties.js","sourceRoot":"","sources":["../../../src/destinations/responsys/rsp-properties.ts"],"names":[],"mappings":";;;AAGa,QAAA,QAAQ,GAAe;IAClC,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,qFAAqF;IAClG,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,eAAe;IAChC,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;CAC3B,CAAA;AAEY,QAAA,eAAe,GAAe;IACzC,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,4FAA4F;IACzG,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,IAAI;IACb,aAAa,EAAE,IAAI;CACpB,CAAA;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,qFAAqF;IAClG,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,aAAa,EAAE,IAAI;IACnB,OAAO,EAAE,GAAG;CACb,CAAA"}
@@ -1 +0,0 @@
1
- export declare const capiV2tests: () => void;
@@ -1,381 +0,0 @@
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
- exports.capiV2tests = void 0;
7
- const nock_1 = __importDefault(require("nock"));
8
- const actions_core_1 = require("@segment/actions-core");
9
- const index_1 = __importDefault(require("../index"));
10
- const testDestination = actions_core_1.createTestIntegration(index_1.default);
11
- const timestamp = '2022-05-12T15:21:15.449Z';
12
- const settings = {
13
- snap_app_id: 'test123',
14
- pixel_id: 'test123',
15
- app_id: 'test123'
16
- };
17
- const accessToken = 'test123';
18
- const refreshToken = 'test123';
19
- const testEvent = actions_core_1.createTestEvent({
20
- timestamp: timestamp,
21
- messageId: 'test-message-rv4t40s898k',
22
- event: 'PURCHASE',
23
- type: 'track',
24
- properties: {
25
- email: 'test123@gmail.com',
26
- phone: '+44 844 412 4653',
27
- event_tag: 'back-to-school',
28
- number_items: 10,
29
- revenue: '15',
30
- currency: 'USD',
31
- level: 3
32
- }
33
- });
34
- const conversionEventUrl = 'https://tr.snapchat.com/v2/conversion';
35
- const features = {
36
- ['actions-snap-api-migration-test-capiv3']: false,
37
- ['actions-snap-api-migration-use-capiv3']: false
38
- };
39
- const capiV2tests = () => describe('CAPIv2 Implementation', () => {
40
- it('should use products array over number_items, product_id and category fields', async () => {
41
- nock_1.default(conversionEventUrl).post('').reply(200, {});
42
- const event = actions_core_1.createTestEvent({
43
- ...testEvent,
44
- properties: {
45
- email: 'test123@gmail.com',
46
- phone: '+44 844 412 4653',
47
- event_tag: 'back-to-school',
48
- number_items: 10,
49
- price: '15',
50
- currency: 'USD',
51
- level: 3,
52
- products: [
53
- { product_id: '123', category: 'games', brand: 'Hasbro' },
54
- { product_id: '456', category: 'games', brand: 'Mattel' }
55
- ]
56
- },
57
- context: {}
58
- });
59
- const responses = await testDestination.testAction('reportConversionEvent', {
60
- event,
61
- settings,
62
- useDefaultMappings: true,
63
- auth: {
64
- accessToken,
65
- refreshToken
66
- },
67
- features,
68
- mapping: {
69
- event_type: 'PURCHASE',
70
- event_conversion_type: 'WEB'
71
- }
72
- });
73
- expect(responses).not.toBeNull();
74
- expect(responses[0].status).toBe(200);
75
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"integration\\":\\"segment\\",\\"event_type\\":\\"PURCHASE\\",\\"event_conversion_type\\":\\"WEB\\",\\"timestamp\\":1652368875449,\\"hashed_email\\":\\"cc779c04191c2e736d89e45c11339c8382832bcaf70383f7df94e3d08ba7a6d9\\",\\"hashed_phone_number\\":\\"dc008fda46e2e64002cf2f82a4906236282d431c4f75e5b60bfe79fc48546383\\",\\"item_category\\":\\"games;games\\",\\"brands\\":[\\"Hasbro\\",\\"Mattel\\"],\\"item_ids\\":\\"123;456\\",\\"currency\\":\\"USD\\",\\"pixel_id\\":\\"test123\\"}"`);
76
- });
77
- it('should handle a basic event', async () => {
78
- nock_1.default(conversionEventUrl).post('').reply(200, {});
79
- const event = actions_core_1.createTestEvent(testEvent);
80
- const responses = await testDestination.testAction('reportConversionEvent', {
81
- event,
82
- settings,
83
- useDefaultMappings: true,
84
- auth: {
85
- accessToken,
86
- refreshToken
87
- },
88
- features,
89
- mapping: {
90
- event_type: 'PURCHASE',
91
- event_conversion_type: 'WEB'
92
- }
93
- });
94
- expect(responses).not.toBeNull();
95
- expect(responses[0].status).toBe(200);
96
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"integration\\":\\"segment\\",\\"event_type\\":\\"PURCHASE\\",\\"event_conversion_type\\":\\"WEB\\",\\"timestamp\\":1652368875449,\\"hashed_email\\":\\"cc779c04191c2e736d89e45c11339c8382832bcaf70383f7df94e3d08ba7a6d9\\",\\"hashed_phone_number\\":\\"dc008fda46e2e64002cf2f82a4906236282d431c4f75e5b60bfe79fc48546383\\",\\"user_agent\\":\\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\\",\\"hashed_ip_address\\":\\"838c4c2573848f58e74332341a7ca6bc5cd86a8aec7d644137d53b4d597f10f5\\",\\"price\\":15,\\"currency\\":\\"USD\\",\\"page_url\\":\\"https://segment.com/academy/\\",\\"pixel_id\\":\\"test123\\"}"`);
97
- });
98
- it('should fail web event without pixel_id', async () => {
99
- nock_1.default(conversionEventUrl).post('').reply(400, {});
100
- const event = actions_core_1.createTestEvent(testEvent);
101
- await expect(testDestination.testAction('reportConversionEvent', {
102
- event,
103
- settings: {
104
- app_id: 'test123'
105
- },
106
- useDefaultMappings: true,
107
- auth: {
108
- accessToken,
109
- refreshToken
110
- },
111
- features,
112
- mapping: {
113
- event_type: 'PURCHASE',
114
- event_conversion_type: 'WEB'
115
- }
116
- })).rejects.toThrowError('If event conversion type is "WEB" then Pixel ID must be defined');
117
- });
118
- it('should fail web event without snap_app_id', async () => {
119
- nock_1.default(conversionEventUrl).post('').reply(400, {});
120
- const event = actions_core_1.createTestEvent(testEvent);
121
- await expect(testDestination.testAction('reportConversionEvent', {
122
- event,
123
- settings: {
124
- pixel_id: 'test123',
125
- app_id: 'test123'
126
- },
127
- useDefaultMappings: true,
128
- auth: {
129
- accessToken,
130
- refreshToken
131
- },
132
- features,
133
- mapping: {
134
- event_type: 'PURCHASE',
135
- event_conversion_type: 'MOBILE_APP'
136
- }
137
- })).rejects.toThrowError('If event conversion type is "MOBILE_APP" then Snap App ID and App ID must be defined');
138
- });
139
- it('should handle an offline event conversion type', async () => {
140
- nock_1.default(conversionEventUrl).post('').reply(200, {});
141
- const event = actions_core_1.createTestEvent(testEvent);
142
- const responses = await testDestination.testAction('reportConversionEvent', {
143
- event,
144
- settings,
145
- useDefaultMappings: true,
146
- auth: {
147
- accessToken,
148
- refreshToken
149
- },
150
- features,
151
- mapping: {
152
- event_type: 'SAVE',
153
- event_conversion_type: 'OFFLINE'
154
- }
155
- });
156
- expect(responses).not.toBeNull();
157
- expect(responses[0].status).toBe(200);
158
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"integration\\":\\"segment\\",\\"event_type\\":\\"SAVE\\",\\"event_conversion_type\\":\\"OFFLINE\\",\\"timestamp\\":1652368875449,\\"hashed_email\\":\\"cc779c04191c2e736d89e45c11339c8382832bcaf70383f7df94e3d08ba7a6d9\\",\\"hashed_phone_number\\":\\"dc008fda46e2e64002cf2f82a4906236282d431c4f75e5b60bfe79fc48546383\\",\\"user_agent\\":\\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\\",\\"hashed_ip_address\\":\\"838c4c2573848f58e74332341a7ca6bc5cd86a8aec7d644137d53b4d597f10f5\\",\\"price\\":15,\\"currency\\":\\"USD\\",\\"page_url\\":\\"https://segment.com/academy/\\",\\"pixel_id\\":\\"test123\\"}"`);
159
- });
160
- it('should handle a mobile app event conversion type', async () => {
161
- nock_1.default(conversionEventUrl).post('').reply(200, {});
162
- const event = actions_core_1.createTestEvent(testEvent);
163
- const responses = await testDestination.testAction('reportConversionEvent', {
164
- event,
165
- settings: {
166
- snap_app_id: '123',
167
- app_id: '123'
168
- },
169
- useDefaultMappings: true,
170
- auth: {
171
- accessToken,
172
- refreshToken
173
- },
174
- features,
175
- mapping: {
176
- event_type: 'SAVE',
177
- event_conversion_type: 'MOBILE_APP'
178
- }
179
- });
180
- expect(responses).not.toBeNull();
181
- expect(responses[0].status).toBe(200);
182
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"integration\\":\\"segment\\",\\"event_type\\":\\"SAVE\\",\\"event_conversion_type\\":\\"MOBILE_APP\\",\\"timestamp\\":1652368875449,\\"hashed_email\\":\\"cc779c04191c2e736d89e45c11339c8382832bcaf70383f7df94e3d08ba7a6d9\\",\\"hashed_phone_number\\":\\"dc008fda46e2e64002cf2f82a4906236282d431c4f75e5b60bfe79fc48546383\\",\\"user_agent\\":\\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\\",\\"hashed_ip_address\\":\\"838c4c2573848f58e74332341a7ca6bc5cd86a8aec7d644137d53b4d597f10f5\\",\\"price\\":15,\\"currency\\":\\"USD\\",\\"page_url\\":\\"https://segment.com/academy/\\",\\"snap_app_id\\":\\"123\\",\\"app_id\\":\\"123\\"}"`);
183
- });
184
- it('should fail invalid currency', async () => {
185
- nock_1.default(conversionEventUrl).post('').reply(400, {});
186
- const event = actions_core_1.createTestEvent({
187
- ...testEvent,
188
- properties: {
189
- currency: 'Galleon'
190
- }
191
- });
192
- await expect(testDestination.testAction('reportConversionEvent', {
193
- event,
194
- settings,
195
- useDefaultMappings: true,
196
- auth: {
197
- accessToken,
198
- refreshToken
199
- },
200
- features,
201
- mapping: {
202
- event_type: 'PURCHASE',
203
- event_conversion_type: 'WEB'
204
- }
205
- })).rejects.toThrowError('Galleon is not a valid currency code.');
206
- });
207
- it('should fail missing event conversion type', async () => {
208
- nock_1.default(conversionEventUrl).post('').reply(400, {});
209
- const event = actions_core_1.createTestEvent(testEvent);
210
- await expect(testDestination.testAction('reportConversionEvent', {
211
- event,
212
- settings,
213
- useDefaultMappings: true,
214
- auth: {
215
- accessToken,
216
- refreshToken
217
- },
218
- features,
219
- mapping: {
220
- event_type: 'PURCHASE'
221
- }
222
- })).rejects.toThrowError("The root value is missing the required field 'event_conversion_type'.");
223
- });
224
- it('should handle a custom event', async () => {
225
- nock_1.default(conversionEventUrl).post('').reply(200, {});
226
- const event = actions_core_1.createTestEvent({
227
- ...testEvent,
228
- event: 'CUSTOM_EVENT_5'
229
- });
230
- const responses = await testDestination.testAction('reportConversionEvent', {
231
- event,
232
- settings: {
233
- snap_app_id: '123',
234
- app_id: '123'
235
- },
236
- useDefaultMappings: true,
237
- auth: {
238
- accessToken,
239
- refreshToken
240
- },
241
- features,
242
- mapping: {
243
- event_type: { '@path': '$.event' },
244
- event_conversion_type: 'MOBILE_APP'
245
- }
246
- });
247
- expect(responses).not.toBeNull();
248
- expect(responses[0].status).toBe(200);
249
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"integration\\":\\"segment\\",\\"event_type\\":\\"CUSTOM_EVENT_5\\",\\"event_conversion_type\\":\\"MOBILE_APP\\",\\"timestamp\\":1652368875449,\\"hashed_email\\":\\"cc779c04191c2e736d89e45c11339c8382832bcaf70383f7df94e3d08ba7a6d9\\",\\"hashed_phone_number\\":\\"dc008fda46e2e64002cf2f82a4906236282d431c4f75e5b60bfe79fc48546383\\",\\"user_agent\\":\\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\\",\\"hashed_ip_address\\":\\"838c4c2573848f58e74332341a7ca6bc5cd86a8aec7d644137d53b4d597f10f5\\",\\"price\\":15,\\"currency\\":\\"USD\\",\\"page_url\\":\\"https://segment.com/academy/\\",\\"snap_app_id\\":\\"123\\",\\"app_id\\":\\"123\\"}"`);
250
- });
251
- it('should fail event missing all Snap identifiers', async () => {
252
- const event = actions_core_1.createTestEvent({
253
- ...testEvent,
254
- properties: {},
255
- context: {}
256
- });
257
- await expect(testDestination.testAction('reportConversionEvent', {
258
- event,
259
- settings,
260
- useDefaultMappings: true,
261
- auth: {
262
- accessToken,
263
- refreshToken
264
- },
265
- features,
266
- mapping: {
267
- event_type: 'PURCHASE',
268
- event_conversion_type: 'WEB'
269
- }
270
- })).rejects.toThrowError('Payload must contain values for Email or Phone Number or Mobile Ad Identifier or both IP Address and User Agent fields');
271
- });
272
- it('should handle event with email as only Snap identifier', async () => {
273
- nock_1.default(conversionEventUrl).post('').reply(200, {});
274
- const event = actions_core_1.createTestEvent({
275
- ...testEvent,
276
- properties: {
277
- email: 'test123@gmail.com'
278
- },
279
- context: {}
280
- });
281
- const responses = await testDestination.testAction('reportConversionEvent', {
282
- event,
283
- settings,
284
- useDefaultMappings: true,
285
- auth: {
286
- accessToken,
287
- refreshToken
288
- },
289
- features,
290
- mapping: {
291
- event_type: 'PURCHASE',
292
- event_conversion_type: 'WEB'
293
- }
294
- });
295
- expect(responses).not.toBeNull();
296
- expect(responses[0].status).toBe(200);
297
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"integration\\":\\"segment\\",\\"event_type\\":\\"PURCHASE\\",\\"event_conversion_type\\":\\"WEB\\",\\"timestamp\\":1652368875449,\\"hashed_email\\":\\"cc779c04191c2e736d89e45c11339c8382832bcaf70383f7df94e3d08ba7a6d9\\",\\"pixel_id\\":\\"test123\\"}"`);
298
- });
299
- it('should handle event with phone as only Snap identifier', async () => {
300
- nock_1.default(conversionEventUrl).post('').reply(200, {});
301
- const event = actions_core_1.createTestEvent({
302
- ...testEvent,
303
- properties: {
304
- phone: '+44 844 412 4653'
305
- },
306
- context: {}
307
- });
308
- const responses = await testDestination.testAction('reportConversionEvent', {
309
- event,
310
- settings,
311
- useDefaultMappings: true,
312
- auth: {
313
- accessToken,
314
- refreshToken
315
- },
316
- features,
317
- mapping: {
318
- event_type: 'PURCHASE',
319
- event_conversion_type: 'WEB'
320
- }
321
- });
322
- expect(responses).not.toBeNull();
323
- expect(responses[0].status).toBe(200);
324
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"integration\\":\\"segment\\",\\"event_type\\":\\"PURCHASE\\",\\"event_conversion_type\\":\\"WEB\\",\\"timestamp\\":1652368875449,\\"hashed_phone_number\\":\\"dc008fda46e2e64002cf2f82a4906236282d431c4f75e5b60bfe79fc48546383\\",\\"pixel_id\\":\\"test123\\"}"`);
325
- });
326
- it('should handle event with advertising_id as only Snap identifier', async () => {
327
- nock_1.default(conversionEventUrl).post('').reply(200, {});
328
- const event = actions_core_1.createTestEvent({
329
- ...testEvent,
330
- properties: {},
331
- context: {
332
- device: {
333
- advertisingId: '87a7def4-b6e9-4bf7-91b6-66372842007a'
334
- }
335
- }
336
- });
337
- const responses = await testDestination.testAction('reportConversionEvent', {
338
- event,
339
- settings,
340
- useDefaultMappings: true,
341
- auth: {
342
- accessToken,
343
- refreshToken
344
- },
345
- features,
346
- mapping: {
347
- event_type: 'PURCHASE',
348
- event_conversion_type: 'WEB'
349
- }
350
- });
351
- expect(responses).not.toBeNull();
352
- expect(responses[0].status).toBe(200);
353
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"integration\\":\\"segment\\",\\"event_type\\":\\"PURCHASE\\",\\"event_conversion_type\\":\\"WEB\\",\\"timestamp\\":1652368875449,\\"hashed_mobile_ad_id\\":\\"5af103f270fdc673b5e121ea929d1e47b2cee679e2059226a23c4cba37f8c9a9\\",\\"pixel_id\\":\\"test123\\"}"`);
354
- });
355
- it('should handle event with ip and user_agent as only Snap identifiers', async () => {
356
- nock_1.default(conversionEventUrl).post('').reply(200, {});
357
- const event = actions_core_1.createTestEvent({
358
- ...testEvent,
359
- properties: {}
360
- });
361
- const responses = await testDestination.testAction('reportConversionEvent', {
362
- event,
363
- settings,
364
- useDefaultMappings: true,
365
- auth: {
366
- accessToken,
367
- refreshToken
368
- },
369
- features,
370
- mapping: {
371
- event_type: 'PURCHASE',
372
- event_conversion_type: 'WEB'
373
- }
374
- });
375
- expect(responses).not.toBeNull();
376
- expect(responses[0].status).toBe(200);
377
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"integration\\":\\"segment\\",\\"event_type\\":\\"PURCHASE\\",\\"event_conversion_type\\":\\"WEB\\",\\"timestamp\\":1652368875449,\\"user_agent\\":\\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\\",\\"hashed_ip_address\\":\\"838c4c2573848f58e74332341a7ca6bc5cd86a8aec7d644137d53b4d597f10f5\\",\\"page_url\\":\\"https://segment.com/academy/\\",\\"pixel_id\\":\\"test123\\"}"`);
378
- });
379
- });
380
- exports.capiV2tests = capiV2tests;
381
- //# sourceMappingURL=capiV2tests.js.map