Kaizen
Browse modulesPricingpricing/sharedFunctions

Function: buildEngineScopeMapping()

function buildEngineScopeMapping(scopes: Record<string, Record<string, string> | undefined>, prefixes: Record<string, string>): Record<string, string>;

Defined in: shared/pricing/scope-mapping.ts:91

Flatten a PricingScopeMapping into the engine-facing Record<scope_type, fullPath> by prefixing each section's paths. Throws if a section in scopes has no matching entry in prefixes — that's a configuration bug worth surfacing at startup.

Parameters

ParameterType
scopesRecord<string, Record<string, string> | undefined>
prefixesRecord<string, string>

Returns

Record<string, string>

On this page