@walkeros/core 3.2.0 → 3.3.0-next-1776098542393

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/index.d.mts CHANGED
@@ -1,3 +1,5 @@
1
+ import { z } from 'zod';
2
+
1
3
  type MatchExpression = MatchCondition | {
2
4
  and: MatchExpression[];
3
5
  } | {
@@ -27,6 +29,7 @@ declare namespace matcher {
27
29
  interface Config$8<T = unknown> {
28
30
  consent?: Consent;
29
31
  data?: Value | Values;
32
+ include?: string[];
30
33
  mapping?: Rules<Rule<T>>;
31
34
  policy?: Policy$1;
32
35
  }
@@ -44,7 +47,9 @@ interface Rule<Settings = unknown> {
44
47
  consent?: Consent;
45
48
  settings?: Settings;
46
49
  data?: Data$1;
50
+ include?: string[];
47
51
  ignore?: boolean;
52
+ skip?: boolean;
48
53
  name?: string;
49
54
  policy?: Policy$1;
50
55
  }
@@ -444,6 +449,8 @@ interface Config$6<T extends TypesGeneric$3 = Types$4> {
444
449
  settings?: InitSettings$3<T>;
445
450
  /** Global data transformation applied to all events; result passed as context.data to push. */
446
451
  data?: Value | Values;
452
+ /** Event sections to flatten into context.data. */
453
+ include?: string[];
447
454
  /** Runtime dependencies merged from code and config env; extensible per destination. */
448
455
  env?: Env$3<T>;
449
456
  /** Destination identifier; auto-generated if not provided. */
@@ -691,6 +698,36 @@ type Packages = Record<string, {
691
698
  imports?: string[];
692
699
  path?: string;
693
700
  }>;
701
+ /**
702
+ * Transitive dependency version pins for bundling.
703
+ *
704
+ * @remarks
705
+ * Maps package name → version spec. Applied during bundle package install
706
+ * to force transitive dependencies to a specific version. Useful for
707
+ * resolving conflicts between packages that depend on incompatible
708
+ * versions of a shared dependency.
709
+ *
710
+ * @example
711
+ * ```json
712
+ * {
713
+ * "@amplitude/analytics-types": "2.11.1"
714
+ * }
715
+ * ```
716
+ */
717
+ type Overrides = Record<string, string>;
718
+ /**
719
+ * Bundle configuration for a flow.
720
+ *
721
+ * @remarks
722
+ * Groups all build-time bundling concerns: NPM packages to include and
723
+ * transitive dependency overrides. Consumed by the CLI bundler.
724
+ */
725
+ interface Bundle {
726
+ /** NPM packages to bundle. */
727
+ packages?: Packages;
728
+ /** Transitive dependency version pins. */
729
+ overrides?: Overrides;
730
+ }
694
731
  /**
695
732
  * Web platform configuration.
696
733
  *
@@ -947,9 +984,12 @@ interface Settings$3 {
947
984
  */
948
985
  collector?: InitConfig;
949
986
  /**
950
- * NPM packages to bundle.
987
+ * Bundle configuration (packages to include, transitive overrides).
988
+ *
989
+ * @remarks
990
+ * Groups NPM `packages` and dependency `overrides` used at build time.
951
991
  */
952
- packages?: Packages;
992
+ bundle?: Bundle;
953
993
  /**
954
994
  * Flow-level variables.
955
995
  * Override Config.variables, overridden by source/destination variables.
@@ -961,10 +1001,29 @@ interface Settings$3 {
961
1001
  */
962
1002
  definitions?: Definitions;
963
1003
  }
1004
+ /**
1005
+ * Walker command names that a step example can invoke instead of pushing
1006
+ * its `in` as a regular event. Mirrors the `elb('walker <command>', ...)`
1007
+ * surface in `WalkerCommands` (see types/elb.ts).
1008
+ *
1009
+ * - `config` — update collector config (maps to `elb('walker config', in)`)
1010
+ * - `consent` — update consent state (maps to `elb('walker consent', in)`)
1011
+ * - `user` — update user identification (maps to `elb('walker user', in)`)
1012
+ * - `run` — fire run state (maps to `elb('walker run', in)`)
1013
+ *
1014
+ * Note: `walker destination`, `walker hook`, and `walker on` are
1015
+ * intentionally excluded — they configure wiring, not test data.
1016
+ */
1017
+ type StepCommand = 'config' | 'consent' | 'user' | 'run';
964
1018
  /**
965
1019
  * Named example pair for a step.
966
1020
  * `in` is the input to the step, `out` is the expected output.
967
1021
  * `out: false` indicates the step filters/drops this event.
1022
+ *
1023
+ * When `command` is set, the test runner invokes
1024
+ * `elb('walker <command>', in)` instead of pushing `in` as a regular event.
1025
+ * When `command` is absent (default), `in` is pushed as a normal event via
1026
+ * `elb(event)`.
968
1027
  */
969
1028
  interface StepExample {
970
1029
  description?: string;
@@ -978,6 +1037,12 @@ interface StepExample {
978
1037
  };
979
1038
  mapping?: unknown;
980
1039
  out?: unknown;
1040
+ /**
1041
+ * Invoke a walker command with `in` instead of pushing `in` as an event.
1042
+ * When set, the test runner calls `elb('walker <command>', in)`.
1043
+ * When absent (default), `in` is pushed as a regular event.
1044
+ */
1045
+ command?: StepCommand;
981
1046
  }
982
1047
  /**
983
1048
  * Named step examples keyed by scenario name.
@@ -1359,6 +1424,7 @@ interface DestinationReference {
1359
1424
  examples?: StepExamples;
1360
1425
  }
1361
1426
 
1427
+ type flow_Bundle = Bundle;
1362
1428
  type flow_Contract = Contract;
1363
1429
  type flow_ContractActions = ContractActions;
1364
1430
  type flow_ContractEntry = ContractEntry;
@@ -1367,10 +1433,12 @@ type flow_ContractSchema = ContractSchema;
1367
1433
  type flow_Definitions = Definitions;
1368
1434
  type flow_DestinationReference = DestinationReference;
1369
1435
  type flow_InlineCode = InlineCode;
1436
+ type flow_Overrides = Overrides;
1370
1437
  type flow_Packages = Packages;
1371
1438
  type flow_Primitive = Primitive;
1372
1439
  type flow_Server = Server;
1373
1440
  type flow_SourceReference = SourceReference;
1441
+ type flow_StepCommand = StepCommand;
1374
1442
  type flow_StepExample = StepExample;
1375
1443
  type flow_StepExamples = StepExamples;
1376
1444
  type flow_StoreReference = StoreReference;
@@ -1378,7 +1446,7 @@ type flow_TransformerReference = TransformerReference;
1378
1446
  type flow_Variables = Variables;
1379
1447
  type flow_Web = Web;
1380
1448
  declare namespace flow {
1381
- export type { Config$5 as Config, flow_Contract as Contract, flow_ContractActions as ContractActions, flow_ContractEntry as ContractEntry, flow_ContractEvents as ContractEvents, flow_ContractSchema as ContractSchema, flow_Definitions as Definitions, flow_DestinationReference as DestinationReference, flow_InlineCode as InlineCode, flow_Packages as Packages, flow_Primitive as Primitive, flow_Server as Server, Settings$3 as Settings, flow_SourceReference as SourceReference, flow_StepExample as StepExample, flow_StepExamples as StepExamples, flow_StoreReference as StoreReference, flow_TransformerReference as TransformerReference, flow_Variables as Variables, flow_Web as Web };
1449
+ export type { flow_Bundle as Bundle, Config$5 as Config, flow_Contract as Contract, flow_ContractActions as ContractActions, flow_ContractEntry as ContractEntry, flow_ContractEvents as ContractEvents, flow_ContractSchema as ContractSchema, flow_Definitions as Definitions, flow_DestinationReference as DestinationReference, flow_InlineCode as InlineCode, flow_Overrides as Overrides, flow_Packages as Packages, flow_Primitive as Primitive, flow_Server as Server, Settings$3 as Settings, flow_SourceReference as SourceReference, flow_StepCommand as StepCommand, flow_StepExample as StepExample, flow_StepExamples as StepExamples, flow_StoreReference as StoreReference, flow_TransformerReference as TransformerReference, flow_Variables as Variables, flow_Web as Web };
1382
1450
  }
1383
1451
 
1384
1452
  type AnyFunction$1<P extends unknown[] = never[], R = unknown> = (...args: P) => R;
@@ -2406,6 +2474,8 @@ declare function getByPath(event: unknown, key?: string, defaultValue?: unknown)
2406
2474
  */
2407
2475
  declare function setByPath<T = unknown>(obj: T, key: string, value: unknown): T;
2408
2476
 
2477
+ declare function flattenIncludeSections(event: DeepPartialEvent, sections: string[]): Record<string, unknown>;
2478
+
2409
2479
  /**
2410
2480
  * Casts a value to a specific type.
2411
2481
  *
@@ -2492,14 +2562,37 @@ declare function getId(length?: number): string;
2492
2562
  interface MarketingParameters {
2493
2563
  [key: string]: string;
2494
2564
  }
2565
+ /**
2566
+ * Click-ID registry entry — maps a URL parameter name to a canonical platform.
2567
+ */
2568
+ declare const ClickIdEntrySchema: z.ZodObject<{
2569
+ param: z.ZodString;
2570
+ platform: z.ZodString;
2571
+ }, z.core.$strip>;
2572
+ type ClickIdEntry = z.infer<typeof ClickIdEntrySchema>;
2573
+ /**
2574
+ * Default click-ID registry.
2575
+ *
2576
+ * Ordered by priority: when a URL contains multiple click IDs, the entry
2577
+ * appearing earlier wins as the resolved `clickId` / `platform`. All matched
2578
+ * raw values are still preserved on the result.
2579
+ *
2580
+ * Extend via the third argument to {@link getMarketingParameters} or the
2581
+ * `clickIds` field in the session source settings.
2582
+ */
2583
+ declare const defaultClickIds: ClickIdEntry[];
2495
2584
  /**
2496
2585
  * Extracts marketing parameters from a URL.
2497
2586
  *
2498
- * @param url - The URL to extract the parameters from.
2499
- * @param custom - Custom marketing parameters to extract.
2500
- * @returns The extracted marketing parameters.
2587
+ * - UTM and custom params are mapped to friendly names (`utm_source` → `source`).
2588
+ * - Known click IDs are detected case-insensitively; each raw value is stored
2589
+ * under its canonical lowercase param name.
2590
+ * - `clickId` and `platform` reference the highest-priority match (first entry
2591
+ * in the registry present in the URL).
2592
+ * - Custom `clickIds` override default platforms by `param` in place and
2593
+ * append new params at the end of the priority list.
2501
2594
  */
2502
- declare function getMarketingParameters(url: URL, custom?: MarketingParameters): Properties;
2595
+ declare function getMarketingParameters(url: URL, custom?: MarketingParameters, clickIds?: ClickIdEntry[]): Properties;
2503
2596
 
2504
2597
  /**
2505
2598
  * Creates a debounced function that delays invoking `fn` until after `wait`
@@ -2667,6 +2760,7 @@ declare function processEventMapping<T extends DeepPartialEvent | Event>(event:
2667
2760
  mapping?: Rule;
2668
2761
  mappingKey?: string;
2669
2762
  ignore: boolean;
2763
+ skip: boolean;
2670
2764
  }>;
2671
2765
 
2672
2766
  /**
@@ -3167,4 +3261,4 @@ declare function checkCache(compiled: CompiledCache, store: Instance$1, context:
3167
3261
  declare function storeCache(store: Instance$1, key: string, value: unknown, ttlSeconds: number): void;
3168
3262
  declare function applyUpdate(value: unknown, update: Record<string, unknown> | undefined, context: Record<string, unknown>): Promise<unknown>;
3169
3263
 
3170
- export { cache as Cache, type CacheResult, collector as Collector, type CompiledCache, type CompiledNext, type CompiledRoute, Const, context as Context, destination as Destination, ENV_MARKER_PREFIX, elb as Elb, type ExampleSummary, flow as Flow, hint as Hint, hooks as Hooks, type Ingest, type IngestMeta, Level, lifecycle as Lifecycle, logger as Logger, mapping as Mapping, type MarketingParameters, matcher as Matcher, type MockLogger, on as On, request as Request, type ResolveOptions, type RespondFn, type RespondOptions, type SendDataValue, type SendHeaders, type SendResponse, simulation as Simulation, source as Source, type StorageType, store as Store, transformer as Transformer, trigger as Trigger, walkeros as WalkerOS, type WalkerOSPackage, type WalkerOSPackageInfo, type WalkerOSPackageMeta, anonymizeIP, applyUpdate, assign, branch, buildCacheContext, castToProperty, castValue, checkCache, clone, compileCache, compileMatcher, compileNext, createDestination, createEvent, createIngest, createLogger, createMockContext, createMockLogger, createRespond, debounce, deepMerge, fetchPackage, fetchPackageSchema, filterValues, getBrowser, getBrowserVersion, getByPath, getDeviceType, getEvent, getFlowSettings, getGrantedConsent, getHeaders, getId, getMappingEvent, getMappingValue, getMarketingParameters, getOS, getOSVersion, getPlatform, isArguments, isArray, isBoolean, isCommand, isDefined, isElementOrDocument, isFunction, isNumber, isObject, isPropertyType, isRouteArray, isSameType, isString, mcpError, mcpResult, mergeConfigSchema, mergeContractSchemas, mockEnv, packageNameToVariable, parseUserAgent, processEventMapping, requestToData, requestToParameter, resolveContracts, resolveNext, setByPath, storeCache, throttle, throwError, transformData, traverseEnv, trim, tryCatch, tryCatchAsync, useHooks, walkPath, wrapCondition, wrapFn, wrapValidate };
3264
+ export { cache as Cache, type CacheResult, type ClickIdEntry, ClickIdEntrySchema, collector as Collector, type CompiledCache, type CompiledNext, type CompiledRoute, Const, context as Context, destination as Destination, ENV_MARKER_PREFIX, elb as Elb, type ExampleSummary, flow as Flow, hint as Hint, hooks as Hooks, type Ingest, type IngestMeta, Level, lifecycle as Lifecycle, logger as Logger, mapping as Mapping, type MarketingParameters, matcher as Matcher, type MockLogger, on as On, request as Request, type ResolveOptions, type RespondFn, type RespondOptions, type SendDataValue, type SendHeaders, type SendResponse, simulation as Simulation, source as Source, type StorageType, store as Store, transformer as Transformer, trigger as Trigger, walkeros as WalkerOS, type WalkerOSPackage, type WalkerOSPackageInfo, type WalkerOSPackageMeta, anonymizeIP, applyUpdate, assign, branch, buildCacheContext, castToProperty, castValue, checkCache, clone, compileCache, compileMatcher, compileNext, createDestination, createEvent, createIngest, createLogger, createMockContext, createMockLogger, createRespond, debounce, deepMerge, defaultClickIds, fetchPackage, fetchPackageSchema, filterValues, flattenIncludeSections, getBrowser, getBrowserVersion, getByPath, getDeviceType, getEvent, getFlowSettings, getGrantedConsent, getHeaders, getId, getMappingEvent, getMappingValue, getMarketingParameters, getOS, getOSVersion, getPlatform, isArguments, isArray, isBoolean, isCommand, isDefined, isElementOrDocument, isFunction, isNumber, isObject, isPropertyType, isRouteArray, isSameType, isString, mcpError, mcpResult, mergeConfigSchema, mergeContractSchemas, mockEnv, packageNameToVariable, parseUserAgent, processEventMapping, requestToData, requestToParameter, resolveContracts, resolveNext, setByPath, storeCache, throttle, throwError, transformData, traverseEnv, trim, tryCatch, tryCatchAsync, useHooks, walkPath, wrapCondition, wrapFn, wrapValidate };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { z } from 'zod';
2
+
1
3
  type MatchExpression = MatchCondition | {
2
4
  and: MatchExpression[];
3
5
  } | {
@@ -27,6 +29,7 @@ declare namespace matcher {
27
29
  interface Config$8<T = unknown> {
28
30
  consent?: Consent;
29
31
  data?: Value | Values;
32
+ include?: string[];
30
33
  mapping?: Rules<Rule<T>>;
31
34
  policy?: Policy$1;
32
35
  }
@@ -44,7 +47,9 @@ interface Rule<Settings = unknown> {
44
47
  consent?: Consent;
45
48
  settings?: Settings;
46
49
  data?: Data$1;
50
+ include?: string[];
47
51
  ignore?: boolean;
52
+ skip?: boolean;
48
53
  name?: string;
49
54
  policy?: Policy$1;
50
55
  }
@@ -444,6 +449,8 @@ interface Config$6<T extends TypesGeneric$3 = Types$4> {
444
449
  settings?: InitSettings$3<T>;
445
450
  /** Global data transformation applied to all events; result passed as context.data to push. */
446
451
  data?: Value | Values;
452
+ /** Event sections to flatten into context.data. */
453
+ include?: string[];
447
454
  /** Runtime dependencies merged from code and config env; extensible per destination. */
448
455
  env?: Env$3<T>;
449
456
  /** Destination identifier; auto-generated if not provided. */
@@ -691,6 +698,36 @@ type Packages = Record<string, {
691
698
  imports?: string[];
692
699
  path?: string;
693
700
  }>;
701
+ /**
702
+ * Transitive dependency version pins for bundling.
703
+ *
704
+ * @remarks
705
+ * Maps package name → version spec. Applied during bundle package install
706
+ * to force transitive dependencies to a specific version. Useful for
707
+ * resolving conflicts between packages that depend on incompatible
708
+ * versions of a shared dependency.
709
+ *
710
+ * @example
711
+ * ```json
712
+ * {
713
+ * "@amplitude/analytics-types": "2.11.1"
714
+ * }
715
+ * ```
716
+ */
717
+ type Overrides = Record<string, string>;
718
+ /**
719
+ * Bundle configuration for a flow.
720
+ *
721
+ * @remarks
722
+ * Groups all build-time bundling concerns: NPM packages to include and
723
+ * transitive dependency overrides. Consumed by the CLI bundler.
724
+ */
725
+ interface Bundle {
726
+ /** NPM packages to bundle. */
727
+ packages?: Packages;
728
+ /** Transitive dependency version pins. */
729
+ overrides?: Overrides;
730
+ }
694
731
  /**
695
732
  * Web platform configuration.
696
733
  *
@@ -947,9 +984,12 @@ interface Settings$3 {
947
984
  */
948
985
  collector?: InitConfig;
949
986
  /**
950
- * NPM packages to bundle.
987
+ * Bundle configuration (packages to include, transitive overrides).
988
+ *
989
+ * @remarks
990
+ * Groups NPM `packages` and dependency `overrides` used at build time.
951
991
  */
952
- packages?: Packages;
992
+ bundle?: Bundle;
953
993
  /**
954
994
  * Flow-level variables.
955
995
  * Override Config.variables, overridden by source/destination variables.
@@ -961,10 +1001,29 @@ interface Settings$3 {
961
1001
  */
962
1002
  definitions?: Definitions;
963
1003
  }
1004
+ /**
1005
+ * Walker command names that a step example can invoke instead of pushing
1006
+ * its `in` as a regular event. Mirrors the `elb('walker <command>', ...)`
1007
+ * surface in `WalkerCommands` (see types/elb.ts).
1008
+ *
1009
+ * - `config` — update collector config (maps to `elb('walker config', in)`)
1010
+ * - `consent` — update consent state (maps to `elb('walker consent', in)`)
1011
+ * - `user` — update user identification (maps to `elb('walker user', in)`)
1012
+ * - `run` — fire run state (maps to `elb('walker run', in)`)
1013
+ *
1014
+ * Note: `walker destination`, `walker hook`, and `walker on` are
1015
+ * intentionally excluded — they configure wiring, not test data.
1016
+ */
1017
+ type StepCommand = 'config' | 'consent' | 'user' | 'run';
964
1018
  /**
965
1019
  * Named example pair for a step.
966
1020
  * `in` is the input to the step, `out` is the expected output.
967
1021
  * `out: false` indicates the step filters/drops this event.
1022
+ *
1023
+ * When `command` is set, the test runner invokes
1024
+ * `elb('walker <command>', in)` instead of pushing `in` as a regular event.
1025
+ * When `command` is absent (default), `in` is pushed as a normal event via
1026
+ * `elb(event)`.
968
1027
  */
969
1028
  interface StepExample {
970
1029
  description?: string;
@@ -978,6 +1037,12 @@ interface StepExample {
978
1037
  };
979
1038
  mapping?: unknown;
980
1039
  out?: unknown;
1040
+ /**
1041
+ * Invoke a walker command with `in` instead of pushing `in` as an event.
1042
+ * When set, the test runner calls `elb('walker <command>', in)`.
1043
+ * When absent (default), `in` is pushed as a regular event.
1044
+ */
1045
+ command?: StepCommand;
981
1046
  }
982
1047
  /**
983
1048
  * Named step examples keyed by scenario name.
@@ -1359,6 +1424,7 @@ interface DestinationReference {
1359
1424
  examples?: StepExamples;
1360
1425
  }
1361
1426
 
1427
+ type flow_Bundle = Bundle;
1362
1428
  type flow_Contract = Contract;
1363
1429
  type flow_ContractActions = ContractActions;
1364
1430
  type flow_ContractEntry = ContractEntry;
@@ -1367,10 +1433,12 @@ type flow_ContractSchema = ContractSchema;
1367
1433
  type flow_Definitions = Definitions;
1368
1434
  type flow_DestinationReference = DestinationReference;
1369
1435
  type flow_InlineCode = InlineCode;
1436
+ type flow_Overrides = Overrides;
1370
1437
  type flow_Packages = Packages;
1371
1438
  type flow_Primitive = Primitive;
1372
1439
  type flow_Server = Server;
1373
1440
  type flow_SourceReference = SourceReference;
1441
+ type flow_StepCommand = StepCommand;
1374
1442
  type flow_StepExample = StepExample;
1375
1443
  type flow_StepExamples = StepExamples;
1376
1444
  type flow_StoreReference = StoreReference;
@@ -1378,7 +1446,7 @@ type flow_TransformerReference = TransformerReference;
1378
1446
  type flow_Variables = Variables;
1379
1447
  type flow_Web = Web;
1380
1448
  declare namespace flow {
1381
- export type { Config$5 as Config, flow_Contract as Contract, flow_ContractActions as ContractActions, flow_ContractEntry as ContractEntry, flow_ContractEvents as ContractEvents, flow_ContractSchema as ContractSchema, flow_Definitions as Definitions, flow_DestinationReference as DestinationReference, flow_InlineCode as InlineCode, flow_Packages as Packages, flow_Primitive as Primitive, flow_Server as Server, Settings$3 as Settings, flow_SourceReference as SourceReference, flow_StepExample as StepExample, flow_StepExamples as StepExamples, flow_StoreReference as StoreReference, flow_TransformerReference as TransformerReference, flow_Variables as Variables, flow_Web as Web };
1449
+ export type { flow_Bundle as Bundle, Config$5 as Config, flow_Contract as Contract, flow_ContractActions as ContractActions, flow_ContractEntry as ContractEntry, flow_ContractEvents as ContractEvents, flow_ContractSchema as ContractSchema, flow_Definitions as Definitions, flow_DestinationReference as DestinationReference, flow_InlineCode as InlineCode, flow_Overrides as Overrides, flow_Packages as Packages, flow_Primitive as Primitive, flow_Server as Server, Settings$3 as Settings, flow_SourceReference as SourceReference, flow_StepCommand as StepCommand, flow_StepExample as StepExample, flow_StepExamples as StepExamples, flow_StoreReference as StoreReference, flow_TransformerReference as TransformerReference, flow_Variables as Variables, flow_Web as Web };
1382
1450
  }
1383
1451
 
1384
1452
  type AnyFunction$1<P extends unknown[] = never[], R = unknown> = (...args: P) => R;
@@ -2406,6 +2474,8 @@ declare function getByPath(event: unknown, key?: string, defaultValue?: unknown)
2406
2474
  */
2407
2475
  declare function setByPath<T = unknown>(obj: T, key: string, value: unknown): T;
2408
2476
 
2477
+ declare function flattenIncludeSections(event: DeepPartialEvent, sections: string[]): Record<string, unknown>;
2478
+
2409
2479
  /**
2410
2480
  * Casts a value to a specific type.
2411
2481
  *
@@ -2492,14 +2562,37 @@ declare function getId(length?: number): string;
2492
2562
  interface MarketingParameters {
2493
2563
  [key: string]: string;
2494
2564
  }
2565
+ /**
2566
+ * Click-ID registry entry — maps a URL parameter name to a canonical platform.
2567
+ */
2568
+ declare const ClickIdEntrySchema: z.ZodObject<{
2569
+ param: z.ZodString;
2570
+ platform: z.ZodString;
2571
+ }, z.core.$strip>;
2572
+ type ClickIdEntry = z.infer<typeof ClickIdEntrySchema>;
2573
+ /**
2574
+ * Default click-ID registry.
2575
+ *
2576
+ * Ordered by priority: when a URL contains multiple click IDs, the entry
2577
+ * appearing earlier wins as the resolved `clickId` / `platform`. All matched
2578
+ * raw values are still preserved on the result.
2579
+ *
2580
+ * Extend via the third argument to {@link getMarketingParameters} or the
2581
+ * `clickIds` field in the session source settings.
2582
+ */
2583
+ declare const defaultClickIds: ClickIdEntry[];
2495
2584
  /**
2496
2585
  * Extracts marketing parameters from a URL.
2497
2586
  *
2498
- * @param url - The URL to extract the parameters from.
2499
- * @param custom - Custom marketing parameters to extract.
2500
- * @returns The extracted marketing parameters.
2587
+ * - UTM and custom params are mapped to friendly names (`utm_source` → `source`).
2588
+ * - Known click IDs are detected case-insensitively; each raw value is stored
2589
+ * under its canonical lowercase param name.
2590
+ * - `clickId` and `platform` reference the highest-priority match (first entry
2591
+ * in the registry present in the URL).
2592
+ * - Custom `clickIds` override default platforms by `param` in place and
2593
+ * append new params at the end of the priority list.
2501
2594
  */
2502
- declare function getMarketingParameters(url: URL, custom?: MarketingParameters): Properties;
2595
+ declare function getMarketingParameters(url: URL, custom?: MarketingParameters, clickIds?: ClickIdEntry[]): Properties;
2503
2596
 
2504
2597
  /**
2505
2598
  * Creates a debounced function that delays invoking `fn` until after `wait`
@@ -2667,6 +2760,7 @@ declare function processEventMapping<T extends DeepPartialEvent | Event>(event:
2667
2760
  mapping?: Rule;
2668
2761
  mappingKey?: string;
2669
2762
  ignore: boolean;
2763
+ skip: boolean;
2670
2764
  }>;
2671
2765
 
2672
2766
  /**
@@ -3167,4 +3261,4 @@ declare function checkCache(compiled: CompiledCache, store: Instance$1, context:
3167
3261
  declare function storeCache(store: Instance$1, key: string, value: unknown, ttlSeconds: number): void;
3168
3262
  declare function applyUpdate(value: unknown, update: Record<string, unknown> | undefined, context: Record<string, unknown>): Promise<unknown>;
3169
3263
 
3170
- export { cache as Cache, type CacheResult, collector as Collector, type CompiledCache, type CompiledNext, type CompiledRoute, Const, context as Context, destination as Destination, ENV_MARKER_PREFIX, elb as Elb, type ExampleSummary, flow as Flow, hint as Hint, hooks as Hooks, type Ingest, type IngestMeta, Level, lifecycle as Lifecycle, logger as Logger, mapping as Mapping, type MarketingParameters, matcher as Matcher, type MockLogger, on as On, request as Request, type ResolveOptions, type RespondFn, type RespondOptions, type SendDataValue, type SendHeaders, type SendResponse, simulation as Simulation, source as Source, type StorageType, store as Store, transformer as Transformer, trigger as Trigger, walkeros as WalkerOS, type WalkerOSPackage, type WalkerOSPackageInfo, type WalkerOSPackageMeta, anonymizeIP, applyUpdate, assign, branch, buildCacheContext, castToProperty, castValue, checkCache, clone, compileCache, compileMatcher, compileNext, createDestination, createEvent, createIngest, createLogger, createMockContext, createMockLogger, createRespond, debounce, deepMerge, fetchPackage, fetchPackageSchema, filterValues, getBrowser, getBrowserVersion, getByPath, getDeviceType, getEvent, getFlowSettings, getGrantedConsent, getHeaders, getId, getMappingEvent, getMappingValue, getMarketingParameters, getOS, getOSVersion, getPlatform, isArguments, isArray, isBoolean, isCommand, isDefined, isElementOrDocument, isFunction, isNumber, isObject, isPropertyType, isRouteArray, isSameType, isString, mcpError, mcpResult, mergeConfigSchema, mergeContractSchemas, mockEnv, packageNameToVariable, parseUserAgent, processEventMapping, requestToData, requestToParameter, resolveContracts, resolveNext, setByPath, storeCache, throttle, throwError, transformData, traverseEnv, trim, tryCatch, tryCatchAsync, useHooks, walkPath, wrapCondition, wrapFn, wrapValidate };
3264
+ export { cache as Cache, type CacheResult, type ClickIdEntry, ClickIdEntrySchema, collector as Collector, type CompiledCache, type CompiledNext, type CompiledRoute, Const, context as Context, destination as Destination, ENV_MARKER_PREFIX, elb as Elb, type ExampleSummary, flow as Flow, hint as Hint, hooks as Hooks, type Ingest, type IngestMeta, Level, lifecycle as Lifecycle, logger as Logger, mapping as Mapping, type MarketingParameters, matcher as Matcher, type MockLogger, on as On, request as Request, type ResolveOptions, type RespondFn, type RespondOptions, type SendDataValue, type SendHeaders, type SendResponse, simulation as Simulation, source as Source, type StorageType, store as Store, transformer as Transformer, trigger as Trigger, walkeros as WalkerOS, type WalkerOSPackage, type WalkerOSPackageInfo, type WalkerOSPackageMeta, anonymizeIP, applyUpdate, assign, branch, buildCacheContext, castToProperty, castValue, checkCache, clone, compileCache, compileMatcher, compileNext, createDestination, createEvent, createIngest, createLogger, createMockContext, createMockLogger, createRespond, debounce, deepMerge, defaultClickIds, fetchPackage, fetchPackageSchema, filterValues, flattenIncludeSections, getBrowser, getBrowserVersion, getByPath, getDeviceType, getEvent, getFlowSettings, getGrantedConsent, getHeaders, getId, getMappingEvent, getMappingValue, getMarketingParameters, getOS, getOSVersion, getPlatform, isArguments, isArray, isBoolean, isCommand, isDefined, isElementOrDocument, isFunction, isNumber, isObject, isPropertyType, isRouteArray, isSameType, isString, mcpError, mcpResult, mergeConfigSchema, mergeContractSchemas, mockEnv, packageNameToVariable, parseUserAgent, processEventMapping, requestToData, requestToParameter, resolveContracts, resolveNext, setByPath, storeCache, throttle, throwError, transformData, traverseEnv, trim, tryCatch, tryCatchAsync, useHooks, walkPath, wrapCondition, wrapFn, wrapValidate };