UNPKG

@hpcc-js/comms

Version:
44 lines (43 loc) 1.6 kB
import { IConnection, IOptions, ResponseType } from "./connection.ts"; export type ESPResponseType = ResponseType | "json2" | "xsd"; export declare function isArray(arg: any): boolean; export interface Exception { Code: number; Message: string; } export interface Exceptions { Source: string; Exception: Exception[]; } export declare class ESPExceptions extends Error implements Exceptions { isESPExceptions: boolean; action: string; request: string; Source: string; Exception: Exception[]; constructor(action: string, request: any, exceptions: Exceptions); } export declare function isExceptions(err: any): err is Exceptions; export declare class ESPConnection implements IConnection { private _connection; get baseUrl(): string; private _service; private _version; constructor(optsConnection: IOptions | IConnection, service: string, version: string); service(): string; service(_: string): ESPConnection; version(): string; version(_: string): ESPConnection; toESPStringArray(target: any, arrayName: string): any; opts(_: Partial<IOptions>): this; opts(): IOptions; send(action: string, _request?: any, espResponseType?: ESPResponseType, largeUpload?: boolean, abortSignal?: AbortSignal, espResponseField?: string): Promise<any>; clone(): ESPConnection; } export declare class Service { protected _connection: ESPConnection; get baseUrl(): string; constructor(optsConnection: IOptions | IConnection, service: string, version: string); opts(): IOptions; connection(): ESPConnection; }