import { z } from 'zod'; export { z } from 'zod'; /** * Primitive Schema Definitions * * Reusable primitive schemas following DRY principle. * These are the building blocks used throughout all schemas to ensure consistency. * * Benefits: * - Single source of truth for common patterns * - Consistent descriptions across all schemas * - Easier maintenance and updates * - Better IntelliSense/autocomplete */ /** * Required string field * Used for required text fields throughout schemas */ declare const RequiredString: z.ZodString; /** * Required number field * Used for required numeric fields throughout schemas */ declare const RequiredNumber: z.ZodNumber; /** * Required boolean field * Used for required flag fields throughout schemas */ declare const RequiredBoolean: z.ZodBoolean; /** * Identifier - Required unique string identifier * Used for entity IDs, session IDs, etc. */ declare const Identifier: z.ZodString; /** * Timestamp - Unix timestamp in milliseconds * Used for event timestamps, session timestamps, etc. */ declare const Timestamp: z.ZodNumber; /** * Counter - Sequential counter (non-negative integer) * Used for event counts, session counts, etc. */ declare const Counter: z.ZodNumber; /** * PrimitiveValue - Basic primitive types * Union of string, number, and boolean * Used in Property definitions and value transformations */ declare const PrimitiveValue: z.ZodUnion; /** * OptionalPrimitiveValue - Optional primitive value */ declare const OptionalPrimitiveValue: z.ZodOptional>; /** * Common Schema Patterns * * Reusable schema patterns that appear across multiple domain schemas. * These patterns combine primitives into commonly used configurations. * * Benefits: * - DRY principle for complex patterns * - Consistent configuration interfaces * - Single source of truth for common configs * - Easier to maintain and update patterns globally */ /** * HandlersConfig - Error and log handler configuration * Used in: Destination.Config, Collector.Config, Source.Config */ declare const HandlersConfig: z.ZodObject<{ onError: z.ZodOptional>; onLog: z.ZodOptional>; }, z.core.$strip>; /** * VerboseConfig - Verbose logging configuration * Used in: Destination.Config, Collector.Config */ declare const VerboseConfig: z.ZodObject<{ verbose: z.ZodOptional>; }, z.core.$strip>; /** * QueueConfig - Event queueing configuration * Used in: Destination.Config */ declare const QueueConfig: z.ZodObject<{ queue: z.ZodOptional>; }, z.core.$strip>; /** * IdConfig - ID configuration pattern * Used in: Destination.Config, Source.Config */ declare const IdConfig: z.ZodObject<{}, z.core.$strip>; /** * InitConfig - Initialization configuration pattern * Used in: Destination.Config */ declare const InitConfig$1: z.ZodObject<{ init: z.ZodOptional>; loadScript: z.ZodOptional>; }, z.core.$strip>; /** * PrimaryConfig - Primary flag configuration * Used in: Source.Config, Source.InitSource */ declare const PrimaryConfig: z.ZodObject<{ primary: z.ZodOptional>; }, z.core.$strip>; /** * GenericSettingsConfig - Generic settings configuration * Used in: Destination.Config, Source.Config, Collector runtime * Settings are implementation-specific and can't be validated generically */ declare const GenericSettingsConfig: z.ZodObject<{ settings: z.ZodOptional>; }, z.core.$strip>; /** * GenericEnvConfig - Generic environment configuration * Used in: Destination.Config, Source.Config, Source.BaseEnv * Environment is platform-specific and can't be validated generically */ declare const GenericEnvConfig: z.ZodObject<{ env: z.ZodOptional>; }, z.core.$strip>; /** * DataTransformationConfig - Data transformation configuration * Used in: Destination.Config, Mapping.Config, Mapping.Rule * * Note: This creates a forward reference to ValueSchema/ValuesSchema * Import from mapping.ts to avoid circular dependencies */ declare function createDataTransformationConfig(ValueSchema: z.ZodTypeAny, ValuesSchema: z.ZodTypeAny): z.ZodObject<{ data: z.ZodOptional>, z.ZodType>]>>>; }, z.core.$strip>; /** * MappingRulesConfig - Mapping rules configuration * Used in: Destination.Config, Source.Config (via Mapping.Config) * * Note: This creates a forward reference to RulesSchema * Import from mapping.ts to avoid circular dependencies */ declare function createMappingRulesConfig(RulesSchema: z.ZodTypeAny): z.ZodObject<{ mapping: z.ZodOptional>>>; }, z.core.$strip>; /** * PolicyConfig - Policy rules configuration * Used in: Destination.Config, Mapping.Config, Mapping.Rule * * Note: This creates a forward reference to PolicySchema * Import from mapping.ts to avoid circular dependencies */ declare function createPolicyConfig(PolicySchema: z.ZodTypeAny): z.ZodObject<{ policy: z.ZodOptional>>>; }, z.core.$strip>; /** * ConsentConfig - Consent requirements configuration * Used in: Destination.Config, Mapping.Config, Mapping.Rule, Event * * Note: This creates a forward reference to ConsentSchema * Import from walkeros.ts to avoid circular dependencies */ declare function createConsentConfig(ConsentSchema: z.ZodTypeAny): z.ZodObject<{ consent: z.ZodOptional>>>; }, z.core.$strip>; /** * RuntimeInstanceConfig - Runtime instance configuration * Used in: Destination.Instance, Source.Instance, Collector.Instance * * Common fields for runtime instances: * - type: Instance type identifier * - config: Configuration object * - Functions (push, init, etc.) are instance-specific */ declare const RuntimeInstanceConfig: z.ZodObject<{ type: z.ZodOptional>; config: z.ZodOptional; }, z.core.$strip>; /** * BaseContextConfig - Base context configuration * Used in: Destination.Context, Source contexts * * Common fields for contexts: * - collector: Collector instance (runtime) * - config: Configuration * - env: Environment dependencies */ declare const BaseContextConfig: z.ZodObject<{ collector: z.ZodOptional; config: z.ZodOptional; env: z.ZodOptional; }, z.core.$strip>; /** * ProcessingControlConfig - Processing control flags * Used in: Mapping.Rule */ declare const ProcessingControlConfig: z.ZodObject<{ ignore: z.ZodOptional>; condition: z.ZodOptional>; }, z.core.$strip>; /** * SourcesMapConfig - Sources collection pattern * Used in: Collector.Instance */ declare const SourcesMapConfig: z.ZodObject<{ sources: z.ZodOptional>; }, z.core.$strip>; /** * DestinationsMapConfig - Destinations collection pattern * Used in: Collector.Instance */ declare const DestinationsMapConfig: z.ZodObject<{ destinations: z.ZodOptional>; }, z.core.$strip>; /** * Core walkerOS Event Model Schemas * * Mirrors: types/walkeros.ts * Purpose: Runtime validation and JSON Schema generation for MCP tools, Explorer UI, and API boundaries * * These schemas provide: * 1. Runtime validation for event data * 2. JSON Schema generation for RJSF/Explorer * 3. Type documentation via .describe() * 4. Compile-time type checking (schemas mirror TypeScript types) * * Note: TypeScript types in types/walkeros.ts remain the source of truth for development. * These Zod schemas are for validation and JSON Schema generation at runtime boundaries. */ /** * PropertyType - Base property value types * Can be primitive (boolean, string, number) or nested object with Property values */ declare const PropertyTypeSchema: z.ZodTypeAny; /** * Property - PropertyType or array of PropertyType * Recursive structure allows nested objects and arrays */ declare const PropertySchema: z.ZodTypeAny; /** * Properties - Record of string keys to Property values * Used throughout event structure (data, globals, custom, etc.) */ declare const PropertiesSchema: z.ZodRecord>>>; /** * OrderedProperties - Record with [value, order] tuples * Used for context data where order matters */ declare const OrderedPropertiesSchema: z.ZodRecord>, z.ZodNumber], null>>>; /** * SourceType - Event source identifier * Standard types: web, server, app, other * Extensible: allows custom string values */ declare const SourceTypeSchema: z.ZodUnion, z.ZodString]>; /** * Consent - Consent state mapping * Maps consent group names to boolean states * Used in Event and Destination/Source configs */ declare const ConsentSchema: z.ZodRecord; /** * User - User identification and attributes * Extends Properties with specific optional fields * Contains IDs, demographics, device info, and location data */ declare const UserSchema: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; /** * Source - Event source information (v4) * Identifies where the event originated. The `type` field is the source kind * (browser, dataLayer, gtag, ...). All other fields are optional since each * source kind augments this differently via `SourceMap`. */ declare const SourceSchema$1: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; /** * Entity - Nested entity structure * Allows events to contain related entities with their own data and context * Recursive: entities can contain nested entities */ declare const EntitySchema: z.ZodTypeAny; /** * Entities - Array of Entity objects */ declare const EntitiesSchema: z.ZodArray>>; /** * Event - Complete walkerOS event structure * * Core fields: * - name: Event identifier in "entity action" format (e.g., "page view") * - data: Event-specific properties * - context: Ordered context properties * - globals: Global properties shared across events * - custom: Custom properties specific to implementation * - user: User identification and attributes * - nested: Related entities * - consent: Consent states at event time * * System-generated fields: * - id: Unique event identifier * - timestamp: Event creation time (milliseconds since epoch) * - entity: Parsed entity name from event.name * - action: Parsed action name from event.name * - trigger: Event trigger identifier * - timing: Event processing timing information * - group: Event grouping identifier * - count: Event count in session * - version: Walker version information * - source: Event source information */ declare const EventSchema: z.ZodObject<{ name: z.ZodString; data: z.ZodRecord>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; /** * PartialEvent - Event with all fields optional * Used for event creation where not all fields are provided */ declare const PartialEventSchema: z.ZodObject<{ name: z.ZodOptional; data: z.ZodOptional>>>>; context: z.ZodOptional>, z.ZodNumber], null>>>>; globals: z.ZodOptional>>>>; custom: z.ZodOptional>>>>; user: z.ZodOptional>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>>; nested: z.ZodOptional>>>; consent: z.ZodOptional>; id: z.ZodOptional; trigger: z.ZodOptional; entity: z.ZodOptional; action: z.ZodOptional; timestamp: z.ZodOptional; timing: z.ZodOptional; source: z.ZodOptional>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; /** * DeepPartialEvent - Event with all fields optional * Used for event updates and patches * * Note: While the TypeScript type uses DeepPartial for compile-time validation, * the Zod schema uses .partial() which makes top-level fields optional. This is * sufficient for runtime validation as deeply nested partial objects are rarely * provided (users typically omit entire objects rather than providing partial nested data). * Zod 4 deliberately removed .deepPartial() due to internal type complexity issues. */ declare const DeepPartialEventSchema: z.ZodTypeAny; declare const eventJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const partialEventJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const userJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const propertiesJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const orderedPropertiesJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const entityJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const sourceTypeJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const consentJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const walkeros_ConsentSchema: typeof ConsentSchema; declare const walkeros_DeepPartialEventSchema: typeof DeepPartialEventSchema; declare const walkeros_EntitiesSchema: typeof EntitiesSchema; declare const walkeros_EntitySchema: typeof EntitySchema; declare const walkeros_EventSchema: typeof EventSchema; declare const walkeros_OrderedPropertiesSchema: typeof OrderedPropertiesSchema; declare const walkeros_PartialEventSchema: typeof PartialEventSchema; declare const walkeros_PropertiesSchema: typeof PropertiesSchema; declare const walkeros_PropertySchema: typeof PropertySchema; declare const walkeros_PropertyTypeSchema: typeof PropertyTypeSchema; declare const walkeros_SourceTypeSchema: typeof SourceTypeSchema; declare const walkeros_UserSchema: typeof UserSchema; declare const walkeros_consentJsonSchema: typeof consentJsonSchema; declare const walkeros_entityJsonSchema: typeof entityJsonSchema; declare const walkeros_eventJsonSchema: typeof eventJsonSchema; declare const walkeros_orderedPropertiesJsonSchema: typeof orderedPropertiesJsonSchema; declare const walkeros_partialEventJsonSchema: typeof partialEventJsonSchema; declare const walkeros_propertiesJsonSchema: typeof propertiesJsonSchema; declare const walkeros_sourceTypeJsonSchema: typeof sourceTypeJsonSchema; declare const walkeros_userJsonSchema: typeof userJsonSchema; declare namespace walkeros { export { walkeros_ConsentSchema as ConsentSchema, walkeros_DeepPartialEventSchema as DeepPartialEventSchema, walkeros_EntitiesSchema as EntitiesSchema, walkeros_EntitySchema as EntitySchema, walkeros_EventSchema as EventSchema, walkeros_OrderedPropertiesSchema as OrderedPropertiesSchema, walkeros_PartialEventSchema as PartialEventSchema, walkeros_PropertiesSchema as PropertiesSchema, walkeros_PropertySchema as PropertySchema, walkeros_PropertyTypeSchema as PropertyTypeSchema, SourceSchema$1 as SourceSchema, walkeros_SourceTypeSchema as SourceTypeSchema, walkeros_UserSchema as UserSchema, walkeros_consentJsonSchema as consentJsonSchema, walkeros_entityJsonSchema as entityJsonSchema, walkeros_eventJsonSchema as eventJsonSchema, walkeros_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, walkeros_partialEventJsonSchema as partialEventJsonSchema, walkeros_propertiesJsonSchema as propertiesJsonSchema, walkeros_sourceTypeJsonSchema as sourceTypeJsonSchema, walkeros_userJsonSchema as userJsonSchema }; } /** * Value - Core value type for mapping transformations * * Can be: * - Primitive: string, number, boolean * - ValueConfig: Complex transformation object * - Array: Multiple values/configs * * Recursive structure allows nested transformations */ declare const ValueSchema: z.ZodTypeAny; /** * Values - Array of Value objects * Used for multiple data transformations */ declare const ValuesSchema: z.ZodArray>>; /** * Loop - Tuple for array processing * Format: [source, transform] * * IMPORTANT: z.tuple() generates JSON Schema with minItems/maxItems = 2 * This is how Explorer distinguishes Loop from Set * * Example: ['nested', { map: { id: 'data.id' } }] * Means: Iterate over event.nested array, transform each item */ declare const LoopSchema: z.ZodTypeAny; /** * Set - Array of values for selection/combination * Format: [value1, value2, ...] * * IMPORTANT: z.array() generates JSON Schema without minItems/maxItems * This distinguishes Set from Loop * * Example: ['data.firstName', ' ', 'data.lastName'] * Means: Combine multiple values */ declare const SetSchema: z.ZodTypeAny; /** * Map - Object mapping for data transformation * Format: { outputKey: value, ... } * * Example: { item_id: 'data.id', item_name: 'data.name' } * Means: Transform event data to destination format */ declare const MapSchema: z.ZodTypeAny; declare const ValueConfigSchema: z.ZodType>; /** * Policy - Pre-processing rules * Applied before event mapping * Maps policy keys to transformation values * * Example: { 'consent.marketing': true } * Means: Only process events with marketing consent */ declare const PolicySchema: z.ZodRecord>>; declare const RulePatchSchema: z.ZodObject<{ name: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>; /** * Rule - Event-specific mapping configuration * * Defines how to transform events for a specific entity-action combination * Can include: * - Batching configuration * - Conditional processing * - Consent requirements * - Custom settings * - Data transformation * - Event naming * - Policy overrides */ declare const RuleSchema: z.ZodObject<{ name: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>; /** * Rules - Nested mapping rules structure * Format: { entity: { action: Rule | Rule[], ... }, ... } * * Supports: * - Specific entity-action mappings * - Wildcard patterns (entity: *, action: *) * - Multiple rules per entity-action (array) * * Example: * { * product: { * view: { name: 'view_item' }, * add: { name: 'add_to_cart' } * }, * page: { * '*': { name: 'page_interaction' } * } * } */ declare const RulesSchema: z.ZodRecord; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>; /** * Config - Shared mapping configuration * Used by both Source.Config and Destination.Config * * Provides: * - Consent requirements * - Global data transformations * - Entity-action mapping rules * - Pre-processing policies */ declare const ConfigSchema$6: z.ZodObject<{ consent: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; }, z.core.$strip>; /** * Result - Mapping resolution result * Contains the resolved mapping rule and key used */ declare const ResultSchema$1: z.ZodObject<{ eventMapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>; mappingKey: z.ZodOptional; }, z.core.$strip>; declare const valueJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const valueConfigJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const loopJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const setJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const mapJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const policyJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const ruleJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const rulesJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const configJsonSchema$6: z.core.ZodStandardJSONSchemaPayload>>; declare const mapping_LoopSchema: typeof LoopSchema; declare const mapping_MapSchema: typeof MapSchema; declare const mapping_PolicySchema: typeof PolicySchema; declare const mapping_RulePatchSchema: typeof RulePatchSchema; declare const mapping_RuleSchema: typeof RuleSchema; declare const mapping_RulesSchema: typeof RulesSchema; declare const mapping_SetSchema: typeof SetSchema; declare const mapping_ValueConfigSchema: typeof ValueConfigSchema; declare const mapping_ValueSchema: typeof ValueSchema; declare const mapping_ValuesSchema: typeof ValuesSchema; declare const mapping_loopJsonSchema: typeof loopJsonSchema; declare const mapping_mapJsonSchema: typeof mapJsonSchema; declare const mapping_policyJsonSchema: typeof policyJsonSchema; declare const mapping_ruleJsonSchema: typeof ruleJsonSchema; declare const mapping_rulesJsonSchema: typeof rulesJsonSchema; declare const mapping_setJsonSchema: typeof setJsonSchema; declare const mapping_valueConfigJsonSchema: typeof valueConfigJsonSchema; declare const mapping_valueJsonSchema: typeof valueJsonSchema; declare namespace mapping { export { ConfigSchema$6 as ConfigSchema, mapping_LoopSchema as LoopSchema, mapping_MapSchema as MapSchema, mapping_PolicySchema as PolicySchema, ResultSchema$1 as ResultSchema, mapping_RulePatchSchema as RulePatchSchema, mapping_RuleSchema as RuleSchema, mapping_RulesSchema as RulesSchema, mapping_SetSchema as SetSchema, mapping_ValueConfigSchema as ValueConfigSchema, mapping_ValueSchema as ValueSchema, mapping_ValuesSchema as ValuesSchema, configJsonSchema$6 as configJsonSchema, mapping_loopJsonSchema as loopJsonSchema, mapping_mapJsonSchema as mapJsonSchema, mapping_policyJsonSchema as policyJsonSchema, mapping_ruleJsonSchema as ruleJsonSchema, mapping_rulesJsonSchema as rulesJsonSchema, mapping_setJsonSchema as setJsonSchema, mapping_valueConfigJsonSchema as valueConfigJsonSchema, mapping_valueJsonSchema as valueJsonSchema }; } /** * Destination Schemas * * Mirrors: types/destination.ts * Purpose: Runtime validation and JSON Schema generation for destination configurations * * Destinations are the endpoints where processed events are sent (analytics tools, * marketing platforms, data warehouses, etc.). This file defines schemas for: * - Destination configuration * - Type bundles for generic constraints * - Push contexts * - Batching structures */ /** * Config - Destination configuration * * Defines how a destination processes events: * - Consent requirements * - Settings (destination-specific) * - Data transformations * - Environment dependencies * - Initialization options * - Mapping rules * - Processing policies * - Queueing behavior * - Logging verbosity * - Error/log handlers * * Generic note: settings, env, and mapping can have destination-specific types * but for schema validation we use z.unknown() to allow flexibility */ declare const ConfigSchema$5: z.ZodObject<{ consent: z.ZodOptional>; settings: z.ZodOptional; credentials: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; env: z.ZodOptional; id: z.ZodOptional; init: z.ZodOptional; loadScript: z.ZodOptional; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; queue: z.ZodOptional; require: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; setup: z.ZodOptional]>>; before: z.ZodOptional>>; next: z.ZodOptional>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; disabled: z.ZodOptional; mock: z.ZodOptional; queueMax: z.ZodOptional; dlqMax: z.ZodOptional; timeout: z.ZodOptional; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; breaker: z.ZodOptional; cooldown: z.ZodOptional; }, z.core.$strip>]>>; }, z.core.$strip>; /** * PartialConfig - Config with all fields optional * Used for config updates and overrides * * Note: All fields in ConfigSchema are already optional (.optional() on each field). * Using .partial() ensures the schema itself makes all fields optional at the type level. */ declare const PartialConfigSchema$3: z.ZodObject<{ consent: z.ZodOptional>>; settings: z.ZodOptional>; credentials: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; include: z.ZodOptional>>; env: z.ZodOptional>; id: z.ZodOptional>; init: z.ZodOptional>; loadScript: z.ZodOptional>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>>; policy: z.ZodOptional>>>>; queue: z.ZodOptional>; require: z.ZodOptional>>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>>; setup: z.ZodOptional]>>>; before: z.ZodOptional>>>; next: z.ZodOptional>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>>; disabled: z.ZodOptional>; mock: z.ZodOptional>; queueMax: z.ZodOptional>; dlqMax: z.ZodOptional>; timeout: z.ZodOptional>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; breaker: z.ZodOptional; cooldown: z.ZodOptional; }, z.core.$strip>]>>>; }, z.core.$strip>; /** * Policy - Processing policy rules * Maps policy keys to transformation values * Applied before event mapping */ declare const DestinationPolicySchema: z.ZodRecord>>; /** * Context - Base destination context * Passed to init and push functions * Contains collector instance, config, data, and environment * * Note: collector is runtime instance, not easily serializable */ declare const ContextSchema: z.ZodObject<{ collector: z.ZodUnknown; config: z.ZodObject<{ consent: z.ZodOptional>; settings: z.ZodOptional; credentials: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; env: z.ZodOptional; id: z.ZodOptional; init: z.ZodOptional; loadScript: z.ZodOptional; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; queue: z.ZodOptional; require: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; setup: z.ZodOptional]>>; before: z.ZodOptional>>; next: z.ZodOptional>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; disabled: z.ZodOptional; mock: z.ZodOptional; queueMax: z.ZodOptional; dlqMax: z.ZodOptional; timeout: z.ZodOptional; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; breaker: z.ZodOptional; cooldown: z.ZodOptional; }, z.core.$strip>]>>; }, z.core.$strip>; data: z.ZodOptional]>>; env: z.ZodUnknown; }, z.core.$strip>; /** * PushContext - Context for push function * Extends Context with mapping rule information */ declare const PushContextSchema$1: z.ZodObject<{ collector: z.ZodUnknown; config: z.ZodObject<{ consent: z.ZodOptional>; settings: z.ZodOptional; credentials: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; env: z.ZodOptional; id: z.ZodOptional; init: z.ZodOptional; loadScript: z.ZodOptional; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; queue: z.ZodOptional; require: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; setup: z.ZodOptional]>>; before: z.ZodOptional>>; next: z.ZodOptional>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; disabled: z.ZodOptional; mock: z.ZodOptional; queueMax: z.ZodOptional; dlqMax: z.ZodOptional; timeout: z.ZodOptional; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; breaker: z.ZodOptional; cooldown: z.ZodOptional; }, z.core.$strip>]>>; }, z.core.$strip>; data: z.ZodOptional]>>; env: z.ZodUnknown; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; /** * PushBatchContext - Context for pushBatch function * Same as PushContext but for batch processing */ declare const PushBatchContextSchema: z.ZodObject<{ collector: z.ZodUnknown; config: z.ZodObject<{ consent: z.ZodOptional>; settings: z.ZodOptional; credentials: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; env: z.ZodOptional; id: z.ZodOptional; init: z.ZodOptional; loadScript: z.ZodOptional; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; queue: z.ZodOptional; require: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; setup: z.ZodOptional]>>; before: z.ZodOptional>>; next: z.ZodOptional>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; disabled: z.ZodOptional; mock: z.ZodOptional; queueMax: z.ZodOptional; dlqMax: z.ZodOptional; timeout: z.ZodOptional; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; breaker: z.ZodOptional; cooldown: z.ZodOptional; }, z.core.$strip>]>>; }, z.core.$strip>; data: z.ZodOptional]>>; env: z.ZodUnknown; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; /** * PushEvent - Single event with mapping in a batch */ declare const PushEventSchema: z.ZodObject<{ event: z.ZodObject<{ name: z.ZodString; data: z.ZodRecord>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; /** * PushEvents - Array of PushEvent */ declare const PushEventsSchema: z.ZodArray>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>>; /** * Batch - Batched events for processing * Groups events by mapping key for efficient batch sends */ declare const BatchSchema: z.ZodObject<{ key: z.ZodString; events: z.ZodArray>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; data: z.ZodArray]>>>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; /** * Data - Transformed event data types * Can be single property, undefined, or array of properties */ declare const DataSchema: z.ZodOptional]>>; /** * Instance - Destination instance (runtime object) * * Note: This schema is primarily for documentation * Runtime functions (init, push, pushBatch) cannot be validated * Use z.unknown() for function fields */ declare const InstanceSchema$2: z.ZodObject<{ config: z.ZodObject<{ consent: z.ZodOptional>; settings: z.ZodOptional; credentials: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; env: z.ZodOptional; id: z.ZodOptional; init: z.ZodOptional; loadScript: z.ZodOptional; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; queue: z.ZodOptional; require: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; setup: z.ZodOptional]>>; before: z.ZodOptional>>; next: z.ZodOptional>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; disabled: z.ZodOptional; mock: z.ZodOptional; queueMax: z.ZodOptional; dlqMax: z.ZodOptional; timeout: z.ZodOptional; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; breaker: z.ZodOptional; cooldown: z.ZodOptional; }, z.core.$strip>]>>; }, z.core.$strip>; queue: z.ZodOptional>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>>; dlq: z.ZodOptional>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>, z.ZodUnknown], null>>>; type: z.ZodOptional; env: z.ZodOptional; init: z.ZodOptional; push: z.ZodUnknown; pushBatch: z.ZodOptional; on: z.ZodOptional; }, z.core.$strip>; /** * Init - Initialization config * Contains destination code and configuration */ declare const InitSchema$1: z.ZodObject<{ code: z.ZodObject<{ config: z.ZodObject<{ consent: z.ZodOptional>; settings: z.ZodOptional; credentials: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; env: z.ZodOptional; id: z.ZodOptional; init: z.ZodOptional; loadScript: z.ZodOptional; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; queue: z.ZodOptional; require: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; setup: z.ZodOptional]>>; before: z.ZodOptional>>; next: z.ZodOptional>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; disabled: z.ZodOptional; mock: z.ZodOptional; queueMax: z.ZodOptional; dlqMax: z.ZodOptional; timeout: z.ZodOptional; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; breaker: z.ZodOptional; cooldown: z.ZodOptional; }, z.core.$strip>]>>; }, z.core.$strip>; queue: z.ZodOptional>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>>; dlq: z.ZodOptional>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>, z.ZodUnknown], null>>>; type: z.ZodOptional; env: z.ZodOptional; init: z.ZodOptional; push: z.ZodUnknown; pushBatch: z.ZodOptional; on: z.ZodOptional; }, z.core.$strip>; config: z.ZodOptional>>; settings: z.ZodOptional>; credentials: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; include: z.ZodOptional>>; env: z.ZodOptional>; id: z.ZodOptional>; init: z.ZodOptional>; loadScript: z.ZodOptional>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>>; policy: z.ZodOptional>>>>; queue: z.ZodOptional>; require: z.ZodOptional>>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>>; setup: z.ZodOptional]>>>; before: z.ZodOptional>>>; next: z.ZodOptional>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>>; disabled: z.ZodOptional>; mock: z.ZodOptional>; queueMax: z.ZodOptional>; dlqMax: z.ZodOptional>; timeout: z.ZodOptional>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; breaker: z.ZodOptional; cooldown: z.ZodOptional; }, z.core.$strip>]>>>; }, z.core.$strip>>; env: z.ZodOptional; }, z.core.$strip>; /** * InitDestinations - Map of destination IDs to Init configs */ declare const InitDestinationsSchema: z.ZodRecord>; settings: z.ZodOptional; credentials: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; env: z.ZodOptional; id: z.ZodOptional; init: z.ZodOptional; loadScript: z.ZodOptional; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; queue: z.ZodOptional; require: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; setup: z.ZodOptional]>>; before: z.ZodOptional>>; next: z.ZodOptional>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; disabled: z.ZodOptional; mock: z.ZodOptional; queueMax: z.ZodOptional; dlqMax: z.ZodOptional; timeout: z.ZodOptional; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; breaker: z.ZodOptional; cooldown: z.ZodOptional; }, z.core.$strip>]>>; }, z.core.$strip>; queue: z.ZodOptional>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>>; dlq: z.ZodOptional>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>, z.ZodUnknown], null>>>; type: z.ZodOptional; env: z.ZodOptional; init: z.ZodOptional; push: z.ZodUnknown; pushBatch: z.ZodOptional; on: z.ZodOptional; }, z.core.$strip>; config: z.ZodOptional>>; settings: z.ZodOptional>; credentials: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; include: z.ZodOptional>>; env: z.ZodOptional>; id: z.ZodOptional>; init: z.ZodOptional>; loadScript: z.ZodOptional>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>>; policy: z.ZodOptional>>>>; queue: z.ZodOptional>; require: z.ZodOptional>>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>>; setup: z.ZodOptional]>>>; before: z.ZodOptional>>>; next: z.ZodOptional>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>>; disabled: z.ZodOptional>; mock: z.ZodOptional>; queueMax: z.ZodOptional>; dlqMax: z.ZodOptional>; timeout: z.ZodOptional>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; breaker: z.ZodOptional; cooldown: z.ZodOptional; }, z.core.$strip>]>>>; }, z.core.$strip>>; env: z.ZodOptional; }, z.core.$strip>>; /** * Destinations - Map of destination IDs to instances */ declare const DestinationsSchema$1: z.ZodRecord>; settings: z.ZodOptional; credentials: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; env: z.ZodOptional; id: z.ZodOptional; init: z.ZodOptional; loadScript: z.ZodOptional; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; queue: z.ZodOptional; require: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; setup: z.ZodOptional]>>; before: z.ZodOptional>>; next: z.ZodOptional>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; disabled: z.ZodOptional; mock: z.ZodOptional; queueMax: z.ZodOptional; dlqMax: z.ZodOptional; timeout: z.ZodOptional; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; breaker: z.ZodOptional; cooldown: z.ZodOptional; }, z.core.$strip>]>>; }, z.core.$strip>; queue: z.ZodOptional>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>>; dlq: z.ZodOptional>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>, z.ZodUnknown], null>>>; type: z.ZodOptional; env: z.ZodOptional; init: z.ZodOptional; push: z.ZodUnknown; pushBatch: z.ZodOptional; on: z.ZodOptional; }, z.core.$strip>>; /** * Ref - Destination reference * Contains destination type and optional response data or error */ declare const RefSchema: z.ZodObject<{ type: z.ZodString; data: z.ZodOptional; error: z.ZodOptional; }, z.core.$strip>; /** * Push - Push operation result */ declare const PushResultSchema: z.ZodObject<{ queue: z.ZodOptional>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>>; error: z.ZodOptional; }, z.core.$strip>; /** * Result - Overall processing result * Note: This type has been removed from types/destination.ts * Results are now part of Elb.PushResult with Record structure */ declare const ResultSchema: z.ZodObject<{ ok: z.ZodBoolean; event: z.ZodOptional; done: z.ZodOptional; error: z.ZodOptional; }, z.core.$strip>>>; queued: z.ZodOptional; error: z.ZodOptional; }, z.core.$strip>>>; failed: z.ZodOptional; error: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; /** * DLQ - Dead Letter Queue * Array of failed events with their errors */ declare const DLQSchema: z.ZodArray>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>, z.ZodUnknown], null>>; declare const configJsonSchema$5: z.core.ZodStandardJSONSchemaPayload>>; declare const partialConfigJsonSchema$3: z.core.ZodStandardJSONSchemaPayload>>; declare const contextJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const pushContextJsonSchema$1: z.core.ZodStandardJSONSchemaPayload>>; declare const batchJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const instanceJsonSchema$2: z.core.ZodStandardJSONSchemaPayload>>; declare const resultJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const destination_BatchSchema: typeof BatchSchema; declare const destination_ContextSchema: typeof ContextSchema; declare const destination_DLQSchema: typeof DLQSchema; declare const destination_DataSchema: typeof DataSchema; declare const destination_DestinationPolicySchema: typeof DestinationPolicySchema; declare const destination_InitDestinationsSchema: typeof InitDestinationsSchema; declare const destination_PushBatchContextSchema: typeof PushBatchContextSchema; declare const destination_PushEventSchema: typeof PushEventSchema; declare const destination_PushEventsSchema: typeof PushEventsSchema; declare const destination_PushResultSchema: typeof PushResultSchema; declare const destination_RefSchema: typeof RefSchema; declare const destination_ResultSchema: typeof ResultSchema; declare const destination_batchJsonSchema: typeof batchJsonSchema; declare const destination_contextJsonSchema: typeof contextJsonSchema; declare const destination_resultJsonSchema: typeof resultJsonSchema; declare namespace destination { export { destination_BatchSchema as BatchSchema, ConfigSchema$5 as ConfigSchema, destination_ContextSchema as ContextSchema, destination_DLQSchema as DLQSchema, destination_DataSchema as DataSchema, destination_DestinationPolicySchema as DestinationPolicySchema, DestinationsSchema$1 as DestinationsSchema, destination_InitDestinationsSchema as InitDestinationsSchema, InitSchema$1 as InitSchema, InstanceSchema$2 as InstanceSchema, PartialConfigSchema$3 as PartialConfigSchema, destination_PushBatchContextSchema as PushBatchContextSchema, PushContextSchema$1 as PushContextSchema, destination_PushEventSchema as PushEventSchema, destination_PushEventsSchema as PushEventsSchema, destination_PushResultSchema as PushResultSchema, destination_RefSchema as RefSchema, destination_ResultSchema as ResultSchema, destination_batchJsonSchema as batchJsonSchema, configJsonSchema$5 as configJsonSchema, destination_contextJsonSchema as contextJsonSchema, instanceJsonSchema$2 as instanceJsonSchema, partialConfigJsonSchema$3 as partialConfigJsonSchema, pushContextJsonSchema$1 as pushContextJsonSchema, destination_resultJsonSchema as resultJsonSchema }; } /** * Collector Schemas * * Mirrors: types/collector.ts * Purpose: Runtime validation and JSON Schema generation for collector configurations * * The collector is the central event processing engine in walkerOS: * - Receives events from sources * - Processes events with consent and context * - Routes events to destinations * - Manages session state and globals * - Handles lifecycle hooks * * This file defines schemas for collector configuration, commands, and state management. */ /** * CommandType - Walker command identifiers * * Standard commands: * - action: TODO - need documentation * - config: Update collector configuration * - consent: Update consent state * - context: TODO - need documentation * - destination: Add/update destination * - elb: TODO - need documentation * - globals: Update global properties * - hook: Register lifecycle hook * - init: Initialize collector * - link: TODO - need documentation * - run: Start/restart collector with state * - user: Update user data * - walker: TODO - need documentation * * Extensible: allows custom command strings */ declare const CommandTypeSchema: z.ZodUnion, z.ZodString]>; /** * Config - Core collector configuration * * Controls collector behavior: * - run: Auto-run on initialization * - globalsStatic: Static globals (persist across runs) * - sessionStatic: Static session data (persist across runs) * - verbose: Enable verbose logging * - onError: Error handler * - onLog: Log handler */ declare const ConfigSchema$4: z.ZodObject<{ run: z.ZodOptional; globalsStatic: z.ZodRecord>>>; sessionStatic: z.ZodRecord; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; queueMax: z.ZodOptional; }, z.core.$strip>; /** * SessionData - Session state management * * Tracks session-level information: * - IDs and lifecycle * - Storage state * - Marketing tracking * - Timestamps * - Counters * * Extends Properties to allow custom session data */ declare const SessionDataSchema: z.ZodIntersection>>>, z.ZodObject<{ isStart: z.ZodBoolean; storage: z.ZodBoolean; id: z.ZodOptional; start: z.ZodOptional; marketing: z.ZodOptional>; updated: z.ZodOptional; isNew: z.ZodOptional; device: z.ZodOptional; count: z.ZodOptional; runs: z.ZodOptional; }, z.core.$strip>>; /** * InitConfig - Initialization configuration * * Extends Config with initial state: * - Initial consent * - Initial user data * - Initial globals * - Source configurations * - Destination configurations * - Initial custom properties */ declare const InitConfigSchema: z.ZodObject<{ run: z.ZodOptional>; globalsStatic: z.ZodOptional>>>>; sessionStatic: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>>; queueMax: z.ZodOptional>; consent: z.ZodOptional>; user: z.ZodOptional>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>>; globals: z.ZodOptional>>>>; sources: z.ZodOptional; destinations: z.ZodOptional; transformers: z.ZodOptional; stores: z.ZodOptional; custom: z.ZodOptional>>>>; hooks: z.ZodOptional; }, z.core.$strip>; /** * PushContext - Context for collector.push * * Provides source-level mapping configuration * Applied before destination-specific mappings */ declare const PushContextSchema: z.ZodObject<{ mapping: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>; /** * Sources - Map of source IDs to instances */ declare const SourcesSchema: z.ZodRecord; /** * Destinations - Map of destination IDs to instances */ declare const DestinationsSchema: z.ZodRecord; /** * Instance - Collector instance (runtime object) * * The main collector interface with all state and methods * * State: * - config: Current configuration * - consent: Current consent state * - user: Current user data * - globals: Current global properties * - custom: Custom properties * - session: Session state * - sources: Registered sources * - destinations: Registered destinations * - hooks: Lifecycle hooks * - on: Event lifecycle config * - queue: Queued events * * Flags: * - allowed: Processing allowed * - count: Event count * - round: Collector run count * - timing: Processing timing * - group: Event grouping ID * * Methods (not validated): * - push: Process events * - command: Execute commands */ declare const InstanceSchema$1: z.ZodObject<{ push: z.ZodUnknown; command: z.ZodUnknown; allowed: z.ZodBoolean; config: z.ZodObject<{ run: z.ZodOptional; globalsStatic: z.ZodRecord>>>; sessionStatic: z.ZodRecord; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; queueMax: z.ZodOptional; }, z.core.$strip>; consent: z.ZodRecord; custom: z.ZodRecord>>>; sources: z.ZodRecord; destinations: z.ZodRecord; globals: z.ZodRecord>>>; hooks: z.ZodUnknown; on: z.ZodUnknown; queue: z.ZodArray>>>; context: z.ZodRecord>, z.ZodNumber], null>>>; globals: z.ZodRecord>>>; custom: z.ZodRecord>>>; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; nested: z.ZodArray>>; consent: z.ZodRecord; id: z.ZodString; trigger: z.ZodString; entity: z.ZodString; action: z.ZodString; timestamp: z.ZodNumber; timing: z.ZodNumber; source: z.ZodIntersection>>>, z.ZodObject<{ type: z.ZodString; platform: z.ZodOptional; version: z.ZodOptional; schema: z.ZodOptional; count: z.ZodOptional; trace: z.ZodOptional; url: z.ZodOptional; referrer: z.ZodOptional; tool: z.ZodOptional; command: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; round: z.ZodNumber; session: z.ZodUnion>>>, z.ZodObject<{ isStart: z.ZodBoolean; storage: z.ZodBoolean; id: z.ZodOptional; start: z.ZodOptional; marketing: z.ZodOptional>; updated: z.ZodOptional; isNew: z.ZodOptional; device: z.ZodOptional; count: z.ZodOptional; runs: z.ZodOptional; }, z.core.$strip>>]>; timing: z.ZodNumber; user: z.ZodIntersection>>>, z.ZodObject<{ id: z.ZodOptional; device: z.ZodOptional; session: z.ZodOptional; hash: z.ZodOptional; address: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; userAgent: z.ZodOptional; browser: z.ZodOptional; browserVersion: z.ZodOptional; deviceType: z.ZodOptional; os: z.ZodOptional; osVersion: z.ZodOptional; screenSize: z.ZodOptional; language: z.ZodOptional; country: z.ZodOptional; region: z.ZodOptional; city: z.ZodOptional; zip: z.ZodOptional; timezone: z.ZodOptional; ip: z.ZodOptional; internal: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; declare const commandTypeJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const configJsonSchema$4: z.core.ZodStandardJSONSchemaPayload>>; declare const sessionDataJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const initConfigJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const pushContextJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const instanceJsonSchema$1: z.core.ZodStandardJSONSchemaPayload>>; declare const collector_CommandTypeSchema: typeof CommandTypeSchema; declare const collector_DestinationsSchema: typeof DestinationsSchema; declare const collector_InitConfigSchema: typeof InitConfigSchema; declare const collector_PushContextSchema: typeof PushContextSchema; declare const collector_SessionDataSchema: typeof SessionDataSchema; declare const collector_SourcesSchema: typeof SourcesSchema; declare const collector_commandTypeJsonSchema: typeof commandTypeJsonSchema; declare const collector_initConfigJsonSchema: typeof initConfigJsonSchema; declare const collector_pushContextJsonSchema: typeof pushContextJsonSchema; declare const collector_sessionDataJsonSchema: typeof sessionDataJsonSchema; declare namespace collector { export { collector_CommandTypeSchema as CommandTypeSchema, ConfigSchema$4 as ConfigSchema, collector_DestinationsSchema as DestinationsSchema, collector_InitConfigSchema as InitConfigSchema, InstanceSchema$1 as InstanceSchema, collector_PushContextSchema as PushContextSchema, collector_SessionDataSchema as SessionDataSchema, collector_SourcesSchema as SourcesSchema, collector_commandTypeJsonSchema as commandTypeJsonSchema, configJsonSchema$4 as configJsonSchema, collector_initConfigJsonSchema as initConfigJsonSchema, instanceJsonSchema$1 as instanceJsonSchema, collector_pushContextJsonSchema as pushContextJsonSchema, collector_sessionDataJsonSchema as sessionDataJsonSchema }; } /** * Source Schemas * * Mirrors: types/source.ts * Purpose: Runtime validation and JSON Schema generation for source configurations * * Sources are the entry points where events enter walkerOS: * - Browser sources (DOM events, dataLayer) * - Server sources (HTTP handlers, cloud functions) * - App sources (mobile, desktop) * * Sources are platform-agnostic through dependency injection via BaseEnv. * All platform-specific dependencies (DOM, HTTP, etc.) are provided through * the env object, making sources testable and portable. * * Key concept: Source.push IS the handler - no wrappers needed * Example: http('handler', source.push) for direct deployment */ /** * BaseEnv - Base environment interface for dependency injection * * Sources receive all dependencies through this environment object: * - push: Collector push function * - command: Collector command function * - sources: Other registered sources * - elb: Public API function (alias for collector.push) * * Platform-specific sources extend this with their requirements * (e.g., window, document, fetch, req, res) * * This makes sources: * - Platform-agnostic (no direct dependencies) * - Testable (mock env for tests) * - Composable (share env between sources) */ declare const BaseEnvSchema: z.ZodObject<{ push: z.ZodUnknown; command: z.ZodUnknown; sources: z.ZodOptional; elb: z.ZodUnknown; }, z.core.$catchall>; /** * Config - Source configuration * * Extends Mapping.Config with source-specific options: * - consent: Required consent to process events * - data: Global data transformations * - mapping: Entity-action mapping rules * - policy: Pre-processing policies * - settings: Source-specific settings * - env: Environment dependencies * - id: Source identifier * - onError: Error handler * - primary: Primary source flag (only one can be primary) * * Generic note: settings, env, and mapping can have source-specific types */ declare const ConfigSchema$3: z.ZodObject<{ consent: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; settings: z.ZodOptional; credentials: z.ZodOptional; env: z.ZodOptional; elb: z.ZodUnknown; }, z.core.$catchall>>; id: z.ZodOptional; primary: z.ZodOptional; require: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; async: z.ZodOptional; setup: z.ZodOptional]>>; ingest: z.ZodOptional>, z.ZodArray>>]>>; disabled: z.ZodOptional; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; init: z.ZodOptional; }, z.core.$strip>; /** * PartialConfig - Config with all fields optional * Used for config updates and overrides * * Note: ConfigSchema extends MappingConfigSchema with mostly optional fields. * Using .partial() ensures all fields are optional for config updates. */ declare const PartialConfigSchema$2: z.ZodObject<{ consent: z.ZodOptional>>; data: z.ZodOptional>, z.ZodArray>>]>>>; include: z.ZodOptional>>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>>; policy: z.ZodOptional>>>>; settings: z.ZodOptional>; credentials: z.ZodOptional>; env: z.ZodOptional; elb: z.ZodUnknown; }, z.core.$catchall>>>; id: z.ZodOptional>; primary: z.ZodOptional>; require: z.ZodOptional>>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>>; async: z.ZodOptional>; setup: z.ZodOptional]>>>; ingest: z.ZodOptional>, z.ZodArray>>]>>>; disabled: z.ZodOptional>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>>; init: z.ZodOptional>; }, z.core.$strip>; /** * Instance - Source instance (runtime object) * * Contains: * - type: Source type identifier * - config: Current configuration * - push: Push function (THE HANDLER) * - destroy: Cleanup function * - on: Lifecycle hook function * * Key concept: push IS the handler * The push function signature is flexible to support different platforms: * - Browser: push(event, data) => Promise * - HTTP: push(req, res) => Promise * - Cloud: push(event, context) => Promise * * This flexibility allows direct deployment without wrappers: * - http.createServer(source.push) * - functions.https.onRequest(source.push) * - addEventListener('click', source.push) */ declare const InstanceSchema: z.ZodObject<{ type: z.ZodString; config: z.ZodObject<{ consent: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; settings: z.ZodOptional; credentials: z.ZodOptional; env: z.ZodOptional; elb: z.ZodUnknown; }, z.core.$catchall>>; id: z.ZodOptional; primary: z.ZodOptional; require: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; async: z.ZodOptional; setup: z.ZodOptional]>>; ingest: z.ZodOptional>, z.ZodArray>>]>>; disabled: z.ZodOptional; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; init: z.ZodOptional; }, z.core.$strip>; push: z.ZodAny; destroy: z.ZodOptional; on: z.ZodOptional; }, z.core.$strip>; /** * Init - Source initialization function * * Factory function that creates a source instance: * (config, env) => Instance | Promise * * Receives: * - config: Partial configuration * - env: Environment dependencies * * Returns: * - Source instance with push function * * The init function sets up the source (e.g., attach DOM listeners, * start HTTP server, subscribe to events) and returns the instance. */ declare const InitSchema: z.ZodAny; /** * InitSource - Initialization configuration * * Contains: * - code: Init function * - config: Partial config overrides * - env: Partial env overrides * - primary: Primary source flag */ declare const InitSourceSchema: z.ZodObject<{ code: z.ZodAny; config: z.ZodOptional>>; data: z.ZodOptional>, z.ZodArray>>]>>>; include: z.ZodOptional>>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>>; policy: z.ZodOptional>>>>; settings: z.ZodOptional>; credentials: z.ZodOptional>; env: z.ZodOptional; elb: z.ZodUnknown; }, z.core.$catchall>>>; id: z.ZodOptional>; primary: z.ZodOptional>; require: z.ZodOptional>>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>>; async: z.ZodOptional>; setup: z.ZodOptional]>>>; ingest: z.ZodOptional>, z.ZodArray>>]>>>; disabled: z.ZodOptional>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>>; init: z.ZodOptional>; }, z.core.$strip>>; env: z.ZodOptional; command: z.ZodOptional; sources: z.ZodOptional>; elb: z.ZodOptional; }, z.core.$catchall>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; primary: z.ZodOptional; }, z.core.$strip>; /** * InitSources - Map of source IDs to init configs */ declare const InitSourcesSchema: z.ZodRecord>>; data: z.ZodOptional>, z.ZodArray>>]>>>; include: z.ZodOptional>>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>>; policy: z.ZodOptional>>>>; settings: z.ZodOptional>; credentials: z.ZodOptional>; env: z.ZodOptional; elb: z.ZodUnknown; }, z.core.$catchall>>>; id: z.ZodOptional>; primary: z.ZodOptional>; require: z.ZodOptional>>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>>; async: z.ZodOptional>; setup: z.ZodOptional]>>>; ingest: z.ZodOptional>, z.ZodArray>>]>>>; disabled: z.ZodOptional>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>>; init: z.ZodOptional>; }, z.core.$strip>>; env: z.ZodOptional; command: z.ZodOptional; sources: z.ZodOptional>; elb: z.ZodOptional; }, z.core.$catchall>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; primary: z.ZodOptional; }, z.core.$strip>>; declare const baseEnvJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const configJsonSchema$3: z.core.ZodStandardJSONSchemaPayload>>; declare const partialConfigJsonSchema$2: z.core.ZodStandardJSONSchemaPayload>>; declare const instanceJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const initSourceJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const initSourcesJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const source_BaseEnvSchema: typeof BaseEnvSchema; declare const source_InitSchema: typeof InitSchema; declare const source_InitSourceSchema: typeof InitSourceSchema; declare const source_InitSourcesSchema: typeof InitSourcesSchema; declare const source_InstanceSchema: typeof InstanceSchema; declare const source_baseEnvJsonSchema: typeof baseEnvJsonSchema; declare const source_initSourceJsonSchema: typeof initSourceJsonSchema; declare const source_initSourcesJsonSchema: typeof initSourcesJsonSchema; declare const source_instanceJsonSchema: typeof instanceJsonSchema; declare namespace source { export { source_BaseEnvSchema as BaseEnvSchema, ConfigSchema$3 as ConfigSchema, source_InitSchema as InitSchema, source_InitSourceSchema as InitSourceSchema, source_InitSourcesSchema as InitSourcesSchema, source_InstanceSchema as InstanceSchema, PartialConfigSchema$2 as PartialConfigSchema, source_baseEnvJsonSchema as baseEnvJsonSchema, configJsonSchema$3 as configJsonSchema, source_initSourceJsonSchema as initSourceJsonSchema, source_initSourcesJsonSchema as initSourcesJsonSchema, source_instanceJsonSchema as instanceJsonSchema, partialConfigJsonSchema$2 as partialConfigJsonSchema }; } /** * Transformer Schemas * * Mirrors: types/transformer.ts * Purpose: Runtime validation and JSON Schema generation for transformer configurations * * Transformers run between source and collector (pre-chain via `source.next`) or * between collector and destination (post-chain via `destination.before`), and * after destination push (`destination.next`). They validate, enrich, or redact * events in flight. */ /** * Config - Transformer configuration * * Mirrors types/transformer.ts Config interface. Shared fields wrap the * package-specific `settings` field. */ declare const ConfigSchema$2: z.ZodObject<{ settings: z.ZodOptional; env: z.ZodOptional; id: z.ZodOptional; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; before: z.ZodOptional>>; next: z.ZodOptional>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>; init: z.ZodOptional; disabled: z.ZodOptional; mock: z.ZodOptional; chainMocks: z.ZodOptional>; mapping: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strict>; /** * PartialConfig - Config with all fields optional */ declare const PartialConfigSchema$1: z.ZodObject<{ settings: z.ZodOptional>; env: z.ZodOptional>; id: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>>; before: z.ZodOptional>>>; next: z.ZodOptional>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>>; state: z.ZodOptional; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>, z.ZodArray; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>>]>>>; init: z.ZodOptional>; disabled: z.ZodOptional>; mock: z.ZodOptional>; chainMocks: z.ZodOptional>>; mapping: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>; include: z.ZodOptional>; mapping: z.ZodOptional; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>, z.ZodArray; data: z.ZodOptional>, z.ZodArray>>]>>; settings: z.ZodOptional; condition: z.ZodOptional; consent: z.ZodOptional>; policy: z.ZodOptional>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>; include: z.ZodOptional>; ignore: z.ZodOptional; silent: z.ZodOptional; extend: z.ZodOptional>; data: z.ZodOptional>, z.ZodArray>>]>>>; settings: z.ZodOptional>; condition: z.ZodOptional>; consent: z.ZodOptional>>; policy: z.ZodOptional>>>>; batch: z.ZodOptional; size: z.ZodOptional; age: z.ZodOptional; }, z.core.$strip>]>>>; include: z.ZodOptional>>; ignore: z.ZodOptional>; silent: z.ZodOptional>; }, z.core.$strip>>; remove: z.ZodOptional>; }, z.core.$strip>>]>>>>>; policy: z.ZodOptional>>>; }, z.core.$strip>>>; }, z.core.$strict>; declare const configJsonSchema$2: z.core.ZodStandardJSONSchemaPayload>>; declare const partialConfigJsonSchema$1: z.core.ZodStandardJSONSchemaPayload>>; declare namespace transformer { export { ConfigSchema$2 as ConfigSchema, PartialConfigSchema$1 as PartialConfigSchema, configJsonSchema$2 as configJsonSchema, partialConfigJsonSchema$1 as partialConfigJsonSchema }; } /** * Store Schemas * * Mirrors: types/store.ts * Purpose: Runtime validation and JSON Schema generation for store configurations * * Stores are the 4th component type, passive key-value infrastructure that * other components consume via `env`. They are referenced via `$store.storeId` * in `env` values. Init first, destroy last. No chains. */ /** * Config - Store configuration * * Mirrors types/store.ts Config interface. Minimal set of shared fields around * the package-specific `settings` field. */ declare const ConfigSchema$1: z.ZodObject<{ settings: z.ZodOptional; credentials: z.ZodOptional; env: z.ZodOptional; id: z.ZodOptional; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>; setup: z.ZodOptional]>>; file: z.ZodOptional; }, z.core.$strip>; /** * PartialConfig - Config with all fields optional */ declare const PartialConfigSchema: z.ZodObject<{ settings: z.ZodOptional>; credentials: z.ZodOptional>; env: z.ZodOptional>; id: z.ZodOptional>; logger: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>>>; setup: z.ZodOptional]>>>; file: z.ZodOptional>; }, z.core.$strip>; declare const configJsonSchema$1: z.core.ZodStandardJSONSchemaPayload>>; declare const partialConfigJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const store_PartialConfigSchema: typeof PartialConfigSchema; declare const store_partialConfigJsonSchema: typeof partialConfigJsonSchema; declare namespace store { export { ConfigSchema$1 as ConfigSchema, store_PartialConfigSchema as PartialConfigSchema, configJsonSchema$1 as configJsonSchema, store_partialConfigJsonSchema as partialConfigJsonSchema }; } /** * Flow Configuration System - Zod Schemas (v4) * * Mirrors: types/flow.ts * Purpose: Runtime validation and JSON Schema generation for Flow configurations * * The Flow system provides unified configuration across all walkerOS flows. * These schemas enable: * - Runtime validation of config files * - Clear error messages for configuration issues * - JSON Schema generation for IDE support * - Type-safe parsing with Zod * * SCHEMA SYNC: Run `npx tsx scripts/generate-flow-schema.ts` from the repo root * to regenerate website/static/schema/flow/v4.json. * * @packageDocumentation */ /** * Variables schema for unified $var. interpolation. * * @remarks * Variables can hold any value (scalars, objects, arrays). Whole-string $var * references preserve native type; inline interpolation requires scalars. * Deep paths via `$var.name.deep.path` are supported. */ declare const VariablesSchema: z.ZodRecord; /** * Settings schema - free-form key-value bag inside Flow.Config.settings. */ declare const SettingsSchema: z.ZodRecord; /** * Single bundle package entry. */ declare const BundlePackageSchema: z.ZodObject<{ version: z.ZodOptional; imports: z.ZodOptional>; path: z.ZodOptional; }, z.core.$strip>; /** * Bundle schema - build-time configuration for the bundler. */ declare const BundleSchema: z.ZodObject<{ packages: z.ZodOptional; imports: z.ZodOptional>; path: z.ZodOptional; }, z.core.$strip>>>; overrides: z.ZodOptional>; traceInclude: z.ZodOptional>; }, z.core.$strict>; /** * Inline code schema for embedding JavaScript functions in JSON configs. * * @remarks * Object-only inline code block. Enables custom sources, transformers, * destinations, and stores without npm packages. The `push` function is * required; `type` and `init` are optional. To select a named export from * a package, use the step's `import` field instead. * * @example * ```json * { * "code": { * "type": "enricher", * "push": "$code:(event) => ({ ...event, data: { ...event.data, enriched: true } })" * } * } * ``` */ declare const CodeSchema$1: z.ZodObject<{ push: z.ZodString; type: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>; /** * Trigger descriptor - source trigger metadata for step examples. */ declare const TriggerDescriptorSchema: z.ZodObject<{ type: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>; /** * Step example schema - a named { in, out } pair. */ declare const StepExampleSchema: z.ZodObject<{ title: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>; /** * Step examples record - keyed by scenario name. */ declare const StepExamplesSchema: z.ZodRecord; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>; /** * JSON Schema fragment - structural JSON Schema object. */ declare const JsonSchemaSchema: z.ZodRecord; /** * Validate events map - entity → action → JSON Schema. */ declare const ValidateEventsSchema: z.ZodRecord>>; /** * Source reference schema (Flow.Source). * * @remarks * Defines how to reference and configure a source package. * Sources capture events from various origins (browser, HTTP, etc.). * Either `package` (npm package) or `code` (inline object) may be provided. */ declare const SourceSchema: z.ZodObject<{ package: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional]>>; }, z.core.$loose>>; env: z.ZodOptional; primary: z.ZodOptional; variables: z.ZodOptional>; next: z.ZodOptional>>; before: z.ZodOptional>>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; /** * Transformer reference schema (Flow.Transformer). */ declare const TransformerSchema: z.ZodObject<{ package: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional; env: z.ZodOptional; before: z.ZodOptional>>; next: z.ZodOptional>>; variables: z.ZodOptional>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; /** * Destination reference schema (Flow.Destination). */ declare const DestinationSchema: z.ZodObject<{ package: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional]>>; }, z.core.$loose>>; env: z.ZodOptional; variables: z.ZodOptional>; before: z.ZodOptional>>; next: z.ZodOptional>>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; /** * Store reference schema (Flow.Store). * * @remarks * Stores are passive key-value infrastructure - no chain properties (next/before). * Consumed by other components via `$store.storeId` env wiring. */ declare const StoreSchema: z.ZodObject<{ package: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional]>>; }, z.core.$loose>>; env: z.ZodOptional; cache: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; ttl: z.ZodNumber; }, z.core.$strict>>; }, z.core.$strict>>; variables: z.ZodOptional>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; }, z.core.$strip>; /** * Contract schema entry - a JSON Schema object. * Passthrough to allow any valid JSON Schema keywords. */ declare const ContractSchemaEntry: z.ZodRecord; /** * Contract actions - keyed by action name (or "*" wildcard). */ declare const ContractActionsSchema: z.ZodRecord>; /** * Contract events map - entity → action keyed. */ declare const ContractEventsSchema: z.ZodRecord>>; /** * Single named contract rule. */ declare const ContractRuleSchema: z.ZodObject<{ extend: z.ZodOptional; tagging: z.ZodOptional; description: z.ZodOptional; events: z.ZodOptional>>>; schema: z.ZodOptional>; }, z.core.$strip>; /** * Named contract map. */ declare const ContractSchema: z.ZodRecord; tagging: z.ZodOptional; description: z.ZodOptional; events: z.ZodOptional>>>; schema: z.ZodOptional>; }, z.core.$strip>>; /** * Per-flow Config schema (Flow.Config). * * @remarks * Groups platform identity, optional public URL, free-form settings bag, * and bundle (build-time) configuration. */ declare const ConfigSchema: z.ZodObject<{ platform: z.ZodEnum<{ web: "web"; server: "server"; }>; url: z.ZodOptional; settings: z.ZodOptional>; bundle: z.ZodOptional; imports: z.ZodOptional>; path: z.ZodOptional; }, z.core.$strip>>>; overrides: z.ZodOptional>; traceInclude: z.ZodOptional>; }, z.core.$strict>>; }, z.core.$strip>; /** * Single flow schema (Flow). * * @remarks * Represents one deployment target (e.g., web_prod, server_stage). * The platform is determined by `config.platform`. */ declare const FlowSchema: z.ZodObject<{ config: z.ZodOptional; url: z.ZodOptional; settings: z.ZodOptional>; bundle: z.ZodOptional; imports: z.ZodOptional>; path: z.ZodOptional; }, z.core.$strip>>>; overrides: z.ZodOptional>; traceInclude: z.ZodOptional>; }, z.core.$strict>>; }, z.core.$strip>>; sources: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional]>>; }, z.core.$loose>>; env: z.ZodOptional; primary: z.ZodOptional; variables: z.ZodOptional>; next: z.ZodOptional>>; before: z.ZodOptional>>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; destinations: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional]>>; }, z.core.$loose>>; env: z.ZodOptional; variables: z.ZodOptional>; before: z.ZodOptional>>; next: z.ZodOptional>>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; transformers: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional; env: z.ZodOptional; before: z.ZodOptional>>; next: z.ZodOptional>>; variables: z.ZodOptional>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; stores: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional]>>; }, z.core.$loose>>; env: z.ZodOptional; cache: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; ttl: z.ZodNumber; }, z.core.$strict>>; }, z.core.$strict>>; variables: z.ZodOptional>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; }, z.core.$strip>>>; collector: z.ZodOptional; variables: z.ZodOptional>; }, z.core.$strip>; /** * Root walkerOS multi-flow configuration schema (Flow.Json, v4). * * @remarks * This is the complete schema for walkeros.config.json files. * Contains multiple named flows with shared variables and contracts. */ declare const JsonSchema$1: z.ZodObject<{ version: z.ZodLiteral<4>; $schema: z.ZodOptional; include: z.ZodOptional>; variables: z.ZodOptional>; contract: z.ZodOptional; tagging: z.ZodOptional; description: z.ZodOptional; events: z.ZodOptional>>>; schema: z.ZodOptional>; }, z.core.$strip>>>; flows: z.ZodRecord; url: z.ZodOptional; settings: z.ZodOptional>; bundle: z.ZodOptional; imports: z.ZodOptional>; path: z.ZodOptional; }, z.core.$strip>>>; overrides: z.ZodOptional>; traceInclude: z.ZodOptional>; }, z.core.$strict>>; }, z.core.$strip>>; sources: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional]>>; }, z.core.$loose>>; env: z.ZodOptional; primary: z.ZodOptional; variables: z.ZodOptional>; next: z.ZodOptional>>; before: z.ZodOptional>>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; destinations: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional]>>; }, z.core.$loose>>; env: z.ZodOptional; variables: z.ZodOptional>; before: z.ZodOptional>>; next: z.ZodOptional>>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; transformers: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional; env: z.ZodOptional; before: z.ZodOptional>>; next: z.ZodOptional>>; variables: z.ZodOptional>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; stores: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional]>>; }, z.core.$loose>>; env: z.ZodOptional; cache: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; ttl: z.ZodNumber; }, z.core.$strict>>; }, z.core.$strict>>; variables: z.ZodOptional>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; }, z.core.$strip>>>; collector: z.ZodOptional; variables: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; /** * Parse and validate a Flow.Json (root) configuration. * * @param data - Raw JSON data from config file * @returns Validated Flow.Json object * @throws ZodError if validation fails with detailed error messages * * @example * ```typescript * import { parseConfig } from '@walkeros/core/dev'; * import { readFileSync } from 'fs'; * * const raw = JSON.parse(readFileSync('walkeros.config.json', 'utf8')); * const config = parseConfig(raw); * console.log(`Found ${Object.keys(config.flows).length} flows`); * ``` */ declare function parseConfig(data: unknown): z.infer; /** * Safely parse a Flow.Json (root) configuration without throwing. * * @param data - Raw JSON data from config file * @returns Success result with data or error result with issues */ declare function safeParseConfig(data: unknown): z.ZodSafeParseResult<{ version: 4; flows: Record | undefined; bundle?: { packages?: Record | undefined; overrides?: Record | undefined; traceInclude?: string[] | undefined; } | undefined; } | undefined; sources?: Record | undefined; } | undefined; env?: unknown; primary?: boolean | undefined; variables?: Record | undefined; next?: unknown; before?: unknown; examples?: Record | undefined; cache?: { rules: { key: string[]; ttl: number; match?: unknown; update?: Record | undefined; }[]; stop?: boolean | undefined; store?: string | undefined; namespace?: string | undefined; } | undefined; }> | undefined; destinations?: Record | undefined; } | undefined; env?: unknown; variables?: Record | undefined; before?: unknown; next?: unknown; examples?: Record | undefined; cache?: { rules: { key: string[]; ttl: number; match?: unknown; update?: Record | undefined; }[]; stop?: boolean | undefined; store?: string | undefined; namespace?: string | undefined; } | undefined; }> | undefined; transformers?: Record | undefined; examples?: Record | undefined; cache?: { rules: { key: string[]; ttl: number; match?: unknown; update?: Record | undefined; }[]; stop?: boolean | undefined; store?: string | undefined; namespace?: string | undefined; } | undefined; }> | undefined; stores?: Record | undefined; } | undefined; env?: unknown; cache?: { rules: { ttl: number; match?: unknown; }[]; store?: string | undefined; namespace?: string | undefined; } | undefined; variables?: Record | undefined; examples?: Record | undefined; }> | undefined; collector?: unknown; variables?: Record | undefined; }>; $schema?: string | undefined; include?: string[] | undefined; variables?: Record | undefined; contract?: Record>> | undefined; schema?: Record | undefined; }> | undefined; }>; /** * Parse and validate a single Flow definition. * * @param data - Raw JSON data for a single flow * @returns Validated Flow object * @throws ZodError if validation fails */ declare function parseFlow(data: unknown): z.infer; /** * Safely parse a single Flow definition without throwing. */ declare function safeParseFlow(data: unknown): z.ZodSafeParseResult<{ config?: { platform: "web" | "server"; url?: string | undefined; settings?: Record | undefined; bundle?: { packages?: Record | undefined; overrides?: Record | undefined; traceInclude?: string[] | undefined; } | undefined; } | undefined; sources?: Record | undefined; } | undefined; env?: unknown; primary?: boolean | undefined; variables?: Record | undefined; next?: unknown; before?: unknown; examples?: Record | undefined; cache?: { rules: { key: string[]; ttl: number; match?: unknown; update?: Record | undefined; }[]; stop?: boolean | undefined; store?: string | undefined; namespace?: string | undefined; } | undefined; }> | undefined; destinations?: Record | undefined; } | undefined; env?: unknown; variables?: Record | undefined; before?: unknown; next?: unknown; examples?: Record | undefined; cache?: { rules: { key: string[]; ttl: number; match?: unknown; update?: Record | undefined; }[]; stop?: boolean | undefined; store?: string | undefined; namespace?: string | undefined; } | undefined; }> | undefined; transformers?: Record | undefined; examples?: Record | undefined; cache?: { rules: { key: string[]; ttl: number; match?: unknown; update?: Record | undefined; }[]; stop?: boolean | undefined; store?: string | undefined; namespace?: string | undefined; } | undefined; }> | undefined; stores?: Record | undefined; } | undefined; env?: unknown; cache?: { rules: { ttl: number; match?: unknown; }[]; store?: string | undefined; namespace?: string | undefined; } | undefined; variables?: Record | undefined; examples?: Record | undefined; }> | undefined; collector?: unknown; variables?: Record | undefined; }>; /** * JSON Schema for Flow.Json (root walkeros.config.json). * * @remarks * Used for IDE validation and autocomplete. * Hosted at https://walkeros.io/schema/flow/v4.json */ declare const configJsonSchema: z.core.ZodStandardJSONSchemaPayload; $schema: z.ZodOptional; include: z.ZodOptional>; variables: z.ZodOptional>; contract: z.ZodOptional; tagging: z.ZodOptional; description: z.ZodOptional; events: z.ZodOptional>>>; schema: z.ZodOptional>; }, z.core.$strip>>>; flows: z.ZodRecord; url: z.ZodOptional; settings: z.ZodOptional>; bundle: z.ZodOptional; imports: z.ZodOptional>; path: z.ZodOptional; }, z.core.$strip>>>; overrides: z.ZodOptional>; traceInclude: z.ZodOptional>; }, z.core.$strict>>; }, z.core.$strip>>; sources: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional]>>; }, z.core.$loose>>; env: z.ZodOptional; primary: z.ZodOptional; variables: z.ZodOptional>; next: z.ZodOptional>>; before: z.ZodOptional>>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; destinations: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional]>>; }, z.core.$loose>>; env: z.ZodOptional; variables: z.ZodOptional>; before: z.ZodOptional>>; next: z.ZodOptional>>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; transformers: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional; env: z.ZodOptional; before: z.ZodOptional>>; next: z.ZodOptional>>; variables: z.ZodOptional>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; cache: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; stores: z.ZodOptional; code: z.ZodOptional; init: z.ZodOptional; }, z.core.$strip>>; import: z.ZodOptional; config: z.ZodOptional]>>; }, z.core.$loose>>; env: z.ZodOptional; cache: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; ttl: z.ZodNumber; }, z.core.$strict>>; }, z.core.$strict>>; variables: z.ZodOptional>; examples: z.ZodOptional; description: z.ZodOptional; public: z.ZodOptional; in: z.ZodOptional; trigger: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>; mapping: z.ZodOptional; out: z.ZodOptional; command: z.ZodOptional>; }, z.core.$strip>>>; }, z.core.$strip>>>; collector: z.ZodOptional; variables: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>>; /** * JSON Schema for a single Flow. */ declare const flowJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; /** * JSON Schema for the per-flow Config block (Flow.Config). */ declare const flowConfigJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; /** * JSON Schema for Flow.Source. */ declare const sourceJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; /** * JSON Schema for Flow.Destination. */ declare const destinationJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; /** * JSON Schema for Flow.Transformer. */ declare const transformerJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; /** * JSON Schema for Flow.Store. */ declare const storeJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; /** * JSON Schema for a single Contract rule (Flow.ContractRule). */ declare const contractRuleJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; /** * JSON Schema for the named Contract map (Flow.Contract). */ declare const contractJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; /** * JSON Schema for the entity-action keyed Validate events map * (Flow.ValidateEvents). Shares its shape with Contract `events`. */ declare const validateEventsJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const flow_BundlePackageSchema: typeof BundlePackageSchema; declare const flow_BundleSchema: typeof BundleSchema; declare const flow_ConfigSchema: typeof ConfigSchema; declare const flow_ContractActionsSchema: typeof ContractActionsSchema; declare const flow_ContractEventsSchema: typeof ContractEventsSchema; declare const flow_ContractRuleSchema: typeof ContractRuleSchema; declare const flow_ContractSchema: typeof ContractSchema; declare const flow_ContractSchemaEntry: typeof ContractSchemaEntry; declare const flow_DestinationSchema: typeof DestinationSchema; declare const flow_FlowSchema: typeof FlowSchema; declare const flow_JsonSchemaSchema: typeof JsonSchemaSchema; declare const flow_SettingsSchema: typeof SettingsSchema; declare const flow_SourceSchema: typeof SourceSchema; declare const flow_StepExampleSchema: typeof StepExampleSchema; declare const flow_StepExamplesSchema: typeof StepExamplesSchema; declare const flow_StoreSchema: typeof StoreSchema; declare const flow_TransformerSchema: typeof TransformerSchema; declare const flow_TriggerDescriptorSchema: typeof TriggerDescriptorSchema; declare const flow_ValidateEventsSchema: typeof ValidateEventsSchema; declare const flow_VariablesSchema: typeof VariablesSchema; declare const flow_configJsonSchema: typeof configJsonSchema; declare const flow_contractJsonSchema: typeof contractJsonSchema; declare const flow_contractRuleJsonSchema: typeof contractRuleJsonSchema; declare const flow_destinationJsonSchema: typeof destinationJsonSchema; declare const flow_flowConfigJsonSchema: typeof flowConfigJsonSchema; declare const flow_flowJsonSchema: typeof flowJsonSchema; declare const flow_parseConfig: typeof parseConfig; declare const flow_parseFlow: typeof parseFlow; declare const flow_safeParseConfig: typeof safeParseConfig; declare const flow_safeParseFlow: typeof safeParseFlow; declare const flow_sourceJsonSchema: typeof sourceJsonSchema; declare const flow_storeJsonSchema: typeof storeJsonSchema; declare const flow_transformerJsonSchema: typeof transformerJsonSchema; declare const flow_validateEventsJsonSchema: typeof validateEventsJsonSchema; declare namespace flow { export { flow_BundlePackageSchema as BundlePackageSchema, flow_BundleSchema as BundleSchema, CodeSchema$1 as CodeSchema, flow_ConfigSchema as ConfigSchema, flow_ContractActionsSchema as ContractActionsSchema, flow_ContractEventsSchema as ContractEventsSchema, flow_ContractRuleSchema as ContractRuleSchema, flow_ContractSchema as ContractSchema, flow_ContractSchemaEntry as ContractSchemaEntry, flow_DestinationSchema as DestinationSchema, flow_FlowSchema as FlowSchema, JsonSchema$1 as JsonSchema, flow_JsonSchemaSchema as JsonSchemaSchema, flow_SettingsSchema as SettingsSchema, flow_SourceSchema as SourceSchema, flow_StepExampleSchema as StepExampleSchema, flow_StepExamplesSchema as StepExamplesSchema, flow_StoreSchema as StoreSchema, flow_TransformerSchema as TransformerSchema, flow_TriggerDescriptorSchema as TriggerDescriptorSchema, flow_ValidateEventsSchema as ValidateEventsSchema, flow_VariablesSchema as VariablesSchema, flow_configJsonSchema as configJsonSchema, flow_contractJsonSchema as contractJsonSchema, flow_contractRuleJsonSchema as contractRuleJsonSchema, flow_destinationJsonSchema as destinationJsonSchema, flow_flowConfigJsonSchema as flowConfigJsonSchema, flow_flowJsonSchema as flowJsonSchema, flow_parseConfig as parseConfig, flow_parseFlow as parseFlow, flow_safeParseConfig as safeParseConfig, flow_safeParseFlow as safeParseFlow, flow_sourceJsonSchema as sourceJsonSchema, flow_storeJsonSchema as storeJsonSchema, flow_transformerJsonSchema as transformerJsonSchema, flow_validateEventsJsonSchema as validateEventsJsonSchema }; } /** * Utility Schemas * * Mirrors: types/storage.ts, types/handler.ts, and other utility types * Purpose: Runtime validation and JSON Schema generation for utility types * * Small, standalone schemas for utility types used throughout walkerOS: * - Storage types * - Handler functions * - Error/log management */ /** * StorageType - Storage mechanism identifier * * Standard storage types: * - local: localStorage (persistent) * - session: sessionStorage (session-scoped) * - cookie: document.cookie (configurable expiry) * * Used for session persistence and user tracking */ declare const StorageTypeSchema: z.ZodEnum<{ local: "local"; session: "session"; cookie: "cookie"; }>; /** * Storage - Storage type constants * Provides const values for type-safe storage type references */ declare const StorageSchema: z.ZodObject<{ Local: z.ZodLiteral<"local">; Session: z.ZodLiteral<"session">; Cookie: z.ZodLiteral<"cookie">; }, z.core.$strip>; /** * Error - Error handler function type * * Signature: (error: unknown, state?: unknown) => void * * Called when errors occur during: * - Event processing * - Destination push operations * - Source event handling * - Mapping transformations * * Parameters: * - error: The error that occurred * - state: Optional state information for debugging * * Note: Function schemas use z.unknown() as functions aren't serializable */ declare const ErrorHandlerSchema: z.ZodUnknown; /** * Log - Log handler function type * * Signature: (message: string, verbose?: boolean) => void * * Called for logging during: * - Event processing * - Configuration updates * - Debugging (when verbose enabled) * * Parameters: * - message: Log message * - verbose: Whether this is a verbose-only log * * Note: Function schemas use z.unknown() as functions aren't serializable */ declare const LogHandlerSchema: z.ZodUnknown; /** * Handler - Combined handler interface * Groups Error and Log handlers */ declare const HandlerSchema: z.ZodObject<{ Error: z.ZodUnknown; Log: z.ZodUnknown; }, z.core.$strip>; declare const storageTypeJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const storageJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const errorHandlerJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const logHandlerJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const handlerJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; declare const utilities_ErrorHandlerSchema: typeof ErrorHandlerSchema; declare const utilities_HandlerSchema: typeof HandlerSchema; declare const utilities_LogHandlerSchema: typeof LogHandlerSchema; declare const utilities_StorageSchema: typeof StorageSchema; declare const utilities_StorageTypeSchema: typeof StorageTypeSchema; declare const utilities_errorHandlerJsonSchema: typeof errorHandlerJsonSchema; declare const utilities_handlerJsonSchema: typeof handlerJsonSchema; declare const utilities_logHandlerJsonSchema: typeof logHandlerJsonSchema; declare const utilities_storageJsonSchema: typeof storageJsonSchema; declare const utilities_storageTypeJsonSchema: typeof storageTypeJsonSchema; declare namespace utilities { export { utilities_ErrorHandlerSchema as ErrorHandlerSchema, utilities_HandlerSchema as HandlerSchema, utilities_LogHandlerSchema as LogHandlerSchema, utilities_StorageSchema as StorageSchema, utilities_StorageTypeSchema as StorageTypeSchema, utilities_errorHandlerJsonSchema as errorHandlerJsonSchema, utilities_handlerJsonSchema as handlerJsonSchema, utilities_logHandlerJsonSchema as logHandlerJsonSchema, utilities_storageJsonSchema as storageJsonSchema, utilities_storageTypeJsonSchema as storageTypeJsonSchema }; } /** * EventCacheRule — a single caching rule for an event-context pipeline step * (sources, transformers, destinations). * * Mirrors: types/cache.ts → EventCacheRule * * - match: MatchExpression — omit for always-match. * - key: array of dot-path strings used to compose the cache key from event fields. * - ttl: time-to-live in seconds (positive). * - update: optional record of response mutations applied on cache hit. */ declare const EventCacheRuleSchema: z.ZodObject<{ match: z.ZodOptional>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>; /** * EventCache — top-level cache configuration for an event-context pipeline step. * * Mirrors: types/cache.ts → Cache */ declare const EventCacheSchema: z.ZodObject<{ stop: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>; /** * StoreCacheRule — a single caching rule applied at the store boundary. * * Mirrors: types/cache.ts → StoreCacheRule * * The caller (store wrapper) provides the cache key, so `key` is not allowed * here. There is no event to mutate, so `update` is rejected. * * - match: optional MatchExpression evaluated against `{ key, value? }`. * - ttl: time-to-live in seconds (positive). * * `.strict()` rejects unknown keys so footguns surface at validation time. */ declare const StoreCacheRuleSchema: z.ZodObject<{ match: z.ZodOptional>>; ttl: z.ZodNumber; }, z.core.$strict>; /** * StoreCache — top-level cache configuration for a store wrapper. * * Mirrors: types/cache.ts → Cache * * Differences from EventCache: * - No `stop` field (read-through always falls through on miss). * - `namespace` rejects `""` (empty namespace collapses keys across stores * sharing `__cache` and re-introduces collisions). * - Rules use StoreCacheRuleSchema (no `key`, no `update`). */ declare const StoreCacheSchema: z.ZodObject<{ store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; ttl: z.ZodNumber; }, z.core.$strict>>; }, z.core.$strict>; /** * @deprecated Use {@link EventCacheRuleSchema}. Kept for one cycle to avoid * breaking external callers. */ declare const CacheRuleSchema: z.ZodObject<{ match: z.ZodOptional>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>; /** * @deprecated Use {@link EventCacheSchema}. Kept for one cycle to avoid * breaking external callers. */ declare const CacheSchema: z.ZodObject<{ stop: z.ZodOptional; store: z.ZodOptional; namespace: z.ZodOptional; rules: z.ZodArray>>; key: z.ZodArray; ttl: z.ZodNumber; update: z.ZodOptional>>>; }, z.core.$strip>>; }, z.core.$strip>; declare const cache_CacheRuleSchema: typeof CacheRuleSchema; declare const cache_CacheSchema: typeof CacheSchema; declare const cache_EventCacheRuleSchema: typeof EventCacheRuleSchema; declare const cache_EventCacheSchema: typeof EventCacheSchema; declare const cache_StoreCacheRuleSchema: typeof StoreCacheRuleSchema; declare const cache_StoreCacheSchema: typeof StoreCacheSchema; declare namespace cache { export { cache_CacheRuleSchema as CacheRuleSchema, cache_CacheSchema as CacheSchema, cache_EventCacheRuleSchema as EventCacheRuleSchema, cache_EventCacheSchema as EventCacheSchema, cache_StoreCacheRuleSchema as StoreCacheRuleSchema, cache_StoreCacheSchema as StoreCacheSchema }; } /** * StateSchema — declarative store get/set operation. * * Mirrors: types/state.ts → State * * - mode: 'get' | 'set' direction ('delete' is reserved for a later release). * - store: optional store id; defaults to the in-memory `__cache` store. * - key: Mapping.Value resolving (against the event) to the store key. * - value: Mapping.Value. For `set` it resolves to the payload to store; for * `get` its bare-string path (or `.key`) is the event write-target. Optional * at the type level (to keep a future `delete` mode non-breaking) but * validation requires it for `get`/`set`, and for `get` it must be a bare * string or a ValueConfig with a `key` (no `value`/`fn`/`map`/`loop`/`set`, * and no `*` wildcard in the path). */ declare const StateSchema: z.ZodObject<{ mode: z.ZodEnum<{ set: "set"; get: "get"; }>; store: z.ZodOptional; key: z.ZodType>; value: z.ZodOptional>>; }, z.core.$strip>; declare const MatchExpressionSchema: z.ZodType; declare const RouteSchema: z.ZodType; declare const RouteWithoutManySchema: z.ZodType; declare const matcher_MatchExpressionSchema: typeof MatchExpressionSchema; declare const matcher_RouteSchema: typeof RouteSchema; declare const matcher_RouteWithoutManySchema: typeof RouteWithoutManySchema; declare namespace matcher { export { matcher_MatchExpressionSchema as MatchExpressionSchema, matcher_RouteSchema as RouteSchema, matcher_RouteWithoutManySchema as RouteWithoutManySchema }; } declare const CodeSchema: z.ZodObject<{ lang: z.ZodOptional; code: z.ZodString; }, z.core.$strip>; declare const HintSchema: z.ZodObject<{ text: z.ZodString; code: z.ZodOptional; code: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>; declare const HintsSchema: z.ZodRecord; code: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>; /** * Click-ID registry entry — maps a URL parameter name to a canonical platform. * * Runtime use of this schema is optional; `getMarketingParameters()` accepts * plain `ClickIdEntry` objects without validating. This schema exists for * dev tooling (Explorer UI, MCP package_get, JSON Schema generation). */ declare const ClickIdEntrySchema: z.ZodObject<{ param: z.ZodString; platform: z.ZodString; }, z.core.$strip>; /** * Logger schemas * * Mirrors: types/handler.ts (Logger namespace) * Purpose: Canonical schemas for logger configuration used across * destination / source / transformer / store / collector configs. * * Extracted from five duplicated inline `logger: z.object({...})` blocks * to satisfy the DRY principle and provide a single canonical `Logger.Config` * title in the generated JSON Schema output. */ /** * LoggerHandlerSchema - Custom log handler function * * Kept as `z.any()` because function-signature enforcement belongs in the * TypeScript layer; the Zod schema only needs to be nameable in JSON Schema. */ declare const LoggerHandlerSchema: z.ZodAny; /** * LoggerConfigSchema - Logger configuration * * Allows components to override the collector-default logger by providing a * minimum log level and / or a custom handler. */ declare const LoggerConfigSchema: z.ZodObject<{ level: z.ZodOptional]>>; handler: z.ZodOptional; }, z.core.$strip>; /** * Credentials Schemas * * Mirrors: types/credentials.ts * * Reusable strict credentials schema for packages that authenticate with a * Google-style service account. Packages import `CredentialsSchema` to validate * their `config.credentials` field. This is intentionally kept SEPARATE from the * loose placeholder field on the core Config schemas, which must not reject * non-GCP credential shapes (AWS, Kafka, future) at the core layer. */ /** * ServiceAccount - Google-style service account object. */ declare const ServiceAccountSchema: z.ZodObject<{ client_email: z.ZodString; private_key: z.ZodString; project_id: z.ZodOptional; }, z.core.$strip>; /** * Credentials - either a JSON string (often a `$env` reference) or a parsed * service account object. */ declare const CredentialsSchema: z.ZodUnion; }, z.core.$strip>]>; declare const credentialsJsonSchema: z.core.ZodStandardJSONSchemaPayload>>; interface PackageInfo { package: string; shortName: string; type: 'source' | 'destination' | 'transformer'; platform: 'web' | 'server'; description?: string; } interface IntelliSenseContext { variables?: Record; secrets?: string[]; stepNames?: { sources?: string[]; destinations?: string[]; transformers?: string[]; stores?: string[]; }; flowNames?: string[]; contract?: Array<{ entity: string; actions: string[]; /** * Per-action `data` property info derived from the resolved contract * schema. Keyed by action, each entry maps a `data` property name to its * type, description, and whether it is required. Empty object when the * action schema declares no `data` properties. */ properties?: Record>; }>; packages?: PackageInfo[]; platform?: 'web' | 'server'; } /** * Validate a Flow.Config JSON string. * * Performs three levels of validation: * 1. JSON syntax (parse error with line/column) * 2. Schema (Zod ConfigSchema validation with mapped positions) * 3. References (checks $var., $secret. against extracted context) * * Returns errors, warnings, and extracted IntelliSenseContext as a byproduct. * Pure function: works in Node.js (CLI/MCP) and browser (CodeBox). */ declare function validateFlowConfig(json: string, options?: { secrets?: string[]; }): ValidationResult; interface ValidationIssue { message: string; severity: 'error' | 'warning'; path?: string; line: number; column: number; endLine?: number; endColumn?: number; } interface ValidationResult { valid: boolean; errors: ValidationIssue[]; warnings: ValidationIssue[]; context?: Partial; } /** * JSON Schema type */ type JSONSchema$1 = Record; /** * Schema Builder - DRY utility for creating JSON Schemas * * This utility allows destinations to define schemas using simple objects, * without needing Zod as a dependency. The core package handles conversion. * * Benefits: * - Single source of schema generation logic * - No Zod dependency in destination packages * - Simple, declarative schema definitions * - Type-safe with TypeScript * - Follows DRY principle * * @example * // In destination package (NO Zod needed!) * import { createObjectSchema, createArraySchema } from '@walkeros/core/dev'; * * export const settingsSchema = createObjectSchema({ * pixelId: { * type: 'string', * required: true, * pattern: '^[0-9]+$', * description: 'Your Meta Pixel ID', * }, * }); */ /** * Property definition for schema builder */ interface PropertyDef { type: 'string' | 'number' | 'boolean' | 'object' | 'array'; required?: boolean; description?: string; pattern?: string; minLength?: number; maxLength?: number; minimum?: number; maximum?: number; enum?: readonly string[] | readonly number[]; properties?: Record; items?: PropertyDef; default?: unknown; } /** * Create object schema from property definitions * * @param properties - Property definitions * @param title - Optional schema title * @returns JSON Schema * * @example * const schema = createObjectSchema({ * pixelId: { * type: 'string', * required: true, * pattern: '^[0-9]+$', * description: 'Your Meta Pixel ID', * }, * eventName: { * type: 'string', * enum: ['PageView', 'Purchase'], * }, * }, 'Meta Pixel Settings'); */ declare function createObjectSchema(properties: Record, title?: string): JSONSchema$1; /** * Create array schema * * @param itemDef - Definition for array items * @param options - Optional array constraints * @returns JSON Schema * * @example * // Simple string array * const tagsSchema = createArraySchema({ type: 'string' }); * * // Tuple (loop pattern) - exactly 2 items * const loopSchema = createArraySchema( * { type: 'object' }, * { minItems: 2, maxItems: 2 } * ); * * // Array with enum * const includeSchema = createArraySchema({ * type: 'string', * enum: ['data', 'context', 'globals'], * }); */ declare function createArraySchema(itemDef: PropertyDef, options?: { minItems?: number; maxItems?: number; description?: string; title?: string; }): JSONSchema$1; /** * Create enum schema * * @param values - Allowed values * @param type - Value type ('string' or 'number') * @param options - Optional constraints * @returns JSON Schema * * @example * const eventTypeSchema = createEnumSchema( * ['PageView', 'Purchase', 'AddToCart'], * 'string', * { description: 'Meta Pixel standard event' } * ); */ declare function createEnumSchema(values: readonly string[] | readonly number[], type?: 'string' | 'number', options?: { description?: string; title?: string; }): JSONSchema$1; /** * Create tuple schema (Loop pattern) * * Creates an array schema with exactly 2 items, which the Explorer * type detector recognizes as a "loop" pattern. * * @param firstItem - Definition for first element (source) * @param secondItem - Definition for second element (transform) * @param description - Optional description * @returns JSON Schema with minItems=2, maxItems=2 * * @example * const loopSchema = createTupleSchema( * { type: 'string' }, * { type: 'object' }, * 'Loop: [source, transform]' * ); */ declare function createTupleSchema(firstItem: PropertyDef, secondItem: PropertyDef, description?: string): JSONSchema$1; /** * walkerOS Core Schemas * * Zod schemas for runtime validation and JSON Schema generation. * These schemas mirror TypeScript types in packages/core/src/types/ * and are used for: * - Runtime validation at system boundaries (MCP tools, APIs, CLI) * - JSON Schema generation for Explorer UI (RJSF) * - Documentation and type metadata * * Note: TypeScript types remain the source of truth for development. * Schemas are for runtime validation and tooling support. * * Organization: Schema files mirror type files * - types/walkeros.ts → schemas/walkeros.ts * - types/mapping.ts → schemas/mapping.ts * - types/destination.ts → schemas/destination.ts * - types/collector.ts → schemas/collector.ts * - types/source.ts → schemas/source.ts * - types/flow.ts → schemas/flow.ts * - types/storage.ts + types/handler.ts → schemas/utilities.ts * * Import strategy: * Due to overlapping schema names across domains (ConfigSchema, InstanceSchema, etc.), * schemas are organized into namespaces. Import either: * 1. From namespaces: import { WalkerOSSchemas, MappingSchemas } from '@walkeros/core/dev' * 2. Direct from files: import { EventSchema } from '@walkeros/core/schemas/walkeros' */ /** * JSONSchema type for JSON Schema Draft 7 objects * * Represents a JSON Schema object as returned by Zod's toJSONSchema(). * Uses Record as JSON Schema structure is dynamic. */ type JSONSchema = Record; /** * Utility to convert Zod schema to JSON Schema with consistent defaults * * This wrapper ensures all destinations use the same JSON Schema configuration: * - target: 'draft-7' (JSON Schema Draft 7 format) * * Usage in destinations: * import { zodToSchema } from '@walkeros/core/dev'; * export const settings = zodToSchema(SettingsSchema); * * @param schema - Zod schema to convert * @returns JSON Schema Draft 7 object */ declare function zodToSchema(schema: z.ZodTypeAny): JSONSchema; declare const index_BaseContextConfig: typeof BaseContextConfig; declare const index_CacheRuleSchema: typeof CacheRuleSchema; declare const index_CacheSchema: typeof CacheSchema; declare const index_ClickIdEntrySchema: typeof ClickIdEntrySchema; declare const index_CodeSchema: typeof CodeSchema; declare const index_ConsentSchema: typeof ConsentSchema; declare const index_ContractActionsSchema: typeof ContractActionsSchema; declare const index_ContractRuleSchema: typeof ContractRuleSchema; declare const index_ContractSchema: typeof ContractSchema; declare const index_ContractSchemaEntry: typeof ContractSchemaEntry; declare const index_Counter: typeof Counter; declare const index_CredentialsSchema: typeof CredentialsSchema; declare const index_DeepPartialEventSchema: typeof DeepPartialEventSchema; declare const index_DestinationsMapConfig: typeof DestinationsMapConfig; declare const index_EntitiesSchema: typeof EntitiesSchema; declare const index_EntitySchema: typeof EntitySchema; declare const index_EventCacheRuleSchema: typeof EventCacheRuleSchema; declare const index_EventCacheSchema: typeof EventCacheSchema; declare const index_EventSchema: typeof EventSchema; declare const index_FlowSchema: typeof FlowSchema; declare const index_GenericEnvConfig: typeof GenericEnvConfig; declare const index_GenericSettingsConfig: typeof GenericSettingsConfig; declare const index_HandlersConfig: typeof HandlersConfig; declare const index_HintSchema: typeof HintSchema; declare const index_HintsSchema: typeof HintsSchema; declare const index_IdConfig: typeof IdConfig; declare const index_Identifier: typeof Identifier; type index_IntelliSenseContext = IntelliSenseContext; type index_JSONSchema = JSONSchema; declare const index_LoggerConfigSchema: typeof LoggerConfigSchema; declare const index_LoggerHandlerSchema: typeof LoggerHandlerSchema; declare const index_LoopSchema: typeof LoopSchema; declare const index_MapSchema: typeof MapSchema; declare const index_MatchExpressionSchema: typeof MatchExpressionSchema; declare const index_OptionalPrimitiveValue: typeof OptionalPrimitiveValue; declare const index_OrderedPropertiesSchema: typeof OrderedPropertiesSchema; type index_PackageInfo = PackageInfo; declare const index_PartialEventSchema: typeof PartialEventSchema; declare const index_PolicySchema: typeof PolicySchema; declare const index_PrimaryConfig: typeof PrimaryConfig; declare const index_PrimitiveValue: typeof PrimitiveValue; declare const index_ProcessingControlConfig: typeof ProcessingControlConfig; declare const index_PropertiesSchema: typeof PropertiesSchema; type index_PropertyDef = PropertyDef; declare const index_PropertySchema: typeof PropertySchema; declare const index_PropertyTypeSchema: typeof PropertyTypeSchema; declare const index_QueueConfig: typeof QueueConfig; declare const index_RequiredBoolean: typeof RequiredBoolean; declare const index_RequiredNumber: typeof RequiredNumber; declare const index_RequiredString: typeof RequiredString; declare const index_RouteSchema: typeof RouteSchema; declare const index_RouteWithoutManySchema: typeof RouteWithoutManySchema; declare const index_RuleSchema: typeof RuleSchema; declare const index_RulesSchema: typeof RulesSchema; declare const index_RuntimeInstanceConfig: typeof RuntimeInstanceConfig; declare const index_ServiceAccountSchema: typeof ServiceAccountSchema; declare const index_SetSchema: typeof SetSchema; declare const index_SourceTypeSchema: typeof SourceTypeSchema; declare const index_SourcesMapConfig: typeof SourcesMapConfig; declare const index_StateSchema: typeof StateSchema; declare const index_StoreCacheRuleSchema: typeof StoreCacheRuleSchema; declare const index_StoreCacheSchema: typeof StoreCacheSchema; declare const index_Timestamp: typeof Timestamp; declare const index_UserSchema: typeof UserSchema; declare const index_ValidateEventsSchema: typeof ValidateEventsSchema; type index_ValidationIssue = ValidationIssue; type index_ValidationResult = ValidationResult; declare const index_ValueConfigSchema: typeof ValueConfigSchema; declare const index_ValueSchema: typeof ValueSchema; declare const index_ValuesSchema: typeof ValuesSchema; declare const index_VerboseConfig: typeof VerboseConfig; declare const index_configJsonSchema: typeof configJsonSchema; declare const index_consentJsonSchema: typeof consentJsonSchema; declare const index_contractJsonSchema: typeof contractJsonSchema; declare const index_contractRuleJsonSchema: typeof contractRuleJsonSchema; declare const index_createArraySchema: typeof createArraySchema; declare const index_createConsentConfig: typeof createConsentConfig; declare const index_createDataTransformationConfig: typeof createDataTransformationConfig; declare const index_createEnumSchema: typeof createEnumSchema; declare const index_createMappingRulesConfig: typeof createMappingRulesConfig; declare const index_createObjectSchema: typeof createObjectSchema; declare const index_createPolicyConfig: typeof createPolicyConfig; declare const index_createTupleSchema: typeof createTupleSchema; declare const index_credentialsJsonSchema: typeof credentialsJsonSchema; declare const index_destinationJsonSchema: typeof destinationJsonSchema; declare const index_entityJsonSchema: typeof entityJsonSchema; declare const index_eventJsonSchema: typeof eventJsonSchema; declare const index_flowConfigJsonSchema: typeof flowConfigJsonSchema; declare const index_flowJsonSchema: typeof flowJsonSchema; declare const index_loopJsonSchema: typeof loopJsonSchema; declare const index_mapJsonSchema: typeof mapJsonSchema; declare const index_orderedPropertiesJsonSchema: typeof orderedPropertiesJsonSchema; declare const index_parseConfig: typeof parseConfig; declare const index_parseFlow: typeof parseFlow; declare const index_partialEventJsonSchema: typeof partialEventJsonSchema; declare const index_policyJsonSchema: typeof policyJsonSchema; declare const index_propertiesJsonSchema: typeof propertiesJsonSchema; declare const index_ruleJsonSchema: typeof ruleJsonSchema; declare const index_rulesJsonSchema: typeof rulesJsonSchema; declare const index_safeParseConfig: typeof safeParseConfig; declare const index_safeParseFlow: typeof safeParseFlow; declare const index_setJsonSchema: typeof setJsonSchema; declare const index_sourceJsonSchema: typeof sourceJsonSchema; declare const index_sourceTypeJsonSchema: typeof sourceTypeJsonSchema; declare const index_storeJsonSchema: typeof storeJsonSchema; declare const index_transformerJsonSchema: typeof transformerJsonSchema; declare const index_userJsonSchema: typeof userJsonSchema; declare const index_validateEventsJsonSchema: typeof validateEventsJsonSchema; declare const index_validateFlowConfig: typeof validateFlowConfig; declare const index_valueConfigJsonSchema: typeof valueConfigJsonSchema; declare const index_valueJsonSchema: typeof valueJsonSchema; declare const index_z: typeof z; declare const index_zodToSchema: typeof zodToSchema; declare namespace index { export { index_BaseContextConfig as BaseContextConfig, index_CacheRuleSchema as CacheRuleSchema, index_CacheSchema as CacheSchema, cache as CacheSchemas, index_ClickIdEntrySchema as ClickIdEntrySchema, index_CodeSchema as CodeSchema, collector as CollectorSchemas, index_ConsentSchema as ConsentSchema, index_ContractActionsSchema as ContractActionsSchema, index_ContractRuleSchema as ContractRuleSchema, index_ContractSchema as ContractSchema, index_ContractSchemaEntry as ContractSchemaEntry, index_Counter as Counter, index_CredentialsSchema as CredentialsSchema, index_DeepPartialEventSchema as DeepPartialEventSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventCacheRuleSchema as EventCacheRuleSchema, index_EventCacheSchema as EventCacheSchema, index_EventSchema as EventSchema, BundlePackageSchema as FlowBundlePackageSchema, BundleSchema as FlowBundleSchema, CodeSchema$1 as FlowCodeSchema, ConfigSchema as FlowConfigSchema, DestinationSchema as FlowDestinationSchema, JsonSchema$1 as FlowJsonSchema, index_FlowSchema as FlowSchema, flow as FlowSchemas, SourceSchema as FlowSourceSchema, StoreSchema as FlowStoreSchema, TransformerSchema as FlowTransformerSchema, index_GenericEnvConfig as GenericEnvConfig, index_GenericSettingsConfig as GenericSettingsConfig, index_HandlersConfig as HandlersConfig, index_HintSchema as HintSchema, index_HintsSchema as HintsSchema, index_IdConfig as IdConfig, index_Identifier as Identifier, InitConfig$1 as InitConfig, type index_IntelliSenseContext as IntelliSenseContext, type index_JSONSchema as JSONSchema, index_LoggerConfigSchema as LoggerConfigSchema, index_LoggerHandlerSchema as LoggerHandlerSchema, index_LoopSchema as LoopSchema, index_MapSchema as MapSchema, ResultSchema$1 as MappingResultSchema, mapping as MappingSchemas, index_MatchExpressionSchema as MatchExpressionSchema, matcher as MatcherSchemas, index_OptionalPrimitiveValue as OptionalPrimitiveValue, index_OrderedPropertiesSchema as OrderedPropertiesSchema, type index_PackageInfo as PackageInfo, index_PartialEventSchema as PartialEventSchema, index_PolicySchema as PolicySchema, index_PrimaryConfig as PrimaryConfig, index_PrimitiveValue as PrimitiveValue, index_ProcessingControlConfig as ProcessingControlConfig, index_PropertiesSchema as PropertiesSchema, type index_PropertyDef as PropertyDef, index_PropertySchema as PropertySchema, index_PropertyTypeSchema as PropertyTypeSchema, index_QueueConfig as QueueConfig, index_RequiredBoolean as RequiredBoolean, index_RequiredNumber as RequiredNumber, index_RequiredString as RequiredString, index_RouteSchema as RouteSchema, index_RouteWithoutManySchema as RouteWithoutManySchema, index_RuleSchema as RuleSchema, index_RulesSchema as RulesSchema, index_RuntimeInstanceConfig as RuntimeInstanceConfig, index_ServiceAccountSchema as ServiceAccountSchema, index_SetSchema as SetSchema, SourceSchema$1 as SourceSchema, source as SourceSchemas, index_SourceTypeSchema as SourceTypeSchema, index_SourcesMapConfig as SourcesMapConfig, index_StateSchema as StateSchema, index_StoreCacheRuleSchema as StoreCacheRuleSchema, index_StoreCacheSchema as StoreCacheSchema, store as StoreSchemas, index_Timestamp as Timestamp, transformer as TransformerSchemas, index_UserSchema as UserSchema, utilities as UtilitySchemas, index_ValidateEventsSchema as ValidateEventsSchema, type index_ValidationIssue as ValidationIssue, type index_ValidationResult as ValidationResult, index_ValueConfigSchema as ValueConfigSchema, index_ValueSchema as ValueSchema, index_ValuesSchema as ValuesSchema, index_VerboseConfig as VerboseConfig, walkeros as WalkerOSSchemas, index_configJsonSchema as configJsonSchema, index_consentJsonSchema as consentJsonSchema, index_contractJsonSchema as contractJsonSchema, index_contractRuleJsonSchema as contractRuleJsonSchema, index_createArraySchema as createArraySchema, index_createConsentConfig as createConsentConfig, index_createDataTransformationConfig as createDataTransformationConfig, index_createEnumSchema as createEnumSchema, index_createMappingRulesConfig as createMappingRulesConfig, index_createObjectSchema as createObjectSchema, index_createPolicyConfig as createPolicyConfig, index_createTupleSchema as createTupleSchema, index_credentialsJsonSchema as credentialsJsonSchema, index_destinationJsonSchema as destinationJsonSchema, index_entityJsonSchema as entityJsonSchema, index_eventJsonSchema as eventJsonSchema, index_flowConfigJsonSchema as flowConfigJsonSchema, index_flowJsonSchema as flowJsonSchema, index_loopJsonSchema as loopJsonSchema, index_mapJsonSchema as mapJsonSchema, index_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, index_parseConfig as parseConfig, index_parseFlow as parseFlow, index_partialEventJsonSchema as partialEventJsonSchema, index_policyJsonSchema as policyJsonSchema, index_propertiesJsonSchema as propertiesJsonSchema, index_ruleJsonSchema as ruleJsonSchema, index_rulesJsonSchema as rulesJsonSchema, index_safeParseConfig as safeParseConfig, index_safeParseFlow as safeParseFlow, index_setJsonSchema as setJsonSchema, index_sourceJsonSchema as sourceJsonSchema, index_sourceTypeJsonSchema as sourceTypeJsonSchema, index_storeJsonSchema as storeJsonSchema, index_transformerJsonSchema as transformerJsonSchema, index_userJsonSchema as userJsonSchema, index_validateEventsJsonSchema as validateEventsJsonSchema, index_validateFlowConfig as validateFlowConfig, index_valueConfigJsonSchema as valueConfigJsonSchema, index_valueJsonSchema as valueJsonSchema, index_z as z, index_zodToSchema as zodToSchema }; } type PackageType = 'source' | 'destination' | 'transformer' | 'store'; interface PackageSchemas { settings?: Record; credentials?: Record; [key: string]: unknown; } declare function mergeConfigSchema(type: PackageType, packageSchemas: PackageSchemas): Record; /** * Resolve the effective base schema object. Zod 4 emits `.meta({id})`-decorated * root schemas as either: * - Draft-7 form: `{ allOf: [{ $ref: '#/definitions/X' }], definitions: {...} }` * - Draft-2020 form: `{ $ref: '#/$defs/X', $defs: {...} }` * Unwrap one level if needed so callers can mutate `properties` directly. */ declare function resolveBaseSchema(baseSchema: Record | undefined): Record | undefined; type MatchExpression = MatchCondition | { and: MatchExpression[]; } | { or: MatchExpression[]; }; interface MatchCondition { key: string; operator: MatchOperator; value: string; not?: boolean; } type MatchOperator = 'eq' | 'contains' | 'prefix' | 'suffix' | 'regex' | 'gt' | 'lt' | 'exists'; /** * Shared mapping configuration interface. * Used by both Source.Config and Destination.Config. */ interface Config$7 { consent?: Consent; data?: Value | Values; include?: string[]; mapping?: Rules>; policy?: Policy$1; } interface Policy$1 { [key: string]: Value; } interface Rules { [entity: string]: Record> | undefined; } interface Rule { /** * Batch scheduling for this event mapping. When present, it splits this * event type into its own buffer, overriding `config.batch` per field * (`rule ?? config ?? default`). A bare number is the debounce `wait` * window. Object form supports `wait` (debounce ms), `size` (count cap), * and `age` (max ms since first entry). */ batch?: number | BatchOptions; condition?: Condition; consent?: Consent; settings?: Settings; data?: Data$1; include?: string[]; ignore?: boolean; silent?: boolean; name?: string; policy?: Policy$1; /** * Merge mode (config layer): a partial Rule deep-merged onto the * package-shipped default rule at the same key, instead of replacing it. * Resolved at the consuming package's init via `mergeMappingRule`; not * seen by the runtime evaluator. A `null` value clears an inherited field. * Presence of `extend` or `remove` switches this rule from replace to merge. */ extend?: RulePatch; /** * Output layer: dotted paths stripped from the produced data payload * after evaluation, regardless of how each field was produced. Applied * last, so it always wins. */ remove?: string[]; } /** * A partial Rule used by `Rule.extend`. Every field is optional, and a * `null` value clears the inherited field (JSON merge-patch delete). The * control fields `extend` and `remove` are excluded: a patch models only * direct rule fields, matching what the runtime patch schema accepts. */ type RulePatchFields = Omit, 'extend' | 'remove'>; type RulePatch = { [K in keyof RulePatchFields]?: RulePatchFields[K] | null; }; type Data$1 = Value | Values; type Value = ValueType | Array; type Values = Array; type ValueType = string | ValueConfig; interface ValueConfig { condition?: Condition; consent?: Consent; fn?: Fn$3; key?: string; loop?: Loop; map?: Map; set?: Value[]; validate?: Validate; value?: PropertyType; } interface Context$5 { event: DeepPartialEvent; /** The surrounding mapping config: a Value (value-level) or a Rule (rule-level). */ mapping: Value | Rule; collector: Instance$5; logger: Instance$3; consent?: Consent; } type Fn$3 = (value: unknown, context: Context$5) => PromiseOrValue; type Condition = (value: unknown, context: Context$5) => PromiseOrValue; type Validate = (value: unknown, context: Context$5) => PromiseOrValue; type Loop = [Value, Value]; type Map = { [key: string]: Value; }; interface BaseCacheRule { /** * Optional match expression. Omitted means always-match. */ match?: MatchExpression; ttl: number; } interface EventCacheRule extends BaseCacheRule { key: string[]; update?: Record; } interface StoreCacheRule extends BaseCacheRule { } type CacheRule = EventCacheRule | StoreCacheRule; interface Cache { /** * Stop the chain on cache HIT (default: false). When true, skip remaining steps and return cached value. */ stop?: boolean; store?: string; /** * Optional key prefix written to the store. When absent, cache keys are written directly. Same store + same key + same namespace = same cache entry. */ namespace?: string; rules: R[]; } /** * Options for responding to an HTTP request. * Same interface for web and server — sources implement the handler. */ interface RespondOptions { /** Response body. Objects are JSON-serialized by source. */ body?: unknown; /** HTTP status code (default: 200). Server-only, ignored by web sources. */ status?: number; /** HTTP response headers. Server-only, ignored by web sources. */ headers?: Record; } /** * Standardized response function available on env for every step. * Idempotent: first call wins, subsequent calls are no-ops. * Created by sources via createRespond(), consumed by any step. */ type RespondFn = (options?: RespondOptions) => void; /** * Metadata managed by the runtime. Do not overwrite from step code. * The _ prefix signals "runtime-managed." */ interface IngestMeta { /** Number of steps this data has passed through. */ hops: number; /** Ordered list of step IDs visited. path[0] is always the source ID. */ path: string[]; /** Current chain context, e.g., "destination.ga4.before" or "source.web.next". */ chainPath?: string; } /** * Mutable shared context that accumulates knowledge as data flows through the graph. * * Event = strict schema (analytics data). * Ingest = wild west (pipeline context). * * Any step can read and write arbitrary keys. The `_meta` section is * managed by the runtime — increment hops and append to path before each step. */ interface Ingest { [key: string]: unknown; _meta: IngestMeta; } /** * FlowState is the canonical observation record emitted at each hop in a * walkerOS pipeline. Telemetry helpers populate one of these per (step, * phase) tuple and pass it to a user-supplied emit callback. The shape is * stable across step kinds (source, transformer, collector, destination, * store) so a single observer can correlate work across the pipeline. * * Optional fields are populated only when meaningful for the (step, phase) * pair, or when the telemetry options explicitly opt in (e.g. trace level * for inEvent/outEvent). */ type FlowStatePhase = 'init' | 'in' | 'out' | 'error' | 'skip' | 'flush'; type FlowStepType = 'source' | 'transformer' | 'collector' | 'destination' | 'store'; interface FlowStateBatch { size: number; index: number; } interface FlowState { /** The flow this state belongs to. */ flowId: string; /** * Runtime that produced this state: `web` (browser bundle) or `server` * (Node runtime). Mirrors the originating flow's `config.platform`. * Optional: emitters may omit it; populated when the runtime is known. */ platform?: 'web' | 'server'; /** Step identifier, e.g. 'destination.gtag', 'transformer.consent', 'collector.push'. */ stepId: string; stepType: FlowStepType; phase: FlowStatePhase; /** W3C span-id of the originating WalkerOS.Event. Sourced from event.id; never synthesized. */ eventId: string; /** ISO 8601 timestamp. */ timestamp: string; /** Milliseconds since the runtime's startedAt origin. Monotonic. */ elapsedMs: number; /** Wall-clock duration of this step, if measured (typically only on 'out'). */ durationMs?: number; /** Inbound walker event for this hop. Only populated when level === 'trace' or includeIn === true. */ inEvent?: unknown; /** Outbound walker event/payload for this hop. Only populated when level === 'trace' or includeOut === true. */ outEvent?: unknown; /** Error info when phase === 'error'. */ error?: { name?: string; message: string; }; /** The mapping rule that matched, when one matched. */ mappingKey?: string; /** Contract rule that matched, if any. */ contractRule?: string; /** Consent gate snapshot at hop time. */ consent?: Record; /** Consent state actually applied (after policy resolution). */ consentApplied?: Record; /** W3C 16-hex span-id of the child branch for `many` fan-out. */ branchId?: string; /** For phase === 'flush', the batch size + entry index. */ batch?: FlowStateBatch; /** Discriminator when phase === 'skip'. */ skipReason?: 'consent' | 'cache_hit' | 'sampled_out' | 'disabled' | 'unknown'; /** Free-form metadata: store key/value, cached: true, etc. */ meta?: Record; } /** * Pipeline observation channel. Observers receive a FlowState record per * step phase (init, in, out, error, skip, flush) and run synchronously in * the collector's emit loop. They must not throw; emitStep swallows * thrown values defensively so a slow or buggy observer cannot crash the * pipeline. Observers must not perform synchronous IO. */ type ObserverFn = (state: FlowState) => void; /** * Drop counters at a single step. Each buffer is optional: a step kind * may have only `queue` (collector), only `dlq`, both (destinations * today), or neither. Counts are monotonic. */ interface DroppedCounters { queue?: number; dlq?: number; } /** * Circuit-breaker state for a single step (keyed by `stepId()` in * `Status.breakers`). Tracks consecutive transport failures so a step whose * transport is down can be skipped (gated) until a cooldown elapses, instead * of every event hammering a known-broken writer. * * - `closed`: healthy; events pass through. `consecutiveFailures` accrues on * transport failures and resets to 0 on any success. * - `open`: tripped; events are skipped until `openUntil`. The first event at * or after `openUntil` transitions to `half-open` and becomes the probe. * - `half-open`: a single probe event is allowed through; `probing` marks that * the probe slot is taken so concurrent events still skip. A probe success * closes the breaker; a probe failure re-opens it with a fresh `openUntil`. * * `consecutiveFailures` is CONSECUTIVE, not cumulative: a single success * resets it, so only an unbroken run reaching the threshold opens the breaker. */ interface BreakerState { state: 'closed' | 'open' | 'half-open'; consecutiveFailures: number; /** Epoch ms after which an open breaker admits a single probe. */ openUntil?: number; /** True while a half-open probe is in flight (probe slot taken). */ probing?: boolean; } /** * Core collector configuration interface */ interface Config$6 { /** Whether to run collector automatically */ run?: boolean; /** Static global properties even on a new run */ globalsStatic: Properties; /** Static session data even on a new run */ sessionStatic: Partial; /** Logger configuration */ logger?: Config$4; /** * Maximum number of events retained in `collector.queue` for late-registered * destination backfill. Overflow drops oldest (FIFO). Default 1000. */ queueMax?: number; } /** * Initialization configuration that extends Config with initial state */ interface InitConfig extends Partial { /** Initial consent state */ consent?: Consent; /** Initial user data */ user?: User; /** Initial global properties */ globals?: Properties; /** Source configurations */ sources?: InitSources; /** Destination configurations */ destinations?: InitDestinations; /** Transformer configurations */ transformers?: InitTransformers; /** Store configurations */ stores?: InitStores; /** Initial custom properties */ custom?: Properties; /** Hooks for pipeline observation and interception */ hooks?: Functions; } interface SessionData extends Properties { isStart: boolean; storage: boolean; id?: string; start?: number; marketing?: true; updated?: number; isNew?: boolean; device?: string; count?: number; runs?: number; } interface Status { startedAt: number; in: number; out: number; failed: number; sources: Record; destinations: Record; /** * Monotonic counts of events dropped due to buffer caps, keyed by * stepId. See `stepId()` for key construction. * * Examples: * - `dropped["collector"]?.queue`: collector replay buffer drops * - `dropped["destination.ga4"]?.queue`: ga4's consent-denied buffer drops * - `dropped["destination.ga4"]?.dlq`: ga4's dead-letter queue drops */ dropped: Record; /** * Per-step circuit-breaker state, keyed by stepId. See `stepId()` for key * construction; keyed step-agnostically (NOT embedded in * `DestinationStatus`) so the breaker can guard any step kind, though * destinations are the primary use today. A breaker is created lazily on * first accounting and stays inert unless its step is configured with a * `breaker` (presence-gated): existing flows never trip a breaker. * * A runtime status field, not drift-guarded (it is observed, never authored * in a flow config). * * Example: * - `breakers["destination.bigquery"]`: bigquery's consecutive-failure gate. */ breakers: Record; /** * Monotonic counts of out-of-band connection-level errors reported by a * step via `context.reportError(err)` with no event (an orphan error from * an EventEmitter SDK object's `'error'` handler), keyed by stepId. See * `stepId()` for key construction; mirrors `dropped`. * * Distinct from `failed`: `failed` counts events lost in-band (a push that * threw, a DLQ'd entry). `connectionErrors` counts connection faults that * did not lose a specific event at the moment they fired. Operators read * both: a rising `connectionErrors` with flat `failed` means a writer is * flapping but events are still landing; both rising means the fault is * now dropping events. * * Example: * - `connectionErrors["destination.bigquery"]`: BigQuery stream writer * `'error'` events reported between pushes. */ connectionErrors: Record; } interface SourceStatus { count: number; lastAt?: number; duration: number; } interface DestinationStatus { count: number; failed: number; lastAt?: number; duration: number; /** Current size of the destination's queuePush buffer (point-in-time). */ queuePushSize: number; /** Current size of the destination's DLQ (point-in-time). */ dlqSize: number; /** * Number of events buffered in batch scheduler windows but not yet * delivered to `pushBatch`. Incremented on enqueue, decremented on * flush (whether the flush succeeds or fails). Operators read this * to spot batches that never drain. */ inFlightBatch?: number; } interface Sources { [id: string]: Instance$1; } interface Destinations { [id: string]: Instance$4; } interface Transformers { [id: string]: Instance$2; } interface Stores { [id: string]: Instance; } /** * Options passed to collector.push() from sources. * NOT a Context - just push metadata. */ interface PushOptions { id?: string; ingest?: Ingest; respond?: RespondFn; mapping?: Config$7; preChain?: string[]; include?: string[]; exclude?: string[]; } /** * Push function signature - handles events only */ interface PushFn$1 { (event: DeepPartialEvent, options?: PushOptions): Promise; } /** * Command function signature - handles walker commands only */ interface CommandFn { (command: 'config', config: Partial): Promise; (command: 'consent', consent: Consent): Promise; (command: 'destination', init: Init$3): Promise; (command: 'hook', init: { name: K; fn: Functions[K]; }): Promise; (command: 'on', init: { type: Types$3; rules: SingleOrArray; }): Promise; (command: 'user', user: User): Promise; (command: 'run', runState?: { consent?: Consent; user?: User; globals?: Properties; custom?: Properties; }): Promise; (command: string, data?: unknown): Promise; } /** * Per-cascade tracking for the bounded recursion guard (see `Instance.cascade`). * `counts` maps a subscriber identity object to per-cell-type delivery counts * within one top-level command's cascade. A pair is stopped once its count * exceeds the guard's bound; the non-convergence error logs once per pair on the * crossing transition. */ interface Cascade { counts: WeakMap>; } interface Instance$5 { push: PushFn$1; command: CommandFn; allowed: boolean; config: Config$6; consent: Consent; custom: Properties; sources: Sources; destinations: Destinations; transformers: Transformers; stores: Stores; globals: Properties; hooks: Functions; /** * First-class observation channel. The runtime self-emits FlowState * records at canonical step sites (collector.push, destination.push, * destination.init, destination.pushBatch, destination consent skip, * transformer.push, store.get/set/delete, store cache HIT/MISS). * Observers run synchronously inside emitStep; thrown values are * swallowed. Subscribers add/remove via the standard Set API. */ observers: Set; logger: Instance$3; on: OnConfig; queue: Events; round: number; /** Run-scoped W3C trace id, minted on each run and stamped onto events. */ trace?: string; /** Per-run emission sequence; reset on each run, incremented per stamped event. */ count: number; /** * Monotonic counter bumped on every accepted reactive-state mutation * (consent, user, globals, custom). Used for per-subscriber high-water-mark * dedup. Not bumped for non-reactive config changes. */ stateVersion: number; /** * Per-cell change version: the `stateVersion` at which each state cell * (`consent`/`user`/`globals`/`custom`) last changed. Lets delivery dedup be * per-cell — a subscriber owed two cells at the same `stateVersion` receives * both, because each cell's freshness is tracked independently rather than * against the single global `stateVersion`. A missing entry reads as 0. */ cellVersion: Record; /** * Per-subscriber, per-cell high-water mark registry for exactly-once state * delivery. Keys are subscriber identity objects (a ConsentRule object, a * generic-fn, or a source instance); the inner record maps each state-cell * type (`consent`/`user`/`globals`/`custom`) to the `stateVersion` at which * that subscriber was last invoked FOR THAT CELL. A missing entry means never * delivered (sentinel "-infinity", read as -1). A subscriber is invoked for a * cell iff `stateVersion > mark[cell]` AND `allowed === true`. * * Per-cell (not a single scalar per subscriber) so a handler owed two * distinct cells at the same `stateVersion` — e.g. consent and user both * bumped before run — receives both at the run barrier instead of the first * delivery advancing one mark and swallowing the second cell's edge. */ delivery: WeakMap>; /** * Transient per-cascade tracking for the bounded recursion guard. A * top-level state command creates this when it first enters the delivery * cascade and tears it down when it returns; nested commands emitted by * reacting callbacks reuse the same structure. It counts deliveries per * `(subscriber, cell-type)` so a cyclic cascade terminates (and logs once) * instead of recursing until stack overflow. `undefined` between top-level * commands. See `on.ts` `cascadeAllow`. * * This tracker, together with `stateVersion` and `delivery`, assumes top-level * state commands are processed serially on a given collector. Concurrent, * overlapping state commands on one shared collector are not supported (web is * serial; the server per-request path is event push, not state commands). */ cascade?: Cascade; session: undefined | SessionData; status: Status; timing: number; user: User; pending: { destinations: InitDestinations; }; /** * Set true on the first `shutdown` command, guarding re-entrancy: a second * `walker shutdown` must not re-run `destroyAllSteps` and double-close * writers, destinations, or stores. Subsequent shutdown commands no-op. * Initialized to `false` by the collector factory; absence (`undefined`) * is treated as "not yet shut down", so the first shutdown still runs. */ hasShutdown?: boolean; /** * Every event type ever broadcast through `onApply` (state, lifecycle, and * arbitrary). Lets a `require:[]` gate be satisfied by the current * recorded state for events that have no backing cell, including a broadcast * that fired before the requiring step registered. */ seenEvents: Set; } /** * Base context interface for walkerOS stages. * Sources, Transformers, and Destinations extend this. */ interface Base { collector: Instance$5; logger: Instance$3; config: C; env: E; /** * Out-of-band error seam available to every step kind (source, * transformer, store, destination). A step that owns an EventEmitter SDK * object (BigQuery `StreamConnection`, a Redis client, a Kafka producer) * calls this from the object's `'error'` handler, where there is no * surrounding `await`/`tryCatchAsync` to catch into and an unhandled * `'error'` would otherwise crash the process on a detached tick. * * MUST NOT throw (it runs on a detached emitter tick; a throw inside it * would reintroduce the uncaughtException it exists to prevent). * * - With `event`: routes that event through the same per-step failure * accounting an in-band push failure uses (the destination DLQ + the * `failed` counters), so a connection error that loses a specific event * is counted and surfaced exactly like a synchronous push failure. * - Without `event` (an orphan / connection-level error, e.g. a stream * writer that errored between pushes): a contained `logger.error` plus a * bump of `Status.connectionErrors[stepId]`. It does NOT bump * `Status.failed` (no event was lost at this instant; the next push that * hits the broken writer is what gets DLQ'd and counted as failed, so * counting the orphan against `failed` would double-count). */ reportError?(err: unknown, event?: Event): void; } /** * Declarative store operation. Replaces `$code:` for simple fetch/stash. * key = store side, value = event side, mode = direction. */ interface State { /** Direction. 'delete' is reserved for a later release. */ mode: 'get' | 'set'; /** Store id; defaults to the in-memory `__cache` store when omitted. */ store?: string; /** Resolves against the event to the store key. */ key: Value; /** * set: resolves to the payload to store. * get: its `key`/bare-string path is the event write-target. * Optional at the type level to keep a future `delete` mode non-breaking; * validation requires it for get/set. */ value?: Value; } /** * Shared context for one-shot lifecycle hooks (setup, destroy). * No event pipeline machinery — just config, env, logger, and id. */ interface LifecycleContext { id: string; config: C; env: E; logger: Instance$3; } /** * Setup function signature. Called once via `walkeros setup .`. * Packages own idempotency and error semantics. Return value (if any) is * JSON-stringified to stdout by the CLI for scripting use. */ type SetupFn = (context: LifecycleContext) => PromiseOrValue; /** * Destroy function signature for step lifecycle cleanup. */ type DestroyFn = (context: LifecycleContext) => PromiseOrValue; /** * Base environment requirements interface for walkerOS destinations * * This defines the core interface that destinations can use to declare * their runtime environment requirements. Platform-specific extensions * should extend this interface. */ interface BaseEnv$3 { /** * Generic global properties that destinations may require * Platform-specific implementations can extend this interface */ [key: string]: unknown; } /** * Type bundle for destination generics. * Groups Settings, InitSettings, Mapping, Env, and Setup into a single type parameter. */ interface Types$4 { settings: S; initSettings: I; mapping: M; env: E; setup: U; credentials: C; } /** * Generic constraint for Types - ensures T has required properties for indexed access */ type TypesGeneric$3 = { settings: any; initSettings: any; mapping: any; env: any; setup: any; credentials: any; }; type InitSettings$3 = T['initSettings']; type Mapping$1 = T['mapping']; type Env$3 = T['env']; type SetupOptions$2 = T['setup']; type Credentials$2 = T['credentials']; interface Instance$4 { config: Config$5; queuePush?: Events; queueOn?: Array<{ type: Types$3; data?: unknown; }>; dlq?: DLQ; batches?: BatchRegistry>; type?: string; env?: Env$3; setup?: SetupFn, Env$3>; init?: InitFn$1; push: PushFn; pushBatch?: PushBatchFn; on?: OnFn; destroy?: DestroyFn, Env$3>; } interface Config$5 { /** Required consent states to push events; queues events when not granted. */ consent?: Consent; /** Implementation-specific configuration passed to the init function. */ settings?: InitSettings$3; /** * Optional, strictly-typed credentials slot ($env-resolved). The package * defines the shape via `Types['credentials']`. `settings.` stays the * escape hatch for raw SDK options. */ credentials?: Credentials$2; /** Global data transformation applied to all events; result passed as context.data to push. */ data?: Value | Values; /** Event sections to flatten into context.data. */ include?: string[]; /** Runtime dependencies merged from code and config env; extensible per destination. */ env?: Env$3; /** Destination identifier; auto-generated if not provided. */ id?: string; /** Whether the destination has been initialized; prevents re-initialization. */ init?: boolean; /** Whether to load external scripts (e.g., gtag.js); destination-specific behavior. */ loadScript?: boolean; /** Logger configuration (level, handler) to override the collector's defaults. */ logger?: Config$4; /** Entity-action rules to filter, rename, transform, and batch events for this destination. */ mapping?: Rules>>; /** Pre-processing rules applied to all events before mapping; modifies events in-place. */ policy?: Policy; /** Whether to queue events when consent is not granted; defaults to true. */ queue?: boolean; /** Defer destination initialization until these collector events fire (e.g., `['consent']`). */ require?: string[]; /** * Provisioning options for `walkeros setup`. `boolean | object`. * Triggered only by explicit CLI invocation; never automatic. */ setup?: boolean | SetupOptions$2; /** Transformer chain to run after collector processing but before this destination. */ before?: Route; /** Transformer chain to run after destination push completes. Push response available at ingest._response. */ next?: Route; /** Cache configuration for deduplication (step-level: skip push on HIT). */ cache?: Cache; /** Declarative store get/set operations applied around this destination. */ state?: State | State[]; /** Completely skip this destination — no init, no push, no queuing. */ disabled?: boolean; /** * Per-destination delivery timeout in ms (default 10000); a delivery that * does not settle within this window is routed to the DLQ like a thrown push. */ timeout?: number; /** Return this value instead of calling push(). Uses !== undefined check to support falsy values. */ mock?: unknown; /** * Maximum number of consent-denied events retained in `queuePush` for * this destination. Overflow drops oldest (FIFO). Default 1000. */ queueMax?: number; /** * Maximum number of failed-push entries retained in `dlq` for this * destination. Overflow drops oldest (FIFO). Default 100. */ dlqMax?: number; /** * Enables batching for ALL of this destination's events into one shared * default buffer. A mapping rule's own `batch` splits that entity-action * into its own buffer and overrides per field (`rule ?? config ?? default`). * Batching stays off when neither is set. A bare number is treated as the * debounce `wait` window. * * - `wait`: debounce window in ms; the timer resets on every push. * - `size`: hard count cap; flush immediately when entries reach this number. Default 1000 when batching is enabled. * - `age`: time since the first entry of the current window. Forces a flush even if pushes keep arriving. Default 30000 (30s). */ batch?: number | BatchOptions; /** * Per-destination circuit breaker. Presence-gated: when unset the breaker is * inert and behavior is unchanged. After `threshold` CONSECUTIVE transport * failures (a thrown push, a timed-out push, a whole-batch throw, a * connection-level `reportError(err, event)`) the breaker opens and events * are skipped (counted, not pushed) until `cooldown` ms elapse, then a single * probe event is allowed; its success closes the breaker, its failure * re-opens it. Partial-batch row failures are breaker-neutral. A bare number * is the `threshold`. * * - `threshold`: consecutive transport failures before opening. Default 5. * - `cooldown`: ms an open breaker waits before admitting a probe. Default 30000. */ breaker?: number | BreakerOptions; } /** * Circuit-breaker tuning. Used at the destination-config layer * (`Destination.Config.breaker`). A bare number is treated as `threshold`. */ interface BreakerOptions { /** Consecutive transport failures before the breaker opens. Default 5. */ threshold?: number; /** Milliseconds an open breaker waits before admitting a probe. Default 30000. */ cooldown?: number; } /** * Batch scheduling options. Used at both the mapping-rule layer * (`Mapping.Rule.batch`) and the destination-config layer * (`Destination.Config.batch`). Same shape at both layers. */ interface BatchOptions { /** Debounce window in ms. Timer resets on every push. */ wait?: number; /** Hard count cap. Flushes immediately at this size. */ size?: number; /** Hard age cap in ms since first entry of current window. */ age?: number; } interface Policy { [key: string]: Value; } type Code = Instance$4; type Init$3 = { code: Code; config?: Partial>; env?: Partial>; before?: Route; next?: Route; cache?: Cache; state?: State | State[]; }; interface InitDestinations { [key: string]: Init$3; } /** * Context provided to destination functions. * Extends base context with destination-specific properties. */ interface Context$4 extends Base, Env$3> { id: string; data?: Data; } interface PushContext extends Context$4 { ingest: Ingest; rule?: Rule>; } interface PushBatchContext extends Context$4 { ingest: Ingest; rule?: Rule>; } type InitFn$1 = (context: Context$4) => PromiseOrValue>; type PushFn = (event: Event, context: PushContext) => PromiseOrValue; /** * Per-row outcome for a single failed batch entry. * * `index` is the position into the flushed batch's `entries` array (the same * order `flushBatch` iterates), so the collector can route exactly that entry * to the DLQ. `error` is the per-row failure carried into the DLQ pair; when * omitted the collector substitutes a generic batch error. */ interface BatchFailure { index: number; error?: unknown; } /** * Partial-failure result of a `pushBatch` call. * * `failed` lists the entries (by index into the flushed batch's `entries` * array) that did NOT succeed. Every other entry is treated as delivered. */ interface BatchOutcome { failed: BatchFailure[]; } /** * Pushes a batch of events to a destination. * * Return contract (backward-compatible, additive): * - Resolve `void` (the historical contract): the WHOLE batch succeeded. The * collector counts every entry as delivered. * - Throw / reject: the WHOLE batch failed. The collector routes every entry * to the DLQ and increments `failed` by the batch size. Unchanged. * - Resolve a `BatchOutcome`: PARTIAL failure. Only the entries listed in * `outcome.failed` (by `index` into the flushed `entries` array) are routed * to the DLQ and counted as failed, each with its own `error`. The remaining * entries are counted as delivered. This lets a destination report row-level * failures without forcing already-succeeded rows onto the DLQ, which would * duplicate them on a later DLQ retry. * * Indices in `failed` must line up with the order of `batch.entries`. */ type PushBatchFn = (batch: Batch>, context: PushBatchContext) => PromiseOrValue; interface BatchEntry { event: Event; ingest?: Ingest; respond?: RespondFn; rule?: Rule; data?: Data; } interface Batch { key: string; /** * Per-event entries carrying per-event ingest, respond, rule, and data. * Destinations needing per-event metadata should read this instead of * (or in addition to) `events` and `data`. */ entries: BatchEntry[]; /** Derived view: events from `entries`. Kept for back-compat. */ events: Events; /** Derived view: data from `entries`. Kept for back-compat. */ data: Array; mapping?: Rule; } interface BatchRegistry { [mappingKey: string]: { batched: Batch; /** * Marks a buffer created by `config.batch` (the destination-wide default * batch) rather than a mapping rule's own `batch`. The default buffer is * heterogeneous, so its flush reports `rule: undefined` to consumers. */ isDefault?: boolean; batchFn: () => void; /** * Force a flush of the current batch immediately. Used by shutdown * drain and by tests for deterministic flushing without timer * advancement. Resolves after the underlying `pushBatch` settles. */ flush: () => Promise; }; } type Data = Property | undefined | Array; interface Ref { type: string; data?: unknown; error?: unknown; } type DLQ = Array<[Event, unknown]>; interface EventFn> { (partialEvent: DeepPartialEvent): R; (event: string): R; (event: string, data: Properties): R; } interface Fn$2, Config = unknown> extends EventFn, WalkerCommands { } interface WalkerCommands, Config = unknown> { (event: 'walker config', config: Partial): R; (event: 'walker consent', consent: Consent): R; (event: 'walker destination', init: Init$3): R; (event: 'walker hook', init: { name: K; fn: Functions[K]; }): R; (event: 'walker on', init: { type: Types$3; rules: SingleOrArray; }): R; (event: 'walker user', user: User): R; (event: 'walker run', runState?: { consent?: Consent; user?: User; globals?: Properties; custom?: Properties; }): R; } interface PushResult { ok: boolean; event?: Event; done?: Record; queued?: Record; failed?: Record; } type AnyFunction

