UNPKG

1.52 kBTypeScriptView Raw
1import { IConnection, IOptions, ResponseType } from "./connection";
2export declare type ESPResponseType = ResponseType | "json2" | "xsd";
3export declare function isArray(arg: any): boolean;
4export interface Exception {
5 Code: number;
6 Message: string;
7}
8export interface Exceptions {
9 Source: string;
10 Exception: Exception[];
11}
12export declare class ESPExceptions extends Error implements Exceptions {
13 isESPExceptions: boolean;
14 action: string;
15 request: string;
16 Source: string;
17 Exception: Exception[];
18 constructor(action: string, request: any, exceptions: Exceptions);
19}
20export declare class ESPConnection implements IConnection {
21 private _connection;
22 readonly baseUrl: string;
23 private _service;
24 private _version;
25 constructor(optsConnection: IOptions | IConnection, service: string, version: string);
26 service(): string;
27 service(_: string): ESPConnection;
28 version(): string;
29 version(_: string): ESPConnection;
30 toESPStringArray(target: any, arrayName: string): any;
31 opts(_: Partial<IOptions>): this;
32 opts(): IOptions;
33 send(action: string, _request?: any, espResponseType?: ESPResponseType, largeUpload?: boolean): Promise<any>;
34 clone(): ESPConnection;
35}
36export declare class Service {
37 protected _connection: ESPConnection;
38 readonly baseUrl: string;
39 constructor(optsConnection: IOptions | IConnection, service: string, version: string);
40}
41//# sourceMappingURL=espConnection.d.ts.map