@segment/action-destinations 3.305.1-staging-1a85143cb → 3.307.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 (287) hide show
  1. package/dist/destinations/actions-pardot/prospects/index.js +2 -1
  2. package/dist/destinations/actions-pardot/prospects/index.js.map +1 -1
  3. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
  4. package/dist/destinations/customerio/utils.d.ts +1 -1
  5. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.d.ts +3 -3
  6. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js +9 -9
  7. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js.map +1 -1
  8. package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.d.ts +1 -2
  9. package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js +1 -1
  10. package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
  11. package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -1
  12. package/dist/destinations/google-enhanced-conversions/functions.js +1 -1
  13. package/dist/destinations/google-enhanced-conversions/index.js +5 -0
  14. package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
  15. package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +2 -2
  16. package/dist/destinations/google-enhanced-conversions/uploadCallConversion2/index.js +2 -2
  17. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +2 -2
  18. package/dist/destinations/google-enhanced-conversions/uploadClickConversion2/index.js +2 -2
  19. package/dist/destinations/google-enhanced-conversions/userList/index.js +2 -2
  20. package/package.json +4 -4
  21. package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +0 -3
  22. package/dist/destinations/engage/sendgrid/destinationDefinition.js +0 -70
  23. package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +0 -1
  24. package/dist/destinations/engage/sendgrid/generated-types.d.ts +0 -1
  25. package/dist/destinations/engage/sendgrid/generated-types.js +0 -14
  26. package/dist/destinations/engage/sendgrid/generated-types.js.map +0 -1
  27. package/dist/destinations/engage/sendgrid/index.d.ts +0 -2
  28. package/dist/destinations/engage/sendgrid/index.js +0 -5
  29. package/dist/destinations/engage/sendgrid/index.js.map +0 -1
  30. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +0 -4
  31. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +0 -28
  32. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +0 -1
  33. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +0 -1
  34. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +0 -14
  35. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +0 -1
  36. package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +0 -1
  37. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +0 -14
  38. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +0 -1
  39. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +0 -44
  40. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +0 -419
  41. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +0 -1
  42. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +0 -12
  43. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +0 -3
  44. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +0 -1
  45. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +0 -4
  46. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +0 -257
  47. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +0 -1
  48. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +0 -1
  49. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +0 -14
  50. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +0 -1
  51. package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +0 -1
  52. package/dist/destinations/engage/sendgrid/sendEmail/index.js +0 -14
  53. package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +0 -1
  54. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +0 -1
  55. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +0 -23
  56. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +0 -1
  57. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +0 -1
  58. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +0 -14
  59. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +0 -1
  60. package/dist/destinations/engage/twilio/destinationDefinition.d.ts +0 -3
  61. package/dist/destinations/engage/twilio/destinationDefinition.js +0 -172
  62. package/dist/destinations/engage/twilio/destinationDefinition.js.map +0 -1
  63. package/dist/destinations/engage/twilio/generated-types.d.ts +0 -1
  64. package/dist/destinations/engage/twilio/generated-types.js +0 -14
  65. package/dist/destinations/engage/twilio/generated-types.js.map +0 -1
  66. package/dist/destinations/engage/twilio/index.d.ts +0 -2
  67. package/dist/destinations/engage/twilio/index.js +0 -5
  68. package/dist/destinations/engage/twilio/index.js.map +0 -1
  69. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +0 -28
  70. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +0 -151
  71. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +0 -1
  72. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +0 -4
  73. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +0 -250
  74. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +0 -1
  75. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +0 -1
  76. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +0 -14
  77. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +0 -1
  78. package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +0 -1
  79. package/dist/destinations/engage/twilio/sendMobilePush/index.js +0 -14
  80. package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +0 -1
  81. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +0 -9
  82. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +0 -72
  83. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +0 -1
  84. package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +0 -4
  85. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +0 -162
  86. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +0 -1
  87. package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +0 -1
  88. package/dist/destinations/engage/twilio/sendSms/generated-types.js +0 -14
  89. package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +0 -1
  90. package/dist/destinations/engage/twilio/sendSms/index.d.ts +0 -1
  91. package/dist/destinations/engage/twilio/sendSms/index.js +0 -14
  92. package/dist/destinations/engage/twilio/sendSms/index.js.map +0 -1
  93. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +0 -9
  94. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +0 -89
  95. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +0 -1
  96. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +0 -4
  97. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +0 -136
  98. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +0 -1
  99. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +0 -1
  100. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +0 -14
  101. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +0 -1
  102. package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +0 -1
  103. package/dist/destinations/engage/twilio/sendWhatsApp/index.js +0 -14
  104. package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +0 -1
  105. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +0 -16
  106. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +0 -71
  107. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +0 -1
  108. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +0 -16
  109. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +0 -115
  110. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +0 -1
  111. package/dist/destinations/engage/twilio/utils/index.d.ts +0 -2
  112. package/dist/destinations/engage/twilio/utils/index.js +0 -15
  113. package/dist/destinations/engage/twilio/utils/index.js.map +0 -1
  114. package/dist/destinations/engage/twilio/utils/types.d.ts +0 -23
  115. package/dist/destinations/engage/twilio/utils/types.js +0 -3
  116. package/dist/destinations/engage/twilio/utils/types.js.map +0 -1
  117. package/dist/destinations/engage/utils/AggregateError.d.ts +0 -14
  118. package/dist/destinations/engage/utils/AggregateError.js +0 -26
  119. package/dist/destinations/engage/utils/AggregateError.js.map +0 -1
  120. package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +0 -42
  121. package/dist/destinations/engage/utils/EngageActionPerformer.js +0 -148
  122. package/dist/destinations/engage/utils/EngageActionPerformer.js.map +0 -1
  123. package/dist/destinations/engage/utils/EngageLogger.d.ts +0 -18
  124. package/dist/destinations/engage/utils/EngageLogger.js +0 -52
  125. package/dist/destinations/engage/utils/EngageLogger.js.map +0 -1
  126. package/dist/destinations/engage/utils/EngageStats.d.ts +0 -18
  127. package/dist/destinations/engage/utils/EngageStats.js +0 -95
  128. package/dist/destinations/engage/utils/EngageStats.js.map +0 -1
  129. package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +0 -12
  130. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +0 -31
  131. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +0 -1
  132. package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +0 -65
  133. package/dist/destinations/engage/utils/MessageSendPerformer.js +0 -211
  134. package/dist/destinations/engage/utils/MessageSendPerformer.js.map +0 -1
  135. package/dist/destinations/engage/utils/Profile.d.ts +0 -6
  136. package/dist/destinations/engage/utils/Profile.js +0 -3
  137. package/dist/destinations/engage/utils/Profile.js.map +0 -1
  138. package/dist/destinations/engage/utils/ResponseError.d.ts +0 -25
  139. package/dist/destinations/engage/utils/ResponseError.js +0 -22
  140. package/dist/destinations/engage/utils/ResponseError.js.map +0 -1
  141. package/dist/destinations/engage/utils/apiLookups.d.ts +0 -22
  142. package/dist/destinations/engage/utils/apiLookups.js +0 -189
  143. package/dist/destinations/engage/utils/apiLookups.js.map +0 -1
  144. package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +0 -2
  145. package/dist/destinations/engage/utils/getProfileApiEndpoint.js +0 -10
  146. package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +0 -1
  147. package/dist/destinations/engage/utils/index.d.ts +0 -9
  148. package/dist/destinations/engage/utils/index.js +0 -22
  149. package/dist/destinations/engage/utils/index.js.map +0 -1
  150. package/dist/destinations/engage/utils/isDestinationActionService.d.ts +0 -1
  151. package/dist/destinations/engage/utils/isDestinationActionService.js +0 -8
  152. package/dist/destinations/engage/utils/isDestinationActionService.js.map +0 -1
  153. package/dist/destinations/engage/utils/isRetryableError.d.ts +0 -2
  154. package/dist/destinations/engage/utils/isRetryableError.js +0 -33
  155. package/dist/destinations/engage/utils/isRetryableError.js.map +0 -1
  156. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +0 -1
  157. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +0 -3
  158. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +0 -1
  159. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +0 -46
  160. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +0 -46
  161. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +0 -1
  162. package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +0 -12
  163. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +0 -23
  164. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +0 -1
  165. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +0 -12
  166. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +0 -35
  167. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +0 -1
  168. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +0 -14
  169. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +0 -31
  170. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +0 -1
  171. package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +0 -31
  172. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +0 -104
  173. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +0 -1
  174. package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +0 -39
  175. package/dist/destinations/engage/utils/operationTracking/OperationStats.js +0 -130
  176. package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +0 -1
  177. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +0 -1
  178. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +0 -377
  179. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +0 -1
  180. package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +0 -23
  181. package/dist/destinations/engage/utils/operationTracking/OperationTree.js +0 -49
  182. package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +0 -1
  183. package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +0 -6
  184. package/dist/destinations/engage/utils/operationTracking/TrackedError.js +0 -3
  185. package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +0 -1
  186. package/dist/destinations/engage/utils/operationTracking/index.d.ts +0 -10
  187. package/dist/destinations/engage/utils/operationTracking/index.js +0 -23
  188. package/dist/destinations/engage/utils/operationTracking/index.js.map +0 -1
  189. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +0 -21
  190. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +0 -99
  191. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +0 -1
  192. package/dist/destinations/engage/utils/testUtils.d.ts +0 -6
  193. package/dist/destinations/engage/utils/testUtils.js +0 -26
  194. package/dist/destinations/engage/utils/testUtils.js.map +0 -1
  195. package/dist/destinations/engage/utils/track.d.ts +0 -52
  196. package/dist/destinations/engage/utils/track.js +0 -9
  197. package/dist/destinations/engage/utils/track.js.map +0 -1
  198. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +0 -16
  199. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +0 -3
  200. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +0 -1
  201. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +0 -56
  202. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +0 -3
  203. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +0 -1
  204. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +0 -39
  205. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +0 -3
  206. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +0 -1
  207. package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +0 -27
  208. package/dist/destinations/engage-messaging-twilio/sendSms.types.js +0 -3
  209. package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +0 -1
  210. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +0 -25
  211. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +0 -3
  212. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +0 -1
  213. package/dist/destinations/facebook-custom-audiences/add/generated-types.d.ts +0 -2
  214. package/dist/destinations/facebook-custom-audiences/add/generated-types.js +0 -3
  215. package/dist/destinations/facebook-custom-audiences/add/generated-types.js.map +0 -1
  216. package/dist/destinations/facebook-custom-audiences/add/index.d.ts +0 -5
  217. package/dist/destinations/facebook-custom-audiences/add/index.js +0 -11
  218. package/dist/destinations/facebook-custom-audiences/add/index.js.map +0 -1
  219. package/dist/destinations/facebook-custom-audiences/remove/generated-types.d.ts +0 -2
  220. package/dist/destinations/facebook-custom-audiences/remove/generated-types.js +0 -3
  221. package/dist/destinations/facebook-custom-audiences/remove/generated-types.js.map +0 -1
  222. package/dist/destinations/facebook-custom-audiences/remove/index.d.ts +0 -5
  223. package/dist/destinations/facebook-custom-audiences/remove/index.js +0 -11
  224. package/dist/destinations/facebook-custom-audiences/remove/index.js.map +0 -1
  225. package/dist/destinations/first-party-dv360/functions.d.ts +0 -17
  226. package/dist/destinations/first-party-dv360/functions.js +0 -38
  227. package/dist/destinations/first-party-dv360/functions.js.map +0 -1
  228. package/dist/destinations/mappings-two-test/generated-types.d.ts +0 -3
  229. package/dist/destinations/mappings-two-test/generated-types.js +0 -3
  230. package/dist/destinations/mappings-two-test/generated-types.js.map +0 -1
  231. package/dist/destinations/mappings-two-test/index.d.ts +0 -4
  232. package/dist/destinations/mappings-two-test/index.js +0 -34
  233. package/dist/destinations/mappings-two-test/index.js.map +0 -1
  234. package/dist/destinations/mappings-two-test/inputMethods/generated-types.d.ts +0 -29
  235. package/dist/destinations/mappings-two-test/inputMethods/generated-types.js +0 -3
  236. package/dist/destinations/mappings-two-test/inputMethods/generated-types.js.map +0 -1
  237. package/dist/destinations/mappings-two-test/inputMethods/index.d.ts +0 -5
  238. package/dist/destinations/mappings-two-test/inputMethods/index.js +0 -200
  239. package/dist/destinations/mappings-two-test/inputMethods/index.js.map +0 -1
  240. package/dist/destinations/mappings-two-test/kitchenSink/generated-types.d.ts +0 -53
  241. package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js +0 -3
  242. package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js.map +0 -1
  243. package/dist/destinations/mappings-two-test/kitchenSink/index.d.ts +0 -5
  244. package/dist/destinations/mappings-two-test/kitchenSink/index.js +0 -289
  245. package/dist/destinations/mappings-two-test/kitchenSink/index.js.map +0 -1
  246. package/dist/destinations/mappings-two-test/sendEvent/generated-types.d.ts +0 -17
  247. package/dist/destinations/mappings-two-test/sendEvent/generated-types.js +0 -3
  248. package/dist/destinations/mappings-two-test/sendEvent/generated-types.js.map +0 -1
  249. package/dist/destinations/mappings-two-test/sendEvent/index.d.ts +0 -5
  250. package/dist/destinations/mappings-two-test/sendEvent/index.js +0 -345
  251. package/dist/destinations/mappings-two-test/sendEvent/index.js.map +0 -1
  252. package/dist/destinations/salesforce/account2/generated-types.d.ts +0 -32
  253. package/dist/destinations/salesforce/account2/generated-types.js +0 -3
  254. package/dist/destinations/salesforce/account2/generated-types.js.map +0 -1
  255. package/dist/destinations/salesforce/account2/index.d.ts +0 -5
  256. package/dist/destinations/salesforce/account2/index.js +0 -248
  257. package/dist/destinations/salesforce/account2/index.js.map +0 -1
  258. package/dist/destinations/salesforce/cases2/generated-types.d.ts +0 -17
  259. package/dist/destinations/salesforce/cases2/generated-types.js +0 -3
  260. package/dist/destinations/salesforce/cases2/generated-types.js.map +0 -1
  261. package/dist/destinations/salesforce/cases2/index.d.ts +0 -5
  262. package/dist/destinations/salesforce/cases2/index.js +0 -76
  263. package/dist/destinations/salesforce/cases2/index.js.map +0 -1
  264. package/dist/destinations/salesforce/contact2/generated-types.d.ts +0 -25
  265. package/dist/destinations/salesforce/contact2/generated-types.js +0 -3
  266. package/dist/destinations/salesforce/contact2/generated-types.js.map +0 -1
  267. package/dist/destinations/salesforce/contact2/index.d.ts +0 -5
  268. package/dist/destinations/salesforce/contact2/index.js +0 -192
  269. package/dist/destinations/salesforce/contact2/index.js.map +0 -1
  270. package/dist/destinations/salesforce/customObject2/generated-types.d.ts +0 -17
  271. package/dist/destinations/salesforce/customObject2/generated-types.js +0 -3
  272. package/dist/destinations/salesforce/customObject2/generated-types.js.map +0 -1
  273. package/dist/destinations/salesforce/customObject2/index.d.ts +0 -5
  274. package/dist/destinations/salesforce/customObject2/index.js +0 -97
  275. package/dist/destinations/salesforce/customObject2/index.js.map +0 -1
  276. package/dist/destinations/salesforce/lead2/generated-types.d.ts +0 -25
  277. package/dist/destinations/salesforce/lead2/generated-types.js +0 -3
  278. package/dist/destinations/salesforce/lead2/generated-types.js.map +0 -1
  279. package/dist/destinations/salesforce/lead2/index.d.ts +0 -5
  280. package/dist/destinations/salesforce/lead2/index.js +0 -200
  281. package/dist/destinations/salesforce/lead2/index.js.map +0 -1
  282. package/dist/destinations/salesforce/opportunity2/generated-types.d.ts +0 -21
  283. package/dist/destinations/salesforce/opportunity2/generated-types.js +0 -3
  284. package/dist/destinations/salesforce/opportunity2/generated-types.js.map +0 -1
  285. package/dist/destinations/salesforce/opportunity2/index.d.ts +0 -5
  286. package/dist/destinations/salesforce/opportunity2/index.js +0 -112
  287. package/dist/destinations/salesforce/opportunity2/index.js.map +0 -1
