@segment/action-destinations 3.301.1-staging-c2af298f5 → 3.302.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 (397) hide show
  1. package/dist/destinations/actions-pardot/pa-operations.d.ts +1 -1
  2. package/dist/destinations/adjust/functions.d.ts +1 -1
  3. package/dist/destinations/adobe-target/adobeTarget_operations.d.ts +1 -1
  4. package/dist/destinations/airship/utilities.d.ts +7 -7
  5. package/dist/destinations/amazon-amc/index.js +10 -2
  6. package/dist/destinations/amazon-amc/index.js.map +1 -1
  7. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
  8. package/dist/destinations/braze/utils.d.ts +6 -6
  9. package/dist/destinations/contentstack/customAttributesSync/utils.d.ts +1 -1
  10. package/dist/destinations/cordial/cordial-client.d.ts +8 -8
  11. package/dist/destinations/dawn/dawn-types.d.ts +13 -0
  12. package/dist/destinations/{engage/twilio/utils/types.js → dawn/dawn-types.js} +1 -1
  13. package/dist/destinations/dawn/dawn-types.js.map +1 -0
  14. package/dist/destinations/dawn/generated-types.d.ts +3 -0
  15. package/dist/destinations/dawn/generated-types.js.map +1 -0
  16. package/dist/destinations/dawn/identifyUser/generated-types.d.ts +7 -0
  17. package/dist/destinations/dawn/identifyUser/generated-types.js.map +1 -0
  18. package/dist/destinations/dawn/identifyUser/index.js +58 -0
  19. package/dist/destinations/dawn/identifyUser/index.js.map +1 -0
  20. package/dist/destinations/{engage/twilio/destinationDefinition.d.ts → dawn/index.d.ts} +2 -1
  21. package/dist/destinations/dawn/index.js +39 -0
  22. package/dist/destinations/dawn/index.js.map +1 -0
  23. package/dist/destinations/dawn/track/generated-types.d.ts +8 -0
  24. package/dist/destinations/dawn/track/generated-types.js.map +1 -0
  25. package/dist/destinations/dawn/track/index.js +69 -0
  26. package/dist/destinations/dawn/track/index.js.map +1 -0
  27. package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.d.ts +1 -1
  28. package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.d.ts +1 -1
  29. package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.d.ts +1 -1
  30. package/dist/destinations/facebook-conversions-api/constants.d.ts +1 -1
  31. package/dist/destinations/facebook-conversions-api/constants.js +1 -1
  32. package/dist/destinations/facebook-custom-audiences/fbca-operations.d.ts +2 -2
  33. package/dist/destinations/first-party-dv360/generated-types.d.ts +0 -7
  34. package/dist/destinations/first-party-dv360/index.d.ts +3 -3
  35. package/dist/destinations/first-party-dv360/index.js +5 -119
  36. package/dist/destinations/first-party-dv360/index.js.map +1 -1
  37. package/dist/destinations/gameball/util.d.ts +1 -1
  38. package/dist/destinations/google-analytics-4/ga4-functions.d.ts +1 -1
  39. package/dist/destinations/google-sheets/index.js +1 -3
  40. package/dist/destinations/google-sheets/index.js.map +1 -1
  41. package/dist/destinations/google-sheets/postSheet/operations.d.ts +1 -1
  42. package/dist/destinations/hubspot/customEvent/common-fields.d.ts +2 -0
  43. package/dist/destinations/hubspot/customEvent/common-fields.js +74 -0
  44. package/dist/destinations/hubspot/customEvent/common-fields.js.map +1 -0
  45. package/dist/destinations/hubspot/customEvent/constants.d.ts +4 -0
  46. package/dist/destinations/hubspot/customEvent/constants.js +10 -0
  47. package/dist/destinations/hubspot/customEvent/constants.js.map +1 -0
  48. package/dist/destinations/hubspot/customEvent/dynamic-fields.d.ts +32 -0
  49. package/dist/destinations/hubspot/customEvent/dynamic-fields.js +104 -0
  50. package/dist/destinations/hubspot/customEvent/dynamic-fields.js.map +1 -0
  51. package/dist/destinations/hubspot/customEvent/generated-types.d.ts +13 -0
  52. package/dist/destinations/hubspot/customEvent/generated-types.js.map +1 -0
  53. package/dist/destinations/hubspot/customEvent/hubspot-api.d.ts +62 -0
  54. package/dist/destinations/hubspot/customEvent/hubspot-api.js +310 -0
  55. package/dist/destinations/hubspot/customEvent/hubspot-api.js.map +1 -0
  56. package/dist/destinations/hubspot/customEvent/index.js +57 -0
  57. package/dist/destinations/hubspot/customEvent/index.js.map +1 -0
  58. package/dist/destinations/hubspot/index.js +3 -1
  59. package/dist/destinations/hubspot/index.js.map +1 -1
  60. package/dist/destinations/hubspot/upsertObject/common-fields.js +8 -32
  61. package/dist/destinations/hubspot/upsertObject/common-fields.js.map +1 -1
  62. package/dist/destinations/hubspot/upsertObject/generated-types.d.ts +8 -11
  63. package/dist/destinations/hubspot/upsertObject/hubspot-api.d.ts +169 -53
  64. package/dist/destinations/hubspot/upsertObject/hubspot-api.js +449 -336
  65. package/dist/destinations/hubspot/upsertObject/hubspot-api.js.map +1 -1
  66. package/dist/destinations/hubspot/upsertObject/index.d.ts +1 -1
  67. package/dist/destinations/hubspot/upsertObject/index.js +52 -28
  68. package/dist/destinations/hubspot/upsertObject/index.js.map +1 -1
  69. package/dist/destinations/index.js +2 -0
  70. package/dist/destinations/index.js.map +1 -1
  71. package/dist/destinations/klaviyo/addProfileToList/generated-types.d.ts +1 -0
  72. package/dist/destinations/klaviyo/addProfileToList/index.js +14 -5
  73. package/dist/destinations/klaviyo/addProfileToList/index.js.map +1 -1
  74. package/dist/destinations/klaviyo/functions.d.ts +7 -6
  75. package/dist/destinations/klaviyo/functions.js +23 -7
  76. package/dist/destinations/klaviyo/functions.js.map +1 -1
  77. package/dist/destinations/klaviyo/orderCompleted/generated-types.d.ts +1 -0
  78. package/dist/destinations/klaviyo/orderCompleted/index.js +11 -2
  79. package/dist/destinations/klaviyo/orderCompleted/index.js.map +1 -1
  80. package/dist/destinations/klaviyo/properties.d.ts +1 -0
  81. package/dist/destinations/klaviyo/properties.js +7 -1
  82. package/dist/destinations/klaviyo/properties.js.map +1 -1
  83. package/dist/destinations/klaviyo/removeProfile/generated-types.d.ts +1 -0
  84. package/dist/destinations/klaviyo/removeProfile/index.js +24 -7
  85. package/dist/destinations/klaviyo/removeProfile/index.js.map +1 -1
  86. package/dist/destinations/klaviyo/removeProfileFromList/generated-types.d.ts +1 -0
  87. package/dist/destinations/klaviyo/removeProfileFromList/index.js +18 -6
  88. package/dist/destinations/klaviyo/removeProfileFromList/index.js.map +1 -1
  89. package/dist/destinations/launchdarkly-audiences/syncAudience/custom-audience-operations.d.ts +1 -1
  90. package/dist/destinations/salesforce/index.js +1 -13
  91. package/dist/destinations/salesforce/index.js.map +1 -1
  92. package/dist/destinations/salesforce/sf-operations.d.ts +0 -1
  93. package/dist/destinations/salesforce/sf-operations.js +0 -20
  94. package/dist/destinations/salesforce/sf-operations.js.map +1 -1
  95. package/dist/destinations/salesforce/sf-properties.d.ts +0 -1
  96. package/dist/destinations/salesforce/sf-properties.js +6 -29
  97. package/dist/destinations/salesforce/sf-properties.js.map +1 -1
  98. package/dist/destinations/schematic/identifyUser/generated-types.d.ts +1 -1
  99. package/dist/destinations/schematic/identifyUser/index.js +6 -3
  100. package/dist/destinations/schematic/identifyUser/index.js.map +1 -1
  101. package/dist/destinations/schematic/trackEvent/generated-types.d.ts +1 -1
  102. package/dist/destinations/schematic/trackEvent/index.js +2 -2
  103. package/dist/destinations/schematic/trackEvent/index.js.map +1 -1
  104. package/dist/destinations/topsort/click/generated-types.d.ts +6 -0
  105. package/dist/destinations/topsort/click/generated-types.js.map +1 -0
  106. package/dist/destinations/topsort/click/index.js +54 -0
  107. package/dist/destinations/topsort/click/index.js.map +1 -0
  108. package/dist/destinations/topsort/client.d.ts +10 -0
  109. package/dist/destinations/topsort/client.js +26 -0
  110. package/dist/destinations/topsort/client.js.map +1 -0
  111. package/dist/destinations/topsort/generated-types.d.ts +3 -0
  112. package/dist/destinations/topsort/generated-types.js.map +1 -0
  113. package/dist/destinations/topsort/impression/generated-types.d.ts +6 -0
  114. package/dist/destinations/topsort/impression/generated-types.js.map +1 -0
  115. package/dist/destinations/topsort/impression/index.js +54 -0
  116. package/dist/destinations/topsort/impression/index.js.map +1 -0
  117. package/dist/destinations/{engage/sendgrid/destinationDefinition.d.ts → topsort/index.d.ts} +2 -1
  118. package/dist/destinations/topsort/index.js +56 -0
  119. package/dist/destinations/topsort/index.js.map +1 -0
  120. package/dist/destinations/topsort/purchase/generated-types.d.ts +10 -0
  121. package/dist/destinations/topsort/purchase/generated-types.js.map +1 -0
  122. package/dist/destinations/topsort/purchase/index.d.ts +5 -0
  123. package/dist/destinations/topsort/purchase/index.js +82 -0
  124. package/dist/destinations/topsort/purchase/index.js.map +1 -0
  125. package/dist/lib/test-data.js +2 -0
  126. package/dist/lib/test-data.js.map +1 -1
  127. package/package.json +4 -4
  128. package/dist/destinations/amazon-ads/generated-types.d.ts +0 -12
  129. package/dist/destinations/amazon-ads/generated-types.js.map +0 -1
  130. package/dist/destinations/amazon-ads/index.d.ts +0 -4
  131. package/dist/destinations/amazon-ads/index.js +0 -237
  132. package/dist/destinations/amazon-ads/index.js.map +0 -1
  133. package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +0 -15
  134. package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +0 -1
  135. package/dist/destinations/amazon-ads/syncAudiences/index.js +0 -182
  136. package/dist/destinations/amazon-ads/syncAudiences/index.js.map +0 -1
  137. package/dist/destinations/amazon-ads/types.d.ts +0 -47
  138. package/dist/destinations/amazon-ads/types.js +0 -11
  139. package/dist/destinations/amazon-ads/types.js.map +0 -1
  140. package/dist/destinations/amazon-ads/utils.d.ts +0 -37
  141. package/dist/destinations/amazon-ads/utils.js +0 -25
  142. package/dist/destinations/amazon-ads/utils.js.map +0 -1
  143. package/dist/destinations/contentstack/constants.d.ts +0 -3
  144. package/dist/destinations/contentstack/constants.js +0 -7
  145. package/dist/destinations/contentstack/constants.js.map +0 -1
  146. package/dist/destinations/engage/sendgrid/destinationDefinition.js +0 -70
  147. package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +0 -1
  148. package/dist/destinations/engage/sendgrid/generated-types.d.ts +0 -1
  149. package/dist/destinations/engage/sendgrid/generated-types.js +0 -14
  150. package/dist/destinations/engage/sendgrid/generated-types.js.map +0 -1
  151. package/dist/destinations/engage/sendgrid/index.d.ts +0 -2
  152. package/dist/destinations/engage/sendgrid/index.js +0 -5
  153. package/dist/destinations/engage/sendgrid/index.js.map +0 -1
  154. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +0 -4
  155. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +0 -28
  156. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +0 -1
  157. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +0 -1
  158. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +0 -14
  159. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +0 -1
  160. package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +0 -1
  161. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +0 -14
  162. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +0 -1
  163. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +0 -44
  164. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +0 -419
  165. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +0 -1
  166. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +0 -12
  167. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +0 -3
  168. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +0 -1
  169. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +0 -4
  170. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +0 -257
  171. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +0 -1
  172. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +0 -1
  173. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +0 -14
  174. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +0 -1
  175. package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +0 -1
  176. package/dist/destinations/engage/sendgrid/sendEmail/index.js +0 -14
  177. package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +0 -1
  178. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +0 -1
  179. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +0 -23
  180. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +0 -1
  181. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +0 -1
  182. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +0 -14
  183. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +0 -1
  184. package/dist/destinations/engage/twilio/destinationDefinition.js +0 -172
  185. package/dist/destinations/engage/twilio/destinationDefinition.js.map +0 -1
  186. package/dist/destinations/engage/twilio/generated-types.d.ts +0 -1
  187. package/dist/destinations/engage/twilio/generated-types.js +0 -14
  188. package/dist/destinations/engage/twilio/generated-types.js.map +0 -1
  189. package/dist/destinations/engage/twilio/index.d.ts +0 -2
  190. package/dist/destinations/engage/twilio/index.js +0 -5
  191. package/dist/destinations/engage/twilio/index.js.map +0 -1
  192. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +0 -28
  193. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +0 -151
  194. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +0 -1
  195. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +0 -4
  196. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +0 -250
  197. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +0 -1
  198. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +0 -1
  199. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +0 -14
  200. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +0 -1
  201. package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +0 -1
  202. package/dist/destinations/engage/twilio/sendMobilePush/index.js +0 -14
  203. package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +0 -1
  204. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +0 -9
  205. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +0 -72
  206. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +0 -1
  207. package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +0 -4
  208. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +0 -162
  209. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +0 -1
  210. package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +0 -1
  211. package/dist/destinations/engage/twilio/sendSms/generated-types.js +0 -14
  212. package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +0 -1
  213. package/dist/destinations/engage/twilio/sendSms/index.d.ts +0 -1
  214. package/dist/destinations/engage/twilio/sendSms/index.js +0 -14
  215. package/dist/destinations/engage/twilio/sendSms/index.js.map +0 -1
  216. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +0 -9
  217. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +0 -89
  218. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +0 -1
  219. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +0 -4
  220. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +0 -136
  221. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +0 -1
  222. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +0 -1
  223. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +0 -14
  224. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +0 -1
  225. package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +0 -1
  226. package/dist/destinations/engage/twilio/sendWhatsApp/index.js +0 -14
  227. package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +0 -1
  228. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +0 -16
  229. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +0 -71
  230. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +0 -1
  231. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +0 -16
  232. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +0 -115
  233. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +0 -1
  234. package/dist/destinations/engage/twilio/utils/index.d.ts +0 -2
  235. package/dist/destinations/engage/twilio/utils/index.js +0 -15
  236. package/dist/destinations/engage/twilio/utils/index.js.map +0 -1
  237. package/dist/destinations/engage/twilio/utils/types.d.ts +0 -23
  238. package/dist/destinations/engage/twilio/utils/types.js.map +0 -1
  239. package/dist/destinations/engage/utils/AggregateError.d.ts +0 -14
  240. package/dist/destinations/engage/utils/AggregateError.js +0 -26
  241. package/dist/destinations/engage/utils/AggregateError.js.map +0 -1
  242. package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +0 -42
  243. package/dist/destinations/engage/utils/EngageActionPerformer.js +0 -148
  244. package/dist/destinations/engage/utils/EngageActionPerformer.js.map +0 -1
  245. package/dist/destinations/engage/utils/EngageLogger.d.ts +0 -18
  246. package/dist/destinations/engage/utils/EngageLogger.js +0 -52
  247. package/dist/destinations/engage/utils/EngageLogger.js.map +0 -1
  248. package/dist/destinations/engage/utils/EngageStats.d.ts +0 -18
  249. package/dist/destinations/engage/utils/EngageStats.js +0 -95
  250. package/dist/destinations/engage/utils/EngageStats.js.map +0 -1
  251. package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +0 -12
  252. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +0 -31
  253. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +0 -1
  254. package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +0 -65
  255. package/dist/destinations/engage/utils/MessageSendPerformer.js +0 -211
  256. package/dist/destinations/engage/utils/MessageSendPerformer.js.map +0 -1
  257. package/dist/destinations/engage/utils/Profile.d.ts +0 -6
  258. package/dist/destinations/engage/utils/Profile.js +0 -3
  259. package/dist/destinations/engage/utils/Profile.js.map +0 -1
  260. package/dist/destinations/engage/utils/ResponseError.d.ts +0 -25
  261. package/dist/destinations/engage/utils/ResponseError.js +0 -22
  262. package/dist/destinations/engage/utils/ResponseError.js.map +0 -1
  263. package/dist/destinations/engage/utils/apiLookups.d.ts +0 -22
  264. package/dist/destinations/engage/utils/apiLookups.js +0 -189
  265. package/dist/destinations/engage/utils/apiLookups.js.map +0 -1
  266. package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +0 -2
  267. package/dist/destinations/engage/utils/getProfileApiEndpoint.js +0 -10
  268. package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +0 -1
  269. package/dist/destinations/engage/utils/index.d.ts +0 -9
  270. package/dist/destinations/engage/utils/index.js +0 -22
  271. package/dist/destinations/engage/utils/index.js.map +0 -1
  272. package/dist/destinations/engage/utils/isDestinationActionService.d.ts +0 -1
  273. package/dist/destinations/engage/utils/isDestinationActionService.js +0 -8
  274. package/dist/destinations/engage/utils/isDestinationActionService.js.map +0 -1
  275. package/dist/destinations/engage/utils/isRetryableError.d.ts +0 -2
  276. package/dist/destinations/engage/utils/isRetryableError.js +0 -33
  277. package/dist/destinations/engage/utils/isRetryableError.js.map +0 -1
  278. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +0 -1
  279. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +0 -3
  280. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +0 -1
  281. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +0 -46
  282. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +0 -46
  283. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +0 -1
  284. package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +0 -12
  285. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +0 -23
  286. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +0 -1
  287. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +0 -12
  288. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +0 -35
  289. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +0 -1
  290. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +0 -14
  291. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +0 -31
  292. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +0 -1
  293. package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +0 -31
  294. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +0 -104
  295. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +0 -1
  296. package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +0 -39
  297. package/dist/destinations/engage/utils/operationTracking/OperationStats.js +0 -130
  298. package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +0 -1
  299. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +0 -1
  300. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +0 -377
  301. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +0 -1
  302. package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +0 -23
  303. package/dist/destinations/engage/utils/operationTracking/OperationTree.js +0 -49
  304. package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +0 -1
  305. package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +0 -6
  306. package/dist/destinations/engage/utils/operationTracking/TrackedError.js +0 -3
  307. package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +0 -1
  308. package/dist/destinations/engage/utils/operationTracking/index.d.ts +0 -10
  309. package/dist/destinations/engage/utils/operationTracking/index.js +0 -23
  310. package/dist/destinations/engage/utils/operationTracking/index.js.map +0 -1
  311. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +0 -21
  312. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +0 -99
  313. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +0 -1
  314. package/dist/destinations/engage/utils/testUtils.d.ts +0 -6
  315. package/dist/destinations/engage/utils/testUtils.js +0 -26
  316. package/dist/destinations/engage/utils/testUtils.js.map +0 -1
  317. package/dist/destinations/engage/utils/track.d.ts +0 -52
  318. package/dist/destinations/engage/utils/track.js +0 -9
  319. package/dist/destinations/engage/utils/track.js.map +0 -1
  320. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +0 -16
  321. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +0 -3
  322. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +0 -1
  323. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +0 -56
  324. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +0 -3
  325. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +0 -1
  326. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +0 -39
  327. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +0 -3
  328. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +0 -1
  329. package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +0 -27
  330. package/dist/destinations/engage-messaging-twilio/sendSms.types.js +0 -3
  331. package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +0 -1
  332. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +0 -25
  333. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +0 -3
  334. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +0 -1
  335. package/dist/destinations/facebook-custom-audiences/add/generated-types.d.ts +0 -2
  336. package/dist/destinations/facebook-custom-audiences/add/generated-types.js.map +0 -1
  337. package/dist/destinations/facebook-custom-audiences/add/index.js +0 -11
  338. package/dist/destinations/facebook-custom-audiences/add/index.js.map +0 -1
  339. package/dist/destinations/facebook-custom-audiences/remove/generated-types.d.ts +0 -2
  340. package/dist/destinations/facebook-custom-audiences/remove/generated-types.js.map +0 -1
  341. package/dist/destinations/facebook-custom-audiences/remove/index.js +0 -11
  342. package/dist/destinations/facebook-custom-audiences/remove/index.js.map +0 -1
  343. package/dist/destinations/first-party-dv360/functions.d.ts +0 -17
  344. package/dist/destinations/first-party-dv360/functions.js +0 -38
  345. package/dist/destinations/first-party-dv360/functions.js.map +0 -1
  346. package/dist/destinations/google-sheets/postSheet2/generated-types.d.ts +0 -10
  347. package/dist/destinations/google-sheets/postSheet2/generated-types.js.map +0 -1
  348. package/dist/destinations/google-sheets/postSheet2/index.js +0 -98
  349. package/dist/destinations/google-sheets/postSheet2/index.js.map +0 -1
  350. package/dist/destinations/google-sheets/postSheet2/operations2.d.ts +0 -10
  351. package/dist/destinations/google-sheets/postSheet2/operations2.js +0 -96
  352. package/dist/destinations/google-sheets/postSheet2/operations2.js.map +0 -1
  353. package/dist/destinations/salesforce/account2/generated-types.d.ts +0 -32
  354. package/dist/destinations/salesforce/account2/generated-types.js.map +0 -1
  355. package/dist/destinations/salesforce/account2/index.d.ts +0 -5
  356. package/dist/destinations/salesforce/account2/index.js +0 -248
  357. package/dist/destinations/salesforce/account2/index.js.map +0 -1
  358. package/dist/destinations/salesforce/cases2/generated-types.d.ts +0 -17
  359. package/dist/destinations/salesforce/cases2/generated-types.js.map +0 -1
  360. package/dist/destinations/salesforce/cases2/index.js +0 -76
  361. package/dist/destinations/salesforce/cases2/index.js.map +0 -1
  362. package/dist/destinations/salesforce/contact2/generated-types.d.ts +0 -25
  363. package/dist/destinations/salesforce/contact2/generated-types.js.map +0 -1
  364. package/dist/destinations/salesforce/contact2/index.d.ts +0 -5
  365. package/dist/destinations/salesforce/contact2/index.js +0 -192
  366. package/dist/destinations/salesforce/contact2/index.js.map +0 -1
  367. package/dist/destinations/salesforce/customObject2/generated-types.d.ts +0 -17
  368. package/dist/destinations/salesforce/customObject2/generated-types.js +0 -3
  369. package/dist/destinations/salesforce/customObject2/generated-types.js.map +0 -1
  370. package/dist/destinations/salesforce/customObject2/index.d.ts +0 -5
  371. package/dist/destinations/salesforce/customObject2/index.js +0 -97
  372. package/dist/destinations/salesforce/customObject2/index.js.map +0 -1
  373. package/dist/destinations/salesforce/lead2/generated-types.d.ts +0 -25
  374. package/dist/destinations/salesforce/lead2/generated-types.js +0 -3
  375. package/dist/destinations/salesforce/lead2/generated-types.js.map +0 -1
  376. package/dist/destinations/salesforce/lead2/index.d.ts +0 -5
  377. package/dist/destinations/salesforce/lead2/index.js +0 -200
  378. package/dist/destinations/salesforce/lead2/index.js.map +0 -1
  379. package/dist/destinations/salesforce/opportunity2/generated-types.d.ts +0 -21
  380. package/dist/destinations/salesforce/opportunity2/generated-types.js +0 -3
  381. package/dist/destinations/salesforce/opportunity2/generated-types.js.map +0 -1
  382. package/dist/destinations/salesforce/opportunity2/index.d.ts +0 -5
  383. package/dist/destinations/salesforce/opportunity2/index.js +0 -112
  384. package/dist/destinations/salesforce/opportunity2/index.js.map +0 -1
  385. /package/dist/destinations/{amazon-ads → dawn}/generated-types.js +0 -0
  386. /package/dist/destinations/{amazon-ads/syncAudiences → dawn/identifyUser}/generated-types.js +0 -0
  387. /package/dist/destinations/{amazon-ads/syncAudiences → dawn/identifyUser}/index.d.ts +0 -0
  388. /package/dist/destinations/{facebook-custom-audiences/add → dawn/track}/generated-types.js +0 -0
  389. /package/dist/destinations/{facebook-custom-audiences/add → dawn/track}/index.d.ts +0 -0
  390. /package/dist/destinations/{facebook-custom-audiences/remove → hubspot/customEvent}/generated-types.js +0 -0
  391. /package/dist/destinations/{google-sheets/postSheet2 → hubspot/customEvent}/index.d.ts +0 -0
  392. /package/dist/destinations/{google-sheets/postSheet2 → topsort/click}/generated-types.js +0 -0
  393. /package/dist/destinations/{facebook-custom-audiences/remove → topsort/click}/index.d.ts +0 -0
  394. /package/dist/destinations/{salesforce/account2 → topsort}/generated-types.js +0 -0
  395. /package/dist/destinations/{salesforce/cases2 → topsort/impression}/generated-types.js +0 -0
  396. /package/dist/destinations/{salesforce/cases2 → topsort/impression}/index.d.ts +0 -0
  397. /package/dist/destinations/{salesforce/contact2 → topsort/purchase}/generated-types.js +0 -0
