import { C11nEnv } from '../interpreter/c11n-env';
/**
* @description Use the APIs in the FeedUtils class to handle the feeds of a case.
*/
declare class FeedUtils {
mentionsTagsCancelTokenSource: any;
mentions: any;
constructor();
/**
* Obtains the feeds for a given context.
* @function
* @static
* @example
In this example, the API obtains the feed of a context whose feedID is pyDashboardFeed.
In this example, the API obtains the feed of a context whose feedID is pyCaseFeed.
* PCore.getFeedUtils().getFeeds('PEGAPROJMGMT-WORK TASK-100', 'pyCaseFeed','class',[{id: 'All', label: 'All', on: false, disabled: false}],[], getPConnect(), true)
* .then(feedResponse => {
* // feedResponse array
* }).catch(err => {
* // errors
* });
*
* @param pulseContext The name of the application context or case context for which the feed must be fetched.
* @param feedID The ID of the feed that must be fetched.
* FeedID of the Pulse widget, when configured on the Home page, is known as "pyDashboardFeed"
* and when used within a case view, it is known as "pyCaseFeed."
* @param feedClass The class associated with the feed to be fetched.
* @param feedFilters The list of conditions through which the feed to be fetched is filtered.
* It is an array comprising objects, with each object containing four distinct properties.
* id and label values for the filter options are available in pyDashboardFeed and pyCaseFeed rules.
* Extra filter options if needed can be configured in the same rules.
* @param {string} feedFilters.id The unique identifier for the feed source
* @param {string} feedFilters.label The title of the feed source
* @param {boolean} feedFilters.disabled This can be used to deactivate the filter (with a default value of false)
* @param {boolean} feedFilters.on This provides information regarding whether the filter is currently selected.(with a default value of false i.e., not selected)
* @param fetchFeedsCancelTokenSource The list of API requests for fetching the feed.
* @param c11nEnv The name of the context where the API is being called.
* @param isLoadMore The flag that determines if the next set of feeds should be loaded.
* The default value is false. Set isLoadMore to true if you want to load the next set of feeds.
* @returns A Promise that resolves to an object.
*/
getFeeds: (pulseContext: string, feedID: string, feedClass: string, feedFilters: [any], fetchFeedsCancelTokenSource: [any], c11nEnv: C11nEnv, isLoadMore: boolean) => Promise;
/**
* Posts a message to the given context.
* @function
* @static
* @example
In this example, the API adds the post along with attachment to the given context.
In this example, the API adds the reply to the post along with attachment to the provided context.
* PCore.getFeedUtils().postMessage('PEGASOCIAL M-214007','test reply message', [{"type":"File","category":"File","fileName":"attachment.png","ID":"459c"}], true, getPConnect())
* .then(() => {
* // success
* }).catch(err => {
* // Error handling
* });
* @param pulseContext The name of the application context or case context for which the message must be posted.
* @param message The message that needs to be posted.
* @param attachmentIDs The metadata of the attachments that need to be posted along with the message.
* @param isReply The flag that determines if you want to post a message or a reply to a message.The default value is false. Set isReply to true if you want to post a reply to a message. Set isReply to false if you want to post a message.
* @param c11nEnv The name of the context where the API is being called.
* @returns A Promise that resolves to an object.
*/
postMessage: (pulseContext: string, message: string, attachmentIDs: any[] | undefined, isReply: boolean | undefined, c11nEnv: C11nEnv) => Promise;
/**
* Modifies a message associated with the given context.
* @function
* @static
* @example
In this example, the API edits the post whose messageID is PEGASOCIAL M-100
In this example, the API edits the reply to the post whose messageID is PEGASOCIAL M-101 and the parentMessageID is PEGASOCIAL M-100
* const payload = {
* messageID:'PEGASOCIAL M-101',
* parentMessageID:'PEGASOCIAL M-100',
* message:'test reply message',
* isReply:true,
* c11nEnv: getPConnect()
* }
* PCore.getFeedUtils().editMessage(payload)
* .then(() => {
* // success
* }).catch(err => {
* // Error handling
* });
* @param param The object that contains the required data to edit a message.
* @param param.messageID The unique identifier(pzInsKey) of the message that needs to be edited.
* @param param.parentMessageID The unique identifier(pzInsKey) of the parent message that needs to be edited.
* @param param.message The new message that replaces the existing message.
* @param param.c11nEnv The name of the context where the API is being called.
* @param param.isReply The flag that determines if you want to post a message or a reply to a message.
* The default value is false. Set isReply to true if you want to edit a reply for a message.
* Set isReply to false if you want to edit a message.
* @returns A Promise that resolves to an object.
*/
editMessage: ({ messageID, parentMessageID, message, c11nEnv, isReply }: {
messageID: string;
parentMessageID: string;
message: string;
c11nEnv: C11nEnv;
isReply: boolean;
}) => Promise