UNPKG

@baqhub/sdk

Version:

The official JavaScript SDK for the BAQ federated app platform.

20 lines (19 loc) 1.56 kB
import * as IO from "../helpers/io.js"; import { HttpOptions } from "./http.js"; declare function getApi<M extends IO.Any>(model: M, url: string, options?: HttpOptions): Promise<readonly [Headers, IO.TypeOf<M>]>; declare function postApi<R extends IO.Any, B extends IO.Any>(responseModel: R, bodyModel: B, body: IO.TypeOf<B>, url: string, options?: HttpOptions): Promise<readonly [Headers, IO.TypeOf<R>]>; declare function putApi<R extends IO.Any, B extends IO.Any>(responseModel: R, bodyModel: B, body: IO.TypeOf<B>, url: string, options?: HttpOptions): Promise<readonly [Headers, IO.TypeOf<R>]>; declare function patchApi<R extends IO.Any, B extends IO.Any>(responseModel: R, bodyModel: B, body: IO.TypeOf<B>, url: string, options?: HttpOptions): Promise<readonly [Headers, IO.TypeOf<R>]>; declare function deleteApi<R extends IO.Any, B extends IO.Any>(responseModel: R, bodyModel: B, body: IO.TypeOf<B>, url: string, options?: HttpOptions): Promise<readonly [Headers, IO.TypeOf<R>]>; declare function postBlobApi<R extends IO.Any>(responseModel: R, body: Blob, url: string, options?: HttpOptions): Promise<readonly [Headers, IO.TypeOf<R>]>; declare function eventSourceApi<R extends IO.Any>(messageModel: R, onMessage: (message: IO.TypeOf<R>) => void, eventName: string, url: string, options?: HttpOptions): void; export declare const Api: { get: typeof getApi; post: typeof postApi; put: typeof putApi; patch: typeof patchApi; delete: typeof deleteApi; postBlob: typeof postBlobApi; eventSource: typeof eventSourceApi; }; export {};