@segment/action-destinations 3.187.1-TempPublishBranch.6 → 3.189.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 (378) hide show
  1. package/dist/destinations/app-fit/index.js +2 -2
  2. package/dist/destinations/app-fit/index.js.map +1 -1
  3. package/dist/destinations/app-fit/track/index.js +1 -1
  4. package/dist/destinations/app-fit/track/index.js.map +1 -1
  5. package/dist/destinations/attio/api/index.d.ts +30 -0
  6. package/dist/destinations/attio/api/index.js +28 -0
  7. package/dist/destinations/attio/api/index.js.map +1 -0
  8. package/dist/destinations/attio/assertRecord/generated-types.d.ts +8 -0
  9. package/dist/destinations/attio/assertRecord/generated-types.js.map +1 -0
  10. package/dist/destinations/attio/assertRecord/index.d.ts +6 -0
  11. package/dist/destinations/attio/assertRecord/index.js +84 -0
  12. package/dist/destinations/attio/assertRecord/index.js.map +1 -0
  13. package/dist/destinations/attio/generated-types.d.ts +2 -0
  14. package/dist/destinations/attio/generated-types.js.map +1 -0
  15. package/dist/destinations/attio/groupWorkspace/generated-types.d.ts +10 -0
  16. package/dist/destinations/attio/groupWorkspace/generated-types.js.map +1 -0
  17. package/dist/destinations/attio/groupWorkspace/index.js +82 -0
  18. package/dist/destinations/attio/groupWorkspace/index.js.map +1 -0
  19. package/dist/destinations/attio/identifyUser/generated-types.d.ts +10 -0
  20. package/dist/destinations/attio/identifyUser/generated-types.js.map +1 -0
  21. package/dist/destinations/attio/identifyUser/index.js +74 -0
  22. package/dist/destinations/attio/identifyUser/index.js.map +1 -0
  23. package/dist/destinations/attio/index.d.ts +4 -0
  24. package/dist/destinations/attio/index.js +48 -0
  25. package/dist/destinations/attio/index.js.map +1 -0
  26. package/dist/destinations/{engage-messaging-twilio/utils/types.js → engage/sendgrid/Profile.js} +1 -1
  27. package/dist/destinations/engage/sendgrid/Profile.js.map +1 -0
  28. package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +3 -0
  29. package/dist/destinations/engage/sendgrid/destinationDefinition.js +70 -0
  30. package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +1 -0
  31. package/dist/destinations/engage/sendgrid/generated-types.d.ts +1 -0
  32. package/dist/destinations/engage/sendgrid/generated-types.js +14 -0
  33. package/dist/destinations/engage/sendgrid/generated-types.js.map +1 -0
  34. package/dist/destinations/engage/sendgrid/index.d.ts +2 -0
  35. package/dist/destinations/engage/sendgrid/index.js +5 -0
  36. package/dist/destinations/engage/sendgrid/index.js.map +1 -0
  37. package/dist/destinations/{engage-messaging-sendgrid/previewApiLookup/index.d.ts → engage/sendgrid/previewApiLookup/actionDefinition.d.ts} +1 -2
  38. package/dist/destinations/{engage-messaging-sendgrid/previewApiLookup/index.js → engage/sendgrid/previewApiLookup/actionDefinition.js} +4 -4
  39. package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +1 -0
  40. package/dist/destinations/{engage-messaging-sendgrid/utils → engage/sendgrid/previewApiLookup}/api-lookups.d.ts +2 -4
  41. package/dist/destinations/{engage-messaging-sendgrid/utils → engage/sendgrid/previewApiLookup}/api-lookups.js +1 -15
  42. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -0
  43. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +1 -0
  44. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +14 -0
  45. package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +1 -0
  46. package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +2 -0
  47. package/dist/destinations/{engage-messaging-twilio/utils → engage/sendgrid/previewApiLookup}/index.js +2 -6
  48. package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +1 -0
  49. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +42 -0
  50. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +318 -0
  51. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -0
  52. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +12 -0
  53. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +3 -0
  54. package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +1 -0
  55. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +4 -0
  56. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +236 -0
  57. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +1 -0
  58. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +1 -0
  59. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +14 -0
  60. package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +1 -0
  61. package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +1 -0
  62. package/dist/destinations/engage/sendgrid/sendEmail/index.js +14 -0
  63. package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +1 -0
  64. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +1 -0
  65. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +23 -0
  66. package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +1 -0
  67. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +1 -0
  68. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +14 -0
  69. package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +1 -0
  70. package/dist/destinations/engage/twilio/destinationDefinition.d.ts +3 -0
  71. package/dist/destinations/engage/twilio/destinationDefinition.js +172 -0
  72. package/dist/destinations/engage/twilio/destinationDefinition.js.map +1 -0
  73. package/dist/destinations/engage/twilio/generated-types.d.ts +1 -0
  74. package/dist/destinations/engage/twilio/generated-types.js +14 -0
  75. package/dist/destinations/engage/twilio/generated-types.js.map +1 -0
  76. package/dist/destinations/engage/twilio/index.d.ts +2 -0
  77. package/dist/destinations/engage/twilio/index.js +5 -0
  78. package/dist/destinations/engage/twilio/index.js.map +1 -0
  79. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +27 -0
  80. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +142 -0
  81. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +1 -0
  82. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +4 -0
  83. package/dist/destinations/{engage-messaging-twilio/sendMobilePush/index.js → engage/twilio/sendMobilePush/actionDefinition.js} +5 -5
  84. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +1 -0
  85. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +1 -0
  86. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +14 -0
  87. package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +1 -0
  88. package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +1 -0
  89. package/dist/destinations/engage/twilio/sendMobilePush/index.js +14 -0
  90. package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +1 -0
  91. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +9 -0
  92. package/dist/destinations/{engage-messaging-twilio/sendSms/sms-sender.js → engage/twilio/sendSms/SmsMessageSender.js} +5 -32
  93. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -0
  94. package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +4 -0
  95. package/dist/destinations/{engage-messaging-twilio/sendSms/index.js → engage/twilio/sendSms/actionDefinition.js} +5 -5
  96. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +1 -0
  97. package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +1 -0
  98. package/dist/destinations/engage/twilio/sendSms/generated-types.js +14 -0
  99. package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +1 -0
  100. package/dist/destinations/engage/twilio/sendSms/index.d.ts +1 -0
  101. package/dist/destinations/engage/twilio/sendSms/index.js +14 -0
  102. package/dist/destinations/engage/twilio/sendSms/index.js.map +1 -0
  103. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +8 -0
  104. package/dist/destinations/{engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js → engage/twilio/sendWhatsApp/WhatsAppMessageSender.js} +8 -4
  105. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +1 -0
  106. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +4 -0
  107. package/dist/destinations/{engage-messaging-twilio/sendWhatsApp/index.js → engage/twilio/sendWhatsApp/actionDefinition.js} +5 -5
  108. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +1 -0
  109. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +1 -0
  110. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +14 -0
  111. package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +1 -0
  112. package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +1 -0
  113. package/dist/destinations/engage/twilio/sendWhatsApp/index.js +14 -0
  114. package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +1 -0
  115. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +16 -0
  116. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +57 -0
  117. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +1 -0
  118. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +16 -0
  119. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +109 -0
  120. package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -0
  121. package/dist/destinations/engage/twilio/utils/index.d.ts +2 -0
  122. package/dist/destinations/engage/twilio/utils/index.js +15 -0
  123. package/dist/destinations/engage/twilio/utils/index.js.map +1 -0
  124. package/dist/destinations/{engage-messaging-twilio → engage/twilio}/utils/types.d.ts +0 -16
  125. package/dist/destinations/engage/twilio/utils/types.js.map +1 -0
  126. package/dist/destinations/engage/utils/AggregateError.d.ts +14 -0
  127. package/dist/destinations/engage/utils/AggregateError.js +26 -0
  128. package/dist/destinations/engage/utils/AggregateError.js.map +1 -0
  129. package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +41 -0
  130. package/dist/destinations/engage/utils/EngageActionPerformer.js +135 -0
  131. package/dist/destinations/engage/utils/EngageActionPerformer.js.map +1 -0
  132. package/dist/destinations/{engage-messaging-twilio/utils/MessageLogger.d.ts → engage/utils/EngageLogger.d.ts} +8 -5
  133. package/dist/destinations/engage/utils/EngageLogger.js +52 -0
  134. package/dist/destinations/engage/utils/EngageLogger.js.map +1 -0
  135. package/dist/destinations/engage/utils/EngageStats.d.ts +18 -0
  136. package/dist/destinations/{engage-messaging-twilio/utils/MessageStats.js → engage/utils/EngageStats.js} +28 -14
  137. package/dist/destinations/engage/utils/EngageStats.js.map +1 -0
  138. package/dist/destinations/{engage-messaging-twilio → engage}/utils/IntegrationErrorWrapper.d.ts +2 -2
  139. package/dist/destinations/{engage-messaging-twilio → engage}/utils/IntegrationErrorWrapper.js +1 -1
  140. package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +1 -0
  141. package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +63 -0
  142. package/dist/destinations/engage/utils/MessageSendPerformer.js +191 -0
  143. package/dist/destinations/engage/utils/MessageSendPerformer.js.map +1 -0
  144. package/dist/destinations/engage/utils/ResponseError.d.ts +20 -0
  145. package/dist/destinations/engage/utils/ResponseError.js +17 -0
  146. package/dist/destinations/engage/utils/ResponseError.js.map +1 -0
  147. package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +2 -0
  148. package/dist/destinations/engage/utils/getProfileApiEndpoint.js +10 -0
  149. package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +1 -0
  150. package/dist/destinations/engage/utils/index.d.ts +9 -0
  151. package/dist/destinations/engage/utils/index.js +22 -0
  152. package/dist/destinations/engage/utils/index.js.map +1 -0
  153. package/dist/destinations/engage/utils/isDestinationActionService.js.map +1 -0
  154. package/dist/destinations/engage/utils/isRetryableError.d.ts +2 -0
  155. package/dist/destinations/engage/utils/isRetryableError.js +33 -0
  156. package/dist/destinations/engage/utils/isRetryableError.js.map +1 -0
  157. package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +1 -0
  158. package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +1 -0
  159. package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +1 -0
  160. package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +1 -0
  161. package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationFinallyHooks.d.ts +4 -0
  162. package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationFinallyHooks.js +2 -0
  163. package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +1 -0
  164. package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationLogger.d.ts +2 -1
  165. package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationLogger.js +22 -25
  166. package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +1 -0
  167. package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +1 -0
  168. package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +1 -0
  169. package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +1 -0
  170. package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +1 -0
  171. package/dist/destinations/engage/utils/operationTracking/index.js.map +1 -0
  172. package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +1 -0
  173. package/dist/destinations/engage/utils/testUtils.d.ts +6 -0
  174. package/dist/destinations/engage/utils/testUtils.js +26 -0
  175. package/dist/destinations/engage/utils/testUtils.js.map +1 -0
  176. package/dist/destinations/engage/utils/track.d.ts +52 -0
  177. package/dist/destinations/engage/utils/track.js +9 -0
  178. package/dist/destinations/engage/utils/track.js.map +1 -0
  179. package/dist/destinations/engage-messaging-sendgrid/index.d.ts +2 -3
  180. package/dist/destinations/engage-messaging-sendgrid/index.js +13 -67
  181. package/dist/destinations/engage-messaging-sendgrid/index.js.map +1 -1
  182. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +3 -0
  183. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +1 -0
  184. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +3 -0
  185. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +1 -0
  186. package/dist/destinations/engage-messaging-twilio/index.d.ts +2 -3
  187. package/dist/destinations/engage-messaging-twilio/index.js +13 -169
  188. package/dist/destinations/engage-messaging-twilio/index.js.map +1 -1
  189. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +3 -0
  190. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +1 -0
  191. package/dist/destinations/engage-messaging-twilio/sendSms.types.js +3 -0
  192. package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +1 -0
  193. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +3 -0
  194. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +1 -0
  195. package/dist/destinations/hilo/generated-types.d.ts +3 -0
  196. package/dist/destinations/hilo/generated-types.js.map +1 -0
  197. package/dist/destinations/hilo/group/generated-types.d.ts +9 -0
  198. package/dist/destinations/hilo/group/generated-types.js +3 -0
  199. package/dist/destinations/hilo/group/generated-types.js.map +1 -0
  200. package/dist/destinations/{engage-messaging-sendgrid/sendEmail → hilo/group}/index.d.ts +1 -1
  201. package/dist/destinations/hilo/group/index.js +59 -0
  202. package/dist/destinations/hilo/group/index.js.map +1 -0
  203. package/dist/destinations/hilo/identify/generated-types.d.ts +8 -0
  204. package/dist/destinations/hilo/identify/generated-types.js +3 -0
  205. package/dist/destinations/hilo/identify/generated-types.js.map +1 -0
  206. package/dist/destinations/{engage-messaging-twilio/sendMobilePush → hilo/identify}/index.d.ts +1 -1
  207. package/dist/destinations/hilo/identify/index.js +51 -0
  208. package/dist/destinations/hilo/identify/index.js.map +1 -0
  209. package/dist/destinations/hilo/index.d.ts +4 -0
  210. package/dist/destinations/hilo/index.js +103 -0
  211. package/dist/destinations/hilo/index.js.map +1 -0
  212. package/dist/destinations/hilo/page/generated-types.d.ts +9 -0
  213. package/dist/destinations/hilo/page/generated-types.js +3 -0
  214. package/dist/destinations/hilo/page/generated-types.js.map +1 -0
  215. package/dist/destinations/hilo/page/index.d.ts +5 -0
  216. package/dist/destinations/hilo/page/index.js +59 -0
  217. package/dist/destinations/hilo/page/index.js.map +1 -0
  218. package/dist/destinations/hilo/screen/generated-types.d.ts +9 -0
  219. package/dist/destinations/hilo/screen/generated-types.js +3 -0
  220. package/dist/destinations/hilo/screen/generated-types.js.map +1 -0
  221. package/dist/destinations/hilo/screen/index.d.ts +5 -0
  222. package/dist/destinations/hilo/screen/index.js +59 -0
  223. package/dist/destinations/hilo/screen/index.js.map +1 -0
  224. package/dist/destinations/hilo/track/generated-types.d.ts +9 -0
  225. package/dist/destinations/hilo/track/generated-types.js +3 -0
  226. package/dist/destinations/hilo/track/generated-types.js.map +1 -0
  227. package/dist/destinations/hilo/track/index.d.ts +5 -0
  228. package/dist/destinations/hilo/track/index.js +59 -0
  229. package/dist/destinations/hilo/track/index.js.map +1 -0
  230. package/dist/destinations/hubspot/api/index.d.ts +11 -5
  231. package/dist/destinations/hubspot/api/index.js +59 -24
  232. package/dist/destinations/hubspot/api/index.js.map +1 -1
  233. package/dist/destinations/hubspot/errors.d.ts +2 -0
  234. package/dist/destinations/hubspot/errors.js +3 -1
  235. package/dist/destinations/hubspot/errors.js.map +1 -1
  236. package/dist/destinations/hubspot/upsertCompany/index.js +1 -1
  237. package/dist/destinations/hubspot/upsertCompany/index.js.map +1 -1
  238. package/dist/destinations/hubspot/upsertCustomObjectRecord/generated-types.d.ts +5 -0
  239. package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js +113 -22
  240. package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js.map +1 -1
  241. package/dist/destinations/hubspot/utils.d.ts +23 -0
  242. package/dist/destinations/hubspot/utils.js +7 -1
  243. package/dist/destinations/hubspot/utils.js.map +1 -1
  244. package/dist/destinations/index.js +5 -2
  245. package/dist/destinations/index.js.map +1 -1
  246. package/dist/destinations/iterable/generated-types.d.ts +1 -0
  247. package/dist/destinations/iterable/index.js +20 -1
  248. package/dist/destinations/iterable/index.js.map +1 -1
  249. package/dist/destinations/iterable/index.test.d.ts +1 -0
  250. package/dist/destinations/iterable/index.test.js +46 -0
  251. package/dist/destinations/iterable/index.test.js.map +1 -0
  252. package/dist/destinations/iterable/shared-fields.d.ts +1 -0
  253. package/dist/destinations/iterable/trackEvent/index.js +3 -2
  254. package/dist/destinations/iterable/trackEvent/index.js.map +1 -1
  255. package/dist/destinations/iterable/trackPurchase/index.js +3 -2
  256. package/dist/destinations/iterable/trackPurchase/index.js.map +1 -1
  257. package/dist/destinations/iterable/updateCart/index.js +3 -2
  258. package/dist/destinations/iterable/updateCart/index.js.map +1 -1
  259. package/dist/destinations/iterable/updateUser/index.js +3 -2
  260. package/dist/destinations/iterable/updateUser/index.js.map +1 -1
  261. package/dist/destinations/iterable/utils.d.ts +9 -1
  262. package/dist/destinations/iterable/utils.js +18 -1
  263. package/dist/destinations/iterable/utils.js.map +1 -1
  264. package/dist/destinations/pinterest-conversions/reportConversionEvent/index.js +1 -1
  265. package/dist/destinations/pinterest-conversions/reportConversionEvent/index.js.map +1 -1
  266. package/dist/destinations/rehook/generated-types.d.ts +4 -0
  267. package/dist/destinations/rehook/generated-types.js +3 -0
  268. package/dist/destinations/rehook/generated-types.js.map +1 -0
  269. package/dist/destinations/rehook/identifyUser/generated-types.d.ts +7 -0
  270. package/dist/destinations/rehook/identifyUser/generated-types.js +3 -0
  271. package/dist/destinations/rehook/identifyUser/generated-types.js.map +1 -0
  272. package/dist/destinations/rehook/identifyUser/index.d.ts +5 -0
  273. package/dist/destinations/rehook/identifyUser/index.js +44 -0
  274. package/dist/destinations/rehook/identifyUser/index.js.map +1 -0
  275. package/dist/destinations/rehook/index.d.ts +4 -0
  276. package/dist/destinations/rehook/index.js +47 -0
  277. package/dist/destinations/rehook/index.js.map +1 -0
  278. package/dist/destinations/rehook/trackEvent/generated-types.d.ts +7 -0
  279. package/dist/destinations/rehook/trackEvent/generated-types.js +3 -0
  280. package/dist/destinations/rehook/trackEvent/generated-types.js.map +1 -0
  281. package/dist/destinations/rehook/trackEvent/index.d.ts +5 -0
  282. package/dist/destinations/rehook/trackEvent/index.js +48 -0
  283. package/dist/destinations/rehook/trackEvent/index.js.map +1 -0
  284. package/dist/destinations/the-trade-desk-crm/functions.js +4 -0
  285. package/dist/destinations/the-trade-desk-crm/functions.js.map +1 -1
  286. package/dist/destinations/the-trade-desk-crm/properties.d.ts +1 -0
  287. package/dist/destinations/the-trade-desk-crm/properties.js +8 -1
  288. package/dist/destinations/the-trade-desk-crm/properties.js.map +1 -1
  289. package/dist/destinations/the-trade-desk-crm/syncAudience/generated-types.d.ts +1 -0
  290. package/dist/destinations/the-trade-desk-crm/syncAudience/index.js +2 -1
  291. package/dist/destinations/the-trade-desk-crm/syncAudience/index.js.map +1 -1
  292. package/package.json +4 -4
  293. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/generated-types.js.map +0 -1
  294. package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/index.js.map +0 -1
  295. package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.js.map +0 -1
  296. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +0 -578
  297. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +0 -1
  298. package/dist/destinations/engage-messaging-sendgrid/utils/api-lookups.js.map +0 -1
  299. package/dist/destinations/engage-messaging-sendgrid/utils/types.js.map +0 -1
  300. package/dist/destinations/engage-messaging-twilio/operationTracking/GenericMethodDecorator.js.map +0 -1
  301. package/dist/destinations/engage-messaging-twilio/operationTracking/OperationDecorator.js.map +0 -1
  302. package/dist/destinations/engage-messaging-twilio/operationTracking/OperationDuration.js.map +0 -1
  303. package/dist/destinations/engage-messaging-twilio/operationTracking/OperationErrorHandler.js.map +0 -1
  304. package/dist/destinations/engage-messaging-twilio/operationTracking/OperationFinallyHooks.js.map +0 -1
  305. package/dist/destinations/engage-messaging-twilio/operationTracking/OperationLogger.js.map +0 -1
  306. package/dist/destinations/engage-messaging-twilio/operationTracking/OperationStats.js.map +0 -1
  307. package/dist/destinations/engage-messaging-twilio/operationTracking/OperationTracker.test.js.map +0 -1
  308. package/dist/destinations/engage-messaging-twilio/operationTracking/OperationTree.js.map +0 -1
  309. package/dist/destinations/engage-messaging-twilio/operationTracking/TrackedError.js.map +0 -1
  310. package/dist/destinations/engage-messaging-twilio/operationTracking/index.js.map +0 -1
  311. package/dist/destinations/engage-messaging-twilio/operationTracking/wrapTryCatchFinallyPromisable.js.map +0 -1
  312. package/dist/destinations/engage-messaging-twilio/sendMobilePush/generated-types.js.map +0 -1
  313. package/dist/destinations/engage-messaging-twilio/sendMobilePush/index.js.map +0 -1
  314. package/dist/destinations/engage-messaging-twilio/sendMobilePush/push-sender.d.ts +0 -17
  315. package/dist/destinations/engage-messaging-twilio/sendMobilePush/push-sender.js +0 -182
  316. package/dist/destinations/engage-messaging-twilio/sendMobilePush/push-sender.js.map +0 -1
  317. package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.js.map +0 -1
  318. package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +0 -1
  319. package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.d.ts +0 -9
  320. package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +0 -1
  321. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js.map +0 -1
  322. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +0 -1
  323. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.d.ts +0 -7
  324. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js.map +0 -1
  325. package/dist/destinations/engage-messaging-twilio/utils/IntegrationErrorWrapper.js.map +0 -1
  326. package/dist/destinations/engage-messaging-twilio/utils/MessageLogger.js +0 -36
  327. package/dist/destinations/engage-messaging-twilio/utils/MessageLogger.js.map +0 -1
  328. package/dist/destinations/engage-messaging-twilio/utils/MessageStats.d.ts +0 -14
  329. package/dist/destinations/engage-messaging-twilio/utils/MessageStats.js.map +0 -1
  330. package/dist/destinations/engage-messaging-twilio/utils/index.d.ts +0 -6
  331. package/dist/destinations/engage-messaging-twilio/utils/index.js.map +0 -1
  332. package/dist/destinations/engage-messaging-twilio/utils/isDestinationActionService.js.map +0 -1
  333. package/dist/destinations/engage-messaging-twilio/utils/message-sender.d.ts +0 -43
  334. package/dist/destinations/engage-messaging-twilio/utils/message-sender.js +0 -203
  335. package/dist/destinations/engage-messaging-twilio/utils/message-sender.js.map +0 -1
  336. package/dist/destinations/engage-messaging-twilio/utils/phone-message.d.ts +0 -19
  337. package/dist/destinations/engage-messaging-twilio/utils/phone-message.js +0 -97
  338. package/dist/destinations/engage-messaging-twilio/utils/phone-message.js.map +0 -1
  339. package/dist/destinations/engage-messaging-twilio/utils/track.d.ts +0 -45
  340. package/dist/destinations/engage-messaging-twilio/utils/track.js +0 -9
  341. package/dist/destinations/engage-messaging-twilio/utils/track.js.map +0 -1
  342. package/dist/destinations/engage-messaging-twilio/utils/types.js.map +0 -1
  343. /package/dist/destinations/{engage-messaging-sendgrid/previewApiLookup → attio/assertRecord}/generated-types.js +0 -0
  344. /package/dist/destinations/{engage-messaging-sendgrid/sendEmail → attio}/generated-types.js +0 -0
  345. /package/dist/destinations/{engage-messaging-twilio/sendMobilePush → attio/groupWorkspace}/generated-types.js +0 -0
  346. /package/dist/destinations/{engage-messaging-twilio/sendSms → attio/groupWorkspace}/index.d.ts +0 -0
  347. /package/dist/destinations/{engage-messaging-twilio/sendSms → attio/identifyUser}/generated-types.js +0 -0
  348. /package/dist/destinations/{engage-messaging-twilio/sendWhatsApp → attio/identifyUser}/index.d.ts +0 -0
  349. /package/dist/destinations/{engage-messaging-sendgrid/utils/types.d.ts → engage/sendgrid/Profile.d.ts} +0 -0
  350. /package/dist/destinations/{engage-messaging-sendgrid → engage/twilio}/utils/types.js +0 -0
  351. /package/dist/destinations/{engage-messaging-twilio → engage}/utils/isDestinationActionService.d.ts +0 -0
  352. /package/dist/destinations/{engage-messaging-twilio → engage}/utils/isDestinationActionService.js +0 -0
  353. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/GenericMethodDecorator.d.ts +0 -0
  354. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/GenericMethodDecorator.js +0 -0
  355. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationDecorator.d.ts +0 -0
  356. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationDecorator.js +0 -0
  357. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationDuration.d.ts +0 -0
  358. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationDuration.js +0 -0
  359. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationErrorHandler.d.ts +0 -0
  360. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationErrorHandler.js +0 -0
  361. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationStats.d.ts +0 -0
  362. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationStats.js +0 -0
  363. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationTracker.test.d.ts +0 -0
  364. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationTracker.test.js +0 -0
  365. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationTree.d.ts +0 -0
  366. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationTree.js +0 -0
  367. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/TrackedError.d.ts +0 -0
  368. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/TrackedError.js +0 -0
  369. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/index.d.ts +0 -0
  370. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/index.js +0 -0
  371. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/wrapTryCatchFinallyPromisable.d.ts +0 -0
  372. /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/wrapTryCatchFinallyPromisable.js +0 -0
  373. /package/dist/destinations/engage-messaging-sendgrid/{previewApiLookup/generated-types.d.ts → previewApiLookup.types.d.ts} +0 -0
  374. /package/dist/destinations/engage-messaging-sendgrid/{sendEmail/generated-types.d.ts → sendEmail.types.d.ts} +0 -0
  375. /package/dist/destinations/engage-messaging-twilio/{sendMobilePush/generated-types.d.ts → sendMobilePush.types.d.ts} +0 -0
  376. /package/dist/destinations/engage-messaging-twilio/{sendSms/generated-types.d.ts → sendSms.types.d.ts} +0 -0
  377. /package/dist/destinations/engage-messaging-twilio/{sendWhatsApp/generated-types.d.ts → sendWhatsApp.types.d.ts} +0 -0
  378. /package/dist/destinations/{engage-messaging-twilio/sendWhatsApp → hilo}/generated-types.js +0 -0
