import { BlazeResolverPipeline } from '../core/pipeline/index.js'; export interface SupportTicket { id: string; ticketNumber: string; status: 'open' | 'closed' | 'pending'; priority: 'low' | 'normal' | 'high' | 'urgent'; subject: string; category: string; assignedTo?: string; customerId?: string; customerName?: string; customerEmail?: string; customerPhone?: string; intakeChannel?: string; orderId?: string; orderNumber?: string; orderTotalPaise?: number; orderStatus?: string; outletId?: string; outletName?: string; branchId?: string; branchName?: string; createdAt: string; updatedAt: string; lastMessageAt: string; isEscalated?: boolean; pulseStatus?: string; githubIssueUrl?: string; githubIssueNumber?: number; githubBranch?: string; githubPullRequestUrl?: string; isHumanTakeover?: boolean; humanTakeoverReason?: string | null; aiAssisted?: boolean; lastAiReplyAt?: string | null; aiReport?: { triageId?: string; intent?: string; sentiment?: string; urgencyScore?: number; guardrailPassed?: boolean; isPromptInjection?: boolean; policyAllowed?: boolean; policyRationale?: string; suggestedAction?: string; requiresHitl?: boolean; claimedAmount?: number; incidentId?: string; incidentTitle?: string; clusterKey?: string; isSystemic?: boolean; executionDurationMs?: number; processedAt?: string; triageCategory?: string; triageSeverity?: string; triageItemName?: string; triageResourceId?: string; triageOrderId?: string; ragMatches?: string[]; ragApplied?: boolean; resolutionActions?: Array<{ actionType: string; approvalStatus: string; amount?: number; reason?: string; }>; responseChannel?: string; responseTone?: string; responseQualityPassed?: boolean; }; } export interface SupportMessage { id: string; ticketId: string; role: 'user' | 'agent' | 'system'; content: string; body?: string; authorName?: string; senderName?: string; senderType?: 'user' | 'agent' | 'system' | 'bot'; internalNote?: boolean; attachments?: Array<{ name: string; url: string; mimeType?: string; size?: number; }>; createdAt: string; } export interface CustomerContext { userId?: string; name?: string; email?: string; phone?: string; planName?: string; outletName?: string; isVip?: boolean; lifetimeSpendPaise?: number; recentTickets?: Array<{ id: string; ticketNumber: string; subject: string; status: string; createdAt: string; }>; recentOrders?: Array<{ id: string; orderNumber: string; totalPaise: number; status: string; createdAt: string; itemsSummary?: string; outletName?: string; }>; } export interface SupportCannedResponse { id: string; title: string; body: string; category?: string; isAutoReply?: boolean; } export interface TicketRating { rating: number; comment?: string | null; createdAt?: string; } /** * Saved replies for BlazeResolver's own demo desk (the example business in server.ts). Never a product's default: * they state things about orders and credits that are only true in the demo. */ export declare const DEMO_SAVED_REPLIES: SupportCannedResponse[]; export declare class SupportStore { private tickets; private messages; private cannedResponses; private ratings; private ticketSeq; private persistPath?; /** The saved replies a new or reset store starts with. */ private readonly initialReplies; /** * Starts with no saved replies: a product's desk answers only from its own docs and the replies its team writes. * Pass persistPath or set BLAZE_SUPPORT_DATA_PATH to persist tickets and messages across process restarts. */ constructor(options?: { savedReplies?: SupportCannedResponse[]; persistPath?: string; }); private seedDefaults; private loadState; private saveState; resetAll(): void; getTickets(filters?: { status?: string; priority?: string; category?: string; search?: string; customerEmail?: string; }): SupportTicket[]; getTicket(id: string): SupportTicket | undefined; getMessages(ticketId: string): SupportMessage[]; addMessage(ticketId: string, message: Omit): SupportMessage; createTicketFromCustomer(data: { subject: string; rawText: string; category?: string; orderId?: string; customerId?: string; customerName?: string; customerEmail?: string; customerPhone?: string; outletName?: string; intakeChannel?: string; }, pipeline?: BlazeResolverPipeline): Promise<{ ticket: SupportTicket; initialMessage: SupportMessage; aiReply?: SupportMessage; }>; updateTicket(id: string, updates: Partial): SupportTicket; getCustomerContext(customerIdOrOutletId: string): CustomerContext; getCannedResponses(): SupportCannedResponse[]; addCannedResponse(title: string, body: string, category?: string): SupportCannedResponse; updateCannedResponse(id: string, title: string, body: string): SupportCannedResponse; deleteCannedResponse(id: string): boolean; setAutoReply(id: string): SupportCannedResponse[]; getRating(ticketId: string): TicketRating | null; setRating(ticketId: string, rating: number, comment?: string): TicketRating; } export * from './handler.js'; //# sourceMappingURL=index.d.ts.map