@segment/action-destinations 3.339.0-staging.0 → 3.340.1-staging.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js +6 -2
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js.map +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/preCheck.js +7 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/preCheck.js.map +1 -1
- package/dist/destinations/aggregations-io/generated-types.d.ts +4 -0
- package/dist/destinations/aggregations-io/generated-types.js +3 -0
- package/dist/destinations/aggregations-io/generated-types.js.map +1 -0
- package/dist/destinations/aggregations-io/index.d.ts +4 -0
- package/dist/destinations/aggregations-io/index.js +48 -0
- package/dist/destinations/aggregations-io/index.js.map +1 -0
- package/dist/destinations/aggregations-io/send/generated-types.d.ts +7 -0
- package/dist/destinations/aggregations-io/send/generated-types.js +3 -0
- package/dist/destinations/aggregations-io/send/generated-types.js.map +1 -0
- package/dist/destinations/aggregations-io/send/index.d.ts +5 -0
- package/dist/destinations/aggregations-io/send/index.js +44 -0
- package/dist/destinations/aggregations-io/send/index.js.map +1 -0
- package/dist/destinations/airship/registerAndAssociate/generated-types.d.ts +3 -0
- package/dist/destinations/airship/registerAndAssociate/index.js +35 -7
- package/dist/destinations/airship/registerAndAssociate/index.js.map +1 -1
- package/dist/destinations/airship/utilities.d.ts +3 -1
- package/dist/destinations/airship/utilities.js +76 -41
- package/dist/destinations/airship/utilities.js.map +1 -1
- package/dist/destinations/algolia-insights/conversionEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/conversionEvents/index.js +2 -2
- package/dist/destinations/algolia-insights/conversionEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productAddedEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/productAddedEvents/index.js +2 -2
- package/dist/destinations/algolia-insights/productAddedEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productClickedEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/productClickedEvents/index.js +2 -2
- package/dist/destinations/algolia-insights/productClickedEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productListFilteredEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/productListFilteredEvents/index.js +2 -2
- package/dist/destinations/algolia-insights/productListFilteredEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productViewedEvents/generated-types.d.ts +2 -2
- package/dist/destinations/algolia-insights/productViewedEvents/index.js +2 -2
- package/dist/destinations/algolia-insights/productViewedEvents/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/braze/index.js.map +1 -1
- package/dist/destinations/braze/trackEvent/generated-types.d.ts +0 -1
- package/dist/destinations/braze/trackEvent/index.js +0 -8
- package/dist/destinations/braze/trackEvent/index.js.map +1 -1
- package/dist/destinations/braze/trackPurchase/generated-types.d.ts +0 -1
- package/dist/destinations/braze/trackPurchase/index.js +0 -8
- package/dist/destinations/braze/trackPurchase/index.js.map +1 -1
- package/dist/destinations/braze/utils.js +11 -15
- package/dist/destinations/braze/utils.js.map +1 -1
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js +5 -5
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js.map +1 -1
- package/dist/destinations/criteo-audiences/criteo-audiences.js +10 -4
- package/dist/destinations/criteo-audiences/criteo-audiences.js.map +1 -1
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js +5 -5
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js.map +1 -1
- package/dist/destinations/devrev/createRevUser/index.js +9 -6
- package/dist/destinations/devrev/createRevUser/index.js.map +1 -1
- package/dist/destinations/devrev/utils/types.d.ts +9 -0
- package/dist/destinations/display-video-360/properties.js +4 -4
- package/dist/destinations/display-video-360/properties.js.map +1 -1
- package/dist/destinations/display-video-360/proto/protofile.d.ts +1 -0
- package/dist/destinations/display-video-360/proto/protofile.js +1 -0
- package/dist/destinations/display-video-360/proto/protofile.js.map +1 -1
- package/dist/destinations/display-video-360/shared.js +1 -0
- package/dist/destinations/display-video-360/shared.js.map +1 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +0 -2
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +0 -3
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -1
- package/dist/destinations/engage/utils/EngageStats.js +0 -4
- package/dist/destinations/engage/utils/EngageStats.js.map +1 -1
- package/dist/destinations/equals/generated-types.d.ts +3 -0
- package/dist/destinations/equals/generated-types.js +3 -0
- package/dist/destinations/equals/generated-types.js.map +1 -0
- package/dist/destinations/equals/index.d.ts +4 -0
- package/dist/destinations/equals/index.js +38 -0
- package/dist/destinations/equals/index.js.map +1 -0
- package/dist/destinations/equals/send/generated-types.d.ts +5 -0
- package/dist/destinations/equals/send/generated-types.js +3 -0
- package/dist/destinations/equals/send/generated-types.js.map +1 -0
- package/dist/destinations/equals/send/index.d.ts +5 -0
- package/dist/destinations/equals/send/index.js +38 -0
- package/dist/destinations/equals/send/index.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +3 -3
- package/dist/destinations/google-enhanced-conversions/functions.js +6 -5
- package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +2 -2
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +2 -2
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +2 -2
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +0 -27
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
- package/dist/destinations/hubspot/utils.d.ts +0 -10
- package/dist/destinations/index.js +3 -1
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/kevel/generated-types.d.ts +4 -0
- package/dist/destinations/kevel/generated-types.js +3 -0
- package/dist/destinations/kevel/generated-types.js.map +1 -0
- package/dist/destinations/kevel/index.d.ts +4 -0
- package/dist/destinations/kevel/index.js +45 -0
- package/dist/destinations/kevel/index.js.map +1 -0
- package/dist/destinations/kevel/syncAudience/generated-types.d.ts +8 -0
- package/dist/destinations/kevel/syncAudience/generated-types.js +3 -0
- package/dist/destinations/kevel/syncAudience/generated-types.js.map +1 -0
- package/dist/destinations/kevel/syncAudience/index.d.ts +5 -0
- package/dist/destinations/kevel/syncAudience/index.js +64 -0
- package/dist/destinations/kevel/syncAudience/index.js.map +1 -0
- package/dist/destinations/kevel/syncTraits/generated-types.d.ts +6 -0
- package/dist/destinations/kevel/syncTraits/generated-types.js +3 -0
- package/dist/destinations/kevel/syncTraits/generated-types.js.map +1 -0
- package/dist/destinations/kevel/syncTraits/index.d.ts +5 -0
- package/dist/destinations/kevel/syncTraits/index.js +39 -0
- package/dist/destinations/kevel/syncTraits/index.js.map +1 -0
- package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/addToList/index.js +2 -2
- package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/functions.js +7 -7
- package/dist/destinations/marketo-static-lists/functions.js.map +1 -1
- package/dist/destinations/marketo-static-lists/removeFromList/index.js +2 -2
- package/dist/destinations/marketo-static-lists/removeFromList/index.js.map +1 -1
- package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.d.ts +1 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.js +129 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/index.test.js.map +1 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.d.ts +1 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.js +69 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/snapshot.test.js.map +1 -0
- package/dist/destinations/mixpanel/incrementProperties/generated-types.d.ts +8 -0
- package/dist/destinations/mixpanel/incrementProperties/generated-types.js +3 -0
- package/dist/destinations/mixpanel/incrementProperties/generated-types.js.map +1 -0
- package/dist/destinations/mixpanel/incrementProperties/index.d.ts +5 -0
- package/dist/destinations/mixpanel/incrementProperties/index.js +84 -0
- package/dist/destinations/mixpanel/incrementProperties/index.js.map +1 -0
- package/dist/destinations/mixpanel/index.js +3 -1
- package/dist/destinations/mixpanel/index.js.map +1 -1
- package/dist/destinations/mixpanel/mixpanel-types.d.ts +4 -0
- package/dist/destinations/mixpanel/utils.d.ts +13 -0
- package/dist/destinations/mixpanel/utils.js +117 -0
- package/dist/destinations/mixpanel/utils.js.map +1 -0
- package/dist/destinations/moengage/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/moengage/trackEvent/index.js +10 -2
- package/dist/destinations/moengage/trackEvent/index.js.map +1 -1
- package/dist/destinations/segment/generated-types.d.ts +0 -1
- package/dist/destinations/segment/index.js +3 -13
- package/dist/destinations/segment/index.js.map +1 -1
- package/dist/destinations/segment/properties.d.ts +1 -1
- package/dist/destinations/segment/properties.js +3 -3
- package/dist/destinations/segment/properties.js.map +1 -1
- package/dist/destinations/segment/sendGroup/index.js +5 -16
- package/dist/destinations/segment/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment/sendIdentify/index.js +5 -16
- package/dist/destinations/segment/sendIdentify/index.js.map +1 -1
- package/dist/destinations/segment/sendPage/index.js +5 -16
- package/dist/destinations/segment/sendPage/index.js.map +1 -1
- package/dist/destinations/segment/sendScreen/index.js +5 -16
- package/dist/destinations/segment/sendScreen/index.js.map +1 -1
- package/dist/destinations/segment/sendTrack/index.js +5 -16
- package/dist/destinations/segment/sendTrack/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendTrack/generated-types.d.ts +10 -0
- package/dist/destinations/segment-profiles/sendTrack/generated-types.js +3 -0
- package/dist/destinations/segment-profiles/sendTrack/generated-types.js.map +1 -0
- package/dist/destinations/segment-profiles/sendTrack/index.d.ts +5 -0
- package/dist/destinations/segment-profiles/sendTrack/index.js +36 -0
- package/dist/destinations/segment-profiles/sendTrack/index.js.map +1 -0
- package/dist/destinations/tiktok-conversions/index.js +3 -92
- package/dist/destinations/tiktok-conversions/index.js.map +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -3
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +24 -33
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/generated-types.d.ts +4 -12
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js +40 -113
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/index.js +48 -199
- package/dist/destinations/tiktok-offline-conversions/index.js.map +1 -1
- package/dist/destinations/webhook-audiences/index.js +1 -3
- package/dist/destinations/webhook-audiences/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/index.js +9 -1
- package/dist/destinations/yahoo-audiences/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/updateSegment/generated-types.d.ts +6 -2
- package/dist/destinations/yahoo-audiences/updateSegment/index.js +36 -11
- package/dist/destinations/yahoo-audiences/updateSegment/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/utils-rt.js +3 -3
- package/dist/destinations/yahoo-audiences/utils-rt.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/destinations/segment/properties.ts"],"names":[],"mappings":";;;AAMa,QAAA,iBAAiB,GAAuC;IACnE,
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/destinations/segment/properties.ts"],"names":[],"mappings":";;;AAMa,QAAA,iBAAiB,GAAuC;IACnE,WAAW,EAAE;QACX,KAAK,EAAE,eAAe;QACtB,GAAG,EAAE,2BAA2B;QAChC,GAAG,EAAE,4BAA4B;KAClC;IACD,WAAW,EAAE;QACX,KAAK,EAAE,QAAQ;QACf,GAAG,EAAE,uCAAuC;QAC5C,GAAG,EAAE,4BAA4B;KAClC;CACF,CAAA;AAEY,QAAA,wBAAwB,GAAG,WAAW,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const segment_properties_1 = require("../segment-properties");
|
|
4
|
-
const properties_1 = require("../properties");
|
|
5
4
|
const errors_1 = require("../errors");
|
|
6
5
|
const action = {
|
|
7
6
|
title: 'Send Group',
|
|
@@ -26,7 +25,7 @@ const action = {
|
|
|
26
25
|
timezone: segment_properties_1.timezone,
|
|
27
26
|
traits: segment_properties_1.traits
|
|
28
27
|
},
|
|
29
|
-
perform: (
|
|
28
|
+
perform: (_request, { payload, statsContext }) => {
|
|
30
29
|
if (!payload.anonymous_id && !payload.user_id) {
|
|
31
30
|
throw errors_1.MissingUserOrAnonymousIdThrowableError;
|
|
32
31
|
}
|
|
@@ -51,21 +50,11 @@ const action = {
|
|
|
51
50
|
},
|
|
52
51
|
traits: {
|
|
53
52
|
...payload?.traits
|
|
54
|
-
}
|
|
53
|
+
},
|
|
54
|
+
type: 'group'
|
|
55
55
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
if (features && features['actions-segment-tapi-internal-enabled']) {
|
|
60
|
-
statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendGroup']);
|
|
61
|
-
const payload = { ...groupPayload, type: 'group' };
|
|
62
|
-
return { batch: [payload] };
|
|
63
|
-
}
|
|
64
|
-
const selectedSegmentEndpoint = properties_1.SEGMENT_ENDPOINTS[settings.endpoint].url;
|
|
65
|
-
return request(`${selectedSegmentEndpoint}/group`, {
|
|
66
|
-
method: 'POST',
|
|
67
|
-
json: groupPayload
|
|
68
|
-
});
|
|
56
|
+
statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendGroup']);
|
|
57
|
+
return { batch: [groupPayload] };
|
|
69
58
|
}
|
|
70
59
|
};
|
|
71
60
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendGroup/index.ts"],"names":[],"mappings":";;AAGA,8DAkB8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendGroup/index.ts"],"names":[],"mappings":";;AAGA,8DAkB8B;AAC9B,sCAAkE;AAElE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,wGAAwG;IACrH,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,QAAQ,EAAE,EAAE,GAAG,6BAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACzC,SAAS,EAAT,8BAAS;QACT,WAAW,EAAX,gCAAW;QACX,mBAAmB,EAAnB,wCAAmB;QACnB,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,QAAQ,EAAR,6BAAQ;QACR,OAAO,EAAP,4BAAO;QACP,gBAAgB,EAAhB,qCAAgB;QAChB,IAAI,EAAJ,yBAAI;QACJ,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,QAAQ,EAAR,6BAAQ;QACR,MAAM,EAAN,2BAAM;KACP;IACD,OAAO,EAAE,CAAC,QAAQ,EAAE,E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segment_properties_1 = require("../segment-properties");
|
|
4
|
-
const properties_1 = require("../properties");
|
|
5
4
|
const errors_1 = require("../errors");
|
|
6
5
|
const action = {
|
|
7
6
|
title: 'Send Identify',
|
|
@@ -26,7 +25,7 @@ const action = {
|
|
|
26
25
|
group_id: segment_properties_1.group_id,
|
|
27
26
|
traits: segment_properties_1.traits
|
|
28
27
|
},
|
|
29
|
-
perform: (
|
|
28
|
+
perform: (_request, { payload, statsContext }) => {
|
|
30
29
|
if (!payload.anonymous_id && !payload.user_id) {
|
|
31
30
|
throw errors_1.MissingUserOrAnonymousIdThrowableError;
|
|
32
31
|
}
|
|
@@ -51,21 +50,11 @@ const action = {
|
|
|
51
50
|
},
|
|
52
51
|
traits: {
|
|
53
52
|
...payload?.traits
|
|
54
|
-
}
|
|
53
|
+
},
|
|
54
|
+
type: 'identify'
|
|
55
55
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
if (features && features['actions-segment-tapi-internal-enabled']) {
|
|
60
|
-
statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendIdentify']);
|
|
61
|
-
const payload = { ...identifyPayload, type: 'identify' };
|
|
62
|
-
return { batch: [payload] };
|
|
63
|
-
}
|
|
64
|
-
const selectedSegmentEndpoint = properties_1.SEGMENT_ENDPOINTS[settings.endpoint].url;
|
|
65
|
-
return request(`${selectedSegmentEndpoint}/identify`, {
|
|
66
|
-
method: 'POST',
|
|
67
|
-
json: identifyPayload
|
|
68
|
-
});
|
|
56
|
+
statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendIdentify']);
|
|
57
|
+
return { batch: [identifyPayload] };
|
|
69
58
|
}
|
|
70
59
|
};
|
|
71
60
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendIdentify/index.ts"],"names":[],"mappings":";;AAGA,8DAkB8B;AAC9B,
|
|
1
|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AAQ;gBAC3B,OAAO,EAAE,OAAO,EAAE,OAAO;gBACzB,EAAE,EAAE,OAAO,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,OAAO,EAAE,IAAI;gBACnB,MAAM,EAAE,OAAO,EAAE,MAAM;gBACvB,SAAS,EAAE,OAAO,EAAE,UAAU;gBAC9B,QAAQ,EAAE,OAAO,EAAE,QAAQ;gBAC3B,OAAO,EAAE,OAAO,EAAE,QAAQ;aAC3B;YACD,MAAM,EAAE;gBACN,GAAG,OAAO,EAAE,MAAM;aACnB;YACD,IAAI,EAAE,UAAU;SACjB,CAAA;QAED,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAA;QAClG,OAAO,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE,CAAA;IACrC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const segment_properties_1 = require("../segment-properties");
|
|
4
|
-
const properties_1 = require("../properties");
|
|
5
4
|
const errors_1 = require("../errors");
|
|
6
5
|
const action = {
|
|
7
6
|
title: 'Send Page',
|
|
@@ -28,7 +27,7 @@ const action = {
|
|
|
28
27
|
group_id: segment_properties_1.group_id,
|
|
29
28
|
properties: segment_properties_1.properties
|
|
30
29
|
},
|
|
31
|
-
perform: (
|
|
30
|
+
perform: (_request, { payload, statsContext }) => {
|
|
32
31
|
if (!payload.anonymous_id && !payload.user_id) {
|
|
33
32
|
throw errors_1.MissingUserOrAnonymousIdThrowableError;
|
|
34
33
|
}
|
|
@@ -61,21 +60,11 @@ const action = {
|
|
|
61
60
|
title: payload?.page?.title,
|
|
62
61
|
url: payload?.page?.url,
|
|
63
62
|
...payload?.properties
|
|
64
|
-
}
|
|
63
|
+
},
|
|
64
|
+
type: 'page'
|
|
65
65
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
if (features && features['actions-segment-tapi-internal-enabled']) {
|
|
70
|
-
statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendPage']);
|
|
71
|
-
const payload = { ...pagePayload, type: 'page' };
|
|
72
|
-
return { batch: [payload] };
|
|
73
|
-
}
|
|
74
|
-
const selectedSegmentEndpoint = properties_1.SEGMENT_ENDPOINTS[settings.endpoint].url;
|
|
75
|
-
return request(`${selectedSegmentEndpoint}/page`, {
|
|
76
|
-
method: 'POST',
|
|
77
|
-
json: pagePayload
|
|
78
|
-
});
|
|
66
|
+
statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendPage']);
|
|
67
|
+
return { batch: [pagePayload] };
|
|
79
68
|
}
|
|
80
69
|
};
|
|
81
70
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendPage/index.ts"],"names":[],"mappings":";;AAGA,8DAoB8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendPage/index.ts"],"names":[],"mappings":";;AAGA,8DAoB8B;AAC9B,sCAAkE;AAElE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,uFAAuF;IACpG,mBAAmB,EAAE,eAAe;IACpC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,SAAS,EAAT,8BAAS;QACT,SAAS,EAAT,8BAAS;QACT,aAAa,EAAb,kCAAa;QACb,WAAW,EAAX,gCAAW;QACX,mBAAmB,EAAnB,wCAAmB;QACnB,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,QAAQ,EAAR,6BAAQ;QACR,OAAO,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AQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ;gBACjC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM;gBAC7B,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK;gBAC3B,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG;gBACvB,GAAG,OAAO,EAAE,UAAU;aACvB;YACD,IAAI,EAAE,MAAM;SACb,CAAA;QAED,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAA;QAC9F,OAAO,EAAE,KAAK,EAAE,CAAC,WAAW,CAAC,EAAE,CAAA;IACjC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const segment_properties_1 = require("../segment-properties");
|
|
4
|
-
const properties_1 = require("../properties");
|
|
5
4
|
const errors_1 = require("../errors");
|
|
6
5
|
const action = {
|
|
7
6
|
title: 'Send Screen',
|
|
@@ -27,7 +26,7 @@ const action = {
|
|
|
27
26
|
group_id: segment_properties_1.group_id,
|
|
28
27
|
properties: segment_properties_1.properties
|
|
29
28
|
},
|
|
30
|
-
perform: (
|
|
29
|
+
perform: (_request, { payload, statsContext }) => {
|
|
31
30
|
if (!payload.anonymous_id && !payload.user_id) {
|
|
32
31
|
throw errors_1.MissingUserOrAnonymousIdThrowableError;
|
|
33
32
|
}
|
|
@@ -53,21 +52,11 @@ const action = {
|
|
|
53
52
|
properties: {
|
|
54
53
|
name: payload?.screen_name,
|
|
55
54
|
...payload?.properties
|
|
56
|
-
}
|
|
55
|
+
},
|
|
56
|
+
type: 'screen'
|
|
57
57
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
if (features && features['actions-segment-tapi-internal-enabled']) {
|
|
62
|
-
statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendScreen']);
|
|
63
|
-
const payload = { ...screenPayload, type: 'screen' };
|
|
64
|
-
return { batch: [payload] };
|
|
65
|
-
}
|
|
66
|
-
const selectedSegmentEndpoint = properties_1.SEGMENT_ENDPOINTS[settings.endpoint].url;
|
|
67
|
-
return request(`${selectedSegmentEndpoint}/screen`, {
|
|
68
|
-
method: 'POST',
|
|
69
|
-
json: screenPayload
|
|
70
|
-
});
|
|
58
|
+
statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendScreen']);
|
|
59
|
+
return { batch: [screenPayload] };
|
|
71
60
|
}
|
|
72
61
|
};
|
|
73
62
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendScreen/index.ts"],"names":[],"mappings":";;AAGA,8DAmB8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendScreen/index.ts"],"names":[],"mappings":";;AAGA,8DAmB8B;AAC9B,sCAAkE;AAElE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,8FAA8F;IAC3G,mBAAmB,EAAE,iBAAiB;IACtC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,SAAS,EAAT,8BAAS;QACT,WAAW,EAAX,gCAAW;QACX,WAAW,EAAX,gCAAW;QACX,mBAAmB,EAAnB,wCAAmB;QACnB,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,QAAQ,EAAR,6BAAQ;QACR,OAAO,EAAP,4BAAO;QACP,gBAAgB,EAAhB,qCAAgB;QAChB,IAAI,EAAJ,yBAAI;QACJ,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,QAAQ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C,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const segment_properties_1 = require("../segment-properties");
|
|
4
|
-
const properties_1 = require("../properties");
|
|
5
4
|
const errors_1 = require("../errors");
|
|
6
5
|
const action = {
|
|
7
6
|
title: 'Send Track',
|
|
@@ -28,7 +27,7 @@ const action = {
|
|
|
28
27
|
properties: segment_properties_1.properties,
|
|
29
28
|
traits: segment_properties_1.traits
|
|
30
29
|
},
|
|
31
|
-
perform: (
|
|
30
|
+
perform: (_request, { payload, statsContext }) => {
|
|
32
31
|
if (!payload.anonymous_id && !payload.user_id) {
|
|
33
32
|
throw errors_1.MissingUserOrAnonymousIdThrowableError;
|
|
34
33
|
}
|
|
@@ -57,21 +56,11 @@ const action = {
|
|
|
57
56
|
},
|
|
58
57
|
properties: {
|
|
59
58
|
...payload?.properties
|
|
60
|
-
}
|
|
59
|
+
},
|
|
60
|
+
type: 'track'
|
|
61
61
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
if (features && features['actions-segment-tapi-internal-enabled']) {
|
|
66
|
-
statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendTrack']);
|
|
67
|
-
const payload = { ...trackPayload, type: 'track' };
|
|
68
|
-
return { batch: [payload] };
|
|
69
|
-
}
|
|
70
|
-
const selectedSegmentEndpoint = properties_1.SEGMENT_ENDPOINTS[settings.endpoint].url;
|
|
71
|
-
return request(`${selectedSegmentEndpoint}/track`, {
|
|
72
|
-
method: 'POST',
|
|
73
|
-
json: trackPayload
|
|
74
|
-
});
|
|
62
|
+
statsContext?.statsClient?.incr('tapi_internal', 1, [...statsContext.tags, 'action:sendTrack']);
|
|
63
|
+
return { batch: [trackPayload] };
|
|
75
64
|
}
|
|
76
65
|
};
|
|
77
66
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendTrack/index.ts"],"names":[],"mappings":";;AAGA,8DAoB8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendTrack/index.ts"],"names":[],"mappings":";;AAGA,8DAoB8B;AAC9B,sCAAkE;AAElE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,iGAAiG;IAC9G,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,SAAS,EAAT,8BAAS;QACT,UAAU,EAAV,+BAAU;QACV,WAAW,EAAX,gCAAW;QACX,mBAAmB,EAAnB,wCAAmB;QACnB,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,QAAQ,EAAR,6BAAQ;QACR,OAAO,EAAP,4BAAO;QACP,gBAAgB,EAAhB,qCAAgB;QAChB,IAAI,EAAJ,yBAAI;QACJ,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,QAAQ,EAAR,6BAAQ;QACR,QAAQ,EAAR,6BAAQ;QACR,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;KACP;IACD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QAC/C,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YAC7C,MAAM,+CAAsC,CAAA;SAC7C;QAED,MAAM,YAAY,GAAW;YAC3B,MAAM,EAAE,OAAO,EAAE,OAAO;YACxB,WAAW,EAAE,OAAO,EAAE,YAAY;YAClC,SAAS,EAAE,OAAO,EAAE,SAAS;YAC7B,KAAK,EAAE,OAAO,EAAE,UAAU;YAC1B,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,GAAG,OAAO,EAAE,MAAM;iBACnB;gBACD,GAAG,EAAE,OAAO,EAAE,WAAW;gBACzB,QAAQ,EAAE,OAAO,EAAE,mBAAmB;gBACtC,MAAM,EAAE,OAAO,EAAE,MAAM;gBACvB,EAAE,EAAE,OAAO,EAAE,UAAU;gBACvB,MAAM,EAAE,OAAO,EAAE,MAAM;gBACvB,QAAQ,EAAE,OAAO,EAAE,QAAQ;gBAC3B,OAAO,EAAE,OAAO,EAAE,OAAO;gBACzB,EAAE,EAAE,OAAO,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,OAAO,EAAE,IAAI;gBACnB,MAAM,EAAE,OAAO,EAAE,MAAM;gBACvB,SAAS,EAAE,OAAO,EAAE,UAAU;gBAC9B,QAAQ,EAAE,OAAO,EAAE,QAAQ;gBAC3B,OAAO,EAAE,OAAO,EAAE,QAAQ;aAC3B;YACD,UAAU,EAAE;gBACV,GAAG,OAAO,EAAE,UAAU;aACvB;YACD,IAAI,EAAE,OAAO;SACd,CAAA;QAED,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAA;QAC/F,OAAO,EAAE,KAAK,EAAE,CAAC,YAAY,CAAC,EAAE,CAAA;IAClC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/segment-profiles/sendTrack/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const segment_properties_1 = require("../segment-properties");
|
|
4
|
+
const errors_1 = require("../errors");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Send Track',
|
|
7
|
+
description: '',
|
|
8
|
+
fields: {
|
|
9
|
+
user_id: segment_properties_1.user_id,
|
|
10
|
+
anonymous_id: segment_properties_1.anonymous_id,
|
|
11
|
+
timestamp: segment_properties_1.timestamp,
|
|
12
|
+
event_name: segment_properties_1.event_name,
|
|
13
|
+
group_id: segment_properties_1.group_id,
|
|
14
|
+
properties: segment_properties_1.properties
|
|
15
|
+
},
|
|
16
|
+
perform: (_, { payload }) => {
|
|
17
|
+
if (!payload.anonymous_id && !payload.user_id) {
|
|
18
|
+
throw errors_1.MissingUserOrAnonymousIdThrowableError;
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
batch: [
|
|
22
|
+
{
|
|
23
|
+
userId: payload?.user_id,
|
|
24
|
+
anonymousId: payload?.anonymous_id,
|
|
25
|
+
timestamp: payload?.timestamp,
|
|
26
|
+
event: payload?.event_name,
|
|
27
|
+
properties: {
|
|
28
|
+
...payload?.properties
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.default = action;
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment-profiles/sendTrack/index.ts"],"names":[],"mappings":";;AAGA,8DAA0G;AAC1G,sCAAkE;AAElE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,SAAS,EAAT,8BAAS;QACT,UAAU,EAAV,+BAAU;QACV,QAAQ,EAAR,6BAAQ;QACR,UAAU,EAAV,+BAAU;KACX;IACD,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1B,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YAC7C,MAAM,+CAAsC,CAAA;SAC7C;QAED,OAAO;YACL,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,OAAO,EAAE,OAAO;oBACxB,WAAW,EAAE,OAAO,EAAE,YAAY;oBAClC,SAAS,EAAE,OAAO,EAAE,SAAS;oBAC7B,KAAK,EAAE,OAAO,EAAE,UAAU;oBAC1B,UAAU,EAAE;wBACV,GAAG,OAAO,EAAE,UAAU;qBACvB;iBACF;aACF;SACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -12,17 +12,11 @@ const productProperties = {
|
|
|
12
12
|
quantity: {
|
|
13
13
|
'@path': '$.quantity'
|
|
14
14
|
},
|
|
15
|
-
|
|
15
|
+
content_type: {
|
|
16
16
|
'@path': '$.category'
|
|
17
17
|
},
|
|
18
18
|
content_id: {
|
|
19
19
|
'@path': '$.product_id'
|
|
20
|
-
},
|
|
21
|
-
content_name: {
|
|
22
|
-
'@path': '$.name'
|
|
23
|
-
},
|
|
24
|
-
brand: {
|
|
25
|
-
'@path': '$.brand'
|
|
26
20
|
}
|
|
27
21
|
};
|
|
28
22
|
const singleProductContents = {
|
|
@@ -48,19 +42,9 @@ const multiProductContents = {
|
|
|
48
42
|
}
|
|
49
43
|
};
|
|
50
44
|
const presets = [
|
|
51
|
-
{
|
|
52
|
-
name: 'Page View',
|
|
53
|
-
subscribe: 'type="page"',
|
|
54
|
-
partnerAction: 'reportWebEvent',
|
|
55
|
-
mapping: {
|
|
56
|
-
...multiProductContents,
|
|
57
|
-
event: 'PageView'
|
|
58
|
-
},
|
|
59
|
-
type: 'automatic'
|
|
60
|
-
},
|
|
61
45
|
{
|
|
62
46
|
name: 'View Content',
|
|
63
|
-
subscribe: '
|
|
47
|
+
subscribe: 'type="page"',
|
|
64
48
|
partnerAction: 'reportWebEvent',
|
|
65
49
|
mapping: {
|
|
66
50
|
...singleProductContents,
|
|
@@ -68,16 +52,6 @@ const presets = [
|
|
|
68
52
|
},
|
|
69
53
|
type: 'automatic'
|
|
70
54
|
},
|
|
71
|
-
{
|
|
72
|
-
name: 'Click Button',
|
|
73
|
-
subscribe: 'event = "Product Clicked"',
|
|
74
|
-
partnerAction: 'reportWebEvent',
|
|
75
|
-
mapping: {
|
|
76
|
-
...singleProductContents,
|
|
77
|
-
event: 'ClickButton'
|
|
78
|
-
},
|
|
79
|
-
type: 'automatic'
|
|
80
|
-
},
|
|
81
55
|
{
|
|
82
56
|
name: 'Search',
|
|
83
57
|
subscribe: 'event = "Products Searched"',
|
|
@@ -137,66 +111,6 @@ const presets = [
|
|
|
137
111
|
event: 'PlaceAnOrder'
|
|
138
112
|
},
|
|
139
113
|
type: 'automatic'
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
name: 'Complete Payment',
|
|
143
|
-
subscribe: 'event = "Payment Completed"',
|
|
144
|
-
partnerAction: 'reportWebEvent',
|
|
145
|
-
mapping: {
|
|
146
|
-
...multiProductContents,
|
|
147
|
-
event: 'CompletePayment'
|
|
148
|
-
},
|
|
149
|
-
type: 'automatic'
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
name: 'Contact',
|
|
153
|
-
subscribe: 'event = "Callback Started"',
|
|
154
|
-
partnerAction: 'reportWebEvent',
|
|
155
|
-
mapping: {
|
|
156
|
-
...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
|
|
157
|
-
event: 'Contact'
|
|
158
|
-
},
|
|
159
|
-
type: 'automatic'
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
name: 'Download',
|
|
163
|
-
subscribe: 'event = "Download Link Clicked"',
|
|
164
|
-
partnerAction: 'reportWebEvent',
|
|
165
|
-
mapping: {
|
|
166
|
-
...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
|
|
167
|
-
event: 'Download'
|
|
168
|
-
},
|
|
169
|
-
type: 'automatic'
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
name: 'Submit Form',
|
|
173
|
-
subscribe: 'event = "Form Submitted"',
|
|
174
|
-
partnerAction: 'reportWebEvent',
|
|
175
|
-
mapping: {
|
|
176
|
-
...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
|
|
177
|
-
event: 'SubmitForm'
|
|
178
|
-
},
|
|
179
|
-
type: 'automatic'
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
name: 'Complete Registration',
|
|
183
|
-
subscribe: 'event = "Signed Up"',
|
|
184
|
-
partnerAction: 'reportWebEvent',
|
|
185
|
-
mapping: {
|
|
186
|
-
...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
|
|
187
|
-
event: 'CompleteRegistration'
|
|
188
|
-
},
|
|
189
|
-
type: 'automatic'
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
name: 'Subscribe',
|
|
193
|
-
subscribe: 'event = "Subscription Created"',
|
|
194
|
-
partnerAction: 'reportWebEvent',
|
|
195
|
-
mapping: {
|
|
196
|
-
...actions_core_1.defaultValues(reportWebEvent_1.default.fields),
|
|
197
|
-
event: 'Subscribe'
|
|
198
|
-
},
|
|
199
|
-
type: 'automatic'
|
|
200
114
|
}
|
|
201
115
|
];
|
|
202
116
|
const destination = {
|
|
@@ -233,10 +147,7 @@ const destination = {
|
|
|
233
147
|
},
|
|
234
148
|
extendRequest({ settings }) {
|
|
235
149
|
return {
|
|
236
|
-
headers: {
|
|
237
|
-
'Access-Token': settings.accessToken,
|
|
238
|
-
'Content-Type': 'application/json'
|
|
239
|
-
}
|
|
150
|
+
headers: { 'Access-Token': settings.accessToken }
|
|
240
151
|
};
|
|
241
152
|
},
|
|
242
153
|
presets,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-conversions/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AAGrD,sEAA6C;AAE7C,MAAM,iBAAiB,GAAG;IACxB,KAAK,EAAE;QACL,OAAO,EAAE,SAAS;KACnB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY;KACtB;IACD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/tiktok-conversions/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AAGrD,sEAA6C;AAE7C,MAAM,iBAAiB,GAAG;IACxB,KAAK,EAAE;QACL,OAAO,EAAE,SAAS;KACnB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY;KACtB;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,YAAY;KACtB;IACD,UAAU,EAAE;QACV,OAAO,EAAE,cAAc;KACxB;CACF,CAAA;AAED,MAAM,qBAAqB,GAAG;IAC5B,GAAG,4BAAa,CAAC,wBAAc,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,cAAc;YACd;gBACE,GAAG,iBAAiB;aACrB;SACF;KACF;CACF,CAAA;AAED,MAAM,oBAAoB,GAAG;IAC3B,GAAG,4BAAa,CAAC,wBAAc,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,uBAAuB;YACvB;gBACE,GAAG,iBAAiB;aACrB;SACF;KACF;CACF,CAAA;AAGD,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,gBAAgB;QAC/B,OAAO,EAAE;YACP,GAAG,qBAAqB;YACxB,KAAK,EAAE,aAAa;SACrB;QACD,IAAI,EAAE,WAAW;KAClB;IACD;QACE,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,6BAA6B;QACxC,aAAa,EAAE,gBAAgB;QAC/B,OAAO,EAAE;YACP,GAAG,qBAAqB;YACxB,KAAK,EAAE,QAAQ;SAChB;QACD,IAAI,EAAE,WAAW;KAClB;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE,qCAAqC;QAChD,aAAa,EAAE,gBAAgB;QAC/B,OAAO,EAAE;YACP,GAAG,qBA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AAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAG5C,OAAO,OAAO,CAAC,4DAA4D,EAAE;gBAC3E,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE;oBACJ,UAAU,EAAE,QAAQ,CAAC,SAAS;oBAC9B,KAAK,EAAE,YAAY;oBACnB,SAAS,EAAE,EAAE;oBACb,OAAO,EAAE,EAAE;iBACZ;aACF,CAAC,CAAA;QACJ,CAAC;KACF;IACD,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,OAAO,EAAE,EAAE,cAAc,EAAE,QAAQ,CAAC,WAAW,EAAE;SAClD,CAAA;IACH,CAAC;IACD,OAAO;IACP,OAAO,EAAE;QACP,cAAc,EAAd,wBAAc;KACf;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
export declare function
|
|
3
|
-
export declare
|
|
1
|
+
export declare function formatEmail(email: string | undefined): string | undefined;
|
|
2
|
+
export declare function formatUserId(userId: string | undefined): string | undefined;
|
|
3
|
+
export declare function formatPhone(phone: string | undefined): string | undefined;
|
|
@@ -1,42 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.formatPhone = exports.formatUserId = exports.formatEmail = void 0;
|
|
4
4
|
const crypto_1 = require("crypto");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
email_addresses.forEach((email) => {
|
|
9
|
-
result.push(hashAndEncode(email.toLowerCase()));
|
|
10
|
-
});
|
|
5
|
+
function formatEmail(email) {
|
|
6
|
+
if (email) {
|
|
7
|
+
return hashAndEncode(email.toLowerCase());
|
|
11
8
|
}
|
|
12
|
-
return
|
|
13
|
-
}
|
|
14
|
-
exports.
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
exports.formatEmail = formatEmail;
|
|
12
|
+
function formatUserId(userId) {
|
|
13
|
+
if (userId) {
|
|
14
|
+
return hashAndEncode(userId.toLowerCase().trim());
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
exports.formatUserId = formatUserId;
|
|
19
|
+
function formatPhone(phone) {
|
|
20
|
+
if (!phone)
|
|
21
|
+
return undefined;
|
|
22
|
+
const validatedPhone = phone.match(/[0-9]{0,14}/g);
|
|
23
|
+
if (validatedPhone === null) {
|
|
24
|
+
throw new Error(`${phone} is not a valid E.164 phone number.`);
|
|
21
25
|
}
|
|
22
|
-
|
|
26
|
+
let formattedPhone = `+${phone.replace(/[^0-9]/g, '')}`;
|
|
27
|
+
formattedPhone = formattedPhone.substring(0, 15);
|
|
28
|
+
return hashAndEncode(formattedPhone);
|
|
23
29
|
}
|
|
24
|
-
exports.
|
|
25
|
-
const formatPhones = (phone_numbers) => {
|
|
26
|
-
const result = [];
|
|
27
|
-
if (!phone_numbers)
|
|
28
|
-
return result;
|
|
29
|
-
phone_numbers.forEach((phone) => {
|
|
30
|
-
const validatedPhone = phone.match(/[0-9]{0,14}/g);
|
|
31
|
-
if (validatedPhone === null) {
|
|
32
|
-
throw new Error(`${phone} is not a valid E.164 phone number.`);
|
|
33
|
-
}
|
|
34
|
-
const formattedPhone = `+${phone.replace(/[^0-9]/g, '')}`;
|
|
35
|
-
result.push(hashAndEncode(formattedPhone.substring(0, 15)));
|
|
36
|
-
});
|
|
37
|
-
return result;
|
|
38
|
-
};
|
|
39
|
-
exports.formatPhones = formatPhones;
|
|
30
|
+
exports.formatPhone = formatPhone;
|
|
40
31
|
function hashAndEncode(property) {
|
|
41
32
|
return crypto_1.createHash('sha256').update(property).digest('hex');
|
|
42
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-conversions/reportWebEvent/formatter.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;
|
|
1
|
+
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-conversions/reportWebEvent/formatter.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAKnC,SAAgB,WAAW,CAAC,KAAyB;IACnD,IAAI,KAAK,EAAE;QACT,OAAO,aAAa,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAA;KAC1C;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AALD,kCAKC;AAOD,SAAgB,YAAY,CAAC,MAA0B;IACrD,IAAI,MAAM,EAAE;QACV,OAAO,aAAa,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,CAAA;KAClD;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AALD,oCAKC;AAOD,SAAgB,WAAW,CAAC,KAAyB;IACnD,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAA;IAE5B,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;IAClD,IAAI,cAAc,KAAK,IAAI,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qCAAqC,CAAC,CAAA;KAC/D;IAED,IAAI,cAAc,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAA;IAEvD,cAAc,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAChD,OAAO,aAAa,CAAC,cAAc,CAAC,CAAA;AACtC,CAAC;AAZD,kCAYC;AAED,SAAS,aAAa,CAAC,QAAgB;IACrC,OAAO,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC"}
|
|
@@ -2,13 +2,11 @@ export interface Payload {
|
|
|
2
2
|
event: string;
|
|
3
3
|
event_id?: string;
|
|
4
4
|
timestamp?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
phone_number?: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
external_id?: string;
|
|
8
8
|
ttclid?: string;
|
|
9
|
-
ttp?: string;
|
|
10
9
|
lead_id?: string;
|
|
11
|
-
locale?: string;
|
|
12
10
|
url?: string;
|
|
13
11
|
referrer?: string;
|
|
14
12
|
ip?: string;
|
|
@@ -16,18 +14,12 @@ export interface Payload {
|
|
|
16
14
|
contents?: {
|
|
17
15
|
price?: number;
|
|
18
16
|
quantity?: number;
|
|
19
|
-
|
|
17
|
+
content_type?: string;
|
|
20
18
|
content_id?: string;
|
|
21
|
-
content_name?: string;
|
|
22
|
-
brand?: string;
|
|
23
19
|
}[];
|
|
24
|
-
content_type?: string;
|
|
25
20
|
currency?: string;
|
|
26
21
|
value?: number;
|
|
27
22
|
description?: string;
|
|
28
23
|
query?: string;
|
|
29
|
-
order_id?: string;
|
|
30
|
-
shop_id?: string;
|
|
31
|
-
limited_data_use?: boolean;
|
|
32
24
|
test_event_code?: string;
|
|
33
25
|
}
|