@absolutejs/voice 0.0.22-beta.155 → 0.0.22-beta.157
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/README.md +2 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.js +195 -86
- package/dist/client/opsActionHistory.d.ts +19 -0
- package/dist/client/opsActionHistoryWidget.d.ts +11 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +292 -202
- package/dist/opsActionAuditRoutes.d.ts +23 -3
- package/dist/productionReadiness.d.ts +15 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
|
-
import { type VoiceAuditEventStore } from './audit';
|
|
2
|
+
import { type StoredVoiceAuditEvent, type VoiceAuditEventStore } from './audit';
|
|
3
3
|
import { type VoiceTraceEventStore } from './trace';
|
|
4
4
|
export type VoiceOpsActionAuditRecord = {
|
|
5
5
|
actionId: string;
|
|
@@ -11,12 +11,30 @@ export type VoiceOpsActionAuditRecord = {
|
|
|
11
11
|
};
|
|
12
12
|
export type VoiceOpsActionAuditRoutesOptions = {
|
|
13
13
|
audit?: VoiceAuditEventStore;
|
|
14
|
+
historyHtmlPath?: false | string;
|
|
15
|
+
historyPath?: false | string;
|
|
14
16
|
name?: string;
|
|
15
17
|
path?: string;
|
|
16
18
|
trace?: VoiceTraceEventStore;
|
|
17
19
|
};
|
|
20
|
+
export type VoiceOpsActionHistoryEntry = {
|
|
21
|
+
actionId: string;
|
|
22
|
+
at: number;
|
|
23
|
+
error?: string;
|
|
24
|
+
eventId: string;
|
|
25
|
+
ok: boolean;
|
|
26
|
+
status?: number;
|
|
27
|
+
traceId?: string;
|
|
28
|
+
};
|
|
29
|
+
export type VoiceOpsActionHistoryReport = {
|
|
30
|
+
checkedAt: number;
|
|
31
|
+
entries: VoiceOpsActionHistoryEntry[];
|
|
32
|
+
failed: number;
|
|
33
|
+
passed: number;
|
|
34
|
+
total: number;
|
|
35
|
+
};
|
|
18
36
|
export declare const recordVoiceOpsActionAudit: (record: VoiceOpsActionAuditRecord, options: Pick<VoiceOpsActionAuditRoutesOptions, "audit" | "trace">) => Promise<{
|
|
19
|
-
audit:
|
|
37
|
+
audit: StoredVoiceAuditEvent<Record<string, unknown>> | (Omit<import("./audit").VoiceAuditEvent<Record<string, unknown>>, "at" | "id"> & {
|
|
20
38
|
at: number;
|
|
21
39
|
id: string;
|
|
22
40
|
}) | undefined;
|
|
@@ -49,7 +67,7 @@ export declare const createVoiceOpsActionAuditRoutes: (options: VoiceOpsActionAu
|
|
|
49
67
|
headers: unknown;
|
|
50
68
|
response: {
|
|
51
69
|
200: {
|
|
52
|
-
audit:
|
|
70
|
+
audit: StoredVoiceAuditEvent<Record<string, unknown>> | (Omit<import("./audit").VoiceAuditEvent<Record<string, unknown>>, "at" | "id"> & {
|
|
53
71
|
at: number;
|
|
54
72
|
id: string;
|
|
55
73
|
}) | undefined;
|
|
@@ -77,3 +95,5 @@ export declare const createVoiceOpsActionAuditRoutes: (options: VoiceOpsActionAu
|
|
|
77
95
|
standaloneSchema: {};
|
|
78
96
|
response: {};
|
|
79
97
|
}>;
|
|
98
|
+
export declare const buildVoiceOpsActionHistoryReport: (options: Pick<VoiceOpsActionAuditRoutesOptions, "audit">) => Promise<VoiceOpsActionHistoryReport>;
|
|
99
|
+
export declare const renderVoiceOpsActionHistoryHTML: (report: VoiceOpsActionHistoryReport) => string;
|
|
@@ -47,6 +47,7 @@ export type VoiceProductionReadinessReport = {
|
|
|
47
47
|
handoffs?: string;
|
|
48
48
|
handoffRetry?: string;
|
|
49
49
|
liveLatency?: string;
|
|
50
|
+
opsActions?: string;
|
|
50
51
|
phoneAgentSmoke?: string;
|
|
51
52
|
providerRoutingContracts?: string;
|
|
52
53
|
quality?: string;
|
|
@@ -92,6 +93,7 @@ export type VoiceProductionReadinessReport = {
|
|
|
92
93
|
total: number;
|
|
93
94
|
warnings: number;
|
|
94
95
|
};
|
|
96
|
+
opsActionHistory?: VoiceProductionReadinessOpsActionHistorySummary;
|
|
95
97
|
providers: {
|
|
96
98
|
degraded: number;
|
|
97
99
|
total: number;
|
|
@@ -171,6 +173,13 @@ export type VoiceProductionReadinessTraceDeliverySummary = {
|
|
|
171
173
|
total: number;
|
|
172
174
|
warnPendingAfterMs: number;
|
|
173
175
|
};
|
|
176
|
+
export type VoiceProductionReadinessOpsActionHistorySummary = {
|
|
177
|
+
failed: number;
|
|
178
|
+
passed: number;
|
|
179
|
+
status: VoiceProductionReadinessStatus;
|
|
180
|
+
total: number;
|
|
181
|
+
warnWhenEmpty: boolean;
|
|
182
|
+
};
|
|
174
183
|
export type VoiceProductionReadinessDeliveryRuntimeSummary = {
|
|
175
184
|
audit?: VoiceProductionReadinessDeliveryRuntimeQueueSummary;
|
|
176
185
|
deadLettered: number;
|
|
@@ -208,6 +217,11 @@ export type VoiceProductionReadinessTraceDeliveryOptions = VoiceTraceSinkDeliver
|
|
|
208
217
|
store: VoiceTraceSinkDeliveryStore;
|
|
209
218
|
warnPendingAfterMs?: number;
|
|
210
219
|
};
|
|
220
|
+
export type VoiceProductionReadinessOpsActionHistoryOptions = VoiceAuditEventStore | {
|
|
221
|
+
failOnFailedActions?: boolean;
|
|
222
|
+
store: VoiceAuditEventStore;
|
|
223
|
+
warnWhenEmpty?: boolean;
|
|
224
|
+
};
|
|
211
225
|
export type VoiceProductionReadinessRoutesOptions = {
|
|
212
226
|
agentSquadContracts?: false | readonly VoiceAgentSquadContractReport[] | ((input: {
|
|
213
227
|
query: Record<string, unknown>;
|
|
@@ -232,6 +246,7 @@ export type VoiceProductionReadinessRoutesOptions = {
|
|
|
232
246
|
links?: VoiceProductionReadinessReport['links'];
|
|
233
247
|
llmProviders?: readonly string[];
|
|
234
248
|
name?: string;
|
|
249
|
+
opsActionHistory?: false | VoiceProductionReadinessOpsActionHistoryOptions;
|
|
235
250
|
path?: string;
|
|
236
251
|
phoneAgentSmokes?: false | readonly VoicePhoneAgentProductionSmokeReport[] | ((input: {
|
|
237
252
|
query: Record<string, unknown>;
|