@edvak99/voice-receptionist-widget 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/README.md +56 -43
  2. package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-CoVjr5Y3.mjs +113 -0
  3. package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-CoVjr5Y3.mjs.map +1 -0
  4. package/fesm2022/edvak99-voice-receptionist-widget-audit-page.component-ou9oxnJp.mjs +35 -0
  5. package/fesm2022/edvak99-voice-receptionist-widget-audit-page.component-ou9oxnJp.mjs.map +1 -0
  6. package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-BV7KOhd9.mjs +316 -0
  7. package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-BV7KOhd9.mjs.map +1 -0
  8. package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-CWWma-6r.mjs +138 -0
  9. package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-CWWma-6r.mjs.map +1 -0
  10. package/fesm2022/edvak99-voice-receptionist-widget-call-recording-player.component-B2IuwsVH.mjs +110 -0
  11. package/fesm2022/edvak99-voice-receptionist-widget-call-recording-player.component-B2IuwsVH.mjs.map +1 -0
  12. package/fesm2022/edvak99-voice-receptionist-widget-call-review.service-D-GutOar.mjs +29 -0
  13. package/fesm2022/edvak99-voice-receptionist-widget-call-review.service-D-GutOar.mjs.map +1 -0
  14. package/fesm2022/edvak99-voice-receptionist-widget-call-review.util-DQLIw7xb.mjs +70 -0
  15. package/fesm2022/edvak99-voice-receptionist-widget-call-review.util-DQLIw7xb.mjs.map +1 -0
  16. package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-B93giErR.mjs +248 -0
  17. package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-B93giErR.mjs.map +1 -0
  18. package/fesm2022/edvak99-voice-receptionist-widget-eds-avatar.component-PCnIWeOA.mjs +27 -0
  19. package/fesm2022/edvak99-voice-receptionist-widget-eds-avatar.component-PCnIWeOA.mjs.map +1 -0
  20. package/fesm2022/edvak99-voice-receptionist-widget-eds-elapsed.pipe-BrMNsxB5.mjs +136 -0
  21. package/fesm2022/edvak99-voice-receptionist-widget-eds-elapsed.pipe-BrMNsxB5.mjs.map +1 -0
  22. package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-DClMfxeY.mjs +2666 -0
  23. package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-DClMfxeY.mjs.map +1 -0
  24. package/fesm2022/edvak99-voice-receptionist-widget-knowledge-hub.page-BNsM-o3z.mjs +575 -0
  25. package/fesm2022/edvak99-voice-receptionist-widget-knowledge-hub.page-BNsM-o3z.mjs.map +1 -0
  26. package/fesm2022/edvak99-voice-receptionist-widget-live-calls-list.service-C2UZJ5wF.mjs +120 -0
  27. package/fesm2022/edvak99-voice-receptionist-widget-live-calls-list.service-C2UZJ5wF.mjs.map +1 -0
  28. package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-DQTVJjsP.mjs +115 -0
  29. package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-DQTVJjsP.mjs.map +1 -0
  30. package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-C3iTtVdn.mjs +574 -0
  31. package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-C3iTtVdn.mjs.map +1 -0
  32. package/fesm2022/edvak99-voice-receptionist-widget-outbound-purpose.util-BQECIuJu.mjs +54 -0
  33. package/fesm2022/edvak99-voice-receptionist-widget-outbound-purpose.util-BQECIuJu.mjs.map +1 -0
  34. package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-C10N-x5g.mjs +265 -0
  35. package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-C10N-x5g.mjs.map +1 -0
  36. package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-BBE_H2jb.mjs +509 -0
  37. package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-BBE_H2jb.mjs.map +1 -0
  38. package/fesm2022/edvak99-voice-receptionist-widget-task.util-DdtI0CR3.mjs +52 -0
  39. package/fesm2022/edvak99-voice-receptionist-widget-task.util-DdtI0CR3.mjs.map +1 -0
  40. package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-COnYcaMT.mjs +237 -0
  41. package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-COnYcaMT.mjs.map +1 -0
  42. package/fesm2022/edvak99-voice-receptionist-widget-wizard-page.component-Box7X-Cq.mjs +45 -0
  43. package/fesm2022/edvak99-voice-receptionist-widget-wizard-page.component-Box7X-Cq.mjs.map +1 -0
  44. package/fesm2022/edvak99-voice-receptionist-widget.mjs +1 -41
  45. package/fesm2022/edvak99-voice-receptionist-widget.mjs.map +1 -1
  46. package/lib/api-paths.d.ts +11 -0
  47. package/lib/components/call-conversation-panel/call-conversation-panel.component.d.ts +45 -0
  48. package/lib/components/call-recording-player/call-recording-player.component.d.ts +29 -0
  49. package/lib/components/call-tasks-panel/call-tasks-panel.component.d.ts +19 -0
  50. package/lib/components/live-transcript-panel/live-transcript-panel.component.d.ts +36 -0
  51. package/lib/components/outbound-dial-modal/outbound-dial-modal.component.d.ts +37 -0
  52. package/lib/components/outbound-purpose-form-modal/outbound-purpose-form-modal.component.d.ts +38 -0
  53. package/lib/components/task-detail-drawer/task-detail-drawer.component.d.ts +20 -0
  54. package/lib/config.d.ts +23 -0
  55. package/lib/extract-api-rows.d.ts +2 -0
  56. package/lib/knowledge/components/faq-empty-state/faq-empty-state.component.d.ts +22 -0
  57. package/lib/knowledge/components/faq-form/faq-form.component.d.ts +27 -0
  58. package/lib/knowledge/components/faq-search-tester/faq-search-tester.component.d.ts +17 -0
  59. package/lib/knowledge/mocks/practice-faq.seed.d.ts +2 -0
  60. package/lib/knowledge/models/practice-faq.model.d.ts +47 -0
  61. package/lib/knowledge/pages/knowledge-hub.page.d.ts +47 -0
  62. package/lib/knowledge/services/practice-faq-api.mock.d.ts +16 -0
  63. package/lib/knowledge/services/practice-faq-api.service.d.ts +22 -0
  64. package/lib/knowledge/utils/faq.util.d.ts +3 -0
  65. package/lib/layout/eds-app-rail.component.d.ts +6 -0
  66. package/lib/layout/eds-app-shell.component.d.ts +5 -0
  67. package/lib/layout/eds-module-nav.component.d.ts +24 -0
  68. package/lib/layout/eds-topbar.component.d.ts +29 -0
  69. package/lib/mocks/api-log.seed.d.ts +5 -0
  70. package/lib/mocks/outbound-purpose.seed.d.ts +3 -0
  71. package/lib/mocks/seed-data.d.ts +38 -0
  72. package/lib/models/ai-receptionist.types.d.ts +257 -0
  73. package/lib/models/api-dto.types.d.ts +215 -0
  74. package/lib/models/api-log.types.d.ts +53 -0
  75. package/lib/models/live-transcript.types.d.ts +26 -0
  76. package/lib/models/outbound-purpose.types.d.ts +50 -0
  77. package/lib/pages/analytics-page/analytics-page.component.d.ts +44 -0
  78. package/lib/pages/audit-page/audit-page.component.d.ts +14 -0
  79. package/lib/pages/call-history-detail-page/call-history-detail-page.component.d.ts +25 -0
  80. package/lib/pages/call-history-page/call-history-page.component.d.ts +42 -0
  81. package/lib/pages/dashboard-page/dashboard-page.component.d.ts +60 -0
  82. package/lib/pages/live-calls-page/live-calls-page.component.d.ts +37 -0
  83. package/lib/pages/live-monitor-page/live-monitor-page.component.d.ts +43 -0
  84. package/lib/pages/outbound-purposes-page/outbound-purposes-page.component.d.ts +24 -0
  85. package/lib/pages/settings-page/settings-fields.config.d.ts +35 -0
  86. package/lib/pages/settings-page/settings-page.component.d.ts +50 -0
  87. package/lib/pages/settings-page/tts-voice-presets.d.ts +7 -0
  88. package/lib/pages/tasks-page/tasks-page.component.d.ts +35 -0
  89. package/lib/pages/wizard-page/wizard-page.component.d.ts +17 -0
  90. package/lib/pipes/eds-elapsed.pipe.d.ts +7 -0
  91. package/lib/provide-voice-receptionist.d.ts +6 -0
  92. package/lib/routes.d.ts +8 -0
  93. package/lib/services/agent-online.service.d.ts +29 -0
  94. package/lib/services/ai-receptionist-api.mappers.d.ts +45 -0
  95. package/lib/services/ai-receptionist-api.mock.d.ts +150 -0
  96. package/lib/services/ai-receptionist-api.service.d.ts +156 -0
  97. package/lib/services/call-review.service.d.ts +12 -0
  98. package/lib/services/dashboard-socket.service.d.ts +26 -0
  99. package/lib/services/live-calls-list.service.d.ts +29 -0
  100. package/lib/services/live-transcript.service.d.ts +39 -0
  101. package/lib/shared/copy-button.component.d.ts +14 -0
  102. package/lib/shared/modal.component.d.ts +20 -0
  103. package/lib/shared/toast-container.component.d.ts +7 -0
  104. package/lib/shared/toast.service.d.ts +16 -0
  105. package/lib/ui/eds-avatar.component.d.ts +8 -0
  106. package/lib/ui/eds-badge.component.d.ts +7 -0
  107. package/lib/ui/eds-button.component.d.ts +9 -0
  108. package/lib/ui/eds-icon.component.d.ts +10 -0
  109. package/lib/ui/eds-pulse-dot.component.d.ts +5 -0
  110. package/lib/ui/eds-waveform.component.d.ts +8 -0
  111. package/lib/utils/call-outcome.util.d.ts +8 -0
  112. package/lib/utils/call-review.util.d.ts +8 -0
  113. package/lib/utils/outbound-purpose.util.d.ts +14 -0
  114. package/lib/utils/task.util.d.ts +10 -0
  115. package/lib/utils/tool-labels.util.d.ts +14 -0
  116. package/lib/utils/transcript-timing.util.d.ts +17 -0
  117. package/lib/utils/welcome-message.util.d.ts +5 -0
  118. package/package.json +12 -5
  119. package/public-api.d.ts +6 -2
  120. package/styles/_index.scss +55 -0
  121. package/styles/chat-ui.scss +133 -0
  122. package/styles/eds.scss +328 -0
  123. package/lib/voice-receptionist-widget.component.d.ts +0 -5
  124. package/lib/voice-receptionist-widget.service.d.ts +0 -6
