UNPKG

@kwikpik/kwikpik.js

Version:

Javascript/Typescript convenience library that interfaces with the Kwik Pik business API

44 lines 1.34 kB
import { AxiosInstance } from "axios"; export declare class KwikPikSendableHTTPsService<T> { /** * Whether this is a 'post' or 'patch' request */ private sendableType; /** * Url path */ private path; /** * The https agent used in executing the request. */ private agent; /** * The request body */ private body; constructor(path: string, agent: AxiosInstance, body: any, sendableType?: "post" | "patch" | "delete"); send(): Promise<T>; } export declare class KwikPikCallableHTTPsService<T> { /** * Whether this is a 'post' or 'patch' request */ private callableType; /** * Url path */ private path; /** * The https agent used in executing the request. */ private agent; constructor(path: string, agent: AxiosInstance, callableType?: "get" | "delete"); call(): Promise<T>; } export declare class KwikPikHTTPsAgent { private axiosInstance; constructor(apiKey: string, environment?: "dev" | "prod"); createKwikPikSendableInstance<T>(path: string, sendableType: "post" | "patch" | "delete", body: any): KwikPikSendableHTTPsService<T>; createKwikPikCallableInstance<T>(path: string, callableType: "get" | "delete"): KwikPikCallableHTTPsService<T>; } //# sourceMappingURL=index.d.ts.map