@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.
Files changed (75) hide show
  1. package/dist/cjs/constants.d.ts +2 -0
  2. package/dist/cjs/constants.js +6 -0
  3. package/dist/cjs/constants.js.map +1 -0
  4. package/dist/cjs/fields/common_fields.d.ts +2 -0
  5. package/dist/cjs/{common_fields.js → fields/common_fields.js} +2 -113
  6. package/dist/cjs/fields/common_fields.js.map +1 -0
  7. package/dist/cjs/identify/generated-types.d.ts +0 -17
  8. package/dist/cjs/identify/index.js +10 -20
  9. package/dist/cjs/identify/index.js.map +1 -1
  10. package/dist/cjs/reportWebEvent/fields.d.ts +2 -0
  11. package/dist/cjs/reportWebEvent/fields.js +161 -0
  12. package/dist/cjs/reportWebEvent/fields.js.map +1 -0
  13. package/dist/cjs/reportWebEvent/generated-types.d.ts +62 -11
  14. package/dist/cjs/reportWebEvent/index.js +12 -24
  15. package/dist/cjs/reportWebEvent/index.js.map +1 -1
  16. package/dist/cjs/reportWebEvent/travel_fields.d.ts +2 -0
  17. package/dist/cjs/reportWebEvent/travel_fields.js +210 -0
  18. package/dist/cjs/reportWebEvent/travel_fields.js.map +1 -0
  19. package/dist/cjs/reportWebEvent/utils.d.ts +3 -0
  20. package/dist/cjs/reportWebEvent/utils.js +101 -0
  21. package/dist/cjs/reportWebEvent/utils.js.map +1 -0
  22. package/dist/cjs/reportWebEvent/vehicle_fields.d.ts +2 -0
  23. package/dist/cjs/reportWebEvent/vehicle_fields.js +255 -0
  24. package/dist/cjs/reportWebEvent/vehicle_fields.js.map +1 -0
  25. package/dist/cjs/types.d.ts +85 -29
  26. package/dist/cjs/utils.d.ts +4 -0
  27. package/dist/cjs/utils.js +18 -0
  28. package/dist/cjs/utils.js.map +1 -0
  29. package/dist/esm/constants.d.ts +2 -0
  30. package/dist/esm/constants.js +3 -0
  31. package/dist/esm/constants.js.map +1 -0
  32. package/dist/esm/fields/common_fields.d.ts +2 -0
  33. package/dist/esm/{common_fields.js → fields/common_fields.js} +1 -112
  34. package/dist/esm/fields/common_fields.js.map +1 -0
  35. package/dist/esm/identify/generated-types.d.ts +0 -17
  36. package/dist/esm/identify/index.js +10 -20
  37. package/dist/esm/identify/index.js.map +1 -1
  38. package/dist/esm/reportWebEvent/fields.d.ts +2 -0
  39. package/dist/esm/reportWebEvent/fields.js +158 -0
  40. package/dist/esm/reportWebEvent/fields.js.map +1 -0
  41. package/dist/esm/reportWebEvent/generated-types.d.ts +62 -11
  42. package/dist/esm/reportWebEvent/index.js +12 -24
  43. package/dist/esm/reportWebEvent/index.js.map +1 -1
  44. package/dist/esm/reportWebEvent/travel_fields.d.ts +2 -0
  45. package/dist/esm/reportWebEvent/travel_fields.js +207 -0
  46. package/dist/esm/reportWebEvent/travel_fields.js.map +1 -0
  47. package/dist/esm/reportWebEvent/utils.d.ts +3 -0
  48. package/dist/esm/reportWebEvent/utils.js +98 -0
  49. package/dist/esm/reportWebEvent/utils.js.map +1 -0
  50. package/dist/esm/reportWebEvent/vehicle_fields.d.ts +2 -0
  51. package/dist/esm/reportWebEvent/vehicle_fields.js +252 -0
  52. package/dist/esm/reportWebEvent/vehicle_fields.js.map +1 -0
  53. package/dist/esm/types.d.ts +85 -29
  54. package/dist/esm/utils.d.ts +4 -0
  55. package/dist/esm/utils.js +15 -0
  56. package/dist/esm/utils.js.map +1 -0
  57. package/dist/tsconfig.tsbuildinfo +1 -1
  58. package/package.json +4 -4
  59. package/src/constants.ts +2 -0
  60. package/src/{common_fields.ts → fields/common_fields.ts} +1 -114
  61. package/src/identify/generated-types.ts +0 -65
  62. package/src/identify/index.ts +10 -20
  63. package/src/reportWebEvent/__tests__/index.test.ts +521 -23
  64. package/src/reportWebEvent/fields.ts +162 -0
  65. package/src/reportWebEvent/generated-types.ts +239 -41
  66. package/src/reportWebEvent/index.ts +14 -26
  67. package/src/reportWebEvent/travel_fields.ts +216 -0
  68. package/src/reportWebEvent/utils.ts +167 -0
  69. package/src/reportWebEvent/vehicle_fields.ts +255 -0
  70. package/src/types.ts +89 -54
  71. package/src/utils.ts +18 -0
  72. package/dist/cjs/common_fields.d.ts +0 -2
  73. package/dist/cjs/common_fields.js.map +0 -1
  74. package/dist/esm/common_fields.d.ts +0 -2
  75. package/dist/esm/common_fields.js.map +0 -1
