@segment/action-destinations 3.297.1-staging-e114fa774 → 3.297.1-staging-bd22e2217.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/customerio/utils.d.ts +1 -1
- package/dist/destinations/first-party-dv360/functions.d.ts +17 -0
- package/dist/destinations/first-party-dv360/functions.js +38 -0
- package/dist/destinations/first-party-dv360/functions.js.map +1 -0
- package/dist/destinations/first-party-dv360/generated-types.d.ts +7 -0
- package/dist/destinations/first-party-dv360/index.d.ts +3 -3
- package/dist/destinations/first-party-dv360/index.js +119 -5
- package/dist/destinations/first-party-dv360/index.js.map +1 -1
- package/dist/destinations/klaviyo/orderCompleted/index.js +2 -3
- package/dist/destinations/klaviyo/orderCompleted/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/destinations/amazon-ads/generated-types.d.ts +0 -3
- package/dist/destinations/amazon-ads/generated-types.js +0 -3
- 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 -87
- package/dist/destinations/amazon-ads/index.js.map +0 -1
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +0 -2
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js +0 -3
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +0 -1
- package/dist/destinations/amazon-ads/syncAudiences/index.d.ts +0 -5
- package/dist/destinations/amazon-ads/syncAudiences/index.js +0 -15
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +0 -1
- package/dist/destinations/amazon-ads/types.d.ts +0 -22
- 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 -31
- package/dist/destinations/amazon-ads/utils.js +0 -18
- 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/dynamic-yield-audiences/syncAudience/types.d.ts +0 -22
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js +0 -3
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +0 -1
- package/dist/destinations/dynamic-yield-audiences/types.d.ts +0 -8
- package/dist/destinations/dynamic-yield-audiences/types.js +0 -12
- package/dist/destinations/dynamic-yield-audiences/types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +0 -3
- 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.d.ts +0 -3
- 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 +0 -3
- 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 +0 -3
- package/dist/destinations/facebook-custom-audiences/add/generated-types.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/add/index.d.ts +0 -5
- 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 +0 -3
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/remove/index.d.ts +0 -5
- 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/klaviyo/orderCompleted/formatters.d.ts +0 -26
- package/dist/destinations/klaviyo/orderCompleted/formatters.js +0 -62
- package/dist/destinations/klaviyo/orderCompleted/formatters.js.map +0 -1
- package/dist/destinations/klaviyo/orderCompleted/types.d.ts +0 -2
- package/dist/destinations/klaviyo/orderCompleted/types.js +0 -3
- package/dist/destinations/klaviyo/orderCompleted/types.js.map +0 -1
- package/dist/destinations/mappings-two-test/generated-types.d.ts +0 -3
- package/dist/destinations/mappings-two-test/generated-types.js +0 -3
- package/dist/destinations/mappings-two-test/generated-types.js.map +0 -1
- package/dist/destinations/mappings-two-test/index.d.ts +0 -4
- package/dist/destinations/mappings-two-test/index.js +0 -34
- package/dist/destinations/mappings-two-test/index.js.map +0 -1
- package/dist/destinations/mappings-two-test/inputMethods/generated-types.d.ts +0 -29
- package/dist/destinations/mappings-two-test/inputMethods/generated-types.js +0 -3
- package/dist/destinations/mappings-two-test/inputMethods/generated-types.js.map +0 -1
- package/dist/destinations/mappings-two-test/inputMethods/index.d.ts +0 -5
- package/dist/destinations/mappings-two-test/inputMethods/index.js +0 -200
- package/dist/destinations/mappings-two-test/inputMethods/index.js.map +0 -1
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.d.ts +0 -53
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js +0 -3
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js.map +0 -1
- package/dist/destinations/mappings-two-test/kitchenSink/index.d.ts +0 -5
- package/dist/destinations/mappings-two-test/kitchenSink/index.js +0 -289
- package/dist/destinations/mappings-two-test/kitchenSink/index.js.map +0 -1
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.d.ts +0 -17
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.js +0 -3
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.js.map +0 -1
- package/dist/destinations/mappings-two-test/sendEvent/index.d.ts +0 -5
- package/dist/destinations/mappings-two-test/sendEvent/index.js +0 -345
- package/dist/destinations/mappings-two-test/sendEvent/index.js.map +0 -1
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +0 -14
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js +0 -3
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +0 -1
- package/dist/destinations/responsys/asyncMergePetRecords/index.d.ts +0 -5
- package/dist/destinations/responsys/asyncMergePetRecords/index.js +0 -113
- package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +0 -1
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +0 -20
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js +0 -3
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +0 -1
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.d.ts +0 -5
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +0 -174
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +0 -1
- package/dist/destinations/responsys/rsp-operations.d.ts +0 -14
- package/dist/destinations/responsys/rsp-operations.js +0 -33
- package/dist/destinations/responsys/rsp-operations.js.map +0 -1
- package/dist/destinations/responsys/rsp-properties.d.ts +0 -4
- package/dist/destinations/responsys/rsp-properties.js +0 -27
- package/dist/destinations/responsys/rsp-properties.js.map +0 -1
- package/dist/destinations/responsys-cloud/generated-types.d.ts +0 -20
- package/dist/destinations/responsys-cloud/generated-types.js +0 -3
- package/dist/destinations/responsys-cloud/generated-types.js.map +0 -1
- package/dist/destinations/responsys-cloud/index.d.ts +0 -4
- package/dist/destinations/responsys-cloud/index.js +0 -207
- package/dist/destinations/responsys-cloud/index.js.map +0 -1
- package/dist/destinations/responsys-cloud/sendAudience/generated-types.d.ts +0 -16
- package/dist/destinations/responsys-cloud/sendAudience/generated-types.js +0 -3
- package/dist/destinations/responsys-cloud/sendAudience/generated-types.js.map +0 -1
- package/dist/destinations/responsys-cloud/sendAudience/index.d.ts +0 -5
- package/dist/destinations/responsys-cloud/sendAudience/index.js +0 -109
- package/dist/destinations/responsys-cloud/sendAudience/index.js.map +0 -1
- package/dist/destinations/responsys-cloud/sendCustomTraits/generated-types.d.ts +0 -11
- package/dist/destinations/responsys-cloud/sendCustomTraits/generated-types.js +0 -3
- package/dist/destinations/responsys-cloud/sendCustomTraits/generated-types.js.map +0 -1
- package/dist/destinations/responsys-cloud/sendCustomTraits/index.d.ts +0 -5
- package/dist/destinations/responsys-cloud/sendCustomTraits/index.js +0 -72
- package/dist/destinations/responsys-cloud/sendCustomTraits/index.js.map +0 -1
- package/dist/destinations/responsys-cloud/shared_properties.d.ts +0 -3
- package/dist/destinations/responsys-cloud/shared_properties.js +0 -19
- package/dist/destinations/responsys-cloud/shared_properties.js.map +0 -1
- package/dist/destinations/responsys-cloud/types.d.ts +0 -38
- package/dist/destinations/responsys-cloud/types.js +0 -3
- package/dist/destinations/responsys-cloud/types.js.map +0 -1
- package/dist/destinations/responsys-cloud/upsertListMember/generated-types.d.ts +0 -14
- package/dist/destinations/responsys-cloud/upsertListMember/generated-types.js +0 -3
- package/dist/destinations/responsys-cloud/upsertListMember/generated-types.js.map +0 -1
- package/dist/destinations/responsys-cloud/upsertListMember/index.d.ts +0 -5
- package/dist/destinations/responsys-cloud/upsertListMember/index.js +0 -85
- package/dist/destinations/responsys-cloud/upsertListMember/index.js.map +0 -1
- package/dist/destinations/responsys-cloud/utils.d.ts +0 -20
- package/dist/destinations/responsys-cloud/utils.js +0 -179
- package/dist/destinations/responsys-cloud/utils.js.map +0 -1
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.d.ts +0 -1
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js +0 -381
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js.map +0 -1
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.d.ts +0 -1
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +0 -581
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +0 -1
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.d.ts +0 -4
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js +0 -97
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js.map +0 -1
- package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +0 -30
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js +0 -316
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +0 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +0 -3
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +0 -34
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +0 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +0 -3
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +0 -43
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +0 -1
|
@@ -9,7 +9,7 @@ export declare const dateStringToFuzzyDate: (dateString: string | number) => fal
|
|
|
9
9
|
y: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const augmentFieldsWithConstituentFields: (fields: Record<string, InputField>) => Record<string, InputField>;
|
|
12
|
-
export declare const splitConstituentPayload: (payload: CreateOrUpdateIndividualConstituentPayload) => (Partial<
|
|
12
|
+
export declare const splitConstituentPayload: (payload: CreateOrUpdateIndividualConstituentPayload) => (Partial<Constituent> | Partial<Address> | Partial<OnlinePresence> | Partial<Phone>)[];
|
|
13
13
|
export declare const buildConstituentPayloadFromPayload: (payload: StringIndexedObject) => Partial<CreateOrUpdateIndividualConstituentPayload>;
|
|
14
14
|
export declare const buildGiftDataFromPayload: (constituentId: string, payload: CreateGiftPayload) => Partial<Gift>;
|
|
15
15
|
export declare const buildConstituentActionDataFromPayload: (constituentId: string, payload: CreateConstituentAction) => Partial<ConstituentAction>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const trackApiEndpoint: ({ accountRegion }: {
|
|
2
2
|
accountRegion?: string | undefined;
|
|
3
|
-
}) => "https://track.customer.io" | "https://track
|
|
3
|
+
}) => "https://track-eu.customer.io" | "https://track.customer.io";
|
|
4
4
|
export declare enum AccountRegion {
|
|
5
5
|
US = "US \uD83C\uDDFA\uD83C\uDDF8",
|
|
6
6
|
EU = "EU \uD83C\uDDEA\uD83C\uDDFA"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RequestClient } from '@segment/actions-core';
|
|
2
|
+
interface createAudienceRequestParams {
|
|
3
|
+
advertiserId: string;
|
|
4
|
+
audienceName: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
membershipDurationDays: string;
|
|
7
|
+
audienceType: string;
|
|
8
|
+
token?: string;
|
|
9
|
+
}
|
|
10
|
+
interface getAudienceParams {
|
|
11
|
+
advertiserId: string;
|
|
12
|
+
audienceId: string;
|
|
13
|
+
token?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const createAudienceRequest: (_request: RequestClient, params: createAudienceRequestParams) => Promise<Response>;
|
|
16
|
+
export declare const getAudienceRequest: (_request: RequestClient, params: getAudienceParams) => Promise<Response>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAudienceRequest = exports.createAudienceRequest = void 0;
|
|
4
|
+
const DV360API = `https://displayvideo.googleapis.com/v3/firstAndThirdPartyAudiences`;
|
|
5
|
+
const createAudienceRequest = (_request, params) => {
|
|
6
|
+
const { advertiserId, audienceName, description, membershipDurationDays, audienceType, token } = params;
|
|
7
|
+
const endpoint = DV360API + `?advertiserId=${advertiserId}`;
|
|
8
|
+
return _request(endpoint, {
|
|
9
|
+
method: 'POST',
|
|
10
|
+
headers: {
|
|
11
|
+
authorization: `Bearer ${token}`,
|
|
12
|
+
'Content-Type': 'application/json; charset=utf-8'
|
|
13
|
+
},
|
|
14
|
+
json: {
|
|
15
|
+
displayName: audienceName,
|
|
16
|
+
audienceType: audienceType,
|
|
17
|
+
membershipDurationDays: membershipDurationDays,
|
|
18
|
+
description: description,
|
|
19
|
+
audienceSource: 'AUDIENCE_SOURCE_UNSPECIFIED',
|
|
20
|
+
firstAndThirdPartyAudienceType: 'FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_FIRST_PARTY'
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
exports.createAudienceRequest = createAudienceRequest;
|
|
25
|
+
const getAudienceRequest = (_request, params) => {
|
|
26
|
+
const { advertiserId, audienceId, token } = params;
|
|
27
|
+
const endpoint = DV360API + `/${audienceId}?advertiserId=${advertiserId}`;
|
|
28
|
+
console.log(endpoint);
|
|
29
|
+
return _request(endpoint, {
|
|
30
|
+
method: 'GET',
|
|
31
|
+
headers: {
|
|
32
|
+
authorization: `Bearer ${token}`,
|
|
33
|
+
'Content-Type': 'application/json; charset=utf-8'
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
exports.getAudienceRequest = getAudienceRequest;
|
|
38
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/destinations/first-party-dv360/functions.ts"],"names":[],"mappings":";;;AAEA,MAAM,QAAQ,GAAG,oEAAoE,CAAA;AAiB9E,MAAM,qBAAqB,GAAG,CACnC,QAAuB,EACvB,MAAmC,EAChB,EAAE;IACrB,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,sBAAsB,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,MAAM,CAAA;IAEvG,MAAM,QAAQ,GAAG,QAAQ,GAAG,iBAAiB,YAAY,EAAE,CAAA;IAE3D,OAAO,QAAQ,CAAC,QAAQ,EAAE;QACxB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,KAAK,EAAE;YAChC,cAAc,EAAE,iCAAiC;SAClD;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,YAAY;YACzB,YAAY,EAAE,YAAY;YAC1B,sBAAsB,EAAE,sBAAsB;YAC9C,WAAW,EAAE,WAAW;YACxB,cAAc,EAAE,6BAA6B;YAC7C,8BAA8B,EAAE,iDAAiD;SAClF;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAvBY,QAAA,qBAAqB,yBAuBjC;AAEM,MAAM,kBAAkB,GAAG,CAAC,QAAuB,EAAE,MAAyB,EAAqB,EAAE;IAC1G,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,MAAM,CAAA;IAElD,MAAM,QAAQ,GAAG,QAAQ,GAAG,IAAI,UAAU,iBAAiB,YAAY,EAAE,CAAA;IACzE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAErB,OAAO,QAAQ,CAAC,QAAQ,EAAE;QACxB,MAAM,EAAE,KAAK;QACb,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,KAAK,EAAE;YAChC,cAAc,EAAE,iCAAiC;SAClD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAbY,QAAA,kBAAkB,sBAa9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { Settings } from './generated-types';
|
|
3
|
-
declare const destination: AudienceDestinationDefinition<Settings>;
|
|
1
|
+
import { AudienceDestinationDefinition } from '@segment/actions-core';
|
|
2
|
+
import type { AudienceSettings, Settings } from './generated-types';
|
|
3
|
+
declare const destination: AudienceDestinationDefinition<Settings, AudienceSettings>;
|
|
4
4
|
export default destination;
|
|
@@ -3,11 +3,50 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
6
7
|
const addToList_1 = __importDefault(require("./addToList"));
|
|
8
|
+
const functions_1 = require("./functions");
|
|
9
|
+
const errors_1 = require("../display-video-360/errors");
|
|
7
10
|
const destination = {
|
|
8
11
|
name: 'First Party Dv360',
|
|
9
12
|
slug: 'actions-first-party-dv360',
|
|
10
13
|
mode: 'cloud',
|
|
14
|
+
audienceFields: {
|
|
15
|
+
advertiserId: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
label: 'Advertiser ID',
|
|
18
|
+
required: true,
|
|
19
|
+
description: 'The ID of your advertiser, used throughout Display & Video 360. Use this ID when you contact Display & Video 360 support to help our teams locate your specific account.'
|
|
20
|
+
},
|
|
21
|
+
audienceType: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
label: 'Audience Type',
|
|
24
|
+
choices: [
|
|
25
|
+
{ label: 'CUSTOMER MATCH CONTACT INFO', value: 'CUSTOMER_MATCH_CONTACT_INFO' },
|
|
26
|
+
{ label: 'CUSTOMER MATCH DEVICE ID', value: 'CUSTOMER_MATCH_DEVICE_ID' }
|
|
27
|
+
],
|
|
28
|
+
required: true,
|
|
29
|
+
description: 'The type of the audience.'
|
|
30
|
+
},
|
|
31
|
+
description: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
label: 'Description',
|
|
34
|
+
required: false,
|
|
35
|
+
description: 'The description of the audience.'
|
|
36
|
+
},
|
|
37
|
+
membershipDurationDays: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
label: 'Membership Duration Days',
|
|
40
|
+
required: true,
|
|
41
|
+
description: 'The duration in days that an entry remains in the audience after the qualifying event. If the audience has no expiration, set the value of this field to 10000. Otherwise, the set value must be greater than 0 and less than or equal to 540.'
|
|
42
|
+
},
|
|
43
|
+
token: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
label: 'Auth Token',
|
|
46
|
+
required: true,
|
|
47
|
+
description: 'temp until we build authentication flow'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
11
50
|
authentication: {
|
|
12
51
|
scheme: 'custom',
|
|
13
52
|
fields: {},
|
|
@@ -15,17 +54,92 @@ const destination = {
|
|
|
15
54
|
return { status: 'succeeded' };
|
|
16
55
|
}
|
|
17
56
|
},
|
|
18
|
-
audienceFields: {},
|
|
19
57
|
audienceConfig: {
|
|
20
58
|
mode: {
|
|
21
59
|
type: 'synced',
|
|
22
60
|
full_audience_sync: false
|
|
23
61
|
},
|
|
24
|
-
createAudience: async (_request,
|
|
25
|
-
|
|
62
|
+
createAudience: async (_request, createAudienceInput) => {
|
|
63
|
+
const { audienceName, audienceSettings, statsContext } = createAudienceInput;
|
|
64
|
+
const advertiserId = audienceSettings?.advertiserId?.trim();
|
|
65
|
+
const description = audienceSettings?.description;
|
|
66
|
+
const membershipDurationDays = audienceSettings?.membershipDurationDays;
|
|
67
|
+
const audienceType = audienceSettings?.audienceType;
|
|
68
|
+
const token = audienceSettings?.token;
|
|
69
|
+
const statsName = 'createAudience';
|
|
70
|
+
const { statsClient, tags: statsTags } = statsContext || {};
|
|
71
|
+
statsTags?.push(`slug:${destination.slug}`);
|
|
72
|
+
statsClient?.incr(`${statsName}.call`, 1, statsTags);
|
|
73
|
+
if (!audienceName) {
|
|
74
|
+
statsTags?.push('error:missing-settings');
|
|
75
|
+
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
76
|
+
throw new actions_core_1.IntegrationError('Missing audience name value', 'MISSING_REQUIRED_FIELD', 400);
|
|
77
|
+
}
|
|
78
|
+
if (!advertiserId) {
|
|
79
|
+
statsTags?.push('error:missing-settings');
|
|
80
|
+
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
81
|
+
throw new actions_core_1.IntegrationError('Missing advertiser ID value', 'MISSING_REQUIRED_FIELD', 400);
|
|
82
|
+
}
|
|
83
|
+
if (!membershipDurationDays) {
|
|
84
|
+
statsTags?.push('error:missing-settings');
|
|
85
|
+
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
86
|
+
throw new actions_core_1.IntegrationError('Missing membership duration days value', 'MISSING_REQUIRED_FIELD', 400);
|
|
87
|
+
}
|
|
88
|
+
if (!audienceType) {
|
|
89
|
+
statsTags?.push('error:missing-settings');
|
|
90
|
+
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
91
|
+
throw new actions_core_1.IntegrationError('Missing audience type value', 'MISSING_REQUIRED_FIELD', 400);
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
const response = await functions_1.createAudienceRequest(_request, {
|
|
95
|
+
advertiserId,
|
|
96
|
+
audienceName,
|
|
97
|
+
description,
|
|
98
|
+
membershipDurationDays,
|
|
99
|
+
audienceType,
|
|
100
|
+
token
|
|
101
|
+
});
|
|
102
|
+
const r = await response.json();
|
|
103
|
+
statsClient?.incr(`${statsName}.success`, 1, statsTags);
|
|
104
|
+
return {
|
|
105
|
+
externalId: r.firstAndThirdPartyAudienceId
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
throw errors_1.handleRequestError(error, statsName, statsContext);
|
|
110
|
+
}
|
|
26
111
|
},
|
|
27
|
-
getAudience: async (_request,
|
|
28
|
-
|
|
112
|
+
getAudience: async (_request, getAudienceInput) => {
|
|
113
|
+
const { audienceSettings, statsContext } = getAudienceInput;
|
|
114
|
+
const audienceId = getAudienceInput.externalId;
|
|
115
|
+
const advertiserId = audienceSettings?.advertiserId?.trim();
|
|
116
|
+
const token = audienceSettings?.token;
|
|
117
|
+
const statsName = 'getAudience';
|
|
118
|
+
const { statsClient, tags: statsTags } = statsContext || {};
|
|
119
|
+
statsTags?.push(`slug:${destination.slug}`);
|
|
120
|
+
statsClient?.incr(`${statsName}.call`, 1, statsTags);
|
|
121
|
+
if (!advertiserId) {
|
|
122
|
+
statsTags?.push('error:missing-settings');
|
|
123
|
+
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
124
|
+
throw new actions_core_1.IntegrationError('Missing required advertiser ID value', 'MISSING_REQUIRED_FIELD', 400);
|
|
125
|
+
}
|
|
126
|
+
try {
|
|
127
|
+
console.log(advertiserId, audienceId, token);
|
|
128
|
+
const response = await functions_1.getAudienceRequest(_request, { advertiserId, audienceId, token });
|
|
129
|
+
if (!response.ok) {
|
|
130
|
+
statsTags?.push('error:api-request-failed');
|
|
131
|
+
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
132
|
+
throw new actions_core_1.IntegrationError('Failed to retrieve audience details', 'API_REQUEST_FAILED', response.status);
|
|
133
|
+
}
|
|
134
|
+
const audienceData = await response.json();
|
|
135
|
+
statsClient?.incr(`${statsName}.success`, 1, statsTags);
|
|
136
|
+
return {
|
|
137
|
+
externalId: audienceData.firstAndThirdPartyAudienceId
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
throw errors_1.handleRequestError(error, statsName, statsContext);
|
|
142
|
+
}
|
|
29
143
|
}
|
|
30
144
|
},
|
|
31
145
|
onDelete: async (_request, _) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/first-party-dv360/index.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/first-party-dv360/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAuF;AAGvF,4DAAmC;AACnC,2CAAuE;AACvE,wDAAgE;AAEhE,MAAM,WAAW,GAA8D;IAC7E,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,eAAe;YACtB,QAAQ,EAAE,IAAI;YACd,WAAW,EACT,0KAA0K;SAC7K;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,6BAA6B,EAAE,KAAK,EAAE,6BAA6B,EAAE;gBAC9E,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,0BAA0B,EAAE;aACzE;YACD,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,2BAA2B;SACzC;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,aAAa;YACpB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,kCAAkC;SAChD;QACD,sBAAsB,EAAE;YACtB,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,0BAA0B;YACjC,QAAQ,EAAE,IAAI;YACd,WAAW,EACT,gPAAgP;SACnP;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,yCAAyC;SACvD;KACF;IAED,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB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B,CAAC,qCAAqC,EAAE,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;iBACzG;gBAGD,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;gBAC1C,WAAW,EAAE,IAAI,CAAC,GAAG,SAAS,UAAU,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;gBACvD,OAAO;oBACL,UAAU,EAAE,YAAY,CAAC,4BAA4B;iBACtD,CAAA;aACF;YAAC,OAAO,KAAK,EAAE;gBAEd,MAAM,2BAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,YAAY,CAAC,CAAA;aACzD;QACH,CAAC;KACF;IAED,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE;IAIhC,CAAC;IAED,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;KACV;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
4
|
const config_1 = require("../config");
|
|
5
5
|
const uuid_1 = require("@lukeed/uuid");
|
|
6
|
-
const functions_1 = require("../functions");
|
|
7
6
|
const createEventData = (payload) => ({
|
|
8
7
|
data: {
|
|
9
8
|
type: 'event',
|
|
@@ -153,8 +152,8 @@ const action = {
|
|
|
153
152
|
if (!email && !phone_number && !external_id && !anonymous_id) {
|
|
154
153
|
throw new actions_core_1.PayloadValidationError('One of External ID, Anonymous ID, Phone Number or Email is required.');
|
|
155
154
|
}
|
|
156
|
-
if (
|
|
157
|
-
|
|
155
|
+
if (!payload.event_name) {
|
|
156
|
+
payload.event_name = 'Order Completed';
|
|
158
157
|
}
|
|
159
158
|
const eventData = createEventData(payload);
|
|
160
159
|
const event = await request(`${config_1.API_URL}/events/`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/orderCompleted/index.ts"],"names":[],"mappings":";;AAGA,wDAA6E;AAC7E,sCAAmC;AAEnC,uCAA2C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/orderCompleted/index.ts"],"names":[],"mappings":";;AAGA,wDAA6E;AAC7E,sCAAmC;AAEnC,uCAA2C;AAE3C,MAAM,eAAe,GAAG,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC;IAC7C,IAAI,EAAE;QACJ,IAAI,EAAE,OAAO;QACb,UAAU,EAAE;YACV,UAAU,EAAE,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE;YACrC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,IAAI,EAAE,OAAO,CAAC,UAAU;qBACzB;iBACF;aACF;YACD,OAAO,EAAE;gBACP,IAAI,EAAE;oBACJ,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,OAAO,CAAC,OAAO;iBAC5B;aACF;SACF;KACF;CACF,CAAC,CAAA;AAEF,MAAM,mBAAmB,GAAG,KAAK,EAAE,OAAgB,EAAE,cAAyB,EAAE,OAAsB,EAAE,EAAE;IACxG,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;QACzD,OAAM;KACP;IAED,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,UAAU,KAAK,SAAS,EAAE;QAC3D,OAAO,CAAC,UAAU,GAAG,iBAAiB,CAAA;KACvC;IAED,OAAO,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,QAAQ,CAAA;IAC1D,MAAM,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC,GA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,IAAI,CAAC,KAAK,IAAI,CAAC,YAAY,IAAI,CAAC,WAAW,IAAI,CAAC,YAAY,EAAE;YAC5D,MAAM,IAAI,qCAAsB,CAAC,sEAAsE,CAAC,CAAA;SACzG;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,OAAO,CAAC,UAAU,GAAG,iBAAiB,CAAA;SACvC;QAED,MAAM,SAAS,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;QAE1C,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,gBAAO,UAAU,EAAE;YAChD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,SAAS;SAChB,CAAC,CAAA;QAEF,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC1D,MAAM,mBAAmB,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA;SACvD;QACD,OAAO,KAAK,CAAA;IACd,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segment/action-destinations",
|
|
3
3
|
"description": "Destination Actions engine and definitions.",
|
|
4
|
-
"version": "3.297.1-staging-
|
|
4
|
+
"version": "3.297.1-staging-bd22e2217.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"__tests__/__helpers__/"
|
|
88
88
|
]
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "69eb46a146b4afa4d49f4897ba7363bfa31c1ecd"
|
|
91
91
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,87 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file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I;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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/amazon-ads/syncAudiences/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,22 +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
|
-
}
|
|
@@ -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,31 +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 declare const AUTHORIZATION_URL: any;
|
|
27
|
-
export declare const CONSTANTS: {
|
|
28
|
-
CREATE: string;
|
|
29
|
-
DELETE: string;
|
|
30
|
-
};
|
|
31
|
-
export declare const CURRENCY: string[];
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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/auth/o2/token',
|
|
10
|
-
'https://advertising-api-eu.amazon.com': 'https://api.amazon.co.uk/auth/o2/token',
|
|
11
|
-
'https://advertising-api-fe.amazon.com': 'https://api.amazon.co.jp/auth/o2/token'
|
|
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
|
-
//# 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;AAmBY,QAAA,iBAAiB,GAAQ;IACpC,oCAAoC,EAAE,sCAAsC;IAC5E,uCAAuC,EAAE,wCAAwC;IACjF,uCAAuC,EAAE,wCAAwC;CAClF,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"}
|
|
@@ -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,22 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/destinations/dynamic-yield-audiences/syncAudience/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
}
|