@segment/action-destinations 3.337.2-staging.1 → 3.337.4-staging-1
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/README.md +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js +6 -2
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js.map +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/preCheck.js +7 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/preCheck.js.map +1 -1
- package/dist/destinations/aggregations-io/generated-types.d.ts +4 -0
- package/dist/destinations/aggregations-io/generated-types.js.map +1 -0
- package/dist/destinations/aggregations-io/index.js +58 -0
- package/dist/destinations/aggregations-io/index.js.map +1 -0
- package/dist/destinations/aggregations-io/send/generated-types.d.ts +7 -0
- package/dist/destinations/aggregations-io/send/generated-types.js.map +1 -0
- package/dist/destinations/aggregations-io/send/index.js +44 -0
- package/dist/destinations/aggregations-io/send/index.js.map +1 -0
- package/dist/destinations/aggregations-io/types.d.ts +8 -0
- package/dist/destinations/aggregations-io/types.js +8 -0
- package/dist/destinations/aggregations-io/types.js.map +1 -0
- package/dist/destinations/airship/registerAndAssociate/generated-types.d.ts +3 -0
- package/dist/destinations/airship/registerAndAssociate/index.js +35 -7
- package/dist/destinations/airship/registerAndAssociate/index.js.map +1 -1
- package/dist/destinations/airship/utilities.d.ts +3 -1
- package/dist/destinations/airship/utilities.js +76 -41
- package/dist/destinations/airship/utilities.js.map +1 -1
- package/dist/destinations/algolia-insights/conversionEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/conversionEvents/index.js +7 -3
- package/dist/destinations/algolia-insights/conversionEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/index.js +7 -0
- package/dist/destinations/algolia-insights/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productAddedEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/productAddedEvents/index.js +7 -3
- package/dist/destinations/algolia-insights/productAddedEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productClickedEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/productClickedEvents/index.js +7 -3
- package/dist/destinations/algolia-insights/productClickedEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productListFilteredEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/productListFilteredEvents/index.js +7 -3
- package/dist/destinations/algolia-insights/productListFilteredEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productViewedEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/productViewedEvents/index.js +7 -3
- package/dist/destinations/algolia-insights/productViewedEvents/index.js.map +1 -1
- package/dist/destinations/amazon-ads/generated-types.d.ts +3 -0
- package/dist/destinations/amazon-ads/generated-types.js.map +1 -0
- package/dist/destinations/amazon-ads/index.d.ts +4 -0
- package/dist/destinations/amazon-ads/index.js +87 -0
- package/dist/destinations/amazon-ads/index.js.map +1 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +2 -0
- package/dist/destinations/{engage/sendgrid/Profile.js → amazon-ads/syncAudiences/generated-types.js} +1 -1
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +1 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.d.ts +5 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.js +15 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -0
- package/dist/destinations/amazon-ads/types.d.ts +22 -0
- package/dist/destinations/amazon-ads/types.js +11 -0
- package/dist/destinations/amazon-ads/types.js.map +1 -0
- package/dist/destinations/braze/index.js +12 -0
- package/dist/destinations/braze/index.js.map +1 -1
- package/dist/destinations/braze/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/braze/trackEvent/index.js +8 -0
- package/dist/destinations/braze/trackEvent/index.js.map +1 -1
- package/dist/destinations/braze/trackPurchase/generated-types.d.ts +1 -0
- package/dist/destinations/braze/trackPurchase/index.js +8 -0
- package/dist/destinations/braze/trackPurchase/index.js.map +1 -1
- package/dist/destinations/braze/utils.js +15 -11
- package/dist/destinations/braze/utils.js.map +1 -1
- package/dist/destinations/courier/generated-types.d.ts +4 -0
- package/dist/destinations/courier/generated-types.js +3 -0
- package/dist/destinations/courier/generated-types.js.map +1 -0
- package/dist/destinations/courier/index.d.ts +4 -0
- package/dist/destinations/courier/index.js +44 -0
- package/dist/destinations/courier/index.js.map +1 -0
- package/dist/destinations/courier/postToCourier/generated-types.d.ts +5 -0
- package/dist/destinations/courier/postToCourier/generated-types.js +3 -0
- package/dist/destinations/courier/postToCourier/generated-types.js.map +1 -0
- package/dist/destinations/courier/postToCourier/index.js +35 -0
- package/dist/destinations/courier/postToCourier/index.js.map +1 -0
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js +5 -5
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js.map +1 -1
- package/dist/destinations/criteo-audiences/criteo-audiences.js +13 -2
- package/dist/destinations/criteo-audiences/criteo-audiences.js.map +1 -1
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js +5 -5
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js.map +1 -1
- package/dist/destinations/customerio/createUpdateDevice/generated-types.d.ts +3 -0
- package/dist/destinations/customerio/createUpdateDevice/index.js +25 -16
- package/dist/destinations/customerio/createUpdateDevice/index.js.map +1 -1
- package/dist/destinations/customerio/createUpdateObject/generated-types.d.ts +3 -0
- package/dist/destinations/customerio/createUpdateObject/index.js +76 -39
- package/dist/destinations/customerio/createUpdateObject/index.js.map +1 -1
- package/dist/destinations/customerio/createUpdatePerson/generated-types.d.ts +4 -1
- package/dist/destinations/customerio/createUpdatePerson/index.d.ts +1 -1
- package/dist/destinations/customerio/createUpdatePerson/index.js +50 -41
- package/dist/destinations/customerio/createUpdatePerson/index.js.map +1 -1
- package/dist/destinations/customerio/deleteDevice/index.js +14 -4
- package/dist/destinations/customerio/deleteDevice/index.js.map +1 -1
- package/dist/destinations/customerio/deleteObject/generated-types.d.ts +4 -0
- package/dist/destinations/customerio/deleteObject/generated-types.js +3 -0
- package/dist/destinations/customerio/deleteObject/generated-types.js.map +1 -0
- package/dist/destinations/customerio/deleteObject/index.d.ts +5 -0
- package/dist/destinations/customerio/deleteObject/index.js +48 -0
- package/dist/destinations/customerio/deleteObject/index.js.map +1 -0
- package/dist/destinations/customerio/deletePerson/generated-types.d.ts +3 -0
- package/dist/destinations/customerio/deletePerson/generated-types.js +3 -0
- package/dist/destinations/customerio/deletePerson/generated-types.js.map +1 -0
- package/dist/destinations/customerio/deletePerson/index.d.ts +5 -0
- package/dist/destinations/customerio/deletePerson/index.js +41 -0
- package/dist/destinations/customerio/deletePerson/index.js.map +1 -0
- package/dist/destinations/customerio/deleteRelationship/generated-types.d.ts +6 -0
- package/dist/destinations/customerio/deleteRelationship/generated-types.js +3 -0
- package/dist/destinations/customerio/deleteRelationship/generated-types.js.map +1 -0
- package/dist/destinations/customerio/deleteRelationship/index.d.ts +5 -0
- package/dist/destinations/customerio/deleteRelationship/index.js +82 -0
- package/dist/destinations/customerio/deleteRelationship/index.js.map +1 -0
- package/dist/destinations/customerio/index.js +39 -15
- package/dist/destinations/customerio/index.js.map +1 -1
- package/dist/destinations/customerio/mergePeople/generated-types.d.ts +4 -0
- package/dist/destinations/customerio/mergePeople/generated-types.js +3 -0
- package/dist/destinations/customerio/mergePeople/generated-types.js.map +1 -0
- package/dist/destinations/customerio/mergePeople/index.d.ts +5 -0
- package/dist/destinations/customerio/mergePeople/index.js +52 -0
- package/dist/destinations/customerio/mergePeople/index.js.map +1 -0
- package/dist/destinations/customerio/reportDeliveryEvent/generated-types.d.ts +10 -0
- package/dist/destinations/customerio/reportDeliveryEvent/generated-types.js +3 -0
- package/dist/destinations/customerio/reportDeliveryEvent/generated-types.js.map +1 -0
- package/dist/destinations/customerio/reportDeliveryEvent/index.d.ts +5 -0
- package/dist/destinations/customerio/reportDeliveryEvent/index.js +125 -0
- package/dist/destinations/customerio/reportDeliveryEvent/index.js.map +1 -0
- package/dist/destinations/customerio/suppressPerson/generated-types.d.ts +3 -0
- package/dist/destinations/customerio/suppressPerson/generated-types.js +3 -0
- package/dist/destinations/customerio/suppressPerson/generated-types.js.map +1 -0
- package/dist/destinations/customerio/suppressPerson/index.d.ts +5 -0
- package/dist/destinations/customerio/suppressPerson/index.js +41 -0
- package/dist/destinations/customerio/suppressPerson/index.js.map +1 -0
- package/dist/destinations/customerio/test-helper.d.ts +4 -0
- package/dist/destinations/customerio/test-helper.js +77 -0
- package/dist/destinations/customerio/test-helper.js.map +1 -0
- package/dist/destinations/customerio/trackEvent/index.js +26 -32
- package/dist/destinations/customerio/trackEvent/index.js.map +1 -1
- package/dist/destinations/customerio/trackPageView/generated-types.d.ts +1 -0
- package/dist/destinations/customerio/trackPageView/index.js +23 -29
- package/dist/destinations/customerio/trackPageView/index.js.map +1 -1
- package/dist/destinations/customerio/trackScreenView/generated-types.d.ts +1 -0
- package/dist/destinations/customerio/trackScreenView/index.js +22 -29
- package/dist/destinations/customerio/trackScreenView/index.js.map +1 -1
- package/dist/destinations/customerio/unsuppressPerson/generated-types.d.ts +3 -0
- package/dist/destinations/customerio/unsuppressPerson/generated-types.js +3 -0
- package/dist/destinations/customerio/unsuppressPerson/generated-types.js.map +1 -0
- package/dist/destinations/customerio/unsuppressPerson/index.d.ts +5 -0
- package/dist/destinations/customerio/unsuppressPerson/index.js +41 -0
- package/dist/destinations/customerio/unsuppressPerson/index.js.map +1 -0
- package/dist/destinations/customerio/utils.d.ts +44 -2
- package/dist/destinations/customerio/utils.js +89 -13
- package/dist/destinations/customerio/utils.js.map +1 -1
- package/dist/destinations/devrev/createRevUser/index.js +9 -6
- package/dist/destinations/devrev/createRevUser/index.js.map +1 -1
- package/dist/destinations/devrev/utils/types.d.ts +9 -0
- package/dist/destinations/display-video-360/index.js +1 -1
- package/dist/destinations/display-video-360/index.js.map +1 -1
- package/dist/destinations/display-video-360/properties.js +4 -4
- package/dist/destinations/display-video-360/properties.js.map +1 -1
- package/dist/destinations/display-video-360/proto/protofile.d.ts +1 -0
- package/dist/destinations/display-video-360/proto/protofile.js +1 -0
- package/dist/destinations/display-video-360/proto/protofile.js.map +1 -1
- package/dist/destinations/display-video-360/shared.js +1 -0
- package/dist/destinations/display-video-360/shared.js.map +1 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +7 -3
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +0 -3
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -1
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +8 -2
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -1
- package/dist/destinations/engage/utils/EngageStats.js +0 -4
- package/dist/destinations/engage/utils/EngageStats.js.map +1 -1
- package/dist/destinations/equals/generated-types.d.ts +3 -0
- package/dist/destinations/equals/generated-types.js +3 -0
- package/dist/destinations/equals/generated-types.js.map +1 -0
- package/dist/destinations/equals/index.d.ts +4 -0
- package/dist/destinations/equals/index.js +38 -0
- package/dist/destinations/equals/index.js.map +1 -0
- package/dist/destinations/equals/send/generated-types.d.ts +5 -0
- package/dist/destinations/equals/send/generated-types.js +3 -0
- package/dist/destinations/equals/send/generated-types.js.map +1 -0
- package/dist/destinations/equals/send/index.d.ts +5 -0
- package/dist/destinations/equals/send/index.js +38 -0
- package/dist/destinations/equals/send/index.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.js +1 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +0 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
- package/dist/destinations/hubspot/utils.d.ts +3 -3
- package/dist/destinations/index.js +4 -1
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/kevel/generated-types.d.ts +4 -0
- package/dist/destinations/kevel/generated-types.js +3 -0
- package/dist/destinations/kevel/generated-types.js.map +1 -0
- package/dist/destinations/kevel/index.d.ts +4 -0
- package/dist/destinations/kevel/index.js +45 -0
- package/dist/destinations/kevel/index.js.map +1 -0
- package/dist/destinations/kevel/syncAudience/generated-types.d.ts +8 -0
- package/dist/destinations/kevel/syncAudience/generated-types.js +3 -0
- package/dist/destinations/kevel/syncAudience/generated-types.js.map +1 -0
- package/dist/destinations/kevel/syncAudience/index.d.ts +5 -0
- package/dist/destinations/kevel/syncAudience/index.js +64 -0
- package/dist/destinations/kevel/syncAudience/index.js.map +1 -0
- package/dist/destinations/kevel/syncTraits/generated-types.d.ts +6 -0
- package/dist/destinations/kevel/syncTraits/generated-types.js +3 -0
- package/dist/destinations/kevel/syncTraits/generated-types.js.map +1 -0
- package/dist/destinations/kevel/syncTraits/index.d.ts +5 -0
- package/dist/destinations/kevel/syncTraits/index.js +39 -0
- package/dist/destinations/kevel/syncTraits/index.js.map +1 -0
- package/dist/destinations/linkedin-conversions/api/api.test.js +43 -25
- package/dist/destinations/linkedin-conversions/api/api.test.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/index.d.ts +3 -2
- package/dist/destinations/linkedin-conversions/api/index.js +31 -15
- package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/streamConversion/generated-types.d.ts +1 -1
- package/dist/destinations/linkedin-conversions/streamConversion/index.js +2 -1
- package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/types.d.ts +6 -7
- package/dist/destinations/marketo-static-lists/addToList/index.js +2 -2
- package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/functions.js +7 -7
- package/dist/destinations/marketo-static-lists/functions.js.map +1 -1
- package/dist/destinations/marketo-static-lists/removeFromList/index.js +2 -2
- package/dist/destinations/marketo-static-lists/removeFromList/index.js.map +1 -1
- package/dist/destinations/mixpanel/incrementProperties/__test__/__snapshots__/snapshot.test.js.snap +18 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.d.ts +1 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.js +129 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.js.map +1 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.d.ts +1 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.js +69 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.js.map +1 -0
- package/dist/destinations/mixpanel/incrementProperties/generated-types.d.ts +8 -0
- package/dist/destinations/mixpanel/incrementProperties/generated-types.js +3 -0
- package/dist/destinations/mixpanel/incrementProperties/generated-types.js.map +1 -0
- package/dist/destinations/mixpanel/incrementProperties/index.d.ts +5 -0
- package/dist/destinations/mixpanel/incrementProperties/index.js +84 -0
- package/dist/destinations/mixpanel/incrementProperties/index.js.map +1 -0
- package/dist/destinations/mixpanel/index.js +3 -1
- package/dist/destinations/mixpanel/index.js.map +1 -1
- package/dist/destinations/mixpanel/mixpanel-types.d.ts +4 -0
- package/dist/destinations/moengage/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/moengage/trackEvent/index.js +10 -2
- package/dist/destinations/moengage/trackEvent/index.js.map +1 -1
- package/dist/destinations/schematic/generated-types.d.ts +3 -0
- package/dist/destinations/schematic/generated-types.js +3 -0
- package/dist/destinations/schematic/generated-types.js.map +1 -0
- package/dist/destinations/schematic/identifyUser/generated-types.d.ts +18 -0
- package/dist/destinations/schematic/identifyUser/generated-types.js +3 -0
- package/dist/destinations/schematic/identifyUser/generated-types.js.map +1 -0
- package/dist/destinations/schematic/identifyUser/index.d.ts +5 -0
- package/dist/destinations/schematic/identifyUser/index.js +114 -0
- package/dist/destinations/schematic/identifyUser/index.js.map +1 -0
- package/dist/destinations/schematic/index.d.ts +4 -0
- package/dist/destinations/schematic/index.js +58 -0
- package/dist/destinations/schematic/index.js.map +1 -0
- package/dist/destinations/schematic/trackEvent/generated-types.d.ts +13 -0
- package/dist/destinations/schematic/trackEvent/generated-types.js +3 -0
- package/dist/destinations/schematic/trackEvent/generated-types.js.map +1 -0
- package/dist/destinations/schematic/trackEvent/index.d.ts +5 -0
- package/dist/destinations/schematic/trackEvent/index.js +89 -0
- package/dist/destinations/schematic/trackEvent/index.js.map +1 -0
- package/dist/destinations/segment/generated-types.d.ts +0 -1
- package/dist/destinations/segment/index.js +3 -13
- package/dist/destinations/segment/index.js.map +1 -1
- package/dist/destinations/segment/properties.d.ts +1 -1
- package/dist/destinations/segment/properties.js +3 -3
- package/dist/destinations/segment/properties.js.map +1 -1
- package/dist/destinations/segment/sendGroup/index.js +5 -16
- package/dist/destinations/segment/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment/sendIdentify/index.js +5 -16
- package/dist/destinations/segment/sendIdentify/index.js.map +1 -1
- package/dist/destinations/segment/sendPage/index.js +5 -16
- package/dist/destinations/segment/sendPage/index.js.map +1 -1
- package/dist/destinations/segment/sendScreen/index.js +5 -16
- package/dist/destinations/segment/sendScreen/index.js.map +1 -1
- package/dist/destinations/segment/sendTrack/index.js +5 -16
- package/dist/destinations/segment/sendTrack/index.js.map +1 -1
- package/dist/destinations/surveysparrow/createContact/generated-types.d.ts +10 -0
- package/dist/destinations/surveysparrow/createContact/generated-types.js +3 -0
- package/dist/destinations/surveysparrow/createContact/generated-types.js.map +1 -0
- package/dist/destinations/surveysparrow/createContact/index.d.ts +5 -0
- package/dist/destinations/surveysparrow/createContact/index.js +105 -0
- package/dist/destinations/surveysparrow/createContact/index.js.map +1 -0
- package/dist/destinations/surveysparrow/generated-types.d.ts +3 -0
- package/dist/destinations/surveysparrow/generated-types.js +3 -0
- package/dist/destinations/surveysparrow/generated-types.js.map +1 -0
- package/dist/destinations/surveysparrow/index.d.ts +4 -0
- package/dist/destinations/surveysparrow/index.js +40 -0
- package/dist/destinations/surveysparrow/index.js.map +1 -0
- package/dist/destinations/surveysparrow/triggerSurvey/generated-types.d.ts +10 -0
- package/dist/destinations/surveysparrow/triggerSurvey/generated-types.js +3 -0
- package/dist/destinations/surveysparrow/triggerSurvey/generated-types.js.map +1 -0
- package/dist/destinations/surveysparrow/triggerSurvey/index.d.ts +8 -0
- package/dist/destinations/surveysparrow/triggerSurvey/index.js +165 -0
- package/dist/destinations/surveysparrow/triggerSurvey/index.js.map +1 -0
- package/dist/destinations/tiktok-conversions/common_fields.d.ts +2 -0
- package/dist/destinations/tiktok-conversions/common_fields.js +245 -0
- package/dist/destinations/tiktok-conversions/common_fields.js.map +1 -0
- package/dist/destinations/tiktok-conversions/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-conversions/formatter.js +43 -0
- package/dist/destinations/tiktok-conversions/formatter.js.map +1 -0
- package/dist/destinations/tiktok-conversions/index.js +3 -92
- package/dist/destinations/tiktok-conversions/index.js.map +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -3
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +24 -33
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/generated-types.d.ts +4 -12
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js +40 -113
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js.map +1 -1
- package/dist/destinations/tiktok-conversions/utils.d.ts +4 -0
- package/dist/destinations/tiktok-conversions/utils.js +65 -0
- package/dist/destinations/tiktok-conversions/utils.js.map +1 -0
- package/dist/destinations/tiktok-conversions-sandbox/common_fields.d.ts +2 -0
- package/dist/destinations/tiktok-conversions-sandbox/common_fields.js +244 -0
- package/dist/destinations/tiktok-conversions-sandbox/common_fields.js.map +1 -0
- package/dist/destinations/{tiktok-offline-conversions/reportOfflineEvent → tiktok-conversions-sandbox}/formatter.js +11 -11
- package/dist/destinations/tiktok-conversions-sandbox/formatter.js.map +1 -0
- package/dist/destinations/tiktok-conversions-sandbox/generated-types.d.ts +4 -0
- package/dist/destinations/tiktok-conversions-sandbox/generated-types.js +3 -0
- package/dist/destinations/tiktok-conversions-sandbox/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-conversions-sandbox/index.d.ts +4 -0
- package/dist/destinations/tiktok-conversions-sandbox/index.js +247 -0
- package/dist/destinations/tiktok-conversions-sandbox/index.js.map +1 -0
- package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/generated-types.d.ts +33 -0
- package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/generated-types.js +3 -0
- package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/index.d.ts +5 -0
- package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/index.js +16 -0
- package/dist/destinations/tiktok-conversions-sandbox/reportWebEvent/index.js.map +1 -0
- package/dist/destinations/tiktok-conversions-sandbox/utils.d.ts +4 -0
- package/dist/destinations/tiktok-conversions-sandbox/utils.js +65 -0
- package/dist/destinations/tiktok-conversions-sandbox/utils.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions/common_fields.js +179 -20
- package/dist/destinations/tiktok-offline-conversions/common_fields.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/formatter.d.ts +1 -0
- package/dist/destinations/tiktok-offline-conversions/formatter.js +11 -1
- package/dist/destinations/tiktok-offline-conversions/formatter.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/index.js +156 -153
- package/dist/destinations/tiktok-offline-conversions/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.d.ts +3 -3
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js +4 -305
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/generated-types.d.ts +25 -2
- package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/index.js +4 -29
- package/dist/destinations/tiktok-offline-conversions/trackNonPaymentOfflineConversion/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/generated-types.d.ts +18 -5
- package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/index.js +5 -126
- package/dist/destinations/tiktok-offline-conversions/trackPaymentOfflineConversion/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/utils.d.ts +8 -0
- package/dist/destinations/tiktok-offline-conversions/utils.js +67 -0
- package/dist/destinations/tiktok-offline-conversions/utils.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/common_fields.d.ts +2 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/common_fields.js +244 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/common_fields.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/formatter.js +43 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/formatter.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/generated-types.d.ts +4 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/generated-types.js +3 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/index.d.ts +4 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/index.js +251 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/index.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/generated-types.d.ts +33 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/generated-types.js +3 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/index.d.ts +5 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/index.js +16 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/reportOfflineEvent/index.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/generated-types.d.ts +33 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/generated-types.js +3 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/index.d.ts +5 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/index.js +16 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackNonPaymentOfflineConversion/index.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/generated-types.d.ts +33 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/generated-types.js +3 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/generated-types.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/index.d.ts +5 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/index.js +16 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/trackPaymentOfflineConversion/index.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/utils.d.ts +8 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/utils.js +68 -0
- package/dist/destinations/tiktok-offline-conversions-sandbox/utils.js.map +1 -0
- package/dist/destinations/webhook-audiences/index.js +1 -3
- package/dist/destinations/webhook-audiences/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/index.js +9 -1
- package/dist/destinations/yahoo-audiences/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/updateSegment/generated-types.d.ts +6 -2
- package/dist/destinations/yahoo-audiences/updateSegment/index.js +36 -11
- package/dist/destinations/yahoo-audiences/updateSegment/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/utils-rt.js +3 -3
- package/dist/destinations/yahoo-audiences/utils-rt.js.map +1 -1
- package/package.json +3 -3
- package/dist/destinations/engage/sendgrid/Profile.d.ts +0 -6
- package/dist/destinations/engage/sendgrid/Profile.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +0 -21
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +0 -174
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +0 -1
- package/dist/destinations/mixpanel/utils.d.ts +0 -13
- package/dist/destinations/mixpanel/utils.js +0 -117
- package/dist/destinations/mixpanel/utils.js.map +0 -1
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +0 -14
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +0 -1
- 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.map +0 -1
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +0 -174
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +0 -1
- package/dist/destinations/responsys/generated-types.d.ts +0 -5
- package/dist/destinations/responsys/generated-types.js.map +0 -1
- package/dist/destinations/responsys/index.js +0 -62
- package/dist/destinations/responsys/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/types.d.ts +0 -37
- package/dist/destinations/responsys/types.js +0 -3
- package/dist/destinations/responsys/types.js.map +0 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +0 -1
- package/dist/destinations/{responsys/asyncMergePetRecords → aggregations-io}/generated-types.js +0 -0
- package/dist/destinations/{responsys → aggregations-io}/index.d.ts +0 -0
- package/dist/destinations/{responsys/asyncMergeProfileListMembers → aggregations-io/send}/generated-types.js +0 -0
- package/dist/destinations/{responsys/asyncMergePetRecords → aggregations-io/send}/index.d.ts +0 -0
- package/dist/destinations/{responsys → amazon-ads}/generated-types.js +0 -0
- package/dist/destinations/{responsys/asyncMergeProfileListMembers → courier/postToCourier}/index.d.ts +0 -0
- package/dist/destinations/{tiktok-offline-conversions/reportOfflineEvent → tiktok-conversions-sandbox}/formatter.d.ts +1 -1
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commonFields = void 0;
|
|
4
|
+
exports.commonFields = {
|
|
5
|
+
event: {
|
|
6
|
+
label: 'Event Name',
|
|
7
|
+
type: 'string',
|
|
8
|
+
required: true,
|
|
9
|
+
description: 'Conversion event name. Please refer to the "Supported Web Events" section on in TikTok’s [Events API documentation](https://ads.tiktok.com/marketing_api/docs?id=1701890979375106) for accepted event names.'
|
|
10
|
+
},
|
|
11
|
+
event_id: {
|
|
12
|
+
label: 'Event ID',
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'Any hashed ID that can identify a unique user/session.',
|
|
15
|
+
default: {
|
|
16
|
+
'@path': '$.messageId'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
timestamp: {
|
|
20
|
+
label: 'Event Timestamp',
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Timestamp that the event took place, in ISO 8601 format.',
|
|
23
|
+
default: {
|
|
24
|
+
'@path': '$.timestamp'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
phone_number: {
|
|
28
|
+
label: 'Phone Number',
|
|
29
|
+
description: 'A single phone number or array of phone numbers in E.164 standard format. Segment will hash this value before sending to TikTok. e.g. +14150000000. Segment will hash this value before sending to TikTok.',
|
|
30
|
+
type: 'string',
|
|
31
|
+
multiple: true,
|
|
32
|
+
default: {
|
|
33
|
+
'@if': {
|
|
34
|
+
exists: { '@path': '$.properties.phone' },
|
|
35
|
+
then: { '@path': '$.properties.phone' },
|
|
36
|
+
else: { '@path': '$.context.traits.phone' }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
email: {
|
|
41
|
+
label: 'Email',
|
|
42
|
+
description: 'A single email address or an array of email addresses. Segment will hash this value before sending to TikTok.',
|
|
43
|
+
type: 'string',
|
|
44
|
+
format: 'email',
|
|
45
|
+
multiple: true,
|
|
46
|
+
default: {
|
|
47
|
+
'@if': {
|
|
48
|
+
exists: { '@path': '$.properties.email' },
|
|
49
|
+
then: { '@path': '$.properties.email' },
|
|
50
|
+
else: { '@path': '$.context.traits.email' }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
order_id: {
|
|
55
|
+
label: 'Order ID',
|
|
56
|
+
type: 'string',
|
|
57
|
+
description: 'Order ID of the transaction.',
|
|
58
|
+
default: {
|
|
59
|
+
'@path': '$.properties.order_id'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
shop_id: {
|
|
63
|
+
label: 'Shop ID',
|
|
64
|
+
type: 'string',
|
|
65
|
+
description: 'Shop ID of the transaction.',
|
|
66
|
+
default: {
|
|
67
|
+
'@path': '$.properties.shop_id'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
external_id: {
|
|
71
|
+
label: 'External ID',
|
|
72
|
+
description: 'Uniquely identifies the user who triggered the conversion event. Segment will hash this value before sending to TikTok. TikTok Conversions Destination supports both string and string[] types for sending external ID(s).',
|
|
73
|
+
type: 'string',
|
|
74
|
+
multiple: true,
|
|
75
|
+
default: {
|
|
76
|
+
'@if': {
|
|
77
|
+
exists: { '@path': '$.userId' },
|
|
78
|
+
then: { '@path': '$.userId' },
|
|
79
|
+
else: { '@path': '$.anonymousId' }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
ttclid: {
|
|
84
|
+
label: 'TikTok Click ID',
|
|
85
|
+
description: 'The value of the ttclid used to match website visitor events with TikTok ads. The ttclid is valid for 7 days. See [Set up ttclid](https://ads.tiktok.com/marketing_api/docs?rid=4eezrhr6lg4&id=1681728034437121) for details.',
|
|
86
|
+
type: 'string',
|
|
87
|
+
default: {
|
|
88
|
+
'@if': {
|
|
89
|
+
exists: { '@path': '$.properties.ttclid' },
|
|
90
|
+
then: { '@path': '$.properties.ttclid' },
|
|
91
|
+
else: { '@path': '$.integrations.TikTok Conversions.ttclid' }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
ttp: {
|
|
96
|
+
label: 'TikTok Cookie ID',
|
|
97
|
+
description: 'TikTok Cookie ID. If you also use Pixel SDK and have enabled cookies, Pixel SDK automatically saves a unique identifier in the `_ttp` cookie. The value of `_ttp` is used to match website visitor events with TikTok ads. You can extract the value of `_ttp` and attach the value here. To learn more about the `ttp` parameter, refer to [Events API 2.0 - Send TikTok Cookie](https://ads.tiktok.com/marketing_api/docs?id=%201771100936446977) (`_ttp`).',
|
|
98
|
+
type: 'string',
|
|
99
|
+
default: {
|
|
100
|
+
'@if': {
|
|
101
|
+
exists: { '@path': '$.properties.ttp' },
|
|
102
|
+
then: { '@path': '$.properties.ttp' },
|
|
103
|
+
else: { '@path': '$.integrations.TikTok Conversions.ttp' }
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
lead_id: {
|
|
108
|
+
label: 'TikTok Lead ID',
|
|
109
|
+
description: 'ID of TikTok leads. Every lead will have its own lead_id when exported from TikTok. This feature is in Beta. Please contact your TikTok representative to inquire regarding availability',
|
|
110
|
+
type: 'string',
|
|
111
|
+
default: { '@path': '$.properties.lead_id' }
|
|
112
|
+
},
|
|
113
|
+
locale: {
|
|
114
|
+
label: 'Locale',
|
|
115
|
+
description: 'The BCP 47 language identifier. For reference, refer to the [IETF BCP 47 standardized code](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).',
|
|
116
|
+
type: 'string',
|
|
117
|
+
default: {
|
|
118
|
+
'@path': '$.context.locale'
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
url: {
|
|
122
|
+
label: 'Page URL',
|
|
123
|
+
type: 'string',
|
|
124
|
+
description: 'The page URL where the conversion event took place.',
|
|
125
|
+
default: {
|
|
126
|
+
'@path': '$.context.page.url'
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
referrer: {
|
|
130
|
+
label: 'Page Referrer',
|
|
131
|
+
type: 'string',
|
|
132
|
+
description: 'The page referrer.',
|
|
133
|
+
default: {
|
|
134
|
+
'@path': '$.context.page.referrer'
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
ip: {
|
|
138
|
+
label: 'IP Address',
|
|
139
|
+
type: 'string',
|
|
140
|
+
description: 'IP address of the browser.',
|
|
141
|
+
default: {
|
|
142
|
+
'@path': '$.context.ip'
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
user_agent: {
|
|
146
|
+
label: 'User Agent',
|
|
147
|
+
type: 'string',
|
|
148
|
+
description: 'User agent from the user’s device.',
|
|
149
|
+
default: {
|
|
150
|
+
'@path': '$.context.userAgent'
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
contents: {
|
|
154
|
+
label: 'Contents',
|
|
155
|
+
type: 'object',
|
|
156
|
+
multiple: true,
|
|
157
|
+
description: 'Related item details for the event.',
|
|
158
|
+
properties: {
|
|
159
|
+
price: {
|
|
160
|
+
label: 'Price',
|
|
161
|
+
description: 'Price of the item.',
|
|
162
|
+
type: 'number'
|
|
163
|
+
},
|
|
164
|
+
quantity: {
|
|
165
|
+
label: 'Quantity',
|
|
166
|
+
description: 'Number of items.',
|
|
167
|
+
type: 'number'
|
|
168
|
+
},
|
|
169
|
+
content_category: {
|
|
170
|
+
label: 'Content Category',
|
|
171
|
+
description: 'Category of the product item.',
|
|
172
|
+
type: 'string'
|
|
173
|
+
},
|
|
174
|
+
content_id: {
|
|
175
|
+
label: 'Content ID',
|
|
176
|
+
description: 'ID of the product item.',
|
|
177
|
+
type: 'string'
|
|
178
|
+
},
|
|
179
|
+
content_name: {
|
|
180
|
+
label: 'Content Name',
|
|
181
|
+
description: 'Name of the product item.',
|
|
182
|
+
type: 'string'
|
|
183
|
+
},
|
|
184
|
+
brand: {
|
|
185
|
+
label: 'Brand',
|
|
186
|
+
description: 'Brand name of the product item.',
|
|
187
|
+
type: 'string'
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
content_type: {
|
|
192
|
+
label: 'Content Type',
|
|
193
|
+
description: 'Type of the product item. When the `content_id` in the `Contents` field is specified as a `sku_id`, set this field to `product`. When the `content_id` in the `Contents` field is specified as an `item_group_id`, set this field to `product_group`.',
|
|
194
|
+
type: 'string',
|
|
195
|
+
choices: ['product', 'product_group'],
|
|
196
|
+
default: 'product'
|
|
197
|
+
},
|
|
198
|
+
currency: {
|
|
199
|
+
label: 'Currency',
|
|
200
|
+
type: 'string',
|
|
201
|
+
description: 'Currency for the value specified as ISO 4217 code.',
|
|
202
|
+
default: {
|
|
203
|
+
'@path': '$.properties.currency'
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
value: {
|
|
207
|
+
label: 'Value',
|
|
208
|
+
type: 'number',
|
|
209
|
+
description: 'Value of the order or items sold.',
|
|
210
|
+
default: {
|
|
211
|
+
'@if': {
|
|
212
|
+
exists: { '@path': '$.properties.value' },
|
|
213
|
+
then: { '@path': '$.properties.value' },
|
|
214
|
+
else: { '@path': '$.properties.revenue' }
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
description: {
|
|
219
|
+
label: 'Description',
|
|
220
|
+
type: 'string',
|
|
221
|
+
description: 'A string description of the web event.'
|
|
222
|
+
},
|
|
223
|
+
query: {
|
|
224
|
+
label: 'Query',
|
|
225
|
+
type: 'string',
|
|
226
|
+
description: 'The text string that was searched for.',
|
|
227
|
+
default: {
|
|
228
|
+
'@path': '$.properties.query'
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
limited_data_use: {
|
|
232
|
+
label: 'Limited Data Use',
|
|
233
|
+
type: 'boolean',
|
|
234
|
+
description: 'Use this field to flag an event for limited data processing. TikTok will recognize this parameter as a request for limited data processing, and will limit its processing activities accordingly if the event shared occurred in an eligible location. To learn more about the Limited Data Use feature, refer to [Events API 2.0 - Limited Data Use](https://ads.tiktok.com/marketing_api/docs?id=1771101204435970).',
|
|
235
|
+
default: {
|
|
236
|
+
'@path': '$.properties.limited_data_use'
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
test_event_code: {
|
|
240
|
+
label: 'Test Event Code',
|
|
241
|
+
type: 'string',
|
|
242
|
+
description: 'Use this field to specify that events should be test events rather than actual traffic. You can find your Test Event Code in your TikTok Events Manager under the "Test Event" tab. You\'ll want to remove your Test Event Code when sending real traffic through this integration.'
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
//# sourceMappingURL=common_fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common_fields.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-conversions/common_fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAA+B;IACtD,KAAK,EAAE;QACL,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,WAAW,EACT,8MAA8M;KACjN;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,wDAAwD;QACrE,OAAO,EAAE;YACP,OAAO,EAAE,aAAa;SACvB;KACF;IACD,SAAS,EAAE;QAC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AE,QAAQ;QACd,OAAO,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC;QACrC,OAAO,EAAE,SAAS;KACnB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,oDAAoD;QACjE,OAAO,EAAE;YACP,OAAO,EAAE,uBAAuB;SACjC;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,mCAAmC;QAChD,OAAO,EAAE;YACP,KAAK,EAAE;gBACL,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;gBACzC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;gBACvC,IAAI,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE;aAC1C;SACF;KACF;IACD,WAAW,EAAE;QACX,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,wCAAwC;KACtD;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE;YACP,OAAO,EAAE,oBAAoB;SAC9B;KACF;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,SAAS;QACf,WAAW,EACT,uZAAuZ;QACzZ,OAAO,EAAE;YACP,OAAO,EAAE,+BAA+B;SACzC;KACF;IACD,eAAe,EAAE;QACf,KAAK,EAAE,iBAAiB;QACxB,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,qRAAqR;KACxR;CACF,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatUserIds = exports.formatPhones = exports.formatEmails = void 0;
|
|
4
|
+
const crypto_1 = require("crypto");
|
|
5
|
+
const formatEmails = (email_addresses) => {
|
|
6
|
+
const result = [];
|
|
7
|
+
if (email_addresses) {
|
|
8
|
+
email_addresses.forEach((email) => {
|
|
9
|
+
result.push(hashAndEncode(email.toLowerCase()));
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return result;
|
|
13
|
+
};
|
|
14
|
+
exports.formatEmails = formatEmails;
|
|
15
|
+
const formatPhones = (phone_numbers) => {
|
|
16
|
+
const result = [];
|
|
17
|
+
if (!phone_numbers)
|
|
18
|
+
return result;
|
|
19
|
+
phone_numbers.forEach((phone) => {
|
|
20
|
+
const validatedPhone = phone.match(/[0-9]{0,14}/g);
|
|
21
|
+
if (validatedPhone === null) {
|
|
22
|
+
throw new Error(`${phone} is not a valid E.164 phone number.`);
|
|
23
|
+
}
|
|
24
|
+
const formattedPhone = `+${phone.replace(/[^0-9]/g, '')}`;
|
|
25
|
+
result.push(hashAndEncode(formattedPhone.substring(0, 15)));
|
|
26
|
+
});
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
exports.formatPhones = formatPhones;
|
|
30
|
+
function formatUserIds(userIds) {
|
|
31
|
+
const result = [];
|
|
32
|
+
if (userIds) {
|
|
33
|
+
userIds.forEach((userId) => {
|
|
34
|
+
result.push(hashAndEncode(userId.toLowerCase()));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
exports.formatUserIds = formatUserIds;
|
|
40
|
+
function hashAndEncode(property) {
|
|
41
|
+
return crypto_1.createHash('sha256').update(property).digest('hex');
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-conversions/formatter.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAK5B,MAAM,YAAY,GAAG,CAAC,eAAqC,EAAY,EAAE;IAC9E,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,IAAI,eAAe,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IACrC,OAAO,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC"}
|
|
@@ -12,17 +12,11 @@ const productProperties = {
|
|
|
12
12
|
quantity: {
|
|
13
13
|
'@path': '$.quantity'
|
|
14
14
|
},
|
|
15
|
-
|
|
15
|
+
content_type: {
|
|
16
16
|
'@path': '$.category'
|
|
17
17
|
},
|
|
18
18
|
content_id: {
|
|
19
19
|
'@path': '$.product_id'
|
|
20
|
-
},
|
|
21
|
-
content_name: {
|
|
22
|
-
'@path': '$.name'
|
|
23
|
-
},
|
|
24
|
-
brand: {
|
|
25
|
-
'@path': '$.brand'
|
|
26
20
|
}
|
|
27
21
|
};
|
|
28
22
|
const singleProductContents = {
|
|
@@ -48,19 +42,9 @@ const multiProductContents = {
|
|
|
48
42
|
}
|
|
49
43
|
};
|
|
50
44
|
const presets = [
|
|
51
|
-
{
|
|
52
|
-
name: 'Page View',
|
|
53
|
-
subscribe: 'type="page"',
|
|
54
|
-
partnerAction: 'reportWebEvent',
|
|
55
|
-
mapping: {
|
|
56
|
-
...multiProductContents,
|
|
57
|
-
event: 'PageView'
|
|
58
|
-
},
|
|
59
|
-
type: 'automatic'
|
|
60
|
-
},
|
|
61
45
|
{
|
|
62
46
|
name: 'View Content',
|
|
63
|
-
subscribe: '
|
|
47
|
+
subscribe: 'type="page"',
|
|
64
48
|
partnerAction: 'reportWebEvent',
|
|
65
49
|
mapping: {
|
|
66
50
|
...singleProductContents,
|
|
@@ -68,16 +52,6 @@ const presets = [
|
|
|
68
52
|
},
|
|
69
53
|
type: 'automatic'
|
|
70
54
|
},
|
|
71
|
-
{
|
|
72
|
-
name: 'Click Button',
|
|
73
|
-
subscribe: 'event = "Product Clicked"',
|
|
74
|
-
partnerAction: 'reportWebEvent',
|
|
75
|
-
mapping: {
|
|
76
|
-
...singleProductContents,
|
|
77
|
-
event: 'ClickButton'
|
|
78
|
-
},
|
|
79
|
-
type: 'automatic'
|
|
80
|
-
},
|
|
81
55
|
{
|
|
82
56
|
name: 'Search',
|
|
83
57
|
subscribe: 'event = "Products Searched"',
|
|
@@ -137,66 +111,6 @@ const presets = [
|
|
|
137
111
|
event: 'PlaceAnOrder'
|
|
138
112
|
},
|
|
139
113
|
type: 'automatic'
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
name: 'Complete Payment',
|
|
143
|
-
subscribe: 'event = "Payment Completed"',
|
|
144
|
-
partnerAction: 'reportWebEvent',
|
|
145
|
-
mapping: {
|
|
146
|
-
...multiProductContents,
|
|
147
|
-
event: 'CompletePayment'
|
|
148
|
-
},
|
|
149
|
-
type: 'automatic'
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
name: 'Contact',
|
|
153
|
-
subscribe: 'event = "Callback Started"',
|
|
154
|
-
partnerAction: 'reportWebEvent',
|
|
155
|
-
mapping: {
|
|
156
|
-
...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
|
|
157
|
-
event: 'Contact'
|
|
158
|
-
},
|
|
159
|
-
type: 'automatic'
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
name: 'Download',
|
|
163
|
-
subscribe: 'event = "Download Link Clicked"',
|
|
164
|
-
partnerAction: 'reportWebEvent',
|
|
165
|
-
mapping: {
|
|
166
|
-
...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
|
|
167
|
-
event: 'Download'
|
|
168
|
-
},
|
|
169
|
-
type: 'automatic'
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
name: 'Submit Form',
|
|
173
|
-
subscribe: 'event = "Form Submitted"',
|
|
174
|
-
partnerAction: 'reportWebEvent',
|
|
175
|
-
mapping: {
|
|
176
|
-
...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
|
|
177
|
-
event: 'SubmitForm'
|
|
178
|
-
},
|
|
179
|
-
type: 'automatic'
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
name: 'Complete Registration',
|
|
183
|
-
subscribe: 'event = "Signed Up"',
|
|
184
|
-
partnerAction: 'reportWebEvent',
|
|
185
|
-
mapping: {
|
|
186
|
-
...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
|
|
187
|
-
event: 'CompleteRegistration'
|
|
188
|
-
},
|
|
189
|
-
type: 'automatic'
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
name: 'Subscribe',
|
|
193
|
-
subscribe: 'event = "Subscription Created"',
|
|
194
|
-
partnerAction: 'reportWebEvent',
|
|
195
|
-
mapping: {
|
|
196
|
-
...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
|
|
197
|
-
event: 'Subscribe'
|
|
198
|
-
},
|
|
199
|
-
type: 'automatic'
|
|
200
114
|
}
|
|
201
115
|
];
|
|
202
116
|
const destination = {
|
|
@@ -233,10 +147,7 @@ const destination = {
|
|
|
233
147
|
},
|
|
234
148
|
extendRequest({ settings }) {
|
|
235
149
|
return {
|
|
236
|
-
headers: {
|
|
237
|
-
'Access-Token': settings.accessToken,
|
|
238
|
-
'Content-Type': 'application/json'
|
|
239
|
-
}
|
|
150
|
+
headers: { 'Access-Token': settings.accessToken }
|
|
240
151
|
};
|
|
241
152
|
},
|
|
242
153
|
presets,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-conversions/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AAGrD,sEAA6C;AAE7C,MAAM,iBAAiB,GAAG;IACxB,KAAK,EAAE;QACL,OAAO,EAAE,SAAS;KACnB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY;KACtB;IACD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-conversions/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AAGrD,sEAA6C;AAE7C,MAAM,iBAAiB,GAAG;IACxB,KAAK,EAAE;QACL,OAAO,EAAE,SAAS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AE,EAAE;oBACb,OAAO,EAAE,EAAE;iBACZ;aACF,CAAC,CAAA;QACJ,CAAC;KACF;IACD,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,OAAO,EAAE,EAAE,cAAc,EAAE,QAAQ,CAAC,WAAW,EAAE;SAClD,CAAA;IACH,CAAC;IACD,OAAO;IACP,OAAO,EAAE;QACP,cAAc,EAAd,wBAAc;KACf;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
export declare function
|
|
3
|
-
export declare
|
|
1
|
+
export declare function formatEmail(email: string | undefined): string | undefined;
|
|
2
|
+
export declare function formatUserId(userId: string | undefined): string | undefined;
|
|
3
|
+
export declare function formatPhone(phone: string | undefined): string | undefined;
|
|
@@ -1,42 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.formatPhone = exports.formatUserId = exports.formatEmail = void 0;
|
|
4
4
|
const crypto_1 = require("crypto");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
email_addresses.forEach((email) => {
|
|
9
|
-
result.push(hashAndEncode(email.toLowerCase()));
|
|
10
|
-
});
|
|
5
|
+
function formatEmail(email) {
|
|
6
|
+
if (email) {
|
|
7
|
+
return hashAndEncode(email.toLowerCase());
|
|
11
8
|
}
|
|
12
|
-
return
|
|
13
|
-
}
|
|
14
|
-
exports.
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
exports.formatEmail = formatEmail;
|
|
12
|
+
function formatUserId(userId) {
|
|
13
|
+
if (userId) {
|
|
14
|
+
return hashAndEncode(userId.toLowerCase().trim());
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
exports.formatUserId = formatUserId;
|
|
19
|
+
function formatPhone(phone) {
|
|
20
|
+
if (!phone)
|
|
21
|
+
return undefined;
|
|
22
|
+
const validatedPhone = phone.match(/[0-9]{0,14}/g);
|
|
23
|
+
if (validatedPhone === null) {
|
|
24
|
+
throw new Error(`${phone} is not a valid E.164 phone number.`);
|
|
21
25
|
}
|
|
22
|
-
|
|
26
|
+
let formattedPhone = `+${phone.replace(/[^0-9]/g, '')}`;
|
|
27
|
+
formattedPhone = formattedPhone.substring(0, 15);
|
|
28
|
+
return hashAndEncode(formattedPhone);
|
|
23
29
|
}
|
|
24
|
-
exports.
|
|
25
|
-
const formatPhones = (phone_numbers) => {
|
|
26
|
-
const result = [];
|
|
27
|
-
if (!phone_numbers)
|
|
28
|
-
return result;
|
|
29
|
-
phone_numbers.forEach((phone) => {
|
|
30
|
-
const validatedPhone = phone.match(/[0-9]{0,14}/g);
|
|
31
|
-
if (validatedPhone === null) {
|
|
32
|
-
throw new Error(`${phone} is not a valid E.164 phone number.`);
|
|
33
|
-
}
|
|
34
|
-
const formattedPhone = `+${phone.replace(/[^0-9]/g, '')}`;
|
|
35
|
-
result.push(hashAndEncode(formattedPhone.substring(0, 15)));
|
|
36
|
-
});
|
|
37
|
-
return result;
|
|
38
|
-
};
|
|
39
|
-
exports.formatPhones = formatPhones;
|
|
30
|
+
exports.formatPhone = formatPhone;
|
|
40
31
|
function hashAndEncode(property) {
|
|
41
32
|
return crypto_1.createHash('sha256').update(property).digest('hex');
|
|
42
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-conversions/reportWebEvent/formatter.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;
|
|
1
|
+
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-conversions/reportWebEvent/formatter.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAKnC,SAAgB,WAAW,CAAC,KAAyB;IACnD,IAAI,KAAK,EAAE;QACT,OAAO,aAAa,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAA;KAC1C;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AALD,kCAKC;AAOD,SAAgB,YAAY,CAAC,MAA0B;IACrD,IAAI,MAAM,EAAE;QACV,OAAO,aAAa,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,CAAA;KAClD;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AALD,oCAKC;AAOD,SAAgB,WAAW,CAAC,KAAyB;IACnD,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAA;IAE5B,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;IAClD,IAAI,cAAc,KAAK,IAAI,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qCAAqC,CAAC,CAAA;KAC/D;IAED,IAAI,cAAc,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAA;IAEvD,cAAc,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAChD,OAAO,aAAa,CAAC,cAAc,CAAC,CAAA;AACtC,CAAC;AAZD,kCAYC;AAED,SAAS,aAAa,CAAC,QAAgB;IACrC,OAAO,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC"}
|
|
@@ -2,13 +2,11 @@ export interface Payload {
|
|
|
2
2
|
event: string;
|
|
3
3
|
event_id?: string;
|
|
4
4
|
timestamp?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
phone_number?: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
external_id?: string;
|
|
8
8
|
ttclid?: string;
|
|
9
|
-
ttp?: string;
|
|
10
9
|
lead_id?: string;
|
|
11
|
-
locale?: string;
|
|
12
10
|
url?: string;
|
|
13
11
|
referrer?: string;
|
|
14
12
|
ip?: string;
|
|
@@ -16,18 +14,12 @@ export interface Payload {
|
|
|
16
14
|
contents?: {
|
|
17
15
|
price?: number;
|
|
18
16
|
quantity?: number;
|
|
19
|
-
|
|
17
|
+
content_type?: string;
|
|
20
18
|
content_id?: string;
|
|
21
|
-
content_name?: string;
|
|
22
|
-
brand?: string;
|
|
23
19
|
}[];
|
|
24
|
-
content_type?: string;
|
|
25
20
|
currency?: string;
|
|
26
21
|
value?: number;
|
|
27
22
|
description?: string;
|
|
28
23
|
query?: string;
|
|
29
|
-
order_id?: string;
|
|
30
|
-
shop_id?: string;
|
|
31
|
-
limited_data_use?: boolean;
|
|
32
24
|
test_event_code?: string;
|
|
33
25
|
}
|