UNPKG

@johntad/m-pesa

Version:

A TypeScript SDK for integrating M-Pesa mobile payment services into applications, enabling seamless money transfers and transactions.

16 lines (15 loc) 592 B
import { AxiosRequestConfig, AxiosResponse } from 'axios'; interface APIClientConfig { baseURL: string; timeout?: number; retries?: number; } export declare class APIClient { private axiosInstance; private retries; constructor(config: APIClientConfig); requestWithRetry<T>(method: 'GET' | 'POST' | 'PUT' | 'DELETE', url: string, data?: unknown, config?: AxiosRequestConfig): Promise<AxiosResponse<T>>; fetchPaginated<T>(url: string, config?: AxiosRequestConfig, paginationKey?: string, resultsKey?: string): Promise<T[]>; private handleError; } export {};