@absolutejs/voice 0.0.22-beta.507 → 0.0.22-beta.508
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/angular/index.d.ts +2 -0
- package/dist/angular/index.js +374 -272
- package/dist/angular/voice-live-agent-console.service.d.ts +16 -0
- package/dist/dtmfCollector.d.ts +37 -0
- package/dist/holdAudio.d.ts +23 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +563 -0
- package/dist/postCallSurvey.d.ts +41 -0
- package/dist/promptInjectionGuard.d.ts +30 -0
- package/dist/react/VoiceLiveAgentConsole.d.ts +11 -0
- package/dist/svelte/createVoiceLiveAgentConsole.d.ts +23 -0
- package/dist/svelte/index.d.ts +2 -0
- package/dist/svelte/index.js +291 -180
- package/dist/vue/VoiceLiveAgentConsole.d.ts +50 -0
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.js +250 -32
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type CreateLiveAgentConsoleOptions, type LiveAgentConsole, type LiveAgentConsoleState } from "../client/liveAgentConsole";
|
|
2
|
+
export type VoiceLiveAgentConsoleServiceOptions = CreateLiveAgentConsoleOptions & {
|
|
3
|
+
takeoverButtonLabel?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class VoiceLiveAgentConsoleService {
|
|
7
|
+
build(options: VoiceLiveAgentConsoleServiceOptions): {
|
|
8
|
+
releaseTakeover: () => void;
|
|
9
|
+
setCaller: (caller: Parameters<LiveAgentConsole["setCaller"]>[0]) => void;
|
|
10
|
+
state: import("@angular/core").Signal<LiveAgentConsoleState>;
|
|
11
|
+
stop: () => void;
|
|
12
|
+
takeover: (reason?: string) => void;
|
|
13
|
+
takeoverButtonLabel: string;
|
|
14
|
+
title: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type VoiceDTMFDigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "*" | "#";
|
|
2
|
+
export declare const VOICE_DTMF_DIGITS: readonly VoiceDTMFDigit[];
|
|
3
|
+
export type VoiceDTMFCollectorState = {
|
|
4
|
+
status: "collecting";
|
|
5
|
+
digits: string;
|
|
6
|
+
} | {
|
|
7
|
+
status: "completed";
|
|
8
|
+
digits: string;
|
|
9
|
+
reason: "length" | "terminator";
|
|
10
|
+
} | {
|
|
11
|
+
status: "cancelled";
|
|
12
|
+
digits: string;
|
|
13
|
+
} | {
|
|
14
|
+
status: "rejected";
|
|
15
|
+
digits: string;
|
|
16
|
+
reason: "invalid" | "timeout" | "too-short";
|
|
17
|
+
};
|
|
18
|
+
export type CreateVoiceDTMFCollectorOptions = {
|
|
19
|
+
prompt: string;
|
|
20
|
+
minLength?: number;
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
terminator?: VoiceDTMFDigit | null;
|
|
23
|
+
timeoutMs?: number;
|
|
24
|
+
interDigitTimeoutMs?: number;
|
|
25
|
+
validator?: (digits: string) => boolean | string;
|
|
26
|
+
now?: () => number;
|
|
27
|
+
};
|
|
28
|
+
export declare const collectVoiceDTMFInput: (options: CreateVoiceDTMFCollectorOptions) => {
|
|
29
|
+
cancel(): VoiceDTMFCollectorState;
|
|
30
|
+
feed(digit: string, at?: number): VoiceDTMFCollectorState;
|
|
31
|
+
getState: () => VoiceDTMFCollectorState;
|
|
32
|
+
prompt: string;
|
|
33
|
+
subscribe(listener: (state: VoiceDTMFCollectorState) => void): () => void;
|
|
34
|
+
tick(at?: number): VoiceDTMFCollectorState;
|
|
35
|
+
};
|
|
36
|
+
export type VoiceDTMFCollector = ReturnType<typeof collectVoiceDTMFInput>;
|
|
37
|
+
export declare const validateVoiceDTMFLuhn: (digits: string) => boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type VoiceHoldAudioCue = {
|
|
2
|
+
audioUrl?: string;
|
|
3
|
+
metadata?: Record<string, unknown>;
|
|
4
|
+
text?: string;
|
|
5
|
+
};
|
|
6
|
+
export type VoiceHoldAudioDriverOptions = {
|
|
7
|
+
/** Cooldown between hold cues so we don't spam the caller. Default 4_000ms. */
|
|
8
|
+
cooldownMs?: number;
|
|
9
|
+
/** Cues to play. Picked in order; cycles back to start. */
|
|
10
|
+
cues?: ReadonlyArray<VoiceHoldAudioCue>;
|
|
11
|
+
/** Operator callback invoked when a cue is selected. Wire to TTS or a pre-rendered clip. */
|
|
12
|
+
onCue: (cue: VoiceHoldAudioCue) => Promise<void> | void;
|
|
13
|
+
/** Minimum agent-thinking duration before the first cue fires. Default 1_500ms. */
|
|
14
|
+
thinkingThresholdMs?: number;
|
|
15
|
+
};
|
|
16
|
+
export type VoiceHoldAudioDriver = {
|
|
17
|
+
/** Note that the agent has started thinking (e.g. tool call dispatched). */
|
|
18
|
+
noteThinking: (timestampMs?: number) => void;
|
|
19
|
+
/** Note that the agent has produced output (e.g. assistant text / audio). */
|
|
20
|
+
noteResponse: (timestampMs?: number) => void;
|
|
21
|
+
reset: () => void;
|
|
22
|
+
};
|
|
23
|
+
export declare const createVoiceHoldAudioDriver: (options: VoiceHoldAudioDriverOptions) => VoiceHoldAudioDriver;
|
package/dist/index.d.ts
CHANGED
|
@@ -289,4 +289,16 @@ export { buildVoiceMultilingualProofReadinessCheck, renderVoiceMultilingualProof
|
|
|
289
289
|
export type { VoiceMultilingualLanguageCode, VoiceMultilingualProofAdapterEntry, VoiceMultilingualProofAdapterReport, VoiceMultilingualProofDefaultThresholds, VoiceMultilingualProofLanguageMetrics, VoiceMultilingualProofLanguageReport, VoiceMultilingualProofLanguageThresholds, VoiceMultilingualProofOptions, VoiceMultilingualProofReadinessCheck, VoiceMultilingualProofReadinessOptions, VoiceMultilingualProofReport, } from "./multilingualProof";
|
|
290
290
|
export { buildVoiceMonitorPlan, createVoiceInMemoryMonitorRegistry, createVoiceLiveMonitorRoutes, createVoiceMonitorRuntimeBinding, createVoiceMonitorSession, } from "./monitor";
|
|
291
291
|
export type { VoiceMonitorAudioEvent, VoiceMonitorAudioSource, VoiceMonitorAuthenticate, VoiceMonitorAuthenticateInput, VoiceMonitorControlAck, VoiceMonitorControlHandler, VoiceMonitorControlHandlerInput, VoiceMonitorControlMessage, VoiceMonitorMutableRegistry, VoiceMonitorPlan, VoiceMonitorPlanInput, VoiceMonitorRegistry, VoiceMonitorRegistryRegisterInput, VoiceLiveMonitorRoutesOptions, VoiceMonitorRuntimeBindingOptions, VoiceMonitorSessionRecord, } from "./monitor";
|
|
292
|
+
export { compareVoiceCostScenarios, predictVoiceCallCost, } from "./costPredictor";
|
|
293
|
+
export type { PredictVoiceCallCostInput, VoiceCostPrediction, VoiceCostProfile, VoiceCostScenarioComparison, } from "./costPredictor";
|
|
294
|
+
export { createCoturnIceServers, createTwilioNTSIceServers, } from "./iceServers";
|
|
295
|
+
export type { CreateCoturnIceServersInput, CreateTwilioNTSIceServersInput, VoiceIceServer, } from "./iceServers";
|
|
296
|
+
export { createVoiceHoldAudioDriver } from "./holdAudio";
|
|
297
|
+
export type { VoiceHoldAudioCue, VoiceHoldAudioDriver, VoiceHoldAudioDriverOptions, } from "./holdAudio";
|
|
298
|
+
export { createVoicePromptInjectionGuard, DEFAULT_VOICE_PROMPT_INJECTION_RULES, } from "./promptInjectionGuard";
|
|
299
|
+
export type { VoicePromptInjectionRule, VoicePromptInjectionVerdict, VoicePromptInjectionGuard, CreateVoicePromptInjectionGuardOptions, } from "./promptInjectionGuard";
|
|
300
|
+
export { createVoicePostCallSurvey, DEFAULT_VOICE_POST_CALL_SURVEY_QUESTIONS, summarizeVoicePostCallSurveys, } from "./postCallSurvey";
|
|
301
|
+
export type { VoicePostCallSurvey, VoicePostCallSurveyAnswer, VoicePostCallSurveyQuestion, VoicePostCallSurveyResponse, CreateVoicePostCallSurveyOptions, } from "./postCallSurvey";
|
|
302
|
+
export { collectVoiceDTMFInput, validateVoiceDTMFLuhn, VOICE_DTMF_DIGITS, } from "./dtmfCollector";
|
|
303
|
+
export type { VoiceDTMFCollector, VoiceDTMFCollectorState, VoiceDTMFDigit, CreateVoiceDTMFCollectorOptions, } from "./dtmfCollector";
|
|
292
304
|
export * from "./types";
|