@segment/action-destinations 3.337.2-staging.1 → 3.337.7-staging.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 (471) hide show
  1. package/README.md +1 -1
  2. package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js +6 -2
  3. package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js.map +1 -1
  4. package/dist/destinations/acoustic-s3tc/receiveEvents/preCheck.js +7 -1
  5. package/dist/destinations/acoustic-s3tc/receiveEvents/preCheck.js.map +1 -1
  6. package/dist/destinations/aggregations-io/generated-types.d.ts +4 -0
  7. package/dist/destinations/aggregations-io/generated-types.js.map +1 -0
  8. package/dist/destinations/aggregations-io/index.d.ts +4 -0
  9. package/dist/destinations/aggregations-io/index.js +58 -0
  10. package/dist/destinations/aggregations-io/index.js.map +1 -0
  11. package/dist/destinations/aggregations-io/send/generated-types.d.ts +7 -0
  12. package/dist/destinations/aggregations-io/send/generated-types.js.map +1 -0
  13. package/dist/destinations/aggregations-io/send/index.js +44 -0
  14. package/dist/destinations/aggregations-io/send/index.js.map +1 -0
  15. package/dist/destinations/aggregations-io/types.d.ts +8 -0
  16. package/dist/destinations/aggregations-io/types.js +8 -0
  17. package/dist/destinations/aggregations-io/types.js.map +1 -0
  18. package/dist/destinations/airship/registerAndAssociate/generated-types.d.ts +3 -0
  19. package/dist/destinations/airship/registerAndAssociate/index.js +35 -7
  20. package/dist/destinations/airship/registerAndAssociate/index.js.map +1 -1
  21. package/dist/destinations/airship/utilities.d.ts +3 -1
  22. package/dist/destinations/airship/utilities.js +76 -41
  23. package/dist/destinations/airship/utilities.js.map +1 -1
  24. package/dist/destinations/algolia-insights/conversionEvents/generated-types.d.ts +2 -2
  25. package/dist/destinations/algolia-insights/conversionEvents/index.js +7 -3
  26. package/dist/destinations/algolia-insights/conversionEvents/index.js.map +1 -1
  27. package/dist/destinations/algolia-insights/index.js +7 -0
  28. package/dist/destinations/algolia-insights/index.js.map +1 -1
  29. package/dist/destinations/algolia-insights/productAddedEvents/generated-types.d.ts +2 -2
  30. package/dist/destinations/algolia-insights/productAddedEvents/index.js +7 -3
  31. package/dist/destinations/algolia-insights/productAddedEvents/index.js.map +1 -1
  32. package/dist/destinations/algolia-insights/productClickedEvents/generated-types.d.ts +2 -2
  33. package/dist/destinations/algolia-insights/productClickedEvents/index.js +7 -3
  34. package/dist/destinations/algolia-insights/productClickedEvents/index.js.map +1 -1
  35. package/dist/destinations/algolia-insights/productListFilteredEvents/generated-types.d.ts +2 -2
  36. package/dist/destinations/algolia-insights/productListFilteredEvents/index.js +7 -3
  37. package/dist/destinations/algolia-insights/productListFilteredEvents/index.js.map +1 -1
  38. package/dist/destinations/algolia-insights/productViewedEvents/generated-types.d.ts +2 -2
  39. package/dist/destinations/algolia-insights/productViewedEvents/index.js +7 -3
  40. package/dist/destinations/algolia-insights/productViewedEvents/index.js.map +1 -1
  41. package/dist/destinations/amazon-ads/generated-types.d.ts +3 -0
  42. package/dist/destinations/amazon-ads/generated-types.js +3 -0
  43. package/dist/destinations/amazon-ads/generated-types.js.map +1 -0
  44. package/dist/destinations/amazon-ads/index.d.ts +4 -0
  45. package/dist/destinations/amazon-ads/index.js +87 -0
  46. package/dist/destinations/amazon-ads/index.js.map +1 -0
  47. package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +2 -0
  48. package/dist/destinations/amazon-ads/syncAudiences/generated-types.js +3 -0
  49. package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +1 -0
  50. package/dist/destinations/amazon-ads/syncAudiences/index.d.ts +5 -0
  51. package/dist/destinations/amazon-ads/syncAudiences/index.js +15 -0
  52. package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -0
  53. package/dist/destinations/amazon-ads/types.d.ts +22 -0
  54. package/dist/destinations/amazon-ads/types.js +11 -0
  55. package/dist/destinations/amazon-ads/types.js.map +1 -0
  56. package/dist/destinations/avo/generated-types.d.ts +5 -0
  57. package/dist/destinations/avo/generated-types.js +3 -0
  58. package/dist/destinations/avo/generated-types.js.map +1 -0
  59. package/dist/destinations/avo/index.d.ts +4 -0
  60. package/dist/destinations/avo/index.js +54 -0
  61. package/dist/destinations/avo/index.js.map +1 -0
  62. package/dist/destinations/avo/sendSchemaToInspector/AvoSchemaParser.d.ts +9 -0
  63. package/dist/destinations/avo/sendSchemaToInspector/AvoSchemaParser.js +97 -0
  64. package/dist/destinations/avo/sendSchemaToInspector/AvoSchemaParser.js.map +1 -0
  65. package/dist/destinations/avo/sendSchemaToInspector/avo-types.d.ts +26 -0
  66. package/dist/destinations/avo/sendSchemaToInspector/avo-types.js +10 -0
  67. package/dist/destinations/avo/sendSchemaToInspector/avo-types.js.map +1 -0
  68. package/dist/destinations/avo/sendSchemaToInspector/avo.d.ts +3 -0
  69. package/dist/destinations/avo/sendSchemaToInspector/avo.js +44 -0
  70. package/dist/destinations/avo/sendSchemaToInspector/avo.js.map +1 -0
  71. package/dist/destinations/avo/sendSchemaToInspector/generated-types.d.ts +11 -0
  72. package/dist/destinations/avo/sendSchemaToInspector/generated-types.js +3 -0
  73. package/dist/destinations/avo/sendSchemaToInspector/generated-types.js.map +1 -0
  74. package/dist/destinations/avo/sendSchemaToInspector/index.d.ts +5 -0
  75. package/dist/destinations/avo/sendSchemaToInspector/index.js +95 -0
  76. package/dist/destinations/avo/sendSchemaToInspector/index.js.map +1 -0
  77. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
  78. package/dist/destinations/braze/trackEvent/generated-types.d.ts +1 -0
  79. package/dist/destinations/braze/trackEvent/index.js +8 -0
  80. package/dist/destinations/braze/trackEvent/index.js.map +1 -1
  81. package/dist/destinations/braze/trackPurchase/generated-types.d.ts +1 -0
  82. package/dist/destinations/braze/trackPurchase/index.js +8 -0
  83. package/dist/destinations/braze/trackPurchase/index.js.map +1 -1
  84. package/dist/destinations/braze/utils.js +15 -11
  85. package/dist/destinations/braze/utils.js.map +1 -1
  86. package/dist/destinations/courier/generated-types.d.ts +4 -0
  87. package/dist/destinations/courier/generated-types.js +3 -0
  88. package/dist/destinations/courier/generated-types.js.map +1 -0
  89. package/dist/destinations/courier/index.d.ts +4 -0
  90. package/dist/destinations/courier/index.js +44 -0
  91. package/dist/destinations/courier/index.js.map +1 -0
  92. package/dist/destinations/courier/postToCourier/generated-types.d.ts +5 -0
  93. package/dist/destinations/courier/postToCourier/generated-types.js +3 -0
  94. package/dist/destinations/courier/postToCourier/generated-types.js.map +1 -0
  95. package/dist/destinations/courier/postToCourier/index.js +35 -0
  96. package/dist/destinations/courier/postToCourier/index.js.map +1 -0
  97. package/dist/destinations/criteo-audiences/addUserToAudience/index.js +5 -5
  98. package/dist/destinations/criteo-audiences/addUserToAudience/index.js.map +1 -1
  99. package/dist/destinations/criteo-audiences/criteo-audiences.js +13 -2
  100. package/dist/destinations/criteo-audiences/criteo-audiences.js.map +1 -1
  101. package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js +5 -5
  102. package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js.map +1 -1
  103. package/dist/destinations/customerio/deleteObject/generated-types.d.ts +4 -0
  104. package/dist/destinations/customerio/deleteObject/generated-types.js +3 -0
  105. package/dist/destinations/customerio/deleteObject/generated-types.js.map +1 -0
  106. package/dist/destinations/customerio/deleteObject/index.d.ts +5 -0
  107. package/dist/destinations/customerio/deleteObject/index.js +48 -0
  108. package/dist/destinations/customerio/deleteObject/index.js.map +1 -0
  109. package/dist/destinations/customerio/deletePerson/generated-types.d.ts +3 -0
  110. package/dist/destinations/customerio/deletePerson/generated-types.js +3 -0
  111. package/dist/destinations/customerio/deletePerson/generated-types.js.map +1 -0
  112. package/dist/destinations/customerio/deletePerson/index.d.ts +5 -0
  113. package/dist/destinations/customerio/deletePerson/index.js +41 -0
  114. package/dist/destinations/customerio/deletePerson/index.js.map +1 -0
  115. package/dist/destinations/customerio/deleteRelationship/generated-types.d.ts +6 -0
  116. package/dist/destinations/customerio/deleteRelationship/generated-types.js +3 -0
  117. package/dist/destinations/customerio/deleteRelationship/generated-types.js.map +1 -0
  118. package/dist/destinations/customerio/deleteRelationship/index.d.ts +5 -0
  119. package/dist/destinations/customerio/deleteRelationship/index.js +82 -0
  120. package/dist/destinations/customerio/deleteRelationship/index.js.map +1 -0
  121. package/dist/destinations/customerio/mergePeople/generated-types.d.ts +4 -0
  122. package/dist/destinations/customerio/mergePeople/generated-types.js +3 -0
  123. package/dist/destinations/customerio/mergePeople/generated-types.js.map +1 -0
  124. package/dist/destinations/customerio/mergePeople/index.d.ts +5 -0
  125. package/dist/destinations/customerio/mergePeople/index.js +52 -0
  126. package/dist/destinations/customerio/mergePeople/index.js.map +1 -0
  127. package/dist/destinations/customerio/reportDeliveryEvent/generated-types.d.ts +10 -0
  128. package/dist/destinations/customerio/reportDeliveryEvent/generated-types.js +3 -0
  129. package/dist/destinations/customerio/reportDeliveryEvent/generated-types.js.map +1 -0
  130. package/dist/destinations/customerio/reportDeliveryEvent/index.d.ts +5 -0
  131. package/dist/destinations/customerio/reportDeliveryEvent/index.js +125 -0
  132. package/dist/destinations/customerio/reportDeliveryEvent/index.js.map +1 -0
  133. package/dist/destinations/customerio/suppressPerson/generated-types.d.ts +3 -0
  134. package/dist/destinations/customerio/suppressPerson/generated-types.js +3 -0
  135. package/dist/destinations/customerio/suppressPerson/generated-types.js.map +1 -0
  136. package/dist/destinations/customerio/suppressPerson/index.d.ts +5 -0
  137. package/dist/destinations/customerio/suppressPerson/index.js +41 -0
  138. package/dist/destinations/customerio/suppressPerson/index.js.map +1 -0
  139. package/dist/destinations/customerio/test-helper.d.ts +4 -0
  140. package/dist/destinations/customerio/test-helper.js +77 -0
  141. package/dist/destinations/customerio/test-helper.js.map +1 -0
  142. package/dist/destinations/customerio/unsuppressPerson/generated-types.d.ts +3 -0
  143. package/dist/destinations/customerio/unsuppressPerson/generated-types.js +3 -0
  144. package/dist/destinations/customerio/unsuppressPerson/generated-types.js.map +1 -0
  145. package/dist/destinations/customerio/unsuppressPerson/index.d.ts +5 -0
  146. package/dist/destinations/customerio/unsuppressPerson/index.js +41 -0
  147. package/dist/destinations/customerio/unsuppressPerson/index.js.map +1 -0
  148. package/dist/destinations/devrev/createRevUser/index.js +9 -6
  149. package/dist/destinations/devrev/createRevUser/index.js.map +1 -1
  150. package/dist/destinations/devrev/utils/types.d.ts +9 -0
  151. package/dist/destinations/display-video-360/index.js +1 -1
  152. package/dist/destinations/display-video-360/index.js.map +1 -1
  153. package/dist/destinations/display-video-360/properties.js +4 -4
  154. package/dist/destinations/display-video-360/properties.js.map +1 -1
  155. package/dist/destinations/display-video-360/proto/protofile.d.ts +1 -0
  156. package/dist/destinations/display-video-360/proto/protofile.js +1 -0
  157. package/dist/destinations/display-video-360/proto/protofile.js.map +1 -1
  158. package/dist/destinations/display-video-360/shared.js +7 -44
  159. package/dist/destinations/display-video-360/shared.js.map +1 -1
  160. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +2 -5
  161. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +18 -98
  162. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -1
  163. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +9 -3
  164. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
  165. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +0 -3
  166. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -1
  167. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +8 -2
  168. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -1
  169. package/dist/destinations/engage/utils/EngageStats.js +0 -4
  170. package/dist/destinations/engage/utils/EngageStats.js.map +1 -1
  171. package/dist/destinations/equals/generated-types.d.ts +3 -0
  172. package/dist/destinations/equals/generated-types.js +3 -0
  173. package/dist/destinations/equals/generated-types.js.map +1 -0
  174. package/dist/destinations/equals/index.d.ts +4 -0
  175. package/dist/destinations/equals/index.js +38 -0
  176. package/dist/destinations/equals/index.js.map +1 -0
  177. package/dist/destinations/equals/send/generated-types.d.ts +5 -0
  178. package/dist/destinations/equals/send/generated-types.js +3 -0
  179. package/dist/destinations/equals/send/generated-types.js.map +1 -0
  180. package/dist/destinations/equals/send/index.d.ts +5 -0
  181. package/dist/destinations/equals/send/index.js +38 -0
  182. package/dist/destinations/equals/send/index.js.map +1 -0
  183. package/dist/destinations/facebook-conversions-api/constants.d.ts +1 -1
  184. package/dist/destinations/facebook-conversions-api/constants.js +1 -1
  185. package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js +1 -1
  186. package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -1
  187. package/dist/destinations/google-enhanced-conversions/functions.js +1 -1
  188. package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +0 -1
  189. package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
  190. package/dist/destinations/hubspot/utils.d.ts +3 -3
  191. package/dist/destinations/index.js +9 -0
  192. package/dist/destinations/index.js.map +1 -1
  193. package/dist/destinations/kameleoon/index.js +1 -1
  194. package/dist/destinations/kameleoon/index.js.map +1 -1
  195. package/dist/destinations/kevel/generated-types.d.ts +4 -0
  196. package/dist/destinations/kevel/generated-types.js +3 -0
  197. package/dist/destinations/kevel/generated-types.js.map +1 -0
  198. package/dist/destinations/kevel/index.d.ts +4 -0
  199. package/dist/destinations/kevel/index.js +45 -0
  200. package/dist/destinations/kevel/index.js.map +1 -0
  201. package/dist/destinations/kevel/syncAudience/generated-types.d.ts +8 -0
  202. package/dist/destinations/kevel/syncAudience/generated-types.js +3 -0
  203. package/dist/destinations/kevel/syncAudience/generated-types.js.map +1 -0
  204. package/dist/destinations/kevel/syncAudience/index.d.ts +5 -0
  205. package/dist/destinations/kevel/syncAudience/index.js +64 -0
  206. package/dist/destinations/kevel/syncAudience/index.js.map +1 -0
  207. package/dist/destinations/kevel/syncTraits/generated-types.d.ts +6 -0
  208. package/dist/destinations/kevel/syncTraits/generated-types.js +3 -0
  209. package/dist/destinations/kevel/syncTraits/generated-types.js.map +1 -0
  210. package/dist/destinations/kevel/syncTraits/index.d.ts +5 -0
  211. package/dist/destinations/kevel/syncTraits/index.js +39 -0
  212. package/dist/destinations/kevel/syncTraits/index.js.map +1 -0
  213. package/dist/destinations/klaviyo/properties.js +1 -1
  214. package/dist/destinations/klaviyo/properties.js.map +1 -1
  215. package/dist/destinations/linkedin-conversions/api/api.test.js +43 -25
  216. package/dist/destinations/linkedin-conversions/api/api.test.js.map +1 -1
  217. package/dist/destinations/linkedin-conversions/api/index.d.ts +3 -2
  218. package/dist/destinations/linkedin-conversions/api/index.js +41 -15
  219. package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
  220. package/dist/destinations/linkedin-conversions/constants.d.ts +1 -1
  221. package/dist/destinations/linkedin-conversions/constants.js +1 -1
  222. package/dist/destinations/linkedin-conversions/streamConversion/generated-types.d.ts +1 -1
  223. package/dist/destinations/linkedin-conversions/streamConversion/index.js +2 -1
  224. package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
  225. package/dist/destinations/linkedin-conversions/types.d.ts +6 -7
  226. package/dist/destinations/marketo-static-lists/addToList/index.js +2 -2
  227. package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
  228. package/dist/destinations/marketo-static-lists/functions.js +7 -7
  229. package/dist/destinations/marketo-static-lists/functions.js.map +1 -1
  230. package/dist/destinations/marketo-static-lists/removeFromList/index.js +2 -2
  231. package/dist/destinations/marketo-static-lists/removeFromList/index.js.map +1 -1
  232. package/dist/destinations/mixpanel/incrementProperties/__test__/__snapshots__/snapshot.test.js.snap +18 -0
  233. package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.d.ts +1 -0
  234. package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.js +129 -0
  235. package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.js.map +1 -0
  236. package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.d.ts +1 -0
  237. package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.js +69 -0
  238. package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.js.map +1 -0
  239. package/dist/destinations/mixpanel/incrementProperties/generated-types.d.ts +8 -0
  240. package/dist/destinations/mixpanel/incrementProperties/generated-types.js +3 -0
  241. package/dist/destinations/mixpanel/incrementProperties/generated-types.js.map +1 -0
  242. package/dist/destinations/mixpanel/incrementProperties/index.d.ts +5 -0
  243. package/dist/destinations/mixpanel/incrementProperties/index.js +84 -0
  244. package/dist/destinations/mixpanel/incrementProperties/index.js.map +1 -0
  245. package/dist/destinations/mixpanel/index.js +3 -1
  246. package/dist/destinations/mixpanel/index.js.map +1 -1
  247. package/dist/destinations/mixpanel/mixpanel-types.d.ts +4 -0
  248. package/dist/destinations/moengage/trackEvent/generated-types.d.ts +1 -0
  249. package/dist/destinations/moengage/trackEvent/index.js +10 -2
  250. package/dist/destinations/moengage/trackEvent/index.js.map +1 -1
  251. package/dist/destinations/responsys/generated-types.d.ts +15 -0
  252. package/dist/destinations/responsys/index.js +141 -6
  253. package/dist/destinations/responsys/index.js.map +1 -1
  254. package/dist/destinations/responsys/sendAudience/generated-types.d.ts +14 -0
  255. package/dist/destinations/responsys/sendAudience/generated-types.js +3 -0
  256. package/dist/destinations/responsys/sendAudience/generated-types.js.map +1 -0
  257. package/dist/destinations/responsys/sendAudience/index.d.ts +5 -0
  258. package/dist/destinations/responsys/sendAudience/index.js +88 -0
  259. package/dist/destinations/responsys/sendAudience/index.js.map +1 -0
  260. package/dist/destinations/responsys/sendCustomTraits/generated-types.d.ts +9 -0
  261. package/dist/destinations/responsys/sendCustomTraits/generated-types.js +3 -0
  262. package/dist/destinations/responsys/sendCustomTraits/generated-types.js.map +1 -0
  263. package/dist/destinations/responsys/sendCustomTraits/index.d.ts +5 -0
  264. package/dist/destinations/responsys/sendCustomTraits/index.js +52 -0
  265. package/dist/destinations/responsys/sendCustomTraits/index.js.map +1 -0
  266. package/dist/destinations/responsys/{rsp-properties.d.ts → shared_properties.d.ts} +0 -1
  267. package/dist/destinations/responsys/{rsp-properties.js → shared_properties.js} +2 -10
  268. package/dist/destinations/responsys/shared_properties.js.map +1 -0
  269. package/dist/destinations/responsys/types.d.ts +23 -22
  270. package/dist/destinations/responsys/upsertListMember/generated-types.d.ts +13 -0
  271. package/dist/destinations/responsys/upsertListMember/generated-types.js +3 -0
  272. package/dist/destinations/responsys/upsertListMember/generated-types.js.map +1 -0
  273. package/dist/destinations/responsys/upsertListMember/index.d.ts +5 -0
  274. package/dist/destinations/responsys/upsertListMember/index.js +80 -0
  275. package/dist/destinations/responsys/upsertListMember/index.js.map +1 -0
  276. package/dist/destinations/responsys/utils.d.ts +18 -0
  277. package/dist/destinations/responsys/utils.js +151 -0
  278. package/dist/destinations/responsys/utils.js.map +1 -0
  279. package/dist/destinations/schematic/generated-types.d.ts +3 -0
  280. package/dist/destinations/schematic/generated-types.js +3 -0
  281. package/dist/destinations/schematic/generated-types.js.map +1 -0
  282. package/dist/destinations/schematic/identifyUser/generated-types.d.ts +18 -0
  283. package/dist/destinations/schematic/identifyUser/generated-types.js +3 -0
  284. package/dist/destinations/schematic/identifyUser/generated-types.js.map +1 -0
  285. package/dist/destinations/schematic/identifyUser/index.d.ts +5 -0
  286. package/dist/destinations/schematic/identifyUser/index.js +114 -0
  287. package/dist/destinations/schematic/identifyUser/index.js.map +1 -0
  288. package/dist/destinations/schematic/index.d.ts +4 -0
  289. package/dist/destinations/schematic/index.js +58 -0
  290. package/dist/destinations/schematic/index.js.map +1 -0
  291. package/dist/destinations/schematic/trackEvent/generated-types.d.ts +13 -0
  292. package/dist/destinations/schematic/trackEvent/generated-types.js +3 -0
  293. package/dist/destinations/schematic/trackEvent/generated-types.js.map +1 -0
  294. package/dist/destinations/schematic/trackEvent/index.d.ts +5 -0
  295. package/dist/destinations/schematic/trackEvent/index.js +89 -0
  296. package/dist/destinations/schematic/trackEvent/index.js.map +1 -0
  297. package/dist/destinations/segment/generated-types.d.ts +0 -1
  298. package/dist/destinations/segment/index.js +3 -13
  299. package/dist/destinations/segment/index.js.map +1 -1
  300. package/dist/destinations/segment/properties.d.ts +1 -1
  301. package/dist/destinations/segment/properties.js +3 -3
  302. package/dist/destinations/segment/properties.js.map +1 -1
  303. package/dist/destinations/segment/sendGroup/index.js +40 -15
  304. package/dist/destinations/segment/sendGroup/index.js.map +1 -1
  305. package/dist/destinations/segment/sendIdentify/index.js +40 -15
  306. package/dist/destinations/segment/sendIdentify/index.js.map +1 -1
  307. package/dist/destinations/segment/sendPage/index.js +48 -15
  308. package/dist/destinations/segment/sendPage/index.js.map +1 -1
  309. package/dist/destinations/segment/sendScreen/index.js +41 -15
  310. package/dist/destinations/segment/sendScreen/index.js.map +1 -1
  311. package/dist/destinations/segment/sendTrack/index.js +45 -15
  312. package/dist/destinations/segment/sendTrack/index.js.map +1 -1
  313. package/dist/destinations/stackadapt/forwardEvent/generated-types.d.ts +33 -0
  314. package/dist/destinations/stackadapt/forwardEvent/generated-types.js +3 -0
  315. package/dist/destinations/stackadapt/forwardEvent/generated-types.js.map +1 -0
  316. package/dist/destinations/stackadapt/forwardEvent/index.d.ts +5 -0
  317. package/dist/destinations/stackadapt/forwardEvent/index.js +273 -0
  318. package/dist/destinations/stackadapt/forwardEvent/index.js.map +1 -0
  319. package/dist/destinations/stackadapt/generated-types.d.ts +3 -0
  320. package/dist/destinations/stackadapt/generated-types.js +3 -0
  321. package/dist/destinations/stackadapt/generated-types.js.map +1 -0
  322. package/dist/destinations/stackadapt/index.d.ts +4 -0
  323. package/dist/destinations/stackadapt/index.js +38 -0
  324. package/dist/destinations/stackadapt/index.js.map +1 -0
  325. package/dist/destinations/surveysparrow/createContact/generated-types.d.ts +10 -0
  326. package/dist/destinations/surveysparrow/createContact/generated-types.js +3 -0
  327. package/dist/destinations/surveysparrow/createContact/generated-types.js.map +1 -0
  328. package/dist/destinations/surveysparrow/createContact/index.d.ts +5 -0
  329. package/dist/destinations/surveysparrow/createContact/index.js +105 -0
  330. package/dist/destinations/surveysparrow/createContact/index.js.map +1 -0
  331. package/dist/destinations/surveysparrow/generated-types.d.ts +3 -0
  332. package/dist/destinations/surveysparrow/generated-types.js +3 -0
  333. package/dist/destinations/surveysparrow/generated-types.js.map +1 -0
  334. package/dist/destinations/surveysparrow/index.d.ts +4 -0
  335. package/dist/destinations/surveysparrow/index.js +40 -0
  336. package/dist/destinations/surveysparrow/index.js.map +1 -0
  337. package/dist/destinations/surveysparrow/triggerSurvey/generated-types.d.ts +10 -0
  338. package/dist/destinations/surveysparrow/triggerSurvey/generated-types.js +3 -0
  339. package/dist/destinations/surveysparrow/triggerSurvey/generated-types.js.map +1 -0
  340. package/dist/destinations/surveysparrow/triggerSurvey/index.d.ts +8 -0
  341. package/dist/destinations/surveysparrow/triggerSurvey/index.js +165 -0
  342. package/dist/destinations/surveysparrow/triggerSurvey/index.js.map +1 -0
  343. package/dist/destinations/tiktok-conversions/common_fields.d.ts +2 -0
  344. package/dist/destinations/tiktok-conversions/common_fields.js +245 -0
  345. package/dist/destinations/tiktok-conversions/common_fields.js.map +1 -0
  346. package/dist/destinations/tiktok-conversions/formatter.d.ts +3 -0
  347. package/dist/destinations/tiktok-conversions/formatter.js +43 -0
  348. package/dist/destinations/tiktok-conversions/formatter.js.map +1 -0
  349. package/dist/destinations/tiktok-conversions/index.js +3 -92
  350. package/dist/destinations/tiktok-conversions/index.js.map +1 -1
  351. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -3
  352. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +24 -33
  353. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -1
  354. package/dist/destinations/tiktok-conversions/reportWebEvent/generated-types.d.ts +4 -12
  355. package/dist/destinations/tiktok-conversions/reportWebEvent/index.js +40 -113
  356. package/dist/destinations/tiktok-conversions/reportWebEvent/index.js.map +1 -1
  357. package/dist/destinations/tiktok-conversions/utils.d.ts +4 -0
  358. package/dist/destinations/tiktok-conversions/utils.js +65 -0
  359. package/dist/destinations/tiktok-conversions/utils.js.map +1 -0
  360. package/dist/destinations/tiktok-conversions-sandbox/common_fields.d.ts +2 -0
  361. package/dist/destinations/tiktok-conversions-sandbox/common_fields.js +244 -0
  362. package/dist/destinations/tiktok-conversions-sandbox/common_fields.js.map +1 -0
  363. package/dist/destinations/{tiktok-offline-conversions/reportOfflineEvent → tiktok-conversions-sandbox}/formatter.js +11 -11
  364. package/dist/destinations/tiktok-conversions-sandbox/formatter.js.map +1 -0
  365. package/dist/destinations/tiktok-conversions-sandbox/generated-types.d.ts +4 -0
  366. package/dist/destinations/tiktok-conversions-sandbox/generated-types.js +3 -0
  367. package/dist/destinations/tiktok-conversions-sandbox/generated-types.js.map +1 -0
  368. package/dist/destinations/tiktok-conversions-sandbox/index.d.ts +4 -0
  369. package/dist/destinations/tiktok-conversions-sandbox/index.js +247 -0
  370. package/dist/destinations/tiktok-conversions-sandbox/index.js.map +1 -0
  371. package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/generated-types.d.ts +33 -0
  372. package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/generated-types.js +3 -0
  373. package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/generated-types.js.map +1 -0
  374. package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/index.d.ts +5 -0
  375. package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/index.js +16 -0
  376. package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/index.js.map +1 -0
  377. package/dist/destinations/tiktok-conversions-sandbox/utils.d.ts +4 -0
  378. package/dist/destinations/tiktok-conversions-sandbox/utils.js +65 -0
  379. package/dist/destinations/tiktok-conversions-sandbox/utils.js.map +1 -0
  380. package/dist/destinations/tiktok-offline-conversions/common_fields.js +179 -20
  381. package/dist/destinations/tiktok-offline-conversions/common_fields.js.map +1 -1
  382. package/dist/destinations/tiktok-offline-conversions/formatter.d.ts +1 -0
  383. package/dist/destinations/tiktok-offline-conversions/formatter.js +11 -1
  384. package/dist/destinations/tiktok-offline-conversions/formatter.js.map +1 -1
  385. package/dist/destinations/tiktok-offline-conversions/index.js +156 -153
  386. package/dist/destinations/tiktok-offline-conversions/index.js.map +1 -1
  387. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.d.ts +3 -3
  388. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js +4 -305
  389. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js.map +1 -1
  390. package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/generated-types.d.ts +25 -2
  391. package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/index.js +4 -29
  392. package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/index.js.map +1 -1
  393. package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/generated-types.d.ts +18 -5
  394. package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/index.js +5 -126
  395. package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/index.js.map +1 -1
  396. package/dist/destinations/tiktok-offline-conversions/utils.d.ts +8 -0
  397. package/dist/destinations/tiktok-offline-conversions/utils.js +67 -0
  398. package/dist/destinations/tiktok-offline-conversions/utils.js.map +1 -0
  399. package/dist/destinations/tiktok-offline-conversions-sandbox/common_fields.d.ts +2 -0
  400. package/dist/destinations/tiktok-offline-conversions-sandbox/common_fields.js +244 -0
  401. package/dist/destinations/tiktok-offline-conversions-sandbox/common_fields.js.map +1 -0
  402. package/dist/destinations/tiktok-offline-conversions-sandbox/formatter.d.ts +3 -0
  403. package/dist/destinations/tiktok-offline-conversions-sandbox/formatter.js +43 -0
  404. package/dist/destinations/tiktok-offline-conversions-sandbox/formatter.js.map +1 -0
  405. package/dist/destinations/tiktok-offline-conversions-sandbox/generated-types.d.ts +4 -0
  406. package/dist/destinations/tiktok-offline-conversions-sandbox/generated-types.js +3 -0
  407. package/dist/destinations/tiktok-offline-conversions-sandbox/generated-types.js.map +1 -0
  408. package/dist/destinations/tiktok-offline-conversions-sandbox/index.d.ts +4 -0
  409. package/dist/destinations/tiktok-offline-conversions-sandbox/index.js +251 -0
  410. package/dist/destinations/tiktok-offline-conversions-sandbox/index.js.map +1 -0
  411. package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/generated-types.d.ts +33 -0
  412. package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/generated-types.js +3 -0
  413. package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/generated-types.js.map +1 -0
  414. package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/index.d.ts +5 -0
  415. package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/index.js +16 -0
  416. package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/index.js.map +1 -0
  417. package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/generated-types.d.ts +33 -0
  418. package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/generated-types.js +3 -0
  419. package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/generated-types.js.map +1 -0
  420. package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/index.d.ts +5 -0
  421. package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/index.js +16 -0
  422. package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/index.js.map +1 -0
  423. package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/generated-types.d.ts +33 -0
  424. package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/generated-types.js +3 -0
  425. package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/generated-types.js.map +1 -0
  426. package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/index.d.ts +5 -0
  427. package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/index.js +16 -0
  428. package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/index.js.map +1 -0
  429. package/dist/destinations/tiktok-offline-conversions-sandbox/utils.d.ts +8 -0
  430. package/dist/destinations/tiktok-offline-conversions-sandbox/utils.js +68 -0
  431. package/dist/destinations/tiktok-offline-conversions-sandbox/utils.js.map +1 -0
  432. package/dist/destinations/trackey/group.types.d.ts +11 -0
  433. package/dist/destinations/trackey/group.types.js +3 -0
  434. package/dist/destinations/trackey/group.types.js.map +1 -0
  435. package/dist/destinations/trackey/identify.types.d.ts +11 -0
  436. package/dist/destinations/trackey/identify.types.js +3 -0
  437. package/dist/destinations/trackey/identify.types.js.map +1 -0
  438. package/dist/destinations/trackey/track.types.d.ts +12 -0
  439. package/dist/destinations/trackey/track.types.js +3 -0
  440. package/dist/destinations/trackey/track.types.js.map +1 -0
  441. package/dist/destinations/webhook-audiences/index.js +1 -3
  442. package/dist/destinations/webhook-audiences/index.js.map +1 -1
  443. package/dist/destinations/yahoo-audiences/index.js +9 -1
  444. package/dist/destinations/yahoo-audiences/index.js.map +1 -1
  445. package/dist/destinations/yahoo-audiences/updateSegment/generated-types.d.ts +6 -2
  446. package/dist/destinations/yahoo-audiences/updateSegment/index.js +36 -11
  447. package/dist/destinations/yahoo-audiences/updateSegment/index.js.map +1 -1
  448. package/dist/destinations/yahoo-audiences/utils-rt.js +3 -3
  449. package/dist/destinations/yahoo-audiences/utils-rt.js.map +1 -1
  450. package/package.json +3 -3
  451. package/dist/destinations/mixpanel/utils.d.ts +0 -13
  452. package/dist/destinations/mixpanel/utils.js +0 -117
  453. package/dist/destinations/mixpanel/utils.js.map +0 -1
  454. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +0 -14
  455. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +0 -1
  456. package/dist/destinations/responsys/asyncMergePetRecords/index.js +0 -113
  457. package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +0 -1
  458. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +0 -20
  459. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +0 -1
  460. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +0 -174
  461. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +0 -1
  462. package/dist/destinations/responsys/rsp-operations.d.ts +0 -14
  463. package/dist/destinations/responsys/rsp-operations.js +0 -33
  464. package/dist/destinations/responsys/rsp-operations.js.map +0 -1
  465. package/dist/destinations/responsys/rsp-properties.js.map +0 -1
  466. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +0 -1
  467. package/dist/destinations/{responsys/asyncMergePetRecords → aggregations-io}/generated-types.js +0 -0
  468. package/dist/destinations/{responsys/asyncMergeProfileListMembers → aggregations-io/send}/generated-types.js +0 -0
  469. package/dist/destinations/{responsys/asyncMergePetRecords → aggregations-io/send}/index.d.ts +0 -0
  470. package/dist/destinations/{responsys/asyncMergeProfileListMembers → courier/postToCourier}/index.d.ts +0 -0
  471. package/dist/destinations/{tiktok-offline-conversions/reportOfflineEvent → tiktok-conversions-sandbox}/formatter.d.ts +1 -1
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const segment_properties_1 = require("../segment-properties");
4
- const properties_1 = require("../properties");
5
4
  const errors_1 = require("../errors");
