@segment/action-destinations 3.127.0 → 3.127.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/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 +1 -3
- package/dist/destinations/heap/trackEvent/index.js +5 -32
- package/dist/destinations/heap/trackEvent/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ const identifyUser_1 = __importDefault(require("./identifyUser"));
|
|
|
9
9
|
const presets = [
|
|
10
10
|
{
|
|
11
11
|
name: 'Track Calls',
|
|
12
|
-
subscribe: 'type = "track"
|
|
12
|
+
subscribe: 'type = "track"',
|
|
13
13
|
partnerAction: 'trackEvent',
|
|
14
14
|
mapping: actions_core_1.defaultValues(trackEvent_1.default.fields)
|
|
15
15
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/heap/index.ts"],"names":[],"mappings":";;;;;AAEA,8DAAqC;AACrC,wDAAqD;AACrD,kEAAyC;AAGzC,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/heap/index.ts"],"names":[],"mappings":";;;;;AAEA,8DAAqC;AACrC,wDAAqD;AACrD,kEAAyC;AAGzC,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,YAAY;QAC3B,OAAO,EAAE,4BAAa,CAAC,oBAAU,CAAC,MAAM,CAAC;KAC1C;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,mBAAmB;QAC9B,aAAa,EAAE,cAAc;QAC7B,OAAO,EAAE,4BAAa,CAAC,sBAAY,CAAC,MAAM,CAAC;KAC5C;CACF,CAAA;AAED,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,KAAK,EAAE;gBACL,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,mDAAmD;gBAChE,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IAED,OAAO;IACP,OAAO,EAAE;QACP,UAAU,EAAV,oBAAU;QACV,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -2,12 +2,10 @@ export interface Payload {
|
|
|
2
2
|
message_id: string;
|
|
3
3
|
identity?: string | null;
|
|
4
4
|
anonymous_id?: string | null;
|
|
5
|
-
event
|
|
5
|
+
event: string;
|
|
6
6
|
properties?: {
|
|
7
7
|
[k: string]: unknown;
|
|
8
8
|
};
|
|
9
9
|
timestamp?: string | number;
|
|
10
10
|
library_name?: string;
|
|
11
|
-
type: string;
|
|
12
|
-
name?: string;
|
|
13
11
|
}
|
|
@@ -11,7 +11,7 @@ const actions_core_1 = require("@segment/actions-core");
|
|
|
11
11
|
const action = {
|
|
12
12
|
title: 'Track Event',
|
|
13
13
|
description: 'Send an event to Heap.',
|
|
14
|
-
defaultSubscription: 'type = "track"
|
|
14
|
+
defaultSubscription: 'type = "track"',
|
|
15
15
|
fields: {
|
|
16
16
|
message_id: {
|
|
17
17
|
label: 'Message ID',
|
|
@@ -41,9 +41,10 @@ const action = {
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
event: {
|
|
44
|
-
label: '
|
|
44
|
+
label: 'Event Type',
|
|
45
45
|
type: 'string',
|
|
46
|
-
description: '
|
|
46
|
+
description: 'The name of the event. Limited to 1024 characters.',
|
|
47
|
+
required: true,
|
|
47
48
|
default: {
|
|
48
49
|
'@path': '$.event'
|
|
49
50
|
}
|
|
@@ -71,23 +72,6 @@ const action = {
|
|
|
71
72
|
default: {
|
|
72
73
|
'@path': '$.context.library.name'
|
|
73
74
|
}
|
|
74
|
-
},
|
|
75
|
-
type: {
|
|
76
|
-
label: 'Type',
|
|
77
|
-
type: 'string',
|
|
78
|
-
description: 'The type of call. Can be track, page, or screen.',
|
|
79
|
-
required: true,
|
|
80
|
-
default: {
|
|
81
|
-
'@path': '$.type'
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
name: {
|
|
85
|
-
label: 'Page or Screen Name',
|
|
86
|
-
type: 'string',
|
|
87
|
-
description: 'The name of the page or screen being viewed. This only exists for page and screen events.',
|
|
88
|
-
default: {
|
|
89
|
-
'@path': '$.name'
|
|
90
|
-
}
|
|
91
75
|
}
|
|
92
76
|
},
|
|
93
77
|
perform: (request, { payload, settings }) => {
|
|
@@ -102,7 +86,7 @@ const action = {
|
|
|
102
86
|
const eventProperties = Object.assign(defaultEventProperties, flatten);
|
|
103
87
|
const event = {
|
|
104
88
|
app_id: settings.appId,
|
|
105
|
-
event:
|
|
89
|
+
event: payload.event,
|
|
106
90
|
properties: eventProperties,
|
|
107
91
|
idempotency_key: payload.message_id
|
|
108
92
|
};
|
|
@@ -121,16 +105,5 @@ const action = {
|
|
|
121
105
|
});
|
|
122
106
|
}
|
|
123
107
|
};
|
|
124
|
-
const getEventName = (payload) => {
|
|
125
|
-
switch (payload.type) {
|
|
126
|
-
case 'track':
|
|
127
|
-
return payload.event;
|
|
128
|
-
case 'page':
|
|
129
|
-
case 'screen':
|
|
130
|
-
return payload.name;
|
|
131
|
-
default:
|
|
132
|
-
return undefined;
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
108
|
exports.default = action;
|
|
136
109
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/heap/trackEvent/index.ts"],"names":[],"mappings":";;;;;AAGA,+DAAsC;AACtC,4CAAwD;AACxD,8CAA6C;AAC7C,kCAA8B;AAC9B,wDAAwD;AAcxD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,wBAAwB;IACrC,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/heap/trackEvent/index.ts"],"names":[],"mappings":";;;;;AAGA,+DAAsC;AACtC,4CAAwD;AACxD,8CAA6C;AAC7C,kCAA8B;AAC9B,wDAAwD;AAcxD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,wBAAwB;IACrC,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EACT,6LAA6L;YAC/L,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,0CAA0C;YACvD,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,KAAK,EAAE;YACL,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oDAAoD;YACjE,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,kKAAkK;YACpK,OAAO,EAAE;gBACP,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Q,EAAE;YACpB,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;SAClC;QAED,IAAI,OAAO,CAAC,SAAS,IAAI,eAAK,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE;YAC/D,KAAK,CAAC,SAAS,GAAG,eAAK,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAA;SAC7D;QAED,OAAO,OAAO,CAAC,qCAAqC,EAAE;YACpD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,KAAK;SACZ,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segment/action-destinations",
|
|
3
3
|
"description": "Destination Actions engine and definitions.",
|
|
4
|
-
"version": "3.127.
|
|
4
|
+
"version": "3.127.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"lcov"
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "95dc062bc14f77bb3d424b14502108ea49f61b95"
|
|
69
69
|
}
|