@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,322 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.traits = exports.properties = exports.group_id = exports.timezone = exports.user_agent = exports.screen = exports.page = exports.operating_system = exports.network = exports.location = exports.locale = exports.ip_address = exports.device = exports.campaign_parameters = exports.application = exports.page_category = exports.event_name = exports.screen_name = exports.page_name = exports.timestamp = exports.anonymous_id = exports.user_id = void 0;
|
|
4
|
+
exports.user_id = {
|
|
5
|
+
label: 'User ID',
|
|
6
|
+
description: 'Unique identifier for the user in your database. A userId or an anonymousId is required.',
|
|
7
|
+
type: 'string'
|
|
8
|
+
};
|
|
9
|
+
exports.anonymous_id = {
|
|
10
|
+
label: 'Anonymous ID',
|
|
11
|
+
description: 'A pseudo-unique substitute for a User ID, for cases when you don’t have an absolutely unique identifier. A userId or an anonymousId is required.',
|
|
12
|
+
type: 'string'
|
|
13
|
+
};
|
|
14
|
+
exports.timestamp = {
|
|
15
|
+
label: 'Timestamp',
|
|
16
|
+
description: 'Timestamp when the message itself took place as a ISO-8601 format date string. Defaults to current time if not provided.',
|
|
17
|
+
type: 'string'
|
|
18
|
+
};
|
|
19
|
+
exports.page_name = {
|
|
20
|
+
label: 'Page Name',
|
|
21
|
+
description: 'Name of the page that was viewed.',
|
|
22
|
+
type: 'string'
|
|
23
|
+
};
|
|
24
|
+
exports.screen_name = {
|
|
25
|
+
label: 'Screen Name',
|
|
26
|
+
description: 'Name of the screen that was viewed.',
|
|
27
|
+
type: 'string'
|
|
28
|
+
};
|
|
29
|
+
exports.event_name = {
|
|
30
|
+
label: 'Event Name',
|
|
31
|
+
description: 'Name of the action that a user has performed.',
|
|
32
|
+
type: 'string'
|
|
33
|
+
};
|
|
34
|
+
exports.page_category = {
|
|
35
|
+
label: 'Page Category',
|
|
36
|
+
description: 'Category of the page that was viewed.',
|
|
37
|
+
type: 'string'
|
|
38
|
+
};
|
|
39
|
+
exports.application = {
|
|
40
|
+
label: 'Application',
|
|
41
|
+
description: 'Dictionary of information about the current application.',
|
|
42
|
+
type: 'object',
|
|
43
|
+
defaultObjectUI: 'object',
|
|
44
|
+
properties: {
|
|
45
|
+
name: {
|
|
46
|
+
label: 'Name',
|
|
47
|
+
description: 'The app name.',
|
|
48
|
+
type: 'string'
|
|
49
|
+
},
|
|
50
|
+
version: {
|
|
51
|
+
label: 'Version',
|
|
52
|
+
description: 'The app version.',
|
|
53
|
+
type: 'string'
|
|
54
|
+
},
|
|
55
|
+
build: {
|
|
56
|
+
label: 'Build',
|
|
57
|
+
description: 'The app build.',
|
|
58
|
+
type: 'string'
|
|
59
|
+
},
|
|
60
|
+
namespace: {
|
|
61
|
+
label: 'Namespace',
|
|
62
|
+
description: 'The app namespace.',
|
|
63
|
+
type: 'string'
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.campaign_parameters = {
|
|
68
|
+
label: 'Campaign Parameters',
|
|
69
|
+
description: 'Dictionary of information about the campaign that resulted in the API call. This maps directly to the common UTM campaign parameters.',
|
|
70
|
+
type: 'object',
|
|
71
|
+
defaultObjectUI: 'object',
|
|
72
|
+
properties: {
|
|
73
|
+
name: {
|
|
74
|
+
label: 'Name',
|
|
75
|
+
description: 'The campaign name.',
|
|
76
|
+
type: 'string'
|
|
77
|
+
},
|
|
78
|
+
source: {
|
|
79
|
+
label: 'Source',
|
|
80
|
+
description: 'The campaign source.',
|
|
81
|
+
type: 'string'
|
|
82
|
+
},
|
|
83
|
+
medium: {
|
|
84
|
+
label: 'Medium',
|
|
85
|
+
description: 'The campaign medium.',
|
|
86
|
+
type: 'string'
|
|
87
|
+
},
|
|
88
|
+
term: {
|
|
89
|
+
label: 'Term',
|
|
90
|
+
description: 'The campaign term.',
|
|
91
|
+
type: 'string'
|
|
92
|
+
},
|
|
93
|
+
content: {
|
|
94
|
+
label: 'Content',
|
|
95
|
+
description: 'The campaign content.',
|
|
96
|
+
type: 'string'
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
exports.device = {
|
|
101
|
+
label: 'Device',
|
|
102
|
+
description: 'Dictionary of information about the device the API call originated from.',
|
|
103
|
+
type: 'object',
|
|
104
|
+
defaultObjectUI: 'object',
|
|
105
|
+
properties: {
|
|
106
|
+
id: {
|
|
107
|
+
label: 'ID',
|
|
108
|
+
description: 'The device ID.',
|
|
109
|
+
type: 'string'
|
|
110
|
+
},
|
|
111
|
+
advertising_id: {
|
|
112
|
+
label: 'Advertising ID',
|
|
113
|
+
description: 'The device Advertising ID.',
|
|
114
|
+
type: 'string'
|
|
115
|
+
},
|
|
116
|
+
adTracking_Enabled: {
|
|
117
|
+
label: 'Ad Tracking Enabled',
|
|
118
|
+
description: 'Whether or not ad tracking is enabled.',
|
|
119
|
+
type: 'boolean'
|
|
120
|
+
},
|
|
121
|
+
manufacturer: {
|
|
122
|
+
label: 'Manufacturer',
|
|
123
|
+
description: 'The device manufacturer.',
|
|
124
|
+
type: 'string'
|
|
125
|
+
},
|
|
126
|
+
model: {
|
|
127
|
+
label: 'Model',
|
|
128
|
+
description: 'The device model.',
|
|
129
|
+
type: 'string'
|
|
130
|
+
},
|
|
131
|
+
name: {
|
|
132
|
+
label: 'Name',
|
|
133
|
+
description: 'The device name.',
|
|
134
|
+
type: 'string'
|
|
135
|
+
},
|
|
136
|
+
type: {
|
|
137
|
+
label: 'Type',
|
|
138
|
+
description: 'The device type.',
|
|
139
|
+
type: 'string'
|
|
140
|
+
},
|
|
141
|
+
token: {
|
|
142
|
+
label: 'Token',
|
|
143
|
+
description: 'The device token.',
|
|
144
|
+
type: 'string'
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
exports.ip_address = {
|
|
149
|
+
label: 'IP Address',
|
|
150
|
+
description: 'The current user’s IP address.',
|
|
151
|
+
type: 'string'
|
|
152
|
+
};
|
|
153
|
+
exports.locale = {
|
|
154
|
+
label: 'Locale',
|
|
155
|
+
description: 'Locale string for the current user, for example en-US.',
|
|
156
|
+
type: 'string'
|
|
157
|
+
};
|
|
158
|
+
exports.location = {
|
|
159
|
+
label: 'Location',
|
|
160
|
+
description: 'Dictionary of information about the user’s current location.',
|
|
161
|
+
type: 'object',
|
|
162
|
+
defaultObjectUI: 'object',
|
|
163
|
+
properties: {
|
|
164
|
+
city: {
|
|
165
|
+
label: 'City',
|
|
166
|
+
description: "The user's city",
|
|
167
|
+
type: 'string'
|
|
168
|
+
},
|
|
169
|
+
country: {
|
|
170
|
+
label: 'Country',
|
|
171
|
+
description: "The user's country",
|
|
172
|
+
type: 'string'
|
|
173
|
+
},
|
|
174
|
+
latitude: {
|
|
175
|
+
label: 'Latitude',
|
|
176
|
+
description: "The user's latitude",
|
|
177
|
+
type: 'number'
|
|
178
|
+
},
|
|
179
|
+
longitude: {
|
|
180
|
+
label: 'Longitude',
|
|
181
|
+
description: "The user's longitude",
|
|
182
|
+
type: 'number'
|
|
183
|
+
},
|
|
184
|
+
speed: {
|
|
185
|
+
label: 'Speed',
|
|
186
|
+
description: "The user's speed",
|
|
187
|
+
type: 'number'
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
exports.network = {
|
|
192
|
+
label: 'Network',
|
|
193
|
+
description: 'Dictionary of information about the current network connection.',
|
|
194
|
+
type: 'object',
|
|
195
|
+
defaultObjectUI: 'object',
|
|
196
|
+
properties: {
|
|
197
|
+
bluetooth: {
|
|
198
|
+
label: 'Bluetooth',
|
|
199
|
+
description: 'Whether or not bluetooth is enabled.',
|
|
200
|
+
type: 'boolean'
|
|
201
|
+
},
|
|
202
|
+
carrier: {
|
|
203
|
+
label: 'Carrier',
|
|
204
|
+
description: 'The network carrier.',
|
|
205
|
+
type: 'string'
|
|
206
|
+
},
|
|
207
|
+
cellular: {
|
|
208
|
+
label: 'Cellular',
|
|
209
|
+
description: 'Whether or not cellular data is enabled.',
|
|
210
|
+
type: 'boolean'
|
|
211
|
+
},
|
|
212
|
+
wifi: {
|
|
213
|
+
label: 'WiFi',
|
|
214
|
+
description: 'Whether or not WiFi is enabled.',
|
|
215
|
+
type: 'boolean'
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
exports.operating_system = {
|
|
220
|
+
label: 'Operating System',
|
|
221
|
+
description: 'Dictionary of information about the operating system.',
|
|
222
|
+
type: 'object',
|
|
223
|
+
defaultObjectUI: 'object',
|
|
224
|
+
properties: {
|
|
225
|
+
name: {
|
|
226
|
+
label: 'Name',
|
|
227
|
+
description: 'The operating system name.',
|
|
228
|
+
type: 'string'
|
|
229
|
+
},
|
|
230
|
+
version: {
|
|
231
|
+
label: 'Version',
|
|
232
|
+
description: 'The operating system version.',
|
|
233
|
+
type: 'string'
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
exports.page = {
|
|
238
|
+
label: 'Page',
|
|
239
|
+
description: 'Dictionary of information about the current page in the browser.',
|
|
240
|
+
type: 'object',
|
|
241
|
+
defaultObjectUI: 'object',
|
|
242
|
+
properties: {
|
|
243
|
+
path: {
|
|
244
|
+
label: 'Path',
|
|
245
|
+
description: 'The page path.',
|
|
246
|
+
type: 'string'
|
|
247
|
+
},
|
|
248
|
+
referrer: {
|
|
249
|
+
label: 'Referrer',
|
|
250
|
+
description: 'The page referrer.',
|
|
251
|
+
type: 'string'
|
|
252
|
+
},
|
|
253
|
+
search: {
|
|
254
|
+
label: 'Search',
|
|
255
|
+
description: 'The page search query.',
|
|
256
|
+
type: 'string'
|
|
257
|
+
},
|
|
258
|
+
title: {
|
|
259
|
+
label: 'Title',
|
|
260
|
+
description: 'The page title.',
|
|
261
|
+
type: 'string'
|
|
262
|
+
},
|
|
263
|
+
url: {
|
|
264
|
+
label: 'URL',
|
|
265
|
+
description: 'The page URL.',
|
|
266
|
+
type: 'string'
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
exports.screen = {
|
|
271
|
+
label: 'Screen',
|
|
272
|
+
description: 'Dictionary of information about the device’s screen.',
|
|
273
|
+
type: 'object',
|
|
274
|
+
defaultObjectUI: 'object',
|
|
275
|
+
properties: {
|
|
276
|
+
density: {
|
|
277
|
+
label: 'Density',
|
|
278
|
+
description: 'The screen density.',
|
|
279
|
+
type: 'number'
|
|
280
|
+
},
|
|
281
|
+
height: {
|
|
282
|
+
label: 'Height',
|
|
283
|
+
description: 'The screen height.',
|
|
284
|
+
type: 'number'
|
|
285
|
+
},
|
|
286
|
+
width: {
|
|
287
|
+
label: 'Width',
|
|
288
|
+
description: 'The screen width.',
|
|
289
|
+
type: 'number'
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
exports.user_agent = {
|
|
294
|
+
label: 'User Agent',
|
|
295
|
+
description: 'User agent of the device the API call originated from.',
|
|
296
|
+
type: 'string'
|
|
297
|
+
};
|
|
298
|
+
exports.timezone = {
|
|
299
|
+
label: 'Timezone',
|
|
300
|
+
description: 'The user’s timezone as a tz database string, for example America/New_York.',
|
|
301
|
+
type: 'string'
|
|
302
|
+
};
|
|
303
|
+
exports.group_id = {
|
|
304
|
+
label: 'Group ID',
|
|
305
|
+
description: 'The group or account ID a user is associated with.',
|
|
306
|
+
type: 'string'
|
|
307
|
+
};
|
|
308
|
+
exports.properties = {
|
|
309
|
+
label: 'Properties',
|
|
310
|
+
description: 'Free-form dictionary of properties that describe the screen.',
|
|
311
|
+
type: 'object',
|
|
312
|
+
defaultObjectUI: 'object',
|
|
313
|
+
additionalProperties: true
|
|
314
|
+
};
|
|
315
|
+
exports.traits = {
|
|
316
|
+
label: 'Traits',
|
|
317
|
+
description: 'Free-form dictionary of traits that describe the user or group of users.',
|
|
318
|
+
type: 'object',
|
|
319
|
+
defaultObjectUI: 'keyvalue',
|
|
320
|
+
additionalProperties: true
|
|
321
|
+
};
|
|
322
|
+
//# sourceMappingURL=segment-properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment-properties.js","sourceRoot":"","sources":["../../../src/destinations/segment/segment-properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,OAAO,GAAe;IACjC,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,0FAA0F;IACvG,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,YAAY,GAAe;IACtC,KAAK,EAAE,cAAc;IACrB,WAAW,EACT,kJAAkJ;IACpJ,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,SAAS,GAAe;IACnC,KAAK,EAAE,WAAW;IAClB,WAAW,EACT,0HAA0H;IAC5H,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,SAAS,GAAe;IACnC,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,WAAW,GAAe;IACrC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,qCAAqC;IAClD,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,+CAA+C;IAC5D,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,aAAa,GAAe;IACvC,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,uCAAuC;IACpD,IAAI,EAAE,QAAQ;CACf,CAAA;AAEY,QAAA,WAAW,GAAe;IACrC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,0DAA0D;IACvE,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,QAAQ;IACzB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,QAAQ;SACf;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,QAAQ;SACf;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EA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;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,8DAA8D;IAC3E,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,QAAQ;IACzB,oBAAoB,EAAE,IAAI;CAC3B,CAAA;AAEY,QAAA,MAAM,GAAe;IAChC,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,0EAA0E;IACvF,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,UAAU;IAC3B,oBAAoB,EAAE,IAAI;CAC3B,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
user_id?: string;
|
|
3
|
+
anonymous_id?: string;
|
|
4
|
+
group_id: string;
|
|
5
|
+
timestamp?: 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
|
+
traits?: {
|
|
63
|
+
[k: string]: unknown;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendGroup/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 Group',
|
|
8
|
+
description: 'Send a group call to Segment’s tracking API. This is used to associate an individual user with a group',
|
|
9
|
+
defaultSubscription: 'type = "group"',
|
|
10
|
+
fields: {
|
|
11
|
+
user_id: segment_properties_1.user_id,
|
|
12
|
+
anonymous_id: segment_properties_1.anonymous_id,
|
|
13
|
+
group_id: { ...segment_properties_1.group_id, required: true },
|
|
14
|
+
timestamp: segment_properties_1.timestamp,
|
|
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
|
+
traits: segment_properties_1.traits
|
|
28
|
+
},
|
|
29
|
+
perform: (request, { payload, settings }) => {
|
|
30
|
+
if (!payload.anonymous_id && !payload.user_id) {
|
|
31
|
+
throw errors_1.MissingUserOrAnonymousIdThrowableError;
|
|
32
|
+
}
|
|
33
|
+
const groupPayload = {
|
|
34
|
+
userId: payload?.user_id,
|
|
35
|
+
anonymousId: payload?.anonymous_id,
|
|
36
|
+
groupId: payload?.group_id,
|
|
37
|
+
timestamp: payload?.timestamp,
|
|
38
|
+
context: {
|
|
39
|
+
app: payload?.application,
|
|
40
|
+
campaign: payload?.campaign_parameters,
|
|
41
|
+
device: payload?.device,
|
|
42
|
+
ip: payload?.ip_address,
|
|
43
|
+
locale: payload?.locale,
|
|
44
|
+
location: payload?.location,
|
|
45
|
+
network: payload?.network,
|
|
46
|
+
os: payload?.operating_system,
|
|
47
|
+
page: payload?.page,
|
|
48
|
+
screen: payload?.screen,
|
|
49
|
+
userAgent: payload?.user_agent,
|
|
50
|
+
timezone: payload?.timezone
|
|
51
|
+
},
|
|
52
|
+
traits: {
|
|
53
|
+
...payload?.traits
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
if (!settings.endpoint || !(settings.endpoint in properties_1.SEGMENT_ENDPOINTS)) {
|
|
57
|
+
throw errors_1.InvalidEndpointSelectedThrowableError;
|
|
58
|
+
}
|
|
59
|
+
const selectedSegmentEndpoint = properties_1.SEGMENT_ENDPOINTS[settings.endpoint].url;
|
|
60
|
+
return request(`${selectedSegmentEndpoint}/group`, {
|
|
61
|
+
method: 'POST',
|
|
62
|
+
json: groupPayload
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
exports.default = action;
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendGroup/index.ts"],"names":[],"mappings":";;AAGA,8DAkB8B;AAC9B,8CAAiD;AACjD,sCAAyG;AAEzG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,wGAAwG;IACrH,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,QAAQ,EAAE,EAAE,GAAG,6BAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACzC,SAAS,EAAT,8BAAS;QACT,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,MAAM,EAAN,2BAAM;KACP;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,YAAY,GAAW;YAC3B,MAAM,EAAE,OAAO,EAAE,OAAO;YACxB,WAAW,EAAE,OAAO,EAAE,YAAY;YAClC,OAAO,EAAE,OAAO,EAAE,QAAQ;YAC1B,SAAS,EAAE,OAAO,EAAE,SAAS;YAC7B,OAAO,EAAE;gBACP,GAAG,EAAE,OAAO,EAAE,WAAW;gBACzB,QAAQ,EAAE,OAAO,EAAE,mBAAmB;gBACtC,MAAM,EAAE,OAAO,EAAE,MAAM;gBACvB,EAAE,EAAE,OAAO,EAAE,UAAU;gBACvB,MAAM,EAAE,OAAO,EAAE,MAAM;gBACvB,QAAQ,EAAE,OAAO,EAAE,QAAQ;gBAC3B,OAAO,EAAE,OAAO,EAAE,OAAO;gBACzB,EAAE,EAAE,OAAO,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,OAAO,EAAE,IAAI;gBACnB,MAAM,EAAE,OAAO,EAAE,MAAM;gBACvB,SAAS,EAAE,OAAO,EAAE,UAAU;gBAC9B,QAAQ,EAAE,OAAO,EAAE,QAAQ;aAC5B;YACD,MAAM,EAAE;gBACN,GAAG,OAAO,EAAE,MAAM;aACnB;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;QACxE,OAAO,OAAO,CAAC,GAAG,uBAAuB,QAAQ,EAAE;YACjD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,YAAY;SACnB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
user_id?: string;
|
|
3
|
+
anonymous_id?: string;
|
|
4
|
+
timestamp?: string;
|
|
5
|
+
application?: {
|
|
6
|
+
name?: string;
|
|
7
|
+
version?: string;
|
|
8
|
+
build?: string;
|
|
9
|
+
namespace?: string;
|
|
10
|
+
};
|
|
11
|
+
campaign_parameters?: {
|
|
12
|
+
name?: string;
|
|
13
|
+
source?: string;
|
|
14
|
+
medium?: string;
|
|
15
|
+
term?: string;
|
|
16
|
+
content?: string;
|
|
17
|
+
};
|
|
18
|
+
device?: {
|
|
19
|
+
id?: string;
|
|
20
|
+
advertising_id?: string;
|
|
21
|
+
adTracking_Enabled?: boolean;
|
|
22
|
+
manufacturer?: string;
|
|
23
|
+
model?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
type?: string;
|
|
26
|
+
token?: string;
|
|
27
|
+
};
|
|
28
|
+
ip_address?: string;
|
|
29
|
+
locale?: string;
|
|
30
|
+
location?: {
|
|
31
|
+
city?: string;
|
|
32
|
+
country?: string;
|
|
33
|
+
latitude?: number;
|
|
34
|
+
longitude?: number;
|
|
35
|
+
speed?: number;
|
|
36
|
+
};
|
|
37
|
+
network?: {
|
|
38
|
+
bluetooth?: boolean;
|
|
39
|
+
carrier?: string;
|
|
40
|
+
cellular?: boolean;
|
|
41
|
+
wifi?: boolean;
|
|
42
|
+
};
|
|
43
|
+
operating_system?: {
|
|
44
|
+
name?: string;
|
|
45
|
+
version?: string;
|
|
46
|
+
};
|
|
47
|
+
page?: {
|
|
48
|
+
path?: string;
|
|
49
|
+
referrer?: string;
|
|
50
|
+
search?: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
url?: string;
|
|
53
|
+
};
|
|
54
|
+
screen?: {
|
|
55
|
+
density?: number;
|
|
56
|
+
height?: number;
|
|
57
|
+
width?: number;
|
|
58
|
+
};
|
|
59
|
+
user_agent?: string;
|
|
60
|
+
timezone?: string;
|
|
61
|
+
group_id?: string;
|
|
62
|
+
traits?: {
|
|
63
|
+
[k: string]: unknown;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendIdentify/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 Identify',
|
|
8
|
+
description: 'Send an identify call to Segment’s tracking API. This is used to tie your users to their actions and record traits about them.',
|
|
9
|
+
defaultSubscription: 'type = "identify"',
|
|
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
|
+
application: segment_properties_1.application,
|
|
15
|
+
campaign_parameters: segment_properties_1.campaign_parameters,
|
|
16
|
+
device: segment_properties_1.device,
|
|
17
|
+
ip_address: segment_properties_1.ip_address,
|
|
18
|
+
locale: segment_properties_1.locale,
|
|
19
|
+
location: segment_properties_1.location,
|
|
20
|
+
network: segment_properties_1.network,
|
|
21
|
+
operating_system: segment_properties_1.operating_system,
|
|
22
|
+
page: segment_properties_1.page,
|
|
23
|
+
screen: segment_properties_1.screen,
|
|
24
|
+
user_agent: segment_properties_1.user_agent,
|
|
25
|
+
timezone: segment_properties_1.timezone,
|
|
26
|
+
group_id: segment_properties_1.group_id,
|
|
27
|
+
traits: segment_properties_1.traits
|
|
28
|
+
},
|
|
29
|
+
perform: (request, { payload, settings }) => {
|
|
30
|
+
if (!payload.anonymous_id && !payload.user_id) {
|
|
31
|
+
throw errors_1.MissingUserOrAnonymousIdThrowableError;
|
|
32
|
+
}
|
|
33
|
+
const identifyPayload = {
|
|
34
|
+
userId: payload?.user_id,
|
|
35
|
+
anonymousId: payload?.anonymous_id,
|
|
36
|
+
timestamp: payload?.timestamp,
|
|
37
|
+
context: {
|
|
38
|
+
app: payload?.application,
|
|
39
|
+
campaign: payload?.campaign_parameters,
|
|
40
|
+
device: payload?.device,
|
|
41
|
+
ip: payload?.ip_address,
|
|
42
|
+
locale: payload?.locale,
|
|
43
|
+
location: payload?.location,
|
|
44
|
+
network: payload?.network,
|
|
45
|
+
os: payload?.operating_system,
|
|
46
|
+
page: payload?.page,
|
|
47
|
+
screen: payload?.screen,
|
|
48
|
+
userAgent: payload?.user_agent,
|
|
49
|
+
timezone: payload?.timezone,
|
|
50
|
+
groupId: payload?.group_id
|
|
51
|
+
},
|
|
52
|
+
traits: {
|
|
53
|
+
...payload?.traits
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
if (!settings.endpoint || !(settings.endpoint in properties_1.SEGMENT_ENDPOINTS)) {
|
|
57
|
+
throw errors_1.InvalidEndpointSelectedThrowableError;
|
|
58
|
+
}
|
|
59
|
+
const selectedSegmentEndpoint = properties_1.SEGMENT_ENDPOINTS[settings.endpoint].url;
|
|
60
|
+
return request(`${selectedSegmentEndpoint}/identify`, {
|
|
61
|
+
method: 'POST',
|
|
62
|
+
json: identifyPayload
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
exports.default = action;
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment/sendIdentify/index.ts"],"names":[],"mappings":";;AAGA,8DAkB8B;AAC9B,8CAAiD;AACjD,sCAAyG;AAEzG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,gIAAgI;IAClI,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,SAAS,EAAT,8BAAS;QACT,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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