6
5
  const action = {
7
6
  title: 'Send Track',
@@ -28,7 +27,7 @@ const action = {
28
27
  properties: segment_properties_1.properties,
29
28
  traits: segment_properties_1.traits
30
29
  },
31
- perform: (request, { payload, settings, features, statsContext }) => {
30
+ perform: (_request, { payload, statsContext }) => {
32
31
  if (!payload.anonymous_id && !payload.user_id) {
33
32
  throw errors_1.MissingUserOrAnonymousIdThrowableError;
34
33
  }
@@ -57,22 +56,53 @@ const action = {
57
56
  },
58
57
  properties: {
59
58
  ...payload?.properties
60
- }
59
+ },
60
+ type: 'track'
61
61
  };
62
- if (!settings.endpoint || !(settings.endpoint in properties_1.SEGMENT_ENDPOINTS)) {
63
- throw errors_1.InvalidEndpointSelectedThrowableError;
64
- }
65
- if (features && features['actions-segment-tapi-internal-enabled']) {
66
- statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendTrack']);
67
- const payload = { ...trackPayload, type: 'track' };
68
- return { batch: [payload] };
69
- }
70
- const selectedSegmentEndpoint = properties_1.SEGMENT_ENDPOINTS[settings.endpoint].url;
71
- return request(`${selectedSegmentEndpoint}/track`, {
72
- method: 'POST',
73
- json: trackPayload
62
+ statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendTrack']);
63
+ return { batch: [trackPayload] };
64
+ },
65
+ performBatch: (_request, { payload, statsContext }) => {
66
+ const trackPayload = payload.map((data) => {
67
+ if (!data.anonymous_id && !data.user_id) {
68
+ throw errors_1.MissingUserOrAnonymousIdThrowableError;
69
+ }
70
+ convertPayload(data);
74
71
  });
72
+ statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendTrack']);
73
+ console.log('sducy: ', trackPayload);
74
+ return { batch: trackPayload };
75
75
  }
76
76
  };
77
+ function convertPayload(data) {
78
+ return {
79
+ userId: data?.user_id,
80
+ anonymousId: data?.anonymous_id,
81
+ timestamp: data?.timestamp,
82
+ event: data?.event_name,
83
+ context: {
84
+ traits: {
85
+ ...data?.traits
86
+ },
87
+ app: data?.application,
88
+ campaign: data?.campaign_parameters,
89
+ device: data?.device,
90
+ ip: data?.ip_address,
91
+ locale: data?.locale,
92
+ location: data?.location,
93
+ network: data?.network,
94
+ os: data?.operating_system,
95
+ page: data?.page,
96
+ screen: data?.screen,
97
+ userAgent: data?.user_agent,
98
+ timezone: data?.timezone,
99
+ groupId: data?.group_id
100
+ },
101
+ properties: {
102
+ ...data?.properties
103
+ },
104
+ type: 'track'
105
+ };
106
+ }
77
107
  exports.default = action;
78
108
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendTrack/index.ts"],"names":[],"mappings":";;AAGA,8DAoB8B;AAC9B,8CAAiD;AACjD,sCAAyG;AAEzG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,iGAAiG;IAC9G,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,SAAS,EAAT,8BAAS;QACT,UAAU,EAAV,+BAAU;QACV,WAAW,EAAX,gCAAW;QACX,mBAAmB,EAAnB,wCAAmB;QACnB,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,QAAQ,EAAR,6BAAQ;QACR,OAAO,EAAP,4BAAO;QACP,gBAAgB,EAAhB,qCAAgB;QAChB,IAAI,EAAJ,yBAAI;QACJ,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,QAAQ,EAAR,6BAAQ;QACR,QAAQ,EAAR,6BAAQ;QACR,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;KACP;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE;QAClE,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YAC7C,MAAM,+CAAsC,CAAA;SAC7C;QAED,MAAM,YAAY,GAAW;YAC3B,MAAM,EAAE,OAAO,EAAE,OAAO;YACxB,WAAW,EAAE,OAAO,EAAE,YAAY;YAClC,SAAS,EAAE,OAAO,EAAE,SAAS;YAC7B,KAAK,EAAE,OAAO,EAAE,UAAU;YAC1B,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,GAAG,OAAO,EAAE,M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AA;QAC/F,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;QAEpC,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,CAAA;IAChC,CAAC;CACF,CAAA;AAED,SAAS,cAAc,CAAC,IAAa;IACnC,OAAO;QACL,MAAM,EAAE,IAAI,EAAE,OAAO;QACrB,WAAW,EAAE,IAAI,EAAE,YAAY;QAC/B,SAAS,EAAE,IAAI,EAAE,SAAS;QAC1B,KAAK,EAAE,IAAI,EAAE,UAAU;QACvB,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,GAAG,IAAI,EAAE,MAAM;aAChB;YACD,GAAG,EAAE,IAAI,EAAE,WAAW;YACtB,QAAQ,EAAE,IAAI,EAAE,mBAAmB;YACnC,MAAM,EAAE,IAAI,EAAE,MAAM;YACpB,EAAE,EAAE,IAAI,EAAE,UAAU;YACpB,MAAM,EAAE,IAAI,EAAE,MAAM;YACpB,QAAQ,EAAE,IAAI,EAAE,QAAQ;YACxB,OAAO,EAAE,IAAI,EAAE,OAAO;YACtB,EAAE,EAAE,IAAI,EAAE,gBAAgB;YAC1B,IAAI,EAAE,IAAI,EAAE,IAAI;YAChB,MAAM,EAAE,IAAI,EAAE,MAAM;YACpB,SAAS,EAAE,IAAI,EAAE,UAAU;YAC3B,QAAQ,EAAE,IAAI,EAAE,QAAQ;YACxB,OAAO,EAAE,IAAI,EAAE,QAAQ;SACxB;QACD,UAAU,EAAE;YACV,GAAG,IAAI,EAAE,UAAU;SACpB;QACD,IAAI,EAAE,OAAO;KACd,CAAA;AACH,CAAC;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,33 @@
1
+ export interface Payload {
2
+ user_id: string;
3
+ event_type?: string;
4
+ ip_fwd?: string;
5
+ title?: string;
6
+ url?: string;
7
+ referrer?: string;
8
+ utm_source?: string;
9
+ user_agent?: string;
10
+ email?: string;
11
+ phone?: string;
12
+ first_name?: string;
13
+ last_name?: string;
14
+ ecommerce_data?: {
15
+ action?: string;
16
+ revenue?: number;
17
+ order_id?: string;
18
+ product_price?: number;
19
+ product_quantity?: number;
20
+ product_id?: string;
21
+ product_category?: string;
22
+ product_name?: string;
23
+ [k: string]: unknown;
24
+ };
25
+ ecommerce_products?: {
26
+ product_price?: number;
27
+ product_quantity?: number;
28
+ product_id?: string;
29
+ product_category?: string;
30
+ product_name?: string;
31
+ [k: string]: unknown;
32
+ }[];
33
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/stackadapt/forwardEvent/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,273 @@
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 isEmpty_1 = __importDefault(require("lodash/isEmpty"));
7
+ const action = {
8
+ title: 'Forward Event',
9
+ description: 'Forward Segment events to StackAdapt for conversion tracking',
10
+ defaultSubscription: 'type = "identify" or type = "page" or type = "screen" or type = "track"',
11
+ fields: {
12
+ user_id: {
13
+ label: 'Segment User ID',
14
+ description: 'The ID of the user in Segment',
15
+ type: 'string',
16
+ required: true,
17
+ default: {
18
+ '@if': {
19
+ exists: { '@path': '$.userId' },
20
+ then: { '@path': '$.userId' },
21
+ else: { '@path': '$.anonymousId' }
22
+ }
23
+ }
24
+ },
25
+ event_type: {
26
+ label: 'Event Type',
27
+ description: 'The Segment event type (page, track, etc.)',
28
+ type: 'string',
29
+ default: {
30
+ '@path': '$.type'
31
+ }
32
+ },
33
+ ip_fwd: {
34
+ description: 'IP address of the user',
35
+ label: 'IP Address',
36
+ type: 'string',
37
+ default: {
38
+ '@path': '$.context.ip'
39
+ }
40
+ },
41
+ title: {
42
+ type: 'string',
43
+ description: 'The title of the page where the event occurred.',
44
+ label: 'Page Title',
45
+ default: { '@path': '$.context.page.title' }
46
+ },
47
+ url: {
48
+ type: 'string',
49
+ description: 'The URL of the page where the event occurred.',
50
+ label: 'URL',
51
+ default: { '@path': '$.context.page.url' }
52
+ },
53
+ referrer: {
54
+ type: 'string',
55
+ description: 'The referrer of the page where the event occurred.',
56
+ label: 'Referrer',
57
+ default: { '@path': '$.context.page.referrer' }
58
+ },
59
+ utm_source: {
60
+ type: 'string',
61
+ format: 'text',
62
+ label: 'UTM Source',
63
+ description: 'UTM source parameter associated with event',
64
+ default: { '@path': '$.context.campaign.source' }
65
+ },
66
+ user_agent: {
67
+ description: 'User-Agent of the user',
68
+ label: 'User Agent',
69
+ type: 'string',
70
+ default: {
71
+ '@path': '$.context.userAgent'
72
+ }
73
+ },
74
+ email: {
75
+ label: 'Email',
76
+ description: 'Email address of the individual who triggered the event.',
77
+ type: 'string',
78
+ format: 'email',
79
+ default: {
80
+ '@if': {
81
+ exists: { '@path': '$.traits.email' },
82
+ then: { '@path': '$.traits.email' },
83
+ else: { '@path': '$.properties.email' }
84
+ }
85
+ }
86
+ },
87
+ phone: {
88
+ label: 'Phone Number',
89
+ description: 'Phone number of the individual who triggered the event',
90
+ type: 'string',
91
+ default: {
92
+ '@if': {
93
+ exists: { '@path': '$.traits.phone' },
94
+ then: { '@path': '$.traits.phone' },
95
+ else: { '@path': '$.properties.phone' }
96
+ }
97
+ }
98
+ },
99
+ first_name: {
100
+ label: 'First Name',
101
+ description: 'First name of the individual who triggered the event.',
102
+ type: 'string',
103
+ default: {
104
+ '@if': {
105
+ exists: { '@path': '$.traits.first_name' },
106
+ then: { '@path': '$.traits.first_name' },
107
+ else: { '@path': '$.properties.first_name' }
108
+ }
109
+ }
110
+ },
111
+ last_name: {
112
+ label: 'Last Name',
113
+ description: 'Last name of the individual who triggered the event.',
114
+ type: 'string',
115
+ default: {
116
+ '@if': {
117
+ exists: { '@path': '$.traits.last_name' },
118
+ then: { '@path': '$.traits.last_name' },
119
+ else: { '@path': '$.properties.last_name' }
120
+ }
121
+ }
122
+ },
123
+ ecommerce_data: {
124
+ label: 'Ecommerce Data',
125
+ description: 'Additional ecommerce fields that are included in the pixel payload.',
126
+ type: 'object',
127
+ additionalProperties: true,
128
+ properties: {
129
+ action: {
130
+ label: 'Event Name',
131
+ description: 'The event name (e.g. Order Completed)',
132
+ type: 'string'
133
+ },
134
+ revenue: {
135
+ label: 'Revenue',
136
+ type: 'number',
137
+ description: 'The revenue generated from the event.'
138
+ },
139
+ order_id: {
140
+ label: 'Order ID',
141
+ type: 'string',
142
+ description: 'The ID of the order.'
143
+ },
144
+ product_price: {
145
+ label: 'Price',
146
+ type: 'number',
147
+ description: 'The price of the product.'
148
+ },
149
+ product_quantity: {
150
+ label: 'Quantity',
151
+ type: 'integer',
152
+ description: 'The quantity of the product.'
153
+ },
154
+ product_id: {
155
+ label: 'Product ID',
156
+ type: 'string',
157
+ description: 'An identifier for the product.'
158
+ },
159
+ product_category: {
160
+ label: 'Product Category',
161
+ type: 'string',
162
+ description: 'A category for the product.'
163
+ },
164
+ product_name: {
165
+ label: 'Product Name',
166
+ type: 'string',
167
+ description: 'The name of the product.'
168
+ }
169
+ },
170
+ default: {
171
+ action: { '@path': '$.event' },
172
+ revenue: { '@path': '$.properties.revenue' },
173
+ order_id: { '@path': '$.properties.order_id' },
174
+ product_price: { '@path': '$.properties.price' },
175
+ product_quantity: { '@path': '$.properties.quantity' },
176
+ product_id: { '@path': '$.properties.product_id' },
177
+ product_category: { '@path': '$.properties.category' },
178
+ product_name: { '@path': '$.properties.name' }
179
+ }
180
+ },
181
+ ecommerce_products: {
182
+ label: 'Products',
183
+ description: 'The list of products associated with the event (for events with multiple products, such as Order Completed)',
184
+ type: 'object',
185
+ multiple: true,
186
+ additionalProperties: true,
187
+ properties: {
188
+ product_price: {
189
+ label: 'Price',
190
+ type: 'number',
191
+ description: 'The price of the product.'
192
+ },
193
+ product_quantity: {
194
+ label: 'Quantity',
195
+ type: 'integer',
196
+ description: 'The quantity of the product.'
197
+ },
198
+ product_id: {
199
+ label: 'Product ID',
200
+ type: 'string',
201
+ description: 'An identifier for the product.'
202
+ },
203
+ product_category: {
204
+ label: 'Product Category',
205
+ type: 'string',
206
+ description: 'A category for the product.'
207
+ },
208
+ product_name: {
209
+ label: 'Product Name',
210
+ type: 'string',
211
+ description: 'The name of the product.'
212
+ }
213
+ },
214
+ default: {
215
+ '@arrayPath': [
216
+ '$.properties.products',
217
+ {
218
+ product_price: {
219
+ '@path': 'price'
220
+ },
221
+ product_quantity: {
222
+ '@path': 'quantity'
223
+ },
224
+ product_id: {
225
+ '@path': 'product_id'
226
+ },
227
+ product_category: {
228
+ '@path': 'category'
229
+ },
230
+ product_name: {
231
+ '@path': 'name'
232
+ }
233
+ }
234
+ ]
235
+ }
236
+ }
237
+ },
238
+ perform: async (request, { payload, settings }) => {
239
+ return request(`https://tags.srv.stackadapt.com/saq_pxl`, {
240
+ method: 'GET',
241
+ searchParams: getAvailableData(payload, settings),
242
+ headers: {
243
+ 'Content-Type': 'application/json',
244
+ 'X-Forwarded-For': payload.ip_fwd ?? '',
245
+ 'User-Agent': payload.user_agent ?? ''
246
+ }
247
+ });
248
+ }
249
+ };
250
+ function getAvailableData(payload, settings) {
251
+ const ecommerceData = {
252
+ ...payload.ecommerce_data,
253
+ ...(!isEmpty_1.default(payload.ecommerce_products) && { products: payload.ecommerce_products })
254
+ };
255
+ return {
256
+ segment_ss: '1',
257
+ event_type: payload.event_type ?? '',
258
+ title: payload.title ?? '',
259
+ url: payload.url ?? '',
260
+ ref: payload.referrer ?? '',
261
+ ip_fwd: payload.ip_fwd ?? '',
262
+ utm_source: payload.utm_source ?? '',
263
+ user_id: payload.user_id,
264
+ uid: settings.pixelId,
265
+ first_name: payload.first_name ?? '',
266
+ last_name: payload.last_name ?? '',
267
+ email: payload.email ?? '',
268
+ phone: payload.phone ?? '',
269
+ ...(!isEmpty_1.default(ecommerceData) && { args: JSON.stringify(ecommerceData) })
270
+ };
271
+ }
272
+ exports.default = action;
273
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/stackadapt/forwardEvent/index.ts"],"names":[],"mappings":";;;;;AAGA,6DAAoC;AAEpC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,8DAA8D;IAC3E,mBAAmB,EAAE,yEAAyE;IAC9F,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,+BAA+B;YAC5C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBAGP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;iBACnC;aACF;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,4CAA4C;YACzD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,QAAQ;aAClB;SACF;QACD,MAAM,EAAE;YACN,WAAW,EAAE,wBAAwB;YACrC,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iDAAiD;YAC9D,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE;SAC7C;QACD,GAAG,EAAE;YACH,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,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,EAAE;QACpC,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,EAAE;QAC1B,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,EAAE;QACtB,GAAG,EAAE,OAAO,CAAC,QAAQ,IAAI,EAAE;QAC3B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;QAC5B,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,EAAE;QACpC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,GAAG,EAAE,QAAQ,CAAC,OAAO;QACrB,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,EAAE;QACpC,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,EAAE;QAClC,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,EAAE;QAC1B,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,EAAE;QAC1B,GAAG,CAAC,CAAC,iBAAO,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC;KACxE,CAAA;AACH,CAAC;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,3 @@
1
+ export interface Settings {
2
+ pixelId: 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/stackadapt/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,38 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const actions_core_1 = require("@segment/actions-core");
7
+ const forwardEvent_1 = __importDefault(require("./forwardEvent"));
8
+ const destination = {
9
+ name: 'StackAdapt Cloud (Actions)',
10
+ slug: 'actions-stackadapt-cloud',
11
+ mode: 'cloud',
12
+ description: 'Forward Segment events to StackAdapt for tracking ad conversions, and generating lookalike and retargeting Audiences',
13
+ authentication: {
14
+ scheme: 'custom',
15
+ fields: {
16
+ pixelId: {
17
+ label: 'Universal Pixel ID',
18
+ description: 'Your StackAdapt Universal Pixel ID',
19
+ type: 'string',
20
+ required: true
21
+ }
22
+ }
23
+ },
24
+ presets: [
25
+ {
26
+ name: 'Forward Event',
27
+ subscribe: 'type = "identify" or type = "page" or type = "screen" or type = "track"',
28
+ partnerAction: 'forwardEvent',
29
+ mapping: actions_core_1.defaultValues(forwardEvent_1.default.fields),
30
+ type: 'automatic'
31
+ }
32
+ ],
33
+ actions: {
34
+ forwardEvent: forwardEvent_1.default
35
+ }
36
+ };
37
+ exports.default = destination;
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/stackadapt/index.ts"],"names":[],"mappings":";;;;;AAGA,wDAAqD;AACrD,kEAAyC;AAEzC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,OAAO;IACb,WAAW,EACT,sHAAsH;IACxH,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,KAAK,EAAE,oBAAoB;gBAC3B,WAAW,EAAE,oCAAoC;gBACjD,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,yEAAyE;YACpF,aAAa,EAAE,cAAc;YAC7B,OAAO,EAAE,4BAAa,CAAC,sBAAY,CAAC,MAAM,CAAC;YAC3C,IAAI,EAAE,WAAW;SAClB;KACF;IACD,OAAO,EAAE;QACP,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,10 @@
1
+ export interface Payload {
2
+ full_name?: string;
3
+ phone?: string;
4
+ mobile?: string;
5
+ email?: string;
6
+ job_title?: string;
7
+ custom_fields?: {
8
+ [k: string]: unknown;
9
+ };
10
+ }
@@ -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/surveysparrow/createContact/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const actions_core_1 = require("@segment/actions-core");
4
+ const action = {
5
+ title: 'Create or Update Contact in SurveySparrow',
6
+ defaultSubscription: 'type=identify',
7
+ description: 'This Action will create a new Contact or update an existing Contact in SurveySparrow. One of Email or Mobile are mandatory when creating a Contact.',
8
+ fields: {
9
+ full_name: {
10
+ label: 'Name',
11
+ type: 'string',
12
+ description: 'Full name of the Contact',
13
+ default: {
14
+ '@if': {
15
+ exists: { '@path': '$.properties.name' },
16
+ then: { '@path': '$.properties.name' },
17
+ else: { '@path': '$.context.traits.name' }
18
+ }
19
+ }
20
+ },
21
+ phone: {
22
+ label: 'Phone',
23
+ type: 'string',
24
+ description: 'Non Mobile Phone number for the Contact. This should include + followed by Country Code. For Example, +18004810410',
25
+ default: {
26
+ '@if': {
27
+ exists: { '@path': '$.properties.phone' },
28
+ then: { '@path': '$.properties.phone' },
29
+ else: { '@path': '$.context.traits.phone' }
30
+ }
31
+ }
32
+ },
33
+ mobile: {
34
+ label: 'Mobile',
35
+ type: 'string',
36
+ description: 'Mobile number for the Contact. This should include + followed by Country Code. For Example, +18004810410',
37
+ default: {
38
+ '@if': {
39
+ exists: { '@path': '$.properties.mobile' },
40
+ then: { '@path': '$.properties.mobile' },
41
+ else: { '@path': '$.context.traits.mobile' }
42
+ }
43
+ }
44
+ },
45
+ email: {
46
+ label: 'Email',
47
+ type: 'string',
48
+ format: 'email',
49
+ description: 'Email Address for the Contact',
50
+ default: {
51
+ '@if': {
52
+ exists: { '@path': '$.properties.email' },
53
+ then: { '@path': '$.properties.email' },
54
+ else: { '@path': '$.context.traits.email' }
55
+ }
56
+ }
57
+ },
58
+ job_title: {
59
+ label: 'Job Title',
60
+ type: 'string',
61
+ description: 'Job Title for the Contact',
62
+ default: {
63
+ '@if': {
64
+ exists: { '@path': '$.properties.job_title' },
65
+ then: { '@path': '$.properties.job_title' },
66
+ else: { '@path': '$.context.traits.job_title' }
67
+ }
68
+ }
69
+ },
70
+ custom_fields: {
71
+ label: 'Custom Contact Properties',
72
+ type: 'object',
73
+ defaultObjectUI: 'keyvalue',
74
+ description: 'Key:Value Custom Properties to be added to the Contact in SurveySparrow. [Contact Property](https://support.surveysparrow.com/hc/en-us/articles/7078996288925-How-to-add-custom-properties-to-your-contact) should be created in SurveySparrow in advance.',
75
+ default: {
76
+ '@if': {
77
+ exists: { '@path': '$.properties.custom_fields' },
78
+ then: { '@path': '$.properties.custom_fields' },
79
+ else: { '@path': '$.context.traits.custom_fields' }
80
+ }
81
+ }
82
+ }
83
+ },
84
+ perform: (request, { payload }) => {
85
+ if (payload.email || payload.mobile) {
86
+ const transformedPayload = {
87
+ full_name: payload.full_name,
88
+ phone: payload.phone,
89
+ mobile: payload.mobile,
90
+ email: payload.email,
91
+ job_title: payload.job_title,
92
+ ...payload.custom_fields
93
+ };
94
+ return request('https://api.surveysparrow.com/v3/contacts', {
95
+ method: 'post',
96
+ json: transformedPayload
97
+ });
98
+ }
99
+ else {
100
+ throw new actions_core_1.PayloadValidationError('Either Email or Mobile are required');
101
+ }
102
+ }
103
+ };
104
+ exports.default = action;
105
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/surveysparrow/createContact/index.ts"],"names":[],"mappings":";;AAAA,wDAAgF;AAIhF,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,2CAA2C;IAClD,mBAAmB,EAAE,eAAe;IACpC,WAAW,EACT,qJAAqJ;IACvJ,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0BAA0B;YACvC,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;oBACxC,IAAI,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;oBACtC,IAAI,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE;iBAC3C;aACF;SACF;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,oHAAoH;YACtH,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBACzC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBACvC,IAAI,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;iBAC5C;aACF;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0GAA0G;YAC5G,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;oBAC1C,IAAI,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;oBACxC,IA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,KAAK;gBACpB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,GAAG,OAAO,CAAC,aAAa;aACzB,CAAA;YACD,OAAO,OAAO,CAAC,2CAA2C,EAAE;gBAC1D,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,kBAAkB;aACzB,CAAC,CAAA;SACH;aAAM;YACL,MAAM,IAAI,qCAAsB,CAAC,qCAAqC,CAAC,CAAA;SACxE;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,3 @@
1
+ export interface Settings {
2
+ apiToken: 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/surveysparrow/generated-types.ts"],"names":[],"mappings":""}