23 lines
1.1 KiB
TypeScript
23 lines
1.1 KiB
TypeScript
/** Guards for heavy analytics/report queries — prefer slow responses over process crashes. */
|
|
export declare const DB_STATEMENT_TIMEOUT_MS: number;
|
|
/** Per dashboard subsection — fail fast so other sections can still load. */
|
|
export declare const ANALYTICS_SECTION_TIMEOUT_MS: number;
|
|
export declare const EXPORT_OPERATION_TIMEOUT_MS: number;
|
|
export declare const MAX_REPORT_PAGE_SIZE = 100;
|
|
export declare const MAX_REPORT_OFFSET = 100000;
|
|
export declare const MAX_EXPORT_ROWS: number;
|
|
export declare const MAX_SELECTED_IDS = 500;
|
|
export declare const MAX_PDF_EXPORT_ROWS: number;
|
|
export declare function clampReportPagination(limitRaw: number, offsetRaw: number): {
|
|
limit: number;
|
|
offset: number;
|
|
warnings: string[];
|
|
};
|
|
export declare function isQueryTimeoutError(err: unknown): boolean;
|
|
export declare function isOutOfMemoryError(err: unknown): boolean;
|
|
export declare function mapResilienceErrorToHttp(err: unknown): {
|
|
status: number;
|
|
message: string;
|
|
};
|
|
export declare function withTimeout<T>(promise: Promise<T>, timeoutMs: number, label: string): Promise<T>;
|
|
//# sourceMappingURL=queryResilience.d.ts.map
|