@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.
- package/dist/destinations/app-fit/index.js +2 -2
- package/dist/destinations/app-fit/index.js.map +1 -1
- package/dist/destinations/app-fit/track/index.js +1 -1
- package/dist/destinations/app-fit/track/index.js.map +1 -1
- package/dist/destinations/attio/api/index.d.ts +30 -0
- package/dist/destinations/attio/api/index.js +28 -0
- package/dist/destinations/attio/api/index.js.map +1 -0
- package/dist/destinations/attio/assertRecord/generated-types.d.ts +8 -0
- package/dist/destinations/attio/assertRecord/generated-types.js.map +1 -0
- package/dist/destinations/attio/assertRecord/index.d.ts +6 -0
- package/dist/destinations/attio/assertRecord/index.js +84 -0
- package/dist/destinations/attio/assertRecord/index.js.map +1 -0
- package/dist/destinations/attio/generated-types.d.ts +2 -0
- package/dist/destinations/attio/generated-types.js.map +1 -0
- package/dist/destinations/attio/groupWorkspace/generated-types.d.ts +10 -0
- package/dist/destinations/attio/groupWorkspace/generated-types.js.map +1 -0
- package/dist/destinations/attio/groupWorkspace/index.js +82 -0
- package/dist/destinations/attio/groupWorkspace/index.js.map +1 -0
- package/dist/destinations/attio/identifyUser/generated-types.d.ts +10 -0
- package/dist/destinations/attio/identifyUser/generated-types.js.map +1 -0
- package/dist/destinations/attio/identifyUser/index.js +74 -0
- package/dist/destinations/attio/identifyUser/index.js.map +1 -0
- package/dist/destinations/attio/index.d.ts +4 -0
- package/dist/destinations/attio/index.js +48 -0
- package/dist/destinations/attio/index.js.map +1 -0
- package/dist/destinations/{engage-messaging-twilio/utils/types.js → engage/sendgrid/Profile.js} +1 -1
- package/dist/destinations/engage/sendgrid/Profile.js.map +1 -0
- package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +3 -0
- package/dist/destinations/engage/sendgrid/destinationDefinition.js +70 -0
- package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +1 -0
- package/dist/destinations/engage/sendgrid/generated-types.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/generated-types.js +14 -0
- package/dist/destinations/engage/sendgrid/generated-types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/index.d.ts +2 -0
- package/dist/destinations/engage/sendgrid/index.js +5 -0
- package/dist/destinations/engage/sendgrid/index.js.map +1 -0
- package/dist/destinations/{engage-messaging-sendgrid/previewApiLookup/index.d.ts → engage/sendgrid/previewApiLookup/actionDefinition.d.ts} +1 -2
- package/dist/destinations/{engage-messaging-sendgrid/previewApiLookup/index.js → engage/sendgrid/previewApiLookup/actionDefinition.js} +4 -4
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +1 -0
- package/dist/destinations/{engage-messaging-sendgrid/utils → engage/sendgrid/previewApiLookup}/api-lookups.d.ts +2 -4
- package/dist/destinations/{engage-messaging-sendgrid/utils → engage/sendgrid/previewApiLookup}/api-lookups.js +1 -15
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +14 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +2 -0
- package/dist/destinations/{engage-messaging-twilio/utils → engage/sendgrid/previewApiLookup}/index.js +2 -6
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +42 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +318 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +12 -0
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +3 -0
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +236 -0
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +14 -0
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/index.js +14 -0
- package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +23 -0
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +14 -0
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +1 -0
- package/dist/destinations/engage/twilio/destinationDefinition.d.ts +3 -0
- package/dist/destinations/engage/twilio/destinationDefinition.js +172 -0
- package/dist/destinations/engage/twilio/destinationDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/index.d.ts +2 -0
- package/dist/destinations/engage/twilio/index.js +5 -0
- package/dist/destinations/engage/twilio/index.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +27 -0
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +142 -0
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +4 -0
- package/dist/destinations/{engage-messaging-twilio/sendMobilePush/index.js → engage/twilio/sendMobilePush/actionDefinition.js} +5 -5
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/index.js +14 -0
- package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +9 -0
- package/dist/destinations/{engage-messaging-twilio/sendSms/sms-sender.js → engage/twilio/sendSms/SmsMessageSender.js} +5 -32
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +4 -0
- package/dist/destinations/{engage-messaging-twilio/sendSms/index.js → engage/twilio/sendSms/actionDefinition.js} +5 -5
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendSms/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/index.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendSms/index.js +14 -0
- package/dist/destinations/engage/twilio/sendSms/index.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +8 -0
- package/dist/destinations/{engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js → engage/twilio/sendWhatsApp/WhatsAppMessageSender.js} +8 -4
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +4 -0
- package/dist/destinations/{engage-messaging-twilio/sendWhatsApp/index.js → engage/twilio/sendWhatsApp/actionDefinition.js} +5 -5
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js +14 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +16 -0
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +57 -0
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +16 -0
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +109 -0
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/index.d.ts +2 -0
- package/dist/destinations/engage/twilio/utils/index.js +15 -0
- package/dist/destinations/engage/twilio/utils/index.js.map +1 -0
- package/dist/destinations/{engage-messaging-twilio → engage/twilio}/utils/types.d.ts +0 -16
- package/dist/destinations/engage/twilio/utils/types.js.map +1 -0
- package/dist/destinations/engage/utils/AggregateError.d.ts +14 -0
- package/dist/destinations/engage/utils/AggregateError.js +26 -0
- package/dist/destinations/engage/utils/AggregateError.js.map +1 -0
- package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +41 -0
- package/dist/destinations/engage/utils/EngageActionPerformer.js +135 -0
- package/dist/destinations/engage/utils/EngageActionPerformer.js.map +1 -0
- package/dist/destinations/{engage-messaging-twilio/utils/MessageLogger.d.ts → engage/utils/EngageLogger.d.ts} +8 -5
- package/dist/destinations/engage/utils/EngageLogger.js +52 -0
- package/dist/destinations/engage/utils/EngageLogger.js.map +1 -0
- package/dist/destinations/engage/utils/EngageStats.d.ts +18 -0
- package/dist/destinations/{engage-messaging-twilio/utils/MessageStats.js → engage/utils/EngageStats.js} +28 -14
- package/dist/destinations/engage/utils/EngageStats.js.map +1 -0
- package/dist/destinations/{engage-messaging-twilio → engage}/utils/IntegrationErrorWrapper.d.ts +2 -2
- package/dist/destinations/{engage-messaging-twilio → engage}/utils/IntegrationErrorWrapper.js +1 -1
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +1 -0
- package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +63 -0
- package/dist/destinations/engage/utils/MessageSendPerformer.js +191 -0
- package/dist/destinations/engage/utils/MessageSendPerformer.js.map +1 -0
- package/dist/destinations/engage/utils/ResponseError.d.ts +20 -0
- package/dist/destinations/engage/utils/ResponseError.js +17 -0
- package/dist/destinations/engage/utils/ResponseError.js.map +1 -0
- package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +2 -0
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js +10 -0
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +1 -0
- package/dist/destinations/engage/utils/index.d.ts +9 -0
- package/dist/destinations/engage/utils/index.js +22 -0
- package/dist/destinations/engage/utils/index.js.map +1 -0
- package/dist/destinations/engage/utils/isDestinationActionService.js.map +1 -0
- package/dist/destinations/engage/utils/isRetryableError.d.ts +2 -0
- package/dist/destinations/engage/utils/isRetryableError.js +33 -0
- package/dist/destinations/engage/utils/isRetryableError.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +1 -0
- package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationFinallyHooks.d.ts +4 -0
- package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationFinallyHooks.js +2 -0
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +1 -0
- package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationLogger.d.ts +2 -1
- package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationLogger.js +22 -25
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/index.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +1 -0
- package/dist/destinations/engage/utils/testUtils.d.ts +6 -0
- package/dist/destinations/engage/utils/testUtils.js +26 -0
- package/dist/destinations/engage/utils/testUtils.js.map +1 -0
- package/dist/destinations/engage/utils/track.d.ts +52 -0
- package/dist/destinations/engage/utils/track.js +9 -0
- package/dist/destinations/engage/utils/track.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/index.d.ts +2 -3
- package/dist/destinations/engage-messaging-sendgrid/index.js +13 -67
- package/dist/destinations/engage-messaging-sendgrid/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +3 -0
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +3 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/index.d.ts +2 -3
- package/dist/destinations/engage-messaging-twilio/index.js +13 -169
- package/dist/destinations/engage-messaging-twilio/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +1 -0
- package/dist/destinations/hilo/generated-types.d.ts +3 -0
- package/dist/destinations/hilo/generated-types.js.map +1 -0
- package/dist/destinations/hilo/group/generated-types.d.ts +9 -0
- package/dist/destinations/hilo/group/generated-types.js +3 -0
- package/dist/destinations/hilo/group/generated-types.js.map +1 -0
- package/dist/destinations/{engage-messaging-sendgrid/sendEmail → hilo/group}/index.d.ts +1 -1
- package/dist/destinations/hilo/group/index.js +59 -0
- package/dist/destinations/hilo/group/index.js.map +1 -0
- package/dist/destinations/hilo/identify/generated-types.d.ts +8 -0
- package/dist/destinations/hilo/identify/generated-types.js +3 -0
- package/dist/destinations/hilo/identify/generated-types.js.map +1 -0
- package/dist/destinations/{engage-messaging-twilio/sendMobilePush → hilo/identify}/index.d.ts +1 -1
- package/dist/destinations/hilo/identify/index.js +51 -0
- package/dist/destinations/hilo/identify/index.js.map +1 -0
- package/dist/destinations/hilo/index.d.ts +4 -0
- package/dist/destinations/hilo/index.js +103 -0
- package/dist/destinations/hilo/index.js.map +1 -0
- package/dist/destinations/hilo/page/generated-types.d.ts +9 -0
- package/dist/destinations/hilo/page/generated-types.js +3 -0
- package/dist/destinations/hilo/page/generated-types.js.map +1 -0
- package/dist/destinations/hilo/page/index.d.ts +5 -0
- package/dist/destinations/hilo/page/index.js +59 -0
- package/dist/destinations/hilo/page/index.js.map +1 -0
- package/dist/destinations/hilo/screen/generated-types.d.ts +9 -0
- package/dist/destinations/hilo/screen/generated-types.js +3 -0
- package/dist/destinations/hilo/screen/generated-types.js.map +1 -0
- package/dist/destinations/hilo/screen/index.d.ts +5 -0
- package/dist/destinations/hilo/screen/index.js +59 -0
- package/dist/destinations/hilo/screen/index.js.map +1 -0
- package/dist/destinations/hilo/track/generated-types.d.ts +9 -0
- package/dist/destinations/hilo/track/generated-types.js +3 -0
- package/dist/destinations/hilo/track/generated-types.js.map +1 -0
- package/dist/destinations/hilo/track/index.d.ts +5 -0
- package/dist/destinations/hilo/track/index.js +59 -0
- package/dist/destinations/hilo/track/index.js.map +1 -0
- package/dist/destinations/hubspot/api/index.d.ts +11 -5
- package/dist/destinations/hubspot/api/index.js +59 -24
- package/dist/destinations/hubspot/api/index.js.map +1 -1
- package/dist/destinations/hubspot/errors.d.ts +2 -0
- package/dist/destinations/hubspot/errors.js +3 -1
- package/dist/destinations/hubspot/errors.js.map +1 -1
- package/dist/destinations/hubspot/upsertCompany/index.js +1 -1
- package/dist/destinations/hubspot/upsertCompany/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertCustomObjectRecord/generated-types.d.ts +5 -0
- package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js +113 -22
- package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js.map +1 -1
- package/dist/destinations/hubspot/utils.d.ts +23 -0
- package/dist/destinations/hubspot/utils.js +7 -1
- package/dist/destinations/hubspot/utils.js.map +1 -1
- package/dist/destinations/index.js +5 -2
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/iterable/generated-types.d.ts +1 -0
- package/dist/destinations/iterable/index.js +20 -1
- package/dist/destinations/iterable/index.js.map +1 -1
- package/dist/destinations/iterable/index.test.d.ts +1 -0
- package/dist/destinations/iterable/index.test.js +46 -0
- package/dist/destinations/iterable/index.test.js.map +1 -0
- package/dist/destinations/iterable/shared-fields.d.ts +1 -0
- package/dist/destinations/iterable/trackEvent/index.js +3 -2
- package/dist/destinations/iterable/trackEvent/index.js.map +1 -1
- package/dist/destinations/iterable/trackPurchase/index.js +3 -2
- package/dist/destinations/iterable/trackPurchase/index.js.map +1 -1
- package/dist/destinations/iterable/updateCart/index.js +3 -2
- package/dist/destinations/iterable/updateCart/index.js.map +1 -1
- package/dist/destinations/iterable/updateUser/index.js +3 -2
- package/dist/destinations/iterable/updateUser/index.js.map +1 -1
- package/dist/destinations/iterable/utils.d.ts +9 -1
- package/dist/destinations/iterable/utils.js +18 -1
- package/dist/destinations/iterable/utils.js.map +1 -1
- package/dist/destinations/pinterest-conversions/reportConversionEvent/index.js +1 -1
- package/dist/destinations/pinterest-conversions/reportConversionEvent/index.js.map +1 -1
- package/dist/destinations/rehook/generated-types.d.ts +4 -0
- package/dist/destinations/rehook/generated-types.js +3 -0
- package/dist/destinations/rehook/generated-types.js.map +1 -0
- package/dist/destinations/rehook/identifyUser/generated-types.d.ts +7 -0
- package/dist/destinations/rehook/identifyUser/generated-types.js +3 -0
- package/dist/destinations/rehook/identifyUser/generated-types.js.map +1 -0
- package/dist/destinations/rehook/identifyUser/index.d.ts +5 -0
- package/dist/destinations/rehook/identifyUser/index.js +44 -0
- package/dist/destinations/rehook/identifyUser/index.js.map +1 -0
- package/dist/destinations/rehook/index.d.ts +4 -0
- package/dist/destinations/rehook/index.js +47 -0
- package/dist/destinations/rehook/index.js.map +1 -0
- package/dist/destinations/rehook/trackEvent/generated-types.d.ts +7 -0
- package/dist/destinations/rehook/trackEvent/generated-types.js +3 -0
- package/dist/destinations/rehook/trackEvent/generated-types.js.map +1 -0
- package/dist/destinations/rehook/trackEvent/index.d.ts +5 -0
- package/dist/destinations/rehook/trackEvent/index.js +48 -0
- package/dist/destinations/rehook/trackEvent/index.js.map +1 -0
- package/dist/destinations/the-trade-desk-crm/functions.js +4 -0
- package/dist/destinations/the-trade-desk-crm/functions.js.map +1 -1
- package/dist/destinations/the-trade-desk-crm/properties.d.ts +1 -0
- package/dist/destinations/the-trade-desk-crm/properties.js +8 -1
- package/dist/destinations/the-trade-desk-crm/properties.js.map +1 -1
- package/dist/destinations/the-trade-desk-crm/syncAudience/generated-types.d.ts +1 -0
- package/dist/destinations/the-trade-desk-crm/syncAudience/index.js +2 -1
- package/dist/destinations/the-trade-desk-crm/syncAudience/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/index.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +0 -578
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/utils/api-lookups.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/utils/types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/operationTracking/GenericMethodDecorator.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/operationTracking/OperationDecorator.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/operationTracking/OperationDuration.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/operationTracking/OperationErrorHandler.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/operationTracking/OperationFinallyHooks.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/operationTracking/OperationLogger.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/operationTracking/OperationStats.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/operationTracking/OperationTracker.test.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/operationTracking/OperationTree.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/operationTracking/TrackedError.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/operationTracking/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/operationTracking/wrapTryCatchFinallyPromisable.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/push-sender.d.ts +0 -17
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/push-sender.js +0 -182
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/push-sender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.d.ts +0 -9
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.d.ts +0 -7
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/IntegrationErrorWrapper.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/MessageLogger.js +0 -36
- package/dist/destinations/engage-messaging-twilio/utils/MessageLogger.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/MessageStats.d.ts +0 -14
- package/dist/destinations/engage-messaging-twilio/utils/MessageStats.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/index.d.ts +0 -6
- package/dist/destinations/engage-messaging-twilio/utils/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/isDestinationActionService.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.d.ts +0 -43
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js +0 -203
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/phone-message.d.ts +0 -19
- package/dist/destinations/engage-messaging-twilio/utils/phone-message.js +0 -97
- package/dist/destinations/engage-messaging-twilio/utils/phone-message.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/track.d.ts +0 -45
- package/dist/destinations/engage-messaging-twilio/utils/track.js +0 -9
- package/dist/destinations/engage-messaging-twilio/utils/track.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/types.js.map +0 -1
- /package/dist/destinations/{engage-messaging-sendgrid/previewApiLookup → attio/assertRecord}/generated-types.js +0 -0
- /package/dist/destinations/{engage-messaging-sendgrid/sendEmail → attio}/generated-types.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio/sendMobilePush → attio/groupWorkspace}/generated-types.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio/sendSms → attio/groupWorkspace}/index.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-twilio/sendSms → attio/identifyUser}/generated-types.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio/sendWhatsApp → attio/identifyUser}/index.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-sendgrid/utils/types.d.ts → engage/sendgrid/Profile.d.ts} +0 -0
- /package/dist/destinations/{engage-messaging-sendgrid → engage/twilio}/utils/types.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage}/utils/isDestinationActionService.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage}/utils/isDestinationActionService.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/GenericMethodDecorator.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/GenericMethodDecorator.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationDecorator.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationDecorator.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationDuration.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationDuration.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationErrorHandler.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationErrorHandler.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationStats.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationStats.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationTracker.test.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationTracker.test.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationTree.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/OperationTree.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/TrackedError.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/TrackedError.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/index.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/index.js +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/wrapTryCatchFinallyPromisable.d.ts +0 -0
- /package/dist/destinations/{engage-messaging-twilio → engage/utils}/operationTracking/wrapTryCatchFinallyPromisable.js +0 -0
- /package/dist/destinations/engage-messaging-sendgrid/{previewApiLookup/generated-types.d.ts → previewApiLookup.types.d.ts} +0 -0
- /package/dist/destinations/engage-messaging-sendgrid/{sendEmail/generated-types.d.ts → sendEmail.types.d.ts} +0 -0
- /package/dist/destinations/engage-messaging-twilio/{sendMobilePush/generated-types.d.ts → sendMobilePush.types.d.ts} +0 -0
- /package/dist/destinations/engage-messaging-twilio/{sendSms/generated-types.d.ts → sendSms.types.d.ts} +0 -0
- /package/dist/destinations/engage-messaging-twilio/{sendWhatsApp/generated-types.d.ts → sendWhatsApp.types.d.ts} +0 -0
- /package/dist/destinations/{engage-messaging-twilio/sendWhatsApp → hilo}/generated-types.js +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Identify',
|
|
5
|
+
description: 'Create or update a contact in Hilo',
|
|
6
|
+
defaultSubscription: 'type = "identify"',
|
|
7
|
+
fields: {
|
|
8
|
+
anonymousId: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
description: 'An anonymous identifier',
|
|
11
|
+
label: 'Anonymous ID',
|
|
12
|
+
default: { '@path': '$.anonymousId' }
|
|
13
|
+
},
|
|
14
|
+
traits: {
|
|
15
|
+
type: 'object',
|
|
16
|
+
label: 'Traits',
|
|
17
|
+
description: 'Traits to associate with the user',
|
|
18
|
+
required: false,
|
|
19
|
+
default: { '@path': '$.traits' }
|
|
20
|
+
},
|
|
21
|
+
timestamp: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
format: 'date-time',
|
|
24
|
+
required: true,
|
|
25
|
+
description: 'The timestamp of the event',
|
|
26
|
+
label: 'Timestamp',
|
|
27
|
+
default: { '@path': '$.timestamp' }
|
|
28
|
+
},
|
|
29
|
+
userId: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'The ID associated with the user',
|
|
32
|
+
label: 'User ID',
|
|
33
|
+
default: { '@path': '$.userId' }
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
perform: (request, { payload }) => {
|
|
37
|
+
return request('https://api.hilohq.com/v1/events/identify', {
|
|
38
|
+
method: 'post',
|
|
39
|
+
json: {
|
|
40
|
+
event: {
|
|
41
|
+
anonymous_id: payload.anonymousId,
|
|
42
|
+
contact_id: payload.userId,
|
|
43
|
+
timestamp: payload.timestamp,
|
|
44
|
+
properties: payload.traits
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.default = action;
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/hilo/identify/index.ts"],"names":[],"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
|
+
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 identify_1 = __importDefault(require("./identify"));
|
|
8
|
+
const group_1 = __importDefault(require("./group"));
|
|
9
|
+
const track_1 = __importDefault(require("./track"));
|
|
10
|
+
const page_1 = __importDefault(require("./page"));
|
|
11
|
+
const screen_1 = __importDefault(require("./screen"));
|
|
12
|
+
const destination = {
|
|
13
|
+
name: 'Hilo',
|
|
14
|
+
slug: 'actions-hilo',
|
|
15
|
+
mode: 'cloud',
|
|
16
|
+
authentication: {
|
|
17
|
+
scheme: 'oauth-managed',
|
|
18
|
+
fields: {
|
|
19
|
+
integrationId: {
|
|
20
|
+
description: 'Hilo integration ID. This can be found on the integration page.',
|
|
21
|
+
label: 'Integration ID',
|
|
22
|
+
type: 'string',
|
|
23
|
+
required: true
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
testAuthentication: (request) => {
|
|
27
|
+
return request('https://api.hilohq.com/oauth/token/info');
|
|
28
|
+
},
|
|
29
|
+
refreshAccessToken: async (request, { auth }) => {
|
|
30
|
+
const res = await request('https://api.hilohq.com/oauth/token', {
|
|
31
|
+
method: 'POST',
|
|
32
|
+
body: new URLSearchParams({
|
|
33
|
+
refresh_token: auth.refreshToken,
|
|
34
|
+
client_id: auth.clientId,
|
|
35
|
+
client_secret: auth.clientSecret,
|
|
36
|
+
grant_type: 'refresh_token'
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
return { accessToken: res.data?.access_token };
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
extendRequest({ auth, settings }) {
|
|
43
|
+
return {
|
|
44
|
+
headers: {
|
|
45
|
+
authorization: `Bearer ${auth?.accessToken}`
|
|
46
|
+
},
|
|
47
|
+
searchParams: {
|
|
48
|
+
integration_id: settings?.integrationId
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
onDelete: async (request, { payload }) => {
|
|
53
|
+
return request(`https://api.hilohq.com/v1/events/delete`, {
|
|
54
|
+
method: 'POST',
|
|
55
|
+
json: {
|
|
56
|
+
event: {
|
|
57
|
+
contact_id: payload.userId
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
actions: {
|
|
63
|
+
identify: identify_1.default,
|
|
64
|
+
group: group_1.default,
|
|
65
|
+
track: track_1.default,
|
|
66
|
+
page: page_1.default,
|
|
67
|
+
screen: screen_1.default
|
|
68
|
+
},
|
|
69
|
+
presets: [
|
|
70
|
+
{
|
|
71
|
+
name: 'Track Calls',
|
|
72
|
+
subscribe: 'type = "track"',
|
|
73
|
+
partnerAction: 'track',
|
|
74
|
+
mapping: actions_core_1.defaultValues(track_1.default.fields)
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'Page Calls',
|
|
78
|
+
subscribe: 'type = "page"',
|
|
79
|
+
partnerAction: 'page',
|
|
80
|
+
mapping: actions_core_1.defaultValues(page_1.default.fields)
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Screen Calls',
|
|
84
|
+
subscribe: 'type = "screen"',
|
|
85
|
+
partnerAction: 'screen',
|
|
86
|
+
mapping: actions_core_1.defaultValues(screen_1.default.fields)
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'Identify Calls',
|
|
90
|
+
subscribe: 'type = "identify"',
|
|
91
|
+
partnerAction: 'identify',
|
|
92
|
+
mapping: actions_core_1.defaultValues(identify_1.default.fields)
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'Group Calls',
|
|
96
|
+
subscribe: 'type = "group"',
|
|
97
|
+
partnerAction: 'group',
|
|
98
|
+
mapping: actions_core_1.defaultValues(group_1.default.fields)
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
};
|
|
102
|
+
exports.default = destination;
|
|
103
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/hilo/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAAqD;AACrD,0DAAiC;AACjC,oDAA2B;AAC3B,oDAA2B;AAC3B,kDAAyB;AACzB,sDAA6B;AAM7B,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE;YACN,aAAa,EAAE;gBACb,WAAW,EAAE,iEAAiE;gBAC9E,KAAK,EAAE,gBAAgB;gBACvB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAE9B,OAAO,OAAO,CAAC,yCAAyC,CAAC,CAAA;QAC3D,CAAC;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YAE9C,MAAM,GAAG,GAAG,MAAM,OAAO,CAAuB,oCAAoC,EAAE;gBACpF,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,eAAe,CAAC;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,UAAU,EAAE,eAAe;iBAC5B,CAAC;aACH,CAAC,CAAA;YAEF,OAAO,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,YAAY,EAAE,CAAA;QAChD,CAAC;KACF;IAED,aAAa,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC9B,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WA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A;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/hilo/page/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Page',
|
|
5
|
+
description: 'Track page view in Hilo',
|
|
6
|
+
defaultSubscription: 'type = "page"',
|
|
7
|
+
fields: {
|
|
8
|
+
anonymousId: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
description: 'An anonymous identifier',
|
|
11
|
+
label: 'Anonymous ID',
|
|
12
|
+
default: { '@path': '$.anonymousId' }
|
|
13
|
+
},
|
|
14
|
+
name: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
label: 'Name',
|
|
17
|
+
description: 'Page name',
|
|
18
|
+
required: false,
|
|
19
|
+
default: { '@path': '$.name' }
|
|
20
|
+
},
|
|
21
|
+
properties: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
label: 'Properties',
|
|
24
|
+
description: 'Properties to associate with the page view',
|
|
25
|
+
required: false,
|
|
26
|
+
default: { '@path': '$.properties' }
|
|
27
|
+
},
|
|
28
|
+
timestamp: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
format: 'date-time',
|
|
31
|
+
required: true,
|
|
32
|
+
description: 'The timestamp of the page view',
|
|
33
|
+
label: 'Timestamp',
|
|
34
|
+
default: { '@path': '$.timestamp' }
|
|
35
|
+
},
|
|
36
|
+
userId: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'The ID associated with the user',
|
|
39
|
+
label: 'User ID',
|
|
40
|
+
default: { '@path': '$.userId' }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
perform: (request, { payload }) => {
|
|
44
|
+
return request('https://api.hilohq.com/v1/events/page', {
|
|
45
|
+
method: 'post',
|
|
46
|
+
json: {
|
|
47
|
+
event: {
|
|
48
|
+
anonymous_id: payload.anonymousId,
|
|
49
|
+
contact_id: payload.userId,
|
|
50
|
+
name: payload.name,
|
|
51
|
+
timestamp: payload.timestamp,
|
|
52
|
+
properties: payload.properties
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.default = action;
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/hilo/page/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,yBAAyB;IACtC,mBAAmB,EAAE,eAAe;IACpC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yBAAyB;YACtC,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;SAC/B;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SACrC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,gCAAgC;YAC7C,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iCAAiC;YAC9C,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,OAAO,OAAO,CAAC,uCAAuC,EAAE;YACtD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,KAAK,EAAE;oBACL,YAAY,EAAE,OAAO,CAAC,WAAW;oBACjC,UAAU,EAAE,OAAO,CAAC,MAAM;oBAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;oBAClB,SAAS,EAAE,OAAO,CAAC,SAAS;oBAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;iBAC/B;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/hilo/screen/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Screen',
|
|
5
|
+
description: 'Track mobile screen view in Hilo',
|
|
6
|
+
defaultSubscription: 'type = "screen"',
|
|
7
|
+
fields: {
|
|
8
|
+
anonymousId: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
description: 'An anonymous identifier',
|
|
11
|
+
label: 'Anonymous ID',
|
|
12
|
+
default: { '@path': '$.anonymousId' }
|
|
13
|
+
},
|
|
14
|
+
name: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
label: 'Name',
|
|
17
|
+
description: 'Mobile screen name',
|
|
18
|
+
required: false,
|
|
19
|
+
default: { '@path': '$.name' }
|
|
20
|
+
},
|
|
21
|
+
properties: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
label: 'Properties',
|
|
24
|
+
description: 'Properties to associate with the screen view',
|
|
25
|
+
required: false,
|
|
26
|
+
default: { '@path': '$.properties' }
|
|
27
|
+
},
|
|
28
|
+
timestamp: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
format: 'date-time',
|
|
31
|
+
required: true,
|
|
32
|
+
description: 'The timestamp of the screen view',
|
|
33
|
+
label: 'Timestamp',
|
|
34
|
+
default: { '@path': '$.timestamp' }
|
|
35
|
+
},
|
|
36
|
+
userId: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'The ID associated with the user',
|
|
39
|
+
label: 'User ID',
|
|
40
|
+
default: { '@path': '$.userId' }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
perform: (request, { payload }) => {
|
|
44
|
+
return request('https://api.hilohq.com/v1/events/screen', {
|
|
45
|
+
method: 'post',
|
|
46
|
+
json: {
|
|
47
|
+
event: {
|
|
48
|
+
anonymous_id: payload.anonymousId,
|
|
49
|
+
contact_id: payload.userId,
|
|
50
|
+
name: payload.name,
|
|
51
|
+
timestamp: payload.timestamp,
|
|
52
|
+
properties: payload.properties
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.default = action;
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/hilo/screen/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,kCAAkC;IAC/C,mBAAmB,EAAE,iBAAiB;IACtC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yBAAyB;YACtC,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;SAC/B;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SACrC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,kCAAkC;YAC/C,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iCAAiC;YAC9C,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,OAAO,OAAO,CAAC,yCAAyC,EAAE;YACxD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,KAAK,EAAE;oBACL,YAAY,EAAE,OAAO,CAAC,WAAW;oBACjC,UAAU,EAAE,OAAO,CAAC,MAAM;oBAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;oBAClB,SAAS,EAAE,OAAO,CAAC,SAAS;oBAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;iBAC/B;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/hilo/track/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Track',
|
|
5
|
+
description: 'Track event in Hilo',
|
|
6
|
+
defaultSubscription: 'type = "track"',
|
|
7
|
+
fields: {
|
|
8
|
+
anonymousId: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
description: 'An anonymous identifier',
|
|
11
|
+
label: 'Anonymous ID',
|
|
12
|
+
default: { '@path': '$.anonymousId' }
|
|
13
|
+
},
|
|
14
|
+
event: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
label: 'Name',
|
|
17
|
+
description: 'Event name',
|
|
18
|
+
required: false,
|
|
19
|
+
default: { '@path': '$.event' }
|
|
20
|
+
},
|
|
21
|
+
properties: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
label: 'Properties',
|
|
24
|
+
description: 'Properties to associate with the event',
|
|
25
|
+
required: false,
|
|
26
|
+
default: { '@path': '$.properties' }
|
|
27
|
+
},
|
|
28
|
+
timestamp: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
format: 'date-time',
|
|
31
|
+
required: true,
|
|
32
|
+
description: 'The timestamp of the event',
|
|
33
|
+
label: 'Timestamp',
|
|
34
|
+
default: { '@path': '$.timestamp' }
|
|
35
|
+
},
|
|
36
|
+
userId: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'The ID associated with the user',
|
|
39
|
+
label: 'User ID',
|
|
40
|
+
default: { '@path': '$.userId' }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
perform: (request, { payload }) => {
|
|
44
|
+
return request('https://api.hilohq.com/v1/events/track', {
|
|
45
|
+
method: 'post',
|
|
46
|
+
json: {
|
|
47
|
+
event: {
|
|
48
|
+
anonymous_id: payload.anonymousId,
|
|
49
|
+
contact_id: payload.userId,
|
|
50
|
+
name: payload.event,
|
|
51
|
+
timestamp: payload.timestamp,
|
|
52
|
+
properties: payload.properties
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.default = action;
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/hilo/track/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,qBAAqB;IAClC,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yBAAyB;YACtC,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SAChC;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SACrC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,4BAA4B;YACzC,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iCAAiC;YAC9C,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,OAAO,OAAO,CAAC,wCAAwC,EAAE;YACvD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,KAAK,EAAE;oBACL,YAAY,EAAE,OAAO,CAAC,WAAW;oBACjC,UAAU,EAAE,OAAO,CAAC,MAAM;oBAC1B,IAAI,EAAE,OAAO,CAAC,KAAK;oBACnB,SAAS,EAAE,OAAO,CAAC,SAAS;oBAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;iBAC/B;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
+
import { ModifiedResponse } from '@segment/actions-core';
|
|
1
2
|
import { RequestClient } from '@segment/actions-core';
|
|
2
|
-
import { SearchResponse, UpsertRecordResponse } from '../utils';
|
|
3
|
+
import { AssociationType, CreateAssociation, SearchResponse, UpsertRecordResponse } from '../utils';
|
|
3
4
|
export declare class Hubspot {
|
|
4
5
|
request: RequestClient;
|
|
5
6
|
objectType: string;
|
|
6
|
-
|
|
7
|
+
toObjectType?: string;
|
|
8
|
+
constructor(request: RequestClient, objectType: string, toObjectType?: string);
|
|
7
9
|
search(searchFields: {
|
|
8
10
|
[key: string]: unknown;
|
|
9
|
-
}, responseProperties: string[], responseSortBy: string[]): Promise<
|
|
11
|
+
}, objectType: string, responseProperties: string[], responseSortBy: string[]): Promise<ModifiedResponse<SearchResponse> | null>;
|
|
10
12
|
create(properties: {
|
|
11
13
|
[key: string]: unknown;
|
|
12
|
-
}): Promise<
|
|
14
|
+
}, associations?: CreateAssociation[]): Promise<ModifiedResponse<UpsertRecordResponse>>;
|
|
13
15
|
update(uniqueIdentifier: string, properties: {
|
|
14
16
|
[key: string]: unknown;
|
|
15
|
-
}, idProperty?: string): Promise<
|
|
17
|
+
}, idProperty?: string): Promise<ModifiedResponse<UpsertRecordResponse>>;
|
|
18
|
+
associate(objectId: string, toObjectId: string, associations: AssociationType[]): Promise<ModifiedResponse<UpsertRecordResponse>>;
|
|
19
|
+
getObjectResponseToAssociate(searchFieldsToAssociateCustomObjects: {
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
} | undefined, associationType: AssociationType | null): Promise<ModifiedResponse<SearchResponse> | null>;
|
|
16
22
|
}
|
|
@@ -1,42 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Hubspot = void 0;
|
|
4
|
+
const errors_1 = require("../errors");
|
|
4
5
|
const properties_1 = require("../properties");
|
|
5
6
|
const utils_1 = require("../utils");
|
|
6
7
|
class Hubspot {
|
|
7
|
-
constructor(request, objectType) {
|
|
8
|
+
constructor(request, objectType, toObjectType) {
|
|
8
9
|
this.request = request;
|
|
9
10
|
this.objectType = objectType;
|
|
11
|
+
this.toObjectType = toObjectType;
|
|
10
12
|
}
|
|
11
|
-
async search(searchFields, responseProperties, responseSortBy) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
async search(searchFields, objectType, responseProperties, responseSortBy) {
|
|
14
|
+
if (typeof searchFields === 'object' && Object.keys(searchFields).length > 0) {
|
|
15
|
+
const searchPayload = {
|
|
16
|
+
filterGroups: [],
|
|
17
|
+
properties: [...responseProperties],
|
|
18
|
+
sorts: [...responseSortBy]
|
|
19
|
+
};
|
|
20
|
+
for (const [key, value] of Object.entries(searchFields)) {
|
|
21
|
+
searchPayload.filterGroups.push({
|
|
22
|
+
filters: [
|
|
23
|
+
{
|
|
24
|
+
propertyName: key,
|
|
25
|
+
operator: utils_1.SearchFilterOperator.EQ,
|
|
26
|
+
value
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return this.request(`${properties_1.HUBSPOT_BASE_URL}/crm/v3/objects/${objectType}/search`, {
|
|
32
|
+
method: 'POST',
|
|
33
|
+
json: {
|
|
34
|
+
...searchPayload
|
|
35
|
+
}
|
|
26
36
|
});
|
|
27
37
|
}
|
|
28
|
-
return
|
|
29
|
-
method: 'POST',
|
|
30
|
-
json: {
|
|
31
|
-
...searchPayload
|
|
32
|
-
}
|
|
33
|
-
});
|
|
38
|
+
return null;
|
|
34
39
|
}
|
|
35
|
-
async create(properties) {
|
|
40
|
+
async create(properties, associations = []) {
|
|
36
41
|
return this.request(`${properties_1.HUBSPOT_BASE_URL}/crm/v3/objects/${this.objectType}`, {
|
|
37
42
|
method: 'POST',
|
|
38
43
|
json: {
|
|
39
|
-
properties: properties
|
|
44
|
+
properties: properties,
|
|
45
|
+
associations: associations
|
|
40
46
|
}
|
|
41
47
|
});
|
|
42
48
|
}
|
|
@@ -50,6 +56,35 @@ class Hubspot {
|
|
|
50
56
|
}
|
|
51
57
|
});
|
|
52
58
|
}
|
|
59
|
+
async associate(objectId, toObjectId, associations) {
|
|
60
|
+
const associateURL = `${properties_1.HUBSPOT_BASE_URL}/crm/v4/objects/${this.objectType}/${objectId}/associations/${this.toObjectType}/${toObjectId}`;
|
|
61
|
+
return this.request(associateURL, {
|
|
62
|
+
method: 'PUT',
|
|
63
|
+
json: associations
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async getObjectResponseToAssociate(searchFieldsToAssociateCustomObjects, associationType) {
|
|
67
|
+
try {
|
|
68
|
+
if (this.toObjectType &&
|
|
69
|
+
associationType &&
|
|
70
|
+
Object.keys(associationType).length > 0 &&
|
|
71
|
+
searchFieldsToAssociateCustomObjects &&
|
|
72
|
+
Object.keys(searchFieldsToAssociateCustomObjects).length > 0) {
|
|
73
|
+
let searchCustomResponseToAssociate = null;
|
|
74
|
+
searchCustomResponseToAssociate = await this.search({ ...searchFieldsToAssociateCustomObjects }, this.toObjectType, [], []);
|
|
75
|
+
if (searchCustomResponseToAssociate?.data && searchCustomResponseToAssociate?.data?.total) {
|
|
76
|
+
return searchCustomResponseToAssociate;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
catch (e) {
|
|
82
|
+
if (e?.response?.status === 400) {
|
|
83
|
+
throw errors_1.CustomSearchToAssociateThrowableError;
|
|
84
|
+
}
|
|
85
|
+
throw e;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
53
88
|
}
|
|
54
89
|
exports.Hubspot = Hubspot;
|
|
55
90
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/api/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/api/index.ts"],"names":[],"mappings":";;;AAGA,sCAAiE;AAEjE,8CAAgD;AAChD,oCAOiB;AAEjB,MAAa,OAAO;IAKlB,YAAY,OAAsB,EAAE,UAAkB,EAAE,YAAqB;QAC3E,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IAClC,CAAC;IASD,KAAK,CAAC,MAAM,CACV,YAAwC,EACxC,UAAkB,EAClB,kBAA4B,EAC5B,cAAwB;QAExB,IAAI,OAAO,YAAY,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5E,MAAM,aAAa,GAAkB;gBACnC,YAAY,EAAE,EAAE;gBAChB,UAAU,EAAE,CAAC,GAAG,kBAAkB,CAAC;gBACnC,KAAK,EAAE,CAAC,GAAG,cAAc,CAAC;aAC3B,CAAA;YACD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;gBACvD,aAAa,CAAC,YAAY,CAAC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CAAC,OAAO,CAAuB,YAAY,EAAE;YACtD,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,YAAY;SACnB,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,4BAA4B,CAChC,oCAA4E,EAC5E,eAAuC;QAEvC,IAAI;YACF,IACE,IAAI,CAAC,YAAY;gBACjB,eAAe;gBACf,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,GAAG,CAAC;gBACvC,oCAAoC;gBACpC,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC,MAAM,GAAG,CAAC,EAC5D;gBACA,IAAI,+BAA+B,GAA4C,IAAI,CAAA;gBACnF,+BAA+B,GAAG,MAAM,IAAI,CAAC,MAAM,CACjD,EAAE,GAAG,oCAAoC,EAAE,EAC3C,IAAI,CAAC,YAAY,EACjB,EAAE,EACF,EAAE,CACH,CAAA;gBACD,IAAI,+BAA+B,EAAE,IAAI,IAAI,+BAA+B,EAAE,IAAI,EAAE,KAAK,EAAE;oBACzF,OAAO,+BAA+B,CAAA;iBACvC;aACF;YACD,OAAO,IAAI,CAAA;SACZ;QAAC,OAAO,CAAC,EAAE;YAGV,IAAK,CAAe,EAAE,QAAQ,EAAE,MAAM,KAAK,GAAG,EAAE;gBAC9C,MAAM,8CAAqC,CAAA;aAC5C;YACD,MAAM,CAAC,CAAA;SACR;IACH,CAAC;CACF;AA3ID,0BA2IC"}
|
|
@@ -17,4 +17,6 @@ export declare const MultipleCompaniesInSearchResultThrowableError: IntegrationE
|
|
|
17
17
|
export declare const SegmentUniqueIdentifierMissingRetryableError: RetryableError;
|
|
18
18
|
export declare const CustomSearchThrowableError: IntegrationError;
|
|
19
19
|
export declare const MultipleCustomRecordsInSearchResultThrowableError: IntegrationError;
|
|
20
|
+
export declare const CustomSearchToAssociateThrowableError: IntegrationError;
|
|
21
|
+
export declare const MultipleCustomRecordsInSearchResultToAssociateThrowableError: IntegrationError;
|
|
20
22
|
export declare function isSegmentUniqueIdentifierPropertyError(error: HubSpotError, segmentUniqueIdentifierProperty: string): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSegmentUniqueIdentifierPropertyError = exports.MultipleCustomRecordsInSearchResultThrowableError = exports.CustomSearchThrowableError = exports.SegmentUniqueIdentifierMissingRetryableError = exports.MultipleCompaniesInSearchResultThrowableError = exports.RestrictedPropertyThrowableError = exports.CompanySearchThrowableError = exports.MissingIdentityCallThrowableError = exports.HubSpotError = void 0;
|
|
3
|
+
exports.isSegmentUniqueIdentifierPropertyError = exports.MultipleCustomRecordsInSearchResultToAssociateThrowableError = exports.CustomSearchToAssociateThrowableError = exports.MultipleCustomRecordsInSearchResultThrowableError = exports.CustomSearchThrowableError = exports.SegmentUniqueIdentifierMissingRetryableError = exports.MultipleCompaniesInSearchResultThrowableError = exports.RestrictedPropertyThrowableError = exports.CompanySearchThrowableError = exports.MissingIdentityCallThrowableError = exports.HubSpotError = void 0;
|
|
4
4
|
const actions_core_1 = require("@segment/actions-core");
|
|
5
5
|
const actions_core_2 = require("@segment/actions-core");
|
|
6
6
|
const properties_1 = require("./properties");
|
|
@@ -14,6 +14,8 @@ exports.MultipleCompaniesInSearchResultThrowableError = new actions_core_1.Integ
|
|
|
14
14
|
exports.SegmentUniqueIdentifierMissingRetryableError = new actions_core_1.RetryableError(`The ’${properties_1.SEGMENT_UNIQUE_IDENTIFIER}’ property doesn't exist in HubSpot. Segment will attempt to create the property and retry the action.`);
|
|
15
15
|
exports.CustomSearchThrowableError = new actions_core_1.IntegrationError('HubSpot returned 400 error while performing a custom object record search. Please check if Custom Object Record Search Fields’ contains valid properties defined in HubSpot.', 'Custom Search Failed', 400);
|
|
16
16
|
exports.MultipleCustomRecordsInSearchResultThrowableError = new actions_core_1.IntegrationError(`The search criteria defined by Custom Object Record Search Fields returned more than one records. The update request will be rejected.`, 'Search Criteria Not Unique', 400);
|
|
17
|
+
exports.CustomSearchToAssociateThrowableError = new actions_core_1.IntegrationError("HubSpot returned 400 error while performing a custom object record search to associate. Please check if 'Search Fields to Associate custom Object' contains valid properties defined in HubSpot.", 'Custom Search To Associate Failed', 400);
|
|
18
|
+
exports.MultipleCustomRecordsInSearchResultToAssociateThrowableError = new actions_core_1.IntegrationError(`Upsert Custom Object operation was completed but the association failed as the search association object returned more than one items. Ensure that you use an unique identifier to lookup an association object.`, 'Associate Search Criteria Not Unique', 400);
|
|
17
19
|
function isSegmentUniqueIdentifierPropertyError(error, segmentUniqueIdentifierProperty) {
|
|
18
20
|
if (error?.response?.status !== 400) {
|
|
19
21
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/destinations/hubspot/errors.ts"],"names":[],"mappings":";;;AAAA,wDAAmF;AACnF,wDAA8D;AAC9D,6CAAwD;AAExD,MAAa,YAAa,SAAQ,wBAAS;CAS1C;AATD,oCASC;AACY,QAAA,iCAAiC,GAAG,IAAI,+BAAgB,CACnE,uLAAuL,EACvL,uBAAuB,EACvB,GAAG,CACJ,CAAA;AAEY,QAAA,2BAA2B,GAAG,IAAI,+BAAgB,CAC7D,qJAAqJ,EACrJ,uBAAuB,EACvB,GAAG,CACJ,CAAA;AAEY,QAAA,gCAAgC,GAAG,IAAI,qCAAsB,CACxE,iBAAiB,sCAAyB,kHAAkH,CAC7J,CAAA;AAEY,QAAA,6CAA6C,GAAG,IAAI,+BAAgB,CAC/E,6HAA6H,EAC7H,4BAA4B,EAC5B,GAAG,CACJ,CAAA;AAEY,QAAA,4CAA4C,GAAG,IAAI,6BAAc,CAC5E,QAAQ,sCAAyB,wGAAwG,CAC1I,CAAA;AAEY,QAAA,0BAA0B,GAAG,IAAI,+BAAgB,CAC5D,8KAA8K,EAC9K,sBAAsB,EACtB,GAAG,CACJ,CAAA;AAEY,QAAA,iDAAiD,GAAG,IAAI,+BAAgB,CACnF,wIAAwI,EACxI,4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