UNPKG

@intuitionrobotics/thunderstorm

Version:
28 lines 1.63 kB
import { Module } from "@intuitionrobotics/ts-common"; import { type ApiWithBody, type ApiWithQuery, type QueryParams } from "../../../shared/types.js"; import { type AxiosResponse } from "axios"; export type RemoteServerConfig = { secretHeaderName: string; proxyHeaderName: string; proxyId: string; secret: string; url: string; }; export declare abstract class RemoteProxyCaller<Config extends RemoteServerConfig> extends Module<Config> { constructor(name: string); protected init(): void; protected executeGetRequest: <Binder extends ApiWithQuery<U, R, P>, U extends string = Binder["url"], R = Binder["response"], P extends QueryParams = Binder["queryParams"]>(url: U, _params: P, _headers?: { [key: string]: string; }) => Promise<R>; protected executeGetRequestImpl: <Binder extends ApiWithQuery<U, R, P>, U extends string = Binder["url"], R = Binder["response"], P extends QueryParams = Binder["queryParams"]>(url: U, _params: P, _headers?: { [key: string]: string; }) => Promise<AxiosResponse<R>>; protected executePostRequest: <Binder extends ApiWithBody<U, B, R>, U extends string = Binder["url"], R = Binder["response"], B = Binder["body"]>(url: U, body: B, _headers?: { [key: string]: string; }) => Promise<R>; protected executePostRequestImpl: <Binder extends ApiWithBody<U, B, R>, U extends string = Binder["url"], R = Binder["response"], B = Binder["body"]>(url: U, body: B, _headers?: { [key: string]: string; }) => Promise<AxiosResponse<R>>; private executeRequest; } //# sourceMappingURL=RemoteProxyCaller.d.ts.map