@segment/action-destinations 3.287.0-staging-899be5944 → 3.288.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 (334) hide show
  1. package/dist/destinations/{mappings-two-test → amazon-ads}/generated-types.d.ts +1 -1
  2. package/dist/destinations/amazon-ads/generated-types.js.map +1 -0
  3. package/dist/destinations/amazon-ads/index.d.ts +4 -0
  4. package/dist/destinations/amazon-ads/index.js +87 -0
  5. package/dist/destinations/amazon-ads/index.js.map +1 -0
  6. package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +2 -0
  7. package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +1 -0
  8. package/dist/destinations/amazon-ads/syncAudiences/index.js +15 -0
  9. package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -0
  10. package/dist/destinations/amazon-ads/types.d.ts +22 -0
  11. package/dist/destinations/amazon-ads/types.js +11 -0
  12. package/dist/destinations/amazon-ads/types.js.map +1 -0
  13. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
  14. package/dist/destinations/customerio/utils.d.ts +1 -1
  15. package/dist/destinations/display-video-360/listManagement.d.ts +9 -0
  16. package/dist/destinations/display-video-360/listManagement.js +16 -0
  17. package/dist/destinations/display-video-360/listManagement.js.map +1 -0
  18. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.d.ts +22 -0
  19. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +1 -0
  20. package/dist/destinations/dynamic-yield-audiences/types.d.ts +8 -0
  21. package/dist/destinations/dynamic-yield-audiences/types.js +12 -0
  22. package/dist/destinations/dynamic-yield-audiences/types.js.map +1 -0
  23. package/dist/destinations/engage/sendgrid/Profile.d.ts +6 -0
  24. package/dist/destinations/engage/sendgrid/Profile.js +3 -0
  25. package/dist/destinations/engage/sendgrid/Profile.js.map +1 -0
  26. package/dist/destinations/{mappings-two-test/index.d.ts → engage/sendgrid/destinationDefinition.d.ts} +1 -2
  27. package/dist/destinations/engage/sendgrid/destinationDefinition.js +70 -0
  28. package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +1 -0
  29. package/dist/destinations/engage/sendgrid/generated-types.d.ts +1 -0
  30. package/dist/destinations/engage/sendgrid/generated-types.js +14 -0
  31. package/dist/destinations/engage/sendgrid/generated-types.js.map +1 -0
  32. package/dist/destinations/engage/sendgrid/index.d.ts +2 -0
  33. package/dist/destinations/engage/sendgrid/index.js +5 -0
  34. package/dist/destinations/engage/sendgrid/index.js.map +1 -0
  35. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +4 -0
  36. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +28 -0
  37. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +1 -0
  38. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +21 -0
  39. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +174 -0
  40. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -0
  41. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +1 -0
  42. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +14 -0
  43. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +1 -0
  44. package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +1 -0
  45. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +14 -0
  46. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +1 -0
  47. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +44 -0
  48. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +418 -0
  49. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -0
  50. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +12 -0
  51. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +3 -0
  52. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +1 -0
  53. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +4 -0
  54. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +257 -0
  55. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +1 -0
  56. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +1 -0
  57. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +14 -0
  58. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +1 -0
  59. package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +1 -0
  60. package/dist/destinations/engage/sendgrid/sendEmail/index.js +14 -0
  61. package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +1 -0
  62. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +1 -0
  63. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +23 -0
  64. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +1 -0
  65. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +1 -0
  66. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +14 -0
  67. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +1 -0
  68. package/dist/destinations/engage/twilio/destinationDefinition.d.ts +3 -0
  69. package/dist/destinations/engage/twilio/destinationDefinition.js +172 -0
  70. package/dist/destinations/engage/twilio/destinationDefinition.js.map +1 -0
  71. package/dist/destinations/engage/twilio/generated-types.d.ts +1 -0
  72. package/dist/destinations/engage/twilio/generated-types.js +14 -0
  73. package/dist/destinations/engage/twilio/generated-types.js.map +1 -0
  74. package/dist/destinations/engage/twilio/index.d.ts +2 -0
  75. package/dist/destinations/engage/twilio/index.js +5 -0
  76. package/dist/destinations/engage/twilio/index.js.map +1 -0
  77. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +29 -0
  78. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +169 -0
  79. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +1 -0
  80. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +4 -0
  81. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +250 -0
  82. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +1 -0
  83. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +1 -0
  84. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +14 -0
  85. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +1 -0
  86. package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +1 -0
  87. package/dist/destinations/engage/twilio/sendMobilePush/index.js +14 -0
  88. package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +1 -0
  89. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +9 -0
  90. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +72 -0
  91. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -0
  92. package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +4 -0
  93. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +162 -0
  94. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +1 -0
  95. package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +1 -0
  96. package/dist/destinations/engage/twilio/sendSms/generated-types.js +14 -0
  97. package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +1 -0
  98. package/dist/destinations/engage/twilio/sendSms/index.d.ts +1 -0
  99. package/dist/destinations/engage/twilio/sendSms/index.js +14 -0
  100. package/dist/destinations/engage/twilio/sendSms/index.js.map +1 -0
  101. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +9 -0
  102. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +89 -0
  103. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +1 -0
  104. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +4 -0
  105. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +136 -0
  106. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +1 -0
  107. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +1 -0
  108. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +14 -0
  109. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +1 -0
  110. package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +1 -0
  111. package/dist/destinations/engage/twilio/sendWhatsApp/index.js +14 -0
  112. package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +1 -0
  113. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +16 -0
  114. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +71 -0
  115. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +1 -0
  116. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +16 -0
  117. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +115 -0
  118. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -0
  119. package/dist/destinations/engage/twilio/utils/index.d.ts +2 -0
  120. package/dist/destinations/engage/twilio/utils/index.js +15 -0
  121. package/dist/destinations/engage/twilio/utils/index.js.map +1 -0
  122. package/dist/destinations/engage/twilio/utils/types.d.ts +23 -0
  123. package/dist/destinations/engage/twilio/utils/types.js +3 -0
  124. package/dist/destinations/engage/twilio/utils/types.js.map +1 -0
  125. package/dist/destinations/engage/utils/AggregateError.d.ts +14 -0
  126. package/dist/destinations/engage/utils/AggregateError.js +26 -0
  127. package/dist/destinations/engage/utils/AggregateError.js.map +1 -0
  128. package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +42 -0
  129. package/dist/destinations/engage/utils/EngageActionPerformer.js +147 -0
  130. package/dist/destinations/engage/utils/EngageActionPerformer.js.map +1 -0
  131. package/dist/destinations/engage/utils/EngageLogger.d.ts +18 -0
  132. package/dist/destinations/engage/utils/EngageLogger.js +52 -0
  133. package/dist/destinations/engage/utils/EngageLogger.js.map +1 -0
  134. package/dist/destinations/engage/utils/EngageStats.d.ts +18 -0
  135. package/dist/destinations/engage/utils/EngageStats.js +95 -0
  136. package/dist/destinations/engage/utils/EngageStats.js.map +1 -0
  137. package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +12 -0
  138. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +31 -0
  139. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +1 -0
  140. package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +65 -0
  141. package/dist/destinations/engage/utils/MessageSendPerformer.js +211 -0
  142. package/dist/destinations/engage/utils/MessageSendPerformer.js.map +1 -0
  143. package/dist/destinations/engage/utils/Profile.d.ts +6 -0
  144. package/dist/destinations/engage/utils/Profile.js +3 -0
  145. package/dist/destinations/engage/utils/Profile.js.map +1 -0
  146. package/dist/destinations/engage/utils/ResponseError.d.ts +24 -0
  147. package/dist/destinations/engage/utils/ResponseError.js +22 -0
  148. package/dist/destinations/engage/utils/ResponseError.js.map +1 -0
  149. package/dist/destinations/engage/utils/apiLookups.d.ts +22 -0
  150. package/dist/destinations/engage/utils/apiLookups.js +189 -0
  151. package/dist/destinations/engage/utils/apiLookups.js.map +1 -0
  152. package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +2 -0
  153. package/dist/destinations/engage/utils/getProfileApiEndpoint.js +10 -0
  154. package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +1 -0
  155. package/dist/destinations/engage/utils/index.d.ts +9 -0
  156. package/dist/destinations/engage/utils/index.js +22 -0
  157. package/dist/destinations/engage/utils/index.js.map +1 -0
  158. package/dist/destinations/engage/utils/isDestinationActionService.d.ts +1 -0
  159. package/dist/destinations/engage/utils/isDestinationActionService.js +8 -0
  160. package/dist/destinations/engage/utils/isDestinationActionService.js.map +1 -0
  161. package/dist/destinations/engage/utils/isRetryableError.d.ts +2 -0
  162. package/dist/destinations/engage/utils/isRetryableError.js +33 -0
  163. package/dist/destinations/engage/utils/isRetryableError.js.map +1 -0
  164. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +1 -0
  165. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +3 -0
  166. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +1 -0
  167. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +46 -0
  168. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +46 -0
  169. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +1 -0
  170. package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +12 -0
  171. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +23 -0
  172. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +1 -0
  173. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +12 -0
  174. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +35 -0
  175. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +1 -0
  176. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +14 -0
  177. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +31 -0
  178. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +1 -0
  179. package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +31 -0
  180. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +104 -0
  181. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +1 -0
  182. package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +39 -0
  183. package/dist/destinations/engage/utils/operationTracking/OperationStats.js +130 -0
  184. package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +1 -0
  185. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +1 -0
  186. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +377 -0
  187. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +1 -0
  188. package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +23 -0
  189. package/dist/destinations/engage/utils/operationTracking/OperationTree.js +49 -0
  190. package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +1 -0
  191. package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +6 -0
  192. package/dist/destinations/engage/utils/operationTracking/TrackedError.js +3 -0
  193. package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +1 -0
  194. package/dist/destinations/engage/utils/operationTracking/index.d.ts +10 -0
  195. package/dist/destinations/engage/utils/operationTracking/index.js +23 -0
  196. package/dist/destinations/engage/utils/operationTracking/index.js.map +1 -0
  197. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +21 -0
  198. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +99 -0
  199. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +1 -0
  200. package/dist/destinations/engage/utils/testUtils.d.ts +6 -0
  201. package/dist/destinations/engage/utils/testUtils.js +26 -0
  202. package/dist/destinations/engage/utils/testUtils.js.map +1 -0
  203. package/dist/destinations/engage/utils/track.d.ts +52 -0
  204. package/dist/destinations/engage/utils/track.js +9 -0
  205. package/dist/destinations/engage/utils/track.js.map +1 -0
  206. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +16 -0
  207. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +3 -0
  208. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +1 -0
  209. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +56 -0
  210. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +3 -0
  211. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +1 -0
  212. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +39 -0
  213. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +3 -0
  214. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +1 -0
  215. package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +27 -0
  216. package/dist/destinations/engage-messaging-twilio/sendSms.types.js +3 -0
  217. package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +1 -0
  218. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +25 -0
  219. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +3 -0
  220. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +1 -0
  221. package/dist/destinations/index.js +0 -1
  222. package/dist/destinations/index.js.map +1 -1
  223. package/dist/destinations/klaviyo/orderCompleted/generated-types.d.ts +0 -9
  224. package/dist/destinations/klaviyo/orderCompleted/index.js +64 -166
  225. package/dist/destinations/klaviyo/orderCompleted/index.js.map +1 -1
  226. package/dist/destinations/klaviyo/trackEvent/index.js +1 -1
  227. package/dist/destinations/klaviyo/trackEvent/index.js.map +1 -1
  228. package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +22 -0
  229. package/dist/destinations/movable-ink/categoryView/generated-types.js +3 -0
  230. package/dist/destinations/movable-ink/categoryView/generated-types.js.map +1 -0
  231. package/dist/destinations/movable-ink/categoryView/index.d.ts +5 -0
  232. package/dist/destinations/movable-ink/categoryView/index.js +43 -0
  233. package/dist/destinations/movable-ink/categoryView/index.js.map +1 -0
  234. package/dist/destinations/movable-ink/conversion/generated-types.d.ts +20 -0
  235. package/dist/destinations/movable-ink/conversion/generated-types.js +3 -0
  236. package/dist/destinations/movable-ink/conversion/generated-types.js.map +1 -0
  237. package/dist/destinations/movable-ink/conversion/index.d.ts +5 -0
  238. package/dist/destinations/movable-ink/conversion/index.js +45 -0
  239. package/dist/destinations/movable-ink/conversion/index.js.map +1 -0
  240. package/dist/destinations/movable-ink/fields.d.ts +21 -0
  241. package/dist/destinations/movable-ink/fields.js +236 -0
  242. package/dist/destinations/movable-ink/fields.js.map +1 -0
  243. package/dist/destinations/movable-ink/identify/generated-types.d.ts +7 -0
  244. package/dist/destinations/movable-ink/identify/generated-types.js +3 -0
  245. package/dist/destinations/movable-ink/identify/generated-types.js.map +1 -0
  246. package/dist/destinations/movable-ink/identify/index.d.ts +5 -0
  247. package/dist/destinations/movable-ink/identify/index.js +32 -0
  248. package/dist/destinations/movable-ink/identify/index.js.map +1 -0
  249. package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +22 -0
  250. package/dist/destinations/movable-ink/productAdded/generated-types.js +3 -0
  251. package/dist/destinations/movable-ink/productAdded/generated-types.js.map +1 -0
  252. package/dist/destinations/movable-ink/productAdded/index.d.ts +5 -0
  253. package/dist/destinations/movable-ink/productAdded/index.js +43 -0
  254. package/dist/destinations/movable-ink/productAdded/index.js.map +1 -0
  255. package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +21 -0
  256. package/dist/destinations/movable-ink/productViewed/generated-types.js +3 -0
  257. package/dist/destinations/movable-ink/productViewed/generated-types.js.map +1 -0
  258. package/dist/destinations/movable-ink/productViewed/index.d.ts +5 -0
  259. package/dist/destinations/movable-ink/productViewed/index.js +43 -0
  260. package/dist/destinations/movable-ink/productViewed/index.js.map +1 -0
  261. package/dist/destinations/movable-ink/search/generated-types.d.ts +12 -0
  262. package/dist/destinations/movable-ink/search/generated-types.js +3 -0
  263. package/dist/destinations/movable-ink/search/generated-types.js.map +1 -0
  264. package/dist/destinations/movable-ink/search/index.d.ts +5 -0
  265. package/dist/destinations/movable-ink/search/index.js +43 -0
  266. package/dist/destinations/movable-ink/search/index.js.map +1 -0
  267. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +25 -0
  268. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +3 -0
  269. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +1 -0
  270. package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +5 -0
  271. package/dist/destinations/movable-ink/sendCustomEvent/index.js +48 -0
  272. package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +1 -0
  273. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +14 -0
  274. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js +3 -0
  275. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +1 -0
  276. package/dist/destinations/responsys/asyncMergePetRecords/index.d.ts +5 -0
  277. package/dist/destinations/responsys/asyncMergePetRecords/index.js +113 -0
  278. package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +1 -0
  279. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +20 -0
  280. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js +3 -0
  281. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +1 -0
  282. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.d.ts +5 -0
  283. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +174 -0
  284. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +1 -0
  285. package/dist/destinations/responsys/rsp-operations.d.ts +14 -0
  286. package/dist/destinations/responsys/rsp-operations.js +33 -0
  287. package/dist/destinations/responsys/rsp-operations.js.map +1 -0
  288. package/dist/destinations/responsys/rsp-properties.d.ts +4 -0
  289. package/dist/destinations/responsys/rsp-properties.js +27 -0
  290. package/dist/destinations/responsys/rsp-properties.js.map +1 -0
  291. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.d.ts +1 -0
  292. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js +381 -0
  293. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js.map +1 -0
  294. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.d.ts +1 -0
  295. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +581 -0
  296. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +1 -0
  297. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.d.ts +4 -0
  298. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js +97 -0
  299. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js.map +1 -0
  300. package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +30 -0
  301. package/dist/destinations/snap-conversions-api/snap-capi-properties.js +316 -0
  302. package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -0
  303. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -0
  304. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +34 -0
  305. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -0
  306. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +3 -0
  307. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +43 -0
  308. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +1 -0
  309. package/dist/destinations/trackey/group.types.d.ts +11 -0
  310. package/dist/destinations/trackey/group.types.js +3 -0
  311. package/dist/destinations/trackey/group.types.js.map +1 -0
  312. package/dist/destinations/trackey/identify.types.d.ts +11 -0
  313. package/dist/destinations/trackey/identify.types.js +3 -0
  314. package/dist/destinations/trackey/identify.types.js.map +1 -0
  315. package/dist/destinations/trackey/track.types.d.ts +12 -0
  316. package/dist/destinations/trackey/track.types.js +3 -0
  317. package/dist/destinations/trackey/track.types.js.map +1 -0
  318. package/package.json +4 -4
  319. package/dist/destinations/klaviyo/orderCompleted/formatters.d.ts +0 -26
  320. package/dist/destinations/klaviyo/orderCompleted/formatters.js +0 -62
  321. package/dist/destinations/klaviyo/orderCompleted/formatters.js.map +0 -1
  322. package/dist/destinations/klaviyo/orderCompleted/types.d.ts +0 -2
  323. package/dist/destinations/klaviyo/orderCompleted/types.js.map +0 -1
  324. package/dist/destinations/mappings-two-test/generated-types.js.map +0 -1
  325. package/dist/destinations/mappings-two-test/index.js +0 -30
  326. package/dist/destinations/mappings-two-test/index.js.map +0 -1
  327. package/dist/destinations/mappings-two-test/sendEvent/generated-types.d.ts +0 -6
  328. package/dist/destinations/mappings-two-test/sendEvent/generated-types.js.map +0 -1
  329. package/dist/destinations/mappings-two-test/sendEvent/index.js +0 -110
  330. package/dist/destinations/mappings-two-test/sendEvent/index.js.map +0 -1
  331. /package/dist/destinations/{mappings-two-test → amazon-ads}/generated-types.js +0 -0
  332. /package/dist/destinations/{mappings-two-test/sendEvent → amazon-ads/syncAudiences}/generated-types.js +0 -0
  333. /package/dist/destinations/{mappings-two-test/sendEvent → amazon-ads/syncAudiences}/index.d.ts +0 -0
  334. /package/dist/destinations/{klaviyo/orderCompleted → dynamic-yield-audiences/syncAudience}/types.js +0 -0
