import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { ApideckError } from "./apideckerror.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; /** * HTTP request details */ export type DetailRequest = {}; /** * HTTP response details */ export type DetailResponse = {}; /** * Debug information including request/response details and OAuth timing metadata */ export type DetailDebug = { /** * HTTP request details */ request?: DetailRequest | undefined; /** * HTTP response details */ response?: DetailResponse | undefined; /** * Error message from downstream provider or network layer */ message?: string | undefined; /** * Error code (e.g., ETIMEDOUT, ECONNREFUSED) */ code?: string | undefined; /** * Unix timestamp (milliseconds) when credentials will be deleted if not refreshed. Only present for non-recoverable errors (401, 400). Credentials are preserved indefinitely for recoverable/network errors. */ credentialsExpireAtMs?: number | undefined; /** * Unix timestamp (milliseconds) when token refresh retry is allowed after cooldown period expires. */ retryAfterMs?: number | undefined; /** * Milliseconds remaining in cooldown period before retry is allowed. */ cooldownRemainingMs?: number | undefined; }; export type Detail2 = { /** * Error type identifier */ type?: string | undefined; /** * Detailed error message */ message?: string | undefined; /** * Debug information including request/response details and OAuth timing metadata */ debug?: DetailDebug | undefined; }; /** * Contains parameter or domain specific information related to the error and why it occurred. */ export type UnauthorizedDetail = string | Detail2; /** * Unauthorized */ export type UnauthorizedData = { /** * HTTP status code */ statusCode?: number | undefined; /** * Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231) */ error?: string | undefined; /** * The type of error returned */ typeName?: string | undefined; /** * A human-readable message providing more details about the error. */ message?: string | undefined; /** * Contains parameter or domain specific information related to the error and why it occurred. */ detail?: string | Detail2 | undefined; /** * Link to documentation of error type */ ref?: string | undefined; }; /** * Unauthorized */ export declare class Unauthorized extends ApideckError { /** * HTTP status code */ statusCode?: number | undefined; /** * Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231) */ error?: string | undefined; /** * The type of error returned */ typeName?: string | undefined; /** * Contains parameter or domain specific information related to the error and why it occurred. */ detail?: string | Detail2 | undefined; /** * Link to documentation of error type */ ref?: string | undefined; /** The original data that was passed to this error instance. */ data$: UnauthorizedData; constructor(err: UnauthorizedData, httpMeta: { response: Response; request: Request; body: string; }); } /** @internal */ export declare const DetailRequest$inboundSchema: z.ZodType; export declare function detailRequestFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const DetailResponse$inboundSchema: z.ZodType; export declare function detailResponseFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const DetailDebug$inboundSchema: z.ZodType; export declare function detailDebugFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Detail2$inboundSchema: z.ZodType; export declare function detail2FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const UnauthorizedDetail$inboundSchema: z.ZodType; export declare function unauthorizedDetailFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Unauthorized$inboundSchema: z.ZodType; //# sourceMappingURL=unauthorized.d.ts.map