UNPKG

pluggy-js

Version:

Client-side JavaScript toolkit for Pluggy's API.

20 lines (19 loc) 1.14 kB
import { AxiosInstance } from 'axios'; type QueryParameters = { [key: string]: number | number[] | string | string[] | boolean; }; export declare class BaseApi { private service; private apiKey; private baseUrl; constructor(accessToken: string, baseUrl?: string); getServiceInstance(): AxiosInstance; protected createGetRequest<T>(endpoint: string, params?: QueryParameters): Promise<T>; protected createPostRequest<T>(endpoint: string, params?: QueryParameters, body?: Record<string, unknown>): Promise<T>; protected createPutRequest<T>(endpoint: string, params?: QueryParameters, body?: Record<string, unknown>): Promise<T>; protected createPatchRequest<T>(endpoint: string, params?: QueryParameters, body?: Record<string, unknown>): Promise<T>; protected createDeleteRequest<T>(endpoint: string, params?: QueryParameters, body?: Record<string, unknown>): Promise<T>; protected createMutationRequest<T>(method: string, endpoint: string, params?: QueryParameters, body?: Record<string, unknown>): Promise<T>; protected mapToQueryString(params: QueryParameters): string; } export {};