@segment/action-destinations 3.50.0 → 3.50.2-alpha.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/adobe-target/adobeTarget_operations.js +2 -1
- package/dist/destinations/adobe-target/adobeTarget_operations.js.map +1 -1
- package/dist/destinations/gainsight-px-cloud-action/common-fields.js +5 -267
- package/dist/destinations/gainsight-px-cloud-action/common-fields.js.map +1 -1
- package/dist/destinations/gainsight-px-cloud-action/groupIdentify/generated-types.d.ts +0 -58
- package/dist/destinations/gainsight-px-cloud-action/groupIdentify/index.js +1 -22
- package/dist/destinations/gainsight-px-cloud-action/groupIdentify/index.js.map +1 -1
- package/dist/destinations/gainsight-px-cloud-action/identifyUser/generated-types.d.ts +0 -57
- package/dist/destinations/gainsight-px-cloud-action/identifyUser/index.js +1 -13
- package/dist/destinations/gainsight-px-cloud-action/identifyUser/index.js.map +1 -1
- package/dist/destinations/gainsight-px-cloud-action/index.js +5 -1
- package/dist/destinations/gainsight-px-cloud-action/index.js.map +1 -1
- package/dist/destinations/gainsight-px-cloud-action/regional-endpoints.d.ts +2 -0
- package/dist/destinations/gainsight-px-cloud-action/regional-endpoints.js +4 -2
- package/dist/destinations/gainsight-px-cloud-action/regional-endpoints.js.map +1 -1
- package/dist/destinations/gainsight-px-cloud-action/trackEvent/generated-types.d.ts +0 -58
- package/dist/destinations/gainsight-px-cloud-action/trackEvent/index.js +1 -21
- package/dist/destinations/gainsight-px-cloud-action/trackEvent/index.js.map +1 -1
- package/dist/destinations/gainsight-px-cloud-action/trackPageView/generated-types.d.ts +0 -61
- package/dist/destinations/gainsight-px-cloud-action/trackPageView/index.js +1 -44
- package/dist/destinations/gainsight-px-cloud-action/trackPageView/index.js.map +1 -1
- package/dist/destinations/metronome/index.js +1 -1
- package/dist/destinations/metronome/index.js.map +1 -1
- package/dist/destinations/metronome/sendEvent/index.js +5 -7
- package/dist/destinations/metronome/sendEvent/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -32,8 +32,9 @@ class AdobeTarget {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
this.lookupProfile = async (userId, clientCode) => {
|
|
35
|
+
const requestUrl = `https://${clientCode}.tt.omtrdc.net/rest/v1/profiles/thirdPartyId/${userId}?client=${clientCode}`;
|
|
35
36
|
try {
|
|
36
|
-
await this.request(
|
|
37
|
+
await this.request(requestUrl, { method: 'get' });
|
|
37
38
|
}
|
|
38
39
|
catch (error) {
|
|
39
40
|
return new actions_core_1.IntegrationError('No profile found in Adobe Target with this mbox3rdPartyId', 'Profile not found', 404);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adobeTarget_operations.js","sourceRoot":"","sources":["../../../src/destinations/adobe-target/adobeTarget_operations.ts"],"names":[],"mappings":";;AAAA,wDAAuE;AAEvE,SAAS,gBAAgB,CAAC,GAAyB,EAAE,UAAU,GAAG,EAAE,EAAE,aAAsC,EAAE;IAC5G,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC/B,MAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;QAChE,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE;YAC5C,UAAU,CAAC,cAAc,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAA;SACjD;aAAM;YACL,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,cAAc,EAAE,UAAU,CAAC,CAAA;SACvD;IACH,CAAC,CAAC,CAAA;IACF,OAAO,UAAU,CAAA;AACnB,CAAC;AACD,MAAM,mBAAmB,GAAG,CAAC,MAAmD,EAAE,EAAE,CAClF,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;KAChB,GAA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EAAE,UAAkB,EAAyC,EAAE;YAC1G,MAAM,UAAU,GAAG,WAAW,UAAU,gDAAgD,MAAM,WAAW,UAAU,EAAE,CAAA;YACrH,IAAI;gBACF,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAA;aAClD;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,IAAI,+BAAgB,CAAC,2DAA2D,EAAE,mBAAmB,EAAE,GAAG,CAAC,CAAA;aACnH;YAED,OAAO,SAAS,CAAA;QAClB,CAAC,CAAA;QA/BC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CA4BF;AAvCD,8BAuCC"}
|
|
@@ -2,276 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.commonFields = void 0;
|
|
4
4
|
exports.commonFields = {
|
|
5
|
-
|
|
6
|
-
label: '
|
|
7
|
-
type: 'string',
|
|
8
|
-
allowNull: true,
|
|
9
|
-
description: 'The generated anonymous ID for the user',
|
|
10
|
-
default: {
|
|
11
|
-
'@path': '$.anonymousId'
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
context: {
|
|
15
|
-
label: 'Event Context',
|
|
5
|
+
segmentEvent: {
|
|
6
|
+
label: 'Segment Event',
|
|
16
7
|
type: 'object',
|
|
17
|
-
description: '
|
|
18
|
-
required: true,
|
|
19
|
-
default: { '@path': '$.context' },
|
|
20
|
-
properties: {
|
|
21
|
-
campaign: {
|
|
22
|
-
label: 'UTM Properties',
|
|
23
|
-
type: 'object',
|
|
24
|
-
description: 'UTM Tracking Properties',
|
|
25
|
-
properties: {
|
|
26
|
-
source: {
|
|
27
|
-
label: 'UTM Source',
|
|
28
|
-
type: 'string',
|
|
29
|
-
default: { '@path': '$.context.campaign.source' }
|
|
30
|
-
},
|
|
31
|
-
medium: {
|
|
32
|
-
label: 'UTM Medium',
|
|
33
|
-
type: 'string',
|
|
34
|
-
default: { '@path': '$.context.campaign.medium' }
|
|
35
|
-
},
|
|
36
|
-
name: {
|
|
37
|
-
label: 'UTM Campaign',
|
|
38
|
-
type: 'string',
|
|
39
|
-
default: { '@path': '$.context.campaign.name' }
|
|
40
|
-
},
|
|
41
|
-
term: {
|
|
42
|
-
label: 'UTM Term',
|
|
43
|
-
type: 'string',
|
|
44
|
-
default: { '@path': '$.context.campaign.term' }
|
|
45
|
-
},
|
|
46
|
-
content: {
|
|
47
|
-
label: 'UTM Content',
|
|
48
|
-
type: 'string',
|
|
49
|
-
default: { '@path': '$.context.campaign.content' }
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
location: {
|
|
54
|
-
label: 'Location',
|
|
55
|
-
type: 'object',
|
|
56
|
-
description: 'information about the user’s current location',
|
|
57
|
-
properties: {
|
|
58
|
-
city: {
|
|
59
|
-
label: 'City',
|
|
60
|
-
type: 'string',
|
|
61
|
-
default: { '@path': '$.context.location.city' }
|
|
62
|
-
},
|
|
63
|
-
country: {
|
|
64
|
-
label: 'Country',
|
|
65
|
-
type: 'string',
|
|
66
|
-
default: { '@path': '$.context.location.country' }
|
|
67
|
-
},
|
|
68
|
-
latitude: {
|
|
69
|
-
label: 'Latitude',
|
|
70
|
-
type: 'number',
|
|
71
|
-
default: { '@path': '$.context.location.latitude' }
|
|
72
|
-
},
|
|
73
|
-
longitude: {
|
|
74
|
-
label: 'Longitude',
|
|
75
|
-
type: 'number',
|
|
76
|
-
default: { '@path': '$.context.location.longitude' }
|
|
77
|
-
},
|
|
78
|
-
region: {
|
|
79
|
-
label: 'Region',
|
|
80
|
-
type: 'string',
|
|
81
|
-
default: { '@path': '$.context.location.region' }
|
|
82
|
-
},
|
|
83
|
-
speed: {
|
|
84
|
-
label: 'Speed',
|
|
85
|
-
type: 'number',
|
|
86
|
-
default: { '@path': '$.context.location.speed' }
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
page: {
|
|
91
|
-
label: 'Page Properties',
|
|
92
|
-
type: 'object',
|
|
93
|
-
description: 'Current page properties',
|
|
94
|
-
properties: {
|
|
95
|
-
path: {
|
|
96
|
-
label: 'Page path',
|
|
97
|
-
type: 'string',
|
|
98
|
-
default: { '@path': '$.context.page.path' }
|
|
99
|
-
},
|
|
100
|
-
referrer: {
|
|
101
|
-
label: 'Referrer',
|
|
102
|
-
type: 'string',
|
|
103
|
-
default: { '@path': '$.context.page.referrer' }
|
|
104
|
-
},
|
|
105
|
-
search: {
|
|
106
|
-
label: 'Search',
|
|
107
|
-
type: 'string',
|
|
108
|
-
default: { '@path': '$.context.page.search' }
|
|
109
|
-
},
|
|
110
|
-
title: {
|
|
111
|
-
label: 'Title',
|
|
112
|
-
type: 'string',
|
|
113
|
-
default: { '@path': '$.context.page.title' }
|
|
114
|
-
},
|
|
115
|
-
url: {
|
|
116
|
-
label: 'Url',
|
|
117
|
-
type: 'string',
|
|
118
|
-
default: { '@path': '$.context.page.url' }
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
screen: {
|
|
123
|
-
label: 'Screen Properties',
|
|
124
|
-
type: 'object',
|
|
125
|
-
description: 'Screen Properties',
|
|
126
|
-
properties: {
|
|
127
|
-
width: {
|
|
128
|
-
label: 'Screen Width',
|
|
129
|
-
type: 'number',
|
|
130
|
-
default: { '@path': '$.context.screen.width' }
|
|
131
|
-
},
|
|
132
|
-
height: {
|
|
133
|
-
label: 'Screen Height',
|
|
134
|
-
type: 'number',
|
|
135
|
-
default: { '@path': '$.context.screen.height' }
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
app: {
|
|
140
|
-
label: 'Application Properties',
|
|
141
|
-
type: 'object',
|
|
142
|
-
description: 'Application Properties',
|
|
143
|
-
properties: {
|
|
144
|
-
name: {
|
|
145
|
-
label: 'Name',
|
|
146
|
-
type: 'string',
|
|
147
|
-
default: { '@path': '$.context.app.name' },
|
|
148
|
-
},
|
|
149
|
-
version: {
|
|
150
|
-
label: 'Version',
|
|
151
|
-
type: 'string',
|
|
152
|
-
default: { '@path': '$.context.app.version' }
|
|
153
|
-
},
|
|
154
|
-
build: {
|
|
155
|
-
label: 'Build',
|
|
156
|
-
type: 'string',
|
|
157
|
-
default: { '@path': '$.context.app.build' }
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
device: {
|
|
162
|
-
label: 'Device Properties',
|
|
163
|
-
type: 'object',
|
|
164
|
-
description: 'Device Properties',
|
|
165
|
-
default: { '@path': '$.context.device' }
|
|
166
|
-
},
|
|
167
|
-
network: {
|
|
168
|
-
label: 'Network Properties',
|
|
169
|
-
type: 'object',
|
|
170
|
-
description: 'Network Properties',
|
|
171
|
-
default: { '@path': '$.context.network' }
|
|
172
|
-
},
|
|
173
|
-
library: {
|
|
174
|
-
label: 'Library Properties',
|
|
175
|
-
type: 'object',
|
|
176
|
-
description: 'Device Properties',
|
|
177
|
-
properties: {
|
|
178
|
-
name: {
|
|
179
|
-
label: 'Name',
|
|
180
|
-
type: 'string',
|
|
181
|
-
default: { '@path': '$.context.library.name' },
|
|
182
|
-
},
|
|
183
|
-
version: {
|
|
184
|
-
label: 'Version',
|
|
185
|
-
type: 'string',
|
|
186
|
-
default: { '@path': '$.context.library.version' }
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
ip: {
|
|
191
|
-
label: 'Users IP address',
|
|
192
|
-
type: 'string',
|
|
193
|
-
description: 'Users IP address',
|
|
194
|
-
default: { '@path': '$.context.ip' }
|
|
195
|
-
},
|
|
196
|
-
locale: {
|
|
197
|
-
label: 'Users Locale string',
|
|
198
|
-
type: 'string',
|
|
199
|
-
description: 'Users Locale string',
|
|
200
|
-
default: { '@path': '$.context.locale' }
|
|
201
|
-
},
|
|
202
|
-
userAgent: {
|
|
203
|
-
label: 'User Agent string',
|
|
204
|
-
type: 'string',
|
|
205
|
-
description: 'User Agent string',
|
|
206
|
-
default: { '@path': '$.context.userAgent' }
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
messageId: {
|
|
211
|
-
type: 'string',
|
|
212
|
-
label: 'Message ID',
|
|
213
|
-
description: 'The message ID uniquely identifies an event to ensure each event is only processed once.',
|
|
214
|
-
required: true,
|
|
215
|
-
default: {
|
|
216
|
-
'@path': '$.messageId'
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
receivedAt: {
|
|
220
|
-
type: 'datetime',
|
|
221
|
-
label: 'receivedAt',
|
|
222
|
-
description: 'The timestamp at which this event was received.',
|
|
223
|
-
required: true,
|
|
224
|
-
default: {
|
|
225
|
-
'@path': '$.receivedAt'
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
sentAt: {
|
|
229
|
-
type: 'datetime',
|
|
230
|
-
label: 'sentAt',
|
|
231
|
-
description: 'The timestamp at which this was sent.',
|
|
232
|
-
required: true,
|
|
233
|
-
default: {
|
|
234
|
-
'@path': '$.sentAt'
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
timestamp: {
|
|
238
|
-
type: 'datetime',
|
|
239
|
-
label: 'timestamp',
|
|
240
|
-
description: 'The timestamp at which this event occurred.',
|
|
241
|
-
required: true,
|
|
242
|
-
default: {
|
|
243
|
-
'@path': '$.timestamp'
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
userId: {
|
|
247
|
-
label: 'User ID',
|
|
248
|
-
type: 'string',
|
|
249
|
-
allowNull: true,
|
|
250
|
-
required: true,
|
|
251
|
-
description: 'The unique user identifier',
|
|
252
|
-
default: {
|
|
253
|
-
'@path': '$.userId'
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
type: {
|
|
257
|
-
label: 'Type',
|
|
258
|
-
type: 'string',
|
|
259
|
-
allowNull: false,
|
|
260
|
-
required: true,
|
|
261
|
-
description: 'Segment event type',
|
|
262
|
-
default: {
|
|
263
|
-
'@path': '$.type'
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
version: {
|
|
267
|
-
label: 'Version',
|
|
268
|
-
type: 'number',
|
|
269
|
-
allowNull: true,
|
|
8
|
+
description: 'The raw Segment event',
|
|
270
9
|
required: false,
|
|
271
|
-
description: 'Version of the Segment Tracking API that received the message',
|
|
272
10
|
default: {
|
|
273
|
-
'@path': '$.
|
|
11
|
+
'@path': '$.'
|
|
274
12
|
}
|
|
275
|
-
}
|
|
13
|
+
}
|
|
276
14
|
};
|
|
277
15
|
//# sourceMappingURL=common-fields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-fields.js","sourceRoot":"","sources":["../../../src/destinations/gainsight-px-cloud-action/common-fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAA+B;IACtD,
|
|
1
|
+
{"version":3,"file":"common-fields.js","sourceRoot":"","sources":["../../../src/destinations/gainsight-px-cloud-action/common-fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAA+B;IACtD,YAAY,EAAE;QACZ,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,uBAAuB;QACpC,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE;YACP,OAAO,EAAE,IAAI;SACd;KACF;CACF,CAAA"}
|
|
@@ -1,60 +1,2 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
groupId: string;
|
|
3
|
-
traits: {
|
|
4
|
-
[k: string]: unknown;
|
|
5
|
-
};
|
|
6
|
-
anonymousId?: string | null;
|
|
7
|
-
context: {
|
|
8
|
-
campaign?: {
|
|
9
|
-
source?: string;
|
|
10
|
-
medium?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
term?: string;
|
|
13
|
-
content?: string;
|
|
14
|
-
};
|
|
15
|
-
location?: {
|
|
16
|
-
city?: string;
|
|
17
|
-
country?: string;
|
|
18
|
-
latitude?: number;
|
|
19
|
-
longitude?: number;
|
|
20
|
-
region?: string;
|
|
21
|
-
speed?: number;
|
|
22
|
-
};
|
|
23
|
-
page?: {
|
|
24
|
-
path?: string;
|
|
25
|
-
referrer?: string;
|
|
26
|
-
search?: string;
|
|
27
|
-
title?: string;
|
|
28
|
-
url?: string;
|
|
29
|
-
};
|
|
30
|
-
screen?: {
|
|
31
|
-
width?: number;
|
|
32
|
-
height?: number;
|
|
33
|
-
};
|
|
34
|
-
app?: {
|
|
35
|
-
name?: string;
|
|
36
|
-
version?: string;
|
|
37
|
-
build?: string;
|
|
38
|
-
};
|
|
39
|
-
device?: {
|
|
40
|
-
[k: string]: unknown;
|
|
41
|
-
};
|
|
42
|
-
network?: {
|
|
43
|
-
[k: string]: unknown;
|
|
44
|
-
};
|
|
45
|
-
library?: {
|
|
46
|
-
name?: string;
|
|
47
|
-
version?: string;
|
|
48
|
-
};
|
|
49
|
-
ip?: string;
|
|
50
|
-
locale?: string;
|
|
51
|
-
userAgent?: string;
|
|
52
|
-
};
|
|
53
|
-
messageId: string;
|
|
54
|
-
receivedAt: string | number;
|
|
55
|
-
sentAt: string | number;
|
|
56
|
-
timestamp: string | number;
|
|
57
|
-
userId: string | null;
|
|
58
|
-
type: string;
|
|
59
|
-
version?: number | null;
|
|
60
2
|
}
|
|
@@ -1,32 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const regional_endpoints_1 = require("../regional-endpoints");
|
|
4
|
-
const common_fields_1 = require("../common-fields");
|
|
5
4
|
const action = {
|
|
6
5
|
title: 'Group Identify User',
|
|
7
6
|
description: 'Updates or adds properties to an account. The account is created if it does not exist.',
|
|
8
7
|
defaultSubscription: 'type = "group"',
|
|
9
|
-
fields: {
|
|
10
|
-
groupId: {
|
|
11
|
-
label: 'Account ID',
|
|
12
|
-
type: 'string',
|
|
13
|
-
description: 'The unique identifier of the account.',
|
|
14
|
-
required: true,
|
|
15
|
-
default: {
|
|
16
|
-
'@path': '$.groupId'
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
traits: {
|
|
20
|
-
label: 'User Properties',
|
|
21
|
-
type: 'object',
|
|
22
|
-
description: 'Properties to set on the user profile',
|
|
23
|
-
required: true,
|
|
24
|
-
default: {
|
|
25
|
-
'@path': '$.traits'
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
...common_fields_1.commonFields
|
|
29
|
-
},
|
|
8
|
+
fields: {},
|
|
30
9
|
perform: (request, { payload, settings }) => {
|
|
31
10
|
return request(regional_endpoints_1.getEndpointByRegion('track', settings.dataCenter), {
|
|
32
11
|
method: 'post',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/gainsight-px-cloud-action/groupIdentify/index.ts"],"names":[],"mappings":";;AAGA,8DAA2D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/gainsight-px-cloud-action/groupIdentify/index.ts"],"names":[],"mappings":";;AAGA,8DAA2D;AAE3D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,wFAAwF;IACrG,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAE1C,OAAO,OAAO,CAAC,wCAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE;YAChE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,59 +1,2 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
traits: {
|
|
3
|
-
[k: string]: unknown;
|
|
4
|
-
};
|
|
5
|
-
anonymousId?: string | null;
|
|
6
|
-
context: {
|
|
7
|
-
campaign?: {
|
|
8
|
-
source?: string;
|
|
9
|
-
medium?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
term?: string;
|
|
12
|
-
content?: string;
|
|
13
|
-
};
|
|
14
|
-
location?: {
|
|
15
|
-
city?: string;
|
|
16
|
-
country?: string;
|
|
17
|
-
latitude?: number;
|
|
18
|
-
longitude?: number;
|
|
19
|
-
region?: string;
|
|
20
|
-
speed?: number;
|
|
21
|
-
};
|
|
22
|
-
page?: {
|
|
23
|
-
path?: string;
|
|
24
|
-
referrer?: string;
|
|
25
|
-
search?: string;
|
|
26
|
-
title?: string;
|
|
27
|
-
url?: string;
|
|
28
|
-
};
|
|
29
|
-
screen?: {
|
|
30
|
-
width?: number;
|
|
31
|
-
height?: number;
|
|
32
|
-
};
|
|
33
|
-
app?: {
|
|
34
|
-
name?: string;
|
|
35
|
-
version?: string;
|
|
36
|
-
build?: string;
|
|
37
|
-
};
|
|
38
|
-
device?: {
|
|
39
|
-
[k: string]: unknown;
|
|
40
|
-
};
|
|
41
|
-
network?: {
|
|
42
|
-
[k: string]: unknown;
|
|
43
|
-
};
|
|
44
|
-
library?: {
|
|
45
|
-
name?: string;
|
|
46
|
-
version?: string;
|
|
47
|
-
};
|
|
48
|
-
ip?: string;
|
|
49
|
-
locale?: string;
|
|
50
|
-
userAgent?: string;
|
|
51
|
-
};
|
|
52
|
-
messageId: string;
|
|
53
|
-
receivedAt: string | number;
|
|
54
|
-
sentAt: string | number;
|
|
55
|
-
timestamp: string | number;
|
|
56
|
-
userId: string | null;
|
|
57
|
-
type: string;
|
|
58
|
-
version?: number | null;
|
|
59
2
|
}
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const regional_endpoints_1 = require("../regional-endpoints");
|
|
4
|
-
const common_fields_1 = require("../common-fields");
|
|
5
4
|
const action = {
|
|
6
5
|
title: 'Identify User',
|
|
7
6
|
description: 'Set the user ID for a particular device ID or update user properties',
|
|
8
7
|
defaultSubscription: 'type = "identify"',
|
|
9
|
-
fields: {
|
|
10
|
-
traits: {
|
|
11
|
-
label: 'User Properties',
|
|
12
|
-
type: 'object',
|
|
13
|
-
description: 'Properties to set on the user profile',
|
|
14
|
-
required: true,
|
|
15
|
-
default: {
|
|
16
|
-
'@path': '$.traits'
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
...common_fields_1.commonFields
|
|
20
|
-
},
|
|
8
|
+
fields: {},
|
|
21
9
|
perform: (request, { payload, settings }) => {
|
|
22
10
|
return request(regional_endpoints_1.getEndpointByRegion('track', settings.dataCenter), {
|
|
23
11
|
method: 'post',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/gainsight-px-cloud-action/identifyUser/index.ts"],"names":[],"mappings":";;AAGA,8DAA2D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/gainsight-px-cloud-action/identifyUser/index.ts"],"names":[],"mappings":";;AAGA,8DAA2D;AAE3D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,sEAAsE;IACnF,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAE1C,OAAO,OAAO,CAAC,wCAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE;YAChE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -37,7 +37,7 @@ const presets = [
|
|
|
37
37
|
}
|
|
38
38
|
];
|
|
39
39
|
const destination = {
|
|
40
|
-
name: 'Gainsight
|
|
40
|
+
name: 'Gainsight PX Cloud (Actions)',
|
|
41
41
|
slug: 'actions-gainsight-px-cloud',
|
|
42
42
|
mode: 'cloud',
|
|
43
43
|
authentication: {
|
|
@@ -63,6 +63,10 @@ const destination = {
|
|
|
63
63
|
{
|
|
64
64
|
label: 'Europe',
|
|
65
65
|
value: 'europe'
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: 'US2',
|
|
69
|
+
value: 'us2'
|
|
66
70
|
}
|
|
67
71
|
]
|
|
68
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/gainsight-px-cloud-action/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAwD;AAExD,wDAAqD;AAErD,6DAA0D;AAC1D,kEAAyC;AACzC,oEAA2C;AAC3C,8DAAqC;AACrC,oEAA2C;AAG3C,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,mBAAmB;QAC9B,aAAa,EAAE,cAAc;QAC7B,OAAO,EAAE,4BAAa,CAAC,sBAAY,CAAC,MAAM,CAAC;KAC5C;IACD;QACE,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,eAAe;QAC9B,OAAO,EAAE,4BAAa,CAAC,uBAAa,CAAC,MAAM,CAAC;KAC7C;IACD;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,iBAAiB;QACvB,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,eAAe;QAC9B,OAAO,EAAE,4BAAa,CAAC,uBAAa,CAAC,MAAM,CAAC;KAC7C;CACF,CAAA;AAED,MAAM,WAAW,GAAoC;IACnD,IAAI,EA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ACD,OAAO;IACP,OAAO,EAAE;QACP,YAAY,EAAZ,sBAAY;QACZ,aAAa,EAAb,uBAAa;QACb,UAAU,EAAV,oBAAU;QACV,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/gainsight-px-cloud-action/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAwD;AAExD,wDAAqD;AAErD,6DAA0D;AAC1D,kEAAyC;AACzC,oEAA2C;AAC3C,8DAAqC;AACrC,oEAA2C;AAG3C,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,mBAAmB;QAC9B,aAAa,EAAE,cAAc;QAC7B,OAAO,EAAE,4BAAa,CAAC,sBAAY,CAAC,MAAM,CAAC;KAC5C;IACD;QACE,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,eAAe;QAC9B,OAAO,EAAE,4BAAa,CAAC,uBAAa,CAAC,MAAM,CAAC;KAC7C;IACD;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,iBAAiB;QACvB,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,eAAe;QAC9B,OAAO,EAAE,4BAAa,CAAC,uBAAa,CAAC,MAAM,CAAC;KAC7C;CACF,CAAA;AAED,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,8BAA8B;IACpC,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,OAAO;QACf,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,sFAAsF;gBACnG,IAAI,EAAE,QAA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e,WAAW,CAAA"}
|
|
@@ -2,10 +2,12 @@ export declare const endpoints: {
|
|
|
2
2
|
track: {
|
|
3
3
|
north_america: string;
|
|
4
4
|
europe: string;
|
|
5
|
+
us2: string;
|
|
5
6
|
};
|
|
6
7
|
batch: {
|
|
7
8
|
north_america: string;
|
|
8
9
|
europe: string;
|
|
10
|
+
us2: string;
|
|
9
11
|
};
|
|
10
12
|
};
|
|
11
13
|
export declare function getEndpointByRegion(endpoint: keyof typeof endpoints, region?: string): string;
|
|
@@ -4,11 +4,13 @@ exports.getEndpointByRegion = exports.endpoints = void 0;
|
|
|
4
4
|
exports.endpoints = {
|
|
5
5
|
track: {
|
|
6
6
|
north_america: 'https://segment-esp.aptrinsic.com/rte/segmentio/v1/push',
|
|
7
|
-
europe: 'https://segment-esp-eu.aptrinsic.com/rte/segmentio/v1/push'
|
|
7
|
+
europe: 'https://segment-esp-eu.aptrinsic.com/rte/segmentio/v1/push',
|
|
8
|
+
us2: 'https://segment-esp-us2.aptrinsic.com/rte/segmentio/v1/push',
|
|
8
9
|
},
|
|
9
10
|
batch: {
|
|
10
11
|
north_america: 'https://segment-esp.aptrinsic.com/rte/segmentio/v1/batch',
|
|
11
|
-
europe: 'https://segment-esp-eu.aptrinsic.com/rte/segmentio/v1/batch'
|
|
12
|
+
europe: 'https://segment-esp-eu.aptrinsic.com/rte/segmentio/v1/batch',
|
|
13
|
+
us2: 'https://segment-esp-us2.aptrinsic.com/rte/segmentio/v1/push',
|
|
12
14
|
},
|
|
13
15
|
};
|
|
14
16
|
function getEndpointByRegion(endpoint, region) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regional-endpoints.js","sourceRoot":"","sources":["../../../src/destinations/gainsight-px-cloud-action/regional-endpoints.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IACvB,KAAK,EAAE;QACL,aAAa,EAAE,yDAAyD;QACxE,MAAM,EAAE,4DAA4D;
|
|
1
|
+
{"version":3,"file":"regional-endpoints.js","sourceRoot":"","sources":["../../../src/destinations/gainsight-px-cloud-action/regional-endpoints.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IACvB,KAAK,EAAE;QACL,aAAa,EAAE,yDAAyD;QACxE,MAAM,EAAE,4DAA4D;QACpE,GAAG,EAAE,6DAA6D;KAEnE;IACD,KAAK,EAAE;QACL,aAAa,EAAE,0DAA0D;QACzE,MAAM,EAAE,6DAA6D;QACrE,GAAG,EAAE,6DAA6D;KACnE;CACF,CAAA;AAYD,SAAgB,mBAAmB,CAAC,QAAgC,EAAE,MAAe;IACnF,OAAO,iBAAS,CAAC,QAAQ,CAAC,CAAC,MAAgB,CAAC,IAAI,iBAAS,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,CAAA;AACtF,CAAC;AAFD,kDAEC;AAED,kBAAe,iBAAS,CAAA"}
|
|
@@ -1,60 +1,2 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
event: string;
|
|
3
|
-
properties?: {
|
|
4
|
-
[k: string]: unknown;
|
|
5
|
-
};
|
|
6
|
-
anonymousId?: string | null;
|
|
7
|
-
context: {
|
|
8
|
-
campaign?: {
|
|
9
|
-
source?: string;
|
|
10
|
-
medium?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
term?: string;
|
|
13
|
-
content?: string;
|
|
14
|
-
};
|
|
15
|
-
location?: {
|
|
16
|
-
city?: string;
|
|
17
|
-
country?: string;
|
|
18
|
-
latitude?: number;
|
|
19
|
-
longitude?: number;
|
|
20
|
-
region?: string;
|
|
21
|
-
speed?: number;
|
|
22
|
-
};
|
|
23
|
-
page?: {
|
|
24
|
-
path?: string;
|
|
25
|
-
referrer?: string;
|
|
26
|
-
search?: string;
|
|
27
|
-
title?: string;
|
|
28
|
-
url?: string;
|
|
29
|
-
};
|
|
30
|
-
screen?: {
|
|
31
|
-
width?: number;
|
|
32
|
-
height?: number;
|
|
33
|
-
};
|
|
34
|
-
app?: {
|
|
35
|
-
name?: string;
|
|
36
|
-
version?: string;
|
|
37
|
-
build?: string;
|
|
38
|
-
};
|
|
39
|
-
device?: {
|
|
40
|
-
[k: string]: unknown;
|
|
41
|
-
};
|
|
42
|
-
network?: {
|
|
43
|
-
[k: string]: unknown;
|
|
44
|
-
};
|
|
45
|
-
library?: {
|
|
46
|
-
name?: string;
|
|
47
|
-
version?: string;
|
|
48
|
-
};
|
|
49
|
-
ip?: string;
|
|
50
|
-
locale?: string;
|
|
51
|
-
userAgent?: string;
|
|
52
|
-
};
|
|
53
|
-
messageId: string;
|
|
54
|
-
receivedAt: string | number;
|
|
55
|
-
sentAt: string | number;
|
|
56
|
-
timestamp: string | number;
|
|
57
|
-
userId: string | null;
|
|
58
|
-
type: string;
|
|
59
|
-
version?: number | null;
|
|
60
2
|
}
|
|
@@ -1,31 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const regional_endpoints_1 = require("../regional-endpoints");
|
|
4
|
-
const common_fields_1 = require("../common-fields");
|
|
5
4
|
const action = {
|
|
6
5
|
title: 'Track Event',
|
|
7
6
|
description: 'Send an event to Gainsight PX',
|
|
8
7
|
defaultSubscription: 'type = "track"',
|
|
9
|
-
fields: {
|
|
10
|
-
event: {
|
|
11
|
-
label: 'Event Name',
|
|
12
|
-
type: 'string',
|
|
13
|
-
description: 'A unique identifier for your event.',
|
|
14
|
-
required: true,
|
|
15
|
-
default: {
|
|
16
|
-
'@path': '$.event'
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
properties: {
|
|
20
|
-
label: 'Event Properties',
|
|
21
|
-
type: 'object',
|
|
22
|
-
description: 'An object of key-value pairs that represent additional data to be sent along with the event.',
|
|
23
|
-
default: {
|
|
24
|
-
'@path': '$.properties'
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
...common_fields_1.commonFields
|
|
28
|
-
},
|
|
8
|
+
fields: {},
|
|
29
9
|
perform: (request, { payload, settings }) => {
|
|
30
10
|
return request(regional_endpoints_1.getEndpointByRegion('track', settings.dataCenter), {
|
|
31
11
|
method: 'post',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/gainsight-px-cloud-action/trackEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAA2D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/gainsight-px-cloud-action/trackEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAA2D;AAE3D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,+BAA+B;IAC5C,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAE1C,OAAO,OAAO,CAAC,wCAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE;YAChE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,63 +1,2 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
name: string | null;
|
|
3
|
-
properties: {
|
|
4
|
-
url?: string;
|
|
5
|
-
title?: string;
|
|
6
|
-
referrer?: string;
|
|
7
|
-
path?: string;
|
|
8
|
-
};
|
|
9
|
-
anonymousId?: string | null;
|
|
10
|
-
context: {
|
|
11
|
-
campaign?: {
|
|
12
|
-
source?: string;
|
|
13
|
-
medium?: string;
|
|
14
|
-
name?: string;
|
|
15
|
-
term?: string;
|
|
16
|
-
content?: string;
|
|
17
|
-
};
|
|
18
|
-
location?: {
|
|
19
|
-
city?: string;
|
|
20
|
-
country?: string;
|
|
21
|
-
latitude?: number;
|
|
22
|
-
longitude?: number;
|
|
23
|
-
region?: string;
|
|
24
|
-
speed?: number;
|
|
25
|
-
};
|
|
26
|
-
page?: {
|
|
27
|
-
path?: string;
|
|
28
|
-
referrer?: string;
|
|
29
|
-
search?: string;
|
|
30
|
-
title?: string;
|
|
31
|
-
url?: string;
|
|
32
|
-
};
|
|
33
|
-
screen?: {
|
|
34
|
-
width?: number;
|
|
35
|
-
height?: number;
|
|
36
|
-
};
|
|
37
|
-
app?: {
|
|
38
|
-
name?: string;
|
|
39
|
-
version?: string;
|
|
40
|
-
build?: string;
|
|
41
|
-
};
|
|
42
|
-
device?: {
|
|
43
|
-
[k: string]: unknown;
|
|
44
|
-
};
|
|
45
|
-
network?: {
|
|
46
|
-
[k: string]: unknown;
|
|
47
|
-
};
|
|
48
|
-
library?: {
|
|
49
|
-
name?: string;
|
|
50
|
-
version?: string;
|
|
51
|
-
};
|
|
52
|
-
ip?: string;
|
|
53
|
-
locale?: string;
|
|
54
|
-
userAgent?: string;
|
|
55
|
-
};
|
|
56
|
-
messageId: string;
|
|
57
|
-
receivedAt: string | number;
|
|
58
|
-
sentAt: string | number;
|
|
59
|
-
timestamp: string | number;
|
|
60
|
-
userId: string | null;
|
|
61
|
-
type: string;
|
|
62
|
-
version?: number | null;
|
|
63
2
|
}
|
|
@@ -1,54 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const regional_endpoints_1 = require("../regional-endpoints");
|
|
4
|
-
const common_fields_1 = require("../common-fields");
|
|
5
4
|
const action = {
|
|
6
5
|
title: 'Track Page View',
|
|
7
6
|
description: 'Send a page view event to Gainsight PX',
|
|
8
7
|
defaultSubscription: 'type = "page"',
|
|
9
|
-
fields: {
|
|
10
|
-
name: {
|
|
11
|
-
label: 'Page Name',
|
|
12
|
-
type: 'string',
|
|
13
|
-
allowNull: true,
|
|
14
|
-
required: true,
|
|
15
|
-
description: 'The name of the page',
|
|
16
|
-
default: {
|
|
17
|
-
'@path': '$.name'
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
properties: {
|
|
21
|
-
label: 'Page Properties',
|
|
22
|
-
type: 'object',
|
|
23
|
-
description: 'Page Properties',
|
|
24
|
-
required: true,
|
|
25
|
-
properties: {
|
|
26
|
-
url: {
|
|
27
|
-
label: 'Page Url',
|
|
28
|
-
type: 'string'
|
|
29
|
-
},
|
|
30
|
-
title: {
|
|
31
|
-
label: 'Page Title',
|
|
32
|
-
type: 'string'
|
|
33
|
-
},
|
|
34
|
-
referrer: {
|
|
35
|
-
label: 'Page Referrer',
|
|
36
|
-
type: 'string'
|
|
37
|
-
},
|
|
38
|
-
path: {
|
|
39
|
-
label: 'Path portion of the current page URL',
|
|
40
|
-
type: 'string'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
default: {
|
|
44
|
-
url: { '@path': '$.properties.url' },
|
|
45
|
-
title: { '@path': '$.properties.title' },
|
|
46
|
-
referrer: { '@path': '$.properties.referrer' },
|
|
47
|
-
path: { '@path': '$.properties.path' }
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
...common_fields_1.commonFields
|
|
51
|
-
},
|
|
8
|
+
fields: {},
|
|
52
9
|
perform: (request, { payload, settings }) => {
|
|
53
10
|
return request(regional_endpoints_1.getEndpointByRegion('track', settings.dataCenter), {
|
|
54
11
|
method: 'post',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/gainsight-px-cloud-action/trackPageView/index.ts"],"names":[],"mappings":";;AAGA,8DAA2D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/gainsight-px-cloud-action/trackPageView/index.ts"],"names":[],"mappings":";;AAGA,8DAA2D;AAE3D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,wCAAwC;IACrD,mBAAmB,EAAE,eAAe;IACpC,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAE1C,OAAO,OAAO,CAAC,wCAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE;YAChE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -20,7 +20,7 @@ const destination = {
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
testAuthentication: async (request) => {
|
|
23
|
-
const response = await request('https://api.
|
|
23
|
+
const response = await request('https://api.metronome.com/v1/ingest', {
|
|
24
24
|
method: 'post',
|
|
25
25
|
json: [],
|
|
26
26
|
throwHttpErrors: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/metronome/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAG5E,4DAAmC;AAEnC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,mBAAmB;IAEzB,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,0BAA0B;gBACvC,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YACpC,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/metronome/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAG5E,4DAAmC;AAEnC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,mBAAmB;IAEzB,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,0BAA0B;gBACvC,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YACpC,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,qCAAqC,EAAE;gBACpE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,EAAE;gBACR,eAAe,EAAE,KAAK;aACvB,CAAC,CAAA;YAEF,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;gBAC3B,OAAO,IAAI,CAAA;aACZ;YACD,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;QACtC,CAAC;KACF;IACD,aAAa,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC9B,OAAO;YACL,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,QAAQ,CAAC,QAAQ,EAAE,EAAE;SAC1D,CAAA;IACH,CAAC;IACD,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;KACV;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,gCAAgC;YACtC,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,WAAW;YAC1B,OAAO,EAAE,4BAAa,CAAC,mBAAS,CAAC,MAAM,CAAC;SACzC;KACF;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -7,7 +7,7 @@ const dayjs_1 = __importDefault(require("../../../lib/dayjs"));
|
|
|
7
7
|
function serializeEvent(event) {
|
|
8
8
|
return {
|
|
9
9
|
...event,
|
|
10
|
-
timestamp: dayjs_1.default.utc(event.timestamp).toISOString()
|
|
10
|
+
timestamp: dayjs_1.default.utc(event.timestamp).toISOString()
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
const action = {
|
|
@@ -58,16 +58,14 @@ const action = {
|
|
|
58
58
|
default: {
|
|
59
59
|
'@path': '$.properties'
|
|
60
60
|
}
|
|
61
|
-
}
|
|
61
|
+
}
|
|
62
62
|
},
|
|
63
63
|
perform: (request, { payload }) => {
|
|
64
|
-
return request('https://api.
|
|
64
|
+
return request('https://api.metronome.com/v1/ingest', {
|
|
65
65
|
method: 'post',
|
|
66
|
-
json: [
|
|
67
|
-
serializeEvent(payload)
|
|
68
|
-
]
|
|
66
|
+
json: [serializeEvent(payload)]
|
|
69
67
|
});
|
|
70
|
-
}
|
|
68
|
+
}
|
|
71
69
|
};
|
|
72
70
|
exports.default = action;
|
|
73
71
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/metronome/sendEvent/index.ts"],"names":[],"mappings":";;;;;AAGA,+DAAsC;AAEtC,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO;QACL,GAAG,KAAK;QAWR,SAAS,EAAE,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;KACpD,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,4BAA4B;IACzC,MAAM,EAAE;QACN,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,gBAAgB;YACvB,WAAW,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/metronome/sendEvent/index.ts"],"names":[],"mappings":";;;;;AAGA,+DAAsC;AAEtC,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO;QACL,GAAG,KAAK;QAWR,SAAS,EAAE,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;KACpD,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,4BAA4B;IACzC,MAAM,EAAE;QACN,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,gBAAgB;YACvB,WAAW,EACT,+GAA+G;YACjH,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,iFAAiF;YAC9F,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,mBAAmB;aAC7B;SACF;QACD,SAAS,EAAE;YACT,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAEhC,OAAO,OAAO,CAAC,qCAAqC,EAAE;YACpD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;SAChC,CAAC,CAAA;IACJ,CAAC;CAOF,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.50.
|
|
4
|
+
"version": "3.50.2-alpha.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"<rootDir>/test/setup-after-env.ts"
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "81eab8f506f42cb2fa22e51e37ca9e38e90fa7e3"
|
|
66
66
|
}
|