@walkeros/server-destination-meta 2.0.1 → 2.1.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/dev.d.mts +16 -294
- package/dist/dev.d.ts +16 -294
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/examples/index.d.mts +8 -288
- package/dist/examples/index.d.ts +8 -288
- package/dist/examples/index.js +72 -70
- package/dist/examples/index.mjs +72 -69
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/walkerOS.json +177 -79
- package/package.json +4 -4
package/dist/dev.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _walkeros_core_dev from '@walkeros/core/dev';
|
|
2
2
|
import { z } from '@walkeros/core/dev';
|
|
3
|
-
import { Mapping as Mapping$2 } from '@walkeros/core';
|
|
4
3
|
import { DestinationServer, sendServer } from '@walkeros/server-core';
|
|
4
|
+
import { Flow } from '@walkeros/core';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Action Source Enum
|
|
@@ -62,7 +62,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
62
62
|
url: z.ZodOptional<z.ZodString>;
|
|
63
63
|
user_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
64
64
|
}, z.core.$strip>;
|
|
65
|
-
type Settings
|
|
65
|
+
type Settings = z.infer<typeof SettingsSchema>;
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* Meta Conversions API Mapping Schema
|
|
@@ -72,291 +72,26 @@ declare const MappingSchema: z.ZodObject<{}, z.core.$strip>;
|
|
|
72
72
|
/**
|
|
73
73
|
* Type inference from MappingSchema
|
|
74
74
|
*/
|
|
75
|
-
type Mapping
|
|
75
|
+
type Mapping = z.infer<typeof MappingSchema>;
|
|
76
76
|
|
|
77
77
|
declare const settings: _walkeros_core_dev.JSONSchema;
|
|
78
|
-
declare const mapping
|
|
78
|
+
declare const mapping: _walkeros_core_dev.JSONSchema;
|
|
79
79
|
|
|
80
80
|
declare const index$1_ActionSourceSchema: typeof ActionSourceSchema;
|
|
81
81
|
declare const index$1_EventNameSchema: typeof EventNameSchema;
|
|
82
|
+
type index$1_Mapping = Mapping;
|
|
82
83
|
declare const index$1_MappingSchema: typeof MappingSchema;
|
|
84
|
+
type index$1_Settings = Settings;
|
|
83
85
|
declare const index$1_SettingsSchema: typeof SettingsSchema;
|
|
86
|
+
declare const index$1_mapping: typeof mapping;
|
|
84
87
|
declare const index$1_settings: typeof settings;
|
|
85
88
|
declare namespace index$1 {
|
|
86
|
-
export { index$1_ActionSourceSchema as ActionSourceSchema, index$1_EventNameSchema as EventNameSchema, type
|
|
89
|
+
export { index$1_ActionSourceSchema as ActionSourceSchema, index$1_EventNameSchema as EventNameSchema, type index$1_Mapping as Mapping, index$1_MappingSchema as MappingSchema, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_mapping as mapping, index$1_settings as settings };
|
|
87
90
|
}
|
|
88
91
|
|
|
89
|
-
interface Settings {
|
|
90
|
-
accessToken: string;
|
|
91
|
-
pixelId: string;
|
|
92
|
-
action_source?: ActionSource;
|
|
93
|
-
doNotHash?: string[];
|
|
94
|
-
test_event_code?: string;
|
|
95
|
-
url?: string;
|
|
96
|
-
user_data?: Mapping$2.Map;
|
|
97
|
-
}
|
|
98
|
-
interface Mapping {
|
|
99
|
-
}
|
|
100
92
|
interface Env extends DestinationServer.Env {
|
|
101
93
|
sendServer?: typeof sendServer;
|
|
102
94
|
}
|
|
103
|
-
type Rule = Mapping$2.Rule<Mapping>;
|
|
104
|
-
interface BodyParameters {
|
|
105
|
-
data: Array<ServerEventParameters>;
|
|
106
|
-
test_event_code?: string;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Represents the top‑level parameters for a server event sent via Meta's Conversions API.
|
|
110
|
-
* https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/server-event
|
|
111
|
-
*/
|
|
112
|
-
interface ServerEventParameters extends StandardParameters {
|
|
113
|
-
/** The event name or custom event identifier. Required for deduplication. */
|
|
114
|
-
event_name: EventName;
|
|
115
|
-
/** Unix timestamp (in seconds) when the event actually occurred. GMT timezone. */
|
|
116
|
-
event_time: number;
|
|
117
|
-
/** Map of customer information for matching (emails, phone, etc.). */
|
|
118
|
-
user_data: CustomerInformationParameters;
|
|
119
|
-
/** Additional business data about the event. */
|
|
120
|
-
custom_data?: Record<string, unknown>;
|
|
121
|
-
/** URL of the page where the event occurred. */
|
|
122
|
-
event_source_url?: string;
|
|
123
|
-
/** If true, exclude this event from ads optimization (only attribution). */
|
|
124
|
-
opt_out?: boolean;
|
|
125
|
-
/** Unique ID for deduplication across Pixel and CAPI. */
|
|
126
|
-
event_id?: string;
|
|
127
|
-
/** Source of the event (e.g., website, app). */
|
|
128
|
-
action_source: ActionSource;
|
|
129
|
-
/** Processing options (e.g., ['LDU'] for CCPA limited data use). */
|
|
130
|
-
data_processing_options?: DataProcessingOption[];
|
|
131
|
-
/** Country code for data processing option (1 = USA, 0 = auto‑geolocate). */
|
|
132
|
-
data_processing_options_country?: number;
|
|
133
|
-
/** State code for data processing option (1000 = California, 0 = auto). */
|
|
134
|
-
data_processing_options_state?: number;
|
|
135
|
-
/** App‑specific data (required if action_source is 'app'). */
|
|
136
|
-
app_data?: AppData;
|
|
137
|
-
/** HTTP referrer header of the event. */
|
|
138
|
-
referrer_url?: string;
|
|
139
|
-
/** Metadata to link delayed events to past acquisition events. */
|
|
140
|
-
original_event_data?: OriginalEventDataParameters;
|
|
141
|
-
/** User segment for more context about the customer's relationship. */
|
|
142
|
-
customer_segmentation?: CustomerSegmentation;
|
|
143
|
-
}
|
|
144
|
-
type EventName = 'AddPaymentInfo' | 'AddToCart' | 'AddToWishlist' | 'CompleteRegistration' | 'Contact' | 'CustomizeProduct' | 'Donate' | 'FindLocation' | 'InitiateCheckout' | 'Lead' | 'Purchase' | 'Schedule' | 'Search' | 'StartTrial' | 'SubmitApplication' | 'Subscribe' | 'ViewContent' | string;
|
|
145
|
-
type ActionSource = 'email' | 'website' | 'app' | 'phone_call' | 'chat' | 'physical_store' | 'system_generated' | 'business_messaging' | 'other';
|
|
146
|
-
type DataProcessingOption = 'LDU';
|
|
147
|
-
type CustomerSegmentation = 'new_customer_to_business' | 'new_customer_to_business_line' | 'new_customer_to_product_area' | 'new_customer_to_medium' | 'existing_customer_to_business' | 'existing_customer_to_business_line' | 'existing_customer_to_product_area' | 'existing_customer_to_medium' | 'customer_in_loyalty_program';
|
|
148
|
-
/** Extended device info for app events (Android version 'a2', iOS 'i2') */
|
|
149
|
-
interface AppData {
|
|
150
|
-
/**
|
|
151
|
-
* Comma-separated array of strings with fixed order:
|
|
152
|
-
* [sdk_version, os_version, device_model, device_brand,
|
|
153
|
-
* screen_width, screen_height, ...]
|
|
154
|
-
*/
|
|
155
|
-
extinfo: string[];
|
|
156
|
-
}
|
|
157
|
-
interface CustomerInformationParameters {
|
|
158
|
-
/** Email(s), SHA-256 hashed, lowercase and trimmed */
|
|
159
|
-
em?: string | string[];
|
|
160
|
-
/** Phone number(s), SHA-256 hashed, E.164 format (no leading 0s or symbols) */
|
|
161
|
-
ph?: string | string[];
|
|
162
|
-
/** First name(s), SHA-256 hashed, lowercase */
|
|
163
|
-
fn?: string | string[];
|
|
164
|
-
/** Last name(s), SHA-256 hashed, lowercase */
|
|
165
|
-
ln?: string | string[];
|
|
166
|
-
/** Date(s) of birth in YYYYMMDD, SHA-256 hashed */
|
|
167
|
-
db?: string | string[];
|
|
168
|
-
/** Gender(s) in lowercase single letter ("m", "f", etc.), SHA-256 hashed */
|
|
169
|
-
ge?: string | string[];
|
|
170
|
-
/** City name(s), SHA-256 hashed, lowercase */
|
|
171
|
-
ct?: string | string[];
|
|
172
|
-
/** State abbreviation(s), SHA-256 hashed, lowercase (e.g., "ca", "ny") */
|
|
173
|
-
st?: string | string[];
|
|
174
|
-
/** ZIP or postal code(s), SHA-256 hashed, lowercase */
|
|
175
|
-
zp?: string | string[];
|
|
176
|
-
/** Country code(s), SHA-256 hashed, lowercase (ISO 3166-1 alpha-2) */
|
|
177
|
-
country?: string | string[];
|
|
178
|
-
/** External IDs, unique per user. SHA-256 hash recommended */
|
|
179
|
-
external_id?: string | string[];
|
|
180
|
-
/** IPv4 or IPv6 address of client. Do NOT hash. */
|
|
181
|
-
client_ip_address?: string;
|
|
182
|
-
/** User agent string from browser. Do NOT hash. */
|
|
183
|
-
client_user_agent?: string;
|
|
184
|
-
/** fbclid parameter value from the URL. Do NOT hash. */
|
|
185
|
-
fbclid?: string;
|
|
186
|
-
/** Facebook click ID (_fbc cookie). Do NOT hash. */
|
|
187
|
-
fbc?: string;
|
|
188
|
-
/** Facebook browser ID (_fbp cookie). Do NOT hash. */
|
|
189
|
-
fbp?: string;
|
|
190
|
-
/** Subscription ID for the transaction. Do NOT hash. */
|
|
191
|
-
subscription_id?: string;
|
|
192
|
-
/** Facebook login ID (App-Scoped ID). Do NOT hash. */
|
|
193
|
-
fb_login_id?: number;
|
|
194
|
-
/** Meta Lead Ad lead ID. Do NOT hash. */
|
|
195
|
-
lead_id?: number;
|
|
196
|
-
/** Anonymous install ID. App events only. Do NOT hash. */
|
|
197
|
-
anon_id?: string;
|
|
198
|
-
/** Mobile advertiser ID (GAID/IDFA). Do NOT hash. */
|
|
199
|
-
madid?: string;
|
|
200
|
-
/** Facebook Page ID. Do NOT hash. */
|
|
201
|
-
page_id?: string;
|
|
202
|
-
/** Messenger Page-scoped user ID. Do NOT hash. */
|
|
203
|
-
page_scoped_user_id?: string;
|
|
204
|
-
/** Click to WhatsApp ad click ID. Do NOT hash. */
|
|
205
|
-
ctwa_clid?: string;
|
|
206
|
-
/** Instagram business account ID. Do NOT hash. */
|
|
207
|
-
ig_account_id?: string;
|
|
208
|
-
/** Instagram-scoped user ID. Do NOT hash. */
|
|
209
|
-
ig_sid?: string;
|
|
210
|
-
}
|
|
211
|
-
interface StandardParameters {
|
|
212
|
-
availability?: string;
|
|
213
|
-
body_style?: string;
|
|
214
|
-
checkin_date?: string;
|
|
215
|
-
city?: string;
|
|
216
|
-
condition_of_vehicle?: string;
|
|
217
|
-
content_ids?: string[];
|
|
218
|
-
content_type?: 'product' | 'product_group' | string;
|
|
219
|
-
contents?: Array<{
|
|
220
|
-
id: string;
|
|
221
|
-
quantity?: number;
|
|
222
|
-
item_price?: number;
|
|
223
|
-
delivery_category?: string;
|
|
224
|
-
}>;
|
|
225
|
-
country?: string;
|
|
226
|
-
currency?: string;
|
|
227
|
-
delivery_category?: 'in_store' | 'curbside' | 'home_delivery' | string;
|
|
228
|
-
departing_arrival_date?: string;
|
|
229
|
-
departing_departure_date?: string;
|
|
230
|
-
destination_airport?: string;
|
|
231
|
-
destination_ids?: string[];
|
|
232
|
-
dma_code?: string;
|
|
233
|
-
drivetrain?: string;
|
|
234
|
-
exterior_color?: string;
|
|
235
|
-
fuel_type?: string;
|
|
236
|
-
hotel_score?: number;
|
|
237
|
-
interior_color?: string;
|
|
238
|
-
lead_event_source?: string;
|
|
239
|
-
lease_end_date?: string;
|
|
240
|
-
lease_start_date?: string;
|
|
241
|
-
listing_type?: string;
|
|
242
|
-
make?: string;
|
|
243
|
-
'mileage.unit'?: string;
|
|
244
|
-
'mileage.value'?: number;
|
|
245
|
-
model?: string;
|
|
246
|
-
neighborhood?: string;
|
|
247
|
-
net_revenue?: number;
|
|
248
|
-
num_adults?: number;
|
|
249
|
-
num_children?: number;
|
|
250
|
-
num_infants?: number;
|
|
251
|
-
num_items?: number;
|
|
252
|
-
order_id?: string;
|
|
253
|
-
origin_airport?: string;
|
|
254
|
-
postal_code?: string;
|
|
255
|
-
predicted_ltv?: number;
|
|
256
|
-
preferred_baths_range?: string;
|
|
257
|
-
preferred_beds_range?: string;
|
|
258
|
-
preferred_neighborhoods?: string[];
|
|
259
|
-
preferred_num_stops?: number;
|
|
260
|
-
preferred_price_range?: string;
|
|
261
|
-
preferred_star_ratings?: [number, number];
|
|
262
|
-
price?: string;
|
|
263
|
-
product_catalog_id?: string;
|
|
264
|
-
property_type?: string;
|
|
265
|
-
region?: string;
|
|
266
|
-
returning_arrival_date?: string;
|
|
267
|
-
returning_departure_date?: string;
|
|
268
|
-
search_string?: string;
|
|
269
|
-
state_of_vehicle?: string;
|
|
270
|
-
suggested_destinations?: string[];
|
|
271
|
-
suggested_home_listings?: string[];
|
|
272
|
-
suggested_hotels?: string[];
|
|
273
|
-
suggested_jobs?: string[];
|
|
274
|
-
suggested_local_service_businesses?: string[];
|
|
275
|
-
suggested_location_based_items?: string[];
|
|
276
|
-
suggested_vehicles?: string[];
|
|
277
|
-
transmission?: string;
|
|
278
|
-
travel_class?: string;
|
|
279
|
-
travel_end?: string;
|
|
280
|
-
travel_start?: string;
|
|
281
|
-
trim?: string;
|
|
282
|
-
fb_availability?: string;
|
|
283
|
-
fb_body_style?: string;
|
|
284
|
-
fb_checkin_date?: string;
|
|
285
|
-
fb_city?: string;
|
|
286
|
-
fb_condition_of_vehicle?: string;
|
|
287
|
-
fb_content_ids?: string[];
|
|
288
|
-
fb_content_type?: string;
|
|
289
|
-
fb_contents?: Array<{
|
|
290
|
-
id: string;
|
|
291
|
-
quantity?: number;
|
|
292
|
-
item_price?: number;
|
|
293
|
-
}>;
|
|
294
|
-
fb_country?: string;
|
|
295
|
-
fb_currency?: string;
|
|
296
|
-
fb_delivery_category?: string;
|
|
297
|
-
fb_departing_arrival_date?: string;
|
|
298
|
-
fb_departing_departure_date?: string;
|
|
299
|
-
fb_destination_airport?: string;
|
|
300
|
-
fb_destination_ids?: string[];
|
|
301
|
-
fb_dma_code?: string;
|
|
302
|
-
fb_drivetrain?: string;
|
|
303
|
-
fb_exterior_color?: string;
|
|
304
|
-
fb_fuel_type?: string;
|
|
305
|
-
fb_hotel_score?: number;
|
|
306
|
-
fb_interior_color?: string;
|
|
307
|
-
fb_lease_end_date?: string;
|
|
308
|
-
fb_lease_start_date?: string;
|
|
309
|
-
fb_listing_type?: string;
|
|
310
|
-
fb_make?: string;
|
|
311
|
-
'fb_mileage.unit'?: string;
|
|
312
|
-
'fb_mileage.value'?: number;
|
|
313
|
-
fb_model?: string;
|
|
314
|
-
fb_neighborhood?: string;
|
|
315
|
-
fb_num_adults?: number;
|
|
316
|
-
fb_num_children?: number;
|
|
317
|
-
fb_num_infants?: number;
|
|
318
|
-
fb_num_items?: number;
|
|
319
|
-
fb_order_id?: string;
|
|
320
|
-
fb_origin_airport?: string;
|
|
321
|
-
fb_postal_code?: string;
|
|
322
|
-
fb_predicted_ltv?: number;
|
|
323
|
-
fb_preferred_baths_range?: string;
|
|
324
|
-
fb_preferred_beds_range?: string;
|
|
325
|
-
fb_preferred_neighborhoods?: string[];
|
|
326
|
-
fb_preferred_num_stops?: number;
|
|
327
|
-
fb_preferred_price_range?: string;
|
|
328
|
-
fb_preferred_star_ratings?: [number, number];
|
|
329
|
-
fb_price?: string;
|
|
330
|
-
fb_product_catalog_id?: string;
|
|
331
|
-
fb_property_type?: string;
|
|
332
|
-
fb_region?: string;
|
|
333
|
-
fb_returning_arrival_date?: string;
|
|
334
|
-
fb_returning_departure_date?: string;
|
|
335
|
-
fb_search_string?: string;
|
|
336
|
-
fb_state_of_vehicle?: string;
|
|
337
|
-
fb_suggested_destinations?: string[];
|
|
338
|
-
fb_suggested_home_listings?: string[];
|
|
339
|
-
fb_suggested_hotels?: string[];
|
|
340
|
-
fb_suggested_jobs?: string[];
|
|
341
|
-
fb_suggested_local_service_businesses?: string[];
|
|
342
|
-
fb_suggested_location_based_items?: string[];
|
|
343
|
-
fb_suggested_vehicles?: string[];
|
|
344
|
-
fb_transmission?: string;
|
|
345
|
-
fb_travel_class?: string;
|
|
346
|
-
fb_travel_end?: string;
|
|
347
|
-
fb_travel_start?: string;
|
|
348
|
-
user_bucket?: string;
|
|
349
|
-
value?: number;
|
|
350
|
-
vin?: string;
|
|
351
|
-
year?: number;
|
|
352
|
-
item_number?: string;
|
|
353
|
-
}
|
|
354
|
-
interface OriginalEventDataParameters {
|
|
355
|
-
event_name?: EventName;
|
|
356
|
-
event_time?: number;
|
|
357
|
-
order_id?: number;
|
|
358
|
-
event_id?: string;
|
|
359
|
-
}
|
|
360
95
|
|
|
361
96
|
/**
|
|
362
97
|
* Standard mock environment for push operations
|
|
@@ -373,32 +108,19 @@ declare namespace env {
|
|
|
373
108
|
export { env_push as push, env_simulation as simulation };
|
|
374
109
|
}
|
|
375
110
|
|
|
376
|
-
declare
|
|
377
|
-
|
|
378
|
-
declare namespace events {
|
|
379
|
-
export { Purchase$1 as Purchase };
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
declare const InitUserData: Settings;
|
|
383
|
-
declare const Purchase: Rule;
|
|
384
|
-
declare const config: {
|
|
385
|
-
order: {
|
|
386
|
-
complete: Rule;
|
|
387
|
-
};
|
|
388
|
-
};
|
|
111
|
+
declare const purchase: Flow.StepExample;
|
|
112
|
+
declare const lead: Flow.StepExample;
|
|
389
113
|
|
|
390
|
-
declare const
|
|
391
|
-
declare const
|
|
392
|
-
declare
|
|
393
|
-
|
|
394
|
-
export { mapping_InitUserData as InitUserData, mapping_Purchase as Purchase, mapping_config as config };
|
|
114
|
+
declare const step_lead: typeof lead;
|
|
115
|
+
declare const step_purchase: typeof purchase;
|
|
116
|
+
declare namespace step {
|
|
117
|
+
export { step_lead as lead, step_purchase as purchase };
|
|
395
118
|
}
|
|
396
119
|
|
|
397
120
|
declare const index_env: typeof env;
|
|
398
|
-
declare const
|
|
399
|
-
declare const index_mapping: typeof mapping;
|
|
121
|
+
declare const index_step: typeof step;
|
|
400
122
|
declare namespace index {
|
|
401
|
-
export { index_env as env,
|
|
123
|
+
export { index_env as env, index_step as step };
|
|
402
124
|
}
|
|
403
125
|
|
|
404
126
|
export { index as examples, index$1 as schemas };
|