diff --git a/src/client/web/src/client/settings.ts b/src/client/web/src/client/settings.ts new file mode 100644 index 0000000..43f0b84 --- /dev/null +++ b/src/client/web/src/client/settings.ts @@ -0,0 +1,31 @@ +import { BaseClient, Response, userIDParam, Quota } from "."; + +import { ClientConfig } from "./"; + +export class SettingsClient extends BaseClient { + constructor(url: string) { + super(url); + } + + health = (): Promise => { + return this.do({ + method: "get", + url: `${this.url}/v1/settings/health`, + }); + }; + + getClientCfg = (): Promise => { + return this.do({ + method: "get", + url: `${this.url}/v1/settings/client`, + }); + }; + + setClientCfg = (cfg: ClientConfig): Promise => { + return this.do({ + method: "patch", + url: `${this.url}/v1/settings/client`, + data: cfg, + }); + }; +}