import type { SetIntervalAsyncTimer } from "set-interval-async/dynamic"; import type { RTDTypes } from "../rtd-types/rtd-types"; import { InteractionsServiceConstants } from "./interactions-service-constants"; export declare namespace InteractionsServiceTypes { interface SortBy { fields: InteractionsServiceConstants.QueryField[]; order: InteractionsServiceConstants.SortOrder; } interface DateRange { startTime: number; endTime?: number; } interface Filter { filterType: InteractionsServiceConstants.FilterType; filter: InteractionsServiceConstants.Filter; operator: InteractionsServiceConstants.FilterOperator; } interface OrFilters { $or: Filters[]; } type Filters = Partial>; interface SearchResults { tasks: TaskDetails[]; pageInfo: PageInfo; } interface PageInfo { endCursor: string; hasNextPage: boolean; } interface MatchedSkill { name: string; boolVal?: boolean; intVal?: number; strVal?: string; } interface RequiredSkill extends MatchedSkill { operand: string; } interface TaskDetails { id: string; status: string; channelType: string; createdTime: number; endedTime: number; origin: string; destination: string; contactReason: string; direction: string; channelSubType: string; customer: Customer; isActive: boolean; channelMetaData: ChannelMetaData; lastQueue: QueueInfo; lastSite: NameIdInfo; lastTeam: NameIdInfo; lastEntryPoint: NameIdInfo; previousQueue: NameIdInfo; lastWrapUpCodeId: string; lastWrapupCodeName: string; lastAgent: Agent; emailBccList: string; emailCcList: string; emailToList: string; emailHasAttachments: boolean; totalDuration: number; blindTransferCount: number; conferenceCount: number; conferenceDuration: number; consultCount: number; consultDuration: number; holdCount: number; holdDuration: number; connectedCount: number; connectedDuration: number; transferCount: number; wrapupDuration: number; ringingDuration: number; queueDuration: number; queueCount: number; callCompletedCount: number; autoCsat: number | null; matchedSkills: MatchedSkill[]; requiredSkills: RequiredSkill[]; isContactHandled: boolean; previousAgentId: string; previousAgentSessionId: string; previousAgentName: string; isOutdial: boolean; agentToQueueTransferCount: number; contactPriority: number; captureRequested: boolean; isRecordingDeleted: boolean; postCallDuration: number; overallEvalScore?: number | null; autoEvalScore?: number | null; manualEvalScore?: number | null; deadAirTime?: number | null; crossTalkTime?: number | null; wordRatioScore?: number | null; evalSectionsFailureCount?: number | null; customerSentimentScore?: number | null; topicName?: string | null; topicId?: string | null; contactDriver?: string | null; firstQueueName?: string | null; } interface Customer { name: string; phoneNumber: string; email: string; } interface ChannelMetaData { email: { subject: string; }; chat: { chatReason: string; }; } interface QueueInfo { id: string; name: string; duration: number; } interface NameIdInfo { id: string; name: string; } interface Agent { id: string | null; name: string | null; signInId: string | null; sessionId: string | null; phoneNumber: string | null; channelId: string; } interface BaseFetchParams { startTime: number; endTime: number; sortBy?: InteractionsServiceTypes.SortBy; filters?: InteractionsServiceTypes.Filters; shouldFetchQmFields?: boolean; shouldFetchOverallEvalScore?: boolean; shouldFetchCustomerSentimentScore?: boolean; shouldFetchTopicAnalyticsFields?: boolean; shouldFetchEvalSectionsFailureCount?: boolean; } interface FetchCompletedInteractionsParams extends BaseFetchParams { callback: InteractionsServiceTypes.PollingCallback; } interface FetchInteractionsParams extends BaseFetchParams { cursor: string; } interface InteractionsUpdate { fullUpdate?: RTDTypes.AgentContactStats[]; realTimeUpdate?: { updated: RTDTypes.AgentContactStats[]; removed: string[]; }; } type ActiveOrQueuedInteractions = InteractionsServiceConstants.QueryType.Active | InteractionsServiceConstants.QueryType.Queued; type QueuedOrCompletedInteractions = InteractionsServiceConstants.QueryType.Queued | InteractionsServiceConstants.QueryType.Completed; type CompletedResponse = { fetchMore: () => Promise; }; type PollingResponse = { intervalId: SetIntervalAsyncTimer; fetchMore: () => Promise; }; type ContactStatsSubscription = { unsubscribe: () => void; }; type RealTimeCallback = (data: InteractionsServiceTypes.InteractionsUpdate) => void; type PollingCallback = (data: InteractionsServiceTypes.TaskDetails[]) => void; interface TimeRange { start: number; end: number; } } //# sourceMappingURL=interactions-service.types.d.ts.map