/* tslint:disable unified-signatures */
import { discussionsApiRequestV2 } from "../discussions-api-request";
/**
 * Search for Channels in the Discussions API.  Channels define the capabilities,
 * permissions, and configuration for Discussion posts.
 *
 * @export
 * @param {ISearchChannelsParams} options
 * @return {*}  {Promise<IPagedResponse<IChannel>>}
 */
export function searchChannelsV2(options) {
    options.httpMethod = "GET";
    return discussionsApiRequestV2(`/channels`, options);
}
/**
 * create channel v2
 *
 * @export
 * @param {ICreateChannelParamsV2} options
 * @return {*}  {Promise<IChannel>}
 */
export function createChannelV2(options) {
    options.httpMethod = "POST";
    return discussionsApiRequestV2(`/channels`, options);
}
/**
 * fetch channel V2
 *
 * @export
 * @param {IFetchChannelParams} options
 * @return {*}  {Promise<IChannel>}
 */
export function fetchChannelV2(options) {
    options.httpMethod = "GET";
    return discussionsApiRequestV2(`/channels/${options.channelId}`, options);
}
/**
 * update channel V2
 *
 * @export
 * @param {IUpdateChannelParamsV2} options
 * @return {*}  {Promise<IChannel>}
 */
export function updateChannelV2(options) {
    options.httpMethod = "PATCH";
    return discussionsApiRequestV2(`/channels/${options.channelId}`, options);
}
/**
 * remove channel V2
 *
 * @export
 * @param {IRemoveChannelParams} options
 * @return {*}
 */
export function removeChannelV2(options) {
    options.httpMethod = "DELETE";
    return discussionsApiRequestV2(`/channels/${options.channelId}`, options);
}
/**
 * get channel opt out status V2
 *
 * @export
 * @param {IFetchChannelNotificationOptOutParams} options
 * @return {*}
 */
export function fetchChannelNotifcationOptOutV2(options) {
    options.httpMethod = "GET";
    return discussionsApiRequestV2(`/channels/${options.channelId}/notifications/opt-out`, options);
}
/**
 * opt out of channel notifs V2
 *
 * @export
 * @param {ICreateChannelNotificationOptOutParams} options
 * @return {*}
 */
export function createChannelNotificationOptOutV2(options) {
    options.httpMethod = "POST";
    return discussionsApiRequestV2(`/channels/${options.channelId}/notifications/opt-out`, options);
}
/**
 * remove channel notifs V2
 *
 * @export
 * @param {IRemoveChannelNotificationOptOutParams} options
 * @return {*}
 */
export function removeChannelNotificationOptOutV2(options) {
    options.httpMethod = "DELETE";
    return discussionsApiRequestV2(`/channels/${options.channelId}/notifications/opt-out`, options);
}
/**
 * remove all posts in a channel V2
 *
 * @export
 * @param {IRemoveChannelActivityParams} options
 * @return {*}
 */
export function removeChannelActivityV2(options) {
    options.httpMethod = "DELETE";
    return discussionsApiRequestV2(`/channels/${options.channelId}/activity`, options);
}
//# sourceMappingURL=channels.js.map