@explorins/pers-sdk
Version:
Platform-agnostic SDK for PERS (Phygital Experience Rewards System)
24 lines (20 loc) • 688 B
text/typescript
/**
* Platform-agnostic HTTP client interface
* To be implemented by platform-specific adapters (Angular, React Native, etc.)
*/
export interface HttpClient {
get<T>(url: string, options?: RequestOptions): Promise<T>;
post<T>(url: string, body: any, options?: RequestOptions): Promise<T>;
put<T>(url: string, body: any, options?: RequestOptions): Promise<T>;
delete<T>(url: string, options?: RequestOptions): Promise<T>;
}
export interface RequestOptions {
headers?: Record<string, string>;
params?: Record<string, string>;
timeout?: number;
}
export interface HttpResponse<T> {
data: T;
status: number;
headers: Record<string, string>;
}