/** * Copyright (c) 2026, Salesforce, Inc., * All rights reserved. * For full license text, see the LICENSE.txt file */ import { type DiscoverOutput, type DiscoverSpec } from "./types.js"; import { type OrgAuth } from "../lib/auth.js"; import { type ObjectInfoResult } from "../lib/object-info.js"; import { type PrimeDeps } from "../lib/prime-schema.js"; export interface DiscoverDeps { primeDeps?: PrimeDeps; getOrgAuth?: (orgAlias: string) => Promise; getObjectInfo?: (auth: OrgAuth, orgAlias: string, sObjectName: string) => Promise; } /** * Build the `sf_gql_discover` payload. Three modes: * * - `list_objects`: enumerate queryable SObjects from the schema's * `uiapi.query` selection. Optional `search` substring-filters names. * - `describe_object`: fetch ObjectInfo for `spec.object` and project it * onto the spec-defined `ObjectDescription` shape. * - `describe_field`: same as `describe_object`, narrowed to one field. * * Schema priming follows FR-13.3 — first call against an unprimed org * triggers introspection and surfaces a `Note: Primed schema cache ...` * warning. ObjectInfo carries its own per-object cache inside * `lib/object-info.ts` (1-hour TTL), so describe_* modes do not * re-introspect on every call. */ export declare function buildDiscover(spec: DiscoverSpec, deps?: DiscoverDeps): Promise;