@@ -1,97 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- const actions_core_1 = require("@segment/actions-core");
23
- const sf_properties_1 = require("../sf-properties");
24
- const sf_operations_1 = __importStar(require("../sf-operations"));
25
- const actions_core_2 = require("@segment/actions-core");
26
- const OPERATIONS_WITH_CUSTOM_FIELDS = ['add', 'update', 'upsert'];
27
- const action = {
28
- title: 'Custom Object',
29
- description: 'Create, update, or upsert records in any custom or standard object in Salesforce.',
30
- syncMode: {
31
- description: 'Define how the records from your destination will be synced.',
32
- label: 'How to sync records',
33
- default: 'add',
34
- choices: [
35
- { label: 'Insert Records', value: 'add' },
36
- { label: 'Update Records', value: 'update' },
37
- { label: 'Upsert Records', value: 'upsert' },
38
- { label: 'Delete Records. Not available when using batching. Requests will result in errors.', value: 'delete' }
39
- ]
40
- },
41
- fields: {
42
- recordMatcherOperator: sf_properties_1.recordMatcherOperator,
43
- enable_batching: sf_properties_1.enable_batching,
44
- batch_size: sf_properties_1.batch_size,
45
- traits: sf_properties_1.traits,
46
- bulkUpsertExternalId: sf_properties_1.bulkUpsertExternalId,
47
- bulkUpdateRecordId: sf_properties_1.bulkUpdateRecordId,
48
- customObjectName: {
49
- label: 'Salesforce Object',
50
- description: 'The API name of the Salesforce object that records will be added or updated within. This can be a standard or custom object. Custom objects must be predefined in your Salesforce account and should end with "__c".',
51
- type: 'string',
52
- required: true,
53
- dynamic: true
54
- },
55
- customFields: sf_properties_1.customFields
56
- },
57
- dynamicFields: {
58
- customObjectName: async (request, data) => {
59
- const sf = new sf_operations_1.default(data.settings.instanceUrl, await sf_operations_1.generateSalesforceRequest(data.settings, request));
60
- return sf.customObjectName();
61
- }
62
- },
63
- perform: async (request, { settings, payload, syncMode }) => {
64
- if (!syncMode) {
65
- throw new actions_core_2.PayloadValidationError('Sync mode is required for this operation.');
66
- }
67
- if (OPERATIONS_WITH_CUSTOM_FIELDS.includes(syncMode) && !payload.customFields) {
68
- throw new actions_core_2.PayloadValidationError('Custom fields are required for this operation.');
69
- }
70
- const sf = new sf_operations_1.default(settings.instanceUrl, await sf_operations_1.generateSalesforceRequest(settings, request));
71
- if (syncMode === 'add') {
72
- return await sf.createRecord(payload, payload.customObjectName);
73
- }
74
- sf_properties_1.validateLookup(payload);
75
- if (syncMode === 'update') {
76
- return await sf.updateRecord(payload, payload.customObjectName);
77
- }
78
- if (syncMode === 'upsert') {
79
- return await sf.upsertRecord(payload, payload.customObjectName);
80
- }
81
- if (syncMode === 'delete') {
82
- return await sf.deleteRecord(payload, payload.customObjectName);
83
- }
84
- },
85
- performBatch: async (request, { settings, payload, syncMode }) => {
86
- if (!syncMode) {
87
- throw new actions_core_1.IntegrationError('syncMode is required', 'Undefined syncMode', 400);
88
- }
89
- if (OPERATIONS_WITH_CUSTOM_FIELDS.includes(syncMode) && !payload[0].customFields) {
90
- throw new actions_core_2.PayloadValidationError('Custom fields are required for this operation.');
91
- }
92
- const sf = new sf_operations_1.default(settings.instanceUrl, await sf_operations_1.generateSalesforceRequest(settings, request));
93
- return sf.bulkHandlerWithSyncMode(payload, payload[0].customObjectName, syncMode);
94
- }
95
- };
96
- exports.default = action;
97
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce/customObject2/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,wDAA0E;AAG1E,oDASyB;AACzB,kEAAwE;AACxE,wDAA8D;AAC9D,MAAM,6BAA6B,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;AAEjE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,mFAAmF;IAChG,QAAQ,EAAE;QACR,WAAW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CAAC,WAAW,EAAE,MAAM,yCAAyB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;QAE/G,OAAO,EAAE,CAAC,uBAAuB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAA;IACnF,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,25 +0,0 @@
1
- export interface Payload {
2
- recordMatcherOperator?: string;
3
- enable_batching?: boolean;
4
- batch_size?: number;
5
- traits?: {
6
- [k: string]: unknown;
7
- };
8
- bulkUpsertExternalId?: {
9
- externalIdName?: string;
10
- externalIdValue?: string;
11
- };
12
- bulkUpdateRecordId?: string;
13
- company?: string;
14
- last_name?: string;
15
- first_name?: string;
16
- email?: string;
17
- city?: string;
18
- postal_code?: string;
19
- country?: string;
20
- street?: string;
21
- state?: string;
22
- customFields?: {
23
- [k: string]: unknown;
24
- };
25
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=generated-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce/lead2/generated-types.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import { ActionDefinition } from '@segment/actions-core';
2
- import type { Settings } from '../generated-types';
3
- import type { Payload } from './generated-types';
4
- declare const action: ActionDefinition<Settings, Payload>;
5
- export default action;
@@ -1,200 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- const actions_core_1 = require("@segment/actions-core");
23
- const sf_properties_1 = require("../sf-properties");
24
- const sf_operations_1 = __importStar(require("../sf-operations"));
25
- const OBJECT_NAME = 'Lead';
26
- const action = {
27
- title: 'Lead',
28
- description: 'Create, update, or upsert leads in Salesforce.',
29
- defaultSubscription: 'type = "identify"',
30
- syncMode: {
31
- description: 'Define how the records from your destination will be synced.',
32
- label: 'How to sync records',
33
- default: 'add',
34
- choices: [
35
- { label: 'Insert Records', value: 'add' },
36
- { label: 'Update Records', value: 'update' },
37
- { label: 'Upsert Records', value: 'upsert' },
38
- { label: 'Delete Records. Not available when using batching. Requests will result in errors.', value: 'delete' }
39
- ]
40
- },
41
- fields: {
42
- recordMatcherOperator: sf_properties_1.recordMatcherOperator,
43
- enable_batching: sf_properties_1.enable_batching,
44
- batch_size: sf_properties_1.batch_size,
45
- traits: sf_properties_1.traits,
46
- bulkUpsertExternalId: sf_properties_1.bulkUpsertExternalId,
47
- bulkUpdateRecordId: sf_properties_1.bulkUpdateRecordId,
48
- company: {
49
- label: 'Company',
50
- description: "The lead's company. **This is required to create a lead.**",
51
- type: 'string',
52
- default: {
53
- '@if': {
54
- exists: { '@path': '$.traits.company' },
55
- then: { '@path': '$.traits.company' },
56
- else: { '@path': '$.properties.company' }
57
- }
58
- },
59
- depends_on: sf_properties_1.hideIfDeleteOperation
60
- },
61
- last_name: {
62
- label: 'Last Name',
63
- description: "The lead's last name. **This is required to create a lead.**",
64
- type: 'string',
65
- default: {
66
- '@if': {
67
- exists: { '@path': '$.traits.last_name' },
68
- then: { '@path': '$.traits.last_name' },
69
- else: { '@path': '$.properties.last_name' }
70
- }
71
- },
72
- depends_on: sf_properties_1.hideIfDeleteOperation
73
- },
74
- first_name: {
75
- label: 'First Name',
76
- description: "The lead's first name.",
77
- type: 'string',
78
- default: {
79
- '@if': {
80
- exists: { '@path': '$.traits.first_name' },
81
- then: { '@path': '$.traits.first_name' },
82
- else: { '@path': '$.properties.first_name' }
83
- }
84
- },
85
- depends_on: sf_properties_1.hideIfDeleteOperation
86
- },
87
- email: {
88
- label: 'Email',
89
- description: "The lead's email address.",
90
- type: 'string',
91
- default: {
92
- '@if': {
93
- exists: { '@path': '$.traits.email' },
94
- then: { '@path': '$.traits.email' },
95
- else: { '@path': '$.properties.email' }
96
- }
97
- },
98
- depends_on: sf_properties_1.hideIfDeleteOperation
99
- },
100
- city: {
101
- label: 'City',
102
- description: "City for the lead's address.",
103
- type: 'string',
104
- default: {
105
- '@if': {
106
- exists: { '@path': '$.traits.address.city' },
107
- then: { '@path': '$.traits.address.city' },
108
- else: { '@path': '$.properties.address.city' }
109
- }
110
- },
111
- depends_on: sf_properties_1.hideIfDeleteOperation
112
- },
113
- postal_code: {
114
- label: 'Postal Code',
115
- description: "Postal code for the lead's address.",
116
- type: 'string',
117
- default: {
118
- '@if': {
119
- exists: { '@path': '$.traits.address.postal_code' },
120
- then: { '@path': '$.traits.address.postal_code' },
121
- else: { '@path': '$.properties.address.postal_code' }
122
- }
123
- },
124
- depends_on: sf_properties_1.hideIfDeleteOperation
125
- },
126
- country: {
127
- label: 'Country',
128
- description: "Country for the lead's address.",
129
- type: 'string',
130
- default: {
131
- '@if': {
132
- exists: { '@path': '$.traits.address.country' },
133
- then: { '@path': '$.traits.address.country' },
134
- else: { '@path': '$.properties.address.country' }
135
- }
136
- },
137
- depends_on: sf_properties_1.hideIfDeleteOperation
138
- },
139
- street: {
140
- label: 'Street',
141
- description: "Street number and name for the lead's address.",
142
- type: 'string',
143
- default: {
144
- '@if': {
145
- exists: { '@path': '$.traits.address.street' },
146
- then: { '@path': '$.traits.address.street' },
147
- else: { '@path': '$.properties.address.street' }
148
- }
149
- },
150
- depends_on: sf_properties_1.hideIfDeleteOperation
151
- },
152
- state: {
153
- label: 'State',
154
- description: "State for the lead's address.",
155
- type: 'string',
156
- default: {
157
- '@if': {
158
- exists: { '@path': '$.traits.address.state' },
159
- then: { '@path': '$.traits.address.state' },
160
- else: { '@path': '$.properties.address.state' }
161
- }
162
- },
163
- depends_on: sf_properties_1.hideIfDeleteOperation
164
- },
165
- customFields: sf_properties_1.customFields
166
- },
167
- perform: async (request, { settings, payload, syncMode }) => {
168
- const sf = new sf_operations_1.default(settings.instanceUrl, await sf_operations_1.generateSalesforceRequest(settings, request));
169
- if (syncMode === 'add') {
170
- if (!payload.last_name) {
171
- throw new actions_core_1.IntegrationError('Missing last_name value', 'Misconfigured required field', 400);
172
- }
173
- return await sf.createRecord(payload, OBJECT_NAME);
174
- }
175
- sf_properties_1.validateLookup(payload);
176
- if (syncMode === 'update') {
177
- return await sf.updateRecord(payload, OBJECT_NAME);
178
- }
179
- if (syncMode === 'upsert') {
180
- if (!payload.last_name) {
181
- throw new actions_core_1.IntegrationError('Missing last_name value', 'Misconfigured required field', 400);
182
- }
183
- return await sf.upsertRecord(payload, OBJECT_NAME);
184
- }
185
- if (syncMode === 'delete') {
186
- return await sf.deleteRecord(payload, OBJECT_NAME);
187
- }
188
- },
189
- performBatch: async (request, { settings, payload, syncMode }) => {
190
- const sf = new sf_operations_1.default(settings.instanceUrl, await sf_operations_1.generateSalesforceRequest(settings, request));
191
- if (syncMode === 'upsert') {
192
- if (!payload[0].last_name) {
193
- throw new actions_core_1.IntegrationError('Missing last_name value', 'Misconfigured required field', 400);
194
- }
195
- }
196
- return sf.bulkHandlerWithSyncMode(payload, OBJECT_NAME, syncMode);
197
- }
198
- };
199
- exports.default = action;
200
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce/lead2/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yB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;QAE/G,IAAI,QAAQ,KAAK,QAAQ,EAAE;YACzB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE;gBACzB,MAAM,IAAI,+BAAgB,CAAC,yBAAyB,EAAE,8BAA8B,EAAE,GAAG,CAAC,CAAA;aAC3F;SACF;QAED,OAAO,EAAE,CAAC,uBAAuB,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAA;IACnE,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,21 +0,0 @@
1
- export interface Payload {
2
- recordMatcherOperator?: string;
3
- enable_batching?: boolean;
4
- batch_size?: number;
5
- traits?: {
6
- [k: string]: unknown;
7
- };
8
- bulkUpsertExternalId?: {
9
- externalIdName?: string;
10
- externalIdValue?: string;
11
- };
12
- bulkUpdateRecordId?: string;
13
- close_date?: string;
14
- name?: string;
15
- stage_name?: string;
16
- amount?: string;
17
- description?: string;
18
- customFields?: {
19
- [k: string]: unknown;
20
- };
21
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=generated-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce/opportunity2/generated-types.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import { ActionDefinition } from '@segment/actions-core';
2
- import type { Settings } from '../generated-types';
3
- import type { Payload } from './generated-types';
4
- declare const action: ActionDefinition<Settings, Payload>;
5
- export default action;
@@ -1,112 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- const actions_core_1 = require("@segment/actions-core");
23
- const sf_operations_1 = __importStar(require("../sf-operations"));
24
- const sf_properties_1 = require("../sf-properties");
25
- const OBJECT_NAME = 'Opportunity';
26
- const action = {
27
- title: 'Opportunity',
28
- description: 'Create, update, or upsert opportunities in Salesforce.',
29
- syncMode: {
30
- description: 'Define how the records from your destination will be synced.',
31
- label: 'How to sync records',
32
- default: 'add',
33
- choices: [
34
- { label: 'Insert Records', value: 'add' },
35
- { label: 'Update Records', value: 'update' },
36
- { label: 'Upsert Records', value: 'upsert' },
37
- { label: 'Delete Records. Not available when using batching. Requests will result in errors.', value: 'delete' }
38
- ]
39
- },
40
- fields: {
41
- recordMatcherOperator: sf_properties_1.recordMatcherOperator,
42
- enable_batching: sf_properties_1.enable_batching,
43
- batch_size: sf_properties_1.batch_size,
44
- traits: sf_properties_1.traits,
45
- bulkUpsertExternalId: sf_properties_1.bulkUpsertExternalId,
46
- bulkUpdateRecordId: sf_properties_1.bulkUpdateRecordId,
47
- close_date: {
48
- label: 'Close Date',
49
- description: 'Date when the opportunity is expected to close. Use yyyy-MM-dd format. **This is required to create an opportunity.**',
50
- type: 'string',
51
- depends_on: sf_properties_1.hideIfDeleteOperation
52
- },
53
- name: {
54
- label: 'Name',
55
- description: 'A name for the opportunity. **This is required to create an opportunity.**',
56
- type: 'string',
57
- depends_on: sf_properties_1.hideIfDeleteOperation
58
- },
59
- stage_name: {
60
- label: 'Stage Name',
61
- description: 'Current stage of the opportunity. **This is required to create an opportunity.**',
62
- type: 'string',
63
- depends_on: sf_properties_1.hideIfDeleteOperation
64
- },
65
- amount: {
66
- label: 'Amount',
67
- description: 'Estimated total sale amount.',
68
- type: 'string',
69
- depends_on: sf_properties_1.hideIfDeleteOperation
70
- },
71
- description: {
72
- label: 'Description',
73
- description: 'A text description of the opportunity.',
74
- type: 'string',
75
- depends_on: sf_properties_1.hideIfDeleteOperation
76
- },
77
- customFields: sf_properties_1.customFields
78
- },
79
- perform: async (request, { settings, payload, syncMode }) => {
80
- const sf = new sf_operations_1.default(settings.instanceUrl, await sf_operations_1.generateSalesforceRequest(settings, request));
81
- if (syncMode === 'add') {
82
- if (!payload.close_date || !payload.name || !payload.stage_name) {
83
- throw new actions_core_1.IntegrationError('Missing close_date, name or stage_name value', 'Misconfigured required field', 400);
84
- }
85
- return await sf.createRecord(payload, OBJECT_NAME);
86
- }
87
- sf_properties_1.validateLookup(payload);
88
- if (syncMode === 'update') {
89
- return await sf.updateRecord(payload, OBJECT_NAME);
90
- }
91
- if (syncMode === 'upsert') {
92
- if (!payload.close_date || !payload.name || !payload.stage_name) {
93
- throw new actions_core_1.IntegrationError('Missing close_date, name or stage_name value', 'Misconfigured required field', 400);
94
- }
95
- return await sf.upsertRecord(payload, OBJECT_NAME);
96
- }
97
- if (syncMode === 'delete') {
98
- return await sf.deleteRecord(payload, OBJECT_NAME);
99
- }
100
- },
101
- performBatch: async (request, { settings, payload, syncMode }) => {
102
- const sf = new sf_operations_1.default(settings.instanceUrl, await sf_operations_1.generateSalesforceRequest(settings, request));
103
- if (syncMode === 'upsert') {
104
- if (!payload[0].close_date || !payload[0].name || !payload[0].stage_name) {
105
- throw new actions_core_1.IntegrationError('Missing close_date, name or stage_name value', 'Misconfigured required field', 400);
106
- }
107
- }
108
- return sf.bulkHandlerWithSyncMode(payload, OBJECT_NAME, syncMode);
109
- }
110
- };
111
- exports.default = action;
112
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce/opportunity2/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,wDAA0E;AAE1E,kEAAwE;AACxE,oDAUyB;AAGzB,MAAM,WAAW,GAAG,aAAa,CAAA;AAEjC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,wDAAwD;IACrE,QAAQ,EAAE;QACR,WAAW,EAAE,8DAA8D;QAC3E,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE,KAAK;QACd,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE;YACzC,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE;YAC5C,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE;YAC5C,EAAE,KAAK,EAAE,oFAAoF,EAAE,KAAK,EAAE,QAAQ,EAAE;SACjH;KACF;IACD,MAAM,EAAE;QACN,qBAAqB,EAAE,qCAAqB;QAC5C,eAAe,EAAE,+BAAe;QAChC,UAAU,EAAE,0BAAU;QACtB,MAAM,EAAE,sBAAM;QACd,oBAAoB,EAAE,oCAAoB;QAC1C,kBAAkB,EAAE,kCAAkB;QACtC,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,uHAAuH;YACzH,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,qCAAqB;SAClC;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,4EAA4E;YACzF,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,qCAAqB;SAClC;QACD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,kFAAkF;YAC/F,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,qCAAqB;SAClC;QACD,MAAM,EAAE;YACN,KAAK,E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