import { Http, HttpResponseType } from '../../http';
export class BimUserSettingsApiClient {
    _baseApiUrl;
    constructor(_baseApiUrl) {
        this._baseApiUrl = _baseApiUrl;
    }
    async get(filePath, maxLevels) {
        const requestHeaders = new Headers();
        const res = await Http.get(`${this._baseApiUrl}/_ps/api/settings/user/${filePath}?level=${maxLevels ?? 0}`, HttpResponseType.json, { headers: requestHeaders });
        return res;
    }
    upsert(upsertUserSettings) {
        const res = Http.put(`${this._baseApiUrl}/_ps/api/settings/user/${upsertUserSettings.path}`, HttpResponseType.json, {
            headers: {
                'Content-Type': 'application/json'
            },
            body: JSON.stringify(upsertUserSettings)
        });
        return res;
    }
    delete(deleteUserSetting) {
        const res = Http.delete(`${this._baseApiUrl}/_ps/api/settings/user/${deleteUserSetting.path}?etag=${deleteUserSetting.etag}`, HttpResponseType.json);
        return res;
    }
}
//# sourceMappingURL=BimUserSettingsApiClient.js.map