UNPKG

@looker/sdk-rtl

Version:
18 lines (17 loc) 1.69 kB
import type { Authenticator, HttpMethod, IRawRequest, IRawResponse, ITransport, ITransportSettings, RawObserver, SDKResponse, Values } from './transport'; export interface IHostConnection { rawRequest(httpMethod: string, path: string, body?: any, params?: any, authenticator?: Authenticator, options?: Partial<ITransportSettings>): Promise<IRawResponse>; request(httpMethod: string, path: string, body?: any, params?: any, authenticator?: Authenticator, options?: Partial<ITransportSettings>): Promise<any>; stream<T>(callback: (readable: any) => Promise<T>, method: HttpMethod, path: string, queryParams?: Values, body?: any, authenticator?: Authenticator, options?: Partial<ITransportSettings>): Promise<T>; } export declare class ExtensionTransport implements ITransport { private readonly options; private hostConnection; constructor(options: ITransportSettings, hostConnection: IHostConnection); observer: RawObserver | undefined; rawRequest(method: HttpMethod, path: string, queryParams?: any, body?: any, authenticator?: any, options?: Partial<ITransportSettings>): Promise<IRawResponse>; request<TSuccess, TError>(method: HttpMethod, path: string, queryParams?: any, body?: any, authenticator?: any, options?: Partial<ITransportSettings>): Promise<SDKResponse<TSuccess, TError>>; stream<TSuccess>(callback: (readable: any) => Promise<TSuccess>, method: HttpMethod, path: string, queryParams?: any, body?: any, authenticator?: any, options?: Partial<ITransportSettings>): Promise<TSuccess>; parseResponse<TSuccess, TError>(_raw: IRawResponse): Promise<SDKResponse<TSuccess, TError>>; retry(_request: IRawRequest): Promise<IRawResponse>; }