import type { OrgAuth } from "../auth/sf-auth.ts"; import { type DependencyGraph } from "../graph/build.ts"; import type { SCC } from "../graph/cycles.ts"; import { type FieldFilterOptions } from "../graph/filters.ts"; import { type LoadPlan } from "../graph/order.ts"; export type InspectOptions = { auth: OrgAuth; /** The single object the user is focused on. */ rootObject: string; /** Walk parents transitively up to this depth. Stops at standard root objects. */ parentWalkDepth: number; /** If false, skip the 1-level child walk. */ includeChildren: boolean; /** Record-type developer name (scopes required-field analysis on the root). */ recordType?: string; /** Field filters (formula/audit/non-createable). Defaults = all excluded. */ fieldFilters?: FieldFilterOptions; /** If true, run SELECT COUNT() per node (aggregate metadata only). */ includeCounts: boolean; cacheTtlSeconds: number; bypassCache: boolean; cacheRoot?: string; /** Injected for tests. */ fetchFn?: typeof fetch; /** Skip global-describe validation (unit-test shortcut). */ skipGlobalValidate?: boolean; /** * User-selected "Child + 1" lookups. Key = direct-child-of-root object * name; value = reference-field names on that child to walk exactly one * hop further to their direct parent. No transitive recursion. * See walkFromRoot() Phase 2. */ childLookups?: Record; }; export type InspectResult = { graph: DependencyGraph; plan: LoadPlan; cycles: SCC[]; rootObject: string; /** Objects walked as parents of the root (described or referenced-only). */ parentObjects: string[]; /** Objects walked as 1-level children of the root. */ childObjects: string[]; /** * Objects pulled in by resolving user-selected `childLookups`. Subset of * parentObjects; surfaced separately so callers can auto-include them in * the final seed list without requiring a second `select` step. */ childLookupTargets: string[]; }; /** * The pure engine behind `sandbox-seed inspect`. Given auth + a root object, * produce a focused dependency graph (root + transitive parents + 1-level children), * cycle report, and load plan. * * Does NOT render. Rendering is the caller's responsibility. */ export declare function runInspect(opts: InspectOptions): Promise;