@segment/action-destinations 3.118.1-staging.97 → 3.119.1-cli-test.63

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 (333) hide show
  1. package/README.md +1 -1
  2. package/dist/destinations/actable-predictive/index.js +1 -1
  3. package/dist/destinations/actable-predictive/index.js.map +1 -1
  4. package/dist/destinations/actable-predictive/sendCustomEvent/index.js +13 -13
  5. package/dist/destinations/actable-predictive/sendCustomEvent/index.js.map +1 -1
  6. package/dist/destinations/actable-predictive/sendEmailEvent/index.js +21 -21
  7. package/dist/destinations/actable-predictive/sendEmailEvent/index.js.map +1 -1
  8. package/dist/destinations/actable-predictive/sendTransactionEvent/index.js +29 -29
  9. package/dist/destinations/actable-predictive/sendTransactionEvent/index.js.map +1 -1
  10. package/dist/destinations/actable-predictive/sendWebEvent/index.js +26 -26
  11. package/dist/destinations/actable-predictive/sendWebEvent/index.js.map +1 -1
  12. package/dist/destinations/adobe-target/adobeTarget_operations.d.ts +2 -1
  13. package/dist/destinations/adobe-target/adobeTarget_operations.js +8 -4
  14. package/dist/destinations/adobe-target/adobeTarget_operations.js.map +1 -1
  15. package/dist/destinations/adobe-target/updateProfile/index.js +3 -11
  16. package/dist/destinations/adobe-target/updateProfile/index.js.map +1 -1
  17. package/dist/destinations/braze/updateUserProfile/index.js +0 -1
  18. package/dist/destinations/braze/updateUserProfile/index.js.map +1 -1
  19. package/dist/destinations/braze-cohorts/api/index.d.ts +15 -0
  20. package/dist/destinations/braze-cohorts/api/index.js +36 -0
  21. package/dist/destinations/braze-cohorts/api/index.js.map +1 -0
  22. package/dist/destinations/braze-cohorts/braze-cohorts-types.d.ts +10 -0
  23. package/dist/destinations/braze-cohorts/braze-cohorts-types.js +3 -0
  24. package/dist/destinations/braze-cohorts/braze-cohorts-types.js.map +1 -0
  25. package/dist/destinations/braze-cohorts/generated-types.d.ts +4 -0
  26. package/dist/destinations/{actions-bingads → braze-cohorts}/generated-types.js +0 -0
  27. package/dist/destinations/braze-cohorts/generated-types.js.map +1 -0
  28. package/dist/destinations/{actions-bingads → braze-cohorts}/index.d.ts +0 -0
  29. package/dist/destinations/braze-cohorts/index.js +53 -0
  30. package/dist/destinations/braze-cohorts/index.js.map +1 -0
  31. package/dist/destinations/braze-cohorts/syncAudiences/generated-types.d.ts +16 -0
  32. package/dist/destinations/{actions-bingads/offlineConversions → braze-cohorts/syncAudiences}/generated-types.js +0 -0
  33. package/dist/destinations/braze-cohorts/syncAudiences/generated-types.js.map +1 -0
  34. package/dist/destinations/{google-sheets-partner/postSheet → braze-cohorts/syncAudiences}/index.d.ts +0 -0
  35. package/dist/destinations/braze-cohorts/syncAudiences/index.js +158 -0
  36. package/dist/destinations/braze-cohorts/syncAudiences/index.js.map +1 -0
  37. package/dist/destinations/clevertap/userDelete/index.js +4 -4
  38. package/dist/destinations/clevertap/userDelete/index.js.map +1 -1
  39. package/dist/destinations/customerio/createUpdateObject/generated-types.d.ts +11 -0
  40. package/dist/destinations/{google-sheets-partner → customerio/createUpdateObject}/generated-types.js +0 -0
  41. package/dist/destinations/customerio/createUpdateObject/generated-types.js.map +1 -0
  42. package/dist/destinations/{actions-bingads/offlineConversions → customerio/createUpdateObject}/index.d.ts +0 -0
  43. package/dist/destinations/customerio/createUpdateObject/index.js +102 -0
  44. package/dist/destinations/customerio/createUpdateObject/index.js.map +1 -0
  45. package/dist/destinations/customerio/createUpdatePerson/generated-types.d.ts +2 -0
  46. package/dist/destinations/customerio/createUpdatePerson/index.js +24 -0
  47. package/dist/destinations/customerio/createUpdatePerson/index.js.map +1 -1
  48. package/dist/destinations/customerio/index.js +9 -1
  49. package/dist/destinations/customerio/index.js.map +1 -1
  50. package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.d.ts +1 -0
  51. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +12 -0
  52. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -1
  53. package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.d.ts +1 -0
  54. package/dist/destinations/engage-messaging-twilio/sendSms/index.js +12 -0
  55. package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
  56. package/dist/destinations/facebook-conversions-api/addToCart/index.js +2 -1
  57. package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
  58. package/dist/destinations/facebook-conversions-api/custom/index.js +2 -1
  59. package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
  60. package/dist/destinations/facebook-conversions-api/generated-types.d.ts +1 -0
  61. package/dist/destinations/facebook-conversions-api/index.js +7 -1
  62. package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
  63. package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js +2 -1
  64. package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
  65. package/dist/destinations/facebook-conversions-api/pageView/index.js +2 -1
  66. package/dist/destinations/facebook-conversions-api/pageView/index.js.map +1 -1
  67. package/dist/destinations/facebook-conversions-api/purchase/index.js +2 -1
  68. package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
  69. package/dist/destinations/facebook-conversions-api/search/index.js +2 -1
  70. package/dist/destinations/facebook-conversions-api/search/index.js.map +1 -1
  71. package/dist/destinations/facebook-conversions-api/viewContent/index.js +2 -1
  72. package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
  73. package/dist/destinations/google-analytics-4/selectPromotion/index.js +0 -3
  74. package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
  75. package/dist/destinations/google-analytics-4/viewItem/index.js +1 -13
  76. package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
  77. package/dist/destinations/google-enhanced-conversions/index.js +1 -1
  78. package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
  79. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +2 -1
  80. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
  81. package/dist/destinations/{google-sheets-partner → google-sheets-dev}/generated-types.d.ts +0 -0
  82. package/dist/destinations/{google-sheets-partner/postSheet → google-sheets-dev}/generated-types.js +0 -0
  83. package/dist/destinations/google-sheets-dev/generated-types.js.map +1 -0
  84. package/dist/destinations/{google-sheets-partner → google-sheets-dev}/index.d.ts +0 -0
  85. package/dist/destinations/{google-sheets-partner → google-sheets-dev}/index.js +5 -7
  86. package/dist/destinations/google-sheets-dev/index.js.map +1 -0
  87. package/dist/destinations/{google-sheets-partner/postSheet/generated-types.d.ts → google-sheets-dev/postSheet.types.d.ts} +0 -0
  88. package/dist/destinations/google-sheets-dev/postSheet.types.js +3 -0
  89. package/dist/destinations/google-sheets-dev/postSheet.types.js.map +1 -0
  90. package/dist/destinations/heap/constants.d.ts +1 -1
  91. package/dist/destinations/heap/constants.js +2 -2
  92. package/dist/destinations/heap/constants.js.map +1 -1
  93. package/dist/destinations/heap/index.js +1 -1
  94. package/dist/destinations/heap/index.js.map +1 -1
  95. package/dist/destinations/heap/trackEvent/generated-types.d.ts +4 -2
  96. package/dist/destinations/heap/trackEvent/index.js +44 -15
  97. package/dist/destinations/heap/trackEvent/index.js.map +1 -1
  98. package/dist/destinations/hubspot/errors.js +1 -1
  99. package/dist/destinations/hubspot/errors.js.map +1 -1
  100. package/dist/destinations/hubspot/helperFunctions.d.ts +7 -0
  101. package/dist/destinations/hubspot/helperFunctions.js +27 -0
  102. package/dist/destinations/hubspot/helperFunctions.js.map +1 -0
  103. package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +2 -1
  104. package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
  105. package/dist/destinations/hubspot/upsertCompany/generated-types.d.ts +4 -2
  106. package/dist/destinations/hubspot/upsertCompany/index.js +28 -14
  107. package/dist/destinations/hubspot/upsertCompany/index.js.map +1 -1
  108. package/dist/destinations/hubspot/upsertContact/index.js +4 -7
  109. package/dist/destinations/hubspot/upsertContact/index.js.map +1 -1
  110. package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js +2 -1
  111. package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js.map +1 -1
  112. package/dist/destinations/index.js +7 -3
  113. package/dist/destinations/index.js.map +1 -1
  114. package/dist/destinations/ironclad/RecordAction/generated-types.d.ts +12 -0
  115. package/dist/destinations/ironclad/RecordAction/generated-types.js +3 -0
  116. package/dist/destinations/ironclad/RecordAction/generated-types.js.map +1 -0
  117. package/dist/destinations/ironclad/RecordAction/index.d.ts +5 -0
  118. package/dist/destinations/ironclad/RecordAction/index.js +117 -0
  119. package/dist/destinations/ironclad/RecordAction/index.js.map +1 -0
  120. package/dist/destinations/ironclad/generated-types.d.ts +5 -0
  121. package/dist/destinations/ironclad/generated-types.js +3 -0
  122. package/dist/destinations/ironclad/generated-types.js.map +1 -0
  123. package/dist/destinations/ironclad/index.d.ts +4 -0
  124. package/dist/destinations/ironclad/index.js +42 -0
  125. package/dist/destinations/ironclad/index.js.map +1 -0
  126. package/dist/destinations/mixpanel/index.js +1 -1
  127. package/dist/destinations/mixpanel/mixpanel-properties.js.map +1 -1
  128. package/dist/destinations/mixpanel/trackEvent/functions.js +1 -1
  129. package/dist/destinations/mixpanel/trackEvent/functions.js.map +1 -1
  130. package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
  131. package/dist/destinations/mixpanel/trackPurchase/index.js.map +1 -1
  132. package/dist/destinations/mixpanel/utils.js +1 -1
  133. package/dist/destinations/mixpanel/utils.js.map +1 -1
  134. package/dist/destinations/pipedrive/createUpdateActivity/index.js +44 -17
  135. package/dist/destinations/pipedrive/createUpdateActivity/index.js.map +1 -1
  136. package/dist/destinations/pipedrive/createUpdateDeal/index.js +35 -11
  137. package/dist/destinations/pipedrive/createUpdateDeal/index.js.map +1 -1
  138. package/dist/destinations/pipedrive/createUpdateLead/generated-types.d.ts +3 -8
  139. package/dist/destinations/pipedrive/createUpdateLead/index.js +54 -27
  140. package/dist/destinations/pipedrive/createUpdateLead/index.js.map +1 -1
  141. package/dist/destinations/pipedrive/createUpdateNote/generated-types.d.ts +1 -1
  142. package/dist/destinations/pipedrive/createUpdateNote/index.js +22 -13
  143. package/dist/destinations/pipedrive/createUpdateNote/index.js.map +1 -1
  144. package/dist/destinations/pipedrive/createUpdateOrganization/index.js +9 -3
  145. package/dist/destinations/pipedrive/createUpdateOrganization/index.js.map +1 -1
  146. package/dist/destinations/pipedrive/createUpdatePerson/index.js +15 -3
  147. package/dist/destinations/pipedrive/createUpdatePerson/index.js.map +1 -1
  148. package/dist/destinations/pipedrive/index.d.ts +1 -1
  149. package/dist/destinations/pipedrive/index.js +22 -1
  150. package/dist/destinations/pipedrive/index.js.map +1 -1
  151. package/dist/destinations/pipedrive/pipedriveApi/leads.d.ts +5 -1
  152. package/dist/destinations/pipedrive/pipedriveApi/leads.js.map +1 -1
  153. package/dist/destinations/pipedrive/pipedriveApi/notes.d.ts +1 -1
  154. package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.d.ts +2 -1
  155. package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.js +14 -2
  156. package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.js.map +1 -1
  157. package/dist/destinations/ripe/generated-types.d.ts +4 -0
  158. package/dist/destinations/ripe/generated-types.js +3 -0
  159. package/dist/destinations/ripe/generated-types.js.map +1 -0
  160. package/dist/destinations/ripe/group/generated-types.d.ts +10 -0
  161. package/dist/destinations/ripe/group/generated-types.js +3 -0
  162. package/dist/destinations/ripe/group/generated-types.js.map +1 -0
  163. package/dist/destinations/ripe/group/index.d.ts +5 -0
  164. package/dist/destinations/ripe/group/index.js +68 -0
  165. package/dist/destinations/ripe/group/index.js.map +1 -0
  166. package/dist/destinations/ripe/identify/generated-types.d.ts +10 -0
  167. package/dist/destinations/ripe/identify/generated-types.js +3 -0
  168. package/dist/destinations/ripe/identify/generated-types.js.map +1 -0
  169. package/dist/destinations/ripe/identify/index.d.ts +5 -0
  170. package/dist/destinations/ripe/identify/index.js +70 -0
  171. package/dist/destinations/ripe/identify/index.js.map +1 -0
  172. package/dist/destinations/ripe/index.d.ts +4 -0
  173. package/dist/destinations/ripe/index.js +83 -0
  174. package/dist/destinations/ripe/index.js.map +1 -0
  175. package/dist/destinations/ripe/page/generated-types.d.ts +16 -0
  176. package/dist/destinations/ripe/page/generated-types.js +3 -0
  177. package/dist/destinations/ripe/page/generated-types.js.map +1 -0
  178. package/dist/destinations/ripe/page/index.d.ts +5 -0
  179. package/dist/destinations/ripe/page/index.js +153 -0
  180. package/dist/destinations/ripe/page/index.js.map +1 -0
  181. package/dist/destinations/ripe/track/generated-types.d.ts +11 -0
  182. package/dist/destinations/ripe/track/generated-types.js +3 -0
  183. package/dist/destinations/ripe/track/generated-types.js.map +1 -0
  184. package/dist/destinations/ripe/track/index.d.ts +5 -0
  185. package/dist/destinations/ripe/track/index.js +79 -0
  186. package/dist/destinations/ripe/track/index.js.map +1 -0
  187. package/dist/destinations/salesforce/lead/index.js +6 -6
  188. package/dist/destinations/salesforce/lead/index.js.map +1 -1
  189. package/dist/destinations/salesforce/sf-operations.js +17 -6
  190. package/dist/destinations/salesforce/sf-operations.js.map +1 -1
  191. package/dist/destinations/salesforce/sf-properties.d.ts +0 -1
  192. package/dist/destinations/salesforce/sf-properties.js +2 -2
  193. package/dist/destinations/salesforce/sf-properties.js.map +1 -1
  194. package/dist/destinations/salesforce/sf-utils.js +3 -1
  195. package/dist/destinations/salesforce/sf-utils.js.map +1 -1
  196. package/dist/destinations/saleswings/api.d.ts +35 -0
  197. package/dist/destinations/saleswings/api.js +19 -0
  198. package/dist/destinations/saleswings/api.js.map +1 -0
  199. package/dist/destinations/saleswings/common.d.ts +5 -0
  200. package/dist/destinations/saleswings/common.js +37 -0
  201. package/dist/destinations/saleswings/common.js.map +1 -0
  202. package/dist/destinations/saleswings/converter.d.ts +12 -0
  203. package/dist/destinations/saleswings/converter.js +34 -0
  204. package/dist/destinations/saleswings/converter.js.map +1 -0
  205. package/dist/destinations/saleswings/fields.d.ts +12 -0
  206. package/dist/destinations/saleswings/fields.js +102 -0
  207. package/dist/destinations/saleswings/fields.js.map +1 -0
  208. package/dist/destinations/saleswings/generated-types.d.ts +3 -0
  209. package/dist/destinations/saleswings/generated-types.js +3 -0
  210. package/dist/destinations/saleswings/generated-types.js.map +1 -0
  211. package/dist/destinations/saleswings/index.d.ts +4 -0
  212. package/dist/destinations/saleswings/index.js +67 -0
  213. package/dist/destinations/saleswings/index.js.map +1 -0
  214. package/dist/destinations/saleswings/submitIdentifyEvent/generated-types.d.ts +14 -0
  215. package/dist/destinations/saleswings/submitIdentifyEvent/generated-types.js +3 -0
  216. package/dist/destinations/saleswings/submitIdentifyEvent/generated-types.js.map +1 -0
  217. package/dist/destinations/saleswings/submitIdentifyEvent/index.d.ts +5 -0
  218. package/dist/destinations/saleswings/submitIdentifyEvent/index.js +39 -0
  219. package/dist/destinations/saleswings/submitIdentifyEvent/index.js.map +1 -0
  220. package/dist/destinations/saleswings/submitPageEvent/generated-types.d.ts +8 -0
  221. package/dist/destinations/saleswings/submitPageEvent/generated-types.js +3 -0
  222. package/dist/destinations/saleswings/submitPageEvent/generated-types.js.map +1 -0
  223. package/dist/destinations/saleswings/submitPageEvent/index.d.ts +5 -0
  224. package/dist/destinations/saleswings/submitPageEvent/index.js +35 -0
  225. package/dist/destinations/saleswings/submitPageEvent/index.js.map +1 -0
  226. package/dist/destinations/saleswings/submitScreenEvent/generated-types.d.ts +14 -0
  227. package/dist/destinations/saleswings/submitScreenEvent/generated-types.js +3 -0
  228. package/dist/destinations/saleswings/submitScreenEvent/generated-types.js.map +1 -0
  229. package/dist/destinations/saleswings/submitScreenEvent/index.d.ts +5 -0
  230. package/dist/destinations/saleswings/submitScreenEvent/index.js +42 -0
  231. package/dist/destinations/saleswings/submitScreenEvent/index.js.map +1 -0
  232. package/dist/destinations/saleswings/submitTrackEvent/generated-types.d.ts +14 -0
  233. package/dist/destinations/saleswings/submitTrackEvent/generated-types.js +3 -0
  234. package/dist/destinations/saleswings/submitTrackEvent/generated-types.js.map +1 -0
  235. package/dist/destinations/saleswings/submitTrackEvent/index.d.ts +5 -0
  236. package/dist/destinations/saleswings/submitTrackEvent/index.js +42 -0
  237. package/dist/destinations/saleswings/submitTrackEvent/index.js.map +1 -0
  238. package/dist/destinations/saleswings/testing.d.ts +10 -0
  239. package/dist/destinations/saleswings/testing.js +55 -0
  240. package/dist/destinations/saleswings/testing.js.map +1 -0
  241. package/dist/destinations/segment-profiles/errors.d.ts +14 -0
  242. package/dist/destinations/segment-profiles/errors.js +10 -0
  243. package/dist/destinations/segment-profiles/errors.js.map +1 -0
  244. package/dist/destinations/segment-profiles/generated-types.d.ts +4 -0
  245. package/dist/destinations/segment-profiles/generated-types.js +3 -0
  246. package/dist/destinations/segment-profiles/generated-types.js.map +1 -0
  247. package/dist/destinations/segment-profiles/helperFunctions.d.ts +8 -0
  248. package/dist/destinations/segment-profiles/helperFunctions.js +52 -0
  249. package/dist/destinations/segment-profiles/helperFunctions.js.map +1 -0
  250. package/dist/destinations/segment-profiles/index.d.ts +4 -0
  251. package/dist/destinations/segment-profiles/index.js +50 -0
  252. package/dist/destinations/segment-profiles/index.js.map +1 -0
  253. package/dist/destinations/segment-profiles/properties.d.ts +12 -0
  254. package/dist/destinations/segment-profiles/properties.js +20 -0
  255. package/dist/destinations/segment-profiles/properties.js.map +1 -0
  256. package/dist/destinations/segment-profiles/segment-properties.d.ts +6 -0
  257. package/dist/destinations/segment-profiles/segment-properties.js +33 -0
  258. package/dist/destinations/segment-profiles/segment-properties.js.map +1 -0
  259. package/dist/destinations/segment-profiles/sendGroup/generated-types.d.ts +9 -0
  260. package/dist/destinations/segment-profiles/sendGroup/generated-types.js +3 -0
  261. package/dist/destinations/segment-profiles/sendGroup/generated-types.js.map +1 -0
  262. package/dist/destinations/segment-profiles/sendGroup/index.d.ts +5 -0
  263. package/dist/destinations/segment-profiles/sendGroup/index.js +52 -0
  264. package/dist/destinations/segment-profiles/sendGroup/index.js.map +1 -0
  265. package/dist/destinations/segment-profiles/sendIdentify/generated-types.d.ts +9 -0
  266. package/dist/destinations/segment-profiles/sendIdentify/generated-types.js +3 -0
  267. package/dist/destinations/segment-profiles/sendIdentify/generated-types.js.map +1 -0
  268. package/dist/destinations/segment-profiles/sendIdentify/index.d.ts +5 -0
  269. package/dist/destinations/segment-profiles/sendIdentify/index.js +52 -0
  270. package/dist/destinations/segment-profiles/sendIdentify/index.js.map +1 -0
  271. package/dist/destinations/snap-conversions-api/_tests_/index.test.js +1 -1
  272. package/dist/destinations/snap-conversions-api/_tests_/index.test.js.map +1 -1
  273. package/dist/destinations/snap-conversions-api/snap-capi-properties.js +1 -1
  274. package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -1
  275. package/dist/destinations/vwo/generated-types.d.ts +3 -0
  276. package/dist/destinations/vwo/generated-types.js +3 -0
  277. package/dist/destinations/vwo/generated-types.js.map +1 -0
  278. package/dist/destinations/vwo/identifyUser/generated-types.d.ts +12 -0
  279. package/dist/destinations/vwo/identifyUser/generated-types.js +3 -0
  280. package/dist/destinations/vwo/identifyUser/generated-types.js.map +1 -0
  281. package/dist/destinations/vwo/identifyUser/index.d.ts +5 -0
  282. package/dist/destinations/vwo/identifyUser/index.js +80 -0
  283. package/dist/destinations/vwo/identifyUser/index.js.map +1 -0
  284. package/dist/destinations/vwo/index.d.ts +4 -0
  285. package/dist/destinations/vwo/index.js +60 -0
  286. package/dist/destinations/vwo/index.js.map +1 -0
  287. package/dist/destinations/vwo/pageVisit/generated-types.d.ts +10 -0
  288. package/dist/destinations/vwo/pageVisit/generated-types.js +3 -0
  289. package/dist/destinations/vwo/pageVisit/generated-types.js.map +1 -0
  290. package/dist/destinations/vwo/pageVisit/index.d.ts +5 -0
  291. package/dist/destinations/vwo/pageVisit/index.js +77 -0
  292. package/dist/destinations/vwo/pageVisit/index.js.map +1 -0
  293. package/dist/destinations/vwo/trackEvent/generated-types.d.ts +13 -0
  294. package/dist/destinations/vwo/trackEvent/generated-types.js +3 -0
  295. package/dist/destinations/vwo/trackEvent/generated-types.js.map +1 -0
  296. package/dist/destinations/vwo/trackEvent/index.d.ts +5 -0
  297. package/dist/destinations/vwo/trackEvent/index.js +86 -0
  298. package/dist/destinations/vwo/trackEvent/index.js.map +1 -0
  299. package/dist/destinations/vwo/types.d.ts +42 -0
  300. package/dist/destinations/vwo/types.js +3 -0
  301. package/dist/destinations/vwo/types.js.map +1 -0
  302. package/dist/destinations/vwo/utility.d.ts +13 -0
  303. package/dist/destinations/vwo/utility.js +59 -0
  304. package/dist/destinations/vwo/utility.js.map +1 -0
  305. package/package.json +4 -4
  306. package/dist/destinations/actions-bingads/functions.d.ts +0 -0
  307. package/dist/destinations/actions-bingads/functions.js +0 -2
  308. package/dist/destinations/actions-bingads/functions.js.map +0 -1
  309. package/dist/destinations/actions-bingads/generated-types.d.ts +0 -10
  310. package/dist/destinations/actions-bingads/generated-types.js.map +0 -1
  311. package/dist/destinations/actions-bingads/index.js +0 -77
  312. package/dist/destinations/actions-bingads/index.js.map +0 -1
  313. package/dist/destinations/actions-bingads/offlineConversions/formatter.d.ts +0 -8
  314. package/dist/destinations/actions-bingads/offlineConversions/formatter.js +0 -33
  315. package/dist/destinations/actions-bingads/offlineConversions/formatter.js.map +0 -1
  316. package/dist/destinations/actions-bingads/offlineConversions/generated-types.d.ts +0 -7
  317. package/dist/destinations/actions-bingads/offlineConversions/generated-types.js.map +0 -1
  318. package/dist/destinations/actions-bingads/offlineConversions/index.js +0 -131
  319. package/dist/destinations/actions-bingads/offlineConversions/index.js.map +0 -1
  320. package/dist/destinations/google-sheets-partner/constants.d.ts +0 -3
  321. package/dist/destinations/google-sheets-partner/constants.js +0 -7
  322. package/dist/destinations/google-sheets-partner/constants.js.map +0 -1
  323. package/dist/destinations/google-sheets-partner/generated-types.js.map +0 -1
  324. package/dist/destinations/google-sheets-partner/googleapis/index.d.ts +0 -17
  325. package/dist/destinations/google-sheets-partner/googleapis/index.js +0 -34
  326. package/dist/destinations/google-sheets-partner/googleapis/index.js.map +0 -1
  327. package/dist/destinations/google-sheets-partner/index.js.map +0 -1
  328. package/dist/destinations/google-sheets-partner/postSheet/generated-types.js.map +0 -1
  329. package/dist/destinations/google-sheets-partner/postSheet/index.js +0 -79
  330. package/dist/destinations/google-sheets-partner/postSheet/index.js.map +0 -1
  331. package/dist/destinations/google-sheets-partner/postSheet/operations.d.ts +0 -10
  332. package/dist/destinations/google-sheets-partner/postSheet/operations.js +0 -96
  333. package/dist/destinations/google-sheets-partner/postSheet/operations.js.map +0 -1
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=braze-cohorts-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"braze-cohorts-types.js","sourceRoot":"","sources":["../../../src/destinations/braze-cohorts/braze-cohorts-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface Settings {
2
+ client_secret: string;
3
+ endpoint: string;
4
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/braze-cohorts/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,53 @@
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 index_1 = require("./api/index");
7
+ const syncAudiences_1 = __importDefault(require("./syncAudiences"));
8
+ const destination = {
9
+ name: 'Braze Cohorts',
10
+ slug: 'actions-braze-cohorts',
11
+ mode: 'cloud',
12
+ authentication: {
13
+ scheme: 'custom',
14
+ fields: {
15
+ client_secret: {
16
+ label: 'Client Secret key',
17
+ description: 'Data Import Key for the client whose cohort this belongs to. Also known as customer key.',
18
+ type: 'password',
19
+ required: true
20
+ },
21
+ endpoint: {
22
+ label: 'REST Endpoint',
23
+ description: 'Your Braze REST endpoint. [See more details](https://www.braze.com/docs/api/basics/#endpoints)',
24
+ type: 'string',
25
+ format: 'uri',
26
+ choices: [
27
+ { label: 'US-01 (https://dashboard-01.braze.com)', value: 'https://rest.iad-01.braze.com' },
28
+ { label: 'US-02 (https://dashboard-02.braze.com)', value: 'https://rest.iad-02.braze.com' },
29
+ { label: 'US-03 (https://dashboard-03.braze.com)', value: 'https://rest.iad-03.braze.com' },
30
+ { label: 'US-04 (https://dashboard-04.braze.com)', value: 'https://rest.iad-04.braze.com' },
31
+ { label: 'US-05 (https://dashboard-05.braze.com)', value: 'https://rest.iad-05.braze.com' },
32
+ { label: 'US-06 (https://dashboard-06.braze.com)', value: 'https://rest.iad-06.braze.com' },
33
+ { label: 'US-08 (https://dashboard-08.braze.com)', value: 'https://rest.iad-08.braze.com' },
34
+ { label: 'EU-01 (https://dashboard-01.braze.eu)', value: 'https://rest.fra-01.braze.eu' },
35
+ { label: 'EU-02 (https://dashboard-02.braze.eu)', value: 'https://rest.fra-02.braze.eu' }
36
+ ],
37
+ default: 'https://rest.iad-01.braze.com',
38
+ required: true
39
+ }
40
+ },
41
+ testAuthentication: async (request, { settings }) => {
42
+ const syncAudiencesApiClient = new index_1.SyncAudiences(request, settings);
43
+ const cohort_id = 'will_add_in_constant';
44
+ const cohortChanges = [];
45
+ return await syncAudiencesApiClient.batchUpdate(settings, cohort_id, cohortChanges);
46
+ }
47
+ },
48
+ actions: {
49
+ syncAudiences: syncAudiences_1.default
50
+ }
51
+ };
52
+ exports.default = destination;
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/braze-cohorts/index.ts"],"names":[],"mappings":";;;;;AAGA,uCAA2C;AAC3C,oEAA2C;AAE3C,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,aAAa,EAAE;gBACb,K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AA;QACrF,CAAC;KACF;IACD,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,16 @@
1
+ export interface Payload {
2
+ external_id?: string;
3
+ user_alias?: {
4
+ alias_name: string;
5
+ alias_label: string;
6
+ };
7
+ device_id?: string;
8
+ cohort_id: string;
9
+ cohort_name: string;
10
+ enable_batching?: boolean;
11
+ personas_audience_key: string;
12
+ event_properties: {
13
+ [k: string]: unknown;
14
+ };
15
+ time: string;
16
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/braze-cohorts/syncAudiences/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,158 @@
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 api_1 = require("../api");
8
+ const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
9
+ const action = {
10
+ title: 'Sync Audience',
11
+ description: 'Record custom events in Braze',
12
+ defaultSubscription: 'event = "Audience Entered" or event = "Audience Exited"',
13
+ fields: {
14
+ external_id: {
15
+ label: 'External User ID',
16
+ description: 'The external_id serves as a unique user identifier for whom you are submitting data. This identifier should be the same as the one you set in the Braze SDK in order to avoid creating multiple profiles for the same user.',
17
+ type: 'string',
18
+ default: {
19
+ '@path': '$.userId'
20
+ }
21
+ },
22
+ user_alias: {
23
+ label: 'User Alias Object',
24
+ description: 'Alternate unique user identifier, this is required if External User ID or Device ID is not set. Refer [Braze Documentation](https://www.braze.com/docs/api/objects_filters/user_alias_object) for more details.',
25
+ type: 'object',
26
+ properties: {
27
+ alias_name: {
28
+ label: 'Alias Name',
29
+ type: 'string',
30
+ required: true
31
+ },
32
+ alias_label: {
33
+ label: 'Alias Label',
34
+ type: 'string',
35
+ required: true
36
+ }
37
+ }
38
+ },
39
+ device_id: {
40
+ label: 'Device ID',
41
+ description: 'Device IDs can be used to add and remove only anonymous users to/from a cohort. However, users with an assigned User ID cannot use Device ID to sync to a cohort.',
42
+ type: 'string'
43
+ },
44
+ cohort_id: {
45
+ label: 'Cohort ID',
46
+ description: 'The Cohort Identifier',
47
+ type: 'hidden',
48
+ required: true,
49
+ default: {
50
+ '@path': '$.context.personas.computation_id'
51
+ }
52
+ },
53
+ cohort_name: {
54
+ label: 'Cohort Name',
55
+ description: 'The name of Cohort',
56
+ type: 'hidden',
57
+ required: true,
58
+ default: {
59
+ '@path': '$.context.personas.computation_key'
60
+ }
61
+ },
62
+ enable_batching: {
63
+ label: 'Enable Batching',
64
+ description: 'Enable batching of requests to the Braze cohorts.',
65
+ type: 'boolean',
66
+ default: true
67
+ },
68
+ personas_audience_key: {
69
+ label: 'Segment Engage Audience Key',
70
+ description: 'The `audience_key` of the Engage audience you want to sync to Braze Cohorts. This value must be a hard-coded string variable, e.g. `personas_test_audience`, in order for batching to work properly.',
71
+ type: 'string',
72
+ required: true
73
+ },
74
+ event_properties: {
75
+ label: 'Event Properties',
76
+ description: 'Displays properties of the event to add/remove users to a cohort and the traits of the specific user',
77
+ type: 'object',
78
+ required: true,
79
+ default: {
80
+ '@if': {
81
+ exists: { '@path': '$.properties' },
82
+ then: { '@path': '$.properties' },
83
+ else: { '@path': '$.traits' }
84
+ }
85
+ }
86
+ },
87
+ time: {
88
+ label: 'Time',
89
+ description: 'When the event occurred.',
90
+ type: 'hidden',
91
+ required: true,
92
+ default: {
93
+ '@path': '$.timestamp'
94
+ }
95
+ }
96
+ },
97
+ perform: async (request, { settings, payload, stateContext }) => {
98
+ return processPayload(request, settings, [payload], stateContext);
99
+ },
100
+ performBatch: async (request, { settings, payload, stateContext }) => {
101
+ return processPayload(request, settings, payload, stateContext);
102
+ }
103
+ };
104
+ async function processPayload(request, settings, payloads, stateContext) {
105
+ validate(payloads);
106
+ const syncAudiencesApiClient = new api_1.SyncAudiences(request, settings);
107
+ const { cohort_name, cohort_id } = payloads[0];
108
+ const cohortChanges = [];
109
+ if (stateContext?.getRequestContext?.('cohort_name') != cohort_name) {
110
+ await syncAudiencesApiClient.createCohort(settings, payloads[0]);
111
+ stateContext?.setResponseContext?.(`cohort_name`, cohort_name, {});
112
+ }
113
+ const { addUsers, removeUsers } = extractUsers(payloads);
114
+ const hasAddUsers = hasUsersToAddOrRemove(addUsers);
115
+ const hasRemoveUsers = hasUsersToAddOrRemove(removeUsers);
116
+ if (!hasAddUsers && !hasRemoveUsers) {
117
+ return;
118
+ }
119
+ if (hasAddUsers) {
120
+ cohortChanges.push(addUsers);
121
+ }
122
+ if (hasRemoveUsers) {
123
+ cohortChanges.push(removeUsers);
124
+ }
125
+ return await syncAudiencesApiClient.batchUpdate(settings, cohort_id, cohortChanges);
126
+ }
127
+ function validate(payloads) {
128
+ if (payloads[0].cohort_name !== payloads[0].personas_audience_key) {
129
+ throw new actions_core_1.IntegrationError('The value of `personas computation key` and `personas_audience_key` must match.', 'INVALID_SETTINGS', 400);
130
+ }
131
+ }
132
+ function extractUsers(payloads) {
133
+ const addUsers = { user_ids: [], device_ids: [], aliases: [] };
134
+ const removeUsers = { user_ids: [], device_ids: [], aliases: [], should_remove: true };
135
+ payloads.forEach((payload) => {
136
+ const { event_properties, external_id, device_id, user_alias, personas_audience_key } = payload;
137
+ const userEnteredOrRemoved = event_properties[`${personas_audience_key}`];
138
+ const user = userEnteredOrRemoved ? addUsers : removeUsers;
139
+ if (external_id) {
140
+ user?.user_ids?.push(external_id);
141
+ }
142
+ else if (device_id) {
143
+ user?.device_ids?.push(device_id);
144
+ }
145
+ else if (user_alias) {
146
+ user?.aliases?.push(user_alias);
147
+ }
148
+ });
149
+ return {
150
+ addUsers,
151
+ removeUsers
152
+ };
153
+ }
154
+ function hasUsersToAddOrRemove(user) {
155
+ return !(isEmpty_1.default(user?.user_ids) && isEmpty_1.default(user?.device_ids) && isEmpty_1.default(user?.aliases));
156
+ }
157
+ exports.default = action;
158
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/braze-cohorts/syncAudiences/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAyF;AAGzF,gCAAsC;AAGtC,6DAAoC;AAEpC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,+BAA+B;IAC5C,mBAAmB,EAAE,yDAAyD;IAC9E,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,kBAAkB;YACzB,WAAW,EACT,6NAA6N;YAC/N,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACT,iNAAiN;YACnN,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,UAAU,EAAE;oBACV,KAAK,EAAE,YAAY;oBACnB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;iBACf;gBACD,WAAW,EAAE;oBACX,KAAK,EAAE,aAAa;oBACpB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;iBACf;aACF;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EACT,mKAAmK;YACrK,IAAI,EAAE,QAAQ;SACf;QACD,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,uBAAuB;YACpC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,mCAAmC;aAC7C;SACF;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,oCAAoC;a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11
  default: { '@path': '$.userId' },
12
12
  required: true
13
- }
13
+ },
14
14
  },
