refactor: make providers use dedicated session handling classes

This commit is contained in:
Haileyesus
2026-04-21 12:59:41 +03:00
parent 7720578bc8
commit a2ef1d77a8
13 changed files with 1256 additions and 1262 deletions

View File

@@ -6,6 +6,7 @@ import path from 'node:path';
import type { NextFunction, Request, RequestHandler, Response } from 'express';
import type {
AnyRecord,
ApiSuccessShape,
AppErrorOptions,
NormalizedMessage,
@@ -89,12 +90,12 @@ export function createNormalizedMessage(fields: NormalizedMessageInput): Normali
* treat the returned value as a JSON-style object map without repeating the same
* defensive shape checks at every config read site.
*/
export const readObjectRecord = (value: unknown): Record<string, unknown> | null => {
export const readObjectRecord = (value: any): AnyRecord | null => {
if (!value || typeof value !== 'object' || Array.isArray(value)) {
return null;
}
return value as Record<string, unknown>;
return value as AnyRecord;
};
/**