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 { TSharingAccess } 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): 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 the 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 the 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 the V2 ACL model. * model. * @param channel An IChannel record * @returns `public`, `org` or `private` */ export declare function getChannelAccess(channel: IChannel): TSharingAccess; /** * Returns an array of org ids configured for the channel, supporting the 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 the 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; /** * 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;