@segment/action-destinations 3.360.1-remove-abort-controller.1 → 3.362.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 (398) hide show
  1. package/dist/destinations/actable-predictive/sendCustomEvent/index.js +0 -3
  2. package/dist/destinations/actable-predictive/sendCustomEvent/index.js.map +1 -1
  3. package/dist/destinations/actable-predictive/sendEmailEvent/index.js +0 -6
  4. package/dist/destinations/actable-predictive/sendEmailEvent/index.js.map +1 -1
  5. package/dist/destinations/actable-predictive/sendTransactionEvent/index.js +0 -6
  6. package/dist/destinations/actable-predictive/sendTransactionEvent/index.js.map +1 -1
  7. package/dist/destinations/actable-predictive/sendWebEvent/index.js +0 -6
  8. package/dist/destinations/actable-predictive/sendWebEvent/index.js.map +1 -1
  9. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
  10. package/dist/destinations/customerio/utils.d.ts +1 -1
  11. package/dist/destinations/delivrai-activate/updateSegment/index.js +0 -1
  12. package/dist/destinations/delivrai-activate/updateSegment/index.js.map +1 -1
  13. package/dist/destinations/google-enhanced-conversions/functions.d.ts +17 -19
  14. package/dist/destinations/google-enhanced-conversions/functions.js +15 -11
  15. package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -1
  16. package/dist/destinations/salesforce/lead/index.js +1 -0
  17. package/dist/destinations/salesforce/lead/index.js.map +1 -1
  18. package/dist/destinations/salesforce/sf-properties.d.ts +1 -0
  19. package/dist/destinations/salesforce/sf-properties.js +10 -1
  20. package/dist/destinations/salesforce/sf-properties.js.map +1 -1
  21. package/dist/destinations/snap-conversions-api/_tests_/index.test.js +0 -1
  22. package/dist/destinations/snap-conversions-api/_tests_/index.test.js.map +1 -1
  23. package/dist/destinations/webhook-extensible/index.js +7 -1
  24. package/dist/destinations/webhook-extensible/index.js.map +1 -1
  25. package/package.json +4 -4
  26. package/dist/destinations/accoil-analytics/postToAccoil/generated-types.d.ts +0 -5
  27. package/dist/destinations/accoil-analytics/postToAccoil/generated-types.js +0 -3
  28. package/dist/destinations/accoil-analytics/postToAccoil/generated-types.js.map +0 -1
  29. package/dist/destinations/accoil-analytics/postToAccoil/index.d.ts +0 -5
  30. package/dist/destinations/accoil-analytics/postToAccoil/index.js +0 -28
  31. package/dist/destinations/accoil-analytics/postToAccoil/index.js.map +0 -1
  32. package/dist/destinations/braze/createAliasV2.types.d.ts +0 -5
  33. package/dist/destinations/braze/createAliasV2.types.js +0 -3
  34. package/dist/destinations/braze/createAliasV2.types.js.map +0 -1
  35. package/dist/destinations/braze/identifyUserV2.types.d.ts +0 -8
  36. package/dist/destinations/braze/identifyUserV2.types.js +0 -3
  37. package/dist/destinations/braze/identifyUserV2.types.js.map +0 -1
  38. package/dist/destinations/campaign-manager-360/common-fields.d.ts +0 -3
  39. package/dist/destinations/campaign-manager-360/common-fields.js +0 -306
  40. package/dist/destinations/campaign-manager-360/common-fields.js.map +0 -1
  41. package/dist/destinations/campaign-manager-360/conversionAdjustmentUpload/generated-types.d.ts +0 -45
  42. package/dist/destinations/campaign-manager-360/conversionAdjustmentUpload/generated-types.js +0 -3
  43. package/dist/destinations/campaign-manager-360/conversionAdjustmentUpload/generated-types.js.map +0 -1
  44. package/dist/destinations/campaign-manager-360/conversionAdjustmentUpload/index.d.ts +0 -5
  45. package/dist/destinations/campaign-manager-360/conversionAdjustmentUpload/index.js +0 -86
  46. package/dist/destinations/campaign-manager-360/conversionAdjustmentUpload/index.js.map +0 -1
  47. package/dist/destinations/campaign-manager-360/conversionUpload/generated-types.d.ts +0 -50
  48. package/dist/destinations/campaign-manager-360/conversionUpload/generated-types.js +0 -3
  49. package/dist/destinations/campaign-manager-360/conversionUpload/generated-types.js.map +0 -1
  50. package/dist/destinations/campaign-manager-360/conversionUpload/index.d.ts +0 -5
  51. package/dist/destinations/campaign-manager-360/conversionUpload/index.js +0 -131
  52. package/dist/destinations/campaign-manager-360/conversionUpload/index.js.map +0 -1
  53. package/dist/destinations/campaign-manager-360/generated-types.d.ts +0 -5
  54. package/dist/destinations/campaign-manager-360/generated-types.js +0 -3
  55. package/dist/destinations/campaign-manager-360/generated-types.js.map +0 -1
  56. package/dist/destinations/campaign-manager-360/index.d.ts +0 -4
  57. package/dist/destinations/campaign-manager-360/index.js +0 -63
  58. package/dist/destinations/campaign-manager-360/index.js.map +0 -1
  59. package/dist/destinations/campaign-manager-360/types.d.ts +0 -116
  60. package/dist/destinations/campaign-manager-360/types.js +0 -23
  61. package/dist/destinations/campaign-manager-360/types.js.map +0 -1
  62. package/dist/destinations/campaign-manager-360/utils.d.ts +0 -21
  63. package/dist/destinations/campaign-manager-360/utils.js +0 -175
  64. package/dist/destinations/campaign-manager-360/utils.js.map +0 -1
  65. package/dist/destinations/contentstack/customAttributesSync/generated-types.d.ts +0 -7
  66. package/dist/destinations/contentstack/customAttributesSync/generated-types.js +0 -3
  67. package/dist/destinations/contentstack/customAttributesSync/generated-types.js.map +0 -1
  68. package/dist/destinations/contentstack/customAttributesSync/index.d.ts +0 -5
  69. package/dist/destinations/contentstack/customAttributesSync/index.js +0 -54
  70. package/dist/destinations/contentstack/customAttributesSync/index.js.map +0 -1
  71. package/dist/destinations/contentstack/customAttributesSync/types.d.ts +0 -14
  72. package/dist/destinations/contentstack/customAttributesSync/types.js +0 -3
  73. package/dist/destinations/contentstack/customAttributesSync/types.js.map +0 -1
  74. package/dist/destinations/contentstack/customAttributesSync/utils.d.ts +0 -4
  75. package/dist/destinations/contentstack/customAttributesSync/utils.js +0 -20
  76. package/dist/destinations/contentstack/customAttributesSync/utils.js.map +0 -1
  77. package/dist/destinations/contentstack/types.d.ts +0 -12
  78. package/dist/destinations/contentstack/types.js +0 -3
  79. package/dist/destinations/contentstack/types.js.map +0 -1
  80. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.d.ts +0 -22
  81. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js +0 -3
  82. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +0 -1
  83. package/dist/destinations/dynamic-yield-audiences/types.d.ts +0 -8
  84. package/dist/destinations/dynamic-yield-audiences/types.js +0 -12
  85. package/dist/destinations/dynamic-yield-audiences/types.js.map +0 -1
  86. package/dist/destinations/engage/sendgrid/Profile.d.ts +0 -6
  87. package/dist/destinations/engage/sendgrid/Profile.js +0 -3
  88. package/dist/destinations/engage/sendgrid/Profile.js.map +0 -1
  89. package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +0 -3
  90. package/dist/destinations/engage/sendgrid/destinationDefinition.js +0 -70
  91. package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +0 -1
  92. package/dist/destinations/engage/sendgrid/generated-types.d.ts +0 -1
  93. package/dist/destinations/engage/sendgrid/generated-types.js +0 -14
  94. package/dist/destinations/engage/sendgrid/generated-types.js.map +0 -1
  95. package/dist/destinations/engage/sendgrid/index.d.ts +0 -2
  96. package/dist/destinations/engage/sendgrid/index.js +0 -5
  97. package/dist/destinations/engage/sendgrid/index.js.map +0 -1
  98. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +0 -4
  99. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +0 -28
  100. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +0 -1
  101. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +0 -21
  102. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +0 -174
  103. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +0 -1
  104. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +0 -1
  105. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +0 -14
  106. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +0 -1
  107. package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +0 -1
  108. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +0 -14
  109. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +0 -1
  110. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +0 -44
  111. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +0 -419
  112. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +0 -1
  113. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +0 -12
  114. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +0 -3
  115. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +0 -1
  116. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +0 -4
  117. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +0 -257
  118. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +0 -1
  119. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +0 -1
  120. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +0 -14
  121. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +0 -1
  122. package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +0 -1
  123. package/dist/destinations/engage/sendgrid/sendEmail/index.js +0 -14
  124. package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +0 -1
  125. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +0 -1
  126. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +0 -23
  127. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +0 -1
  128. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +0 -1
  129. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +0 -14
  130. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +0 -1
  131. package/dist/destinations/engage/twilio/destinationDefinition.d.ts +0 -3
  132. package/dist/destinations/engage/twilio/destinationDefinition.js +0 -172
  133. package/dist/destinations/engage/twilio/destinationDefinition.js.map +0 -1
  134. package/dist/destinations/engage/twilio/generated-types.d.ts +0 -1
  135. package/dist/destinations/engage/twilio/generated-types.js +0 -14
  136. package/dist/destinations/engage/twilio/generated-types.js.map +0 -1
  137. package/dist/destinations/engage/twilio/index.d.ts +0 -2
  138. package/dist/destinations/engage/twilio/index.js +0 -5
  139. package/dist/destinations/engage/twilio/index.js.map +0 -1
  140. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +0 -28
  141. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +0 -151
  142. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +0 -1
  143. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +0 -4
  144. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +0 -250
  145. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +0 -1
  146. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +0 -1
  147. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +0 -14
  148. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +0 -1
  149. package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +0 -1
  150. package/dist/destinations/engage/twilio/sendMobilePush/index.js +0 -14
  151. package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +0 -1
  152. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +0 -9
  153. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +0 -72
  154. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +0 -1
  155. package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +0 -4
  156. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +0 -162
  157. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +0 -1
  158. package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +0 -1
  159. package/dist/destinations/engage/twilio/sendSms/generated-types.js +0 -14
  160. package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +0 -1
  161. package/dist/destinations/engage/twilio/sendSms/index.d.ts +0 -1
  162. package/dist/destinations/engage/twilio/sendSms/index.js +0 -14
  163. package/dist/destinations/engage/twilio/sendSms/index.js.map +0 -1
  164. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +0 -9
  165. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +0 -89
  166. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +0 -1
  167. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +0 -4
  168. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +0 -136
  169. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +0 -1
  170. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +0 -1
  171. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +0 -14
  172. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +0 -1
  173. package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +0 -1
  174. package/dist/destinations/engage/twilio/sendWhatsApp/index.js +0 -14
  175. package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +0 -1
  176. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +0 -16
  177. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +0 -71
  178. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +0 -1
  179. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +0 -16
  180. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +0 -115
  181. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +0 -1
  182. package/dist/destinations/engage/twilio/utils/index.d.ts +0 -2
  183. package/dist/destinations/engage/twilio/utils/index.js +0 -15
  184. package/dist/destinations/engage/twilio/utils/index.js.map +0 -1
  185. package/dist/destinations/engage/twilio/utils/types.d.ts +0 -23
  186. package/dist/destinations/engage/twilio/utils/types.js +0 -3
  187. package/dist/destinations/engage/twilio/utils/types.js.map +0 -1
  188. package/dist/destinations/engage/utils/AggregateError.d.ts +0 -14
  189. package/dist/destinations/engage/utils/AggregateError.js +0 -26
  190. package/dist/destinations/engage/utils/AggregateError.js.map +0 -1
  191. package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +0 -42
  192. package/dist/destinations/engage/utils/EngageActionPerformer.js +0 -148
  193. package/dist/destinations/engage/utils/EngageActionPerformer.js.map +0 -1
  194. package/dist/destinations/engage/utils/EngageLogger.d.ts +0 -18
  195. package/dist/destinations/engage/utils/EngageLogger.js +0 -52
  196. package/dist/destinations/engage/utils/EngageLogger.js.map +0 -1
  197. package/dist/destinations/engage/utils/EngageStats.d.ts +0 -18
  198. package/dist/destinations/engage/utils/EngageStats.js +0 -95
  199. package/dist/destinations/engage/utils/EngageStats.js.map +0 -1
  200. package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +0 -12
  201. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +0 -31
  202. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +0 -1
  203. package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +0 -65
  204. package/dist/destinations/engage/utils/MessageSendPerformer.js +0 -211
  205. package/dist/destinations/engage/utils/MessageSendPerformer.js.map +0 -1
  206. package/dist/destinations/engage/utils/Profile.d.ts +0 -6
  207. package/dist/destinations/engage/utils/Profile.js +0 -3
  208. package/dist/destinations/engage/utils/Profile.js.map +0 -1
  209. package/dist/destinations/engage/utils/ResponseError.d.ts +0 -25
  210. package/dist/destinations/engage/utils/ResponseError.js +0 -22
  211. package/dist/destinations/engage/utils/ResponseError.js.map +0 -1
  212. package/dist/destinations/engage/utils/apiLookups.d.ts +0 -22
  213. package/dist/destinations/engage/utils/apiLookups.js +0 -189
  214. package/dist/destinations/engage/utils/apiLookups.js.map +0 -1
  215. package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +0 -2
  216. package/dist/destinations/engage/utils/getProfileApiEndpoint.js +0 -10
  217. package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +0 -1
  218. package/dist/destinations/engage/utils/index.d.ts +0 -9
  219. package/dist/destinations/engage/utils/index.js +0 -22
  220. package/dist/destinations/engage/utils/index.js.map +0 -1
  221. package/dist/destinations/engage/utils/isDestinationActionService.d.ts +0 -1
  222. package/dist/destinations/engage/utils/isDestinationActionService.js +0 -8
  223. package/dist/destinations/engage/utils/isDestinationActionService.js.map +0 -1
  224. package/dist/destinations/engage/utils/isRetryableError.d.ts +0 -2
  225. package/dist/destinations/engage/utils/isRetryableError.js +0 -33
  226. package/dist/destinations/engage/utils/isRetryableError.js.map +0 -1
  227. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +0 -1
  228. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +0 -3
  229. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +0 -1
  230. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +0 -46
  231. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +0 -46
  232. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +0 -1
  233. package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +0 -12
  234. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +0 -23
  235. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +0 -1
  236. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +0 -12
  237. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +0 -35
  238. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +0 -1
  239. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +0 -14
  240. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +0 -31
  241. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +0 -1
  242. package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +0 -31
  243. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +0 -104
  244. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +0 -1
  245. package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +0 -39
  246. package/dist/destinations/engage/utils/operationTracking/OperationStats.js +0 -130
  247. package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +0 -1
  248. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +0 -1
  249. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +0 -377
  250. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +0 -1
  251. package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +0 -23
  252. package/dist/destinations/engage/utils/operationTracking/OperationTree.js +0 -49
  253. package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +0 -1
  254. package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +0 -6
  255. package/dist/destinations/engage/utils/operationTracking/TrackedError.js +0 -3
  256. package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +0 -1
  257. package/dist/destinations/engage/utils/operationTracking/index.d.ts +0 -10
  258. package/dist/destinations/engage/utils/operationTracking/index.js +0 -23
  259. package/dist/destinations/engage/utils/operationTracking/index.js.map +0 -1
  260. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +0 -21
  261. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +0 -99
  262. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +0 -1
  263. package/dist/destinations/engage/utils/testUtils.d.ts +0 -6
  264. package/dist/destinations/engage/utils/testUtils.js +0 -26
  265. package/dist/destinations/engage/utils/testUtils.js.map +0 -1
  266. package/dist/destinations/engage/utils/track.d.ts +0 -52
  267. package/dist/destinations/engage/utils/track.js +0 -9
  268. package/dist/destinations/engage/utils/track.js.map +0 -1
  269. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +0 -16
  270. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +0 -3
  271. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +0 -1
  272. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +0 -56
  273. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +0 -3
  274. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +0 -1
  275. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +0 -39
  276. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +0 -3
  277. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +0 -1
  278. package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +0 -27
  279. package/dist/destinations/engage-messaging-twilio/sendSms.types.js +0 -3
  280. package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +0 -1
  281. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +0 -25
  282. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +0 -3
  283. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +0 -1
  284. package/dist/destinations/facebook-custom-audiences/add/generated-types.d.ts +0 -2
  285. package/dist/destinations/facebook-custom-audiences/add/generated-types.js +0 -3
  286. package/dist/destinations/facebook-custom-audiences/add/generated-types.js.map +0 -1
  287. package/dist/destinations/facebook-custom-audiences/add/index.d.ts +0 -5
  288. package/dist/destinations/facebook-custom-audiences/add/index.js +0 -11
  289. package/dist/destinations/facebook-custom-audiences/add/index.js.map +0 -1
  290. package/dist/destinations/facebook-custom-audiences/remove/generated-types.d.ts +0 -2
  291. package/dist/destinations/facebook-custom-audiences/remove/generated-types.js +0 -3
  292. package/dist/destinations/facebook-custom-audiences/remove/generated-types.js.map +0 -1
  293. package/dist/destinations/facebook-custom-audiences/remove/index.d.ts +0 -5
  294. package/dist/destinations/facebook-custom-audiences/remove/index.js +0 -11
  295. package/dist/destinations/facebook-custom-audiences/remove/index.js.map +0 -1
  296. package/dist/destinations/first-party-dv360/addToList/generated-types.d.ts +0 -2
  297. package/dist/destinations/first-party-dv360/addToList/generated-types.js +0 -3
  298. package/dist/destinations/first-party-dv360/addToList/generated-types.js.map +0 -1
  299. package/dist/destinations/first-party-dv360/addToList/index.d.ts +0 -5
  300. package/dist/destinations/first-party-dv360/addToList/index.js +0 -11
  301. package/dist/destinations/first-party-dv360/addToList/index.js.map +0 -1
  302. package/dist/destinations/hubspot/customEvent/dynamic-fields.d.ts +0 -5
  303. package/dist/destinations/hubspot/customEvent/dynamic-fields.js +0 -112
  304. package/dist/destinations/hubspot/customEvent/dynamic-fields.js.map +0 -1
  305. package/dist/destinations/hubspot/customEvent/event-completion.d.ts +0 -3
  306. package/dist/destinations/hubspot/customEvent/event-completion.js +0 -17
  307. package/dist/destinations/hubspot/customEvent/event-completion.js.map +0 -1
  308. package/dist/destinations/hubspot/customEvent/hubspot-api.d.ts +0 -62
  309. package/dist/destinations/hubspot/customEvent/hubspot-api.js +0 -305
  310. package/dist/destinations/hubspot/customEvent/hubspot-api.js.map +0 -1
  311. package/dist/destinations/hubspot/customEvent/utils.d.ts +0 -14
  312. package/dist/destinations/hubspot/customEvent/utils.js +0 -303
  313. package/dist/destinations/hubspot/customEvent/utils.js.map +0 -1
  314. package/dist/destinations/hubspot/customEvent/validation.d.ts +0 -3
  315. package/dist/destinations/hubspot/customEvent/validation.js +0 -66
  316. package/dist/destinations/hubspot/customEvent/validation.js.map +0 -1
  317. package/dist/destinations/hubspot/upsertObject/dynamic-fields.d.ts +0 -7
  318. package/dist/destinations/hubspot/upsertObject/dynamic-fields.js +0 -222
  319. package/dist/destinations/hubspot/upsertObject/dynamic-fields.js.map +0 -1
  320. package/dist/destinations/hubspot/upsertObject/hubspot-api.d.ts +0 -219
  321. package/dist/destinations/hubspot/upsertObject/hubspot-api.js +0 -609
  322. package/dist/destinations/hubspot/upsertObject/hubspot-api.js.map +0 -1
  323. package/dist/destinations/hubspot/upsertObject/utils.d.ts +0 -13
  324. package/dist/destinations/hubspot/upsertObject/utils.js +0 -547
  325. package/dist/destinations/hubspot/upsertObject/utils.js.map +0 -1
  326. package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +0 -5
  327. package/dist/destinations/klaviyo/removeProfileToList/generated-types.js +0 -3
  328. package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +0 -1
  329. package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +0 -5
  330. package/dist/destinations/klaviyo/removeProfileToList/index.js +0 -62
  331. package/dist/destinations/klaviyo/removeProfileToList/index.js.map +0 -1
  332. package/dist/destinations/mixpanel/incrementProperties/__test__/__snapshots__/snapshot.test.js.snap +0 -18
  333. package/dist/destinations/mixpanel/utils.d.ts +0 -13
  334. package/dist/destinations/mixpanel/utils.js +0 -117
  335. package/dist/destinations/mixpanel/utils.js.map +0 -1
  336. package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +0 -22
  337. package/dist/destinations/movable-ink/categoryView/generated-types.js +0 -3
  338. package/dist/destinations/movable-ink/categoryView/generated-types.js.map +0 -1
  339. package/dist/destinations/movable-ink/categoryView/index.d.ts +0 -5
  340. package/dist/destinations/movable-ink/categoryView/index.js +0 -43
  341. package/dist/destinations/movable-ink/categoryView/index.js.map +0 -1
  342. package/dist/destinations/movable-ink/conversion/generated-types.d.ts +0 -20
  343. package/dist/destinations/movable-ink/conversion/generated-types.js +0 -3
  344. package/dist/destinations/movable-ink/conversion/generated-types.js.map +0 -1
  345. package/dist/destinations/movable-ink/conversion/index.d.ts +0 -5
  346. package/dist/destinations/movable-ink/conversion/index.js +0 -45
  347. package/dist/destinations/movable-ink/conversion/index.js.map +0 -1
  348. package/dist/destinations/movable-ink/fields.d.ts +0 -21
  349. package/dist/destinations/movable-ink/fields.js +0 -236
  350. package/dist/destinations/movable-ink/fields.js.map +0 -1
  351. package/dist/destinations/movable-ink/identify/generated-types.d.ts +0 -7
  352. package/dist/destinations/movable-ink/identify/generated-types.js +0 -3
  353. package/dist/destinations/movable-ink/identify/generated-types.js.map +0 -1
  354. package/dist/destinations/movable-ink/identify/index.d.ts +0 -5
  355. package/dist/destinations/movable-ink/identify/index.js +0 -32
  356. package/dist/destinations/movable-ink/identify/index.js.map +0 -1
  357. package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +0 -22
  358. package/dist/destinations/movable-ink/productAdded/generated-types.js +0 -3
  359. package/dist/destinations/movable-ink/productAdded/generated-types.js.map +0 -1
  360. package/dist/destinations/movable-ink/productAdded/index.d.ts +0 -5
  361. package/dist/destinations/movable-ink/productAdded/index.js +0 -43
  362. package/dist/destinations/movable-ink/productAdded/index.js.map +0 -1
  363. package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +0 -21
  364. package/dist/destinations/movable-ink/productViewed/generated-types.js +0 -3
  365. package/dist/destinations/movable-ink/productViewed/generated-types.js.map +0 -1
  366. package/dist/destinations/movable-ink/productViewed/index.d.ts +0 -5
  367. package/dist/destinations/movable-ink/productViewed/index.js +0 -43
  368. package/dist/destinations/movable-ink/productViewed/index.js.map +0 -1
  369. package/dist/destinations/movable-ink/search/generated-types.d.ts +0 -12
  370. package/dist/destinations/movable-ink/search/generated-types.js +0 -3
  371. package/dist/destinations/movable-ink/search/generated-types.js.map +0 -1
  372. package/dist/destinations/movable-ink/search/index.d.ts +0 -5
  373. package/dist/destinations/movable-ink/search/index.js +0 -43
  374. package/dist/destinations/movable-ink/search/index.js.map +0 -1
  375. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +0 -25
  376. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +0 -3
  377. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +0 -1
  378. package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +0 -5
  379. package/dist/destinations/movable-ink/sendCustomEvent/index.js +0 -48
  380. package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +0 -1
  381. package/dist/destinations/responsys/shared_properties.d.ts +0 -3
  382. package/dist/destinations/responsys/shared_properties.js +0 -19
  383. package/dist/destinations/responsys/shared_properties.js.map +0 -1
  384. package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +0 -35
  385. package/dist/destinations/snap-conversions-api/snap-capi-properties.js +0 -401
  386. package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +0 -1
  387. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +0 -3
  388. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +0 -34
  389. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +0 -1
  390. package/dist/destinations/trackey/group.types.d.ts +0 -11
  391. package/dist/destinations/trackey/group.types.js +0 -3
  392. package/dist/destinations/trackey/group.types.js.map +0 -1
  393. package/dist/destinations/trackey/identify.types.d.ts +0 -11
  394. package/dist/destinations/trackey/identify.types.js +0 -3
  395. package/dist/destinations/trackey/identify.types.js.map +0 -1
  396. package/dist/destinations/trackey/track.types.d.ts +0 -12
  397. package/dist/destinations/trackey/track.types.js +0 -3
  398. package/dist/destinations/trackey/track.types.js.map +0 -1
