@segment/action-destinations 3.118.1-staging.97 → 3.119.1-cli-test.63
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/actable-predictive/index.js +1 -1
- package/dist/destinations/actable-predictive/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js +13 -13
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js +21 -21
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js +29 -29
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendWebEvent/index.js +26 -26
- package/dist/destinations/actable-predictive/sendWebEvent/index.js.map +1 -1
- package/dist/destinations/adobe-target/adobeTarget_operations.d.ts +2 -1
- package/dist/destinations/adobe-target/adobeTarget_operations.js +8 -4
- package/dist/destinations/adobe-target/adobeTarget_operations.js.map +1 -1
- package/dist/destinations/adobe-target/updateProfile/index.js +3 -11
- package/dist/destinations/adobe-target/updateProfile/index.js.map +1 -1
- package/dist/destinations/braze/updateUserProfile/index.js +0 -1
- package/dist/destinations/braze/updateUserProfile/index.js.map +1 -1
- package/dist/destinations/braze-cohorts/api/index.d.ts +15 -0
- package/dist/destinations/braze-cohorts/api/index.js +36 -0
- package/dist/destinations/braze-cohorts/api/index.js.map +1 -0
- package/dist/destinations/braze-cohorts/braze-cohorts-types.d.ts +10 -0
- package/dist/destinations/braze-cohorts/braze-cohorts-types.js +3 -0
- package/dist/destinations/braze-cohorts/braze-cohorts-types.js.map +1 -0
- package/dist/destinations/braze-cohorts/generated-types.d.ts +4 -0
- package/dist/destinations/{actions-bingads → braze-cohorts}/generated-types.js +0 -0
- package/dist/destinations/braze-cohorts/generated-types.js.map +1 -0
- package/dist/destinations/{actions-bingads → braze-cohorts}/index.d.ts +0 -0
- package/dist/destinations/braze-cohorts/index.js +53 -0
- package/dist/destinations/braze-cohorts/index.js.map +1 -0
- package/dist/destinations/braze-cohorts/syncAudiences/generated-types.d.ts +16 -0
- package/dist/destinations/{actions-bingads/offlineConversions → braze-cohorts/syncAudiences}/generated-types.js +0 -0
- package/dist/destinations/braze-cohorts/syncAudiences/generated-types.js.map +1 -0
- package/dist/destinations/{google-sheets-partner/postSheet → braze-cohorts/syncAudiences}/index.d.ts +0 -0
- package/dist/destinations/braze-cohorts/syncAudiences/index.js +158 -0
- package/dist/destinations/braze-cohorts/syncAudiences/index.js.map +1 -0
- package/dist/destinations/clevertap/userDelete/index.js +4 -4
- package/dist/destinations/clevertap/userDelete/index.js.map +1 -1
- package/dist/destinations/customerio/createUpdateObject/generated-types.d.ts +11 -0
- package/dist/destinations/{google-sheets-partner → customerio/createUpdateObject}/generated-types.js +0 -0
- package/dist/destinations/customerio/createUpdateObject/generated-types.js.map +1 -0
- package/dist/destinations/{actions-bingads/offlineConversions → customerio/createUpdateObject}/index.d.ts +0 -0
- package/dist/destinations/customerio/createUpdateObject/index.js +102 -0
- package/dist/destinations/customerio/createUpdateObject/index.js.map +1 -0
- package/dist/destinations/customerio/createUpdatePerson/generated-types.d.ts +2 -0
- package/dist/destinations/customerio/createUpdatePerson/index.js +24 -0
- package/dist/destinations/customerio/createUpdatePerson/index.js.map +1 -1
- package/dist/destinations/customerio/index.js +9 -1
- package/dist/destinations/customerio/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.d.ts +1 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +12 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.d.ts +1 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +12 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/addToCart/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/custom/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/generated-types.d.ts +1 -0
- package/dist/destinations/facebook-conversions-api/index.js +7 -1
- package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/pageView/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/pageView/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/purchase/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/search/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/search/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/viewContent/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectPromotion/index.js +0 -3
- package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItem/index.js +1 -13
- package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +2 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
- package/dist/destinations/{google-sheets-partner → google-sheets-dev}/generated-types.d.ts +0 -0
- package/dist/destinations/{google-sheets-partner/postSheet → google-sheets-dev}/generated-types.js +0 -0
- package/dist/destinations/google-sheets-dev/generated-types.js.map +1 -0
- package/dist/destinations/{google-sheets-partner → google-sheets-dev}/index.d.ts +0 -0
- package/dist/destinations/{google-sheets-partner → google-sheets-dev}/index.js +5 -7
- package/dist/destinations/google-sheets-dev/index.js.map +1 -0
- package/dist/destinations/{google-sheets-partner/postSheet/generated-types.d.ts → google-sheets-dev/postSheet.types.d.ts} +0 -0
- package/dist/destinations/google-sheets-dev/postSheet.types.js +3 -0
- package/dist/destinations/google-sheets-dev/postSheet.types.js.map +1 -0
- package/dist/destinations/heap/constants.d.ts +1 -1
- package/dist/destinations/heap/constants.js +2 -2
- package/dist/destinations/heap/constants.js.map +1 -1
- package/dist/destinations/heap/index.js +1 -1
- package/dist/destinations/heap/index.js.map +1 -1
- package/dist/destinations/heap/trackEvent/generated-types.d.ts +4 -2
- package/dist/destinations/heap/trackEvent/index.js +44 -15
- package/dist/destinations/heap/trackEvent/index.js.map +1 -1
- package/dist/destinations/hubspot/errors.js +1 -1
- package/dist/destinations/hubspot/errors.js.map +1 -1
- package/dist/destinations/hubspot/helperFunctions.d.ts +7 -0
- package/dist/destinations/hubspot/helperFunctions.js +27 -0
- package/dist/destinations/hubspot/helperFunctions.js.map +1 -0
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +2 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertCompany/generated-types.d.ts +4 -2
- package/dist/destinations/hubspot/upsertCompany/index.js +28 -14
- package/dist/destinations/hubspot/upsertCompany/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertContact/index.js +4 -7
- package/dist/destinations/hubspot/upsertContact/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js +2 -1
- package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js.map +1 -1
- package/dist/destinations/index.js +7 -3
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/ironclad/RecordAction/generated-types.d.ts +12 -0
- package/dist/destinations/ironclad/RecordAction/generated-types.js +3 -0
- package/dist/destinations/ironclad/RecordAction/generated-types.js.map +1 -0
- package/dist/destinations/ironclad/RecordAction/index.d.ts +5 -0
- package/dist/destinations/ironclad/RecordAction/index.js +117 -0
- package/dist/destinations/ironclad/RecordAction/index.js.map +1 -0
- package/dist/destinations/ironclad/generated-types.d.ts +5 -0
- package/dist/destinations/ironclad/generated-types.js +3 -0
- package/dist/destinations/ironclad/generated-types.js.map +1 -0
- package/dist/destinations/ironclad/index.d.ts +4 -0
- package/dist/destinations/ironclad/index.js +42 -0
- package/dist/destinations/ironclad/index.js.map +1 -0
- package/dist/destinations/mixpanel/index.js +1 -1
- package/dist/destinations/mixpanel/mixpanel-properties.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
- package/dist/destinations/mixpanel/trackPurchase/index.js.map +1 -1
- package/dist/destinations/mixpanel/utils.js +1 -1
- package/dist/destinations/mixpanel/utils.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateActivity/index.js +44 -17
- package/dist/destinations/pipedrive/createUpdateActivity/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateDeal/index.js +35 -11
- package/dist/destinations/pipedrive/createUpdateDeal/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateLead/generated-types.d.ts +3 -8
- package/dist/destinations/pipedrive/createUpdateLead/index.js +54 -27
- package/dist/destinations/pipedrive/createUpdateLead/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateNote/generated-types.d.ts +1 -1
- package/dist/destinations/pipedrive/createUpdateNote/index.js +22 -13
- package/dist/destinations/pipedrive/createUpdateNote/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateOrganization/index.js +9 -3
- package/dist/destinations/pipedrive/createUpdateOrganization/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdatePerson/index.js +15 -3
- package/dist/destinations/pipedrive/createUpdatePerson/index.js.map +1 -1
- package/dist/destinations/pipedrive/index.d.ts +1 -1
- package/dist/destinations/pipedrive/index.js +22 -1
- package/dist/destinations/pipedrive/index.js.map +1 -1
- package/dist/destinations/pipedrive/pipedriveApi/leads.d.ts +5 -1
- package/dist/destinations/pipedrive/pipedriveApi/leads.js.map +1 -1
- package/dist/destinations/pipedrive/pipedriveApi/notes.d.ts +1 -1
- package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.d.ts +2 -1
- package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.js +14 -2
- package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.js.map +1 -1
- package/dist/destinations/ripe/generated-types.d.ts +4 -0
- package/dist/destinations/ripe/generated-types.js +3 -0
- package/dist/destinations/ripe/generated-types.js.map +1 -0
- package/dist/destinations/ripe/group/generated-types.d.ts +10 -0
- package/dist/destinations/ripe/group/generated-types.js +3 -0
- package/dist/destinations/ripe/group/generated-types.js.map +1 -0
- package/dist/destinations/ripe/group/index.d.ts +5 -0
- package/dist/destinations/ripe/group/index.js +68 -0
- package/dist/destinations/ripe/group/index.js.map +1 -0
- package/dist/destinations/ripe/identify/generated-types.d.ts +10 -0
- package/dist/destinations/ripe/identify/generated-types.js +3 -0
- package/dist/destinations/ripe/identify/generated-types.js.map +1 -0
- package/dist/destinations/ripe/identify/index.d.ts +5 -0
- package/dist/destinations/ripe/identify/index.js +70 -0
- package/dist/destinations/ripe/identify/index.js.map +1 -0
- package/dist/destinations/ripe/index.d.ts +4 -0
- package/dist/destinations/ripe/index.js +83 -0
- package/dist/destinations/ripe/index.js.map +1 -0
- package/dist/destinations/ripe/page/generated-types.d.ts +16 -0
- package/dist/destinations/ripe/page/generated-types.js +3 -0
- package/dist/destinations/ripe/page/generated-types.js.map +1 -0
- package/dist/destinations/ripe/page/index.d.ts +5 -0
- package/dist/destinations/ripe/page/index.js +153 -0
- package/dist/destinations/ripe/page/index.js.map +1 -0
- package/dist/destinations/ripe/track/generated-types.d.ts +11 -0
- package/dist/destinations/ripe/track/generated-types.js +3 -0
- package/dist/destinations/ripe/track/generated-types.js.map +1 -0
- package/dist/destinations/ripe/track/index.d.ts +5 -0
- package/dist/destinations/ripe/track/index.js +79 -0
- package/dist/destinations/ripe/track/index.js.map +1 -0
- package/dist/destinations/salesforce/lead/index.js +6 -6
- package/dist/destinations/salesforce/lead/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-operations.js +17 -6
- 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 +2 -2
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/salesforce/sf-utils.js +3 -1
- package/dist/destinations/salesforce/sf-utils.js.map +1 -1
- package/dist/destinations/saleswings/api.d.ts +35 -0
- package/dist/destinations/saleswings/api.js +19 -0
- package/dist/destinations/saleswings/api.js.map +1 -0
- package/dist/destinations/saleswings/common.d.ts +5 -0
- package/dist/destinations/saleswings/common.js +37 -0
- package/dist/destinations/saleswings/common.js.map +1 -0
- package/dist/destinations/saleswings/converter.d.ts +12 -0
- package/dist/destinations/saleswings/converter.js +34 -0
- package/dist/destinations/saleswings/converter.js.map +1 -0
- package/dist/destinations/saleswings/fields.d.ts +12 -0
- package/dist/destinations/saleswings/fields.js +102 -0
- package/dist/destinations/saleswings/fields.js.map +1 -0
- package/dist/destinations/saleswings/generated-types.d.ts +3 -0
- package/dist/destinations/saleswings/generated-types.js +3 -0
- package/dist/destinations/saleswings/generated-types.js.map +1 -0
- package/dist/destinations/saleswings/index.d.ts +4 -0
- package/dist/destinations/saleswings/index.js +67 -0
- package/dist/destinations/saleswings/index.js.map +1 -0
- package/dist/destinations/saleswings/submitIdentifyEvent/generated-types.d.ts +14 -0
- package/dist/destinations/saleswings/submitIdentifyEvent/generated-types.js +3 -0
- package/dist/destinations/saleswings/submitIdentifyEvent/generated-types.js.map +1 -0
- package/dist/destinations/saleswings/submitIdentifyEvent/index.d.ts +5 -0
- package/dist/destinations/saleswings/submitIdentifyEvent/index.js +39 -0
- package/dist/destinations/saleswings/submitIdentifyEvent/index.js.map +1 -0
- package/dist/destinations/saleswings/submitPageEvent/generated-types.d.ts +8 -0
- package/dist/destinations/saleswings/submitPageEvent/generated-types.js +3 -0
- package/dist/destinations/saleswings/submitPageEvent/generated-types.js.map +1 -0
- package/dist/destinations/saleswings/submitPageEvent/index.d.ts +5 -0
- package/dist/destinations/saleswings/submitPageEvent/index.js +35 -0
- package/dist/destinations/saleswings/submitPageEvent/index.js.map +1 -0
- package/dist/destinations/saleswings/submitScreenEvent/generated-types.d.ts +14 -0
- package/dist/destinations/saleswings/submitScreenEvent/generated-types.js +3 -0
- package/dist/destinations/saleswings/submitScreenEvent/generated-types.js.map +1 -0
- package/dist/destinations/saleswings/submitScreenEvent/index.d.ts +5 -0
- package/dist/destinations/saleswings/submitScreenEvent/index.js +42 -0
- package/dist/destinations/saleswings/submitScreenEvent/index.js.map +1 -0
- package/dist/destinations/saleswings/submitTrackEvent/generated-types.d.ts +14 -0
- package/dist/destinations/saleswings/submitTrackEvent/generated-types.js +3 -0
- package/dist/destinations/saleswings/submitTrackEvent/generated-types.js.map +1 -0
- package/dist/destinations/saleswings/submitTrackEvent/index.d.ts +5 -0
- package/dist/destinations/saleswings/submitTrackEvent/index.js +42 -0
- package/dist/destinations/saleswings/submitTrackEvent/index.js.map +1 -0
- package/dist/destinations/saleswings/testing.d.ts +10 -0
- package/dist/destinations/saleswings/testing.js +55 -0
- package/dist/destinations/saleswings/testing.js.map +1 -0
- package/dist/destinations/segment-profiles/errors.d.ts +14 -0
- package/dist/destinations/segment-profiles/errors.js +10 -0
- package/dist/destinations/segment-profiles/errors.js.map +1 -0
- package/dist/destinations/segment-profiles/generated-types.d.ts +4 -0
- package/dist/destinations/segment-profiles/generated-types.js +3 -0
- package/dist/destinations/segment-profiles/generated-types.js.map +1 -0
- package/dist/destinations/segment-profiles/helperFunctions.d.ts +8 -0
- package/dist/destinations/segment-profiles/helperFunctions.js +52 -0
- package/dist/destinations/segment-profiles/helperFunctions.js.map +1 -0
- package/dist/destinations/segment-profiles/index.d.ts +4 -0
- package/dist/destinations/segment-profiles/index.js +50 -0
- package/dist/destinations/segment-profiles/index.js.map +1 -0
- package/dist/destinations/segment-profiles/properties.d.ts +12 -0
- package/dist/destinations/segment-profiles/properties.js +20 -0
- package/dist/destinations/segment-profiles/properties.js.map +1 -0
- package/dist/destinations/segment-profiles/segment-properties.d.ts +6 -0
- package/dist/destinations/segment-profiles/segment-properties.js +33 -0
- package/dist/destinations/segment-profiles/segment-properties.js.map +1 -0
- package/dist/destinations/segment-profiles/sendGroup/generated-types.d.ts +9 -0
- package/dist/destinations/segment-profiles/sendGroup/generated-types.js +3 -0
- package/dist/destinations/segment-profiles/sendGroup/generated-types.js.map +1 -0
- package/dist/destinations/segment-profiles/sendGroup/index.d.ts +5 -0
- package/dist/destinations/segment-profiles/sendGroup/index.js +52 -0
- package/dist/destinations/segment-profiles/sendGroup/index.js.map +1 -0
- package/dist/destinations/segment-profiles/sendIdentify/generated-types.d.ts +9 -0
- package/dist/destinations/segment-profiles/sendIdentify/generated-types.js +3 -0
- package/dist/destinations/segment-profiles/sendIdentify/generated-types.js.map +1 -0
- package/dist/destinations/segment-profiles/sendIdentify/index.d.ts +5 -0
- package/dist/destinations/segment-profiles/sendIdentify/index.js +52 -0
- package/dist/destinations/segment-profiles/sendIdentify/index.js.map +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/index.test.js +1 -1
- package/dist/destinations/snap-conversions-api/_tests_/index.test.js.map +1 -1
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js +1 -1
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -1
- package/dist/destinations/vwo/generated-types.d.ts +3 -0
- package/dist/destinations/vwo/generated-types.js +3 -0
- package/dist/destinations/vwo/generated-types.js.map +1 -0
- package/dist/destinations/vwo/identifyUser/generated-types.d.ts +12 -0
- package/dist/destinations/vwo/identifyUser/generated-types.js +3 -0
- package/dist/destinations/vwo/identifyUser/generated-types.js.map +1 -0
- package/dist/destinations/vwo/identifyUser/index.d.ts +5 -0
- package/dist/destinations/vwo/identifyUser/index.js +80 -0
- package/dist/destinations/vwo/identifyUser/index.js.map +1 -0
- package/dist/destinations/vwo/index.d.ts +4 -0
- package/dist/destinations/vwo/index.js +60 -0
- package/dist/destinations/vwo/index.js.map +1 -0
- package/dist/destinations/vwo/pageVisit/generated-types.d.ts +10 -0
- package/dist/destinations/vwo/pageVisit/generated-types.js +3 -0
- package/dist/destinations/vwo/pageVisit/generated-types.js.map +1 -0
- package/dist/destinations/vwo/pageVisit/index.d.ts +5 -0
- package/dist/destinations/vwo/pageVisit/index.js +77 -0
- package/dist/destinations/vwo/pageVisit/index.js.map +1 -0
- package/dist/destinations/vwo/trackEvent/generated-types.d.ts +13 -0
- package/dist/destinations/vwo/trackEvent/generated-types.js +3 -0
- package/dist/destinations/vwo/trackEvent/generated-types.js.map +1 -0
- package/dist/destinations/vwo/trackEvent/index.d.ts +5 -0
- package/dist/destinations/vwo/trackEvent/index.js +86 -0
- package/dist/destinations/vwo/trackEvent/index.js.map +1 -0
- package/dist/destinations/vwo/types.d.ts +42 -0
- package/dist/destinations/vwo/types.js +3 -0
- package/dist/destinations/vwo/types.js.map +1 -0
- package/dist/destinations/vwo/utility.d.ts +13 -0
- package/dist/destinations/vwo/utility.js +59 -0
- package/dist/destinations/vwo/utility.js.map +1 -0
- package/package.json +4 -4
- package/dist/destinations/actions-bingads/functions.d.ts +0 -0
- package/dist/destinations/actions-bingads/functions.js +0 -2
- package/dist/destinations/actions-bingads/functions.js.map +0 -1
- package/dist/destinations/actions-bingads/generated-types.d.ts +0 -10
- package/dist/destinations/actions-bingads/generated-types.js.map +0 -1
- package/dist/destinations/actions-bingads/index.js +0 -77
- package/dist/destinations/actions-bingads/index.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/formatter.d.ts +0 -8
- package/dist/destinations/actions-bingads/offlineConversions/formatter.js +0 -33
- package/dist/destinations/actions-bingads/offlineConversions/formatter.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.d.ts +0 -7
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/index.js +0 -131
- package/dist/destinations/actions-bingads/offlineConversions/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/constants.d.ts +0 -3
- package/dist/destinations/google-sheets-partner/constants.js +0 -7
- package/dist/destinations/google-sheets-partner/constants.js.map +0 -1
- package/dist/destinations/google-sheets-partner/generated-types.js.map +0 -1
- package/dist/destinations/google-sheets-partner/googleapis/index.d.ts +0 -17
- package/dist/destinations/google-sheets-partner/googleapis/index.js +0 -34
- package/dist/destinations/google-sheets-partner/googleapis/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/index.js +0 -79
- package/dist/destinations/google-sheets-partner/postSheet/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/operations.d.ts +0 -10
- package/dist/destinations/google-sheets-partner/postSheet/operations.js +0 -96
- package/dist/destinations/google-sheets-partner/postSheet/operations.js.map +0 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Destination definitions and their actions
|
|
|
6
6
|
|
|
7
7
|
MIT License
|
|
8
8
|
|
|
9
|
-
Copyright (c)
|
|
9
|
+
Copyright (c) 2023 Segment
|
|
10
10
|
|
|
11
11
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
12
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -9,7 +9,7 @@ const sendWebEvent_1 = __importDefault(require("./sendWebEvent"));
|
|
|
9
9
|
const sendTransactionEvent_1 = __importDefault(require("./sendTransactionEvent"));
|
|
10
10
|
const sendCustomEvent_1 = __importDefault(require("./sendCustomEvent"));
|
|
11
11
|
const dayjs_1 = __importDefault(require("../../lib/dayjs"));
|
|
12
|
-
exports.API_URL =
|
|
12
|
+
exports.API_URL = "https://api.converscience.com/events";
|
|
13
13
|
function formatTimestampAsUnixSeconds(ISOTimestamp) {
|
|
14
14
|
return dayjs_1.default.utc(ISOTimestamp).unix();
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/actable-predictive/index.ts"],"names":[],"mappings":";;;;;;AAGA,sEAA6C;AAC7C,kEAAyC;AACzC,kFAAyD;AACzD,wEAA+C;AAE/C,4DAAmC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/actable-predictive/index.ts"],"names":[],"mappings":";;;;;;AAGA,sEAA6C;AAC7C,kEAAyC;AACzC,kFAAyD;AACzD,wEAA+C;AAE/C,4DAAmC;AAGtB,QAAA,OAAO,GAAG,sCAAsC,CAAA;AAE7D,SAAgB,4BAA4B,CAAC,YAA6B;IACxE,OAAO,eAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAA;AACvC,CAAC;AAFD,oEAEC;AAED,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,SAAS,EAAE;gBACT,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,kCAAkC;gBAC/C,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,aAAa,EAAE;gBACb,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,sCAAsC;gBACnD,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,OAAO,CAAC,eAAO,EAAE;gBACtB,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE;aACzC,CAAC,CAAA;QACJ,CAAC;KACF;IAED,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;SAC9G,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP,cAAc,EAAd,wBAAc;QACd,YAAY,EAAZ,sBAAY;QACZ,oBAAoB,EAApB,8BAAoB;QACpB,eAAe,EAAf,yBAAe;KAChB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const index_1 = require("../index");
|
|
4
4
|
const action = {
|
|
5
5
|
title: 'Send Custom Event',
|
|
6
|
-
description: 'Send a custom event to Actable for prediction.',
|
|
6
|
+
description: 'Send a custom event to Actable for prediction. Use this to supply events that are not in Actable \'s customer view.',
|
|
7
7
|
fields: {
|
|
8
8
|
customer_id: {
|
|
9
9
|
label: 'Customer ID',
|
|
@@ -15,9 +15,9 @@ const action = {
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
timestamp: {
|
|
18
|
-
type:
|
|
19
|
-
label:
|
|
20
|
-
description:
|
|
18
|
+
type: "datetime",
|
|
19
|
+
label: "Timestamp of Event",
|
|
20
|
+
description: "Timestamp of when the custom event occured.",
|
|
21
21
|
format: 'date-time',
|
|
22
22
|
required: true,
|
|
23
23
|
default: {
|
|
@@ -25,20 +25,20 @@ const action = {
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
properties: {
|
|
28
|
-
type:
|
|
29
|
-
label:
|
|
30
|
-
description:
|
|
31
|
-
format:
|
|
28
|
+
type: "object",
|
|
29
|
+
label: "Custom Properties",
|
|
30
|
+
description: "Send an object of custom properties to Actable Predictive for custom data modeling.",
|
|
31
|
+
format: "text",
|
|
32
32
|
required: true,
|
|
33
33
|
default: { '@path': '$.properties' }
|
|
34
34
|
},
|
|
35
35
|
stream_key: {
|
|
36
|
-
type:
|
|
37
|
-
format:
|
|
38
|
-
label:
|
|
39
|
-
description:
|
|
36
|
+
type: "string",
|
|
37
|
+
format: "text",
|
|
38
|
+
label: "Stream Key",
|
|
39
|
+
description: "Dataset label, should be left as default unless specified otherwise.",
|
|
40
40
|
required: true,
|
|
41
|
-
default:
|
|
41
|
+
default: "custom"
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
perform: (request, data) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendCustomEvent/index.ts"],"names":[],"mappings":";;AAGA,oCAAgE;AAEhE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendCustomEvent/index.ts"],"names":[],"mappings":";;AAGA,oCAAgE;AAEhE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,qHAAqH;IAClI,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,SAAS,EAAE;YACT,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,6CAA6C;YAC1D,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EAAE,qFAAqF;YAClG,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SAErC;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,sEAAsE;YACnF,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,QAAQ;SAClB;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,oCAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;QAE7E,OAAO,OAAO,CAAC,eAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;SAC/B,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE;YAC7B,EAAE,CAAC,SAAS,GAAG,oCAA4B,CAAC,EAAE,CAAC,SAAS,CAAC,CAAA;SAC1D;QACD,OAAO,OAAO,CAAC,eAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;SAC7B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const index_1 = require("../index");
|
|
4
4
|
const action = {
|
|
5
5
|
title: 'Send Email Event',
|
|
6
|
-
description: '',
|
|
6
|
+
description: 'Send an email event to Actable for prediction. Use this to supply clicks, opens, and unsubscribes.',
|
|
7
7
|
fields: {
|
|
8
8
|
customer_id: {
|
|
9
9
|
label: 'Customer ID',
|
|
@@ -15,9 +15,9 @@ const action = {
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
date_email_sent: {
|
|
18
|
-
type:
|
|
19
|
-
label:
|
|
20
|
-
description:
|
|
18
|
+
type: "datetime",
|
|
19
|
+
label: "timestamp of event",
|
|
20
|
+
description: "Timestamp of event",
|
|
21
21
|
format: 'date-time',
|
|
22
22
|
required: true,
|
|
23
23
|
default: {
|
|
@@ -25,9 +25,9 @@ const action = {
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
campaign_name: {
|
|
28
|
-
type:
|
|
29
|
-
label:
|
|
30
|
-
description:
|
|
28
|
+
type: "string",
|
|
29
|
+
label: "Campaign Name of Email",
|
|
30
|
+
description: "name of the campaign associated with the email",
|
|
31
31
|
format: 'text',
|
|
32
32
|
required: false,
|
|
33
33
|
default: {
|
|
@@ -35,33 +35,33 @@ const action = {
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
clicked_flag: {
|
|
38
|
-
type:
|
|
39
|
-
label:
|
|
40
|
-
description:
|
|
38
|
+
type: "integer",
|
|
39
|
+
label: "Click Event Indicator",
|
|
40
|
+
description: "1=email was clicked, 0 email was not clicked",
|
|
41
41
|
format: 'text',
|
|
42
42
|
required: false
|
|
43
43
|
},
|
|
44
44
|
opened_flag: {
|
|
45
|
-
type:
|
|
46
|
-
label:
|
|
47
|
-
description:
|
|
45
|
+
type: "integer",
|
|
46
|
+
label: "Open Event Indicator",
|
|
47
|
+
description: "1=email was opened, 0 email was not opened",
|
|
48
48
|
format: 'text',
|
|
49
49
|
required: false
|
|
50
50
|
},
|
|
51
51
|
unsub_flag: {
|
|
52
|
-
type:
|
|
53
|
-
label:
|
|
54
|
-
description:
|
|
52
|
+
type: "integer",
|
|
53
|
+
label: "Unsubscribe Event Indicator",
|
|
54
|
+
description: "1=customer unsubscribed from the email list, 0 user remained subscribed",
|
|
55
55
|
format: 'text',
|
|
56
56
|
required: false
|
|
57
57
|
},
|
|
58
58
|
stream_key: {
|
|
59
|
-
type:
|
|
60
|
-
format:
|
|
61
|
-
label:
|
|
62
|
-
description:
|
|
59
|
+
type: "string",
|
|
60
|
+
format: "text",
|
|
61
|
+
label: "Stream Key",
|
|
62
|
+
description: "Dataset label, should be left as default unless directed otherwise",
|
|
63
63
|
required: true,
|
|
64
|
-
default:
|
|
64
|
+
default: "email"
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
perform: (request, data) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendEmailEvent/index.ts"],"names":[],"mappings":";;AAGA,oCAAgE;AAEhE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendEmailEvent/index.ts"],"names":[],"mappings":";;AAGA,oCAAgE;AAEhE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,oGAAoG;IACjH,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,eAAe,EAAE;YACf,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,oBAAoB;YACjC,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,wBAAwB;YAC/B,WAAW,EAAE,gDAAgD;YAC7D,MAAM,EAAE,MAAM;YACd,QA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MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;SAC7B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -25,14 +25,14 @@ function formatPurchasePayload(purchaseEvent) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
return {
|
|
28
|
-
...actions_core_1.omit(purchaseEvent, [
|
|
29
|
-
product_column: productList.join(
|
|
30
|
-
discount_code: codeList.join(
|
|
28
|
+
...actions_core_1.omit(purchaseEvent, ["products", "discount_code"]),
|
|
29
|
+
"product_column": productList.join("|"),
|
|
30
|
+
"discount_code": codeList.join("|")
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
const action = {
|
|
34
34
|
title: 'Send Transaction Event',
|
|
35
|
-
description: '',
|
|
35
|
+
description: 'Send a purchase event to Actable for prediction. Purchase events should be in v2 Commerce Spec.',
|
|
36
36
|
fields: {
|
|
37
37
|
customer_id: {
|
|
38
38
|
label: 'Customer ID',
|
|
@@ -44,52 +44,52 @@ const action = {
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
discount_code: {
|
|
47
|
-
type:
|
|
48
|
-
label:
|
|
49
|
-
description:
|
|
50
|
-
format:
|
|
47
|
+
type: "string",
|
|
48
|
+
label: "Discount Code",
|
|
49
|
+
description: "Discount code, if any, used on purchase. Will be used in addition to per-product coupons in Segment v2commerce events spec.",
|
|
50
|
+
format: "text",
|
|
51
51
|
required: false
|
|
52
52
|
},
|
|
53
53
|
transaction_id: {
|
|
54
|
-
type:
|
|
55
|
-
label:
|
|
56
|
-
description:
|
|
57
|
-
format:
|
|
54
|
+
type: "string",
|
|
55
|
+
label: "Transaction ID",
|
|
56
|
+
description: "Optional Identifier for transaction.",
|
|
57
|
+
format: "text",
|
|
58
58
|
required: false,
|
|
59
59
|
default: { '@path': '$.properties.order_id' }
|
|
60
60
|
},
|
|
61
61
|
spend: {
|
|
62
|
-
type:
|
|
63
|
-
label:
|
|
64
|
-
description:
|
|
65
|
-
format:
|
|
62
|
+
type: "number",
|
|
63
|
+
label: "Amount",
|
|
64
|
+
description: "Total order amount.",
|
|
65
|
+
format: "text",
|
|
66
66
|
required: false,
|
|
67
67
|
default: { '@path': '$.properties.total' }
|
|
68
68
|
},
|
|
69
69
|
products: {
|
|
70
|
-
type:
|
|
70
|
+
type: "object",
|
|
71
71
|
multiple: true,
|
|
72
|
-
label:
|
|
73
|
-
description:
|
|
74
|
-
format:
|
|
72
|
+
label: "Products Purchased",
|
|
73
|
+
description: "product(s) purchased in transaction. This value should be an array of objects which at the minimum contains a Product ID or SKU per-product.",
|
|
74
|
+
format: "text",
|
|
75
75
|
required: true,
|
|
76
76
|
default: { '@path': '$.properties.products' }
|
|
77
77
|
},
|
|
78
78
|
purchase_datetime: {
|
|
79
|
-
type:
|
|
80
|
-
label:
|
|
81
|
-
description:
|
|
82
|
-
format:
|
|
79
|
+
type: "datetime",
|
|
80
|
+
label: "Timestamp",
|
|
81
|
+
description: "timestamp of when transaction event occurred.",
|
|
82
|
+
format: "date-time",
|
|
83
83
|
required: true,
|
|
84
84
|
default: { '@path': '$.timestamp' }
|
|
85
85
|
},
|
|
86
86
|
stream_key: {
|
|
87
|
-
type:
|
|
88
|
-
format:
|
|
89
|
-
label:
|
|
90
|
-
description:
|
|
87
|
+
type: "string",
|
|
88
|
+
format: "text",
|
|
89
|
+
label: "Stream Key",
|
|
90
|
+
description: "Dataset label, should be left as default unless directed otherwise.",
|
|
91
91
|
required: true,
|
|
92
|
-
default:
|
|
92
|
+
default: "transaction"
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
perform: (request, data) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendTransactionEvent/index.ts"],"names":[],"mappings":";;AAAA,wDAA8D;AAG9D,oCAAgE;AAEhE,SAAS,qBAAqB,C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,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE;YAC7B,gBAAgB,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC,CAAA;SACjD;QACD,OAAO,OAAO,CAAC,eAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;SACjC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AACD,kBAAe,MAAM,CAAA"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const index_1 = require("../index");
|
|
4
4
|
const action = {
|
|
5
5
|
title: 'Send Web Activity Event',
|
|
6
|
-
description: '',
|
|
6
|
+
description: 'Send a Web (or app) event to Actable for prediction. Use this to supply events like page views, link clicks, etc.',
|
|
7
7
|
fields: {
|
|
8
8
|
customer_id: {
|
|
9
9
|
label: 'Customer ID',
|
|
@@ -15,52 +15,52 @@ const action = {
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
datetime: {
|
|
18
|
-
type:
|
|
19
|
-
format:
|
|
20
|
-
label:
|
|
21
|
-
description:
|
|
18
|
+
type: "datetime",
|
|
19
|
+
format: "date-time",
|
|
20
|
+
label: "Event Timestamp",
|
|
21
|
+
description: "Timestamp of event",
|
|
22
22
|
required: true,
|
|
23
23
|
default: { '@path': '$.timestamp' }
|
|
24
24
|
},
|
|
25
25
|
interaction_type: {
|
|
26
|
-
type:
|
|
27
|
-
format:
|
|
28
|
-
label:
|
|
29
|
-
description:
|
|
26
|
+
type: "string",
|
|
27
|
+
format: "text",
|
|
28
|
+
label: "Event Type",
|
|
29
|
+
description: "type of interaction (page view, add to cart, etc).",
|
|
30
30
|
required: true,
|
|
31
31
|
default: { '@path': '$.event' }
|
|
32
32
|
},
|
|
33
33
|
utm_campaign: {
|
|
34
|
-
type:
|
|
35
|
-
format:
|
|
36
|
-
label:
|
|
37
|
-
description:
|
|
34
|
+
type: "string",
|
|
35
|
+
format: "text",
|
|
36
|
+
label: "UTM Campaign",
|
|
37
|
+
description: "UTM campaign parameter associated with event.",
|
|
38
38
|
required: false,
|
|
39
39
|
default: { '@path': '$.context.campaign.name' }
|
|
40
40
|
},
|
|
41
41
|
utm_medium: {
|
|
42
|
-
type:
|
|
43
|
-
format:
|
|
44
|
-
label:
|
|
45
|
-
description:
|
|
42
|
+
type: "string",
|
|
43
|
+
format: "text",
|
|
44
|
+
label: "UTM Medium",
|
|
45
|
+
description: "UTM medium parameter associated with event.",
|
|
46
46
|
required: false,
|
|
47
47
|
default: { '@path': '$.context.campaign.medium' }
|
|
48
48
|
},
|
|
49
49
|
utm_source: {
|
|
50
|
-
type:
|
|
51
|
-
format:
|
|
52
|
-
label:
|
|
53
|
-
description:
|
|
50
|
+
type: "string",
|
|
51
|
+
format: "text",
|
|
52
|
+
label: "UTM Source",
|
|
53
|
+
description: "UTM source parameter associated with event.",
|
|
54
54
|
required: false,
|
|
55
55
|
default: { '@path': '$.context.campaign.source' }
|
|
56
56
|
},
|
|
57
57
|
stream_key: {
|
|
58
|
-
type:
|
|
59
|
-
format:
|
|
60
|
-
label:
|
|
61
|
-
description:
|
|
58
|
+
type: "string",
|
|
59
|
+
format: "text",
|
|
60
|
+
label: "Stream Key",
|
|
61
|
+
description: "Dataset label, should be left as default unless directed otherwise",
|
|
62
62
|
required: true,
|
|
63
|
-
default:
|
|
63
|
+
default: "web"
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
perform: (request, data) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendWebEvent/index.ts"],"names":[],"mappings":";;AAGA,oCAAgE;AAEhE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendWebEvent/index.ts"],"names":[],"mappings":";;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EAAE,2BAA2B,EAAE;SAClD;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,oEAAoE;YACjF,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,KAAK;SACf;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,oCAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QAE3E,OAAO,OAAO,CAAC,eAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;SAC/B,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE;YAC7B,EAAE,CAAC,QAAQ,GAAG,oCAA4B,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAA;SACxD;QACD,OAAO,OAAO,CAAC,eAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;SAC7B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { RequestClient } from '@segment/actions-core';
|
|
2
|
+
import { StatsContext } from '@segment/actions-core/src/destination-kit';
|
|
2
3
|
export default class AdobeTarget {
|
|
3
4
|
userId: string;
|
|
4
5
|
clientCode: string;
|
|
5
6
|
traits: object;
|
|
6
7
|
request: RequestClient;
|
|
7
8
|
constructor(userId: string, clientCode: string, traits: object, request: RequestClient);
|
|
8
|
-
updateProfile: () => Promise<import("@segment/actions-core").ModifiedResponse<unknown> | undefined>;
|
|
9
|
+
updateProfile: (statsContext: StatsContext | undefined) => Promise<import("@segment/actions-core").ModifiedResponse<unknown> | undefined>;
|
|
9
10
|
private lookupProfile;
|
|
10
11
|
}
|
|
@@ -20,8 +20,8 @@ const objectToQueryString = (object) => Object.keys(object)
|
|
|
20
20
|
.join('&');
|
|
21
21
|
class AdobeTarget {
|
|
22
22
|
constructor(userId, clientCode, traits, request) {
|
|
23
|
-
this.updateProfile = async () => {
|
|
24
|
-
const err = await this.lookupProfile(this.userId, this.clientCode);
|
|
23
|
+
this.updateProfile = async (statsContext) => {
|
|
24
|
+
const err = await this.lookupProfile(this.userId, this.clientCode, statsContext);
|
|
25
25
|
if (err) {
|
|
26
26
|
throw err;
|
|
27
27
|
}
|
|
@@ -35,13 +35,17 @@ class AdobeTarget {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
this.lookupProfile = async (userId, clientCode) => {
|
|
38
|
+
this.lookupProfile = async (userId, clientCode, statsContext) => {
|
|
39
39
|
try {
|
|
40
40
|
await this.request(`https://${clientCode}.tt.omtrdc.net/rest/v1/profiles/thirdPartyId/${userId}?client=${clientCode}`, { method: 'get' });
|
|
41
41
|
}
|
|
42
42
|
catch (error) {
|
|
43
43
|
if (error instanceof Error) {
|
|
44
|
-
|
|
44
|
+
const errorCode = error.message == 'Forbidden' ? '403' : '500';
|
|
45
|
+
if (errorCode == '500') {
|
|
46
|
+
statsContext?.statsClient.incr('actions-adobe-target.profile-not-found', 1, statsContext.tags);
|
|
47
|
+
}
|
|
48
|
+
throw new actions_core_1.IntegrationError(error.message, errorCode);
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
51
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adobeTarget_operations.js","sourceRoot":"","sources":["../../../src/destinations/adobe-target/adobeTarget_operations.ts"],"names":[],"mappings":";;AAAA,wDAAuE;
|
|
1
|
+
{"version":3,"file":"adobeTarget_operations.js","sourceRoot":"","sources":["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AA;IACxB,CAAC;CAiDF;AA5DD,8BA4DC"}
|
|
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
7
6
|
const adobeTarget_operations_1 = __importDefault(require("../adobeTarget_operations"));
|
|
8
7
|
const action = {
|
|
9
8
|
title: 'Update Profile',
|
|
@@ -31,16 +30,9 @@ const action = {
|
|
|
31
30
|
defaultObjectUI: 'keyvalue'
|
|
32
31
|
}
|
|
33
32
|
},
|
|
34
|
-
perform: async (request, { settings, payload }) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return await at.updateProfile();
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
if (error instanceof Error) {
|
|
41
|
-
throw new actions_core_1.IntegrationError(error.message, error.message == 'Forbidden' ? '403' : '400');
|
|
42
|
-
}
|
|
43
|
-
}
|
|
33
|
+
perform: async (request, { settings, payload, statsContext }) => {
|
|
34
|
+
const at = new adobeTarget_operations_1.default(payload.user_id, settings.client_code, payload.traits, request);
|
|
35
|
+
return await at.updateProfile(statsContext);
|
|
44
36
|
}
|
|
45
37
|
};
|
|
46
38
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/adobe-target/updateProfile/index.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/adobe-target/updateProfile/index.ts"],"names":[],"mappings":";;;;;AAEA,uFAAmD;AAGnD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,kDAAkD;IAC/D,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,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iBACf;aACF;YACD,OAAO,EAAE;gBACP,QAAQ,EAAE,EAAE,OAAO,EAAE,6BAA6B,EAAE;gBACpD,SAAS,EAAE,EAAE,OAAO,EAAE,8BAA8B,EAAE;aACvD;SACF;QACD,qBAAqB,EAAE;YACrB,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,sCAAsC;YACnD,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,IAAI;SAChB;QACD,oBAAoB,EAAE;YACpB,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EAAE,qCAAqC;YAClD,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,IAAI;SAChB;QACD,GAAG,EAAE;YACH,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,IAAI;SAChB;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,QAAQ;YACd,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/braze/updateUserProfile/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA+E;AAI/E,+DAAsC;AACtC,4CAA2C;AAK3C,SAAS,SAAS,CAAC,IAAe;IAChC,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;QACvC,OAAO,IAAI,CAAA;KACZ;IAED,MAAM,CAAC,GAAG,eAAK,CAAC,IAAI,CAAC,CAAA;IACrB,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;AAClD,CAAC;AAED,SAAS,YAAY,CAAC,IAAe,EAAE,MAAc;IACnD,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;QACvC,OAAO,IAAI,CAAA;KACZ;IAED,MAAM,CAAC,GAAG,eAAK,CAAC,IAAI,CAAC,CAAA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,GAAG,EAAE,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,YAAY,CAAC;wBAC5C,KAAK,EAAE,OAAO,CAAC,KAAK;wBACpB,eAAe,EAAE,OAAO,CAAC,eAAe;wBACxC,4BAA4B,EAAE,OAAO,CAAC,4BAA4B;wBAClE,6BAA6B,EAAE,OAAO,CAAC,6BAA6B;wBACpE,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC;wBACrC,SAAS,EAAE,OAAO,CAAC,SAAS;wBAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;wBAI5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,SAAS,EAAE,OAAO,CAAC,SAAS;wBAC5B,uBAAuB,EAAE,SAAS,CAAC,OAAO,CAAC,uBAAuB,CAAC;wBACnE,KAAK,EAAE,OAAO,CAAC,KAAK;wBACpB,cAAc,EAAE,OAAO,CAAC,cAAc;wBACtC,WAAW,EAAE,OAAO,CAAC,WAAW;wBAChC,SAAS,EAAE,OAAO,CAAC,SAAS;wBAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;wBACxB,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;qBACrD;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RequestClient, ModifiedResponse } from '@segment/actions-core';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
|
+
import type { Payload } from '../syncAudiences/generated-types';
|
|
4
|
+
import { CohortChanges } from '../braze-cohorts-types';
|
|
5
|
+
interface APIResponse {
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class SyncAudiences {
|
|
9
|
+
request: RequestClient;
|
|
10
|
+
partnerApiKey: String;
|
|
11
|
+
constructor(request: RequestClient, settings: Settings);
|
|
12
|
+
createCohort(settings: Settings, payload: Payload): Promise<ModifiedResponse<APIResponse>>;
|
|
13
|
+
batchUpdate(settings: Settings, cohort_id: string, cohortChanges: Array<CohortChanges>): Promise<ModifiedResponse>;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SyncAudiences = void 0;
|
|
4
|
+
class SyncAudiences {
|
|
5
|
+
constructor(request, settings) {
|
|
6
|
+
this.request = request;
|
|
7
|
+
this.partnerApiKey = (settings.endpoint.includes('eu')
|
|
8
|
+
? process.env.BRAZE_COHORTS_PARTNER_API_KEY_EU
|
|
9
|
+
: process.env.BRAZE_COHORTS_PARTNER_API_KEY_US);
|
|
10
|
+
}
|
|
11
|
+
async createCohort(settings, payload) {
|
|
12
|
+
return this.request(`${settings.endpoint}/partners/segment/cohorts`, {
|
|
13
|
+
method: 'POST',
|
|
14
|
+
json: {
|
|
15
|
+
partner_api_key: this.partnerApiKey,
|
|
16
|
+
client_secret: settings.client_secret,
|
|
17
|
+
name: payload?.cohort_name,
|
|
18
|
+
cohort_id: payload?.cohort_id,
|
|
19
|
+
created_at: payload?.time
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
async batchUpdate(settings, cohort_id, cohortChanges) {
|
|
24
|
+
return this.request(`${settings.endpoint}/partners/segment/cohorts/users`, {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
json: {
|
|
27
|
+
partner_api_key: this.partnerApiKey,
|
|
28
|
+
client_secret: settings.client_secret,
|
|
29
|
+
cohort_id: cohort_id,
|
|
30
|
+
cohort_changes: cohortChanges
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.SyncAudiences = SyncAudiences;
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/braze-cohorts/api/index.ts"],"names":[],"mappings":";;;AASA,MAAa,aAAa;IAIxB,YAAY,OAAsB,EAAE,QAAkB;QACpD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,aAAa,GAAG,CACnB,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC9B,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC;YAC9C,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CACvC,CAAA;IACb,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,QAAkB,EAAE,OAAgB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,2BAA2B,EAAE;YACnE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,eAAe,EAAE,IAAI,CAAC,aAAa;gBACnC,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,IAAI,EAAE,OAAO,EAAE,WAAW;gBAC1B,SAAS,EAAE,OAAO,EAAE,SAAS;gBAC7B,UAAU,EAAE,OAAO,EAAE,IAAI;aAC1B;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,WAAW,CACf,QAAkB,EAClB,SAAiB,EACjB,aAAmC;QAEnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,iCAAiC,EAAE;YACzE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,eAAe,EAAE,IAAI,CAAC,aAAa;gBACnC,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,SAAS,EAAE,SAAS;gBACpB,cAAc,EAAE,aAAa;aAC9B;SACF,CAAC,CAAA;IACJ,CAAC;CACF;AAzCD,sCAyCC"}
|