28 lines
710 B
TypeScript
28 lines
710 B
TypeScript
import type { ApiClient } from "./client.js";
|
|
|
|
export interface AppSettingsFilterOptions {
|
|
searchFrom?: string;
|
|
searchTo?: string;
|
|
timeStep?: string;
|
|
}
|
|
|
|
export interface AppSettingsResponse {
|
|
showDebugVersion?: string;
|
|
uiOptions?: {
|
|
isTestVersion?: string;
|
|
filter?: {
|
|
onlineboard?: AppSettingsFilterOptions;
|
|
schedule?: AppSettingsFilterOptions;
|
|
};
|
|
buttons?: Record<string, unknown>;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Fetch the global UI configuration from the backend. Includes date range
|
|
* limits for online-board and schedule searches.
|
|
*/
|
|
export async function getAppSettings(client: ApiClient): Promise<AppSettingsResponse> {
|
|
return client.get<AppSettingsResponse>("/appSettings");
|
|
}
|