import type { IGroup, IItem } from "@esri/arcgis-rest-portal";
import type { IRequestOptions } from "@esri/arcgis-rest-request";
import { IChannel } from "./api/types";
import { IHubContent } from "../core/types/IHubContent";
import { IHubItemEntity } from "../core/types/IHubItemEntity";
import { IQuery } from "../search/types/IHubCatalog";
import { IHubSearchResult } from "../search/types/IHubSearchResult";
import { SharingAccess } from "./api/enums/sharingAccess";
/**
 * Utility to determine if a given IGroup, IItem, IHubContent, or IHubItemEntity
 * is discussable.
 * @param {IGroup|IItem|IHubContent|IHubItemEntity} subject
 * @return {boolean}
 */
export declare function isDiscussable(subject: Partial<IGroup | IItem | IHubContent | IHubItemEntity>): boolean;
/**
 * Adds or removes CANNOT_DISCUSS type keyword and returns the updated list
 * @param {IGroup|IHubContent|IHubItemEntity} subject
 * @param {boolean} discussable
 * @returns {string[]} updated list of type keywords
 */
export declare function setDiscussableKeyword(typeKeywords: string[], discussable: boolean): string[];
/**
 * Determines if the given channel is considered to be a `public` channel, supporting both
 * legacy permissions and V2 ACL model.
 * @param channel An IChannel record
 * @returns true if the channel is considered `public`
 */
export declare function isPublicChannel(channel: IChannel): boolean;
/**
 * Determines if the given channel is considered to be an `org` channel, supporting both
 * legacy permissions and V2 ACL model.
 * @param channel An IChannel record
 * @returns true if the channel is considered `org`
 */
export declare function isOrgChannel(channel: IChannel): boolean;
/**
 * Determines if the given channel is considered to be a `private` channel, supporting both
 * legacy permissions and V2 ACL model.
 * @param channel An IChannel record
 * @returns true if the channel is considered `private`
 */
export declare function isPrivateChannel(channel: IChannel): boolean;
/**
 * Determines the given channel's access, supporting both legacy permissions and V2 ACL
 * model.
 * @param channel An IChannel record
 * @returns `public`, `org` or `private`
 */
export declare function getChannelAccess(channel: IChannel): SharingAccess;
/**
 * Returns an array of org ids configured for the channel, supporting both legacy permissions
 * and V2 ACL model.
 * @param channel An IChannel record
 * @returns an array of org ids for the given channel
 */
export declare function getChannelOrgIds(channel: IChannel): string[];
/**
 * Returns an array of group ids configured for the channel, supporting both legacy permissions
 * and V2 ACL model.
 * @param channel An IChannel record
 * @returns an array of group ids for the given channel
 */
export declare function getChannelGroupIds(channel: IChannel): string[];
/**
 * A utility method used to build an IQuery to search for users that are permitted to be at-mentioned for the given channel.
 * @param terms An array of strings to search for. Each string is mapped to `username` and `fullname`, filters as an OR condition
 * @param channel An IChannel record
 * @param currentUsername The currently authenticated user's username
 * @param requestOptions An IRequestOptions object
 * @returns a promise that resolves an IQuery
 */
export declare function getChannelUsersQuery(terms: string[], channel: IChannel, currentUsername?: string, requestOptions?: IRequestOptions): Promise<IQuery>;
/**
 * Transforms a given channel and optional channel groups array into a IHubSearchResult
 * @param channel
 * @param groups
 * @returns
 */
export declare const channelToSearchResult: (channel: IChannel, groups?: IGroup[]) => IHubSearchResult;
/**
 * Constructs file name for exported csvs
 * @param entityTitle
 * @returns string
 */
export declare function getPostCSVFileName(entityTitle: string): string;
