@segment/action-destinations 3.165.0 → 3.165.1-add-new-error.24
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/acoustic/Utility/eventprocessing.js +18 -18
- package/dist/destinations/acoustic/Utility/eventprocessing.js.map +1 -1
- package/dist/destinations/airship/customEvents/generated-types.d.ts +9 -0
- package/dist/destinations/airship/customEvents/generated-types.js +3 -0
- package/dist/destinations/airship/customEvents/generated-types.js.map +1 -0
- package/dist/destinations/airship/customEvents/index.d.ts +5 -0
- package/dist/destinations/airship/customEvents/index.js +59 -0
- package/dist/destinations/airship/customEvents/index.js.map +1 -0
- package/dist/destinations/airship/generated-types.d.ts +5 -0
- package/dist/destinations/airship/generated-types.js +3 -0
- package/dist/destinations/airship/generated-types.js.map +1 -0
- package/dist/destinations/airship/index.d.ts +4 -0
- package/dist/destinations/airship/index.js +97 -0
- package/dist/destinations/airship/index.js.map +1 -0
- package/dist/destinations/airship/manageTags/generated-types.d.ts +7 -0
- package/dist/destinations/airship/manageTags/generated-types.js +3 -0
- package/dist/destinations/airship/manageTags/generated-types.js.map +1 -0
- package/dist/destinations/airship/manageTags/index.d.ts +5 -0
- package/dist/destinations/airship/manageTags/index.js +38 -0
- package/dist/destinations/airship/manageTags/index.js.map +1 -0
- package/dist/destinations/airship/setAttributes/generated-types.d.ts +30 -0
- package/dist/destinations/airship/setAttributes/generated-types.js +3 -0
- package/dist/destinations/airship/setAttributes/generated-types.js.map +1 -0
- package/dist/destinations/airship/setAttributes/index.d.ts +5 -0
- package/dist/destinations/airship/setAttributes/index.js +182 -0
- package/dist/destinations/airship/setAttributes/index.js.map +1 -0
- package/dist/destinations/airship/utilities.d.ts +28 -0
- package/dist/destinations/airship/utilities.js +146 -0
- package/dist/destinations/airship/utilities.js.map +1 -0
- package/dist/destinations/calliper/alias/generated-types.d.ts +5 -0
- package/dist/destinations/calliper/alias/generated-types.js +3 -0
- package/dist/destinations/calliper/alias/generated-types.js.map +1 -0
- package/dist/destinations/calliper/alias/index.d.ts +5 -0
- package/dist/destinations/calliper/alias/index.js +60 -0
- package/dist/destinations/calliper/alias/index.js.map +1 -0
- package/dist/destinations/calliper/generated-types.d.ts +4 -0
- package/dist/destinations/calliper/generated-types.js +3 -0
- package/dist/destinations/calliper/generated-types.js.map +1 -0
- package/dist/destinations/calliper/identifyGroup/generated-types.d.ts +7 -0
- package/dist/destinations/calliper/identifyGroup/generated-types.js +3 -0
- package/dist/destinations/calliper/identifyGroup/generated-types.js.map +1 -0
- package/dist/destinations/calliper/identifyGroup/index.d.ts +5 -0
- package/dist/destinations/calliper/identifyGroup/index.js +53 -0
- package/dist/destinations/calliper/identifyGroup/index.js.map +1 -0
- package/dist/destinations/calliper/identifyUser/generated-types.d.ts +14 -0
- package/dist/destinations/calliper/identifyUser/generated-types.js +3 -0
- package/dist/destinations/calliper/identifyUser/generated-types.js.map +1 -0
- package/dist/destinations/calliper/identifyUser/index.d.ts +5 -0
- package/dist/destinations/calliper/identifyUser/index.js +152 -0
- package/dist/destinations/calliper/identifyUser/index.js.map +1 -0
- package/dist/destinations/calliper/index.d.ts +4 -0
- package/dist/destinations/calliper/index.js +81 -0
- package/dist/destinations/calliper/index.js.map +1 -0
- package/dist/destinations/calliper/trackEvent/eventProperties.d.ts +2 -0
- package/dist/destinations/calliper/trackEvent/eventProperties.js +231 -0
- package/dist/destinations/calliper/trackEvent/eventProperties.js.map +1 -0
- package/dist/destinations/calliper/trackEvent/generated-types.d.ts +32 -0
- package/dist/destinations/calliper/trackEvent/generated-types.js +3 -0
- package/dist/destinations/calliper/trackEvent/generated-types.js.map +1 -0
- package/dist/destinations/calliper/trackEvent/index.d.ts +5 -0
- package/dist/destinations/calliper/trackEvent/index.js +65 -0
- package/dist/destinations/calliper/trackEvent/index.js.map +1 -0
- package/dist/destinations/calliper/utils/constants.d.ts +1 -0
- package/dist/destinations/calliper/utils/constants.js +5 -0
- package/dist/destinations/calliper/utils/constants.js.map +1 -0
- package/dist/destinations/calliper/utils/helpers.d.ts +1 -0
- package/dist/destinations/calliper/utils/helpers.js +8 -0
- package/dist/destinations/calliper/utils/helpers.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/addToCart/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/addToCart/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/custom/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/custom/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/fb-capi-app-data.d.ts +10 -0
- package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js +179 -0
- package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/index.js +1 -1
- package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/pageView/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/pageView/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/pageView/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/purchase/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/purchase/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/search/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/search/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/search/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/viewContent/generated-types.d.ts +21 -0
- package/dist/destinations/facebook-conversions-api/viewContent/index.js +3 -0
- package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
- package/dist/destinations/fullstory/index.js +1 -1
- package/dist/destinations/fullstory/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -0
- package/dist/destinations/google-enhanced-conversions/functions.js +3 -1
- package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +3 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +3 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +4 -0
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
- package/dist/destinations/index.js +2 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/iterable/index.js +3 -3
- package/dist/destinations/iterable/index.js.map +1 -1
- package/dist/destinations/iterable/shared-fields.d.ts +15 -1
- package/dist/destinations/iterable/shared-fields.js +19 -17
- package/dist/destinations/iterable/shared-fields.js.map +1 -1
- package/dist/destinations/iterable/trackEvent/index.js +4 -1
- package/dist/destinations/iterable/trackEvent/index.js.map +1 -1
- package/dist/destinations/iterable/trackPurchase/generated-types.d.ts +1 -4
- package/dist/destinations/iterable/trackPurchase/index.js +21 -26
- package/dist/destinations/iterable/trackPurchase/index.js.map +1 -1
- package/dist/destinations/iterable/updateCart/generated-types.d.ts +1 -4
- package/dist/destinations/iterable/updateCart/index.js +21 -28
- package/dist/destinations/iterable/updateCart/index.js.map +1 -1
- package/dist/destinations/iterable/updateUser/generated-types.d.ts +1 -1
- package/dist/destinations/iterable/updateUser/index.js +12 -8
- package/dist/destinations/iterable/updateUser/index.js.map +1 -1
- package/dist/destinations/iterable/utils.d.ts +4 -0
- package/dist/destinations/iterable/utils.js +63 -0
- package/dist/destinations/iterable/utils.js.map +1 -0
- package/dist/destinations/liveramp-audiences/audienceEntered/generated-types.d.ts +1 -0
- package/dist/destinations/liveramp-audiences/audienceEntered/index.js +7 -0
- package/dist/destinations/liveramp-audiences/audienceEntered/index.js.map +1 -1
- package/dist/destinations/liveramp-audiences/generated-types.d.ts +2 -0
- package/dist/destinations/liveramp-audiences/index.js +14 -0
- package/dist/destinations/liveramp-audiences/index.js.map +1 -1
- package/dist/destinations/noop/generated-types.d.ts +2 -0
- package/dist/destinations/noop/generated-types.js +3 -0
- package/dist/destinations/noop/generated-types.js.map +1 -0
- package/dist/destinations/noop/index.d.ts +4 -0
- package/dist/destinations/noop/index.js +27 -0
- package/dist/destinations/noop/index.js.map +1 -0
- package/dist/destinations/noop/noop/generated-types.d.ts +3 -0
- package/dist/destinations/noop/noop/generated-types.js +3 -0
- package/dist/destinations/noop/noop/generated-types.js.map +1 -0
- package/dist/destinations/noop/noop/index.d.ts +5 -0
- package/dist/destinations/noop/noop/index.js +19 -0
- package/dist/destinations/noop/noop/index.js.map +1 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/index.js +1 -1
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/index.js.map +1 -1
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js +2 -1
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -1
- package/dist/destinations/usermaven/common-definitions.js +1 -1
- package/dist/destinations/usermaven/common-definitions.js.map +1 -1
- package/dist/destinations/usermaven/generated-types.d.ts +1 -0
- package/dist/destinations/usermaven/group/generated-types.d.ts +1 -1
- package/dist/destinations/usermaven/identify/generated-types.d.ts +1 -1
- package/dist/destinations/usermaven/index.js +10 -1
- package/dist/destinations/usermaven/index.js.map +1 -1
- package/dist/destinations/usermaven/page/generated-types.d.ts +1 -1
- package/dist/destinations/usermaven/request-params.js +4 -3
- package/dist/destinations/usermaven/request-params.js.map +1 -1
- package/dist/destinations/usermaven/track/generated-types.d.ts +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.eventProperties = void 0;
|
|
4
|
+
exports.eventProperties = {
|
|
5
|
+
event: {
|
|
6
|
+
label: 'Event Type',
|
|
7
|
+
type: 'string',
|
|
8
|
+
description: 'A type of your event, e.g. a sign up or a name of an action within your product.',
|
|
9
|
+
required: true,
|
|
10
|
+
default: {
|
|
11
|
+
'@path': '$.event'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
time: {
|
|
15
|
+
label: 'Timestamp',
|
|
16
|
+
type: 'datetime',
|
|
17
|
+
description: 'The timestamp of the event. Could be any date string/number value compatible with JavaScript Date constructor: e.g. milliseconds epoch or an ISO datetime. If time is not sent with the event, it will be set to the request time.',
|
|
18
|
+
default: {
|
|
19
|
+
'@path': '$.timestamp'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
anonymous_id: {
|
|
23
|
+
label: 'Anonymous ID',
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'A distinct ID of an unidentified (logged out) user. Device id is used if available',
|
|
26
|
+
default: {
|
|
27
|
+
'@path': '$.anonymousId'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
user_id: {
|
|
31
|
+
label: 'User ID',
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'A distinct ID of an identified (logged in) user.',
|
|
34
|
+
default: {
|
|
35
|
+
'@path': '$.userId'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
group_id: {
|
|
39
|
+
label: 'Group ID',
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'The unique identifier of the group that performed this event.',
|
|
42
|
+
default: {
|
|
43
|
+
'@path': '$.context.groupId'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
event_unique_id: {
|
|
47
|
+
label: 'Event ID',
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'A random id that is unique to an event. ID is being used to prevent event duplication. All the events that share the same unique id besides the first one will be ignored.',
|
|
50
|
+
default: {
|
|
51
|
+
'@path': '$.messageId'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
app_version: {
|
|
55
|
+
label: 'App Version',
|
|
56
|
+
type: 'string',
|
|
57
|
+
description: 'The current version of your application.',
|
|
58
|
+
default: {
|
|
59
|
+
'@path': '$.context.app.version'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
os_name: {
|
|
63
|
+
label: 'OS Name',
|
|
64
|
+
type: 'string',
|
|
65
|
+
description: 'The name of the mobile operating system or browser that the user is using.',
|
|
66
|
+
default: {
|
|
67
|
+
'@path': '$.context.os.name'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
os_version: {
|
|
71
|
+
label: 'OS Version',
|
|
72
|
+
type: 'string',
|
|
73
|
+
description: 'The version of the mobile operating system or browser the user is using.',
|
|
74
|
+
default: {
|
|
75
|
+
'@path': '$.context.os.version'
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
device_id: {
|
|
79
|
+
label: 'Device ID',
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'A unique identifier for the device the user is using.',
|
|
82
|
+
default: {
|
|
83
|
+
'@path': '$.context.device.id'
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
platform: {
|
|
87
|
+
label: 'Platform',
|
|
88
|
+
type: 'string',
|
|
89
|
+
description: 'Platform of the device.',
|
|
90
|
+
default: {
|
|
91
|
+
'@path': '$.context.device.type'
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
device_manufacturer: {
|
|
95
|
+
label: 'Device Manufacturer',
|
|
96
|
+
type: 'string',
|
|
97
|
+
description: 'The device manufacturer that the user is using.',
|
|
98
|
+
default: {
|
|
99
|
+
'@path': '$.context.device.manufacturer'
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
device_model: {
|
|
103
|
+
label: 'Device Model',
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'The device model that the user is using.',
|
|
106
|
+
default: {
|
|
107
|
+
'@path': '$.context.device.model'
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
carrier: {
|
|
111
|
+
label: 'Carrier',
|
|
112
|
+
type: 'string',
|
|
113
|
+
description: 'The carrier that the user is using.',
|
|
114
|
+
default: {
|
|
115
|
+
'@path': '$.context.network.carrier'
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
cellular: {
|
|
119
|
+
label: 'Cellular Enabled',
|
|
120
|
+
type: 'boolean',
|
|
121
|
+
description: 'Whether cellular is enabled.',
|
|
122
|
+
default: {
|
|
123
|
+
'@path': '$.context.network.cellular'
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
country: {
|
|
127
|
+
label: 'Country',
|
|
128
|
+
type: 'string',
|
|
129
|
+
description: 'The current country of the user.',
|
|
130
|
+
default: {
|
|
131
|
+
'@path': '$.context.location.country'
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
region: {
|
|
135
|
+
label: 'Region',
|
|
136
|
+
type: 'string',
|
|
137
|
+
description: 'The current region of the user.',
|
|
138
|
+
default: {
|
|
139
|
+
'@path': '$.context.location.region'
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
city: {
|
|
143
|
+
label: 'City',
|
|
144
|
+
type: 'string',
|
|
145
|
+
description: 'The current city of the user.',
|
|
146
|
+
default: {
|
|
147
|
+
'@path': '$.context.location.city'
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
language: {
|
|
151
|
+
label: 'Language',
|
|
152
|
+
type: 'string',
|
|
153
|
+
description: 'The language set by the user.',
|
|
154
|
+
default: {
|
|
155
|
+
'@path': '$.context.locale'
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
library_name: {
|
|
159
|
+
label: 'Library Name',
|
|
160
|
+
type: 'string',
|
|
161
|
+
description: 'The name of the SDK used to send events.',
|
|
162
|
+
default: {
|
|
163
|
+
'@path': '$.context.library.name'
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
library_version: {
|
|
167
|
+
label: 'Library Version',
|
|
168
|
+
type: 'string',
|
|
169
|
+
description: 'The version of the SDK used to send events.',
|
|
170
|
+
default: {
|
|
171
|
+
'@path': '$.context.library.version'
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
ip: {
|
|
175
|
+
label: 'IP Address',
|
|
176
|
+
type: 'string',
|
|
177
|
+
description: "The IP address of the user. This is only used for geolocation and won't be stored.",
|
|
178
|
+
default: {
|
|
179
|
+
'@path': '$.context.ip'
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
url: {
|
|
183
|
+
label: 'URL',
|
|
184
|
+
type: 'string',
|
|
185
|
+
description: 'The full URL of the webpage on which the event is triggered.',
|
|
186
|
+
default: {
|
|
187
|
+
'@path': '$.context.page.url'
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
path: {
|
|
191
|
+
label: 'Page Path',
|
|
192
|
+
type: 'string',
|
|
193
|
+
description: 'The relative URL of the webpage on which the event is triggered.',
|
|
194
|
+
default: {
|
|
195
|
+
'@path': '$.context.page.path'
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
page_title: {
|
|
199
|
+
label: 'Page Title',
|
|
200
|
+
type: 'string',
|
|
201
|
+
description: 'The name of the webpage on which the event is triggered.',
|
|
202
|
+
default: {
|
|
203
|
+
'@path': '$.context.page.title'
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
referrer: {
|
|
207
|
+
label: 'Referrer',
|
|
208
|
+
type: 'string',
|
|
209
|
+
description: 'Referrer url',
|
|
210
|
+
default: {
|
|
211
|
+
'@path': '$.context.page.referrer'
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
user_agent: {
|
|
215
|
+
label: 'User Agent',
|
|
216
|
+
type: 'string',
|
|
217
|
+
description: 'User agent',
|
|
218
|
+
default: {
|
|
219
|
+
'@path': '$.context.userAgent'
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
event_properties: {
|
|
223
|
+
label: 'Event Properties',
|
|
224
|
+
type: 'object',
|
|
225
|
+
description: 'An object of key-value pairs that represent additional data to be sent along with the event.',
|
|
226
|
+
default: {
|
|
227
|
+
'@path': '$.properties'
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
//# sourceMappingURL=eventProperties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventProperties.js","sourceRoot":"","sources":["../../../../src/destinations/calliper/trackEvent/eventProperties.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAA+B;IACzD,KAAK,EAAE;QACL,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,kFAAkF;QAC/F,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACP,OAAO,EAAE,SAAS;SACnB;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,UAAU;QAChB,WAAW,EACT,oOAAoO;QACtO,OAAO,EAAE;YACP,OAAO,EAAE,aAAa;SACvB;KACF;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,oFAAoF;QACjG,OAAO,EAAE;YACP,OAAO,EAAE,eAAe;SACzB;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE;YACP,OAAO,EAAE,UAAU;SACpB;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,+DAA+D;QAC5E,OAAO,EAAE;YACP,OAAO,EAAE,mBAAmB;SAC7B;KACF;IACD,eAAe,EAAE;QACf,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,4KAA4K;QAC9K,OAAO,EAAE;YACP,OAAO,EAAE,aAAa;SACvB;KACF;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BAAoB;SAC9B;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,kEAAkE;QAC/E,OAAO,EAAE;YACP,OAAO,EAAE,qBAAqB;SAC/B;KACF;IACD,UAAU,EAAE;QACV,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,0DAA0D;QACvE,OAAO,EAAE;YACP,OAAO,EAAE,sBAAsB;SAChC;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,cAAc;QAC3B,OAAO,EAAE;YACP,OAAO,EAAE,yBAAyB;SACnC;KACF;IACD,UAAU,EAAE;QACV,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE;YACP,OAAO,EAAE,qBAAqB;SAC/B;KACF;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,8FAA8F;QAC3G,OAAO,EAAE;YACP,OAAO,EAAE,cAAc;SACxB;KACF;CACF,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
event: string;
|
|
3
|
+
time?: string | number;
|
|
4
|
+
anonymous_id?: string;
|
|
5
|
+
user_id?: string;
|
|
6
|
+
group_id?: string;
|
|
7
|
+
event_unique_id?: string;
|
|
8
|
+
app_version?: string;
|
|
9
|
+
os_name?: string;
|
|
10
|
+
os_version?: string;
|
|
11
|
+
device_id?: string;
|
|
12
|
+
platform?: string;
|
|
13
|
+
device_manufacturer?: string;
|
|
14
|
+
device_model?: string;
|
|
15
|
+
carrier?: string;
|
|
16
|
+
cellular?: boolean;
|
|
17
|
+
country?: string;
|
|
18
|
+
region?: string;
|
|
19
|
+
city?: string;
|
|
20
|
+
language?: string;
|
|
21
|
+
library_name?: string;
|
|
22
|
+
library_version?: string;
|
|
23
|
+
ip?: string;
|
|
24
|
+
url?: string;
|
|
25
|
+
path?: string;
|
|
26
|
+
page_title?: string;
|
|
27
|
+
referrer?: string;
|
|
28
|
+
user_agent?: string;
|
|
29
|
+
event_properties?: {
|
|
30
|
+
[k: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/calliper/trackEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 eventProperties_1 = require("./eventProperties");
|
|
7
|
+
const dayjs_1 = __importDefault(require("../../../lib/dayjs"));
|
|
8
|
+
const constants_1 = require("../utils/constants");
|
|
9
|
+
const formatEvent = (payload) => {
|
|
10
|
+
const datetime = payload.time;
|
|
11
|
+
const time = datetime && dayjs_1.default.utc(datetime).isValid() ? dayjs_1.default.utc(datetime).valueOf() : Date.now();
|
|
12
|
+
return {
|
|
13
|
+
event: payload.event,
|
|
14
|
+
time: time,
|
|
15
|
+
anonymous_id: payload.anonymous_id,
|
|
16
|
+
user_id: payload.user_id,
|
|
17
|
+
group_id: payload.group_id,
|
|
18
|
+
event_unique_id: payload.event_unique_id,
|
|
19
|
+
app_version: payload.app_version,
|
|
20
|
+
os_name: payload.os_name,
|
|
21
|
+
device_id: payload.device_id,
|
|
22
|
+
platform: payload.platform,
|
|
23
|
+
device_manufacturer: payload.device_manufacturer,
|
|
24
|
+
device_model: payload.device_model,
|
|
25
|
+
carrier: payload.carrier,
|
|
26
|
+
cellular: payload.cellular,
|
|
27
|
+
country: payload.country,
|
|
28
|
+
region: payload.region,
|
|
29
|
+
city: payload.city,
|
|
30
|
+
language: payload.language,
|
|
31
|
+
library_name: `Segment: ${payload.library_name}`,
|
|
32
|
+
library_version: payload.library_version,
|
|
33
|
+
ip: payload.ip,
|
|
34
|
+
url: payload.url,
|
|
35
|
+
path: payload.path,
|
|
36
|
+
page_title: payload.page_title,
|
|
37
|
+
user_agent: payload.user_agent,
|
|
38
|
+
properties: payload.event_properties
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
const processData = async (request, settings, payload) => {
|
|
42
|
+
const events = payload.map(formatEvent);
|
|
43
|
+
return request(`${constants_1.API_URL}/event/batch`, {
|
|
44
|
+
method: 'post',
|
|
45
|
+
json: {
|
|
46
|
+
company_id: settings.companyId,
|
|
47
|
+
key: settings.segmentKey,
|
|
48
|
+
events
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
const action = {
|
|
53
|
+
title: 'Track Event',
|
|
54
|
+
description: 'Send your product event to Calliper.',
|
|
55
|
+
defaultSubscription: 'type = "track"',
|
|
56
|
+
fields: eventProperties_1.eventProperties,
|
|
57
|
+
performBatch: async (request, { settings, payload }) => {
|
|
58
|
+
return processData(request, settings, payload);
|
|
59
|
+
},
|
|
60
|
+
perform: async (request, { settings, payload }) => {
|
|
61
|
+
return processData(request, settings, [payload]);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
exports.default = action;
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/calliper/trackEvent/index.ts"],"names":[],"mappings":";;;;;AAGA,uDAAmD;AACnD,+DAAsC;AACtC,kDAA4C;AAE5C,MAAM,WAAW,GAAG,CAAC,OAAgB,EAAE,EAAE;IACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAA;IAC7B,MAAM,IAAI,GAAG,QAAQ,IAAI,eAAK,CAAC,GAAG,CAAC,QAAQ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3F,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;IAEvC,OAAO,OAAO,CAAC,GAAG,mBAAO,cAAc,EAAE;QACvC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,UAAU,EAAE,QAAQ,CAAC,SAAS;YAC9B,GAAG,EAAE,QAAQ,CAAC,UAAU;YACxB,MAAM;SACP;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,sCAAsC;IACnD,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE,iCAAe;IAEvB,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const API_URL = "https://api.getcalliper.com/segment";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/destinations/calliper/utils/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,qCAAqC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatName(firstName: unknown, lastName: unknown, name: unknown): unknown;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatName = void 0;
|
|
4
|
+
function formatName(firstName, lastName, name) {
|
|
5
|
+
return name ?? ([firstName, lastName].filter(Boolean).join(' ') || undefined);
|
|
6
|
+
}
|
|
7
|
+
exports.formatName = formatName;
|
|
8
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/destinations/calliper/utils/helpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,UAAU,CAAC,SAAkB,EAAE,QAAiB,EAAE,IAAa;IAC7E,OAAO,IAAI,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,CAAA;AAC/E,CAAC;AAFD,gCAEC"}
|
|
@@ -23,6 +23,27 @@ export interface Payload {
|
|
|
23
23
|
partner_id?: string;
|
|
24
24
|
partner_name?: string;
|
|
25
25
|
};
|
|
26
|
+
app_data_field?: {
|
|
27
|
+
use_app_data?: boolean;
|
|
28
|
+
advertiser_tracking_enabled?: boolean;
|
|
29
|
+
application_tracking_enabled?: boolean;
|
|
30
|
+
version?: string;
|
|
31
|
+
packageName?: string;
|
|
32
|
+
shortVersion?: string;
|
|
33
|
+
longVersion?: string;
|
|
34
|
+
osVersion?: string;
|
|
35
|
+
deviceName?: string;
|
|
36
|
+
locale?: string;
|
|
37
|
+
timezone?: string;
|
|
38
|
+
carrier?: string;
|
|
39
|
+
width?: string;
|
|
40
|
+
height?: string;
|
|
41
|
+
density?: string;
|
|
42
|
+
cpuCores?: string;
|
|
43
|
+
storageSize?: string;
|
|
44
|
+
freeStorage?: string;
|
|
45
|
+
deviceTimezone?: string;
|
|
46
|
+
};
|
|
26
47
|
content_ids?: string[];
|
|
27
48
|
content_name?: string;
|
|
28
49
|
content_type?: string;
|
|
@@ -5,6 +5,7 @@ const fb_capi_properties_1 = require("../fb-capi-properties");
|
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const fb_capi_user_data_1 = require("../fb-capi-user-data");
|
|
7
7
|
const utils_1 = require("../utils");
|
|
8
|
+
const fb_capi_app_data_1 = require("../fb-capi-app-data");
|
|
8
9
|
const action = {
|
|
9
10
|
title: 'Add to Cart',
|
|
10
11
|
description: 'Send event when a user adds a product to the shopping cart',
|
|
@@ -13,6 +14,7 @@ const action = {
|
|
|
13
14
|
action_source: { ...fb_capi_properties_1.action_source, required: true },
|
|
14
15
|
event_time: { ...fb_capi_properties_1.event_time, required: true },
|
|
15
16
|
user_data: fb_capi_user_data_1.user_data_field,
|
|
17
|
+
app_data_field: fb_capi_app_data_1.app_data_field,
|
|
16
18
|
content_ids: fb_capi_properties_1.content_ids,
|
|
17
19
|
content_name: fb_capi_properties_1.content_name,
|
|
18
20
|
content_type: fb_capi_properties_1.content_type,
|
|
@@ -80,6 +82,7 @@ const action = {
|
|
|
80
82
|
contents: payload.contents,
|
|
81
83
|
content_type: payload.content_type
|
|
82
84
|
},
|
|
85
|
+
app_data: fb_capi_app_data_1.generate_app_data(payload.app_data_field),
|
|
83
86
|
data_processing_options: data_options,
|
|
84
87
|
data_processing_options_country: country_code,
|
|
85
88
|
data_processing_options_state: state_code
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/addToCart/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,8DAiB8B;AAC9B,4CAAiD;AACjD,4DAAsE;AACtE,oCAA0C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/addToCart/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,8DAiB8B;AAC9B,4CAAiD;AACjD,4DAAsE;AACtE,oCAA0C;AAC1C,0DAAuE;AAEvE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,4DAA4D;IACzE,mBAAmB,EAAE,4CAA4C;IACjE,MAA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AC1B,YAAY,EAAE,OAAO,CAAC,YAAY;yBACnC;wBACD,QAAQ,EAAE,oCAAiB,CAAC,OAAO,CAAC,cAAc,CAAC;wBACnD,uBAAuB,EAAE,YAAY;wBACrC,+BAA+B,EAAE,YAAY;wBAC7C,6BAA6B,EAAE,UAAU;qBAC1C;iBACF;gBACD,GAAG,CAAC,QAAQ,CAAC,aAAa,IAAI,EAAE,eAAe,EAAE,QAAQ,CAAC,aAAa,EAAE,CAAC;aAC3E;SACF,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -24,6 +24,27 @@ export interface Payload {
|
|
|
24
24
|
partner_id?: string;
|
|
25
25
|
partner_name?: string;
|
|
26
26
|
};
|
|
27
|
+
app_data_field?: {
|
|
28
|
+
use_app_data?: boolean;
|
|
29
|
+
advertiser_tracking_enabled?: boolean;
|
|
30
|
+
application_tracking_enabled?: boolean;
|
|
31
|
+
version?: string;
|
|
32
|
+
packageName?: string;
|
|
33
|
+
shortVersion?: string;
|
|
34
|
+
longVersion?: string;
|
|
35
|
+
osVersion?: string;
|
|
36
|
+
deviceName?: string;
|
|
37
|
+
locale?: string;
|
|
38
|
+
timezone?: string;
|
|
39
|
+
carrier?: string;
|
|
40
|
+
width?: string;
|
|
41
|
+
height?: string;
|
|
42
|
+
density?: string;
|
|
43
|
+
cpuCores?: string;
|
|
44
|
+
storageSize?: string;
|
|
45
|
+
freeStorage?: string;
|
|
46
|
+
deviceTimezone?: string;
|
|
47
|
+
};
|
|
27
48
|
custom_data?: {
|
|
28
49
|
[k: string]: unknown;
|
|
29
50
|
};
|
|
@@ -4,6 +4,7 @@ const actions_core_1 = require("@segment/actions-core");
|
|
|
4
4
|
const fb_capi_properties_1 = require("../fb-capi-properties");
|
|
5
5
|
const fb_capi_user_data_1 = require("../fb-capi-user-data");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
|
+
const fb_capi_app_data_1 = require("../fb-capi-app-data");
|
|
7
8
|
const action = {
|
|
8
9
|
title: 'Custom Event',
|
|
9
10
|
description: 'Send a custom event',
|
|
@@ -20,6 +21,7 @@ const action = {
|
|
|
20
21
|
},
|
|
21
22
|
event_time: { ...fb_capi_properties_1.event_time, required: true },
|
|
22
23
|
user_data: fb_capi_user_data_1.user_data_field,
|
|
24
|
+
app_data_field: fb_capi_app_data_1.app_data_field,
|
|
23
25
|
custom_data: fb_capi_properties_1.custom_data,
|
|
24
26
|
event_id: fb_capi_properties_1.event_id,
|
|
25
27
|
event_source_url: fb_capi_properties_1.event_source_url,
|
|
@@ -44,6 +46,7 @@ const action = {
|
|
|
44
46
|
event_source_url: payload.event_source_url,
|
|
45
47
|
user_data: fb_capi_user_data_1.hash_user_data({ user_data: payload.user_data }),
|
|
46
48
|
custom_data: payload.custom_data,
|
|
49
|
+
app_data: fb_capi_app_data_1.generate_app_data(payload.app_data_field),
|
|
47
50
|
data_processing_options: data_options,
|
|
48
51
|
data_processing_options_country: country_code,
|
|
49
52
|
data_processing_options_state: state_code
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/custom/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAU8B;AAC9B,4DAAsE;AAGtE,oCAA0C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/custom/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAU8B;AAC9B,4DAAsE;AAGtE,oCAA0C;AAC1C,0DAAuE;AAEvE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,qBAAqB;IAClC,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,2PAA2P;YAC7P,IAAI,EAAE,QAAQ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AAE,OAAO,CAAC,WAAW;wBAChC,QAAQ,EAAE,oCAAiB,CAAC,OAAO,CAAC,cAAc,CAAC;wBACnD,uBAAuB,EAAE,YAAY;wBACrC,+BAA+B,EAAE,YAAY;wBAC7C,6BAA6B,EAAE,UAAU;qBAC1C;iBACF;gBACD,GAAG,CAAC,QAAQ,CAAC,aAAa,IAAI,EAAE,eAAe,EAAE,QAAQ,CAAC,aAAa,EAAE,CAAC;aAC3E;SACF,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InputField } from '@segment/actions-core';
|
|
2
|
+
import { Payload } from './addToCart/generated-types';
|
|
3
|
+
export declare type AppData = Payload['app_data_field'];
|
|
4
|
+
export declare type GeneratedAppData = {
|
|
5
|
+
advertiser_tracking_enabled: 1 | 0;
|
|
6
|
+
application_tracking_enabled: 1 | 0;
|
|
7
|
+
extinfo: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare const generate_app_data: (app_data: AppData) => GeneratedAppData | undefined;
|
|
10
|
+
export declare const app_data_field: InputField;
|