@walkeros/core 4.0.1 → 4.0.2
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 +51 -32
- package/dist/dev.d.ts +51 -32
- 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 +247 -228
- package/dist/index.d.ts +247 -228
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/dev.d.mts
CHANGED
|
@@ -4800,17 +4800,17 @@ declare namespace cache {
|
|
|
4800
4800
|
}
|
|
4801
4801
|
|
|
4802
4802
|
declare const MatchExpressionSchema: z.ZodType;
|
|
4803
|
-
declare const
|
|
4804
|
-
declare const
|
|
4803
|
+
declare const RouteSpecSchema: z.ZodType;
|
|
4804
|
+
declare const RouteSchema: z.ZodObject<{
|
|
4805
4805
|
match: z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodLiteral<"*">]>;
|
|
4806
4806
|
next: z.ZodLazy<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
4807
4807
|
}, z.core.$strip>;
|
|
4808
4808
|
|
|
4809
4809
|
declare const matcher_MatchExpressionSchema: typeof MatchExpressionSchema;
|
|
4810
|
-
declare const
|
|
4811
|
-
declare const
|
|
4810
|
+
declare const matcher_RouteSchema: typeof RouteSchema;
|
|
4811
|
+
declare const matcher_RouteSpecSchema: typeof RouteSpecSchema;
|
|
4812
4812
|
declare namespace matcher {
|
|
4813
|
-
export { matcher_MatchExpressionSchema as MatchExpressionSchema,
|
|
4813
|
+
export { matcher_MatchExpressionSchema as MatchExpressionSchema, matcher_RouteSchema as RouteSchema, matcher_RouteSpecSchema as RouteSpecSchema };
|
|
4814
4814
|
}
|
|
4815
4815
|
|
|
4816
4816
|
declare const CodeSchema: z.ZodObject<{
|
|
@@ -5152,7 +5152,6 @@ declare const index_LoggerHandlerSchema: typeof LoggerHandlerSchema;
|
|
|
5152
5152
|
declare const index_LoopSchema: typeof LoopSchema;
|
|
5153
5153
|
declare const index_MapSchema: typeof MapSchema;
|
|
5154
5154
|
declare const index_MatchExpressionSchema: typeof MatchExpressionSchema;
|
|
5155
|
-
declare const index_NextRuleSchema: typeof NextRuleSchema;
|
|
5156
5155
|
declare const index_OptionalPrimitiveValue: typeof OptionalPrimitiveValue;
|
|
5157
5156
|
declare const index_OrderedPropertiesSchema: typeof OrderedPropertiesSchema;
|
|
5158
5157
|
type index_PackageInfo = PackageInfo;
|
|
@@ -5169,7 +5168,8 @@ declare const index_QueueConfig: typeof QueueConfig;
|
|
|
5169
5168
|
declare const index_RequiredBoolean: typeof RequiredBoolean;
|
|
5170
5169
|
declare const index_RequiredNumber: typeof RequiredNumber;
|
|
5171
5170
|
declare const index_RequiredString: typeof RequiredString;
|
|
5172
|
-
declare const
|
|
5171
|
+
declare const index_RouteSchema: typeof RouteSchema;
|
|
5172
|
+
declare const index_RouteSpecSchema: typeof RouteSpecSchema;
|
|
5173
5173
|
declare const index_RuleSchema: typeof RuleSchema;
|
|
5174
5174
|
declare const index_RulesSchema: typeof RulesSchema;
|
|
5175
5175
|
declare const index_RuntimeInstanceConfig: typeof RuntimeInstanceConfig;
|
|
@@ -5225,7 +5225,7 @@ declare const index_valueJsonSchema: typeof valueJsonSchema;
|
|
|
5225
5225
|
declare const index_z: typeof z;
|
|
5226
5226
|
declare const index_zodToSchema: typeof zodToSchema;
|
|
5227
5227
|
declare namespace index {
|
|
5228
|
-
export { index_BaseContextConfig as BaseContextConfig, index_BatchConfig as BatchConfig, 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_DeepPartialEventSchema as DeepPartialEventSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventSchema as EventSchema, BundlePackageSchema as FlowBundlePackageSchema, BundleSchema as FlowBundleSchema, CodeSchema$1 as FlowCodeSchema, ConfigSchema as FlowConfigSchema, DestinationSchema as FlowDestinationSchema, JsonSchema 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,
|
|
5228
|
+
export { index_BaseContextConfig as BaseContextConfig, index_BatchConfig as BatchConfig, 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_DeepPartialEventSchema as DeepPartialEventSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventSchema as EventSchema, BundlePackageSchema as FlowBundlePackageSchema, BundleSchema as FlowBundleSchema, CodeSchema$1 as FlowCodeSchema, ConfigSchema as FlowConfigSchema, DestinationSchema as FlowDestinationSchema, JsonSchema 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_RouteSpecSchema as RouteSpecSchema, index_RuleSchema as RuleSchema, index_RulesSchema as RulesSchema, index_RuntimeInstanceConfig as RuntimeInstanceConfig, index_SetSchema as SetSchema, SourceSchema$1 as SourceSchema, source as SourceSchemas, index_SourceTypeSchema as SourceTypeSchema, index_SourcesMapConfig as SourcesMapConfig, store as StoreSchemas, index_Timestamp as Timestamp, transformer as TransformerSchemas, index_UserSchema as UserSchema, utilities as UtilitySchemas, 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_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_validateFlowConfig as validateFlowConfig, index_valueConfigJsonSchema as valueConfigJsonSchema, index_valueJsonSchema as valueJsonSchema, index_z as z, index_zodToSchema as zodToSchema };
|
|
5229
5229
|
}
|
|
5230
5230
|
|
|
5231
5231
|
type PackageType = 'source' | 'destination' | 'transformer' | 'store';
|
|
@@ -5552,14 +5552,14 @@ interface Config$6<T extends TypesGeneric$3 = Types$4> {
|
|
|
5552
5552
|
/** Defer destination initialization until these collector events fire (e.g., `['consent']`). */
|
|
5553
5553
|
require?: string[];
|
|
5554
5554
|
/**
|
|
5555
|
-
* Provisioning options for `
|
|
5555
|
+
* Provisioning options for `walkeros setup`. `boolean | object`.
|
|
5556
5556
|
* Triggered only by explicit CLI invocation; never automatic.
|
|
5557
5557
|
*/
|
|
5558
5558
|
setup?: boolean | SetupOptions$2<T>;
|
|
5559
5559
|
/** Transformer chain to run after collector processing but before this destination. */
|
|
5560
|
-
before?:
|
|
5560
|
+
before?: RouteSpec;
|
|
5561
5561
|
/** Transformer chain to run after destination push completes. Push response available at ingest._response. */
|
|
5562
|
-
next?:
|
|
5562
|
+
next?: RouteSpec;
|
|
5563
5563
|
/** Cache configuration for deduplication (step-level: skip push on HIT). */
|
|
5564
5564
|
cache?: Cache;
|
|
5565
5565
|
/** Completely skip this destination — no init, no push, no queuing. */
|
|
@@ -5575,8 +5575,8 @@ type Init$3<T extends TypesGeneric$3 = Types$4> = {
|
|
|
5575
5575
|
code: Code<T>;
|
|
5576
5576
|
config?: Partial<Config$6<T>>;
|
|
5577
5577
|
env?: Partial<Env$3<T>>;
|
|
5578
|
-
before?:
|
|
5579
|
-
next?:
|
|
5578
|
+
before?: RouteSpec;
|
|
5579
|
+
next?: RouteSpec;
|
|
5580
5580
|
cache?: Cache;
|
|
5581
5581
|
};
|
|
5582
5582
|
interface InitDestinations {
|
|
@@ -5812,11 +5812,30 @@ interface OnConfig {
|
|
|
5812
5812
|
*/
|
|
5813
5813
|
type OnFn<T extends TypesGeneric$3 = Types$4> = (type: Types$3, context: Context$5<T>) => PromiseOrValue<void>;
|
|
5814
5814
|
|
|
5815
|
-
|
|
5815
|
+
/**
|
|
5816
|
+
* A single conditional routing rule. Pairs a `match` expression (or `'*'`
|
|
5817
|
+
* wildcard) against ingest metadata with a `next` step to follow when the
|
|
5818
|
+
* match fires. Used inside `Route[]` arrays on `Flow.Source.next`,
|
|
5819
|
+
* `Flow.Source.before`, `Flow.Transformer.next/before`, and
|
|
5820
|
+
* `Flow.Destination.next/before`. Routes are evaluated in order, first match
|
|
5821
|
+
* wins, no match falls through unchanged. The `next` field of a Route
|
|
5822
|
+
* mirrors the outer-position `next` semantics: it points to whatever comes
|
|
5823
|
+
* downstream when this rule fires.
|
|
5824
|
+
*/
|
|
5825
|
+
interface Route {
|
|
5816
5826
|
match: MatchExpression | '*';
|
|
5817
|
-
next:
|
|
5827
|
+
next: RouteSpec;
|
|
5818
5828
|
}
|
|
5819
|
-
|
|
5829
|
+
/**
|
|
5830
|
+
* The union accepted at every chain-routing boundary. A plain `string`
|
|
5831
|
+
* targets one step by ID; `string[]` declares an explicit sequence ignoring
|
|
5832
|
+
* per-step `next`; `Route[]` enables conditional routing on ingest metadata.
|
|
5833
|
+
* At runtime, `compileNext()` collapses any RouteSpec into a `CompiledNext`
|
|
5834
|
+
* (static, chain, or routes form) for hot-path evaluation. Surfaces via
|
|
5835
|
+
* `Flow.Source.before/next`, `Flow.Transformer.before/next`,
|
|
5836
|
+
* `Flow.Destination.before/next`.
|
|
5837
|
+
*/
|
|
5838
|
+
type RouteSpec = string | string[] | Route[];
|
|
5820
5839
|
/**
|
|
5821
5840
|
* Base environment interface for walkerOS transformers.
|
|
5822
5841
|
*
|
|
@@ -5862,8 +5881,8 @@ interface Config$3<T extends TypesGeneric$2 = Types$2> {
|
|
|
5862
5881
|
env?: Env$2<T>;
|
|
5863
5882
|
id?: string;
|
|
5864
5883
|
logger?: Config$5;
|
|
5865
|
-
before?:
|
|
5866
|
-
next?:
|
|
5884
|
+
before?: RouteSpec;
|
|
5885
|
+
next?: RouteSpec;
|
|
5867
5886
|
cache?: Cache;
|
|
5868
5887
|
init?: boolean;
|
|
5869
5888
|
disabled?: boolean;
|
|
@@ -5891,7 +5910,7 @@ interface Context$3<T extends TypesGeneric$2 = Types$2> extends Base<Config$3<T>
|
|
|
5891
5910
|
interface Result<E = DeepPartialEvent> {
|
|
5892
5911
|
event?: E;
|
|
5893
5912
|
respond?: RespondFn;
|
|
5894
|
-
next?:
|
|
5913
|
+
next?: RouteSpec;
|
|
5895
5914
|
}
|
|
5896
5915
|
/**
|
|
5897
5916
|
* The main transformer function.
|
|
@@ -5940,8 +5959,8 @@ type InitTransformer<T extends TypesGeneric$2 = Types$2> = {
|
|
|
5940
5959
|
code: Init$2<T>;
|
|
5941
5960
|
config?: Partial<Config$3<T>>;
|
|
5942
5961
|
env?: Partial<Env$2<T>>;
|
|
5943
|
-
before?:
|
|
5944
|
-
next?:
|
|
5962
|
+
before?: RouteSpec;
|
|
5963
|
+
next?: RouteSpec;
|
|
5945
5964
|
cache?: Cache;
|
|
5946
5965
|
};
|
|
5947
5966
|
/**
|
|
@@ -5975,7 +5994,7 @@ interface BaseEnv$1 {
|
|
|
5975
5994
|
* @template P - Push function signature (flexible to support HTTP handlers, etc.)
|
|
5976
5995
|
* @template E - Environment dependencies type
|
|
5977
5996
|
* @template I - InitSettings configuration type (user input)
|
|
5978
|
-
* @template U - Setup options type (provisioning options for `
|
|
5997
|
+
* @template U - Setup options type (provisioning options for `walkeros setup`)
|
|
5979
5998
|
*/
|
|
5980
5999
|
interface Types$1<S = unknown, M = unknown, P = Fn$3, E = BaseEnv$1, I = S, U = unknown> {
|
|
5981
6000
|
settings: S;
|
|
@@ -6015,7 +6034,7 @@ interface Config$2<T extends TypesGeneric$1 = Types$1> extends Config<Mapping<T>
|
|
|
6015
6034
|
/** Defer source initialization until these collector events fire (e.g., `['consent']`). */
|
|
6016
6035
|
require?: string[];
|
|
6017
6036
|
/**
|
|
6018
|
-
* Provisioning options for `
|
|
6037
|
+
* Provisioning options for `walkeros setup`. `boolean | object`.
|
|
6019
6038
|
* Triggered only by explicit CLI invocation; never automatic.
|
|
6020
6039
|
*/
|
|
6021
6040
|
setup?: boolean | SetupOptions$1<T>;
|
|
@@ -6090,8 +6109,8 @@ type InitSource<T extends TypesGeneric$1 = Types$1> = {
|
|
|
6090
6109
|
config?: Partial<Config$2<T>>;
|
|
6091
6110
|
env?: Partial<Env$1<T>>;
|
|
6092
6111
|
primary?: boolean;
|
|
6093
|
-
next?:
|
|
6094
|
-
before?:
|
|
6112
|
+
next?: RouteSpec;
|
|
6113
|
+
before?: RouteSpec;
|
|
6095
6114
|
cache?: Cache;
|
|
6096
6115
|
};
|
|
6097
6116
|
/**
|
|
@@ -6127,7 +6146,7 @@ interface Config$1<T extends TypesGeneric = Types> {
|
|
|
6127
6146
|
id?: string;
|
|
6128
6147
|
logger?: Config$5;
|
|
6129
6148
|
/**
|
|
6130
|
-
* Provisioning options for `
|
|
6149
|
+
* Provisioning options for `walkeros setup`. `boolean | object`.
|
|
6131
6150
|
* Triggered only by explicit CLI invocation; never automatic.
|
|
6132
6151
|
*/
|
|
6133
6152
|
setup?: boolean | SetupOptions<T>;
|
|
@@ -6606,7 +6625,7 @@ declare namespace Flow {
|
|
|
6606
6625
|
* (decode, validate, authenticate, normalize raw input).
|
|
6607
6626
|
* Raw request data is available in context.ingest.
|
|
6608
6627
|
*/
|
|
6609
|
-
before?:
|
|
6628
|
+
before?: RouteSpec;
|
|
6610
6629
|
/**
|
|
6611
6630
|
* First transformer in pre-collector chain.
|
|
6612
6631
|
*
|
|
@@ -6615,7 +6634,7 @@ declare namespace Flow {
|
|
|
6615
6634
|
* If omitted, events route directly to the collector.
|
|
6616
6635
|
* Can be an array for explicit chain control (bypasses transformer.next resolution).
|
|
6617
6636
|
*/
|
|
6618
|
-
next?:
|
|
6637
|
+
next?: RouteSpec;
|
|
6619
6638
|
/** Cache configuration for this source. */
|
|
6620
6639
|
cache?: Cache;
|
|
6621
6640
|
/**
|
|
@@ -6657,7 +6676,7 @@ declare namespace Flow {
|
|
|
6657
6676
|
* If omitted, events are sent directly from the collector.
|
|
6658
6677
|
* Can be an array for explicit chain control.
|
|
6659
6678
|
*/
|
|
6660
|
-
before?:
|
|
6679
|
+
before?: RouteSpec;
|
|
6661
6680
|
/**
|
|
6662
6681
|
* First transformer in post-push chain.
|
|
6663
6682
|
*
|
|
@@ -6665,7 +6684,7 @@ declare namespace Flow {
|
|
|
6665
6684
|
* at context.ingest._response. Consent is inherited from the destination
|
|
6666
6685
|
* gate - no separate consent check needed.
|
|
6667
6686
|
*/
|
|
6668
|
-
next?:
|
|
6687
|
+
next?: RouteSpec;
|
|
6669
6688
|
/** Cache configuration for this destination. */
|
|
6670
6689
|
cache?: Cache;
|
|
6671
6690
|
/** Destination-level variables (highest priority in cascade). */
|
|
@@ -6698,7 +6717,7 @@ declare namespace Flow {
|
|
|
6698
6717
|
* Enables pre-processing or context loading before the main transform.
|
|
6699
6718
|
* Uses the same chain resolution as source.next and destination.before.
|
|
6700
6719
|
*/
|
|
6701
|
-
before?:
|
|
6720
|
+
before?: RouteSpec;
|
|
6702
6721
|
/**
|
|
6703
6722
|
* Next transformer in chain.
|
|
6704
6723
|
*
|
|
@@ -6709,7 +6728,7 @@ declare namespace Flow {
|
|
|
6709
6728
|
* Array values define an explicit chain (no walking). Circular references
|
|
6710
6729
|
* are safely detected at runtime by `walkChain()`.
|
|
6711
6730
|
*/
|
|
6712
|
-
next?:
|
|
6731
|
+
next?: RouteSpec;
|
|
6713
6732
|
/** Cache configuration for this transformer. */
|
|
6714
6733
|
cache?: Cache;
|
|
6715
6734
|
/** Transformer-level variables (highest priority in cascade). */
|
package/dist/dev.d.ts
CHANGED
|
@@ -4800,17 +4800,17 @@ declare namespace cache {
|
|
|
4800
4800
|
}
|
|
4801
4801
|
|
|
4802
4802
|
declare const MatchExpressionSchema: z.ZodType;
|
|
4803
|
-
declare const
|
|
4804
|
-
declare const
|
|
4803
|
+
declare const RouteSpecSchema: z.ZodType;
|
|
4804
|
+
declare const RouteSchema: z.ZodObject<{
|
|
4805
4805
|
match: z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodLiteral<"*">]>;
|
|
4806
4806
|
next: z.ZodLazy<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
4807
4807
|
}, z.core.$strip>;
|
|
4808
4808
|
|
|
4809
4809
|
declare const matcher_MatchExpressionSchema: typeof MatchExpressionSchema;
|
|
4810
|
-
declare const
|
|
4811
|
-
declare const
|
|
4810
|
+
declare const matcher_RouteSchema: typeof RouteSchema;
|
|
4811
|
+
declare const matcher_RouteSpecSchema: typeof RouteSpecSchema;
|
|
4812
4812
|
declare namespace matcher {
|
|
4813
|
-
export { matcher_MatchExpressionSchema as MatchExpressionSchema,
|
|
4813
|
+
export { matcher_MatchExpressionSchema as MatchExpressionSchema, matcher_RouteSchema as RouteSchema, matcher_RouteSpecSchema as RouteSpecSchema };
|
|
4814
4814
|
}
|
|
4815
4815
|
|
|
4816
4816
|
declare const CodeSchema: z.ZodObject<{
|
|
@@ -5152,7 +5152,6 @@ declare const index_LoggerHandlerSchema: typeof LoggerHandlerSchema;
|
|
|
5152
5152
|
declare const index_LoopSchema: typeof LoopSchema;
|
|
5153
5153
|
declare const index_MapSchema: typeof MapSchema;
|
|
5154
5154
|
declare const index_MatchExpressionSchema: typeof MatchExpressionSchema;
|
|
5155
|
-
declare const index_NextRuleSchema: typeof NextRuleSchema;
|
|
5156
5155
|
declare const index_OptionalPrimitiveValue: typeof OptionalPrimitiveValue;
|
|
5157
5156
|
declare const index_OrderedPropertiesSchema: typeof OrderedPropertiesSchema;
|
|
5158
5157
|
type index_PackageInfo = PackageInfo;
|
|
@@ -5169,7 +5168,8 @@ declare const index_QueueConfig: typeof QueueConfig;
|
|
|
5169
5168
|
declare const index_RequiredBoolean: typeof RequiredBoolean;
|
|
5170
5169
|
declare const index_RequiredNumber: typeof RequiredNumber;
|
|
5171
5170
|
declare const index_RequiredString: typeof RequiredString;
|
|
5172
|
-
declare const
|
|
5171
|
+
declare const index_RouteSchema: typeof RouteSchema;
|
|
5172
|
+
declare const index_RouteSpecSchema: typeof RouteSpecSchema;
|
|
5173
5173
|
declare const index_RuleSchema: typeof RuleSchema;
|
|
5174
5174
|
declare const index_RulesSchema: typeof RulesSchema;
|
|
5175
5175
|
declare const index_RuntimeInstanceConfig: typeof RuntimeInstanceConfig;
|
|
@@ -5225,7 +5225,7 @@ declare const index_valueJsonSchema: typeof valueJsonSchema;
|
|
|
5225
5225
|
declare const index_z: typeof z;
|
|
5226
5226
|
declare const index_zodToSchema: typeof zodToSchema;
|
|
5227
5227
|
declare namespace index {
|
|
5228
|
-
export { index_BaseContextConfig as BaseContextConfig, index_BatchConfig as BatchConfig, 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_DeepPartialEventSchema as DeepPartialEventSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventSchema as EventSchema, BundlePackageSchema as FlowBundlePackageSchema, BundleSchema as FlowBundleSchema, CodeSchema$1 as FlowCodeSchema, ConfigSchema as FlowConfigSchema, DestinationSchema as FlowDestinationSchema, JsonSchema 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,
|
|
5228
|
+
export { index_BaseContextConfig as BaseContextConfig, index_BatchConfig as BatchConfig, 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_DeepPartialEventSchema as DeepPartialEventSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventSchema as EventSchema, BundlePackageSchema as FlowBundlePackageSchema, BundleSchema as FlowBundleSchema, CodeSchema$1 as FlowCodeSchema, ConfigSchema as FlowConfigSchema, DestinationSchema as FlowDestinationSchema, JsonSchema 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_RouteSpecSchema as RouteSpecSchema, index_RuleSchema as RuleSchema, index_RulesSchema as RulesSchema, index_RuntimeInstanceConfig as RuntimeInstanceConfig, index_SetSchema as SetSchema, SourceSchema$1 as SourceSchema, source as SourceSchemas, index_SourceTypeSchema as SourceTypeSchema, index_SourcesMapConfig as SourcesMapConfig, store as StoreSchemas, index_Timestamp as Timestamp, transformer as TransformerSchemas, index_UserSchema as UserSchema, utilities as UtilitySchemas, 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_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_validateFlowConfig as validateFlowConfig, index_valueConfigJsonSchema as valueConfigJsonSchema, index_valueJsonSchema as valueJsonSchema, index_z as z, index_zodToSchema as zodToSchema };
|
|
5229
5229
|
}
|
|
5230
5230
|
|
|
5231
5231
|
type PackageType = 'source' | 'destination' | 'transformer' | 'store';
|
|
@@ -5552,14 +5552,14 @@ interface Config$6<T extends TypesGeneric$3 = Types$4> {
|
|
|
5552
5552
|
/** Defer destination initialization until these collector events fire (e.g., `['consent']`). */
|
|
5553
5553
|
require?: string[];
|
|
5554
5554
|
/**
|
|
5555
|
-
* Provisioning options for `
|
|
5555
|
+
* Provisioning options for `walkeros setup`. `boolean | object`.
|
|
5556
5556
|
* Triggered only by explicit CLI invocation; never automatic.
|
|
5557
5557
|
*/
|
|
5558
5558
|
setup?: boolean | SetupOptions$2<T>;
|
|
5559
5559
|
/** Transformer chain to run after collector processing but before this destination. */
|
|
5560
|
-
before?:
|
|
5560
|
+
before?: RouteSpec;
|
|
5561
5561
|
/** Transformer chain to run after destination push completes. Push response available at ingest._response. */
|
|
5562
|
-
next?:
|
|
5562
|
+
next?: RouteSpec;
|
|
5563
5563
|
/** Cache configuration for deduplication (step-level: skip push on HIT). */
|
|
5564
5564
|
cache?: Cache;
|
|
5565
5565
|
/** Completely skip this destination — no init, no push, no queuing. */
|
|
@@ -5575,8 +5575,8 @@ type Init$3<T extends TypesGeneric$3 = Types$4> = {
|
|
|
5575
5575
|
code: Code<T>;
|
|
5576
5576
|
config?: Partial<Config$6<T>>;
|
|
5577
5577
|
env?: Partial<Env$3<T>>;
|
|
5578
|
-
before?:
|
|
5579
|
-
next?:
|
|
5578
|
+
before?: RouteSpec;
|
|
5579
|
+
next?: RouteSpec;
|
|
5580
5580
|
cache?: Cache;
|
|
5581
5581
|
};
|
|
5582
5582
|
interface InitDestinations {
|
|
@@ -5812,11 +5812,30 @@ interface OnConfig {
|
|
|
5812
5812
|
*/
|
|
5813
5813
|
type OnFn<T extends TypesGeneric$3 = Types$4> = (type: Types$3, context: Context$5<T>) => PromiseOrValue<void>;
|
|
5814
5814
|
|
|
5815
|
-
|
|
5815
|
+
/**
|
|
5816
|
+
* A single conditional routing rule. Pairs a `match` expression (or `'*'`
|
|
5817
|
+
* wildcard) against ingest metadata with a `next` step to follow when the
|
|
5818
|
+
* match fires. Used inside `Route[]` arrays on `Flow.Source.next`,
|
|
5819
|
+
* `Flow.Source.before`, `Flow.Transformer.next/before`, and
|
|
5820
|
+
* `Flow.Destination.next/before`. Routes are evaluated in order, first match
|
|
5821
|
+
* wins, no match falls through unchanged. The `next` field of a Route
|
|
5822
|
+
* mirrors the outer-position `next` semantics: it points to whatever comes
|
|
5823
|
+
* downstream when this rule fires.
|
|
5824
|
+
*/
|
|
5825
|
+
interface Route {
|
|
5816
5826
|
match: MatchExpression | '*';
|
|
5817
|
-
next:
|
|
5827
|
+
next: RouteSpec;
|
|
5818
5828
|
}
|
|
5819
|
-
|
|
5829
|
+
/**
|
|
5830
|
+
* The union accepted at every chain-routing boundary. A plain `string`
|
|
5831
|
+
* targets one step by ID; `string[]` declares an explicit sequence ignoring
|
|
5832
|
+
* per-step `next`; `Route[]` enables conditional routing on ingest metadata.
|
|
5833
|
+
* At runtime, `compileNext()` collapses any RouteSpec into a `CompiledNext`
|
|
5834
|
+
* (static, chain, or routes form) for hot-path evaluation. Surfaces via
|
|
5835
|
+
* `Flow.Source.before/next`, `Flow.Transformer.before/next`,
|
|
5836
|
+
* `Flow.Destination.before/next`.
|
|
5837
|
+
*/
|
|
5838
|
+
type RouteSpec = string | string[] | Route[];
|
|
5820
5839
|
/**
|
|
5821
5840
|
* Base environment interface for walkerOS transformers.
|
|
5822
5841
|
*
|
|
@@ -5862,8 +5881,8 @@ interface Config$3<T extends TypesGeneric$2 = Types$2> {
|
|
|
5862
5881
|
env?: Env$2<T>;
|
|
5863
5882
|
id?: string;
|
|
5864
5883
|
logger?: Config$5;
|
|
5865
|
-
before?:
|
|
5866
|
-
next?:
|
|
5884
|
+
before?: RouteSpec;
|
|
5885
|
+
next?: RouteSpec;
|
|
5867
5886
|
cache?: Cache;
|
|
5868
5887
|
init?: boolean;
|
|
5869
5888
|
disabled?: boolean;
|
|
@@ -5891,7 +5910,7 @@ interface Context$3<T extends TypesGeneric$2 = Types$2> extends Base<Config$3<T>
|
|
|
5891
5910
|
interface Result<E = DeepPartialEvent> {
|
|
5892
5911
|
event?: E;
|
|
5893
5912
|
respond?: RespondFn;
|
|
5894
|
-
next?:
|
|
5913
|
+
next?: RouteSpec;
|
|
5895
5914
|
}
|
|
5896
5915
|
/**
|
|
5897
5916
|
* The main transformer function.
|
|
@@ -5940,8 +5959,8 @@ type InitTransformer<T extends TypesGeneric$2 = Types$2> = {
|
|
|
5940
5959
|
code: Init$2<T>;
|
|
5941
5960
|
config?: Partial<Config$3<T>>;
|
|
5942
5961
|
env?: Partial<Env$2<T>>;
|
|
5943
|
-
before?:
|
|
5944
|
-
next?:
|
|
5962
|
+
before?: RouteSpec;
|
|
5963
|
+
next?: RouteSpec;
|
|
5945
5964
|
cache?: Cache;
|
|
5946
5965
|
};
|
|
5947
5966
|
/**
|
|
@@ -5975,7 +5994,7 @@ interface BaseEnv$1 {
|
|
|
5975
5994
|
* @template P - Push function signature (flexible to support HTTP handlers, etc.)
|
|
5976
5995
|
* @template E - Environment dependencies type
|
|
5977
5996
|
* @template I - InitSettings configuration type (user input)
|
|
5978
|
-
* @template U - Setup options type (provisioning options for `
|
|
5997
|
+
* @template U - Setup options type (provisioning options for `walkeros setup`)
|
|
5979
5998
|
*/
|
|
5980
5999
|
interface Types$1<S = unknown, M = unknown, P = Fn$3, E = BaseEnv$1, I = S, U = unknown> {
|
|
5981
6000
|
settings: S;
|
|
@@ -6015,7 +6034,7 @@ interface Config$2<T extends TypesGeneric$1 = Types$1> extends Config<Mapping<T>
|
|
|
6015
6034
|
/** Defer source initialization until these collector events fire (e.g., `['consent']`). */
|
|
6016
6035
|
require?: string[];
|
|
6017
6036
|
/**
|
|
6018
|
-
* Provisioning options for `
|
|
6037
|
+
* Provisioning options for `walkeros setup`. `boolean | object`.
|
|
6019
6038
|
* Triggered only by explicit CLI invocation; never automatic.
|
|
6020
6039
|
*/
|
|
6021
6040
|
setup?: boolean | SetupOptions$1<T>;
|
|
@@ -6090,8 +6109,8 @@ type InitSource<T extends TypesGeneric$1 = Types$1> = {
|
|
|
6090
6109
|
config?: Partial<Config$2<T>>;
|
|
6091
6110
|
env?: Partial<Env$1<T>>;
|
|
6092
6111
|
primary?: boolean;
|
|
6093
|
-
next?:
|
|
6094
|
-
before?:
|
|
6112
|
+
next?: RouteSpec;
|
|
6113
|
+
before?: RouteSpec;
|
|
6095
6114
|
cache?: Cache;
|
|
6096
6115
|
};
|
|
6097
6116
|
/**
|
|
@@ -6127,7 +6146,7 @@ interface Config$1<T extends TypesGeneric = Types> {
|
|
|
6127
6146
|
id?: string;
|
|
6128
6147
|
logger?: Config$5;
|
|
6129
6148
|
/**
|
|
6130
|
-
* Provisioning options for `
|
|
6149
|
+
* Provisioning options for `walkeros setup`. `boolean | object`.
|
|
6131
6150
|
* Triggered only by explicit CLI invocation; never automatic.
|
|
6132
6151
|
*/
|
|
6133
6152
|
setup?: boolean | SetupOptions<T>;
|
|
@@ -6606,7 +6625,7 @@ declare namespace Flow {
|
|
|
6606
6625
|
* (decode, validate, authenticate, normalize raw input).
|
|
6607
6626
|
* Raw request data is available in context.ingest.
|
|
6608
6627
|
*/
|
|
6609
|
-
before?:
|
|
6628
|
+
before?: RouteSpec;
|
|
6610
6629
|
/**
|
|
6611
6630
|
* First transformer in pre-collector chain.
|
|
6612
6631
|
*
|
|
@@ -6615,7 +6634,7 @@ declare namespace Flow {
|
|
|
6615
6634
|
* If omitted, events route directly to the collector.
|
|
6616
6635
|
* Can be an array for explicit chain control (bypasses transformer.next resolution).
|
|
6617
6636
|
*/
|
|
6618
|
-
next?:
|
|
6637
|
+
next?: RouteSpec;
|
|
6619
6638
|
/** Cache configuration for this source. */
|
|
6620
6639
|
cache?: Cache;
|
|
6621
6640
|
/**
|
|
@@ -6657,7 +6676,7 @@ declare namespace Flow {
|
|
|
6657
6676
|
* If omitted, events are sent directly from the collector.
|
|
6658
6677
|
* Can be an array for explicit chain control.
|
|
6659
6678
|
*/
|
|
6660
|
-
before?:
|
|
6679
|
+
before?: RouteSpec;
|
|
6661
6680
|
/**
|
|
6662
6681
|
* First transformer in post-push chain.
|
|
6663
6682
|
*
|
|
@@ -6665,7 +6684,7 @@ declare namespace Flow {
|
|
|
6665
6684
|
* at context.ingest._response. Consent is inherited from the destination
|
|
6666
6685
|
* gate - no separate consent check needed.
|
|
6667
6686
|
*/
|
|
6668
|
-
next?:
|
|
6687
|
+
next?: RouteSpec;
|
|
6669
6688
|
/** Cache configuration for this destination. */
|
|
6670
6689
|
cache?: Cache;
|
|
6671
6690
|
/** Destination-level variables (highest priority in cascade). */
|
|
@@ -6698,7 +6717,7 @@ declare namespace Flow {
|
|
|
6698
6717
|
* Enables pre-processing or context loading before the main transform.
|
|
6699
6718
|
* Uses the same chain resolution as source.next and destination.before.
|
|
6700
6719
|
*/
|
|
6701
|
-
before?:
|
|
6720
|
+
before?: RouteSpec;
|
|
6702
6721
|
/**
|
|
6703
6722
|
* Next transformer in chain.
|
|
6704
6723
|
*
|
|
@@ -6709,7 +6728,7 @@ declare namespace Flow {
|
|
|
6709
6728
|
* Array values define an explicit chain (no walking). Circular references
|
|
6710
6729
|
* are safely detected at runtime by `walkChain()`.
|
|
6711
6730
|
*/
|
|
6712
|
-
next?:
|
|
6731
|
+
next?: RouteSpec;
|
|
6713
6732
|
/** Cache configuration for this transformer. */
|
|
6714
6733
|
cache?: Cache;
|
|
6715
6734
|
/** Transformer-level variables (highest priority in cascade). */
|