@absolutejs/voice 0.0.22-beta.194 → 0.0.22-beta.196

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,136 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type VoiceAuditSinkDeliveryQueueSummary, type VoiceAuditSinkDeliveryStore } from './auditSinks';
3
+ import { type VoiceLatencySLOGateOptions, type VoiceLatencySLOGateReport } from './latencySlo';
4
+ import { type VoiceHandoffDeliveryQueueSummary, type VoiceTraceSinkDeliveryQueueSummary } from './queue';
5
+ import { type VoiceProviderHealthSummary } from './providerHealth';
6
+ import type { VoiceProductionReadinessCheck } from './productionReadiness';
7
+ import type { VoiceHandoffDeliveryStore } from './types';
8
+ import type { StoredVoiceTraceEvent, VoiceTraceEventStore, VoiceTraceSinkDeliveryStore } from './trace';
9
+ export type VoiceOpsRecoveryStatus = 'fail' | 'pass' | 'warn';
10
+ export type VoiceOpsRecoveryIssueCode = 'voice.ops_recovery.audit_delivery_failed' | 'voice.ops_recovery.audit_delivery_pending' | 'voice.ops_recovery.handoff_failed' | 'voice.ops_recovery.handoff_pending' | 'voice.ops_recovery.latency_slo_failed' | 'voice.ops_recovery.latency_slo_warn' | 'voice.ops_recovery.provider_unresolved_failure' | 'voice.ops_recovery.trace_delivery_failed' | 'voice.ops_recovery.trace_delivery_pending';
11
+ export type VoiceOpsRecoveryIssue = {
12
+ code: VoiceOpsRecoveryIssueCode;
13
+ detail?: string;
14
+ href?: string;
15
+ label: string;
16
+ severity: Exclude<VoiceOpsRecoveryStatus, 'pass'>;
17
+ value?: number | string;
18
+ };
19
+ export type VoiceOpsRecoveryProviderSummary<TProvider extends string = string> = {
20
+ healthy: number;
21
+ providers: VoiceProviderHealthSummary<TProvider>[];
22
+ recoveredFallbacks: number;
23
+ unresolvedFailures: number;
24
+ };
25
+ export type VoiceOpsRecoveryInterventionSummary = {
26
+ events: Array<{
27
+ action?: string;
28
+ at: number;
29
+ operatorId?: string;
30
+ sessionId: string;
31
+ traceId?: string;
32
+ }>;
33
+ total: number;
34
+ };
35
+ export type VoiceOpsRecoveryFailedSession = {
36
+ at: number;
37
+ error?: string;
38
+ provider?: string;
39
+ sessionId: string;
40
+ traceId?: string;
41
+ };
42
+ export type VoiceOpsRecoveryReport<TProvider extends string = string> = {
43
+ auditDeliveries?: VoiceAuditSinkDeliveryQueueSummary;
44
+ checkedAt: number;
45
+ failedSessions: VoiceOpsRecoveryFailedSession[];
46
+ handoffDeliveries?: VoiceHandoffDeliveryQueueSummary;
47
+ interventions: VoiceOpsRecoveryInterventionSummary;
48
+ issues: VoiceOpsRecoveryIssue[];
49
+ latency?: VoiceLatencySLOGateReport;
50
+ providers: VoiceOpsRecoveryProviderSummary<TProvider>;
51
+ status: VoiceOpsRecoveryStatus;
52
+ traceDeliveries?: VoiceTraceSinkDeliveryQueueSummary;
53
+ };
54
+ export type VoiceOpsRecoveryLinks = {
55
+ auditDeliveries?: string;
56
+ handoffs?: string;
57
+ operationsRecords?: string | ((sessionId: string) => string);
58
+ providers?: string;
59
+ sessions?: string | ((sessionId: string) => string);
60
+ traceDeliveries?: string;
61
+ traces?: string | ((sessionId: string) => string);
62
+ };
63
+ export type VoiceOpsRecoveryReportOptions<TProvider extends string = string> = {
64
+ auditDeliveryDeadLetters?: VoiceAuditSinkDeliveryStore;
65
+ auditDeliveries?: VoiceAuditSinkDeliveryStore;
66
+ events?: StoredVoiceTraceEvent[];
67
+ handoffDeliveryDeadLetters?: VoiceHandoffDeliveryStore;
68
+ handoffDeliveries?: VoiceHandoffDeliveryStore;
69
+ latency?: VoiceLatencySLOGateOptions | false;
70
+ limit?: number;
71
+ links?: VoiceOpsRecoveryLinks;
72
+ providers?: readonly TProvider[];
73
+ traceDeliveryDeadLetters?: VoiceTraceSinkDeliveryStore;
74
+ traceDeliveries?: VoiceTraceSinkDeliveryStore;
75
+ traces?: VoiceTraceEventStore;
76
+ };
77
+ export type VoiceOpsRecoveryRoutesOptions<TProvider extends string = string> = VoiceOpsRecoveryReportOptions<TProvider> & {
78
+ headers?: HeadersInit;
79
+ htmlPath?: false | string;
80
+ markdownPath?: false | string;
81
+ name?: string;
82
+ path?: string;
83
+ render?: (report: VoiceOpsRecoveryReport<TProvider>) => string | Promise<string>;
84
+ title?: string;
85
+ };
86
+ export declare const buildVoiceOpsRecoveryReport: <TProvider extends string = string>(options?: VoiceOpsRecoveryReportOptions<TProvider>) => Promise<VoiceOpsRecoveryReport<TProvider>>;
87
+ export declare const buildVoiceOpsRecoveryReadinessCheck: (report: VoiceOpsRecoveryReport, options?: {
88
+ href?: string;
89
+ label?: string;
90
+ }) => VoiceProductionReadinessCheck;
91
+ export declare const renderVoiceOpsRecoveryMarkdown: (report: VoiceOpsRecoveryReport, options?: {
92
+ title?: string;
93
+ }) => string;
94
+ export declare const renderVoiceOpsRecoveryHTML: (report: VoiceOpsRecoveryReport, options?: {
95
+ title?: string;
96
+ }) => string;
97
+ export declare const createVoiceOpsRecoveryRoutes: <TProvider extends string = string>(options?: VoiceOpsRecoveryRoutesOptions<TProvider>) => Elysia<"", {
98
+ decorator: {};
99
+ store: {};
100
+ derive: {};
101
+ resolve: {};
102
+ }, {
103
+ typebox: {};
104
+ error: {};
105
+ }, {
106
+ schema: {};
107
+ standaloneSchema: {};
108
+ macro: {};
109
+ macroFn: {};
110
+ parser: {};
111
+ response: {};
112
+ }, {
113
+ [x: string]: {
114
+ get: {
115
+ body: unknown;
116
+ params: {};
117
+ query: unknown;
118
+ headers: unknown;
119
+ response: {
120
+ 200: VoiceOpsRecoveryReport<TProvider>;
121
+ };
122
+ };
123
+ };
124
+ }, {
125
+ derive: {};
126
+ resolve: {};
127
+ schema: {};
128
+ standaloneSchema: {};
129
+ response: {};
130
+ }, {
131
+ derive: {};
132
+ resolve: {};
133
+ schema: {};
134
+ standaloneSchema: {};
135
+ response: {};
136
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.194",
3
+ "version": "0.0.22-beta.196",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",