/** * Sandbox ID lookup utilities for resolving friendly sandbox identifiers. * * @module operations/ods/sandbox-lookup */ import type { OdsClient } from '../../clients/ods.js'; /** * Error thrown when a sandbox cannot be found by its friendly identifier. */ export declare class SandboxNotFoundError extends Error { readonly identifier: string; readonly realm?: string | undefined; readonly instance?: string | undefined; constructor(identifier: string, realm?: string | undefined, instance?: string | undefined); } /** * Checks if a string is a valid UUID. * * @param value - The string to check * @returns true if the value is a valid UUID */ export declare function isUuid(value: string): boolean; /** * Checks if a string matches the friendly sandbox ID format (realm-instance or realm_instance). * * @param value - The string to check * @returns true if the value matches the friendly format */ export declare function isFriendlySandboxId(value: string): boolean; /** * Parses a friendly sandbox ID into its realm and instance components. * * @param value - The friendly ID to parse (e.g., "abcd-123" or "abcd_123") * @returns Object with realm and instance, or null if not a valid friendly ID */ export declare function parseFriendlySandboxId(value: string): { realm: string; instance: string; } | null; /** * Resolves a sandbox identifier to a UUID. * * If the identifier is already a UUID, it is returned directly without making an API call. * If the identifier is a friendly format (realm-instance), it queries the ODS API to find * the matching sandbox and returns its UUID. * * @param client - The ODS API client * @param identifier - Sandbox identifier (UUID or friendly format like "abcd-123") * @returns The sandbox UUID * @throws {SandboxNotFoundError} If the sandbox cannot be found * * @example * ```typescript * // UUID is returned directly * const uuid = await resolveSandboxId(client, 'abc12345-1234-1234-1234-abc123456789'); * // => 'abc12345-1234-1234-1234-abc123456789' * * // Friendly ID is looked up * const uuid = await resolveSandboxId(client, 'zzzv-123'); * // => 'abc12345-1234-1234-1234-abc123456789' (actual UUID from API) * ``` */ export declare function resolveSandboxId(client: OdsClient, identifier: string): Promise;