Add getAppSettings API function
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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");
|
||||
}
|
||||
Reference in New Issue
Block a user