import { t as IRestApiContext } from "./types2.cjs"; import { GenericValue, IDataObject } from "n8n-workflow"; import { Method, RawAxiosRequestHeaders } from "axios"; //#region src/utils.d.ts declare const NO_NETWORK_ERROR_CODE = 999; declare const STREAM_SEPARATOR = "\u29C9\u21CB\u21CB\u27BD\u2311\u29C9\u00A7\u00A7\n"; declare class MfaRequiredError extends Error { constructor(); } declare class ResponseError extends Error { httpStatusCode?: number; errorCode?: number; serverStackTrace?: string; meta?: Record; hint?: string; constructor(message: string, options?: { errorCode?: number; httpStatusCode?: number; stack?: string; meta?: Record; hint?: ResponseError['hint']; }); } type UnauthorizedHandler = (baseURL: string) => void; declare function setUnauthorizedHandler(handler: UnauthorizedHandler): void; declare function request(config: { method: Method; baseURL: string; endpoint: string; headers?: RawAxiosRequestHeaders; data?: GenericValue | GenericValue[]; withCredentials?: boolean; }): Promise; declare function getFullApiResponse(context: IRestApiContext, method: Method, endpoint: string, data?: GenericValue | GenericValue[]): Promise<{ count: number; data: T; }>; declare function makeRestApiRequest(context: IRestApiContext, method: Method, endpoint: string, data?: GenericValue | GenericValue[]): Promise; declare function get(baseURL: string, endpoint: string, params?: IDataObject, headers?: RawAxiosRequestHeaders): Promise; declare function post(baseURL: string, endpoint: string, params?: IDataObject, headers?: RawAxiosRequestHeaders): Promise; declare function patch(baseURL: string, endpoint: string, params?: IDataObject, headers?: RawAxiosRequestHeaders): Promise; declare function streamRequest(context: IRestApiContext, apiEndpoint: string, payload: object, onChunk?: (chunk: T) => void, onDone?: () => void, onError?: (e: Error) => void, separator?: string, abortSignal?: AbortSignal): Promise; //#endregion export { UnauthorizedHandler as a, makeRestApiRequest as c, request as d, setUnauthorizedHandler as f, STREAM_SEPARATOR as i, patch as l, NO_NETWORK_ERROR_CODE as n, get as o, streamRequest as p, ResponseError as r, getFullApiResponse as s, MfaRequiredError as t, post as u }; //# sourceMappingURL=utils2.d.cts.map