export { KycFlow, KycFlowProps } from './components.js'; import 'react'; interface AstraSDKConfig { apiKey: string; baseURL?: string; timeout?: number; headers?: Record; retries?: number; retryDelay?: number; } interface RequestOptions { method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; headers?: Record; body?: unknown; params?: Record; timeout?: number; } interface ApiResponse { data: T; status: number; statusText: string; headers: Record; } interface ApiError { message: string; status?: number; code?: string; details?: unknown; } declare class AstraSDKError extends Error { status?: number; code?: string; details?: unknown; constructor(message: string, status?: number, code?: string, details?: unknown); } /** * API Client for Astra SDK */ declare class ApiClient { private config; constructor(config: Required); /** * Make a GET request */ get(endpoint: string, options?: Omit): Promise>; /** * Make a POST request */ post(endpoint: string, body?: unknown, options?: Omit): Promise>; /** * Make a PUT request */ put(endpoint: string, body?: unknown, options?: Omit): Promise>; /** * Make a PATCH request */ patch(endpoint: string, body?: unknown, options?: Omit): Promise>; /** * Make a DELETE request */ delete(endpoint: string, options?: Omit): Promise>; /** * Make a generic request */ request(endpoint: string, options?: RequestOptions): Promise>; /** * Update configuration */ updateConfig(config: Partial): void; /** * Get current configuration */ getConfig(): Required; } interface KycApiConfig { apiBaseUrl: string; sessionId: string; serverKey: string; deviceType?: string; } interface SessionStatusResponse { status: string; message: string; data: { session_id: string; status: 'ACTIVE' | 'INACTIVE' | 'EXPIRED' | 'COMPLETED'; completed_steps: string[]; next_step: string; }; } interface FaceScanResponse { status: string; message: string; data?: unknown; } interface DocumentUploadResponse { status: string; message: string; data?: unknown; } declare class KycApiService { private config; constructor(config: KycApiConfig); /** * Detect device type */ private detectDeviceType; /** * Get session status */ getSessionStatus(): Promise; /** * Get session result (kyc result) */ getResult(): Promise; /** * Upload face scan image */ uploadFaceScan(faceBlob: Blob | File): Promise; /** * Upload document scan image */ uploadDocument(docBlob: Blob | File, docType: string): Promise; /** * Retry session - resets the session to allow face registration again */ retrySession(): Promise; /** * Check if session is active, throw error if not */ checkSessionActive(): Promise; /** * Update configuration */ updateConfig(config: Partial): void; /** * Get current configuration */ getConfig(): KycApiConfig; } declare class AstraSDK { private client; constructor(config: AstraSDKConfig); getClient(): ApiClient; updateConfig(config: Partial): void; get(endpoint: string, options?: Omit): Promise>; post(endpoint: string, body?: unknown, options?: Omit): Promise>; put(endpoint: string, body?: unknown, options?: Omit): Promise>; patch(endpoint: string, body?: unknown, options?: Omit): Promise>; delete(endpoint: string, options?: Omit): Promise>; request(endpoint: string, options?: RequestOptions): Promise>; } export { ApiClient, type ApiError, type ApiResponse, AstraSDK, type AstraSDKConfig, AstraSDKError, type DocumentUploadResponse, type FaceScanResponse, type KycApiConfig, KycApiService, type RequestOptions, type SessionStatusResponse, AstraSDK as default };