@@ -3,50 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const actions_core_1 = require("@segment/actions-core");
7
6
  const addToList_1 = __importDefault(require("./addToList"));
8
- const functions_1 = require("./functions");
9
- const errors_1 = require("../display-video-360/errors");
10
7
  const destination = {
11
8
  name: 'First Party Dv360',
12
9
  slug: 'actions-first-party-dv360',
13
10
  mode: 'cloud',
14
- audienceFields: {
15
- advertiserId: {
16
- type: 'string',
17
- label: 'Advertiser ID',
18
- required: true,
19
- description: 'The ID of your advertiser, used throughout Display & Video 360. Use this ID when you contact Display & Video 360 support to help our teams locate your specific account.'
20
- },
21
- audienceType: {
22
- type: 'string',
23
- label: 'Audience Type',
24
- choices: [
25
- { label: 'CUSTOMER MATCH CONTACT INFO', value: 'CUSTOMER_MATCH_CONTACT_INFO' },
26
- { label: 'CUSTOMER MATCH DEVICE ID', value: 'CUSTOMER_MATCH_DEVICE_ID' }
27
- ],
28
- required: true,
29
- description: 'The type of the audience.'
30
- },
31
- description: {
32
- type: 'string',
33
- label: 'Description',
34
- required: false,
35
- description: 'The description of the audience.'
36
- },
37
- membershipDurationDays: {
38
- type: 'string',
39
- label: 'Membership Duration Days',
40
- required: true,
41
- description: 'The duration in days that an entry remains in the audience after the qualifying event. If the audience has no expiration, set the value of this field to 10000. Otherwise, the set value must be greater than 0 and less than or equal to 540.'
42
- },
43
- token: {
44
- type: 'string',
45
- label: 'Auth Token',
46
- required: true,
47
- description: 'temp until we build authentication flow'
48
- }
49
- },
50
11
  authentication: {
51
12
  scheme: 'custom',
52
13
  fields: {},
@@ -54,92 +15,17 @@ const destination = {
54
15
  return { status: 'succeeded' };
55
16
  }
56
17
  },
18
+ audienceFields: {},
57
19
  audienceConfig: {
58
20
  mode: {
59
21
  type: 'synced',
60
22
  full_audience_sync: false
61
23
  },
62
- createAudience: async (_request, createAudienceInput) => {
63
- const { audienceName, audienceSettings, statsContext } = createAudienceInput;
64
- const advertiserId = audienceSettings?.advertiserId?.trim();
65
- const description = audienceSettings?.description;
66
- const membershipDurationDays = audienceSettings?.membershipDurationDays;
67
- const audienceType = audienceSettings?.audienceType;
68
- const token = audienceSettings?.token;
69
- const statsName = 'createAudience';
70
- const { statsClient, tags: statsTags } = statsContext || {};
71
- statsTags?.push(`slug:${destination.slug}`);
72
- statsClient?.incr(`${statsName}.call`, 1, statsTags);
73
- if (!audienceName) {
74
- statsTags?.push('error:missing-settings');
75
- statsClient?.incr(`${statsName}.error`, 1, statsTags);
76
- throw new actions_core_1.IntegrationError('Missing audience name value', 'MISSING_REQUIRED_FIELD', 400);
77
- }
78
- if (!advertiserId) {
79
- statsTags?.push('error:missing-settings');
80
- statsClient?.incr(`${statsName}.error`, 1, statsTags);
81
- throw new actions_core_1.IntegrationError('Missing advertiser ID value', 'MISSING_REQUIRED_FIELD', 400);
82
- }
83
- if (!membershipDurationDays) {
84
- statsTags?.push('error:missing-settings');
85
- statsClient?.incr(`${statsName}.error`, 1, statsTags);
86
- throw new actions_core_1.IntegrationError('Missing membership duration days value', 'MISSING_REQUIRED_FIELD', 400);
87
- }
88
- if (!audienceType) {
89
- statsTags?.push('error:missing-settings');
90
- statsClient?.incr(`${statsName}.error`, 1, statsTags);
91
- throw new actions_core_1.IntegrationError('Missing audience type value', 'MISSING_REQUIRED_FIELD', 400);
92
- }
93
- try {
94
- const response = await functions_1.createAudienceRequest(_request, {
95
- advertiserId,
96
- audienceName,
97
- description,
98
- membershipDurationDays,
99
- audienceType,
100
- token
101
- });
102
- const r = await response.json();
103
- statsClient?.incr(`${statsName}.success`, 1, statsTags);
104
- return {
105
- externalId: r.firstAndThirdPartyAudienceId
106
- };
107
- }
108
- catch (error) {
109
- throw errors_1.handleRequestError(error, statsName, statsContext);
110
- }
24
+ createAudience: async (_request, _createAudienceInput) => {
25
+ return { externalId: '' };
111
26
  },
112
- getAudience: async (_request, getAudienceInput) => {
113
- const { audienceSettings, statsContext } = getAudienceInput;
114
- const audienceId = getAudienceInput.externalId;
115
- const advertiserId = audienceSettings?.advertiserId?.trim();
116
- const token = audienceSettings?.token;
117
- const statsName = 'getAudience';
118
- const { statsClient, tags: statsTags } = statsContext || {};
119
- statsTags?.push(`slug:${destination.slug}`);
120
- statsClient?.incr(`${statsName}.call`, 1, statsTags);
121
- if (!advertiserId) {
122
- statsTags?.push('error:missing-settings');
123
- statsClient?.incr(`${statsName}.error`, 1, statsTags);
124
- throw new actions_core_1.IntegrationError('Missing required advertiser ID value', 'MISSING_REQUIRED_FIELD', 400);
125
- }
126
- try {
127
- console.log(advertiserId, audienceId, token);
128
- const response = await functions_1.getAudienceRequest(_request, { advertiserId, audienceId, token });
129
- if (!response.ok) {
130
- statsTags?.push('error:api-request-failed');
131
- statsClient?.incr(`${statsName}.error`, 1, statsTags);
132
- throw new actions_core_1.IntegrationError('Failed to retrieve audience details', 'API_REQUEST_FAILED', response.status);
133
- }
134
- const audienceData = await response.json();
135
- statsClient?.incr(`${statsName}.success`, 1, statsTags);
136
- return {
137
- externalId: audienceData.firstAndThirdPartyAudienceId
138
- };
139
- }
140
- catch (error) {
141
- throw errors_1.handleRequestError(error, statsName, statsContext);
142
- }
27
+ getAudience: async (_request, _getAudienceInput) => {
28
+ return { externalId: '' };
143
29
  }
144
30
  },
145
31
  onDelete: async (_request, _) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/first-party-dv360/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAuF;AAGv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YAAY,CAAC,4BAA4B;iBACtD,CAAA;aACF;YAAC,OAAO,KAAK,EAAE;gBAEd,MAAM,2BAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,YAAY,CAAC,CAAA;aACzD;QACH,CAAC;KACF;IAED,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE;IAIhC,CAAC;IAED,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;KACV;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/first-party-dv360/index.ts"],"names":[],"mappings":";;;;;AAGA,4DAAmC;AAEnC,MAAM,WAAW,GAA4C;IAC3D,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,EAAE;QACV,kBAAkB,EAAE,CAAC,QAAQ,EAAE,EAAE;YAC/B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAA;QAChC,CAAC;KACF;IAED,cAAc,EAAE,EAAE;IAElB,cAAc,EAAE;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,kBAAkB,EAAE,KAAK;SAC1B;QAED,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE,oBAAoB,EAAE,EAAE;YACvD,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAA;QAC3B,CAAC;QAED,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,EAAE;YACjD,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAA;QAC3B,CAAC;KACF;IAED,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE;IAIhC,CAAC;IAED,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;KACV;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -10,4 +10,4 @@ export declare const endpoints: {
10
10
  identifyPlayer: string;
11
11
  };
12
12
  export declare const playerProperties: Record<string, InputField>;
13
- export declare const sendRequest: (request: RequestClient, path: string, settings: Settings, body: any, addSecretey?: boolean) => Promise<import("@segment/actions-core/src").ModifiedResponse<unknown>>;
13
+ export declare const sendRequest: (request: RequestClient, path: string, settings: Settings, body: any, addSecretey?: boolean) => Promise<import("@segment/actions-core/create-request-client").ModifiedResponse<unknown>>;
@@ -9,5 +9,5 @@ export declare function getMobileStreamParams(api_secret: string, firebase_app_i
9
9
  export declare function getWebStreamParams(api_secret: string, measurement_id?: string, client_id?: string): DataStreamParams;
10
10
  export declare function sendData(request: RequestClient, search_params: string, payload: {
11
11
  [k: string]: unknown;
12
- }): Promise<import("@segment/actions-core/src").ModifiedResponse<unknown>>;
12
+ }): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
13
13
  export declare const formatConsent: (consent: Consent) => object | undefined;
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const postSheet_1 = __importDefault(require("./postSheet"));
7
- const postSheet2_1 = __importDefault(require("./postSheet2"));
8
7
  const destination = {
9
8
  name: 'Google Sheets',
10
9
  slug: 'actions-google-sheets',
@@ -33,8 +32,7 @@ const destination = {
33
32
  };
34
33
  },
35
34
  actions: {
36
- postSheet: postSheet_1.default,
37
- postSheet2: postSheet2_1.default
35
+ postSheet: postSheet_1.default
38
36
  }
39
37
  };
40
38
  exports.default = destination;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/google-sheets/index.ts"],"names":[],"mappings":";;;;;AAGA,4DAAmC;AACnC,8DAAqC;AAQrC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,M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EAAE,IAAI,CAAC,QAAQ;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,UAAU,EAAE,eAAe;iBAC5B,CAAC;aACH,CAAC,CAAA;YAEF,OAAO,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,CAAA;QAC/C,CAAC;KACF;IACD,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;SACF,CAAA;IACH,CAAC;IAQD,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;KACV;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -6,5 +6,5 @@ export declare type MappingSettings = {
6
6
  dataFormat: string;
7
7
  columns: string[];
8
8
  };
9
- declare function processData(request: RequestClient, events: Payload[]): Promise<(import("@segment/actions-core/src").ModifiedResponse<unknown> | undefined)[]>;
9
+ declare function processData(request: RequestClient, events: Payload[]): Promise<(import("@segment/actions-core").ModifiedResponse<unknown> | undefined)[]>;
10
10
  export { processData };
@@ -0,0 +1,2 @@
1
+ import { InputField } from '@segment/actions-core';
2
+ export declare const commonFields: Record<string, InputField>;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commonFields = void 0;
4
+ exports.commonFields = {
5
+ event_name: {
6
+ label: 'Event Name',
7
+ description: 'The name of the event to send to Hubspot.',
8
+ type: 'string',
9
+ required: true,
10
+ dynamic: true
11
+ },
12
+ record_details: {
13
+ label: 'Associated Record Details',
14
+ description: 'Details of the record to associate the event with',
15
+ type: 'object',
16
+ required: true,
17
+ defaultObjectUI: 'keyvalue:only',
18
+ additionalProperties: false,
19
+ properties: {
20
+ object_type: {
21
+ label: 'Object Type',
22
+ description: 'The type of Hubspot Object to associate the event with.',
23
+ type: 'string',
24
+ required: true,
25
+ dynamic: true
26
+ },
27
+ object_id: {
28
+ label: 'Object ID',
29
+ description: 'The Object ID of the object to associate the event with. For example a contact id or a visitor id value. Works for Contacts, Companies, Deals, Tickets and Custom Objects.',
30
+ type: 'string',
31
+ required: false
32
+ },
33
+ email: {
34
+ label: 'Email Address',
35
+ description: 'The email address of the Contact to associate the event with. This field only works for Contact objects.',
36
+ type: 'string',
37
+ required: false,
38
+ format: 'email',
39
+ default: {
40
+ '@if': {
41
+ exists: { '@path': '$.properties.email' },
42
+ then: { '@path': '$.properties.email' },
43
+ else: { '@path': '$.context.traits.email' }
44
+ }
45
+ }
46
+ },
47
+ utk: {
48
+ label: 'User Token / UTK',
49
+ description: 'The user token of the Contact to associate the event with.',
50
+ type: 'string',
51
+ required: false
52
+ }
53
+ }
54
+ },
55
+ properties: {
56
+ label: 'Properties',
57
+ description: 'Properties to send with the event.',
58
+ type: 'object',
59
+ required: false,
60
+ defaultObjectUI: 'keyvalue',
61
+ dynamic: true,
62
+ additionalProperties: true
63
+ },
64
+ occurred_at: {
65
+ label: 'Event Timestamp',
66
+ description: 'The time when this event occurred.',
67
+ type: 'datetime',
68
+ required: false,
69
+ default: {
70
+ '@path': '$.timestamp'
71
+ }
72
+ }
73
+ };
74
+ //# sourceMappingURL=common-fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common-fields.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/customEvent/common-fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAA+B;IACtD,UAAU,EAAE;QACV,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,2CAA2C;QACxD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACd;IACD,cAAc,EAAE;QACd,KAAK,EAAE,2BAA2B;QAClC,WAAW,EAAE,mDAAmD;QAChE,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,eAAe,EAAE,eAAe;QAChC,oBAAoB,EAAE,KAAK;QAC3B,UAAU,EAAE;YACV,WAAW,EAAE;gB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1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUPPORTED_HUBSPOT_OBJECT_TYPES = void 0;
4
+ exports.SUPPORTED_HUBSPOT_OBJECT_TYPES = [
5
+ { label: 'Contact', value: 'contact' },
6
+ { label: 'Company', value: 'company' },
7
+ { label: 'Deal', value: 'deal' },
8
+ { label: 'Ticket', value: 'ticket' }
9
+ ];
10
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/customEvent/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,8BAA8B,GAAG;IAC5C,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACtC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACtC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAChC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;CACrC,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { RequestClient } from '@segment/actions-core';
2
+ import { DynamicFieldResponse } from '@segment/actions-core';
3
+ export declare function dynamicReadEventNames(request: RequestClient): Promise<{
4
+ choices: {
5
+ label: string;
6
+ value: string;
7
+ }[];
8
+ error?: undefined;
9
+ } | {
10
+ choices: never[];
11
+ error: {
12
+ message: string;
13
+ code: string;
14
+ };
15
+ }>;
16
+ export declare function dynamicReadObjectTypes(request: RequestClient): Promise<DynamicFieldResponse>;
17
+ export declare function dynamicReadProperties(request: RequestClient, eventName: string): Promise<{
18
+ choices: ({
19
+ label: string;
20
+ value: string;
21
+ } | {
22
+ label: string;
23
+ value: string;
24
+ })[];
25
+ error?: undefined;
26
+ } | {
27
+ choices: never[];
28
+ error: {
29
+ message: string;
30
+ code: string;
31
+ };
32
+ }>;
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dynamicReadProperties = exports.dynamicReadObjectTypes = exports.dynamicReadEventNames = void 0;
4
+ const properties_1 = require("../properties");
5
+ const constants_1 = require("./constants");
6
+ async function dynamicReadEventNames(request) {
7
+ try {
8
+ const response = await request(`${properties_1.HUBSPOT_BASE_URL}/events/v3/event-definitions/?includeProperties=false`, {
9
+ method: 'GET',
10
+ skipResponseCloning: true
11
+ });
12
+ return {
13
+ choices: response.data.results
14
+ .filter((event) => !event.archived && (event.labels?.singular || event.labels?.plural))
15
+ .map((event) => {
16
+ return {
17
+ label: event.labels?.singular ?? event.labels?.plural ?? '',
18
+ value: event.fullyQualifiedName
19
+ };
20
+ })
21
+ .sort((a, b) => a.label.toLowerCase().localeCompare(b.label.toLowerCase()))
22
+ };
23
+ }
24
+ catch (err) {
25
+ return {
26
+ choices: [],
27
+ error: {
28
+ message: err?.response?.data?.message ?? 'Unknown error: dynamicReadEventNames',
29
+ code: err?.response?.data?.category ?? 'Unknown code'
30
+ }
31
+ };
32
+ }
33
+ }
34
+ exports.dynamicReadEventNames = dynamicReadEventNames;
35
+ async function dynamicReadObjectTypes(request) {
36
+ const defaultChoices = constants_1.SUPPORTED_HUBSPOT_OBJECT_TYPES;
37
+ try {
38
+ const response = await request(`${properties_1.HUBSPOT_BASE_URL}/crm/v3/schemas?archived=false`, {
39
+ method: 'GET',
40
+ skipResponseCloning: true
41
+ });
42
+ const choices = response.data.results.map((schema) => ({
43
+ label: `${schema.labels.plural} (Custom)`,
44
+ value: schema.name
45
+ }));
46
+ return {
47
+ choices: [...choices, ...defaultChoices]
48
+ .sort((a, b) => a.label.toLowerCase().localeCompare(b.label.toLowerCase()))
49
+ };
50
+ }
51
+ catch (err) {
52
+ return {
53
+ choices: [],
54
+ error: {
55
+ message: err?.response?.data?.message ?? 'Unknown error: dynamicReadObjectTypes',
56
+ code: err?.response?.data?.category ?? 'Unknown code'
57
+ }
58
+ };
59
+ }
60
+ }
61
+ exports.dynamicReadObjectTypes = dynamicReadObjectTypes;
62
+ async function dynamicReadProperties(request, eventName) {
63
+ try {
64
+ const response = await request(`${properties_1.HUBSPOT_BASE_URL}/events/v3/event-definitions/?includeProperties=true`, {
65
+ method: 'GET',
66
+ skipResponseCloning: true
67
+ });
68
+ return {
69
+ choices: [
70
+ ...response.data.results
71
+ .filter((event) => event.fullyQualifiedName === eventName && !event.archived)
72
+ .map((event) => {
73
+ if (!event.properties || event.properties.length === 0) {
74
+ return {
75
+ label: `No properties found for event ${eventName}`,
76
+ value: ''
77
+ };
78
+ }
79
+ return event.properties
80
+ .filter((property) => !property.archived)
81
+ .sort((a, b) => a.label.toLowerCase().localeCompare(b.label.toLowerCase()))
82
+ .map((property) => {
83
+ return {
84
+ label: `${property.label} - ${property.type}`,
85
+ value: property.name
86
+ };
87
+ });
88
+ })
89
+ .flat()
90
+ ]
91
+ };
92
+ }
93
+ catch (err) {
94
+ return {
95
+ choices: [],
96
+ error: {
97
+ message: err?.response?.data?.message ?? 'Unknown error: dynamicReadProperties',
98
+ code: err?.response?.data?.category ?? 'Unknown code'
99
+ }
100
+ };
101
+ }
102
+ }
103
+ exports.dynamicReadProperties = dynamicReadProperties;
104
+ //# sourceMappingURL=dynamic-fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-fields.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/customEvent/dynamic-fields.ts"],"names":[],"mappings":";;;AAEA,8CAAgD;AAChD,2CAA4D;AAIrD,KAAK,UAAU,qBAAqB,CAAC,OAAsB;IAgBhE,IAAI;QACF,MAAM,QAAQ,GAAiB,MAAM,OAAO,CAC1C,GAAG,6BAAgB,uDAAuD,EAC1E;YACE,MAAM,EAAE,KAAK;YACb,mBAAmB,EAAE,IAAI;SAC1B,CACF,CAAA;QAED,OAAO;YACL,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO;iBAC3B,MAAM,CAAC,CAAC,KAAiB,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,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,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;yBACxC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;yBAC1E,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;wBAChB,OAAO;4BACL,KAAK,EAAE,GAAG,QAAQ,CAAC,KAAK,MAAM,QAAQ,CAAC,IAAI,EAAE;4BAC7C,KAAK,EAAE,QAAQ,CAAC,IAAI;yBACrB,CAAA;oBACH,CAAC,CAAC,CAAA;gBACN,CAAC,CAAC;qBACD,IAAI,EAAE;aACV;SACF,CAAA;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO;YACL,OAAO,EAAE,EAAE;YACX,KAAK,EAAE;gBACL,OAAO,EAAG,GAAoB,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,IAAI,sCAAsC;gBACjG,IAAI,EAAG,GAAoB,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,IAAI,cAAc;aACxE;SACF,CAAA;KACF;AACH,CAAC;AAlED,sDAkEC"}
@@ -0,0 +1,13 @@
1
+ export interface Payload {
2
+ event_name: string;
3
+ record_details: {
4
+ object_type: string;
5
+ object_id?: string;
6
+ email?: string;
7
+ utk?: string;
8
+ };
9
+ properties?: {
10
+ [k: string]: unknown;
11
+ };
12
+ occurred_at?: string | number;
13
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/customEvent/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
1
+ import { RequestClient } from '@segment/actions-core';
2
+ import type { Payload } from './generated-types';
3
+ export declare type SyncMode = 'upsert' | 'add' | 'update';
4
+ declare type StringFormat = 'date' | 'datetime' | 'string';
5
+ declare type SegmentPropertyType = 'number' | 'object' | 'boolean' | 'string';
6
+ interface SegmentProperty {
7
+ type: SegmentPropertyType;
8
+ stringFormat?: StringFormat;
9
+ }
10
+ declare type SchemaMatch = 'full_match' | 'properties_missing' | 'no_match' | 'mismatch';
11
+ interface SchemaDiff {
12
+ match: SchemaMatch;
13
+ fullyQualifiedName?: string;
14
+ name?: string;
15
+ missingProperties: {
16
+ [key: string]: SegmentProperty;
17
+ };
18
+ }
19
+ interface SegmentEventSchema {
20
+ eventName: string;
21
+ properties: {
22
+ [key: string]: SegmentProperty;
23
+ };
24
+ primaryObject: string;
25
+ }
26
+ declare type HubspotPropertyType = 'string' | 'number' | 'enumeration' | 'datetime';
27
+ interface PropertyRequestJSON {
28
+ name: string;
29
+ label: string;
30
+ type: HubspotPropertyType;
31
+ description: string;
32
+ options?: Array<{
33
+ label: string;
34
+ value: boolean;
35
+ description: string;
36
+ hidden: boolean;
37
+ displayOrder: number;
38
+ }>;
39
+ }
40
+ export declare class HubspotClient {
41
+ request: RequestClient;
42
+ syncMode: SyncMode;
43
+ constructor(request: RequestClient, syncMode: SyncMode);
44
+ stringFormat(str: string): StringFormat;
45
+ sanitizeEventName(str: string): string;
46
+ sanitizePropertyName(str: string): string;
47
+ sanitizeProperties(properties: {
48
+ [k: string]: unknown;
49
+ }): {
50
+ [k: string]: string | number | boolean;
51
+ };
52
+ propertyBody(eventName: string, type: SegmentPropertyType, name: string, stringFormat?: StringFormat): PropertyRequestJSON;
53
+ segmentSchema(payload: Payload): SegmentEventSchema;
54
+ compareSchemaToCache(schema: SegmentEventSchema): Promise<SchemaDiff>;
55
+ compareSchemaToHubspot(schema: SegmentEventSchema): Promise<SchemaDiff>;
56
+ saveSchemaToCache(fullyQualifiedName: string, name: string, schema: SegmentEventSchema): Promise<void>;
57
+ sendEvent(fullyQualifiedName: string, payload: Payload): Promise<void>;
58
+ send(payload: Payload): Promise<void>;
59
+ createHubspotSchema(schema: SegmentEventSchema): Promise<SchemaDiff>;
60
+ updateHubspotSchema(fullyQualifiedName: string, schemaDiff: SchemaDiff): Promise<void>;
61
+ }
62
+ export {};