@segment/action-destinations 3.301.1-staging-c2af298f5 → 3.302.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/destinations/actions-pardot/pa-operations.d.ts +1 -1
- package/dist/destinations/adjust/functions.d.ts +1 -1
- package/dist/destinations/adobe-target/adobeTarget_operations.d.ts +1 -1
- package/dist/destinations/airship/utilities.d.ts +7 -7
- package/dist/destinations/amazon-amc/index.js +10 -2
- package/dist/destinations/amazon-amc/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/braze/utils.d.ts +6 -6
- package/dist/destinations/contentstack/customAttributesSync/utils.d.ts +1 -1
- package/dist/destinations/cordial/cordial-client.d.ts +8 -8
- package/dist/destinations/dawn/dawn-types.d.ts +13 -0
- package/dist/destinations/{engage/twilio/utils/types.js → dawn/dawn-types.js} +1 -1
- package/dist/destinations/dawn/dawn-types.js.map +1 -0
- package/dist/destinations/dawn/generated-types.d.ts +3 -0
- package/dist/destinations/dawn/generated-types.js.map +1 -0
- package/dist/destinations/dawn/identifyUser/generated-types.d.ts +7 -0
- package/dist/destinations/dawn/identifyUser/generated-types.js.map +1 -0
- package/dist/destinations/dawn/identifyUser/index.js +58 -0
- package/dist/destinations/dawn/identifyUser/index.js.map +1 -0
- package/dist/destinations/{engage/twilio/destinationDefinition.d.ts → dawn/index.d.ts} +2 -1
- package/dist/destinations/dawn/index.js +39 -0
- package/dist/destinations/dawn/index.js.map +1 -0
- package/dist/destinations/dawn/track/generated-types.d.ts +8 -0
- package/dist/destinations/dawn/track/generated-types.js.map +1 -0
- package/dist/destinations/dawn/track/index.js +69 -0
- package/dist/destinations/dawn/track/index.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.d.ts +1 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.d.ts +1 -1
- package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.d.ts +1 -1
- package/dist/destinations/facebook-conversions-api/constants.d.ts +1 -1
- package/dist/destinations/facebook-conversions-api/constants.js +1 -1
- package/dist/destinations/facebook-custom-audiences/fbca-operations.d.ts +2 -2
- package/dist/destinations/first-party-dv360/generated-types.d.ts +0 -7
- package/dist/destinations/first-party-dv360/index.d.ts +3 -3
- package/dist/destinations/first-party-dv360/index.js +5 -119
- package/dist/destinations/first-party-dv360/index.js.map +1 -1
- package/dist/destinations/gameball/util.d.ts +1 -1
- package/dist/destinations/google-analytics-4/ga4-functions.d.ts +1 -1
- package/dist/destinations/google-sheets/index.js +1 -3
- package/dist/destinations/google-sheets/index.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet/operations.d.ts +1 -1
- package/dist/destinations/hubspot/customEvent/common-fields.d.ts +2 -0
- package/dist/destinations/hubspot/customEvent/common-fields.js +74 -0
- package/dist/destinations/hubspot/customEvent/common-fields.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/constants.d.ts +4 -0
- package/dist/destinations/hubspot/customEvent/constants.js +10 -0
- package/dist/destinations/hubspot/customEvent/constants.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/dynamic-fields.d.ts +32 -0
- package/dist/destinations/hubspot/customEvent/dynamic-fields.js +104 -0
- package/dist/destinations/hubspot/customEvent/dynamic-fields.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/generated-types.d.ts +13 -0
- package/dist/destinations/hubspot/customEvent/generated-types.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/hubspot-api.d.ts +62 -0
- package/dist/destinations/hubspot/customEvent/hubspot-api.js +310 -0
- package/dist/destinations/hubspot/customEvent/hubspot-api.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/index.js +57 -0
- package/dist/destinations/hubspot/customEvent/index.js.map +1 -0
- package/dist/destinations/hubspot/index.js +3 -1
- package/dist/destinations/hubspot/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/common-fields.js +8 -32
- package/dist/destinations/hubspot/upsertObject/common-fields.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/generated-types.d.ts +8 -11
- package/dist/destinations/hubspot/upsertObject/hubspot-api.d.ts +169 -53
- package/dist/destinations/hubspot/upsertObject/hubspot-api.js +449 -336
- package/dist/destinations/hubspot/upsertObject/hubspot-api.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/index.d.ts +1 -1
- package/dist/destinations/hubspot/upsertObject/index.js +52 -28
- package/dist/destinations/hubspot/upsertObject/index.js.map +1 -1
- package/dist/destinations/index.js +2 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/klaviyo/addProfileToList/generated-types.d.ts +1 -0
- package/dist/destinations/klaviyo/addProfileToList/index.js +14 -5
- package/dist/destinations/klaviyo/addProfileToList/index.js.map +1 -1
- package/dist/destinations/klaviyo/functions.d.ts +7 -6
- package/dist/destinations/klaviyo/functions.js +23 -7
- package/dist/destinations/klaviyo/functions.js.map +1 -1
- package/dist/destinations/klaviyo/orderCompleted/generated-types.d.ts +1 -0
- package/dist/destinations/klaviyo/orderCompleted/index.js +11 -2
- package/dist/destinations/klaviyo/orderCompleted/index.js.map +1 -1
- package/dist/destinations/klaviyo/properties.d.ts +1 -0
- package/dist/destinations/klaviyo/properties.js +7 -1
- package/dist/destinations/klaviyo/properties.js.map +1 -1
- package/dist/destinations/klaviyo/removeProfile/generated-types.d.ts +1 -0
- package/dist/destinations/klaviyo/removeProfile/index.js +24 -7
- package/dist/destinations/klaviyo/removeProfile/index.js.map +1 -1
- package/dist/destinations/klaviyo/removeProfileFromList/generated-types.d.ts +1 -0
- package/dist/destinations/klaviyo/removeProfileFromList/index.js +18 -6
- package/dist/destinations/klaviyo/removeProfileFromList/index.js.map +1 -1
- package/dist/destinations/launchdarkly-audiences/syncAudience/custom-audience-operations.d.ts +1 -1
- package/dist/destinations/salesforce/index.js +1 -13
- package/dist/destinations/salesforce/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-operations.d.ts +0 -1
- package/dist/destinations/salesforce/sf-operations.js +0 -20
- package/dist/destinations/salesforce/sf-operations.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.d.ts +0 -1
- package/dist/destinations/salesforce/sf-properties.js +6 -29
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/schematic/identifyUser/generated-types.d.ts +1 -1
- package/dist/destinations/schematic/identifyUser/index.js +6 -3
- package/dist/destinations/schematic/identifyUser/index.js.map +1 -1
- package/dist/destinations/schematic/trackEvent/generated-types.d.ts +1 -1
- package/dist/destinations/schematic/trackEvent/index.js +2 -2
- package/dist/destinations/schematic/trackEvent/index.js.map +1 -1
- package/dist/destinations/topsort/click/generated-types.d.ts +6 -0
- package/dist/destinations/topsort/click/generated-types.js.map +1 -0
- package/dist/destinations/topsort/click/index.js +54 -0
- package/dist/destinations/topsort/click/index.js.map +1 -0
- package/dist/destinations/topsort/client.d.ts +10 -0
- package/dist/destinations/topsort/client.js +26 -0
- package/dist/destinations/topsort/client.js.map +1 -0
- package/dist/destinations/topsort/generated-types.d.ts +3 -0
- package/dist/destinations/topsort/generated-types.js.map +1 -0
- package/dist/destinations/topsort/impression/generated-types.d.ts +6 -0
- package/dist/destinations/topsort/impression/generated-types.js.map +1 -0
- package/dist/destinations/topsort/impression/index.js +54 -0
- package/dist/destinations/topsort/impression/index.js.map +1 -0
- package/dist/destinations/{engage/sendgrid/destinationDefinition.d.ts → topsort/index.d.ts} +2 -1
- package/dist/destinations/topsort/index.js +56 -0
- package/dist/destinations/topsort/index.js.map +1 -0
- package/dist/destinations/topsort/purchase/generated-types.d.ts +10 -0
- package/dist/destinations/topsort/purchase/generated-types.js.map +1 -0
- package/dist/destinations/topsort/purchase/index.d.ts +5 -0
- package/dist/destinations/topsort/purchase/index.js +82 -0
- package/dist/destinations/topsort/purchase/index.js.map +1 -0
- package/dist/lib/test-data.js +2 -0
- package/dist/lib/test-data.js.map +1 -1
- package/package.json +4 -4
- package/dist/destinations/amazon-ads/generated-types.d.ts +0 -12
- package/dist/destinations/amazon-ads/generated-types.js.map +0 -1
- package/dist/destinations/amazon-ads/index.d.ts +0 -4
- package/dist/destinations/amazon-ads/index.js +0 -237
- package/dist/destinations/amazon-ads/index.js.map +0 -1
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +0 -15
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +0 -1
- package/dist/destinations/amazon-ads/syncAudiences/index.js +0 -182
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +0 -1
- package/dist/destinations/amazon-ads/types.d.ts +0 -47
- package/dist/destinations/amazon-ads/types.js +0 -11
- package/dist/destinations/amazon-ads/types.js.map +0 -1
- package/dist/destinations/amazon-ads/utils.d.ts +0 -37
- package/dist/destinations/amazon-ads/utils.js +0 -25
- package/dist/destinations/amazon-ads/utils.js.map +0 -1
- package/dist/destinations/contentstack/constants.d.ts +0 -3
- package/dist/destinations/contentstack/constants.js +0 -7
- package/dist/destinations/contentstack/constants.js.map +0 -1
- package/dist/destinations/engage/sendgrid/destinationDefinition.js +0 -70
- package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +0 -1
- package/dist/destinations/engage/sendgrid/generated-types.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/generated-types.js +0 -14
- package/dist/destinations/engage/sendgrid/generated-types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/index.d.ts +0 -2
- package/dist/destinations/engage/sendgrid/index.js +0 -5
- package/dist/destinations/engage/sendgrid/index.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +0 -28
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +0 -14
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +0 -14
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +0 -44
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +0 -419
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +0 -12
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +0 -3
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +0 -257
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +0 -14
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/index.js +0 -14
- package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +0 -23
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +0 -14
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +0 -1
- package/dist/destinations/engage/twilio/destinationDefinition.js +0 -172
- package/dist/destinations/engage/twilio/destinationDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/index.d.ts +0 -2
- package/dist/destinations/engage/twilio/index.js +0 -5
- package/dist/destinations/engage/twilio/index.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +0 -28
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +0 -151
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +0 -250
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/index.js +0 -14
- package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +0 -9
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +0 -72
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +0 -162
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendSms/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/index.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendSms/index.js +0 -14
- package/dist/destinations/engage/twilio/sendSms/index.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +0 -9
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +0 -89
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +0 -136
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js +0 -14
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +0 -16
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +0 -71
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +0 -16
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +0 -115
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/index.d.ts +0 -2
- package/dist/destinations/engage/twilio/utils/index.js +0 -15
- package/dist/destinations/engage/twilio/utils/index.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/types.d.ts +0 -23
- package/dist/destinations/engage/twilio/utils/types.js.map +0 -1
- package/dist/destinations/engage/utils/AggregateError.d.ts +0 -14
- package/dist/destinations/engage/utils/AggregateError.js +0 -26
- package/dist/destinations/engage/utils/AggregateError.js.map +0 -1
- package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +0 -42
- package/dist/destinations/engage/utils/EngageActionPerformer.js +0 -148
- package/dist/destinations/engage/utils/EngageActionPerformer.js.map +0 -1
- package/dist/destinations/engage/utils/EngageLogger.d.ts +0 -18
- package/dist/destinations/engage/utils/EngageLogger.js +0 -52
- package/dist/destinations/engage/utils/EngageLogger.js.map +0 -1
- package/dist/destinations/engage/utils/EngageStats.d.ts +0 -18
- package/dist/destinations/engage/utils/EngageStats.js +0 -95
- package/dist/destinations/engage/utils/EngageStats.js.map +0 -1
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +0 -12
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +0 -31
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +0 -1
- package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +0 -65
- package/dist/destinations/engage/utils/MessageSendPerformer.js +0 -211
- package/dist/destinations/engage/utils/MessageSendPerformer.js.map +0 -1
- package/dist/destinations/engage/utils/Profile.d.ts +0 -6
- package/dist/destinations/engage/utils/Profile.js +0 -3
- package/dist/destinations/engage/utils/Profile.js.map +0 -1
- package/dist/destinations/engage/utils/ResponseError.d.ts +0 -25
- package/dist/destinations/engage/utils/ResponseError.js +0 -22
- package/dist/destinations/engage/utils/ResponseError.js.map +0 -1
- package/dist/destinations/engage/utils/apiLookups.d.ts +0 -22
- package/dist/destinations/engage/utils/apiLookups.js +0 -189
- package/dist/destinations/engage/utils/apiLookups.js.map +0 -1
- package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +0 -2
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js +0 -10
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +0 -1
- package/dist/destinations/engage/utils/index.d.ts +0 -9
- package/dist/destinations/engage/utils/index.js +0 -22
- package/dist/destinations/engage/utils/index.js.map +0 -1
- package/dist/destinations/engage/utils/isDestinationActionService.d.ts +0 -1
- package/dist/destinations/engage/utils/isDestinationActionService.js +0 -8
- package/dist/destinations/engage/utils/isDestinationActionService.js.map +0 -1
- package/dist/destinations/engage/utils/isRetryableError.d.ts +0 -2
- package/dist/destinations/engage/utils/isRetryableError.js +0 -33
- package/dist/destinations/engage/utils/isRetryableError.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +0 -1
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +0 -3
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +0 -46
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +0 -46
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +0 -12
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +0 -23
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +0 -12
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +0 -35
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +0 -14
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +0 -31
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +0 -31
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +0 -104
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +0 -39
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js +0 -130
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +0 -377
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +0 -23
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js +0 -49
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +0 -6
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js +0 -3
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/index.d.ts +0 -10
- package/dist/destinations/engage/utils/operationTracking/index.js +0 -23
- package/dist/destinations/engage/utils/operationTracking/index.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +0 -21
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +0 -99
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +0 -1
- package/dist/destinations/engage/utils/testUtils.d.ts +0 -6
- package/dist/destinations/engage/utils/testUtils.js +0 -26
- package/dist/destinations/engage/utils/testUtils.js.map +0 -1
- package/dist/destinations/engage/utils/track.d.ts +0 -52
- package/dist/destinations/engage/utils/track.js +0 -9
- package/dist/destinations/engage/utils/track.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +0 -16
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +0 -3
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +0 -56
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +0 -3
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +0 -39
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +0 -27
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +0 -25
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/add/generated-types.d.ts +0 -2
- package/dist/destinations/facebook-custom-audiences/add/generated-types.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/add/index.js +0 -11
- package/dist/destinations/facebook-custom-audiences/add/index.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.d.ts +0 -2
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/remove/index.js +0 -11
- package/dist/destinations/facebook-custom-audiences/remove/index.js.map +0 -1
- package/dist/destinations/first-party-dv360/functions.d.ts +0 -17
- package/dist/destinations/first-party-dv360/functions.js +0 -38
- package/dist/destinations/first-party-dv360/functions.js.map +0 -1
- package/dist/destinations/google-sheets/postSheet2/generated-types.d.ts +0 -10
- package/dist/destinations/google-sheets/postSheet2/generated-types.js.map +0 -1
- package/dist/destinations/google-sheets/postSheet2/index.js +0 -98
- package/dist/destinations/google-sheets/postSheet2/index.js.map +0 -1
- package/dist/destinations/google-sheets/postSheet2/operations2.d.ts +0 -10
- package/dist/destinations/google-sheets/postSheet2/operations2.js +0 -96
- package/dist/destinations/google-sheets/postSheet2/operations2.js.map +0 -1
- package/dist/destinations/salesforce/account2/generated-types.d.ts +0 -32
- package/dist/destinations/salesforce/account2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/account2/index.d.ts +0 -5
- package/dist/destinations/salesforce/account2/index.js +0 -248
- package/dist/destinations/salesforce/account2/index.js.map +0 -1
- package/dist/destinations/salesforce/cases2/generated-types.d.ts +0 -17
- package/dist/destinations/salesforce/cases2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/cases2/index.js +0 -76
- package/dist/destinations/salesforce/cases2/index.js.map +0 -1
- package/dist/destinations/salesforce/contact2/generated-types.d.ts +0 -25
- package/dist/destinations/salesforce/contact2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/contact2/index.d.ts +0 -5
- package/dist/destinations/salesforce/contact2/index.js +0 -192
- package/dist/destinations/salesforce/contact2/index.js.map +0 -1
- package/dist/destinations/salesforce/customObject2/generated-types.d.ts +0 -17
- package/dist/destinations/salesforce/customObject2/generated-types.js +0 -3
- package/dist/destinations/salesforce/customObject2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/customObject2/index.d.ts +0 -5
- package/dist/destinations/salesforce/customObject2/index.js +0 -97
- package/dist/destinations/salesforce/customObject2/index.js.map +0 -1
- package/dist/destinations/salesforce/lead2/generated-types.d.ts +0 -25
- package/dist/destinations/salesforce/lead2/generated-types.js +0 -3
- package/dist/destinations/salesforce/lead2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/lead2/index.d.ts +0 -5
- package/dist/destinations/salesforce/lead2/index.js +0 -200
- package/dist/destinations/salesforce/lead2/index.js.map +0 -1
- package/dist/destinations/salesforce/opportunity2/generated-types.d.ts +0 -21
- package/dist/destinations/salesforce/opportunity2/generated-types.js +0 -3
- package/dist/destinations/salesforce/opportunity2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/opportunity2/index.d.ts +0 -5
- package/dist/destinations/salesforce/opportunity2/index.js +0 -112
- package/dist/destinations/salesforce/opportunity2/index.js.map +0 -1
- /package/dist/destinations/{amazon-ads → dawn}/generated-types.js +0 -0
- /package/dist/destinations/{amazon-ads/syncAudiences → dawn/identifyUser}/generated-types.js +0 -0
- /package/dist/destinations/{amazon-ads/syncAudiences → dawn/identifyUser}/index.d.ts +0 -0
- /package/dist/destinations/{facebook-custom-audiences/add → dawn/track}/generated-types.js +0 -0
- /package/dist/destinations/{facebook-custom-audiences/add → dawn/track}/index.d.ts +0 -0
- /package/dist/destinations/{facebook-custom-audiences/remove → hubspot/customEvent}/generated-types.js +0 -0
- /package/dist/destinations/{google-sheets/postSheet2 → hubspot/customEvent}/index.d.ts +0 -0
- /package/dist/destinations/{google-sheets/postSheet2 → topsort/click}/generated-types.js +0 -0
- /package/dist/destinations/{facebook-custom-audiences/remove → topsort/click}/index.d.ts +0 -0
- /package/dist/destinations/{salesforce/account2 → topsort}/generated-types.js +0 -0
- /package/dist/destinations/{salesforce/cases2 → topsort/impression}/generated-types.js +0 -0
- /package/dist/destinations/{salesforce/cases2 → topsort/impression}/index.d.ts +0 -0
- /package/dist/destinations/{salesforce/contact2 → topsort/purchase}/generated-types.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/destinations/topsort/client.ts"],"names":[],"mappings":";;;AAGA,MAAa,gBAAgB;IAM3B,YAAY,OAAsB,EAAE,QAAkB;QACpD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAA;QAC9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QAEtB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IAC/B,CAAC;IAEO,WAAW;QACjB,OAAO,mCAAmC,CAAA;IAC5C,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAA6B;QAC3C,MAAM,OAAO,GAAG;YACd,aAAa,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE;YACtC,cAAc,EAAE,kBAAkB;SACnC,CAAA;QAED,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE;YAClC,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF;AA7BD,4CA6BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/topsort/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/topsort/impression/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const client_1 = require("../client");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Impression',
|
|
6
|
+
defaultSubscription: 'type = "track" and event = "Product Viewed"',
|
|
7
|
+
description: 'Send impression events to Topsort when a consumer has viewed a promotable.',
|
|
8
|
+
fields: {
|
|
9
|
+
id: {
|
|
10
|
+
label: 'Event ID',
|
|
11
|
+
description: 'Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
default: {
|
|
15
|
+
'@path': '$.messageId'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
occurredAt: {
|
|
19
|
+
label: 'Occurred At',
|
|
20
|
+
description: 'Timestamp that the event happened at.',
|
|
21
|
+
type: 'datetime',
|
|
22
|
+
required: true,
|
|
23
|
+
default: {
|
|
24
|
+
'@path': '$.timestamp'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
opaqueUserId: {
|
|
28
|
+
label: 'Opaque User ID',
|
|
29
|
+
description: 'Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.',
|
|
30
|
+
type: 'string',
|
|
31
|
+
required: true,
|
|
32
|
+
default: {
|
|
33
|
+
'@path': '$.anonymousId'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
resolvedBidId: {
|
|
37
|
+
label: 'Resolved Bid ID',
|
|
38
|
+
description: 'Identifier of an instance of a resolved auction for a determined product. The length should not exceed 128 characters.',
|
|
39
|
+
type: 'string',
|
|
40
|
+
required: true,
|
|
41
|
+
default: {
|
|
42
|
+
'@path': '$.properties.resolvedBidId'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
perform: (request, { payload, settings }) => {
|
|
47
|
+
const client = new client_1.TopsortAPIClient(request, settings);
|
|
48
|
+
return client.sendEvent({
|
|
49
|
+
impressions: [payload]
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.default = action;
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/topsort/impression/index.ts"],"names":[],"mappings":";;AAGA,sCAA4C;AAE5C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,mBAAmB,EAAE,6CAA6C;IACpE,WAAW,EAAE,4EAA4E;IACvF,MAAM,EAAE;QACN,EAAE,EAAE;YACF,KAAK,EAAE,UAAU;YACjB,WAAW,EACT,8GAA8G;YAChH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,uCAAuC;YACpD,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,gBAAgB;YACvB,WAAW,EACT,0GAA0G;YAC5G,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,aAAa,EAAE;YACb,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,wHAAwH;YAC1H,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,4BAA4B;aACtC;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,MAAM,MAAM,GAAG,IAAI,yBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;QACtD,OAAO,MAAM,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,CAAC,OAAO,CAAC;SACvB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { DestinationDefinition } from '@segment/actions-core';
|
|
2
2
|
import type { Settings } from './generated-types';
|
|
3
|
-
|
|
3
|
+
declare const destination: DestinationDefinition<Settings>;
|
|
4
|
+
export default destination;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 impression_1 = __importDefault(require("./impression"));
|
|
8
|
+
const click_1 = __importDefault(require("./click"));
|
|
9
|
+
const purchase_1 = __importDefault(require("./purchase"));
|
|
10
|
+
const destination = {
|
|
11
|
+
name: 'Topsort',
|
|
12
|
+
slug: 'actions-topsort',
|
|
13
|
+
mode: 'cloud',
|
|
14
|
+
description: 'Send events server-side to the Topsort Events API.',
|
|
15
|
+
authentication: {
|
|
16
|
+
scheme: 'custom',
|
|
17
|
+
fields: {
|
|
18
|
+
api_key: {
|
|
19
|
+
label: 'API Key',
|
|
20
|
+
description: 'Created under Settings > API Integration in the Topsort Manager Platform.',
|
|
21
|
+
type: 'password',
|
|
22
|
+
required: true
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
presets: [
|
|
27
|
+
{
|
|
28
|
+
name: 'Impression',
|
|
29
|
+
subscribe: 'type = "track" and event = "Product Viewed"',
|
|
30
|
+
partnerAction: 'impression',
|
|
31
|
+
mapping: actions_core_1.defaultValues(impression_1.default.fields),
|
|
32
|
+
type: 'automatic'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Click',
|
|
36
|
+
subscribe: 'type = "track" and event = "Product Clicked"',
|
|
37
|
+
partnerAction: 'click',
|
|
38
|
+
mapping: actions_core_1.defaultValues(click_1.default.fields),
|
|
39
|
+
type: 'automatic'
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'Purchase',
|
|
43
|
+
subscribe: 'type = "track" and event = "Order Completed"',
|
|
44
|
+
partnerAction: 'purchase',
|
|
45
|
+
mapping: actions_core_1.defaultValues(purchase_1.default.fields),
|
|
46
|
+
type: 'automatic'
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
actions: {
|
|
50
|
+
impression: impression_1.default,
|
|
51
|
+
click: click_1.default,
|
|
52
|
+
purchase: purchase_1.default
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.default = destination;
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/topsort/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AAIrD,8DAAqC;AAErC,oDAA2B;AAE3B,0DAAiC;AAEjC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,oDAAoD;IACjE,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,2EAA2E;gBACxF,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,YAAY;YAClB,SAAS,EAAE,6CAA6C;YACxD,aAAa,EAAE,YAAY;YAC3B,OAAO,EAAE,4BAAa,CAAC,oBAAU,CAAC,MAAM,CAAC;YACzC,IAAI,EAAE,WAAW;SAClB;QACD;YACE,IAAI,EAAE,OAAO;YACb,SAAS,EAAE,8CAA8C;YACzD,aAAa,EAAE,OAAO;YACtB,OAAO,EAAE,4BAAa,CAAC,eAAK,CAAC,MAAM,CAAC;YACpC,IAAI,EAAE,WAAW;SAClB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,8CAA8C;YACzD,aAAa,EAAE,UAAU;YACzB,OAAO,EAAE,4BAAa,CAAC,kBAAQ,CAAC,MAAM,CAAC;YACvC,IAAI,EAAE,WAAW;SAClB;KACF;IACD,OAAO,EAAE;QACP,UAAU,EAAV,oBAAU;QACV,KAAK,EAAL,eAAK;QACL,QAAQ,EAAR,kBAAQ;KACT;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/topsort/purchase/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const client_1 = require("../client");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Purchase',
|
|
6
|
+
defaultSubscription: 'type = "track" and event = "Order Completed"',
|
|
7
|
+
description: 'Send purchase events to Topsort when a consumer places an order.',
|
|
8
|
+
fields: {
|
|
9
|
+
id: {
|
|
10
|
+
label: 'Event ID',
|
|
11
|
+
description: 'Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
default: {
|
|
15
|
+
'@path': '$.messageId'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
occurredAt: {
|
|
19
|
+
label: 'Occurred At',
|
|
20
|
+
description: 'Timestamp that the event happened at.',
|
|
21
|
+
type: 'datetime',
|
|
22
|
+
required: true,
|
|
23
|
+
default: {
|
|
24
|
+
'@path': '$.timestamp'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
opaqueUserId: {
|
|
28
|
+
label: 'Opaque User ID',
|
|
29
|
+
description: 'Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.',
|
|
30
|
+
type: 'string',
|
|
31
|
+
required: true,
|
|
32
|
+
default: {
|
|
33
|
+
'@path': '$.anonymousId'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
items: {
|
|
37
|
+
label: 'Items',
|
|
38
|
+
description: 'Item information list related to the event.',
|
|
39
|
+
type: 'object',
|
|
40
|
+
required: true,
|
|
41
|
+
multiple: true,
|
|
42
|
+
properties: {
|
|
43
|
+
productId: {
|
|
44
|
+
label: 'Product ID',
|
|
45
|
+
description: 'The marketplace ID of the product being purchased.',
|
|
46
|
+
type: 'string',
|
|
47
|
+
required: true
|
|
48
|
+
},
|
|
49
|
+
unitPrice: {
|
|
50
|
+
label: 'Unit Price',
|
|
51
|
+
description: 'The price of a single item in the marketplace currency.',
|
|
52
|
+
type: 'number',
|
|
53
|
+
required: false
|
|
54
|
+
},
|
|
55
|
+
quantity: {
|
|
56
|
+
label: 'Quantity',
|
|
57
|
+
description: 'Count of products purchased.',
|
|
58
|
+
type: 'integer',
|
|
59
|
+
required: false
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
default: {
|
|
63
|
+
'@arrayPath': [
|
|
64
|
+
'$.properties.products',
|
|
65
|
+
{
|
|
66
|
+
productId: { '@path': '$.product_id' },
|
|
67
|
+
unitPrice: { '@path': '$.price' },
|
|
68
|
+
quantity: { '@path': '$.quantity' }
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
perform: (request, { payload, settings }) => {
|
|
75
|
+
const client = new client_1.TopsortAPIClient(request, settings);
|
|
76
|
+
return client.sendEvent({
|
|
77
|
+
purchases: [payload]
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
exports.default = action;
|
|
82
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/topsort/purchase/index.ts"],"names":[],"mappings":";;AAGA,sCAA4C;AAE5C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,mBAAmB,EAAE,8CAA8C;IACnE,WAAW,EAAE,kEAAkE;IAC/E,MAAM,EAAE;QACN,EAAE,EAAE;YACF,KAAK,EAAE,UAAU;YACjB,WAAW,EACT,8GAA8G;YAChH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,uCAAuC;YACpD,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,gBAAgB;YACvB,WAAW,EACT,0GAA0G;YAC5G,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,6CAA6C;YAC1D,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,KAAK,EAAE,YAAY;oBACnB,WAAW,EAAE,oDAAoD;oBACjE,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;iBACf;gBACD,SAAS,EAAE;oBACT,KAAK,EAAE,YAAY;oBACnB,WAAW,EAAE,yDAAyD;oBACtE,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,KAAK;iBAChB;gBACD,QAAQ,EAAE;oBACR,KAAK,EAAE,UAAU;oBACjB,WAAW,EAAE,8BAA8B;oBAC3C,IAAI,EAAE,SAAS;oBACf,QAAQ,EAAE,KAAK;iBAChB;aACF;YACD,OAAO,EAAE;gBACP,YAAY,EAAE;oBACZ,uBAAuB;oBACvB;wBACE,SAAS,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;wBACtC,SAAS,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;wBACjC,QAAQ,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE;qBACpC;iBACF;aACF;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,MAAM,MAAM,GAAG,IAAI,yBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;QACtD,OAAO,MAAM,CAAC,SAAS,CAAC;YACtB,SAAS,EAAE,CAAC,OAAO,CAAC;SACrB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
package/dist/lib/test-data.js
CHANGED
|
@@ -77,6 +77,8 @@ function setTestData(seedName, type, fieldName, format, choices) {
|
|
|
77
77
|
val = chance.email();
|
|
78
78
|
if (fieldName === 'currency')
|
|
79
79
|
val = chance.currency().code;
|
|
80
|
+
if (fieldName === 'phone_number')
|
|
81
|
+
val = '+' + chance.phone({ formatted: false });
|
|
80
82
|
return val;
|
|
81
83
|
}
|
|
82
84
|
function setData(eventData, chanceName, fieldName, field, data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-data.js","sourceRoot":"","sources":["../../src/lib/test-data.ts"],"names":[],"mappings":";;;;;;AAEA,oD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ACD,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;YAC9D,SAAQ;SACT;QACD,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;KACtD;IAED,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;AAClC,CAAC;AAvDD,4CAuDC"}
|
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.
|
|
4
|
+
"version": "3.302.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@bufbuild/protobuf": "^1.4.2",
|
|
45
45
|
"@bufbuild/protoc-gen-es": "^1.4.2",
|
|
46
46
|
"@segment/a1-notation": "^2.1.4",
|
|
47
|
-
"@segment/actions-core": "3.127.
|
|
48
|
-
"@segment/actions-shared": "1.108.
|
|
47
|
+
"@segment/actions-core": "^3.127.0",
|
|
48
|
+
"@segment/actions-shared": "^1.108.0",
|
|
49
49
|
"@types/node": "^18.11.15",
|
|
50
50
|
"ajv-formats": "^2.1.1",
|
|
51
51
|
"aws4": "^1.12.0",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"__tests__/__helpers__/"
|
|
88
88
|
]
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "e341741c6212b65080d3878e4f387f0955df1bf6"
|
|
91
91
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,237 +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 utils_1 = require("./utils");
|
|
8
|
-
const syncAudiences_1 = __importDefault(require("./syncAudiences"));
|
|
9
|
-
const destination = {
|
|
10
|
-
name: 'Amazon Ads',
|
|
11
|
-
slug: 'actions-amazon-ads',
|
|
12
|
-
mode: 'cloud',
|
|
13
|
-
authentication: {
|
|
14
|
-
scheme: 'oauth2',
|
|
15
|
-
fields: {
|
|
16
|
-
region: {
|
|
17
|
-
label: 'Region',
|
|
18
|
-
description: 'Region for API Endpoint, either NA, EU, FE.',
|
|
19
|
-
choices: [
|
|
20
|
-
{ label: 'North America (NA)', value: 'https://advertising-api.amazon.com' },
|
|
21
|
-
{ label: 'Europe (EU)', value: 'https://advertising-api-eu.amazon.com' },
|
|
22
|
-
{ label: 'Far East (FE)', value: 'https://advertising-api-fe.amazon.com' }
|
|
23
|
-
],
|
|
24
|
-
default: 'https://advertising-api.amazon.com',
|
|
25
|
-
type: 'string',
|
|
26
|
-
required: true
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
testAuthentication: async (request, { auth, settings }) => {
|
|
30
|
-
if (!auth?.accessToken) {
|
|
31
|
-
throw new actions_core_1.InvalidAuthenticationError('Please authenticate via Oauth before enabling the destination.');
|
|
32
|
-
}
|
|
33
|
-
try {
|
|
34
|
-
await request(`${settings.region}/v2/profiles`, {
|
|
35
|
-
method: 'GET'
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
catch (e) {
|
|
39
|
-
const error = e;
|
|
40
|
-
if (error.message === 'Unauthorized') {
|
|
41
|
-
throw new actions_core_1.InvalidAuthenticationError('Invalid Amazon Oauth access token. Please reauthenticate to retrieve a valid access token before enabling the destination.');
|
|
42
|
-
}
|
|
43
|
-
throw e;
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
refreshAccessToken: async (request, { auth, settings }) => {
|
|
47
|
-
const endpoint = utils_1.AUTHORIZATION_URL[`${settings.region}`];
|
|
48
|
-
let res;
|
|
49
|
-
console.log(settings.region, auth, endpoint);
|
|
50
|
-
try {
|
|
51
|
-
res = await request('https://api.amazon.com/auth/o2/token', {
|
|
52
|
-
method: 'POST',
|
|
53
|
-
body: new URLSearchParams({
|
|
54
|
-
refresh_token: auth.refreshToken,
|
|
55
|
-
client_id: auth.clientId,
|
|
56
|
-
client_secret: auth.clientSecret,
|
|
57
|
-
grant_type: 'refresh_token'
|
|
58
|
-
}),
|
|
59
|
-
headers: {
|
|
60
|
-
authorization: ''
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
return { accessToken: res.data.access_token };
|
|
64
|
-
}
|
|
65
|
-
catch (e) {
|
|
66
|
-
console.log(e);
|
|
67
|
-
const error = e;
|
|
68
|
-
if (error.response?.data?.error === 'invalid_grant') {
|
|
69
|
-
throw new actions_core_1.InvalidAuthenticationError(`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);
|
|
70
|
-
}
|
|
71
|
-
throw new actions_core_1.InvalidAuthenticationError(`Failed to fetch a new access token. Reason: ${error.response?.data?.error}`, actions_core_1.ErrorCodes.OAUTH_REFRESH_FAILED);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
extendRequest({ auth }) {
|
|
76
|
-
return {
|
|
77
|
-
headers: {
|
|
78
|
-
authorization: `Bearer ${auth?.accessToken}`,
|
|
79
|
-
'Amazon-Advertising-API-ClientID': process.env.ACTIONS_AMAZON_ADS_CLIENT_ID || ''
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
},
|
|
83
|
-
audienceFields: {
|
|
84
|
-
description: {
|
|
85
|
-
type: 'string',
|
|
86
|
-
label: 'Description',
|
|
87
|
-
required: true,
|
|
88
|
-
description: 'The audience description. Must be an alphanumeric, non-null string between 0 to 1000 characters in length.'
|
|
89
|
-
},
|
|
90
|
-
countryCode: {
|
|
91
|
-
type: 'string',
|
|
92
|
-
label: 'Country Code',
|
|
93
|
-
required: true,
|
|
94
|
-
description: 'A String value representing ISO 3166-1 alpha-2 country code for the members in this audience.'
|
|
95
|
-
},
|
|
96
|
-
externalAudienceId: {
|
|
97
|
-
type: 'string',
|
|
98
|
-
label: 'External Audience Id',
|
|
99
|
-
required: true,
|
|
100
|
-
description: 'The user-defined audience identifier.'
|
|
101
|
-
},
|
|
102
|
-
cpmCents: {
|
|
103
|
-
label: 'CPM Cents',
|
|
104
|
-
type: 'number',
|
|
105
|
-
description: `Cost per thousand impressions (CPM) in cents. For example, $1.00 = 100 cents.`
|
|
106
|
-
},
|
|
107
|
-
currency: {
|
|
108
|
-
label: 'Currency',
|
|
109
|
-
type: 'string',
|
|
110
|
-
description: `The price paid. Base units depend on the currency. As an example, USD should be reported as Dollars.Cents, whereas JPY should be reported as a whole number of Yen. All provided values will be rounded to two digits with toFixed(2).Refer [Aamzon Ads Documentation](https://advertising.amazon.com/API/docs/en-us/amc-advertiser-audience#tag/Audience-Metadata/operation/CreateAudienceMetadataV2) to view supported Currency`
|
|
111
|
-
},
|
|
112
|
-
ttl: {
|
|
113
|
-
type: 'number',
|
|
114
|
-
label: 'Time-to-live',
|
|
115
|
-
required: false,
|
|
116
|
-
description: 'Time-to-live in seconds. The amount of time the record is associated with the audience.'
|
|
117
|
-
},
|
|
118
|
-
advertiserId: {
|
|
119
|
-
label: 'Advertiser ID',
|
|
120
|
-
description: 'Advertiser Id',
|
|
121
|
-
type: 'string',
|
|
122
|
-
required: true
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
audienceConfig: {
|
|
126
|
-
mode: {
|
|
127
|
-
type: 'synced',
|
|
128
|
-
full_audience_sync: false
|
|
129
|
-
},
|
|
130
|
-
async createAudience(request, createAudienceInput) {
|
|
131
|
-
const { audienceName, statsContext, audienceSettings } = createAudienceInput;
|
|
132
|
-
const { statsClient, tags: statsTags } = statsContext || {};
|
|
133
|
-
const endpoint = createAudienceInput.settings.region;
|
|
134
|
-
const description = audienceSettings?.description;
|
|
135
|
-
const advertiser_id = audienceSettings?.advertiserId;
|
|
136
|
-
const external_audience_id = audienceSettings?.externalAudienceId;
|
|
137
|
-
const country_code = audienceSettings?.countryCode;
|
|
138
|
-
const ttl = audienceSettings?.ttl;
|
|
139
|
-
const currency = audienceSettings?.currency;
|
|
140
|
-
const cpm_cents = audienceSettings?.cpmCents;
|
|
141
|
-
const statsName = 'createAmazonAudience';
|
|
142
|
-
statsTags?.push(`slug:${destination.slug}`);
|
|
143
|
-
statsTags?.push(`ttl_type:${typeof ttl}_${ttl}`);
|
|
144
|
-
statsTags?.push(`cpmcents_type:${typeof cpm_cents}_${cpm_cents}`);
|
|
145
|
-
statsClient?.incr(`${statsName}.intialise`, 1, statsTags);
|
|
146
|
-
console.log(ttl, cpm_cents);
|
|
147
|
-
if (!advertiser_id) {
|
|
148
|
-
throw new actions_core_1.IntegrationError('Missing advertiserId Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
149
|
-
}
|
|
150
|
-
if (!description) {
|
|
151
|
-
throw new actions_core_1.IntegrationError('Missing description Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
152
|
-
}
|
|
153
|
-
if (!external_audience_id) {
|
|
154
|
-
throw new actions_core_1.IntegrationError('Missing externalAudienceId Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
155
|
-
}
|
|
156
|
-
if (!audienceName) {
|
|
157
|
-
throw new actions_core_1.IntegrationError('Missing audienceName Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
158
|
-
}
|
|
159
|
-
if (!country_code) {
|
|
160
|
-
throw new actions_core_1.IntegrationError('Missing countryCode Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
161
|
-
}
|
|
162
|
-
const payload = {
|
|
163
|
-
name: audienceName,
|
|
164
|
-
description: description,
|
|
165
|
-
targetResource: {
|
|
166
|
-
advertiserId: advertiser_id
|
|
167
|
-
},
|
|
168
|
-
metadata: {
|
|
169
|
-
externalAudienceId: external_audience_id
|
|
170
|
-
},
|
|
171
|
-
countryCode: country_code
|
|
172
|
-
};
|
|
173
|
-
if (ttl) {
|
|
174
|
-
const timeToLive = Number(ttl);
|
|
175
|
-
if (!timeToLive) {
|
|
176
|
-
throw new actions_core_1.IntegrationError('TTL:-String can not be converted to Number', 'INVALID_TTL_VALUE', 400);
|
|
177
|
-
}
|
|
178
|
-
payload.metadata.ttl = timeToLive;
|
|
179
|
-
}
|
|
180
|
-
if (cpm_cents && currency) {
|
|
181
|
-
if (!utils_1.CURRENCY.includes(currency)) {
|
|
182
|
-
throw new actions_core_1.IntegrationError('Invalid Currency Value', 'INVALID_CURRENCY_VALUE', 400);
|
|
183
|
-
}
|
|
184
|
-
const cpmCents = Number(cpm_cents);
|
|
185
|
-
if (!cpmCents) {
|
|
186
|
-
throw new actions_core_1.IntegrationError('CPM_CENTS:-String can not be converted to Number', 'INVALID_CPMCENTS_VALUE', 400);
|
|
187
|
-
}
|
|
188
|
-
payload.metadata.audienceFees = [];
|
|
189
|
-
payload.metadata?.audienceFees.push({
|
|
190
|
-
currency,
|
|
191
|
-
cpmCents: cpmCents
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
statsTags?.push(`slug:${destination.slug}`);
|
|
195
|
-
statsClient?.incr(`${statsName}.call`, 1, statsTags);
|
|
196
|
-
let payloadString = JSON.stringify(payload);
|
|
197
|
-
payloadString = payloadString.replace(utils_1.REGEX_ADVERTISERID, '"advertiserId":$1');
|
|
198
|
-
const response = await request(`${endpoint}/amc/audiences/metadata`, {
|
|
199
|
-
method: 'POST',
|
|
200
|
-
body: payloadString,
|
|
201
|
-
headers: {
|
|
202
|
-
'Content-Type': 'application/vnd.amcaudiences.v1+json'
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
const res = await response.text();
|
|
206
|
-
const resp = utils_1.extractNumberAndSubstituteWithStringValue(res, utils_1.REGEX_AUDIENCEID, '"audienceId":"$1"');
|
|
207
|
-
return {
|
|
208
|
-
externalId: resp.audienceId
|
|
209
|
-
};
|
|
210
|
-
},
|
|
211
|
-
async getAudience(request, getAudienceInput) {
|
|
212
|
-
const { statsContext } = getAudienceInput;
|
|
213
|
-
const audience_id = getAudienceInput.externalId;
|
|
214
|
-
const endpoint = getAudienceInput.settings.region;
|
|
215
|
-
const { statsClient, tags: statsTags } = statsContext || {};
|
|
216
|
-
const statsName = 'getAudience';
|
|
217
|
-
statsTags?.push(`slug:${destination.slug}`);
|
|
218
|
-
statsClient?.incr(`${statsName}.call`, 1, statsTags);
|
|
219
|
-
if (!audience_id) {
|
|
220
|
-
throw new actions_core_1.IntegrationError('Missing audienceId value', 'MISSING_REQUIRED_FIELD', 400);
|
|
221
|
-
}
|
|
222
|
-
const response = await request(`${endpoint}/amc/audiences/metadata/${audience_id}`, {
|
|
223
|
-
method: 'GET'
|
|
224
|
-
});
|
|
225
|
-
const res = await response.text();
|
|
226
|
-
const resp = utils_1.extractNumberAndSubstituteWithStringValue(res, utils_1.REGEX_AUDIENCEID, '"audienceId":"$1"');
|
|
227
|
-
return {
|
|
228
|
-
externalId: resp.audienceId
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
actions: {
|
|
233
|
-
syncAudiences: syncAudiences_1.default
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
exports.default = destination;
|
|
237
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAgG;AAGhG,mCAOgB;AAEhB,oEAA2C;AAE3C,MAAM,WAAW,GAA8D;IAC7E,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,oBAAoB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QAAQ,CAAC,IAAI,EAAE,CAAA;YAEjC,MAAM,IAAI,GAAG,iDAAyC,CAAC,GAAG,EAAE,wBAAgB,EAAE,mBAAmB,CAAC,CAAA;YAClG,OAAO;gBACL,UAAU,EAAE,IAAI,CAAC,UAAU;aAC5B,CAAA;QACH,CAAC;KACF;IACD,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface Payload {
|
|
2
|
-
event_name?: string;
|
|
3
|
-
externalUserId: string;
|
|
4
|
-
email?: string;
|
|
5
|
-
firstName?: string;
|
|
6
|
-
lastName?: string;
|
|
7
|
-
phone?: string;
|
|
8
|
-
postal?: string;
|
|
9
|
-
state?: string;
|
|
10
|
-
city?: string;
|
|
11
|
-
address?: string;
|
|
12
|
-
audienceId: string;
|
|
13
|
-
enable_batching: boolean;
|
|
14
|
-
batch_size?: number;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/amazon-ads/syncAudiences/generated-types.ts"],"names":[],"mappings":""}
|