@segment/action-destinations 3.115.0 → 3.115.1-1plusxassetapi.13
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 +77 -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/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 +2 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
user_id?: string;
|
|
3
|
+
anonymous_id?: string;
|
|
4
|
+
timestamp?: string;
|
|
5
|
+
page_name?: string;
|
|
6
|
+
page_category?: string;
|
|
7
|
+
application?: {
|
|
8
|
+
name?: string;
|
|
9
|
+
version?: string;
|
|
10
|
+
build?: string;
|
|
11
|
+
namespace?: string;
|
|
12
|
+
};
|
|
13
|
+
campaign_parameters?: {
|
|
14
|
+
name?: string;
|
|
15
|
+
source?: string;
|
|
16
|
+
medium?: string;
|
|
17
|
+
term?: string;
|
|
18
|
+
content?: string;
|
|
19
|
+
};
|
|
20
|
+
device?: {
|
|
21
|
+
id?: string;
|
|
22
|
+
advertising_id?: string;
|
|
23
|
+
adTracking_Enabled?: boolean;
|
|
24
|
+
manufacturer?: string;
|
|
25
|
+
model?: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
type?: string;
|
|
28
|
+
token?: string;
|
|
29
|
+
};
|
|
30
|
+
ip_address?: string;
|
|
31
|
+
locale?: string;
|
|
32
|
+
location?: {
|
|
33
|
+
city?: string;
|
|
34
|
+
country?: string;
|
|
35
|
+
latitude?: number;
|
|
36
|
+
longitude?: number;
|
|
37
|
+
speed?: number;
|
|
38
|
+
};
|
|
39
|
+
network?: {
|
|
40
|
+
bluetooth?: boolean;
|
|
41
|
+
carrier?: string;
|
|
42
|
+
cellular?: boolean;
|
|
43
|
+
wifi?: boolean;
|
|
44
|
+
};
|
|
45
|
+
operating_system?: {
|
|
46
|
+
name?: string;
|
|
47
|
+
version?: string;
|
|
48
|
+
};
|
|
49
|
+
page?: {
|
|
50
|
+
path?: string;
|
|
51
|
+
referrer?: string;
|
|
52
|
+
search?: string;
|
|
53
|
+
title?: string;
|
|
54
|
+
url?: string;
|
|
55
|
+
};
|
|
56
|
+
screen?: {
|
|
57
|
+
density?: number;
|
|
58
|
+
height?: number;
|
|
59
|
+
width?: number;
|
|
60
|
+
};
|
|
61
|
+
user_agent?: string;
|
|
62
|
+
timezone?: string;
|
|
63
|
+
group_id?: string;
|
|
64
|
+
properties?: {
|
|
65
|
+
[k: string]: unknown;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendPage/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const segment_properties_1 = require("../segment-properties");
|
|
4
|
+
const properties_1 = require("../properties");
|
|
5
|
+
const errors_1 = require("../errors");
|
|
6
|
+
const action = {
|
|
7
|
+
title: 'Send Page',
|
|
8
|
+
description: 'Send a page call to Segment’s tracking API. This is used to track website page views.',
|
|
9
|
+
defaultSubscription: 'type = "page"',
|
|
10
|
+
fields: {
|
|
11
|
+
user_id: segment_properties_1.user_id,
|
|
12
|
+
anonymous_id: segment_properties_1.anonymous_id,
|
|
13
|
+
timestamp: segment_properties_1.timestamp,
|
|
14
|
+
page_name: segment_properties_1.page_name,
|
|
15
|
+
page_category: segment_properties_1.page_category,
|
|
16
|
+
application: segment_properties_1.application,
|
|
17
|
+
campaign_parameters: segment_properties_1.campaign_parameters,
|
|
18
|
+
device: segment_properties_1.device,
|
|
19
|
+
ip_address: segment_properties_1.ip_address,
|
|
20
|
+
locale: segment_properties_1.locale,
|
|
21
|
+
location: segment_properties_1.location,
|
|
22
|
+
network: segment_properties_1.network,
|
|
23
|
+
operating_system: segment_properties_1.operating_system,
|
|
24
|
+
page: segment_properties_1.page,
|
|
25
|
+
screen: segment_properties_1.screen,
|
|
26
|
+
user_agent: segment_properties_1.user_agent,
|
|
27
|
+
timezone: segment_properties_1.timezone,
|
|
28
|
+
group_id: segment_properties_1.group_id,
|
|
29
|
+
properties: segment_properties_1.properties
|
|
30
|
+
},
|
|
31
|
+
perform: (request, { payload, settings }) => {
|
|
32
|
+
if (!payload.anonymous_id && !payload.user_id) {
|
|
33
|
+
throw errors_1.MissingUserOrAnonymousIdThrowableError;
|
|
34
|
+
}
|
|
35
|
+
const pagePayload = {
|
|
36
|
+
userId: payload?.user_id,
|
|
37
|
+
anonymousId: payload?.anonymous_id,
|
|
38
|
+
timestamp: payload?.timestamp,
|
|
39
|
+
name: payload?.page_name,
|
|
40
|
+
context: {
|
|
41
|
+
app: payload?.application,
|
|
42
|
+
campaign: payload?.campaign_parameters,
|
|
43
|
+
device: payload?.device,
|
|
44
|
+
ip: payload?.ip_address,
|
|
45
|
+
locale: payload?.locale,
|
|
46
|
+
location: payload?.location,
|
|
47
|
+
network: payload?.network,
|
|
48
|
+
os: payload?.operating_system,
|
|
49
|
+
page: payload?.page,
|
|
50
|
+
screen: payload?.screen,
|
|
51
|
+
userAgent: payload?.user_agent,
|
|
52
|
+
timezone: payload?.timezone,
|
|
53
|
+
groupId: payload?.group_id
|
|
54
|
+
},
|
|
55
|
+
properties: {
|
|
56
|
+
name: payload?.page_name,
|
|
57
|
+
category: payload?.page_category,
|
|
58
|
+
path: payload?.page?.path,
|
|
59
|
+
referrer: payload?.page?.referrer,
|
|
60
|
+
search: payload?.page?.search,
|
|
61
|
+
title: payload?.page?.title,
|
|
62
|
+
url: payload?.page?.url,
|
|
63
|
+
...payload?.properties
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
if (!settings.endpoint || !(settings.endpoint in properties_1.SEGMENT_ENDPOINTS)) {
|
|
67
|
+
throw errors_1.InvalidEndpointSelectedThrowableError;
|
|
68
|
+
}
|
|
69
|
+
const selectedSegmentEndpoint = properties_1.SEGMENT_ENDPOINTS[settings.endpoint].url;
|
|
70
|
+
return request(`${selectedSegmentEndpoint}/page`, {
|
|
71
|
+
method: 'POST',
|
|
72
|
+
json: pagePayload
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
exports.default = action;
|
|
77
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendPage/index.ts"],"names":[],"mappings":";;AAGA,8DAoB8B;AAC9B,8CAAiD;AACjD,sCAAyG;AAEzG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,uFAAuF;IACpG,mBAAmB,EAAE,eAAe;IACpC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,SAAS,EAAT,8BAAS;QACT,SAAS,EAAT,8BAAS;QACT,aAAa,EAAb,kCAAa;QACb,WAAW,EAAX,gCAAW;QACX,mBAAmB,EAAnB,wCAAmB;QACnB,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,QAAQ,EAAR,6BAAQ;QACR,OAAO,EAAP,4BAAO;QACP,gBAAgB,EAAhB,qCAAgB;QAChB,IAAI,EAAJ,yBAAI;QACJ,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,QAAQ,EAAR,6BAAQ;QACR,QAAQ,EAAR,6BAAQ;QACR,UAAU,EAAV,+BAAU;KACX;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YAC7C,MAAM,+CAAsC,CAAA;SAC7C;QAED,MAAM,WAAW,GAAW;YAC1B,MAAM,EAAE,OAAO,EAAE,OAAO;YACxB,WAAW,EAAE,OAAO,EAAE,YAAY;YAClC,SAAS,EAAE,OAAO,EAAE,SAAS;YAC7B,IAAI,EAAE,OAAO,EAAE,SAAS;YACxB,OAAO,EAAE;gBACP,GAAG,EAAE,OAAO,EAAE,WAAW;gBACzB,QAAQ,EAAE,OAAO,EAAE,mBAAmB;g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
|
|
1
|
+
export interface Payload {
|
|
2
|
+
user_id?: string;
|
|
3
|
+
anonymous_id?: string;
|
|
4
|
+
timestamp?: string;
|
|
5
|
+
screen_name?: string;
|
|
6
|
+
application?: {
|
|
7
|
+
name?: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
build?: string;
|
|
10
|
+
namespace?: string;
|
|
11
|
+
};
|
|
12
|
+
campaign_parameters?: {
|
|
13
|
+
name?: string;
|
|
14
|
+
source?: string;
|
|
15
|
+
medium?: string;
|
|
16
|
+
term?: string;
|
|
17
|
+
content?: string;
|
|
18
|
+
};
|
|
19
|
+
device?: {
|
|
20
|
+
id?: string;
|
|
21
|
+
advertising_id?: string;
|
|
22
|
+
adTracking_Enabled?: boolean;
|
|
23
|
+
manufacturer?: string;
|
|
24
|
+
model?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
type?: string;
|
|
27
|
+
token?: string;
|
|
28
|
+
};
|
|
29
|
+
ip_address?: string;
|
|
30
|
+
locale?: string;
|
|
31
|
+
location?: {
|
|
32
|
+
city?: string;
|
|
33
|
+
country?: string;
|
|
34
|
+
latitude?: number;
|
|
35
|
+
longitude?: number;
|
|
36
|
+
speed?: number;
|
|
37
|
+
};
|
|
38
|
+
network?: {
|
|
39
|
+
bluetooth?: boolean;
|
|
40
|
+
carrier?: string;
|
|
41
|
+
cellular?: boolean;
|
|
42
|
+
wifi?: boolean;
|
|
43
|
+
};
|
|
44
|
+
operating_system?: {
|
|
45
|
+
name?: string;
|
|
46
|
+
version?: string;
|
|
47
|
+
};
|
|
48
|
+
page?: {
|
|
49
|
+
path?: string;
|
|
50
|
+
referrer?: string;
|
|
51
|
+
search?: string;
|
|
52
|
+
title?: string;
|
|
53
|
+
url?: string;
|
|
54
|
+
};
|
|
55
|
+
screen?: {
|
|
56
|
+
density?: number;
|
|
57
|
+
height?: number;
|
|
58
|
+
width?: number;
|
|
59
|
+
};
|
|
60
|
+
user_agent?: string;
|
|
61
|
+
timezone?: string;
|
|
62
|
+
group_id?: string;
|
|
63
|
+
properties?: {
|
|
64
|
+
[k: string]: unknown;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendScreen/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const segment_properties_1 = require("../segment-properties");
|
|
4
|
+
const properties_1 = require("../properties");
|
|
5
|
+
const errors_1 = require("../errors");
|
|
6
|
+
const action = {
|
|
7
|
+
title: 'Send Screen',
|
|
8
|
+
description: 'Send a screen call to Segment’s tracking API. This is used to track mobile app screen views.',
|
|
9
|
+
defaultSubscription: 'type = "screen"',
|
|
10
|
+
fields: {
|
|
11
|
+
user_id: segment_properties_1.user_id,
|
|
12
|
+
anonymous_id: segment_properties_1.anonymous_id,
|
|
13
|
+
timestamp: segment_properties_1.timestamp,
|
|
14
|
+
screen_name: segment_properties_1.screen_name,
|
|
15
|
+
application: segment_properties_1.application,
|
|
16
|
+
campaign_parameters: segment_properties_1.campaign_parameters,
|
|
17
|
+
device: segment_properties_1.device,
|
|
18
|
+
ip_address: segment_properties_1.ip_address,
|
|
19
|
+
locale: segment_properties_1.locale,
|
|
20
|
+
location: segment_properties_1.location,
|
|
21
|
+
network: segment_properties_1.network,
|
|
22
|
+
operating_system: segment_properties_1.operating_system,
|
|
23
|
+
page: segment_properties_1.page,
|
|
24
|
+
screen: segment_properties_1.screen,
|
|
25
|
+
user_agent: segment_properties_1.user_agent,
|
|
26
|
+
timezone: segment_properties_1.timezone,
|
|
27
|
+
group_id: segment_properties_1.group_id,
|
|
28
|
+
properties: segment_properties_1.properties
|
|
29
|
+
},
|
|
30
|
+
perform: (request, { payload, settings }) => {
|
|
31
|
+
if (!payload.anonymous_id && !payload.user_id) {
|
|
32
|
+
throw errors_1.MissingUserOrAnonymousIdThrowableError;
|
|
33
|
+
}
|
|
34
|
+
const screenPayload = {
|
|
35
|
+
userId: payload?.user_id,
|
|
36
|
+
anonymousId: payload?.anonymous_id,
|
|
37
|
+
timestamp: payload?.timestamp,
|
|
38
|
+
name: payload?.screen_name,
|
|
39
|
+
context: {
|
|
40
|
+
app: payload?.application,
|
|
41
|
+
campaign: payload?.campaign_parameters,
|
|
42
|
+
device: payload?.device,
|
|
43
|
+
ip: payload?.ip_address,
|
|
44
|
+
locale: payload?.locale,
|
|
45
|
+
location: payload?.location,
|
|
46
|
+
network: payload?.network,
|
|
47
|
+
os: payload?.operating_system,
|
|
48
|
+
page: payload?.page,
|
|
49
|
+
screen: payload?.screen,
|
|
50
|
+
userAgent: payload?.user_agent,
|
|
51
|
+
groupId: payload?.group_id
|
|
52
|
+
},
|
|
53
|
+
properties: {
|
|
54
|
+
name: payload?.screen_name,
|
|
55
|
+
...payload?.properties
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
if (!settings.endpoint || !(settings.endpoint in properties_1.SEGMENT_ENDPOINTS)) {
|
|
59
|
+
throw errors_1.InvalidEndpointSelectedThrowableError;
|
|
60
|
+
}
|
|
61
|
+
const selectedSegmentEndpoint = properties_1.SEGMENT_ENDPOINTS[settings.endpoint].url;
|
|
62
|
+
return request(`${selectedSegmentEndpoint}/screen`, {
|
|
63
|
+
method: 'POST',
|
|
64
|
+
json: screenPayload
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.default = action;
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendScreen/index.ts"],"names":[],"mappings":";;AAGA,8DAmB8B;AAC9B,8CAAiD;AACjD,sCAAyG;AAEzG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,8FAA8F;IAC3G,mBAAmB,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E,OAAO,EAAE,MAAM;gBACvB,SAAS,EAAE,OAAO,EAAE,UAAU;gBAC9B,OAAO,EAAE,OAAO,EAAE,QAAQ;aAC3B;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,OAAO,EAAE,WAAW;gBAC1B,GAAG,OAAO,EAAE,UAAU;aACvB;SACF,CAAA;QAGD,IAAI,CAAC,QAAQ,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,IAAI,8BAAiB,CAAC,EAAE;YACnE,MAAM,8CAAqC,CAAA;SAC5C;QAED,MAAM,uBAAuB,GAAG,8BAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAA;QAExE,OAAO,OAAO,CAAC,GAAG,uBAAuB,SAAS,EAAE;YAClD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,aAAa;SACpB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
user_id?: string;
|
|
3
|
+
anonymous_id?: string;
|
|
4
|
+
timestamp?: string;
|
|
5
|
+
event_name?: string;
|
|
6
|
+
application?: {
|
|
7
|
+
name?: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
build?: string;
|
|
10
|
+
namespace?: string;
|
|
11
|
+
};
|
|
12
|
+
campaign_parameters?: {
|
|
13
|
+
name?: string;
|
|
14
|
+
source?: string;
|
|
15
|
+
medium?: string;
|
|
16
|
+
term?: string;
|
|
17
|
+
content?: string;
|
|
18
|
+
};
|
|
19
|
+
device?: {
|
|
20
|
+
id?: string;
|
|
21
|
+
advertising_id?: string;
|
|
22
|
+
adTracking_Enabled?: boolean;
|
|
23
|
+
manufacturer?: string;
|
|
24
|
+
model?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
type?: string;
|
|
27
|
+
token?: string;
|
|
28
|
+
};
|
|
29
|
+
ip_address?: string;
|
|
30
|
+
locale?: string;
|
|
31
|
+
location?: {
|
|
32
|
+
city?: string;
|
|
33
|
+
country?: string;
|
|
34
|
+
latitude?: number;
|
|
35
|
+
longitude?: number;
|
|
36
|
+
speed?: number;
|
|
37
|
+
};
|
|
38
|
+
network?: {
|
|
39
|
+
bluetooth?: boolean;
|
|
40
|
+
carrier?: string;
|
|
41
|
+
cellular?: boolean;
|
|
42
|
+
wifi?: boolean;
|
|
43
|
+
};
|
|
44
|
+
operating_system?: {
|
|
45
|
+
name?: string;
|
|
46
|
+
version?: string;
|
|
47
|
+
};
|
|
48
|
+
page?: {
|
|
49
|
+
path?: string;
|
|
50
|
+
referrer?: string;
|
|
51
|
+
search?: string;
|
|
52
|
+
title?: string;
|
|
53
|
+
url?: string;
|
|
54
|
+
};
|
|
55
|
+
screen?: {
|
|
56
|
+
density?: number;
|
|
57
|
+
height?: number;
|
|
58
|
+
width?: number;
|
|
59
|
+
};
|
|
60
|
+
user_agent?: string;
|
|
61
|
+
timezone?: string;
|
|
62
|
+
group_id?: string;
|
|
63
|
+
properties?: {
|
|
64
|
+
[k: string]: unknown;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendTrack/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const segment_properties_1 = require("../segment-properties");
|
|
4
|
+
const properties_1 = require("../properties");
|
|
5
|
+
const errors_1 = require("../errors");
|
|
6
|
+
const action = {
|
|
7
|
+
title: 'Send Track',
|
|
8
|
+
description: 'Send a track call to Segment’s tracking API. This is used to record actions your users perform.',
|
|
9
|
+
defaultSubscription: 'type = "track"',
|
|
10
|
+
fields: {
|
|
11
|
+
user_id: segment_properties_1.user_id,
|
|
12
|
+
anonymous_id: segment_properties_1.anonymous_id,
|
|
13
|
+
timestamp: segment_properties_1.timestamp,
|
|
14
|
+
event_name: segment_properties_1.event_name,
|
|
15
|
+
application: segment_properties_1.application,
|
|
16
|
+
campaign_parameters: segment_properties_1.campaign_parameters,
|
|
17
|
+
device: segment_properties_1.device,
|
|
18
|
+
ip_address: segment_properties_1.ip_address,
|
|
19
|
+
locale: segment_properties_1.locale,
|
|
20
|
+
location: segment_properties_1.location,
|
|
21
|
+
network: segment_properties_1.network,
|
|
22
|
+
operating_system: segment_properties_1.operating_system,
|
|
23
|
+
page: segment_properties_1.page,
|
|
24
|
+
screen: segment_properties_1.screen,
|
|
25
|
+
user_agent: segment_properties_1.user_agent,
|
|
26
|
+
timezone: segment_properties_1.timezone,
|
|
27
|
+
group_id: segment_properties_1.group_id,
|
|
28
|
+
properties: segment_properties_1.properties
|
|
29
|
+
},
|
|
30
|
+
perform: (request, { payload, settings }) => {
|
|
31
|
+
if (!payload.anonymous_id && !payload.user_id) {
|
|
32
|
+
throw errors_1.MissingUserOrAnonymousIdThrowableError;
|
|
33
|
+
}
|
|
34
|
+
const trackPayload = {
|
|
35
|
+
userId: payload?.user_id,
|
|
36
|
+
anonymousId: payload?.anonymous_id,
|
|
37
|
+
timestamp: payload?.timestamp,
|
|
38
|
+
event: payload?.event_name,
|
|
39
|
+
context: {
|
|
40
|
+
app: payload?.application,
|
|
41
|
+
campaign: payload?.campaign_parameters,
|
|
42
|
+
device: payload?.device,
|
|
43
|
+
ip: payload?.ip_address,
|
|
44
|
+
locale: payload?.locale,
|
|
45
|
+
location: payload?.location,
|
|
46
|
+
network: payload?.network,
|
|
47
|
+
os: payload?.operating_system,
|
|
48
|
+
page: payload?.page,
|
|
49
|
+
screen: payload?.screen,
|
|
50
|
+
userAgent: payload?.user_agent,
|
|
51
|
+
timezone: payload?.timezone,
|
|
52
|
+
groupId: payload?.group_id
|
|
53
|
+
},
|
|
54
|
+
properties: {
|
|
55
|
+
...payload?.properties
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
if (!settings.endpoint || !(settings.endpoint in properties_1.SEGMENT_ENDPOINTS)) {
|
|
59
|
+
throw errors_1.InvalidEndpointSelectedThrowableError;
|
|
60
|
+
}
|
|
61
|
+
const selectedSegmentEndpoint = properties_1.SEGMENT_ENDPOINTS[settings.endpoint].url;
|
|
62
|
+
return request(`${selectedSegmentEndpoint}/track`, {
|
|
63
|
+
method: 'POST',
|
|
64
|
+
json: trackPayload
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.default = action;
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendTrack/index.ts"],"names":[],"mappings":";;AAGA,8DAmB8B;AAC9B,8CAAiD;AACjD,sCAAyG;AAEzG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,iGAAiG;IAC9G,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,SAAS,EAAT,8BAAS;QACT,UAAU,EAAV,+BAAU;QACV,WAAW,EAAX,gCAAW;QACX,mBAAmB,EAAnB,wCAAmB;QACnB,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,MAAM,EAAN,2BAAM;QACN,QAAQ,EAAR,6BAAQ;QACR,OAAO,EAAP,4BAAO;QACP,gBAAgB,EAAhB,qCAAgB;QAChB,IAAI,EAAJ,yBAAI;QACJ,MAAM,EAAN,2BAAM;QACN,UAAU,EAAV,+BAAU;QACV,QAAQ,EAAR,6BAAQ;QACR,QAAQ,EAAR,6BAAQ;QACR,UAAU,EAAV,+BAAU;KACX;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,O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= {
|
|
|
18
18
|
choices: [
|
|
19
19
|
{ label: 'POST', value: 'POST' },
|
|
20
20
|
{ label: 'PUT', value: 'PUT' },
|
|
21
|
-
{ label: 'PATCH', value: 'PATCH' }
|
|
22
|
-
{ label: 'DELETE', value: 'DELETE' },
|
|
23
|
-
{ label: 'GET', value: 'GET' }
|
|
21
|
+
{ label: 'PATCH', value: 'PATCH' }
|
|
24
22
|
],
|
|
25
23
|
default: 'POST',
|
|
26
24
|
required: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/webhook/send/index.ts"],"names":[],"mappings":";;AAMA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,uBAAuB;IACpC,MAAM,EAAE;QACN,GAAG,EAAE;YACH,KAAK,EAAE,KAAK;YACZ,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,KAAK;SACd;QACD,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;gBAChC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;gBAC9B,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/webhook/send/index.ts"],"names":[],"mappings":";;AAMA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,uBAAuB;IACpC,MAAM,EAAE;QACN,GAAG,EAAE;YACH,KAAK,EAAE,KAAK;YACZ,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,M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,CAAC;SACtC,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.115.
|
|
4
|
+
"version": "3.115.1-1plusxassetapi.13+ad733350",
|
|
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": "ad733350c430df7cf2f179a659ce8471827ab75b"
|
|
69
69
|
}
|