= (...args: P) => R; type Functions = { [key: string]: AnyFunction; }; /** * Log levels from most to least severe */ declare enum Level { ERROR = 0, WARN = 1, INFO = 2, DEBUG = 3 } /** * Normalized error context extracted from Error objects */ interface ErrorContext { message: string; name: string; stack?: string; cause?: unknown; } /** * Context passed to log handlers * If an Error was passed, it's normalized into the error property */ interface LogContext { [key: string]: unknown; error?: ErrorContext; } /** * Log message function signature * Accepts string or Error as message, with optional context */ type LogFn = (message: string | Error, context?: unknown | Error) => void; /** * Throw function signature - logs error then throws * Returns never as it always throws */ type ThrowFn = (message: string | Error, context?: unknown) => never; /** * Default handler function (passed to custom handlers for chaining) */ type DefaultHandler = (level: Level, message: string, context: LogContext, scope: string[]) => void; /** * Custom log handler function * Receives originalHandler to allow middleware-style chaining */ type Handler = (level: Level, message: string, context: LogContext, scope: string[], originalHandler: DefaultHandler) => void; /** * Logger instance with scoping support * All logs automatically include trace path from scoping */ interface Instance$3 { /** * Log an error message (always visible unless silenced) */ error: LogFn; /** * Log a warning (degraded state, config issues, transient failures) */ warn: LogFn; /** * Log an informational message */ info: LogFn; /** * Log a debug message */ debug: LogFn; /** * Log an error message and throw an Error * Combines logging and throwing in one call */ throw: ThrowFn; /** * Output structured JSON data */ json: (data: unknown) => void; /** * Create a scoped child logger with automatic trace path * @param name - Scope name (e.g., destination type, destination key) * @returns A new logger instance with the scope applied */ scope: (name: string) => Instance$3; } /** * Logger configuration options */ interface Config$4 { /** * Minimum log level to display * @default Level.ERROR */ level?: Level | keyof typeof Level; /** * Custom log handler function * Receives originalHandler to preserve default behavior */ handler?: Handler; /** Custom handler for json() output. Default: console.log(JSON.stringify(data, null, 2)) */ jsonHandler?: (data: unknown) => void; } /** Collector state mapping for the `on` actions. */ type Config$3 = { config?: Array; consent?: Array; custom?: Array; globals?: Array; ready?: Array; run?: Array; session?: Array; user?: Array; }; /** Allow arbitrary string events via `(string & {})`. */ type Types$3 = keyof Config$3 | (string & {}); /** * Context provided to every `on` callback. * Same posture as Mapping.Context: collector + logger only; * subscriptions are a collector-level concern, not a stage-level one. */ interface Context$3 { collector: Instance$5; logger: Instance$3; } /** Unified subscription callback shape. */ type Fn$1 = (data: TData, context: Context$3) => PromiseOrValue; /** Typed-data variants for readability and IntelliSense. All reduce to Fn. */ type ConsentFn = Fn$1; type GenericFn = Fn$1; type ReadyFn = Fn$1; type RunFn = Fn$1; type SessionFn = Fn$1; type UserFn = Fn$1; /** * Consent rule: a record of `{ [consentKey]: ConsentFn }`. * Only the consent action uses this shape (per-key handler dispatch). */ interface ConsentRule { [key: string]: ConsentFn; } /** Anything registerable via `walker.on(action, X)`: a typed callback or a consent rule record. */ type Subscription = ConsentRule | GenericFn | ReadyFn | RunFn | SessionFn | UserFn; interface OnConfig { config?: GenericFn[]; consent?: ConsentRule[]; custom?: GenericFn[]; globals?: GenericFn[]; ready?: ReadyFn[]; run?: RunFn[]; session?: SessionFn[]; user?: UserFn[]; [key: string]: ConsentRule[] | GenericFn[] | ReadyFn[] | RunFn[] | SessionFn[] | UserFn[] | undefined; } /** * Destination `on` handler: receives the action type and a destination context. * Already context-style; kept for compatibility with the destination interface. */ type OnFn = (type: Types$3, context: Context$4) => PromiseOrValue; /** * Unified route grammar for Flow v4. A `Route` is one of: * - a transformer ID string (`"redact"`) * - a sequence of routes (`["a", "b", "c"]` — sugar for chained `.next`) * - a `RouteConfig` — a gated / dispatching node. * * `RouteConfig` is a disjoint union — set exactly one of `next`, `one`, * `many`, or neither (pure gate). The disjointness is enforced by `never` * sibling properties at the type level and `z.strictObject` at the schema * level. * * Operators: * - `next`: single continuation. * - `one`: first-match dispatch (walk entries, first whose match passes wins). * - `many`: all-match terminal fan-out (every matching entry spawns an * independent flow; main chain terminates here). Restricted to * pre-collector positions (source.next, transformer.next, transformer.before). */ type Route = string | Route[] | RouteConfig; type RouteConfig = RouteNextConfig | RouteOneConfig | RouteManyConfig | RouteGateConfig; interface RouteNextConfig { match?: MatchExpression; next: Route; one?: never; many?: never; } interface RouteOneConfig { match?: MatchExpression; one: Route[]; next?: never; many?: never; } interface RouteManyConfig { match?: MatchExpression; many: Route[]; next?: never; one?: never; } interface RouteGateConfig { match: MatchExpression; next?: never; one?: never; many?: never; } /** * Base environment interface for walkerOS transformers. * * Minimal like Destination - just an extensible object. * Transformers receive dependencies through context, not env. */ interface BaseEnv$2 { [key: string]: unknown; } /** * Type bundle for transformer generics. * Groups Settings, InitSettings, and Env into a single type parameter. * Follows the Source/Destination pattern. * * @template S - Settings configuration type * @template E - Environment type * @template I - InitSettings configuration type (user input) */ interface Types$2 { settings: S; initSettings: I; env: E; } /** * Generic constraint for Types - ensures T has required properties for indexed access. */ type TypesGeneric$2 = { settings: any; initSettings: any; env: any; }; /** * Type extractors for consistent usage with Types bundle. */ type Settings$1 = T['settings']; type InitSettings$2 = T['initSettings']; type Env$2 = T['env']; /** * Transformer configuration. */ interface Config$2 { settings?: InitSettings$2; env?: Env$2; id?: string; logger?: Config$4; before?: Route; next?: Route; cache?: Cache; /** Declarative store get/set operations applied around this transformer. */ state?: State | State[]; init?: boolean; disabled?: boolean; /** Return this value instead of calling push(). Global mock for all chains. */ mock?: unknown; /** Path-specific mock values keyed by chain path (e.g., "destination.ga4.before"). Takes precedence over global mock. */ chainMocks?: Record; /** * Declarative event-to-event mapping applied when this transformer step * has no `code`. Same field name as on `Destination.Config`, but the * semantic differs by position: on a destination, `mapping` produces a * vendor-shaped payload; on a transformer step, it mutates the event * itself. The collector synthesizes a push that runs * `processEventMapping` and returns the transformed event (or drops it * when a rule has `ignore: true`). * * At the transformer position, only event-mutating fields apply: * `policy`, `mapping[].policy`, `mapping[].name`, `mapping[].ignore`, * `mapping[].consent`, `include`. Vendor-payload fields (`data`, * `mapping[].data`, `silent`) are ignored at this position with a * one-time warning. */ mapping?: Config$7; } /** * Context provided to transformer functions. * Extends base context with transformer-specific properties. */ interface Context$2 extends Base, Env$2> { id: string; ingest: Ingest; } /** * Unified result type for transformer functions. * Replaces the old union return type with a structured object. * * @field event - Modified event to continue with * @field respond - Wrapped respond function for downstream transformers * @field next - Branch to a different chain (replaces BranchResult) */ interface Result { event?: E; respond?: RespondFn; next?: Route; } /** * The main transformer function. * * Pre-collector transformers use default E = DeepPartialEvent. * Post-collector transformers can use E = Event for type-safe access. * A transformer written for DeepPartialEvent works in both positions * because Event is a subtype of DeepPartialEvent. * * @returns Result - structured result with event, respond, next * @returns Result[] - fan-out: each Result continues independently through remaining chain * @returns void - continue with current event unchanged (passthrough) * @returns false - stop chain, cancel further processing */ type Fn = (event: E, context: Context$2) => PromiseOrValue | Result[] | false | void>; /** * Optional initialization function. * Called once before first push. * * @param context - Transformer context * @returns void - initialization successful * @returns false - initialization failed, skip this transformer * @returns Config - return updated config */ type InitFn = (context: Context$2) => PromiseOrValue>; /** * Transformer instance returned by Init function. */ interface Instance$2 { type: string; config: Config$2; push: Fn; init?: InitFn; destroy?: DestroyFn, Env$2>; } /** * Transformer initialization function. * Creates a transformer instance from context. */ type Init$2 = (context: Context$2>, Env$2, InitSettings$2>>) => Instance$2 | Promise>; /** * Configuration for initializing a transformer. * Used in collector registration. */ type InitTransformer = { /** * Initialization function. When omitted, the entry is a pass-through step: * - If `mapping` is present, the collector synthesizes a mapping-only * push using `processEventMapping`. * - Otherwise it's a named hop that only hosts a `before` / `next` / * `cache` chain. * * Validation: an entry without `code` must declare at least one of * `package`, `before`, `next`, `cache`, `state`, `mapping`. Enforced by * `validateStepEntry` in `@walkeros/core`. */ code?: Init$2; config?: Partial>; env?: Partial>; before?: Route; next?: Route; cache?: Cache; state?: State | State[]; mapping?: Config$7; }; /** * Transformers configuration for collector. * Maps transformer IDs to their initialization configurations. */ interface InitTransformers { [transformerId: string]: InitTransformer; } /** * Base Env interface for dependency injection into sources. * * Sources receive all their dependencies through this environment object, * making them platform-agnostic and easily testable. */ interface BaseEnv$1 { [key: string]: unknown; push: PushFn$1; command: CommandFn; sources?: Sources; elb: Fn$2; logger: Instance$3; } /** * Type bundle for source generics. * Groups Settings, Mapping, Push, Env, InitSettings, and Setup into a single type parameter. * * @template S - Settings configuration type * @template M - Mapping configuration type * @template P - Push function signature (flexible to support HTTP handlers, etc.) * @template E - Environment dependencies type * @template I - InitSettings configuration type (user input) * @template U - Setup options type (provisioning options for `walkeros setup`) */ interface Types$1 { settings: S; initSettings: I; mapping: M; push: P; env: E; setup: U; credentials: C; } /** * Generic constraint for Types - ensures T has required properties for indexed access */ type TypesGeneric$1 = { settings: any; initSettings: any; mapping: any; push: any; env: any; setup: any; credentials: any; }; type InitSettings$1 = T['initSettings']; type Mapping = T['mapping']; type Push = T['push']; type Env$1 = T['env']; type SetupOptions$1 = T['setup']; type Credentials$1 = T['credentials']; interface Config$1 extends Config$7> { /** Implementation-specific configuration passed to the init function. */ settings?: InitSettings$1; /** * Optional, strictly-typed credentials slot ($env-resolved). The package * defines the shape via `Types['credentials']`. `settings.` stays the * escape hatch for raw SDK options. */ credentials?: Credentials$1; /** Runtime dependencies injected by the collector (push, command, logger, etc.). */ env?: Env$1; /** Source identifier; defaults to the InitSources object key. */ id?: string; /** Logger configuration (level, handler) to override the collector's defaults. */ logger?: Config$4; /** * Respond-first acknowledgement for response-producing server sources. * * When a source produces an HTTP response (express today; future fetch / * lambda), `async: true` (the default for such sources) responds 2xx * ("accepted") before the event is delivered to the collector, so the * client is not blocked on backend delivery. `async: false` waits for * delivery to settle before responding. A 2xx means "accepted", not * "delivered". * * Browser and dataLayer sources have no HTTP response to defer and ignore * this flag. The default is per source type. */ async?: boolean; /** Mark as primary source; its push function becomes the exported `elb` from startFlow. */ primary?: boolean; /** Defer source initialization until these collector events fire (e.g., `['consent']`). */ require?: string[]; /** * Provisioning options for `walkeros setup`. `boolean | object`. * Triggered only by explicit CLI invocation; never automatic. */ setup?: boolean | SetupOptions$1; /** * Ingest metadata extraction mapping. * Extracts values from raw request objects (Express req, Lambda event, etc.) * using walkerOS mapping syntax. Extracted data flows to transformers/destinations. * * @example * ingest: { * ip: 'req.ip', * ua: 'req.headers.user-agent', * origin: 'req.headers.origin' * } */ ingest?: Data$1; /** Completely skip this source — no init, no event capture. */ disabled?: boolean; /** * Init lifecycle flag. Set by the collector to `true` after `Instance.init()` * has been called. Used together with `require` to gate `on()` delivery: * lifecycle events are queued in `Instance.queueOn` until both * `config.init === true` and `config.require` is empty/absent, then replayed. */ init?: boolean; /** Declarative store get/set operations applied around this source. */ state?: State | State[]; } interface Instance$1 { type: string; config: Config$1; setup?: SetupFn, Env$1>; push: Push; destroy?: DestroyFn, Env$1>; on?(event: Types$3, context?: unknown): void | boolean | Promise; /** * Optional setup hook. Called by the collector eagerly after all source * factories have run, regardless of `config.require`. Use for prep work * such as draining a pre-init window queue or attaching DOM listeners. * The collector still gates `on()` delivery, and `Collector.push` * enforces `allowed`/consent at the destination layer. */ init?: () => void | Promise; /** * Lifecycle event queue. Populated by `onApply` when the source is not * yet started (`config.init !== true` or `config.require` non-empty). * Flushed by the collector when the source becomes started. */ queueOn?: Array<{ type: Types$3; data: unknown; }>; } /** * Per-scope environment passed to the body of `Source.Context.withScope`. * * Each call to `withScope` builds a fresh `ScopeEnv` whose `push` captures * the per-scope `ingest` and `respond`. Concurrent scopes cannot crosstalk: * each one carries its own ingest and respond all the way through the * pipeline. Server sources MUST use `withScope` per inbound request; sources * with a single logical scope (browser tab lifetime, dataLayer) may skip it * and use the factory-scope `env.push` directly. */ type ScopeEnv = Env$1 & { /** Per-scope push: captures the scope's ingest and respond for this call. */ push: PushFn$1; /** Ingest metadata extracted from the raw scope input (if config.ingest is set). */ ingest: Ingest; /** Respond function bound to this scope (undefined for scopes without a response). */ respond?: RespondFn; }; /** * Context provided to source init function. * Extends base context with source-specific properties. */ interface Context$1 extends Base>, Env$1> { id: string; /** * Bind ingest and respond to a single scope of work (e.g. one inbound * HTTP request, one queue message). Builds a fresh `Ingest` from the * raw input via `config.ingest` mapping, wires the per-scope `respond`, * and invokes `body(scopeEnv)` with a push function that captures both. * * Server sources call this once per inbound request: * * ```ts * await context.withScope(req, createRespond(sender), async (env) => { * await env.push(parsedData); * }); * ``` * * Browser sources with a single tab-lifetime scope may skip `withScope` * and use `env.push` directly. * * @param rawScope - Raw input for `config.ingest` mapping (Express req, * Lambda event, fetch Request, etc.). Pass `undefined` if no ingest * mapping applies. * @param respond - Per-scope respond function, or `undefined` if the * scope produces no response. * @param body - Async callback receiving the per-scope env. * @returns The body's return value. */ withScope: (rawScope: unknown, respond: RespondFn | undefined, body: (env: ScopeEnv) => Promise) => Promise; } type Init$1 = (context: Context$1) => Instance$1 | Promise>; type InitSource = { code: Init$1; config?: Partial>; env?: Partial>; primary?: boolean; next?: Route; before?: Route; cache?: Cache; state?: State | State[]; }; /** * Sources configuration for collector. * Maps source IDs to their initialization configurations. */ interface InitSources { [sourceId: string]: InitSource; } interface BaseEnv { [key: string]: unknown; } interface Types { settings: S; initSettings: I; env: E; setup: U; credentials: C; } type TypesGeneric = { settings: any; initSettings: any; env: any; setup: any; credentials: any; }; type Settings = T['settings']; type InitSettings = T['initSettings']; type Env = T['env']; type SetupOptions = T['setup']; type Credentials = T['credentials']; interface Config { settings?: InitSettings; /** * Optional, strictly-typed credentials slot ($env-resolved). The package * defines the shape via `Types['credentials']`. `settings.` stays the * escape hatch for raw SDK options. */ credentials?: Credentials; env?: Env; id?: string; logger?: Config$4; /** * Provisioning options for `walkeros setup`. `boolean | object`. * Triggered only by explicit CLI invocation; never automatic. */ setup?: boolean | SetupOptions; /** * Persist values as raw bytes, byte-exact, bypassing the structured codec. * Default false: values are structured `StoreValue` and pass through the * shared core serialization codec. Set true only on byte-native backends * (fs/s3/gcs) whose consumer needs the exact bytes back, e.g. serving an * asset such as walker.js. Structured-only backends (sheets) reject `file: * true` at init. One store instance is exactly one mode. */ file?: boolean; } interface Context extends Base, Env> { id: string; } /** * Canonical structured value persisted by a store. Includes `null`, but * EXCLUDES `undefined`: `undefined` is the reserved "miss" sentinel returned * by `GetFn` for an absent key, so it must never be a stored value. * `Uint8Array` is the platform-neutral binary leaf (never Node `Buffer`). */ type StoreValue = string | number | boolean | null | Uint8Array | StoreValue[] | { [key: string]: StoreValue; }; type GetFn = (key: string) => T | undefined | Promise; type SetFn = (key: string, value: T, /** * Optional expiry hint in ms; honored only by TTL-native backends * (in-memory, Redis). Byte/JSON backends may ignore it. Authoritative cache * expiry lives in the cache wrapper's {value, exp} payload. */ ttl?: number) => void | Promise; type DeleteFn = (key: string) => void | Promise; interface Instance { type: string; config: Config; get: GetFn; set: SetFn; delete: DeleteFn; setup?: SetupFn, Env>; destroy?: DestroyFn, Env>; } type Init = (context: Context>, Env, InitSettings>>) => Instance | Promise>; type InitStore = { code: Init; config?: Partial>; env?: Partial>; }; interface InitStores { [storeId: string]: InitStore; } type SingleOrArray = T | Array; type Events = Array; type DeepPartialEvent = DeepPartial; interface Event { name: string; data: Properties; context: OrderedProperties; globals: Properties; custom: Properties; user: User; nested: Entities; consent: Consent; id: string; trigger: string; entity: string; action: string; timestamp: number; timing: number; source: Source; } interface Consent { [name: string]: boolean; } interface User extends Properties { id?: string; device?: string; session?: string; hash?: string; address?: string; email?: string; phone?: string; userAgent?: string; browser?: string; browserVersion?: string; deviceType?: string; language?: string; country?: string; region?: string; city?: string; zip?: string; timezone?: string; os?: string; osVersion?: string; screenSize?: string; ip?: string; internal?: boolean; } type SourcePlatform = 'web' | 'server' | 'app' | 'ios' | 'android' | 'terminal' | string; interface Source extends Properties { type: string; platform?: SourcePlatform; /** Deployment version of the source emitter (string). */ version?: string; /** Event-model spec version. Collector defaults to "4". */ schema?: string; /** Emission sequence within the run. */ count?: number; /** Trace id shared by every event of a run (W3C trace-id shape). */ trace?: string; /** Walker-controlled standard suggestions (sources may set). */ url?: string; referrer?: string; tool?: string; command?: string; } type PropertyType = boolean | string | number | { [key: string]: Property; }; type Property = PropertyType | Array; interface Properties { [key: string]: Property | undefined; } interface OrderedProperties { [key: string]: [Property, number] | undefined; } type Entities = Array; interface Entity { entity: string; data: Properties; nested?: Entities; context?: OrderedProperties; } type DeepPartial = { [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; }; type PromiseOrValue = T | Promise; /** * Structural JSON Schema type. Kept dep-free (no `ajv` import in core) * so the runtime graph of any consumer of `@walkeros/core` does not pull * AJV transitively. */ type JsonSchema = Record; /** * Entity-action keyed event validation schemas. * Wildcard fallback semantic: entity.action → entity.* → *.action → *.*. */ type ValidateEvents = Record>; /** * Flow Configuration System (v4) * * Core types for walkerOS unified configuration. * Platform-agnostic, runtime-focused. * * The Flow system enables "one config to rule them all" - a single * walkeros.config.json file that manages multiple flows * (web_prod, web_stage, server_prod, etc.) with shared configuration * and reusable variables. * * Single declaration merge: `Flow` is both the interface for one flow * and the namespace holding all related types. * * ## Connection Rules * * Sources use `next` to connect to transformers (pre-collector chain). * Sources use `before` for consent-exempt pre-source preprocessing * (decode, validate, authenticate raw input before the source.next chain). * * Destinations use `before` to connect to transformers (post-collector chain). * Destinations use `next` for post-push processing. * * Transformers use `next` to chain to other transformers. The same transformer * pool is shared by both pre-collector and post-collector chains. * * The collector is implicit - it is never referenced directly in connections. * It sits between the source chain and the destination chain automatically. * * Circular `next` references are safely handled at runtime by `walkChain()` * in the collector module (visited-set detection). * * ``` * Source → [before → Preprocessing] → [next → Transformer chain] → Collector → [before → Transformer chain] → Destination → [next → Post-push] * ``` * * @packageDocumentation */ /** * Single flow configuration. * * Represents one deployment target (e.g., web_prod, server_stage). * Platform is determined by `config.platform` ('web' | 'server'). * * Variables cascade (resolveFlowSettings): step > flow > root config. * "step" applies uniformly to source, destination, transformer, and store. */ interface Flow { /** Per-flow configuration: platform, url, settings, bundle. */ config?: Flow.Config; /** * Source configurations (data capture). * * Sources capture events from various origins: * - Browser DOM interactions (clicks, page views) * - DataLayer pushes * - HTTP requests (server-side) * - Cloud function triggers * * Key = unique source identifier (arbitrary) * Value = source reference with package and config */ sources?: Record; /** * Destination configurations (data output). * * Destinations send processed events to external services: * - Google Analytics (gtag) * - Meta Pixel (fbq) * - Custom APIs * - Data warehouses * * Key = unique destination identifier (arbitrary) * Value = destination reference with package and config */ destinations?: Record; /** * Transformer configurations (event transformation). * * Pre-collector (source.next) or post-collector (destination.before). * * Key = unique transformer identifier (referenced by source.next or destination.before) * Value = transformer reference with package and config */ transformers?: Record; /** * Store configurations (key-value storage). * * Stores provide key-value storage consumed by sources, transformers, * and destinations via env injection. Referenced using $store.storeId * prefix in env values. * * Key = unique store identifier (arbitrary) * Value = store reference with package and config */ stores?: Record; /** * Collector configuration (event processing). * * The collector is the central event processing engine. * Configuration includes consent management, global properties, * user identification, and processing rules. */ collector?: InitConfig; /** * Flow-level variables. * Override root variables; overridden by source/destination variables. */ variables?: Flow.Variables; } declare namespace Flow { /** * Complete multi-flow configuration. * Root type for walkeros.config.json files. * * If only one flow exists, it's auto-selected without --flow flag. * Convention: use "default" as the flow name for single-flow configs. * * @example * ```json * { * "version": 4, * "$schema": "https://walkeros.io/schema/flow/v4.json", * "variables": { "CURRENCY": "USD" }, * "flows": { * "default": { "config": { "platform": "web" } } * } * } * ``` */ interface Json { /** Configuration schema version. */ version: 4; /** * JSON Schema reference for IDE validation. * @example "https://walkeros.io/schema/flow/v4.json" */ $schema?: string; /** * Folders to include in the bundle output. * Copied to dist/ during bundle, available at runtime for both local and Docker execution. * * Use for credential files, configuration, or other runtime assets. * Paths are relative to the config file location. * Default: `["./shared"]` if the folder exists, otherwise `[]`. */ include?: string[]; /** * Shared variables for interpolation. * Resolution: destination/source > flow > root. * Syntax: $var.name */ variables?: Variables; /** * Data contract definition. * Entity → action keyed JSON Schema with additive inheritance. */ contract?: Contract; /** * Named flow configurations. * If only one flow exists, it's auto-selected. */ flows: Record; } /** * Per-flow configuration block. * * Groups platform identity, optional public URL, arbitrary settings bag, * and bundle (build-time) configuration. */ interface Config { /** * Platform identity for this flow. * - `web` builds to IIFE format, ES2020 target, browser platform. * - `server` builds to ESM format, Node18 target, node platform. */ platform: 'web' | 'server'; /** * Public URL where this flow is reachable (for cross-flow `$flow.X.url` references). * Set explicitly by the user; the deployment process does not auto-populate it. */ url?: string; /** * Arbitrary key-value settings consumed by the platform runtime. * * For web: typical keys include `windowCollector`, `windowElb`. * For server: reserved for future server-specific options. * * This is a free-form bag — type promotion happens later if patterns emerge. */ settings?: Settings; /** * Bundle configuration: NPM packages to include, transitive dependency * overrides, and extra trace includes for server bundles. * Consumed by the CLI bundler at build time. */ bundle?: Bundle; /** * Observability configuration. Controls whether the runtime emits * FlowState records to a remote observer, and at what verbosity. * * When omitted, the runtime defaults to `{ level: 'standard' }` for * managed deployments. When `level: 'off'`, the bundle ships no * telemetry plumbing at all. */ observe?: Observe; } /** * Observability configuration block. * * - `off` disables telemetry entirely (no hooks installed, no fetch). * - `standard` emits structural FlowState records (no inEvent/outEvent). * - `trace` emits full payloads on every hop. Use only for short debug * windows; the operator can also flip the deployment's `trace_until` * timestamp at runtime to enable trace without a redeploy. */ interface Observe { level?: 'off' | 'standard' | 'trace'; /** Deterministic sample fraction in [0, 1]. Defaults to 1. */ sample?: number; } /** * Reusable values referenced via `$var.name` (with optional deep paths). * Whole-string references preserve native type; inline interpolation requires scalars. */ type Variables = Record; /** * Free-form settings bag inside `Flow.Config.settings`. * Mirrors the package settings convention (arbitrary keys). */ type Settings = Record; /** * Bundle configuration for a flow. * * Groups all build-time bundling concerns: NPM packages to include, * transitive dependency overrides, and extra trace includes (server only). * Consumed by the CLI bundler. * * The `flow.config.bundle.external` sub-field is no longer supported * (replaced by nft tracing in @walkeros/cli@4.x). */ interface Bundle { /** NPM packages to bundle, keyed by package name. */ packages?: Record; /** * Transitive dependency version pins. * * Maps package name to version spec. Applied during bundle package install * to force transitive dependencies to a specific version. Useful for * resolving conflicts between packages that depend on incompatible * versions of a shared dependency. * * @example * ```json * { * "@amplitude/analytics-types": "2.11.1" * } * ``` */ overrides?: Record; /** * Extra paths the bundler must include in the trace output. * * Each entry is either a literal path or a glob (matched via picomatch), * resolved against the bundler's install root. Use as an escape hatch * when the file tracer cannot statically discover an asset (e.g., * dynamic require, runtime configuration files). * * Server flows only. */ traceInclude?: string[]; } /** * Single bundle package entry. */ interface BundlePackage { /** Version specifier (e.g., 'latest', '^2.0.0', '2.1.3'). */ version?: string; /** Named imports to expose from the package. */ imports?: string[]; /** Local path to package directory (takes precedence over version). */ path?: string; } /** * Inline code definition for sources/destinations/transformers/stores. * Used instead of `package` when defining inline functions. */ interface Code { /** "$code:..." function (required). */ push: string; /** Optional instance type identifier. */ type?: string; /** Optional "$code:..." init function. */ init?: string; } /** * Source reference with inline package syntax. * * References a source package and provides configuration. * The package is automatically downloaded and imported during build. * Alternatively, use `code` (string or inline Code) for inline code execution. */ interface Source { /** * Package specifier with optional version. * * Formats: * - `"@walkeros/web-source-browser"` - latest * - `"@walkeros/web-source-browser@2.0.0"` - exact * - `"@walkeros/web-source-browser@^2.0.0"` - semver range * * Optional when `code` is used for inline code execution. */ package?: string; /** * Inline code definition (object form only). * * Object: `{push, type?, init?}` for inline code definition. * For named-export selection from a package, use the `import` field with `package`. */ code?: Code; /** * Named export from `package` to import as this source's implementation. * * Requires `package` to be set. Mutually exclusive with `code`. * * - Top-level identifier only: `/^[A-Za-z_$][A-Za-z0-9_$]*$/`. No dotted paths. * - `package: "X"` alone (no `import`, no `code`) loads X's default export. * - `package: "X"` + `import: "fooFactory"` loads named export `fooFactory` from X. * * @example * ```json * { "package": "@walkeros/web-source-browser", "import": "sourceBrowser" } * ``` */ import?: string; /** * Source-specific configuration. Structure depends on the source package. * Passed to the source's initialization function. */ config?: unknown; /** * Source environment configuration. * Environment-specific settings merged with default source environment. */ env?: unknown; /** * Mark as primary source (provides main ELB). * * The primary source's ELB function is returned by `startFlow()`. * Only one source should be marked as primary per flow. * * @default false */ primary?: boolean; /** * First transformer in pre-source chain (consent-exempt). * * Runs before source.next chain. Consent-exempt because no analytics * event exists yet - these transformers handle transport-level preprocessing * (decode, validate, authenticate, normalize raw input). * Raw request data is available in context.ingest. */ before?: Route; /** * First transformer in pre-collector chain. * * Name of the transformer to execute after this source captures an event. * Creates a pre-collector transformer chain. Chain ends at the collector. * If omitted, events route directly to the collector. * Can be an array for explicit chain control (bypasses transformer.next resolution). */ next?: Route; /** Cache configuration for this source. */ cache?: Cache; /** * Source-level variables (highest priority in cascade). * Overrides flow and root variables. */ variables?: Variables; /** * Named examples for testing and documentation. * Stripped during flow resolution (not included in bundles). */ examples?: StepExamples; } /** * Destination reference with inline package syntax. * * References a destination package and provides configuration. * Structure mirrors `Flow.Source` for consistency. */ interface Destination { /** Package specifier with optional version. Optional when `code` is provided. */ package?: string; /** * Inline code definition (object form only). * * Object: `{push, type?, init?}` for inline code definition. * For named-export selection from a package, use the `import` field with `package`. */ code?: Code; /** * Named export from `package` to import as this destination's implementation. * See `Flow.Source.import` for full rules. * * @example * ```json * { "package": "@walkeros/web-destination-gtag", "import": "destinationGtag" } * ``` */ import?: string; /** * Destination-specific configuration. Typically includes: * - settings: API keys, IDs, endpoints * - mapping: Event transformation rules * - consent: Required consent states * - policy: Processing rules */ config?: unknown; /** Destination environment configuration, merged with default destination environment. */ env?: unknown; /** * First transformer in post-collector chain. * * Name of the transformer to execute before sending events to this destination. * If omitted, events are sent directly from the collector. * Can be an array for explicit chain control. */ before?: Route; /** * First transformer in post-push chain. * * Runs after destination.push completes. The push response is available * at context.ingest._response. Consent is inherited from the destination * gate - no separate consent check needed. */ next?: Route; /** Cache configuration for this destination. */ cache?: Cache; /** Destination-level variables (highest priority in cascade). */ variables?: Variables; /** * Named examples for testing and documentation. * Stripped during flow resolution. */ examples?: StepExamples; } /** * Transformer reference with inline package syntax. * * Transformers transform events in the pipeline between sources and destinations. * Alternatively, use `code` for inline code execution. */ interface Transformer { /** Package specifier with optional version. Optional when `code` is provided. */ package?: string; /** * Inline code definition (object form only). * * Object: `{push, type?, init?}` for inline code definition. * For named-export selection from a package, use the `import` field with `package`. */ code?: Code; /** * Named export from `package` to import as this transformer's implementation. * See `Flow.Source.import` for full rules. * * @example * ```json * { "package": "@walkeros/transformer-ga4", "import": "transformerGa4" } * ``` */ import?: string; /** Transformer-specific configuration. Structure depends on the package. */ config?: unknown; /** Transformer environment configuration. */ env?: unknown; /** * Pre-transformer chain. * * Runs before this transformer's push function. * Enables pre-processing or context loading before the main transform. * Uses the same chain resolution as source.next and destination.before. */ before?: Route; /** * Next transformer in chain. * * Name of the next transformer to execute after this one. * In a pre-collector chain (source.next), terminates at the collector. * In a post-collector chain (destination.before), terminates at the destination. * If omitted, the chain ends and control passes to the next pipeline stage. * Array values define an explicit chain (no walking). Circular references * are safely detected at runtime by `walkChain()`. */ next?: Route; /** Cache configuration for this transformer. */ cache?: Cache; /** Transformer-level variables (highest priority in cascade). */ variables?: Variables; /** * Named examples for testing and documentation. * Stripped during flow resolution. */ examples?: StepExamples; } /** * Store reference with inline package syntax. * * Stores provide key-value storage consumed by other components via env. * Unlike sources/transformers/destinations, stores have no chain properties * (no `next` or `before`) - they are passive infrastructure. */ interface Store { /** Package specifier with optional version. Optional when `code` is provided. */ package?: string; /** * Inline code definition (object form only). * * Object: `{push, type?, init?}` for inline code definition. * For named-export selection from a package, use the `import` field with `package`. */ code?: Code; /** * Named export from `package` to import as this store's implementation. * See `Flow.Source.import` for full rules. * * @example * ```json * { "package": "@walkeros/server-store-fs", "import": "storeFs" } * ``` */ import?: string; /** Store-specific configuration. */ config?: unknown; /** Store environment configuration. */ env?: unknown; /** * Cache configuration for this store. * * When present, the collector wraps the bare store with a cache layer * (read-through, write-through, single-flight). The cache layer may * recursively delegate to another store via `cache.store`. */ cache?: Cache; /** Store-level variables (highest priority in cascade). */ variables?: Variables; /** * Named examples for testing and documentation. * Stripped during flow resolution. */ examples?: StepExamples; } /** * Discriminator for the four step kinds in a Flow. * * Single source of truth for code that branches on step kind (bundler * codegen, validators, CLI helpers). */ type StepKind = 'Source' | 'Transformer' | 'Destination' | 'Store'; /** * Union of the four step interfaces. * * Use this where a function accepts "any step in a flow" — e.g. a * shared `validateReference` that branches on `StepKind` without * narrowing to one specific shape. */ type Step = Source | Transformer | Destination | Store; /** * Named contract map. * Each key is a contract name, each value is a contract rule. * * @example * ```json * { * "default": { "globals": { ... }, "consent": { ... } }, * "web": { "extend": "default", "events": { ... } }, * "server": { "extend": "default", "events": { ... } } * } * ``` */ type Contract = Record; /** * A single named contract rule. * * All sections are optional. Sections mirror WalkerOS.Event fields: * globals, context, custom, user, consent. * Entity-action schemas live under `events`. * * Use `extend` to inherit from another named contract (additive merge). */ interface ContractRule { /** Inherit from another named contract entry. */ extend?: string; /** Contract revision marker. */ tagging?: number; /** Human-readable note. */ description?: string; /** Entity-action keyed JSON Schemas (wildcard fallback at runtime). */ events?: ValidateEvents; /** JSON Schema for the full event. */ schema?: JsonSchema; } /** * JSON Schema object for contract rule validation. * Standard JSON Schema with description/examples annotations. * Compatible with AJV for runtime validation. */ type ContractSchema = Record; /** * Contract action entries keyed by action name. * Each value is a JSON Schema describing the expected WalkerOS.Event shape. * Use "*" as wildcard for all actions of an entity. */ type ContractActions = Record; /** * Entity-action event map used inside contracts. * Keyed by entity name, each value is an action map. * Use "*" as wildcard for all entities or all actions. */ type ContractEvents = Record; /** * Walker command names that a step example can invoke instead of pushing * its `in` as a regular event. Mirrors the `elb('walker ', ...)` * surface in `WalkerCommands` (see types/elb.ts). * * - `config` - update collector config (maps to `elb('walker config', in)`) * - `consent` - update consent state (maps to `elb('walker consent', in)`) * - `user` - update user identification (maps to `elb('walker user', in)`) * - `run` - fire run state (maps to `elb('walker run', in)`) * * Note: `walker destination`, `walker hook`, and `walker on` are * intentionally excluded - they configure wiring, not test data. */ type StepCommand = 'config' | 'consent' | 'user' | 'run'; /** One observable effect: function/method call (`[callable, ...args]`) or return value (`['return', value]`). */ type StepEffect = readonly [callable: string, ...args: unknown[]]; /** The effects a step produces, in execution order. Empty = no observable effect (filtered, passthrough). */ type StepOut = readonly StepEffect[]; /** * Named example pair for a step. * `in` is the input to the step, `out` is the expected output. * * When `command` is set, the test runner invokes * `elb('walker ', in)` instead of pushing `in` as a regular event. * When `command` is absent (default), `in` is pushed as a normal event via * `elb(event)`. */ interface StepExample { /** Human-readable title (overrides camelCase-to-spaced default heading in docs). */ title?: string; description?: string; /** * Whether this example is meant for public consumption (docs, UI, MCP default output). * Defaults to `true`. Set to `false` for test-only fixtures that should stay out of * user-facing surfaces but still run in test suites and remain available to * `flow_simulate` / CLI `--simulate`. */ public?: boolean; in?: unknown; /** Trigger metadata for sources - type and options for the trigger call. */ trigger?: { /** Which mechanism to activate (e.g., 'click', 'POST', 'load'). */ type?: string; /** Mechanism-specific options (e.g., CSS selector, threshold). */ options?: unknown; }; mapping?: unknown; out?: StepOut; /** * Invoke a walker command with `in` instead of pushing `in` as an event. * When set, the test runner calls `elb('walker ', in)`. * When absent (default), `in` is pushed as a regular event. */ command?: StepCommand; } /** Named step examples keyed by scenario name. */ type StepExamples = Record; } type StepOut = Flow.StepOut; /** * Format a step example's `out` as readable code for docs/app rendering. * * - Empty `out` → `// no output`. * - `['return', value]` → `return ` (no parentheses). * - `[callable, ...args]` → `callable()`. * - Primitive args render as JSON (strings quoted, numbers/booleans/null bare). * - `undefined` renders as the literal token `undefined`. * - Objects/arrays render as `JSON.stringify(v, null, 2)`. * - Functions render as `[Function]` (rare in outs; safe fallback). * * Pure function. No runtime dependencies. Used by the website * `` renderer and the app `OutputPanel` for a single source of truth. */ declare function formatOut(out: StepOut): string; export { ClickIdEntrySchema, Flow, type JSONSchema, formatOut, mergeConfigSchema, resolveBaseSchema, index as schemas, zodToSchema };