UNPKG

@atlaskit/profilecard

Version:

A React component to display a card with user information.

64 lines (63 loc) 2.68 kB
import { type AnalyticsEventPayload } from '@atlaskit/analytics-next'; import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types'; import { type ErrorAttributes } from '../client/types'; import { type ProfileType } from '../types'; type GenericAttributes = Record<string, string | number | boolean | undefined | string[]> | ErrorAttributes; interface AnalyticsEvent { action?: string; actionSubject?: string; actionSubjectId?: string; attributes?: GenericAttributes; name?: string; source?: string; } export declare const fireEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent | undefined, body: AnalyticsEvent) => void; export declare const cardTriggered: (type: ProfileType, method: 'hover' | 'click', teamId?: string) => AnalyticsEventPayload; export declare const teamRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', attributes?: { duration: number; } & GenericAttributes) => AnalyticsEventPayload; export declare const userRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', attributes?: { duration: number; } & GenericAttributes) => AnalyticsEventPayload; export declare const profileCardRendered: (type: ProfileType, actionSubjectId: 'spinner' | 'content' | 'error' | 'errorBoundary', attributes?: { duration?: number; errorType?: 'default' | 'NotFound'; hasRetry?: boolean; numActions?: number; memberCount?: number; includingYou?: boolean; descriptionLength?: number; titleLength?: number; }) => AnalyticsEventPayload; export declare const actionClicked: (type: ProfileType, attributes: { duration: number; hasHref: boolean; hasOnClick: boolean; index: number; actionId: string; }) => AnalyticsEventPayload; export declare const reportingLinesClicked: (attributes: { userType: 'manager' | 'direct-report'; duration: number; }) => AnalyticsEventPayload; export declare const moreActionsClicked: (type: ProfileType, attributes: { duration: number; numActions: number; }) => AnalyticsEventPayload; export declare const teamAvatarClicked: (attributes: { duration: number; hasHref: boolean; hasOnClick: boolean; index: number; }) => AnalyticsEventPayload; export declare const moreMembersClicked: (attributes: { duration: number; memberCount: number; }) => AnalyticsEventPayload; export declare const errorRetryClicked: (attributes: { duration: number; }) => AnalyticsEventPayload; export declare const agentRequestAnalytics: (action: 'triggered' | 'succeeded' | 'failed', actionSubjectId?: string, attributes?: { duration: number; } & GenericAttributes) => AnalyticsEventPayload; export {};