@absolutejs/voice 0.0.22-beta.13 → 0.0.22-beta.130
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 +779 -5
- package/dist/agent.d.ts +24 -0
- package/dist/agentSquadContract.d.ts +64 -0
- package/dist/angular/index.d.ts +9 -0
- package/dist/angular/index.js +1394 -46
- package/dist/angular/voice-campaign-dialer-proof.service.d.ts +14 -0
- package/dist/angular/voice-controller.service.d.ts +1 -0
- package/dist/angular/voice-ops-status.component.d.ts +15 -0
- package/dist/angular/voice-ops-status.service.d.ts +12 -0
- package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
- package/dist/angular/voice-provider-status.service.d.ts +12 -0
- package/dist/angular/voice-routing-status.service.d.ts +11 -0
- package/dist/angular/voice-stream.service.d.ts +3 -0
- package/dist/angular/voice-trace-timeline.service.d.ts +12 -0
- package/dist/angular/voice-turn-latency.service.d.ts +13 -0
- package/dist/angular/voice-turn-quality.service.d.ts +12 -0
- package/dist/angular/voice-workflow-status.service.d.ts +12 -0
- package/dist/assistantHealth.d.ts +81 -0
- package/dist/audit.d.ts +128 -0
- package/dist/auditDeliveryRoutes.d.ts +85 -0
- package/dist/auditExport.d.ts +34 -0
- package/dist/auditRoutes.d.ts +66 -0
- package/dist/auditSinks.d.ts +133 -0
- package/dist/bargeInRoutes.d.ts +56 -0
- package/dist/campaign.d.ts +610 -0
- package/dist/campaignDialers.d.ts +90 -0
- package/dist/client/actions.d.ts +105 -0
- package/dist/client/bargeInMonitor.d.ts +7 -0
- package/dist/client/campaignDialerProof.d.ts +23 -0
- package/dist/client/connection.d.ts +3 -0
- package/dist/client/duplex.d.ts +1 -1
- package/dist/client/htmxBootstrap.js +697 -15
- package/dist/client/index.d.ts +40 -0
- package/dist/client/index.js +2138 -10
- package/dist/client/liveTurnLatency.d.ts +41 -0
- package/dist/client/opsStatus.d.ts +19 -0
- package/dist/client/opsStatusWidget.d.ts +40 -0
- package/dist/client/providerCapabilities.d.ts +19 -0
- package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
- package/dist/client/providerSimulationControls.d.ts +33 -0
- package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
- package/dist/client/providerStatus.d.ts +19 -0
- package/dist/client/providerStatusWidget.d.ts +32 -0
- package/dist/client/routingStatus.d.ts +19 -0
- package/dist/client/routingStatusWidget.d.ts +28 -0
- package/dist/client/traceTimeline.d.ts +19 -0
- package/dist/client/traceTimelineWidget.d.ts +32 -0
- package/dist/client/turnLatency.d.ts +22 -0
- package/dist/client/turnLatencyWidget.d.ts +33 -0
- package/dist/client/turnQuality.d.ts +19 -0
- package/dist/client/turnQualityWidget.d.ts +32 -0
- package/dist/client/workflowStatus.d.ts +19 -0
- package/dist/dataControl.d.ts +47 -0
- package/dist/demoReadyRoutes.d.ts +98 -0
- package/dist/diagnosticsRoutes.d.ts +44 -0
- package/dist/evalRoutes.d.ts +213 -0
- package/dist/fileStore.d.ts +11 -2
- package/dist/handoff.d.ts +54 -0
- package/dist/handoffHealth.d.ts +94 -0
- package/dist/index.d.ts +103 -9
- package/dist/index.js +17158 -4684
- package/dist/liveLatency.d.ts +78 -0
- package/dist/modelAdapters.d.ts +26 -2
- package/dist/openaiRealtime.d.ts +27 -0
- package/dist/openaiTTS.d.ts +18 -0
- package/dist/opsConsoleRoutes.d.ts +77 -0
- package/dist/opsStatus.d.ts +65 -0
- package/dist/opsStatusRoutes.d.ts +33 -0
- package/dist/opsWebhook.d.ts +126 -0
- package/dist/outcomeContract.d.ts +112 -0
- package/dist/phoneAgent.d.ts +62 -0
- package/dist/phoneAgentProductionSmoke.d.ts +115 -0
- package/dist/postgresStore.d.ts +13 -2
- package/dist/productionReadiness.d.ts +227 -0
- package/dist/providerAdapters.d.ts +48 -0
- package/dist/providerCapabilities.d.ts +92 -0
- package/dist/providerHealth.d.ts +79 -0
- package/dist/providerRoutingContract.d.ts +38 -0
- package/dist/qualityRoutes.d.ts +76 -0
- package/dist/queue.d.ts +61 -0
- package/dist/react/VoiceOpsStatus.d.ts +6 -0
- package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
- package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
- package/dist/react/VoiceProviderStatus.d.ts +6 -0
- package/dist/react/VoiceRoutingStatus.d.ts +6 -0
- package/dist/react/VoiceTraceTimeline.d.ts +6 -0
- package/dist/react/VoiceTurnLatency.d.ts +6 -0
- package/dist/react/VoiceTurnQuality.d.ts +6 -0
- package/dist/react/index.d.ts +18 -0
- package/dist/react/index.js +2726 -14
- package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
- package/dist/react/useVoiceController.d.ts +3 -0
- package/dist/react/useVoiceOpsStatus.d.ts +8 -0
- package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
- package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
- package/dist/react/useVoiceProviderStatus.d.ts +8 -0
- package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/react/useVoiceStream.d.ts +3 -0
- package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
- package/dist/react/useVoiceTurnLatency.d.ts +9 -0
- package/dist/react/useVoiceTurnQuality.d.ts +8 -0
- package/dist/react/useVoiceWorkflowStatus.d.ts +8 -0
- package/dist/resilienceRoutes.d.ts +142 -0
- package/dist/sessionReplay.d.ts +175 -0
- package/dist/simulationSuite.d.ts +120 -0
- package/dist/sqliteStore.d.ts +13 -2
- package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
- package/dist/svelte/createVoiceOpsStatus.d.ts +9 -0
- package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
- package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
- package/dist/svelte/createVoiceProviderStatus.d.ts +10 -0
- package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
- package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
- package/dist/svelte/createVoiceTurnLatency.d.ts +11 -0
- package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
- package/dist/svelte/createVoiceWorkflowStatus.d.ts +8 -0
- package/dist/svelte/index.d.ts +10 -0
- package/dist/svelte/index.js +2152 -202
- package/dist/telephony/contract.d.ts +61 -0
- package/dist/telephony/matrix.d.ts +97 -0
- package/dist/telephony/plivo.d.ts +254 -0
- package/dist/telephony/telnyx.d.ts +247 -0
- package/dist/telephony/twilio.d.ts +135 -2
- package/dist/telephonyOutcome.d.ts +201 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +2830 -37
- package/dist/testing/ioProviderSimulator.d.ts +41 -0
- package/dist/testing/providerSimulator.d.ts +44 -0
- package/dist/toolContract.d.ts +130 -0
- package/dist/toolRuntime.d.ts +50 -0
- package/dist/trace.d.ts +1 -1
- package/dist/traceDeliveryRoutes.d.ts +86 -0
- package/dist/traceTimeline.d.ts +93 -0
- package/dist/turnLatency.d.ts +95 -0
- package/dist/turnQuality.d.ts +94 -0
- package/dist/types.d.ts +169 -4
- package/dist/vue/VoiceOpsStatus.d.ts +30 -0
- package/dist/vue/VoiceProviderCapabilities.d.ts +51 -0
- package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
- package/dist/vue/VoiceProviderStatus.d.ts +51 -0
- package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
- package/dist/vue/VoiceTurnLatency.d.ts +69 -0
- package/dist/vue/VoiceTurnQuality.d.ts +51 -0
- package/dist/vue/index.d.ts +17 -0
- package/dist/vue/index.js +2636 -31
- package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
- package/dist/vue/useVoiceController.d.ts +2 -1
- package/dist/vue/useVoiceOpsStatus.d.ts +9 -0
- package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
- package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
- package/dist/vue/useVoiceProviderStatus.d.ts +9 -0
- package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/vue/useVoiceStream.d.ts +4 -1
- package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
- package/dist/vue/useVoiceTurnLatency.d.ts +10 -0
- package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
- package/dist/vue/useVoiceWorkflowStatus.d.ts +9 -0
- package/dist/workflowContract.d.ts +91 -0
- package/package.json +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import type { VoiceTraceEventStore } from './trace';
|
|
3
|
+
export type VoiceLiveLatencyStatus = 'empty' | 'fail' | 'pass' | 'warn';
|
|
4
|
+
export type VoiceLiveLatencySample = {
|
|
5
|
+
at: number;
|
|
6
|
+
latencyMs: number;
|
|
7
|
+
sessionId: string;
|
|
8
|
+
status?: string;
|
|
9
|
+
traceId?: string;
|
|
10
|
+
};
|
|
11
|
+
export type VoiceLiveLatencyReport = {
|
|
12
|
+
averageLatencyMs?: number;
|
|
13
|
+
checkedAt: number;
|
|
14
|
+
failed: number;
|
|
15
|
+
p50LatencyMs?: number;
|
|
16
|
+
p95LatencyMs?: number;
|
|
17
|
+
recent: VoiceLiveLatencySample[];
|
|
18
|
+
status: VoiceLiveLatencyStatus;
|
|
19
|
+
total: number;
|
|
20
|
+
warnings: number;
|
|
21
|
+
};
|
|
22
|
+
export type VoiceLiveLatencyOptions = {
|
|
23
|
+
failAfterMs?: number;
|
|
24
|
+
limit?: number;
|
|
25
|
+
store: VoiceTraceEventStore;
|
|
26
|
+
warnAfterMs?: number;
|
|
27
|
+
};
|
|
28
|
+
export type VoiceLiveLatencyRoutesOptions = VoiceLiveLatencyOptions & {
|
|
29
|
+
headers?: HeadersInit;
|
|
30
|
+
htmlPath?: false | string;
|
|
31
|
+
name?: string;
|
|
32
|
+
path?: string;
|
|
33
|
+
title?: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const summarizeVoiceLiveLatency: (options: VoiceLiveLatencyOptions) => Promise<VoiceLiveLatencyReport>;
|
|
36
|
+
export declare const renderVoiceLiveLatencyHTML: (report: VoiceLiveLatencyReport, options?: {
|
|
37
|
+
title?: string;
|
|
38
|
+
}) => string;
|
|
39
|
+
export declare const createVoiceLiveLatencyRoutes: (options: VoiceLiveLatencyRoutesOptions) => Elysia<"", {
|
|
40
|
+
decorator: {};
|
|
41
|
+
store: {};
|
|
42
|
+
derive: {};
|
|
43
|
+
resolve: {};
|
|
44
|
+
}, {
|
|
45
|
+
typebox: {};
|
|
46
|
+
error: {};
|
|
47
|
+
}, {
|
|
48
|
+
schema: {};
|
|
49
|
+
standaloneSchema: {};
|
|
50
|
+
macro: {};
|
|
51
|
+
macroFn: {};
|
|
52
|
+
parser: {};
|
|
53
|
+
response: {};
|
|
54
|
+
}, {
|
|
55
|
+
[x: string]: {
|
|
56
|
+
get: {
|
|
57
|
+
body: unknown;
|
|
58
|
+
params: {};
|
|
59
|
+
query: unknown;
|
|
60
|
+
headers: unknown;
|
|
61
|
+
response: {
|
|
62
|
+
200: VoiceLiveLatencyReport;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
}, {
|
|
67
|
+
derive: {};
|
|
68
|
+
resolve: {};
|
|
69
|
+
schema: {};
|
|
70
|
+
standaloneSchema: {};
|
|
71
|
+
response: {};
|
|
72
|
+
}, {
|
|
73
|
+
derive: {};
|
|
74
|
+
resolve: {};
|
|
75
|
+
schema: {};
|
|
76
|
+
standaloneSchema: {};
|
|
77
|
+
response: {};
|
|
78
|
+
}>;
|
package/dist/modelAdapters.d.ts
CHANGED
|
@@ -36,26 +36,48 @@ export type GeminiVoiceAssistantModelOptions = {
|
|
|
36
36
|
};
|
|
37
37
|
export type VoiceProviderRouterEvent<TProvider extends string = string> = {
|
|
38
38
|
at: number;
|
|
39
|
+
attempt: number;
|
|
39
40
|
elapsedMs: number;
|
|
40
41
|
error?: string;
|
|
41
42
|
fallbackProvider?: TProvider;
|
|
43
|
+
latencyBudgetMs?: number;
|
|
42
44
|
provider: TProvider;
|
|
45
|
+
providerHealth?: VoiceProviderRouterProviderHealth<TProvider>;
|
|
43
46
|
rateLimited?: boolean;
|
|
44
47
|
recovered?: boolean;
|
|
45
48
|
selectedProvider: TProvider;
|
|
49
|
+
suppressionRemainingMs?: number;
|
|
50
|
+
suppressedUntil?: number;
|
|
46
51
|
status: 'error' | 'fallback' | 'success';
|
|
52
|
+
timedOut?: boolean;
|
|
47
53
|
};
|
|
48
54
|
export type VoiceProviderRouterFallbackMode = 'never' | 'provider-error' | 'rate-limit';
|
|
49
|
-
export type
|
|
55
|
+
export type VoiceProviderRouterStrategy = 'balanced' | 'ordered' | 'prefer-cheapest' | 'prefer-fastest' | 'prefer-selected' | 'quality-first';
|
|
56
|
+
export type VoiceProviderRouterPolicyPreset = 'balanced' | 'cost-cap' | 'cost-first' | 'latency-first' | 'quality-first';
|
|
57
|
+
export type VoiceProviderRouterPolicyWeights = {
|
|
58
|
+
cost?: number;
|
|
59
|
+
latencyMs?: number;
|
|
60
|
+
priority?: number;
|
|
61
|
+
quality?: number;
|
|
62
|
+
};
|
|
63
|
+
export type VoiceProviderRouterPolicy<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TProvider extends string = string> = VoiceProviderRouterStrategy | VoiceProviderRouterPolicyPreset | {
|
|
50
64
|
allowProviders?: readonly TProvider[] | ((input: VoiceAgentModelInput<TContext, TSession>) => readonly TProvider[] | Promise<readonly TProvider[]>);
|
|
51
65
|
fallbackMode?: VoiceProviderRouterFallbackMode;
|
|
52
|
-
|
|
66
|
+
maxCost?: number;
|
|
67
|
+
maxLatencyMs?: number;
|
|
68
|
+
minQuality?: number;
|
|
69
|
+
scoreProvider?: (provider: TProvider, profile: VoiceProviderRouterProviderProfile | undefined) => number;
|
|
70
|
+
strategy?: VoiceProviderRouterStrategy;
|
|
71
|
+
weights?: VoiceProviderRouterPolicyWeights;
|
|
53
72
|
};
|
|
54
73
|
export type VoiceProviderRouterProviderProfile = {
|
|
55
74
|
cost?: number;
|
|
56
75
|
latencyMs?: number;
|
|
57
76
|
priority?: number;
|
|
77
|
+
quality?: number;
|
|
78
|
+
timeoutMs?: number;
|
|
58
79
|
};
|
|
80
|
+
export declare const resolveVoiceProviderRoutingPolicyPreset: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TProvider extends string = string>(preset: VoiceProviderRouterPolicyPreset, options?: Omit<Extract<VoiceProviderRouterPolicy<TContext, TSession, TProvider>, Record<string, unknown>>, "strategy">) => Extract<VoiceProviderRouterPolicy<TContext, TSession, TProvider>, Record<string, unknown>>;
|
|
59
81
|
export type VoiceProviderRouterHealthOptions = {
|
|
60
82
|
cooldownMs?: number;
|
|
61
83
|
failureThreshold?: number;
|
|
@@ -76,10 +98,12 @@ export type VoiceProviderRouterOptions<TContext = unknown, TSession extends Voic
|
|
|
76
98
|
fallbackMode?: VoiceProviderRouterFallbackMode;
|
|
77
99
|
isProviderError?: (error: unknown, provider: TProvider) => boolean;
|
|
78
100
|
isRateLimitError?: (error: unknown, provider: TProvider) => boolean;
|
|
101
|
+
isTimeoutError?: (error: unknown, provider: TProvider) => boolean;
|
|
79
102
|
onProviderEvent?: (event: VoiceProviderRouterEvent<TProvider>, input: VoiceAgentModelInput<TContext, TSession>) => Promise<void> | void;
|
|
80
103
|
policy?: VoiceProviderRouterPolicy<TContext, TSession, TProvider>;
|
|
81
104
|
providerHealth?: boolean | VoiceProviderRouterHealthOptions;
|
|
82
105
|
providerProfiles?: Partial<Record<TProvider, VoiceProviderRouterProviderProfile>>;
|
|
106
|
+
timeoutMs?: number;
|
|
83
107
|
providers: Partial<Record<TProvider, VoiceAgentModel<TContext, TSession, TResult>>>;
|
|
84
108
|
selectProvider?: (input: VoiceAgentModelInput<TContext, TSession>) => TProvider | undefined | Promise<TProvider | undefined>;
|
|
85
109
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RealtimeAdapter } from './types';
|
|
2
|
+
export type OpenAIRealtimeModel = 'gpt-realtime' | 'gpt-realtime-mini' | 'gpt-4o-realtime-preview' | 'gpt-4o-mini-realtime-preview' | (string & {});
|
|
3
|
+
export type OpenAIRealtimeVoice = 'alloy' | 'ash' | 'ballad' | 'cedar' | 'coral' | 'echo' | 'marin' | 'sage' | 'shimmer' | 'verse' | {
|
|
4
|
+
id: string;
|
|
5
|
+
} | (string & {});
|
|
6
|
+
export type OpenAIRealtimeTranscriptionModel = 'gpt-4o-mini-transcribe' | 'gpt-4o-transcribe' | 'whisper-1' | (string & {});
|
|
7
|
+
export type OpenAIRealtimeNoiseReduction = 'near_field' | 'far_field';
|
|
8
|
+
export type OpenAIRealtimeResponseMode = 'audio' | 'text';
|
|
9
|
+
export type OpenAIRealtimeAdapterOptions = {
|
|
10
|
+
apiKey: string;
|
|
11
|
+
autoCommitSilenceMs?: number;
|
|
12
|
+
baseUrl?: string;
|
|
13
|
+
emitResponseTranscripts?: boolean;
|
|
14
|
+
inputTranscriptionLanguage?: string;
|
|
15
|
+
inputTranscriptionModel?: OpenAIRealtimeTranscriptionModel | null;
|
|
16
|
+
inputTranscriptionPrompt?: string;
|
|
17
|
+
instructions?: string;
|
|
18
|
+
maxOutputTokens?: number | 'inf';
|
|
19
|
+
model?: OpenAIRealtimeModel;
|
|
20
|
+
noiseReduction?: OpenAIRealtimeNoiseReduction;
|
|
21
|
+
responseMode?: OpenAIRealtimeResponseMode;
|
|
22
|
+
speed?: number;
|
|
23
|
+
temperature?: number;
|
|
24
|
+
voice?: OpenAIRealtimeVoice;
|
|
25
|
+
webSocket?: typeof WebSocket;
|
|
26
|
+
};
|
|
27
|
+
export declare const createOpenAIRealtimeAdapter: (options: OpenAIRealtimeAdapterOptions) => RealtimeAdapter;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TTSAdapter, TTSAdapterOpenOptions, VoiceLexiconEntry } from './types';
|
|
2
|
+
export type OpenAIVoiceTTSVoice = 'alloy' | 'ash' | 'ballad' | 'cedar' | 'coral' | 'echo' | 'fable' | 'marin' | 'nova' | 'onyx' | 'sage' | 'shimmer' | 'verse' | (string & {});
|
|
3
|
+
export type OpenAIVoiceTTSOptions = {
|
|
4
|
+
apiKey: string;
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
fetch?: typeof fetch;
|
|
7
|
+
instructions?: string | ((input: {
|
|
8
|
+
lexicon?: VoiceLexiconEntry[];
|
|
9
|
+
sessionId: string;
|
|
10
|
+
text: string;
|
|
11
|
+
}) => Promise<string | undefined> | string | undefined);
|
|
12
|
+
model?: 'gpt-4o-mini-tts' | 'tts-1' | 'tts-1-hd' | (string & {});
|
|
13
|
+
speed?: number;
|
|
14
|
+
voice?: OpenAIVoiceTTSVoice | {
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const createOpenAIVoiceTTS: (options: OpenAIVoiceTTSOptions) => TTSAdapter<TTSAdapterOpenOptions>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type VoiceQualityReport } from './qualityRoutes';
|
|
3
|
+
import { type VoiceRoutingEvent } from './resilienceRoutes';
|
|
4
|
+
import { type VoiceSessionListItem } from './sessionReplay';
|
|
5
|
+
import { summarizeVoiceTrace, type VoiceTraceEventStore } from './trace';
|
|
6
|
+
export type VoiceOpsConsoleLink = {
|
|
7
|
+
description?: string;
|
|
8
|
+
href: string;
|
|
9
|
+
label: string;
|
|
10
|
+
statusHref?: string;
|
|
11
|
+
};
|
|
12
|
+
export type VoiceOpsConsoleReport = {
|
|
13
|
+
checkedAt: number;
|
|
14
|
+
eventCount: number;
|
|
15
|
+
handoffs: {
|
|
16
|
+
failed: number;
|
|
17
|
+
total: number;
|
|
18
|
+
};
|
|
19
|
+
links: VoiceOpsConsoleLink[];
|
|
20
|
+
providers: {
|
|
21
|
+
degraded: number;
|
|
22
|
+
healthy: number;
|
|
23
|
+
total: number;
|
|
24
|
+
};
|
|
25
|
+
quality: VoiceQualityReport;
|
|
26
|
+
recentRoutingEvents: VoiceRoutingEvent[];
|
|
27
|
+
recentSessions: VoiceSessionListItem[];
|
|
28
|
+
sessions: {
|
|
29
|
+
failed: number;
|
|
30
|
+
healthy: number;
|
|
31
|
+
total: number;
|
|
32
|
+
};
|
|
33
|
+
trace: ReturnType<typeof summarizeVoiceTrace>;
|
|
34
|
+
};
|
|
35
|
+
export type VoiceOpsConsoleRoutesOptions = {
|
|
36
|
+
headers?: HeadersInit;
|
|
37
|
+
links?: VoiceOpsConsoleLink[];
|
|
38
|
+
llmProviders?: readonly string[];
|
|
39
|
+
name?: string;
|
|
40
|
+
path?: string;
|
|
41
|
+
store: VoiceTraceEventStore;
|
|
42
|
+
sttProviders?: readonly string[];
|
|
43
|
+
title?: string;
|
|
44
|
+
ttsProviders?: readonly string[];
|
|
45
|
+
};
|
|
46
|
+
export declare const buildVoiceOpsConsoleReport: (options: VoiceOpsConsoleRoutesOptions) => Promise<VoiceOpsConsoleReport>;
|
|
47
|
+
export declare const renderVoiceOpsConsoleHTML: (report: VoiceOpsConsoleReport, options?: {
|
|
48
|
+
title?: string;
|
|
49
|
+
}) => string;
|
|
50
|
+
export declare const createVoiceOpsConsoleRoutes: (options: VoiceOpsConsoleRoutesOptions) => Elysia<"", {
|
|
51
|
+
decorator: {};
|
|
52
|
+
store: {};
|
|
53
|
+
derive: {};
|
|
54
|
+
resolve: {};
|
|
55
|
+
}, {
|
|
56
|
+
typebox: {};
|
|
57
|
+
error: {};
|
|
58
|
+
}, {
|
|
59
|
+
schema: {};
|
|
60
|
+
standaloneSchema: {};
|
|
61
|
+
macro: {};
|
|
62
|
+
macroFn: {};
|
|
63
|
+
parser: {};
|
|
64
|
+
response: {};
|
|
65
|
+
}, {}, {
|
|
66
|
+
derive: {};
|
|
67
|
+
resolve: {};
|
|
68
|
+
schema: {};
|
|
69
|
+
standaloneSchema: {};
|
|
70
|
+
response: {};
|
|
71
|
+
}, {
|
|
72
|
+
derive: {};
|
|
73
|
+
resolve: {};
|
|
74
|
+
schema: {};
|
|
75
|
+
standaloneSchema: {};
|
|
76
|
+
response: {};
|
|
77
|
+
}>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type VoiceEvalLink, type VoiceEvalRoutesOptions } from './evalRoutes';
|
|
2
|
+
import { type VoiceQualityRoutesOptions } from './qualityRoutes';
|
|
3
|
+
import { type VoiceTraceEventStore } from './trace';
|
|
4
|
+
export type VoiceOpsStatus = 'pass' | 'fail';
|
|
5
|
+
export type VoiceOpsStatusLink = VoiceEvalLink & {
|
|
6
|
+
description?: string;
|
|
7
|
+
statusHref?: string;
|
|
8
|
+
};
|
|
9
|
+
export type VoiceOpsStatusOptions<TProvider extends string = string> = {
|
|
10
|
+
evals?: false | Partial<VoiceEvalRoutesOptions>;
|
|
11
|
+
include?: {
|
|
12
|
+
handoffs?: boolean;
|
|
13
|
+
providers?: boolean;
|
|
14
|
+
quality?: boolean;
|
|
15
|
+
sessions?: boolean;
|
|
16
|
+
workflows?: boolean;
|
|
17
|
+
};
|
|
18
|
+
links?: VoiceOpsStatusLink[];
|
|
19
|
+
llmProviders?: readonly TProvider[];
|
|
20
|
+
preferFixtureWorkflows?: boolean;
|
|
21
|
+
quality?: false | Partial<VoiceQualityRoutesOptions>;
|
|
22
|
+
store: VoiceTraceEventStore;
|
|
23
|
+
sttProviders?: readonly string[];
|
|
24
|
+
ttsProviders?: readonly string[];
|
|
25
|
+
};
|
|
26
|
+
export type VoiceOpsStatusReport = {
|
|
27
|
+
checkedAt: number;
|
|
28
|
+
failed: number;
|
|
29
|
+
links: VoiceOpsStatusLink[];
|
|
30
|
+
passed: number;
|
|
31
|
+
status: VoiceOpsStatus;
|
|
32
|
+
surfaces: {
|
|
33
|
+
handoffs?: {
|
|
34
|
+
failed: number;
|
|
35
|
+
status: VoiceOpsStatus;
|
|
36
|
+
total: number;
|
|
37
|
+
};
|
|
38
|
+
providers?: {
|
|
39
|
+
degraded: number;
|
|
40
|
+
status: VoiceOpsStatus;
|
|
41
|
+
total: number;
|
|
42
|
+
};
|
|
43
|
+
quality?: {
|
|
44
|
+
status: VoiceOpsStatus;
|
|
45
|
+
};
|
|
46
|
+
sessions?: {
|
|
47
|
+
failed: number;
|
|
48
|
+
status: VoiceOpsStatus;
|
|
49
|
+
total: number;
|
|
50
|
+
};
|
|
51
|
+
workflows?: {
|
|
52
|
+
failed: number;
|
|
53
|
+
source: 'fixtures' | 'live';
|
|
54
|
+
status: VoiceOpsStatus;
|
|
55
|
+
total: number;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
total: number;
|
|
59
|
+
};
|
|
60
|
+
export type VoiceOpsStatusRoutesOptions<TProvider extends string = string> = VoiceOpsStatusOptions<TProvider> & {
|
|
61
|
+
headers?: HeadersInit;
|
|
62
|
+
name?: string;
|
|
63
|
+
path?: string;
|
|
64
|
+
};
|
|
65
|
+
export declare const summarizeVoiceOpsStatus: <TProvider extends string = string>(options: VoiceOpsStatusOptions<TProvider>) => Promise<VoiceOpsStatusReport>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type VoiceOpsStatusReport, type VoiceOpsStatusRoutesOptions } from './opsStatus';
|
|
3
|
+
export declare const renderVoiceOpsStatusHTML: (report: VoiceOpsStatusReport, options?: {
|
|
4
|
+
title?: string;
|
|
5
|
+
}) => string;
|
|
6
|
+
export declare const createVoiceOpsStatusRoutes: (options: VoiceOpsStatusRoutesOptions) => Elysia<"", {
|
|
7
|
+
decorator: {};
|
|
8
|
+
store: {};
|
|
9
|
+
derive: {};
|
|
10
|
+
resolve: {};
|
|
11
|
+
}, {
|
|
12
|
+
typebox: {};
|
|
13
|
+
error: {};
|
|
14
|
+
}, {
|
|
15
|
+
schema: {};
|
|
16
|
+
standaloneSchema: {};
|
|
17
|
+
macro: {};
|
|
18
|
+
macroFn: {};
|
|
19
|
+
parser: {};
|
|
20
|
+
response: {};
|
|
21
|
+
}, {}, {
|
|
22
|
+
derive: {};
|
|
23
|
+
resolve: {};
|
|
24
|
+
schema: {};
|
|
25
|
+
standaloneSchema: {};
|
|
26
|
+
response: {};
|
|
27
|
+
}, {
|
|
28
|
+
derive: {};
|
|
29
|
+
resolve: {};
|
|
30
|
+
schema: {};
|
|
31
|
+
standaloneSchema: {};
|
|
32
|
+
response: {};
|
|
33
|
+
}>;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import type { StoredVoiceIntegrationEvent, VoiceIntegrationEventType } from './ops';
|
|
3
|
+
import type { VoiceIntegrationHTTPSinkOptions, VoiceIntegrationSink } from './opsSinks';
|
|
4
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
5
|
+
export type VoiceOpsWebhookLinkResolver = string | ((input: {
|
|
6
|
+
event: StoredVoiceIntegrationEvent;
|
|
7
|
+
}) => MaybePromise<string | undefined>);
|
|
8
|
+
export type VoiceOpsWebhookEntity = {
|
|
9
|
+
disposition?: string;
|
|
10
|
+
outcome?: string;
|
|
11
|
+
priority?: string;
|
|
12
|
+
queue?: string;
|
|
13
|
+
reviewId?: string;
|
|
14
|
+
scenarioId?: string;
|
|
15
|
+
sessionId?: string;
|
|
16
|
+
status?: string;
|
|
17
|
+
target?: string;
|
|
18
|
+
taskId?: string;
|
|
19
|
+
};
|
|
20
|
+
export type VoiceOpsWebhookEnvelope = {
|
|
21
|
+
entity: VoiceOpsWebhookEntity;
|
|
22
|
+
event: {
|
|
23
|
+
createdAt: number;
|
|
24
|
+
id: string;
|
|
25
|
+
payload: Record<string, unknown>;
|
|
26
|
+
type: VoiceIntegrationEventType;
|
|
27
|
+
};
|
|
28
|
+
links?: {
|
|
29
|
+
event?: string;
|
|
30
|
+
replay?: string;
|
|
31
|
+
review?: string;
|
|
32
|
+
task?: string;
|
|
33
|
+
};
|
|
34
|
+
schemaVersion: 1;
|
|
35
|
+
source: 'absolutejs-voice';
|
|
36
|
+
};
|
|
37
|
+
export type VoiceOpsWebhookSinkOptions = Omit<VoiceIntegrationHTTPSinkOptions<VoiceOpsWebhookEnvelope>, 'body'> & {
|
|
38
|
+
baseUrl?: string;
|
|
39
|
+
eventHref?: VoiceOpsWebhookLinkResolver;
|
|
40
|
+
replayHref?: VoiceOpsWebhookLinkResolver;
|
|
41
|
+
reviewHref?: VoiceOpsWebhookLinkResolver;
|
|
42
|
+
taskHref?: VoiceOpsWebhookLinkResolver;
|
|
43
|
+
};
|
|
44
|
+
export type VoiceOpsWebhookVerificationResult = {
|
|
45
|
+
ok: true;
|
|
46
|
+
} | {
|
|
47
|
+
ok: false;
|
|
48
|
+
reason: 'invalid-signature' | 'missing-secret' | 'missing-signature' | 'missing-timestamp' | 'stale-timestamp' | 'unsupported-algorithm';
|
|
49
|
+
};
|
|
50
|
+
export type VoiceOpsWebhookReceiverRoutesOptions = {
|
|
51
|
+
onEnvelope?: (input: {
|
|
52
|
+
envelope: VoiceOpsWebhookEnvelope;
|
|
53
|
+
request: Request;
|
|
54
|
+
}) => MaybePromise<void>;
|
|
55
|
+
path?: string;
|
|
56
|
+
signingSecret?: string;
|
|
57
|
+
toleranceMs?: number;
|
|
58
|
+
};
|
|
59
|
+
export declare const createVoiceOpsWebhookEnvelope: (input: {
|
|
60
|
+
baseUrl?: string;
|
|
61
|
+
event: StoredVoiceIntegrationEvent;
|
|
62
|
+
eventHref?: VoiceOpsWebhookLinkResolver;
|
|
63
|
+
replayHref?: VoiceOpsWebhookLinkResolver;
|
|
64
|
+
reviewHref?: VoiceOpsWebhookLinkResolver;
|
|
65
|
+
taskHref?: VoiceOpsWebhookLinkResolver;
|
|
66
|
+
}) => Promise<VoiceOpsWebhookEnvelope>;
|
|
67
|
+
export declare const createVoiceOpsWebhookSink: (options: VoiceOpsWebhookSinkOptions) => VoiceIntegrationSink;
|
|
68
|
+
export declare const verifyVoiceOpsWebhookSignature: (input: {
|
|
69
|
+
body: string;
|
|
70
|
+
now?: number;
|
|
71
|
+
secret?: string;
|
|
72
|
+
signature?: string | null;
|
|
73
|
+
timestamp?: string | null;
|
|
74
|
+
toleranceMs?: number;
|
|
75
|
+
}) => Promise<VoiceOpsWebhookVerificationResult>;
|
|
76
|
+
export declare const createVoiceOpsWebhookReceiverRoutes: (options?: VoiceOpsWebhookReceiverRoutesOptions) => 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
|
+
[x: string]: {
|
|
93
|
+
post: {
|
|
94
|
+
body: unknown;
|
|
95
|
+
params: {};
|
|
96
|
+
query: unknown;
|
|
97
|
+
headers: unknown;
|
|
98
|
+
response: {
|
|
99
|
+
200: {
|
|
100
|
+
ok: boolean;
|
|
101
|
+
reason: "invalid-signature" | "missing-secret" | "missing-signature" | "missing-timestamp" | "stale-timestamp" | "unsupported-algorithm";
|
|
102
|
+
eventId?: undefined;
|
|
103
|
+
type?: undefined;
|
|
104
|
+
} | {
|
|
105
|
+
eventId: string;
|
|
106
|
+
ok: boolean;
|
|
107
|
+
type: VoiceIntegrationEventType;
|
|
108
|
+
reason?: undefined;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
}, {
|
|
114
|
+
derive: {};
|
|
115
|
+
resolve: {};
|
|
116
|
+
schema: {};
|
|
117
|
+
standaloneSchema: {};
|
|
118
|
+
response: {};
|
|
119
|
+
}, {
|
|
120
|
+
derive: {};
|
|
121
|
+
resolve: {};
|
|
122
|
+
schema: {};
|
|
123
|
+
standaloneSchema: {};
|
|
124
|
+
response: {};
|
|
125
|
+
}>;
|
|
126
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import type { StoredVoiceHandoffDelivery, VoiceCallDisposition, VoiceHandoffAction, VoiceHandoffDeliveryStore, VoiceSessionRecord, VoiceSessionStore } from './types';
|
|
3
|
+
import type { StoredVoiceIntegrationEvent, StoredVoiceOpsTask, VoiceIntegrationEventType } from './ops';
|
|
4
|
+
import type { StoredVoiceCallReviewArtifact } from './testing/review';
|
|
5
|
+
export type VoiceOutcomeContractStatus = 'pass' | 'fail';
|
|
6
|
+
export type VoiceOutcomeContractDefinition = {
|
|
7
|
+
description?: string;
|
|
8
|
+
expectedDisposition?: VoiceCallDisposition;
|
|
9
|
+
id: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
minSessions?: number;
|
|
12
|
+
minTasks?: number;
|
|
13
|
+
requireHandoffActions?: VoiceHandoffAction[];
|
|
14
|
+
requireIntegrationEvents?: VoiceIntegrationEventType[];
|
|
15
|
+
requireReview?: boolean;
|
|
16
|
+
requireTask?: boolean;
|
|
17
|
+
scenarioId?: string;
|
|
18
|
+
};
|
|
19
|
+
export type VoiceOutcomeContractIssue = {
|
|
20
|
+
code: string;
|
|
21
|
+
message: string;
|
|
22
|
+
};
|
|
23
|
+
export type VoiceOutcomeContractReport = {
|
|
24
|
+
contractId: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
issues: VoiceOutcomeContractIssue[];
|
|
27
|
+
label?: string;
|
|
28
|
+
matched: {
|
|
29
|
+
handoffs: number;
|
|
30
|
+
integrationEvents: number;
|
|
31
|
+
reviews: number;
|
|
32
|
+
sessions: number;
|
|
33
|
+
tasks: number;
|
|
34
|
+
};
|
|
35
|
+
pass: boolean;
|
|
36
|
+
};
|
|
37
|
+
export type VoiceOutcomeContractSuiteReport = {
|
|
38
|
+
checkedAt: number;
|
|
39
|
+
contracts: VoiceOutcomeContractReport[];
|
|
40
|
+
failed: number;
|
|
41
|
+
passed: number;
|
|
42
|
+
status: VoiceOutcomeContractStatus;
|
|
43
|
+
total: number;
|
|
44
|
+
};
|
|
45
|
+
type ListStore<T> = {
|
|
46
|
+
list: () => Promise<T[]> | T[];
|
|
47
|
+
};
|
|
48
|
+
export type VoiceOutcomeContractOptions<TSession extends VoiceSessionRecord = VoiceSessionRecord> = {
|
|
49
|
+
contracts: VoiceOutcomeContractDefinition[];
|
|
50
|
+
events?: StoredVoiceIntegrationEvent[] | ListStore<StoredVoiceIntegrationEvent>;
|
|
51
|
+
handoffs?: StoredVoiceHandoffDelivery[] | VoiceHandoffDeliveryStore;
|
|
52
|
+
reviews?: StoredVoiceCallReviewArtifact[] | ListStore<StoredVoiceCallReviewArtifact>;
|
|
53
|
+
sessions?: TSession[] | VoiceSessionStore<TSession>;
|
|
54
|
+
tasks?: StoredVoiceOpsTask[] | ListStore<StoredVoiceOpsTask>;
|
|
55
|
+
};
|
|
56
|
+
export type VoiceOutcomeContractHTMLHandlerOptions<TSession extends VoiceSessionRecord = VoiceSessionRecord> = VoiceOutcomeContractOptions<TSession> & {
|
|
57
|
+
headers?: HeadersInit;
|
|
58
|
+
render?: (report: VoiceOutcomeContractSuiteReport) => string | Promise<string>;
|
|
59
|
+
title?: string;
|
|
60
|
+
};
|
|
61
|
+
export type VoiceOutcomeContractRoutesOptions<TSession extends VoiceSessionRecord = VoiceSessionRecord> = VoiceOutcomeContractHTMLHandlerOptions<TSession> & {
|
|
62
|
+
htmlPath?: false | string;
|
|
63
|
+
name?: string;
|
|
64
|
+
path?: string;
|
|
65
|
+
};
|
|
66
|
+
export declare const runVoiceOutcomeContractSuite: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceOutcomeContractOptions<TSession>) => Promise<VoiceOutcomeContractSuiteReport>;
|
|
67
|
+
export declare const renderVoiceOutcomeContractHTML: (report: VoiceOutcomeContractSuiteReport, options?: {
|
|
68
|
+
title?: string;
|
|
69
|
+
}) => string;
|
|
70
|
+
export declare const createVoiceOutcomeContractJSONHandler: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceOutcomeContractOptions<TSession>) => () => Promise<VoiceOutcomeContractSuiteReport>;
|
|
71
|
+
export declare const createVoiceOutcomeContractHTMLHandler: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceOutcomeContractHTMLHandlerOptions<TSession>) => () => Promise<Response>;
|
|
72
|
+
export declare const createVoiceOutcomeContractRoutes: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceOutcomeContractRoutesOptions<TSession>) => Elysia<"", {
|
|
73
|
+
decorator: {};
|
|
74
|
+
store: {};
|
|
75
|
+
derive: {};
|
|
76
|
+
resolve: {};
|
|
77
|
+
}, {
|
|
78
|
+
typebox: {};
|
|
79
|
+
error: {};
|
|
80
|
+
}, {
|
|
81
|
+
schema: {};
|
|
82
|
+
standaloneSchema: {};
|
|
83
|
+
macro: {};
|
|
84
|
+
macroFn: {};
|
|
85
|
+
parser: {};
|
|
86
|
+
response: {};
|
|
87
|
+
}, {
|
|
88
|
+
[x: string]: {
|
|
89
|
+
get: {
|
|
90
|
+
body: unknown;
|
|
91
|
+
params: {};
|
|
92
|
+
query: unknown;
|
|
93
|
+
headers: unknown;
|
|
94
|
+
response: {
|
|
95
|
+
200: VoiceOutcomeContractSuiteReport;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
}, {
|
|
100
|
+
derive: {};
|
|
101
|
+
resolve: {};
|
|
102
|
+
schema: {};
|
|
103
|
+
standaloneSchema: {};
|
|
104
|
+
response: {};
|
|
105
|
+
}, {
|
|
106
|
+
derive: {};
|
|
107
|
+
resolve: {};
|
|
108
|
+
schema: {};
|
|
109
|
+
standaloneSchema: {};
|
|
110
|
+
response: {};
|
|
111
|
+
}>;
|
|
112
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type PlivoVoiceRoutesOptions } from './telephony/plivo';
|
|
3
|
+
import { type TelnyxVoiceRoutesOptions } from './telephony/telnyx';
|
|
4
|
+
import { type TwilioVoiceRoutesOptions } from './telephony/twilio';
|
|
5
|
+
import { type VoiceTelephonyCarrierMatrix, type VoiceTelephonyCarrierMatrixRoutesOptions } from './telephony/matrix';
|
|
6
|
+
import { type VoicePhoneAgentProductionSmokeRoutesOptions } from './phoneAgentProductionSmoke';
|
|
7
|
+
import type { VoiceSessionRecord } from './types';
|
|
8
|
+
export type VoicePhoneAgentLifecycleStage = 'ringing' | 'answered' | 'media-started' | 'transcript' | 'assistant-response' | 'transfer' | 'voicemail' | 'no-answer' | 'completed' | 'failed';
|
|
9
|
+
type VoicePhoneAgentCarrierBase = {
|
|
10
|
+
name?: string;
|
|
11
|
+
smokePath?: false | string;
|
|
12
|
+
setupPath?: false | string;
|
|
13
|
+
};
|
|
14
|
+
export type VoicePhoneAgentTwilioCarrier<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoicePhoneAgentCarrierBase & {
|
|
15
|
+
options: TwilioVoiceRoutesOptions<TContext, TSession, TResult>;
|
|
16
|
+
provider: 'twilio';
|
|
17
|
+
};
|
|
18
|
+
export type VoicePhoneAgentTelnyxCarrier<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoicePhoneAgentCarrierBase & {
|
|
19
|
+
options?: TelnyxVoiceRoutesOptions<TContext, TSession, TResult>;
|
|
20
|
+
provider: 'telnyx';
|
|
21
|
+
};
|
|
22
|
+
export type VoicePhoneAgentPlivoCarrier<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoicePhoneAgentCarrierBase & {
|
|
23
|
+
options?: PlivoVoiceRoutesOptions<TContext, TSession, TResult>;
|
|
24
|
+
provider: 'plivo';
|
|
25
|
+
};
|
|
26
|
+
export type VoicePhoneAgentCarrier<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoicePhoneAgentTwilioCarrier<TContext, TSession, TResult> | VoicePhoneAgentTelnyxCarrier<TContext, TSession, TResult> | VoicePhoneAgentPlivoCarrier<TContext, TSession, TResult>;
|
|
27
|
+
export type VoicePhoneAgentRoutesOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
28
|
+
carriers: readonly VoicePhoneAgentCarrier<TContext, TSession, TResult>[];
|
|
29
|
+
matrix?: false | Omit<VoiceTelephonyCarrierMatrixRoutesOptions, 'load'>;
|
|
30
|
+
name?: string;
|
|
31
|
+
productionSmoke?: false | VoicePhoneAgentProductionSmokeRoutesOptions;
|
|
32
|
+
setup?: false | {
|
|
33
|
+
path?: string;
|
|
34
|
+
title?: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export type VoicePhoneAgentCarrierSummary = {
|
|
38
|
+
name?: string;
|
|
39
|
+
provider: 'plivo' | 'telnyx' | 'twilio';
|
|
40
|
+
setupPath?: false | string;
|
|
41
|
+
smokePath?: false | string;
|
|
42
|
+
};
|
|
43
|
+
export type VoicePhoneAgentRoutes = {
|
|
44
|
+
carriers: VoicePhoneAgentCarrierSummary[];
|
|
45
|
+
matrixPath?: string;
|
|
46
|
+
productionSmokePath?: string;
|
|
47
|
+
routes: Elysia;
|
|
48
|
+
setupPath?: string;
|
|
49
|
+
};
|
|
50
|
+
export type VoicePhoneAgentSetupReport = {
|
|
51
|
+
carriers: VoicePhoneAgentCarrierSummary[];
|
|
52
|
+
generatedAt: number;
|
|
53
|
+
lifecycleStages: VoicePhoneAgentLifecycleStage[];
|
|
54
|
+
matrix?: VoiceTelephonyCarrierMatrix;
|
|
55
|
+
matrixPath?: string;
|
|
56
|
+
productionSmokePath?: string;
|
|
57
|
+
ready: boolean;
|
|
58
|
+
setupPath?: string;
|
|
59
|
+
title: string;
|
|
60
|
+
};
|
|
61
|
+
export declare const createVoicePhoneAgent: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown>(options: VoicePhoneAgentRoutesOptions<TContext, TSession, TResult>) => VoicePhoneAgentRoutes;
|
|
62
|
+
export {};
|