@walkeros/web-destination-snowplow 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 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, WalkerOS } from '@walkeros/core';
4
3
  import { DestinationWeb } from '@walkeros/web-core';
4
+ import { Flow } from '@walkeros/core';
5
5
 
6
6
  /**
7
7
  * Snowplow-specific settings schema (similar to GA4Settings in gtag)
@@ -120,25 +120,28 @@ declare const MappingSchema: z.ZodObject<{
120
120
  actionSchema: z.ZodOptional<z.ZodString>;
121
121
  }, z.core.$strip>>;
122
122
  }, z.core.$strip>;
123
- type Mapping$1 = z.infer<typeof MappingSchema>;
124
- type SnowplowMappingSettings$1 = z.infer<typeof SnowplowMappingSettingsSchema>;
123
+ type Mapping = z.infer<typeof MappingSchema>;
124
+ type SnowplowMappingSettings = z.infer<typeof SnowplowMappingSettingsSchema>;
125
125
 
126
126
  declare const settings: _walkeros_core_dev.JSONSchema;
127
- declare const mapping$1: _walkeros_core_dev.JSONSchema;
127
+ declare const mapping: _walkeros_core_dev.JSONSchema;
128
128
 
129
129
  type index$1_ActivityTracking = ActivityTracking;
130
130
  declare const index$1_ActivityTrackingSchema: typeof ActivityTrackingSchema;
131
+ type index$1_Mapping = Mapping;
131
132
  declare const index$1_MappingSchema: typeof MappingSchema;
132
133
  type index$1_Settings = Settings;
133
134
  declare const index$1_SettingsSchema: typeof SettingsSchema;
135
+ type index$1_SnowplowMappingSettings = SnowplowMappingSettings;
134
136
  type index$1_SnowplowSettings = SnowplowSettings;
135
137
  type index$1_TrackerContexts = TrackerContexts;
136
138
  declare const index$1_TrackerContextsSchema: typeof TrackerContextsSchema;
137
139
  type index$1_UrlBasedPlugin = UrlBasedPlugin;
138
140
  declare const index$1_UrlBasedPluginSchema: typeof UrlBasedPluginSchema;
141
+ declare const index$1_mapping: typeof mapping;
139
142
  declare const index$1_settings: typeof settings;
140
143
  declare namespace index$1 {
141
- export { type index$1_ActivityTracking as ActivityTracking, index$1_ActivityTrackingSchema as ActivityTrackingSchema, type Mapping$1 as Mapping, index$1_MappingSchema as MappingSchema, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, type SnowplowMappingSettings$1 as SnowplowMappingSettings, type index$1_SnowplowSettings as SnowplowSettings, type index$1_TrackerContexts as TrackerContexts, index$1_TrackerContextsSchema as TrackerContextsSchema, type index$1_UrlBasedPlugin as UrlBasedPlugin, index$1_UrlBasedPluginSchema as UrlBasedPluginSchema, mapping$1 as mapping, index$1_settings as settings };
144
+ export { type index$1_ActivityTracking as ActivityTracking, index$1_ActivityTrackingSchema as ActivityTrackingSchema, type index$1_Mapping as Mapping, index$1_MappingSchema as MappingSchema, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, type index$1_SnowplowMappingSettings as SnowplowMappingSettings, type index$1_SnowplowSettings as SnowplowSettings, type index$1_TrackerContexts as TrackerContexts, index$1_TrackerContextsSchema as TrackerContextsSchema, type index$1_UrlBasedPlugin as UrlBasedPlugin, index$1_UrlBasedPluginSchema as UrlBasedPluginSchema, index$1_mapping as mapping, index$1_settings as settings };
142
145
  }
143
146
 
144
147
  declare global {
@@ -151,112 +154,6 @@ interface SnowplowFunction {
151
154
  (...args: unknown[]): void;
152
155
  q?: unknown[];
153
156
  }
154
- /**
155
- * Context entity definition for Snowplow
156
- *
157
- * Each context entity has a schema URI and data mapping.
158
- */
159
- interface ContextEntity {
160
- /**
161
- * Iglu schema URI for this context entity
162
- *
163
- * @example SCHEMAS.PRODUCT, SCHEMAS.TRANSACTION
164
- */
165
- schema: string;
166
- /**
167
- * Data mapping for this context entity
168
- *
169
- * Uses standard walkerOS mapping syntax.
170
- *
171
- * @example { id: 'data.id', name: 'data.name', price: 'data.price' }
172
- */
173
- data: Mapping$2.Map;
174
- }
175
- /**
176
- * Structured event mapping for Snowplow's trackStructEvent
177
- *
178
- * When configured, bypasses self-describing events entirely
179
- * and calls trackStructEvent with the resolved values.
180
- *
181
- * @example
182
- * struct: {
183
- * category: { value: 'ui' },
184
- * action: { value: 'click' },
185
- * label: 'data.button_name',
186
- * property: 'data.section',
187
- * value: 'data.position',
188
- * }
189
- */
190
- interface StructuredEventMapping {
191
- /** Event category (required) */
192
- category: Mapping$2.Value;
193
- /** Event action (required) */
194
- action: Mapping$2.Value;
195
- /** Event label (optional) */
196
- label?: Mapping$2.Value;
197
- /** Event property (optional) */
198
- property?: Mapping$2.Value;
199
- /** Event value - must resolve to a number (optional) */
200
- value?: Mapping$2.Value;
201
- }
202
- /**
203
- * Custom mapping parameters for Snowplow events
204
- *
205
- * Uses standard `name` field for action type.
206
- * The `name` from the mapping rule becomes Snowplow's event.data.type.
207
- */
208
- interface Mapping {
209
- /**
210
- * Context entities to attach to this event
211
- *
212
- * Each entry defines a schema and data mapping.
213
- * Explicit - no auto-detection.
214
- *
215
- * @example
216
- * context: [
217
- * { schema: SCHEMAS.PRODUCT, data: { id: 'data.id', name: 'data.name' } }
218
- * ]
219
- */
220
- context?: ContextEntity[];
221
- /**
222
- * Snowplow-specific settings override
223
- */
224
- snowplow?: SnowplowMappingSettings;
225
- /**
226
- * Custom data mapping for self-describing event payload
227
- *
228
- * When specified with a `map` property, the mapped values are used
229
- * as the event data instead of the default ecommerce pattern.
230
- * Useful for media events (percent_progress) and custom schemas.
231
- *
232
- * @example
233
- * data: { map: { percentProgress: 'data.progress' } }
234
- */
235
- data?: Mapping$2.Value;
236
- /**
237
- * Structured event mapping (bypasses self-describing events)
238
- *
239
- * When configured, calls trackStructEvent instead of trackSelfDescribingEvent.
240
- * No schema is used - this completely bypasses the self-describing event path.
241
- *
242
- * @example
243
- * struct: {
244
- * category: { value: 'ui' },
245
- * action: { value: 'click' },
246
- * label: 'data.button_name',
247
- * }
248
- */
249
- struct?: StructuredEventMapping;
250
- }
251
- /**
252
- * Per-event Snowplow settings override
253
- */
254
- interface SnowplowMappingSettings {
255
- /**
256
- * Override action schema for this specific event
257
- */
258
- actionSchema?: string;
259
- }
260
157
  /**
261
158
  * Environment dependencies for Snowplow destination
262
159
  */
