starchild-widget
Version:
Starchild Widget
42 lines • 909 B
TypeScript
/**
* API related type definitions
*/
export * from './trade';
/**
* API configuration interface
*/
export interface ApiConfig {
baseURL: string;
timeout?: number;
headers?: Record<string, string>;
retries?: number;
retryDelay?: number;
}
/**
* Request options interface
*/
export interface RequestOptions {
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
headers?: Record<string, string>;
body?: any;
timeout?: number;
signal?: AbortSignal;
}
/**
* API response interface
*/
export interface ApiResponse<T = any> {
data: T;
status: number;
statusText: string;
headers?: Record<string, string>;
}
/**
* API error class
*/
export declare class ApiError extends Error {
readonly status: number;
readonly statusText: string;
constructor(message: string, status: number, statusText: string);
}
//# sourceMappingURL=index.d.ts.map