games_app/backend/dist/services/settingsService.d.ts
2026-07-07 15:03:17 +02:00

43 lines
1.1 KiB
TypeScript

/**
* System settings service.
* Applies validation and business rules for admin configuration updates.
*/
import { SystemSettings } from '../models';
/**
* Returns the current merged system settings (DB values with defaults).
* @returns Password policy, token expiry, and runtime ops configuration
*/
export declare function getSettings(): Promise<SystemSettings>;
/**
* Builds a partial settings update from an untyped HTTP request body.
* Only recognized keys with valid types are included.
* @param body Raw JSON body from the client
* @returns Partial settings safe to pass to the repository
*/
export declare function parseSettingsUpdates(body: Record<string, unknown>): Partial<SystemSettings>;
/**
* Persists settings changes and returns the updated configuration.
* @param updates Partial settings from [parseSettingsUpdates]
* @returns Full settings after update
*/
export declare function updateSettings(updates: Partial<SystemSettings>, actor?: {
userId: string;
ipAddress?: string;
userAgent?: string;
}): Promise<SystemSettings>;
//# sourceMappingURL=settingsService.d.ts.map