@@ -1,112 +0,0 @@
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
- const validation_1 = require("./validation");
7
- async function dynamicReadEventNames(request) {
8
- try {
9
- const response = await request(`${properties_1.HUBSPOT_BASE_URL}/events/v3/event-definitions/?includeProperties=false`, {
10
- method: 'GET',
11
- skipResponseCloning: true
12
- });
13
- return {
14
- choices: response.data.results
15
- .filter((event) => !event.archived && (event.labels?.singular || event.labels?.plural))
16
- .map((event) => {
17
- return {
18
- label: event.labels?.singular ?? event.labels?.plural ?? '',
19
- value: event.fullyQualifiedName
20
- };
21
- })
22
- .sort((a, b) => a.label.toLowerCase().localeCompare(b.label.toLowerCase()))
23
- };
24
- }
25
- catch (err) {
26
- const code = err?.response?.status ? String(err.response.status) : '500';
27
- return {
28
- choices: [],
29
- error: {
30
- message: err?.response?.data?.message ?? 'Unknown error: dynamicReadEventNames',
31
- code: code
32
- }
33
- };
34
- }
35
- }
36
- exports.dynamicReadEventNames = dynamicReadEventNames;
37
- async function dynamicReadObjectTypes(request) {
38
- const defaultChoices = constants_1.SUPPORTED_HUBSPOT_OBJECT_TYPES;
39
- try {
40
- const response = await request(`${properties_1.HUBSPOT_BASE_URL}/crm/v3/schemas?archived=false`, {
41
- method: 'GET',
42
- skipResponseCloning: true
43
- });
44
- const choices = response.data.results.map((schema) => ({
45
- label: `${schema.labels.plural} (Custom)`,
46
- value: schema.name
47
- }));
48
- return {
49
- choices: [...choices, ...defaultChoices].sort((a, b) => a.label.toLowerCase().localeCompare(b.label.toLowerCase()))
50
- };
51
- }
52
- catch (err) {
53
- const code = err?.response?.status ? String(err.response.status) : '500';
54
- return {
55
- choices: [],
56
- error: {
57
- message: err?.response?.data?.message ?? 'Unknown error: dynamicReadObjectTypes',
58
- code: code
59
- }
60
- };
61
- }
62
- }
63
- exports.dynamicReadObjectTypes = dynamicReadObjectTypes;
64
- async function dynamicReadProperties(request, eventName) {
65
- try {
66
- const response = await request(`${properties_1.HUBSPOT_BASE_URL}/events/v3/event-definitions/?includeProperties=true`, {
67
- method: 'GET',
68
- skipResponseCloning: true
69
- });
70
- const cleanedEventName = validation_1.cleanEventName(eventName);
71
- return {
72
- choices: (() => {
73
- const choices = response.data.results
74
- .filter((event) => (event.fullyQualifiedName === cleanedEventName || event.name === cleanedEventName) && !event.archived)
75
- .map((event) => {
76
- if (!event.properties || event.properties.length === 0) {
77
- return {
78
- label: `No properties found for event ${eventName}`,
79
- value: ''
80
- };
81
- }
82
- return event.properties
83
- .filter((property) => !property.archived)
84
- .sort((a, b) => a.label.toLowerCase().localeCompare(b.label.toLowerCase()))
85
- .map((property) => {
86
- return {
87
- label: `${property.label} - ${property.type}`,
88
- value: property.name
89
- };
90
- });
91
- })
92
- .flat();
93
- if (choices.length === 0) {
94
- return constants_1.DEFAULT_CUSTOM_EVENT_PROPERTIES;
95
- }
96
- return choices;
97
- })()
98
- };
99
- }
100
- catch (err) {
101
- const code = err?.response?.status ? String(err.response.status) : '500';
102
- return {
103
- choices: [],
104
- error: {
105
- message: err?.response?.data?.message ?? 'Unknown error: dynamicReadProperties',
106
- code: code
107
- }
108
- };
109
- }
110
- }
111
- exports.dynamicReadProperties = dynamicReadProperties;
112
- //# sourceMappingURL=dynamic-fields.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamic-fields.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/customEvent/dynamic-fields.ts"],"names":[],"mappings":";;;AAEA,8CAAgD;AAChD,2CAA6F;AAC7F,6CAA6C;AAGtC,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,QAAQ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,IAAI,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;iBAClG,GAAG,CAAC,CAAC,KAAiB,EAAE,EAAE;gBACzB,OAAO;oBACL,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,QAAQ,IAAI,KAAK,CAAC,MAAM,EAAE,MAAM,IAAI,EAAE;oBAC3D,KAAK,EAAE,KAAK,CAAC,kBAAkB;iBAChC,CAAA;YACH,CAAC,CAAC;iBACD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,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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,CAAA;gBAET,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;oBACxB,OAAO,2CAA+B,CAAA;iBACvC;gBAED,OAAO,OAAO,CAAA;YAChB,CAAC,CAAC,EAAE;SACL,CAAA;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,IAAI,GAAY,GAAoB,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAE,GAAoB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;QAEpH,OAAO;YACL,OAAO,EAAE,EAAE;YACX,KAAK,EAAE;gBACL,OAAO,EAAG,GAAoB,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,IAAI,sCAAsC;gBACjG,IAAI,EAAE,IAAI;aACX;SACF,CAAA;KACF;AACH,CAAC;AAhFD,sDAgFC"}
@@ -1,3 +0,0 @@
1
- import { Client } from './client';
2
- import { Payload } from './generated-types';
3
- export declare function sendEvent(client: Client, fullyQualifiedName: string, payload: Payload): Promise<import("@segment/actions-core/src").ModifiedResponse<unknown>>;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sendEvent = void 0;
4
- async function sendEvent(client, fullyQualifiedName, payload) {
5
- const { record_details, properties, occurred_at: occurredAt } = payload;
6
- const json = {
7
- eventName: fullyQualifiedName,
8
- objectId: record_details.object_id ?? undefined,
9
- email: record_details.email ?? undefined,
10
- utk: record_details.utk ?? undefined,
11
- occurredAt,
12
- properties: properties
13
- };
14
- return await client.send(json);
15
- }
16
- exports.sendEvent = sendEvent;
17
- //# sourceMappingURL=event-completion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-completion.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/customEvent/event-completion.ts"],"names":[],"mappings":";;;AAIO,KAAK,UAAU,SAAS,CAAC,MAAc,EAAE,kBAA0B,EAAE,OAAgB;IAC1F,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,OAAO,CAAA;IAEvE,MAAM,IAAI,GAAuB;QAC/B,SAAS,EAAE,kBAAkB;QAC7B,QAAQ,EAAE,cAAc,CAAC,SAAS,IAAI,SAAS;QAC/C,KAAK,EAAE,cAAc,CAAC,KAAK,IAAI,SAAS;QACxC,GAAG,EAAE,cAAc,CAAC,GAAG,IAAI,SAAS;QACpC,UAAU;QACV,UAAU,EAAE,UAAU;KACvB,CAAA;IACD,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAChC,CAAC;AAZD,8BAYC"}
@@ -1,62 +0,0 @@
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<import("@segment/actions-core/src").ModifiedResponse<unknown>>;
58
- send(payload: Payload): Promise<import("@segment/actions-core/src").ModifiedResponse<unknown>>;
59
- createHubspotSchema(schema: SegmentEventSchema): Promise<SchemaDiff>;
60
- updateHubspotSchema(fullyQualifiedName: string, schemaDiff: SchemaDiff): Promise<void>;
61
- }
62
- export {};
@@ -1,305 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HubspotClient = void 0;
4
- const actions_core_1 = require("@segment/actions-core");
5
- const properties_1 = require("../properties");
6
- class HubspotClient {
7
- constructor(request, syncMode) {
8
- this.request = request;
9
- this.syncMode = syncMode;
10
- }
11
- stringFormat(str) {
12
- const date = new Date(str);
13
- if (isNaN(date.getTime())) {
14
- return 'string';
15
- }
16
- const year = date.getUTCFullYear();
17
- const month = date.getUTCMonth();
18
- const day = date.getUTCDate();
19
- const hours = date.getUTCHours();
20
- const minutes = date.getUTCMinutes();
21
- const seconds = date.getUTCSeconds();
22
- const milliseconds = date.getUTCMilliseconds();
23
- if (hours === 0 && minutes === 0 && seconds === 0 && milliseconds === 0) {
24
- const reconstructedDate = new Date(Date.UTC(year, month, day));
25
- if (reconstructedDate.getTime() === date.getTime()) {
26
- return 'date';
27
- }
28
- else {
29
- return 'datetime';
30
- }
31
- }
32
- return 'datetime';
33
- }
34
- sanitizeEventName(str) {
35
- return str.toLowerCase().replace(/[^a-z0-9_-]/g, '_');
36
- }
37
- sanitizePropertyName(str) {
38
- return str.toLowerCase().replace(/[^a-z0-9_]/g, '_');
39
- }
40
- sanitizeProperties(properties) {
41
- const result = {};
42
- Object.keys(properties).forEach((key) => {
43
- const value = properties[key];
44
- const propName = this.sanitizePropertyName(key);
45
- if (!/^[a-z]/.test(propName)) {
46
- throw new actions_core_1.PayloadValidationError(`Property ${key} in event has an invalid name. Property names must start with a letter.`);
47
- }
48
- result[propName] =
49
- typeof value === 'object' && value !== null ? JSON.stringify(value) : value;
50
- });
51
- return result;
52
- }
53
- propertyBody(eventName, type, name, stringFormat) {
54
- switch (type) {
55
- case 'number':
56
- return {
57
- name: name,
58
- label: name,
59
- type: 'number',
60
- description: `${name} - (created by Segment)`
61
- };
62
- case 'object':
63
- return {
64
- name: name,
65
- label: name,
66
- type: 'string',
67
- description: `${name} - (created by Segment)`
68
- };
69
- case 'boolean':
70
- return {
71
- name: name,
72
- label: name,
73
- type: 'enumeration',
74
- description: `${name} - (created by Segment)`,
75
- options: [
76
- {
77
- label: 'true',
78
- value: true,
79
- hidden: false,
80
- description: 'True',
81
- displayOrder: 1
82
- },
83
- {
84
- label: 'false',
85
- value: false,
86
- hidden: false,
87
- description: 'False',
88
- displayOrder: 2
89
- }
90
- ]
91
- };
92
- case 'string':
93
- switch (stringFormat) {
94
- case 'string':
95
- return {
96
- name: name,
97
- label: name,
98
- type: 'string',
99
- description: `${name} - (created by Segment)`
100
- };
101
- case 'date':
102
- case 'datetime':
103
- return {
104
- name: name,
105
- label: name,
106
- type: 'datetime',
107
- description: `${name} - (created by Segment)`
108
- };
109
- case undefined:
110
- default:
111
- throw new actions_core_1.PayloadValidationError(`Property ${name} in event ${eventName} has an unsupported type: ${type}`);
112
- }
113
- default:
114
- throw new actions_core_1.PayloadValidationError(`Property ${name} in event ${eventName} has an unsupported type: ${type}`);
115
- }
116
- }
117
- segmentSchema(payload) {
118
- const { event_name, properties } = payload;
119
- const sanitizedEventName = this.sanitizeEventName(event_name);
120
- const props = {};
121
- if (properties) {
122
- Object.entries(properties).forEach(([property, value]) => {
123
- if (value !== null) {
124
- props[property] = {
125
- type: typeof value,
126
- stringFormat: typeof value === 'string' ? this.stringFormat(value) : undefined
127
- };
128
- }
129
- });
130
- }
131
- return { eventName: sanitizedEventName, primaryObject: payload.record_details.object_type, properties: props };
132
- }
133
- async compareSchemaToCache(schema) {
134
- let data = JSON.stringify(`${schema}`);
135
- data = data.replace(data, '');
136
- console.log(`compared schema to cache: ${data}`);
137
- const schemaDiff = {
138
- match: 'no_match',
139
- missingProperties: {}
140
- };
141
- return Promise.resolve(schemaDiff);
142
- }
143
- async compareSchemaToHubspot(schema) {
144
- const mismatchSchemaDiff = { match: 'mismatch', missingProperties: {} };
145
- try {
146
- const url = `${properties_1.HUBSPOT_BASE_URL}/events/v3/event-definitions/${schema.eventName}/?includeProperties=true`;
147
- const response = await this.request(url, {
148
- method: 'GET',
149
- skipResponseCloning: true
150
- });
151
- const { fullyQualifiedName, name, properties: hsProperties, archived } = response.data;
152
- if (archived) {
153
- return mismatchSchemaDiff;
154
- }
155
- const schemaDiff = { missingProperties: {} };
156
- for (const propName in schema.properties) {
157
- const matchedProperty = hsProperties.find((hsProp) => hsProp.name === propName);
158
- if (matchedProperty?.archived === true) {
159
- return mismatchSchemaDiff;
160
- }
161
- const prop = schema.properties[propName];
162
- if ((['object', 'string', 'boolean'].includes(prop.type) && matchedProperty?.type === 'number') ||
163
- (['datetime', 'string', 'enumeration'].includes(matchedProperty?.type) && prop.type === 'number')) {
164
- return mismatchSchemaDiff;
165
- }
166
- if (!matchedProperty) {
167
- schemaDiff.missingProperties[propName] = schema.properties[propName];
168
- }
169
- }
170
- schemaDiff.match = Object.keys(schemaDiff.missingProperties).length === 0 ? 'full_match' : 'properties_missing';
171
- schemaDiff.fullyQualifiedName = fullyQualifiedName;
172
- schemaDiff.name = name;
173
- return schemaDiff;
174
- }
175
- catch {
176
- return { match: 'no_match', missingProperties: {} };
177
- }
178
- }
179
- async saveSchemaToCache(fullyQualifiedName, name, schema) {
180
- let data = JSON.stringify(`${fullyQualifiedName} ${name} ${schema}`);
181
- data = data.replace(data, '');
182
- console.log(`saved schema to cache: ${data}`);
183
- return;
184
- }
185
- async sendEvent(fullyQualifiedName, payload) {
186
- const { record_details, properties, occurred_at: occurredAt } = payload;
187
- const eventName = fullyQualifiedName;
188
- const url = `${properties_1.HUBSPOT_BASE_URL}/events/v3/send`;
189
- const json = {
190
- eventName,
191
- objectId: record_details.object_id ?? undefined,
192
- email: record_details.email ?? undefined,
193
- utk: record_details.utk ?? undefined,
194
- occurredAt,
195
- properties: properties ? this.sanitizeProperties(properties) : undefined
196
- };
197
- return this.request(url, {
198
- method: 'POST',
199
- json
200
- });
201
- }
202
- async send(payload) {
203
- payload.properties = this.sanitizeProperties(payload.properties ?? {});
204
- const schema = this.segmentSchema(payload);
205
- const cacheSchemaDiff = await this.compareSchemaToCache(schema);
206
- switch (cacheSchemaDiff.match) {
207
- case 'full_match':
208
- return await this.sendEvent(cacheSchemaDiff?.fullyQualifiedName, payload);
209
- case 'mismatch':
210
- throw new actions_core_1.IntegrationError('Cache schema mismatch.', 'CACHE_SCHEMA_MISMATCH', 400);
211
- case 'no_match':
212
- case 'properties_missing': {
213
- const hubspotSchemaDiff = await this.compareSchemaToHubspot(schema);
214
- switch (hubspotSchemaDiff.match) {
215
- case 'full_match': {
216
- const fullyQualifiedName = hubspotSchemaDiff?.fullyQualifiedName;
217
- const name = hubspotSchemaDiff?.name;
218
- await this.saveSchemaToCache(fullyQualifiedName, name, schema);
219
- return await this.sendEvent(fullyQualifiedName, payload);
220
- }
221
- case 'mismatch':
222
- throw new actions_core_1.IntegrationError('Hubspot schema mismatch.', 'HUBSPOT_SCHEMA_MISMATCH', 400);
223
- case 'no_match': {
224
- if (this.syncMode === 'update') {
225
- throw new actions_core_1.IntegrationError(`The 'Sync Mode' setting is set to 'update' which is stopping Segment from creating a new Custom Event Schema in the HubSpot`, 'HUBSPOT_SCHEMA_MISSING', 400);
226
- }
227
- const schemaDiff = await this.createHubspotSchema(schema);
228
- const fullyQualifiedName = schemaDiff?.fullyQualifiedName;
229
- const name = schemaDiff?.name;
230
- await this.saveSchemaToCache(fullyQualifiedName, name, schema);
231
- return await this.sendEvent(fullyQualifiedName, payload);
232
- }
233
- case 'properties_missing': {
234
- if (this.syncMode === 'add') {
235
- throw new actions_core_1.IntegrationError(`The 'Sync Mode' setting is set to 'add' which is stopping Segment from creating a new properties on the Event Schema in the HubSpot`, 'HUBSPOT_SCHEMA_PROPERTIES_MISSING', 400);
236
- }
237
- const fullyQualifiedName = hubspotSchemaDiff?.fullyQualifiedName;
238
- const name = hubspotSchemaDiff?.name;
239
- await this.updateHubspotSchema(fullyQualifiedName, hubspotSchemaDiff);
240
- await this.saveSchemaToCache(fullyQualifiedName, name, schema);
241
- return await this.sendEvent(fullyQualifiedName, payload);
242
- }
243
- }
244
- }
245
- }
246
- }
247
- async createHubspotSchema(schema) {
248
- const json = {
249
- label: schema.eventName,
250
- name: schema.eventName,
251
- description: `${schema.eventName} - (created by Segment)`,
252
- primaryObject: schema.primaryObject,
253
- propertyDefinitions: Object.entries(schema.properties).map(([name, { type, stringFormat }]) => {
254
- return this.propertyBody(schema.eventName, type, name, stringFormat);
255
- })
256
- };
257
- try {
258
- const response = await this.request(`${properties_1.HUBSPOT_BASE_URL}/events/v3/event-definitions`, {
259
- method: 'POST',
260
- json
261
- });
262
- return {
263
- match: 'full_match',
264
- fullyQualifiedName: response.data.fullyQualifiedName,
265
- name: response.data.name
266
- };
267
- }
268
- catch (error) {
269
- const responseError = error;
270
- if (responseError.response.data.category === 'OBJECT_ALREADY_EXISTS') {
271
- throw new actions_core_1.RetryableError();
272
- }
273
- throw new actions_core_1.IntegrationError(`Error creating schema in HubSpot. ${responseError.response.data.message}`, 'HUBSPOT_CREATE_SCHEMA_ERROR', 400);
274
- }
275
- }
276
- async updateHubspotSchema(fullyQualifiedName, schemaDiff) {
277
- const requests = [];
278
- try {
279
- Object.keys(schemaDiff.missingProperties).forEach((propName) => {
280
- const { type, stringFormat } = schemaDiff.missingProperties[propName];
281
- const json = this.propertyBody(schemaDiff?.fullyQualifiedName, type, propName, stringFormat);
282
- const url = `${properties_1.HUBSPOT_BASE_URL}/events/v3/event-definitions/${fullyQualifiedName}/property`;
283
- requests.push(this.request(url, {
284
- method: 'POST',
285
- json
286
- }));
287
- });
288
- const responses = await Promise.allSettled(requests);
289
- for (const response of responses) {
290
- if (response.status === 'rejected') {
291
- const error = response.reason;
292
- if (error.data.propertiesErrorCode !== 'PROPERTY_EXISTS') {
293
- throw new actions_core_1.IntegrationError(`Error updating schema in HubSpot. ${error.data.message || ''} ${error.data.propertiesErrorCode || ''}`, 'HUBSPOT_UPDATE_SCHEMA_ERROR', 400);
294
- }
295
- }
296
- }
297
- }
298
- catch (error) {
299
- const responseError = error;
300
- throw new actions_core_1.IntegrationError(`Error updating schema in HubSpot. ${responseError.code}`, `${responseError.code}`, 400);
301
- }
302
- }
303
- }
304
- exports.HubspotClient = HubspotClient;
305
- //# sourceMappingURL=hubspot-api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hubspot-api.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/customEvent/hubspot-api.ts"],"names":[],"mappings":";;;AAAA,wDAA+G;AAE/G,8CAAgD;AA8ChD,MAAa,aAA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E,IAAI,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAA;gBACtG,MAAM,GAAG,GAAG,GAAG,6BAAgB,gCAAgC,kBAAkB,WAAW,CAAA;gBAC5F,QAAQ,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;oBAChB,MAAM,EAAE,MAAM;oBACd,IAAI;iBACL,CAAC,CACH,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;YAEpD,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;gBAChC,IAAI,QAAQ,CAAC,MAAM,KAAK,UAAU,EAAE;oBAClC,MAAM,KAAK,GAAG,QAAQ,CAAC,MAA0B,CAAA;oBACjD,IAAI,KAAK,CAAC,IAAI,CAAC,mBAAmB,KAAK,iBAAiB,EAAE;wBACxD,MAAM,IAAI,+BAAgB,CACxB,qCAAqC,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,IAAI,KAAK,CAAC,IAAI,CAAC,mBAAmB,IAAI,EAAE,EAAE,EACvG,6BAA6B,EAC7B,GAAG,CACJ,CAAA;qBACF;iBACF;aACF;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,aAAa,GAAG,KAAsB,CAAA;YAC5C,MAAM,IAAI,+BAAgB,CACxB,qCAAqC,aAAa,CAAC,IAAI,EAAE,EACzD,GAAG,aAAa,CAAC,IAAI,EAAE,EACvB,GAAG,CACJ,CAAA;SACF;IACH,CAAC;CACF;AAlbD,sCAkbC"}
@@ -1,14 +0,0 @@
1
- import { StatsContext } from '@segment/actions-core';
2
- import { SubscriptionMetadata } from '@segment/actions-core/destination-kit';
3
- import type { Payload } from './generated-types';
4
- import { Schema, CachableSchema, SchemaDiff } from './types';
5
- import { Client } from './client';
6
- import { LRUCache } from 'lru-cache';
7
- export declare const cache: LRUCache<string, CachableSchema, unknown>;
8
- export declare function eventSchema(payload: Payload): Schema;
9
- export declare function getSchemaFromCache(name: string, subscriptionMetadata?: SubscriptionMetadata, statsContext?: StatsContext): CachableSchema | undefined;
10
- export declare function saveSchemaToCache(schema: CachableSchema, subscriptionMetadata?: SubscriptionMetadata, statsContext?: StatsContext): Promise<void>;
11
- export declare function compareSchemas(schema1: Schema, schema2: CachableSchema | undefined): SchemaDiff;
12
- export declare function getSchemaFromHubspot(client: Client, schema: Schema): Promise<CachableSchema | undefined>;
13
- export declare function createHubspotEventSchema(client: Client, schema: Schema): Promise<string>;
14
- export declare function updateHubspotSchema(client: Client, fullyQualifiedName: string, schemaDiff: SchemaDiff): Promise<void>;