export interface PathMapping { /** The API area (e.g. "admin", "store") */ area: string; /** Domain name in kebab-case as it appears in the HTTP types directory. e.g. "product" */ domain: string; /** Absolute path to the HTTP types directory for this domain+area */ outputDir: string; /** Absolute path to the output payloads.ts file */ payloadsFile: string; /** Absolute path to the output queries.ts file */ queriesFile: string; } /** * Maps validator file paths to HTTP types output paths and resolves domain names. */ export declare class PathMapper { /** * Maps route directory names to HTTP types domain names only when the mapping * cannot be derived by singularizing the last hyphen-segment. * * Most route dirs (e.g. "products" → "product", "sales-channels" → "sales-channel") * are handled automatically by `singularizeRouteName`. Only entries with a * fundamentally different domain belong here. * * This list is only meant to remain backward-compatible with existing schemas that predate this tool. * When adding new validator schemas, prefer structuring the route and domain names * to fit the automatic singularization logic and avoid adding to this registry. */ private static readonly ENTITY_NAME_OVERRIDES; /** * Derives the domain name from a route directory name by singularizing its * last hyphen-separated segment (e.g. "sales-channels" → "sales-channel", * "product-categories" → "product-category"). */ private static singularizeRouteName; /** * Computes the PathMapping for a given validator file path. * * @param validatorFilePath - Absolute path to the validators.ts file. * @returns PathMapping or undefined if the path cannot be mapped. */ static mapValidatorToHttpTypes(validatorFilePath: string): PathMapping | undefined; /** * Returns glob patterns for all validator files in the given area(s). * Pass `"all"` to get globs for every configured area. */ static getValidatorGlobs(area: string): string[]; /** * Returns the absolute path to the HTTP types directory for a given domain. */ static getHttpTypesDir(domain: string): string; /** * Resolves the HTTP types domain name for a given validator route directory name, * applying overrides and singularization as needed. */ static resolveHttpDomain(routeDirName: string): string; /** * Filters a list of validator file paths to only those matching the given domain name. */ static filterValidatorsByDomain(files: string[], domain: string): string[]; } //# sourceMappingURL=path-mapper.d.ts.map