import type { SObjectDescribe } from "../describe/types.ts"; export type RequiredField = { name: string; label?: string; type: string; /** For reference fields: the referenceTo[] array. Empty for non-references. */ referenceTo: string[]; /** True if master-detail (cascadeDelete on the ref). Implies required regardless of nillable. */ masterDetail: boolean; /** Picklist value count, if applicable. */ picklistValueCount: number; /** "requiredByNillable" — not nillable. "requiredByMasterDetail" — master-detail ref. */ reason: "requiredByNillable" | "requiredByMasterDetail"; }; export type RequiredFieldOptions = { /** If set, restrict required-field analysis to this record-type developer name. */ recordType?: string; }; /** * Classify which fields on a describe *must* be populated on insert. * * Rules: * - Master-detail parents are ALWAYS required (you can't null them). * - Otherwise: createable && !nillable && !defaultedOnCreate && !calculated. * - Record-type-specific required fields could be computed from picklist * record-type assignments in a future pass; for now we just record the * record type on the result if one was requested, and the caller can * narrow further. */ export declare function classifyRequiredFields(describe: SObjectDescribe, opts?: RequiredFieldOptions): RequiredField[];