games_app/backend/dist/models/settings.model.d.ts
2026-08-17 11:38:31 +02:00

50 lines
2.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* Admin-configurable platform settings loaded from key-value rows.
* Maps to the `system_settings` table (password policy, JWT expiry, and runtime ops).
*/
/** Typed projection of `system_settings` rows used across auth, security, and game engine. */
export interface SystemSettings {
password_min_length: number;
password_require_uppercase: boolean;
password_require_lowercase: boolean;
password_require_number: boolean;
password_require_special: boolean;
access_token_expiry: string;
refresh_token_expiry: string;
require_email_verification_for_login: boolean;
/** Kill-switch for on-chain withdrawal broadcasts. */
allow_withdrawals: boolean;
/** Global API rate limit window (ms). Takes effect after server restart. */
rate_limit_window_ms: number;
/** Max requests per IP per rate_limit_window_ms. */
rate_limit_max: number;
/** Max login attempts per IP per 15-minute window. */
login_rate_limit_max: number;
daily_withdrawal_limit_usd: number;
large_withdrawal_threshold_usd: number;
candle_predict_engine_tick_ms: number;
candle_predict_backfill_max_per_tick: number;
candle_predict_backfill_interval_ms: number;
candle_predict_backfill_seed_max: number;
/** Network fee deducted from user USDT balance per withdrawal (6-decimal micro units). */
withdrawal_network_fee_usdt_micro: number;
/** When true, admin/super_admin routes require TOTP to be enabled. */
require_admin_2fa: boolean;
/** When true, withdrawals and transfers require 2FA to be enabled and a valid code. */
require_withdrawal_2fa: boolean;
/** Max active refresh-token sessions per user (0 = unlimited). */
max_concurrent_sessions: number;
/** Failed logins before temporary lockout (0 = disabled). */
login_max_failed_attempts: number;
/** Lockout duration in minutes after max failed attempts. */
login_lockout_minutes: number;
/** Require captcha after this many prior failed logins (math built-in, or Turnstile when configured). */
login_captcha_after_failures: number;
/** When true, Sybil block threshold auto-suspends beneficiary accounts. */
sybil_auto_suspend_accounts: boolean;
/** When true, high login risk scores auto-suspend non-staff accounts. */
login_risk_auto_suspend_accounts: boolean;
/** Minimum login risk score (0–100) to trigger auto-suspend when enabled. */
login_risk_auto_suspend_threshold: number;
}
//# sourceMappingURL=settings.model.d.ts.map