@segment/action-destinations 3.301.1-staging-c2af298f5 → 3.302.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/actions-pardot/pa-operations.d.ts +1 -1
- package/dist/destinations/adjust/functions.d.ts +1 -1
- package/dist/destinations/adobe-target/adobeTarget_operations.d.ts +1 -1
- package/dist/destinations/airship/utilities.d.ts +7 -7
- package/dist/destinations/amazon-amc/index.js +10 -2
- package/dist/destinations/amazon-amc/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/braze/utils.d.ts +6 -6
- package/dist/destinations/contentstack/customAttributesSync/utils.d.ts +1 -1
- package/dist/destinations/cordial/cordial-client.d.ts +8 -8
- 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/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.d.ts +1 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.d.ts +1 -1
- package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.d.ts +1 -1
- package/dist/destinations/facebook-conversions-api/constants.d.ts +1 -1
- package/dist/destinations/facebook-conversions-api/constants.js +1 -1
- package/dist/destinations/facebook-custom-audiences/fbca-operations.d.ts +2 -2
- package/dist/destinations/first-party-dv360/generated-types.d.ts +0 -7
- package/dist/destinations/first-party-dv360/index.d.ts +3 -3
- package/dist/destinations/first-party-dv360/index.js +5 -119
- package/dist/destinations/first-party-dv360/index.js.map +1 -1
- package/dist/destinations/gameball/util.d.ts +1 -1
- package/dist/destinations/google-analytics-4/ga4-functions.d.ts +1 -1
- package/dist/destinations/google-sheets/index.js +1 -3
- package/dist/destinations/google-sheets/index.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet/operations.d.ts +1 -1
- 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 +104 -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/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 +7 -6
- 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/launchdarkly-audiences/syncAudience/custom-audience-operations.d.ts +1 -1
- package/dist/destinations/salesforce/index.js +1 -13
- package/dist/destinations/salesforce/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-operations.d.ts +0 -1
- package/dist/destinations/salesforce/sf-operations.js +0 -20
- package/dist/destinations/salesforce/sf-operations.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.d.ts +0 -1
- package/dist/destinations/salesforce/sf-properties.js +6 -29
- package/dist/destinations/salesforce/sf-properties.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.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.map +1 -0
- package/dist/destinations/topsort/impression/generated-types.d.ts +6 -0
- package/dist/destinations/topsort/impression/generated-types.js.map +1 -0
- 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.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 +4 -4
- 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.d.ts +0 -4
- 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.d.ts +0 -4
- 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/first-party-dv360/functions.d.ts +0 -17
- package/dist/destinations/first-party-dv360/functions.js +0 -38
- package/dist/destinations/first-party-dv360/functions.js.map +0 -1
- package/dist/destinations/google-sheets/postSheet2/generated-types.d.ts +0 -10
- package/dist/destinations/google-sheets/postSheet2/generated-types.js.map +0 -1
- package/dist/destinations/google-sheets/postSheet2/index.js +0 -98
- package/dist/destinations/google-sheets/postSheet2/index.js.map +0 -1
- package/dist/destinations/google-sheets/postSheet2/operations2.d.ts +0 -10
- package/dist/destinations/google-sheets/postSheet2/operations2.js +0 -96
- package/dist/destinations/google-sheets/postSheet2/operations2.js.map +0 -1
- package/dist/destinations/salesforce/account2/generated-types.d.ts +0 -32
- package/dist/destinations/salesforce/account2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/account2/index.d.ts +0 -5
- package/dist/destinations/salesforce/account2/index.js +0 -248
- package/dist/destinations/salesforce/account2/index.js.map +0 -1
- package/dist/destinations/salesforce/cases2/generated-types.d.ts +0 -17
- package/dist/destinations/salesforce/cases2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/cases2/index.js +0 -76
- package/dist/destinations/salesforce/cases2/index.js.map +0 -1
- package/dist/destinations/salesforce/contact2/generated-types.d.ts +0 -25
- package/dist/destinations/salesforce/contact2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/contact2/index.d.ts +0 -5
- package/dist/destinations/salesforce/contact2/index.js +0 -192
- package/dist/destinations/salesforce/contact2/index.js.map +0 -1
- package/dist/destinations/salesforce/customObject2/generated-types.d.ts +0 -17
- package/dist/destinations/salesforce/customObject2/generated-types.js +0 -3
- package/dist/destinations/salesforce/customObject2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/customObject2/index.d.ts +0 -5
- package/dist/destinations/salesforce/customObject2/index.js +0 -97
- package/dist/destinations/salesforce/customObject2/index.js.map +0 -1
- package/dist/destinations/salesforce/lead2/generated-types.d.ts +0 -25
- package/dist/destinations/salesforce/lead2/generated-types.js +0 -3
- package/dist/destinations/salesforce/lead2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/lead2/index.d.ts +0 -5
- package/dist/destinations/salesforce/lead2/index.js +0 -200
- package/dist/destinations/salesforce/lead2/index.js.map +0 -1
- package/dist/destinations/salesforce/opportunity2/generated-types.d.ts +0 -21
- package/dist/destinations/salesforce/opportunity2/generated-types.js +0 -3
- package/dist/destinations/salesforce/opportunity2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/opportunity2/index.d.ts +0 -5
- package/dist/destinations/salesforce/opportunity2/index.js +0 -112
- package/dist/destinations/salesforce/opportunity2/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/{google-sheets/postSheet2 → hubspot/customEvent}/index.d.ts +0 -0
- /package/dist/destinations/{google-sheets/postSheet2 → topsort/click}/generated-types.js +0 -0
- /package/dist/destinations/{facebook-custom-audiences/remove → topsort/click}/index.d.ts +0 -0
- /package/dist/destinations/{salesforce/account2 → topsort}/generated-types.js +0 -0
- /package/dist/destinations/{salesforce/cases2 → topsort/impression}/generated-types.js +0 -0
- /package/dist/destinations/{salesforce/cases2 → topsort/impression}/index.d.ts +0 -0
- /package/dist/destinations/{salesforce/contact2 → topsort/purchase}/generated-types.js +0 -0
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../utils");
|
|
4
|
-
const crypto_1 = require("crypto");
|
|
5
|
-
const action = {
|
|
6
|
-
title: 'Sync Audience',
|
|
7
|
-
description: 'Sync audiences from Segment to Amazon Ads Audience.',
|
|
8
|
-
defaultSubscription: 'event = "Audience Entered" or event = "Audience Exited"',
|
|
9
|
-
fields: {
|
|
10
|
-
event_name: {
|
|
11
|
-
label: 'Event Name',
|
|
12
|
-
description: 'The name of the current Segment event.',
|
|
13
|
-
type: 'string',
|
|
14
|
-
unsafe_hidden: true,
|
|
15
|
-
default: {
|
|
16
|
-
'@path': '$.event'
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
externalUserId: {
|
|
20
|
-
label: 'External User ID',
|
|
21
|
-
description: 'This is an external user identifier defined by data providers.',
|
|
22
|
-
type: 'string',
|
|
23
|
-
required: true,
|
|
24
|
-
default: { '@path': '$.userId' }
|
|
25
|
-
},
|
|
26
|
-
email: {
|
|
27
|
-
label: 'Email',
|
|
28
|
-
description: 'User email address. Vaule will be hashed before sending to Amazon.',
|
|
29
|
-
type: 'string',
|
|
30
|
-
required: false,
|
|
31
|
-
default: { '@path': '$.properties.email' }
|
|
32
|
-
},
|
|
33
|
-
firstName: {
|
|
34
|
-
label: 'First name',
|
|
35
|
-
description: 'User first name. Value will be hashed before sending to Amazon.',
|
|
36
|
-
type: 'string',
|
|
37
|
-
required: false,
|
|
38
|
-
default: { '@path': '$.properties.first_name' }
|
|
39
|
-
},
|
|
40
|
-
lastName: {
|
|
41
|
-
label: 'Last name',
|
|
42
|
-
description: 'User Last name. Value will be hashed before sending to Amazon.',
|
|
43
|
-
type: 'string',
|
|
44
|
-
required: false,
|
|
45
|
-
default: { '@path': '$.properties.last_name' }
|
|
46
|
-
},
|
|
47
|
-
phone: {
|
|
48
|
-
label: 'Phone',
|
|
49
|
-
description: 'Phone Number. Value will be hashed before sending to Amazon.',
|
|
50
|
-
type: 'string',
|
|
51
|
-
required: false,
|
|
52
|
-
default: { '@path': '$.properties.phone' }
|
|
53
|
-
},
|
|
54
|
-
postal: {
|
|
55
|
-
label: 'Postal',
|
|
56
|
-
description: 'POstal Code. Value will be hashed before sending to Amazon.',
|
|
57
|
-
type: 'string',
|
|
58
|
-
required: false,
|
|
59
|
-
default: { '@path': '$.properties.postal' }
|
|
60
|
-
},
|
|
61
|
-
state: {
|
|
62
|
-
label: 'Postal',
|
|
63
|
-
description: 'State Code. Value will be hashed before sending to Amazon.',
|
|
64
|
-
type: 'string',
|
|
65
|
-
required: false,
|
|
66
|
-
default: { '@path': '$.properties.state' }
|
|
67
|
-
},
|
|
68
|
-
city: {
|
|
69
|
-
label: 'City',
|
|
70
|
-
description: 'City name. Value will be hashed before sending to Amazon.',
|
|
71
|
-
type: 'string',
|
|
72
|
-
required: false,
|
|
73
|
-
default: { '@path': '$.properties.city' }
|
|
74
|
-
},
|
|
75
|
-
address: {
|
|
76
|
-
label: 'Address',
|
|
77
|
-
description: 'Address Code. Value will be hashed before sending to Amazon.',
|
|
78
|
-
type: 'string',
|
|
79
|
-
required: false,
|
|
80
|
-
default: { '@path': '$.properties.address' }
|
|
81
|
-
},
|
|
82
|
-
audienceId: {
|
|
83
|
-
label: 'Audience ID',
|
|
84
|
-
type: 'string',
|
|
85
|
-
required: true,
|
|
86
|
-
unsafe_hidden: true,
|
|
87
|
-
description: 'A number value representing the Amazon audience identifier. This is the identifier that is returned during audience creation.',
|
|
88
|
-
default: {
|
|
89
|
-
'@path': '$.context.personas.external_audience_id'
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
enable_batching: {
|
|
93
|
-
label: 'Enable Batching',
|
|
94
|
-
description: 'When enabled,segment will send data in batching',
|
|
95
|
-
type: 'boolean',
|
|
96
|
-
required: true,
|
|
97
|
-
default: true
|
|
98
|
-
},
|
|
99
|
-
batch_size: {
|
|
100
|
-
label: 'Batch Size',
|
|
101
|
-
description: 'Maximum number of events to include in each batch. Actual batch sizes may be lower.',
|
|
102
|
-
type: 'number',
|
|
103
|
-
unsafe_hidden: true,
|
|
104
|
-
required: false,
|
|
105
|
-
default: 10000
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
perform: (request, { settings, payload, statsContext, audienceSettings }) => {
|
|
109
|
-
return processPayload(request, settings, [payload], statsContext, audienceSettings);
|
|
110
|
-
},
|
|
111
|
-
performBatch: (request, { settings, payload: payloads, statsContext, audienceSettings }) => {
|
|
112
|
-
return processPayload(request, settings, payloads, statsContext, audienceSettings);
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
async function processPayload(request, settings, payload, statsContext, audienceSettings) {
|
|
116
|
-
const { statsClient, tags: statsTags } = statsContext || {};
|
|
117
|
-
const statsName = 'syncAmazonAdsAudience';
|
|
118
|
-
statsClient?.incr(`${statsName}.intialise`, 1, statsTags);
|
|
119
|
-
const payloadRecord = createPayloadToUploadRecords(payload, audienceSettings);
|
|
120
|
-
const payloadString = JSON.stringify(payloadRecord).replace(/"audienceId":"(\d+)"/, '"audienceId":$1');
|
|
121
|
-
const response = await request(`${settings.region}/amc/audiences/records`, {
|
|
122
|
-
method: 'POST',
|
|
123
|
-
body: payloadString,
|
|
124
|
-
headers: {
|
|
125
|
-
'Content-Type': 'application/vnd.amcaudiences.v1+json'
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
const result = response.data;
|
|
129
|
-
return {
|
|
130
|
-
result
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
function createPayloadToUploadRecords(payloads, audienceSettings) {
|
|
134
|
-
const records = [];
|
|
135
|
-
const { audienceId } = payloads[0];
|
|
136
|
-
payloads.forEach((payload) => {
|
|
137
|
-
const hashedPII = {};
|
|
138
|
-
if (payload.firstName) {
|
|
139
|
-
hashedPII.firstname = normalizeAndHash(payload.firstName);
|
|
140
|
-
}
|
|
141
|
-
if (payload.lastName) {
|
|
142
|
-
hashedPII.lastname = normalizeAndHash(payload.lastName);
|
|
143
|
-
}
|
|
144
|
-
if (payload.address) {
|
|
145
|
-
hashedPII.address = normalizeAndHash(payload.address);
|
|
146
|
-
}
|
|
147
|
-
if (payload.postal) {
|
|
148
|
-
hashedPII.postal = normalizeAndHash(payload.postal);
|
|
149
|
-
}
|
|
150
|
-
if (payload.phone) {
|
|
151
|
-
hashedPII.phone = normalizeAndHash(payload.phone);
|
|
152
|
-
}
|
|
153
|
-
if (payload.city) {
|
|
154
|
-
hashedPII.city = normalizeAndHash(payload.city);
|
|
155
|
-
}
|
|
156
|
-
if (payload.state) {
|
|
157
|
-
hashedPII.state = normalizeAndHash(payload.state);
|
|
158
|
-
}
|
|
159
|
-
if (payload.email) {
|
|
160
|
-
hashedPII.email = normalizeAndHash(payload.email);
|
|
161
|
-
}
|
|
162
|
-
const payloadRecord = {
|
|
163
|
-
externalUserId: payload.externalUserId,
|
|
164
|
-
countryCode: audienceSettings.countryCode,
|
|
165
|
-
action: payload.event_name == 'Audience Entered' ? utils_1.CONSTANTS.CREATE : utils_1.CONSTANTS.DELETE,
|
|
166
|
-
hashedPII: [hashedPII]
|
|
167
|
-
};
|
|
168
|
-
records.push(payloadRecord);
|
|
169
|
-
});
|
|
170
|
-
return {
|
|
171
|
-
records: records,
|
|
172
|
-
audienceId: audienceId
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
function normalizeAndHash(data) {
|
|
176
|
-
const normalizedData = data.toLowerCase().trim();
|
|
177
|
-
const hash = crypto_1.createHash('sha256');
|
|
178
|
-
hash.update(normalizedData);
|
|
179
|
-
return hash.digest('hex');
|
|
180
|
-
}
|
|
181
|
-
exports.default = action;
|
|
182
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amazon-ads/syncAudiences/index.ts"],"names":[],"mappings":";;AAGA,oCAAyD;AACzD,mCAAmC;AAGnC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,qDAAqD;IAClE,mBAAmB,EAAE,yDAAyD;IAC9E,MAAM,EAAE;QACN,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,wCAAwC;YACrD,IAAI,EAAE,QAAQ;YACd,aAAa,EAAE,IAAI;YACnB,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,cAAc,EAAE;YACd,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,gEAAgE;YAC7E,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,oEAAoE;YACjF,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;SAC3C;QACD,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,iEAAiE;YAC9E,IAAI,E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,CAAA;SAClD;QACD,IAAI,OAAO,CAAC,IAAI,EAAE;YAChB,SAAS,CAAC,IAAI,GAAG,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;SAChD;QACD,IAAI,OAAO,CAAC,KAAK,EAAE;YACjB,SAAS,CAAC,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;SAClD;QACD,IAAI,OAAO,CAAC,KAAK,EAAE;YACjB,SAAS,CAAC,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;SAClD;QAED,MAAM,aAAa,GAAmB;YACpC,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,WAAW,EAAE,gBAAgB,CAAC,WAAW;YACzC,MAAM,EAAE,OAAO,CAAC,UAAU,IAAI,kBAAkB,CAAC,CAAC,CAAC,iBAAS,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAS,CAAC,MAAM;YACtF,SAAS,EAAE,CAAC,SAAS,CAAC;SACvB,CAAA;QACD,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAC7B,CAAC,CAAC,CAAA;IAEF,OAAO;QACL,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,UAAU;KACvB,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY;IAEpC,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAA;IAEhD,MAAM,IAAI,GAAG,mBAAU,CAAC,QAAQ,CAAC,CAAA;IACjC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;IAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC3B,CAAC;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { HTTPError } from '@segment/actions-core';
|
|
2
|
-
export interface RefreshTokenResponse {
|
|
3
|
-
access_token: string;
|
|
4
|
-
scope: string;
|
|
5
|
-
expires_in: number;
|
|
6
|
-
token_type: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class AmazonTestAuthenticationError extends HTTPError {
|
|
9
|
-
response: Response & {
|
|
10
|
-
data: {
|
|
11
|
-
message: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export declare class AmazonRefreshTokenError extends HTTPError {
|
|
16
|
-
response: Response & {
|
|
17
|
-
data: {
|
|
18
|
-
error: string;
|
|
19
|
-
error_description: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export interface HashedPIIObject {
|
|
24
|
-
firstname?: string;
|
|
25
|
-
lastname?: string;
|
|
26
|
-
phone?: string;
|
|
27
|
-
city?: string;
|
|
28
|
-
state?: string;
|
|
29
|
-
postal?: string;
|
|
30
|
-
email?: string;
|
|
31
|
-
address?: string;
|
|
32
|
-
}
|
|
33
|
-
export interface AudienceRecord {
|
|
34
|
-
hashedPII?: HashedPIIObject[];
|
|
35
|
-
externalUserId: string;
|
|
36
|
-
countryCode: string;
|
|
37
|
-
action: string;
|
|
38
|
-
}
|
|
39
|
-
export interface TargetResourceRecords {
|
|
40
|
-
connectionId: string;
|
|
41
|
-
targetTypes: string[];
|
|
42
|
-
}
|
|
43
|
-
export interface AudienceRecordPayload {
|
|
44
|
-
records: AudienceRecord[];
|
|
45
|
-
targetResource: TargetResourceRecords;
|
|
46
|
-
audienceId: number;
|
|
47
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AmazonRefreshTokenError = exports.AmazonTestAuthenticationError = void 0;
|
|
4
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
-
class AmazonTestAuthenticationError extends actions_core_1.HTTPError {
|
|
6
|
-
}
|
|
7
|
-
exports.AmazonTestAuthenticationError = AmazonTestAuthenticationError;
|
|
8
|
-
class AmazonRefreshTokenError extends actions_core_1.HTTPError {
|
|
9
|
-
}
|
|
10
|
-
exports.AmazonRefreshTokenError = AmazonRefreshTokenError;
|
|
11
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/types.ts"],"names":[],"mappings":";;;AAAA,wDAAiD;AAajD,MAAa,6BAA8B,SAAQ,wBAAS;CAM3D;AAND,sEAMC;AAED,MAAa,uBAAwB,SAAQ,wBAAS;CAOrD;AAPD,0DAOC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { HTTPError } from '@segment/actions-core';
|
|
2
|
-
export declare class AmazonAdsError extends HTTPError {
|
|
3
|
-
response: Response & {
|
|
4
|
-
data: {
|
|
5
|
-
status: string;
|
|
6
|
-
message: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export interface AudiencePayload {
|
|
11
|
-
name: string;
|
|
12
|
-
description: string;
|
|
13
|
-
countryCode: string;
|
|
14
|
-
targetResource: {
|
|
15
|
-
advertiserId: string;
|
|
16
|
-
};
|
|
17
|
-
metadata: {
|
|
18
|
-
externalAudienceId: string;
|
|
19
|
-
ttl?: number;
|
|
20
|
-
audienceFees?: {
|
|
21
|
-
cpmCents: number;
|
|
22
|
-
currency: string;
|
|
23
|
-
}[];
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export interface RecordsResponseType {
|
|
27
|
-
jobRequestId: string;
|
|
28
|
-
}
|
|
29
|
-
export declare const AUTHORIZATION_URL: any;
|
|
30
|
-
export declare const CONSTANTS: {
|
|
31
|
-
CREATE: string;
|
|
32
|
-
DELETE: string;
|
|
33
|
-
};
|
|
34
|
-
export declare const CURRENCY: string[];
|
|
35
|
-
export declare const REGEX_AUDIENCEID: RegExp;
|
|
36
|
-
export declare const REGEX_ADVERTISERID: RegExp;
|
|
37
|
-
export declare function extractNumberAndSubstituteWithStringValue(responseString: string, regex: any, substituteWith: string): any;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extractNumberAndSubstituteWithStringValue = exports.REGEX_ADVERTISERID = exports.REGEX_AUDIENCEID = exports.CURRENCY = exports.CONSTANTS = exports.AUTHORIZATION_URL = exports.AmazonAdsError = void 0;
|
|
4
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
-
class AmazonAdsError extends actions_core_1.HTTPError {
|
|
6
|
-
}
|
|
7
|
-
exports.AmazonAdsError = AmazonAdsError;
|
|
8
|
-
exports.AUTHORIZATION_URL = {
|
|
9
|
-
'https://advertising-api.amazon.com': 'https://api.amazon.com',
|
|
10
|
-
'https://advertising-api-eu.amazon.com': 'https://api.amazon.co.uk',
|
|
11
|
-
'https://advertising-api-fe.amazon.com': 'https://api.amazon.co.jp'
|
|
12
|
-
};
|
|
13
|
-
exports.CONSTANTS = {
|
|
14
|
-
CREATE: 'CREATE',
|
|
15
|
-
DELETE: 'DELETE'
|
|
16
|
-
};
|
|
17
|
-
exports.CURRENCY = ['USD', 'CAD', 'JPY', 'GBP', 'EUR', 'SAR', 'AUD', 'AED', 'CNY', 'MXN', 'INR', 'SEK', 'TRY'];
|
|
18
|
-
exports.REGEX_AUDIENCEID = /"audienceId":(\d+)/;
|
|
19
|
-
exports.REGEX_ADVERTISERID = /"advertiserId":"(\d+)"/;
|
|
20
|
-
function extractNumberAndSubstituteWithStringValue(responseString, regex, substituteWith) {
|
|
21
|
-
const resString = responseString.replace(regex, substituteWith);
|
|
22
|
-
return JSON.parse(resString);
|
|
23
|
-
}
|
|
24
|
-
exports.extractNumberAndSubstituteWithStringValue = extractNumberAndSubstituteWithStringValue;
|
|
25
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/utils.ts"],"names":[],"mappings":";;;AAAA,wDAAiD;AAEjD,MAAa,cAAe,SAAQ,wBAAS;CAO5C;AAPD,wCAOC;AAsBY,QAAA,iBAAiB,GAAQ;IACpC,oCAAoC,EAAE,wBAAwB;IAC9D,uCAAuC,EAAE,0BAA0B;IACnE,uCAAuC,EAAE,0BAA0B;CACpE,CAAA;AACY,QAAA,SAAS,GAAG;IACvB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACjB,CAAA;AACY,QAAA,QAAQ,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;AAEtG,QAAA,gBAAgB,GAAG,oBAAoB,CAAA;AACvC,QAAA,kBAAkB,GAAG,wBAAwB,CAAA;AAE1D,SAAgB,yCAAyC,CAAC,cAAsB,EAAE,KAAU,EAAE,cAAsB;IAClH,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,CAAA;IAC/D,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;AAC9B,CAAC;AAHD,8FAGC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const PERSONALIZE_API_BASE_URL = "https://personalization-api.contentstack.com";
|
|
2
|
-
export declare const PERSONALIZE_EDGE_API_URL = "https://personalization-edge.contentstack.com";
|
|
3
|
-
export declare const ACCESS_TOKEN_URL = "https://developerhub-api.contentstack.com/apps/token";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ACCESS_TOKEN_URL = exports.PERSONALIZE_EDGE_API_URL = exports.PERSONALIZE_API_BASE_URL = void 0;
|
|
4
|
-
exports.PERSONALIZE_API_BASE_URL = 'https://personalization-api.contentstack.com';
|
|
5
|
-
exports.PERSONALIZE_EDGE_API_URL = 'https://personalization-edge.contentstack.com';
|
|
6
|
-
exports.ACCESS_TOKEN_URL = 'https://developerhub-api.contentstack.com/apps/token';
|
|
7
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/destinations/contentstack/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG,8CAA8C,CAAA;AACzE,QAAA,wBAAwB,GAAG,+CAA+C,CAAA;AAC1E,QAAA,gBAAgB,GAAG,sDAAsD,CAAA"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.destinationDefinition = void 0;
|
|
4
|
-
const sendEmail_1 = require("./sendEmail");
|
|
5
|
-
const previewApiLookup_1 = require("./previewApiLookup");
|
|
6
|
-
exports.destinationDefinition = {
|
|
7
|
-
name: 'Engage Messaging SendGrid',
|
|
8
|
-
slug: 'actions-personas-messaging-sendgrid',
|
|
9
|
-
mode: 'cloud',
|
|
10
|
-
description: 'This is an Engage specific action to send an email',
|
|
11
|
-
authentication: {
|
|
12
|
-
scheme: 'custom',
|
|
13
|
-
fields: {
|
|
14
|
-
unlayerApiKey: {
|
|
15
|
-
label: 'Unlayer API Key',
|
|
16
|
-
type: 'password',
|
|
17
|
-
description: 'The API key for your Unlayer account'
|
|
18
|
-
},
|
|
19
|
-
sendGridApiKey: {
|
|
20
|
-
label: 'API Key',
|
|
21
|
-
type: 'password',
|
|
22
|
-
description: 'The Api Key for your SendGrid account',
|
|
23
|
-
required: true
|
|
24
|
-
},
|
|
25
|
-
profileApiEnvironment: {
|
|
26
|
-
label: 'Profile API Environment',
|
|
27
|
-
description: 'Profile API Environment',
|
|
28
|
-
type: 'string',
|
|
29
|
-
required: true
|
|
30
|
-
},
|
|
31
|
-
profileApiAccessToken: {
|
|
32
|
-
label: 'Profile API Access Token',
|
|
33
|
-
description: 'Profile API Access Token',
|
|
34
|
-
type: 'password',
|
|
35
|
-
required: true
|
|
36
|
-
},
|
|
37
|
-
spaceId: {
|
|
38
|
-
label: 'Space ID',
|
|
39
|
-
description: 'Space ID',
|
|
40
|
-
type: 'string',
|
|
41
|
-
required: true
|
|
42
|
-
},
|
|
43
|
-
sourceId: {
|
|
44
|
-
label: 'Source ID',
|
|
45
|
-
description: 'Source ID',
|
|
46
|
-
type: 'string',
|
|
47
|
-
required: true
|
|
48
|
-
},
|
|
49
|
-
region: {
|
|
50
|
-
label: 'Region',
|
|
51
|
-
description: 'The region where the email is originating from',
|
|
52
|
-
type: 'string',
|
|
53
|
-
choices: [
|
|
54
|
-
{ value: 'us-west-2', label: 'US West 2' },
|
|
55
|
-
{ value: 'eu-west-1', label: 'EU West 1' }
|
|
56
|
-
],
|
|
57
|
-
default: 'us-west-2',
|
|
58
|
-
required: false
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
testAuthentication: (request) => {
|
|
62
|
-
return request('https://api.sendgrid.com/v3/mail_settings');
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
actions: {
|
|
66
|
-
sendEmail: sendEmail_1.actionDefinition,
|
|
67
|
-
previewApiLookup: previewApiLookup_1.actionDefinition
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=destinationDefinition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"destinationDefinition.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/destinationDefinition.ts"],"names":[],"mappings":";;;AAEA,2CAA2D;AAC3D,yDAAyE;AAE5D,QAAA,qBAAqB,GAAoC;IACpE,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,qCAAqC;IAC3C,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,oDAAoD;IACjE,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM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;CACF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../engage-messaging-sendgrid/generated-types';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("../../engage-messaging-sendgrid/generated-types"), exports);
|
|
14
|
-
//# sourceMappingURL=generated-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/generated-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kFAA+D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/index.ts"],"names":[],"mappings":";;AAAA,mEAA+D;AAC/D,kBAAe,6CAAqB,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.actionDefinition = void 0;
|
|
4
|
-
const apiLookups_1 = require("../../utils/apiLookups");
|
|
5
|
-
exports.actionDefinition = {
|
|
6
|
-
title: 'Perform a single API lookup',
|
|
7
|
-
description: 'Perform a single API lookup and return the response',
|
|
8
|
-
fields: {
|
|
9
|
-
...apiLookups_1.apiLookupActionFields,
|
|
10
|
-
traits: {
|
|
11
|
-
label: 'Traits',
|
|
12
|
-
description: "A user profile's traits",
|
|
13
|
-
type: 'object',
|
|
14
|
-
required: false
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
perform: async (request, { settings, payload, statsContext, logger }) => {
|
|
18
|
-
const statsClient = statsContext?.statsClient;
|
|
19
|
-
const tags = statsContext?.tags ?? [];
|
|
20
|
-
const { traits = {}, ...apiLookupConfig } = payload;
|
|
21
|
-
const profile = { traits: traits };
|
|
22
|
-
const data = await apiLookups_1.performApiLookup(request, apiLookupConfig, profile, statsClient, tags, settings, logger);
|
|
23
|
-
return {
|
|
24
|
-
data
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=actionDefinition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actionDefinition.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/sendgrid/previewApiLookup/actionDefinition.ts"],"names":[],"mappings":";;;AAGA,uDAAgF;AAGnE,QAAA,gBAAgB,GAAwC;IACnE,KAAK,EAAE,6BAA6B;IACpC,WAAW,EAAE,qDAAqD;IAClE,MAAM,EAAE;QACN,GAAG,kCAAqB;QACxB,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE;QACtE,MAAM,WAAW,GAAG,YAAY,EAAE,WAAW,CAAA;QAC7C,MAAM,IAAI,GAAG,YAAY,EAAE,IAAI,IAAI,EAAE,CAAA;QACrC,MAAM,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,eAAe,EAAE,GAAG,OAAO,CAAA;QACnD,MAAM,OAAO,GAAY,EAAE,MAAM,EAAE,MAAgC,EAAE,CAAA;QACrE,MAAM,IAAI,GAAG,MAAM,6BAAgB,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;QAC3G,OAAO;YACL,IAAI;SACL,CAAA;IACH,CAAC;CACF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../../engage-messaging-sendgrid/previewApiLookup.types';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("../../../engage-messaging-sendgrid/previewApiLookup.types"), exports);
|
|
14
|
-
//# sourceMappingURL=generated-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/sendgrid/previewApiLookup/generated-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4FAAyE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './actionDefinition';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./actionDefinition"), exports);
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/sendgrid/previewApiLookup/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAkC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { ExtId, MessageSendPerformer, OperationContext, ResponseError } from '../../utils';
|
|
2
|
-
import type { Settings } from '../generated-types';
|
|
3
|
-
import type { Payload } from './generated-types';
|
|
4
|
-
import { Profile } from '../../utils/Profile';
|
|
5
|
-
import { Liquid as LiquidJs } from 'liquidjs';
|
|
6
|
-
import { ApiLookupConfig, apiLookupLiquidKey } from '../../utils/apiLookups';
|
|
7
|
-
export declare const EXTERNAL_ID_KEY = "email";
|
|
8
|
-
export declare const Liquid: LiquidJs;
|
|
9
|
-
export declare class SendEmailPerformer extends MessageSendPerformer<Settings, Payload> {
|
|
10
|
-
getIntegrationStatsName(): string;
|
|
11
|
-
getChannelType(): string;
|
|
12
|
-
getDefaultSettingsRegion(): string;
|
|
13
|
-
isSupportedExternalId(externalId: ExtId<Payload>): boolean;
|
|
14
|
-
isExternalIdSubscribed(extId: ExtId<Payload>): boolean | undefined;
|
|
15
|
-
getRecepients(): ExtId<Payload>[];
|
|
16
|
-
parseTemplating(content: string, liquidData: {
|
|
17
|
-
profile: Profile;
|
|
18
|
-
[apiLookupLiquidKey]?: Record<string, unknown>;
|
|
19
|
-
}, contentType: string): Promise<any>;
|
|
20
|
-
sendToRecepient(emailProfile: ExtId<Payload>): Promise<import("@segment/actions-core").ModifiedResponse<unknown> | undefined>;
|
|
21
|
-
getBodyTemplateFromS3(bodyUrl: string): Promise<string>;
|
|
22
|
-
getBodyHtml(profile: Profile, apiLookupData: Record<string, unknown>, emailProfile: {
|
|
23
|
-
id?: string | undefined;
|
|
24
|
-
type?: string | undefined;
|
|
25
|
-
subscriptionStatus?: string | undefined;
|
|
26
|
-
unsubscribeLink?: string | undefined;
|
|
27
|
-
preferencesLink?: string | undefined;
|
|
28
|
-
groups?: {
|
|
29
|
-
id?: string | undefined;
|
|
30
|
-
isSubscribed?: boolean | undefined;
|
|
31
|
-
groupUnsubscribeLink?: string | undefined;
|
|
32
|
-
}[] | undefined;
|
|
33
|
-
}): Promise<string>;
|
|
34
|
-
generateEmailHtml(design: string): Promise<string>;
|
|
35
|
-
performApiLookups(this: SendEmailPerformer, apiLookups: ApiLookupConfig[] | undefined, profile: Profile): Promise<Record<string, unknown>>;
|
|
36
|
-
validateLinkAndLog(link: string): void;
|
|
37
|
-
insertUnsubscribeLinks(html: string, emailProfile: EmailProfile): string;
|
|
38
|
-
onResponse(args: {
|
|
39
|
-
response?: Response;
|
|
40
|
-
error?: ResponseError;
|
|
41
|
-
operation: OperationContext;
|
|
42
|
-
}): void;
|
|
43
|
-
}
|
|
44
|
-
export declare type EmailProfile = ExtId<Payload>;
|