/** Structured diagnostics returned with an API or transport failure. */ export interface OilPriceAPIErrorDetails { statusCode?: number; code?: string; requestId?: string; docsUrl?: string; currentPlan?: string; requiredPlan?: string; requiredFeature?: string; remediationUrl?: string; retryAfter?: number; headers?: Record; rawBody?: unknown; } /** Base class for every failure surfaced by the SDK. */ export declare class OilPriceAPIError extends Error { statusCode?: number; code?: string; requestId?: string; docsUrl?: string; currentPlan?: string; requiredPlan?: string; requiredFeature?: string; remediationUrl?: string; retryAfter?: number; headers?: Record; rawBody?: unknown; constructor(message: string, statusCode?: number, code?: string, details?: OilPriceAPIErrorDetails); } export declare class AuthenticationError extends OilPriceAPIError { constructor(message?: string, details?: OilPriceAPIErrorDetails); } export declare class RateLimitError extends OilPriceAPIError { constructor(message?: string, retryAfter?: number, details?: OilPriceAPIErrorDetails); } export declare class NotFoundError extends OilPriceAPIError { constructor(message?: string, details?: OilPriceAPIErrorDetails); } export declare class ServerError extends OilPriceAPIError { constructor(message?: string, statusCode?: number, details?: OilPriceAPIErrorDetails); } export declare class ValidationError extends OilPriceAPIError { constructor(message: string, details?: OilPriceAPIErrorDetails); } export declare class TimeoutError extends OilPriceAPIError { constructor(message: string | undefined, timeout: number, details?: OilPriceAPIErrorDetails); } /** Convert canonical and legacy API failure envelopes into the public SDK contract. */ export declare function errorFromResponse(response: Response, body: string, apiKey?: string): OilPriceAPIError; export declare const isHTTPError: (error: unknown, status: number) => error is OilPriceAPIError; export declare const isAuthenticationError: (error: unknown) => error is AuthenticationError; export declare const isQuotaError: (error: unknown) => error is OilPriceAPIError; export declare const isEntitlementError: (error: unknown) => error is OilPriceAPIError; export declare const isNotFoundError: (error: unknown) => error is NotFoundError; export declare const isRateLimitError: (error: unknown) => error is RateLimitError; export declare const isServerError: (error: unknown) => error is OilPriceAPIError;