@absolutejs/voice 0.0.22-beta.86 → 0.0.22-beta.88
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.
- package/dist/appKit.d.ts +3 -1
- package/dist/client/opsStatusWidget.d.ts +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +567 -259
- package/dist/productionReadiness.d.ts +103 -0
- package/dist/resilienceRoutes.d.ts +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type VoiceTelephonyCarrierMatrixInput } from './telephony/matrix';
|
|
3
|
+
import type { VoiceTraceEventStore } from './trace';
|
|
4
|
+
export type VoiceProductionReadinessStatus = 'fail' | 'pass' | 'warn';
|
|
5
|
+
export type VoiceProductionReadinessCheck = {
|
|
6
|
+
detail?: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
label: string;
|
|
9
|
+
status: VoiceProductionReadinessStatus;
|
|
10
|
+
value?: number | string;
|
|
11
|
+
};
|
|
12
|
+
export type VoiceProductionReadinessReport = {
|
|
13
|
+
checkedAt: number;
|
|
14
|
+
checks: VoiceProductionReadinessCheck[];
|
|
15
|
+
links: {
|
|
16
|
+
carriers?: string;
|
|
17
|
+
handoffs?: string;
|
|
18
|
+
quality?: string;
|
|
19
|
+
resilience?: string;
|
|
20
|
+
sessions?: string;
|
|
21
|
+
};
|
|
22
|
+
status: VoiceProductionReadinessStatus;
|
|
23
|
+
summary: {
|
|
24
|
+
carriers?: {
|
|
25
|
+
failing: number;
|
|
26
|
+
providers: number;
|
|
27
|
+
ready: number;
|
|
28
|
+
status: VoiceProductionReadinessStatus;
|
|
29
|
+
warnings: number;
|
|
30
|
+
};
|
|
31
|
+
handoffs: {
|
|
32
|
+
failed: number;
|
|
33
|
+
total: number;
|
|
34
|
+
};
|
|
35
|
+
providers: {
|
|
36
|
+
degraded: number;
|
|
37
|
+
total: number;
|
|
38
|
+
};
|
|
39
|
+
quality: {
|
|
40
|
+
status: 'fail' | 'pass';
|
|
41
|
+
};
|
|
42
|
+
routing: {
|
|
43
|
+
events: number;
|
|
44
|
+
sessions: number;
|
|
45
|
+
};
|
|
46
|
+
sessions: {
|
|
47
|
+
failed: number;
|
|
48
|
+
total: number;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export type VoiceProductionReadinessRoutesOptions = {
|
|
53
|
+
carriers?: false | readonly VoiceTelephonyCarrierMatrixInput[] | ((input: {
|
|
54
|
+
query: Record<string, unknown>;
|
|
55
|
+
request: Request;
|
|
56
|
+
}) => Promise<readonly VoiceTelephonyCarrierMatrixInput[]> | readonly VoiceTelephonyCarrierMatrixInput[]);
|
|
57
|
+
headers?: HeadersInit;
|
|
58
|
+
htmlPath?: false | string;
|
|
59
|
+
links?: VoiceProductionReadinessReport['links'];
|
|
60
|
+
llmProviders?: readonly string[];
|
|
61
|
+
name?: string;
|
|
62
|
+
path?: string;
|
|
63
|
+
render?: (report: VoiceProductionReadinessReport) => string | Promise<string>;
|
|
64
|
+
store: VoiceTraceEventStore;
|
|
65
|
+
sttProviders?: readonly string[];
|
|
66
|
+
title?: string;
|
|
67
|
+
ttsProviders?: readonly string[];
|
|
68
|
+
};
|
|
69
|
+
export declare const buildVoiceProductionReadinessReport: (options: VoiceProductionReadinessRoutesOptions, input?: {
|
|
70
|
+
query?: Record<string, unknown>;
|
|
71
|
+
request?: Request;
|
|
72
|
+
}) => Promise<VoiceProductionReadinessReport>;
|
|
73
|
+
export declare const renderVoiceProductionReadinessHTML: (report: VoiceProductionReadinessReport, options?: {
|
|
74
|
+
title?: string;
|
|
75
|
+
}) => string;
|
|
76
|
+
export declare const createVoiceProductionReadinessRoutes: (options: VoiceProductionReadinessRoutesOptions) => Elysia<"", {
|
|
77
|
+
decorator: {};
|
|
78
|
+
store: {};
|
|
79
|
+
derive: {};
|
|
80
|
+
resolve: {};
|
|
81
|
+
}, {
|
|
82
|
+
typebox: {};
|
|
83
|
+
error: {};
|
|
84
|
+
}, {
|
|
85
|
+
schema: {};
|
|
86
|
+
standaloneSchema: {};
|
|
87
|
+
macro: {};
|
|
88
|
+
macroFn: {};
|
|
89
|
+
parser: {};
|
|
90
|
+
response: {};
|
|
91
|
+
}, {}, {
|
|
92
|
+
derive: {};
|
|
93
|
+
resolve: {};
|
|
94
|
+
schema: {};
|
|
95
|
+
standaloneSchema: {};
|
|
96
|
+
response: {};
|
|
97
|
+
}, {
|
|
98
|
+
derive: {};
|
|
99
|
+
resolve: {};
|
|
100
|
+
schema: {};
|
|
101
|
+
standaloneSchema: {};
|
|
102
|
+
response: {};
|
|
103
|
+
}>;
|
|
@@ -28,6 +28,29 @@ export type VoiceRoutingDecisionSummaryOptions = {
|
|
|
28
28
|
sessionId?: string;
|
|
29
29
|
store: VoiceTraceEventStore;
|
|
30
30
|
};
|
|
31
|
+
export type VoiceRoutingKindSummary = {
|
|
32
|
+
errorCount: number;
|
|
33
|
+
fallbackCount: number;
|
|
34
|
+
latest?: VoiceRoutingEvent;
|
|
35
|
+
providers: string[];
|
|
36
|
+
runCount: number;
|
|
37
|
+
timeoutCount: number;
|
|
38
|
+
};
|
|
39
|
+
export type VoiceRoutingSessionSummary = {
|
|
40
|
+
errorCount: number;
|
|
41
|
+
eventCount: number;
|
|
42
|
+
fallbackCount: number;
|
|
43
|
+
kinds: Record<VoiceRoutingEventKind, VoiceRoutingKindSummary>;
|
|
44
|
+
lastEventAt: number;
|
|
45
|
+
sessionId: string;
|
|
46
|
+
startedAt: number;
|
|
47
|
+
status: 'healthy' | 'fallback' | 'degraded';
|
|
48
|
+
timeoutCount: number;
|
|
49
|
+
};
|
|
50
|
+
export type VoiceRoutingSessionSummaryOptions = {
|
|
51
|
+
limit?: number;
|
|
52
|
+
sessionId?: string;
|
|
53
|
+
};
|
|
31
54
|
export type VoiceResilienceLink = {
|
|
32
55
|
href: string;
|
|
33
56
|
label: string;
|
|
@@ -51,6 +74,7 @@ export type VoiceResiliencePageData = {
|
|
|
51
74
|
links?: readonly VoiceResilienceLink[];
|
|
52
75
|
llmProviderHealth: VoiceProviderHealthSummary<string>[];
|
|
53
76
|
routingEvents: VoiceRoutingEvent[];
|
|
77
|
+
routingSessions: VoiceRoutingSessionSummary[];
|
|
54
78
|
sttProviderHealth: VoiceProviderHealthSummary<string>[];
|
|
55
79
|
sttSimulation?: VoiceResilienceIOSimulator<string>;
|
|
56
80
|
title?: string;
|
|
@@ -73,6 +97,7 @@ export type VoiceResilienceRoutesOptions = {
|
|
|
73
97
|
};
|
|
74
98
|
export declare const listVoiceRoutingEvents: (events: StoredVoiceTraceEvent[]) => VoiceRoutingEvent[];
|
|
75
99
|
export declare const summarizeVoiceRoutingDecision: (events: StoredVoiceTraceEvent[], options?: Omit<VoiceRoutingDecisionSummaryOptions, "store">) => VoiceRoutingDecisionSummary | null;
|
|
100
|
+
export declare const summarizeVoiceRoutingSessions: (events: StoredVoiceTraceEvent[] | VoiceRoutingEvent[], options?: VoiceRoutingSessionSummaryOptions) => VoiceRoutingSessionSummary[];
|
|
76
101
|
export declare const createVoiceRoutingDecisionSummary: (options: VoiceRoutingDecisionSummaryOptions) => Promise<VoiceRoutingDecisionSummary | null>;
|
|
77
102
|
export declare const renderVoiceResilienceHTML: (input: VoiceResiliencePageData) => string;
|
|
78
103
|
export declare const createVoiceResilienceRoutes: (options: VoiceResilienceRoutesOptions) => Elysia<"", {
|