import { ListItem } from "../../core/models/core.model"; export type IntentRequestCount = IIntent & IIntentRequestCount; export enum ResolutionStatusValues { Resolved = "Resolved", Unresolved = "Unresolved", Unknown = "Unknown", NotHandled = "NotHandled", Casual = "Casual", NotRelevant = "NotRelevant", Assisted = "Assisted" }; export enum ResolutionStatusLabels { Resolved = "Resolved", Unresolved = "Unresolved", Unknown = "Abandoned", NotHandled = "Unhandled", Casual = "Casual", NotRelevant = "Irrelevant", Assisted = "Assisted" }; export enum ResolutionStatusChipColors { Resolved = "green", Unresolved = "red", Unknown = "blue", NotHandled = "orange", Casual = "purple", NotRelevant = "pink", Assisted = "oliveGreen" }; export interface ResolutionStatusItem extends ListItem{ chipColor: ResolutionStatusChipColors, } export enum ResolutionType { Correct = "Correct Answer", Gap = "Not Understood", Incorrect = "Not Helpful - Incorrect", Incorrect_Inaccurate = "Not Helpful - Completely Inaccurate", Incorrect_MissingInfo = "Not Helpful - Missing Information", Incorrect_DifficultToFollow = "Not Helpful - Hard to Understand", Incorrect_Other = "Not Helpful - Something else" } export enum ReviewStatus { Approved = "Approved", NotReviewed = "Needs Review", ValidatedNotApproved = "Validated Not Approved" } export enum AutoCategorization { Flow_Gap_Terminal_Node = "Flow Gap - Terminal Node", Flow_Gap_Non_Terminal_Node = "Flow Gap - Non Terminal Node", Intent_Misclassification = "Misclassification", Incorrect_Answer = "Incorrect Answer", KB_Gap = "KB Gap", Correct_Answer = "Correct Answer", Something_Else ="Something Else" } export enum FulfillmentIcon { KB = "flaticon flaticon-knowledge", Flow = "flaticon flaticon-zplex2 flaticon-action", KnowledgeFlow = "flaticon flaticon-zplex4 flaticon-book", ServiceCatalog = "flaticon flaticon-form", ResolutionNote = "flaticon abeckicon icon-incidents", Custom = "flaticon flaticon-zplex4 flaticon-edit2", } export interface ChatInfoForm { resolution_status: string; resolution_detail: string; autotagging_category: string; tags: number[]; } export interface Entity { name? : string; id?: string; } export interface IRequestData { id: number; title: string; resolution_status: string; resolution_detail: string; created_at: string; status: string; escalation_type: string; sor_ticket_id: number; assigned_to_id: number reporter_id: number; channel_id: number; clientDevice: IClientDevice; conversation: IConversation; session: {language_detected: {code: string}}; session_id: number; totalRequestsInSession: number; channel: IChannel; sentimentPrediction: {first_prediction: string} sessionFeedback: {score: number}; updated_at: string; agent_handoff_at: string; user: IUser; intents: IIntent[]; requestFulfillments: IRequestFullfillment[]; requestAutocategorization: {autotagging_category: string}; _intentsCategories: string[] | "None"; _historicalEvents: IMatchData; content?: any; _isEscalated: Boolean; } export interface IClientDevice { location_city: string; location_country: string; } export interface IConversation { feedback_answer: string; duration: 20; error_message: string; } export interface IChannel { channel_type_id: number; name: string; channelId?: number; } export interface IUser { user_email: string } export interface IIntentCategory { category: {category: string}; } export interface IIntent { name: string; id: number; } export interface IIntentRequestCount { count: number; } export interface IRequestFullfillment { producer: string; } export interface IMatchData { entities: IMatchEntity[]; intents: IMatchIntent[]; fulfillments: IMatchFulfillment[]; } export interface ICurrentMatchData { entities: IAnnotationEntity[]; intents: IAnnotationIntent[]; fulfillments: IAnnotationFulfillment[]; } export interface IActivityData { created_at: string; user: {user_email: string}; channel_type_id: number; entity_id: number; chatItems?: IChatItems[]; chats?: IChatItems[]; content?: string; request?: IRequestData; } export interface IChatItems { isEmailContent?: boolean; attachements?: any; isHtml?: boolean; question: string type?: string; questionType: string; matchedIntents: IMatchedIntents[]; answers?: any[]; annotationData: any; // TO-DO: type } export interface IMatchedIntents { intent: string; matchedPhrase: string; score: number; } export interface ITagsData { listId: number; name: string; } export interface IMatchEntity { id: number } export interface IMatchIntent { } export interface IMatchFulfillment { type: string; kbSection?: any; // TO-DO: type scItem?: any; // TO-DO: type flow?: any; // TO-DO: type definition?: any; //TODO- type resolution?: any; // TODO- type is_selected?: boolean; } export interface IKBFulfillment { kbDocument: any; //TODO- type kbSection: any; // TODO- type ext_definition_id: string; document_key: string; } export interface IRequestCountInSession { data: any; totalCount: number; } export interface IAnnotationEntity { id: number; entityName: string; score: number; } export interface IAnnotationIntent { id: number; name: string; score: number; utterance?: any; matchedPhrase?: string; } export interface IAnnotationFulfillment { id: number; name: string; score: number; type: string; source?: string; } export interface IKLRequest { responseLanguage: string; debugInfoV2: { request: string; conversation: { entities: IAnnotationEntity[]; intents: IAnnotationIntent[]; fulfillments: IAnnotationFulfillment[]; }, icm: {content: {debugInfo: { logs: {'02_SpellChecker': any}, intents: any }}} } } export interface IMatchedInfo { domain: string; } export interface IEntityHighlight { input: string; values: IEntityHighlightValue[]; } export interface IEntityHighlightValue { id: number; type: string; epos: number; spos: number; } export interface IHistoricalFulfillment { icon: string; name: string; } export interface IFlowData { name: string; id: number; db_id: number; } export interface IServiceCatalog { title: string; id: number; } export interface IKBData { title: string; id: number; } export interface IDomainData { name: string; _isPurchased: boolean; } export interface IFulfillmentData { created_at: string, bot_id: string, request_id: string, Main_Request: string, type: string, flow_db_id: string, flow_name: string, kb_document_key: string, document_title: string, document_content_id: string, section_title: string, service_catalog_name: string, service_catalog_key: string, }