15
15
  perform: (request, { settings, payload }) => {
16
16
  const event = {
17
- identity: payload.identity
17
+ identity: payload.identity,
18
18
  };
19
19
  return request(`${settings.clevertapEndpoint}/1/delete/profiles.json`, {
20
20
  method: 'post',
21
21
  json: event,
22
22
  headers: {
23
- 'X-CleverTap-Account-Id': `${settings.clevertapAccountId}`,
24
- 'X-CleverTap-Passcode': `${settings.clevertapPasscode}`
23
+ "X-CleverTap-Account-Id": `${settings.clevertapAccountId}`,
24
+ "X-CleverTap-Passcode": `${settings.clevertapPasscode}`
25
25
  }
26
26
  });
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/clevertap/userDelete/index.ts"],"names":[],"mappings":";;AAKA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,0EAA0E;IACvF,MAAM,EAAE;QACN,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gDAAgD;YAC7D,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;YAChC,QAAQ,EAAE,IAAI;SACf;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,MAAM,KAAK,GAAgB;YACzB,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAA;QACD,OAAO,OAAO,CAAC,GAAG,QAAQ,CAAC,iBAAiB,yBAAyB,EAAE;YACrE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,KAAK;YACX,OAAO,EAAE;gBACP,wBAAwB,EAAE,GAAG,QAAQ,CAAC,kBAAkB,EAAE;gBAC1D,sBAAsB,EAAE,GAAG,QAAQ,CAAC,iBAAiB,EAAE;aACxD;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/clevertap/userDelete/index.ts"],"names":[],"mappings":";;AAKA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,0EAA0E;IACvF,MAAM,EAAE;QACN,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gDAAgD;YAC7D,OAAO,EAAE,EAAC,OAAO,EAAE,UAAU,EAAC;YAC9B,QAAQ,EAAE,IAAI;SACf;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAC,QAAQ,EAAE,OAAO,EAAC,EAAE,EAAE;QACxC,MAAM,KAAK,GAAgB;YACzB,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAA;QACD,OAAO,OAAO,CAAC,GAAG,QAAQ,CAAC,iBAAiB,yBAAyB,EAAE;YACrE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,KAAK;YACX,OAAO,EAAE;gBACP,wBAAwB,EAAE,GAAG,QAAQ,CAAC,kBAAkB,EAAE;gBAC1D,sBAAsB,EAAE,GAAG,QAAQ,CAAC,iBAAiB,EAAE;aACxD;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,11 @@
1
+ export interface Payload {
2
+ id: string;
3
+ created_at?: string;
4
+ custom_attributes?: {
5
+ [k: string]: unknown;
6
+ };
7
+ user_id?: string;
8
+ anonymous_id?: string;
9
+ object_type_id?: string;
10
+ convert_timestamp?: boolean;
11
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/customerio/createUpdateObject/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("../utils");
4
+ const action = {
5
+ title: 'Create or Update Object',
6
+ description: 'Create an object in Customer.io or update them if they exist.',
7
+ defaultSubscription: 'type = "group"',
8
+ fields: {
9
+ id: {
10
+ label: 'Object ID',
11
+ description: 'The ID used to uniquely identify an object in Customer.io. [Learn more](https://customer.io/docs/object-relationships).',
12
+ type: 'string',
13
+ required: true,
14
+ default: {
15
+ '@path': '$.groupId'
16
+ }
17
+ },
18
+ created_at: {
19
+ label: 'Created At',
20
+ description: 'A timestamp of when the object was created.',
21
+ type: 'string',
22
+ default: {
23
+ '@template': '{{traits.created_at}}'
24
+ }
25
+ },
26
+ custom_attributes: {
27
+ label: 'Object Attributes',
28
+ description: 'Optional attributes for the object. When updating an object, attributes are added or updated, not removed.',
29
+ type: 'object',
30
+ default: {
31
+ '@path': '$.traits'
32
+ }
33
+ },
34
+ user_id: {
35
+ label: 'User ID',
36
+ description: 'The ID used to relate a user to an object in Customer.io. [Learn more](https://customer.io/docs/identifying-people/#identifiers).',
37
+ type: 'string',
38
+ default: {
39
+ '@path': '$.userId'
40
+ }
41
+ },
42
+ anonymous_id: {
43
+ label: 'Anonymous ID',
44
+ description: 'An anonymous ID to relate to an object when no Person ID exists. [Learn more](https://customer.io/docs/anonymous-events/).',
45
+ type: 'string',
46
+ default: {
47
+ '@path': '$.anonymousId'
48
+ }
49
+ },
50
+ object_type_id: {
51
+ label: 'Object Type Id',
52
+ description: 'The ID used to uniquely identify a custom object type in Customer.io. [Learn more](https://customer.io/docs/object-relationships).',
53
+ type: 'string',
54
+ default: {
55
+ '@path': '$.objectTypeId'
56
+ }
57
+ },
58
+ convert_timestamp: {
59
+ label: 'Convert Timestamps',
60
+ description: 'Convert dates to Unix timestamps (seconds since Epoch).',
61
+ type: 'boolean',
62
+ default: true
63
+ }
64
+ },
65
+ perform: (request, { settings, payload }) => {
66
+ let createdAt = payload.created_at;
67
+ let customAttributes = payload.custom_attributes;
68
+ const objectTypeID = payload.object_type_id;
69
+ const userID = payload.user_id;
70
+ const objectID = payload.id;
71
+ const anonymousId = payload.anonymous_id;
72
+ if (payload.convert_timestamp !== false) {
73
+ if (createdAt) {
74
+ createdAt = utils_1.convertValidTimestamp(createdAt);
75
+ }
76
+ if (customAttributes) {
77
+ customAttributes = utils_1.convertAttributeTimestamps(customAttributes);
78
+ }
79
+ }
80
+ const body = {};
81
+ body.attributes = customAttributes;
82
+ if (createdAt) {
83
+ body.created_at = createdAt;
84
+ }
85
+ body.type = 'object';
86
+ body.identifiers = { object_type_id: objectTypeID ?? '1', object_id: objectID };
87
+ if (userID) {
88
+ body.action = 'identify';
89
+ body.cio_relationships = [{ identifiers: { id: userID } }];
90
+ }
91
+ else {
92
+ body.action = 'identify_anonymous';
93
+ body.cio_relationships = [{ identifiers: { anonymous_id: anonymousId } }];
94
+ }
95
+ return request(`${utils_1.trackApiEndpoint(settings.accountRegion)}/api/v2/entity`, {
96
+ method: 'post',
97
+ json: body
98
+ });
99
+ }
100
+ };
101
+ exports.default = action;
102
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/customerio/createUpdateObject/index.ts"],"names":[],"mappings":";;AAGA,oCAA8F;AAE9F,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,+DAA+D;IAC5E,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,EAAE,EAAE;YACF,KAAK,EAAE,WAAW;YAClB,WAAW,EACT,yHAAyH;YAC3H,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,WAAW;aACrB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,6CAA6C;YAC1D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,WAAW,EAAE,uBAAuB;aACrC;SACF;QACD,iBAAiB,EAAE;YACjB,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACT,4GAA4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,CAAA;aAChE;SACF;QAED,MAAM,IAAI,GAA4B,EAAE,CAAA;QACxC,IAAI,CAAC,UAAU,GAAG,gBAAgB,CAAA;QAClC,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;SAC5B;QACD,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;QACpB,IAAI,CAAC,WAAW,GAAG,EAAE,cAAc,EAAE,YAAY,IAAI,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAA;QAE/E,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,MAAM,GAAG,UAAU,CAAA;YACxB,IAAI,CAAC,iBAAiB,GAAG,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAAA;SAC3D;aAAM;YACL,IAAI,CAAC,MAAM,GAAG,oBAAoB,CAAA;YAClC,IAAI,CAAC,iBAAiB,GAAG,CAAC,EAAE,WAAW,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,CAAC,CAAA;SAC1E;QAED,OAAO,OAAO,CAAC,GAAG,wBAAgB,CAAC,QAAQ,CAAC,aAAa,CAAC,gBAAgB,EAAE;YAC1E,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -3,8 +3,10 @@ export interface Payload {
3
3
  anonymous_id?: string;
4
4
  email?: string;
5
5
  created_at?: string;
6
+ group_id?: string;
6
7
  custom_attributes?: {
7
8
  [k: string]: unknown;
8
9
  };
9
10
  convert_timestamp?: boolean;
11
+ object_type_id?: string;
10
12
  }
@@ -43,6 +43,14 @@ const action = {
43
43
  '@template': '{{traits.created_at}}'
44
44
  }
45
45
  },
46
+ group_id: {
47
+ label: 'Object ID',
48
+ description: 'The ID used to uniquely identify an object in Customer.io. [Learn more](https://customer.io/docs/object-relationships).',
49
+ type: 'string',
50
+ default: {
51
+ '@path': '$.context.groupId'
52
+ }
53
+ },
46
54
  custom_attributes: {
47
55
  label: 'Person Attributes',
48
56
  description: 'Optional attributes for the person. When updating a person, attributes are added or updated, not removed.',
@@ -56,11 +64,21 @@ const action = {
56
64
  description: 'Convert dates to Unix timestamps (seconds since Epoch).',
57
65
  type: 'boolean',
58
66
  default: true
67
+ },
68
+ object_type_id: {
69
+ label: 'Object Type Id',
70
+ description: 'The ID used to uniquely identify a custom object type in Customer.io. [Learn more](https://customer.io/docs/object-relationships).',
71
+ type: 'string',
72
+ default: {
73
+ '@path': '$.objectTypeId'
74
+ }
59
75
  }
60
76
  },
61
77
  perform: (request, { settings, payload }) => {
62
78
  let createdAt = payload.created_at;
63
79
  let customAttributes = payload.custom_attributes;
80
+ const objectId = payload.group_id;
81
+ const objectTypeId = payload.object_type_id;
64
82
  if (payload.convert_timestamp !== false) {
65
83
  if (createdAt) {
66
84
  createdAt = utils_1.convertValidTimestamp(createdAt);
@@ -77,6 +95,12 @@ const action = {
77
95
  if (createdAt) {
78
96
  body.created_at = createdAt;
79
97
  }
98
+ if (objectId) {
99
+ body.cio_relationships = {
100
+ action: 'add_relationships',
101
+ relationships: [{ identifiers: { object_type_id: objectTypeId ?? '1', object_id: objectId } }]
102
+ };
103
+ }
80
104
  return request(`${utils_1.trackApiEndpoint(settings.accountRegion)}/api/v1/customers/${payload.id}`, {
81
105
  method: 'put',
82
106
  json: body
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/customerio/createUpdatePerson/index.ts"],"names":[],"mappings":";;AAGA,oCAA8F;AAE9F,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,8DAA8D;IAC3E,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,EAAE,EAAE;YACF,KAAK,EAAE,WAAW;YAClB,WAAW,EACT,mIAAmI;YACrI,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OA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AED,IAAI,gBAAgB,EAAE;gBACpB,gBAAgB,GAAG,kCAA0B,CAAC,gBAAgB,CAAC,CAAA;aAChE;SACF;QAED,MAAM,IAAI,GAA4B;YACpC,GAAG,gBAAgB;YACnB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,YAAY,EAAE,OAAO,CAAC,YAAY;SACnC,CAAA;QAED,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;SAC5B;QAED,OAAO,OAAO,CAAC,GAAG,wBAAgB,CAAC,QAAQ,CAAC,aAAa,CAAC,qBAAqB,OAAO,CAAC,EAAE,EAAE,EAAE;YAC3F,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/customerio/createUpdatePerson/index.ts"],"names":[],"mappings":";;AAGA,oCAA8F;AAE9F,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,8DAA8D;IAC3E,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,EAAE,EAAE;YACF,KAAK,EAAE,WAAW;YAClB,WAAW,EACT,mIAAmI;YACrI,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,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,gBAAgB,EAAE;iBACpC;aACF;SACF;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EACT,yGAAyG;YAC3G,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,KAAK,EAAE;YACL,KAAK,E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AAS,CAAC,CAAA;aAC7C;YAED,IAAI,gBAAgB,EAAE;gBACpB,gBAAgB,GAAG,kCAA0B,CAAC,gBAAgB,CAAC,CAAA;aAChE;SACF;QAED,MAAM,IAAI,GAA4B;YACpC,GAAG,gBAAgB;YACnB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,YAAY,EAAE,OAAO,CAAC,YAAY;SACnC,CAAA;QAED,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;SAC5B;QAGD,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,iBAAiB,GAAG;gBACvB,MAAM,EAAE,mBAAmB;gBAC3B,aAAa,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,cAAc,EAAE,YAAY,IAAI,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;aAC/F,CAAA;SACF;QAED,OAAO,OAAO,CAAC,GAAG,wBAAgB,CAAC,QAAQ,CAAC,aAAa,CAAC,qBAAqB,OAAO,CAAC,EAAE,EAAE,EAAE;YAC3F,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -10,6 +10,7 @@ const createUpdatePerson_1 = __importDefault(require("./createUpdatePerson"));
10
10
  const trackEvent_1 = __importDefault(require("./trackEvent"));
11
11
  const trackPageView_1 = __importDefault(require("./trackPageView"));
12
12
  const trackScreenView_1 = __importDefault(require("./trackScreenView"));
13
+ const createUpdateObject_1 = __importDefault(require("./createUpdateObject"));
13
14
  const utils_1 = require("./utils");
14
15
  const destination = {
15
16
  name: 'Actions Customerio',
@@ -54,7 +55,8 @@ const destination = {
54
55
  createUpdatePerson: createUpdatePerson_1.default,
55
56
  trackEvent: trackEvent_1.default,
56
57
  trackPageView: trackPageView_1.default,
57
- trackScreenView: trackScreenView_1.default
58
+ trackScreenView: trackScreenView_1.default,
59
+ createUpdateObject: createUpdateObject_1.default
58
60
  },
59
61
  presets: [
60
62
  {
@@ -92,6 +94,12 @@ const destination = {
92
94
  subscribe: 'type = "screen"',
93
95
  partnerAction: 'trackScreenView',
94
96
  mapping: actions_core_1.defaultValues(trackScreenView_1.default.fields)
97
+ },
98
+ {
99
+ name: 'Create or Update Object',
100
+ subscribe: 'type = "group"',
101
+ partnerAction: 'createUpdateObject',
102
+ mapping: actions_core_1.defaultValues(createUpdateObject_1.default.fields)
95
103
  }
96
104
  ],
97
105
  onDelete(request, { settings, payload }) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/customerio/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAqD;AACrD,8EAAqD;AACrD,kEAAyC;AACzC,8EAAqD;AACrD,8DAAqC;AACrC,oEAA2C;AAC3C,wEAA+C;AAG/C,mCAAyD;AAEzD,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,MAAM,EAAE,OAAO;QACf,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,WAAW,EACT,0HAA0H;gBAC5H,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,MAAM,EAAE;gBACN,WAAW,EACT,0HAA0H;gBAC5H,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,aAAa,EAAE;gBACb,WAAW,EAAE,wEAAwE;gBACrF,KAAK,EAAE,gBAAgB;gBACvB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAa,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC7E,OAA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YAAY;YAC3B,OAAO,EAAE,4BAAa,CAAC,oBAAU,CAAC,MAAM,CAAC;SAC1C;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,SAAS,EAAE,eAAe;YAC1B,aAAa,EAAE,eAAe;YAC9B,OAAO,EAAE,4BAAa,CAAC,uBAAa,CAAC,MAAM,CAAC;SAC7C;QACD;YACE,IAAI,EAAE,mBAAmB;YACzB,SAAS,EAAE,iBAAiB;YAC5B,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE,4BAAa,CAAC,yBAAe,CAAC,MAAM,CAAC;SAC/C;QACD;YACE,IAAI,EAAE,yBAAyB;YAC/B,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,oBAAoB;YACnC,OAAO,EAAE,4BAAa,CAAC,4BAAkB,CAAC,MAAM,CAAC;SAClD;KACF;IAED,QAAQ,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE;QACrC,MAAM,EAAE,aAAa,EAAE,GAAG,QAAQ,CAAA;QAClC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;QAE1B,MAAM,GAAG,GAAG,GAAG,wBAAgB,CAAC,aAAa,CAAC,qBAAqB,MAAM,EAAE,CAAA;QAE3E,OAAO,OAAO,CAAC,GAAG,EAAE;YAClB,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -32,4 +32,5 @@ export interface Payload {
32
32
  traits?: {
33
33
  [k: string]: unknown;
34
34
  };
35
+ eventOccurredTS?: string;
35
36
  }
@@ -262,6 +262,15 @@ const action = {
262
262
  type: 'object',
263
263
  required: false,
264
264
  default: { '@path': '$.properties' }
265
+ },
266
+ eventOccurredTS: {
267
+ label: 'Event Timestamp',
268
+ description: 'Time of when the actual event happened.',
269
+ type: 'string',
270
+ required: false,
271
+ default: {
272
+ '@path': '$.timestamp'
273
+ }
265
274
  }
266
275
  },
267
276
  perform: async (request, { settings, payload, statsContext }) => {
@@ -392,6 +401,9 @@ const action = {
392
401
  });
393
402
  tags?.push(`sendgrid_status_code:${response.status}`);
394
403
  statsClient?.incr('actions-personas-messaging-sendgrid.response', 1, tags);
404
+ if (payload?.eventOccurredTS != undefined) {
405
+ statsClient?.histogram('actions-personas-messaging-sendgrid.eventDeliveryTS', Date.now() - new Date(payload?.eventOccurredTS).getTime(), tags);
406
+ }
395
407
  return response;
396
408
  }
397
409
  else {