@looker/sdk-rtl
Version:
Looker SDK Runtime Library
26 lines (25 loc) • 2.25 kB
TypeScript
import type { Authenticator, HttpMethod, IAPIMethods, ITransportSettings, SDKResponse, Values } from './transport';
import type { IAuthSession } from './authSession';
export declare const functionalSdk: (authSession: IAuthSession, apiVersion: string, sdkVersion: string) => APIMethods;
export declare class APIMethods implements IAPIMethods {
authSession: IAuthSession;
sdkVersion: string;
private _apiPath;
private _apiVersion;
constructor(authSession: IAuthSession, sdkVersion: string);
get apiPath(): string;
set apiPath(value: string);
get apiVersion(): string;
set apiVersion(value: string);
static create<T extends APIMethods>(type: new (authSession: IAuthSession) => T, authSession: IAuthSession): T;
ok<TSuccess, TError>(promise: Promise<SDKResponse<TSuccess, TError>>): Promise<TSuccess>;
makePath(path: string, options: Partial<ITransportSettings>, authenticator?: Authenticator): string;
authRequest<TSuccess, TError>(method: HttpMethod, path: string, queryParams?: Values, body?: any, options?: Partial<ITransportSettings>): Promise<SDKResponse<TSuccess, TError>>;
authStream<T>(callback: (response: Response) => Promise<T>, method: HttpMethod, path: string, queryParams?: Values, body?: any, options?: Partial<ITransportSettings>): Promise<T>;
get<TSuccess, TError>(path: string, queryParams?: Values, body?: any, options?: Partial<ITransportSettings>): Promise<SDKResponse<TSuccess, TError>>;
head<TSuccess, TError>(path: string, queryParams?: Values, body?: any, options?: Partial<ITransportSettings>): Promise<SDKResponse<TSuccess, TError>>;
delete<TSuccess, TError>(path: string, queryParams?: Values, body?: any, options?: Partial<ITransportSettings>): Promise<SDKResponse<TSuccess, TError>>;
post<TSuccess, TError>(path: string, queryParams?: Values, body?: any, options?: Partial<ITransportSettings>): Promise<SDKResponse<TSuccess, TError>>;
put<TSuccess, TError>(path: string, queryParams?: Values, body?: any, options?: Partial<ITransportSettings>): Promise<SDKResponse<TSuccess, TError>>;
patch<TSuccess, TError>(path: string, queryParams?: Values, body?: any, options?: Partial<ITransportSettings>): Promise<SDKResponse<TSuccess, TError>>;
}