toast-pos-sdk
Version:
Node.js SDK for Toast POS API
34 lines • 1.03 kB
TypeScript
import { ToastClientConfig, ToastApiResponse, RequestConfig } from '../types';
/**
* HTTP client wrapper for Toast API requests
*/
export declare class HttpClient {
private axiosInstance;
private token;
constructor(config: ToastClientConfig);
/**
* Make an HTTP request to the Toast API
*/
request<T = any>(config: RequestConfig): Promise<ToastApiResponse<T>>;
/**
* Make a GET request
*/
get<T = any>(url: string, params?: Record<string, any>): Promise<ToastApiResponse<T>>;
/**
* Make a POST request
*/
post<T = any>(url: string, data?: any): Promise<ToastApiResponse<T>>;
/**
* Make a PUT request
*/
put<T = any>(url: string, data?: any): Promise<ToastApiResponse<T>>;
/**
* Make a PATCH request
*/
patch<T = any>(url: string, data?: any): Promise<ToastApiResponse<T>>;
/**
* Make a DELETE request
*/
delete<T = any>(url: string): Promise<ToastApiResponse<T>>;
}
//# sourceMappingURL=http-client.d.ts.map