"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSetting = createSetting;
exports.fetchSetting = fetchSetting;
exports.updateSetting = updateSetting;
exports.removeSetting = removeSetting;
exports.createSettingV2 = createSettingV2;
exports.fetchSettingV2 = fetchSettingV2;
exports.updateSettingV2 = updateSettingV2;
exports.removeSettingV2 = removeSettingV2;
const discussions_api_request_1 = require("../discussions-api-request");
/**
 * create setting
 *
 * @deprecated replace with createSettingV2 for v2 discussions
 * @export
 * @param {ICreateSettingParams} options
 * @return {*} {Promise<IEntitySetting>}
 */
function createSetting(options) {
    options.httpMethod = "POST";
    return (0, discussions_api_request_1.discussionsApiRequest)(`/settings`, options);
}
/**
 * fetch setting
 *
 * @deprecated replace with fetchSettingV2 for v2 discussions
 * @export
 * @param {IFetchSettingParams} options
 * @return {*} {Promise<IEntitySetting>}
 */
function fetchSetting(options) {
    options.httpMethod = "GET";
    return (0, discussions_api_request_1.discussionsApiRequest)(`/settings/${options.id}`, options);
}
/**
 * update setting
 *
 * @deprecated replace with updateSettingV2 for v2 discussions
 * @export
 * @param {IUpdateSettingParams} options
 * @return {*} {Promise<IEntitySetting>}
 */
function updateSetting(options) {
    options.httpMethod = "PATCH";
    return (0, discussions_api_request_1.discussionsApiRequest)(`/settings/${options.id}`, options);
}
/**
 * remove setting
 *
 * @deprecated replace with removeSettingV2 for v2 discussions
 * @export
 * @param {IRemoveSettingParams} options
 * @return {*} {Promise<IRemoveSettingResponse>}
 */
function removeSetting(options) {
    options.httpMethod = "DELETE";
    return (0, discussions_api_request_1.discussionsApiRequest)(`/settings/${options.id}`, options);
}
/*******************************
 * V2
 *******************************/
/**
 * 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