@@ -0,0 +1,216 @@
1
+ import { InputField } from '@segment/actions-core'
2
+ import { TRAVEL_FIELDS } from '../constants'
3
+
4
+ export const travel_fields: InputField = {
5
+ label: 'Travel Fields',
6
+ type: 'object',
7
+ description: 'Fields related to travel events.',
8
+ additionalProperties: false,
9
+ defaultObjectUI: 'keyvalue',
10
+ properties: {
11
+ city: {
12
+ label: 'Hotel City Location',
13
+ type: 'string',
14
+ description: 'Hotel city location.'
15
+ },
16
+ region: {
17
+ label: 'Hotel Region',
18
+ type: 'string',
19
+ description: 'Hotel region location.'
20
+ },
21
+ country: {
22
+ label: 'Hotel Country',
23
+ type: 'string',
24
+ description: 'Hotel country location.'
25
+ },
26
+ checkin_date: {
27
+ label: 'Hotel Check-in Date',
28
+ type: 'string',
29
+ description: 'Hotel check-in date.'
30
+ },
31
+ checkout_date: {
32
+ label: 'Hotel Check-out Date',
33
+ type: 'string',
34
+ description: 'Hotel check-out date.'
35
+ },
36
+ num_adults: {
37
+ label: 'Number of Adults',
38
+ type: 'number',
39
+ description: 'Number of adults.'
40
+ },
41
+ num_children: {
42
+ label: 'Number of Children',
43
+ type: 'number',
44
+ description: 'Number of children.'
45
+ },
46
+ num_infants: {
47
+ label: 'Number of Infants',
48
+ type: 'number',
49
+ description: 'Number of infants flying.'
50
+ },
51
+ suggested_hotels: {
52
+ label: 'Suggested Hotels',
53
+ description: 'Suggested hotels. This can be a single string value or an array of string values.',
54
+ type: 'string',
55
+ multiple: true
56
+ },
57
+ departing_departure_date: {
58
+ label: 'Departure Date',
59
+ type: 'string',
60
+ description:
61
+ '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:
67
+ 'Date of return flight. Accepted date formats: YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD, and YYYY-MM-DDThh:mm:ssTZD'
68
+ },
69
+ origin_airport: {
70
+ label: 'Origin Airport',
71
+ type: 'string',
72
+ description: 'Origin airport.'
73
+ },
74
+ destination_airport: {
75
+ label: 'Destination Airport',
76
+ type: 'string',
77
+ description: 'Destination airport.'
78
+ },
79
+ destination_ids: {
80
+ label: 'Destination IDs',
81
+ description:
82
+ '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.',
83
+ type: 'string',
84
+ multiple: true
85
+ },
86
+ departing_arrival_date: {
87
+ label: 'Departing Arrival Date',
88
+ type: 'string',
89
+ description:
90
+ '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'
91
+ },
92
+ returning_arrival_date: {
93
+ label: 'Returning Arrival Date',
94
+ type: 'string',
95
+ description:
96
+ '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'
97
+ },
98
+ travel_class: {
99
+ label: 'Flight Ticket Class',
100
+ type: 'string',
101
+ description: 'Class of the flight ticket, must be: "eco", "prem", "bus", "first".',
102
+ choices: [
103
+ { value: 'eco', label: 'Economy' },
104
+ { value: 'prem', label: 'Premium' },
105
+ { value: 'bus', label: 'Bus' },
106
+ { value: 'first', label: 'First' }
107
+ ]
108
+ },
109
+ user_score: {
110
+ label: 'User Score',
111
+ type: 'number',
112
+ description: 'Represents the relative value of this potential customer to advertiser.'
113
+ },
114
+ preferred_num_stops: {
115
+ label: 'Preferred Number of Stops',
116
+ type: 'integer',
117
+ description: 'The preferred number of stops the user is looking for. 0 for direct flight.'
118
+ },
119
+ travel_start: {
120
+ label: 'Start Date of the Trip',
121
+ type: 'string',
122
+ description:
123
+ "The start date of user's trip. Accept date formats: YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD, and YYYY-MM-DDThh:mm:ssTZD."
124
+ },
125
+ travel_end: {
126
+ label: 'End Date of the Trip',
127
+ type: 'string',
128
+ description:
129
+ "The end date of user's trip. Accept date formats: YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD, and YYYY-MM-DDThh:mm:ssTZD."
130
+ },
131
+ suggested_destinations: {
132
+ label: 'Suggested Destination IDs',
133
+ description:
134
+ '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.',
135
+ type: 'string',
136
+ multiple: true
137
+ }
138
+ },
139
+ default: {
140
+ city: {
141
+ '@path': '$.properties.city'
142
+ },
143
+ region: {
144
+ '@path': '$.properties.region'
145
+ },
146
+ country: {
147
+ '@path': '$.properties.country'
148
+ },
149
+ checkin_date: {
150
+ '@path': '$.properties.checkin_date'
151
+ },
152
+ checkout_date: {
153
+ '@path': '$.properties.checkout_date'
154
+ },
155
+ num_adults: {
156
+ '@path': '$.properties.num_adults'
157
+ },
158
+ num_children: {
159
+ '@path': '$.properties.num_children'
160
+ },
161
+ num_infants: {
162
+ '@path': '$.properties.num_infants'
163
+ },
164
+ suggested_hotels: {
165
+ '@path': '$.properties.suggested_hotels' // Confirmed this can be a single string or an array of strings
166
+ },
167
+ departing_departure_date: {
168
+ '@path': '$.properties.departing_departure_date'
169
+ },
170
+ returning_departure_date: {
171
+ '@path': '$.properties.returning_departure_date'
172
+ },
173
+ origin_airport: {
174
+ '@path': '$.properties.origin_airport'
175
+ },
176
+ destination_airport: {
177
+ '@path': '$.properties.destination_airport'
178
+ },
179
+ destination_ids: {
180
+ '@path': '$.properties.destination_ids' // Confirmed this can be a single string or an array of strings
181
+ },
182
+ departing_arrival_date: {
183
+ '@path': '$.properties.departing_arrival_date'
184
+ },
185
+ returning_arrival_date: {
186
+ '@path': '$.properties.returning_arrival_date'
187
+ },
188
+ travel_class: {
189
+ '@path': '$.properties.travel_class'
190
+ },
191
+ user_score: {
192
+ '@path': '$.properties.user_score'
193
+ },
194
+ preferred_num_stops: {
195
+ '@path': '$.properties.preferred_num_stops'
196
+ },
197
+ travel_start: {
198
+ '@path': '$.properties.travel_start'
199
+ },
200
+ travel_end: {
201
+ '@path': '$.properties.travel_end'
202
+ },
203
+ suggested_destinations: {
204
+ '@path': '$.properties.suggested_destinations' // Confirmed this can be a single string or an array of strings
205
+ }
206
+ },
207
+ depends_on: {
208
+ conditions: [
209
+ {
210
+ fieldKey: 'event_spec_type',
211
+ operator: 'is',
212
+ value: TRAVEL_FIELDS
213
+ }
214
+ ]
215
+ }
216
+ }
@@ -0,0 +1,167 @@
1
+ import { Payload } from './generated-types'
2
+ import { TTBaseProps, TTTravelProps, TTAutoProps } from '../types'
3
+ import { TRAVEL_FIELDS, VEHICLE_FIELDS } from '../constants'
4
+
5
+ export function getAllProperties(payload: Payload): TTBaseProps & TTAutoProps & TTTravelProps {
6
+ const { event_spec_type } = payload
7
+
8
+ return {
9
+ ...getProps(payload),
10
+ ...(event_spec_type === TRAVEL_FIELDS ? getTravelProps(payload) : {}),
11
+ ...(event_spec_type === VEHICLE_FIELDS ? getAutoProp(payload) : {})
12
+ }
13
+ }
14
+
15
+ function getProps(payload: Payload): TTBaseProps {
16
+ const {
17
+ content_type,
18
+ currency,
19
+ value,
20
+ query,
21
+ description,
22
+ order_id,
23
+ shop_id,
24
+ content_ids,
25
+ num_items,
26
+ search_string,
27
+ contents
28
+ } = payload
29
+
30
+ const requestProperties: TTBaseProps = {
31
+ contents: contents
32
+ ? contents.map(({ price, quantity, content_category, content_id, content_name, brand }) => ({
33
+ ...(price !== undefined && { price }),
34
+ ...(quantity !== undefined && { quantity }),
35
+ ...(content_category !== undefined && { content_category }),
36
+ ...(content_id !== undefined && { content_id }),
37
+ ...(content_name !== undefined && { content_name }),
38
+ ...(brand !== undefined && { brand })
39
+ }))
40
+ : [],
41
+ ...(content_type !== undefined && { content_type }),
42
+ ...( { currency: currency ?? 'USD' } ),
43
+ ...(value !== undefined && { value }),
44
+ ...(query !== undefined && { query }),
45
+ ...(description !== undefined && { description }),
46
+ ...(order_id !== undefined && { order_id }),
47
+ ...(shop_id !== undefined && { shop_id }),
48
+ ...(content_ids !== undefined && { content_ids }),
49
+ ...(num_items !== undefined && { num_items }),
50
+ ...(search_string !== undefined && { search_string })
51
+ }
52
+
53
+ return requestProperties
54
+ }
55
+
56
+ function getTravelProps(payload: Payload): TTTravelProps {
57
+ const {
58
+ city,
59
+ region,
60
+ country,
61
+ checkin_date,
62
+ checkout_date,
63
+ num_adults,
64
+ num_children,
65
+ num_infants,
66
+ suggested_hotels,
67
+ departing_departure_date,
68
+ returning_departure_date,
69
+ origin_airport,
70
+ destination_airport,
71
+ destination_ids,
72
+ departing_arrival_date,
73
+ returning_arrival_date,
74
+ travel_class,
75
+ user_score,
76
+ preferred_num_stops,
77
+ travel_start,
78
+ travel_end,
79
+ suggested_destinations
80
+ } = payload?.travel_fields ?? {}
81
+
82
+ const requestProperties: TTTravelProps = {
83
+ ...(city !== undefined && { city }),
84
+ ...(region !== undefined && { region }),
85
+ ...(country !== undefined && { country }),
86
+ ...(checkin_date !== undefined && { checkin_date }),
87
+ ...(checkout_date !== undefined && { checkout_date }),
88
+ ...(num_adults !== undefined && { num_adults }),
89
+ ...(num_children !== undefined && { num_children }),
90
+ ...(num_infants !== undefined && { num_infants }),
91
+ ...(suggested_hotels !== undefined && { suggested_hotels }),
92
+ ...(departing_departure_date !== undefined && { departing_departure_date }),
93
+ ...(returning_departure_date !== undefined && { returning_departure_date }),
94
+ ...(origin_airport !== undefined && { origin_airport }),
95
+ ...(destination_airport !== undefined && { destination_airport }),
96
+ ...(destination_ids !== undefined && { destination_ids }),
97
+ ...(departing_arrival_date !== undefined && { departing_arrival_date }),
98
+ ...(returning_arrival_date !== undefined && { returning_arrival_date }),
99
+ ...(travel_class !== undefined && { travel_class }),
100
+ ...(user_score !== undefined && { user_score }),
101
+ ...(preferred_num_stops !== undefined && { preferred_num_stops }),
102
+ ...(travel_start !== undefined && { travel_start }),
103
+ ...(travel_end !== undefined && { travel_end }),
104
+ ...(suggested_destinations !== undefined && { suggested_destinations })
105
+ }
106
+
107
+ return requestProperties
108
+ }
109
+
110
+ function getAutoProp(payload: Payload): TTAutoProps {
111
+ const {
112
+ postal_code,
113
+ make,
114
+ model,
115
+ year,
116
+ state_of_vehicle,
117
+ mileage_unit,
118
+ mileage_value,
119
+ exterior_color,
120
+ transmission,
121
+ body_style,
122
+ fuel_type,
123
+ drivetrain,
124
+ preferred_price_range_min,
125
+ preferred_price_range_max,
126
+ trim,
127
+ vin,
128
+ interior_color,
129
+ condition_of_vehicle,
130
+ viewcontent_type,
131
+ search_type,
132
+ registration_type
133
+ } = payload?.vehicle_fields ?? {}
134
+
135
+ const requestProperties: TTAutoProps = {
136
+ ...(postal_code !== undefined && { postal_code }),
137
+ ...(make !== undefined && { make }),
138
+ ...(model !== undefined && { model }),
139
+ ...(year !== undefined && { year }),
140
+ ...(state_of_vehicle !== undefined && { state_of_vehicle }),
141
+ ...(exterior_color !== undefined && { exterior_color }),
142
+ ...(transmission !== undefined && { transmission }),
143
+ ...(body_style !== undefined && { body_style }),
144
+ ...(fuel_type !== undefined && { fuel_type }),
145
+ ...(drivetrain !== undefined && { drivetrain }),
146
+ ...(trim !== undefined && { trim }),
147
+ ...(vin !== undefined && { vin }),
148
+ ...(interior_color !== undefined && { interior_color }),
149
+ ...(condition_of_vehicle !== undefined && { condition_of_vehicle }),
150
+ ...(viewcontent_type !== undefined && { viewcontent_type }),
151
+ ...(search_type !== undefined && { search_type }),
152
+ ...(registration_type !== undefined && { registration_type }),
153
+ ...(mileage_unit !== undefined &&
154
+ typeof mileage_value === 'number' && {
155
+ mileage: {
156
+ unit: mileage_unit,
157
+ value: mileage_value
158
+ }
159
+ }),
160
+ ...(typeof preferred_price_range_min === 'number' &&
161
+ typeof preferred_price_range_max === 'number' && {
162
+ preferred_price_range: [preferred_price_range_min, preferred_price_range_max]
163
+ })
164
+ }
165
+
166
+ return requestProperties
167
+ }
@@ -0,0 +1,255 @@
1
+ import { InputField } from '@segment/actions-core'
2
+ import { VEHICLE_FIELDS } from '../constants'
3
+
4
+ export const vehicle_fields: InputField = {
5
+ label: 'Vehicle Fields',
6
+ type: 'object',
7
+ description: 'Fields related to vehicle events.',
8
+ additionalProperties: false,
9
+ defaultObjectUI: 'keyvalue',
10
+ properties: {
11
+ postal_code: {
12
+ label: 'Postal Code',
13
+ type: 'string',
14
+ description: 'Postal code for the vehicle location.'
15
+ },
16
+ make: {
17
+ label: 'Make of the Vehicle',
18
+ type: 'string',
19
+ description: 'Vehicle make/brand/manufacturer.'
20
+ },
21
+ model: {
22
+ label: 'Model of the Vehicle',
23
+ type: 'string',
24
+ description: 'Vehicle model.'
25
+ },
26
+ year: {
27
+ label: 'Year of the Vehicle',
28
+ type: 'number',
29
+ description: 'Year the vehicle was laucned in yyyy format.'
30
+ },
31
+ state_of_vehicle: {
32
+ label: 'State of the Vehicle',
33
+ type: 'string',
34
+ description: 'Vehicle status.',
35
+ choices: [
36
+ { value: 'New', label: 'New' },
37
+ { value: 'Used', label: 'Used' },
38
+ { value: 'CPO', label: 'CPO' }
39
+ ]
40
+ },
41
+ mileage_value: {
42
+ label: 'Mileage Value',
43
+ type: 'number',
44
+ description: 'Vehicle mileage (in km or miles). Zero (0) for new vehicle.'
45
+ },
46
+ mileage_unit: {
47
+ label: 'Mileage Unit',
48
+ type: 'string',
49
+ description: 'Mileage unites in miles (MI) or kilometers (KM).',
50
+ choices: [
51
+ { value: 'MI', label: 'Miles' },
52
+ { value: 'KM', label: 'Kilometers' }
53
+ ]
54
+ },
55
+ exterior_color: {
56
+ label: 'Exterior Color of the Vehicle',
57
+ type: 'string',
58
+ description: 'Vehicle exterior color.'
59
+ },
60
+ transmission: {
61
+ label: 'Transmission Type of the Vehicle',
62
+ type: 'string',
63
+ description: 'Vehicle transmission type.',
64
+ choices: [
65
+ { value: 'Automatic', label: 'Automatic' },
66
+ { value: 'Manual', label: 'Manual' },
67
+ { value: 'Other', label: 'Other' }
68
+ ]
69
+ },
70
+ body_style: {
71
+ label: 'Body Type of the Vehicle',
72
+ type: 'string',
73
+ description: 'Vehicle body type.',
74
+ choices: [
75
+ { value: 'Convertible', label: 'Convertible' },
76
+ { value: 'Coupe', label: 'Coupe' },
77
+ { value: 'Hatchback', label: 'Hatchback' },
78
+ { value: 'Minivan', label: 'Minivan' },
79
+ { value: 'Truck', label: 'Truck' },
80
+ { value: 'SUV', label: 'SUV' },
81
+ { value: 'Sedan', label: 'Sedan' },
82
+ { value: 'Van', label: 'Van' },
83
+ { value: 'Wagon', label: 'Wagon' },
84
+ { value: 'Crossover', label: 'Crossover' },
85
+ { value: 'Other', label: 'Other' }
86
+ ]
87
+ },
88
+ fuel_type: {
89
+ label: 'Fuel Type of the Vehicle',
90
+ type: 'string',
91
+ description: 'Vehicle fuel type.',
92
+ choices: [
93
+ { value: 'Diesel', label: 'Diesel' },
94
+ { value: 'Electric', label: 'Electric' },
95
+ { value: 'Flex', label: 'Flex' },
96
+ { value: 'Gasoline', label: 'Gasoline' },
97
+ { value: 'Hybrid', label: 'Hybrid' },
98
+ { value: 'Other', label: 'Other' }
99
+ ]
100
+ },
101
+ drivetrain: {
102
+ label: 'Drivetrain of the Vehicle',
103
+ type: 'string',
104
+ description: 'Vehicle drivetrain.',
105
+ choices: [
106
+ { value: 'AWD', label: 'AWD' },
107
+ { value: 'FOUR_WD', label: 'Four WD' },
108
+ { value: 'FWD', label: 'FWD' },
109
+ { value: 'RWD', label: 'RWD' },
110
+ { value: 'TWO_WD', label: 'Two WD' },
111
+ { value: 'Other', label: 'Other' }
112
+ ]
113
+ },
114
+ preferred_price_range_min: {
115
+ label: 'Minimum Preferred Price',
116
+ type: 'number',
117
+ description: 'Minimum preferred price of the vehicle.'
118
+ },
119
+ preferred_price_range_max: {
120
+ label: 'Maximum Preferred Price',
121
+ type: 'number',
122
+ description: 'Maximum preferred price of the vehicle.'
123
+ },
124
+ trim: {
125
+ label: 'Trim of the Vehicle',
126
+ type: 'string',
127
+ description: 'Vehicle trim.'
128
+ },
129
+ vin: {
130
+ label: 'VIN of the Vehicle',
131
+ type: 'string',
132
+ description: 'Vehicle identification number. Maximum characters: 17.'
133
+ },
134
+ interior_color: {
135
+ label: 'Interior Color of the Vehicle',
136
+ type: 'string',
137
+ description: 'Vehicle interior color.'
138
+ },
139
+ condition_of_vehicle: {
140
+ label: 'Condition of the Vehicle',
141
+ type: 'string',
142
+ description: 'Vehicle drivetrain.',
143
+ choices: [
144
+ { value: 'Excellent', label: 'Excellent' },
145
+ { value: 'Good', label: 'Good' },
146
+ { value: 'Fair', label: 'Fair' },
147
+ { value: 'Poor', label: 'Poor' },
148
+ { value: 'Other', label: 'Other' }
149
+ ]
150
+ },
151
+ viewcontent_type: {
152
+ label: 'Soft Lead Landing Page',
153
+ type: 'string',
154
+ description: 'Optional for ViewContent. Use viewcontent_type to differentiate between soft lead landing pages.',
155
+ depends_on: {
156
+ match: 'any',
157
+ conditions: [{ fieldKey: 'event', operator: 'is', value: 'ViewContent' }]
158
+ }
159
+ },
160
+ search_type: {
161
+ label: 'Other Search Page',
162
+ type: 'string',
163
+ description:
164
+ '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:
174
+ 'Optional for CompleteRegistration. Use registration_type to differentiate between different types of customer registration on websites.',
175
+ depends_on: {
176
+ match: 'any',
177
+ conditions: [{ fieldKey: 'event', operator: 'is', value: 'CompleteRegistration' }]
178
+ }
179
+ }
180
+ },
181
+ default: {
182
+ postal_code: {
183
+ '@path': '$.properties.postal_code'
184
+ },
185
+ make: {
186
+ '@path': '$.properties.make'
187
+ },
188
+ model: {
189
+ '@path': '$.properties.model'
190
+ },
191
+ year: {
192
+ '@path': '$.properties.year'
193
+ },
194
+ state_of_vehicle: {
195
+ '@path': '$.properties.state_of_vehicle'
196
+ },
197
+ mileage_value: {
198
+ '@path': '$.properties.mileage_value'
199
+ },
200
+ mileage_unit: {
201
+ '@path': '$.properties.mileage_unit'
202
+ },
203
+ exterior_color: {
204
+ '@path': '$.properties.exterior_color'
205
+ },
206
+ transmission: {
207
+ '@path': '$.properties.transmission'
208
+ },
209
+ body_style: {
210
+ '@path': '$.properties.body_style'
211
+ },
212
+ fuel_type: {
213
+ '@path': '$.properties.fuel_type'
214
+ },
215
+ drivetrain: {
216
+ '@path': '$.properties.drive_train'
217
+ },
218
+ preferred_price_range_min: {
219
+ '@path': '$.properties.preferred_price_range_min'
220
+ },
221
+ preferred_price_range_max: {
222
+ '@path': '$.properties.preferred_price_range_max'
223
+ },
224
+ trim: {
225
+ '@path': '$.properties.trim'
226
+ },
227
+ vin: {
228
+ '@path': '$.properties.vin'
229
+ },
230
+ interior_color: {
231
+ '@path': '$.properties.interior_color'
232
+ },
233
+ condition_of_vehicle: {
234
+ '@path': '$.properties.condition_of_vehicle'
235
+ },
236
+ viewcontent_type: {
237
+ '@path': '$.properties.viewcontent_type'
238
+ },
239
+ search_type: {
240
+ '@path': '$.properties.search_type'
241
+ },
242
+ registration_type: {
243
+ '@path': '$.properties.registration_type'
244
+ }
245
+ },
246
+ depends_on: {
247
+ conditions: [
248
+ {
249
+ fieldKey: 'event_spec_type',
250
+ operator: 'is',
251
+ value: VEHICLE_FIELDS
252
+ }
253
+ ]
254
+ }
255
+ }