@segment/action-destinations 3.371.1-staging-a7eb4afb2.0 → 3.371.1-staging-d7c88b52a
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/accoil-analytics/postToAccoil/generated-types.d.ts +5 -0
- package/dist/destinations/accoil-analytics/postToAccoil/generated-types.js +3 -0
- package/dist/destinations/accoil-analytics/postToAccoil/generated-types.js.map +1 -0
- package/dist/destinations/accoil-analytics/postToAccoil/index.d.ts +5 -0
- package/dist/destinations/accoil-analytics/postToAccoil/index.js +27 -0
- package/dist/destinations/accoil-analytics/postToAccoil/index.js.map +1 -0
- package/dist/destinations/amazon-ads/generated-types.d.ts +3 -0
- package/dist/destinations/amazon-ads/generated-types.js +3 -0
- package/dist/destinations/amazon-ads/generated-types.js.map +1 -0
- package/dist/destinations/amazon-ads/index.d.ts +4 -0
- package/dist/destinations/amazon-ads/index.js +87 -0
- package/dist/destinations/amazon-ads/index.js.map +1 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +2 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js +3 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +1 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.d.ts +5 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.js +15 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -0
- package/dist/destinations/amazon-ads/types.d.ts +22 -0
- package/dist/destinations/amazon-ads/types.js +11 -0
- package/dist/destinations/amazon-ads/types.js.map +1 -0
- package/dist/destinations/amazon-ads/utils.d.ts +25 -0
- package/dist/destinations/amazon-ads/utils.js +8 -0
- package/dist/destinations/amazon-ads/utils.js.map +1 -0
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.d.ts +22 -0
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js +3 -0
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +1 -0
- package/dist/destinations/dynamic-yield-audiences/types.d.ts +8 -0
- package/dist/destinations/dynamic-yield-audiences/types.js +12 -0
- package/dist/destinations/dynamic-yield-audiences/types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +3 -0
- package/dist/destinations/engage/sendgrid/destinationDefinition.js +70 -0
- package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +1 -0
- package/dist/destinations/engage/sendgrid/generated-types.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/generated-types.js +14 -0
- package/dist/destinations/engage/sendgrid/generated-types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/index.d.ts +2 -0
- package/dist/destinations/engage/sendgrid/index.js +5 -0
- package/dist/destinations/engage/sendgrid/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +28 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +14 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +14 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +44 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +419 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +12 -0
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +3 -0
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +257 -0
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +14 -0
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/index.js +14 -0
- package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +23 -0
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +14 -0
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +1 -0
- package/dist/destinations/engage/twilio/destinationDefinition.d.ts +3 -0
- package/dist/destinations/engage/twilio/destinationDefinition.js +172 -0
- package/dist/destinations/engage/twilio/destinationDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/index.d.ts +2 -0
- package/dist/destinations/engage/twilio/index.js +5 -0
- package/dist/destinations/engage/twilio/index.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +29 -0
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +169 -0
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +250 -0
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/index.js +14 -0
- package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +9 -0
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +72 -0
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +162 -0
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendSms/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/index.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendSms/index.js +14 -0
- package/dist/destinations/engage/twilio/sendSms/index.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +9 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +89 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +136 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js +14 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +16 -0
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +71 -0
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +16 -0
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +115 -0
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/index.d.ts +2 -0
- package/dist/destinations/engage/twilio/utils/index.js +15 -0
- package/dist/destinations/engage/twilio/utils/index.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/types.d.ts +23 -0
- package/dist/destinations/engage/twilio/utils/types.js +3 -0
- package/dist/destinations/engage/twilio/utils/types.js.map +1 -0
- package/dist/destinations/engage/utils/AggregateError.d.ts +14 -0
- package/dist/destinations/engage/utils/AggregateError.js +26 -0
- package/dist/destinations/engage/utils/AggregateError.js.map +1 -0
- package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +42 -0
- package/dist/destinations/engage/utils/EngageActionPerformer.js +148 -0
- package/dist/destinations/engage/utils/EngageActionPerformer.js.map +1 -0
- package/dist/destinations/engage/utils/EngageLogger.d.ts +18 -0
- package/dist/destinations/engage/utils/EngageLogger.js +52 -0
- package/dist/destinations/engage/utils/EngageLogger.js.map +1 -0
- package/dist/destinations/engage/utils/EngageStats.d.ts +18 -0
- package/dist/destinations/engage/utils/EngageStats.js +95 -0
- package/dist/destinations/engage/utils/EngageStats.js.map +1 -0
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +12 -0
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +31 -0
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +1 -0
- package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +65 -0
- package/dist/destinations/engage/utils/MessageSendPerformer.js +211 -0
- package/dist/destinations/engage/utils/MessageSendPerformer.js.map +1 -0
- package/dist/destinations/engage/utils/Profile.d.ts +6 -0
- package/dist/destinations/engage/utils/Profile.js +3 -0
- package/dist/destinations/engage/utils/Profile.js.map +1 -0
- package/dist/destinations/engage/utils/ResponseError.d.ts +25 -0
- package/dist/destinations/engage/utils/ResponseError.js +22 -0
- package/dist/destinations/engage/utils/ResponseError.js.map +1 -0
- package/dist/destinations/engage/utils/apiLookups.d.ts +22 -0
- package/dist/destinations/engage/utils/apiLookups.js +189 -0
- package/dist/destinations/engage/utils/apiLookups.js.map +1 -0
- package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +2 -0
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js +10 -0
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +1 -0
- package/dist/destinations/engage/utils/index.d.ts +9 -0
- package/dist/destinations/engage/utils/index.js +22 -0
- package/dist/destinations/engage/utils/index.js.map +1 -0
- package/dist/destinations/engage/utils/isDestinationActionService.d.ts +1 -0
- package/dist/destinations/engage/utils/isDestinationActionService.js +8 -0
- package/dist/destinations/engage/utils/isDestinationActionService.js.map +1 -0
- package/dist/destinations/engage/utils/isRetryableError.d.ts +2 -0
- package/dist/destinations/engage/utils/isRetryableError.js +33 -0
- package/dist/destinations/engage/utils/isRetryableError.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +1 -0
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +3 -0
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +46 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +46 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +12 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +23 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +12 -0
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +35 -0
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +14 -0
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +31 -0
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +31 -0
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +104 -0
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +39 -0
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js +130 -0
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +377 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +23 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js +49 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +6 -0
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js +3 -0
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/index.d.ts +10 -0
- package/dist/destinations/engage/utils/operationTracking/index.js +23 -0
- package/dist/destinations/engage/utils/operationTracking/index.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +21 -0
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +99 -0
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +1 -0
- package/dist/destinations/engage/utils/testUtils.d.ts +6 -0
- package/dist/destinations/engage/utils/testUtils.js +26 -0
- package/dist/destinations/engage/utils/testUtils.js.map +1 -0
- package/dist/destinations/engage/utils/track.d.ts +52 -0
- package/dist/destinations/engage/utils/track.js +9 -0
- package/dist/destinations/engage/utils/track.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +16 -0
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +3 -0
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +56 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +3 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +39 -0
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.d.ts +23 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js +131 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +27 -0
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.d.ts +21 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js +75 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +25 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.d.ts +24 -0
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js +111 -0
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js.map +1 -0
- package/dist/destinations/facebook-custom-audiences/add/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-custom-audiences/add/generated-types.js +3 -0
- package/dist/destinations/facebook-custom-audiences/add/generated-types.js.map +1 -0
- package/dist/destinations/facebook-custom-audiences/add/index.d.ts +5 -0
- package/dist/destinations/facebook-custom-audiences/add/index.js +11 -0
- package/dist/destinations/facebook-custom-audiences/add/index.js.map +1 -0
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.js +3 -0
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.js.map +1 -0
- package/dist/destinations/facebook-custom-audiences/remove/index.d.ts +5 -0
- package/dist/destinations/facebook-custom-audiences/remove/index.js +11 -0
- package/dist/destinations/facebook-custom-audiences/remove/index.js.map +1 -0
- package/dist/destinations/hubspot/helperFunctions.d.ts +7 -0
- package/dist/destinations/hubspot/helperFunctions.js +27 -0
- package/dist/destinations/hubspot/helperFunctions.js.map +1 -0
- package/dist/destinations/mixpanel/utils.d.ts +13 -0
- package/dist/destinations/mixpanel/utils.js +117 -0
- package/dist/destinations/mixpanel/utils.js.map +1 -0
- package/dist/destinations/responsys/shared_properties.d.ts +3 -0
- package/dist/destinations/responsys/shared_properties.js +19 -0
- package/dist/destinations/responsys/shared_properties.js.map +1 -0
- package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +30 -0
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js +316 -0
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -0
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +34 -0
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -0
- package/dist/destinations/vernst-test/generated-types.d.ts +2 -0
- package/dist/destinations/vernst-test/generated-types.js +3 -0
- package/dist/destinations/vernst-test/generated-types.js.map +1 -0
- package/dist/destinations/vernst-test/index.d.ts +4 -0
- package/dist/destinations/vernst-test/index.js +20 -0
- package/dist/destinations/vernst-test/index.js.map +1 -0
- package/dist/destinations/vernst-test/pingWebhook/generated-types.d.ts +3 -0
- package/dist/destinations/vernst-test/pingWebhook/generated-types.js +3 -0
- package/dist/destinations/vernst-test/pingWebhook/generated-types.js.map +1 -0
- package/dist/destinations/vernst-test/pingWebhook/index.d.ts +5 -0
- package/dist/destinations/vernst-test/pingWebhook/index.js +21 -0
- package/dist/destinations/vernst-test/pingWebhook/index.js.map +1 -0
- package/dist/destinations/warehouse-test/client.d.ts +27 -0
- package/dist/destinations/warehouse-test/client.js +121 -0
- package/dist/destinations/warehouse-test/client.js.map +1 -0
- package/dist/destinations/warehouse-test/fields.d.ts +3 -0
- package/dist/destinations/warehouse-test/fields.js +71 -0
- package/dist/destinations/warehouse-test/fields.js.map +1 -0
- package/dist/destinations/warehouse-test/generated-types.d.ts +7 -0
- package/dist/destinations/warehouse-test/generated-types.js +3 -0
- package/dist/destinations/warehouse-test/generated-types.js.map +1 -0
- package/dist/destinations/warehouse-test/index.d.ts +4 -0
- package/dist/destinations/warehouse-test/index.js +58 -0
- package/dist/destinations/warehouse-test/index.js.map +1 -0
- package/dist/destinations/warehouse-test/syncToWarehouse/generated-types.d.ts +5 -0
- package/dist/destinations/warehouse-test/syncToWarehouse/generated-types.js +3 -0
- package/dist/destinations/warehouse-test/syncToWarehouse/generated-types.js.map +1 -0
- package/dist/destinations/warehouse-test/syncToWarehouse/index.d.ts +5 -0
- package/dist/destinations/warehouse-test/syncToWarehouse/index.js +37 -0
- package/dist/destinations/warehouse-test/syncToWarehouse/index.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/accoil-analytics/postToAccoil/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Post to Accoil',
|
|
5
|
+
description: 'Send Data to Accoil Analytics',
|
|
6
|
+
defaultSubscription: 'type = "track"',
|
|
7
|
+
fields: {
|
|
8
|
+
segmentEventData: {
|
|
9
|
+
label: 'Event Payload',
|
|
10
|
+
description: 'Segment Event Payload',
|
|
11
|
+
type: 'object',
|
|
12
|
+
unsafe_hidden: true,
|
|
13
|
+
required: true,
|
|
14
|
+
default: {
|
|
15
|
+
'@path': '$.'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
perform: (request, { payload }) => {
|
|
20
|
+
return request(`https://in.accoil.com/segment`, {
|
|
21
|
+
method: 'post',
|
|
22
|
+
json: payload.segmentEventData
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.default = action;
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/accoil-analytics/postToAccoil/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,+BAA+B;IAC5C,mBAAmB,EAAE,gBAAgB;IAErC,MAAM,EAAE;QACN,gBAAgB,EAAE;YAChB,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,uBAAuB;YACpC,IAAI,EAAE,QAAQ;YACd,aAAa,EAAE,IAAI;YACnB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;aACd;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,OAAO,OAAO,CAAC,+BAA+B,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO,CAAC,gBAAgB;SAC/B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
7
|
+
const syncAudiences_1 = __importDefault(require("./syncAudiences"));
|
|
8
|
+
const destination = {
|
|
9
|
+
name: 'Amazon Ads',
|
|
10
|
+
slug: 'actions-amazon-ads',
|
|
11
|
+
mode: 'cloud',
|
|
12
|
+
authentication: {
|
|
13
|
+
scheme: 'oauth2',
|
|
14
|
+
fields: {
|
|
15
|
+
region: {
|
|
16
|
+
label: 'Region',
|
|
17
|
+
description: 'Region for API Endpoint, either NA, EU, FE.',
|
|
18
|
+
choices: [
|
|
19
|
+
{ label: 'North America (NA)', value: 'https://advertising-api.amazon.com' },
|
|
20
|
+
{ label: 'Europe (EU)', value: 'https://advertising-api-eu.amazon.com' },
|
|
21
|
+
{ label: 'Far East (FE)', value: 'https://advertising-api-fe.amazon.com' }
|
|
22
|
+
],
|
|
23
|
+
default: 'North America (NA)',
|
|
24
|
+
type: 'string',
|
|
25
|
+
required: true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
testAuthentication: async (request, { auth }) => {
|
|
29
|
+
if (!auth?.accessToken) {
|
|
30
|
+
throw new actions_core_1.InvalidAuthenticationError('Please authenticate via Oauth before enabling the destination.');
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
await request('https://advertising-api.amazon.com/v2/profiles', {
|
|
34
|
+
method: 'GET'
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
const error = e;
|
|
39
|
+
if (error.message === 'Unauthorized') {
|
|
40
|
+
throw new Error('Invalid Amazon Oauth access token. Please reauthenticate to retrieve a valid access token before enabling the destination.');
|
|
41
|
+
}
|
|
42
|
+
throw e;
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
refreshAccessToken: async (request, { auth }) => {
|
|
46
|
+
let res;
|
|
47
|
+
try {
|
|
48
|
+
res = await request('https://api.amazon.com/auth/o2/token', {
|
|
49
|
+
method: 'POST',
|
|
50
|
+
body: new URLSearchParams({
|
|
51
|
+
refresh_token: auth.refreshToken,
|
|
52
|
+
client_id: auth.clientId,
|
|
53
|
+
client_secret: auth.clientSecret,
|
|
54
|
+
grant_type: 'refresh_token'
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
const error = e;
|
|
60
|
+
if (error.response?.data?.error === 'invalid_grant') {
|
|
61
|
+
throw new actions_core_1.IntegrationError(`Invalid Authentication: Your refresh token is invalid or expired. Please re-authenticate to fetch a new refresh token.`, actions_core_1.ErrorCodes.REFRESH_TOKEN_EXPIRED, 401);
|
|
62
|
+
}
|
|
63
|
+
throw new actions_core_1.IntegrationError(`Failed to fetch a new access token. Reason: ${error.response?.data?.error}`, actions_core_1.ErrorCodes.OAUTH_REFRESH_FAILED, 401);
|
|
64
|
+
}
|
|
65
|
+
return { accessToken: res?.data?.access_token };
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
extendRequest({ auth }) {
|
|
69
|
+
return {
|
|
70
|
+
headers: {
|
|
71
|
+
authorization: `Bearer ${auth?.accessToken}`
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
audienceFields: {},
|
|
76
|
+
audienceConfig: {
|
|
77
|
+
mode: {
|
|
78
|
+
type: 'synced',
|
|
79
|
+
full_audience_sync: false
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
actions: {
|
|
83
|
+
syncAudiences: syncAudiences_1.default
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
exports.default = destination;
|
|
87
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAgG;AAIhG,oEAA2C;AAG3C,MAAM,WAAW,GAA4C;IAC3D,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,6CAA6C;gBAC1D,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oCAAoC,EAAE;oBAC5E,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,uCAAuC,EAAE;oBACxE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uCAAuC,EAAE;iBAC3E;gBACD,OAAO,EAAE,oBAAoB;gBAC7B,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YAC9C,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE;gBACtB,MAAM,IAAI,yCAA0B,CAAC,gEAAgE,CAAC,CAAA;aACvG;YAED,IAAI;gBACF,MAAM,OAAO,CAAuB,gDAAgD,EAAE;oBACpF,MAAM,EAAE,KAAK;iBACd,CAAC,CAAA;aACH;YAAC,OAAO,CAAM,EAAE;gBACf,MAAM,KAAK,GAAG,CAAkC,CAAA;gBAChD,IAAI,KAAK,CAAC,OAAO,KAAK,cAAc,EAAE;oBACpC,MAAM,IAAI,KAAK,CACb,4HAA4H,CAC7H,CAAA;iBACF;gBACD,MAAM,CAAC,CAAA;aACR;QACH,CAAC;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YAC9C,IAAI,GAAG,CAAA;YAEP,IAAI;gBACF,GAAG,GAAG,MAAM,OAAO,CAAuB,sCAAsC,EAAE;oBAChF,MAAM,EAAE,MAAM;oBACd,IAAI,EAAE,IAAI,eAAe,CAAC;wBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;wBAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;wBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;wBAChC,UAAU,EAAE,eAAe;qBAC5B,CAAC;iBACH,CAAC,CAAA;aACH;YAAC,OAAO,CAAM,EAAE;gBACf,MAAM,KAAK,GAAG,CAA4B,CAAA;gBAC1C,IAAI,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,KAAK,eAAe,EAAE;oBACnD,MAAM,IAAI,+BAAgB,CACxB,wHAAwH,EACxH,yBAAU,CAAC,qBAAqB,EAChC,GAAG,CACJ,CAAA;iBACF;gBAED,MAAM,IAAI,+BAAgB,CACxB,+CAA+C,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAC5E,yBAAU,CAAC,oBAAoB,EAC/B,GAAG,CACJ,CAAA;aACF;YAED,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,CAAA;QACjD,CAAC;KACF;IACD,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;SACF,CAAA;IACH,CAAC;IAED,cAAc,EAAE,EAAE;IAElB,cAAc,EAAE;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,kBAAkB,EAAE,KAAK;SAC1B;KAWF;IACD,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/amazon-ads/syncAudiences/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Sync Audiences',
|
|
5
|
+
description: 'Sync audiences from Segment to Amazon Ads Audience.',
|
|
6
|
+
fields: {},
|
|
7
|
+
perform: (request, data) => {
|
|
8
|
+
return request('https://example.com', {
|
|
9
|
+
method: 'post',
|
|
10
|
+
json: data.payload
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
exports.default = action;
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amazon-ads/syncAudiences/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,qDAAqD;IAClE,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,qBAAqB,EAAE;YACpC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,OAAO;SACnB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
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
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Payload } from './generated-types';
|
|
2
|
+
export interface Data {
|
|
3
|
+
payload: Payload & {
|
|
4
|
+
context?: {
|
|
5
|
+
[k: string]: unknown;
|
|
6
|
+
personas?: {
|
|
7
|
+
computation_key?: string;
|
|
8
|
+
computation_class?: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
rawData?: {
|
|
13
|
+
context?: {
|
|
14
|
+
personas?: {
|
|
15
|
+
computation_key?: string;
|
|
16
|
+
computation_class?: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
properties?: Record<string, boolean>;
|
|
20
|
+
traits?: Record<string, boolean>;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/destinations/dynamic-yield-audiences/syncAudience/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare type AudienceAction = 'ADD' | 'REMOVE';
|
|
2
|
+
export declare enum Priority {
|
|
3
|
+
UserIdThenEmail = "user_id_then_email",
|
|
4
|
+
UserIdThenAnonymousId = "user_id_then_anonymousId",
|
|
5
|
+
UserIdThenEmailThenAnonymousId = "user_id_then_email_then_anonymousId",
|
|
6
|
+
UserIdOnly = "user_id_only",
|
|
7
|
+
EmailOnly = "email_only"
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Priority = void 0;
|
|
4
|
+
var Priority;
|
|
5
|
+
(function (Priority) {
|
|
6
|
+
Priority["UserIdThenEmail"] = "user_id_then_email";
|
|
7
|
+
Priority["UserIdThenAnonymousId"] = "user_id_then_anonymousId";
|
|
8
|
+
Priority["UserIdThenEmailThenAnonymousId"] = "user_id_then_email_then_anonymousId";
|
|
9
|
+
Priority["UserIdOnly"] = "user_id_only";
|
|
10
|
+
Priority["EmailOnly"] = "email_only";
|
|
11
|
+
})(Priority = exports.Priority || (exports.Priority = {}));
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/dynamic-yield-audiences/types.ts"],"names":[],"mappings":";;;AAEA,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,kDAAsC,CAAA;IACtC,8DAAkD,CAAA;IAClD,kFAAsE,CAAA;IACtE,uCAA2B,CAAA;IAC3B,oCAAwB,CAAA;AAC1B,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.destinationDefinition = void 0;
|
|
4
|
+
const sendEmail_1 = require("./sendEmail");
|
|
5
|
+
const previewApiLookup_1 = require("./previewApiLookup");
|
|
6
|
+
exports.destinationDefinition = {
|
|
7
|
+
name: 'Engage Messaging SendGrid',
|
|
8
|
+
slug: 'actions-personas-messaging-sendgrid',
|
|
9
|
+
mode: 'cloud',
|
|
10
|
+
description: 'This is an Engage specific action to send an email',
|
|
11
|
+
authentication: {
|
|
12
|
+
scheme: 'custom',
|
|
13
|
+
fields: {
|
|
14
|
+
unlayerApiKey: {
|
|
15
|
+
label: 'Unlayer API Key',
|
|
16
|
+
type: 'password',
|
|
17
|
+
description: 'The API key for your Unlayer account'
|
|
18
|
+
},
|
|
19
|
+
sendGridApiKey: {
|
|
20
|
+
label: 'API Key',
|
|
21
|
+
type: 'password',
|
|
22
|
+
description: 'The Api Key for your SendGrid account',
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
profileApiEnvironment: {
|
|
26
|
+
label: 'Profile API Environment',
|
|
27
|
+
description: 'Profile API Environment',
|
|
28
|
+
type: 'string',
|
|
29
|
+
required: true
|
|
30
|
+
},
|
|
31
|
+
profileApiAccessToken: {
|
|
32
|
+
label: 'Profile API Access Token',
|
|
33
|
+
description: 'Profile API Access Token',
|
|
34
|
+
type: 'password',
|
|
35
|
+
required: true
|
|
36
|
+
},
|
|
37
|
+
spaceId: {
|
|
38
|
+
label: 'Space ID',
|
|
39
|
+
description: 'Space ID',
|
|
40
|
+
type: 'string',
|
|
41
|
+
required: true
|
|
42
|
+
},
|
|
43
|
+
sourceId: {
|
|
44
|
+
label: 'Source ID',
|
|
45
|
+
description: 'Source ID',
|
|
46
|
+
type: 'string',
|
|
47
|
+
required: true
|
|
48
|
+
},
|
|
49
|
+
region: {
|
|
50
|
+
label: 'Region',
|
|
51
|
+
description: 'The region where the email is originating from',
|
|
52
|
+
type: 'string',
|
|
53
|
+
choices: [
|
|
54
|
+
{ value: 'us-west-2', label: 'US West 2' },
|
|
55
|
+
{ value: 'eu-west-1', label: 'EU West 1' }
|
|
56
|
+
],
|
|
57
|
+
default: 'us-west-2',
|
|
58
|
+
required: false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
testAuthentication: (request) => {
|
|
62
|
+
return request('https://api.sendgrid.com/v3/mail_settings');
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
actions: {
|
|
66
|
+
sendEmail: sendEmail_1.actionDefinition,
|
|
67
|
+
previewApiLookup: previewApiLookup_1.actionDefinition
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=destinationDefinition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destinationDefinition.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/destinationDefinition.ts"],"names":[],"mappings":";;;AAEA,2CAA2D;AAC3D,yDAAyE;AAE5D,QAAA,qBAAqB,GAAoC;IACpE,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,qCAAqC;IAC3C,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,oDAAoD;IACjE,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,aAAa,EAAE;gBACb,KAAK,EAAE,iBAAiB;gBACxB,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,sCAAsC;aACpD;YACD,cAAc,EAAE;gBACd,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,uCAAuC;gBACpD,QAAQ,EAAE,IAAI;aACf;YACD,qBAAqB,EAAE;gBACrB,KAAK,EAAE,yBAAyB;gBAChC,WAAW,EAAE,yBAAyB;gBACtC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,qBAAqB,EAAE;gBACrB,KAAK,EAAE,0BAA0B;gBACjC,WAAW,EAAE,0BAA0B;gBACvC,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,gDAAgD;gBAC7D,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;oBAC1C,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;iBAC3C;gBACD,OAAO,EAAE,WAAW;gBACpB,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,OAAO,CAAC,2CAA2C,CAAC,CAAA;QAC7D,CAAC;KACF;IACD,OAAO,EAAE;QACP,SAAS,EAAT,4BAAS;QACT,gBAAgB,EAAhB,mCAAgB;KACjB;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../engage-messaging-sendgrid/generated-types';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("../../engage-messaging-sendgrid/generated-types"), exports);
|
|
14
|
+
//# sourceMappingURL=generated-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/generated-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kFAA+D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/index.ts"],"names":[],"mappings":";;AAAA,mEAA+D;AAC/D,kBAAe,6CAAqB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../../engage-messaging-sendgrid/previewApiLookup.types';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("../../../engage-messaging-sendgrid/previewApiLookup.types"), exports);
|
|
14
|
+
//# sourceMappingURL=generated-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/sendgrid/previewApiLookup/generated-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4FAAyE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './actionDefinition';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./actionDefinition"), exports);
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/sendgrid/previewApiLookup/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAkC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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>;
|