@segment/analytics-browser-actions-tiktok-pixel 1.94.1-staging-1f6aa0a59.0 → 1.95.1-staging-ce1986724.0
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/cjs/constants.d.ts +2 -0
- package/dist/cjs/constants.js +6 -0
- package/dist/cjs/constants.js.map +1 -0
- package/dist/cjs/fields/common_fields.d.ts +2 -0
- package/dist/cjs/{common_fields.js → fields/common_fields.js} +2 -113
- package/dist/cjs/fields/common_fields.js.map +1 -0
- package/dist/cjs/identify/generated-types.d.ts +0 -17
- package/dist/cjs/identify/index.js +10 -20
- package/dist/cjs/identify/index.js.map +1 -1
- package/dist/cjs/reportWebEvent/fields.d.ts +2 -0
- package/dist/cjs/reportWebEvent/fields.js +161 -0
- package/dist/cjs/reportWebEvent/fields.js.map +1 -0
- package/dist/cjs/reportWebEvent/generated-types.d.ts +62 -11
- package/dist/cjs/reportWebEvent/index.js +12 -24
- package/dist/cjs/reportWebEvent/index.js.map +1 -1
- package/dist/cjs/reportWebEvent/travel_fields.d.ts +2 -0
- package/dist/cjs/reportWebEvent/travel_fields.js +210 -0
- package/dist/cjs/reportWebEvent/travel_fields.js.map +1 -0
- package/dist/cjs/reportWebEvent/utils.d.ts +3 -0
- package/dist/cjs/reportWebEvent/utils.js +101 -0
- package/dist/cjs/reportWebEvent/utils.js.map +1 -0
- package/dist/cjs/reportWebEvent/vehicle_fields.d.ts +2 -0
- package/dist/cjs/reportWebEvent/vehicle_fields.js +255 -0
- package/dist/cjs/reportWebEvent/vehicle_fields.js.map +1 -0
- package/dist/cjs/types.d.ts +85 -29
- package/dist/cjs/utils.d.ts +4 -0
- package/dist/cjs/utils.js +18 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/constants.d.ts +2 -0
- package/dist/esm/constants.js +3 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/fields/common_fields.d.ts +2 -0
- package/dist/esm/{common_fields.js → fields/common_fields.js} +1 -112
- package/dist/esm/fields/common_fields.js.map +1 -0
- package/dist/esm/identify/generated-types.d.ts +0 -17
- package/dist/esm/identify/index.js +10 -20
- package/dist/esm/identify/index.js.map +1 -1
- package/dist/esm/reportWebEvent/fields.d.ts +2 -0
- package/dist/esm/reportWebEvent/fields.js +158 -0
- package/dist/esm/reportWebEvent/fields.js.map +1 -0
- package/dist/esm/reportWebEvent/generated-types.d.ts +62 -11
- package/dist/esm/reportWebEvent/index.js +12 -24
- package/dist/esm/reportWebEvent/index.js.map +1 -1
- package/dist/esm/reportWebEvent/travel_fields.d.ts +2 -0
- package/dist/esm/reportWebEvent/travel_fields.js +207 -0
- package/dist/esm/reportWebEvent/travel_fields.js.map +1 -0
- package/dist/esm/reportWebEvent/utils.d.ts +3 -0
- package/dist/esm/reportWebEvent/utils.js +98 -0
- package/dist/esm/reportWebEvent/utils.js.map +1 -0
- package/dist/esm/reportWebEvent/vehicle_fields.d.ts +2 -0
- package/dist/esm/reportWebEvent/vehicle_fields.js +252 -0
- package/dist/esm/reportWebEvent/vehicle_fields.js.map +1 -0
- package/dist/esm/types.d.ts +85 -29
- package/dist/esm/utils.d.ts +4 -0
- package/dist/esm/utils.js +15 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/constants.ts +2 -0
- package/src/{common_fields.ts → fields/common_fields.ts} +1 -114
- package/src/identify/generated-types.ts +0 -65
- package/src/identify/index.ts +10 -20
- package/src/reportWebEvent/__tests__/index.test.ts +521 -23
- package/src/reportWebEvent/fields.ts +162 -0
- package/src/reportWebEvent/generated-types.ts +239 -41
- package/src/reportWebEvent/index.ts +14 -26
- package/src/reportWebEvent/travel_fields.ts +216 -0
- package/src/reportWebEvent/utils.ts +167 -0
- package/src/reportWebEvent/vehicle_fields.ts +255 -0
- package/src/types.ts +89 -54
- package/src/utils.ts +18 -0
- package/dist/cjs/common_fields.d.ts +0 -2
- package/dist/cjs/common_fields.js.map +0 -1
- package/dist/esm/common_fields.d.ts +0 -2
- package/dist/esm/common_fields.js.map +0 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.travel_fields = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
exports.travel_fields = {
|
|
6
|
+
label: 'Travel Fields',
|
|
7
|
+
type: 'object',
|
|
8
|
+
description: 'Fields related to travel events.',
|
|
9
|
+
additionalProperties: false,
|
|
10
|
+
defaultObjectUI: 'keyvalue',
|
|
11
|
+
properties: {
|
|
12
|
+
city: {
|
|
13
|
+
label: 'Hotel City Location',
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'Hotel city location.'
|
|
16
|
+
},
|
|
17
|
+
region: {
|
|
18
|
+
label: 'Hotel Region',
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'Hotel region location.'
|
|
21
|
+
},
|
|
22
|
+
country: {
|
|
23
|
+
label: 'Hotel Country',
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'Hotel country location.'
|
|
26
|
+
},
|
|
27
|
+
checkin_date: {
|
|
28
|
+
label: 'Hotel Check-in Date',
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: 'Hotel check-in date.'
|
|
31
|
+
},
|
|
32
|
+
checkout_date: {
|
|
33
|
+
label: 'Hotel Check-out Date',
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Hotel check-out date.'
|
|
36
|
+
},
|
|
37
|
+
num_adults: {
|
|
38
|
+
label: 'Number of Adults',
|
|
39
|
+
type: 'number',
|
|
40
|
+
description: 'Number of adults.'
|
|
41
|
+
},
|
|
42
|
+
num_children: {
|
|
43
|
+
label: 'Number of Children',
|
|
44
|
+
type: 'number',
|
|
45
|
+
description: 'Number of children.'
|
|
46
|
+
},
|
|
47
|
+
num_infants: {
|
|
48
|
+
label: 'Number of Infants',
|
|
49
|
+
type: 'number',
|
|
50
|
+
description: 'Number of infants flying.'
|
|
51
|
+
},
|
|
52
|
+
suggested_hotels: {
|
|
53
|
+
label: 'Suggested Hotels',
|
|
54
|
+
description: 'Suggested hotels. This can be a single string value or an array of string values.',
|
|
55
|
+
type: 'string',
|
|
56
|
+
multiple: true
|
|
57
|
+
},
|
|
58
|
+
departing_departure_date: {
|
|
59
|
+
label: 'Departure Date',
|
|
60
|
+
type: 'string',
|
|
61
|
+
description: 'Date of flight departure. Accepted date formats: YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD, and YYYY-MM-DDThh:mm:ssTZD'
|
|
62
|
+
},
|
|
63
|
+
returning_departure_date: {
|
|
64
|
+
label: 'Arrival Date',
|
|
65
|
+
type: 'string',
|
|
66
|
+
description: 'Date of return flight. Accepted date formats: YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD, and YYYY-MM-DDThh:mm:ssTZD'
|
|
67
|
+
},
|
|
68
|
+
origin_airport: {
|
|
69
|
+
label: 'Origin Airport',
|
|
70
|
+
type: 'string',
|
|
71
|
+
description: 'Origin airport.'
|
|
72
|
+
},
|
|
73
|
+
destination_airport: {
|
|
74
|
+
label: 'Destination Airport',
|
|
75
|
+
type: 'string',
|
|
76
|
+
description: 'Destination airport.'
|
|
77
|
+
},
|
|
78
|
+
destination_ids: {
|
|
79
|
+
label: 'Destination IDs',
|
|
80
|
+
description: 'If a client has a destination catalog, the client can associate one or more destinations in the catalog with a specific flight event. For instance, link a particular route to a nearby museum and a nearby beach, both of which are destinations in the catalog. This field accepts a single string value or an array of string values.',
|
|
81
|
+
type: 'string',
|
|
82
|
+
multiple: true
|
|
83
|
+
},
|
|
84
|
+
departing_arrival_date: {
|
|
85
|
+
label: 'Departing Arrival Date',
|
|
86
|
+
type: 'string',
|
|
87
|
+
description: 'The date and time for arrival at the destination of the outbound journey. Accepted date formats: YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD, and YYYY-MM-DDThh:mm:ssTZD'
|
|
88
|
+
},
|
|
89
|
+
returning_arrival_date: {
|
|
90
|
+
label: 'Returning Arrival Date',
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'The date and time when the return journey is completed. Accepted date formats: YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD, and YYYY-MM-DDThh:mm:ssTZD'
|
|
93
|
+
},
|
|
94
|
+
travel_class: {
|
|
95
|
+
label: 'Flight Ticket Class',
|
|
96
|
+
type: 'string',
|
|
97
|
+
description: 'Class of the flight ticket, must be: "eco", "prem", "bus", "first".',
|
|
98
|
+
choices: [
|
|
99
|
+
{ value: 'eco', label: 'Economy' },
|
|
100
|
+
{ value: 'prem', label: 'Premium' },
|
|
101
|
+
{ value: 'bus', label: 'Bus' },
|
|
102
|
+
{ value: 'first', label: 'First' }
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
user_score: {
|
|
106
|
+
label: 'User Score',
|
|
107
|
+
type: 'number',
|
|
108
|
+
description: 'Represents the relative value of this potential customer to advertiser.'
|
|
109
|
+
},
|
|
110
|
+
preferred_num_stops: {
|
|
111
|
+
label: 'Preferred Number of Stops',
|
|
112
|
+
type: 'integer',
|
|
113
|
+
description: 'The preferred number of stops the user is looking for. 0 for direct flight.'
|
|
114
|
+
},
|
|
115
|
+
travel_start: {
|
|
116
|
+
label: 'Start Date of the Trip',
|
|
117
|
+
type: 'string',
|
|
118
|
+
description: "The start date of user's trip. Accept date formats: YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD, and YYYY-MM-DDThh:mm:ssTZD."
|
|
119
|
+
},
|
|
120
|
+
travel_end: {
|
|
121
|
+
label: 'End Date of the Trip',
|
|
122
|
+
type: 'string',
|
|
123
|
+
description: "The end date of user's trip. Accept date formats: YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD, and YYYY-MM-DDThh:mm:ssTZD."
|
|
124
|
+
},
|
|
125
|
+
suggested_destinations: {
|
|
126
|
+
label: 'Suggested Destination IDs',
|
|
127
|
+
description: 'A list of IDs representing destination suggestions for this user. This parameter is not applicable for the Search event. This field accepts a single string value or an array of string values.',
|
|
128
|
+
type: 'string',
|
|
129
|
+
multiple: true
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
default: {
|
|
133
|
+
city: {
|
|
134
|
+
'@path': '$.properties.city'
|
|
135
|
+
},
|
|
136
|
+
region: {
|
|
137
|
+
'@path': '$.properties.region'
|
|
138
|
+
},
|
|
139
|
+
country: {
|
|
140
|
+
'@path': '$.properties.country'
|
|
141
|
+
},
|
|
142
|
+
checkin_date: {
|
|
143
|
+
'@path': '$.properties.checkin_date'
|
|
144
|
+
},
|
|
145
|
+
checkout_date: {
|
|
146
|
+
'@path': '$.properties.checkout_date'
|
|
147
|
+
},
|
|
148
|
+
num_adults: {
|
|
149
|
+
'@path': '$.properties.num_adults'
|
|
150
|
+
},
|
|
151
|
+
num_children: {
|
|
152
|
+
'@path': '$.properties.num_children'
|
|
153
|
+
},
|
|
154
|
+
num_infants: {
|
|
155
|
+
'@path': '$.properties.num_infants'
|
|
156
|
+
},
|
|
157
|
+
suggested_hotels: {
|
|
158
|
+
'@path': '$.properties.suggested_hotels'
|
|
159
|
+
},
|
|
160
|
+
departing_departure_date: {
|
|
161
|
+
'@path': '$.properties.departing_departure_date'
|
|
162
|
+
},
|
|
163
|
+
returning_departure_date: {
|
|
164
|
+
'@path': '$.properties.returning_departure_date'
|
|
165
|
+
},
|
|
166
|
+
origin_airport: {
|
|
167
|
+
'@path': '$.properties.origin_airport'
|
|
168
|
+
},
|
|
169
|
+
destination_airport: {
|
|
170
|
+
'@path': '$.properties.destination_airport'
|
|
171
|
+
},
|
|
172
|
+
destination_ids: {
|
|
173
|
+
'@path': '$.properties.destination_ids'
|
|
174
|
+
},
|
|
175
|
+
departing_arrival_date: {
|
|
176
|
+
'@path': '$.properties.departing_arrival_date'
|
|
177
|
+
},
|
|
178
|
+
returning_arrival_date: {
|
|
179
|
+
'@path': '$.properties.returning_arrival_date'
|
|
180
|
+
},
|
|
181
|
+
travel_class: {
|
|
182
|
+
'@path': '$.properties.travel_class'
|
|
183
|
+
},
|
|
184
|
+
user_score: {
|
|
185
|
+
'@path': '$.properties.user_score'
|
|
186
|
+
},
|
|
187
|
+
preferred_num_stops: {
|
|
188
|
+
'@path': '$.properties.preferred_num_stops'
|
|
189
|
+
},
|
|
190
|
+
travel_start: {
|
|
191
|
+
'@path': '$.properties.travel_start'
|
|
192
|
+
},
|
|
193
|
+
travel_end: {
|
|
194
|
+
'@path': '$.properties.travel_end'
|
|
195
|
+
},
|
|
196
|
+
suggested_destinations: {
|
|
197
|
+
'@path': '$.properties.suggested_destinations'
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
depends_on: {
|
|
201
|
+
conditions: [
|
|
202
|
+
{
|
|
203
|
+
fieldKey: 'event_spec_type',
|
|
204
|
+
operator: 'is',
|
|
205
|
+
value: constants_1.TRAVEL_FIELDS
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
//# sourceMappingURL=travel_fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"travel_fields.js","sourceRoot":"","sources":["../../../src/reportWebEvent/travel_fields.ts"],"names":[],"mappings":";;;AACA,4CAA4C;AAE/B,QAAA,aAAa,GAAe;IACvC,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,kCAAkC;IAC/C,oBAAoB,EAAE,KAAK;IAC3B,eAAe,EAAE,UAAU;IAC3B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,KAAK,EAAE,qBAAqB;YAC5B,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,sBAAsB;SACpC;QACD,MAAM,EAAE;YACN,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,wBAAwB;SACtC;QACD,OAAO,EAAE;YACP,KAAK,EAAE,eAAe;YACtB,IAA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B;SAChC;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,2BAA2B;SACrC;QACD,aAAa,EAAE;YACb,OAAO,EAAE,4BAA4B;SACtC;QACD,UAAU,EAAE;YACV,OAAO,EAAE,yBAAyB;SACnC;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,2BAA2B;SACrC;QACD,WAAW,EAAE;YACX,OAAO,EAAE,0BAA0B;SACpC;QACD,gBAAgB,EAAE;YAChB,OAAO,EAAE,+BAA+B;SACzC;QACD,wBAAwB,EAAE;YACxB,OAAO,EAAE,uCAAuC;SACjD;QACD,wBAAwB,EAAE;YACxB,OAAO,EAAE,uCAAuC;SACjD;QACD,cAAc,EAAE;YACd,OAAO,EAAE,6BAA6B;SACvC;QACD,mBAAmB,EAAE;YACnB,OAAO,EAAE,kCAAkC;SAC5C;QACD,eAAe,EAAE;YACf,OAAO,EAAE,8BAA8B;SACxC;QACD,sBAAsB,EAAE;YACtB,OAAO,EAAE,qCAAqC;SAC/C;QACD,sBAAsB,EAAE;YACtB,OAAO,EAAE,qCAAqC;SAC/C;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,2BAA2B;SACrC;QACD,UAAU,EAAE;YACV,OAAO,EAAE,yBAAyB;SACnC;QACD,mBAAmB,EAAE;YACnB,OAAO,EAAE,kCAAkC;SAC5C;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,2BAA2B;SACrC;QACD,UAAU,EAAE;YACV,OAAO,EAAE,yBAAyB;SACnC;QACD,sBAAsB,EAAE;YACtB,OAAO,EAAE,qCAAqC;SAC/C;KACF;IACD,UAAU,EAAE;QACV,UAAU,EAAE;YACV;gBACE,QAAQ,EAAE,iBAAiB;gBAC3B,QAAQ,EAAE,IAAI;gBACd,KAAK,EAAE,yBAAa;aACrB;SACF;KACF;CACF,CAAA"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAllProperties = getAllProperties;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
function getAllProperties(payload) {
|
|
6
|
+
const { event_spec_type } = payload;
|
|
7
|
+
return {
|
|
8
|
+
...getProps(payload),
|
|
9
|
+
...(event_spec_type === constants_1.TRAVEL_FIELDS ? getTravelProps(payload) : {}),
|
|
10
|
+
...(event_spec_type === constants_1.VEHICLE_FIELDS ? getAutoProp(payload) : {})
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function getProps(payload) {
|
|
14
|
+
const { content_type, currency, value, query, description, order_id, shop_id, content_ids, num_items, search_string, contents } = payload;
|
|
15
|
+
const requestProperties = {
|
|
16
|
+
contents: contents
|
|
17
|
+
? contents.map(({ price, quantity, content_category, content_id, content_name, brand }) => ({
|
|
18
|
+
...(price !== undefined && { price }),
|
|
19
|
+
...(quantity !== undefined && { quantity }),
|
|
20
|
+
...(content_category !== undefined && { content_category }),
|
|
21
|
+
...(content_id !== undefined && { content_id }),
|
|
22
|
+
...(content_name !== undefined && { content_name }),
|
|
23
|
+
...(brand !== undefined && { brand })
|
|
24
|
+
}))
|
|
25
|
+
: [],
|
|
26
|
+
...(content_type !== undefined && { content_type }),
|
|
27
|
+
...({ currency: currency ?? 'USD' }),
|
|
28
|
+
...(value !== undefined && { value }),
|
|
29
|
+
...(query !== undefined && { query }),
|
|
30
|
+
...(description !== undefined && { description }),
|
|
31
|
+
...(order_id !== undefined && { order_id }),
|
|
32
|
+
...(shop_id !== undefined && { shop_id }),
|
|
33
|
+
...(content_ids !== undefined && { content_ids }),
|
|
34
|
+
...(num_items !== undefined && { num_items }),
|
|
35
|
+
...(search_string !== undefined && { search_string })
|
|
36
|
+
};
|
|
37
|
+
return requestProperties;
|
|
38
|
+
}
|
|
39
|
+
function getTravelProps(payload) {
|
|
40
|
+
const { city, region, country, checkin_date, checkout_date, num_adults, num_children, num_infants, suggested_hotels, departing_departure_date, returning_departure_date, origin_airport, destination_airport, destination_ids, departing_arrival_date, returning_arrival_date, travel_class, user_score, preferred_num_stops, travel_start, travel_end, suggested_destinations } = payload?.travel_fields ?? {};
|
|
41
|
+
const requestProperties = {
|
|
42
|
+
...(city !== undefined && { city }),
|
|
43
|
+
...(region !== undefined && { region }),
|
|
44
|
+
...(country !== undefined && { country }),
|
|
45
|
+
...(checkin_date !== undefined && { checkin_date }),
|
|
46
|
+
...(checkout_date !== undefined && { checkout_date }),
|
|
47
|
+
...(num_adults !== undefined && { num_adults }),
|
|
48
|
+
...(num_children !== undefined && { num_children }),
|
|
49
|
+
...(num_infants !== undefined && { num_infants }),
|
|
50
|
+
...(suggested_hotels !== undefined && { suggested_hotels }),
|
|
51
|
+
...(departing_departure_date !== undefined && { departing_departure_date }),
|
|
52
|
+
...(returning_departure_date !== undefined && { returning_departure_date }),
|
|
53
|
+
...(origin_airport !== undefined && { origin_airport }),
|
|
54
|
+
...(destination_airport !== undefined && { destination_airport }),
|
|
55
|
+
...(destination_ids !== undefined && { destination_ids }),
|
|
56
|
+
...(departing_arrival_date !== undefined && { departing_arrival_date }),
|
|
57
|
+
...(returning_arrival_date !== undefined && { returning_arrival_date }),
|
|
58
|
+
...(travel_class !== undefined && { travel_class }),
|
|
59
|
+
...(user_score !== undefined && { user_score }),
|
|
60
|
+
...(preferred_num_stops !== undefined && { preferred_num_stops }),
|
|
61
|
+
...(travel_start !== undefined && { travel_start }),
|
|
62
|
+
...(travel_end !== undefined && { travel_end }),
|
|
63
|
+
...(suggested_destinations !== undefined && { suggested_destinations })
|
|
64
|
+
};
|
|
65
|
+
return requestProperties;
|
|
66
|
+
}
|
|
67
|
+
function getAutoProp(payload) {
|
|
68
|
+
const { postal_code, make, model, year, state_of_vehicle, mileage_unit, mileage_value, exterior_color, transmission, body_style, fuel_type, drivetrain, preferred_price_range_min, preferred_price_range_max, trim, vin, interior_color, condition_of_vehicle, viewcontent_type, search_type, registration_type } = payload?.vehicle_fields ?? {};
|
|
69
|
+
const requestProperties = {
|
|
70
|
+
...(postal_code !== undefined && { postal_code }),
|
|
71
|
+
...(make !== undefined && { make }),
|
|
72
|
+
...(model !== undefined && { model }),
|
|
73
|
+
...(year !== undefined && { year }),
|
|
74
|
+
...(state_of_vehicle !== undefined && { state_of_vehicle }),
|
|
75
|
+
...(exterior_color !== undefined && { exterior_color }),
|
|
76
|
+
...(transmission !== undefined && { transmission }),
|
|
77
|
+
...(body_style !== undefined && { body_style }),
|
|
78
|
+
...(fuel_type !== undefined && { fuel_type }),
|
|
79
|
+
...(drivetrain !== undefined && { drivetrain }),
|
|
80
|
+
...(trim !== undefined && { trim }),
|
|
81
|
+
...(vin !== undefined && { vin }),
|
|
82
|
+
...(interior_color !== undefined && { interior_color }),
|
|
83
|
+
...(condition_of_vehicle !== undefined && { condition_of_vehicle }),
|
|
84
|
+
...(viewcontent_type !== undefined && { viewcontent_type }),
|
|
85
|
+
...(search_type !== undefined && { search_type }),
|
|
86
|
+
...(registration_type !== undefined && { registration_type }),
|
|
87
|
+
...(mileage_unit !== undefined &&
|
|
88
|
+
typeof mileage_value === 'number' && {
|
|
89
|
+
mileage: {
|
|
90
|
+
unit: mileage_unit,
|
|
91
|
+
value: mileage_value
|
|
92
|
+
}
|
|
93
|
+
}),
|
|
94
|
+
...(typeof preferred_price_range_min === 'number' &&
|
|
95
|
+
typeof preferred_price_range_max === 'number' && {
|
|
96
|
+
preferred_price_range: [preferred_price_range_min, preferred_price_range_max]
|
|
97
|
+
})
|
|
98
|
+
};
|
|
99
|
+
return requestProperties;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/reportWebEvent/utils.ts"],"names":[],"mappings":";;AAIA,4CAQC;AAVD,4CAA4D;AAE5D,SAAgB,gBAAgB,CAAC,OAAgB;IAC/C,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAA;IAEnC,OAAO;QACL,GAAG,QAAQ,CAAC,OAAO,CAAC;QACpB,GAA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;QACjC,GAAG,CAAC,cAAc,KAAK,SAAS,IAAI,EAAE,cAAc,EAAE,CAAC;QACvD,GAAG,CAAC,oBAAoB,KAAK,SAAS,IAAI,EAAE,oBAAoB,EAAE,CAAC;QACnE,GAAG,CAAC,gBAAgB,KAAK,SAAS,IAAI,EAAE,gBAAgB,EAAE,CAAC;QAC3D,GAAG,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,WAAW,EAAE,CAAC;QACjD,GAAG,CAAC,iBAAiB,KAAK,SAAS,IAAI,EAAE,iBAAiB,EAAE,CAAC;QAC7D,GAAG,CAAC,YAAY,KAAK,SAAS;YAC5B,OAAO,aAAa,KAAK,QAAQ,IAAI;YACnC,OAAO,EAAE;gBACP,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,aAAa;aACrB;SACF,CAAC;QACJ,GAAG,CAAC,OAAO,yBAAyB,KAAK,QAAQ;YAC/C,OAAO,yBAAyB,KAAK,QAAQ,IAAI;YAC/C,qBAAqB,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;SAC9E,CAAC;KACL,CAAA;IAED,OAAO,iBAAiB,CAAA;AAC1B,CAAC"}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vehicle_fields = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
exports.vehicle_fields = {
|
|
6
|
+
label: 'Vehicle Fields',
|
|
7
|
+
type: 'object',
|
|
8
|
+
description: 'Fields related to vehicle events.',
|
|
9
|
+
additionalProperties: false,
|
|
10
|
+
defaultObjectUI: 'keyvalue',
|
|
11
|
+
properties: {
|
|
12
|
+
postal_code: {
|
|
13
|
+
label: 'Postal Code',
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'Postal code for the vehicle location.'
|
|
16
|
+
},
|
|
17
|
+
make: {
|
|
18
|
+
label: 'Make of the Vehicle',
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'Vehicle make/brand/manufacturer.'
|
|
21
|
+
},
|
|
22
|
+
model: {
|
|
23
|
+
label: 'Model of the Vehicle',
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'Vehicle model.'
|
|
26
|
+
},
|
|
27
|
+
year: {
|
|
28
|
+
label: 'Year of the Vehicle',
|
|
29
|
+
type: 'number',
|
|
30
|
+
description: 'Year the vehicle was laucned in yyyy format.'
|
|
31
|
+
},
|
|
32
|
+
state_of_vehicle: {
|
|
33
|
+
label: 'State of the Vehicle',
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Vehicle status.',
|
|
36
|
+
choices: [
|
|
37
|
+
{ value: 'New', label: 'New' },
|
|
38
|
+
{ value: 'Used', label: 'Used' },
|
|
39
|
+
{ value: 'CPO', label: 'CPO' }
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
mileage_value: {
|
|
43
|
+
label: 'Mileage Value',
|
|
44
|
+
type: 'number',
|
|
45
|
+
description: 'Vehicle mileage (in km or miles). Zero (0) for new vehicle.'
|
|
46
|
+
},
|
|
47
|
+
mileage_unit: {
|
|
48
|
+
label: 'Mileage Unit',
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'Mileage unites in miles (MI) or kilometers (KM).',
|
|
51
|
+
choices: [
|
|
52
|
+
{ value: 'MI', label: 'Miles' },
|
|
53
|
+
{ value: 'KM', label: 'Kilometers' }
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
exterior_color: {
|
|
57
|
+
label: 'Exterior Color of the Vehicle',
|
|
58
|
+
type: 'string',
|
|
59
|
+
description: 'Vehicle exterior color.'
|
|
60
|
+
},
|
|
61
|
+
transmission: {
|
|
62
|
+
label: 'Transmission Type of the Vehicle',
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: 'Vehicle transmission type.',
|
|
65
|
+
choices: [
|
|
66
|
+
{ value: 'Automatic', label: 'Automatic' },
|
|
67
|
+
{ value: 'Manual', label: 'Manual' },
|
|
68
|
+
{ value: 'Other', label: 'Other' }
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
body_style: {
|
|
72
|
+
label: 'Body Type of the Vehicle',
|
|
73
|
+
type: 'string',
|
|
74
|
+
description: 'Vehicle body type.',
|
|
75
|
+
choices: [
|
|
76
|
+
{ value: 'Convertible', label: 'Convertible' },
|
|
77
|
+
{ value: 'Coupe', label: 'Coupe' },
|
|
78
|
+
{ value: 'Hatchback', label: 'Hatchback' },
|
|
79
|
+
{ value: 'Minivan', label: 'Minivan' },
|
|
80
|
+
{ value: 'Truck', label: 'Truck' },
|
|
81
|
+
{ value: 'SUV', label: 'SUV' },
|
|
82
|
+
{ value: 'Sedan', label: 'Sedan' },
|
|
83
|
+
{ value: 'Van', label: 'Van' },
|
|
84
|
+
{ value: 'Wagon', label: 'Wagon' },
|
|
85
|
+
{ value: 'Crossover', label: 'Crossover' },
|
|
86
|
+
{ value: 'Other', label: 'Other' }
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
fuel_type: {
|
|
90
|
+
label: 'Fuel Type of the Vehicle',
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'Vehicle fuel type.',
|
|
93
|
+
choices: [
|
|
94
|
+
{ value: 'Diesel', label: 'Diesel' },
|
|
95
|
+
{ value: 'Electric', label: 'Electric' },
|
|
96
|
+
{ value: 'Flex', label: 'Flex' },
|
|
97
|
+
{ value: 'Gasoline', label: 'Gasoline' },
|
|
98
|
+
{ value: 'Hybrid', label: 'Hybrid' },
|
|
99
|
+
{ value: 'Other', label: 'Other' }
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
drivetrain: {
|
|
103
|
+
label: 'Drivetrain of the Vehicle',
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'Vehicle drivetrain.',
|
|
106
|
+
choices: [
|
|
107
|
+
{ value: 'AWD', label: 'AWD' },
|
|
108
|
+
{ value: 'FOUR_WD', label: 'Four WD' },
|
|
109
|
+
{ value: 'FWD', label: 'FWD' },
|
|
110
|
+
{ value: 'RWD', label: 'RWD' },
|
|
111
|
+
{ value: 'TWO_WD', label: 'Two WD' },
|
|
112
|
+
{ value: 'Other', label: 'Other' }
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
preferred_price_range_min: {
|
|
116
|
+
label: 'Minimum Preferred Price',
|
|
117
|
+
type: 'number',
|
|
118
|
+
description: 'Minimum preferred price of the vehicle.'
|
|
119
|
+
},
|
|
120
|
+
preferred_price_range_max: {
|
|
121
|
+
label: 'Maximum Preferred Price',
|
|
122
|
+
type: 'number',
|
|
123
|
+
description: 'Maximum preferred price of the vehicle.'
|
|
124
|
+
},
|
|
125
|
+
trim: {
|
|
126
|
+
label: 'Trim of the Vehicle',
|
|
127
|
+
type: 'string',
|
|
128
|
+
description: 'Vehicle trim.'
|
|
129
|
+
},
|
|
130
|
+
vin: {
|
|
131
|
+
label: 'VIN of the Vehicle',
|
|
132
|
+
type: 'string',
|
|
133
|
+
description: 'Vehicle identification number. Maximum characters: 17.'
|
|
134
|
+
},
|
|
135
|
+
interior_color: {
|
|
136
|
+
label: 'Interior Color of the Vehicle',
|
|
137
|
+
type: 'string',
|
|
138
|
+
description: 'Vehicle interior color.'
|
|
139
|
+
},
|
|
140
|
+
condition_of_vehicle: {
|
|
141
|
+
label: 'Condition of the Vehicle',
|
|
142
|
+
type: 'string',
|
|
143
|
+
description: 'Vehicle drivetrain.',
|
|
144
|
+
choices: [
|
|
145
|
+
{ value: 'Excellent', label: 'Excellent' },
|
|
146
|
+
{ value: 'Good', label: 'Good' },
|
|
147
|
+
{ value: 'Fair', label: 'Fair' },
|
|
148
|
+
{ value: 'Poor', label: 'Poor' },
|
|
149
|
+
{ value: 'Other', label: 'Other' }
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
viewcontent_type: {
|
|
153
|
+
label: 'Soft Lead Landing Page',
|
|
154
|
+
type: 'string',
|
|
155
|
+
description: 'Optional for ViewContent. Use viewcontent_type to differentiate between soft lead landing pages.',
|
|
156
|
+
depends_on: {
|
|
157
|
+
match: 'any',
|
|
158
|
+
conditions: [{ fieldKey: 'event', operator: 'is', value: 'ViewContent' }]
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
search_type: {
|
|
162
|
+
label: 'Other Search Page',
|
|
163
|
+
type: 'string',
|
|
164
|
+
description: 'Optional for Search. Use search_type to differentiate other user searches (such as dealer lookup) from inventory search.',
|
|
165
|
+
depends_on: {
|
|
166
|
+
match: 'any',
|
|
167
|
+
conditions: [{ fieldKey: 'event', operator: 'is', value: 'Search' }]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
registration_type: {
|
|
171
|
+
label: 'Other Registration Page',
|
|
172
|
+
type: 'string',
|
|
173
|
+
description: 'Optional for CompleteRegistration. Use registration_type to differentiate between different types of customer registration on websites.',
|
|
174
|
+
depends_on: {
|
|
175
|
+
match: 'any',
|
|
176
|
+
conditions: [{ fieldKey: 'event', operator: 'is', value: 'CompleteRegistration' }]
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
default: {
|
|
181
|
+
postal_code: {
|
|
182
|
+
'@path': '$.properties.postal_code'
|
|
183
|
+
},
|
|
184
|
+
make: {
|
|
185
|
+
'@path': '$.properties.make'
|
|
186
|
+
},
|
|
187
|
+
model: {
|
|
188
|
+
'@path': '$.properties.model'
|
|
189
|
+
},
|
|
190
|
+
year: {
|
|
191
|
+
'@path': '$.properties.year'
|
|
192
|
+
},
|
|
193
|
+
state_of_vehicle: {
|
|
194
|
+
'@path': '$.properties.state_of_vehicle'
|
|
195
|
+
},
|
|
196
|
+
mileage_value: {
|
|
197
|
+
'@path': '$.properties.mileage_value'
|
|
198
|
+
},
|
|
199
|
+
mileage_unit: {
|
|
200
|
+
'@path': '$.properties.mileage_unit'
|
|
201
|
+
},
|
|
202
|
+
exterior_color: {
|
|
203
|
+
'@path': '$.properties.exterior_color'
|
|
204
|
+
},
|
|
205
|
+
transmission: {
|
|
206
|
+
'@path': '$.properties.transmission'
|
|
207
|
+
},
|
|
208
|
+
body_style: {
|
|
209
|
+
'@path': '$.properties.body_style'
|
|
210
|
+
},
|
|
211
|
+
fuel_type: {
|
|
212
|
+
'@path': '$.properties.fuel_type'
|
|
213
|
+
},
|
|
214
|
+
drivetrain: {
|
|
215
|
+
'@path': '$.properties.drive_train'
|
|
216
|
+
},
|
|
217
|
+
preferred_price_range_min: {
|
|
218
|
+
'@path': '$.properties.preferred_price_range_min'
|
|
219
|
+
},
|
|
220
|
+
preferred_price_range_max: {
|
|
221
|
+
'@path': '$.properties.preferred_price_range_max'
|
|
222
|
+
},
|
|
223
|
+
trim: {
|
|
224
|
+
'@path': '$.properties.trim'
|
|
225
|
+
},
|
|
226
|
+
vin: {
|
|
227
|
+
'@path': '$.properties.vin'
|
|
228
|
+
},
|
|
229
|
+
interior_color: {
|
|
230
|
+
'@path': '$.properties.interior_color'
|
|
231
|
+
},
|
|
232
|
+
condition_of_vehicle: {
|
|
233
|
+
'@path': '$.properties.condition_of_vehicle'
|
|
234
|
+
},
|
|
235
|
+
viewcontent_type: {
|
|
236
|
+
'@path': '$.properties.viewcontent_type'
|
|
237
|
+
},
|
|
238
|
+
search_type: {
|
|
239
|
+
'@path': '$.properties.search_type'
|
|
240
|
+
},
|
|
241
|
+
registration_type: {
|
|
242
|
+
'@path': '$.properties.registration_type'
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
depends_on: {
|
|
246
|
+
conditions: [
|
|
247
|
+
{
|
|
248
|
+
fieldKey: 'event_spec_type',
|
|
249
|
+
operator: 'is',
|
|
250
|
+
value: constants_1.VEHICLE_FIELDS
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
//# sourceMappingURL=vehicle_fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vehicle_fields.js","sourceRoot":"","sources":["../../../src/reportWebEvent/vehicle_fields.ts"],"names":[],"m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