@absolutejs/voice 0.0.22-beta.500 → 0.0.22-beta.502

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.
@@ -0,0 +1,15 @@
1
+ import type { StoredVoiceTraceEvent } from "../trace";
2
+ import { type VoiceCostDashboardOptions, type VoiceCostDashboardReport } from "../client/costDashboard";
3
+ export type VoiceCostDashboardServiceOptions = VoiceCostDashboardOptions & {
4
+ currency?: string;
5
+ title?: string;
6
+ };
7
+ export declare class VoiceCostDashboardService {
8
+ build(options: VoiceCostDashboardServiceOptions): {
9
+ currency: string;
10
+ report: import("@angular/core").Signal<VoiceCostDashboardReport>;
11
+ setEvents: (next: ReadonlyArray<StoredVoiceTraceEvent>) => void;
12
+ setFilters: (next: Partial<typeof options>) => void;
13
+ title: string;
14
+ };
15
+ }
@@ -0,0 +1,16 @@
1
+ import { type CreateLiveCallViewerOptions, type LiveCallViewState, type LiveCallViewer } from "../client/liveCallViewer";
2
+ export type VoiceLiveCallViewerServiceOptions = CreateLiveCallViewerOptions & {
3
+ title?: string;
4
+ viewer?: LiveCallViewer;
5
+ };
6
+ export declare class VoiceLiveCallViewerService {
7
+ build(options: VoiceLiveCallViewerServiceOptions): {
8
+ noteAgentAudio: (at?: number) => void;
9
+ notePartial: (text: string, at?: number) => void;
10
+ noteTranscript: (text: string, at?: number) => void;
11
+ reset: (sessionId: string, startedAt?: number) => void;
12
+ state: import("@angular/core").Signal<LiveCallViewState>;
13
+ stop: () => void;
14
+ title: string;
15
+ };
16
+ }
@@ -0,0 +1,13 @@
1
+ import type { VoiceCallReviewArtifact } from "../testing/review";
2
+ import { type ReplayTimelineReport } from "../client/replayTimeline";
3
+ export type VoiceReplayTimelineServiceOptions = {
4
+ artifact: VoiceCallReviewArtifact;
5
+ title?: string;
6
+ };
7
+ export declare class VoiceReplayTimelineService {
8
+ build(options: VoiceReplayTimelineServiceOptions): {
9
+ report: import("@angular/core").Signal<ReplayTimelineReport>;
10
+ setArtifact: (next: VoiceCallReviewArtifact) => void;
11
+ title: string | undefined;
12
+ };
13
+ }
@@ -0,0 +1,80 @@
1
+ import type { StoredVoiceTraceEvent } from "../trace";
2
+ import type { VoiceCallReviewArtifact } from "../testing/review";
3
+ import { type VoiceCostDashboardBucket, type VoiceCostDashboardOptions, type VoiceCostDashboardReport } from "./costDashboard";
4
+ import { type LiveCallViewState, type LiveCallViewer } from "./liveCallViewer";
5
+ import { type ReplayTimelineReport } from "./replayTimeline";
6
+ export type VoiceDashboardHTMXAttributes = {
7
+ /** Set true to wrap the fragment in an hx-get + hx-trigger="every Ns" polling shell. */
8
+ poll?: boolean;
9
+ /** Polling cadence when poll is true. Default 5 seconds. */
10
+ pollIntervalMs?: number;
11
+ /** Route the renderer points hx-get at. Default mirrors the route the handler is mounted on. */
12
+ refreshUrl?: string;
13
+ /** hx-swap value. Default 'outerHTML'. */
14
+ swap?: string;
15
+ };
16
+ export type VoiceCostDashboardHTMXInput = {
17
+ attributes?: VoiceDashboardHTMXAttributes;
18
+ currency?: string;
19
+ emptyMessage?: string;
20
+ report: VoiceCostDashboardReport;
21
+ title?: string;
22
+ };
23
+ export type VoiceCostDashboardRenderer = (input: VoiceCostDashboardHTMXInput) => string;
24
+ export type VoiceCostDashboardCellRenderer = (bucket: VoiceCostDashboardBucket, currency: string, isTotal: boolean) => string;
25
+ export type VoiceReplayTimelineHTMXInput = {
26
+ attributes?: VoiceDashboardHTMXAttributes;
27
+ emptyMessage?: string;
28
+ report: ReplayTimelineReport;
29
+ title?: string;
30
+ };
31
+ export type VoiceReplayTimelineRenderer = (input: VoiceReplayTimelineHTMXInput) => string;
32
+ export type VoiceLiveCallViewerHTMXInput = {
33
+ attributes?: VoiceDashboardHTMXAttributes;
34
+ state: LiveCallViewState;
35
+ title?: string;
36
+ };
37
+ export type VoiceLiveCallViewerRenderer = (input: VoiceLiveCallViewerHTMXInput) => string;
38
+ export type VoiceDashboardHTMXRendererConfig = {
39
+ costDashboard?: VoiceCostDashboardRenderer;
40
+ liveCallViewer?: VoiceLiveCallViewerRenderer;
41
+ replayTimeline?: VoiceReplayTimelineRenderer;
42
+ };
43
+ export type ResolvedVoiceDashboardRenderers = Required<VoiceDashboardHTMXRendererConfig>;
44
+ export declare const resolveVoiceDashboardRenderers: (custom?: VoiceDashboardHTMXRendererConfig) => ResolvedVoiceDashboardRenderers;
45
+ export declare const renderVoiceCostDashboardHTMX: (input: VoiceCostDashboardHTMXInput & {
46
+ custom?: VoiceCostDashboardRenderer;
47
+ }) => string;
48
+ export declare const renderVoiceReplayTimelineHTMX: (input: VoiceReplayTimelineHTMXInput & {
49
+ custom?: VoiceReplayTimelineRenderer;
50
+ }) => string;
51
+ export declare const renderVoiceLiveCallViewerHTMX: (input: VoiceLiveCallViewerHTMXInput & {
52
+ custom?: VoiceLiveCallViewerRenderer;
53
+ }) => string;
54
+ export declare const renderVoiceCostDashboardFromEvents: (input: {
55
+ attributes?: VoiceDashboardHTMXAttributes;
56
+ currency?: string;
57
+ events: ReadonlyArray<StoredVoiceTraceEvent>;
58
+ options?: Omit<VoiceCostDashboardOptions, "events">;
59
+ renderer?: VoiceCostDashboardRenderer;
60
+ title?: string;
61
+ }) => string;
62
+ export declare const renderVoiceReplayTimelineFromArtifact: (input: {
63
+ artifact: VoiceCallReviewArtifact;
64
+ attributes?: VoiceDashboardHTMXAttributes;
65
+ renderer?: VoiceReplayTimelineRenderer;
66
+ title?: string;
67
+ }) => string;
68
+ export declare const renderVoiceLiveCallViewerFromViewer: (input: {
69
+ attributes?: VoiceDashboardHTMXAttributes;
70
+ renderer?: VoiceLiveCallViewerRenderer;
71
+ title?: string;
72
+ viewer: LiveCallViewer;
73
+ }) => string;
74
+ export declare const renderVoiceLiveCallViewerFromState: (input: {
75
+ attributes?: VoiceDashboardHTMXAttributes;
76
+ renderer?: VoiceLiveCallViewerRenderer;
77
+ state: LiveCallViewState;
78
+ title?: string;
79
+ }) => string;
80
+ export declare const createLiveCallViewerFromOptions: (options: import("./liveCallViewer").CreateLiveCallViewerOptions) => LiveCallViewer;
@@ -0,0 +1,249 @@
1
+ import { Elysia } from "elysia";
2
+ import type { StoredVoiceTraceEvent, VoiceTraceEventStore } from "./trace";
3
+ import type { StoredVoiceCallReviewArtifact, VoiceCallReviewStore } from "./testing/review";
4
+ import type { LiveCallViewer } from "./client/liveCallViewer";
5
+ import { type VoiceDashboardHTMXRendererConfig } from "./client/htmxDashboardRenderers";
6
+ import type { VoiceCostDashboardOptions } from "./client/costDashboard";
7
+ export type VoiceHTMXDashboardRoutesShared = {
8
+ name?: string;
9
+ render?: VoiceDashboardHTMXRendererConfig;
10
+ };
11
+ export type VoiceHTMXCostDashboardRoutesOptions = VoiceHTMXDashboardRoutesShared & {
12
+ bucketBy?: VoiceCostDashboardOptions["bucketBy"];
13
+ currency?: string;
14
+ fromMs?: () => number | undefined;
15
+ path?: string;
16
+ pollIntervalMs?: number;
17
+ resolveEvents: () => Promise<ReadonlyArray<StoredVoiceTraceEvent>> | ReadonlyArray<StoredVoiceTraceEvent>;
18
+ title?: string;
19
+ toMs?: () => number | undefined;
20
+ };
21
+ export declare const createVoiceCostDashboardHTMXRoute: (options: VoiceHTMXCostDashboardRoutesOptions) => Elysia<"", {
22
+ decorator: {};
23
+ store: {};
24
+ derive: {};
25
+ resolve: {};
26
+ }, {
27
+ typebox: {};
28
+ error: {};
29
+ }, {
30
+ schema: {};
31
+ standaloneSchema: {};
32
+ macro: {};
33
+ macroFn: {};
34
+ parser: {};
35
+ response: {};
36
+ }, {
37
+ [x: string]: {
38
+ get: {
39
+ body: unknown;
40
+ params: {};
41
+ query: unknown;
42
+ headers: unknown;
43
+ response: {
44
+ 200: Response;
45
+ };
46
+ };
47
+ };
48
+ }, {
49
+ derive: {};
50
+ resolve: {};
51
+ schema: {};
52
+ standaloneSchema: {};
53
+ response: {};
54
+ }, {
55
+ derive: {};
56
+ resolve: {};
57
+ schema: {};
58
+ standaloneSchema: {};
59
+ response: {};
60
+ }>;
61
+ export type VoiceHTMXReplayTimelineRoutesOptions = VoiceHTMXDashboardRoutesShared & {
62
+ /** The HTML route mounts at `${path}/:artifactId`. */
63
+ path?: string;
64
+ resolveArtifact: (artifactId: string) => Promise<StoredVoiceCallReviewArtifact | undefined> | StoredVoiceCallReviewArtifact | undefined;
65
+ title?: string;
66
+ };
67
+ export declare const createVoiceReplayTimelineHTMXRoute: (options: VoiceHTMXReplayTimelineRoutesOptions) => Elysia<"", {
68
+ decorator: {};
69
+ store: {};
70
+ derive: {};
71
+ resolve: {};
72
+ }, {
73
+ typebox: {};
74
+ error: {};
75
+ }, {
76
+ schema: {};
77
+ standaloneSchema: {};
78
+ macro: {};
79
+ macroFn: {};
80
+ parser: {};
81
+ response: {};
82
+ }, {
83
+ [x: string]: {
84
+ ":artifactId": {
85
+ get: {
86
+ body: unknown;
87
+ params: {
88
+ artifactId: string;
89
+ } & {};
90
+ query: unknown;
91
+ headers: unknown;
92
+ response: {
93
+ 200: Response;
94
+ 422: {
95
+ type: "validation";
96
+ on: string;
97
+ summary?: string;
98
+ message?: string;
99
+ found?: unknown;
100
+ property?: string;
101
+ expected?: string;
102
+ };
103
+ };
104
+ };
105
+ };
106
+ };
107
+ }, {
108
+ derive: {};
109
+ resolve: {};
110
+ schema: {};
111
+ standaloneSchema: {};
112
+ response: {};
113
+ }, {
114
+ derive: {};
115
+ resolve: {};
116
+ schema: {};
117
+ standaloneSchema: {};
118
+ response: {};
119
+ }>;
120
+ export type VoiceHTMXLiveCallViewerRoutesOptions = VoiceHTMXDashboardRoutesShared & {
121
+ /** Route mounts at `${path}/:sessionId`. */
122
+ path?: string;
123
+ pollIntervalMs?: number;
124
+ resolveViewer: (sessionId: string) => Promise<LiveCallViewer | undefined> | LiveCallViewer | undefined;
125
+ title?: string;
126
+ };
127
+ export declare const createVoiceLiveCallViewerHTMXRoute: (options: VoiceHTMXLiveCallViewerRoutesOptions) => Elysia<"", {
128
+ decorator: {};
129
+ store: {};
130
+ derive: {};
131
+ resolve: {};
132
+ }, {
133
+ typebox: {};
134
+ error: {};
135
+ }, {
136
+ schema: {};
137
+ standaloneSchema: {};
138
+ macro: {};
139
+ macroFn: {};
140
+ parser: {};
141
+ response: {};
142
+ }, {
143
+ [x: string]: {
144
+ ":sessionId": {
145
+ get: {
146
+ body: unknown;
147
+ params: {
148
+ sessionId: string;
149
+ } & {};
150
+ query: unknown;
151
+ headers: unknown;
152
+ response: {
153
+ 200: Response;
154
+ 422: {
155
+ type: "validation";
156
+ on: string;
157
+ summary?: string;
158
+ message?: string;
159
+ found?: unknown;
160
+ property?: string;
161
+ expected?: string;
162
+ };
163
+ };
164
+ };
165
+ };
166
+ };
167
+ }, {
168
+ derive: {};
169
+ resolve: {};
170
+ schema: {};
171
+ standaloneSchema: {};
172
+ response: {};
173
+ }, {
174
+ derive: {};
175
+ resolve: {};
176
+ schema: {};
177
+ standaloneSchema: {};
178
+ response: {};
179
+ }>;
180
+ export type VoiceHTMXDashboardRoutesOptions = {
181
+ cost?: Omit<VoiceHTMXCostDashboardRoutesOptions, keyof VoiceHTMXDashboardRoutesShared>;
182
+ liveCall?: Omit<VoiceHTMXLiveCallViewerRoutesOptions, keyof VoiceHTMXDashboardRoutesShared>;
183
+ name?: string;
184
+ render?: VoiceDashboardHTMXRendererConfig;
185
+ replay?: Omit<VoiceHTMXReplayTimelineRoutesOptions, keyof VoiceHTMXDashboardRoutesShared>;
186
+ };
187
+ export declare const createVoiceHTMXDashboardRoutes: (options: VoiceHTMXDashboardRoutesOptions) => Elysia<"", {
188
+ decorator: {};
189
+ store: {};
190
+ derive: {};
191
+ resolve: {};
192
+ }, {
193
+ typebox: {};
194
+ error: {};
195
+ }, {
196
+ schema: {};
197
+ standaloneSchema: {};
198
+ macro: {};
199
+ macroFn: {};
200
+ parser: {};
201
+ response: {};
202
+ }, {}, {
203
+ derive: {};
204
+ resolve: {};
205
+ schema: {};
206
+ standaloneSchema: {};
207
+ response: {};
208
+ }, {
209
+ derive: {};
210
+ resolve: {};
211
+ schema: {};
212
+ standaloneSchema: {};
213
+ response: {};
214
+ }>;
215
+ export type CreateVoiceHTMXDashboardRoutesFromStoresOptions = {
216
+ liveViewerByCallId?: (sessionId: string) => Promise<LiveCallViewer | undefined> | LiveCallViewer | undefined;
217
+ pollIntervalMs?: number;
218
+ render?: VoiceDashboardHTMXRendererConfig;
219
+ reviewStore?: VoiceCallReviewStore;
220
+ traceStore?: VoiceTraceEventStore;
221
+ };
222
+ export declare const createVoiceHTMXDashboardRoutesFromStores: (options: CreateVoiceHTMXDashboardRoutesFromStoresOptions) => Elysia<"", {
223
+ decorator: {};
224
+ store: {};
225
+ derive: {};
226
+ resolve: {};
227
+ }, {
228
+ typebox: {};
229
+ error: {};
230
+ }, {
231
+ schema: {};
232
+ standaloneSchema: {};
233
+ macro: {};
234
+ macroFn: {};
235
+ parser: {};
236
+ response: {};
237
+ }, {}, {
238
+ derive: {};
239
+ resolve: {};
240
+ schema: {};
241
+ standaloneSchema: {};
242
+ response: {};
243
+ }, {
244
+ derive: {};
245
+ resolve: {};
246
+ schema: {};
247
+ standaloneSchema: {};
248
+ response: {};
249
+ }>;
@@ -0,0 +1,13 @@
1
+ import { type VoiceCostDashboardOptions, type VoiceCostDashboardReport } from "../client/costDashboard";
2
+ export type CreateVoiceCostDashboardOptions = VoiceCostDashboardOptions & {
3
+ currency?: string;
4
+ title?: string;
5
+ };
6
+ export declare const renderVoiceCostDashboardHTML: (report: VoiceCostDashboardReport, options?: {
7
+ currency?: string;
8
+ title?: string;
9
+ }) => string;
10
+ export declare const createVoiceCostDashboard: (options: CreateVoiceCostDashboardOptions) => {
11
+ getHTML: () => string;
12
+ getReport: () => VoiceCostDashboardReport;
13
+ };
@@ -0,0 +1,26 @@
1
+ import { type CreateLiveCallViewerOptions, type LiveCallViewState } from "../client/liveCallViewer";
2
+ export declare const renderVoiceLiveCallViewerHTML: (state: LiveCallViewState, options?: {
3
+ title?: string;
4
+ }) => string;
5
+ export type CreateVoiceLiveCallViewerSvelteOptions = CreateLiveCallViewerOptions & {
6
+ title?: string;
7
+ };
8
+ export declare const createVoiceLiveCallViewer: (options: CreateVoiceLiveCallViewerSvelteOptions) => {
9
+ getHTML: () => string;
10
+ title: string | undefined;
11
+ applyControl: (control: {
12
+ reason?: string;
13
+ type: string;
14
+ }) => void;
15
+ applyEvent: (event: import("..").LiveCallTimelineEvent) => void;
16
+ applyMonitorEvent: (event: {
17
+ payload: Record<string, unknown>;
18
+ type: string;
19
+ }) => void;
20
+ getState: () => LiveCallViewState;
21
+ noteAgentAudio: (at?: number) => void;
22
+ notePartial: (text: string, at?: number) => void;
23
+ noteTranscript: (text: string, at?: number) => void;
24
+ reset: (sessionId: string, startedAt?: number) => void;
25
+ subscribe: (subscriber: () => void) => () => void;
26
+ };
@@ -0,0 +1,13 @@
1
+ import type { VoiceCallReviewArtifact } from "../testing/review";
2
+ import { type ReplayTimelineReport } from "../client/replayTimeline";
3
+ export declare const renderVoiceReplayTimelineHTML: (report: ReplayTimelineReport, options?: {
4
+ title?: string;
5
+ }) => string;
6
+ export type CreateVoiceReplayTimelineOptions = {
7
+ artifact: VoiceCallReviewArtifact;
8
+ title?: string;
9
+ };
10
+ export declare const createVoiceReplayTimeline: (options: CreateVoiceReplayTimelineOptions) => {
11
+ getHTML: () => string;
12
+ getReport: () => ReplayTimelineReport;
13
+ };
@@ -1,6 +1,12 @@
1
1
  export { createVoiceCampaignDialerProof } from "./createVoiceCampaignDialerProof";
2
2
  export { createVoiceWidget } from "./createVoiceWidget";
3
3
  export type { CreateVoiceWidgetOptions, VoiceWidgetLabels, VoiceWidgetTheme, VoiceWidgetViewModel, } from "./createVoiceWidget";
4
+ export { createVoiceCostDashboard, renderVoiceCostDashboardHTML, } from "./createVoiceCostDashboard";
5
+ export type { CreateVoiceCostDashboardOptions } from "./createVoiceCostDashboard";
6
+ export { createVoiceLiveCallViewer, renderVoiceLiveCallViewerHTML, } from "./createVoiceLiveCallViewer";
7
+ export type { CreateVoiceLiveCallViewerSvelteOptions } from "./createVoiceLiveCallViewer";
8
+ export { createVoiceReplayTimeline, renderVoiceReplayTimelineHTML, } from "./createVoiceReplayTimeline";
9
+ export type { CreateVoiceReplayTimelineOptions } from "./createVoiceReplayTimeline";
4
10
  export { createVoiceDeliveryRuntime } from "./createVoiceDeliveryRuntime";
5
11
  export { createVoiceOpsActionCenter } from "./createVoiceOpsActionCenter";
6
12
  export { createVoiceLiveOps } from "./createVoiceLiveOps";