@segment/action-destinations 3.119.0 → 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/sendCustomEvent/index.js +1 -1
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js +1 -1
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js +1 -1
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendWebEvent/index.js +1 -1
- 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-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/braze-cohorts/generated-types.js +3 -0
- package/dist/destinations/braze-cohorts/generated-types.js.map +1 -0
- package/dist/destinations/braze-cohorts/index.d.ts +4 -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/braze-cohorts/syncAudiences/generated-types.js +3 -0
- package/dist/destinations/braze-cohorts/syncAudiences/generated-types.js.map +1 -0
- package/dist/destinations/braze-cohorts/syncAudiences/index.d.ts +5 -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/customerio/createUpdateObject/generated-types.d.ts +11 -0
- package/dist/destinations/customerio/createUpdateObject/generated-types.js +3 -0
- package/dist/destinations/customerio/createUpdateObject/generated-types.js.map +1 -0
- package/dist/destinations/customerio/createUpdateObject/index.d.ts +5 -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 +2 -2
- package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js +2 -2
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
- package/dist/destinations/google-sheets-dev/generated-types.d.ts +2 -0
- package/dist/destinations/google-sheets-dev/generated-types.js +3 -0
- package/dist/destinations/google-sheets-dev/generated-types.js.map +1 -0
- package/dist/destinations/google-sheets-dev/index.d.ts +4 -0
- package/dist/destinations/google-sheets-dev/index.js +41 -0
- package/dist/destinations/google-sheets-dev/index.js.map +1 -0
- package/dist/destinations/google-sheets-dev/postSheet.types.d.ts +11 -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/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/index.js +4 -7
- 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 -0
- 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/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 +8 -2
- 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/account/generated-types.d.ts +1 -0
- package/dist/destinations/salesforce/account/index.js +1 -0
- package/dist/destinations/salesforce/account/index.js.map +1 -1
- package/dist/destinations/salesforce/cases/generated-types.d.ts +1 -0
- package/dist/destinations/salesforce/cases/index.js +1 -0
- package/dist/destinations/salesforce/cases/index.js.map +1 -1
- package/dist/destinations/salesforce/contact/generated-types.d.ts +1 -0
- package/dist/destinations/salesforce/contact/index.js +1 -0
- package/dist/destinations/salesforce/contact/index.js.map +1 -1
- package/dist/destinations/salesforce/customObject/generated-types.d.ts +1 -0
- package/dist/destinations/salesforce/customObject/index.js +1 -0
- package/dist/destinations/salesforce/customObject/index.js.map +1 -1
- package/dist/destinations/salesforce/lead/generated-types.d.ts +1 -0
- package/dist/destinations/salesforce/lead/index.js +7 -6
- package/dist/destinations/salesforce/lead/index.js.map +1 -1
- package/dist/destinations/salesforce/opportunity/generated-types.d.ts +1 -0
- package/dist/destinations/salesforce/opportunity/index.js +1 -0
- package/dist/destinations/salesforce/opportunity/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 +1 -0
- package/dist/destinations/salesforce/sf-properties.js +11 -1
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/salesforce/sf-utils.js +9 -4
- 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
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.values = exports.data = exports.kind = exports.timestamp = exports.userAgent = exports.referrerUrl = exports.url = exports.email = exports.anonymousId = exports.userId = void 0;
|
|
4
|
+
exports.userId = {
|
|
5
|
+
label: 'Segment User ID',
|
|
6
|
+
description: 'Permanent identifier of a Segment user the event is attributed to.',
|
|
7
|
+
type: 'string',
|
|
8
|
+
dynamic: true,
|
|
9
|
+
default: {
|
|
10
|
+
'@path': '$.userId'
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
exports.anonymousId = {
|
|
14
|
+
label: 'Segment Anonymous User ID',
|
|
15
|
+
description: 'A pseudo-unique substitute for a Segment user ID the event is attributed to.',
|
|
16
|
+
type: 'string',
|
|
17
|
+
default: {
|
|
18
|
+
'@path': '$.anonymousId'
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.email = {
|
|
22
|
+
label: 'Email',
|
|
23
|
+
description: 'Identified email of the Segment User.',
|
|
24
|
+
type: 'string',
|
|
25
|
+
default: {
|
|
26
|
+
'@if': {
|
|
27
|
+
exists: { '@path': '$.traits.email' },
|
|
28
|
+
then: { '@path': '$.traits.email' },
|
|
29
|
+
else: { '@path': '$.properties.email' }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.url = {
|
|
34
|
+
label: 'URL',
|
|
35
|
+
description: 'URL associated with the event.',
|
|
36
|
+
type: 'string',
|
|
37
|
+
default: {
|
|
38
|
+
'@if': {
|
|
39
|
+
exists: { '@path': '$.properties.url' },
|
|
40
|
+
then: { '@path': '$.properties.url' },
|
|
41
|
+
else: { '@path': '$.context.page.url' }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.referrerUrl = {
|
|
46
|
+
label: 'Referrer URL',
|
|
47
|
+
description: 'Referrer URL associated with the event.',
|
|
48
|
+
type: 'string',
|
|
49
|
+
default: {
|
|
50
|
+
'@if': {
|
|
51
|
+
exists: { '@path': '$.properties.referrer' },
|
|
52
|
+
then: { '@path': '$.properties.referrer' },
|
|
53
|
+
else: { '@path': '$.context.page.referrer' }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.userAgent = {
|
|
58
|
+
label: 'User Agent',
|
|
59
|
+
description: 'User Agent associated with the event.',
|
|
60
|
+
type: 'string',
|
|
61
|
+
default: {
|
|
62
|
+
'@path': '$.context.userAgent'
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
exports.timestamp = {
|
|
66
|
+
label: 'Event Timestamp',
|
|
67
|
+
description: 'When the event was sent.',
|
|
68
|
+
type: 'datetime',
|
|
69
|
+
default: {
|
|
70
|
+
'@path': '$.timestamp'
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const kind = (defaultValue) => {
|
|
74
|
+
return {
|
|
75
|
+
label: 'Custom Event Kind',
|
|
76
|
+
description: 'Type of the SalesWings custom event (a custom event is visualized in SalesWings cockpit and SalesForce Lead Intent View as "[[Kind]] Data").',
|
|
77
|
+
type: 'string',
|
|
78
|
+
default: defaultValue,
|
|
79
|
+
required: true
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
exports.kind = kind;
|
|
83
|
+
const data = (defaultValue) => {
|
|
84
|
+
return {
|
|
85
|
+
label: 'Custom Event Data',
|
|
86
|
+
description: 'String description of the SalesWings custom event payload (a custom event is visualized in SalesWings cockpit and SalesForce Lead Intent View as "[[Kind]] Data").',
|
|
87
|
+
type: 'string',
|
|
88
|
+
default: defaultValue,
|
|
89
|
+
required: true
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
exports.data = data;
|
|
93
|
+
const values = (defaultValue) => {
|
|
94
|
+
return {
|
|
95
|
+
label: 'Custom Attribute Values',
|
|
96
|
+
description: 'Custom attribute values associated with the SalesWings custom event.',
|
|
97
|
+
type: 'object',
|
|
98
|
+
default: defaultValue
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
exports.values = values;
|
|
102
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../src/destinations/saleswings/fields.ts"],"names":[],"mappings":";;;AAGa,QAAA,MAAM,GAAe;IAChC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,oEAAoE;IACjF,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,IAAI;IACb,OAAO,EAAE;QACP,OAAO,EAAE,UAAU;KACpB;CACF,CAAA;AAEY,QAAA,WAAW,GAAe;IACrC,KAAK,EAAE,2BAA2B;IAClC,WAAW,EAAE,8EAA8E;IAC3F,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,OA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E;QACP,OAAO,EAAE,aAAa;KACvB;CACF,CAAA;AAEM,MAAM,IAAI,GAAG,CAAC,YAAoB,EAAc,EAAE;IACvD,OAAO;QACL,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EACT,8IAA8I;QAChJ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,YAAY;QACrB,QAAQ,EAAE,IAAI;KACf,CAAA;AACH,CAAC,CAAA;AATY,QAAA,IAAI,QAShB;AAEM,MAAM,IAAI,GAAG,CAAC,YAAuB,EAAc,EAAE;IAC1D,OAAO;QACL,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EACT,oKAAoK;QACtK,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,YAAY;QACrB,QAAQ,EAAE,IAAI;KACf,CAAA;AACH,CAAC,CAAA;AATY,QAAA,IAAI,QAShB;AAEM,MAAM,MAAM,GAAG,CAAC,YAAuB,EAAc,EAAE;IAC5D,OAAO;QACL,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,sEAAsE;QACnF,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,YAAY;KACtB,CAAA;AACH,CAAC,CAAA;AAPY,QAAA,MAAM,UAOlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/saleswings/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
7
|
+
const api_1 = require("./api");
|
|
8
|
+
const submitTrackEvent_1 = __importDefault(require("./submitTrackEvent"));
|
|
9
|
+
const submitIdentifyEvent_1 = __importDefault(require("./submitIdentifyEvent"));
|
|
10
|
+
const submitPageEvent_1 = __importDefault(require("./submitPageEvent"));
|
|
11
|
+
const submitScreenEvent_1 = __importDefault(require("./submitScreenEvent"));
|
|
12
|
+
const destination = {
|
|
13
|
+
name: 'Saleswings (Actions)',
|
|
14
|
+
slug: 'actions-saleswings',
|
|
15
|
+
mode: 'cloud',
|
|
16
|
+
authentication: {
|
|
17
|
+
scheme: 'custom',
|
|
18
|
+
fields: {
|
|
19
|
+
apiKey: {
|
|
20
|
+
label: 'API Key',
|
|
21
|
+
description: 'Segment.io API key for your SalesWings project.',
|
|
22
|
+
type: 'password',
|
|
23
|
+
required: true
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
testAuthentication: async (request, { settings }) => {
|
|
27
|
+
const resp = await request(`${api_1.apiBaseUrl}/project/account`, {
|
|
28
|
+
headers: { Authorization: `Bearer ${settings.apiKey}` }
|
|
29
|
+
});
|
|
30
|
+
return resp.status == 200;
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
presets: [
|
|
34
|
+
{
|
|
35
|
+
name: 'Submit Track Event',
|
|
36
|
+
subscribe: 'type = "track"',
|
|
37
|
+
partnerAction: 'submitTrackEvent',
|
|
38
|
+
mapping: actions_core_1.defaultValues(submitTrackEvent_1.default.fields)
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Submit Identify Event',
|
|
42
|
+
subscribe: 'type = "identify"',
|
|
43
|
+
partnerAction: 'submitIdentifyEvent',
|
|
44
|
+
mapping: actions_core_1.defaultValues(submitIdentifyEvent_1.default.fields)
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Submit Page Event',
|
|
48
|
+
subscribe: 'type = "page"',
|
|
49
|
+
partnerAction: 'submitPageEvent',
|
|
50
|
+
mapping: actions_core_1.defaultValues(submitPageEvent_1.default.fields)
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Submit Screen Event',
|
|
54
|
+
subscribe: 'type = "screen"',
|
|
55
|
+
partnerAction: 'submitScreenEvent',
|
|
56
|
+
mapping: actions_core_1.defaultValues(submitScreenEvent_1.default.fields)
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
actions: {
|
|
60
|
+
submitTrackEvent: submitTrackEvent_1.default,
|
|
61
|
+
submitIdentifyEvent: submitIdentifyEvent_1.default,
|
|
62
|
+
submitPageEvent: submitPageEvent_1.default,
|
|
63
|
+
submitScreenEvent: submitScreenEvent_1.default
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
exports.default = destination;
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/saleswings/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAC5E,+BAAkC;AAGlC,0EAAiD;AACjD,gFAAuD;AACvD,wEAA+C;AAC/C,4EAAmD;AAEnD,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,iDAAiD;gBAC9D,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAClD,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,GAAG,gBAAU,kBAAkB,EAAE;gBAC1D,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,QAAQ,CAAC,MAAM,EAAE,EAAE;aACxD,CAAC,CAAA;YACF,OAAO,IAAI,CAAC,MAAM,IAAI,GAAG,CAAA;QAC3B,CAAC;KACF;IAED,OAAO,EAAE;QACP;YACE,IAAI,EAAE,oBAAoB;YAC1B,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,kBAAkB;YACjC,OAAO,EAAE,4BAAa,CAAC,0BAAgB,CAAC,MAAM,CAAC;SAChD;QACD;YACE,IAAI,EAAE,uBAAuB;YAC7B,SAAS,EAAE,mBAAmB;YAC9B,aAAa,EAAE,qBAAqB;YACpC,OAAO,EAAE,4BAAa,CAAC,6BAAmB,CAAC,MAAM,CAAC;SACnD;QACD;YACE,IAAI,EAAE,mBAAmB;YACzB,SAAS,EAAE,eAAe;YAC1B,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE,4BAAa,CAAC,yBAAe,CAAC,MAAM,CAAC;SAC/C;QACD;YACE,IAAI,EAAE,qBAAqB;YAC3B,SAAS,EAAE,iBAAiB;YAC5B,aAAa,EAAE,mBAAmB;YAClC,OAAO,EAAE,4BAAa,CAAC,2BAAiB,CAAC,MAAM,CAAC;SACjD;KACF;IAED,OAAO,EAAE;QACP,gBAAgB,EAAhB,0BAAgB;QAChB,mBAAmB,EAAnB,6BAAmB;QACnB,eAAe,EAAf,yBAAe;QACf,iBAAiB,EAAjB,2BAAiB;KAClB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
kind: string;
|
|
3
|
+
data: string;
|
|
4
|
+
userId?: string;
|
|
5
|
+
anonymousId?: string;
|
|
6
|
+
email: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
referrerUrl?: string;
|
|
9
|
+
userAgent?: string;
|
|
10
|
+
timestamp?: string | number;
|
|
11
|
+
values?: {
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/saleswings/submitIdentifyEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_1 = require("../api");
|
|
4
|
+
const fields_1 = require("../fields");
|
|
5
|
+
const converter_1 = require("../converter");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const convertEvent = (payload) => {
|
|
8
|
+
return new api_1.TrackingEvent({
|
|
9
|
+
leadRefs: converter_1.convertLeadRefs(payload),
|
|
10
|
+
kind: payload.kind,
|
|
11
|
+
data: payload.data,
|
|
12
|
+
url: payload.url,
|
|
13
|
+
referrerUrl: payload.referrerUrl,
|
|
14
|
+
userAgent: payload.userAgent,
|
|
15
|
+
timestamp: converter_1.convertTimestamp(payload.timestamp),
|
|
16
|
+
values: converter_1.convertValues(payload.values)
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const action = {
|
|
20
|
+
title: 'Submit Identify Event',
|
|
21
|
+
description: 'Send your Segment Identify events to SalesWings to use them for tagging, scoring and prioritising your leads.',
|
|
22
|
+
defaultSubscription: 'type = "identify"',
|
|
23
|
+
fields: {
|
|
24
|
+
kind: fields_1.kind('Identify'),
|
|
25
|
+
data: fields_1.data({ '@path': '$.traits.email' }),
|
|
26
|
+
userId: fields_1.userId,
|
|
27
|
+
anonymousId: fields_1.anonymousId,
|
|
28
|
+
email: { ...fields_1.email, required: true },
|
|
29
|
+
url: fields_1.url,
|
|
30
|
+
referrerUrl: fields_1.referrerUrl,
|
|
31
|
+
userAgent: fields_1.userAgent,
|
|
32
|
+
timestamp: fields_1.timestamp,
|
|
33
|
+
values: fields_1.values({ '@path': '$.traits' })
|
|
34
|
+
},
|
|
35
|
+
perform: common_1.perform(convertEvent),
|
|
36
|
+
performBatch: common_1.performBatch(convertEvent)
|
|
37
|
+
};
|
|
38
|
+
exports.default = action;
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/saleswings/submitIdentifyEvent/index.ts"],"names":[],"mappings":";;AAGA,gCAA6C;AAC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submitPageEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_1 = require("../api");
|
|
4
|
+
const fields_1 = require("../fields");
|
|
5
|
+
const converter_1 = require("../converter");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const convertEvent = (payload) => {
|
|
8
|
+
const leadRefs = converter_1.convertLeadRefs(payload);
|
|
9
|
+
if (leadRefs.length == 0)
|
|
10
|
+
return undefined;
|
|
11
|
+
return new api_1.PageVisitEvent({
|
|
12
|
+
leadRefs,
|
|
13
|
+
url: payload.url,
|
|
14
|
+
referrerUrl: payload.referrerUrl,
|
|
15
|
+
userAgent: payload.userAgent,
|
|
16
|
+
timestamp: converter_1.convertTimestamp(payload.timestamp)
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const action = {
|
|
20
|
+
title: 'Submit Page Event',
|
|
21
|
+
description: 'Send your Segment Page events to SalesWings to use them for tagging, scoring and prioritising your leads.',
|
|
22
|
+
defaultSubscription: 'type = "page"',
|
|
23
|
+
fields: {
|
|
24
|
+
userId: fields_1.userId,
|
|
25
|
+
anonymousId: fields_1.anonymousId,
|
|
26
|
+
url: { ...fields_1.url, required: true },
|
|
27
|
+
referrerUrl: fields_1.referrerUrl,
|
|
28
|
+
userAgent: fields_1.userAgent,
|
|
29
|
+
timestamp: fields_1.timestamp
|
|
30
|
+
},
|
|
31
|
+
perform: common_1.perform(convertEvent),
|
|
32
|
+
performBatch: common_1.performBatch(convertEvent)
|
|
33
|
+
};
|
|
34
|
+
exports.default = action;
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/saleswings/submitPageEvent/index.ts"],"names":[],"mappings":";;AAGA,gCAA8C;AAC9C,sCAAuF;AACvF,4CAAgE;AAChE,sCAAiD;AAEjD,MAAM,YAAY,GAAG,CAAC,OAAgB,EAAqB,EAAE;IAC3D,MAAM,QAAQ,GAAG,2BAAe,CAAC,OAAO,CAAC,CAAA;IACzC,IAAI,QAAQ,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,SAAS,CAAA;IAC1C,OAAO,IAAI,oBAAc,CAAC;QACxB,QAAQ;QACR,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,4BAAgB,CAAC,OAAO,CAAC,SAAS,CAAC;KAC/C,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,2GAA2G;IAC7G,mBAAmB,EAAE,eAAe;IACpC,MAAM,EAAE;QACN,MAAM,EAAN,eAAM;QACN,WAAW,EAAX,oBAAW;QACX,GAAG,EAAE,EAAE,GAAG,YAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC/B,WAAW,EAAX,oBAAW;QACX,SAAS,EAAT,kBAAS;QACT,SAAS,EAAT,kBAAS;KACV;IACD,OAAO,EAAE,gBAAO,CAAC,YAAY,CAAC;IAC9B,YAAY,EAAE,qBAAY,CAAC,YAAY,CAAC;CACzC,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
kind: string;
|
|
3
|
+
data: string;
|
|
4
|
+
userId?: string;
|
|
5
|
+
anonymousId?: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
referrerUrl?: string;
|
|
9
|
+
userAgent?: string;
|
|
10
|
+
timestamp?: string | number;
|
|
11
|
+
values?: {
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/saleswings/submitScreenEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_1 = require("../api");
|
|
4
|
+
const fields_1 = require("../fields");
|
|
5
|
+
const converter_1 = require("../converter");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const convertEvent = (payload) => {
|
|
8
|
+
const leadRefs = converter_1.convertLeadRefs(payload);
|
|
9
|
+
if (leadRefs.length == 0)
|
|
10
|
+
return undefined;
|
|
11
|
+
return new api_1.TrackingEvent({
|
|
12
|
+
leadRefs,
|
|
13
|
+
kind: payload.kind,
|
|
14
|
+
data: payload.data,
|
|
15
|
+
url: payload.url,
|
|
16
|
+
referrerUrl: payload.referrerUrl,
|
|
17
|
+
userAgent: payload.userAgent,
|
|
18
|
+
timestamp: converter_1.convertTimestamp(payload.timestamp),
|
|
19
|
+
values: converter_1.convertValues(payload.values)
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const action = {
|
|
23
|
+
title: 'Submit Screen Event',
|
|
24
|
+
description: 'Send your Segment Screen events to SalesWings to use them for tagging, scoring and prioritising your leads.',
|
|
25
|
+
defaultSubscription: 'type = "screen"',
|
|
26
|
+
fields: {
|
|
27
|
+
kind: fields_1.kind('Screen'),
|
|
28
|
+
data: fields_1.data({ '@path': '$.name' }),
|
|
29
|
+
userId: fields_1.userId,
|
|
30
|
+
anonymousId: fields_1.anonymousId,
|
|
31
|
+
email: fields_1.email,
|
|
32
|
+
url: fields_1.url,
|
|
33
|
+
referrerUrl: fields_1.referrerUrl,
|
|
34
|
+
userAgent: fields_1.userAgent,
|
|
35
|
+
timestamp: fields_1.timestamp,
|
|
36
|
+
values: fields_1.values({ '@path': '$.properties' })
|
|
37
|
+
},
|
|
38
|
+
perform: common_1.perform(convertEvent),
|
|
39
|
+
performBatch: common_1.performBatch(convertEvent)
|
|
40
|
+
};
|
|
41
|
+
exports.default = action;
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/saleswings/submitScreenEvent/index.ts"],"names":[],"mappings":";;AAGA,gCAA6C;AAC7C,sCAAkH;AAClH,4CAA+E;AAC/E,sCAAiD;AAEjD,MAAM,YAAY,GAAG,CAAC,OAAgB,EAAqB,EAAE;IAC3D,MAAM,QAAQ,GAAG,2BAAe,CAAC,OAAO,CAAC,CAAA;IACzC,IAAI,QAAQ,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,SAAS,CAAA;IAC1C,OAAO,IAAI,mBAAa,CAAC;QACvB,QAAQ;QACR,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,4BAAgB,CAAC,OAAO,CAAC,SAAS,CAAC;QAC9C,MAAM,EAAE,yBAAa,CAAC,OAAO,CAAC,MAAM,CAAC;KACtC,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,6GAA6G;IAC/G,mBAAmB,EAAE,iBAAiB;IACtC,MAAM,EAAE;QACN,IAAI,EAAE,aAAI,CAAC,QAAQ,CAAC;QACpB,IAAI,EAAE,aAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QACjC,MAAM,EAAN,eAAM;QACN,WAAW,EAAX,oBAAW;QACX,KAAK,EAAL,cAAK;QACL,GAAG,EAAH,YAAG;QACH,WAAW,EAAX,oBAAW;QACX,SAAS,EAAT,kBAAS;QACT,SAAS,EAAT,kBAAS;QACT,MAAM,EAAE,eAAM,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;KAC5C;IACD,OAAO,EAAE,gBAAO,CAAC,YAAY,CAAC;IAC9B,YAAY,EAAE,qBAAY,CAAC,YAAY,CAAC;CACzC,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
kind: string;
|
|
3
|
+
data: string;
|
|
4
|
+
userId?: string;
|
|
5
|
+
anonymousId?: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
referrerUrl?: string;
|
|
9
|
+
userAgent?: string;
|
|
10
|
+
timestamp?: string | number;
|
|
11
|
+
values?: {
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/saleswings/submitTrackEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_1 = require("../api");
|
|
4
|
+
const fields_1 = require("../fields");
|
|
5
|
+
const converter_1 = require("../converter");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const convertEvent = (payload) => {
|
|
8
|
+
const leadRefs = converter_1.convertLeadRefs(payload);
|
|
9
|
+
if (leadRefs.length == 0)
|
|
10
|
+
return undefined;
|
|
11
|
+
return new api_1.TrackingEvent({
|
|
12
|
+
leadRefs,
|
|
13
|
+
kind: payload.kind,
|
|
14
|
+
data: payload.data,
|
|
15
|
+
url: payload.url,
|
|
16
|
+
referrerUrl: payload.referrerUrl,
|
|
17
|
+
userAgent: payload.userAgent,
|
|
18
|
+
timestamp: converter_1.convertTimestamp(payload.timestamp),
|
|
19
|
+
values: converter_1.convertValues(payload.values)
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const action = {
|
|
23
|
+
title: 'Submit Track Event',
|
|
24
|
+
description: 'Send your Segment Track events to SalesWings to use them for tagging, scoring and prioritising your leads.',
|
|
25
|
+
defaultSubscription: 'type = "track"',
|
|
26
|
+
fields: {
|
|
27
|
+
kind: fields_1.kind('Track'),
|
|
28
|
+
data: fields_1.data({ '@path': '$.event' }),
|
|
29
|
+
userId: fields_1.userId,
|
|
30
|
+
anonymousId: fields_1.anonymousId,
|
|
31
|
+
email: fields_1.email,
|
|
32
|
+
url: fields_1.url,
|
|
33
|
+
referrerUrl: fields_1.referrerUrl,
|
|
34
|
+
userAgent: fields_1.userAgent,
|
|
35
|
+
timestamp: fields_1.timestamp,
|
|
36
|
+
values: fields_1.values({ '@path': '$.properties' })
|
|
37
|
+
},
|
|
38
|
+
perform: common_1.perform(convertEvent),
|
|
39
|
+
performBatch: common_1.performBatch(convertEvent)
|
|
40
|
+
};
|
|
41
|
+
exports.default = action;
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/saleswings/submitTrackEvent/index.ts"],"names":[],"mappings":";;AAGA,gCAA6C;AAC7C,sCAAkH;AAClH,4CAA+E;AAC/E,sCAAiD;AAEjD,MAAM,YAAY,GAAG,CAAC,OAAgB,EAAqB,EAAE;IAC3D,MAAM,QAAQ,GAAG,2BAAe,CAAC,OAAO,CAAC,CAAA;IACzC,IAAI,QAAQ,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,SAAS,CAAA;IAC1C,OAAO,IAAI,mBAAa,CAAC;QACvB,QAAQ;QACR,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,4BAAgB,CAAC,OAAO,CAAC,SAAS,CAAC;QAC9C,MAAM,EAAE,yBAAa,CAAC,OAAO,CAAC,MAAM,CAAC;KACtC,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,4GAA4G;IAC9G,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,IAAI,EAAE,aAAI,CAAC,OAAO,CAAC;QACnB,IAAI,EAAE,aAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;QAClC,MAAM,EAAN,eAAM;QACN,WAAW,EAAX,oBAAW;QACX,KAAK,EAAL,cAAK;QACL,GAAG,EAAH,YAAG;QACH,WAAW,EAAX,oBAAW;QACX,SAAS,EAAT,kBAAS;QACT,SAAS,EAAT,kBAAS;QACT,MAAM,EAAE,eAAM,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;KAC5C;IACD,OAAO,EAAE,gBAAO,CAAC,YAAY,CAAC;IAC9B,YAAY,EAAE,qBAAY,CAAC,YAAY,CAAC;CACzC,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SegmentEvent } from '@segment/actions-core';
|
|
2
|
+
export declare const settings: {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const testAction: (actionName: string, event: SegmentEvent) => Promise<any>;
|
|
6
|
+
export declare const testBatchAction: (actionName: string, events: SegmentEvent[]) => Promise<any>;
|
|
7
|
+
export declare const testActionWithSkippedEvent: (actionName: string, event: SegmentEvent) => Promise<void>;
|
|
8
|
+
export declare const testBatchActionSkippedEvents: (actionName: string, events: SegmentEvent[]) => Promise<void>;
|
|
9
|
+
export declare const expectedTs: (segmentEventTs: string | Date | undefined) => number;
|
|
10
|
+
export declare const userAgent = "\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.userAgent = exports.expectedTs = exports.testBatchActionSkippedEvents = exports.testActionWithSkippedEvent = exports.testBatchAction = exports.testAction = exports.settings = void 0;
|
|
7
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
8
|
+
const nock_1 = __importDefault(require("nock"));
|
|
9
|
+
const api_1 = require("./api");
|
|
10
|
+
const index_1 = __importDefault(require("./index"));
|
|
11
|
+
const testDestination = actions_core_1.createTestIntegration(index_1.default);
|
|
12
|
+
exports.settings = { apiKey: 'TEST_API_KEY' };
|
|
13
|
+
const testAction = async (actionName, event) => {
|
|
14
|
+
nock_1.default(api_1.apiBaseUrl).post('/events').reply(200, {});
|
|
15
|
+
const input = { event, settings: exports.settings, useDefaultMappings: true };
|
|
16
|
+
const responses = await testDestination.testAction(actionName, input);
|
|
17
|
+
expect(responses.length).toBe(1);
|
|
18
|
+
const request = responses[0].request;
|
|
19
|
+
expect(request.headers.get('Authorization')).toBe(`Bearer ${exports.settings.apiKey}`);
|
|
20
|
+
const rawBody = await request.text();
|
|
21
|
+
return JSON.parse(rawBody);
|
|
22
|
+
};
|
|
23
|
+
exports.testAction = testAction;
|
|
24
|
+
const testBatchAction = async (actionName, events) => {
|
|
25
|
+
nock_1.default(api_1.apiBaseUrl).post('/events/batches').reply(200, {});
|
|
26
|
+
const input = { events, settings: exports.settings, useDefaultMappings: true };
|
|
27
|
+
const responses = await testDestination.testBatchAction(actionName, input);
|
|
28
|
+
expect(responses.length).toBe(1);
|
|
29
|
+
const request = responses[0].request;
|
|
30
|
+
expect(request.headers.get('Authorization')).toBe(`Bearer ${exports.settings.apiKey}`);
|
|
31
|
+
const rawBody = await request.text();
|
|
32
|
+
return JSON.parse(rawBody);
|
|
33
|
+
};
|
|
34
|
+
exports.testBatchAction = testBatchAction;
|
|
35
|
+
const testActionWithSkippedEvent = async (actionName, event) => {
|
|
36
|
+
const responses = await testDestination.testAction(actionName, { event, settings: exports.settings, useDefaultMappings: true });
|
|
37
|
+
expect(responses.length).toBe(0);
|
|
38
|
+
};
|
|
39
|
+
exports.testActionWithSkippedEvent = testActionWithSkippedEvent;
|
|
40
|
+
const testBatchActionSkippedEvents = async (actionName, events) => {
|
|
41
|
+
const responses = await testDestination.testBatchAction(actionName, { events, settings: exports.settings, useDefaultMappings: true });
|
|
42
|
+
expect(responses.length).toBe(0);
|
|
43
|
+
};
|
|
44
|
+
exports.testBatchActionSkippedEvents = testBatchActionSkippedEvents;
|
|
45
|
+
const expectedTs = (segmentEventTs) => {
|
|
46
|
+
if (segmentEventTs === undefined)
|
|
47
|
+
throw new Error('Unexpected state: test event created without a timestamp');
|
|
48
|
+
else if (typeof segmentEventTs === 'string')
|
|
49
|
+
return Date.parse(segmentEventTs);
|
|
50
|
+
else
|
|
51
|
+
return segmentEventTs.valueOf();
|
|
52
|
+
};
|
|
53
|
+
exports.expectedTs = expectedTs;
|
|
54
|
+
exports.userAgent = '"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1';
|
|
55
|
+
//# sourceMappingURL=testing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../src/destinations/saleswings/testing.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA2E;AAC3E,gDAAuB;AACvB,+BAAkC;AAClC,oDAAiC;AAEjC,MAAM,eAAe,GAAG,oCAAqB,CAAC,eAAW,CAAC,CAAA;AAE7C,QAAA,QAAQ,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA;AAE3C,MAAM,UA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;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;;QACzE,OAAO,cAAc,CAAC,OAAO,EAAE,CAAA;AACtC,CAAC,CAAA;AAJY,QAAA,UAAU,cAItB;AAEY,QAAA,SAAS,GACpB,wIAAwI,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HTTPError, IntegrationError } from '@segment/actions-core';
|
|
2
|
+
export declare class SegmentPublicAPIError extends HTTPError {
|
|
3
|
+
response: Response & {
|
|
4
|
+
errors: {
|
|
5
|
+
type: string;
|
|
6
|
+
message?: string;
|
|
7
|
+
field?: string;
|
|
8
|
+
data?: string;
|
|
9
|
+
status?: number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare const MissingUserOrAnonymousIdThrowableError: IntegrationError;
|
|
14
|
+
export declare const InvalidEndpointSelectedThrowableError: IntegrationError;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvalidEndpointSelectedThrowableError = exports.MissingUserOrAnonymousIdThrowableError = exports.SegmentPublicAPIError = void 0;
|
|
4
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
+
class SegmentPublicAPIError extends actions_core_1.HTTPError {
|
|
6
|
+
}
|
|
7
|
+
exports.SegmentPublicAPIError = SegmentPublicAPIError;
|
|
8
|
+
exports.MissingUserOrAnonymousIdThrowableError = new actions_core_1.IntegrationError('Either `Anonymous ID` or `User ID` must be defined.', 'Missing Required Field', 400);
|
|
9
|
+
exports.InvalidEndpointSelectedThrowableError = new actions_core_1.IntegrationError('A valid endpoint must be selected. Please check your Segment settings.', 'Misconfigured Endpoint', 400);
|
|
10
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/destinations/segment-profiles/errors.ts"],"names":[],"mappings":";;;AAAA,wDAAmE;AAEnE,MAAa,qBAAsB,SAAQ,wBAAS;CAUnD;AAVD,sDAUC;AAEY,QAAA,sCAAsC,GAAG,IAAI,+BAAgB,CACxE,qDAAqD,EACrD,wBAAwB,EACxB,GAAG,CACJ,CAAA;AAEY,QAAA,qCAAqC,GAAG,IAAI,+BAAgB,CACvE,wEAAwE,EACxE,wBAAwB,EACxB,GAAG,CACJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/segment-profiles/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RequestClient, DynamicFieldResponse } from '@segment/actions-core';
|
|
2
|
+
interface GetEngageSpaceParams {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
bearerToken: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function getEngageSpaces(request: RequestClient, data: GetEngageSpaceParams): Promise<DynamicFieldResponse>;
|
|
7
|
+
export declare function generateSegmentAPIAuthHeaders(writeKey: string): string;
|
|
8
|
+
export {};
|