import type { ParseContextType } from '../context/parseTypes.js'; import type { StackTrail } from '../context/StackTrail.js'; /** * Reads a `parameters` field. `undefined` is no parameters. `{}` or `null` * is read as no parameters with an `EMPTY_PARAMETER` warning at the * field. Any other value that is not an array throws. */ export declare const toParameterEntries: ({ parameters, stackTrail, context }: { parameters: Entry[] | undefined; /** Trail that ends in `parameters`. */ stackTrail: StackTrail; context: ParseContextType; }) => Entry[] | undefined; /** A path-level parameter entry, or the whole field, that failed to parse. */ export type BrokenPathParameter = { /** Document-relative trail of the entry, or of the `parameters` field when it is not an array. */ location: string; /** Set only when the raw entry has string `name` and `in`. */ name?: string; in?: string; message: string; }; export type PathParameterList = { parameters: Parameter[] | undefined; broken: BrokenPathParameter[]; }; export type ToPathParameterListArgs = { parameters: Entry[] | undefined; /** Trail that ends in `parameters`. */ stackTrail: StackTrail; context: ParseContextType; /** The tree's parser for one list entry, as used by `toParameterListV3`. */ toEntry: (args: { parameter: Entry; index: number; }) => Parameter[]; }; export declare const toNameAndIn: (parameter: unknown) => Pick; /** * Parses a path item's `parameters` without letting a throw escape. Each * entry that fails logs one `INVALID_PARAMETER` error at its index and is * returned in `broken`; a field that is not an array logs one at the field. * The caller decides per operation which broken entries apply. */ export declare const toPathParameterList: ({ parameters, stackTrail, context, toEntry }: ToPathParameterListArgs) => PathParameterList; /** * The first broken path-level parameter that applies to an operation. An * entry applies unless it has a readable `name` and `in` and the * operation's inline `parameters` hold the same pair, which overrides it. * A `$ref` operation parameter cannot be resolved during parse, so it * overrides nothing. */ export declare const toApplyingBrokenParameter: ({ broken, operation }: { broken: BrokenPathParameter[]; /** The raw operation object. */ operation: unknown; }) => BrokenPathParameter | undefined; /** * True when a broken path-level parameter applies to the operation. Logs * one `INVALID_OPERATION` error at the operation that names the first * such entry. */ export declare const isDroppedByPathParameter: ({ brokenParameters, operation, stackTrail, context }: { brokenParameters: BrokenPathParameter[]; /** The raw operation object. */ operation: unknown; /** Trail that ends in the operation's method. */ stackTrail: StackTrail; context: ParseContextType; }) => boolean;