@segment/action-destinations 3.244.1 → 3.245.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/destinations/acoustic-s3tc/index.js +3 -3
- package/dist/destinations/acoustic-s3tc/index.js.map +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.d.ts +6 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js +26 -25
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js.map +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/generated-types.d.ts +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/index.js +12 -10
- package/dist/destinations/acoustic-s3tc/receiveEvents/index.js.map +1 -1
- package/dist/destinations/avo/index.js +4 -4
- package/dist/destinations/avo/index.js.map +1 -1
- package/dist/destinations/customerio/createUpdateDevice/generated-types.d.ts +3 -0
- package/dist/destinations/customerio/createUpdateDevice/index.js +29 -17
- package/dist/destinations/customerio/createUpdateDevice/index.js.map +1 -1
- package/dist/destinations/customerio/createUpdateObject/generated-types.d.ts +3 -0
- package/dist/destinations/customerio/createUpdateObject/index.js +80 -39
- package/dist/destinations/customerio/createUpdateObject/index.js.map +1 -1
- package/dist/destinations/customerio/createUpdatePerson/generated-types.d.ts +4 -1
- package/dist/destinations/customerio/createUpdatePerson/index.d.ts +1 -1
- package/dist/destinations/customerio/createUpdatePerson/index.js +51 -41
- package/dist/destinations/customerio/createUpdatePerson/index.js.map +1 -1
- package/dist/destinations/customerio/deleteDevice/index.js +15 -5
- package/dist/destinations/customerio/deleteDevice/index.js.map +1 -1
- package/dist/destinations/customerio/deletePerson/index.js +4 -8
- package/dist/destinations/customerio/deletePerson/index.js.map +1 -1
- package/dist/destinations/customerio/deleteRelationship/index.js +4 -8
- package/dist/destinations/customerio/deleteRelationship/index.js.map +1 -1
- package/dist/destinations/customerio/index.js +39 -15
- package/dist/destinations/customerio/index.js.map +1 -1
- package/dist/destinations/customerio/mergePeople/generated-types.d.ts +4 -0
- package/dist/destinations/customerio/mergePeople/generated-types.js.map +1 -0
- package/dist/destinations/{movable-ink/productAdded → customerio/mergePeople}/index.d.ts +1 -1
- package/dist/destinations/customerio/mergePeople/index.js +52 -0
- package/dist/destinations/customerio/mergePeople/index.js.map +1 -0
- package/dist/destinations/customerio/suppressPerson/index.js +4 -8
- package/dist/destinations/customerio/suppressPerson/index.js.map +1 -1
- package/dist/destinations/customerio/trackEvent/index.js +26 -32
- package/dist/destinations/customerio/trackEvent/index.js.map +1 -1
- package/dist/destinations/customerio/trackPageView/generated-types.d.ts +1 -0
- package/dist/destinations/customerio/trackPageView/index.js +26 -29
- package/dist/destinations/customerio/trackPageView/index.js.map +1 -1
- package/dist/destinations/customerio/trackScreenView/generated-types.d.ts +1 -0
- package/dist/destinations/customerio/trackScreenView/index.js +25 -29
- package/dist/destinations/customerio/trackScreenView/index.js.map +1 -1
- package/dist/destinations/customerio/unsuppressPerson/index.js +4 -8
- package/dist/destinations/customerio/unsuppressPerson/index.js.map +1 -1
- package/dist/destinations/customerio/utils.d.ts +46 -2
- package/dist/destinations/customerio/utils.js +88 -13
- package/dist/destinations/customerio/utils.js.map +1 -1
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +6 -19
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +1 -1
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +0 -7
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +1 -1
- package/dist/destinations/engage/utils/track.d.ts +17 -17
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +0 -1
- package/dist/destinations/klaviyo/orderCompleted/index.js +29 -12
- package/dist/destinations/klaviyo/orderCompleted/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/api.test.js +0 -118
- package/dist/destinations/linkedin-conversions/api/api.test.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/index.d.ts +1 -4
- package/dist/destinations/linkedin-conversions/api/index.js +27 -118
- package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/streamConversion/generated-types.d.ts +0 -1
- package/dist/destinations/linkedin-conversions/streamConversion/index.js +2 -11
- package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/types.d.ts +0 -2
- package/dist/destinations/schematic/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/schematic/trackEvent/index.js +19 -3
- package/dist/destinations/schematic/trackEvent/index.js.map +1 -1
- package/dist/destinations/segment/segment-properties.d.ts +0 -1
- package/dist/destinations/segment/segment-properties.js +1 -7
- package/dist/destinations/segment/segment-properties.js.map +1 -1
- package/dist/destinations/segment/sendGroup/generated-types.d.ts +0 -1
- package/dist/destinations/segment/sendGroup/index.js +25 -39
- package/dist/destinations/segment/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment/sendIdentify/generated-types.d.ts +0 -1
- package/dist/destinations/segment/sendIdentify/index.js +25 -39
- package/dist/destinations/segment/sendIdentify/index.js.map +1 -1
- package/dist/destinations/segment/sendPage/generated-types.d.ts +0 -1
- package/dist/destinations/segment/sendPage/index.js +33 -47
- package/dist/destinations/segment/sendPage/index.js.map +1 -1
- package/dist/destinations/segment/sendScreen/generated-types.d.ts +0 -1
- package/dist/destinations/segment/sendScreen/index.js +26 -40
- package/dist/destinations/segment/sendScreen/index.js.map +1 -1
- package/dist/destinations/segment/sendTrack/generated-types.d.ts +0 -1
- package/dist/destinations/segment/sendTrack/index.js +29 -43
- package/dist/destinations/segment/sendTrack/index.js.map +1 -1
- package/dist/destinations/snap-conversions-api/_tests_/index.test.js +4 -352
- package/dist/destinations/snap-conversions-api/_tests_/index.test.js.map +1 -1
- package/dist/destinations/snap-conversions-api/reportConversionEvent/index.js +24 -20
- package/dist/destinations/snap-conversions-api/reportConversionEvent/index.js.map +1 -1
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v3.js +10 -11
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v3.js.map +1 -1
- package/dist/destinations/snap-conversions-api/reportConversionEvent/utils.d.ts +6 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/utils.js +23 -1
- package/dist/destinations/snap-conversions-api/reportConversionEvent/utils.js.map +1 -1
- package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +0 -5
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js +1 -86
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -1
- package/dist/destinations/webhook/send/index.js +0 -6
- package/dist/destinations/webhook/send/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.d.ts +0 -1
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js +0 -184
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js.map +0 -1
- package/dist/destinations/engage/sendgrid/Profile.d.ts +0 -6
- package/dist/destinations/engage/sendgrid/Profile.js +0 -3
- package/dist/destinations/engage/sendgrid/Profile.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +0 -18
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +0 -94
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +0 -1
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +0 -4
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +0 -1
- package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +0 -5
- package/dist/destinations/klaviyo/removeProfileToList/index.js +0 -43
- package/dist/destinations/klaviyo/removeProfileToList/index.js.map +0 -1
- package/dist/destinations/mixpanel/utils.d.ts +0 -13
- package/dist/destinations/mixpanel/utils.js +0 -117
- package/dist/destinations/mixpanel/utils.js.map +0 -1
- package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +0 -22
- package/dist/destinations/movable-ink/categoryView/generated-types.js +0 -3
- package/dist/destinations/movable-ink/categoryView/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/categoryView/index.d.ts +0 -5
- package/dist/destinations/movable-ink/categoryView/index.js +0 -43
- package/dist/destinations/movable-ink/categoryView/index.js.map +0 -1
- package/dist/destinations/movable-ink/conversion/generated-types.d.ts +0 -20
- package/dist/destinations/movable-ink/conversion/generated-types.js +0 -3
- package/dist/destinations/movable-ink/conversion/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/conversion/index.d.ts +0 -5
- package/dist/destinations/movable-ink/conversion/index.js +0 -45
- package/dist/destinations/movable-ink/conversion/index.js.map +0 -1
- package/dist/destinations/movable-ink/fields.d.ts +0 -21
- package/dist/destinations/movable-ink/fields.js +0 -236
- package/dist/destinations/movable-ink/fields.js.map +0 -1
- package/dist/destinations/movable-ink/identify/generated-types.d.ts +0 -7
- package/dist/destinations/movable-ink/identify/generated-types.js +0 -3
- package/dist/destinations/movable-ink/identify/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/identify/index.d.ts +0 -5
- package/dist/destinations/movable-ink/identify/index.js +0 -32
- package/dist/destinations/movable-ink/identify/index.js.map +0 -1
- package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +0 -22
- package/dist/destinations/movable-ink/productAdded/generated-types.js +0 -3
- package/dist/destinations/movable-ink/productAdded/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/productAdded/index.js +0 -43
- package/dist/destinations/movable-ink/productAdded/index.js.map +0 -1
- package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +0 -21
- package/dist/destinations/movable-ink/productViewed/generated-types.js +0 -3
- package/dist/destinations/movable-ink/productViewed/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/productViewed/index.d.ts +0 -5
- package/dist/destinations/movable-ink/productViewed/index.js +0 -43
- package/dist/destinations/movable-ink/productViewed/index.js.map +0 -1
- package/dist/destinations/movable-ink/search/generated-types.d.ts +0 -12
- package/dist/destinations/movable-ink/search/generated-types.js +0 -3
- package/dist/destinations/movable-ink/search/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/search/index.d.ts +0 -5
- package/dist/destinations/movable-ink/search/index.js +0 -43
- package/dist/destinations/movable-ink/search/index.js.map +0 -1
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +0 -25
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +0 -3
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +0 -5
- package/dist/destinations/movable-ink/sendCustomEvent/index.js +0 -48
- package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +0 -1
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +0 -14
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js +0 -3
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +0 -1
- package/dist/destinations/responsys/asyncMergePetRecords/index.d.ts +0 -5
- package/dist/destinations/responsys/asyncMergePetRecords/index.js +0 -113
- package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +0 -1
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +0 -20
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js +0 -3
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +0 -1
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.d.ts +0 -5
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +0 -174
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +0 -1
- package/dist/destinations/responsys/rsp-operations.d.ts +0 -14
- package/dist/destinations/responsys/rsp-operations.js +0 -33
- package/dist/destinations/responsys/rsp-operations.js.map +0 -1
- package/dist/destinations/responsys/rsp-properties.d.ts +0 -4
- package/dist/destinations/responsys/rsp-properties.js +0 -27
- package/dist/destinations/responsys/rsp-properties.js.map +0 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +0 -3
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +0 -43
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +0 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.d.ts +0 -33
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.js +0 -3
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.js.map +0 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.d.ts +0 -5
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js +0 -16
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js.map +0 -1
- package/dist/destinations/tiktok-offline-conversions/utils.d.ts +0 -8
- package/dist/destinations/tiktok-offline-conversions/utils.js +0 -67
- package/dist/destinations/tiktok-offline-conversions/utils.js.map +0 -1
- package/dist/destinations/trackey/group.types.d.ts +0 -11
- package/dist/destinations/trackey/group.types.js +0 -3
- package/dist/destinations/trackey/group.types.js.map +0 -1
- package/dist/destinations/trackey/identify.types.d.ts +0 -11
- package/dist/destinations/trackey/identify.types.js +0 -3
- package/dist/destinations/trackey/identify.types.js.map +0 -1
- package/dist/destinations/trackey/track.types.d.ts +0 -12
- package/dist/destinations/trackey/track.types.js +0 -3
- package/dist/destinations/trackey/track.types.js.map +0 -1
- /package/dist/destinations/{klaviyo/removeProfileToList → customerio/mergePeople}/generated-types.js +0 -0
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const actions_core_1 = require("@segment/actions-core");
|
|
7
7
|
const index_1 = __importDefault(require("./receiveEvents/index"));
|
|
8
8
|
const mod = `
|
|
9
|
-
Last-Modified:
|
|
9
|
+
Last-Modified: 02.01.2024 10.30.43
|
|
10
10
|
`;
|
|
11
11
|
const presets = [
|
|
12
12
|
{
|
|
@@ -15,7 +15,7 @@ const presets = [
|
|
|
15
15
|
partnerAction: 'receiveEvents',
|
|
16
16
|
mapping: {
|
|
17
17
|
...actions_core_1.defaultValues(index_1.default.fields),
|
|
18
|
-
|
|
18
|
+
uniqueRecipientId: {
|
|
19
19
|
'@if': {
|
|
20
20
|
exists: { '@path': '$.properties.email' },
|
|
21
21
|
then: { '@path': '$.properties.email' },
|
|
@@ -31,7 +31,7 @@ const presets = [
|
|
|
31
31
|
partnerAction: 'receiveEvents',
|
|
32
32
|
mapping: {
|
|
33
33
|
...actions_core_1.defaultValues(index_1.default.fields),
|
|
34
|
-
|
|
34
|
+
uniqueRecipientId: {
|
|
35
35
|
'@if': {
|
|
36
36
|
exists: { '@path': '$.traits.email' },
|
|
37
37
|
then: { '@path': '$.traits.email' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/acoustic-s3tc/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,kEAAiD;AAEjD,MAAM,GAAG,GAAG;;CAEX,CAAA;AAID,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,eAAe;QAC9B,OAAO,EAAE;YACP,GAAG,4BAAa,CAAC,eAAa,CAAC,MAAM,CAAC;YACtC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/acoustic-s3tc/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,kEAAiD;AAEjD,MAAM,GAAG,GAAG;;CAEX,CAAA;AAID,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,eAAe;QAC9B,OAAO,EAAE;YACP,GAAG,4BAAa,CAAC,eAAa,CAAC,MAAM,CAAC;YACtC,iBAAiB,EAAE;gBACjB,KAAK,EAAE;oBACL,MAAM,EAAE,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AAK,EAAE,WAAW;gBAClB,WAAW,EAAE,yCAAyC;gBACtD,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,oEAAoE;gBACjF,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,KAAK,GAAG,IAAI;gBACzB,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;IACD,OAAO;IACP,OAAO,EAAE;QACP,aAAa,EAAb,eAAa;KACd;CACF,CAAA;AACD,kBAAe,WAAW,CAAA"}
|
|
@@ -4,4 +4,9 @@ export declare function parseSections(section: {
|
|
|
4
4
|
}, nestDepth: number): {
|
|
5
5
|
[key: string]: string;
|
|
6
6
|
};
|
|
7
|
-
export declare function addUpdateEvents(payload: Payload,
|
|
7
|
+
export declare function addUpdateEvents(payload: Payload, uniqRecip: string): {
|
|
8
|
+
propertiesTraitsKV: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
};
|
|
11
|
+
l: string;
|
|
12
|
+
};
|
|
@@ -9,7 +9,7 @@ const get_1 = __importDefault(require("lodash/get"));
|
|
|
9
9
|
function parseSections(section, nestDepth) {
|
|
10
10
|
const parseResults = {};
|
|
11
11
|
if (nestDepth > 10)
|
|
12
|
-
throw new actions_core_1.IntegrationError('Event data exceeds nesting depth.', 'NESTING_DEPTH_EXCEEDED', 400);
|
|
12
|
+
throw new actions_core_1.IntegrationError('Event data exceeds nesting depth. Plese use mapping to flatten the data to no more than three levels deep.', 'NESTING_DEPTH_EXCEEDED', 400);
|
|
13
13
|
try {
|
|
14
14
|
if (section === null)
|
|
15
15
|
section = { null: '' };
|
|
@@ -36,13 +36,20 @@ function parseSections(section, nestDepth) {
|
|
|
36
36
|
return parseResults;
|
|
37
37
|
}
|
|
38
38
|
exports.parseSections = parseSections;
|
|
39
|
-
function addUpdateEvents(payload,
|
|
40
|
-
let eventName = '';
|
|
41
|
-
let eventValue = '';
|
|
42
|
-
let csvRows = 'EMAIL, EventSource, EventName, EventValue, EventTimestamp\n';
|
|
43
|
-
const eventSource = get_1.default(payload, 'type', 'Null') + ' Event';
|
|
44
|
-
const timestamp = get_1.default(payload, 'timestamp', 'Null');
|
|
39
|
+
function addUpdateEvents(payload, uniqRecip) {
|
|
45
40
|
let propertiesTraitsKV = {};
|
|
41
|
+
propertiesTraitsKV = {
|
|
42
|
+
...propertiesTraitsKV,
|
|
43
|
+
...{ ['uniqueRecipient']: uniqRecip }
|
|
44
|
+
};
|
|
45
|
+
propertiesTraitsKV = {
|
|
46
|
+
...propertiesTraitsKV,
|
|
47
|
+
...{ ['eventSource']: get_1.default(payload, 'type', 'Null') + ' Event' }
|
|
48
|
+
};
|
|
49
|
+
propertiesTraitsKV = {
|
|
50
|
+
...propertiesTraitsKV,
|
|
51
|
+
...{ ['timestamp']: get_1.default(payload, 'timestamp', 'Null') }
|
|
52
|
+
};
|
|
46
53
|
if (payload.key_value_pairs)
|
|
47
54
|
propertiesTraitsKV = {
|
|
48
55
|
...propertiesTraitsKV,
|
|
@@ -68,10 +75,9 @@ function addUpdateEvents(payload, email) {
|
|
|
68
75
|
...propertiesTraitsKV,
|
|
69
76
|
...parseSections(payload.context, 0)
|
|
70
77
|
};
|
|
71
|
-
let ak = '';
|
|
72
|
-
let av = '';
|
|
73
78
|
const getValue = (o, part) => Object.entries(o).find(([k, _v]) => k.includes(part))?.[1];
|
|
74
79
|
const getKey = (o, part) => Object.entries(o).find(([k, _v]) => k.includes(part))?.[0];
|
|
80
|
+
let ak, av;
|
|
75
81
|
if (getValue(propertiesTraitsKV, 'computation_class')?.toLowerCase() === 'audience') {
|
|
76
82
|
ak = getValue(propertiesTraitsKV, 'computation_key');
|
|
77
83
|
av = getValue(propertiesTraitsKV, `${ak}`);
|
|
@@ -88,23 +94,18 @@ function addUpdateEvents(payload, email) {
|
|
|
88
94
|
delete propertiesTraitsKV[`${x}`];
|
|
89
95
|
delete propertiesTraitsKV[`${ak}`];
|
|
90
96
|
}
|
|
91
|
-
if (av !==
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
csvRows += `${email}, ${eventSource}, ${eventName}, ${eventValue}, ${timestamp}\n`;
|
|
101
|
-
}
|
|
102
|
-
for (const e in propertiesTraitsKV) {
|
|
103
|
-
const eventName = e;
|
|
104
|
-
const eventValue = propertiesTraitsKV[e];
|
|
105
|
-
csvRows += `${email}, ${eventSource}, ${eventName}, ${eventValue}, ${timestamp}\n`;
|
|
97
|
+
if (av !== null) {
|
|
98
|
+
if (av)
|
|
99
|
+
av = 'Audience Entered';
|
|
100
|
+
if (!av)
|
|
101
|
+
av = 'Audience Exited';
|
|
102
|
+
propertiesTraitsKV = {
|
|
103
|
+
...propertiesTraitsKV,
|
|
104
|
+
...{ [`${ak}`]: av }
|
|
105
|
+
};
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
const l = propertiesTraitsKV.length;
|
|
108
|
+
return { propertiesTraitsKV, l };
|
|
108
109
|
}
|
|
109
110
|
exports.addUpdateEvents = addUpdateEvents;
|
|
110
111
|
//# sourceMappingURL=eventprocessing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventprocessing.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic-s3tc/receiveEvents/eventprocessing.ts"],"names":[],"mappings":";;;;;;AACA,wDAAwD;AAExD,qDAA4B;AAE5B,SAAgB,aAAa,CAAC,OAAkC,EAAE,SAAiB;IACjF,MAAM,YAAY,GAA8B,EAAE,CAAA;IAElD,IAAI,SAAS,GAAG,EAAE;
|
|
1
|
+
{"version":3,"file":"eventprocessing.js","sourceRoot":"","sources":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AE,GAAG,EAAE,EAAE,CAAC,CAAA;QAG1C,MAAM,CAAC,GAAG,MAAM,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAA;QACpD,OAAO,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACjC,OAAO,kBAAkB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;KACnC;IAED,IAAI,EAAE,KAAK,IAAI,EAAE;QACf,IAAI,EAAE;YAAE,EAAE,GAAG,kBAAkB,CAAA;QAC/B,IAAI,CAAC,EAAE;YAAE,EAAE,GAAG,iBAAiB,CAAA;QAE/B,kBAAkB,GAAG;YACnB,GAAG,kBAAkB;YACrB,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE;SACrB,CAAA;KACF;IAED,MAAM,CAAC,GAAG,kBAAkB,CAAC,MAAM,CAAA;IAEnC,OAAO,EAAE,kBAAkB,EAAE,CAAC,EAAE,CAAA;AAClC,CAAC;AAzFD,0CAyFC"}
|
|
@@ -39,11 +39,11 @@ const action = {
|
|
|
39
39
|
description: 'If the data is present in a Traits section, use this to map the attributes of a Traits Section (optional) ',
|
|
40
40
|
type: 'object'
|
|
41
41
|
},
|
|
42
|
-
|
|
43
|
-
label: '
|
|
44
|
-
description: '
|
|
42
|
+
uniqueRecipientId: {
|
|
43
|
+
label: 'UniqueRecipientId',
|
|
44
|
+
description: 'The field to be used to uniquely identify the Recipient in Acoustic. This field is required with Email preferred but not required.',
|
|
45
45
|
type: 'string',
|
|
46
|
-
format: '
|
|
46
|
+
format: 'text',
|
|
47
47
|
required: true,
|
|
48
48
|
default: {
|
|
49
49
|
'@if': {
|
|
@@ -73,17 +73,19 @@ const action = {
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
perform: async (request, { settings, payload }) => {
|
|
76
|
-
const
|
|
77
|
-
if (!
|
|
78
|
-
throw new actions_core_1.IntegrationError('
|
|
76
|
+
const uniqRecip = get_1.default(payload, 'uniqueRecipientId', '');
|
|
77
|
+
if (!uniqRecip) {
|
|
78
|
+
throw new actions_core_1.IntegrationError('Unique Recipient Id Not Found, invalid Event received.', 'INVALID_EVENT_HAS_NO_UNIQUERECIPIENTID', 400);
|
|
79
79
|
}
|
|
80
80
|
if (!payload.context && !payload.traits && !payload.properties)
|
|
81
81
|
throw new actions_core_1.IntegrationError('No mapped data provided, must use at least one of the mapping fields to define the data to be sent to Acoustic.', 'INVALID_NO_DATA_MAPPED', 400);
|
|
82
82
|
preCheck_1.validateSettings(settings);
|
|
83
|
-
const
|
|
84
|
-
|
|
83
|
+
const parsed = eventprocessing_1.addUpdateEvents(payload, uniqRecip);
|
|
84
|
+
let jsonData = '';
|
|
85
|
+
jsonData = JSON.stringify(parsed.propertiesTraitsKV);
|
|
86
|
+
const fileName = settings.fileNamePrefix + `${new Date().toISOString().replace(/(\.|-|:)/g, '_')}` + '.json';
|
|
85
87
|
const method = 'PUT';
|
|
86
|
-
const opts = await s3_1.default(settings.s3_bucket_accesspoint_alias, settings.s3_region, fileName, method,
|
|
88
|
+
const opts = await s3_1.default(settings.s3_bucket_accesspoint_alias, settings.s3_region, fileName, method, jsonData, settings.s3_access_key, settings.s3_secret);
|
|
87
89
|
if (!opts.headers || !opts.method || !opts.host || !opts.path) {
|
|
88
90
|
throw new actions_core_1.InvalidAuthenticationError('Unable to generate correct signature header for AWS S3 Put request.');
|
|
89
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic-s3tc/receiveEvents/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAsG;AAGtG,qDAA4B;AAC5B,uDAAmD;AACnD,6DAA0D;AAC1D,yCAA6C;AAE7C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,0LAA0L;IAC5L,MAAM,EAAE;QACN,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,wCAAwC;YACrD,IAAI,EAAE,QAAQ;SACf;QACD,UAAU,EAAE;YACV,KAAK,EAAE,QAAQ;YACf,WAAW,EACT,2GAA2G;YAC7G,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,oBAAoB,EAAE,IAAI;SAC3B;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EACT,6GAA6G;YAC/G,IAAI,EAAE,QAAQ;SACf;QACD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,oHAAoH;YACtH,IAAI,EAAE,QAAQ;SACf;QACD,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,WAAW,EACT,4GAA4G;YAC9G,IAAI,EAAE,QAAQ;SACf;QACD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic-s3tc/receiveEvents/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAsG;AAGtG,qDAA4B;AAC5B,uDAAmD;AACnD,6DAA0D;AAC1D,yCAA6C;AAE7C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,0LAA0L;IAC5L,MAAM,EAAE;QACN,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,wCAAwC;YACrD,IAAI,EAAE,QAAQ;SACf;QACD,UAAU,EAAE;YACV,KAAK,EAAE,QAAQ;YACf,WAAW,EACT,2GAA2G;YAC7G,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,oBAAoB,EAAE,IAAI;SAC3B;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EACT,6GAA6G;YAC/G,IAAI,EAAE,QAAQ;SACf;QACD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,oHAAoH;YACtH,IAAI,EAAE,QAAQ;SACf;QACD,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,WAAW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AG1B,MAAM,MAAM,GAAG,iCAAe,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;QAClD,IAAI,QAAQ,GAAG,EAAE,CAAA;QAEjB,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAA;QAGpD,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,GAAG,OAAO,CAAA;QAE5G,MAAM,MAAM,GAAG,KAAK,CAAA;QACpB,MAAM,IAAI,GAAG,MAAM,YAAwB,CACzC,QAAQ,CAAC,2BAA2B,EACpC,QAAQ,CAAC,SAAS,EAClB,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,CAAC,aAAa,EACtB,QAAQ,CAAC,SAAS,CACnB,CAAA;QACD,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YAC7D,MAAM,IAAI,yCAA0B,CAAC,qEAAqE,CAAC,CAAA;SAC5G;QAED,OAAO,MAAM,OAAO,CAAC,WAAW,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE;YACxD,OAAO,EAAE,IAAI,CAAC,OAAiC;YAC/C,MAAM;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AACD,kBAAe,MAAM,CAAA"}
|
|
@@ -14,8 +14,8 @@ const destination = {
|
|
|
14
14
|
scheme: 'custom',
|
|
15
15
|
fields: {
|
|
16
16
|
apiKey: {
|
|
17
|
-
label: 'API Key',
|
|
18
|
-
description: 'Avo Inspector API Key',
|
|
17
|
+
label: 'Avo Inspector API Key',
|
|
18
|
+
description: 'Avo Inspector API Key can be found in the Inspector setup page on your source in Avo.',
|
|
19
19
|
type: 'string',
|
|
20
20
|
required: true
|
|
21
21
|
},
|
|
@@ -28,8 +28,8 @@ const destination = {
|
|
|
28
28
|
required: true
|
|
29
29
|
},
|
|
30
30
|
appVersionPropertyName: {
|
|
31
|
-
label: 'App Version
|
|
32
|
-
description: '
|
|
31
|
+
label: 'App Version Property',
|
|
32
|
+
description: 'If you send a custom event property on all events that contains the app version, please enter the name of that property here (e.g. “app_version”). If you do not have a custom event property for the app version, please leave this field empty.',
|
|
33
33
|
type: 'string',
|
|
34
34
|
required: false
|
|
35
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/avo/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAA4E;AAE5E,oFAAsD;AACtD,iEAA+D;AAE/D,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/avo/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAA4E;AAE5E,oFAAsD;AACtD,iEAA+D;AAE/D,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,uBAAuB;gBAC9B,WAAW,EAAE,uFAAuF;gBACpG,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,GAAG,EAAE;gBACH,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,uBAAW,CAAC,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;gBACtG,OAAO,EAAE,uBAAW,CAAC,IAAI;gBACzB,QAAQ,EAAE,IAAI;aACf;YACD,sBAAsB,EAAE;gBACtB,KAAK,EAAE,sBAAsB;gBAC7B,WAAW,EACT,mPAAmP;gBACrP,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAE5C,MAAM,IAAI,GAAG,OAAO,CAAC,6CAA6C,EAAE;gBAClE,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,MAAM,EAAE,QAAQ,CAAC,MAAM;iBACxB,CAAC;aACH,CAAC,CAAA;YAEF,OAAO,IAAI,CAAA;QACb,CAAC;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,yBAAyB;YAC/B,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,uBAAuB;YACtC,OAAO,EAAE,4BAAa,CAAC,+BAAgB,CAAC,MAAM,CAAC;YAC/C,IAAI,EAAE,WAAW;SAClB;KACF;IACD,OAAO,EAAE;QACP,qBAAqB,EAAE,+BAAgB;KACxC;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const utils_1 = require("../utils");
|
|
4
4
|
const action = {
|
|
5
5
|
title: 'Create or Update Device',
|
|
6
|
-
description: `
|
|
6
|
+
description: `Create or update a person's device.`,
|
|
7
7
|
defaultSubscription: 'type = "track" and event = "Application Installed"',
|
|
8
8
|
fields: {
|
|
9
9
|
person_id: {
|
|
@@ -49,6 +49,14 @@ const action = {
|
|
|
49
49
|
'@path': '$.timestamp'
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
+
attributes: {
|
|
53
|
+
label: 'Event Attributes',
|
|
54
|
+
description: `Optional data that you can reference to segment your audience, like a person's attributes, but specific to a device.`,
|
|
55
|
+
type: 'object',
|
|
56
|
+
default: {
|
|
57
|
+
'@path': '$.properties'
|
|
58
|
+
}
|
|
59
|
+
},
|
|
52
60
|
convert_timestamp: {
|
|
53
61
|
label: 'Convert Timestamps',
|
|
54
62
|
description: 'Convert dates to Unix timestamps (seconds since Epoch).',
|
|
@@ -56,23 +64,27 @@ const action = {
|
|
|
56
64
|
default: true
|
|
57
65
|
}
|
|
58
66
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
return request(`${utils_1.trackApiEndpoint(settings.accountRegion)}/api/v1/customers/${payload.person_id}/devices`, {
|
|
65
|
-
method: 'put',
|
|
66
|
-
json: {
|
|
67
|
-
device: {
|
|
68
|
-
id: payload.device_id,
|
|
69
|
-
platform: payload.platform,
|
|
70
|
-
last_used: lastUsed,
|
|
71
|
-
...(payload.app_version ? { attributes: { app_version: payload.app_version } } : {})
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
});
|
|
67
|
+
performBatch: (request, { payload: payloads, settings }) => {
|
|
68
|
+
return utils_1.sendBatch(request, payloads.map((payload) => ({ action: 'add_device', payload: mapPayload(payload), settings, type: 'person' })));
|
|
69
|
+
},
|
|
70
|
+
perform: (request, { payload, settings }) => {
|
|
71
|
+
return utils_1.sendSingle(request, { action: 'add_device', payload: mapPayload(payload), settings, type: 'person' });
|
|
75
72
|
}
|
|
76
73
|
};
|
|
74
|
+
function mapPayload(payload) {
|
|
75
|
+
const { app_version, device_id, platform, last_used, attributes, ...rest } = payload;
|
|
76
|
+
return {
|
|
77
|
+
...rest,
|
|
78
|
+
device: {
|
|
79
|
+
token: device_id,
|
|
80
|
+
platform,
|
|
81
|
+
last_used,
|
|
82
|
+
attributes: {
|
|
83
|
+
...attributes,
|
|
84
|
+
...(payload.app_version ? { app_version: payload.app_version } : {})
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
77
89
|
exports.default = action;
|
|
78
90
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/customerio/createUpdateDevice/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/customerio/createUpdateDevice/index.ts"],"names":[],"mappings":";;AAGA,oCAAgD;AAEhD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,qCAAqC;IAClD,mBAAmB,EAAE,oDAAoD;IACzE,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,0DAA0D;YACvE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,iDAAiD;YAC9D,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,wBAAwB;aAClC;SACF;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;aACjC;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,oDAAoD;YACjE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,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M,EAAE;YACN,KAAK,EAAE,SAAS;YAChB,QAAQ;YACR,SAAS;YACT,UAAU,EAAE;gBACV,GAAG,UAAU;gBACb,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACrE;SACF;KACF,CAAA;AACH,CAAC;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -20,7 +20,11 @@ const action = {
|
|
|
20
20
|
description: 'A timestamp of when the object was created.',
|
|
21
21
|
type: 'string',
|
|
22
22
|
default: {
|
|
23
|
-
'@
|
|
23
|
+
'@if': {
|
|
24
|
+
exists: { '@path': '$.traits.created_at' },
|
|
25
|
+
then: { '@path': '$.traits.created_at' },
|
|
26
|
+
else: { '@path': '$.traits.createdAt' }
|
|
27
|
+
}
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
custom_attributes: {
|
|
@@ -28,7 +32,15 @@ const action = {
|
|
|
28
32
|
description: 'Optional attributes for the object. When updating an object, attributes are added or updated, not removed.',
|
|
29
33
|
type: 'object',
|
|
30
34
|
default: {
|
|
31
|
-
'@path': '$.traits'
|
|
35
|
+
'@path': '$.traits.objectAttributes'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
relationship_attributes: {
|
|
39
|
+
label: 'Relationship Attributes',
|
|
40
|
+
description: 'Optional attributes for the relationship between the object and the user. When updating an relationship, attributes are added or updated, not removed.',
|
|
41
|
+
type: 'object',
|
|
42
|
+
default: {
|
|
43
|
+
'@path': '$.traits.relationshipAttributes'
|
|
32
44
|
}
|
|
33
45
|
},
|
|
34
46
|
user_id: {
|
|
@@ -52,7 +64,11 @@ const action = {
|
|
|
52
64
|
description: 'The ID used to uniquely identify a custom object type in Customer.io. [Learn more](https://customer.io/docs/object-relationships).',
|
|
53
65
|
type: 'string',
|
|
54
66
|
default: {
|
|
55
|
-
'@
|
|
67
|
+
'@if': {
|
|
68
|
+
exists: { '@path': '$.traits.object_type_id' },
|
|
69
|
+
then: { '@path': '$.traits.object_type_id' },
|
|
70
|
+
else: { '@path': '$.traits.objectTypeId' }
|
|
71
|
+
}
|
|
56
72
|
}
|
|
57
73
|
},
|
|
58
74
|
convert_timestamp: {
|
|
@@ -62,46 +78,71 @@ const action = {
|
|
|
62
78
|
default: true
|
|
63
79
|
}
|
|
64
80
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (payload.convert_timestamp !== false) {
|
|
74
|
-
if (createdAt) {
|
|
75
|
-
createdAt = utils_1.convertValidTimestamp(createdAt);
|
|
76
|
-
}
|
|
77
|
-
if (customAttributes) {
|
|
78
|
-
customAttributes = utils_1.convertAttributeTimestamps(customAttributes);
|
|
79
|
-
if (customAttributes.object_type_id) {
|
|
80
|
-
objectTypeIDInTraits = customAttributes.object_type_id;
|
|
81
|
-
delete customAttributes.object_type_id;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
81
|
+
performBatch: (request, { payload: payloads, settings }) => {
|
|
82
|
+
const payloadsByAction = {
|
|
83
|
+
identify: [],
|
|
84
|
+
identify_anonymous: []
|
|
85
|
+
};
|
|
86
|
+
for (const payload of payloads) {
|
|
87
|
+
const { action, body } = mapPayload(payload);
|
|
88
|
+
payloadsByAction[action].push(body);
|
|
84
89
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
90
|
+
return Promise.all([
|
|
91
|
+
utils_1.sendBatch(request, payloadsByAction.identify.map((payload) => ({ action: 'identify', payload, settings, type: 'object' }))),
|
|
92
|
+
utils_1.sendBatch(request, payloadsByAction.identify_anonymous.map((payload) => ({
|
|
93
|
+
action: 'identify_anonymous',
|
|
94
|
+
payload,
|
|
95
|
+
settings,
|
|
96
|
+
type: 'object'
|
|
97
|
+
})))
|
|
98
|
+
]);
|
|
99
|
+
},
|
|
100
|
+
perform: (request, { payload, settings }) => {
|
|
101
|
+
const { action, body } = mapPayload(payload);
|
|
102
|
+
return utils_1.sendSingle(request, { action, payload: body, settings, type: 'object' });
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
function mapPayload(payload) {
|
|
106
|
+
const { id, convert_timestamp, custom_attributes, relationship_attributes, user_id, anonymous_id, object_type_id, ...rest } = payload;
|
|
107
|
+
let body = {
|
|
108
|
+
...rest,
|
|
109
|
+
anonymous_id,
|
|
110
|
+
person_id: user_id,
|
|
111
|
+
attributes: custom_attributes,
|
|
112
|
+
object_type_id: object_type_id ?? '1',
|
|
113
|
+
object_id: id
|
|
114
|
+
};
|
|
115
|
+
let rel_attrs = relationship_attributes;
|
|
116
|
+
if ('convert_timestamp' in payload && convert_timestamp !== false) {
|
|
117
|
+
body = utils_1.convertAttributeTimestamps(body);
|
|
118
|
+
if (relationship_attributes) {
|
|
119
|
+
rel_attrs = utils_1.convertAttributeTimestamps(rel_attrs);
|
|
89
120
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
121
|
+
}
|
|
122
|
+
if ('created_at' in payload && !payload.created_at) {
|
|
123
|
+
delete body.created_at;
|
|
124
|
+
}
|
|
125
|
+
if (body.attributes && 'object_type_id' in body.attributes) {
|
|
126
|
+
delete body.attributes.object_type_id;
|
|
127
|
+
}
|
|
128
|
+
let action = 'identify';
|
|
129
|
+
if (user_id) {
|
|
130
|
+
action = 'identify';
|
|
131
|
+
const relationship = { identifiers: utils_1.resolveIdentifiers({ person_id: user_id }) };
|
|
132
|
+
if (relationship_attributes) {
|
|
133
|
+
relationship.relationship_attributes = rel_attrs;
|
|
95
134
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
135
|
+
body.cio_relationships = [relationship];
|
|
136
|
+
}
|
|
137
|
+
else if (anonymous_id) {
|
|
138
|
+
action = 'identify_anonymous';
|
|
139
|
+
const relationship = { identifiers: { anonymous_id } };
|
|
140
|
+
if (relationship_attributes) {
|
|
141
|
+
relationship.relationship_attributes = rel_attrs;
|
|
99
142
|
}
|
|
100
|
-
|
|
101
|
-
method: 'post',
|
|
102
|
-
json: body
|
|
103
|
-
});
|
|
143
|
+
body.cio_relationships = [relationship];
|
|
104
144
|
}
|
|
105
|
-
};
|
|
145
|
+
return { action, body };
|
|
146
|
+
}
|
|
106
147
|
exports.default = action;
|
|
107
148
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/customerio/createUpdateObject/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/customerio/createUpdateObject/index.ts"],"names":[],"mappings":";;AAGA,oCAAgG;AAIhG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,+DAA+D;IAC5E,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,EAAE,EAAE;YACF,KAAK,EAAE,WAAW;YAClB,WAAW,EACT,yHAAyH;YAC3H,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,WAAW;aACrB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,6CAA6C;YAC1D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;oBAC1C,IAAI,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;oBACxC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;iBACxC;aACF;SACF;QACD,iBAAiB,EAAE;YACjB,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACT,4GAA4G;YAC9G,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP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string;
|
|
4
4
|
email?: string;
|
|
5
5
|
created_at?: string;
|
|
@@ -7,6 +7,9 @@ export interface Payload {
|
|
|
7
7
|
custom_attributes?: {
|
|
8
8
|
[k: string]: unknown;
|
|
9
9
|
};
|
|
10
|
+
relationship_attributes?: {
|
|
11
|
+
[k: string]: unknown;
|
|
12
|
+
};
|
|
10
13
|
convert_timestamp?: boolean;
|
|
11
14
|
object_type_id?: string;
|
|
12
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ActionDefinition } from '@segment/actions-core';
|
|
2
1
|
import type { Settings } from '../generated-types';
|
|
3
2
|
import type { Payload } from './generated-types';
|
|
3
|
+
import { ActionDefinition } from '@segment/actions-core';
|
|
4
4
|
declare const action: ActionDefinition<Settings, Payload>;
|
|
5
5
|
export default action;
|