@@ -20,8 +20,8 @@ const destination = {
20
20
  }
21
21
  },
22
22
  testAuthentication: (request, { settings }) => {
23
- return request(`${config_1.default.apiUrl}/api-key/current`, {
24
- headers: { Authorization: `Bearer ${settings.apiKey}` }
23
+ return request(`${config_1.default.apiUrl}/api-keys/current`, {
24
+ headers: { Authorization: `Basic ${settings.apiKey}` }
25
25
  });
26
26
  }
27
27
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/app-fit/index.ts"],"names":[],"mappings":";;;;;AAGA,sDAAmC;AACnC,oDAA2B;AAE3B,MAAM,WAAW,G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A0B;gBACvC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC5C,OAAO,OAAO,CAAC,GAAG,gBAAY,CAAC,MAAM,mBAAmB,EAAE;gBACxD,OAAO,EAAE,EAAE,aAAa,EAAE,SAAS,QAAQ,CAAC,MAAM,EAAE,EAAE;aACvD,CAAC,CAAA;QACJ,CAAC;KACF;IAED,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAIjD,OAAO,OAAO,CAAC,GAAG,gBAAY,CAAC,MAAM,uBAAuB,OAAO,CAAC,MAAM,6BAA6B,EAAE;YACvG,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,QAAQ,CAAC,MAAM,EAAE,EAAE;YACvD,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,EAAE;QACP,KAAK,EAAL,eAAK;KACN;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -87,7 +87,7 @@ const action = {
87
87
  perform: (request, { payload, settings }) => {
88
88
  return request(`${config_1.default.apiUrl}/metric-events`, {
89
89
  method: 'POST',
90
- headers: { Authorization: `Bearer ${settings.apiKey}` },
90
+ headers: { Authorization: `Basic ${settings.apiKey}` },
91
91
  json: {
92
92
  eventSource: 'segment',
93
93
  occurredAt: payload.occurredAt,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/app-fit/track/index.ts"],"names":[],"mappings":";;;;;AACA,uDAAoC;AAIpC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,0BAA0B;IACvC,MAAM,EAAE;QACN,MAAM,EAAE;YACN,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,4BAA4B;YACzC,IAAI,EAAE,QAAQ;YACd,O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,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,OAAO,OAAO,CAAC,GAAG,gBAAY,CAAC,MAAM,gBAAgB,EAAE;YACrD,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,QAAQ,CAAC,MAAM,EAAE,EAAE;YAEvD,IAAI,EAAE;gBACJ,WAAW,EAAE,SAAS;gBACtB,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,OAAO,EAAE;oBACP,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,WAAW,EAAE,OAAO,CAAC,WAAW;oBAChC,IAAI,EAAE,OAAO,CAAC,IAAI;oBAClB,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;iBACvB;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/app-fit/track/index.ts"],"names":[],"mappings":";;;;;AACA,uDAAoC;AAIpC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,0BAA0B;IACvC,MAAM,EAAE;QACN,MAAM,EAAE;YACN,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,4BAA4B;YACzC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,O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AY,CAAC,MAAM,gBAAgB,EAAE;YACrD,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,aAAa,EAAE,SAAS,QAAQ,CAAC,MAAM,EAAE,EAAE;YAEtD,IAAI,EAAE;gBACJ,WAAW,EAAE,SAAS;gBACtB,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,OAAO,EAAE;oBACP,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,WAAW,EAAE,OAAO,CAAC,WAAW;oBAChC,IAAI,EAAE,OAAO,CAAC,IAAI;oBAClB,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;iBACvB;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,30 @@
1
+ import { RequestClient, RequestOptions } from '@segment/actions-core';
2
+ import { ModifiedResponse } from '@segment/actions-core';
3
+ export declare type AssertResponse = {
4
+ data: {
5
+ id: {
6
+ workspace_id: string;
7
+ object_id: string;
8
+ record_id: string;
9
+ };
10
+ created_at: string;
11
+ values: Record<string, Array<unknown>>;
12
+ };
13
+ };
14
+ interface ObjectResponse {
15
+ api_slug: string;
16
+ singular_noun: string;
17
+ }
18
+ export declare class AttioClient {
19
+ private request;
20
+ private api_url;
21
+ constructor(request: RequestClient);
22
+ assertRecord({ matching_attribute, object, values, requestOptions }: {
23
+ matching_attribute: string;
24
+ object: string;
25
+ values: Record<string, unknown>;
26
+ requestOptions?: Partial<RequestOptions>;
27
+ }): Promise<ModifiedResponse<AssertResponse>>;
28
+ listObjects(): Promise<Array<ObjectResponse>>;
29
+ }
30
+ export {};
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AttioClient = void 0;
7
+ const get_1 = __importDefault(require("lodash/get"));
8
+ const sortBy_1 = __importDefault(require("lodash/sortBy"));
9
+ class AttioClient {
10
+ constructor(request) {
11
+ this.request = request;
12
+ this.api_url = 'https://api.attio.com';
13
+ }
14
+ async assertRecord({ matching_attribute, object, values, requestOptions }) {
15
+ return await this.request(`${this.api_url}/v2/objects/${object}/records/simple?matching_attribute=${matching_attribute}`, {
16
+ method: 'put',
17
+ json: { data: { values } },
18
+ ...requestOptions
19
+ });
20
+ }
21
+ async listObjects() {
22
+ const response = await this.request(`${this.api_url}/v2/objects`);
23
+ const objects = get_1.default(response, 'data.data', []);
24
+ return sortBy_1.default(objects, 'singular_noun');
25
+ }
26
+ }
27
+ exports.AttioClient = AttioClient;
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/attio/api/index.ts"],"names":[],"mappings":";;;;;;AAEA,qDAA4B;AAC5B,2DAAkC;AAmBlC,MAAa,WAAW;IAItB,YAAY,OAAsB;QAChC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,uBAAuB,CAAA;IACxC,CAAC;IAUD,KAAK,CAAC,YAAY,CAAC,EACjB,kBAAkB,EAClB,MAAM,EACN,MAAM,EACN,cAAc,EAMf;QACC,OAAO,MAAM,IAAI,CAAC,OAAO,CACvB,GAAG,IAAI,CAAC,OAAO,eAAe,MAAM,sCAAsC,kBAAkB,EAAE,EAC9F;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE;YAC1B,GAAG,cAAc;SAClB,CACF,CAAA;IACH,CAAC;IAKD,KAAK,CAAC,WAAW;QACf,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,aAAa,CAAC,CAAA;QACjE,MAAM,OAAO,GAA0B,aAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,CAAC,CAAA;QAErE,OAAO,gBAAM,CAAC,OAAO,EAAE,eAAe,CAAC,CAAA;IACzC,CAAC;CACF;AA/CD,kCA+CC"}
@@ -0,0 +1,8 @@
1
+ export interface Payload {
2
+ object: string;
3
+ matching_attribute: string;
4
+ attributes?: {
5
+ name?: string;
6
+ [k: string]: unknown;
7
+ };
8
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/attio/assertRecord/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { ActionDefinition, DynamicFieldResponse, RequestClient } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ export declare const objectLookup: (request: RequestClient) => Promise<DynamicFieldResponse>;
5
+ declare const action: ActionDefinition<Settings, Payload>;
6
+ export default action;
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.objectLookup = void 0;
4
+ const api_1 = require("../api");
5
+ const object = {
6
+ type: 'string',
7
+ label: 'Attio Object',
8
+ description: "The type of Attio Object you'd like to create or update ('assert')",
9
+ dynamic: true,
10
+ required: true,
11
+ default: 'person'
12
+ };
13
+ const matching_attribute = {
14
+ type: 'string',
15
+ label: 'Matching Attribute',
16
+ description: 'The Attribute (ID or slug) on the Attio Object above, that uniquely identifies a Record (and is marked as unique in Attio). ' +
17
+ 'Events containing the same value for this attribute will update the original Record, rather than creating a new one. ' +
18
+ 'For example, to create or update a Person you might use the Attio attribute `email_addresses` here.',
19
+ required: true,
20
+ default: 'email_addresses'
21
+ };
22
+ const attributes = {
23
+ type: 'object',
24
+ label: 'Attributes',
25
+ description: 'Attributes to either set or update on the Attio Record. The keys on the left should be ' +
26
+ 'Attio Attribute IDs or Slugs, and the values on the right are Segment attributes or custom text. ' +
27
+ 'The Matching Attribute must be included for assertion to work.',
28
+ defaultObjectUI: 'keyvalue:only',
29
+ additionalProperties: true,
30
+ properties: {
31
+ name: {
32
+ label: 'Name',
33
+ type: 'string'
34
+ }
35
+ },
36
+ default: {
37
+ name: { '@path': '$.traits.name' }
38
+ }
39
+ };
40
+ const objectLookup = async (request) => {
41
+ try {
42
+ const objects = await new api_1.AttioClient(request).listObjects();
43
+ return {
44
+ choices: objects.map(({ api_slug, singular_noun }) => ({
45
+ value: api_slug,
46
+ label: singular_noun
47
+ }))
48
+ };
49
+ }
50
+ catch (error) {
51
+ const response_data = error?.response?.data ?? {};
52
+ return {
53
+ choices: [],
54
+ error: {
55
+ code: response_data.status_code ? String(response_data.status_code) : 'unknown',
56
+ message: response_data.message ?? error?.message ?? 'Unknown error'
57
+ }
58
+ };
59
+ }
60
+ };
61
+ exports.objectLookup = objectLookup;
62
+ const action = {
63
+ title: 'Assert Record',
64
+ description: 'Create or update a Record in Attio.',
65
+ fields: {
66
+ object,
67
+ matching_attribute,
68
+ attributes
69
+ },
70
+ dynamicFields: {
71
+ object: exports.objectLookup
72
+ },
73
+ perform: async (request, data) => {
74
+ const { payload: { attributes, object, matching_attribute } } = data;
75
+ const client = new api_1.AttioClient(request);
76
+ return await client.assertRecord({
77
+ object,
78
+ matching_attribute,
79
+ values: attributes ?? {}
80
+ });
81
+ }
82
+ };
83
+ exports.default = action;
84
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/attio/assertRecord/index.ts"],"names":[],"mappings":";;;AAIA,gCAAoC;AAEpC,MAAM,MAAM,GAAe;IACzB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,oEAAoE;IACjF,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,QAAQ;CAClB,CAAA;A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AI,eAAe;aAChF;SACF,CAAA;KACF;AACH,CAAC,CAAA;AArBY,QAAA,YAAY,gBAqBxB;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,qCAAqC;IAElD,MAAM,EAAE;QACN,MAAM;QACN,kBAAkB;QAClB,UAAU;KACX;IAED,aAAa,EAAE;QACb,MAAM,EAAE,oBAAY;KACrB;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC/B,MAAM,EACJ,OAAO,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,EACpD,GAAG,IAAI,CAAA;QAER,MAAM,MAAM,GAAG,IAAI,iBAAW,CAAC,OAAO,CAAC,CAAA;QAEvC,OAAO,MAAM,MAAM,CAAC,YAAY,CAAC;YAC/B,MAAM;YACN,kBAAkB;YAClB,MAAM,EAAE,UAAU,IAAI,EAAE;SACzB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,2 @@
1
+ export interface Settings {
2
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/attio/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export interface Payload {
2
+ domain: string;
3
+ name: string;
4
+ company_attributes?: {
5
+ [k: string]: unknown;
6
+ };
7
+ workspace_attributes?: {
8
+ [k: string]: unknown;
9
+ };
10
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/attio/groupWorkspace/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const api_1 = require("../api");
4
+ const domain = {
5
+ type: 'string',
6
+ label: 'Domain',
7
+ description: 'The domain of the Company (used to link the Workspace)',
8
+ format: 'text',
9
+ required: true,
10
+ default: {
11
+ '@if': {
12
+ exists: { '@path': '$.traits.website' },
13
+ then: { '@path': '$.traits.website' },
14
+ else: { '@path': '$.website' }
15
+ }
16
+ }
17
+ };
18
+ const name = {
19
+ type: 'string',
20
+ label: 'Name',
21
+ description: 'The name of the Workspace',
22
+ format: 'text',
23
+ required: true,
24
+ default: {
25
+ '@if': {
26
+ exists: { '@path': '$.traits.name' },
27
+ then: { '@path': '$.traits.name' },
28
+ else: { '@path': '$.name' }
29
+ }
30
+ }
31
+ };
32
+ const company_attributes = {
33
+ type: 'object',
34
+ label: 'Additional Company attributes',
35
+ description: 'Additional attributes to either set or update on the Attio Company Record. The keys on the left should be ' +
36
+ 'Attio Attribute IDs or Slugs, and the values on the right are Segment attributes or custom text.',
37
+ defaultObjectUI: 'keyvalue:only',
38
+ default: {}
39
+ };
40
+ const workspace_attributes = {
41
+ type: 'object',
42
+ label: 'Additional Workspace attributes',
43
+ description: 'Additional attributes to either set or update on the Attio Workspace Record. The keys on the left should be ' +
44
+ 'Attio Attribute IDs or Slugs, and the values on the right are Segment attributes or custom text.',
45
+ defaultObjectUI: 'keyvalue:only',
46
+ default: {
47
+ '@path': '$.properties'
48
+ }
49
+ };
50
+ const action = {
51
+ title: 'Group Workspace',
52
+ description: 'Create or update an Attio Workspace and link it to a Company based on a domain attribute.',
53
+ fields: {
54
+ domain,
55
+ name,
56
+ company_attributes,
57
+ workspace_attributes
58
+ },
59
+ perform: async (request, data) => {
60
+ const { payload: { domain, name, workspace_attributes, company_attributes } } = data;
61
+ const client = new api_1.AttioClient(request);
62
+ const company = await client.assertRecord({
63
+ object: 'companies',
64
+ matching_attribute: 'domains',
65
+ values: {
66
+ domains: domain,
67
+ ...(company_attributes ?? {})
68
+ }
69
+ });
70
+ return await client.assertRecord({
71
+ object: 'workspaces',
72
+ matching_attribute: 'name',
73
+ values: {
74
+ name,
75
+ company: company.data.data.id.record_id,
76
+ ...(workspace_attributes ?? {})
77
+ }
78
+ });
79
+ }
80
+ };
81
+ exports.default = action;
82
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/attio/groupWorkspace/index.ts"],"names":[],"mappings":";;AAIA,gCAAoC;AAEpC,MAAM,MAAM,GAAe;IACzB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,wDAAwD;IACrE,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE;QACP,KAAK,EAAE;YACL,MAAM,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE;YACvC,IAAI,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE;YACrC,IAAI,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;SAC/B;KACF;CACF,CAAA;AAED,MAAM,IAAI,GAAe;IACvB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,2BAA2B;IACxC,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE;QACP,KAAK,EAAE;YACL,MAAM,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;YACpC,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;YAClC,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;SAC5B;KACF;CACF,CAAA;AAED,MAAM,kBAAkB,GAAe;IACrC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,+BAA+B;IACtC,WAAW,EACT,4GAA4G;QAC5G,kGAAkG;IACpG,eAAe,EAAE,eAAe;IAChC,OAAO,EAAE,EAAE;CACZ,CAAA;AAED,MAAM,oBAAoB,GAAe;IACvC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,iCAAiC;IACxC,WAAW,EACT,8GAA8G;QAC9G,kGAAkG;IACpG,eAAe,EAAE,eAAe;IAChC,OAAO,EAAE;QACP,OAAO,EAAE,cAAc;KACxB;CACF,CAAA;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,2FAA2F;IAExG,MAAM,EAAE;QACN,MAAM;QACN,IAAI;QACJ,kBAAkB;QAClB,oBAAoB;KACrB;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC/B,MAAM,EACJ,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,EACpE,GAAG,IAAI,CAAA;QAER,MAAM,MAAM,GAAG,IAAI,iBAAW,CAAC,OAAO,CAAC,CAAA;QAEvC,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC;YACxC,MAAM,EAAE,WAAW;YACnB,kBAAkB,EAAE,SAAS;YAC7B,MAAM,EAAE;gBACN,OAAO,EAAE,MAAM;gBACf,GAAG,CAAC,kBAAkB,IAAI,EAAE,CAAC;aAC9B;SACF,CAAC,CAAA;QAEF,OAAO,MAAM,MAAM,CAAC,YAAY,CAAC;YAC/B,MAAM,EAAE,YAAY;YACpB,kBAAkB,EAAE,MAAM;YAC1B,MAAM,EAAE;gBACN,IAAI;gBACJ,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS;gBACvC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC;aAChC;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,10 @@
1
+ export interface Payload {
2
+ email_address: string;
3
+ user_attributes?: {
4
+ name?: string;
5
+ [k: string]: unknown;
6
+ };
7
+ person_attributes?: {
8
+ [k: string]: unknown;
9
+ };
10
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/attio/identifyUser/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const api_1 = require("../api");
4
+ const email_address = {
5
+ type: 'string',
6
+ label: 'Email address',
7
+ description: 'The email address of the person to link the user to',
8
+ format: 'email',
9
+ required: true,
10
+ default: {
11
+ '@if': {
12
+ exists: { '@path': '$.traits.email' },
13
+ then: { '@path': '$.traits.email' },
14
+ else: { '@path': '$.email' }
15
+ }
16
+ }
17
+ };
18
+ const user_attributes = {
19
+ type: 'object',
20
+ label: 'Additional User attributes',
21
+ description: 'Additional attributes to either set or update on the Attio User Record. The keys on the left should be ' +
22
+ 'Attio Attribute IDs or Slugs, and the values on the right are Segment attributes or custom text.',
23
+ defaultObjectUI: 'keyvalue:only',
24
+ additionalProperties: true,
25
+ properties: {
26
+ name: {
27
+ label: 'Name',
28
+ type: 'string'
29
+ }
30
+ },
31
+ default: {
32
+ name: { '@path': '$.traits.name' }
33
+ }
34
+ };
35
+ const person_attributes = {
36
+ type: 'object',
37
+ label: 'Additional Person attributes',
38
+ description: 'Additional attributes to either set or update on the Attio Person Record. The keys on the left should be ' +
39
+ 'Attio Attribute IDs or Slugs, and the values on the right are Segment attributes or custom text.',
40
+ defaultObjectUI: 'keyvalue:only',
41
+ default: {}
42
+ };
43
+ const action = {
44
+ title: 'Identify User',
45
+ description: 'Create or update an Attio User and link it to a Person based on a shared email address.',
46
+ fields: {
47
+ email_address,
48
+ user_attributes,
49
+ person_attributes
50
+ },
51
+ perform: async (request, data) => {
52
+ const { payload: { email_address, user_attributes, person_attributes } } = data;
53
+ const client = new api_1.AttioClient(request);
54
+ await client.assertRecord({
55
+ object: 'people',
56
+ matching_attribute: 'email_addresses',
57
+ values: {
58
+ email_addresses: email_address,
59
+ ...(person_attributes ?? {})
60
+ }
61
+ });
62
+ return await client.assertRecord({
63
+ object: 'users',
64
+ matching_attribute: 'primary_email_address',
65
+ values: {
66
+ primary_email_address: email_address,
67
+ person: email_address,
68
+ ...(user_attributes ?? {})
69
+ }
70
+ });
71
+ }
72
+ };
73
+ exports.default = action;
74
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/attio/identifyUser/index.ts"],"names":[],"mappings":";;AAIA,gCAAoC;AAEpC,MAAM,aAAa,GAAe;IAChC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,qDAAqD;IAClE,MAAM,EAAE,OAAO;IACf,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE;QACP,KAAK,EAAE;YACL,MAAM,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;YACrC,IAAI,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;YACnC,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SAC7B;KACF;CACF,CAAA;AAED,MAAM,eAAe,GAAe;IAClC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,yGAAyG;QACzG,kGAAkG;IACpG,eAAe,EAAE,eAAe;IAChC,oBAAoB,EAAE,IAAI;IAC1B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,QAAQ;SACf;KACF;IACD,OAAO,EAAE;QACP,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;KACnC;CACF,CAAA;AAED,MAAM,iBAAiB,GAAe;IACpC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,8BAA8B;IACrC,WAAW,EACT,2GAA2G;QAC3G,kGAAkG;IACpG,eAAe,EAAE,eAAe;IAChC,OAAO,EAAE,EAAE;CACZ,CAAA;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,yFAAyF;IAEtG,MAAM,EAAE;QACN,aAAa;QACb,eAAe;QACf,iBAAiB;KAClB;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC/B,MAAM,EACJ,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,EAC/D,GAAG,IAAI,CAAA;QAER,MAAM,MAAM,GAAG,IAAI,iBAAW,CAAC,OAAO,CAAC,CAAA;QAEvC,MAAM,MAAM,CAAC,YAAY,CAAC;YACxB,MAAM,EAAE,QAAQ;YAChB,kBAAkB,EAAE,iBAAiB;YACrC,MAAM,EAAE;gBACN,eAAe,EAAE,aAAa;gBAC9B,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC;aAC7B;SACF,CAAC,CAAA;QAEF,OAAO,MAAM,MAAM,CAAC,YAAY,CAAC;YAC/B,MAAM,EAAE,OAAO;YACf,kBAAkB,EAAE,uBAAuB;YAC3C,MAAM,EAAE;gBACN,qBAAqB,EAAE,aAAa;gBACpC,MAAM,EAAE,aAAa;gBACrB,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;aAC3B;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { DestinationDefinition } from '@segment/actions-core';
2
+ import type { Settings } from './generated-types';
3
+ declare const destination: DestinationDefinition<Settings>;
4
+ export default destination;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const actions_core_1 = require("@segment/actions-core");
7
+ const identifyUser_1 = __importDefault(require("./identifyUser"));
8
+ const groupWorkspace_1 = __importDefault(require("./groupWorkspace"));
9
+ const assertRecord_1 = __importDefault(require("./assertRecord"));
10
+ const destination = {
11
+ name: 'Attio (Actions)',
12
+ description: 'The Attio destination allows you to assert Records in your Attio workspace based on Segment events',
13
+ slug: 'actions-attio',
14
+ mode: 'cloud',
15
+ authentication: {
16
+ scheme: 'oauth-managed',
17
+ fields: {},
18
+ testAuthentication: (request) => request('https://api.attio.com/v1/token')
19
+ },
20
+ extendRequest({ auth }) {
21
+ return {
22
+ headers: {
23
+ authorization: `Bearer ${auth?.accessToken}`
24
+ }
25
+ };
26
+ },
27
+ actions: {
28
+ identifyUser: identifyUser_1.default,
29
+ groupWorkspace: groupWorkspace_1.default,
30
+ assertRecord: assertRecord_1.default
31
+ },
32
+ presets: [
33
+ {
34
+ name: 'Identify User',
35
+ subscribe: 'type = "identify"',
36
+ partnerAction: 'identifyUser',
37
+ mapping: actions_core_1.defaultValues(identifyUser_1.default.fields)
38
+ },
39
+ {
40
+ name: 'Group Workspace',
41
+ subscribe: 'type = "group"',
42
+ partnerAction: 'groupWorkspace',
43
+ mapping: actions_core_1.defaultValues(groupWorkspace_1.default.fields)
44
+ }
45
+ ]
46
+ };
47
+ exports.default = destination;
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/attio/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,kEAAyC;AACzC,sEAA6C;AAC7C,kEAAyC;AAEzC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,oGAAoG;IACjH,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE,EAAE;QACV,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,gCAAgC,CAAC;KAC3E;IAED,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;SACF,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP,YAAY,EAAZ,sBAAY;QACZ,cAAc,EAAd,wBAAc;QACd,YAAY,EAAZ,sBAAY;KACb;IAED,OAAO,EAAE;QACP;YACE,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,mBAAmB;YAC9B,aAAa,EAAE,cAAc;YAC7B,OAAO,EAAE,4BAAa,CAAC,sBAAY,CAAC,MAAM,CAAC;SAC5C;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,gBAAgB;YAC/B,OAAO,EAAE,4BAAa,CAAC,wBAAc,CAAC,MAAM,CAAC;SAC9C;KACF;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
3
+ //# sourceMappingURL=Profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/Profile.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { DestinationDefinition } from '@segment/actions-core';
2
+ import type { Settings } from './generated-types';
3
+ export declare const destinationDefinition: DestinationDefinition<Settings>;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.destinationDefinition = void 0;
4
+ const sendEmail_1 = require("./sendEmail");
5
+ const previewApiLookup_1 = require("./previewApiLookup");
6
+ exports.destinationDefinition = {
7
+ name: 'Engage Messaging SendGrid',
8
+ slug: 'actions-personas-messaging-sendgrid',
9
+ mode: 'cloud',
10
+ description: 'This is an Engage specific action to send an email',
11
+ authentication: {
12
+ scheme: 'custom',
13
+ fields: {
14
+ unlayerApiKey: {
15
+ label: 'Unlayer API Key',
16
+ type: 'password',
17
+ description: 'The API key for your Unlayer account'
18
+ },
19
+ sendGridApiKey: {
20
+ label: 'API Key',
21
+ type: 'password',
22
+ description: 'The Api Key for your SendGrid account',
23
+ required: true
24
+ },
25
+ profileApiEnvironment: {
26
+ label: 'Profile API Environment',
27
+ description: 'Profile API Environment',
28
+ type: 'string',
29
+ required: true
30
+ },
31
+ profileApiAccessToken: {
32
+ label: 'Profile API Access Token',
33
+ description: 'Profile API Access Token',
34
+ type: 'password',
35
+ required: true
36
+ },
37
+ spaceId: {
38
+ label: 'Space ID',
39
+ description: 'Space ID',
40
+ type: 'string',
41
+ required: true
42
+ },
43
+ sourceId: {
44
+ label: 'Source ID',
45
+ description: 'Source ID',
46
+ type: 'string',
47
+ required: true
48
+ },
49
+ region: {
50
+ label: 'Region',
51
+ description: 'The region where the email is originating from',
52
+ type: 'string',
53
+ choices: [
54
+ { value: 'us-west-2', label: 'US West 2' },
55
+ { value: 'eu-west-1', label: 'EU West 1' }
56
+ ],
57
+ default: 'us-west-2',
58
+ required: false
59
+ }
60
+ },
61
+ testAuthentication: (request) => {
62
+ return request('https://api.sendgrid.com/v3/mail_settings');
63
+ }
64
+ },
65
+ actions: {
66
+ sendEmail: sendEmail_1.actionDefinition,
67
+ previewApiLookup: previewApiLookup_1.actionDefinition
68
+ }
69
+ };
70
+ //# sourceMappingURL=destinationDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"destinationDefinition.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/destinationDefinition.ts"],"names":[],"mappings":";;;AAEA,2CAA2D;AAC3D,yDAAyE;AAE5D,QAAA,qBAAqB,GAAoC;IACpE,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,qCAAqC;IAC3C,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,oDAAoD;IACjE,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,aAAa,EAAE;gBACb,KAAK,EAAE,iBAAiB;gBACxB,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,sCAAsC;aACpD;YACD,cAAc,EAAE;gBACd,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,uCAAuC;gBACpD,QAAQ,EAAE,IAAI;aACf;YACD,qBAAqB,EAAE;gBACrB,KAAK,EAAE,yBAAyB;gBAChC,WAAW,EAAE,yBAAyB;gBACtC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,qBAAqB,EAAE;gBACrB,KAAK,EAAE,0BAA0B;gBACjC,WAAW,EAAE,0BAA0B;gBACvC,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,gDAAgD;gBAC7D,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;oBAC1C,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;iBAC3C;gBACD,OAAO,EAAE,WAAW;gBACpB,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,OAAO,CAAC,2CAA2C,CAAC,CAAA;QAC7D,CAAC;KACF;IACD,OAAO,EAAE;QACP,SAAS,EAAT,4BAAS;QACT,gBAAgB,EAAhB,mCAAgB;KACjB;CACF,CAAA"}
@@ -0,0 +1 @@
1
+ export * from '../../engage-messaging-sendgrid/generated-types';
@@ -0,0 +1,14 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("../../engage-messaging-sendgrid/generated-types"), exports);
14
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/generated-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kFAA+D"}
@@ -0,0 +1,2 @@
1
+ import { destinationDefinition } from './destinationDefinition';
2
+ export default destinationDefinition;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const destinationDefinition_1 = require("./destinationDefinition");
4
+ exports.default = destinationDefinition_1.destinationDefinition;
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/index.ts"],"names":[],"mappings":";;AAAA,mEAA+D;AAC/D,kBAAe,6CAAqB,CAAA"}
@@ -1,5 +1,4 @@
1
1
  import { ActionDefinition } from '@segment/actions-core';
2
2
  import { Settings } from '../generated-types';
3
3
  import { Payload } from './generated-types';
4
- declare const action: ActionDefinition<Settings, Payload>;
5
- export default action;
4
+ export declare const actionDefinition: ActionDefinition<Settings, Payload>;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const api_lookups_1 = require("../utils/api-lookups");
4
- const action = {
3
+ exports.actionDefinition = void 0;
4
+ const api_lookups_1 = require("./api-lookups");
5
+ exports.actionDefinition = {
5
6
  title: 'Perform a single API lookup',
6
7
  description: 'Perform a single API lookup and return the response',
7
8
  fields: {
@@ -24,5 +25,4 @@ const action = {
24
25
  };
25
26
  }
26
27
  };
27
- exports.default = action;
28
- //# sourceMappingURL=index.js.map
28
+ //# sourceMappingURL=actionDefinition.js.map