@@ -0,0 +1,22 @@
1
+ import { Observable } from 'rxjs';
2
+ import { CreatePracticeFaqRequest, PracticeFaq, PracticeFaqSearchResult, UpdatePracticeFaqRequest } from '../models/practice-faq.model';
3
+ import * as i0 from "@angular/core";
4
+ export declare class PracticeFaqApiService {
5
+ private readonly http;
6
+ private readonly mock;
7
+ private readonly config;
8
+ private readonly paths;
9
+ private readonly base;
10
+ private get useMock();
11
+ list(activeOnly?: boolean): Observable<PracticeFaq[]>;
12
+ get(faqId: string): Observable<PracticeFaq | null>;
13
+ create(body: CreatePracticeFaqRequest): Observable<PracticeFaq>;
14
+ update(faqId: string, body: UpdatePracticeFaqRequest): Observable<PracticeFaq>;
15
+ delete(faqId: string): Observable<{
16
+ success: boolean;
17
+ }>;
18
+ search(q: string, limit?: number): Observable<PracticeFaqSearchResult>;
19
+ private asList;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<PracticeFaqApiService, never>;
21
+ static ɵprov: i0.ɵɵInjectableDeclaration<PracticeFaqApiService>;
22
+ }
@@ -0,0 +1,3 @@
1
+ export declare function categoryBadgeClass(category: string | null): string;
2
+ export declare function truncateText(text: string, max?: number): string;
3
+ export declare function scorePercent(score: number): number;
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class EdsAppRailComponent {
3
+ protected readonly includePracticeNav: boolean;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<EdsAppRailComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<EdsAppRailComponent, "eds-app-rail", never, {}, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class EdsAppShellComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<EdsAppShellComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<EdsAppShellComponent, "eds-app-shell", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,24 @@
1
+ import * as i0 from "@angular/core";
2
+ interface NavItem {
3
+ id: string;
4
+ label: string;
5
+ icon: string;
6
+ route: string;
7
+ badge?: number;
8
+ pulse?: boolean;
9
+ adminOnly?: boolean;
10
+ }
11
+ export declare class EdsModuleNavComponent {
12
+ private readonly config;
13
+ private readonly session;
14
+ private readonly agentOnline;
15
+ protected readonly agentOn: import("@angular/core").Signal<import("../services/agent-online.service").AgentOnlineKnownState>;
16
+ protected readonly includePracticeNav: boolean;
17
+ protected readonly receptionistNav: NavItem[];
18
+ protected readonly practiceNav: NavItem[];
19
+ constructor();
20
+ protected showNavItem(item: NavItem): boolean;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<EdsModuleNavComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<EdsModuleNavComponent, "eds-module-nav", never, {}, {}, never, never, true, never>;
23
+ }
24
+ export {};
@@ -0,0 +1,29 @@
1
+ import { AgentOnlineService } from '../services/agent-online.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class EdsTopbarComponent {
4
+ private readonly router;
5
+ private readonly sessionAdapter;
6
+ private readonly toast;
7
+ protected readonly agentOnline: AgentOnlineService;
8
+ protected readonly pageTitle: import("@angular/core").WritableSignal<string>;
9
+ protected readonly confirmOffOpen: import("@angular/core").WritableSignal<boolean>;
10
+ protected readonly online: import("@angular/core").Signal<import("../services/agent-online.service").AgentOnlineKnownState>;
11
+ protected readonly loading: import("@angular/core").Signal<boolean>;
12
+ protected readonly toggling: import("@angular/core").Signal<boolean>;
13
+ protected readonly statusError: import("@angular/core").Signal<string | null>;
14
+ protected readonly userEmail: import("@angular/core").Signal<string | null>;
15
+ protected readonly showUser: import("@angular/core").Signal<boolean>;
16
+ protected readonly showLogout: import("@angular/core").Signal<boolean>;
17
+ protected readonly userInitials: import("@angular/core").Signal<string>;
18
+ protected readonly statusLabel: import("@angular/core").Signal<"Checking status…" | "Status unknown" | "AI receptionist is answering calls" | "AI is offline — calls go to front desk">;
19
+ protected readonly switchDisabled: import("@angular/core").Signal<boolean>;
20
+ constructor();
21
+ protected onToggleClick(): void;
22
+ protected cancelConfirmOff(): void;
23
+ protected confirmTurnOff(): void;
24
+ private applyOnline;
25
+ protected logout(): void;
26
+ private updateTitle;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<EdsTopbarComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<EdsTopbarComponent, "eds-topbar", never, {}, {}, never, never, true, never>;
29
+ }
@@ -0,0 +1,5 @@
1
+ import { ApiLogDetail, ApiLogListItem, ApiLogStats } from '../models/api-log.types';
2
+ export declare const SEED_CALL_API_LOGS: Record<string, ApiLogListItem[]>;
3
+ export declare const SEED_API_LOG_DETAILS: Record<string, ApiLogDetail>;
4
+ export declare function allSeedLogs(): ApiLogListItem[];
5
+ export declare const SEED_API_LOG_STATS: ApiLogStats;
@@ -0,0 +1,3 @@
1
+ import { OutboundPurpose, OutboundPurposePlaceholder } from '../models/outbound-purpose.types';
2
+ export declare const DEFAULT_PLACEHOLDERS: OutboundPurposePlaceholder[];
3
+ export declare const SEED_OUTBOUND_PURPOSES: OutboundPurpose[];
@@ -0,0 +1,38 @@
1
+ import { AgentSettings, AnalyticsData, AuditEvent, DashboardData, HistoryCall, HistoryDetail, LiveCall, LocationOption, ProviderOption, SetupData, TaskItem, TranscriptLine } from '../models/ai-receptionist.types';
2
+ export declare const SEED_LIVE_CALLS: LiveCall[];
3
+ export declare const SEED_ATTENTION: ({
4
+ id: string;
5
+ callId: string;
6
+ title: string;
7
+ detail: string;
8
+ severity: "urgent";
9
+ time: number;
10
+ } | {
11
+ id: string;
12
+ callId: string;
13
+ title: string;
14
+ detail: string;
15
+ severity: "warn";
16
+ time: number;
17
+ } | {
18
+ id: string;
19
+ callId: string;
20
+ title: string;
21
+ detail: string;
22
+ severity: "info";
23
+ time: number;
24
+ })[];
25
+ export declare const SEED_HISTORY: HistoryCall[];
26
+ export declare const SEED_HISTORY_DETAILS: Record<string, HistoryDetail>;
27
+ export declare const SEED_TASKS: TaskItem[];
28
+ export declare const SEED_AUDIT: AuditEvent[];
29
+ export declare const SEED_ANALYTICS: AnalyticsData;
30
+ export declare const SEED_SETTINGS: AgentSettings;
31
+ export declare const SEED_SETUP: SetupData;
32
+ export declare const SEED_LOCATIONS: LocationOption[];
33
+ export declare const SEED_PROVIDERS: ProviderOption[];
34
+ export declare function buildDashboard(): DashboardData;
35
+ export declare function getStreamingLines(): TranscriptLine[];
36
+ export declare function cloneLiveCalls(): LiveCall[];
37
+ export declare function cloneHistory(): HistoryCall[];
38
+ export declare function cloneTasks(): TaskItem[];
@@ -0,0 +1,257 @@
1
+ export type Verification = 'verified' | 'partial' | 'failed' | 'unknown';
2
+ export type CallStatus = 'ai' | 'needs-help' | 'human-requested' | 'urgent' | 'takeover' | 'transferring';
3
+ export type Sentiment = 'calm' | 'neutral' | 'frustrated' | 'urgent';
4
+ export type ToolState = 'ok' | 'warn' | 'error' | 'active';
5
+ export type TranscriptWho = 'ai' | 'patient' | 'staff' | 'system';
6
+ export interface TranscriptLine {
7
+ who: TranscriptWho;
8
+ text: string;
9
+ flag?: 'verify' | 'fail' | 'escalate' | string;
10
+ at?: number;
11
+ }
12
+ export interface ToolEvent {
13
+ t: string;
14
+ /** Stable tool identifier, e.g. check_doctor_availability */
15
+ key?: string;
16
+ /** Human-readable V3 label, e.g. Checked Doctor Availability */
17
+ name: string;
18
+ tech: string;
19
+ result: string;
20
+ state: ToolState;
21
+ }
22
+ export interface LiveCall {
23
+ id: string;
24
+ name: string;
25
+ initials: string;
26
+ avatar: string | null;
27
+ phone: string;
28
+ verification: Verification;
29
+ direction: 'inbound' | 'outbound';
30
+ reason: string;
31
+ status: CallStatus;
32
+ started: number;
33
+ sentiment: Sentiment;
34
+ confidence: number;
35
+ goal: string;
36
+ dob?: string;
37
+ location: string;
38
+ provider: string | null;
39
+ language: string;
40
+ matched: boolean;
41
+ assigned: string | null;
42
+ tools: ToolEvent[];
43
+ transcript: TranscriptLine[];
44
+ aiPaused?: boolean;
45
+ reviewed?: boolean;
46
+ }
47
+ export interface HistoryCall {
48
+ id: string;
49
+ name: string;
50
+ initials: string;
51
+ phone: string;
52
+ direction: 'inbound' | 'outbound';
53
+ outcome: string;
54
+ reason: string;
55
+ duration: number;
56
+ durationLabel?: string;
57
+ started: number;
58
+ whenLabel?: string;
59
+ location: string;
60
+ verification: Verification;
61
+ review: 'needs' | 'reviewed';
62
+ }
63
+ export interface HistoryDetail extends HistoryCall {
64
+ summary: string;
65
+ transcript: TranscriptLine[];
66
+ tools: ToolEvent[];
67
+ /** @deprecated Use CallRecordingPlayerComponent — URL requires JWT blob fetch */
68
+ recordingUrl?: string;
69
+ }
70
+ export interface RegenerateSummaryResult {
71
+ callId: string;
72
+ summary: string;
73
+ summaryModel?: string;
74
+ summaryGeneratedAt?: string;
75
+ transcriptTurnCount?: number;
76
+ }
77
+ export type CallRecordingStatus = 'ready' | 'pending' | 'unavailable' | 'failed';
78
+ export interface CallRecordingMeta {
79
+ callId: string;
80
+ status: CallRecordingStatus;
81
+ url: string | null;
82
+ contentType?: string;
83
+ durationSeconds?: number;
84
+ message?: string;
85
+ }
86
+ export interface AttentionItem {
87
+ id: string;
88
+ callId: string;
89
+ title: string;
90
+ detail: string;
91
+ severity: 'urgent' | 'warn' | 'info';
92
+ time: number;
93
+ timeLabel?: string;
94
+ }
95
+ export interface DashboardData {
96
+ stats: {
97
+ activeCalls: number;
98
+ answeredToday: number;
99
+ appointmentsBooked: number;
100
+ tasksCreated: number;
101
+ completionRate: number;
102
+ };
103
+ liveCalls: LiveCall[];
104
+ latestTasks: TaskItem[];
105
+ latestAppointments: AiCreatedAppointment[];
106
+ recentHistory: HistoryCall[];
107
+ }
108
+ export interface AiCreatedAppointment {
109
+ id: string;
110
+ appointmentId: string;
111
+ patientName: string;
112
+ providerName: string | null;
113
+ startTime: number;
114
+ createdAt: number;
115
+ callId: string | null;
116
+ status: string | null;
117
+ }
118
+ export type TaskStatus = 'open' | 'in_progress' | 'done';
119
+ export type TaskPriority = 'urgent' | 'normal';
120
+ export type TaskSource = 'voice' | 'sync' | 'manual';
121
+ export interface TaskItem {
122
+ id: string;
123
+ created: number;
124
+ title: string;
125
+ type: string;
126
+ description: string;
127
+ patient: string;
128
+ priority: TaskPriority;
129
+ status: TaskStatus;
130
+ source: TaskSource;
131
+ assignee: string;
132
+ callId?: string;
133
+ edvakTaskId?: string;
134
+ edvakStatus?: string;
135
+ medicationName?: string;
136
+ medicationId?: string;
137
+ }
138
+ export interface TaskFilters {
139
+ status?: TaskStatus;
140
+ type?: string;
141
+ source?: TaskSource;
142
+ callId?: string;
143
+ limit?: number;
144
+ }
145
+ export interface CreateTaskRequest {
146
+ title: string;
147
+ type: string;
148
+ callId?: string;
149
+ description?: string;
150
+ patient?: string;
151
+ priority?: TaskPriority;
152
+ assignee?: string;
153
+ }
154
+ export interface AuditEvent {
155
+ id: string;
156
+ actor: string;
157
+ action: string;
158
+ target: string;
159
+ detail: string;
160
+ at: number;
161
+ }
162
+ export interface AnalyticsKpiCard {
163
+ label: string;
164
+ value: string;
165
+ delta?: string;
166
+ tone?: string;
167
+ sub?: string;
168
+ }
169
+ export interface AnalyticsVolumePoint {
170
+ date: string;
171
+ day: string;
172
+ label: string;
173
+ count: number;
174
+ }
175
+ export interface AnalyticsVolumeSeries {
176
+ timezone: string;
177
+ startDate: string;
178
+ endDate: string;
179
+ points: AnalyticsVolumePoint[];
180
+ }
181
+ export interface AnalyticsPeakPoint {
182
+ hour: number;
183
+ label: string;
184
+ count: number;
185
+ }
186
+ export interface AnalyticsPeakSeries {
187
+ timezone: string;
188
+ points: AnalyticsPeakPoint[];
189
+ }
190
+ export interface AnalyticsData {
191
+ range: string;
192
+ kpiCards: AnalyticsKpiCard[];
193
+ volume: AnalyticsVolumeSeries;
194
+ outcomes: {
195
+ label: string;
196
+ value: number;
197
+ color: string;
198
+ }[];
199
+ reasons: {
200
+ label: string;
201
+ value: number;
202
+ }[];
203
+ transfers: {
204
+ label: string;
205
+ value: number;
206
+ }[];
207
+ peakHours: AnalyticsPeakSeries;
208
+ kpis: {
209
+ totalCalls: number;
210
+ avgDuration: number;
211
+ bookingRate: number;
212
+ transferRate: number;
213
+ };
214
+ }
215
+ export interface AgentSettings {
216
+ general: Record<string, string | boolean | number>;
217
+ phone: Record<string, string | boolean | number>;
218
+ tasks: Record<string, string | boolean | number>;
219
+ scheduling: Record<string, string | boolean | number>;
220
+ refill: Record<string, string | boolean | number>;
221
+ verify: Record<string, string | boolean | number>;
222
+ escalation: Record<string, string | boolean | number>;
223
+ outbound: Record<string, string | boolean | number>;
224
+ safety: {
225
+ id: string;
226
+ label: string;
227
+ status: 'ok' | 'warn';
228
+ }[];
229
+ transcripts: Record<string, string | boolean | number>;
230
+ advanced: Record<string, string | boolean | number>;
231
+ /** Resolved greeting spoken on inbound calls (from GET / PUT response). */
232
+ effectiveWelcomeMessage?: string;
233
+ }
234
+ export interface SetupStep {
235
+ id: number;
236
+ title: string;
237
+ description: string;
238
+ complete: boolean;
239
+ }
240
+ export interface SetupData {
241
+ readiness: number;
242
+ steps: SetupStep[];
243
+ testTranscript: TranscriptLine[];
244
+ }
245
+ export interface AiReceptionistStatus {
246
+ agentOn: boolean;
247
+ mode: 'live' | 'after-hours';
248
+ readiness: number;
249
+ }
250
+ export interface LocationOption {
251
+ id: string;
252
+ name: string;
253
+ }
254
+ export interface ProviderOption {
255
+ id: string;
256
+ name: string;
257
+ }
@@ -0,0 +1,215 @@
1
+ /** Backend DTO shapes — source of truth from node API */
2
+ export interface LiveTranscriptLineDto {
3
+ who: 'ai' | 'patient' | 'staff' | 'system';
4
+ text: string;
5
+ flag?: string;
6
+ /** Seconds from call start — enables audio-synced transcript highlighting */
7
+ at?: number;
8
+ offsetSeconds?: number;
9
+ startTime?: number;
10
+ }
11
+ export interface LiveCallToolDto {
12
+ t: string;
13
+ key?: string;
14
+ name: string;
15
+ tech: string;
16
+ result: string;
17
+ state: 'ok' | 'warn' | 'error' | 'active';
18
+ }
19
+ export interface LiveCallDto {
20
+ id: string;
21
+ name: string;
22
+ initials: string;
23
+ avatar: string | null;
24
+ phone: string;
25
+ verification: 'verified' | 'partial' | 'failed' | 'unknown';
26
+ direction: 'inbound' | 'outbound';
27
+ reason: string;
28
+ status: string;
29
+ started: number;
30
+ sentiment: string;
31
+ confidence: number;
32
+ goal: string;
33
+ dob: string | null;
34
+ location: string | null;
35
+ provider: string | null;
36
+ language: string;
37
+ matched: boolean;
38
+ assigned: string | null;
39
+ tools: LiveCallToolDto[];
40
+ transcript: LiveTranscriptLineDto[];
41
+ }
42
+ export interface HistoryCallDto {
43
+ id: string;
44
+ dir: 'inbound' | 'outbound';
45
+ name: string;
46
+ initials: string;
47
+ avatar: string | null;
48
+ phone: string;
49
+ reason: string;
50
+ outcome: string;
51
+ actions: string[];
52
+ tasks: number;
53
+ dur: string;
54
+ review: 'needs' | 'reviewed';
55
+ verify: string;
56
+ risk: 'urgent' | 'review' | null;
57
+ when: string;
58
+ /** ISO-8601 timestamp. Preferred over the legacy human-readable `when`. */
59
+ startedAt?: string;
60
+ provider: string;
61
+ location: string;
62
+ }
63
+ export interface HistoryDetailDto {
64
+ id: string;
65
+ summary: string;
66
+ collected: string[];
67
+ completed: string[];
68
+ notDone: string[];
69
+ followUp: boolean;
70
+ flags: string[];
71
+ transcript: LiveTranscriptLineDto[];
72
+ tools: LiveCallToolDto[];
73
+ }
74
+ export interface AttentionItemDto {
75
+ id: string;
76
+ name: string;
77
+ phone: string;
78
+ reason: string;
79
+ why: string;
80
+ sev: 'urgent' | 'review';
81
+ time: string;
82
+ }
83
+ export interface TaskDto {
84
+ id: string;
85
+ created: string;
86
+ title: string;
87
+ patient: string;
88
+ call: string;
89
+ type: string;
90
+ summary: string;
91
+ priority: 'urgent' | 'normal';
92
+ assignee: string;
93
+ status: 'open' | 'in-progress' | 'done';
94
+ source?: 'voice' | 'sync' | 'manual';
95
+ edvakTaskId?: string;
96
+ edvakStatus?: string;
97
+ medicationName?: string;
98
+ medicationId?: string;
99
+ }
100
+ export interface CreateTaskDto {
101
+ title: string;
102
+ type: string;
103
+ call?: string;
104
+ summary?: string;
105
+ patient?: string;
106
+ priority?: 'urgent' | 'normal';
107
+ assignee?: string;
108
+ }
109
+ export interface RegenerateSummaryResponseDto {
110
+ ok: boolean;
111
+ callId: string;
112
+ summary: string;
113
+ summaryModel?: string;
114
+ summaryGeneratedAt?: string;
115
+ transcriptTurnCount?: number;
116
+ }
117
+ export interface AuditEventDto {
118
+ ts: string;
119
+ actor: 'AI' | 'user';
120
+ actorName: string;
121
+ event: string;
122
+ cat: string;
123
+ patient: string;
124
+ call: string;
125
+ detail: string;
126
+ }
127
+ export interface DashboardSummaryDto {
128
+ liveCalls: number;
129
+ openTasks: number;
130
+ callsToday: number;
131
+ needsReview: number;
132
+ appointmentsBooked?: number;
133
+ aiHandledRate: string;
134
+ avgHandleTime: string;
135
+ }
136
+ export interface AiCreatedAppointmentDto {
137
+ id: string;
138
+ appointmentId?: string;
139
+ patientName: string;
140
+ providerName?: string | null;
141
+ startTime: string;
142
+ createdAt: string;
143
+ callId?: string | null;
144
+ status?: string | null;
145
+ }
146
+ export interface HistoryListDto {
147
+ items: HistoryCallDto[];
148
+ total: number;
149
+ page: number;
150
+ limit: number;
151
+ }
152
+ export interface AnalyticsVolumePointDto {
153
+ date: string;
154
+ day: string;
155
+ label: string;
156
+ count: number;
157
+ }
158
+ export interface AnalyticsVolumeSeriesDto {
159
+ timezone?: string;
160
+ startDate?: string;
161
+ endDate?: string;
162
+ points?: AnalyticsVolumePointDto[];
163
+ }
164
+ export interface AnalyticsPeakPointDto {
165
+ hour: number;
166
+ label: string;
167
+ count: number;
168
+ }
169
+ export interface AnalyticsPeakSeriesDto {
170
+ timezone?: string;
171
+ points?: AnalyticsPeakPointDto[];
172
+ }
173
+ export interface AnalyticsDto {
174
+ kpis: Array<{
175
+ label: string;
176
+ value: string;
177
+ delta: string;
178
+ tone: string;
179
+ sub: string;
180
+ }>;
181
+ volume: number[] | AnalyticsVolumeSeriesDto;
182
+ reasons: Array<{
183
+ label: string;
184
+ v: number;
185
+ tone: string;
186
+ }>;
187
+ outcomes: Array<{
188
+ label: string;
189
+ v: number;
190
+ tone: string;
191
+ }>;
192
+ transfers: Array<{
193
+ label: string;
194
+ v: number;
195
+ }>;
196
+ peak: number[] | AnalyticsPeakSeriesDto;
197
+ }
198
+ export interface AiStatusDto {
199
+ activated: boolean;
200
+ setupStep?: number;
201
+ agentOnline: boolean;
202
+ }
203
+ export interface SetupDto {
204
+ step: number;
205
+ setup: Record<string, unknown>;
206
+ activated: boolean;
207
+ }
208
+ export interface RecordingDto {
209
+ callId: string;
210
+ status?: 'ready' | 'pending' | 'unavailable' | 'failed';
211
+ url: string | null;
212
+ contentType?: string;
213
+ durationSeconds?: number;
214
+ message?: string;
215
+ }
@@ -0,0 +1,53 @@
1
+ export type ApiProvider = 'edvak' | 'vonage' | 'openai' | 'livekit';
2
+ export interface ApiLogListItem {
3
+ id: string;
4
+ callId: string | null;
5
+ provider: ApiProvider;
6
+ operation: string;
7
+ method: string;
8
+ urlPath: string;
9
+ statusCode: number | null;
10
+ success: boolean;
11
+ durationMs: number;
12
+ toolName: string | null;
13
+ errorMessage: string | null;
14
+ startedAt: string;
15
+ requestPreview: string;
16
+ responsePreview: string;
17
+ }
18
+ export interface ApiLogDetail extends ApiLogListItem {
19
+ traceId: string | null;
20
+ requestBody: Record<string, unknown> | null;
21
+ responseBody: Record<string, unknown> | null;
22
+ metadata: Record<string, unknown> | null;
23
+ completedAt: string | null;
24
+ }
25
+ export interface ApiLogStats {
26
+ last24h: {
27
+ total: number;
28
+ failed: number;
29
+ avgDurationMs: number;
30
+ };
31
+ byProvider: {
32
+ provider: ApiProvider;
33
+ total: number;
34
+ failed: number;
35
+ }[];
36
+ recentFailures: ApiLogListItem[];
37
+ }
38
+ export interface ApiLogListResponse {
39
+ items: ApiLogListItem[];
40
+ total: number;
41
+ }
42
+ export interface ApiLogFilters {
43
+ provider?: string;
44
+ success?: boolean;
45
+ statusCode?: number;
46
+ operation?: string;
47
+ callId?: string;
48
+ from?: string;
49
+ to?: string;
50
+ search?: string;
51
+ page?: number;
52
+ limit?: number;
53
+ }
@@ -0,0 +1,26 @@
1
+ import { ToolEvent, TranscriptLine } from './ai-receptionist.types';
2
+ /** Socket.io `new_chunk` payload from /dashboard namespace */
3
+ export interface TranscriptChunk {
4
+ role: 'user' | 'assistant';
5
+ text: string;
6
+ isFinal: boolean;
7
+ timestamp: string;
8
+ }
9
+ /** Socket.io `call_event` payload — tools + lifecycle */
10
+ export interface CallEventStreamPayload {
11
+ eventType: string;
12
+ occurredAt: string;
13
+ payload: Record<string, unknown>;
14
+ }
15
+ export interface LiveTranscriptState {
16
+ lines: TranscriptLine[];
17
+ patientInterim: string | null;
18
+ aiInterim: string | null;
19
+ connected: boolean;
20
+ error: string | null;
21
+ }
22
+ export declare function mapChunkToLine(chunk: TranscriptChunk): TranscriptLine;
23
+ export declare function formatEventTime(iso: string): string;
24
+ export declare function mapCallEventToTool(event: CallEventStreamPayload): ToolEvent;
25
+ export declare function mapLifecycleEventToTool(event: CallEventStreamPayload): ToolEvent;
26
+ export declare function isDuplicateTranscriptLine(lines: TranscriptLine[], line: TranscriptLine): boolean;