import { type NodeInput } from '../helpers/get-resolved-ref.js'; import type { OperationObject } from '../schemas/v3.2/strict/operation.js'; import type { PathItemObject } from '../schemas/v3.2/strict/path-item.js'; /** * Resolves a path item (or webhook path item), merging sibling properties alongside `$ref`. * * References are followed through chains, not just one hop. Bundling a split-file document does not * inline its external references — it moves each target into the `x-ext` bucket and rewrites the * reference to point there — so a file that is itself only a `$ref` to another file bundles into a * bucket entry holding a `$ref` to a second bucket entry. Stopping after one hop leaves that path * item unresolved, and its operations reach neither the sidebar nor the generated chunks. */ export declare const getResolvedPathItem: (pathItem: NodeInput | undefined) => PathItemObject | undefined; /** * Returns an operation from a path item, resolving $ref wrappers on the path item first. */ export declare const getPathItemOperation: (pathItem: NodeInput | undefined, method: string) => NodeInput | undefined; /** * Assigns an operation on a path item, including when the path item is a $ref wrapper. */ export declare const setPathItemOperation: (pathItem: NodeInput | undefined, method: string, operation: OperationObject) => void; /** * Deletes an operation from a path item, including when the path item is a $ref wrapper. * * Every hop is cleared, not just the first. `getResolvedPathItem` resolves through chains — which * bundling a split-file document produces — and gives a sibling precedence over the value it * resolves to, so a copy left anywhere along the chain keeps surfacing after the delete. */ export declare const deletePathItemOperation: (pathItem: NodeInput | undefined, method: string) => void; /** * Invokes a callback for each HTTP method operation on a path item, resolving $ref wrappers first. */ export declare const forEachPathItemOperation: (pathItem: NodeInput | undefined, callback: (method: string, operation: NodeInput) => void) => void; /** * Returns whether a path item has no remaining keys after resolving $ref wrappers. * * Used when cleaning up after deleting an operation: a path entry is only removed once nothing is * left, so path-level metadata (`parameters`, `summary`, `servers`) and $ref wrappers are preserved * even when every HTTP method has been removed. */ export declare const pathItemIsEmpty: (pathItem: NodeInput | undefined) => boolean; /** JSON pointer suffix for an operation within its Path Item Object. */ export declare const getPathItemOperationKey: (method: string) => string; //# sourceMappingURL=for-each-path-item-operation.d.ts.map