interface NestedExampleMetadata { code: string; } type NestedExampleEntry = NestedExampleMetadata | { [variationKey: string]: NestedExampleMetadata | NestedExampleEntry; }; interface NestedVersionExamples { [exampleName: string]: NestedExampleEntry; } interface NestedExamplesHierarchy { kind: "examples"; versions: { [version: string]: NestedVersionExamples; }; } declare const TYPESCRIPT_OSDK_CONTEXT: NestedExamplesHierarchy; type ExampleMetadata$1 = NestedExampleMetadata; /** * Utility class for working with the nested examples context */ declare class NestedOsdkExamplesContext { /** * Get compatible versions for a given version (versions <= target version) * Uses the official semver package for proper semantic version comparison */ private static getCompatibleVersions; /** * Merge examples from multiple compatible versions */ private static mergeVersionExamples; /** * Get all available versions */ static getAvailableVersions(): string[]; /** * Get all base example names for a version (top-level keys) * Includes examples from compatible versions (same major, lower minor versions) */ static getBaseExamplesForVersion(version: string): string[]; /** * Get a specific example or nested variation * Uses version fallback to find examples from compatible versions */ static getExample(version: string, examplePath: string[]): ExampleMetadata$1 | undefined; /** * Get all variations for a base example * Uses version fallback to find variations from compatible versions */ static getVariations(version: string, baseName: string): { [variationKey: string]: ExampleMetadata$1; } | undefined; /** * Check if an example has variations */ static hasVariations(version: string, baseName: string): boolean; /** * Get examples with version fallback information */ static getExamplesWithVersionInfo(version: string): Array<{ name: string; example: NestedExampleEntry; availableInVersions: string[]; }>; /** * Flatten the nested structure back to the original format for compatibility */ static flatten(): { kind: "examples"; versions: { [version: string]: { examples: { [exampleName: string]: ExampleMetadata$1; }; }; }; }; /** * Search examples by pattern, including nested variations * When searching within a specific version, includes results from compatible versions */ static searchExamples(pattern: string, targetVersion?: string): Array<{ version: string; baseName: string; variationKey?: string; fullPath: string[]; metadata: ExampleMetadata$1; sourceVersion: string; }>; } type ExampleMetadata = NestedExampleMetadata; interface VersionExamples { examples: { [exampleName: string]: ExampleMetadata; }; } interface ExamplesHierarchy { kind: "examples"; versions: { [version: string]: VersionExamples; }; } /** * A single example matched by `searchExamples` / `findExamplesByCodePattern`. */ interface ExampleSearchResult { version: string; exampleName: string; metadata: ExampleMetadata; } /** * Utility class for working with the original flat examples structure */ declare class OsdkExamplesContext { /** * Get all available versions in the examples hierarchy */ static getAvailableVersions(): string[]; /** * Get all example names for a specific version */ static getExamplesForVersion(version: string): string[]; /** * Get example metadata for a specific version and example name */ static getExample(version: string, exampleName: string): ExampleMetadata | undefined; /** * Get the code content for a specific example */ static getExampleCode(version: string, exampleName: string): string | undefined; /** * Search for examples by name pattern across all versions */ static searchExamples(pattern: string): Array; /** * Get examples that contain specific code patterns */ static findExamplesByCodePattern(pattern: string): Array; } export { type NestedExampleMetadata as ExampleMetadata, type ExamplesHierarchy, type NestedExampleEntry, type NestedExamplesHierarchy, NestedOsdkExamplesContext, type NestedVersionExamples, OsdkExamplesContext, TYPESCRIPT_OSDK_CONTEXT, type VersionExamples, OsdkExamplesContext as default };