import { discussionsApiRequest, discussionsApiRequestV2, } from "../discussions-api-request";
/**
 * create setting
 *
 * @deprecated replace with createSettingV2 for v2 discussions
 * @export
 * @param {ICreateSettingParams} options
 * @return {*} {Promise<IEntitySetting>}
 */
export function createSetting(options) {
    options.httpMethod = "POST";
    return discussionsApiRequest(`/settings`, options);
}
/**
 * fetch setting
 *
 * @deprecated replace with fetchSettingV2 for v2 discussions
 * @export
 * @param {IFetchSettingParams} options
 * @return {*} {Promise<IEntitySetting>}
 */
export function fetchSetting(options) {
    options.httpMethod = "GET";
    return discussionsApiRequest(`/settings/${options.id}`, options);
}
/**
 * update setting
 *
 * @deprecated replace with updateSettingV2 for v2 discussions
 * @export
 * @param {IUpdateSettingParams} options
 * @return {*} {Promise<IEntitySetting>}
 */
export function updateSetting(options) {
    options.httpMethod = "PATCH";
    return discussionsApiRequest(`/settings/${options.id}`, options);
}
/**
 * remove setting
 *
 * @deprecated replace with removeSettingV2 for v2 discussions
 * @export
 * @param {IRemoveSettingParams} options
 * @return {*} {Promise<IRemoveSettingResponse>}
 */
export function removeSetting(options) {
    options.httpMethod = "DELETE";
    return discussionsApiRequest(`/settings/${options.id}`, options);
}
/*******************************
 * V2
 *******************************/
/**
 * create setting V2
 *
 * @export
 * @param {ICreateSettingParams} options
 * @return {*} {Promise<IEntitySetting>}
 */
export function createSettingV2(options) {
    options.httpMethod = "POST";
    return discussionsApiRequestV2(`/settings`, options);
}
/**
 * fetch setting V2
 *
 * @export
 * @param {IFetchSettingParams} options
 * @return {*} {Promise<IEntitySetting>}
 */
export function fetchSettingV2(options) {
    options.httpMethod = "GET";
    return discussionsApiRequestV2(`/settings/${options.id}`, options);
}
/**
 * update setting V2
 *
 * @export
 * @param {IUpdateSettingParams} options
 * @return {*} {Promise<IEntitySetting>}
 */
export function updateSettingV2(options) {
    options.httpMethod = "PATCH";
    return discussionsApiRequestV2(`/settings/${options.id}`, options);
}
/**
 * remove setting
 *
 * @export
 * @param {IRemoveSettingParams} options
 * @return {*} {Promise<IRemoveSettingResponse>}
 */
export function removeSettingV2(options) {
    options.httpMethod = "DELETE";
    return discussionsApiRequestV2(`/settings/${options.id}`, options);
}
//# sourceMappingURL=settings.js.map