UNPKG

@atlaskit/profilecard

Version:

A React component to display a card with user information.

24 lines (23 loc) 1.31 kB
import { type FireEventType } from '@atlaskit/teams-app-internal-analytics'; import type { AgentIdType, AgentPermissions, ProfileClientOptions, RovoAgentCardClientResult } from '../types'; import CachingClient from './CachingClient'; export default class RovoAgentCardClient extends CachingClient<RovoAgentCardClientResult> { options: ProfileClientOptions; constructor(options: ProfileClientOptions); private basePath; private getActivationId; private getAgentByARIAgg; private getAgentByAccountIdAgg; makeRequest(id: AgentIdType, analytics?: FireEventType): Promise<RovoAgentCardClientResult>; /** * This function will call both REST and AGG endpoints to get the agent profile * There are some data that is only available in the AGG endpoint, so we need to call both * For any new fields, please only add them to the AGG endpoint * * @TODO migrate everything to AGG endpoint */ getProfile(id: AgentIdType, analytics?: FireEventType): Promise<RovoAgentCardClientResult>; deleteAgent(agentId: string, analytics?: FireEventType): Promise<void>; setFavouriteAgent(agentId: string, isFavourite: boolean, analytics?: FireEventType): Promise<void>; getPermissions(id: string, fireAnalytics?: FireEventType): Promise<AgentPermissions>; }