import { D as DeviceFingerprintRequest, L as LocationVerification, f as ValidateCipherTextResponse, P as LocationRequest, G as GeolocationClient, S as LocationRequestFilters, T as LocationRequestListResponse } from '../client-C_A7QLcB.js'; export { Q as CreateLocationRequestRequest, Y as LocationCaptureRequest, _ as LocationCaptureResponse, O as LocationRequestChannel, R as LocationRequestResult, N as LocationRequestStatus, Z as LocationShareInfo, W as ResendLocationRequestRequest } from '../client-C_A7QLcB.js'; import { RiskProfileClient } from '../risk-profile/index.js'; import { V as VesantConfig, R as RequestOptions } from '../client-ePzhQKp9.js'; import { C as CustomerProfile } from '../types-X5Md_dD_.js'; import { E as EntityType, P as PaginationParams } from '../types-B4Ezqo7V.js'; interface RegistrationVerificationRequest { customerId: string; fullName: string; emailAddress: string; phoneNumber?: string; dateOfBirth?: string; address?: string; entityType?: EntityType; ipAddress: string; deviceFingerprint?: DeviceFingerprintRequest; cipherText?: string; metadata?: Record; } interface RegistrationVerificationResponse { allowed: boolean; geolocation: LocationVerification; profile: CustomerProfile | null; requiresKYC: boolean; requiresEDD: boolean; blockReasons: string[]; processingTime: number; cipherTextValidation?: ValidateCipherTextResponse; } interface LoginVerificationRequest { customerId: string; ipAddress: string; deviceFingerprint?: DeviceFingerprintRequest; cipherText?: string; metadata?: Record; } interface LoginVerificationResponse { allowed: boolean; geolocation: LocationVerification; profile: CustomerProfile | null; requiresStepUp: boolean; blockReasons: string[]; processingTime: number; cipherTextValidation?: ValidateCipherTextResponse; } interface TransactionVerificationRequest { customerId: string; ipAddress: string; amount: number; currency: string; transactionType?: 'deposit' | 'withdrawal' | 'bet' | 'transfer' | 'payout'; deviceFingerprint?: DeviceFingerprintRequest; cipherText?: string; metadata?: Record; } interface TransactionVerificationResponse { allowed: boolean; geolocation: LocationVerification; profile: CustomerProfile | null; transactionRisk: TransactionRiskResult; requiresApproval: boolean; blockReasons: string[]; processingTime: number; cipherTextValidation?: ValidateCipherTextResponse; } interface TransactionRiskResult { score: number; level: 'low' | 'medium' | 'high' | 'critical'; factors: string[]; allowed: boolean; requiresManualReview: boolean; } interface EventVerificationRequest { customerId: string; ipAddress: string; eventType: string; deviceFingerprint?: DeviceFingerprintRequest; cipherText?: string; metadata?: Record; } interface EventVerificationResponse { allowed: boolean; geolocation: LocationVerification; blockReasons: string[]; processingTime: number; cipherTextValidation?: ValidateCipherTextResponse; } interface CurrencyRates { [currency: string]: number; } declare const DEFAULT_CURRENCY_RATES: CurrencyRates; interface ComplianceLocationRequestInput { /** Customer user ID to request location from */ customerId: string; /** Notification channel to use */ channel: 'sms' | 'email' | 'push'; /** Reason for requesting location (for compliance/audit) */ reason: string; /** Customer email (required for email channel) */ email?: string; /** Customer phone (required for SMS channel) */ phone?: string; /** Custom expiry time in hours (default: 24) */ expiryHours?: number; } interface ComplianceLocationRequestResult { /** The created location request */ request: LocationRequest; /** Shareable link for the customer */ shareLink: string; /** Token expiration time */ tokenExpiry: string; /** Customer profile (if available) */ profile?: CustomerProfile; } /** * ComplianceClient - Unified Compliance Orchestration * * Main integration point for casino platforms. Orchestrates geolocation * verification with customer risk profiling for complete compliance coverage. * * SDK is the primary data injection point for compliance verification. */ declare class ComplianceClient { private geoClient; private riskClient; private config; private logger; private currencyRates; private _currencyRatesCustomized; private _currencyRatesWarned; constructor(config: VesantConfig); /** Get the underlying GeolocationClient for direct geolocation API access */ getGeolocationClient(): GeolocationClient; /** Get the underlying RiskProfileClient for direct risk profile API access */ getRiskProfileClient(): RiskProfileClient; /** * Verify customer registration with automatic profile creation * * This is the primary integration point for new customer sign-ups. * Combines geolocation verification with customer risk profile creation. * * Important: Profile is only created if geolocation verification passes. * This prevents orphaned geolocation records when registration is blocked. * * @param request - Registration verification request * @returns Verification response with profile and compliance status * * @example * ```typescript * const result = await sdk.verifyAtRegistration({ * customerId: 'CUST-12345', * fullName: 'John Doe', * emailAddress: 'john@example.com', * ipAddress: req.ip, * deviceFingerprint: getDeviceFingerprint() * }); * * if (result.allowed) { * // Create account * console.log('Profile created:', result.profile); * if (result.requiresKYC) { * // Redirect to KYC flow * } * } else { * // Block registration * console.log('Blocked:', result.blockReasons); * } * ``` */ verifyAtRegistration(request: RegistrationVerificationRequest, requestOptions?: RequestOptions): Promise; /** * Evaluate if registration should be blocked based on geolocation verification * * Checks: * 1. General compliance status (is_compliant) * 2. Explicit block flag (is_blocked) * 3. Jurisdiction-specific registration allowance (allow_registration) * 4. Risk level thresholds * * @param geoVerification - Geolocation verification result * @returns Array of block reasons (empty if allowed) */ private evaluateRegistrationBlock; /** * Validate registration request has all required fields * * @param request - Registration request to validate * @throws ValidationError if required fields are missing or invalid */ private validateRegistrationRequest; /** * Validate IP address format (IPv4 or IPv6) */ private isValidIP; /** * Validate email address format */ private isValidEmail; private validateLoginRequest; private validateTransactionRequest; private validateEventRequest; /** * Verify customer login with profile activity update * * Verifies geolocation and updates customer profile with latest activity. * * @param request - Login verification request * @returns Verification response with compliance status * * @example * ```typescript * const result = await sdk.verifyAtLogin({ * customerId: 'CUST-12345', * ipAddress: req.ip, * deviceFingerprint: getDeviceFingerprint() * }); * * if (result.allowed) { * // Allow login * if (result.requiresStepUp) { * // Trigger MFA or additional verification * } * } else { * // Block login * console.log('Blocked:', result.blockReasons); * } * ``` */ verifyAtLogin(request: LoginVerificationRequest, requestOptions?: RequestOptions): Promise; /** * Verify transaction with amount-based risk assessment * * Combines geolocation verification with transaction amount analysis * and customer risk profile for comprehensive transaction screening. * * @param request - Transaction verification request * @returns Verification response with transaction risk assessment * * @example * ```typescript * const result = await sdk.verifyAtTransaction({ * customerId: 'CUST-12345', * ipAddress: req.ip, * amount: 5000, * currency: 'USD', * transactionType: 'withdrawal', * deviceFingerprint: getDeviceFingerprint() * }); * * if (result.allowed) { * // Process transaction * } else if (result.requiresApproval) { * // Queue for manual review * } else { * // Block transaction * console.log('Blocked:', result.blockReasons); * } * ``` */ verifyAtTransaction(request: TransactionVerificationRequest, requestOptions?: RequestOptions): Promise; /** * Generic event verification (for other touchpoints) * * @param request - Event verification request * @returns Verification response */ verifyEvent(request: EventVerificationRequest, requestOptions?: RequestOptions): Promise; private shouldUpdateProfile; private createProfileFromGeo; /** * Execute cipherText validation with graceful degradation. * Returns undefined if cipherText is not provided or validation fails. */ private executeCipherTextValidation; /** * Build a LocationVerification from a ValidateCipherTextResponse. * The validate-ciphertext endpoint now returns the full geo-verification data * (is_compliant, jurisdiction, geofence_evaluation, record_id, gps_required), * so a separate verifyIP call is unnecessary. */ private buildLocationFromCipherText; private calculateTransactionRisk; private checkJurisdictionLimits; private normalizeToUSD; private getRiskLevel; private getBlockReasons; private getTransactionBlockReasons; /** * Request live location from a customer * * Creates a location request and sends a notification to the customer * via the specified channel (SMS, email, or push). The customer receives * a link to share their location. * * @param input - Location request details * @returns Location request result with share link * * @example * ```typescript * // Request location via SMS for transaction verification * const result = await sdk.requestCustomerLocation({ * customerId: 'CUST-12345', * channel: 'sms', * phone: '+1234567890', * reason: 'Verification required for high-value transaction' * }); * * console.log('Share link sent:', result.shareLink); * console.log('Expires at:', result.tokenExpiry); * * // Request location via email * const emailResult = await sdk.requestCustomerLocation({ * customerId: 'CUST-12345', * channel: 'email', * email: 'customer@example.com', * reason: 'Account verification', * expiryHours: 48 * }); * ``` */ requestCustomerLocation(input: ComplianceLocationRequestInput, requestOptions?: RequestOptions): Promise; /** * Get a specific location request by ID * * @param requestId - Location request ID * @returns Location request details * * @example * ```typescript * const request = await sdk.getLocationRequest('req_abc123'); * console.log('Status:', request.status); * if (request.latitude && request.longitude) { * console.log('Location captured:', request.latitude, request.longitude); * } * ``` */ getLocationRequest(requestId: string, requestOptions?: RequestOptions): Promise; /** * List location requests with filters and pagination * * @param filters - Optional filters * @param pagination - Optional pagination * @returns Paginated list of location requests * * @example * ```typescript * // Get pending requests for a customer * const pending = await sdk.listLocationRequests( * { status: 'pending', user_id: 'CUST-12345' }, * { page: 1, limit: 20 } * ); * * // Get all completed requests from last week * const completed = await sdk.listLocationRequests({ * status: 'completed', * date_from: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString() * }); * ``` */ listLocationRequests(filters?: LocationRequestFilters, pagination?: PaginationParams, requestOptions?: RequestOptions): Promise; /** * Cancel a pending location request * * @param requestId - Location request ID * * @example * ```typescript * await sdk.cancelLocationRequest('req_abc123'); * ``` */ cancelLocationRequest(requestId: string, requestOptions?: RequestOptions): Promise; /** * Resend notification for a location request * * @param requestId - Location request ID * @param contact - Contact details (email or phone) * * @example * ```typescript * // Resend to a different phone number * await sdk.resendLocationRequest('req_abc123', { phone: '+0987654321' }); * * // Resend to email * await sdk.resendLocationRequest('req_abc123', { email: 'new@example.com' }); * ``` */ resendLocationRequest(requestId: string, contact: { email?: string; phone?: string; }, requestOptions?: RequestOptions): Promise; /** * Validate location request input */ private validateLocationRequestInput; /** * Update currency exchange rates * * Use this to keep currency rates current for accurate transaction risk * calculation. Rates should be updated regularly (e.g., daily). * * @param rates - Currency to USD exchange rates * * @example * ```typescript * // Update specific rates * sdk.updateCurrencyRates({ * EUR: 1.08, * GBP: 1.25, * BTC: 42000, // For crypto support * }); * * // Or fetch from external service * const rates = await fetchExchangeRates(); * sdk.updateCurrencyRates(rates); * ``` */ updateCurrencyRates(rates: CurrencyRates): void; /** * Get current currency rates * * @returns Current currency to USD exchange rates */ getCurrencyRates(): Readonly; } export { ComplianceClient, type ComplianceLocationRequestInput, type ComplianceLocationRequestResult, type CurrencyRates, DEFAULT_CURRENCY_RATES, type EventVerificationRequest, type EventVerificationResponse, LocationRequest, LocationRequestFilters, LocationRequestListResponse, type LoginVerificationRequest, type LoginVerificationResponse, type RegistrationVerificationRequest, type RegistrationVerificationResponse, type TransactionRiskResult, type TransactionVerificationRequest, type TransactionVerificationResponse };