UNPKG

@azure/communication-react

Version:

React library for building modern communication user experiences utilizing Azure Communication Services

39 lines 1.88 kB
import { ChatParticipant } from '@azure/communication-chat'; import { AdapterStateModifier } from './AzureCommunicationChatAdapter'; import { ChatMessageWithStatus } from "../../../../../chat-stateful-client/src"; /** * Callback function used to provide custom data to build profile for a user or bot. * * @public */ export type OnFetchChatProfileCallback = (userId: string, defaultProfile?: ChatProfile) => Promise<ChatProfile | undefined>; /** * The profile of a user or bot. * * @public */ export type ChatProfile = { /** * Primary text to display, usually the name of the person. */ displayName?: string; }; /** * @private */ export declare const createProfileStateModifier: (onFetchProfile: OnFetchChatProfileCallback, notifyUpdate: () => void) => AdapterStateModifier; /** * @private * This is the util function to create a participant modifier for remote participantList * It memoize previous original participant items and only update the changed participant * It takes in one modifier function to generate one single participant object, it returns undefined if the object keeps unmodified */ export declare const createParticipantModifier: (createModifiedParticipant: (id: string, participant: ChatParticipant) => ChatParticipant | undefined) => AdapterStateModifier; /** * @private * This is the util function to create a chat message modifier for remote participantList * It memoize previous original messages and only update the changed sender display name * It takes in one modifier function to generate one single participant object, it returns undefined if the object keeps unmodified */ export declare const createChatMessageModifier: (createModifiedChatMessage: (id: string, chatMessage: ChatMessageWithStatus) => ChatMessageWithStatus | undefined) => AdapterStateModifier; //# sourceMappingURL=OnFetchProfileCallback.d.ts.map