@segment/action-destinations 3.295.0 → 3.296.0-staging-b963b9484

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 (311) hide show
  1. package/dist/destinations/amazon-ads/generated-types.d.ts +3 -0
  2. package/dist/destinations/amazon-ads/generated-types.js +3 -0
  3. package/dist/destinations/amazon-ads/generated-types.js.map +1 -0
  4. package/dist/destinations/amazon-ads/index.d.ts +4 -0
  5. package/dist/destinations/amazon-ads/index.js +87 -0
  6. package/dist/destinations/amazon-ads/index.js.map +1 -0
  7. package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +2 -0
  8. package/dist/destinations/amazon-ads/syncAudiences/generated-types.js +3 -0
  9. package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +1 -0
  10. package/dist/destinations/amazon-ads/syncAudiences/index.d.ts +5 -0
  11. package/dist/destinations/amazon-ads/syncAudiences/index.js +15 -0
  12. package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -0
  13. package/dist/destinations/amazon-ads/types.d.ts +22 -0
  14. package/dist/destinations/amazon-ads/types.js +11 -0
  15. package/dist/destinations/amazon-ads/types.js.map +1 -0
  16. package/dist/destinations/amazon-ads/utils.d.ts +25 -0
  17. package/dist/destinations/amazon-ads/utils.js +8 -0
  18. package/dist/destinations/amazon-ads/utils.js.map +1 -0
  19. package/dist/destinations/aws-s3/index.js +4 -3
  20. package/dist/destinations/aws-s3/index.js.map +1 -1
  21. package/dist/destinations/aws-s3/operations.js +48 -13
  22. package/dist/destinations/aws-s3/operations.js.map +1 -1
  23. package/dist/destinations/aws-s3/syncAudienceToCSV/index.js +1 -1
  24. package/dist/destinations/aws-s3/syncAudienceToCSV/index.js.map +1 -1
  25. package/dist/destinations/aws-s3/syncAudienceToCSV/s3.d.ts +1 -1
  26. package/dist/destinations/aws-s3/syncAudienceToCSV/s3.js +8 -3
  27. package/dist/destinations/aws-s3/syncAudienceToCSV/s3.js.map +1 -1
  28. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
  29. package/dist/destinations/contentstack/constants.d.ts +3 -0
  30. package/dist/destinations/contentstack/constants.js +7 -0
  31. package/dist/destinations/contentstack/constants.js.map +1 -0
  32. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.d.ts +22 -0
  33. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js +3 -0
  34. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +1 -0
  35. package/dist/destinations/dynamic-yield-audiences/types.d.ts +8 -0
  36. package/dist/destinations/dynamic-yield-audiences/types.js +12 -0
  37. package/dist/destinations/dynamic-yield-audiences/types.js.map +1 -0
  38. package/dist/destinations/engage/sendgrid/Profile.d.ts +6 -0
  39. package/dist/destinations/engage/sendgrid/Profile.js +3 -0
  40. package/dist/destinations/engage/sendgrid/Profile.js.map +1 -0
  41. package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +3 -0
  42. package/dist/destinations/engage/sendgrid/destinationDefinition.js +70 -0
  43. package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +1 -0
  44. package/dist/destinations/engage/sendgrid/generated-types.d.ts +1 -0
  45. package/dist/destinations/engage/sendgrid/generated-types.js +14 -0
  46. package/dist/destinations/engage/sendgrid/generated-types.js.map +1 -0
  47. package/dist/destinations/engage/sendgrid/index.d.ts +2 -0
  48. package/dist/destinations/engage/sendgrid/index.js +5 -0
  49. package/dist/destinations/engage/sendgrid/index.js.map +1 -0
  50. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +4 -0
  51. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +28 -0
  52. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +1 -0
  53. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +21 -0
  54. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +174 -0
  55. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -0
  56. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +1 -0
  57. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +14 -0
  58. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +1 -0
  59. package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +1 -0
  60. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +14 -0
  61. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +1 -0
  62. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +44 -0
  63. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +419 -0
  64. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -0
  65. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +12 -0
  66. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +3 -0
  67. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +1 -0
  68. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +4 -0
  69. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +257 -0
  70. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +1 -0
  71. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +1 -0
  72. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +14 -0
  73. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +1 -0
  74. package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +1 -0
  75. package/dist/destinations/engage/sendgrid/sendEmail/index.js +14 -0
  76. package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +1 -0
  77. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +1 -0
  78. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +23 -0
  79. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +1 -0
  80. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +1 -0
  81. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +14 -0
  82. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +1 -0
  83. package/dist/destinations/engage/twilio/destinationDefinition.d.ts +3 -0
  84. package/dist/destinations/engage/twilio/destinationDefinition.js +172 -0
  85. package/dist/destinations/engage/twilio/destinationDefinition.js.map +1 -0
  86. package/dist/destinations/engage/twilio/generated-types.d.ts +1 -0
  87. package/dist/destinations/engage/twilio/generated-types.js +14 -0
  88. package/dist/destinations/engage/twilio/generated-types.js.map +1 -0
  89. package/dist/destinations/engage/twilio/index.d.ts +2 -0
  90. package/dist/destinations/engage/twilio/index.js +5 -0
  91. package/dist/destinations/engage/twilio/index.js.map +1 -0
  92. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +28 -0
  93. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +151 -0
  94. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +1 -0
  95. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +4 -0
  96. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +250 -0
  97. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +1 -0
  98. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +1 -0
  99. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +14 -0
  100. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +1 -0
  101. package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +1 -0
  102. package/dist/destinations/engage/twilio/sendMobilePush/index.js +14 -0
  103. package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +1 -0
  104. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +9 -0
  105. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +72 -0
  106. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -0
  107. package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +4 -0
  108. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +162 -0
  109. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +1 -0
  110. package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +1 -0
  111. package/dist/destinations/engage/twilio/sendSms/generated-types.js +14 -0
  112. package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +1 -0
  113. package/dist/destinations/engage/twilio/sendSms/index.d.ts +1 -0
  114. package/dist/destinations/engage/twilio/sendSms/index.js +14 -0
  115. package/dist/destinations/engage/twilio/sendSms/index.js.map +1 -0
  116. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +9 -0
  117. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +89 -0
  118. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +1 -0
  119. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +4 -0
  120. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +136 -0
  121. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +1 -0
  122. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +1 -0
  123. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +14 -0
  124. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +1 -0
  125. package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +1 -0
  126. package/dist/destinations/engage/twilio/sendWhatsApp/index.js +14 -0
  127. package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +1 -0
  128. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +16 -0
  129. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +71 -0
  130. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +1 -0
  131. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +16 -0
  132. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +115 -0
  133. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -0
  134. package/dist/destinations/engage/twilio/utils/index.d.ts +2 -0
  135. package/dist/destinations/engage/twilio/utils/index.js +15 -0
  136. package/dist/destinations/engage/twilio/utils/index.js.map +1 -0
  137. package/dist/destinations/engage/twilio/utils/types.d.ts +23 -0
  138. package/dist/destinations/engage/twilio/utils/types.js +3 -0
  139. package/dist/destinations/engage/twilio/utils/types.js.map +1 -0
  140. package/dist/destinations/engage/utils/AggregateError.d.ts +14 -0
  141. package/dist/destinations/engage/utils/AggregateError.js +26 -0
  142. package/dist/destinations/engage/utils/AggregateError.js.map +1 -0
  143. package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +42 -0
  144. package/dist/destinations/engage/utils/EngageActionPerformer.js +148 -0
  145. package/dist/destinations/engage/utils/EngageActionPerformer.js.map +1 -0
  146. package/dist/destinations/engage/utils/EngageLogger.d.ts +18 -0
  147. package/dist/destinations/engage/utils/EngageLogger.js +52 -0
  148. package/dist/destinations/engage/utils/EngageLogger.js.map +1 -0
  149. package/dist/destinations/engage/utils/EngageStats.d.ts +18 -0
  150. package/dist/destinations/engage/utils/EngageStats.js +95 -0
  151. package/dist/destinations/engage/utils/EngageStats.js.map +1 -0
  152. package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +12 -0
  153. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +31 -0
  154. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +1 -0
  155. package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +65 -0
  156. package/dist/destinations/engage/utils/MessageSendPerformer.js +211 -0
  157. package/dist/destinations/engage/utils/MessageSendPerformer.js.map +1 -0
  158. package/dist/destinations/engage/utils/Profile.d.ts +6 -0
  159. package/dist/destinations/engage/utils/Profile.js +3 -0
  160. package/dist/destinations/engage/utils/Profile.js.map +1 -0
  161. package/dist/destinations/engage/utils/ResponseError.d.ts +25 -0
  162. package/dist/destinations/engage/utils/ResponseError.js +22 -0
  163. package/dist/destinations/engage/utils/ResponseError.js.map +1 -0
  164. package/dist/destinations/engage/utils/apiLookups.d.ts +22 -0
  165. package/dist/destinations/engage/utils/apiLookups.js +189 -0
  166. package/dist/destinations/engage/utils/apiLookups.js.map +1 -0
  167. package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +2 -0
  168. package/dist/destinations/engage/utils/getProfileApiEndpoint.js +10 -0
  169. package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +1 -0
  170. package/dist/destinations/engage/utils/index.d.ts +9 -0
  171. package/dist/destinations/engage/utils/index.js +22 -0
  172. package/dist/destinations/engage/utils/index.js.map +1 -0
  173. package/dist/destinations/engage/utils/isDestinationActionService.d.ts +1 -0
  174. package/dist/destinations/engage/utils/isDestinationActionService.js +8 -0
  175. package/dist/destinations/engage/utils/isDestinationActionService.js.map +1 -0
  176. package/dist/destinations/engage/utils/isRetryableError.d.ts +2 -0
  177. package/dist/destinations/engage/utils/isRetryableError.js +33 -0
  178. package/dist/destinations/engage/utils/isRetryableError.js.map +1 -0
  179. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +1 -0
  180. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +3 -0
  181. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +1 -0
  182. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +46 -0
  183. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +46 -0
  184. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +1 -0
  185. package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +12 -0
  186. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +23 -0
  187. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +1 -0
  188. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +12 -0
  189. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +35 -0
  190. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +1 -0
  191. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +14 -0
  192. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +31 -0
  193. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +1 -0
  194. package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +31 -0
  195. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +104 -0
  196. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +1 -0
  197. package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +39 -0
  198. package/dist/destinations/engage/utils/operationTracking/OperationStats.js +130 -0
  199. package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +1 -0
  200. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +1 -0
  201. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +377 -0
  202. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +1 -0
  203. package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +23 -0
  204. package/dist/destinations/engage/utils/operationTracking/OperationTree.js +49 -0
  205. package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +1 -0
  206. package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +6 -0
  207. package/dist/destinations/engage/utils/operationTracking/TrackedError.js +3 -0
  208. package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +1 -0
  209. package/dist/destinations/engage/utils/operationTracking/index.d.ts +10 -0
  210. package/dist/destinations/engage/utils/operationTracking/index.js +23 -0
  211. package/dist/destinations/engage/utils/operationTracking/index.js.map +1 -0
  212. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +21 -0
  213. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +99 -0
  214. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +1 -0
  215. package/dist/destinations/engage/utils/testUtils.d.ts +6 -0
  216. package/dist/destinations/engage/utils/testUtils.js +26 -0
  217. package/dist/destinations/engage/utils/testUtils.js.map +1 -0
  218. package/dist/destinations/engage/utils/track.d.ts +52 -0
  219. package/dist/destinations/engage/utils/track.js +9 -0
  220. package/dist/destinations/engage/utils/track.js.map +1 -0
  221. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +16 -0
  222. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +3 -0
  223. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +1 -0
  224. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +56 -0
  225. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +3 -0
  226. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +1 -0
  227. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +39 -0
  228. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +3 -0
  229. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +1 -0
  230. package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +27 -0
  231. package/dist/destinations/engage-messaging-twilio/sendSms.types.js +3 -0
  232. package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +1 -0
  233. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +25 -0
  234. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +3 -0
  235. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +1 -0
  236. package/dist/destinations/facebook-custom-audiences/fbca-operations.d.ts +32 -0
  237. package/dist/destinations/facebook-custom-audiences/fbca-operations.js +50 -0
  238. package/dist/destinations/facebook-custom-audiences/fbca-operations.js.map +1 -0
  239. package/dist/destinations/facebook-custom-audiences/fbca-properties.d.ts +2 -0
  240. package/dist/destinations/facebook-custom-audiences/fbca-properties.js +10 -0
  241. package/dist/destinations/facebook-custom-audiences/fbca-properties.js.map +1 -0
  242. package/dist/destinations/facebook-custom-audiences/generated-types.d.ts +2 -2
  243. package/dist/destinations/facebook-custom-audiences/index.js +6 -16
  244. package/dist/destinations/facebook-custom-audiences/index.js.map +1 -1
  245. package/dist/destinations/facebook-custom-audiences/sync/generated-types.d.ts +15 -0
  246. package/dist/destinations/facebook-custom-audiences/sync/generated-types.js +3 -0
  247. package/dist/destinations/facebook-custom-audiences/sync/generated-types.js.map +1 -0
  248. package/dist/destinations/facebook-custom-audiences/sync/index.d.ts +5 -0
  249. package/dist/destinations/facebook-custom-audiences/sync/index.js +139 -0
  250. package/dist/destinations/facebook-custom-audiences/sync/index.js.map +1 -0
  251. package/dist/destinations/google-enhanced-conversions/userList/generated-types.d.ts +31 -0
  252. package/dist/destinations/google-enhanced-conversions/userList/generated-types.js +3 -0
  253. package/dist/destinations/google-enhanced-conversions/userList/generated-types.js.map +1 -0
  254. package/dist/destinations/google-enhanced-conversions/userList/index.d.ts +5 -0
  255. package/dist/destinations/google-enhanced-conversions/userList/index.js +280 -0
  256. package/dist/destinations/google-enhanced-conversions/userList/index.js.map +1 -0
  257. package/dist/destinations/mappings-two-test/generated-types.d.ts +3 -0
  258. package/dist/destinations/mappings-two-test/generated-types.js +3 -0
  259. package/dist/destinations/mappings-two-test/generated-types.js.map +1 -0
  260. package/dist/destinations/mappings-two-test/index.d.ts +4 -0
  261. package/dist/destinations/mappings-two-test/index.js +32 -0
  262. package/dist/destinations/mappings-two-test/index.js.map +1 -0
  263. package/dist/destinations/mappings-two-test/kitchenSink/generated-types.d.ts +53 -0
  264. package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js +3 -0
  265. package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js.map +1 -0
  266. package/dist/destinations/mappings-two-test/kitchenSink/index.d.ts +5 -0
  267. package/dist/destinations/mappings-two-test/kitchenSink/index.js +289 -0
  268. package/dist/destinations/mappings-two-test/kitchenSink/index.js.map +1 -0
  269. package/dist/destinations/mappings-two-test/sendEvent/generated-types.d.ts +17 -0
  270. package/dist/destinations/mappings-two-test/sendEvent/generated-types.js +3 -0
  271. package/dist/destinations/mappings-two-test/sendEvent/generated-types.js.map +1 -0
  272. package/dist/destinations/mappings-two-test/sendEvent/index.d.ts +5 -0
  273. package/dist/destinations/mappings-two-test/sendEvent/index.js +343 -0
  274. package/dist/destinations/mappings-two-test/sendEvent/index.js.map +1 -0
  275. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +14 -0
  276. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js +3 -0
  277. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +1 -0
  278. package/dist/destinations/responsys/asyncMergePetRecords/index.d.ts +5 -0
  279. package/dist/destinations/responsys/asyncMergePetRecords/index.js +113 -0
  280. package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +1 -0
  281. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +20 -0
  282. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js +3 -0
  283. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +1 -0
  284. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.d.ts +5 -0
  285. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +174 -0
  286. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +1 -0
  287. package/dist/destinations/responsys/rsp-operations.d.ts +14 -0
  288. package/dist/destinations/responsys/rsp-operations.js +33 -0
  289. package/dist/destinations/responsys/rsp-operations.js.map +1 -0
  290. package/dist/destinations/responsys/rsp-properties.d.ts +4 -0
  291. package/dist/destinations/responsys/rsp-properties.js +27 -0
  292. package/dist/destinations/responsys/rsp-properties.js.map +1 -0
  293. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.d.ts +1 -0
  294. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js +381 -0
  295. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js.map +1 -0
  296. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.d.ts +1 -0
  297. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +581 -0
  298. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +1 -0
  299. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.d.ts +4 -0
  300. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js +97 -0
  301. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js.map +1 -0
  302. package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +30 -0
  303. package/dist/destinations/snap-conversions-api/snap-capi-properties.js +316 -0
  304. package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -0
  305. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -0
  306. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +34 -0
  307. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -0
  308. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +3 -0
  309. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +43 -0
  310. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +1 -0
  311. package/package.json +4 -4
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.FACEBOOK_API_VERSION = void 0;
7
7
  const actions_core_1 = require("@segment/actions-core");
