export type PostmanTreeNode = { path: readonly number[]; name: string; isFolder: boolean; method?: string; children?: PostmanTreeNode[]; }; export declare const pathKey: (path: readonly number[]) => string; /** * Inverse of {@link pathKey}: parses stable request index path JSON from the UI. * Returns undefined for malformed input. */ export declare const parsePostmanPathKey: (key: string) => readonly number[] | undefined; /** Maps UI path keys to `ConvertOptions.requestIndexPaths`; invalid keys are skipped. */ export declare const pathKeysToRequestIndexPaths: (keys: readonly string[]) => number[][]; /** * Resolves the Postman JSON node at `path` (indices into root `item`, then each folder’s `item`). * Matches {@link buildPostmanRequestTree} paths and postman-to-openapi `getNodeAtPath`. */ export declare const getPostmanItemAtIndexPath: (itemRoot: unknown, path: readonly number[]) => unknown; export declare const extractRequestMethod: (request: unknown) => string; /** * Builds a shallow tree of folders and requests from a Postman `item` array. * Paths are indices from the collection root through nested `item` arrays. */ export declare const buildPostmanRequestTree: (items: unknown) => PostmanTreeNode[]; /** Counts Postman request leaves in an `item` array (same rules as {@link buildPostmanRequestTree}). */ export declare const countPostmanRequestLeaves: (items: unknown) => number; /** Path keys for every request leaf in the tree (depth-first). */ export declare const collectAllRequestPathKeys: (nodes: PostmanTreeNode[]) => string[]; export declare const collectRequestPathKeysUnderFolder: (node: PostmanTreeNode) => string[]; /** Returns a new selection list after toggling one request path key. */ export declare const applyPostmanRequestSelectionChange: (selectedKeys: readonly string[], key: string, selected: boolean) => string[]; /** Returns a new selection list after selecting or clearing every request under a folder. */ export declare const applyPostmanFolderSelectionChange: (selectedKeys: readonly string[], node: PostmanTreeNode, selected: boolean) => string[]; /** Number of request leaves under this node (0 for empty folders). */ export declare const countRequestLeaves: (node: PostmanTreeNode) => number; export declare const folderFullySelected: (node: PostmanTreeNode, selected: ReadonlySet) => boolean; /** True when at least one descendant request is selected but not all. */ export declare const folderHasPartialSelection: (node: PostmanTreeNode, selected: ReadonlySet) => boolean; //# sourceMappingURL=postman-request-tree.d.ts.map