/** * Copyright (c) 2026, Salesforce, Inc., * All rights reserved. * For full license text, see the LICENSE.txt file */ import { type DetailSpec, type ToolOutput } from "./types.js"; import { type PrimeDeps } from "../lib/prime-schema.js"; /** * Build a UIAPI single-record detail query against a Salesforce org. Implements * `sf_gql_detail` intent for the graphiti MCP server (FR-5.5). * * Implicit behaviors not visible in the signature: * - Always declares `: ID!` (default name `id`) and binds it via * `where: { Id: { eq: $ } }`, with `first: 1` set on the * connection. Single-record by Id is the whole point of this tool. * - Unlike `sf_gql_list`: no `$after` cursor, no `pageInfo` selection, and no * top-level `filter` / `orderBy` / `scope`. * - Scalar fields auto-wrap with `{ value }` per UIAPI; `Id` is selected bare. * - Dotted paths in `fields` / `parentFields` expand polymorphic unions into * per-member inline fragments; members lacking the field are silently skipped. * - `childRelationships` render as ` { edges { node { ... } } }` * connections with their own `first` / `filter` / `orderBy` (and `$varName` * leaves promote the same way they do on `sf_gql_list`). * - Operation name defaults to `Detail`. * * Throws on invalid `object` or `operationName` (must be valid GraphQL Names), * auth-missing or introspection failure (via `getSchemaWithPriming`), on FR-5.5 * spec violations (empty `idVariable`, collision with a child-filter `$varName` * of a different type); never throws on validation or codegen failure (those * surface as `warnings[]`). */ export declare function buildDetail(spec: DetailSpec, deps?: PrimeDeps): Promise;