@segment/action-destinations 3.114.1-alpha.5 → 3.115.1-1plusxassetapi.12
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/1plusx-asset-api/generated-types.d.ts +5 -0
- package/dist/destinations/1plusx-asset-api/generated-types.js +3 -0
- package/dist/destinations/1plusx-asset-api/generated-types.js.map +1 -0
- package/dist/destinations/1plusx-asset-api/index.d.ts +4 -0
- package/dist/destinations/1plusx-asset-api/index.js +61 -0
- package/dist/destinations/1plusx-asset-api/index.js.map +1 -0
- package/dist/destinations/1plusx-asset-api/sendAssetData/generated-types.d.ts +8 -0
- package/dist/destinations/1plusx-asset-api/sendAssetData/generated-types.js +3 -0
- package/dist/destinations/1plusx-asset-api/sendAssetData/generated-types.js.map +1 -0
- package/dist/destinations/1plusx-asset-api/sendAssetData/index.d.ts +5 -0
- package/dist/destinations/1plusx-asset-api/sendAssetData/index.js +67 -0
- package/dist/destinations/1plusx-asset-api/sendAssetData/index.js.map +1 -0
- package/dist/destinations/amplitude/user-agent.js +2 -2
- package/dist/destinations/amplitude/user-agent.js.map +1 -1
- package/dist/destinations/fullstory/vars.js +22 -13
- package/dist/destinations/fullstory/vars.js.map +1 -1
- package/dist/destinations/index.js +2 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/linkedin-audiences/updateAudience/index.js +1 -0
- package/dist/destinations/linkedin-audiences/updateAudience/index.js.map +1 -1
- package/dist/destinations/mixpanel/identifyUser/index.js +2 -1
- package/dist/destinations/mixpanel/identifyUser/index.js.map +1 -1
- package/dist/destinations/mixpanel/mixpanel-properties.js +2 -1
- package/dist/destinations/mixpanel/mixpanel-properties.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/generated-types.d.ts +13 -13
- package/dist/destinations/mixpanel/trackEvent/index.js +5 -318
- package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
- package/dist/destinations/mixpanel/utils.d.ts +1 -0
- package/dist/destinations/mixpanel/utils.js +5 -1
- package/dist/destinations/mixpanel/utils.js.map +1 -1
- package/dist/destinations/segment/errors.d.ts +3 -0
- package/dist/destinations/segment/errors.js +7 -0
- package/dist/destinations/segment/errors.js.map +1 -0
- package/dist/destinations/segment/generated-types.d.ts +4 -0
- package/dist/destinations/segment/generated-types.js +3 -0
- package/dist/destinations/segment/generated-types.js.map +1 -0
- package/dist/destinations/segment/index.d.ts +4 -0
- package/dist/destinations/segment/index.js +58 -0
- package/dist/destinations/segment/index.js.map +1 -0
- package/dist/destinations/segment/properties.d.ts +10 -0
- package/dist/destinations/segment/properties.js +17 -0
- package/dist/destinations/segment/properties.js.map +1 -0
- package/dist/destinations/segment/segment-properties.d.ts +23 -0
- package/dist/destinations/segment/segment-properties.js +322 -0
- package/dist/destinations/segment/segment-properties.js.map +1 -0
- package/dist/destinations/segment/sendGroup/generated-types.d.ts +65 -0
- package/dist/destinations/segment/sendGroup/generated-types.js +3 -0
- package/dist/destinations/segment/sendGroup/generated-types.js.map +1 -0
- package/dist/destinations/segment/sendGroup/index.d.ts +5 -0
- package/dist/destinations/segment/sendGroup/index.js +67 -0
- package/dist/destinations/segment/sendGroup/index.js.map +1 -0
- package/dist/destinations/segment/sendIdentify/generated-types.d.ts +65 -0
- package/dist/destinations/segment/sendIdentify/generated-types.js +3 -0
- package/dist/destinations/segment/sendIdentify/generated-types.js.map +1 -0
- package/dist/destinations/segment/sendIdentify/index.d.ts +5 -0
- package/dist/destinations/segment/sendIdentify/index.js +67 -0
- package/dist/destinations/segment/sendIdentify/index.js.map +1 -0
- package/dist/destinations/segment/sendPage/generated-types.d.ts +67 -0
- package/dist/destinations/segment/sendPage/generated-types.js +3 -0
- package/dist/destinations/segment/sendPage/generated-types.js.map +1 -0
- package/dist/destinations/segment/sendPage/index.d.ts +5 -0
- package/dist/destinations/segment/sendPage/index.js +77 -0
- package/dist/destinations/segment/sendPage/index.js.map +1 -0
- package/dist/destinations/segment/sendScreen/generated-types.d.ts +66 -0
- package/dist/destinations/segment/sendScreen/generated-types.js +3 -0
- package/dist/destinations/segment/sendScreen/generated-types.js.map +1 -0
- package/dist/destinations/segment/sendScreen/index.d.ts +5 -0
- package/dist/destinations/segment/sendScreen/index.js +69 -0
- package/dist/destinations/segment/sendScreen/index.js.map +1 -0
- package/dist/destinations/segment/sendTrack/generated-types.d.ts +66 -0
- package/dist/destinations/segment/sendTrack/generated-types.js +3 -0
- package/dist/destinations/segment/sendTrack/generated-types.js.map +1 -0
- package/dist/destinations/segment/sendTrack/index.d.ts +5 -0
- package/dist/destinations/segment/sendTrack/index.js +69 -0
- package/dist/destinations/segment/sendTrack/index.js.map +1 -0
- package/dist/destinations/webhook/send/index.js +1 -3
- package/dist/destinations/webhook/send/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -3,8 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
6
7
|
const utils_1 = require("../utils");
|
|
7
8
|
const dayjs_1 = __importDefault(require("../../../lib/dayjs"));
|
|
9
|
+
const mixpanel_properties_1 = require("../mixpanel-properties");
|
|
10
|
+
const mixpanelReservedProperties = ['time', 'id', '$anon_id', 'distinct_id', '$group_id', '$insert_id', '$user_id'];
|
|
8
11
|
const getEventFromPayload = (payload, settings) => {
|
|
9
12
|
const datetime = payload.time;
|
|
10
13
|
const time = datetime && dayjs_1.default.utc(datetime).isValid() ? dayjs_1.default.utc(datetime).valueOf() : Date.now();
|
|
@@ -61,7 +64,7 @@ const getEventFromPayload = (payload, settings) => {
|
|
|
61
64
|
utm_medium: utm.utm_medium,
|
|
62
65
|
utm_source: utm.utm_source,
|
|
63
66
|
utm_term: utm.utm_term,
|
|
64
|
-
...payload.event_properties
|
|
67
|
+
...actions_core_1.omit(payload.event_properties, mixpanelReservedProperties)
|
|
65
68
|
}
|
|
66
69
|
};
|
|
67
70
|
return event;
|
|
@@ -106,323 +109,7 @@ const action = {
|
|
|
106
109
|
'@path': '$.userId'
|
|
107
110
|
}
|
|
108
111
|
},
|
|
109
|
-
|
|
110
|
-
label: 'Distinct ID',
|
|
111
|
-
type: 'string',
|
|
112
|
-
description: 'A distinct ID specified by you.',
|
|
113
|
-
default: {
|
|
114
|
-
'@if': {
|
|
115
|
-
exists: { '@path': '$.userId' },
|
|
116
|
-
then: { '@path': '$.userId' },
|
|
117
|
-
else: { '@path': '$.anonymousId' }
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
group_id: {
|
|
122
|
-
label: 'Group ID',
|
|
123
|
-
type: 'string',
|
|
124
|
-
description: 'The unique identifier of the group that performed this event.',
|
|
125
|
-
default: {
|
|
126
|
-
'@path': '$.context.groupId'
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
time: {
|
|
130
|
-
label: 'Timestamp',
|
|
131
|
-
type: 'datetime',
|
|
132
|
-
description: 'The timestamp of the event. If time is not sent with the event, it will be set to the time our servers receive it.',
|
|
133
|
-
default: {
|
|
134
|
-
'@path': '$.timestamp'
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
event_properties: {
|
|
138
|
-
label: 'Event Properties',
|
|
139
|
-
type: 'object',
|
|
140
|
-
description: 'An object of key-value pairs that represent additional data to be sent along with the event.',
|
|
141
|
-
default: {
|
|
142
|
-
'@path': '$.properties'
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
user_properties: {
|
|
146
|
-
label: 'User Properties',
|
|
147
|
-
type: 'object',
|
|
148
|
-
description: 'An object of key-value pairs that represent additional data tied to the user.',
|
|
149
|
-
default: {
|
|
150
|
-
'@path': '$.traits'
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
app_name: {
|
|
154
|
-
label: 'App Name',
|
|
155
|
-
type: 'string',
|
|
156
|
-
description: 'The name of your application',
|
|
157
|
-
default: {
|
|
158
|
-
'@path': '$.context.app.name'
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
app_namespace: {
|
|
162
|
-
label: 'App Namespace',
|
|
163
|
-
type: 'string',
|
|
164
|
-
description: 'The namespace of your application.',
|
|
165
|
-
default: {
|
|
166
|
-
'@path': '$.context.app.namespace'
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
app_build: {
|
|
170
|
-
label: 'App Build',
|
|
171
|
-
type: 'string',
|
|
172
|
-
description: 'The current build of your application.',
|
|
173
|
-
default: {
|
|
174
|
-
'@path': '$.context.app.build'
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
app_version: {
|
|
178
|
-
label: 'App Version',
|
|
179
|
-
type: 'string',
|
|
180
|
-
description: 'The current version of your application.',
|
|
181
|
-
default: {
|
|
182
|
-
'@path': '$.context.app.version'
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
os_name: {
|
|
186
|
-
label: 'OS Name',
|
|
187
|
-
type: 'string',
|
|
188
|
-
description: 'The name of the mobile operating system or browser that the user is using.',
|
|
189
|
-
default: {
|
|
190
|
-
'@path': '$.context.os.name'
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
os_version: {
|
|
194
|
-
label: 'OS Version',
|
|
195
|
-
type: 'string',
|
|
196
|
-
description: 'The version of the mobile operating system or browser the user is using.',
|
|
197
|
-
default: {
|
|
198
|
-
'@path': '$.context.os.version'
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
device_id: {
|
|
202
|
-
label: 'Device ID',
|
|
203
|
-
type: 'string',
|
|
204
|
-
description: 'A unique identifier for the device the user is using.',
|
|
205
|
-
default: {
|
|
206
|
-
'@path': '$.context.device.id'
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
device_type: {
|
|
210
|
-
label: 'Device Type',
|
|
211
|
-
type: 'string',
|
|
212
|
-
description: "The type of the user's device",
|
|
213
|
-
default: {
|
|
214
|
-
'@path': '$.context.device.type'
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
device_name: {
|
|
218
|
-
label: 'Device Name',
|
|
219
|
-
type: 'string',
|
|
220
|
-
description: "The name of the user's device",
|
|
221
|
-
default: {
|
|
222
|
-
'@path': '$.context.device.name'
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
device_manufacturer: {
|
|
226
|
-
label: 'Device Manufacturer',
|
|
227
|
-
type: 'string',
|
|
228
|
-
description: 'The device manufacturer that the user is using.',
|
|
229
|
-
default: {
|
|
230
|
-
'@path': '$.context.device.manufacturer'
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
device_model: {
|
|
234
|
-
label: 'Device Model',
|
|
235
|
-
type: 'string',
|
|
236
|
-
description: 'The device model that the user is using.',
|
|
237
|
-
default: {
|
|
238
|
-
'@path': '$.context.device.model'
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
bluetooth: {
|
|
242
|
-
label: 'Bluetooth Enabled',
|
|
243
|
-
type: 'boolean',
|
|
244
|
-
description: 'Whether bluetooth is enabled',
|
|
245
|
-
default: {
|
|
246
|
-
'@path': '$.context.network.bluetooth'
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
carrier: {
|
|
250
|
-
label: 'Carrier',
|
|
251
|
-
type: 'string',
|
|
252
|
-
description: 'The carrier that the user is using.',
|
|
253
|
-
default: {
|
|
254
|
-
'@path': '$.context.network.carrier'
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
cellular: {
|
|
258
|
-
label: 'Cellular Enabled',
|
|
259
|
-
type: 'boolean',
|
|
260
|
-
description: 'Whether cellular is enabled',
|
|
261
|
-
default: {
|
|
262
|
-
'@path': '$.context.network.cellular'
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
wifi: {
|
|
266
|
-
label: 'Wifi',
|
|
267
|
-
type: 'boolean',
|
|
268
|
-
description: 'Set to true if user’s device has an active, available Wifi connection, false if not.',
|
|
269
|
-
default: {
|
|
270
|
-
'@path': '$.context.network.wifi'
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
country: {
|
|
274
|
-
label: 'Country',
|
|
275
|
-
type: 'string',
|
|
276
|
-
description: 'The current country of the user.',
|
|
277
|
-
default: {
|
|
278
|
-
'@path': '$.context.location.country'
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
region: {
|
|
282
|
-
label: 'Region',
|
|
283
|
-
type: 'string',
|
|
284
|
-
description: 'The current region of the user.',
|
|
285
|
-
default: {
|
|
286
|
-
'@path': '$.context.location.region'
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
language: {
|
|
290
|
-
label: 'Language',
|
|
291
|
-
type: 'string',
|
|
292
|
-
description: 'The language set by the user.',
|
|
293
|
-
default: {
|
|
294
|
-
'@path': '$.context.locale'
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
library_name: {
|
|
298
|
-
label: 'Library Name',
|
|
299
|
-
type: 'string',
|
|
300
|
-
description: 'The name of the SDK used to send events',
|
|
301
|
-
default: {
|
|
302
|
-
'@path': '$.context.library.name'
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
library_version: {
|
|
306
|
-
label: 'Library Version',
|
|
307
|
-
type: 'string',
|
|
308
|
-
description: 'The version of the SDK used to send events',
|
|
309
|
-
default: {
|
|
310
|
-
'@path': '$.context.library.version'
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
ip: {
|
|
314
|
-
label: 'IP Address',
|
|
315
|
-
type: 'string',
|
|
316
|
-
description: "The IP address of the user. This is only used for geolocation and won't be stored.",
|
|
317
|
-
default: {
|
|
318
|
-
'@path': '$.context.ip'
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
idfa: {
|
|
322
|
-
label: 'Identifier For Advertiser (IDFA)',
|
|
323
|
-
type: 'string',
|
|
324
|
-
description: 'Identifier for Advertiser. _(iOS)_',
|
|
325
|
-
default: {
|
|
326
|
-
'@if': {
|
|
327
|
-
exists: { '@path': '$.context.device.advertisingId' },
|
|
328
|
-
then: { '@path': '$.context.device.advertisingId' },
|
|
329
|
-
else: { '@path': '$.context.device.idfa' }
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
},
|
|
333
|
-
insert_id: {
|
|
334
|
-
label: 'Insert ID',
|
|
335
|
-
type: 'string',
|
|
336
|
-
description: 'Mixpanel will deduplicate subsequent events sent with this ID.'
|
|
337
|
-
},
|
|
338
|
-
utm_properties: {
|
|
339
|
-
label: 'UTM Properties',
|
|
340
|
-
type: 'object',
|
|
341
|
-
description: 'UTM Tracking Properties',
|
|
342
|
-
properties: {
|
|
343
|
-
utm_source: {
|
|
344
|
-
label: 'UTM Source',
|
|
345
|
-
type: 'string'
|
|
346
|
-
},
|
|
347
|
-
utm_medium: {
|
|
348
|
-
label: 'UTM Medium',
|
|
349
|
-
type: 'string'
|
|
350
|
-
},
|
|
351
|
-
utm_campaign: {
|
|
352
|
-
label: 'UTM Campaign',
|
|
353
|
-
type: 'string'
|
|
354
|
-
},
|
|
355
|
-
utm_term: {
|
|
356
|
-
label: 'UTM Term',
|
|
357
|
-
type: 'string'
|
|
358
|
-
},
|
|
359
|
-
utm_content: {
|
|
360
|
-
label: 'UTM Content',
|
|
361
|
-
type: 'string'
|
|
362
|
-
}
|
|
363
|
-
},
|
|
364
|
-
default: {
|
|
365
|
-
utm_source: { '@path': '$.context.campaign.source' },
|
|
366
|
-
utm_medium: { '@path': '$.context.campaign.medium' },
|
|
367
|
-
utm_campaign: { '@path': '$.context.campaign.name' },
|
|
368
|
-
utm_term: { '@path': '$.context.campaign.term' },
|
|
369
|
-
utm_content: { '@path': '$.context.campaign.content' }
|
|
370
|
-
}
|
|
371
|
-
},
|
|
372
|
-
url: {
|
|
373
|
-
label: 'URL',
|
|
374
|
-
type: 'string',
|
|
375
|
-
description: 'The full URL of the webpage on which the event is triggered.',
|
|
376
|
-
default: {
|
|
377
|
-
'@path': '$.context.page.url'
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
screen_width: {
|
|
381
|
-
label: 'Screen width',
|
|
382
|
-
type: 'number',
|
|
383
|
-
description: 'Width, in pixels, of the device screen.',
|
|
384
|
-
default: {
|
|
385
|
-
'@path': '$.context.screen.density'
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
|
-
screen_height: {
|
|
389
|
-
label: 'Screen height',
|
|
390
|
-
type: 'number',
|
|
391
|
-
description: 'Height, in pixels, of the device screen.',
|
|
392
|
-
default: {
|
|
393
|
-
'@path': '$.context.screen.density'
|
|
394
|
-
}
|
|
395
|
-
},
|
|
396
|
-
screen_density: {
|
|
397
|
-
label: 'Screen density',
|
|
398
|
-
type: 'number',
|
|
399
|
-
description: 'Pixel density of the device screen.',
|
|
400
|
-
default: {
|
|
401
|
-
'@path': '$.context.screen.density'
|
|
402
|
-
}
|
|
403
|
-
},
|
|
404
|
-
referrer: {
|
|
405
|
-
label: 'Referrer',
|
|
406
|
-
type: 'string',
|
|
407
|
-
description: 'Referrer url',
|
|
408
|
-
default: {
|
|
409
|
-
'@path': '$.context.page.referrer'
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
userAgent: {
|
|
413
|
-
label: 'User Agent',
|
|
414
|
-
type: 'string',
|
|
415
|
-
description: 'User agent',
|
|
416
|
-
default: {
|
|
417
|
-
'@path': '$.context.userAgent'
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
enable_batching: {
|
|
421
|
-
type: 'boolean',
|
|
422
|
-
label: 'Batch Data to Mixpanel',
|
|
423
|
-
description: 'Set as true to ensure Segment sends data to Mixpanel in batches.',
|
|
424
|
-
default: true
|
|
425
|
-
}
|
|
112
|
+
...mixpanel_properties_1.eventProperties
|
|
426
113
|
},
|
|
427
114
|
performBatch: async (request, { settings, payload }) => {
|
|
428
115
|
return processData(request, settings, payload);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/trackEvent/index.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6DAA6D;YAC1E,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yCAAyC;YACtD,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,GAAG,qCAAe;KACnB;IAED,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QACrD,OAAO,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IAChD,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,OAAO,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAClD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -2,6 +2,7 @@ export declare enum ApiRegions {
|
|
|
2
2
|
US = "US \uD83C\uDDFA\uD83C\uDDF8",
|
|
3
3
|
EU = "EU \uD83C\uDDEA\uD83C\uDDFA"
|
|
4
4
|
}
|
|
5
|
+
export declare function getConcatenatedName(firstName: unknown, lastName: unknown, name: unknown): unknown;
|
|
5
6
|
export declare function getApiServerUrl(apiRegion: string | undefined): "https://api-eu.mixpanel.com" | "https://api.mixpanel.com";
|
|
6
7
|
export declare function getBrowser(userAgent: string, vendor: string | undefined): string;
|
|
7
8
|
export declare function getBrowserVersion(userAgent: string, vendor: string | undefined): string | undefined;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cheapGuid = exports.getBrowserVersion = exports.getBrowser = exports.getApiServerUrl = exports.ApiRegions = void 0;
|
|
3
|
+
exports.cheapGuid = exports.getBrowserVersion = exports.getBrowser = exports.getApiServerUrl = exports.getConcatenatedName = exports.ApiRegions = void 0;
|
|
4
4
|
var ApiRegions;
|
|
5
5
|
(function (ApiRegions) {
|
|
6
6
|
ApiRegions["US"] = "US \uD83C\uDDFA\uD83C\uDDF8";
|
|
7
7
|
ApiRegions["EU"] = "EU \uD83C\uDDEA\uD83C\uDDFA";
|
|
8
8
|
})(ApiRegions = exports.ApiRegions || (exports.ApiRegions = {}));
|
|
9
|
+
function getConcatenatedName(firstName, lastName, name) {
|
|
10
|
+
return (name ?? (firstName && lastName ? `${firstName} ${lastName}` : undefined));
|
|
11
|
+
}
|
|
12
|
+
exports.getConcatenatedName = getConcatenatedName;
|
|
9
13
|
function getApiServerUrl(apiRegion) {
|
|
10
14
|
if (apiRegion == ApiRegions.EU) {
|
|
11
15
|
return 'https://api-eu.mixpanel.com';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/mixpanel/utils.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,gDAAc,CAAA;IACd,gDAAc,CAAA;AAChB,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB;AAED,SAAgB,eAAe,CAAC,SAA6B;IAC3D,IAAI,SAAS,IAAI,UAAU,CAAC,EAAE,EAAE;QAC9B,OAAO,6BAA6B,CAAA;KACrC;IACD,OAAO,0BAA0B,CAAA;AACnC,CAAC;AALD,0CAKC;AAED,SAAgB,UAAU,CAAC,SAAiB,EAAE,MAA0B;IACtE,MAAM,GAAG,MAAM,IAAI,EAAE,CAAA;IACrB,IAAI,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QAC/B,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;YAC9B,OAAO,YAAY,CAAA;SACpB;QACD,OAAO,OAAO,CAAA;KACf;SAAM,IAAI,6BAA6B,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;QACxD,OAAO,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AAE;QACZ,OAAO,SAAS,CAAA;KACjB;IACD,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACpC,CAAC;AA3BD,8CA2BC;AAED,SAAgB,SAAS,CAAC,MAAe;IACvC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IACtG,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AAClD,CAAC;AAHD,8BAGC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvalidEndpointSelectedThrowableError = exports.MissingUserOrAnonymousIdThrowableError = void 0;
|
|
4
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
+
exports.MissingUserOrAnonymousIdThrowableError = new actions_core_1.IntegrationError('Either `Anonymous ID` or `User ID` must be defined.', 'Missing Required Field', 400);
|
|
6
|
+
exports.InvalidEndpointSelectedThrowableError = new actions_core_1.IntegrationError('A valid endpoint must be selected. Please check your Segment settings.', 'Misconfigured Endpoint', 400);
|
|
7
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/destinations/segment/errors.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AAE3C,QAAA,sCAAsC,GAAG,IAAI,+BAAgB,CACxE,qDAAqD,EACrD,wBAAwB,EACxB,GAAG,CACJ,CAAA;AAEY,QAAA,qCAAqC,GAAG,IAAI,+BAAgB,CACvE,wEAAwE,EACxE,wBAAwB,EACxB,GAAG,CACJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/segment/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const sendIdentify_1 = __importDefault(require("./sendIdentify"));
|
|
7
|
+
const sendGroup_1 = __importDefault(require("./sendGroup"));
|
|
8
|
+
const sendScreen_1 = __importDefault(require("./sendScreen"));
|
|
9
|
+
const sendPage_1 = __importDefault(require("./sendPage"));
|
|
10
|
+
const sendTrack_1 = __importDefault(require("./sendTrack"));
|
|
11
|
+
const properties_1 = require("./properties");
|
|
12
|
+
const destination = {
|
|
13
|
+
name: 'Segment',
|
|
14
|
+
slug: 'actions-segment',
|
|
15
|
+
mode: 'cloud',
|
|
16
|
+
authentication: {
|
|
17
|
+
scheme: 'custom',
|
|
18
|
+
fields: {
|
|
19
|
+
source_write_key: {
|
|
20
|
+
label: 'Source Write Key',
|
|
21
|
+
description: 'The **Write Key** of a Segment source.',
|
|
22
|
+
type: 'string',
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
endpoint: {
|
|
26
|
+
label: 'Endpoint Region',
|
|
27
|
+
description: 'The region to send your data.',
|
|
28
|
+
type: 'string',
|
|
29
|
+
format: 'text',
|
|
30
|
+
choices: Object.keys(properties_1.SEGMENT_ENDPOINTS).map((key) => ({
|
|
31
|
+
label: properties_1.SEGMENT_ENDPOINTS[key].label,
|
|
32
|
+
value: key
|
|
33
|
+
})),
|
|
34
|
+
default: properties_1.DEFAULT_SEGMENT_ENDPOINT
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
testAuthentication: async (request, { settings }) => {
|
|
38
|
+
const { source_write_key, endpoint } = settings;
|
|
39
|
+
return request(`${properties_1.SEGMENT_ENDPOINTS[endpoint || properties_1.DEFAULT_SEGMENT_ENDPOINT].cdn}/projects/${source_write_key}/settings`);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
extendRequest({ settings }) {
|
|
43
|
+
return {
|
|
44
|
+
headers: {
|
|
45
|
+
authorization: `Basic ${Buffer.from(settings.source_write_key + ':').toString('base64')}`
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
actions: {
|
|
50
|
+
sendIdentify: sendIdentify_1.default,
|
|
51
|
+
sendGroup: sendGroup_1.default,
|
|
52
|
+
sendScreen: sendScreen_1.default,
|
|
53
|
+
sendPage: sendPage_1.default,
|
|
54
|
+
sendTrack: sendTrack_1.default
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.default = destination;
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/segment/index.ts"],"names":[],"mappings":";;;;;AAGA,kEAAyC;AACzC,4DAAmC;AACnC,8DAAqC;AACrC,0DAAiC;AACjC,4DAAmC;AAEnC,6CAA0E;AAE1E,MAAM,WAAW,GAAoC;IAEnD,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,gBAAgB,EAAE;gBAChB,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,wCAAwC;gBACrD,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,+BAA+B;gBAC5C,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,8BAAiB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;oBACpD,KAAK,EAAE,8BAAiB,CAAC,GAAG,CAAC,CAAC,KAAK;oBACnC,KAAK,EAAE,GAAG;iBACX,CAAC,CAAC;gBACH,OAAO,EAAE,qCAAwB;aAClC;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAClD,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAA;YAE/C,OAAO,OAAO,CACZ,GAAG,8BAAiB,CAAC,QAAQ,IAAI,qCAAwB,CAAC,CAAC,GAAG,aAAa,gBAAgB,WAAW,CACvG,CAAA;QACH,CAAC;KACF;IACD,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,SAAS,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;aAC1F;SACF,CAAA;IACH,CAAC;IACD,OAAO,EAAE;QACP,YAAY,EAAZ,sBAAY;QACZ,SAAS,EAAT,mBAAS;QACT,UAAU,EAAV,oBAAU;QACV,QAAQ,EAAR,kBAAQ;QACR,SAAS,EAAT,mBAAS;KACV;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_SEGMENT_ENDPOINT = exports.SEGMENT_ENDPOINTS = void 0;
|
|
4
|
+
exports.SEGMENT_ENDPOINTS = {
|
|
5
|
+
north_america: {
|
|
6
|
+
label: 'North America',
|
|
7
|
+
url: 'https://api.segment.io/v1',
|
|
8
|
+
cdn: 'https://cdn.segment.com/v1'
|
|
9
|
+
},
|
|
10
|
+
europe: {
|
|
11
|
+
label: 'Europe',
|
|
12
|
+
url: 'https://events.eu1.segmentapis.com/v1',
|
|
13
|
+
cdn: 'https://cdn.segment.com/v1'
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
exports.DEFAULT_SEGMENT_ENDPOINT = 'north_america';
|
|
17
|
+
//# sourceMappingURL=properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/destinations/segment/properties.ts"],"names":[],"mappings":";;;AAMa,QAAA,iBAAiB,GAAuC;IACnE,aAAa,EAAE;QACb,KAAK,EAAE,eAAe;QACtB,GAAG,EAAE,2BAA2B;QAChC,GAAG,EAAE,4BAA4B;KAClC;IACD,MAAM,EAAE;QACN,KAAK,EAAE,QAAQ;QACf,GAAG,EAAE,uCAAuC;QAC5C,GAAG,EAAE,4BAA4B;KAClC;CACF,CAAA;AAEY,QAAA,wBAAwB,GAAG,eAAe,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InputField } from '@segment/actions-core/src/destination-kit/types';
|
|
2
|
+
export declare const user_id: InputField;
|
|
3
|
+
export declare const anonymous_id: InputField;
|
|
4
|
+
export declare const timestamp: InputField;
|
|
5
|
+
export declare const page_name: InputField;
|
|
6
|
+
export declare const screen_name: InputField;
|
|
7
|
+
export declare const event_name: InputField;
|
|
8
|
+
export declare const page_category: InputField;
|
|
9
|
+
export declare const application: InputField;
|
|
10
|
+
export declare const campaign_parameters: InputField;
|
|
11
|
+
export declare const device: InputField;
|
|
12
|
+
export declare const ip_address: InputField;
|
|
13
|
+
export declare const locale: InputField;
|
|
14
|
+
export declare const location: InputField;
|
|
15
|
+
export declare const network: InputField;
|
|
16
|
+
export declare const operating_system: InputField;
|
|
17
|
+
export declare const page: InputField;
|
|
18
|
+
export declare const screen: InputField;
|
|
19
|
+
export declare const user_agent: InputField;
|
|
20
|
+
export declare const timezone: InputField;
|
|
21
|
+
export declare const group_id: InputField;
|
|
22
|
+
export declare const properties: InputField;
|
|
23
|
+
export declare const traits: InputField;
|