UNPKG

mpp-sdk

Version:

SDK to talk to the Memento Payments Platform

19 lines (18 loc) 617 B
import { AxiosRequestConfig, AxiosResponse } from "axios"; declare type MPPLink<T> = Promise<MPPResult<T>>; declare type doRequestFunc<T> = (config: AxiosRequestConfig) => Promise<MPPResult<T>>; interface Links<T> { next?: () => MPPLink<T>; prev?: () => MPPLink<T>; first?: () => MPPLink<T>; last?: () => MPPLink<T>; [key: string]: (() => MPPLink<T>) | undefined; } export declare class MPPResult<T> { data: T; readonly request_id: string; readonly fetched_at: Date; readonly links: Links<T>; constructor(response: AxiosResponse<T>, doRequest?: doRequestFunc<T>); } export {};