18 lines
566 B
TypeScript
18 lines
566 B
TypeScript
import * as interfaces from '../ts_interfaces/index.js';
|
|
import type { DcRouterApiClient } from './classes.dcrouterapiclient.js';
|
|
|
|
export class ConfigManager {
|
|
private clientRef: DcRouterApiClient;
|
|
|
|
constructor(clientRef: DcRouterApiClient) {
|
|
this.clientRef = clientRef;
|
|
}
|
|
|
|
public async get(section?: string): Promise<interfaces.requests.IReq_GetConfiguration['response']> {
|
|
return this.clientRef.request<interfaces.requests.IReq_GetConfiguration>(
|
|
'getConfiguration',
|
|
this.clientRef.buildRequestPayload({ section }) as any,
|
|
);
|
|
}
|
|
}
|