@segment/action-destinations 3.301.1-staging-c2af298f5 → 3.301.1-staging-4ef86e820.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/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/dawn/dawn-types.d.ts +13 -0
- package/dist/destinations/{engage/twilio/utils/types.js → dawn/dawn-types.js} +1 -1
- package/dist/destinations/dawn/dawn-types.js.map +1 -0
- package/dist/destinations/dawn/generated-types.d.ts +3 -0
- package/dist/destinations/dawn/generated-types.js.map +1 -0
- package/dist/destinations/dawn/identifyUser/generated-types.d.ts +7 -0
- package/dist/destinations/dawn/identifyUser/generated-types.js.map +1 -0
- package/dist/destinations/dawn/identifyUser/index.js +58 -0
- package/dist/destinations/dawn/identifyUser/index.js.map +1 -0
- package/dist/destinations/{engage/twilio/destinationDefinition.d.ts → dawn/index.d.ts} +2 -1
- package/dist/destinations/dawn/index.js +39 -0
- package/dist/destinations/dawn/index.js.map +1 -0
- package/dist/destinations/dawn/track/generated-types.d.ts +8 -0
- package/dist/destinations/dawn/track/generated-types.js.map +1 -0
- package/dist/destinations/dawn/track/index.js +69 -0
- package/dist/destinations/dawn/track/index.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/common-fields.d.ts +2 -0
- package/dist/destinations/hubspot/customEvent/common-fields.js +74 -0
- package/dist/destinations/hubspot/customEvent/common-fields.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/constants.d.ts +4 -0
- package/dist/destinations/hubspot/customEvent/constants.js +10 -0
- package/dist/destinations/hubspot/customEvent/constants.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/dynamic-fields.d.ts +32 -0
- package/dist/destinations/hubspot/customEvent/dynamic-fields.js +103 -0
- package/dist/destinations/hubspot/customEvent/dynamic-fields.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/generated-types.d.ts +13 -0
- package/dist/destinations/hubspot/customEvent/generated-types.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/hubspot-api.d.ts +62 -0
- package/dist/destinations/hubspot/customEvent/hubspot-api.js +310 -0
- package/dist/destinations/hubspot/customEvent/hubspot-api.js.map +1 -0
- package/dist/destinations/{engage/twilio/sendMobilePush/actionDefinition.d.ts → hubspot/customEvent/index.d.ts} +2 -1
- package/dist/destinations/hubspot/customEvent/index.js +57 -0
- package/dist/destinations/hubspot/customEvent/index.js.map +1 -0
- package/dist/destinations/hubspot/index.js +3 -1
- package/dist/destinations/hubspot/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/common-fields.js +8 -32
- package/dist/destinations/hubspot/upsertObject/common-fields.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/generated-types.d.ts +8 -11
- package/dist/destinations/hubspot/upsertObject/hubspot-api.d.ts +169 -53
- package/dist/destinations/hubspot/upsertObject/hubspot-api.js +449 -336
- package/dist/destinations/hubspot/upsertObject/hubspot-api.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/index.d.ts +1 -1
- package/dist/destinations/hubspot/upsertObject/index.js +52 -28
- package/dist/destinations/hubspot/upsertObject/index.js.map +1 -1
- package/dist/destinations/index.js +2 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/klaviyo/addProfileToList/generated-types.d.ts +1 -0
- package/dist/destinations/klaviyo/addProfileToList/index.js +14 -5
- package/dist/destinations/klaviyo/addProfileToList/index.js.map +1 -1
- package/dist/destinations/klaviyo/functions.d.ts +3 -2
- package/dist/destinations/klaviyo/functions.js +23 -7
- package/dist/destinations/klaviyo/functions.js.map +1 -1
- package/dist/destinations/klaviyo/orderCompleted/generated-types.d.ts +1 -0
- package/dist/destinations/klaviyo/orderCompleted/index.js +11 -2
- package/dist/destinations/klaviyo/orderCompleted/index.js.map +1 -1
- package/dist/destinations/klaviyo/properties.d.ts +1 -0
- package/dist/destinations/klaviyo/properties.js +7 -1
- package/dist/destinations/klaviyo/properties.js.map +1 -1
- package/dist/destinations/klaviyo/removeProfile/generated-types.d.ts +1 -0
- package/dist/destinations/klaviyo/removeProfile/index.js +24 -7
- package/dist/destinations/klaviyo/removeProfile/index.js.map +1 -1
- package/dist/destinations/klaviyo/removeProfileFromList/generated-types.d.ts +1 -0
- package/dist/destinations/klaviyo/removeProfileFromList/index.js +18 -6
- package/dist/destinations/klaviyo/removeProfileFromList/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/index.d.ts +1 -0
- package/dist/destinations/linkedin-conversions/api/index.js +54 -0
- package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/streamConversion/generated-types.d.ts +2 -0
- package/dist/destinations/linkedin-conversions/streamConversion/index.js +28 -0
- package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
- package/dist/destinations/schematic/identifyUser/generated-types.d.ts +1 -1
- package/dist/destinations/schematic/identifyUser/index.js +6 -3
- package/dist/destinations/schematic/identifyUser/index.js.map +1 -1
- package/dist/destinations/schematic/trackEvent/generated-types.d.ts +1 -1
- package/dist/destinations/schematic/trackEvent/index.js +2 -2
- package/dist/destinations/schematic/trackEvent/index.js.map +1 -1
- package/dist/destinations/topsort/click/generated-types.d.ts +6 -0
- package/dist/destinations/topsort/click/generated-types.js +3 -0
- package/dist/destinations/topsort/click/generated-types.js.map +1 -0
- package/dist/destinations/topsort/click/index.js +54 -0
- package/dist/destinations/topsort/click/index.js.map +1 -0
- package/dist/destinations/topsort/client.d.ts +10 -0
- package/dist/destinations/topsort/client.js +26 -0
- package/dist/destinations/topsort/client.js.map +1 -0
- package/dist/destinations/topsort/generated-types.d.ts +3 -0
- package/dist/destinations/topsort/generated-types.js +3 -0
- package/dist/destinations/topsort/generated-types.js.map +1 -0
- package/dist/destinations/topsort/impression/generated-types.d.ts +6 -0
- package/dist/destinations/topsort/impression/generated-types.js +3 -0
- package/dist/destinations/topsort/impression/generated-types.js.map +1 -0
- package/dist/destinations/{engage/twilio/sendSms/actionDefinition.d.ts → topsort/impression/index.d.ts} +2 -1
- package/dist/destinations/topsort/impression/index.js +54 -0
- package/dist/destinations/topsort/impression/index.js.map +1 -0
- package/dist/destinations/{engage/sendgrid/destinationDefinition.d.ts → topsort/index.d.ts} +2 -1
- package/dist/destinations/topsort/index.js +56 -0
- package/dist/destinations/topsort/index.js.map +1 -0
- package/dist/destinations/topsort/purchase/generated-types.d.ts +10 -0
- package/dist/destinations/topsort/purchase/generated-types.js +3 -0
- package/dist/destinations/topsort/purchase/generated-types.js.map +1 -0
- package/dist/destinations/topsort/purchase/index.d.ts +5 -0
- package/dist/destinations/topsort/purchase/index.js +82 -0
- package/dist/destinations/topsort/purchase/index.js.map +1 -0
- package/dist/lib/test-data.js +2 -0
- package/dist/lib/test-data.js.map +1 -1
- package/package.json +2 -2
- package/dist/destinations/amazon-ads/generated-types.d.ts +0 -12
- package/dist/destinations/amazon-ads/generated-types.js.map +0 -1
- package/dist/destinations/amazon-ads/index.d.ts +0 -4
- package/dist/destinations/amazon-ads/index.js +0 -237
- package/dist/destinations/amazon-ads/index.js.map +0 -1
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +0 -15
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +0 -1
- package/dist/destinations/amazon-ads/syncAudiences/index.js +0 -182
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +0 -1
- package/dist/destinations/amazon-ads/types.d.ts +0 -47
- package/dist/destinations/amazon-ads/types.js +0 -11
- package/dist/destinations/amazon-ads/types.js.map +0 -1
- package/dist/destinations/amazon-ads/utils.d.ts +0 -37
- package/dist/destinations/amazon-ads/utils.js +0 -25
- package/dist/destinations/amazon-ads/utils.js.map +0 -1
- package/dist/destinations/contentstack/constants.d.ts +0 -3
- package/dist/destinations/contentstack/constants.js +0 -7
- package/dist/destinations/contentstack/constants.js.map +0 -1
- package/dist/destinations/engage/sendgrid/destinationDefinition.js +0 -70
- package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +0 -1
- package/dist/destinations/engage/sendgrid/generated-types.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/generated-types.js +0 -14
- package/dist/destinations/engage/sendgrid/generated-types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/index.d.ts +0 -2
- package/dist/destinations/engage/sendgrid/index.js +0 -5
- package/dist/destinations/engage/sendgrid/index.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +0 -28
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +0 -14
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +0 -14
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +0 -44
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +0 -419
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +0 -12
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +0 -3
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +0 -257
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +0 -14
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/index.js +0 -14
- package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +0 -23
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +0 -14
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +0 -1
- package/dist/destinations/engage/twilio/destinationDefinition.js +0 -172
- package/dist/destinations/engage/twilio/destinationDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/index.d.ts +0 -2
- package/dist/destinations/engage/twilio/index.js +0 -5
- package/dist/destinations/engage/twilio/index.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +0 -28
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +0 -151
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +0 -250
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/index.js +0 -14
- package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +0 -9
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +0 -72
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +0 -162
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendSms/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/index.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendSms/index.js +0 -14
- package/dist/destinations/engage/twilio/sendSms/index.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +0 -9
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +0 -89
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +0 -136
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js +0 -14
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +0 -16
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +0 -71
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +0 -16
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +0 -115
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/index.d.ts +0 -2
- package/dist/destinations/engage/twilio/utils/index.js +0 -15
- package/dist/destinations/engage/twilio/utils/index.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/types.d.ts +0 -23
- package/dist/destinations/engage/twilio/utils/types.js.map +0 -1
- package/dist/destinations/engage/utils/AggregateError.d.ts +0 -14
- package/dist/destinations/engage/utils/AggregateError.js +0 -26
- package/dist/destinations/engage/utils/AggregateError.js.map +0 -1
- package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +0 -42
- package/dist/destinations/engage/utils/EngageActionPerformer.js +0 -148
- package/dist/destinations/engage/utils/EngageActionPerformer.js.map +0 -1
- package/dist/destinations/engage/utils/EngageLogger.d.ts +0 -18
- package/dist/destinations/engage/utils/EngageLogger.js +0 -52
- package/dist/destinations/engage/utils/EngageLogger.js.map +0 -1
- package/dist/destinations/engage/utils/EngageStats.d.ts +0 -18
- package/dist/destinations/engage/utils/EngageStats.js +0 -95
- package/dist/destinations/engage/utils/EngageStats.js.map +0 -1
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +0 -12
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +0 -31
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +0 -1
- package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +0 -65
- package/dist/destinations/engage/utils/MessageSendPerformer.js +0 -211
- package/dist/destinations/engage/utils/MessageSendPerformer.js.map +0 -1
- package/dist/destinations/engage/utils/Profile.d.ts +0 -6
- package/dist/destinations/engage/utils/Profile.js +0 -3
- package/dist/destinations/engage/utils/Profile.js.map +0 -1
- package/dist/destinations/engage/utils/ResponseError.d.ts +0 -25
- package/dist/destinations/engage/utils/ResponseError.js +0 -22
- package/dist/destinations/engage/utils/ResponseError.js.map +0 -1
- package/dist/destinations/engage/utils/apiLookups.d.ts +0 -22
- package/dist/destinations/engage/utils/apiLookups.js +0 -189
- package/dist/destinations/engage/utils/apiLookups.js.map +0 -1
- package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +0 -2
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js +0 -10
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +0 -1
- package/dist/destinations/engage/utils/index.d.ts +0 -9
- package/dist/destinations/engage/utils/index.js +0 -22
- package/dist/destinations/engage/utils/index.js.map +0 -1
- package/dist/destinations/engage/utils/isDestinationActionService.d.ts +0 -1
- package/dist/destinations/engage/utils/isDestinationActionService.js +0 -8
- package/dist/destinations/engage/utils/isDestinationActionService.js.map +0 -1
- package/dist/destinations/engage/utils/isRetryableError.d.ts +0 -2
- package/dist/destinations/engage/utils/isRetryableError.js +0 -33
- package/dist/destinations/engage/utils/isRetryableError.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +0 -1
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +0 -3
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +0 -46
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +0 -46
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +0 -12
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +0 -23
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +0 -12
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +0 -35
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +0 -14
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +0 -31
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +0 -31
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +0 -104
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +0 -39
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js +0 -130
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +0 -377
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +0 -23
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js +0 -49
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +0 -6
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js +0 -3
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/index.d.ts +0 -10
- package/dist/destinations/engage/utils/operationTracking/index.js +0 -23
- package/dist/destinations/engage/utils/operationTracking/index.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +0 -21
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +0 -99
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +0 -1
- package/dist/destinations/engage/utils/testUtils.d.ts +0 -6
- package/dist/destinations/engage/utils/testUtils.js +0 -26
- package/dist/destinations/engage/utils/testUtils.js.map +0 -1
- package/dist/destinations/engage/utils/track.d.ts +0 -52
- package/dist/destinations/engage/utils/track.js +0 -9
- package/dist/destinations/engage/utils/track.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +0 -16
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +0 -3
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +0 -56
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +0 -3
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +0 -39
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +0 -27
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +0 -25
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/add/generated-types.d.ts +0 -2
- package/dist/destinations/facebook-custom-audiences/add/generated-types.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/add/index.js +0 -11
- package/dist/destinations/facebook-custom-audiences/add/index.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.d.ts +0 -2
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/remove/index.js +0 -11
- package/dist/destinations/facebook-custom-audiences/remove/index.js.map +0 -1
- /package/dist/destinations/{amazon-ads → dawn}/generated-types.js +0 -0
- /package/dist/destinations/{amazon-ads/syncAudiences → dawn/identifyUser}/generated-types.js +0 -0
- /package/dist/destinations/{amazon-ads/syncAudiences → dawn/identifyUser}/index.d.ts +0 -0
- /package/dist/destinations/{facebook-custom-audiences/add → dawn/track}/generated-types.js +0 -0
- /package/dist/destinations/{facebook-custom-audiences/add → dawn/track}/index.d.ts +0 -0
- /package/dist/destinations/{facebook-custom-audiences/remove → hubspot/customEvent}/generated-types.js +0 -0
- /package/dist/destinations/{facebook-custom-audiences/remove → topsort/click}/index.d.ts +0 -0
|
@@ -9,7 +9,7 @@ export declare const dateStringToFuzzyDate: (dateString: string | number) => fal
|
|
|
9
9
|
y: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const augmentFieldsWithConstituentFields: (fields: Record<string, InputField>) => Record<string, InputField>;
|
|
12
|
-
export declare const splitConstituentPayload: (payload: CreateOrUpdateIndividualConstituentPayload) => (Partial<
|
|
12
|
+
export declare const splitConstituentPayload: (payload: CreateOrUpdateIndividualConstituentPayload) => (Partial<Constituent> | Partial<Address> | Partial<OnlinePresence> | Partial<Phone>)[];
|
|
13
13
|
export declare const buildConstituentPayloadFromPayload: (payload: StringIndexedObject) => Partial<CreateOrUpdateIndividualConstituentPayload>;
|
|
14
14
|
export declare const buildGiftDataFromPayload: (constituentId: string, payload: CreateGiftPayload) => Partial<Gift>;
|
|
15
15
|
export declare const buildConstituentActionDataFromPayload: (constituentId: string, payload: CreateConstituentAction) => Partial<ConstituentAction>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dawn-types.js","sourceRoot":"","sources":["../../../src/destinations/dawn/dawn-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/dawn/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/dawn/identifyUser/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getEventFromPayload = (payload) => {
|
|
4
|
+
const identifyUserPayload = {
|
|
5
|
+
user_id: payload.user_id || '',
|
|
6
|
+
traits: payload.traits || {}
|
|
7
|
+
};
|
|
8
|
+
return identifyUserPayload;
|
|
9
|
+
};
|
|
10
|
+
const processData = async (request, settings, payload) => {
|
|
11
|
+
const identifyUsers = payload.map((value) => getEventFromPayload(value));
|
|
12
|
+
return request('https://api.dawnai.com/segment-identify', {
|
|
13
|
+
method: 'post',
|
|
14
|
+
json: identifyUsers,
|
|
15
|
+
headers: {
|
|
16
|
+
authorization: `Bearer ${settings.writeKey}`
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
const action = {
|
|
21
|
+
title: 'Identify User',
|
|
22
|
+
description: 'Identify a user in Dawn and associate traits with them.',
|
|
23
|
+
fields: {
|
|
24
|
+
user_id: {
|
|
25
|
+
label: 'User ID',
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'The ID of the user performing the event.',
|
|
28
|
+
required: true,
|
|
29
|
+
default: {
|
|
30
|
+
'@path': '$.userId'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
traits: {
|
|
34
|
+
label: 'Traits',
|
|
35
|
+
type: 'object',
|
|
36
|
+
description: 'The traits of the user.',
|
|
37
|
+
required: false,
|
|
38
|
+
default: {
|
|
39
|
+
'@path': '$.traits'
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
enable_batching: {
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
label: 'Use Dawn AI Batching',
|
|
45
|
+
description: 'When enabled, the action will use batch requests to the Dawn AI API',
|
|
46
|
+
required: true,
|
|
47
|
+
default: false
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
perform: async (request, { settings, payload }) => {
|
|
51
|
+
return processData(request, settings, [payload]);
|
|
52
|
+
},
|
|
53
|
+
performBatch: async (request, { settings, payload }) => {
|
|
54
|
+
return processData(request, settings, payload);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.default = action;
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/dawn/identifyUser/index.ts"],"names":[],"mappings":";;AAKA,MAAM,mBAAmB,GAAG,CAAC,OAAgB,EAAoB,EAAE;IACjE,MAAM,mBAAmB,GAAqB;QAC5C,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,EAAE;QAC9B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;KAC7B,CAAA;IACD,OAAO,mBAAmB,CAAA;AAC5B,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,KAAK,EAAE,OAAsB,EAAE,QAAkB,EAAE,OAAkB,EAAE,EAAE;IAC3F,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAA;IACxE,OAAO,OAAO,CAAC,yCAAyC,EAAE;QACxD,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,QAAQ,CAAC,QAAQ,EAAE;SAC7C;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,yDAAyD;IACtE,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,eAAe,EAAE;YACf,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EAAE,qEAAqE;YAClF,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,KAAK;SACf;KACF;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,OAAO,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAClD,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QACrD,OAAO,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IAChD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { DestinationDefinition } from '@segment/actions-core';
|
|
2
2
|
import type { Settings } from './generated-types';
|
|
3
|
-
|
|
3
|
+
declare const destination: DestinationDefinition<Settings>;
|
|
4
|
+
export default destination;
|
|
@@ -0,0 +1,39 @@
|
|
|
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 track_1 = __importDefault(require("./track"));
|
|
7
|
+
const identifyUser_1 = __importDefault(require("./identifyUser"));
|
|
8
|
+
const destination = {
|
|
9
|
+
name: 'Dawn AI',
|
|
10
|
+
slug: 'actions-dawn',
|
|
11
|
+
mode: 'cloud',
|
|
12
|
+
authentication: {
|
|
13
|
+
scheme: 'custom',
|
|
14
|
+
fields: {
|
|
15
|
+
writeKey: {
|
|
16
|
+
label: 'Dawn Write Key',
|
|
17
|
+
description: 'Get your key at app.dawnai.com',
|
|
18
|
+
type: 'string',
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
testAuthentication: (request, { settings }) => {
|
|
23
|
+
return request(`https://api.dawnai.com/validate-auth`, {
|
|
24
|
+
method: 'post',
|
|
25
|
+
headers: {
|
|
26
|
+
'Content-Type': 'application/json',
|
|
27
|
+
Authorization: `Bearer ${settings.writeKey}`
|
|
28
|
+
},
|
|
29
|
+
body: null
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
actions: {
|
|
34
|
+
track: track_1.default,
|
|
35
|
+
identifyUser: identifyUser_1.default
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.default = destination;
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/dawn/index.ts"],"names":[],"mappings":";;;;;AAGA,oDAA2B;AAE3B,kEAAyC;AAEzC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,QAAQ,EAAE;gBACR,KAAK,EAAE,gBAAgB;gBACvB,WAAW,EAAE,gCAAgC;gBAC7C,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC5C,OAAO,OAAO,CAAC,sCAAsC,EAAE;gBACrD,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa,EAAE,UAAU,QAAQ,CAAC,QAAQ,EAAE;iBAC7C;gBACD,IAAI,EAAE,IAAI;aACX,CAAC,CAAA;QACJ,CAAC;KACF;IASD,OAAO,EAAE;QACP,KAAK,EAAL,eAAK;QACL,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/dawn/track/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getEventFromPayload = (payload) => {
|
|
4
|
+
const event = {
|
|
5
|
+
event: payload.event,
|
|
6
|
+
user_id: payload.user_id || '',
|
|
7
|
+
properties: payload.properties || {}
|
|
8
|
+
};
|
|
9
|
+
return event;
|
|
10
|
+
};
|
|
11
|
+
const processData = async (request, settings, payload) => {
|
|
12
|
+
const events = payload.map((value) => getEventFromPayload(value));
|
|
13
|
+
return request('https://api.dawnai.com/segment-track', {
|
|
14
|
+
method: 'post',
|
|
15
|
+
json: events,
|
|
16
|
+
headers: {
|
|
17
|
+
authorization: `Bearer ${settings.writeKey}`
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
const action = {
|
|
22
|
+
title: 'Track Event',
|
|
23
|
+
description: 'Track regular or AI events in Dawn, adding desired data to properties',
|
|
24
|
+
defaultSubscription: 'type = "track"',
|
|
25
|
+
fields: {
|
|
26
|
+
event: {
|
|
27
|
+
label: 'Event Name',
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'The name of the action being performed.',
|
|
30
|
+
required: true,
|
|
31
|
+
default: {
|
|
32
|
+
'@path': '$.event'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
user_id: {
|
|
36
|
+
label: 'User ID',
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'The user ID performing the event.',
|
|
39
|
+
required: true,
|
|
40
|
+
default: {
|
|
41
|
+
'@path': '$.userId'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
properties: {
|
|
45
|
+
label: 'Properties',
|
|
46
|
+
type: 'object',
|
|
47
|
+
description: 'The properties of the event.',
|
|
48
|
+
required: false,
|
|
49
|
+
default: {
|
|
50
|
+
'@path': '$.properties'
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
enable_batching: {
|
|
54
|
+
type: 'boolean',
|
|
55
|
+
label: 'Use Dawn AI Batching',
|
|
56
|
+
description: 'When enabled, the action will use batch requests to the Dawn AI API',
|
|
57
|
+
required: true,
|
|
58
|
+
default: false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
perform: async (request, { settings, payload }) => {
|
|
62
|
+
return processData(request, settings, [payload]);
|
|
63
|
+
},
|
|
64
|
+
performBatch: async (request, { settings, payload }) => {
|
|
65
|
+
return processData(request, settings, payload);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.default = action;
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/dawn/track/index.ts"],"names":[],"mappings":";;AAKA,MAAM,mBAAmB,GAAG,CAAC,OAAgB,EAAa,EAAE;IAC1D,MAAM,KAAK,GAAc;QACvB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,EAAE;QAC9B,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,EAAE;KACrC,CAAA;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,KAAK,EAAE,OAAsB,EAAE,QAAkB,EAAE,OAAkB,EAAE,EAAE;IAC3F,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAA;IACjE,OAAO,OAAO,CAAC,sCAAsC,EAAE;QACrD,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,MAAM;QACZ,OAA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AAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commonFields = void 0;
|
|
4
|
+
exports.commonFields = {
|
|
5
|
+
event_name: {
|
|
6
|
+
label: 'Event Name',
|
|
7
|
+
description: 'The name of the event to send to Hubspot.',
|
|
8
|
+
type: 'string',
|
|
9
|
+
required: true,
|
|
10
|
+
dynamic: true
|
|
11
|
+
},
|
|
12
|
+
record_details: {
|
|
13
|
+
label: 'Associated Record Details',
|
|
14
|
+
description: 'Details of the record to associate the event with',
|
|
15
|
+
type: 'object',
|
|
16
|
+
required: true,
|
|
17
|
+
defaultObjectUI: 'keyvalue:only',
|
|
18
|
+
additionalProperties: false,
|
|
19
|
+
properties: {
|
|
20
|
+
object_type: {
|
|
21
|
+
label: 'Object Type',
|
|
22
|
+
description: 'The type of Hubspot Object to associate the event with.',
|
|
23
|
+
type: 'string',
|
|
24
|
+
required: true,
|
|
25
|
+
dynamic: true
|
|
26
|
+
},
|
|
27
|
+
object_id: {
|
|
28
|
+
label: 'Object ID',
|
|
29
|
+
description: 'The Object ID of the object to associate the event with. For example a contact id or a visitor id value. Works for Contacts, Companies, Deals, Tickets and Custom Objects.',
|
|
30
|
+
type: 'string',
|
|
31
|
+
required: false
|
|
32
|
+
},
|
|
33
|
+
email: {
|
|
34
|
+
label: 'Email Address',
|
|
35
|
+
description: 'The email address of the Contact to associate the event with. This field only works for Contact objects.',
|
|
36
|
+
type: 'string',
|
|
37
|
+
required: false,
|
|
38
|
+
format: 'email',
|
|
39
|
+
default: {
|
|
40
|
+
'@if': {
|
|
41
|
+
exists: { '@path': '$.properties.email' },
|
|
42
|
+
then: { '@path': '$.properties.email' },
|
|
43
|
+
else: { '@path': '$.context.traits.email' }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
utk: {
|
|
48
|
+
label: 'User Token / UTK',
|
|
49
|
+
description: 'The user token of the Contact to associate the event with.',
|
|
50
|
+
type: 'string',
|
|
51
|
+
required: false
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
properties: {
|
|
56
|
+
label: 'Properties',
|
|
57
|
+
description: 'Properties to send with the event.',
|
|
58
|
+
type: 'object',
|
|
59
|
+
required: false,
|
|
60
|
+
defaultObjectUI: 'keyvalue',
|
|
61
|
+
dynamic: true,
|
|
62
|
+
additionalProperties: true
|
|
63
|
+
},
|
|
64
|
+
occurred_at: {
|
|
65
|
+
label: 'Event Timestamp',
|
|
66
|
+
description: 'The time when this event occurred.',
|
|
67
|
+
type: 'datetime',
|
|
68
|
+
required: false,
|
|
69
|
+
default: {
|
|
70
|
+
'@path': '$.timestamp'
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=common-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-fields.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/customEvent/common-fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAA+B;IACtD,UAAU,EAAE;QACV,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,2CAA2C;QACxD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACd;IACD,cAAc,EAAE;QACd,KAAK,EAAE,2BAA2B;QAClC,WAAW,EAAE,mDAAmD;QAChE,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,eAAe,EAAE,eAAe;QAChC,oBAAoB,EAAE,KAAK;QAC3B,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,yDAAyD;gBACtE,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,IAAI;aACd;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,4KAA4K;gBAC9K,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;aAChB;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,eAAe;gBACtB,WAAW,EACT,0GAA0G;gBAC5G,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,MAAM,EAAE,OAAO;gBACf,OAAO,EAAE;oBACP,KAAK,EAAE;wBACL,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;wBACzC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;wBACvC,IAAI,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;qBAC5C;iBACF;aACF;YACD,GAAG,EAAE;gBACH,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,4DAA4D;gBACzE,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;IACD,UAAU,EAAE;QACV,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,oCAAoC;QACjD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,KAAK;QACf,eAAe,EAAE,UAAU;QAC3B,OAAO,EAAE,IAAI;QACb,oBAAoB,EAAE,IAAI;KAC3B;IACD,WAAW,EAAE;QACX,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,oCAAoC;QACjD,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE;YACP,OAAO,EAAE,aAAa;SACvB;KACF;CACF,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUPPORTED_HUBSPOT_OBJECT_TYPES = void 0;
|
|
4
|
+
exports.SUPPORTED_HUBSPOT_OBJECT_TYPES = [
|
|
5
|
+
{ label: 'Contact', value: 'contact' },
|
|
6
|
+
{ label: 'Company', value: 'company' },
|
|
7
|
+
{ label: 'Deal', value: 'deal' },
|
|
8
|
+
{ label: 'Ticket', value: 'ticket' }
|
|
9
|
+
];
|
|
10
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/customEvent/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,8BAA8B,GAAG;IAC5C,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACtC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACtC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAChC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;CACrC,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { RequestClient } from '@segment/actions-core';
|
|
2
|
+
import { DynamicFieldResponse } from '@segment/actions-core';
|
|
3
|
+
export declare function dynamicReadEventNames(request: RequestClient): Promise<{
|
|
4
|
+
choices: {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}[];
|
|
8
|
+
error?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
choices: never[];
|
|
11
|
+
error: {
|
|
12
|
+
message: string;
|
|
13
|
+
code: string;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
export declare function dynamicReadObjectTypes(request: RequestClient): Promise<DynamicFieldResponse>;
|
|
17
|
+
export declare function dynamicReadProperties(request: RequestClient, eventName: string): Promise<{
|
|
18
|
+
choices: ({
|
|
19
|
+
label: string;
|
|
20
|
+
value: string;
|
|
21
|
+
} | {
|
|
22
|
+
label: string;
|
|
23
|
+
value: string;
|
|
24
|
+
})[];
|
|
25
|
+
error?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
choices: never[];
|
|
28
|
+
error: {
|
|
29
|
+
message: string;
|
|
30
|
+
code: string;
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dynamicReadProperties = exports.dynamicReadObjectTypes = exports.dynamicReadEventNames = void 0;
|
|
4
|
+
const properties_1 = require("../properties");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
6
|
+
async function dynamicReadEventNames(request) {
|
|
7
|
+
try {
|
|
8
|
+
const response = await request(`${properties_1.HUBSPOT_BASE_URL}/events/v3/event-definitions/?includeProperties=false`, {
|
|
9
|
+
method: 'GET',
|
|
10
|
+
skipResponseCloning: true
|
|
11
|
+
});
|
|
12
|
+
return {
|
|
13
|
+
choices: response.data.results
|
|
14
|
+
.filter((event) => !event.archived && (event.labels?.singular || event.labels?.plural))
|
|
15
|
+
.map((event) => {
|
|
16
|
+
return {
|
|
17
|
+
label: event.labels?.singular ?? event.labels?.plural ?? '',
|
|
18
|
+
value: event.fullyQualifiedName
|
|
19
|
+
};
|
|
20
|
+
})
|
|
21
|
+
.sort((a, b) => a.label.toLowerCase().localeCompare(b.label.toLowerCase()))
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
catch (err) {
|
|
25
|
+
return {
|
|
26
|
+
choices: [],
|
|
27
|
+
error: {
|
|
28
|
+
message: err?.response?.data?.message ?? 'Unknown error: dynamicReadEventNames',
|
|
29
|
+
code: err?.response?.data?.category ?? 'Unknown code'
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.dynamicReadEventNames = dynamicReadEventNames;
|
|
35
|
+
async function dynamicReadObjectTypes(request) {
|
|
36
|
+
const defaultChoices = constants_1.SUPPORTED_HUBSPOT_OBJECT_TYPES;
|
|
37
|
+
try {
|
|
38
|
+
const response = await request(`${properties_1.HUBSPOT_BASE_URL}/crm/v3/schemas?archived=false`, {
|
|
39
|
+
method: 'GET',
|
|
40
|
+
skipResponseCloning: true
|
|
41
|
+
});
|
|
42
|
+
const choices = response.data.results.map((schema) => ({
|
|
43
|
+
label: `${schema.labels.plural} (Custom)`,
|
|
44
|
+
value: schema.name
|
|
45
|
+
}));
|
|
46
|
+
return {
|
|
47
|
+
choices: [...choices, ...defaultChoices].sort((a, b) => a.label.toLowerCase().localeCompare(b.label.toLowerCase()))
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
return {
|
|
52
|
+
choices: [],
|
|
53
|
+
error: {
|
|
54
|
+
message: err?.response?.data?.message ?? 'Unknown error: dynamicReadObjectTypes',
|
|
55
|
+
code: err?.response?.data?.category ?? 'Unknown code'
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.dynamicReadObjectTypes = dynamicReadObjectTypes;
|
|
61
|
+
async function dynamicReadProperties(request, eventName) {
|
|
62
|
+
try {
|
|
63
|
+
const response = await request(`${properties_1.HUBSPOT_BASE_URL}/events/v3/event-definitions/?includeProperties=true`, {
|
|
64
|
+
method: 'GET',
|
|
65
|
+
skipResponseCloning: true
|
|
66
|
+
});
|
|
67
|
+
return {
|
|
68
|
+
choices: [
|
|
69
|
+
...response.data.results
|
|
70
|
+
.filter((event) => event.fullyQualifiedName === eventName && !event.archived)
|
|
71
|
+
.map((event) => {
|
|
72
|
+
if (!event.properties || event.properties.length === 0) {
|
|
73
|
+
return {
|
|
74
|
+
label: `No properties found for event ${eventName}`,
|
|
75
|
+
value: ''
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
return event.properties
|
|
79
|
+
.filter((property) => !property.archived)
|
|
80
|
+
.sort((a, b) => a.label.toLowerCase().localeCompare(b.label.toLowerCase()))
|
|
81
|
+
.map((property) => {
|
|
82
|
+
return {
|
|
83
|
+
label: `${property.label} - ${property.type}`,
|
|
84
|
+
value: property.name
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
})
|
|
88
|
+
.flat()
|
|
89
|
+
]
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
return {
|
|
94
|
+
choices: [],
|
|
95
|
+
error: {
|
|
96
|
+
message: err?.response?.data?.message ?? 'Unknown error: dynamicReadProperties',
|
|
97
|
+
code: err?.response?.data?.category ?? 'Unknown code'
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.dynamicReadProperties = dynamicReadProperties;
|
|
103
|
+
//# sourceMappingURL=dynamic-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-fields.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/customEvent/dynamic-fields.ts"],"names":[],"mappings":";;;AAEA,8CAAgD;AAChD,2CAA4D;AAIrD,KAAK,UAAU,qBAAqB,CAAC,OAAsB;IAgBhE,IAAI;QACF,MAAM,QAAQ,GAAiB,MAAM,OAAO,CAC1C,GAAG,6BAAgB,uDAAuD,EAC1E;YACE,MAAM,EAAE,KAAK;YACb,mBAAmB,EAAE,IAAI;SAC1B,CACF,CAAA;QAED,OAAO;YACL,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO;iBAC3B,MAAM,CAAC,CAAC,KAAiB,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,IAAI,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;iBAClG,GAAG,CAAC,CAAC,KAAiB,EAAE,EAAE;gBACzB,OAAO;oBACL,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,QAAQ,IAAI,KAAK,CAAC,MAAM,EAAE,MAAM,IAAI,EAAE;oBAC3D,KAAK,EAAE,KAAK,CAAC,kBAAkB;iBAChC,CAAA;YACH,CAAC,CAAC;iBACD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,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C,CAAA;gBACN,CAAC,CAAC;qBACD,IAAI,EAAE;aACV;SACF,CAAA;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO;YACL,OAAO,EAAE,EAAE;YACX,KAAK,EAAE;gBACL,OAAO,EAAG,GAAoB,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,IAAI,sCAAsC;gBACjG,IAAI,EAAG,GAAoB,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,IAAI,cAAc;aACxE;SACF,CAAA;KACF;AACH,CAAC;AAlED,sDAkEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/customEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { RequestClient } from '@segment/actions-core';
|
|
2
|
+
import type { Payload } from './generated-types';
|
|
3
|
+
export declare type SyncMode = 'upsert' | 'add' | 'update';
|
|
4
|
+
declare type StringFormat = 'date' | 'datetime' | 'string';
|
|
5
|
+
declare type SegmentPropertyType = 'number' | 'object' | 'boolean' | 'string';
|
|
6
|
+
interface SegmentProperty {
|
|
7
|
+
type: SegmentPropertyType;
|
|
8
|
+
stringFormat?: StringFormat;
|
|
9
|
+
}
|
|
10
|
+
declare type SchemaMatch = 'full_match' | 'properties_missing' | 'no_match' | 'mismatch';
|
|
11
|
+
interface SchemaDiff {
|
|
12
|
+
match: SchemaMatch;
|
|
13
|
+
fullyQualifiedName?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
missingProperties: {
|
|
16
|
+
[key: string]: SegmentProperty;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
interface SegmentEventSchema {
|
|
20
|
+
eventName: string;
|
|
21
|
+
properties: {
|
|
22
|
+
[key: string]: SegmentProperty;
|
|
23
|
+
};
|
|
24
|
+
primaryObject: string;
|
|
25
|
+
}
|
|
26
|
+
declare type HubspotPropertyType = 'string' | 'number' | 'enumeration' | 'datetime';
|
|
27
|
+
interface PropertyRequestJSON {
|
|
28
|
+
name: string;
|
|
29
|
+
label: string;
|
|
30
|
+
type: HubspotPropertyType;
|
|
31
|
+
description: string;
|
|
32
|
+
options?: Array<{
|
|
33
|
+
label: string;
|
|
34
|
+
value: boolean;
|
|
35
|
+
description: string;
|
|
36
|
+
hidden: boolean;
|
|
37
|
+
displayOrder: number;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
export declare class HubspotClient {
|
|
41
|
+
request: RequestClient;
|
|
42
|
+
syncMode: SyncMode;
|
|
43
|
+
constructor(request: RequestClient, syncMode: SyncMode);
|
|
44
|
+
stringFormat(str: string): StringFormat;
|
|
45
|
+
sanitizeEventName(str: string): string;
|
|
46
|
+
sanitizePropertyName(str: string): string;
|
|
47
|
+
sanitizeProperties(properties: {
|
|
48
|
+
[k: string]: unknown;
|
|
49
|
+
}): {
|
|
50
|
+
[k: string]: string | number | boolean;
|
|
51
|
+
};
|
|
52
|
+
propertyBody(eventName: string, type: SegmentPropertyType, name: string, stringFormat?: StringFormat): PropertyRequestJSON;
|
|
53
|
+
segmentSchema(payload: Payload): SegmentEventSchema;
|
|
54
|
+
compareSchemaToCache(schema: SegmentEventSchema): Promise<SchemaDiff>;
|
|
55
|
+
compareSchemaToHubspot(schema: SegmentEventSchema): Promise<SchemaDiff>;
|
|
56
|
+
saveSchemaToCache(fullyQualifiedName: string, name: string, schema: SegmentEventSchema): Promise<void>;
|
|
57
|
+
sendEvent(fullyQualifiedName: string, payload: Payload): Promise<void>;
|
|
58
|
+
send(payload: Payload): Promise<void>;
|
|
59
|
+
createHubspotSchema(schema: SegmentEventSchema): Promise<SchemaDiff>;
|
|
60
|
+
updateHubspotSchema(fullyQualifiedName: string, schemaDiff: SchemaDiff): Promise<void>;
|
|
61
|
+
}
|
|
62
|
+
export {};
|