UNPKG

@udene/sdk

Version:

Udene Fraud Detection SDK for JavaScript

105 lines 2.28 kB
/** * Configuration options for the Udene client */ export interface UdeneClientConfig { /** * API key for authentication */ apiKey: string; /** * Custom API base URL (optional) */ baseURL?: string; /** * Maximum number of retry attempts for failed requests (default: 3) */ maxRetries?: number; /** * Custom logger function (default: console.error) */ logger?: (message: string, error?: any) => void; /** * Whether to disable all logging (default: false) */ disableLogging?: boolean; } /** * Metrics response interface */ export interface MetricsResponse { riskScore: number; activeUsers: number; alertCount: number; apiCalls: number; accuracy: number; falsePositiveRate: number; avgProcessingTime: number; concurrentCalls: number; } /** * Activity item interface */ export interface ActivityItem { id: string; type: 'suspicious' | 'normal'; description: string; timestamp: string; } /** * Activity response interface */ export interface ActivityResponse { activities: ActivityItem[]; } /** * Track interaction request interface */ export interface TrackInteractionRequest { userId: string; action: string; metadata?: Record<string, any>; } /** * Track interaction response interface */ export interface TrackInteractionResponse { success: boolean; transactionId: string; } /** * Transaction analysis request interface */ export interface TransactionAnalysisRequest { transactionId: string; userId: string; amount?: number; currency?: string; paymentMethod?: string; timestamp?: string; metadata?: Record<string, any>; } /** * Transaction analysis response interface */ export interface TransactionAnalysisResponse { riskScore: number; recommendation: 'approve' | 'review' | 'deny'; reasons?: string[]; transactionId: string; } /** * Device fingerprint response interface */ export interface DeviceFingerprintResponse { deviceId: string; browser: string; os: string; ip: string; location?: { country?: string; city?: string; }; riskFactors?: string[]; trustScore?: number; } //# sourceMappingURL=types.d.ts.map