@@ -265,7 +162,6 @@ interface Env extends DestinationWeb.Env {
265
162
  snowplow?: SnowplowFunction;
266
163
  };
267
164
  }
268
- type Rule = Mapping$2.Rule<Mapping>;
269
165
 
270
166
  declare const init: Env | undefined;
271
167
  declare const push: Env;
@@ -278,672 +174,25 @@ declare namespace env {
278
174
  export { env_init as init, env_push as push, env_simulation as simulation };
279
175
  }
280
176
 
281
- /**
282
- * Example Snowplow function call outputs
283
- *
284
- * These represent the actual arguments passed to window.snowplow()
285
- * when different events are tracked using Snowplow's ecommerce schema.
286
- *
287
- * All ecommerce events use the self-describing event format with:
288
- * - Event action schema: snowplow_ecommerce_action/jsonschema/1-0-2
289
- * - Context entities with their respective schemas
290
- *
291
- * Reference: https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/snowplow-tracker-protocol/
292
- */
293
- /**
294
- * Page View Event
295
- * Uses built-in Snowplow page view tracking
296
- */
297
- declare function pageView$2(): unknown[];
298
- /**
299
- * Product View Event
300
- * walkerOS: elb('product view') - uses default getEvent data
301
- * Snowplow: product_view action with product context entity
302
- */
303
- declare function productView$2(): unknown[];
304
- /**
305
- * Add to Cart Event
306
- * walkerOS: elb('product add', { id: 'P123', name: 'Laptop', price: 999, quantity: 1 })
307
- * Snowplow: add_to_cart action with product, cart, page, and user context entities
308
- */
309
- declare function addToCart$2(): unknown[];
310
- /**
311
- * Remove from Cart Event
312
- * walkerOS: elb('product remove', { id: 'P123', name: 'Laptop', price: 999, quantity: 1 })
313
- * Snowplow: remove_from_cart action with product and cart context entities
314
- */
315
- declare function removeFromCart$2(): unknown[];
316
- /**
317
- * Transaction/Purchase Event
318
- * walkerOS: elb('order complete') - uses default getEvent data
319
- * Default: { id: '0rd3r1d', currency: 'EUR', shipping: 5.22, taxes: 73.76, total: 555 }
320
- * Snowplow: transaction action with transaction context entity
321
- *
322
- * Note: This is explicit mapping without auto-looping nested products.
323
- * For product contexts from nested array, use loop in mapping configuration.
324
- */
325
- declare function transaction$2(): unknown[];
326
- /**
327
- * Transaction with Multiple Products
328
- * walkerOS: elb('order complete', { id: 'ORD-456', revenue: 1498, tax: 120, shipping: 15 }, {
329
- * nested: [
330
- * { type: 'product', data: { id: 'P123', name: 'Laptop', price: 999, quantity: 1 } },
331
- * { type: 'product', data: { id: 'P456', name: 'Mouse', price: 49, quantity: 2 } }
332
- * ]
333
- * })
334
- * Snowplow: transaction action with multiple product entities
335
- */
336
- declare function transactionMultipleProducts$1(): unknown[];
337
- /**
338
- * Refund Event
339
- * walkerOS: elb('order refund', { transaction_id: 'ORD-123', amount: 999, reason: 'defective' })
340
- * Snowplow: refund action with refund context entity
341
- */
342
- declare function refund$2(): unknown[];
343
- /**
344
- * Checkout Step Event
345
- * walkerOS: elb('checkout step', { step: 1, shipping_method: 'express' })
346
- * Snowplow: checkout_step action with checkout_step context entity
347
- */
348
- declare function checkoutStep$2(): unknown[];
349
- /**
350
- * List View Event (Product Listing Page)
351
- * walkerOS: elb('product list', { category: 'Electronics' }, {
352
- * nested: [
353
- * { type: 'product', data: { id: 'P123', name: 'Laptop', price: 999 } },
354
- * { type: 'product', data: { id: 'P456', name: 'Mouse', price: 49 } }
355
- * ]
356
- * })
357
- * Snowplow: list_view action with multiple product context entities
358
- */
359
- declare function listView$2(): unknown[];
360
- /**
361
- * Promotion View Event
362
- * walkerOS: elb('promo view', { id: 'SUMMER2024', name: 'Summer Sale', creative: 'banner_top' })
363
- * Snowplow: promo_view action with promotion context entity
364
- */
365
- declare function promoView$2(): unknown[];
366
- /**
367
- * Custom Self-Describing Event (Non-Ecommerce)
368
- * Example of a custom event that doesn't use the ecommerce schema
369
- * walkerOS: elb('custom action', { ... })
370
- */
371
- declare function customSelfDescribingEvent(): unknown[];
372
- /**
373
- * Legacy: Alias for transaction (for backward compatibility with tests)
374
- */
375
- declare const purchase: typeof transaction$2;
376
- /**
377
- * Legacy: Alias for customSelfDescribingEvent (for backward compatibility with tests)
378
- */
379
- declare const selfDescribingEvent: typeof customSelfDescribingEvent;
380
- /**
381
- * Legacy: Structured Event (deprecated)
382
- * Old structured event format with 5 fields
383
- * This format is deprecated in favor of self-describing events
384
- */
385
- declare function structuredEvent(): unknown[];
386
-
387
- declare const events_customSelfDescribingEvent: typeof customSelfDescribingEvent;
388
- declare const events_purchase: typeof purchase;
389
- declare const events_selfDescribingEvent: typeof selfDescribingEvent;
390
- declare const events_structuredEvent: typeof structuredEvent;
391
- declare namespace events {
392
- export { addToCart$2 as addToCart, checkoutStep$2 as checkoutStep, events_customSelfDescribingEvent as customSelfDescribingEvent, listView$2 as listView, pageView$2 as pageView, productView$2 as productView, promoView$2 as promoView, events_purchase as purchase, refund$2 as refund, removeFromCart$2 as removeFromCart, events_selfDescribingEvent as selfDescribingEvent, events_structuredEvent as structuredEvent, transaction$2 as transaction, transactionMultipleProducts$1 as transactionMultipleProducts };
393
- }
394
-
395
- /**
396
- * Snowplow Ecommerce Mapping Examples
397
- *
398
- * Fully explicit mapping - no auto-detection or magic.
399
- * - `name` at rule level specifies the Snowplow action type
400
- * - `settings.context` defines context entities with schema and data mapping
401
- *
402
- * Pattern: name = action type, settings.context = [{ schema, data }]
403
- */
404
- /**
405
- * Page View Mapping
406
- *
407
- * Page views use Snowplow's built-in trackPageView method.
408
- * No custom mapping needed - just pass through.
409
- */
410
- declare const pageView$1: Rule;
411
- /**
412
- * Product View Mapping
413
- *
414
- * walkerOS: elb('product view', { id: 'P123', name: 'Laptop', category: 'Electronics', price: 999 })
415
- * Snowplow: product_view action with product context entity
416
- */
417
- declare const productView$1: Rule;
418
- /**
419
- * Add to Cart Mapping
420
- *
421
- * walkerOS: elb('product add', { id: 'P123', name: 'Laptop', price: 999, quantity: 1 })
422
- * Snowplow: add_to_cart action with product, cart, page, and user context entities
423
- *
424
- * Expects:
425
- * - data: product properties (id, name, category, price, currency, quantity)
426
- * - globals: cart_value, cart_currency, page_type, language
427
- * - user: id, email
428
- */
429
- declare const addToCart$1: Rule;
430
- /**
431
- * Remove from Cart Mapping
432
- *
433
- * walkerOS: elb('product remove', { id: 'P123', name: 'Laptop', price: 999, quantity: 1 })
434
- * Snowplow: remove_from_cart action with product context entity
435
- */
436
- declare const removeFromCart$1: Rule;
437
- /**
438
- * Transaction/Purchase Mapping
439
- *
440
- * walkerOS: elb('order complete') - uses default getEvent data
441
- * Default has: { id, currency, shipping, taxes, total } + nested products
442
- * Snowplow: transaction action with transaction context entity
443
- *
444
- * Note: For product contexts from nested, use loop in data.map
445
- */
446
- declare const transaction$1: Rule;
447
- /**
448
- * Refund Mapping
449
- *
450
- * walkerOS: elb('order refund', {
451
- * transaction_id: 'ORD-123', refund_amount: 999, refund_reason: 'defective'
452
- * })
453
- * Snowplow: refund action with refund context entity
454
- */
455
- declare const refund$1: Rule;
456
- /**
457
- * Checkout Step Mapping
458
- *
459
- * walkerOS: elb('checkout step', { step: 1, delivery_provider: 'express' })
460
- * Snowplow: checkout_step action with checkout_step context entity
461
- */
462
- declare const checkoutStep$1: Rule;
463
- /**
464
- * Product List View Mapping
465
- *
466
- * walkerOS: elb('product list', { category: 'Electronics' })
467
- * Snowplow: list_view action
468
- *
469
- * Note: For multiple products from nested, use loop in data.map
470
- */
471
- declare const listView$1: Rule;
472
- /**
473
- * Promotion View Mapping
474
- *
475
- * walkerOS: elb('promo view', { id: 'SUMMER2024', name: 'Summer Sale', creative_id: 'banner_top' })
476
- * Snowplow: promo_view action with promotion context entity
477
- */
478
- declare const promoView$1: Rule;
479
- /**
480
- * Promotion Click Mapping
481
- *
482
- * walkerOS: elb('promo click', { id: 'SUMMER2024', name: 'Summer Sale' })
483
- * Snowplow: promo_click action with promotion context entity
484
- */
485
- declare const promoClick: Rule;
486
- /**
487
- * Link Click Mapping (Self-Describing Event)
488
- *
489
- * walkerOS: elb('link click', { url: 'https://example.com', text: 'Learn more', id: 'cta-main' })
490
- * Snowplow: link_click self-describing event
491
- *
492
- * Note: Uses self-describing event with custom schema, not ecommerce action
493
- */
494
- declare const linkClick: Rule;
495
- /**
496
- * Form Submit Mapping (Self-Describing Event)
497
- *
498
- * walkerOS: elb('form submit', { form_id: 'contact-form', form_classes: ['main-form'] })
499
- * Snowplow: submit_form self-describing event
500
- */
501
- declare const formSubmit: Rule;
502
- /**
503
- * Site Search Mapping (Self-Describing Event)
504
- *
505
- * walkerOS: elb('search submit', { terms: 'laptop', filters: { category: 'Electronics' }, total_results: 42 })
506
- * Snowplow: site_search self-describing event
507
- */
508
- declare const siteSearch: Rule;
509
- /**
510
- * Social Share Mapping (Self-Describing Event)
511
- *
512
- * walkerOS: elb('social share', { network: 'twitter', action: 'share', target: 'https://example.com/article' })
513
- * Snowplow: social_interaction self-describing event
514
- */
515
- declare const socialShare: Rule;
516
- /**
517
- * Button Click (Structured Event)
518
- *
519
- * walkerOS: elb('button click', { button_name: 'submit', section: 'header', position: 1 })
520
- * Snowplow: trackStructEvent (category='ui', action='click', label, property, value)
521
- *
522
- * Use structured events for simple interactions that don't need full schemas.
523
- * No schema validation - just category, action, label, property, value.
524
- */
525
- declare const buttonClick: Rule;
526
- /**
527
- * Navigation Event (Structured Event)
528
- *
529
- * walkerOS: elb('navigation click', { menu: 'main', item: 'products', depth: 2 })
530
- * Snowplow: trackStructEvent (category='navigation', action='click')
531
- */
532
- declare const navigationClick: Rule;
533
- /**
534
- * Video Interaction (Structured Event)
535
- *
536
- * walkerOS: elb('video play', { video_id: 'intro-video', video_title: 'Welcome', progress: 25 })
537
- * Snowplow: trackStructEvent (category='video', action='play')
538
- *
539
- * For simple video tracking. Use media schemas for full video analytics.
540
- */
541
- declare const videoPlay: Rule;
542
- /**
543
- * CTA Interaction (Structured Event)
544
- *
545
- * walkerOS: elb('cta click', { cta_id: 'hero-signup', cta_text: 'Get Started', variant: 'A' })
546
- * Snowplow: trackStructEvent (category='cta', action='click')
547
- */
548
- declare const ctaClick: Rule;
549
- /**
550
- * Generic Interaction (Structured Event with Dynamic Category/Action)
551
- *
552
- * walkerOS: elb('interaction track', { event_category: 'engagement', event_action: 'scroll', depth: 50 })
553
- * Snowplow: trackStructEvent with dynamic category/action from event data
554
- *
555
- * Useful for flexible event tracking where category/action come from the event itself.
556
- */
557
- declare const genericInteraction: Rule;
558
- /**
559
- * Media Play Event Mapping
560
- *
561
- * walkerOS: elb('video play', {
562
- * current_time: 0, duration: 300, paused: false,
563
- * volume: 80, muted: false, video_id: 'intro-video', title: 'Welcome'
564
- * })
565
- * Snowplow: play_event with media_player and session contexts
566
- *
567
- * Use for HTML5 video/audio or custom media players.
568
- * The media_player context contains current playback state.
569
- */
570
- declare const mediaPlay: Rule;
571
- /**
572
- * Media Pause Event Mapping
573
- *
574
- * walkerOS: elb('video pause', {
575
- * current_time: 45.2, duration: 300, paused: true, volume: 80
576
- * })
577
- * Snowplow: pause_event with media_player context
578
- */
579
- declare const mediaPause: Rule;
580
- /**
581
- * Media End Event Mapping
582
- *
583
- * walkerOS: elb('video end', {
584
- * current_time: 300, duration: 300, video_id: 'intro-video'
585
- * })
586
- * Snowplow: end_event with media_player context
587
- */
588
- declare const mediaEnd: Rule;
589
- /**
590
- * Media Seek Event Mapping
591
- *
592
- * walkerOS: elb('video seek', {
593
- * current_time: 120, duration: 300, seek_from: 45, seek_to: 120
594
- * })
595
- * Snowplow: seek_end_event with media_player context
596
- *
597
- * Track when user seeks (jumps) to a different position in the media.
598
- */
599
- declare const mediaSeek: Rule;
600
- /**
601
- * Media Progress Event Mapping (Percent Progress)
602
- *
603
- * walkerOS: elb('video progress', {
604
- * current_time: 75, duration: 300, percent: 25
605
- * })
606
- * Snowplow: percent_progress_event with media_player context
607
- *
608
- * Fires at progress milestones (e.g., 25%, 50%, 75%, 100%).
609
- */
610
- declare const mediaProgress: Rule;
611
- /**
612
- * Media Buffer Event Mapping
613
- *
614
- * walkerOS: elb('video buffer', {
615
- * current_time: 45.2, duration: 300, buffering: true
616
- * })
617
- * Snowplow: buffer_start_event with media_player context
618
- *
619
- * Track buffering events for quality of experience analysis.
620
- */
621
- declare const mediaBuffer: Rule;
622
- /**
623
- * Media Quality Change Event Mapping
624
- *
625
- * walkerOS: elb('video quality', {
626
- * current_time: 45.2, previous_quality: '720p', new_quality: '1080p', auto: false
627
- * })
628
- * Snowplow: quality_change_event with media_player context
629
- */
630
- declare const mediaQualityChange: Rule;
631
- /**
632
- * Media Fullscreen Change Event Mapping
633
- *
634
- * walkerOS: elb('video fullscreen', {
635
- * current_time: 45.2, fullscreen: true
636
- * })
637
- * Snowplow: fullscreen_change_event with media_player context
638
- */
639
- declare const mediaFullscreen: Rule;
640
- /**
641
- * Media Error Event Mapping
642
- *
643
- * walkerOS: elb('video error', {
644
- * current_time: 45.2, error_code: 'MEDIA_ERR_NETWORK', error_message: 'Network error'
645
- * })
646
- * Snowplow: error_event with media_player context
647
- */
648
- declare const mediaError: Rule;
649
- /**
650
- * Ad Break Start Event Mapping
651
- *
652
- * walkerOS: elb('ad break_start', {
653
- * current_time: 0, ad_break_type: 'preroll', ad_break_id: 'preroll-1'
654
- * })
655
- * Snowplow: ad_break_start_event with media_player and ad_break contexts
656
- */
657
- declare const adBreakStart: Rule;
658
- /**
659
- * Ad Start Event Mapping
660
- *
661
- * walkerOS: elb('ad start', {
662
- * current_time: 0, ad_id: 'ad-123', creative_id: 'creative-456',
663
- * advertiser: 'Acme Corp', duration: 30, skippable: true
664
- * })
665
- * Snowplow: ad_start_event with media_player and ad contexts
666
- */
667
- declare const adStart: Rule;
668
- /**
669
- * Ad Complete Event Mapping
670
- *
671
- * walkerOS: elb('ad complete', {
672
- * current_time: 30, ad_id: 'ad-123'
673
- * })
674
- * Snowplow: ad_complete_event with media_player and ad contexts
675
- */
676
- declare const adComplete: Rule;
677
- /**
678
- * Ad Skip Event Mapping
679
- *
680
- * walkerOS: elb('ad skip', {
681
- * current_time: 5, ad_id: 'ad-123', time_skipped_at: 5
682
- * })
683
- * Snowplow: ad_skip_event with media_player and ad contexts
684
- */
685
- declare const adSkip: Rule;
686
- /**
687
- * Complete Mapping Configuration
688
- *
689
- * Maps walkerOS event names to Snowplow ecommerce actions.
690
- * Fully explicit - no auto-detection or magic.
691
- */
692
- declare const config: {
693
- page: {
694
- view: Rule;
695
- };
696
- product: {
697
- view: Rule;
698
- add: Rule;
699
- remove: Rule;
700
- list: Rule;
701
- };
702
- order: {
703
- complete: Rule;
704
- refund: Rule;
705
- };
706
- checkout: {
707
- step: Rule;
708
- };
709
- promo: {
710
- view: Rule;
711
- click: Rule;
712
- };
713
- };
714
- /**
715
- * Web Analytics Mapping Configuration
716
- *
717
- * Maps walkerOS event names to Snowplow web analytics events.
718
- * Includes both self-describing events and structured events.
719
- */
720
- declare const webConfig: {
721
- link: {
722
- click: Rule;
723
- };
724
- form: {
725
- submit: Rule;
726
- };
727
- search: {
728
- submit: Rule;
729
- };
730
- social: {
731
- share: Rule;
732
- };
733
- button: {
734
- click: Rule;
735
- };
736
- navigation: {
737
- click: Rule;
738
- };
739
- video: {
740
- play: Rule;
741
- };
742
- cta: {
743
- click: Rule;
744
- };
745
- interaction: {
746
- track: Rule;
747
- };
748
- };
749
- /**
750
- * Media Tracking Mapping Configuration
751
- *
752
- * Maps walkerOS event names to Snowplow media tracking events.
753
- * Includes video playback, progress, and ad tracking.
754
- *
755
- * For automatic media tracking, consider using Snowplow's
756
- * @snowplow/browser-plugin-media-tracking plugin instead.
757
- */
758
- declare const mediaConfig: {
759
- video: {
760
- play: Rule;
761
- pause: Rule;
762
- end: Rule;
763
- seek: Rule;
764
- progress: Rule;
765
- buffer: Rule;
766
- quality: Rule;
767
- fullscreen: Rule;
768
- error: Rule;
769
- };
770
- ad: {
771
- break_start: Rule;
772
- start: Rule;
773
- complete: Rule;
774
- skip: Rule;
775
- };
776
- };
777
-
778
- declare const mapping_adBreakStart: typeof adBreakStart;
779
- declare const mapping_adComplete: typeof adComplete;
780
- declare const mapping_adSkip: typeof adSkip;
781
- declare const mapping_adStart: typeof adStart;
782
- declare const mapping_buttonClick: typeof buttonClick;
783
- declare const mapping_config: typeof config;
784
- declare const mapping_ctaClick: typeof ctaClick;
785
- declare const mapping_formSubmit: typeof formSubmit;
786
- declare const mapping_genericInteraction: typeof genericInteraction;
787
- declare const mapping_linkClick: typeof linkClick;
788
- declare const mapping_mediaBuffer: typeof mediaBuffer;
789
- declare const mapping_mediaConfig: typeof mediaConfig;
790
- declare const mapping_mediaEnd: typeof mediaEnd;
791
- declare const mapping_mediaError: typeof mediaError;
792
- declare const mapping_mediaFullscreen: typeof mediaFullscreen;
793
- declare const mapping_mediaPause: typeof mediaPause;
794
- declare const mapping_mediaPlay: typeof mediaPlay;
795
- declare const mapping_mediaProgress: typeof mediaProgress;
796
- declare const mapping_mediaQualityChange: typeof mediaQualityChange;
797
- declare const mapping_mediaSeek: typeof mediaSeek;
798
- declare const mapping_navigationClick: typeof navigationClick;
799
- declare const mapping_promoClick: typeof promoClick;
800
- declare const mapping_siteSearch: typeof siteSearch;
801
- declare const mapping_socialShare: typeof socialShare;
802
- declare const mapping_videoPlay: typeof videoPlay;
803
- declare const mapping_webConfig: typeof webConfig;
804
- declare namespace mapping {
805
- export { mapping_adBreakStart as adBreakStart, mapping_adComplete as adComplete, mapping_adSkip as adSkip, mapping_adStart as adStart, addToCart$1 as addToCart, mapping_buttonClick as buttonClick, checkoutStep$1 as checkoutStep, mapping_config as config, mapping_ctaClick as ctaClick, mapping_formSubmit as formSubmit, mapping_genericInteraction as genericInteraction, mapping_linkClick as linkClick, listView$1 as listView, mapping_mediaBuffer as mediaBuffer, mapping_mediaConfig as mediaConfig, mapping_mediaEnd as mediaEnd, mapping_mediaError as mediaError, mapping_mediaFullscreen as mediaFullscreen, mapping_mediaPause as mediaPause, mapping_mediaPlay as mediaPlay, mapping_mediaProgress as mediaProgress, mapping_mediaQualityChange as mediaQualityChange, mapping_mediaSeek as mediaSeek, mapping_navigationClick as navigationClick, pageView$1 as pageView, productView$1 as productView, mapping_promoClick as promoClick, promoView$1 as promoView, refund$1 as refund, removeFromCart$1 as removeFromCart, mapping_siteSearch as siteSearch, mapping_socialShare as socialShare, transaction$1 as transaction, mapping_videoPlay as videoPlay, mapping_webConfig as webConfig };
806
- }
807
-
808
- /**
809
- * Example walkerOS events that would generate Snowplow ecommerce events
810
- *
811
- * These represent the actual walkerOS events (with their data and nested entities)
812
- * that would be transformed into Snowplow ecommerce schema format.
813
- *
814
- * Pattern: walkerOS event → Snowplow self-describing event with context entities
815
- */
816
- /**
817
- * Page View Event
818
- * walkerOS: elb('page view', { id: '/products', title: 'Product Listing' })
819
- * Generated when a user views a page
820
- */
821
- declare function pageView(): WalkerOS.Event;
822
- /**
823
- * Product View Event
824
- * walkerOS: elb('product view', { id: 'P123', name: 'Laptop', category: 'Electronics', price: 999 })
825
- * Generated when viewing a product detail page
826
- */
827
- declare function productView(): WalkerOS.Event;
828
- /**
829
- * Add to Cart Event
830
- * walkerOS: elb('product add', { id: 'P123', name: 'Laptop', price: 999, quantity: 1 }, {
831
- * globals: { cart_value: 999, cart_currency: 'USD', page_type: 'product', language: 'en' },
832
- * user: { id: 'U123', email: 'user@example.com' }
833
- * })
834
- * Generated when adding a product to cart
835
- */
836
- declare function addToCart(): WalkerOS.Event;
837
- /**
838
- * Remove from Cart Event
839
- * walkerOS: elb('product remove', { id: 'P123', name: 'Laptop', price: 999, quantity: 1 }, {
840
- * globals: { cart_total: 0, cart_currency: 'USD' }
841
- * })
842
- * Generated when removing a product from cart
843
- */
844
- declare function removeFromCart(): WalkerOS.Event;
845
- /**
846
- * Transaction/Purchase Event (Single Product)
847
- * walkerOS: elb('order complete', {
848
- * id: 'ORD-123',
849
- * revenue: 999,
850
- * tax: 80,
851
- * shipping: 10,
852
- * currency: 'USD',
853
- * payment_method: 'credit_card'
854
- * }, {
855
- * nested: [
856
- * { type: 'product', data: { id: 'P123', name: 'Laptop', category: 'Electronics', price: 999, quantity: 1 } }
857
- * ]
858
- * })
859
- * Generated when order is completed
860
- */
861
- declare function transaction(): WalkerOS.Event;
862
- /**
863
- * Transaction with Multiple Products
864
- * walkerOS: elb('order complete', {
865
- * id: 'ORD-456',
866
- * revenue: 1097,
867
- * tax: 120,
868
- * shipping: 15,
869
- * currency: 'USD',
870
- * payment_method: 'paypal'
871
- * }, {
872
- * nested: [
873
- * { type: 'product', data: { id: 'P123', name: 'Laptop', price: 999, quantity: 1 } },
874
- * { type: 'product', data: { id: 'P456', name: 'Mouse', price: 49, quantity: 2 } }
875
- * ]
876
- * })
877
- * Generated when order with multiple products is completed
878
- */
879
- declare function transactionMultipleProducts(): WalkerOS.Event;
880
- /**
881
- * Refund Event
882
- * walkerOS: elb('order refund', {
883
- * transaction_id: 'ORD-123',
884
- * refund_amount: 999,
885
- * currency: 'USD',
886
- * refund_reason: 'defective'
887
- * })
888
- * Generated when processing a refund
889
- */
890
- declare function refund(): WalkerOS.Event;
891
- /**
892
- * Checkout Step Event
893
- * walkerOS: elb('checkout step', { step: 1, delivery_provider: 'express' })
894
- * Generated when progressing through checkout
895
- */
896
- declare function checkoutStep(): WalkerOS.Event;
897
- /**
898
- * List View Event (Product Listing Page)
899
- * walkerOS: elb('product list', { category: 'Electronics', list_name: 'Search Results' }, {
900
- * nested: [
901
- * { type: 'product', data: { id: 'P123', name: 'Laptop', price: 999, position: 1 } },
902
- * { type: 'product', data: { id: 'P456', name: 'Mouse', price: 49, position: 2 } }
903
- * ]
904
- * })
905
- * Generated when viewing a product listing page (search, category, etc.)
906
- */
907
- declare function listView(): WalkerOS.Event;
908
- /**
909
- * Promotion View Event
910
- * walkerOS: elb('promo view', {
911
- * id: 'SUMMER2024',
912
- * name: 'Summer Sale',
913
- * creative_id: 'banner_top',
914
- * position: 'hero'
915
- * })
916
- * Generated when a promotion is displayed to the user
917
- */
918
- declare function promoView(): WalkerOS.Event;
919
- /**
920
- * Custom Event (Non-Ecommerce)
921
- * walkerOS: elb('custom action', { action_type: 'button_click', button_id: 'cta_signup' })
922
- * Example of a custom event that doesn't use ecommerce schema
923
- */
924
- declare function customEvent(): WalkerOS.Event;
177
+ declare const productView: Flow.StepExample;
178
+ declare const addToCart: Flow.StepExample;
179
+ declare const transaction: Flow.StepExample;
180
+ declare const promoView: Flow.StepExample;
181
+ declare const pageView: Flow.StepExample;
925
182
 