@@ -0,0 +1,418 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SendEmailPerformer = exports.Liquid = exports.EXTERNAL_ID_KEY = void 0;
13
+ const utils_1 = require("../../utils");
14
+ const liquidjs_1 = require("liquidjs");
15
+ const actions_core_1 = require("@segment/actions-core");
16
+ const apiLookups_1 = require("../../utils/apiLookups");
17
+ const insertEmailPreviewText_1 = require("./insertEmailPreviewText");
18
+ const cheerio_1 = __importDefault(require("cheerio"));
19
+ const isRestrictedDomain_1 = require("./isRestrictedDomain");
20
+ exports.EXTERNAL_ID_KEY = 'email';
21
+ exports.Liquid = new liquidjs_1.Liquid();
22
+ class SendEmailPerformer extends utils_1.MessageSendPerformer {
23
+ getIntegrationStatsName() {
24
+ return 'actions_personas_messaging_sendgrid';
25
+ }
26
+ getChannelType() {
27
+ return 'email';
28
+ }
29
+ getDefaultSettingsRegion() {
30
+ return 'us-west-2';
31
+ }
32
+ isSupportedExternalId(externalId) {
33
+ return externalId.type === 'email';
34
+ }
35
+ isExternalIdSubscribed(extId) {
36
+ const bypass_subscription = this.payload.byPassSubscription !== undefined && this.payload.byPassSubscription;
37
+ if (bypass_subscription) {
38
+ this.currentOperation?.logs.push('Bypassing subscription');
39
+ this.currentOperation?.tags.push('bypass_subscription:' + true);
40
+ return true;
41
+ }
42
+ const isSubscribed = super.isExternalIdSubscribed(extId);
43
+ if (!isSubscribed)
44
+ return isSubscribed;
45
+ if (!this.payload.groupId)
46
+ return isSubscribed;
47
+ const recepientGroup = extId.groups?.find((g) => g.id === this.payload.groupId);
48
+ if (!recepientGroup) {
49
+ this.statsClient.incr('group_notfound', 1);
50
+ return false;
51
+ }
52
+ if (!recepientGroup.isSubscribed) {
53
+ this.statsClient.incr('group_notsubscribed', 1);
54
+ return false;
55
+ }
56
+ return true;
57
+ }
58
+ getRecepients() {
59
+ if (this.payload.toEmail) {
60
+ const externalIdContext = this.payload?.externalIds && this.payload?.externalIds[0];
61
+ return [
62
+ {
63
+ id: this.payload.toEmail,
64
+ type: 'email',
65
+ subscriptionStatus: externalIdContext?.subscriptionStatus,
66
+ unsubscribeLink: externalIdContext?.unsubscribeLink,
67
+ preferencesLink: externalIdContext?.preferencesLink,
68
+ groups: externalIdContext?.groups
69
+ }
70
+ ];
71
+ }
72
+ const res = super.getRecepients();
73
+ if (res.length > 0)
74
+ return [res[0]];
75
+ return res;
76
+ }
77
+ async parseTemplating(content, liquidData, contentType) {
78
+ const traits = liquidData.profile.traits ? { ...liquidData.profile.traits } : liquidData.profile.traits;
79
+ if (traits) {
80
+ for (const trait of Object.keys(traits)) {
81
+ if (traits && traits[trait] && (traits[trait] === '<nil>' || traits[trait].toString().trim() === '')) {
82
+ traits[trait] = '';
83
+ }
84
+ }
85
+ }
86
+ const parsedContent = content == null
87
+ ? content
88
+ : await exports.Liquid.parseAndRender(content, { ...liquidData, profile: { ...liquidData.profile, traits } });
89
+ this.logOnError(() => 'Content type: ' + contentType);
90
+ return parsedContent;
91
+ }
92
+ async sendToRecepient(emailProfile) {
93
+ const traits = await this.getProfileTraits();
94
+ const profile = {
95
+ email: emailProfile?.id,
96
+ traits
97
+ };
98
+ const toEmail = profile.email;
99
+ if (!toEmail) {
100
+ return;
101
+ }
102
+ if (isRestrictedDomain_1.isRestrictedDomain(toEmail)) {
103
+ this.tags.push('reason:restricted_domain');
104
+ throw new actions_core_1.IntegrationError('Emails with gmailx.com, yahoox.com, aolx.com, and hotmailx.com domains are blocked.', 'Invalid input', 400);
105
+ }
106
+ const bcc = JSON.parse(this.payload.bcc ?? '[]');
107
+ const [parsedFromEmail, parsedFromName, parsedFromReplyToEmail, parsedFromReplyToName, parsedSubject] = await Promise.all([
108
+ this.parseTemplating(this.payload.fromEmail, { profile }, 'FromEmail'),
109
+ this.parseTemplating(this.payload.fromName, { profile }, 'FromName'),
110
+ this.parseTemplating(this.payload.replyToEmail, { profile }, 'ReplyToEmail'),
111
+ this.parseTemplating(this.payload.replyToName, { profile }, 'ReplyToName'),
112
+ this.parseTemplating(this.payload.subject, { profile }, 'Subject')
113
+ ]);
114
+ let apiLookupData = {};
115
+ if (this.isFeatureActive(apiLookups_1.FLAGON_NAME_DATA_FEEDS)) {
116
+ try {
117
+ apiLookupData = await this.performApiLookups(this.payload.apiLookups, profile);
118
+ }
119
+ catch (error) {
120
+ this.tags.push('reason:data_feed_failure');
121
+ throw error;
122
+ }
123
+ }
124
+ const parsedBodyHtml = await this.getBodyHtml(profile, apiLookupData, emailProfile);
125
+ const mailContentSubscriptionHonored = {
126
+ personalizations: [
127
+ {
128
+ to: [
129
+ {
130
+ email: toEmail
131
+ }
132
+ ],
133
+ bcc: bcc.length > 0 ? bcc : undefined,
134
+ custom_args: {
135
+ ...this.payload.customArgs,
136
+ source_id: this.settings.sourceId,
137
+ space_id: this.settings.spaceId,
138
+ user_id: this.payload.userId ?? undefined,
139
+ __segment_internal_external_id_key__: exports.EXTERNAL_ID_KEY,
140
+ __segment_internal_external_id_value__: profile[exports.EXTERNAL_ID_KEY]
141
+ }
142
+ }
143
+ ],
144
+ from: {
145
+ email: parsedFromEmail,
146
+ name: parsedFromName
147
+ },
148
+ reply_to: {
149
+ email: parsedFromReplyToEmail,
150
+ name: parsedFromReplyToName
151
+ },
152
+ subject: parsedSubject,
153
+ content: [
154
+ {
155
+ type: 'text/html',
156
+ value: parsedBodyHtml
157
+ }
158
+ ],
159
+ tracking_settings: {
160
+ subscription_tracking: {
161
+ enable: true,
162
+ substitution_tag: '[unsubscribe]'
163
+ }
164
+ }
165
+ };
166
+ let mailContent;
167
+ let unsubscribeLink;
168
+ if (this.payload.groupId) {
169
+ const group = emailProfile.groups?.find((grp) => grp.id === this.payload.groupId);
170
+ unsubscribeLink = group?.groupUnsubscribeLink ?? '';
171
+ }
172
+ else {
173
+ unsubscribeLink = emailProfile?.unsubscribeLink;
174
+ }
175
+ if (unsubscribeLink) {
176
+ mailContent = {
177
+ ...mailContentSubscriptionHonored,
178
+ headers: {
179
+ 'List-Unsubscribe-Post': 'List-Unsubscribe=One-Click',
180
+ 'List-Unsubscribe': '<' + unsubscribeLink + '>'
181
+ }
182
+ };
183
+ mailContent.tracking_settings.subscription_tracking.enable = false;
184
+ this.statsClient?.incr('request.list_unsubscribe__header_added', 1);
185
+ }
186
+ else {
187
+ mailContent = mailContentSubscriptionHonored;
188
+ }
189
+ if (this.payload.byPassSubscription) {
190
+ mailContent = {
191
+ ...mailContent,
192
+ mail_settings: {
193
+ bypass_list_management: {
194
+ enable: true
195
+ }
196
+ }
197
+ };
198
+ this.statsClient?.incr('request.by_pass_subscription', 1);
199
+ }
200
+ else {
201
+ this.statsClient?.incr('request.dont_pass_subscription', 1);
202
+ }
203
+ if (this.payload.ipPool) {
204
+ mailContent = {
205
+ ...mailContent,
206
+ ip_pool_name: this.payload.ipPool
207
+ };
208
+ this.statsClient?.incr('request.ip_pool_name_provided', 1);
209
+ }
210
+ else {
211
+ this.statsClient?.incr('request.ip_pool_name_not_provided', 1);
212
+ }
213
+ const req = {
214
+ method: 'post',
215
+ headers: {
216
+ authorization: `Bearer ${this.settings.sendGridApiKey}`
217
+ },
218
+ json: mailContent
219
+ };
220
+ this.statsClient?.set('message_body_size', JSON.stringify(req).length);
221
+ const response = await this.request('https://api.sendgrid.com/v3/mail/send', req);
222
+ if (this.payload?.eventOccurredTS != undefined) {
223
+ this.statsClient?.histogram('eventDeliveryTS', Date.now() - new Date(this.payload?.eventOccurredTS).getTime(), this.tags);
224
+ }
225
+ return response;
226
+ }
227
+ async getBodyTemplateFromS3(bodyUrl) {
228
+ const { content } = await this.request(bodyUrl, { method: 'GET', skipResponseCloning: true });
229
+ return content;
230
+ }
231
+ async getBodyHtml(profile, apiLookupData, emailProfile) {
232
+ let parsedBodyHtml;
233
+ if (this.payload.bodyUrl && this.settings.unlayerApiKey) {
234
+ const body = await this.getBodyTemplateFromS3(this.payload.bodyUrl);
235
+ const bodyHtml = this.payload.bodyType === 'html' ? body : await this.generateEmailHtml(body);
236
+ parsedBodyHtml = await this.parseTemplating(bodyHtml, { profile, [apiLookups_1.apiLookupLiquidKey]: apiLookupData }, 'Body');
237
+ }
238
+ else {
239
+ parsedBodyHtml = await this.parseTemplating(this.payload.bodyHtml ?? '', { profile, [apiLookups_1.apiLookupLiquidKey]: apiLookupData }, 'Body HTML');
240
+ }
241
+ if (this.payload.previewText) {
242
+ try {
243
+ const parsedPreviewText = await this.parseTemplating(this.payload.previewText, { profile }, 'Preview text');
244
+ parsedBodyHtml = insertEmailPreviewText_1.insertEmailPreviewText(parsedBodyHtml, parsedPreviewText);
245
+ }
246
+ catch (ex) {
247
+ this.logger?.error('Error inserting preview text, using original html', {
248
+ ex
249
+ });
250
+ this.statsClient.incr('insert_preview_fail', 1);
251
+ }
252
+ }
253
+ parsedBodyHtml = this.insertUnsubscribeLinks(parsedBodyHtml, emailProfile);
254
+ return parsedBodyHtml;
255
+ }
256
+ async generateEmailHtml(design) {
257
+ this.statsClient.incr('unlayer_request', 1);
258
+ const response = await this.request('https://api.unlayer.com/v2/export/html', {
259
+ method: 'POST',
260
+ headers: {
261
+ authorization: `Basic ${Buffer.from(`${this.settings.unlayerApiKey}:`).toString('base64')}`,
262
+ 'content-type': 'application/json'
263
+ },
264
+ body: JSON.stringify({
265
+ displayMode: 'email',
266
+ design: JSON.parse(design)
267
+ })
268
+ });
269
+ const body = await response.json();
270
+ return body.data.html;
271
+ }
272
+ async performApiLookups(apiLookups, profile) {
273
+ if (!apiLookups) {
274
+ return {};
275
+ }
276
+ const request = this.request.bind(this);
277
+ const data = await Promise.all(apiLookups.map(async (apiLookup) => {
278
+ const data = await apiLookups_1.performApiLookup(request, apiLookup, profile, this.statsClient.statsClient, this.tags, this.settings, this.logger.loggerClient, this.dataFeedCache);
279
+ return { name: apiLookup.name, data };
280
+ }));
281
+ return data.reduce((acc, { name, data }) => {
282
+ acc[name] = data;
283
+ return acc;
284
+ }, {});
285
+ }
286
+ validateLinkAndLog(link) {
287
+ let workspaceId = this.payload.customArgs && this.payload.customArgs['workspace_id'];
288
+ let audienceId = this.payload.customArgs &&
289
+ (this.payload.customArgs['audience_id'] || this.payload.customArgs['__segment_internal_audience_id__']);
290
+ workspaceId = JSON.stringify(workspaceId);
291
+ audienceId = JSON.stringify(audienceId);
292
+ this.logger.info(`Validating the link: ${link} ${workspaceId} ${audienceId}`);
293
+ const parsedLink = new URL(link);
294
+ const checkParam = (paramName) => {
295
+ const paramValue = parsedLink.searchParams.get(paramName);
296
+ if (!paramValue || paramValue === '') {
297
+ this.logger.error(`${paramName} is missing: ${link} ${workspaceId} ${audienceId}`);
298
+ this.statsClient.incr('missing_query_param', 1, [`param:${paramName}`, `audienceId:${audienceId}`]);
299
+ }
300
+ };
301
+ const requiredParams = ['contactId', 'data', 'code', 'spaceId', 'workspaceId', 'messageId', 'user-agent'];
302
+ requiredParams.forEach((param) => checkParam(param));
303
+ }
304
+ insertUnsubscribeLinks(html, emailProfile) {
305
+ const spaceId = this.settings.spaceId;
306
+ const groupId = this.payload.groupId;
307
+ const globalUnsubscribeLink = emailProfile?.unsubscribeLink;
308
+ const preferencesLink = emailProfile?.preferencesLink;
309
+ const unsubscribeLinkRef = 'a[href*="[upa_unsubscribe_link]"]';
310
+ const preferencesLinkRef = 'a[href*="[upa_preferences_link]"]';
311
+ const sendgridUnsubscribeLinkRef = 'a[href*="[unsubscribe]"]';
312
+ const sendgridUnsubscribeLinkTag = '[unsubscribe]';
313
+ const $ = cheerio_1.default.load(html);
314
+ const _this = this;
315
+ let hasSendgridSubstitutionTag = false;
316
+ $(sendgridUnsubscribeLinkRef).each(function () {
317
+ emailProfile.unsubscribeLink = '';
318
+ emailProfile.preferencesLink = '';
319
+ if (groupId) {
320
+ const group = emailProfile.groups?.find((grp) => grp.id === groupId);
321
+ if (group) {
322
+ group.groupUnsubscribeLink = '';
323
+ }
324
+ }
325
+ hasSendgridSubstitutionTag = true;
326
+ });
327
+ if (hasSendgridSubstitutionTag) {
328
+ return $.html();
329
+ }
330
+ if (groupId) {
331
+ const group = emailProfile.groups?.find((grp) => grp.id === groupId);
332
+ const groupUnsubscribeLink = group?.groupUnsubscribeLink;
333
+ $(unsubscribeLinkRef).each(function () {
334
+ if (!groupUnsubscribeLink) {
335
+ _this.logger.info(`Group Unsubscribe link missing`);
336
+ _this.statsClient.incr('group_unsubscribe_link_missing', 1);
337
+ $(this).attr('href', sendgridUnsubscribeLinkTag);
338
+ }
339
+ else {
340
+ _this.validateLinkAndLog(groupUnsubscribeLink);
341
+ $(this).removeAttr('href');
342
+ $(this).attr('clicktracking', 'off').attr('href', groupUnsubscribeLink);
343
+ _this.logger?.info(`Group Unsubscribe link replaced`);
344
+ _this.statsClient?.incr('replaced_group_unsubscribe_link', 1);
345
+ }
346
+ });
347
+ }
348
+ else {
349
+ $(unsubscribeLinkRef).each(function () {
350
+ if (!globalUnsubscribeLink) {
351
+ _this.logger?.info(`Global Unsubscribe link missing`);
352
+ _this.statsClient?.incr('global_unsubscribe_link_missing', 1);
353
+ $(this).attr('href', sendgridUnsubscribeLinkTag);
354
+ }
355
+ else {
356
+ _this.validateLinkAndLog(globalUnsubscribeLink);
357
+ $(this).removeAttr('href');
358
+ $(this).attr('clicktracking', 'off').attr('href', globalUnsubscribeLink);
359
+ _this.logger?.info(`Global Unsubscribe link replaced`);
360
+ _this.statsClient?.incr('replaced_global_unsubscribe_link', 1);
361
+ }
362
+ });
363
+ }
364
+ $(preferencesLinkRef).each(function () {
365
+ if (!preferencesLink) {
366
+ $(this.parent?.children).each(function () {
367
+ if ($(this).text() == ' | ') {
368
+ $(this).remove();
369
+ }
370
+ });
371
+ $(this).remove();
372
+ _this.logger?.info(`Preferences link removed from the html body - ${spaceId}`);
373
+ _this.statsClient?.incr('removed_preferences_link', 1);
374
+ }
375
+ else {
376
+ _this.validateLinkAndLog(preferencesLink);
377
+ $(this).removeAttr('href');
378
+ $(this).attr('clicktracking', 'off').attr('href', preferencesLink);
379
+ _this.logger?.info(`Preferences link replaced - ${spaceId}`);
380
+ _this.statsClient?.incr('replaced_preferences_link', 1);
381
+ }
382
+ });
383
+ return $.html();
384
+ }
385
+ onResponse(args) {
386
+ const headers = args.response?.headers || args.error?.response?.headers;
387
+ const sgMsgId = headers?.get('X-Message-ID');
388
+ if (sgMsgId)
389
+ args.operation.logs.push('[sendgrid]X-Message-ID: ' + sgMsgId);
390
+ }
391
+ }
392
+ __decorate([
393
+ utils_1.track({
394
+ wrapIntegrationError: () => [`Unable to parse templating in email`, `templating parse failure`, 400]
395
+ })
396
+ ], SendEmailPerformer.prototype, "parseTemplating", null);
397
+ __decorate([
398
+ utils_1.track()
399
+ ], SendEmailPerformer.prototype, "getBodyTemplateFromS3", null);
400
+ __decorate([
401
+ utils_1.track()
402
+ ], SendEmailPerformer.prototype, "getBodyHtml", null);
403
+ __decorate([
404
+ utils_1.track({
405
+ wrapIntegrationError: () => ['Unable to export email as HTML', 'Export HTML failure', 400]
406
+ })
407
+ ], SendEmailPerformer.prototype, "generateEmailHtml", null);
408
+ __decorate([
409
+ utils_1.track()
410
+ ], SendEmailPerformer.prototype, "performApiLookups", null);
411
+ __decorate([
412
+ utils_1.track()
413
+ ], SendEmailPerformer.prototype, "validateLinkAndLog", null);
414
+ __decorate([
415
+ utils_1.track()
416
+ ], SendEmailPerformer.prototype, "insertUnsubscribeLinks", null);
417
+ exports.SendEmailPerformer = SendEmailPerformer;
418
+ //# sourceMappingURL=SendEmailPerformer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendEmailPerformer.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAiG;AAIjG,uCAA6C;AAC7C,wDAAwE;AACxE,uDAAsH;AACtH,qEAAiE;AACjE,sDAA6B;AAC7B,6DAAyD;AAG5C,QAAA,eAAe,GAAG,OAAO,CAAA;AAEzB,QAAA,MAAM,GAAG,IAAI,iBAAQ,EAAE,CAAA;AAEpC,MAAa,kBAAmB,SAAQ,4BAAuC;IAC7E,uBAAuB;QACrB,OAAO,qCAAqC,CAAA;IAC9C,CAAC;IAED,cAAc;QACZ,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,wBAAwB;QACtB,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,qBAAqB,CAAC,UAA0B;QAC9C,OAAO,UAAU,CAAC,IAAI,KAAK,OAAO,CAAA;IACpC,CAAC;IAED,sBAAsB,CAAC,KAAqB;QAC1C,MAAM,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,KAAK,SAAS,IAAI,IAAI,CA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AkFP;AAldH,gDA0dC"}
@@ -0,0 +1,12 @@
1
+ export interface UnlayerResponse {
2
+ success: boolean;
3
+ data: {
4
+ html: string;
5
+ chunks: {
6
+ css: string;
7
+ js: string;
8
+ fonts: string[];
9
+ body: string;
10
+ };
11
+ };
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=UnlayerResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnlayerResponse.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/sendgrid/sendEmail/UnlayerResponse.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ export declare const actionDefinition: ActionDefinition<Settings, Payload>;