22 lines
645 B
TypeScript
22 lines
645 B
TypeScript
import type { AxiosInstance } from "axios";
|
|
export type ServiceResult<T = unknown> = {
|
|
result: T;
|
|
successful: boolean;
|
|
};
|
|
export declare class API_Error {
|
|
error: string;
|
|
constructor(error: string);
|
|
}
|
|
export declare abstract class BaseClient {
|
|
private axiosInstance;
|
|
constructor(axiosInstance: AxiosInstance);
|
|
getAxios(): AxiosInstance;
|
|
}
|
|
export declare abstract class BaseService<T> {
|
|
private client;
|
|
constructor(client: T);
|
|
getClient(): T;
|
|
getSuccessfulResult<R = unknown>(result: R): ServiceResult<R>;
|
|
getErrorResult(error: string): ServiceResult<string>;
|
|
}
|
|
//# sourceMappingURL=fastify.d.ts.map
|