8
- const add_1 = __importDefault(require("./add"));
9
- const remove_1 = __importDefault(require("./remove"));
8
+ const fbca_properties_1 = require("./fbca-properties");
9
+ const sync_1 = __importDefault(require("./sync"));
10
10
  exports.FACEBOOK_API_VERSION = 'v17.0';
11
11
  const EXTERNAL_ID_KEY = 'id';
12
12
  const destination = {
@@ -17,11 +17,7 @@ const destination = {
17
17
  authentication: {
18
18
  scheme: 'oauth2',
19
19
  fields: {
20
- placeholder: {
21
- label: 'Placeholder',
22
- description: 'Placeholder',
23
- type: 'string'
24
- }
20
+ retlAdAccountId: fbca_properties_1.adAccountId
25
21
  },
26
22
  refreshAccessToken: async () => {
27
23
  return { accessToken: 'TODO: Implement this' };
@@ -35,12 +31,7 @@ const destination = {
35
31
  };
36
32
  },
37
33
  audienceFields: {
38
- adAccountId: {
39
- type: 'string',
40
- label: 'Advertiser Account ID',
41
- description: 'Your advertiser account id. Read [more](https://www.facebook.com/business/help/1492627900875762).',
42
- required: true
43
- },
34
+ engageAdAccountId: fbca_properties_1.adAccountId,
44
35
  audienceDescription: {
45
36
  type: 'string',
46
37
  label: 'Description',
@@ -55,7 +46,7 @@ const destination = {
55
46
  },
56
47
  async createAudience(request, createAudienceInput) {
57
48
  const audienceName = createAudienceInput.audienceName;
58
- const adAccountId = createAudienceInput.audienceSettings?.adAccountId;
49
+ const adAccountId = createAudienceInput.audienceSettings?.engageAdAccountId;
59
50
  const audienceDescription = createAudienceInput.audienceSettings?.audienceDescription;
60
51
  if (!audienceName) {
61
52
  throw new actions_core_1.IntegrationError('Missing audience name value', 'MISSING_REQUIRED_FIELD', 400);
@@ -101,8 +92,7 @@ const destination = {
101
92
  }
102
93
  },
103
94
  actions: {
104
- add: add_1.default,
105
- remove: remove_1.default
95
+ sync: sync_1.default
106
96
  }
107
97
  };
108
98
  exports.default = destination;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/facebook-custom-audiences/index.ts"],"names":[],"mappings":";;;;;;AACA,wDAAwD;AAGxD,gDAAuB;AAEvB,sDAA6B;AAEhB,QAAA,oBAAoB,GAAG,OAAO,CAAA;AAC3C,MAAM,eAAe,GAAG,IAAI,CAAA;AAE5B,MAAM,WAAW,GAA8D;IAC7E,IAAI,EAAE,qCAAqC;IAC3C,IAAI,EAAE,mCAAmC;IACzC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,4CAA4C;IAEzD,cAAc,E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AE,kBAAkB,EAAE,GAAG,CAAC,CAAA;aAC9E;YAED,OAAO;gBACL,UAAU,EAAE,CAAC,CAAC,eAAe,CAAC;aAC/B,CAAA;QACH,CAAC;KACF;IACD,OAAO,EAAE;QACP,GAAG,EAAH,aAAG;QACH,MAAM,EAAN,gBAAM;KACP;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/facebook-custom-audiences/index.ts"],"names":[],"mappings":";;;;;;AACA,wDAAwD;AAExD,uDAA+C;AAC/C,kDAAyB;AAEZ,QAAA,oBAAoB,GAAG,OAAO,CAAA;AAC3C,MAAM,eAAe,GAAG,IAAI,CAAA;AAE5B,MAAM,WAAW,GAA8D;IAC7E,IAAI,EAAE,qCAAqC;IAC3C,IAAI,EAAE,mCAAmC;IACzC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,4CAA4C;IAEzD,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,eAAe,EAAE,6BAAW;SAC7B;QACD,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAA;QAChD,CAAC;KACF;IACD,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;SACF,CAAA;IACH,CAAC;IACD,cAAc,EAAE;QACd,iBAAiB,EAAE,6BAAW;QAC9B,mBAAmB,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;SACf;KACF;IACD,cAAc,EAAE;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,kBAAkB,EAAE,KAAK;SAC1B;QACD,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB;YAC/C,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EAAE,CAAA;YAE1G,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAA;YAEjE,MAAM,CAAC,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;YAC/B,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,EAAE;gBACvB,MAAM,IAAI,+BAAgB,CAAC,4CAA4C,EAAE,kBAAkB,EAAE,GAAG,CAAC,CAAA;aAClG;YAED,IAAI,gBAAgB,CAAC,UAAU,KAAK,CAAC,CAAC,eAAe,CAAC,EAAE;gBACtD,MAAM,IAAI,+BAAgB,CAAC,wBAAwB,EAAE,kBAAkB,EAAE,GAAG,CAAC,CAAA;aAC9E;YAED,OAAO;gBACL,UAAU,EAAE,CAAC,CAAC,eAAe,CAAC;aAC/B,CAAA;QACH,CAAC;KACF;IACD,OAAO,EAAE;QACP,IAAI,EAAJ,cAAI;KACL;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,15 @@
1
+ export interface Payload {
2
+ }
3
+ export interface HookBundle {
4
+ retlOnMappingSave: {
5
+ inputs?: {
6
+ operation?: string;
7
+ audienceName?: string;
8
+ existingAudienceId?: string;
9
+ };
10
+ outputs?: {
11
+ audienceName: string;
12
+ audienceId: string;
13
+ };
14
+ };
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-custom-audiences/sync/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const fbca_operations_1 = __importDefault(require("../fbca-operations"));
7
+ const action = {
8
+ title: 'Sync Audience',
9
+ description: 'Sync data to Facebook Custom Audiences.',
10
+ fields: {},
11
+ hooks: {
12
+ retlOnMappingSave: {
13
+ label: 'Select or create an audience in Facebook',
14
+ description: 'When saving this mapping, Segment will either create a new audience in Facebook or connect to an existing one. To create a new audience, enter the name of the audience. To connect to an existing audience, select the audience ID from the dropdown.',
15
+ inputFields: {
16
+ operation: {
17
+ type: 'string',
18
+ label: 'Create a new custom audience or connect to an existing one?',
19
+ description: 'Choose to either create a new custom audience or use an existing one. If you opt to create a new audience, we will display the required fields for audience creation. If you opt to use an existing audience, a drop-down menu will appear, allowing you to select from all the custom audiences in your ad account.',
20
+ choices: [
21
+ { label: 'Create New Audience', value: 'create' },
22
+ { label: 'Connect to Existing Audience', value: 'existing' }
23
+ ],
24
+ default: 'create'
25
+ },
26
+ audienceName: {
27
+ type: 'string',
28
+ label: 'Audience Creation Name',
29
+ description: 'The name of the audience in Facebook.',
30
+ default: 'TODO: Model Name by default',
31
+ depends_on: {
32
+ conditions: [
33
+ {
34
+ fieldKey: 'operation',
35
+ operator: 'is',
36
+ value: 'create'
37
+ }
38
+ ]
39
+ }
40
+ },
41
+ existingAudienceId: {
42
+ type: 'string',
43
+ label: 'Existing Audience ID',
44
+ description: 'The ID of the audience in Facebook.',
45
+ depends_on: {
46
+ conditions: [
47
+ {
48
+ fieldKey: 'operation',
49
+ operator: 'is',
50
+ value: 'existing'
51
+ }
52
+ ]
53
+ },
54
+ dynamic: async (request, { settings }) => {
55
+ const fbClient = new fbca_operations_1.default(request, settings.retlAdAccountId);
56
+ const { choices, error } = await fbClient.getAllAudiences();
57
+ if (error) {
58
+ return { error, choices: [] };
59
+ }
60
+ return {
61
+ choices
62
+ };
63
+ }
64
+ }
65
+ },
66
+ outputTypes: {
67
+ audienceName: {
68
+ type: 'string',
69
+ label: 'Audience Name',
70
+ description: 'The name of the audience in Facebook this mapping is connected to.',
71
+ required: true
72
+ },
73
+ audienceId: {
74
+ type: 'string',
75
+ label: 'Audience ID',
76
+ description: 'The ID of the audience in Facebook.',
77
+ required: true
78
+ }
79
+ },
80
+ performHook: async (request, { settings, hookInputs }) => {
81
+ const fbClient = new fbca_operations_1.default(request, settings.retlAdAccountId);
82
+ if (hookInputs.operation === 'create' && !hookInputs.audienceName) {
83
+ return {
84
+ error: {
85
+ message: 'Missing audience name value',
86
+ code: 'MISSING_REQUIRED_FIELD'
87
+ }
88
+ };
89
+ }
90
+ if (hookInputs.operation === 'existing' && !hookInputs.existingAudienceId) {
91
+ return {
92
+ error: {
93
+ message: 'Missing audience ID value',
94
+ code: 'MISSING_REQUIRED_FIELD'
95
+ }
96
+ };
97
+ }
98
+ if (hookInputs.operation === 'existing' && hookInputs.existingAudienceId) {
99
+ const { data, error } = await fbClient.getSingleAudience(hookInputs.existingAudienceId);
100
+ if (error) {
101
+ return {
102
+ error: {
103
+ message: error.error.message,
104
+ code: error.error.type
105
+ }
106
+ };
107
+ }
108
+ return {
109
+ successMessage: `Connected to audience with ID: ${hookInputs.existingAudienceId}`,
110
+ savedData: {
111
+ audienceId: hookInputs.existingAudienceId,
112
+ audienceName: data?.name
113
+ }
114
+ };
115
+ }
116
+ if (hookInputs.operation === 'create' && hookInputs.audienceName) {
117
+ const { data } = await fbClient.createAudience(hookInputs.audienceName);
118
+ return {
119
+ successMessage: `Audience created with ID: ${data.id}`,
120
+ savedData: {
121
+ audienceId: data.id,
122
+ audienceName: hookInputs.audienceName
123
+ }
124
+ };
125
+ }
126
+ return {
127
+ error: {
128
+ message: 'Invalid operation',
129
+ code: 'INVALID_OPERATION'
130
+ }
131
+ };
132
+ }
133
+ }
134
+ },
135
+ perform: (_request, _data) => {
136
+ }
137
+ };
138
+ exports.default = action;
139
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-custom-audiences/sync/index.ts"],"names":[],"mappings":";;;;;AAGA,yEAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,yCAAyC;IACtD,MAAM,EAAE,EAAE;IACV,KAAK,EAAE;QACL,iBAAiB,EAAE;YACjB,KAAK,EAAE,0CAA0C;YACjD,WAAW,EACT,wPAAwP;YAC1P,WAAW,EAAE;gBACX,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,6DAA6D;oBACpE,WAAW,EACT,sTAAsT;oBACxT,OAAO,EAAE;wBACP,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,QAAQ,EAAE;wBACjD,EAAE,KAAK,EAAE,8BAA8B,EAAE,KAAK,EAAE,UAAU,EAAE;qBAC7D;oBACD,OAAO,EAAE,QAAQ;iBAClB;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,wBAAwB;oBAC/B,WAAW,EAAE,uCAAuC;oBACpD,OAAO,EAAE,6BAA6B;oBACtC,UAAU,EAAE;wBACV,UAAU,EAAE;4BACV;gCACE,QAAQ,EAAE,WAAW;gCACrB,QAAQ,EAAE,IAAI;gCACd,KAAK,EAAE,QAAQ;6BAChB;yBACF;qBACF;iBACF;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,sBAAsB;oBAC7B,WAAW,EAAE,qCAAqC;oBAClD,UAAU,EAAE;wBACV,UAAU,EAAE;4BACV;gCACE,QAAQ,EAAE,WAAW;gCACrB,QAAQ,EAAE,IAAI;gCACd,KAAK,EAAE,UAAU;6BAClB;yBACF;qBACF;oBACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;wBACvC,MAAM,QAAQ,GAAG,IAA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AAI,EAAE,KAAK,EAAE,GAAG,MAAM,QAAQ,CAAC,iBAAiB,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAA;oBAEvF,IAAI,KAAK,EAAE;wBACT,OAAO;4BACL,KAAK,EAAE;gCACL,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO;gCAC5B,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI;6BACvB;yBACF,CAAA;qBACF;oBAED,OAAO;wBACL,cAAc,EAAE,kCAAkC,UAAU,CAAC,kBAAkB,EAAE;wBACjF,SAAS,EAAE;4BACT,UAAU,EAAE,UAAU,CAAC,kBAAkB;4BACzC,YAAY,EAAE,IAAI,EAAE,IAAI;yBACzB;qBACF,CAAA;iBACF;gBAED,IAAI,UAAU,CAAC,SAAS,KAAK,QAAQ,IAAI,UAAU,CAAC,YAAY,EAAE;oBAChE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,YAAY,CAAC,CAAA;oBAEvE,OAAO;wBACL,cAAc,EAAE,6BAA6B,IAAI,CAAC,EAAE,EAAE;wBACtD,SAAS,EAAE;4BACT,UAAU,EAAE,IAAI,CAAC,EAAE;4BACnB,YAAY,EAAE,UAAU,CAAC,YAAY;yBACtC;qBACF,CAAA;iBACF;gBAED,OAAO;oBACL,KAAK,EAAE;wBACL,OAAO,EAAE,mBAAmB;wBAC5B,IAAI,EAAE,mBAAmB;qBAC1B;iBACF,CAAA;YACH,CAAC;SACF;KACF;IACD,OAAO,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE;IAM7B,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,31 @@
1
+ export interface Payload {
2
+ first_name?: string;
3
+ last_name?: string;
4
+ email?: string;
5
+ phone?: string;
6
+ country_code?: string;
7
+ postal_code?: string;
8
+ crm_id?: string;
9
+ mobile_advertising_id?: string;
10
+ ad_user_data_consent_state: string;
11
+ ad_personalization_consent_state: string;
12
+ external_audience_id?: string;
13
+ enable_batching?: boolean;
14
+ event_name: string;
15
+ }
16
+ export interface HookBundle {
17
+ retlOnMappingSave: {
18
+ inputs?: {
19
+ list_id?: string;
20
+ list_name?: string;
21
+ external_id_type?: string;
22
+ app_id?: string;
23
+ };
24
+ outputs?: {
25
+ id?: string;
26
+ name?: string;
27
+ external_id_type?: string;
28
+ app_id?: string;
29
+ };
30
+ };
31
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/google-enhanced-conversions/userList/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,280 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const functions_1 = require("../functions");
4
+ const action = {
5
+ title: 'Customer Match User List',
6
+ description: 'Sync a Segment Engage Audience into a Google Customer Match User List.',
7
+ defaultSubscription: 'event = "Audience Entered" or event = "Audience Exited"',
8
+ syncMode: {
9
+ description: 'Define how the records will be synced from RETL to Google',
10
+ label: 'How to sync records',
11
+ default: 'add',
12
+ choices: [
13
+ { label: 'Adds users to the connected Google Customer Match User List', value: 'add' },
14
+ { label: 'Remove users from the connected Google Customer Match User List', value: 'delete' }
15
+ ]
16
+ },
17
+ fields: {
18
+ first_name: {
19
+ label: 'First Name',
20
+ description: "The user's first name.",
21
+ type: 'string',
22
+ default: {
23
+ '@if': {
24
+ exists: { '@path': '$.context.traits.firstName' },
25
+ then: { '@path': '$.context.traits.firstName' },
26
+ else: { '@path': '$.properties.firstName' }
27
+ }
28
+ }
29
+ },
30
+ last_name: {
31
+ label: 'Last Name',
32
+ description: "The user's last name.",
33
+ type: 'string',
34
+ default: {
35
+ '@if': {
36
+ exists: { '@path': '$.context.traits.lastName' },
37
+ then: { '@path': '$.context.traits.lastName' },
38
+ else: { '@path': '$.properties.lastName' }
39
+ }
40
+ }
41
+ },
42
+ email: {
43
+ label: 'Email',
44
+ description: "The user's email address.",
45
+ type: 'string',
46
+ default: {
47
+ '@if': {
48
+ exists: { '@path': '$.context.traits.email' },
49
+ then: { '@path': '$.context.traits.email' },
50
+ else: { '@path': '$.properties.email' }
51
+ }
52
+ }
53
+ },
54
+ phone: {
55
+ label: 'Phone',
56
+ description: "The user's phone number.",
57
+ type: 'string',
58
+ default: {
59
+ '@if': {
60
+ exists: { '@path': '$.context.traits.phone' },
61
+ then: { '@path': '$.context.traits.phone' },
62
+ else: { '@path': '$.properties.phone' }
63
+ }
64
+ }
65
+ },
66
+ country_code: {
67
+ label: 'Country Code',
68
+ description: "The user's country code.",
69
+ type: 'string'
70
+ },
71
+ postal_code: {
72
+ label: 'Postal Code',
73
+ description: "The user's postal code.",
74
+ type: 'string'
75
+ },
76
+ crm_id: {
77
+ label: 'CRM ID',
78
+ description: 'Advertiser-assigned user ID for Customer Match upload.',
79
+ type: 'string'
80
+ },
81
+ mobile_advertising_id: {
82
+ label: 'Mobile Advertising ID',
83
+ description: 'Mobile device ID (advertising ID/IDFA).',
84
+ type: 'string',
85
+ default: {
86
+ '@path': '$.context.device.advertisingId'
87
+ }
88
+ },
89
+ ad_user_data_consent_state: {
90
+ label: 'Ad User Data Consent State',
91
+ description: 'This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).',
92
+ type: 'string',
93
+ choices: [
94
+ { label: 'GRANTED', value: 'GRANTED' },
95
+ { label: 'DENIED', value: 'DENIED' },
96
+ { label: 'UNSPECIFIED', value: 'UNSPECIFIED' }
97
+ ],
98
+ required: true
99
+ },
100
+ ad_personalization_consent_state: {
101
+ label: 'Ad Personalization Consent State',
102
+ type: 'string',
103
+ description: 'This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).',
104
+ choices: [
105
+ { label: 'GRANTED', value: 'GRANTED' },
106
+ { label: 'DENIED', value: 'DENIED' },
107
+ { label: 'UNSPECIFIED', value: 'UNSPECIFIED' }
108
+ ],
109
+ required: true
110
+ },
111
+ external_audience_id: {
112
+ label: 'External Audience ID',
113
+ description: 'The ID of the List that users will be synced to.',
114
+ type: 'string',
115
+ default: {
116
+ '@path': '$.context.personas.external_audience_id'
117
+ },
118
+ unsafe_hidden: true
119
+ },
120
+ enable_batching: {
121
+ label: 'Enable Batching',
122
+ description: 'Enable batching for the request.',
123
+ type: 'boolean',
124
+ default: true,
125
+ unsafe_hidden: true
126
+ },
127
+ event_name: {
128
+ label: 'Event Name',
129
+ description: 'The name of the current Segment event.',
130
+ type: 'string',
131
+ default: {
132
+ '@path': '$.event'
133
+ },
134
+ required: true,
135
+ readOnly: true
136
+ }
137
+ },
138
+ hooks: {
139
+ retlOnMappingSave: {
140
+ label: 'Connect to a Google Customer Match User List',
141
+ description: 'When saving this mapping, we will create a list in Google using the fields you provide.',
142
+ inputFields: {
143
+ list_id: {
144
+ type: 'string',
145
+ label: 'Existing List ID',
146
+ description: 'The ID of an existing Google list that you would like to sync users to. If you provide this, we will not create a new list.',
147
+ required: false,
148
+ dynamic: async (request, { settings, auth }) => {
149
+ return await functions_1.getListIds(request, settings, auth);
150
+ }
151
+ },
152
+ list_name: {
153
+ type: 'string',
154
+ label: 'List Name',
155
+ description: 'The name of the Google list that you would like to create.',
156
+ required: false
157
+ },
158
+ external_id_type: {
159
+ type: 'string',
160
+ label: 'External ID Type',
161
+ description: 'Customer match upload key types.',
162
+ required: false,
163
+ choices: [
164
+ { label: 'CONTACT INFO', value: 'CONTACT_INFO' },
165
+ { label: 'CRM ID', value: 'CRM_ID' },
166
+ { label: 'MOBILE ADVERTISING ID', value: 'MOBILE_ADVERTISING_ID' }
167
+ ]
168
+ },
169
+ app_id: {
170
+ label: 'App ID',
171
+ description: 'A string that uniquely identifies a mobile application from which the data was collected. Required if external ID type is mobile advertising ID',
172
+ type: 'string',
173
+ depends_on: {
174
+ match: 'all',
175
+ conditions: [
176
+ {
177
+ fieldKey: 'external_id_type',
178
+ operator: 'is',
179
+ value: 'MOBILE_ADVERTISING_ID'
180
+ }
181
+ ]
182
+ }
183
+ }
184
+ },
185
+ outputTypes: {
186
+ id: {
187
+ type: 'string',
188
+ label: 'ID',
189
+ description: 'The ID of the created Google Customer Match User list that users will be synced to.',
190
+ required: false
191
+ },
192
+ name: {
193
+ type: 'string',
194
+ label: 'List Name',
195
+ description: 'The name of the created Google Customer Match User list that users will be synced to.',
196
+ required: false
197
+ },
198
+ external_id_type: {
199
+ type: 'string',
200
+ label: 'External ID Type',
201
+ description: 'Customer match upload key types.',
202
+ required: false
203
+ },
204
+ app_id: {
205
+ label: 'App ID',
206
+ description: 'A string that uniquely identifies a mobile application from which the data was collected. Required if external ID type is mobile advertising ID',
207
+ type: 'string',
208
+ required: false
209
+ }
210
+ },
211
+ performHook: async (request, { auth, settings, hookInputs, statsContext }) => {
212
+ if (hookInputs.list_id) {
213
+ try {
214
+ const response = await functions_1.getGoogleAudience(request, settings, hookInputs.list_id, {
215
+ refresh_token: auth?.refreshToken
216
+ });
217
+ return {
218
+ successMessage: `Using existing list '${response.results[0].userList.id}' (id: ${hookInputs.list_id})`,
219
+ savedData: {
220
+ id: hookInputs.list_id,
221
+ name: response.results[0].userList.name,
222
+ external_id_type: hookInputs.external_id_type,
223
+ app_id: hookInputs.app_id
224
+ }
225
+ };
226
+ }
227
+ catch (e) {
228
+ const message = e.message || JSON.stringify(e) || 'Failed to get list';
229
+ const code = e.code || 'GET_LIST_FAILURE';
230
+ return {
231
+ error: {
232
+ message,
233
+ code
234
+ }
235
+ };
236
+ }
237
+ }
238
+ try {
239
+ const input = {
240
+ audienceName: hookInputs.list_name,
241
+ settings: settings,
242
+ audienceSettings: {
243
+ external_id_type: hookInputs.external_id_type,
244
+ app_id: hookInputs.app_id
245
+ }
246
+ };
247
+ const listId = await functions_1.createGoogleAudience(request, input, { refresh_token: auth?.refreshToken }, statsContext);
248
+ return {
249
+ successMessage: `List '${hookInputs.list_name}' (id: ${listId}) created successfully!`,
250
+ savedData: {
251
+ id: listId,
252
+ name: hookInputs.list_name,
253
+ external_id_type: hookInputs.external_id_type,
254
+ app_id: hookInputs.app_id
255
+ }
256
+ };
257
+ }
258
+ catch (e) {
259
+ const message = e.message || JSON.stringify(e) || 'Failed to create list';
260
+ const code = e.code || 'CREATE_LIST_FAILURE';
261
+ return {
262
+ error: {
263
+ message,
264
+ code
265
+ }
266
+ };
267
+ }
268
+ }
269
+ }
270
+ },
271
+ perform: async (request, { settings, audienceSettings, payload, hookOutputs, statsContext, syncMode }) => {
272
+ hookOutputs?.retlOnMappingSave?.outputs.id;
273
+ return await functions_1.handleUpdate(request, settings, audienceSettings, [payload], hookOutputs?.retlOnMappingSave?.outputs.id, hookOutputs?.retlOnMappingSave?.outputs.external_id_type, syncMode, statsContext);
274
+ },
275
+ performBatch: async (request, { settings, audienceSettings, payload, hookOutputs, statsContext, syncMode }) => {
276
+ return await functions_1.handleUpdate(request, settings, audienceSettings, payload, hookOutputs?.retlOnMappingSave?.outputs.id, hookOutputs?.retlOnMappingSave?.outputs.external_id_type, syncMode, statsContext);
277
+ }
278
+ };
279
+ exports.default = action;
280
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-enhanced-conversions/userList/index.ts"],"names":[],"mappings":";;AAGA,4CAAgG;AAIhG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,0BAA0B;IACjC,WAAW,EAAE,wEAAwE;IACrF,mBAAmB,EAAE,yDAAyD;IAC9E,QAAQ,EAAE;QACR,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E,iBAAiB,EAAE,OAAO,CAAC,gBAAgB,EACxD,QAAQ,EACR,YAAY,CACb,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,3 @@
1
+ export interface Settings {
2
+ apiKey: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/mappings-two-test/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { DestinationDefinition } from '@segment/actions-core';
2
+ import type { Settings } from './generated-types';
3
+ declare const destination: DestinationDefinition<Settings>;
4
+ export default destination;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const sendEvent_1 = __importDefault(require("./sendEvent"));
7
+ const kitchenSink_1 = __importDefault(require("./kitchenSink"));
8
+ const destination = {
9
+ name: 'Mappings Two Test',
10
+ slug: 'actions-mappings-two-test',
11
+ mode: 'cloud',
12
+ authentication: {
13
+ scheme: 'custom',
14
+ fields: {
15
+ apiKey: {
16
+ label: 'API Key',
17
+ description: 'Your Mappings Two Test API Key. This is a Segment production write key that you can find in your Segment settings. All the actions in this destination will send payloads as Segment events to this source.',
18
+ type: 'string',
19
+ required: true
20
+ }
21
+ },
22
+ testAuthentication: (request, { settings }) => {
23
+ return request(`https://cdn.segment.com/v1/projects/${settings.apiKey}/settings`);
24
+ }
25
+ },
26
+ actions: {
27
+ sendEvent: sendEvent_1.default,
28
+ kitchenSink: kitchenSink_1.default
29
+ }
30
+ };
31
+ exports.default = destination;
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/mappings-two-test/index.ts"],"names":[],"mappings":";;;;;AAGA,4DAAmC;AACnC,gEAAuC;AAEvC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,WAAW,EACT,6MAA6M;gBAC/M,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC5C,OAAO,OAAO,CAAC,uCAAuC,QAAQ,CAAC,MAAM,WAAW,CAAC,CAAA;QACnF,CAAC;KACF;IAED,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;QACT,WAAW,EAAX,qBAAW;KACZ;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}