@walkeros/core 1.2.2 → 1.4.0-next-1771252576264
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev.d.mts +1 -15
- package/dist/dev.d.ts +1 -15
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/index.d.mts +119 -15
- package/dist/index.d.ts +119 -15
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/dev.d.mts
CHANGED
|
@@ -106,13 +106,6 @@ declare const InitConfig: z.ZodObject<{
|
|
|
106
106
|
init: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
107
107
|
loadScript: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
108
108
|
}, z.core.$strip>;
|
|
109
|
-
/**
|
|
110
|
-
* DisabledConfig - Disabled flag configuration
|
|
111
|
-
* Used in: Source.Config
|
|
112
|
-
*/
|
|
113
|
-
declare const DisabledConfig: z.ZodObject<{
|
|
114
|
-
disabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
115
|
-
}, z.core.$strip>;
|
|
116
109
|
/**
|
|
117
110
|
* PrimaryConfig - Primary flag configuration
|
|
118
111
|
* Used in: Source.Config, Source.InitSource
|
|
@@ -2487,7 +2480,6 @@ declare const BaseEnvSchema: z.ZodObject<{
|
|
|
2487
2480
|
* - env: Environment dependencies
|
|
2488
2481
|
* - id: Source identifier
|
|
2489
2482
|
* - onError: Error handler
|
|
2490
|
-
* - disabled: Disable source
|
|
2491
2483
|
* - primary: Primary source flag (only one can be primary)
|
|
2492
2484
|
*
|
|
2493
2485
|
* Generic note: settings, env, and mapping can have source-specific types
|
|
@@ -2524,7 +2516,6 @@ declare const ConfigSchema$1: z.ZodObject<{
|
|
|
2524
2516
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2525
2517
|
id: z.ZodOptional<z.ZodString>;
|
|
2526
2518
|
onError: z.ZodOptional<z.ZodAny>;
|
|
2527
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2528
2519
|
primary: z.ZodOptional<z.ZodBoolean>;
|
|
2529
2520
|
}, z.core.$strip>;
|
|
2530
2521
|
/**
|
|
@@ -2566,7 +2557,6 @@ declare const PartialConfigSchema: z.ZodObject<{
|
|
|
2566
2557
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
2567
2558
|
id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2568
2559
|
onError: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
|
|
2569
|
-
disabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2570
2560
|
primary: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2571
2561
|
}, z.core.$strip>;
|
|
2572
2562
|
/**
|
|
@@ -2624,7 +2614,6 @@ declare const InstanceSchema: z.ZodObject<{
|
|
|
2624
2614
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2625
2615
|
id: z.ZodOptional<z.ZodString>;
|
|
2626
2616
|
onError: z.ZodOptional<z.ZodAny>;
|
|
2627
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2628
2617
|
primary: z.ZodOptional<z.ZodBoolean>;
|
|
2629
2618
|
}, z.core.$strip>;
|
|
2630
2619
|
push: z.ZodAny;
|
|
@@ -2691,7 +2680,6 @@ declare const InitSourceSchema: z.ZodObject<{
|
|
|
2691
2680
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
2692
2681
|
id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2693
2682
|
onError: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
|
|
2694
|
-
disabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2695
2683
|
primary: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2696
2684
|
}, z.core.$strip>>;
|
|
2697
2685
|
env: z.ZodOptional<z.ZodObject<{
|
|
@@ -2739,7 +2727,6 @@ declare const InitSourcesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
2739
2727
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
2740
2728
|
id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2741
2729
|
onError: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
|
|
2742
|
-
disabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2743
2730
|
primary: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2744
2731
|
}, z.core.$strip>>;
|
|
2745
2732
|
env: z.ZodOptional<z.ZodObject<{
|
|
@@ -3655,7 +3642,6 @@ declare const index_Counter: typeof Counter;
|
|
|
3655
3642
|
declare const index_DeepPartialEventSchema: typeof DeepPartialEventSchema;
|
|
3656
3643
|
declare const index_DestinationReferenceSchema: typeof DestinationReferenceSchema;
|
|
3657
3644
|
declare const index_DestinationsMapConfig: typeof DestinationsMapConfig;
|
|
3658
|
-
declare const index_DisabledConfig: typeof DisabledConfig;
|
|
3659
3645
|
declare const index_EntitiesSchema: typeof EntitiesSchema;
|
|
3660
3646
|
declare const index_EntitySchema: typeof EntitySchema;
|
|
3661
3647
|
declare const index_EventSchema: typeof EventSchema;
|
|
@@ -3736,7 +3722,7 @@ declare const index_valueJsonSchema: typeof valueJsonSchema;
|
|
|
3736
3722
|
declare const index_z: typeof z;
|
|
3737
3723
|
declare const index_zodToSchema: typeof zodToSchema;
|
|
3738
3724
|
declare namespace index {
|
|
3739
|
-
export { index_BaseContextConfig as BaseContextConfig, index_BatchConfig as BatchConfig, collector as CollectorSchemas, index_ConsentSchema as ConsentSchema, index_Counter as Counter, index_DeepPartialEventSchema as DeepPartialEventSchema, index_DestinationReferenceSchema as DestinationReferenceSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig,
|
|
3725
|
+
export { index_BaseContextConfig as BaseContextConfig, index_BatchConfig as BatchConfig, collector as CollectorSchemas, index_ConsentSchema as ConsentSchema, index_Counter as Counter, index_DeepPartialEventSchema as DeepPartialEventSchema, index_DestinationReferenceSchema as DestinationReferenceSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventSchema as EventSchema, ConfigSchema as FlowConfigSchema, flow as FlowSchemas, index_GenericEnvConfig as GenericEnvConfig, index_GenericSettingsConfig as GenericSettingsConfig, index_HandlersConfig as HandlersConfig, index_IdConfig as IdConfig, index_Identifier as Identifier, index_InitConfig as InitConfig, type index_JSONSchema as JSONSchema, index_LoopSchema as LoopSchema, index_MapSchema as MapSchema, ResultSchema$1 as MappingResultSchema, mapping as MappingSchemas, index_OptionalPrimitiveValue as OptionalPrimitiveValue, index_OrderedPropertiesSchema as OrderedPropertiesSchema, index_PartialEventSchema as PartialEventSchema, index_PolicySchema as PolicySchema, index_PrimaryConfig as PrimaryConfig, index_PrimitiveSchema as PrimitiveSchema, 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_RuleSchema as RuleSchema, index_RulesSchema as RulesSchema, index_RuntimeInstanceConfig as RuntimeInstanceConfig, index_SetSchema as SetSchema, index_SetupSchema as SetupSchema, index_SourceReferenceSchema as SourceReferenceSchema, index_SourceSchema as SourceSchema, source as SourceSchemas, index_SourceTypeSchema as SourceTypeSchema, index_SourcesMapConfig as SourcesMapConfig, index_TaggingVersion as TaggingVersion, index_Timestamp as Timestamp, index_UserSchema as UserSchema, utilities as UtilitySchemas, index_ValueConfigSchema as ValueConfigSchema, index_ValueSchema as ValueSchema, index_ValuesSchema as ValuesSchema, index_VerboseConfig as VerboseConfig, index_VersionSchema as VersionSchema, walkeros as WalkerOSSchemas, index_configJsonSchema as configJsonSchema, index_consentJsonSchema as consentJsonSchema, 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_destinationReferenceJsonSchema as destinationReferenceJsonSchema, index_entityJsonSchema as entityJsonSchema, index_eventJsonSchema as eventJsonSchema, index_loopJsonSchema as loopJsonSchema, index_mapJsonSchema as mapJsonSchema, index_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, index_parseConfig as parseConfig, index_parseSetup as parseSetup, 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_safeParseSetup as safeParseSetup, index_setJsonSchema as setJsonSchema, index_setupJsonSchema as setupJsonSchema, index_sourceReferenceJsonSchema as sourceReferenceJsonSchema, index_sourceTypeJsonSchema as sourceTypeJsonSchema, index_userJsonSchema as userJsonSchema, index_valueConfigJsonSchema as valueConfigJsonSchema, index_valueJsonSchema as valueJsonSchema, index_z as z, index_zodToSchema as zodToSchema };
|
|
3740
3726
|
}
|
|
3741
3727
|
|
|
3742
3728
|
export { type JSONSchema, index as schemas, zodToSchema };
|
package/dist/dev.d.ts
CHANGED
|
@@ -106,13 +106,6 @@ declare const InitConfig: z.ZodObject<{
|
|
|
106
106
|
init: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
107
107
|
loadScript: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
108
108
|
}, z.core.$strip>;
|
|
109
|
-
/**
|
|
110
|
-
* DisabledConfig - Disabled flag configuration
|
|
111
|
-
* Used in: Source.Config
|
|
112
|
-
*/
|
|
113
|
-
declare const DisabledConfig: z.ZodObject<{
|
|
114
|
-
disabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
115
|
-
}, z.core.$strip>;
|
|
116
109
|
/**
|
|
117
110
|
* PrimaryConfig - Primary flag configuration
|
|
118
111
|
* Used in: Source.Config, Source.InitSource
|
|
@@ -2487,7 +2480,6 @@ declare const BaseEnvSchema: z.ZodObject<{
|
|
|
2487
2480
|
* - env: Environment dependencies
|
|
2488
2481
|
* - id: Source identifier
|
|
2489
2482
|
* - onError: Error handler
|
|
2490
|
-
* - disabled: Disable source
|
|
2491
2483
|
* - primary: Primary source flag (only one can be primary)
|
|
2492
2484
|
*
|
|
2493
2485
|
* Generic note: settings, env, and mapping can have source-specific types
|
|
@@ -2524,7 +2516,6 @@ declare const ConfigSchema$1: z.ZodObject<{
|
|
|
2524
2516
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2525
2517
|
id: z.ZodOptional<z.ZodString>;
|
|
2526
2518
|
onError: z.ZodOptional<z.ZodAny>;
|
|
2527
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2528
2519
|
primary: z.ZodOptional<z.ZodBoolean>;
|
|
2529
2520
|
}, z.core.$strip>;
|
|
2530
2521
|
/**
|
|
@@ -2566,7 +2557,6 @@ declare const PartialConfigSchema: z.ZodObject<{
|
|
|
2566
2557
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
2567
2558
|
id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2568
2559
|
onError: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
|
|
2569
|
-
disabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2570
2560
|
primary: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2571
2561
|
}, z.core.$strip>;
|
|
2572
2562
|
/**
|
|
@@ -2624,7 +2614,6 @@ declare const InstanceSchema: z.ZodObject<{
|
|
|
2624
2614
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
2625
2615
|
id: z.ZodOptional<z.ZodString>;
|
|
2626
2616
|
onError: z.ZodOptional<z.ZodAny>;
|
|
2627
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2628
2617
|
primary: z.ZodOptional<z.ZodBoolean>;
|
|
2629
2618
|
}, z.core.$strip>;
|
|
2630
2619
|
push: z.ZodAny;
|
|
@@ -2691,7 +2680,6 @@ declare const InitSourceSchema: z.ZodObject<{
|
|
|
2691
2680
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
2692
2681
|
id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2693
2682
|
onError: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
|
|
2694
|
-
disabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2695
2683
|
primary: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2696
2684
|
}, z.core.$strip>>;
|
|
2697
2685
|
env: z.ZodOptional<z.ZodObject<{
|
|
@@ -2739,7 +2727,6 @@ declare const InitSourcesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
2739
2727
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
2740
2728
|
id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2741
2729
|
onError: z.ZodOptional<z.ZodOptional<z.ZodAny>>;
|
|
2742
|
-
disabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2743
2730
|
primary: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2744
2731
|
}, z.core.$strip>>;
|
|
2745
2732
|
env: z.ZodOptional<z.ZodObject<{
|
|
@@ -3655,7 +3642,6 @@ declare const index_Counter: typeof Counter;
|
|
|
3655
3642
|
declare const index_DeepPartialEventSchema: typeof DeepPartialEventSchema;
|
|
3656
3643
|
declare const index_DestinationReferenceSchema: typeof DestinationReferenceSchema;
|
|
3657
3644
|
declare const index_DestinationsMapConfig: typeof DestinationsMapConfig;
|
|
3658
|
-
declare const index_DisabledConfig: typeof DisabledConfig;
|
|
3659
3645
|
declare const index_EntitiesSchema: typeof EntitiesSchema;
|
|
3660
3646
|
declare const index_EntitySchema: typeof EntitySchema;
|
|
3661
3647
|
declare const index_EventSchema: typeof EventSchema;
|
|
@@ -3736,7 +3722,7 @@ declare const index_valueJsonSchema: typeof valueJsonSchema;
|
|
|
3736
3722
|
declare const index_z: typeof z;
|
|
3737
3723
|
declare const index_zodToSchema: typeof zodToSchema;
|
|
3738
3724
|
declare namespace index {
|
|
3739
|
-
export { index_BaseContextConfig as BaseContextConfig, index_BatchConfig as BatchConfig, collector as CollectorSchemas, index_ConsentSchema as ConsentSchema, index_Counter as Counter, index_DeepPartialEventSchema as DeepPartialEventSchema, index_DestinationReferenceSchema as DestinationReferenceSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig,
|
|
3725
|
+
export { index_BaseContextConfig as BaseContextConfig, index_BatchConfig as BatchConfig, collector as CollectorSchemas, index_ConsentSchema as ConsentSchema, index_Counter as Counter, index_DeepPartialEventSchema as DeepPartialEventSchema, index_DestinationReferenceSchema as DestinationReferenceSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventSchema as EventSchema, ConfigSchema as FlowConfigSchema, flow as FlowSchemas, index_GenericEnvConfig as GenericEnvConfig, index_GenericSettingsConfig as GenericSettingsConfig, index_HandlersConfig as HandlersConfig, index_IdConfig as IdConfig, index_Identifier as Identifier, index_InitConfig as InitConfig, type index_JSONSchema as JSONSchema, index_LoopSchema as LoopSchema, index_MapSchema as MapSchema, ResultSchema$1 as MappingResultSchema, mapping as MappingSchemas, index_OptionalPrimitiveValue as OptionalPrimitiveValue, index_OrderedPropertiesSchema as OrderedPropertiesSchema, index_PartialEventSchema as PartialEventSchema, index_PolicySchema as PolicySchema, index_PrimaryConfig as PrimaryConfig, index_PrimitiveSchema as PrimitiveSchema, 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_RuleSchema as RuleSchema, index_RulesSchema as RulesSchema, index_RuntimeInstanceConfig as RuntimeInstanceConfig, index_SetSchema as SetSchema, index_SetupSchema as SetupSchema, index_SourceReferenceSchema as SourceReferenceSchema, index_SourceSchema as SourceSchema, source as SourceSchemas, index_SourceTypeSchema as SourceTypeSchema, index_SourcesMapConfig as SourcesMapConfig, index_TaggingVersion as TaggingVersion, index_Timestamp as Timestamp, index_UserSchema as UserSchema, utilities as UtilitySchemas, index_ValueConfigSchema as ValueConfigSchema, index_ValueSchema as ValueSchema, index_ValuesSchema as ValuesSchema, index_VerboseConfig as VerboseConfig, index_VersionSchema as VersionSchema, walkeros as WalkerOSSchemas, index_configJsonSchema as configJsonSchema, index_consentJsonSchema as consentJsonSchema, 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_destinationReferenceJsonSchema as destinationReferenceJsonSchema, index_entityJsonSchema as entityJsonSchema, index_eventJsonSchema as eventJsonSchema, index_loopJsonSchema as loopJsonSchema, index_mapJsonSchema as mapJsonSchema, index_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, index_parseConfig as parseConfig, index_parseSetup as parseSetup, 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_safeParseSetup as safeParseSetup, index_setJsonSchema as setJsonSchema, index_setupJsonSchema as setupJsonSchema, index_sourceReferenceJsonSchema as sourceReferenceJsonSchema, index_sourceTypeJsonSchema as sourceTypeJsonSchema, index_userJsonSchema as userJsonSchema, index_valueConfigJsonSchema as valueConfigJsonSchema, index_valueJsonSchema as valueJsonSchema, index_z as z, index_zodToSchema as zodToSchema };
|
|
3740
3726
|
}
|
|
3741
3727
|
|
|
3742
3728
|
export { type JSONSchema, index as schemas, zodToSchema };
|
package/dist/dev.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,t=Object.prototype.hasOwnProperty,r=(e,n)=>{for(var o in n)i(e,o,{get:n[o],enumerable:!0})},a={};r(a,{schemas:()=>s,z:()=>c.z,zodToSchema:()=>gn}),module.exports=(e=a,((e,r,a,s)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let c of o(r))t.call(e,c)||c===a||i(e,c,{get:()=>r[c],enumerable:!(s=n(r,c))||s.enumerable});return e})(i({},"__esModule",{value:!0}),e));var s={};r(s,{BaseContextConfig:()=>H,BatchConfig:()=>F,CollectorSchemas:()=>ui,ConsentSchema:()=>ne,Counter:()=>g,DeepPartialEventSchema:()=>de,DestinationReferenceSchema:()=>Xi,DestinationSchemas:()=>Ne,DestinationsMapConfig:()=>Q,DisabledConfig:()=>T,EntitiesSchema:()=>se,EntitySchema:()=>ae,EventSchema:()=>ce,FlowConfigSchema:()=>Yi,FlowSchemas:()=>Bi,GenericEnvConfig:()=>U,GenericSettingsConfig:()=>q,HandlersConfig:()=>D,IdConfig:()=>L,Identifier:()=>b,InitConfig:()=>O,LoopSchema:()=>we,MapSchema:()=>Ce,MappingResultSchema:()=>De,MappingSchemas:()=>ve,OptionalPrimitiveValue:()=>z,OrderedPropertiesSchema:()=>ee,PartialEventSchema:()=>le,PolicySchema:()=>Pe,PrimaryConfig:()=>M,PrimitiveSchema:()=>Vi,PrimitiveValue:()=>h,ProcessingControlConfig:()=>G,PropertiesSchema:()=>Z,PropertySchema:()=>Y,PropertyTypeSchema:()=>X,QueueConfig:()=>R,RequiredBoolean:()=>u,RequiredNumber:()=>p,RequiredString:()=>d,RuleSchema:()=>Je,RulesSchema:()=>Ee,RuntimeInstanceConfig:()=>A,SetSchema:()=>ke,SetupSchema:()=>Zi,SourceReferenceSchema:()=>_i,SourceSchema:()=>re,SourceSchemas:()=>Ji,SourceTypeSchema:()=>ie,SourcesMapConfig:()=>$,TaggingVersion:()=>f,Timestamp:()=>m,UserSchema:()=>oe,UtilitySchemas:()=>v,ValueConfigSchema:()=>je,ValueSchema:()=>Se,ValuesSchema:()=>ye,VerboseConfig:()=>I,VersionSchema:()=>te,WalkerOSSchemas:()=>_,configJsonSchema:()=>an,consentJsonSchema:()=>ze,createArraySchema:()=>un,createConsentConfig:()=>V,createDataTransformationConfig:()=>W,createEnumSchema:()=>bn,createMappingRulesConfig:()=>N,createObjectSchema:()=>dn,createPolicyConfig:()=>B,createTupleSchema:()=>mn,destinationReferenceJsonSchema:()=>cn,entityJsonSchema:()=>fe,eventJsonSchema:()=>pe,loopJsonSchema:()=>Le,mapJsonSchema:()=>Te,orderedPropertiesJsonSchema:()=>ge,parseConfig:()=>on,parseSetup:()=>en,partialEventJsonSchema:()=>ue,policyJsonSchema:()=>Me,propertiesJsonSchema:()=>me,ruleJsonSchema:()=>qe,rulesJsonSchema:()=>Ue,safeParseConfig:()=>tn,safeParseSetup:()=>nn,setJsonSchema:()=>Oe,setupJsonSchema:()=>rn,sourceReferenceJsonSchema:()=>sn,sourceTypeJsonSchema:()=>he,userJsonSchema:()=>be,valueConfigJsonSchema:()=>Re,valueJsonSchema:()=>Ie,z:()=>c.z,zodToSchema:()=>gn});var c=require("zod");function l(e,i,n="draft-7"){return c.z.toJSONSchema(e,{target:n})}var d=c.z.string(),p=c.z.number(),u=c.z.boolean(),b=c.z.string().min(1),m=c.z.number().int().positive(),g=c.z.number().int().nonnegative(),f=c.z.number().describe("Tagging version number"),h=c.z.union([c.z.string(),c.z.number(),c.z.boolean()]),z=h.optional(),v={};r(v,{ErrorHandlerSchema:()=>w,HandlerSchema:()=>C,LogHandlerSchema:()=>k,StorageSchema:()=>y,StorageTypeSchema:()=>S,errorHandlerJsonSchema:()=>J,handlerJsonSchema:()=>x,logHandlerJsonSchema:()=>E,storageJsonSchema:()=>P,storageTypeJsonSchema:()=>j});var S=c.z.enum(["local","session","cookie"]).describe("Storage mechanism: local, session, or cookie"),y=c.z.object({Local:c.z.literal("local"),Session:c.z.literal("session"),Cookie:c.z.literal("cookie")}).describe("Storage type constants for type-safe references"),w=c.z.any().describe("Error handler function: (error, state?) => void"),k=c.z.any().describe("Log handler function: (message, verbose?) => void"),C=c.z.object({Error:w.describe("Error handler function"),Log:k.describe("Log handler function")}).describe("Handler interface with error and log functions"),j=l(S),P=l(y),J=l(w),E=l(k),x=l(C),D=c.z.object({onError:w.optional().describe("Error handler function: (error, state?) => void"),onLog:k.optional().describe("Log handler function: (message, verbose?) => void")}).partial(),I=c.z.object({verbose:c.z.boolean().describe("Enable verbose logging for debugging").optional()}).partial(),R=c.z.object({queue:c.z.boolean().describe("Whether to queue events when consent is not granted").optional()}).partial(),L=c.z.object({}).partial(),O=c.z.object({init:c.z.boolean().describe("Whether to initialize immediately").optional(),loadScript:c.z.boolean().describe("Whether to load external script (for web destinations)").optional()}).partial(),T=c.z.object({disabled:c.z.boolean().describe("Set to true to disable").optional()}).partial(),M=c.z.object({primary:c.z.boolean().describe("Mark as primary (only one can be primary)").optional()}).partial(),q=c.z.object({settings:c.z.any().optional().describe("Implementation-specific configuration")}).partial(),U=c.z.object({env:c.z.any().optional().describe("Environment dependencies (platform-specific)")}).partial();function W(e,i){return c.z.object({data:c.z.union([e,i]).optional().describe("Data transformation rules")}).partial()}function N(e){return c.z.object({mapping:e.optional().describe("Event mapping rules")}).partial()}function B(e){return c.z.object({policy:e.optional().describe("Pre-processing policy rules")}).partial()}function V(e){return c.z.object({consent:e.optional().describe("Required consent states")}).partial()}var A=c.z.object({type:c.z.string().optional().describe("Instance type identifier"),config:c.z.unknown().describe("Instance configuration")}).partial(),H=c.z.object({collector:c.z.unknown().describe("Collector instance (runtime object)"),config:c.z.unknown().describe("Configuration"),env:c.z.unknown().describe("Environment dependencies")}).partial(),F=c.z.object({batch:c.z.number().optional().describe("Batch size: bundle N events for batch processing"),batched:c.z.unknown().optional().describe("Batch of events to be processed")}).partial(),G=c.z.object({ignore:c.z.boolean().describe("Set to true to skip processing").optional(),condition:c.z.string().optional().describe("Condition function: return true to process")}).partial(),$=c.z.object({sources:c.z.record(c.z.string(),c.z.unknown()).describe("Map of source instances")}).partial(),Q=c.z.object({destinations:c.z.record(c.z.string(),c.z.unknown()).describe("Map of destination instances")}).partial(),_={};r(_,{ConsentSchema:()=>ne,DeepPartialEventSchema:()=>de,EntitiesSchema:()=>se,EntitySchema:()=>ae,EventSchema:()=>ce,OrderedPropertiesSchema:()=>ee,PartialEventSchema:()=>le,PropertiesSchema:()=>Z,PropertySchema:()=>Y,PropertyTypeSchema:()=>X,SourceSchema:()=>re,SourceTypeSchema:()=>ie,UserSchema:()=>oe,VersionSchema:()=>te,consentJsonSchema:()=>ze,entityJsonSchema:()=>fe,eventJsonSchema:()=>pe,orderedPropertiesJsonSchema:()=>ge,partialEventJsonSchema:()=>ue,propertiesJsonSchema:()=>me,sourceTypeJsonSchema:()=>he,userJsonSchema:()=>be});var K,X=c.z.lazy(()=>c.z.union([c.z.boolean(),c.z.string(),c.z.number(),c.z.record(c.z.string(),Y)])),Y=c.z.lazy(()=>c.z.union([X,c.z.array(X)])),Z=c.z.record(c.z.string(),Y.optional()).describe("Flexible property collection with optional values"),ee=c.z.record(c.z.string(),c.z.tuple([Y,c.z.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"),ie=c.z.union([c.z.enum(["web","server","app","other"]),c.z.string()]).describe("Source type: web, server, app, other, or custom"),ne=c.z.record(c.z.string(),c.z.boolean()).describe("Consent requirement mapping (group name → state)"),oe=Z.and(c.z.object({id:c.z.string().optional().describe("User identifier"),device:c.z.string().optional().describe("Device identifier"),session:c.z.string().optional().describe("Session identifier"),hash:c.z.string().optional().describe("Hashed identifier"),address:c.z.string().optional().describe("User address"),email:c.z.string().email().optional().describe("User email address"),phone:c.z.string().optional().describe("User phone number"),userAgent:c.z.string().optional().describe("Browser user agent string"),browser:c.z.string().optional().describe("Browser name"),browserVersion:c.z.string().optional().describe("Browser version"),deviceType:c.z.string().optional().describe("Device type (mobile, desktop, tablet)"),os:c.z.string().optional().describe("Operating system"),osVersion:c.z.string().optional().describe("Operating system version"),screenSize:c.z.string().optional().describe("Screen dimensions"),language:c.z.string().optional().describe("User language"),country:c.z.string().optional().describe("User country"),region:c.z.string().optional().describe("User region/state"),city:c.z.string().optional().describe("User city"),zip:c.z.string().optional().describe("User postal code"),timezone:c.z.string().optional().describe("User timezone"),ip:c.z.string().optional().describe("User IP address"),internal:c.z.boolean().optional().describe("Internal user flag (employee, test user)")})).describe("User identification and properties"),te=Z.and(c.z.object({source:d.describe('Walker implementation version (e.g., "2.0.0")'),tagging:f})).describe("Walker version information"),re=Z.and(c.z.object({type:ie.describe("Source type identifier"),id:d.describe("Source identifier (typically URL on web)"),previous_id:d.describe("Previous source identifier (typically referrer on web)")})).describe("Event source information"),ae=c.z.lazy(()=>c.z.object({entity:c.z.string().describe("Entity name"),data:Z.describe("Entity-specific properties"),nested:c.z.array(ae).describe("Nested child entities"),context:ee.describe("Entity context data")})).describe("Nested entity structure with recursive nesting support"),se=c.z.array(ae).describe("Array of nested entities"),ce=c.z.object({name:c.z.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'),data:Z.describe("Event-specific properties"),context:ee.describe("Ordered context properties with priorities"),globals:Z.describe("Global properties shared across events"),custom:Z.describe("Custom implementation-specific properties"),user:oe.describe("User identification and attributes"),nested:se.describe("Related nested entities"),consent:ne.describe("Consent states at event time"),id:b.describe("Unique event identifier (timestamp-based)"),trigger:d.describe("Event trigger identifier"),entity:d.describe("Parsed entity from event name"),action:d.describe("Parsed action from event name"),timestamp:m.describe("Unix timestamp in milliseconds since epoch"),timing:p.describe("Event processing timing information"),group:d.describe("Event grouping identifier"),count:g.describe("Event count in session"),version:te.describe("Walker version information"),source:re.describe("Event source information")}).describe("Complete walkerOS event structure"),le=ce.partial().describe("Partial event structure with all fields optional"),de=ce.partial().describe("Partial event structure with all top-level fields optional"),pe=l(ce),ue=l(le),be=l(oe),me=l(Z),ge=l(ee),fe=l(ae),he=l(ie),ze=l(ne),ve={};r(ve,{ConfigSchema:()=>xe,LoopSchema:()=>we,MapSchema:()=>Ce,PolicySchema:()=>Pe,ResultSchema:()=>De,RuleSchema:()=>Je,RulesSchema:()=>Ee,SetSchema:()=>ke,ValueConfigSchema:()=>je,ValueSchema:()=>Se,ValuesSchema:()=>ye,configJsonSchema:()=>We,loopJsonSchema:()=>Le,mapJsonSchema:()=>Te,policyJsonSchema:()=>Me,ruleJsonSchema:()=>qe,rulesJsonSchema:()=>Ue,setJsonSchema:()=>Oe,valueConfigJsonSchema:()=>Re,valueJsonSchema:()=>Ie});var Se=c.z.lazy(()=>c.z.union([c.z.string().describe('String value or property path (e.g., "data.id")'),c.z.number().describe("Numeric value"),c.z.boolean().describe("Boolean value"),c.z.lazy(()=>K),c.z.array(Se).describe("Array of values")])),ye=c.z.array(Se).describe("Array of transformation values"),we=c.z.lazy(()=>c.z.tuple([Se,Se]).describe("Loop transformation: [source, transform] tuple for array processing")),ke=c.z.lazy(()=>c.z.array(Se).describe("Set: Array of values for selection or combination")),Ce=c.z.lazy(()=>c.z.record(c.z.string(),Se).describe("Map: Object mapping keys to transformation values")),je=K=c.z.object({key:c.z.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'),value:c.z.union([c.z.string(),c.z.number(),c.z.boolean()]).optional().describe("Static primitive value"),fn:c.z.string().optional().describe("Custom transformation function as string (serialized)"),map:Ce.optional().describe("Object mapping: transform event data to structured output"),loop:we.optional().describe("Loop transformation: [source, transform] for array processing"),set:ke.optional().describe("Set of values: combine or select from multiple values"),consent:ne.optional().describe("Required consent states to include this value"),condition:c.z.string().optional().describe("Condition function as string: return true to include value"),validate:c.z.string().optional().describe("Validation function as string: return true if value is valid")}).refine(e=>Object.keys(e).length>0,{message:"ValueConfig must have at least one property"}).describe("Value transformation configuration with multiple strategies"),Pe=c.z.record(c.z.string(),Se).describe("Policy rules for event pre-processing (key → value mapping)"),Je=c.z.object({batch:c.z.number().optional().describe("Batch size: bundle N events for batch processing"),condition:c.z.string().optional().describe("Condition function as string: return true to process event"),consent:ne.optional().describe("Required consent states to process this event"),settings:c.z.any().optional().describe("Destination-specific settings for this event mapping"),data:c.z.union([Se,ye]).optional().describe("Data transformation rules for event"),ignore:c.z.boolean().optional().describe("Set to true to skip processing this event"),name:c.z.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'),policy:Pe.optional().describe("Event-level policy overrides (applied after config-level policy)")}).describe("Mapping rule for specific entity-action combination"),Ee=c.z.record(c.z.string(),c.z.record(c.z.string(),c.z.union([Je,c.z.array(Je)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support"),xe=c.z.object({consent:ne.optional().describe("Required consent states to process any events"),data:c.z.union([Se,ye]).optional().describe("Global data transformation applied to all events"),mapping:Ee.optional().describe("Entity-action specific mapping rules"),policy:Pe.optional().describe("Pre-processing policy rules applied before mapping")}).describe("Shared mapping configuration for sources and destinations"),De=c.z.object({eventMapping:Je.optional().describe("Resolved mapping rule for event"),mappingKey:c.z.string().optional().describe('Mapping key used (e.g., "product.view")')}).describe("Mapping resolution result"),Ie=l(Se),Re=l(je),Le=l(we),Oe=l(ke),Te=l(Ce),Me=l(Pe),qe=l(Je),Ue=l(Ee),We=l(xe),Ne={};r(Ne,{BatchSchema:()=>_e,ConfigSchema:()=>Be,ContextSchema:()=>He,DLQSchema:()=>ti,DataSchema:()=>Ke,DestinationPolicySchema:()=>Ae,DestinationsSchema:()=>ei,InitDestinationsSchema:()=>Ze,InitSchema:()=>Ye,InstanceSchema:()=>Xe,PartialConfigSchema:()=>Ve,PushBatchContextSchema:()=>Ge,PushContextSchema:()=>Fe,PushEventSchema:()=>$e,PushEventsSchema:()=>Qe,PushResultSchema:()=>ni,RefSchema:()=>ii,ResultSchema:()=>oi,batchJsonSchema:()=>li,configJsonSchema:()=>ri,contextJsonSchema:()=>si,instanceJsonSchema:()=>di,partialConfigJsonSchema:()=>ai,pushContextJsonSchema:()=>ci,resultJsonSchema:()=>pi});var Be=c.z.object({consent:ne.optional().describe("Required consent states to send events to this destination"),settings:c.z.any().describe("Implementation-specific configuration").optional(),data:c.z.union([Se,ye]).optional().describe("Global data transformation applied to all events for this destination"),env:c.z.any().describe("Environment dependencies (platform-specific)").optional(),id:b.describe("Destination instance identifier (defaults to destination key)").optional(),init:c.z.boolean().describe("Whether to initialize immediately").optional(),loadScript:c.z.boolean().describe("Whether to load external script (for web destinations)").optional(),mapping:Ee.optional().describe("Entity-action specific mapping rules for this destination"),policy:Pe.optional().describe("Pre-processing policy rules applied before event mapping"),queue:c.z.boolean().describe("Whether to queue events when consent is not granted").optional(),verbose:c.z.boolean().describe("Enable verbose logging for debugging").optional(),onError:w.optional(),onLog:k.optional()}).describe("Destination configuration"),Ve=Be.partial().describe("Partial destination configuration with all fields optional"),Ae=Pe.describe("Destination policy rules for event pre-processing"),He=c.z.object({collector:c.z.unknown().describe("Collector instance (runtime object)"),config:Be.describe("Destination configuration"),data:c.z.union([c.z.unknown(),c.z.array(c.z.unknown())]).optional().describe("Transformed event data"),env:c.z.unknown().describe("Environment dependencies")}).describe("Destination context for init and push functions"),Fe=He.extend({mapping:Je.optional().describe("Resolved mapping rule for this specific event")}).describe("Push context with event-specific mapping"),Ge=Fe.describe("Batch push context with event-specific mapping"),$e=c.z.object({event:ce.describe("The event to process"),mapping:Je.optional().describe("Mapping rule for this event")}).describe("Event with optional mapping for batch processing"),Qe=c.z.array($e).describe("Array of events with mappings"),_e=c.z.object({key:c.z.string().describe('Batch key (usually mapping key like "product.view")'),events:c.z.array(ce).describe("Array of events in batch"),data:c.z.array(c.z.union([c.z.unknown(),c.z.array(c.z.unknown())]).optional()).describe("Transformed data for each event"),mapping:Je.optional().describe("Shared mapping rule for batch")}).describe("Batch of events grouped by mapping key"),Ke=c.z.union([c.z.unknown(),c.z.array(c.z.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)"),Xe=c.z.object({config:Be.describe("Destination configuration"),queue:c.z.array(ce).optional().describe("Queued events awaiting consent"),dlq:c.z.array(c.z.tuple([ce,c.z.unknown()])).optional().describe("Dead letter queue (failed events with errors)"),type:c.z.string().optional().describe("Destination type identifier"),env:c.z.unknown().optional().describe("Environment dependencies"),init:c.z.unknown().optional().describe("Initialization function"),push:c.z.unknown().describe("Push function for single events"),pushBatch:c.z.unknown().optional().describe("Batch push function"),on:c.z.unknown().optional().describe("Event lifecycle hook function")}).describe("Destination instance (runtime object with functions)"),Ye=c.z.object({code:Xe.describe("Destination instance with implementation"),config:Ve.optional().describe("Partial configuration overrides"),env:c.z.unknown().optional().describe("Partial environment overrides")}).describe("Destination initialization configuration"),Ze=c.z.record(c.z.string(),Ye).describe("Map of destination IDs to initialization configurations"),ei=c.z.record(c.z.string(),Xe).describe("Map of destination IDs to runtime instances"),ii=c.z.object({type:c.z.string().describe('Destination type ("gtag", "meta", "bigquery")'),data:c.z.unknown().optional().describe("Response from push()"),error:c.z.unknown().optional().describe("Error if failed")}).describe("Destination reference with type and response data"),ni=c.z.object({queue:c.z.array(ce).optional().describe("Events queued (awaiting consent)"),error:c.z.unknown().optional().describe("Error if push failed")}).describe("Push operation result"),oi=c.z.object({ok:c.z.boolean().describe("True if nothing failed"),event:c.z.unknown().optional().describe("The processed event"),done:c.z.record(c.z.string(),ii).optional().describe("Destinations that processed successfully"),queued:c.z.record(c.z.string(),ii).optional().describe("Destinations that queued events"),failed:c.z.record(c.z.string(),ii).optional().describe("Destinations that failed to process")}).describe("Push result with destination outcomes"),ti=c.z.array(c.z.tuple([ce,c.z.unknown()])).describe("Dead letter queue: [(event, error), ...]"),ri=l(Be),ai=l(Ve),si=l(He),ci=l(Fe),li=l(_e),di=l(Xe),pi=l(oi),ui={};r(ui,{CommandTypeSchema:()=>bi,ConfigSchema:()=>mi,DestinationsSchema:()=>vi,InitConfigSchema:()=>fi,InstanceSchema:()=>Si,PushContextSchema:()=>hi,SessionDataSchema:()=>gi,SourcesSchema:()=>zi,commandTypeJsonSchema:()=>yi,configJsonSchema:()=>wi,initConfigJsonSchema:()=>Ci,instanceJsonSchema:()=>Pi,pushContextJsonSchema:()=>ji,sessionDataJsonSchema:()=>ki});var bi=c.z.union([c.z.enum(["action","config","consent","context","destination","elb","globals","hook","init","link","run","user","walker"]),c.z.string()]).describe("Collector command type: standard commands or custom string for extensions"),mi=c.z.object({run:c.z.boolean().describe("Whether to run collector automatically on initialization").optional(),tagging:f,globalsStatic:Z.describe("Static global properties that persist across collector runs"),sessionStatic:c.z.record(c.z.string(),c.z.unknown()).describe("Static session data that persists across collector runs"),verbose:c.z.boolean().describe("Enable verbose logging for debugging"),onError:w.optional(),onLog:k.optional()}).describe("Core collector configuration"),gi=Z.and(c.z.object({isStart:c.z.boolean().describe("Whether this is a new session start"),storage:c.z.boolean().describe("Whether storage is available"),id:b.describe("Session identifier").optional(),start:m.describe("Session start timestamp").optional(),marketing:c.z.literal(!0).optional().describe("Marketing attribution flag"),updated:m.describe("Last update timestamp").optional(),isNew:c.z.boolean().describe("Whether this is a new session").optional(),device:b.describe("Device identifier").optional(),count:g.describe("Event count in session").optional(),runs:g.describe("Number of runs").optional()})).describe("Session state and tracking data"),fi=mi.partial().extend({consent:ne.optional().describe("Initial consent state"),user:oe.optional().describe("Initial user data"),globals:Z.optional().describe("Initial global properties"),sources:c.z.unknown().optional().describe("Source configurations"),destinations:c.z.unknown().optional().describe("Destination configurations"),custom:Z.optional().describe("Initial custom implementation-specific properties")}).describe("Collector initialization configuration with initial state"),hi=c.z.object({mapping:xe.optional().describe("Source-level mapping configuration")}).describe("Push context with optional source mapping"),zi=c.z.record(c.z.string(),c.z.unknown()).describe("Map of source IDs to source instances"),vi=c.z.record(c.z.string(),c.z.unknown()).describe("Map of destination IDs to destination instances"),Si=c.z.object({push:c.z.unknown().describe("Push function for processing events"),command:c.z.unknown().describe("Command function for walker commands"),allowed:c.z.boolean().describe("Whether event processing is allowed"),config:mi.describe("Current collector configuration"),consent:ne.describe("Current consent state"),count:c.z.number().describe("Event count (increments with each event)"),custom:Z.describe("Custom implementation-specific properties"),sources:zi.describe("Registered source instances"),destinations:vi.describe("Registered destination instances"),globals:Z.describe("Current global properties"),group:c.z.string().describe("Event grouping identifier"),hooks:c.z.unknown().describe("Lifecycle hook functions"),on:c.z.unknown().describe("Event lifecycle configuration"),queue:c.z.array(ce).describe("Queued events awaiting processing"),round:c.z.number().describe("Collector run count (increments with each run)"),session:c.z.union([gi]).describe("Current session state"),timing:c.z.number().describe("Event processing timing information"),user:oe.describe("Current user data"),version:c.z.string().describe("Walker implementation version")}).describe("Collector instance with state and methods"),yi=l(bi),wi=l(mi),ki=l(gi),Ci=l(fi),ji=l(hi),Pi=l(Si),Ji={};r(Ji,{BaseEnvSchema:()=>Ei,ConfigSchema:()=>xi,InitSchema:()=>Ri,InitSourceSchema:()=>Li,InitSourcesSchema:()=>Oi,InstanceSchema:()=>Ii,PartialConfigSchema:()=>Di,baseEnvJsonSchema:()=>Ti,configJsonSchema:()=>Mi,initSourceJsonSchema:()=>Wi,initSourcesJsonSchema:()=>Ni,instanceJsonSchema:()=>Ui,partialConfigJsonSchema:()=>qi});var Ei=c.z.object({push:c.z.unknown().describe("Collector push function"),command:c.z.unknown().describe("Collector command function"),sources:c.z.unknown().optional().describe("Map of registered source instances"),elb:c.z.unknown().describe("Public API function (alias for collector.push)")}).catchall(c.z.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"),xi=xe.extend({settings:c.z.any().describe("Implementation-specific configuration").optional(),env:Ei.optional().describe("Environment dependencies (platform-specific)"),id:b.describe("Source identifier (defaults to source key)").optional(),onError:w.optional(),disabled:c.z.boolean().describe("Set to true to disable").optional(),primary:c.z.boolean().describe("Mark as primary (only one can be primary)").optional()}).describe("Source configuration with mapping and environment"),Di=xi.partial().describe("Partial source configuration with all fields optional"),Ii=c.z.object({type:c.z.string().describe('Source type identifier (e.g., "browser", "dataLayer")'),config:xi.describe("Current source configuration"),push:c.z.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"),destroy:c.z.any().optional().describe("Cleanup function called when source is removed"),on:c.z.unknown().optional().describe("Lifecycle hook function for event types")}).describe("Source instance with push handler and lifecycle methods"),Ri=c.z.any().describe("Source initialization function: (config, env) => Instance | Promise<Instance>"),Li=c.z.object({code:Ri.describe("Source initialization function"),config:Di.optional().describe("Partial configuration overrides"),env:Ei.partial().optional().describe("Partial environment overrides"),primary:c.z.boolean().optional().describe("Mark as primary source (only one can be primary)")}).describe("Source initialization configuration"),Oi=c.z.record(c.z.string(),Li).describe("Map of source IDs to initialization configurations"),Ti=l(Ei),Mi=l(xi),qi=l(Di),Ui=l(Ii),Wi=l(Li),Ni=l(Oi),Bi={};r(Bi,{ConfigSchema:()=>Yi,DefinitionsSchema:()=>Hi,DestinationReferenceSchema:()=>Xi,InlineCodeSchema:()=>Qi,PackagesSchema:()=>Fi,PrimitiveSchema:()=>Vi,ServerSchema:()=>$i,SetupSchema:()=>Zi,SourceReferenceSchema:()=>_i,TransformerReferenceSchema:()=>Ki,VariablesSchema:()=>Ai,WebSchema:()=>Gi,configJsonSchema:()=>an,destinationReferenceJsonSchema:()=>cn,parseConfig:()=>on,parseSetup:()=>en,safeParseConfig:()=>tn,safeParseSetup:()=>nn,setupJsonSchema:()=>rn,sourceReferenceJsonSchema:()=>sn,transformerReferenceJsonSchema:()=>ln});var Vi=c.z.union([c.z.string(),c.z.number(),c.z.boolean()]).describe("Primitive value: string, number, or boolean"),Ai=c.z.record(c.z.string(),Vi).describe("Variables for interpolation"),Hi=c.z.record(c.z.string(),c.z.unknown()).describe("Reusable configuration definitions"),Fi=c.z.record(c.z.string(),c.z.object({version:c.z.string().optional(),imports:c.z.array(c.z.string()).optional(),path:c.z.string().optional()})).describe("NPM packages to bundle"),Gi=c.z.object({windowCollector:c.z.string().optional().describe('Window property name for collector instance (default: "collector")'),windowElb:c.z.string().optional().describe('Window property name for elb function (default: "elb")')}).describe("Web platform configuration"),$i=c.z.object({}).passthrough().describe("Server platform configuration (reserved for future options)"),Qi=c.z.object({push:c.z.string().min(1,"Push function cannot be empty").describe("Main function that processes events. Use $code: prefix for inline JavaScript."),type:c.z.string().optional().describe("Optional type identifier for the inline instance"),init:c.z.string().optional().describe("Optional initialization function. Use $code: prefix for inline JavaScript.")}).describe("Inline code for custom sources/transformers/destinations"),_i=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'),code:c.z.union([c.z.string(),Qi]).optional().describe('Either a named export string (e.g., "sourceExpress") or an inline code object with push function'),config:c.z.unknown().optional().describe("Source-specific configuration object"),env:c.z.unknown().optional().describe("Source environment configuration"),primary:c.z.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary."),variables:Ai.optional().describe("Source-level variables (highest priority in cascade)"),definitions:Hi.optional().describe("Source-level definitions (highest priority in cascade)"),next:c.z.string().optional().describe("First transformer in post-source chain. If omitted, events route directly to collector.")}).describe("Source package reference with configuration"),Ki=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/transformer-enricher@1.0.0")'),code:c.z.union([c.z.string(),Qi]).optional().describe('Either a named export string (e.g., "transformerEnricher") or an inline code object with push function'),config:c.z.unknown().optional().describe("Transformer-specific configuration object"),env:c.z.unknown().optional().describe("Transformer environment configuration"),next:c.z.string().optional().describe("Next transformer in chain. If omitted: pre-collector routes to collector, post-collector routes to destination."),variables:Ai.optional().describe("Transformer-level variables (highest priority in cascade)"),definitions:Hi.optional().describe("Transformer-level definitions (highest priority in cascade)")}).describe("Transformer package reference with configuration"),Xi=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'),code:c.z.union([c.z.string(),Qi]).optional().describe('Either a named export string (e.g., "destinationAnalytics") or an inline code object with push function'),config:c.z.unknown().optional().describe("Destination-specific configuration object"),env:c.z.unknown().optional().describe("Destination environment configuration"),variables:Ai.optional().describe("Destination-level variables (highest priority in cascade)"),definitions:Hi.optional().describe("Destination-level definitions (highest priority in cascade)"),before:c.z.string().optional().describe("First transformer in pre-destination chain. If omitted, events are sent directly from collector.")}).describe("Destination package reference with configuration"),Yi=c.z.object({web:Gi.optional().describe("Web platform configuration (browser-based tracking). Mutually exclusive with server."),server:$i.optional().describe("Server platform configuration (Node.js). Mutually exclusive with web."),sources:c.z.record(c.z.string(),_i).optional().describe("Source configurations (data capture) keyed by unique identifier"),destinations:c.z.record(c.z.string(),Xi).optional().describe("Destination configurations (data output) keyed by unique identifier"),transformers:c.z.record(c.z.string(),Ki).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"),collector:c.z.unknown().optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"),packages:Fi.optional().describe("NPM packages to bundle"),variables:Ai.optional().describe("Flow-level variables (override Setup.variables, overridden by source/destination variables)"),definitions:Hi.optional().describe("Flow-level definitions (extend Setup.definitions, overridden by source/destination definitions)")}).refine(e=>{const i=void 0!==e.web,n=void 0!==e.server;return(i||n)&&!(i&&n)},{message:'Exactly one of "web" or "server" must be present'}).describe("Single flow configuration for one deployment target"),Zi=c.z.object({version:c.z.literal(1,{error:"Only version 1 is currently supported"}).describe("Configuration schema version (currently only 1 is supported)"),$schema:c.z.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v1.json")'),variables:Ai.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax)"),definitions:Hi.optional().describe("Reusable configuration definitions (use $def.name syntax)"),flows:c.z.record(c.z.string(),Yi).refine(e=>Object.keys(e).length>0,{message:"At least one flow is required"}).describe("Named flow configurations (e.g., production, staging, development)")}).describe("Complete multi-flow walkerOS configuration (walkeros.config.json)");function en(e){return Zi.parse(e)}function nn(e){return Zi.safeParse(e)}function on(e){return Yi.parse(e)}function tn(e){return Yi.safeParse(e)}var rn=c.z.toJSONSchema(Zi,{target:"draft-7"}),an=l(Yi),sn=l(_i),cn=l(Xi),ln=l(Ki);function dn(e,i){const n=[],o={};for(const[i,t]of Object.entries(e)){t.required&&n.push(i);const e={type:t.type};if(t.description&&(e.description=t.description),t.pattern&&(e.pattern=t.pattern),void 0!==t.minLength&&(e.minLength=t.minLength),void 0!==t.maxLength&&(e.maxLength=t.maxLength),void 0!==t.minimum&&(e.minimum=t.minimum),void 0!==t.maximum&&(e.maximum=t.maximum),t.enum&&(e.enum=[...t.enum]),void 0!==t.default&&(e.default=t.default),"object"===t.type&&t.properties){const i={};for(const[e,n]of Object.entries(t.properties))i[e]=pn(n);e.properties=i}"array"===t.type&&t.items&&(e.items=pn(t.items)),o[i]=e}const t={type:"object",properties:o};return i&&(t.title=i),n.length>0&&(t.required=n),t}function pn(e){const i={type:e.type};if(e.description&&(i.description=e.description),e.pattern&&(i.pattern=e.pattern),void 0!==e.minLength&&(i.minLength=e.minLength),void 0!==e.maxLength&&(i.maxLength=e.maxLength),void 0!==e.minimum&&(i.minimum=e.minimum),void 0!==e.maximum&&(i.maximum=e.maximum),e.enum&&(i.enum=[...e.enum]),void 0!==e.default&&(i.default=e.default),"object"===e.type&&e.properties){const n={};for(const[i,o]of Object.entries(e.properties))n[i]=pn(o);i.properties=n}return"array"===e.type&&e.items&&(i.items=pn(e.items)),i}function un(e,i){const n={type:"array",items:pn(e)};return void 0!==i?.minItems&&(n.minItems=i.minItems),void 0!==i?.maxItems&&(n.maxItems=i.maxItems),i?.description&&(n.description=i.description),i?.title&&(n.title=i.title),n}function bn(e,i="string",n){const o={type:i,enum:[...e]};return n?.description&&(o.description=n.description),n?.title&&(o.title=n.title),o}function mn(e,i,n){return un({type:"object"},{minItems:2,maxItems:2,description:n||"Tuple with exactly 2 elements [source, transform]"})}function gn(e){return c.z.toJSONSchema(e,{target:"draft-7"})}//# sourceMappingURL=dev.js.map
|
|
1
|
+
"use strict";var e,i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,t=Object.prototype.hasOwnProperty,r=(e,n)=>{for(var o in n)i(e,o,{get:n[o],enumerable:!0})},a={};r(a,{schemas:()=>s,z:()=>c.z,zodToSchema:()=>bn}),module.exports=(e=a,((e,r,a,s)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let c of o(r))t.call(e,c)||c===a||i(e,c,{get:()=>r[c],enumerable:!(s=n(r,c))||s.enumerable});return e})(i({},"__esModule",{value:!0}),e));var s={};r(s,{BaseContextConfig:()=>A,BatchConfig:()=>H,CollectorSchemas:()=>pi,ConsentSchema:()=>ie,Counter:()=>g,DeepPartialEventSchema:()=>le,DestinationReferenceSchema:()=>Ki,DestinationSchemas:()=>We,DestinationsMapConfig:()=>$,EntitiesSchema:()=>ae,EntitySchema:()=>re,EventSchema:()=>se,FlowConfigSchema:()=>Xi,FlowSchemas:()=>Ni,GenericEnvConfig:()=>q,GenericSettingsConfig:()=>M,HandlersConfig:()=>D,IdConfig:()=>L,Identifier:()=>m,InitConfig:()=>O,LoopSchema:()=>ye,MapSchema:()=>ke,MappingResultSchema:()=>xe,MappingSchemas:()=>ze,OptionalPrimitiveValue:()=>z,OrderedPropertiesSchema:()=>Z,PartialEventSchema:()=>ce,PolicySchema:()=>je,PrimaryConfig:()=>T,PrimitiveSchema:()=>Bi,PrimitiveValue:()=>h,ProcessingControlConfig:()=>F,PropertiesSchema:()=>Y,PropertySchema:()=>X,PropertyTypeSchema:()=>K,QueueConfig:()=>R,RequiredBoolean:()=>u,RequiredNumber:()=>p,RequiredString:()=>d,RuleSchema:()=>Pe,RulesSchema:()=>Je,RuntimeInstanceConfig:()=>V,SetSchema:()=>we,SetupSchema:()=>Yi,SourceReferenceSchema:()=>Qi,SourceSchema:()=>te,SourceSchemas:()=>Pi,SourceTypeSchema:()=>ee,SourcesMapConfig:()=>G,TaggingVersion:()=>f,Timestamp:()=>b,UserSchema:()=>ne,UtilitySchemas:()=>v,ValueConfigSchema:()=>Ce,ValueSchema:()=>ve,ValuesSchema:()=>Se,VerboseConfig:()=>I,VersionSchema:()=>oe,WalkerOSSchemas:()=>Q,configJsonSchema:()=>rn,consentJsonSchema:()=>he,createArraySchema:()=>pn,createConsentConfig:()=>B,createDataTransformationConfig:()=>U,createEnumSchema:()=>un,createMappingRulesConfig:()=>W,createObjectSchema:()=>ln,createPolicyConfig:()=>N,createTupleSchema:()=>mn,destinationReferenceJsonSchema:()=>sn,entityJsonSchema:()=>ge,eventJsonSchema:()=>de,loopJsonSchema:()=>Re,mapJsonSchema:()=>Oe,orderedPropertiesJsonSchema:()=>be,parseConfig:()=>nn,parseSetup:()=>Zi,partialEventJsonSchema:()=>pe,policyJsonSchema:()=>Te,propertiesJsonSchema:()=>me,ruleJsonSchema:()=>Me,rulesJsonSchema:()=>qe,safeParseConfig:()=>on,safeParseSetup:()=>en,setJsonSchema:()=>Le,setupJsonSchema:()=>tn,sourceReferenceJsonSchema:()=>an,sourceTypeJsonSchema:()=>fe,userJsonSchema:()=>ue,valueConfigJsonSchema:()=>Ie,valueJsonSchema:()=>De,z:()=>c.z,zodToSchema:()=>bn});var c=require("zod");function l(e,i,n="draft-7"){return c.z.toJSONSchema(e,{target:n})}var d=c.z.string(),p=c.z.number(),u=c.z.boolean(),m=c.z.string().min(1),b=c.z.number().int().positive(),g=c.z.number().int().nonnegative(),f=c.z.number().describe("Tagging version number"),h=c.z.union([c.z.string(),c.z.number(),c.z.boolean()]),z=h.optional(),v={};r(v,{ErrorHandlerSchema:()=>w,HandlerSchema:()=>C,LogHandlerSchema:()=>k,StorageSchema:()=>y,StorageTypeSchema:()=>S,errorHandlerJsonSchema:()=>J,handlerJsonSchema:()=>x,logHandlerJsonSchema:()=>E,storageJsonSchema:()=>P,storageTypeJsonSchema:()=>j});var S=c.z.enum(["local","session","cookie"]).describe("Storage mechanism: local, session, or cookie"),y=c.z.object({Local:c.z.literal("local"),Session:c.z.literal("session"),Cookie:c.z.literal("cookie")}).describe("Storage type constants for type-safe references"),w=c.z.any().describe("Error handler function: (error, state?) => void"),k=c.z.any().describe("Log handler function: (message, verbose?) => void"),C=c.z.object({Error:w.describe("Error handler function"),Log:k.describe("Log handler function")}).describe("Handler interface with error and log functions"),j=l(S),P=l(y),J=l(w),E=l(k),x=l(C),D=c.z.object({onError:w.optional().describe("Error handler function: (error, state?) => void"),onLog:k.optional().describe("Log handler function: (message, verbose?) => void")}).partial(),I=c.z.object({verbose:c.z.boolean().describe("Enable verbose logging for debugging").optional()}).partial(),R=c.z.object({queue:c.z.boolean().describe("Whether to queue events when consent is not granted").optional()}).partial(),L=c.z.object({}).partial(),O=c.z.object({init:c.z.boolean().describe("Whether to initialize immediately").optional(),loadScript:c.z.boolean().describe("Whether to load external script (for web destinations)").optional()}).partial(),T=c.z.object({primary:c.z.boolean().describe("Mark as primary (only one can be primary)").optional()}).partial(),M=c.z.object({settings:c.z.any().optional().describe("Implementation-specific configuration")}).partial(),q=c.z.object({env:c.z.any().optional().describe("Environment dependencies (platform-specific)")}).partial();function U(e,i){return c.z.object({data:c.z.union([e,i]).optional().describe("Data transformation rules")}).partial()}function W(e){return c.z.object({mapping:e.optional().describe("Event mapping rules")}).partial()}function N(e){return c.z.object({policy:e.optional().describe("Pre-processing policy rules")}).partial()}function B(e){return c.z.object({consent:e.optional().describe("Required consent states")}).partial()}var V=c.z.object({type:c.z.string().optional().describe("Instance type identifier"),config:c.z.unknown().describe("Instance configuration")}).partial(),A=c.z.object({collector:c.z.unknown().describe("Collector instance (runtime object)"),config:c.z.unknown().describe("Configuration"),env:c.z.unknown().describe("Environment dependencies")}).partial(),H=c.z.object({batch:c.z.number().optional().describe("Batch size: bundle N events for batch processing"),batched:c.z.unknown().optional().describe("Batch of events to be processed")}).partial(),F=c.z.object({ignore:c.z.boolean().describe("Set to true to skip processing").optional(),condition:c.z.string().optional().describe("Condition function: return true to process")}).partial(),G=c.z.object({sources:c.z.record(c.z.string(),c.z.unknown()).describe("Map of source instances")}).partial(),$=c.z.object({destinations:c.z.record(c.z.string(),c.z.unknown()).describe("Map of destination instances")}).partial(),Q={};r(Q,{ConsentSchema:()=>ie,DeepPartialEventSchema:()=>le,EntitiesSchema:()=>ae,EntitySchema:()=>re,EventSchema:()=>se,OrderedPropertiesSchema:()=>Z,PartialEventSchema:()=>ce,PropertiesSchema:()=>Y,PropertySchema:()=>X,PropertyTypeSchema:()=>K,SourceSchema:()=>te,SourceTypeSchema:()=>ee,UserSchema:()=>ne,VersionSchema:()=>oe,consentJsonSchema:()=>he,entityJsonSchema:()=>ge,eventJsonSchema:()=>de,orderedPropertiesJsonSchema:()=>be,partialEventJsonSchema:()=>pe,propertiesJsonSchema:()=>me,sourceTypeJsonSchema:()=>fe,userJsonSchema:()=>ue});var _,K=c.z.lazy(()=>c.z.union([c.z.boolean(),c.z.string(),c.z.number(),c.z.record(c.z.string(),X)])),X=c.z.lazy(()=>c.z.union([K,c.z.array(K)])),Y=c.z.record(c.z.string(),X.optional()).describe("Flexible property collection with optional values"),Z=c.z.record(c.z.string(),c.z.tuple([X,c.z.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"),ee=c.z.union([c.z.enum(["web","server","app","other"]),c.z.string()]).describe("Source type: web, server, app, other, or custom"),ie=c.z.record(c.z.string(),c.z.boolean()).describe("Consent requirement mapping (group name → state)"),ne=Y.and(c.z.object({id:c.z.string().optional().describe("User identifier"),device:c.z.string().optional().describe("Device identifier"),session:c.z.string().optional().describe("Session identifier"),hash:c.z.string().optional().describe("Hashed identifier"),address:c.z.string().optional().describe("User address"),email:c.z.string().email().optional().describe("User email address"),phone:c.z.string().optional().describe("User phone number"),userAgent:c.z.string().optional().describe("Browser user agent string"),browser:c.z.string().optional().describe("Browser name"),browserVersion:c.z.string().optional().describe("Browser version"),deviceType:c.z.string().optional().describe("Device type (mobile, desktop, tablet)"),os:c.z.string().optional().describe("Operating system"),osVersion:c.z.string().optional().describe("Operating system version"),screenSize:c.z.string().optional().describe("Screen dimensions"),language:c.z.string().optional().describe("User language"),country:c.z.string().optional().describe("User country"),region:c.z.string().optional().describe("User region/state"),city:c.z.string().optional().describe("User city"),zip:c.z.string().optional().describe("User postal code"),timezone:c.z.string().optional().describe("User timezone"),ip:c.z.string().optional().describe("User IP address"),internal:c.z.boolean().optional().describe("Internal user flag (employee, test user)")})).describe("User identification and properties"),oe=Y.and(c.z.object({source:d.describe('Walker implementation version (e.g., "2.0.0")'),tagging:f})).describe("Walker version information"),te=Y.and(c.z.object({type:ee.describe("Source type identifier"),id:d.describe("Source identifier (typically URL on web)"),previous_id:d.describe("Previous source identifier (typically referrer on web)")})).describe("Event source information"),re=c.z.lazy(()=>c.z.object({entity:c.z.string().describe("Entity name"),data:Y.describe("Entity-specific properties"),nested:c.z.array(re).describe("Nested child entities"),context:Z.describe("Entity context data")})).describe("Nested entity structure with recursive nesting support"),ae=c.z.array(re).describe("Array of nested entities"),se=c.z.object({name:c.z.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'),data:Y.describe("Event-specific properties"),context:Z.describe("Ordered context properties with priorities"),globals:Y.describe("Global properties shared across events"),custom:Y.describe("Custom implementation-specific properties"),user:ne.describe("User identification and attributes"),nested:ae.describe("Related nested entities"),consent:ie.describe("Consent states at event time"),id:m.describe("Unique event identifier (timestamp-based)"),trigger:d.describe("Event trigger identifier"),entity:d.describe("Parsed entity from event name"),action:d.describe("Parsed action from event name"),timestamp:b.describe("Unix timestamp in milliseconds since epoch"),timing:p.describe("Event processing timing information"),group:d.describe("Event grouping identifier"),count:g.describe("Event count in session"),version:oe.describe("Walker version information"),source:te.describe("Event source information")}).describe("Complete walkerOS event structure"),ce=se.partial().describe("Partial event structure with all fields optional"),le=se.partial().describe("Partial event structure with all top-level fields optional"),de=l(se),pe=l(ce),ue=l(ne),me=l(Y),be=l(Z),ge=l(re),fe=l(ee),he=l(ie),ze={};r(ze,{ConfigSchema:()=>Ee,LoopSchema:()=>ye,MapSchema:()=>ke,PolicySchema:()=>je,ResultSchema:()=>xe,RuleSchema:()=>Pe,RulesSchema:()=>Je,SetSchema:()=>we,ValueConfigSchema:()=>Ce,ValueSchema:()=>ve,ValuesSchema:()=>Se,configJsonSchema:()=>Ue,loopJsonSchema:()=>Re,mapJsonSchema:()=>Oe,policyJsonSchema:()=>Te,ruleJsonSchema:()=>Me,rulesJsonSchema:()=>qe,setJsonSchema:()=>Le,valueConfigJsonSchema:()=>Ie,valueJsonSchema:()=>De});var ve=c.z.lazy(()=>c.z.union([c.z.string().describe('String value or property path (e.g., "data.id")'),c.z.number().describe("Numeric value"),c.z.boolean().describe("Boolean value"),c.z.lazy(()=>_),c.z.array(ve).describe("Array of values")])),Se=c.z.array(ve).describe("Array of transformation values"),ye=c.z.lazy(()=>c.z.tuple([ve,ve]).describe("Loop transformation: [source, transform] tuple for array processing")),we=c.z.lazy(()=>c.z.array(ve).describe("Set: Array of values for selection or combination")),ke=c.z.lazy(()=>c.z.record(c.z.string(),ve).describe("Map: Object mapping keys to transformation values")),Ce=_=c.z.object({key:c.z.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'),value:c.z.union([c.z.string(),c.z.number(),c.z.boolean()]).optional().describe("Static primitive value"),fn:c.z.string().optional().describe("Custom transformation function as string (serialized)"),map:ke.optional().describe("Object mapping: transform event data to structured output"),loop:ye.optional().describe("Loop transformation: [source, transform] for array processing"),set:we.optional().describe("Set of values: combine or select from multiple values"),consent:ie.optional().describe("Required consent states to include this value"),condition:c.z.string().optional().describe("Condition function as string: return true to include value"),validate:c.z.string().optional().describe("Validation function as string: return true if value is valid")}).refine(e=>Object.keys(e).length>0,{message:"ValueConfig must have at least one property"}).describe("Value transformation configuration with multiple strategies"),je=c.z.record(c.z.string(),ve).describe("Policy rules for event pre-processing (key → value mapping)"),Pe=c.z.object({batch:c.z.number().optional().describe("Batch size: bundle N events for batch processing"),condition:c.z.string().optional().describe("Condition function as string: return true to process event"),consent:ie.optional().describe("Required consent states to process this event"),settings:c.z.any().optional().describe("Destination-specific settings for this event mapping"),data:c.z.union([ve,Se]).optional().describe("Data transformation rules for event"),ignore:c.z.boolean().optional().describe("Set to true to skip processing this event"),name:c.z.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'),policy:je.optional().describe("Event-level policy overrides (applied after config-level policy)")}).describe("Mapping rule for specific entity-action combination"),Je=c.z.record(c.z.string(),c.z.record(c.z.string(),c.z.union([Pe,c.z.array(Pe)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support"),Ee=c.z.object({consent:ie.optional().describe("Required consent states to process any events"),data:c.z.union([ve,Se]).optional().describe("Global data transformation applied to all events"),mapping:Je.optional().describe("Entity-action specific mapping rules"),policy:je.optional().describe("Pre-processing policy rules applied before mapping")}).describe("Shared mapping configuration for sources and destinations"),xe=c.z.object({eventMapping:Pe.optional().describe("Resolved mapping rule for event"),mappingKey:c.z.string().optional().describe('Mapping key used (e.g., "product.view")')}).describe("Mapping resolution result"),De=l(ve),Ie=l(Ce),Re=l(ye),Le=l(we),Oe=l(ke),Te=l(je),Me=l(Pe),qe=l(Je),Ue=l(Ee),We={};r(We,{BatchSchema:()=>Qe,ConfigSchema:()=>Ne,ContextSchema:()=>Ae,DLQSchema:()=>oi,DataSchema:()=>_e,DestinationPolicySchema:()=>Ve,DestinationsSchema:()=>Ze,InitDestinationsSchema:()=>Ye,InitSchema:()=>Xe,InstanceSchema:()=>Ke,PartialConfigSchema:()=>Be,PushBatchContextSchema:()=>Fe,PushContextSchema:()=>He,PushEventSchema:()=>Ge,PushEventsSchema:()=>$e,PushResultSchema:()=>ii,RefSchema:()=>ei,ResultSchema:()=>ni,batchJsonSchema:()=>ci,configJsonSchema:()=>ti,contextJsonSchema:()=>ai,instanceJsonSchema:()=>li,partialConfigJsonSchema:()=>ri,pushContextJsonSchema:()=>si,resultJsonSchema:()=>di});var Ne=c.z.object({consent:ie.optional().describe("Required consent states to send events to this destination"),settings:c.z.any().describe("Implementation-specific configuration").optional(),data:c.z.union([ve,Se]).optional().describe("Global data transformation applied to all events for this destination"),env:c.z.any().describe("Environment dependencies (platform-specific)").optional(),id:m.describe("Destination instance identifier (defaults to destination key)").optional(),init:c.z.boolean().describe("Whether to initialize immediately").optional(),loadScript:c.z.boolean().describe("Whether to load external script (for web destinations)").optional(),mapping:Je.optional().describe("Entity-action specific mapping rules for this destination"),policy:je.optional().describe("Pre-processing policy rules applied before event mapping"),queue:c.z.boolean().describe("Whether to queue events when consent is not granted").optional(),verbose:c.z.boolean().describe("Enable verbose logging for debugging").optional(),onError:w.optional(),onLog:k.optional()}).describe("Destination configuration"),Be=Ne.partial().describe("Partial destination configuration with all fields optional"),Ve=je.describe("Destination policy rules for event pre-processing"),Ae=c.z.object({collector:c.z.unknown().describe("Collector instance (runtime object)"),config:Ne.describe("Destination configuration"),data:c.z.union([c.z.unknown(),c.z.array(c.z.unknown())]).optional().describe("Transformed event data"),env:c.z.unknown().describe("Environment dependencies")}).describe("Destination context for init and push functions"),He=Ae.extend({mapping:Pe.optional().describe("Resolved mapping rule for this specific event")}).describe("Push context with event-specific mapping"),Fe=He.describe("Batch push context with event-specific mapping"),Ge=c.z.object({event:se.describe("The event to process"),mapping:Pe.optional().describe("Mapping rule for this event")}).describe("Event with optional mapping for batch processing"),$e=c.z.array(Ge).describe("Array of events with mappings"),Qe=c.z.object({key:c.z.string().describe('Batch key (usually mapping key like "product.view")'),events:c.z.array(se).describe("Array of events in batch"),data:c.z.array(c.z.union([c.z.unknown(),c.z.array(c.z.unknown())]).optional()).describe("Transformed data for each event"),mapping:Pe.optional().describe("Shared mapping rule for batch")}).describe("Batch of events grouped by mapping key"),_e=c.z.union([c.z.unknown(),c.z.array(c.z.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)"),Ke=c.z.object({config:Ne.describe("Destination configuration"),queue:c.z.array(se).optional().describe("Queued events awaiting consent"),dlq:c.z.array(c.z.tuple([se,c.z.unknown()])).optional().describe("Dead letter queue (failed events with errors)"),type:c.z.string().optional().describe("Destination type identifier"),env:c.z.unknown().optional().describe("Environment dependencies"),init:c.z.unknown().optional().describe("Initialization function"),push:c.z.unknown().describe("Push function for single events"),pushBatch:c.z.unknown().optional().describe("Batch push function"),on:c.z.unknown().optional().describe("Event lifecycle hook function")}).describe("Destination instance (runtime object with functions)"),Xe=c.z.object({code:Ke.describe("Destination instance with implementation"),config:Be.optional().describe("Partial configuration overrides"),env:c.z.unknown().optional().describe("Partial environment overrides")}).describe("Destination initialization configuration"),Ye=c.z.record(c.z.string(),Xe).describe("Map of destination IDs to initialization configurations"),Ze=c.z.record(c.z.string(),Ke).describe("Map of destination IDs to runtime instances"),ei=c.z.object({type:c.z.string().describe('Destination type ("gtag", "meta", "bigquery")'),data:c.z.unknown().optional().describe("Response from push()"),error:c.z.unknown().optional().describe("Error if failed")}).describe("Destination reference with type and response data"),ii=c.z.object({queue:c.z.array(se).optional().describe("Events queued (awaiting consent)"),error:c.z.unknown().optional().describe("Error if push failed")}).describe("Push operation result"),ni=c.z.object({ok:c.z.boolean().describe("True if nothing failed"),event:c.z.unknown().optional().describe("The processed event"),done:c.z.record(c.z.string(),ei).optional().describe("Destinations that processed successfully"),queued:c.z.record(c.z.string(),ei).optional().describe("Destinations that queued events"),failed:c.z.record(c.z.string(),ei).optional().describe("Destinations that failed to process")}).describe("Push result with destination outcomes"),oi=c.z.array(c.z.tuple([se,c.z.unknown()])).describe("Dead letter queue: [(event, error), ...]"),ti=l(Ne),ri=l(Be),ai=l(Ae),si=l(He),ci=l(Qe),li=l(Ke),di=l(ni),pi={};r(pi,{CommandTypeSchema:()=>ui,ConfigSchema:()=>mi,DestinationsSchema:()=>zi,InitConfigSchema:()=>gi,InstanceSchema:()=>vi,PushContextSchema:()=>fi,SessionDataSchema:()=>bi,SourcesSchema:()=>hi,commandTypeJsonSchema:()=>Si,configJsonSchema:()=>yi,initConfigJsonSchema:()=>ki,instanceJsonSchema:()=>ji,pushContextJsonSchema:()=>Ci,sessionDataJsonSchema:()=>wi});var ui=c.z.union([c.z.enum(["action","config","consent","context","destination","elb","globals","hook","init","link","run","user","walker"]),c.z.string()]).describe("Collector command type: standard commands or custom string for extensions"),mi=c.z.object({run:c.z.boolean().describe("Whether to run collector automatically on initialization").optional(),tagging:f,globalsStatic:Y.describe("Static global properties that persist across collector runs"),sessionStatic:c.z.record(c.z.string(),c.z.unknown()).describe("Static session data that persists across collector runs"),verbose:c.z.boolean().describe("Enable verbose logging for debugging"),onError:w.optional(),onLog:k.optional()}).describe("Core collector configuration"),bi=Y.and(c.z.object({isStart:c.z.boolean().describe("Whether this is a new session start"),storage:c.z.boolean().describe("Whether storage is available"),id:m.describe("Session identifier").optional(),start:b.describe("Session start timestamp").optional(),marketing:c.z.literal(!0).optional().describe("Marketing attribution flag"),updated:b.describe("Last update timestamp").optional(),isNew:c.z.boolean().describe("Whether this is a new session").optional(),device:m.describe("Device identifier").optional(),count:g.describe("Event count in session").optional(),runs:g.describe("Number of runs").optional()})).describe("Session state and tracking data"),gi=mi.partial().extend({consent:ie.optional().describe("Initial consent state"),user:ne.optional().describe("Initial user data"),globals:Y.optional().describe("Initial global properties"),sources:c.z.unknown().optional().describe("Source configurations"),destinations:c.z.unknown().optional().describe("Destination configurations"),custom:Y.optional().describe("Initial custom implementation-specific properties")}).describe("Collector initialization configuration with initial state"),fi=c.z.object({mapping:Ee.optional().describe("Source-level mapping configuration")}).describe("Push context with optional source mapping"),hi=c.z.record(c.z.string(),c.z.unknown()).describe("Map of source IDs to source instances"),zi=c.z.record(c.z.string(),c.z.unknown()).describe("Map of destination IDs to destination instances"),vi=c.z.object({push:c.z.unknown().describe("Push function for processing events"),command:c.z.unknown().describe("Command function for walker commands"),allowed:c.z.boolean().describe("Whether event processing is allowed"),config:mi.describe("Current collector configuration"),consent:ie.describe("Current consent state"),count:c.z.number().describe("Event count (increments with each event)"),custom:Y.describe("Custom implementation-specific properties"),sources:hi.describe("Registered source instances"),destinations:zi.describe("Registered destination instances"),globals:Y.describe("Current global properties"),group:c.z.string().describe("Event grouping identifier"),hooks:c.z.unknown().describe("Lifecycle hook functions"),on:c.z.unknown().describe("Event lifecycle configuration"),queue:c.z.array(se).describe("Queued events awaiting processing"),round:c.z.number().describe("Collector run count (increments with each run)"),session:c.z.union([bi]).describe("Current session state"),timing:c.z.number().describe("Event processing timing information"),user:ne.describe("Current user data"),version:c.z.string().describe("Walker implementation version")}).describe("Collector instance with state and methods"),Si=l(ui),yi=l(mi),wi=l(bi),ki=l(gi),Ci=l(fi),ji=l(vi),Pi={};r(Pi,{BaseEnvSchema:()=>Ji,ConfigSchema:()=>Ei,InitSchema:()=>Ii,InitSourceSchema:()=>Ri,InitSourcesSchema:()=>Li,InstanceSchema:()=>Di,PartialConfigSchema:()=>xi,baseEnvJsonSchema:()=>Oi,configJsonSchema:()=>Ti,initSourceJsonSchema:()=>Ui,initSourcesJsonSchema:()=>Wi,instanceJsonSchema:()=>qi,partialConfigJsonSchema:()=>Mi});var Ji=c.z.object({push:c.z.unknown().describe("Collector push function"),command:c.z.unknown().describe("Collector command function"),sources:c.z.unknown().optional().describe("Map of registered source instances"),elb:c.z.unknown().describe("Public API function (alias for collector.push)")}).catchall(c.z.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"),Ei=Ee.extend({settings:c.z.any().describe("Implementation-specific configuration").optional(),env:Ji.optional().describe("Environment dependencies (platform-specific)"),id:m.describe("Source identifier (defaults to source key)").optional(),onError:w.optional(),primary:c.z.boolean().describe("Mark as primary (only one can be primary)").optional()}).describe("Source configuration with mapping and environment"),xi=Ei.partial().describe("Partial source configuration with all fields optional"),Di=c.z.object({type:c.z.string().describe('Source type identifier (e.g., "browser", "dataLayer")'),config:Ei.describe("Current source configuration"),push:c.z.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"),destroy:c.z.any().optional().describe("Cleanup function called when source is removed"),on:c.z.unknown().optional().describe("Lifecycle hook function for event types")}).describe("Source instance with push handler and lifecycle methods"),Ii=c.z.any().describe("Source initialization function: (config, env) => Instance | Promise<Instance>"),Ri=c.z.object({code:Ii.describe("Source initialization function"),config:xi.optional().describe("Partial configuration overrides"),env:Ji.partial().optional().describe("Partial environment overrides"),primary:c.z.boolean().optional().describe("Mark as primary source (only one can be primary)")}).describe("Source initialization configuration"),Li=c.z.record(c.z.string(),Ri).describe("Map of source IDs to initialization configurations"),Oi=l(Ji),Ti=l(Ei),Mi=l(xi),qi=l(Di),Ui=l(Ri),Wi=l(Li),Ni={};r(Ni,{ConfigSchema:()=>Xi,DefinitionsSchema:()=>Ai,DestinationReferenceSchema:()=>Ki,InlineCodeSchema:()=>$i,PackagesSchema:()=>Hi,PrimitiveSchema:()=>Bi,ServerSchema:()=>Gi,SetupSchema:()=>Yi,SourceReferenceSchema:()=>Qi,TransformerReferenceSchema:()=>_i,VariablesSchema:()=>Vi,WebSchema:()=>Fi,configJsonSchema:()=>rn,destinationReferenceJsonSchema:()=>sn,parseConfig:()=>nn,parseSetup:()=>Zi,safeParseConfig:()=>on,safeParseSetup:()=>en,setupJsonSchema:()=>tn,sourceReferenceJsonSchema:()=>an,transformerReferenceJsonSchema:()=>cn});var Bi=c.z.union([c.z.string(),c.z.number(),c.z.boolean()]).describe("Primitive value: string, number, or boolean"),Vi=c.z.record(c.z.string(),Bi).describe("Variables for interpolation"),Ai=c.z.record(c.z.string(),c.z.unknown()).describe("Reusable configuration definitions"),Hi=c.z.record(c.z.string(),c.z.object({version:c.z.string().optional(),imports:c.z.array(c.z.string()).optional(),path:c.z.string().optional()})).describe("NPM packages to bundle"),Fi=c.z.object({windowCollector:c.z.string().optional().describe('Window property name for collector instance (default: "collector")'),windowElb:c.z.string().optional().describe('Window property name for elb function (default: "elb")')}).describe("Web platform configuration"),Gi=c.z.object({}).passthrough().describe("Server platform configuration (reserved for future options)"),$i=c.z.object({push:c.z.string().min(1,"Push function cannot be empty").describe("Main function that processes events. Use $code: prefix for inline JavaScript."),type:c.z.string().optional().describe("Optional type identifier for the inline instance"),init:c.z.string().optional().describe("Optional initialization function. Use $code: prefix for inline JavaScript.")}).describe("Inline code for custom sources/transformers/destinations"),Qi=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'),code:c.z.union([c.z.string(),$i]).optional().describe('Either a named export string (e.g., "sourceExpress") or an inline code object with push function'),config:c.z.unknown().optional().describe("Source-specific configuration object"),env:c.z.unknown().optional().describe("Source environment configuration"),primary:c.z.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary."),variables:Vi.optional().describe("Source-level variables (highest priority in cascade)"),definitions:Ai.optional().describe("Source-level definitions (highest priority in cascade)"),next:c.z.string().optional().describe("First transformer in post-source chain. If omitted, events route directly to collector.")}).describe("Source package reference with configuration"),_i=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/transformer-enricher@1.0.0")'),code:c.z.union([c.z.string(),$i]).optional().describe('Either a named export string (e.g., "transformerEnricher") or an inline code object with push function'),config:c.z.unknown().optional().describe("Transformer-specific configuration object"),env:c.z.unknown().optional().describe("Transformer environment configuration"),next:c.z.string().optional().describe("Next transformer in chain. If omitted: pre-collector routes to collector, post-collector routes to destination."),variables:Vi.optional().describe("Transformer-level variables (highest priority in cascade)"),definitions:Ai.optional().describe("Transformer-level definitions (highest priority in cascade)")}).describe("Transformer package reference with configuration"),Ki=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'),code:c.z.union([c.z.string(),$i]).optional().describe('Either a named export string (e.g., "destinationAnalytics") or an inline code object with push function'),config:c.z.unknown().optional().describe("Destination-specific configuration object"),env:c.z.unknown().optional().describe("Destination environment configuration"),variables:Vi.optional().describe("Destination-level variables (highest priority in cascade)"),definitions:Ai.optional().describe("Destination-level definitions (highest priority in cascade)"),before:c.z.string().optional().describe("First transformer in pre-destination chain. If omitted, events are sent directly from collector.")}).describe("Destination package reference with configuration"),Xi=c.z.object({web:Fi.optional().describe("Web platform configuration (browser-based tracking). Mutually exclusive with server."),server:Gi.optional().describe("Server platform configuration (Node.js). Mutually exclusive with web."),sources:c.z.record(c.z.string(),Qi).optional().describe("Source configurations (data capture) keyed by unique identifier"),destinations:c.z.record(c.z.string(),Ki).optional().describe("Destination configurations (data output) keyed by unique identifier"),transformers:c.z.record(c.z.string(),_i).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"),collector:c.z.unknown().optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"),packages:Hi.optional().describe("NPM packages to bundle"),variables:Vi.optional().describe("Flow-level variables (override Setup.variables, overridden by source/destination variables)"),definitions:Ai.optional().describe("Flow-level definitions (extend Setup.definitions, overridden by source/destination definitions)")}).refine(e=>{const i=void 0!==e.web,n=void 0!==e.server;return(i||n)&&!(i&&n)},{message:'Exactly one of "web" or "server" must be present'}).describe("Single flow configuration for one deployment target"),Yi=c.z.object({version:c.z.literal(1,{error:"Only version 1 is currently supported"}).describe("Configuration schema version (currently only 1 is supported)"),$schema:c.z.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v1.json")'),variables:Vi.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax)"),definitions:Ai.optional().describe("Reusable configuration definitions (use $def.name syntax)"),flows:c.z.record(c.z.string(),Xi).refine(e=>Object.keys(e).length>0,{message:"At least one flow is required"}).describe("Named flow configurations (e.g., production, staging, development)")}).describe("Complete multi-flow walkerOS configuration (walkeros.config.json)");function Zi(e){return Yi.parse(e)}function en(e){return Yi.safeParse(e)}function nn(e){return Xi.parse(e)}function on(e){return Xi.safeParse(e)}var tn=c.z.toJSONSchema(Yi,{target:"draft-7"}),rn=l(Xi),an=l(Qi),sn=l(Ki),cn=l(_i);function ln(e,i){const n=[],o={};for(const[i,t]of Object.entries(e)){t.required&&n.push(i);const e={type:t.type};if(t.description&&(e.description=t.description),t.pattern&&(e.pattern=t.pattern),void 0!==t.minLength&&(e.minLength=t.minLength),void 0!==t.maxLength&&(e.maxLength=t.maxLength),void 0!==t.minimum&&(e.minimum=t.minimum),void 0!==t.maximum&&(e.maximum=t.maximum),t.enum&&(e.enum=[...t.enum]),void 0!==t.default&&(e.default=t.default),"object"===t.type&&t.properties){const i={};for(const[e,n]of Object.entries(t.properties))i[e]=dn(n);e.properties=i}"array"===t.type&&t.items&&(e.items=dn(t.items)),o[i]=e}const t={type:"object",properties:o};return i&&(t.title=i),n.length>0&&(t.required=n),t}function dn(e){const i={type:e.type};if(e.description&&(i.description=e.description),e.pattern&&(i.pattern=e.pattern),void 0!==e.minLength&&(i.minLength=e.minLength),void 0!==e.maxLength&&(i.maxLength=e.maxLength),void 0!==e.minimum&&(i.minimum=e.minimum),void 0!==e.maximum&&(i.maximum=e.maximum),e.enum&&(i.enum=[...e.enum]),void 0!==e.default&&(i.default=e.default),"object"===e.type&&e.properties){const n={};for(const[i,o]of Object.entries(e.properties))n[i]=dn(o);i.properties=n}return"array"===e.type&&e.items&&(i.items=dn(e.items)),i}function pn(e,i){const n={type:"array",items:dn(e)};return void 0!==i?.minItems&&(n.minItems=i.minItems),void 0!==i?.maxItems&&(n.maxItems=i.maxItems),i?.description&&(n.description=i.description),i?.title&&(n.title=i.title),n}function un(e,i="string",n){const o={type:i,enum:[...e]};return n?.description&&(o.description=n.description),n?.title&&(o.title=n.title),o}function mn(e,i,n){return pn({type:"object"},{minItems:2,maxItems:2,description:n||"Tuple with exactly 2 elements [source, transform]"})}function bn(e){return c.z.toJSONSchema(e,{target:"draft-7"})}//# sourceMappingURL=dev.js.map
|