import { type OrgAuth } from "../auth/sf-auth.ts"; import type { DescribeCache } from "./cache.ts"; import type { GlobalDescribe, SObjectDescribe } from "./types.ts"; /** * How many describe calls we keep in flight at once. Describes are cheap, * read-only REST GETs; Salesforce tolerates modest parallelism fine, and * `salesforceFetch` already backs off on 429/503. 6 cuts a 30–90s cold * walk on managed-package-heavy orgs to roughly the latency of the * slowest level of the BFS, without tripping concurrent-request limits. */ export declare const DESCRIBE_CONCURRENCY = 6; export type DescribeClientOptions = { auth: OrgAuth; cache: DescribeCache; /** Injected for tests. If provided, used instead of real HTTP. */ fetchFn?: typeof fetch; }; /** * Thin REST describe client. Deliberately not using jsforce's describe wrapper: * we only need two endpoints and we want total control over errors and caching. * * Endpoints (relative to instanceUrl): * GET /services/data/v/sobjects/ → global describe * GET /services/data/v/sobjects//describe/ → object describe */ export declare class DescribeClient { private readonly auth; private readonly cache; private readonly fetchFn; private globalCache; constructor(opts: DescribeClientOptions); describeGlobal(): Promise; describeObject(name: string): Promise; /** * Describe many objects with bounded parallelism (DESCRIBE_CONCURRENCY). * The result Map preserves input order. Cache hits short-circuit before * any HTTP; transient 429/503 are retried inside salesforceFetch. */ describeMany(names: string[]): Promise>; private get; }