"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSettingV2 = createSettingV2;
exports.fetchSettingV2 = fetchSettingV2;
exports.updateSettingV2 = updateSettingV2;
exports.removeSettingV2 = removeSettingV2;
const discussions_api_request_1 = require("../discussions-api-request");
/**
 * create setting V2
 *
 * @export
 * @param {ICreateSettingParams} options
 * @return {*} {Promise<IEntitySetting>}
 */
function createSettingV2(options) {
    options.httpMethod = "POST";
    return (0, discussions_api_request_1.discussionsApiRequestV2)(`/settings`, options);
}
/**
 * fetch setting V2
 *
 * @export
 * @param {IFetchSettingParams} options
 * @return {*} {Promise<IEntitySetting>}
 */
function fetchSettingV2(options) {
    options.httpMethod = "GET";
    return (0, discussions_api_request_1.discussionsApiRequestV2)(`/settings/${options.id}`, options);
}
/**
 * update setting V2
 *
 * @export
 * @param {IUpdateSettingParams} options
 * @return {*} {Promise<IEntitySetting>}
 */
function updateSettingV2(options) {
    options.httpMethod = "PATCH";
    return (0, discussions_api_request_1.discussionsApiRequestV2)(`/settings/${options.id}`, options);
}
/**
 * remove setting
 *
 * @export
 * @param {IRemoveSettingParams} options
 * @return {*} {Promise<IRemoveSettingResponse>}
 */
function removeSettingV2(options) {
    options.httpMethod = "DELETE";
    return (0, discussions_api_request_1.discussionsApiRequestV2)(`/settings/${options.id}`, options);
}
//# sourceMappingURL=settings.js.map