926
- declare const walkerosEvents_addToCart: typeof addToCart;
927
- declare const walkerosEvents_checkoutStep: typeof checkoutStep;
928
- declare const walkerosEvents_customEvent: typeof customEvent;
929
- declare const walkerosEvents_listView: typeof listView;
930
- declare const walkerosEvents_pageView: typeof pageView;
931
- declare const walkerosEvents_productView: typeof productView;
932
- declare const walkerosEvents_promoView: typeof promoView;
933
- declare const walkerosEvents_refund: typeof refund;
934
- declare const walkerosEvents_removeFromCart: typeof removeFromCart;
935
- declare const walkerosEvents_transaction: typeof transaction;
936
- declare const walkerosEvents_transactionMultipleProducts: typeof transactionMultipleProducts;
937
- declare namespace walkerosEvents {
938
- export { walkerosEvents_addToCart as addToCart, walkerosEvents_checkoutStep as checkoutStep, walkerosEvents_customEvent as customEvent, walkerosEvents_listView as listView, walkerosEvents_pageView as pageView, walkerosEvents_productView as productView, walkerosEvents_promoView as promoView, walkerosEvents_refund as refund, walkerosEvents_removeFromCart as removeFromCart, walkerosEvents_transaction as transaction, walkerosEvents_transactionMultipleProducts as transactionMultipleProducts };
183
+ declare const step_addToCart: typeof addToCart;
184
+ declare const step_pageView: typeof pageView;
185
+ declare const step_productView: typeof productView;
186
+ declare const step_promoView: typeof promoView;
187
+ declare const step_transaction: typeof transaction;
188
+ declare namespace step {
189
+ export { step_addToCart as addToCart, step_pageView as pageView, step_productView as productView, step_promoView as promoView, step_transaction as transaction };
939
190
  }
940
191
 
941
192
  declare const index_env: typeof env;
942
- declare const index_events: typeof events;
943
- declare const index_mapping: typeof mapping;
944
- declare const index_walkerosEvents: typeof walkerosEvents;
193
+ declare const index_step: typeof step;
945
194
  declare namespace index {
946
- export { index_env as env, index_events as events, index_mapping as mapping, index_walkerosEvents as walkerosEvents };
195
+ export { index_env as env, index_step as step };
947
196
  }
948
197
 
949
198
  export { index as examples, index$1 as schemas };