import { type ExampleDiagnostic, type ResolvedExample } from "@azure-tools/typespec-azure-examples"; import { type DiagnosticTarget, type Program } from "@typespec/compiler"; /** The outcome of loading a service's unified examples for a single target API version. */ export interface UnifiedExamplesResult { /** Resolved examples grouped by unified operation key (e.g. `CaCertificates.get`). */ readonly byOperationKey: Map; /** Diagnostics produced while resolving. */ readonly diagnostics: readonly ExampleDiagnostic[]; readonly operationTargets: Map; } /** * Discover the unified example files under `baseDir`: a top-level `examples.yaml` and/or * per-interface files under `examples/` (`examples/.yaml`). */ export declare function discoverUnifiedExampleFiles(program: Program, baseDir: string): Promise; /** Returns true if the service directory contains any unified example files. */ export declare function hasUnifiedExamples(program: Program, baseDir: string): Promise; /** * Load and resolve the unified examples in `baseDir` for `apiVersion`, using `versionOrder` (the * service's linear list of API versions) to select the applicable variant of each operation. */ export declare function loadUnifiedExamples(program: Program, baseDir: string, apiVersion: string, versionOrder: readonly string[]): Promise; /** Map a Swagger `operationId` (`Interface_Method`) to its unified operation key. */ export declare function operationKeyForId(operationId: string): string; /** * Build a deterministic, unique file name for a materialized example. When `preferredName` is * provided (the original legacy file name preserved during migration) it is used as the base so the * emitted file keeps its original name; otherwise the conventional `[_].json` * name is used. The result is disambiguated against `used`. */ export declare function legacyExampleFileName(operationId: string, title: string | undefined, used: Set<string>, preferredName?: string): string; /** * Disambiguate an `x-ms-examples` key against the keys already used for the same operation. Two * variants of one operation can derive the same title (e.g. an untitled lineage whose default key * is the `operationId` next to a lineage explicitly titled the same), which would otherwise silently * overwrite each other in the `x-ms-examples` map. Mirrors {@link legacyExampleFileName}. */ export declare function uniqueExampleKey(title: string, used: Set<string>): string; //# sourceMappingURL=examples-unified.d.ts.map