@lomi./sdk
Version:
Official TypeScript SDK for the lomi. API
22 lines • 685 B
TypeScript
/**
* HTTP Request Helper
* AUTO-GENERATED - Do not edit manually
*/
import { AxiosResponse } from 'axios';
export type ApiRequestOptions = {
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
url: string;
path?: Record<string, string | number>;
query?: Record<string, any>;
body?: any;
headers?: Record<string, string>;
};
export declare class ApiError extends Error {
readonly url: string;
readonly status: number;
readonly statusText: string;
readonly body: any;
constructor(response: AxiosResponse, message: string);
}
export declare function request<T>(options: ApiRequestOptions): Promise<T>;
//# sourceMappingURL=request.d.ts.map