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 RequestT = {}; /** * HTTP response details */ export type ResponseT = {}; /** * Debug information including request/response details and OAuth timing metadata */ export type Debug = { /** * HTTP request details */ request?: RequestT | undefined; /** * HTTP response details */ response?: ResponseT | 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 Two = { /** * Error type identifier */ type?: string | undefined; /** * Detailed error message */ message?: string | undefined; /** * Debug information including request/response details and OAuth timing metadata */ debug?: Debug | undefined; additionalProperties?: { [k: string]: any; } | undefined; }; /** * Contains parameter or domain specific information related to the error and why it occurred. */ export type UnauthorizedResponseDetail = string | Two; /** * Unauthorized */ export type UnauthorizedResponseData = { /** * 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 | Two | undefined; /** * Link to documentation of error type */ ref?: string | undefined; }; /** * Unauthorized */ export declare class UnauthorizedResponse 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 | Two | undefined; /** * Link to documentation of error type */ ref?: string | undefined; /** The original data that was passed to this error instance. */ data$: UnauthorizedResponseData; constructor(err: UnauthorizedResponseData, httpMeta: { response: Response; request: Request; body: string; }); } /** @internal */ export declare const RequestT$inboundSchema: z.ZodType; export declare function requestFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ResponseT$inboundSchema: z.ZodType; export declare function responseFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Debug$inboundSchema: z.ZodType; export declare function debugFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Two$inboundSchema: z.ZodType; export declare function twoFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const UnauthorizedResponseDetail$inboundSchema: z.ZodType; export declare function unauthorizedResponseDetailFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const UnauthorizedResponse$inboundSchema: z.ZodType; //# sourceMappingURL=unauthorizedresponse.d.ts.map