/** * Generates TypeScript interfaces and helper types/functions for representing * collection data at varying levels of "depth" (relation expansion) for Payload CMS. * * This function analyzes the provided program (typically a payload-types.ts), * collects all relevant interfaces, and emits: * - Depth union type (e.g., `export type Depth = 0 | 1 | 2`) * - Per-collection depth interfaces (e.g., `Post_D0`, `Post_D1`, ...) * - DepthQuery type for mapping collection slugs and depth levels to the correct interface * - Runtime helpers for extracting IDs and pruning undefined values * - Mapper functions for projecting data from higher to lower depth * - Dispatcher for projecting any collection's data between depth levels * * @param program - The TypeScript program or AST containing collection interfaces. * @param maxDepth - The maximum depth level to generate interfaces for (default: 2). * @param opts - Optional configuration: * @param opts.onlyNames - Restrict generation to specific interface names. * @returns A string containing all generated TypeScript code. * @throws If no collections are found in the program's Config interface. */ export declare const generateDepthInterfaces: (program: unknown, maxDepth?: number, opts?: { onlyNames?: string[]; }) => string; //# sourceMappingURL=transform.d.ts.map