@absolutejs/voice 0.0.22-beta.54 → 0.0.22-beta.540
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 +4518 -951
- package/dist/angular/index.d.ts +36 -5
- package/dist/angular/index.js +4189 -390
- package/dist/angular/voice-agent-squad-status.service.d.ts +12 -0
- package/dist/angular/voice-call-debugger.service.d.ts +12 -0
- package/dist/angular/voice-call-player.service.d.ts +19 -0
- package/dist/angular/voice-campaign-dialer-proof.service.d.ts +14 -0
- package/dist/angular/voice-controller.service.d.ts +3 -1
- package/dist/angular/voice-cost-dashboard.service.d.ts +15 -0
- package/dist/angular/voice-delivery-runtime.service.d.ts +16 -0
- package/dist/angular/voice-live-agent-console.service.d.ts +16 -0
- package/dist/angular/voice-live-call-viewer.service.d.ts +16 -0
- package/dist/angular/voice-live-ops.service.d.ts +11 -0
- package/dist/angular/voice-ops-action-center.service.d.ts +13 -0
- package/dist/angular/voice-ops-status.service.d.ts +12 -0
- package/dist/angular/voice-platform-coverage.service.d.ts +12 -0
- package/dist/angular/voice-profile-comparison.service.d.ts +12 -0
- package/dist/angular/voice-proof-trends.service.d.ts +12 -0
- package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
- package/dist/angular/voice-provider-contracts.service.d.ts +12 -0
- package/dist/angular/voice-provider-status.service.d.ts +2 -2
- package/dist/angular/voice-readiness-failures.service.d.ts +13 -0
- package/dist/angular/voice-reconnect-profile-evidence.service.d.ts +12 -0
- package/dist/angular/voice-replay-timeline.service.d.ts +13 -0
- package/dist/angular/voice-routing-status.service.d.ts +11 -0
- package/dist/angular/voice-session-observability.service.d.ts +12 -0
- package/dist/angular/voice-session-snapshot.service.d.ts +13 -0
- package/dist/angular/voice-stream.service.d.ts +4 -1
- 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-widget.service.d.ts +18 -0
- package/dist/angular/voice-workflow-status.service.d.ts +2 -2
- package/dist/client/actions.d.ts +95 -1
- package/dist/client/agentSquadStatus.d.ts +37 -0
- package/dist/client/agentSquadStatusWidget.d.ts +24 -0
- package/dist/client/audioPlayer.d.ts +2 -2
- package/dist/client/bargeInMonitor.d.ts +7 -0
- package/dist/client/browserMedia.d.ts +8 -0
- package/dist/client/browserNoiseSuppression.d.ts +42 -0
- package/dist/client/browserVoiceSupport.d.ts +22 -0
- package/dist/client/callDebugger.d.ts +21 -0
- package/dist/client/callDebuggerWidget.d.ts +30 -0
- package/dist/client/callPlayer.d.ts +41 -0
- package/dist/client/campaignDialerProof.d.ts +25 -0
- package/dist/client/connection.d.ts +4 -3
- package/dist/client/controller.d.ts +1 -1
- package/dist/client/conversationAnalytics.d.ts +30 -0
- package/dist/client/costDashboard.d.ts +27 -0
- package/dist/client/createVoiceStream.d.ts +1 -1
- package/dist/client/deliveryRuntime.d.ts +36 -0
- package/dist/client/deliveryRuntimeWidget.d.ts +37 -0
- package/dist/client/duplex.d.ts +2 -2
- package/dist/client/htmx.d.ts +1 -1
- package/dist/client/htmxAttributes.d.ts +24 -0
- package/dist/client/htmxBootstrap.js +1029 -73
- package/dist/client/htmxDashboardRenderers.d.ts +71 -0
- package/dist/client/index.d.ts +106 -15
- package/dist/client/index.js +10494 -279
- package/dist/client/liveAgentConsole.d.ts +28 -0
- package/dist/client/liveCallViewer.d.ts +42 -0
- package/dist/client/liveOps.d.ts +22 -0
- package/dist/client/liveOpsWidget.d.ts +23 -0
- package/dist/client/liveTurnLatency.d.ts +41 -0
- package/dist/client/microphone.d.ts +4 -4
- package/dist/client/opsActionCenter.d.ts +56 -0
- package/dist/client/opsActionCenterWidget.d.ts +29 -0
- package/dist/client/opsActionHistory.d.ts +21 -0
- package/dist/client/opsActionHistoryWidget.d.ts +11 -0
- package/dist/client/opsStatus.d.ts +21 -0
- package/dist/client/opsStatusWidget.d.ts +10 -10
- package/dist/client/platformCoverage.d.ts +21 -0
- package/dist/client/platformCoverageWidget.d.ts +38 -0
- package/dist/client/profileComparison.d.ts +21 -0
- package/dist/client/profileComparisonWidget.d.ts +41 -0
- package/dist/client/profileSwitchRecommendation.d.ts +21 -0
- package/dist/client/profileSwitchRecommendationWidget.d.ts +12 -0
- package/dist/client/proofTrends.d.ts +21 -0
- package/dist/client/proofTrendsWidget.d.ts +38 -0
- package/dist/client/providerCapabilities.d.ts +21 -0
- package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
- package/dist/client/providerContracts.d.ts +21 -0
- package/dist/client/providerContractsWidget.d.ts +37 -0
- package/dist/client/providerSimulationControls.d.ts +33 -0
- package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
- package/dist/client/providerStatus.d.ts +5 -3
- package/dist/client/providerStatusWidget.d.ts +32 -0
- package/dist/client/reactiveSource.d.ts +8 -0
- package/dist/client/readinessFailures.d.ts +21 -0
- package/dist/client/readinessFailuresWidget.d.ts +42 -0
- package/dist/client/reconnectProfileEvidence.d.ts +21 -0
- package/dist/client/reconnectProfileEvidenceWidget.d.ts +39 -0
- package/dist/client/replayTimeline.d.ts +26 -0
- package/dist/client/routingStatus.d.ts +21 -0
- package/dist/client/routingStatusWidget.d.ts +32 -0
- package/dist/client/sessionObservability.d.ts +21 -0
- package/dist/client/sessionObservabilityWidget.d.ts +31 -0
- package/dist/client/sessionSnapshot.d.ts +23 -0
- package/dist/client/sessionSnapshotWidget.d.ts +33 -0
- package/dist/client/store.d.ts +1 -1
- package/dist/client/traceTimeline.d.ts +21 -0
- package/dist/client/traceTimelineWidget.d.ts +36 -0
- package/dist/client/turnLatency.d.ts +24 -0
- package/dist/client/turnLatencyWidget.d.ts +33 -0
- package/dist/client/turnQuality.d.ts +21 -0
- package/dist/client/turnQualityWidget.d.ts +32 -0
- package/dist/client/voiceWidgetView.d.ts +48 -0
- package/dist/client/workflowStatus.d.ts +5 -3
- package/dist/{agent.d.ts → core/agent.d.ts} +81 -6
- package/dist/core/agentPerformanceReport.d.ts +40 -0
- package/dist/core/agentSquadContract.d.ts +98 -0
- package/dist/core/agentState.d.ts +12 -0
- package/dist/core/agentTools.d.ts +132 -0
- package/dist/core/aiScorecard.d.ts +32 -0
- package/dist/core/aiVoiceModel.d.ts +15 -0
- package/dist/core/amdDetector.d.ts +25 -0
- package/dist/{assistant.d.ts → core/assistant.d.ts} +14 -14
- package/dist/core/assistantExperiment.d.ts +42 -0
- package/dist/{assistantHealth.d.ts → core/assistantHealth.d.ts} +9 -9
- package/dist/{assistantMemory.d.ts → core/assistantMemory.d.ts} +10 -10
- package/dist/core/assistantMode.d.ts +22 -0
- package/dist/{audioConditioning.d.ts → core/audioConditioning.d.ts} +2 -2
- package/dist/core/audit.d.ts +131 -0
- package/dist/core/auditDeliveryRoutes.d.ts +85 -0
- package/dist/core/auditExport.d.ts +34 -0
- package/dist/core/auditRoutes.d.ts +66 -0
- package/dist/core/auditSinks.d.ts +151 -0
- package/dist/core/backchannel.d.ts +18 -0
- package/dist/core/bargeInRoutes.d.ts +56 -0
- package/dist/core/bookingFlow.d.ts +43 -0
- package/dist/core/browserCallProfiles.d.ts +120 -0
- package/dist/core/browserMediaRoutes.d.ts +62 -0
- package/dist/core/calendarAdapter.d.ts +47 -0
- package/dist/core/calendarSlots.d.ts +35 -0
- package/dist/core/callDebugger.d.ts +66 -0
- package/dist/core/callDisposition.d.ts +38 -0
- package/dist/core/callQuota.d.ts +54 -0
- package/dist/core/callScorecard.d.ts +53 -0
- package/dist/core/callerCRMLinker.d.ts +29 -0
- package/dist/core/callerMemory.d.ts +37 -0
- package/dist/core/callingWindow.d.ts +26 -0
- package/dist/core/campaign.d.ts +795 -0
- package/dist/core/campaignControls.d.ts +37 -0
- package/dist/core/campaignDialers.d.ts +111 -0
- package/dist/core/campaignTemplate.d.ts +16 -0
- package/dist/core/competitiveCoverage.d.ts +141 -0
- package/dist/core/conversationSimulator.d.ts +73 -0
- package/dist/{correction.d.ts → core/correction.d.ts} +5 -4
- package/dist/core/costAccounting.d.ts +76 -0
- package/dist/core/costPredictor.d.ts +74 -0
- package/dist/core/crmCallLogger.d.ts +37 -0
- package/dist/core/crmContract.d.ts +70 -0
- package/dist/core/dataControl.d.ts +180 -0
- package/dist/core/defineVoiceAssistant.d.ts +68 -0
- package/dist/core/deliveryRuntime.d.ts +159 -0
- package/dist/core/deliverySinkRoutes.d.ts +117 -0
- package/dist/core/demoReadyRoutes.d.ts +98 -0
- package/dist/{diagnosticsRoutes.d.ts → core/diagnosticsRoutes.d.ts} +2 -2
- package/dist/core/dncRegistry.d.ts +38 -0
- package/dist/core/dtmfCollector.d.ts +37 -0
- package/dist/{evalRoutes.d.ts → core/evalRoutes.d.ts} +26 -20
- package/dist/{fileStore.d.ts → core/fileStore.d.ts} +34 -20
- package/dist/core/guardrails.d.ts +128 -0
- package/dist/{handoff.d.ts → core/handoff.d.ts} +10 -10
- package/dist/{handoffHealth.d.ts → core/handoffHealth.d.ts} +9 -9
- package/dist/core/holdAudio.d.ts +23 -0
- package/dist/{htmx.d.ts → core/htmx.d.ts} +2 -2
- package/dist/core/htmxDashboardRoutes.d.ts +250 -0
- package/dist/core/iceServers.d.ts +34 -0
- package/dist/core/incidentBundle.d.ts +119 -0
- package/dist/core/incidentTimeline.d.ts +260 -0
- package/dist/core/ivrPlan.d.ts +40 -0
- package/dist/core/latencySlo.d.ts +56 -0
- package/dist/core/liveCoach.d.ts +43 -0
- package/dist/core/liveLatency.d.ts +78 -0
- package/dist/core/liveOps.d.ts +190 -0
- package/dist/core/llmJudge.d.ts +45 -0
- package/dist/{logger.d.ts → core/logger.d.ts} +1 -2
- package/dist/core/mcpToolset.d.ts +58 -0
- package/dist/core/mediaPipelineRoutes.d.ts +171 -0
- package/dist/core/mediaPipelineSurfaces.d.ts +48 -0
- package/dist/{memoryStore.d.ts → core/memoryStore.d.ts} +1 -1
- package/dist/core/midCallSummary.d.ts +27 -0
- package/dist/{modelAdapters.d.ts → core/modelAdapters.d.ts} +59 -7
- package/dist/core/monitor.d.ts +148 -0
- package/dist/core/multilingualProof.d.ts +77 -0
- package/dist/core/noShowPredictor.d.ts +46 -0
- package/dist/core/oauth2TokenSource.d.ts +21 -0
- package/dist/core/observabilityExport.d.ts +501 -0
- package/dist/core/openaiTTS.d.ts +18 -0
- package/dist/core/operationalStatus.d.ts +87 -0
- package/dist/core/operationsRecord.d.ts +371 -0
- package/dist/{ops.d.ts → core/ops.d.ts} +70 -70
- package/dist/core/opsActionAuditRoutes.d.ts +99 -0
- package/dist/{opsConsoleRoutes.d.ts → core/opsConsoleRoutes.d.ts} +11 -8
- package/dist/{opsPresets.d.ts → core/opsPresets.d.ts} +2 -2
- package/dist/core/opsRecovery.d.ts +137 -0
- package/dist/{opsRuntime.d.ts → core/opsRuntime.d.ts} +6 -6
- package/dist/{opsSinks.d.ts → core/opsSinks.d.ts} +19 -19
- package/dist/core/opsStatus.d.ts +76 -0
- package/dist/core/opsStatusRoutes.d.ts +33 -0
- package/dist/{opsWebhook.d.ts → core/opsWebhook.d.ts} +15 -15
- package/dist/core/otelExporter.d.ts +83 -0
- package/dist/core/outcomeContract.d.ts +146 -0
- package/dist/{outcomeRecipes.d.ts → core/outcomeRecipes.d.ts} +4 -4
- package/dist/core/pathway.d.ts +94 -0
- package/dist/core/pathwayCompiler.d.ts +31 -0
- package/dist/core/pathwayGenerator.d.ts +27 -0
- package/dist/core/pathwayRuntime.d.ts +57 -0
- package/dist/core/pathwaySlotCollector.d.ts +29 -0
- package/dist/core/pathwayVisualizer.d.ts +8 -0
- package/dist/core/phoneAgent.d.ts +139 -0
- package/dist/core/phoneAgentProductionSmoke.d.ts +115 -0
- package/dist/core/phoneProvisioning.d.ts +29 -0
- package/dist/core/platformCoverage.d.ts +91 -0
- package/dist/{plugin.d.ts → core/plugin.d.ts} +2 -2
- package/dist/core/postCallAnalysis.d.ts +98 -0
- package/dist/core/postCallSurvey.d.ts +41 -0
- package/dist/{postgresStore.d.ts → core/postgresStore.d.ts} +20 -9
- package/dist/{presets.d.ts → core/presets.d.ts} +3 -3
- package/dist/core/productionReadiness.d.ts +757 -0
- package/dist/core/profileSwitchRecommendation.d.ts +350 -0
- package/dist/core/promptInjectionGuard.d.ts +30 -0
- package/dist/core/proofAssertions.d.ts +32 -0
- package/dist/core/proofPack.d.ts +211 -0
- package/dist/core/proofRunner.d.ts +79 -0
- package/dist/core/proofTrends.d.ts +966 -0
- package/dist/{providerAdapters.d.ts → core/providerAdapters.d.ts} +16 -5
- package/dist/core/providerCapabilities.d.ts +92 -0
- package/dist/core/providerDecisionTraces.d.ts +130 -0
- package/dist/{providerHealth.d.ts → core/providerHealth.d.ts} +15 -5
- package/dist/core/providerOrchestration.d.ts +109 -0
- package/dist/core/providerRouterTraces.d.ts +35 -0
- package/dist/core/providerRoutingContract.d.ts +71 -0
- package/dist/core/providerSlo.d.ts +142 -0
- package/dist/core/providerStackRecommendations.d.ts +188 -0
- package/dist/core/qualityDriftDetector.d.ts +44 -0
- package/dist/{qualityRoutes.d.ts → core/qualityRoutes.d.ts} +7 -7
- package/dist/{queue.d.ts → core/queue.d.ts} +48 -39
- package/dist/core/ragTool.d.ts +52 -0
- package/dist/core/readinessProfiles.d.ts +45 -0
- package/dist/core/realtimeChannel.d.ts +136 -0
- package/dist/core/realtimeProviderContracts.d.ts +133 -0
- package/dist/core/reconnectContract.d.ts +177 -0
- package/dist/core/recordingRedaction.d.ts +47 -0
- package/dist/core/recordingStore.d.ts +60 -0
- package/dist/core/redaction.d.ts +13 -0
- package/dist/core/reminderScheduler.d.ts +43 -0
- package/dist/{resilienceRoutes.d.ts → core/resilienceRoutes.d.ts} +45 -5
- package/dist/core/retention.d.ts +37 -0
- package/dist/core/retryPolicy.d.ts +38 -0
- package/dist/core/routeAuth.d.ts +58 -0
- package/dist/{routing.d.ts → core/routing.d.ts} +2 -2
- package/dist/{runtimeOps.d.ts → core/runtimeOps.d.ts} +3 -3
- package/dist/{s3Store.d.ts → core/s3Store.d.ts} +12 -3
- package/dist/core/scorecardCalibration.d.ts +31 -0
- package/dist/core/semanticTurn.d.ts +27 -0
- package/dist/{session.d.ts → core/session.d.ts} +1 -1
- package/dist/core/sessionObservability.d.ts +145 -0
- package/dist/{sessionReplay.d.ts → core/sessionReplay.d.ts} +31 -19
- package/dist/core/sessionSnapshot.d.ts +109 -0
- package/dist/core/simulationSuite.d.ts +144 -0
- package/dist/core/sloCalibration.d.ts +185 -0
- package/dist/{sqliteStore.d.ts → core/sqliteStore.d.ts} +20 -9
- package/dist/{store.d.ts → core/store.d.ts} +1 -1
- package/dist/core/supervisorPermissions.d.ts +33 -0
- package/dist/core/supervisorPresence.d.ts +49 -0
- package/dist/core/telephonyMediaRoutes.d.ts +72 -0
- package/dist/core/telephonyOutcome.d.ts +269 -0
- package/dist/core/toolContract.d.ts +161 -0
- package/dist/core/toolRuntime.d.ts +50 -0
- package/dist/{trace.d.ts → core/trace.d.ts} +61 -22
- package/dist/core/traceDeliveryRoutes.d.ts +86 -0
- package/dist/core/traceTimeline.d.ts +97 -0
- package/dist/core/transcriptAnnotator.d.ts +41 -0
- package/dist/{turnDetection.d.ts → core/turnDetection.d.ts} +1 -1
- package/dist/core/turnLatency.d.ts +95 -0
- package/dist/core/turnProfiles.d.ts +3 -0
- package/dist/core/turnQuality.d.ts +94 -0
- package/dist/{types.d.ts → core/types.d.ts} +416 -81
- package/dist/core/vapiAdapter.d.ts +160 -0
- package/dist/core/variableAnalytics.d.ts +47 -0
- package/dist/core/voiceConfiguration.d.ts +8 -0
- package/dist/core/voiceMonitoring.d.ts +444 -0
- package/dist/core/webhookFanout.d.ts +48 -0
- package/dist/core/webhookVerification.d.ts +27 -0
- package/dist/core/whisperChannel.d.ts +50 -0
- package/dist/{workflowContract.d.ts → core/workflowContract.d.ts} +21 -21
- package/dist/core/zeroDataRetention.d.ts +31 -0
- package/dist/drizzle/assistantMemory.d.ts +112 -0
- package/dist/drizzle/eval.d.ts +61 -0
- package/dist/drizzle/handoff.d.ts +62 -0
- package/dist/drizzle/incidentBundle.d.ts +61 -0
- package/dist/drizzle/index.d.ts +1105 -0
- package/dist/drizzle/index.js +3059 -0
- package/dist/drizzle/observabilityExport.d.ts +61 -0
- package/dist/drizzle/proofTrends.d.ts +126 -0
- package/dist/drizzle/runtimeStorage.d.ts +1315 -0
- package/dist/drizzle/shared.d.ts +76 -0
- package/dist/embed/index.d.ts +38 -0
- package/dist/embed/index.js +1710 -0
- package/dist/embed/voice-widget.js +10 -0
- package/dist/index.d.ts +369 -74
- package/dist/index.js +45779 -7413
- package/dist/internal/evidence.d.ts +10 -0
- package/dist/internal/html.d.ts +6 -0
- package/dist/internal/status.d.ts +7 -0
- package/dist/react/VoiceAgentSquadStatus.d.ts +5 -0
- package/dist/react/VoiceCallDebuggerLaunch.d.ts +6 -0
- package/dist/react/VoiceCallPlayer.d.ts +11 -0
- package/dist/react/VoiceCostDashboard.d.ts +10 -0
- package/dist/react/VoiceDeliveryRuntime.d.ts +7 -0
- package/dist/react/VoiceLiveAgentConsole.d.ts +11 -0
- package/dist/react/VoiceLiveCallViewer.d.ts +9 -0
- package/dist/react/VoiceOpsActionCenter.d.ts +5 -0
- package/dist/react/VoiceOpsStatus.d.ts +1 -1
- package/dist/react/VoicePlatformCoverage.d.ts +6 -0
- package/dist/react/VoiceProfileComparison.d.ts +6 -0
- package/dist/react/VoiceProfileSwitchRecommendation.d.ts +6 -0
- package/dist/react/VoiceProofTrends.d.ts +6 -0
- package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
- package/dist/react/VoiceProviderContracts.d.ts +6 -0
- package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
- package/dist/react/VoiceProviderStatus.d.ts +6 -0
- package/dist/react/VoiceReadinessFailures.d.ts +6 -0
- package/dist/react/VoiceReconnectProfileEvidence.d.ts +6 -0
- package/dist/react/VoiceReplayTimeline.d.ts +6 -0
- package/dist/react/VoiceRoutingStatus.d.ts +6 -0
- package/dist/react/VoiceSessionObservability.d.ts +6 -0
- package/dist/react/VoiceSessionSnapshot.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/VoiceWidget.d.ts +13 -0
- package/dist/react/index.d.ts +80 -6
- package/dist/react/index.js +12900 -320
- package/dist/react/useVoiceAgentSquadStatus.d.ts +8 -0
- package/dist/react/useVoiceCallDebugger.d.ts +8 -0
- package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
- package/dist/react/useVoiceController.d.ts +4 -1
- package/dist/react/useVoiceDeliveryRuntime.d.ts +13 -0
- package/dist/react/useVoiceLiveOps.d.ts +9 -0
- package/dist/react/useVoiceOpsActionCenter.d.ts +11 -0
- package/dist/react/useVoiceOpsStatus.d.ts +8 -0
- package/dist/react/useVoicePlatformCoverage.d.ts +8 -0
- package/dist/react/useVoiceProfileComparison.d.ts +8 -0
- package/dist/react/useVoiceProfileSwitchRecommendation.d.ts +8 -0
- package/dist/react/useVoiceProofTrends.d.ts +8 -0
- package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
- package/dist/react/useVoiceProviderContracts.d.ts +8 -0
- package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
- package/dist/react/useVoiceProviderStatus.d.ts +1 -1
- package/dist/react/useVoiceReadinessFailures.d.ts +8 -0
- package/dist/react/useVoiceReconnectProfileEvidence.d.ts +8 -0
- package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/react/useVoiceSessionObservability.d.ts +8 -0
- package/dist/react/useVoiceSessionSnapshot.d.ts +9 -0
- package/dist/react/useVoiceStream.d.ts +4 -1
- 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 +1 -1
- package/dist/svelte/createVoiceAgentSquadStatus.d.ts +9 -0
- package/dist/svelte/createVoiceCallDebugger.d.ts +10 -0
- package/dist/svelte/createVoiceCallPlayer.d.ts +33 -0
- package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
- package/dist/svelte/createVoiceCostDashboard.d.ts +13 -0
- package/dist/svelte/createVoiceDeliveryRuntime.d.ts +11 -0
- package/dist/svelte/createVoiceLiveAgentConsole.d.ts +23 -0
- package/dist/svelte/createVoiceLiveCallViewer.d.ts +26 -0
- package/dist/svelte/createVoiceLiveOps.d.ts +13 -0
- package/dist/svelte/createVoiceOpsActionCenter.d.ts +10 -0
- package/dist/svelte/createVoiceOpsStatus.d.ts +4 -4
- package/dist/svelte/createVoicePlatformCoverage.d.ts +7 -0
- package/dist/svelte/createVoiceProfileComparison.d.ts +7 -0
- package/dist/svelte/createVoiceProofTrends.d.ts +7 -0
- package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
- package/dist/svelte/createVoiceProviderContracts.d.ts +10 -0
- package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
- package/dist/svelte/createVoiceProviderStatus.d.ts +5 -3
- package/dist/svelte/createVoiceReadinessFailures.d.ts +7 -0
- package/dist/svelte/createVoiceReconnectProfileEvidence.d.ts +7 -0
- package/dist/svelte/createVoiceReplayTimeline.d.ts +13 -0
- package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
- package/dist/svelte/createVoiceSessionObservability.d.ts +10 -0
- package/dist/svelte/createVoiceSessionSnapshot.d.ts +11 -0
- package/dist/svelte/createVoiceStream.d.ts +1 -1
- 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/createVoiceWidget.d.ts +19 -0
- package/dist/svelte/createVoiceWorkflowStatus.d.ts +2 -2
- package/dist/svelte/index.d.ts +37 -6
- package/dist/svelte/index.js +7047 -768
- package/dist/telephony/contract.d.ts +61 -0
- package/dist/telephony/matrix.d.ts +97 -0
- package/dist/telephony/plivo.d.ts +303 -0
- package/dist/telephony/response.d.ts +1 -1
- package/dist/telephony/security.d.ts +182 -0
- package/dist/telephony/telnyx.d.ts +291 -0
- package/dist/telephony/twilio.d.ts +149 -15
- package/dist/testing/accuracy.d.ts +1 -1
- package/dist/testing/benchmark.d.ts +15 -15
- package/dist/testing/corrected.d.ts +9 -9
- package/dist/testing/duplex.d.ts +5 -5
- package/dist/testing/fixtures.d.ts +4 -4
- package/dist/testing/index.d.ts +13 -13
- package/dist/testing/index.js +5756 -636
- package/dist/testing/ioProviderSimulator.d.ts +5 -5
- package/dist/testing/providerSimulator.d.ts +5 -5
- package/dist/testing/review.d.ts +8 -8
- package/dist/testing/sessionBenchmark.d.ts +13 -13
- package/dist/testing/stt.d.ts +3 -3
- package/dist/testing/telephony.d.ts +27 -2
- package/dist/testing/tts.d.ts +2 -2
- package/dist/vue/VoiceCallDebuggerLaunch.d.ts +72 -0
- package/dist/vue/VoiceCallPlayer.d.ts +40 -0
- package/dist/vue/VoiceCostDashboard.d.ts +57 -0
- package/dist/vue/VoiceDeliveryRuntime.d.ts +34 -0
- package/dist/vue/VoiceLiveAgentConsole.d.ts +50 -0
- package/dist/vue/VoiceLiveCallViewer.d.ts +35 -0
- package/dist/vue/VoiceOpsActionCenter.d.ts +13 -0
- package/dist/vue/VoiceOpsStatus.d.ts +4 -0
- package/dist/vue/VoicePlatformCoverage.d.ts +27 -0
- package/dist/vue/VoiceProofTrends.d.ts +25 -0
- package/dist/vue/VoiceProviderCapabilities.d.ts +55 -0
- package/dist/vue/VoiceProviderContracts.d.ts +25 -0
- package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
- package/dist/vue/VoiceProviderStatus.d.ts +55 -0
- package/dist/vue/VoiceReadinessFailures.d.ts +25 -0
- package/dist/vue/VoiceReconnectProfileEvidence.d.ts +25 -0
- package/dist/vue/VoiceReplayTimeline.d.ts +17 -0
- package/dist/vue/VoiceRoutingStatus.d.ts +55 -0
- package/dist/vue/VoiceSessionObservability.d.ts +27 -0
- package/dist/vue/VoiceSessionSnapshot.d.ts +72 -0
- package/dist/vue/VoiceTurnLatency.d.ts +73 -0
- package/dist/vue/VoiceTurnQuality.d.ts +55 -0
- package/dist/vue/VoiceWidget.d.ts +77 -0
- package/dist/vue/index.d.ts +49 -6
- package/dist/vue/index.js +12193 -402
- package/dist/vue/useVoiceAgentSquadStatus.d.ts +9 -0
- package/dist/vue/useVoiceCallDebugger.d.ts +10 -0
- package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
- package/dist/vue/useVoiceController.d.ts +9 -7
- package/dist/vue/useVoiceDeliveryRuntime.d.ts +13 -0
- package/dist/vue/useVoiceLiveOps.d.ts +9 -0
- package/dist/vue/useVoiceOpsActionCenter.d.ts +11 -0
- package/dist/vue/useVoiceOpsStatus.d.ts +9 -0
- package/dist/vue/useVoicePlatformCoverage.d.ts +9 -0
- package/dist/vue/useVoiceProfileComparison.d.ts +9 -0
- package/dist/vue/useVoiceProofTrends.d.ts +9 -0
- package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
- package/dist/vue/useVoiceProviderContracts.d.ts +9 -0
- package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
- package/dist/vue/useVoiceProviderStatus.d.ts +3 -3
- package/dist/vue/useVoiceReadinessFailures.d.ts +959 -0
- package/dist/vue/useVoiceReconnectProfileEvidence.d.ts +9 -0
- package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/vue/useVoiceSessionObservability.d.ts +9 -0
- package/dist/vue/useVoiceSessionSnapshot.d.ts +10 -0
- package/dist/vue/useVoiceStream.d.ts +9 -6
- 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 +3 -3
- package/package.json +154 -256
- package/dist/angular/voice-app-kit-status.service.d.ts +0 -12
- package/dist/angular/voice-ops-status.component.d.ts +0 -15
- package/dist/appKit.d.ts +0 -92
- package/dist/client/appKitStatus.d.ts +0 -19
- package/dist/react/useVoiceAppKitStatus.d.ts +0 -8
- package/dist/svelte/createVoiceAppKitStatus.d.ts +0 -8
- package/dist/turnProfiles.d.ts +0 -6
- package/dist/vue/useVoiceAppKitStatus.d.ts +0 -9
- package/fixtures/README.md +0 -57
- package/fixtures/manifest.json +0 -199
- package/fixtures/pcm/dialogue-three-clean.pcm +0 -0
- package/fixtures/pcm/dialogue-three-mixed.pcm +0 -0
- package/fixtures/pcm/dialogue-two-clean.pcm +0 -0
- package/fixtures/pcm/dialogue-two-noisy.pcm +0 -0
- package/fixtures/pcm/multiturn-three-mixed.pcm +0 -0
- package/fixtures/pcm/multiturn-two-clean.pcm +0 -0
- package/fixtures/pcm/quietly-alone-clean.pcm +0 -0
- package/fixtures/pcm/rainstorms-noisy.pcm +0 -0
- package/fixtures/pcm/stella-bulgaria-bulgarian20.pcm +0 -0
- package/fixtures/pcm/stella-ghana-english507.pcm +0 -0
- package/fixtures/pcm/stella-india-english37.pcm +0 -0
- package/fixtures/pcm/stella-jamaica-jamaican-creole-english1.pcm +0 -0
- package/fixtures/pcm/stella-liberia-liberian-pidgin-english2.pcm +0 -0
- package/fixtures/pcm/stella-pakistan-english519.pcm +0 -0
- package/fixtures/pcm/stella-sierra-leone-krio5.pcm +0 -0
- package/fixtures/pcm/stella-singapore-english655.pcm +0 -0
- package/fixtures/pcm/traveled-back-route-clean.pcm +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { VoiceCampaign, VoiceCampaignAttemptStatus, VoiceCampaignRecipient, VoiceCampaignRecord, VoiceCampaignTimeWindow } from "./campaign";
|
|
2
|
+
export type VoiceCampaignDisposition = "answered" | "busy" | "failed" | "no-answer" | "voicemail";
|
|
3
|
+
export type VoiceCampaignDispositionRetryRule = {
|
|
4
|
+
backoffMs?: number;
|
|
5
|
+
maxAttempts?: number;
|
|
6
|
+
retry?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type VoiceCampaignDispositionRetryPolicy = Partial<Record<VoiceCampaignDisposition, VoiceCampaignDispositionRetryRule>>;
|
|
9
|
+
export type VoiceDNCList = {
|
|
10
|
+
contains: (phone: string) => boolean | Promise<boolean>;
|
|
11
|
+
};
|
|
12
|
+
export declare const createInMemoryDNCList: (phones: ReadonlyArray<string>) => VoiceDNCList;
|
|
13
|
+
export declare const isPhoneOnDNC: (phone: string, list: VoiceDNCList) => Promise<boolean>;
|
|
14
|
+
export declare const normalizePhoneNumber: (phone: string) => string;
|
|
15
|
+
export type VoiceCampaignWindowCheckInput = {
|
|
16
|
+
now?: Date;
|
|
17
|
+
window: VoiceCampaignTimeWindow;
|
|
18
|
+
};
|
|
19
|
+
export declare const isWithinCampaignWindow: (input: VoiceCampaignWindowCheckInput) => boolean;
|
|
20
|
+
export declare const shouldRetryCampaignAttempt: (input: {
|
|
21
|
+
attempts: number;
|
|
22
|
+
campaign: Pick<VoiceCampaign, "maxAttempts">;
|
|
23
|
+
disposition?: VoiceCampaignDisposition;
|
|
24
|
+
policy?: VoiceCampaignDispositionRetryPolicy;
|
|
25
|
+
}) => {
|
|
26
|
+
backoffMs?: number;
|
|
27
|
+
retry: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type VoiceCampaignDispositionSummary = {
|
|
30
|
+
attempts: number;
|
|
31
|
+
byDisposition: Partial<Record<VoiceCampaignDisposition, number>>;
|
|
32
|
+
byStatus: Record<VoiceCampaignAttemptStatus, number>;
|
|
33
|
+
campaignId: string;
|
|
34
|
+
recipientsByStatus: Record<VoiceCampaignRecipient["status"], number>;
|
|
35
|
+
totalRecipients: number;
|
|
36
|
+
};
|
|
37
|
+
export declare const summarizeVoiceCampaignDispositions: (record: VoiceCampaignRecord) => VoiceCampaignDispositionSummary;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { applyVoiceCampaignTelephonyOutcome, VoiceCampaignDialer, VoiceCampaignDialerInput, type VoiceCampaignRecord, type VoiceCampaignStore, type VoiceCampaignTickResult } from "./campaign";
|
|
2
|
+
type VoiceCampaignDialerFetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
3
|
+
type VoiceCampaignDialerMetadataInput = VoiceCampaignDialerInput & {
|
|
4
|
+
provider: "plivo" | "telnyx" | "twilio";
|
|
5
|
+
};
|
|
6
|
+
type VoiceCampaignDialerMetadata = Record<string, string | number | boolean | undefined> | ((input: VoiceCampaignDialerMetadataInput) => Record<string, string | number | boolean | undefined> | Promise<Record<string, string | number | boolean | undefined>>);
|
|
7
|
+
type VoiceCampaignURLInput = {
|
|
8
|
+
attempt: VoiceCampaignDialerInput["attempt"];
|
|
9
|
+
campaign: VoiceCampaignDialerInput["campaign"];
|
|
10
|
+
recipient: VoiceCampaignDialerInput["recipient"];
|
|
11
|
+
};
|
|
12
|
+
type VoiceCampaignURLResolver = string | ((input: VoiceCampaignURLInput) => string | Promise<string>);
|
|
13
|
+
export type VoiceTwilioCampaignDialerOptions = {
|
|
14
|
+
accountSid: string;
|
|
15
|
+
answerMethod?: "GET" | "POST";
|
|
16
|
+
answerUrl: VoiceCampaignURLResolver;
|
|
17
|
+
apiBaseUrl?: string;
|
|
18
|
+
authToken: string;
|
|
19
|
+
fetch?: VoiceCampaignDialerFetch;
|
|
20
|
+
from: string;
|
|
21
|
+
machineDetection?: string;
|
|
22
|
+
metadata?: VoiceCampaignDialerMetadata;
|
|
23
|
+
statusCallbackEvents?: string[];
|
|
24
|
+
statusCallbackMethod?: "GET" | "POST";
|
|
25
|
+
statusCallbackUrl?: VoiceCampaignURLResolver;
|
|
26
|
+
};
|
|
27
|
+
export type VoiceTelnyxCampaignDialerOptions = {
|
|
28
|
+
apiBaseUrl?: string;
|
|
29
|
+
apiKey: string;
|
|
30
|
+
clientState?: VoiceCampaignDialerMetadata;
|
|
31
|
+
connectionId: string;
|
|
32
|
+
fetch?: VoiceCampaignDialerFetch;
|
|
33
|
+
from: string;
|
|
34
|
+
webhookUrl?: VoiceCampaignURLResolver;
|
|
35
|
+
webhookUrlMethod?: "GET" | "POST";
|
|
36
|
+
};
|
|
37
|
+
export type VoicePlivoCampaignDialerOptions = {
|
|
38
|
+
answerMethod?: "GET" | "POST";
|
|
39
|
+
answerUrl: VoiceCampaignURLResolver;
|
|
40
|
+
apiBaseUrl?: string;
|
|
41
|
+
authId: string;
|
|
42
|
+
authToken: string;
|
|
43
|
+
callbackMethod?: "GET" | "POST";
|
|
44
|
+
callbackUrl?: VoiceCampaignURLResolver;
|
|
45
|
+
fetch?: VoiceCampaignDialerFetch;
|
|
46
|
+
from: string;
|
|
47
|
+
metadata?: VoiceCampaignDialerMetadata;
|
|
48
|
+
};
|
|
49
|
+
export type VoiceCampaignDialerProofProvider = "plivo" | "telnyx" | "twilio";
|
|
50
|
+
export type VoiceCampaignDialerProofCarrierRequest = {
|
|
51
|
+
body: unknown;
|
|
52
|
+
method: string;
|
|
53
|
+
provider: VoiceCampaignDialerProofProvider;
|
|
54
|
+
url: string;
|
|
55
|
+
};
|
|
56
|
+
export type VoiceCampaignDialerProofProviderResult = {
|
|
57
|
+
campaignId: string;
|
|
58
|
+
carrierRequests: VoiceCampaignDialerProofCarrierRequest[];
|
|
59
|
+
final?: VoiceCampaignRecord;
|
|
60
|
+
outcomes: Awaited<ReturnType<typeof applyVoiceCampaignTelephonyOutcome>>[];
|
|
61
|
+
provider: VoiceCampaignDialerProofProvider;
|
|
62
|
+
tick: VoiceCampaignTickResult;
|
|
63
|
+
};
|
|
64
|
+
export type VoiceCampaignDialerProofReport = {
|
|
65
|
+
generatedAt: number;
|
|
66
|
+
mode: "dry-run";
|
|
67
|
+
ok: boolean;
|
|
68
|
+
providers: VoiceCampaignDialerProofProviderResult[];
|
|
69
|
+
};
|
|
70
|
+
export type VoiceCampaignDialerProofStatus = {
|
|
71
|
+
generatedAt: number;
|
|
72
|
+
mode: "dry-run";
|
|
73
|
+
ok: boolean;
|
|
74
|
+
providers: VoiceCampaignDialerProofProvider[];
|
|
75
|
+
runPath?: string;
|
|
76
|
+
safe: true;
|
|
77
|
+
};
|
|
78
|
+
export type VoiceCampaignDialerProofOptions = {
|
|
79
|
+
baseUrl?: string;
|
|
80
|
+
from?: string;
|
|
81
|
+
providers?: VoiceCampaignDialerProofProvider[];
|
|
82
|
+
runPath?: string;
|
|
83
|
+
store?: VoiceCampaignStore;
|
|
84
|
+
};
|
|
85
|
+
export type VoiceCampaignDialerProofAssertionInput = {
|
|
86
|
+
maxFailedProviders?: number;
|
|
87
|
+
minCarrierRequests?: number;
|
|
88
|
+
minProviders?: number;
|
|
89
|
+
minSuccessfulOutcomes?: number;
|
|
90
|
+
requiredProviders?: VoiceCampaignDialerProofProvider[];
|
|
91
|
+
requireDryRun?: boolean;
|
|
92
|
+
requireOk?: boolean;
|
|
93
|
+
};
|
|
94
|
+
export type VoiceCampaignDialerProofAssertionReport = {
|
|
95
|
+
carrierRequests: number;
|
|
96
|
+
failedProviders: number;
|
|
97
|
+
issues: string[];
|
|
98
|
+
mode: VoiceCampaignDialerProofReport["mode"];
|
|
99
|
+
ok: boolean;
|
|
100
|
+
providers: VoiceCampaignDialerProofProvider[];
|
|
101
|
+
successfulOutcomes: number;
|
|
102
|
+
totalProviders: number;
|
|
103
|
+
};
|
|
104
|
+
export declare const createVoicePlivoCampaignDialer: (options: VoicePlivoCampaignDialerOptions) => VoiceCampaignDialer;
|
|
105
|
+
export declare const createVoiceTelnyxCampaignDialer: (options: VoiceTelnyxCampaignDialerOptions) => VoiceCampaignDialer;
|
|
106
|
+
export declare const createVoiceTwilioCampaignDialer: (options: VoiceTwilioCampaignDialerOptions) => VoiceCampaignDialer;
|
|
107
|
+
export declare const assertVoiceCampaignDialerProofEvidence: (report: VoiceCampaignDialerProofReport, input?: VoiceCampaignDialerProofAssertionInput) => VoiceCampaignDialerProofAssertionReport;
|
|
108
|
+
export declare const evaluateVoiceCampaignDialerProofEvidence: (report: VoiceCampaignDialerProofReport, input?: VoiceCampaignDialerProofAssertionInput) => VoiceCampaignDialerProofAssertionReport;
|
|
109
|
+
export declare const getVoiceCampaignDialerProofStatus: (options?: Pick<VoiceCampaignDialerProofOptions, "providers" | "runPath">) => VoiceCampaignDialerProofStatus;
|
|
110
|
+
export declare const runVoiceCampaignDialerProof: (options?: VoiceCampaignDialerProofOptions) => Promise<VoiceCampaignDialerProofReport>;
|
|
111
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type VoiceCampaignTemplateValue = string | number | boolean | null | undefined;
|
|
2
|
+
export type VoiceCampaignTemplateScope = Record<string, VoiceCampaignTemplateValue | Record<string, VoiceCampaignTemplateValue>>;
|
|
3
|
+
export type VoiceCampaignTemplateFilter = (value: VoiceCampaignTemplateValue, ...args: string[]) => VoiceCampaignTemplateValue;
|
|
4
|
+
export type VoiceCampaignTemplateResolveResult = {
|
|
5
|
+
output: string;
|
|
6
|
+
missingVariables: string[];
|
|
7
|
+
};
|
|
8
|
+
export type ResolveVoiceCampaignTemplateOptions = {
|
|
9
|
+
scope: VoiceCampaignTemplateScope;
|
|
10
|
+
filters?: Record<string, VoiceCampaignTemplateFilter>;
|
|
11
|
+
fallback?: string;
|
|
12
|
+
strict?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const DEFAULT_VOICE_CAMPAIGN_TEMPLATE_FILTERS: Record<string, VoiceCampaignTemplateFilter>;
|
|
15
|
+
export declare const collectVoiceCampaignTemplateVariables: (template: string) => string[];
|
|
16
|
+
export declare const resolveVoiceCampaignTemplate: (template: string, options: ResolveVoiceCampaignTemplateOptions) => VoiceCampaignTemplateResolveResult;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
export type VoiceCompetitiveCoverageStatus = "fail" | "pass" | "warn";
|
|
3
|
+
export type VoiceCompetitiveCoverageLevel = "covered" | "intentional-gap" | "missing" | "partial";
|
|
4
|
+
export type VoiceCompetitiveDepthLevel = "advantage" | "covered" | "intentional-gap" | "lag" | "parity";
|
|
5
|
+
export type VoiceCompetitiveEvidence = {
|
|
6
|
+
href?: string;
|
|
7
|
+
kind?: "docs" | "example" | "failure-replay" | "operations-record" | "proof" | "readiness" | "route" | "test";
|
|
8
|
+
name: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
status?: "fail" | "pass" | "warn";
|
|
11
|
+
};
|
|
12
|
+
export type VoiceCompetitiveSurface = {
|
|
13
|
+
buyerNeed?: string;
|
|
14
|
+
competitors?: string[];
|
|
15
|
+
coverage: VoiceCompetitiveCoverageLevel;
|
|
16
|
+
depth: VoiceCompetitiveDepthLevel;
|
|
17
|
+
evidence?: VoiceCompetitiveEvidence[];
|
|
18
|
+
frameworkPrimitives?: string[];
|
|
19
|
+
operationsRecord?: "linked" | "not-applicable" | "required" | "unknown";
|
|
20
|
+
readinessGate?: "not-applicable" | "present" | "recommended" | "required" | "unknown";
|
|
21
|
+
remainingGap?: string;
|
|
22
|
+
status?: VoiceCompetitiveCoverageStatus;
|
|
23
|
+
surface: string;
|
|
24
|
+
why: string;
|
|
25
|
+
nextMove?: string;
|
|
26
|
+
};
|
|
27
|
+
export type VoiceCompetitiveCoverageReportInput = {
|
|
28
|
+
generatedAt?: string;
|
|
29
|
+
marketCoverageEstimate?: string;
|
|
30
|
+
notes?: string[];
|
|
31
|
+
source?: string;
|
|
32
|
+
surfaces: VoiceCompetitiveSurface[];
|
|
33
|
+
vapiCoverageEstimate?: string;
|
|
34
|
+
};
|
|
35
|
+
export type VoiceCompetitiveCoverageSummary = {
|
|
36
|
+
advantage: number;
|
|
37
|
+
covered: number;
|
|
38
|
+
failed: number;
|
|
39
|
+
intentionalGaps: number;
|
|
40
|
+
missing: number;
|
|
41
|
+
parity: number;
|
|
42
|
+
passed: number;
|
|
43
|
+
surfaces: number;
|
|
44
|
+
warned: number;
|
|
45
|
+
};
|
|
46
|
+
export type VoiceCompetitiveCoverageIssue = {
|
|
47
|
+
code: string;
|
|
48
|
+
message: string;
|
|
49
|
+
severity: "error" | "warning";
|
|
50
|
+
surface?: string;
|
|
51
|
+
};
|
|
52
|
+
export type VoiceCompetitiveCoverageReport = {
|
|
53
|
+
generatedAt: string;
|
|
54
|
+
issues: VoiceCompetitiveCoverageIssue[];
|
|
55
|
+
marketCoverageEstimate: string;
|
|
56
|
+
notes: string[];
|
|
57
|
+
ok: boolean;
|
|
58
|
+
source?: string;
|
|
59
|
+
status: VoiceCompetitiveCoverageStatus;
|
|
60
|
+
summary: VoiceCompetitiveCoverageSummary;
|
|
61
|
+
surfaces: Array<VoiceCompetitiveSurface & {
|
|
62
|
+
status: VoiceCompetitiveCoverageStatus;
|
|
63
|
+
}>;
|
|
64
|
+
vapiCoverageEstimate: string;
|
|
65
|
+
};
|
|
66
|
+
export type VoiceCompetitiveCoverageAssertionInput = {
|
|
67
|
+
maxFailedSurfaces?: number;
|
|
68
|
+
maxMissingSurfaces?: number;
|
|
69
|
+
minAdvantageSurfaces?: number;
|
|
70
|
+
minSurfaces?: number;
|
|
71
|
+
requireOperationsRecordLinks?: boolean;
|
|
72
|
+
requirePass?: boolean;
|
|
73
|
+
requireReadinessGates?: boolean;
|
|
74
|
+
requiredEvidence?: string[];
|
|
75
|
+
requiredSurfaces?: string[];
|
|
76
|
+
};
|
|
77
|
+
export type VoiceCompetitiveCoverageAssertionReport = {
|
|
78
|
+
advantage: number;
|
|
79
|
+
failed: number;
|
|
80
|
+
issues: string[];
|
|
81
|
+
missing: number;
|
|
82
|
+
ok: boolean;
|
|
83
|
+
status: VoiceCompetitiveCoverageStatus;
|
|
84
|
+
surfaces: string[];
|
|
85
|
+
total: number;
|
|
86
|
+
};
|
|
87
|
+
export type VoiceCompetitiveCoverageRoutesOptions = {
|
|
88
|
+
headers?: HeadersInit;
|
|
89
|
+
htmlPath?: false | string;
|
|
90
|
+
markdownPath?: false | string;
|
|
91
|
+
name?: string;
|
|
92
|
+
path?: string;
|
|
93
|
+
render?: (report: VoiceCompetitiveCoverageReport) => Promise<string> | string;
|
|
94
|
+
source: (() => Promise<VoiceCompetitiveCoverageReport | VoiceCompetitiveCoverageReportInput> | VoiceCompetitiveCoverageReport | VoiceCompetitiveCoverageReportInput) | VoiceCompetitiveCoverageReport | VoiceCompetitiveCoverageReportInput;
|
|
95
|
+
title?: string;
|
|
96
|
+
};
|
|
97
|
+
export declare const assertVoiceCompetitiveCoverage: (report: VoiceCompetitiveCoverageReport, input?: VoiceCompetitiveCoverageAssertionInput) => VoiceCompetitiveCoverageAssertionReport;
|
|
98
|
+
export declare const buildVoiceCompetitiveCoverageReport: (input: VoiceCompetitiveCoverageReportInput) => VoiceCompetitiveCoverageReport;
|
|
99
|
+
export declare const evaluateVoiceCompetitiveCoverage: (report: VoiceCompetitiveCoverageReport, input?: VoiceCompetitiveCoverageAssertionInput) => VoiceCompetitiveCoverageAssertionReport;
|
|
100
|
+
export declare const renderVoiceCompetitiveCoverageHTML: (report: VoiceCompetitiveCoverageReport, title?: string) => string;
|
|
101
|
+
export declare const renderVoiceCompetitiveCoverageMarkdown: (report: VoiceCompetitiveCoverageReport, title?: string) => string;
|
|
102
|
+
export declare const createVoiceCompetitiveCoverageRoutes: (options: VoiceCompetitiveCoverageRoutesOptions) => Elysia<"", {
|
|
103
|
+
decorator: {};
|
|
104
|
+
store: {};
|
|
105
|
+
derive: {};
|
|
106
|
+
resolve: {};
|
|
107
|
+
}, {
|
|
108
|
+
typebox: {};
|
|
109
|
+
error: {};
|
|
110
|
+
}, {
|
|
111
|
+
schema: {};
|
|
112
|
+
standaloneSchema: {};
|
|
113
|
+
macro: {};
|
|
114
|
+
macroFn: {};
|
|
115
|
+
parser: {};
|
|
116
|
+
response: {};
|
|
117
|
+
}, {
|
|
118
|
+
[x: string]: {
|
|
119
|
+
get: {
|
|
120
|
+
body: unknown;
|
|
121
|
+
params: {};
|
|
122
|
+
query: unknown;
|
|
123
|
+
headers: unknown;
|
|
124
|
+
response: {
|
|
125
|
+
200: Response;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
}, {
|
|
130
|
+
derive: {};
|
|
131
|
+
resolve: {};
|
|
132
|
+
schema: {};
|
|
133
|
+
standaloneSchema: {};
|
|
134
|
+
response: {};
|
|
135
|
+
}, {
|
|
136
|
+
derive: {};
|
|
137
|
+
resolve: {};
|
|
138
|
+
schema: {};
|
|
139
|
+
standaloneSchema: {};
|
|
140
|
+
response: {};
|
|
141
|
+
}>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { VoiceAgent, VoiceAgentRunResult } from "./agent";
|
|
2
|
+
import type { VoiceSessionRecord } from "./types";
|
|
3
|
+
export type VoiceSimulatedSpeaker = "caller" | "agent";
|
|
4
|
+
export type VoiceSimulatedTurn = {
|
|
5
|
+
role: VoiceSimulatedSpeaker;
|
|
6
|
+
text: string;
|
|
7
|
+
at: number;
|
|
8
|
+
};
|
|
9
|
+
export type VoiceSimulatorCallerReply = {
|
|
10
|
+
text: string;
|
|
11
|
+
/** When true the synthetic caller ends the call after this utterance. */
|
|
12
|
+
done?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type VoiceSimulatorCallerModel = (input: {
|
|
15
|
+
persona: string;
|
|
16
|
+
transcript: ReadonlyArray<VoiceSimulatedTurn>;
|
|
17
|
+
turnIndex: number;
|
|
18
|
+
}) => Promise<VoiceSimulatorCallerReply> | VoiceSimulatorCallerReply;
|
|
19
|
+
export type VoiceSimulatorCaller = {
|
|
20
|
+
kind: "script";
|
|
21
|
+
/** Fixed caller utterances, delivered in order. */
|
|
22
|
+
utterances: ReadonlyArray<string>;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "model";
|
|
25
|
+
/** System description of who the caller is and what they want. */
|
|
26
|
+
persona: string;
|
|
27
|
+
model: VoiceSimulatorCallerModel;
|
|
28
|
+
/** Hard cap on caller turns (defaults to maxTurns). */
|
|
29
|
+
maxCallerTurns?: number;
|
|
30
|
+
};
|
|
31
|
+
export type VoiceConversationSimulationEndedReason = "agent-complete" | "caller-hung-up" | "max-turns" | "script-exhausted";
|
|
32
|
+
export type VoiceConversationSimulationResult<TResult = unknown> = {
|
|
33
|
+
transcript: VoiceSimulatedTurn[];
|
|
34
|
+
turnCount: number;
|
|
35
|
+
endedReason: VoiceConversationSimulationEndedReason;
|
|
36
|
+
agentResults: VoiceAgentRunResult<TResult>[];
|
|
37
|
+
};
|
|
38
|
+
export type RunVoiceConversationSimulationInput<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
39
|
+
agent: Pick<VoiceAgent<TContext, TSession, TResult>, "run">;
|
|
40
|
+
caller: VoiceSimulatorCaller;
|
|
41
|
+
context?: TContext;
|
|
42
|
+
session?: TSession;
|
|
43
|
+
sessionId?: string;
|
|
44
|
+
/** Hard cap on caller↔agent exchanges (default 12). */
|
|
45
|
+
maxTurns?: number;
|
|
46
|
+
/** Stop early when the agent route returns `complete: true` (default true). */
|
|
47
|
+
stopOnAgentComplete?: boolean;
|
|
48
|
+
now?: () => number;
|
|
49
|
+
generateId?: () => string;
|
|
50
|
+
};
|
|
51
|
+
export declare const renderVoiceSimulationTranscript: (transcript: ReadonlyArray<VoiceSimulatedTurn>, labels?: {
|
|
52
|
+
caller?: string;
|
|
53
|
+
agent?: string;
|
|
54
|
+
}) => string;
|
|
55
|
+
export declare const runVoiceConversationSimulation: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown>(input: RunVoiceConversationSimulationInput<TContext, TSession, TResult>) => Promise<VoiceConversationSimulationResult<TResult>>;
|
|
56
|
+
export type VoiceScriptedCallerStep = string;
|
|
57
|
+
/** Convenience: build a deterministic scripted caller from a list of lines. */
|
|
58
|
+
export declare const createScriptedVoiceCaller: (utterances: ReadonlyArray<VoiceScriptedCallerStep>) => VoiceSimulatorCaller;
|
|
59
|
+
export type VoicePersonaCallerCompletion = (input: {
|
|
60
|
+
prompt: string;
|
|
61
|
+
systemPrompt: string;
|
|
62
|
+
}) => Promise<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Builds an LLM-backed synthetic caller. The completion returns the caller's
|
|
65
|
+
* next line; appending the sentinel `[[END]]` (case-insensitive) signals the
|
|
66
|
+
* caller wants to hang up.
|
|
67
|
+
*/
|
|
68
|
+
export declare const createPersonaVoiceCaller: (options: {
|
|
69
|
+
persona: string;
|
|
70
|
+
completion: VoicePersonaCallerCompletion;
|
|
71
|
+
maxCallerTurns?: number;
|
|
72
|
+
endSentinel?: string;
|
|
73
|
+
}) => VoiceSimulatorCaller;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { VoiceCorrectionRiskTier, VoiceDomainTerm, VoiceLexiconEntry, VoicePhraseHint, VoiceTurnCorrectionHandler } from
|
|
2
|
-
|
|
1
|
+
import type { VoiceCorrectionRiskTier, VoiceDomainTerm, VoiceLexiconEntry, VoicePhraseHint, VoiceTurnCorrectionHandler } from "./types";
|
|
2
|
+
type VoicePhraseHintCorrectionMatch = {
|
|
3
3
|
alias: string;
|
|
4
4
|
hint: VoicePhraseHint;
|
|
5
5
|
};
|
|
@@ -18,16 +18,17 @@ export type VoiceDomainHintGenerationOptions = {
|
|
|
18
18
|
};
|
|
19
19
|
export type VoiceRiskyTurnCorrectionHandlerOptions = VoicePhraseHintCorrectionOptions & {
|
|
20
20
|
maxAverageConfidence?: number;
|
|
21
|
-
riskTier?: Exclude<VoiceCorrectionRiskTier,
|
|
21
|
+
riskTier?: Exclude<VoiceCorrectionRiskTier, "safe">;
|
|
22
22
|
};
|
|
23
23
|
export type VoicePhraseHintCorrectionRunOptions = {
|
|
24
24
|
riskTier?: VoiceCorrectionRiskTier;
|
|
25
25
|
};
|
|
26
26
|
export declare const applyPhraseHintCorrections: (text: string, phraseHints: VoicePhraseHint[]) => VoicePhraseHintCorrectionResult;
|
|
27
27
|
export declare const applyRiskTieredPhraseHintCorrections: (text: string, phraseHints: VoicePhraseHint[], options?: VoicePhraseHintCorrectionRunOptions) => VoicePhraseHintCorrectionResult;
|
|
28
|
-
export declare const createDomainPhraseHints: (terms: VoiceDomainTerm[], options?: VoiceDomainHintGenerationOptions) => VoicePhraseHint[];
|
|
29
28
|
export declare const createDomainLexicon: (terms: VoiceDomainTerm[]) => VoiceLexiconEntry[];
|
|
29
|
+
export declare const createDomainPhraseHints: (terms: VoiceDomainTerm[], options?: VoiceDomainHintGenerationOptions) => VoicePhraseHint[];
|
|
30
30
|
export declare const createPhraseHintCorrectionHandler: (options?: VoicePhraseHintCorrectionOptions) => VoiceTurnCorrectionHandler;
|
|
31
31
|
export declare const applyLexiconCorrections: (text: string, lexicon: VoiceLexiconEntry[]) => VoicePhraseHintCorrectionResult;
|
|
32
32
|
export declare const createLexiconCorrectionHandler: (options?: VoiceLexiconCorrectionOptions) => VoiceTurnCorrectionHandler;
|
|
33
33
|
export declare const createRiskyTurnCorrectionHandler: (options?: VoiceRiskyTurnCorrectionHandlerOptions) => VoiceTurnCorrectionHandler;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export type VoiceProviderRates = {
|
|
2
|
+
llm?: {
|
|
3
|
+
cachedInputPerMillionTokensUsd?: number;
|
|
4
|
+
inputPerMillionTokensUsd: number;
|
|
5
|
+
outputPerMillionTokensUsd: number;
|
|
6
|
+
};
|
|
7
|
+
stt?: {
|
|
8
|
+
perSecondUsd: number;
|
|
9
|
+
};
|
|
10
|
+
telephony?: {
|
|
11
|
+
perMinuteUsd: number;
|
|
12
|
+
};
|
|
13
|
+
tts?: {
|
|
14
|
+
perMillionCharactersUsd?: number;
|
|
15
|
+
perSecondUsd?: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type VoicePriceBook = Record<string, VoiceProviderRates>;
|
|
19
|
+
export declare const DEFAULT_VOICE_PRICE_BOOK: VoicePriceBook;
|
|
20
|
+
export type VoiceCostLLMRecord = {
|
|
21
|
+
cachedInputTokens?: number;
|
|
22
|
+
inputTokens?: number;
|
|
23
|
+
model?: string;
|
|
24
|
+
outputTokens?: number;
|
|
25
|
+
provider?: string;
|
|
26
|
+
};
|
|
27
|
+
export type VoiceCostTTSRecord = {
|
|
28
|
+
audioMs?: number;
|
|
29
|
+
characters?: number;
|
|
30
|
+
provider?: string;
|
|
31
|
+
voice?: string;
|
|
32
|
+
};
|
|
33
|
+
export type VoiceCostSTTRecord = {
|
|
34
|
+
audioMs: number;
|
|
35
|
+
model?: string;
|
|
36
|
+
provider?: string;
|
|
37
|
+
};
|
|
38
|
+
export type VoiceCostTelephonyRecord = {
|
|
39
|
+
minutes: number;
|
|
40
|
+
provider?: string;
|
|
41
|
+
};
|
|
42
|
+
export type VoiceCostBreakdown = {
|
|
43
|
+
llm: {
|
|
44
|
+
cachedInputTokens: number;
|
|
45
|
+
inputTokens: number;
|
|
46
|
+
outputTokens: number;
|
|
47
|
+
usd: number;
|
|
48
|
+
};
|
|
49
|
+
sessionId?: string;
|
|
50
|
+
stt: {
|
|
51
|
+
audioMs: number;
|
|
52
|
+
usd: number;
|
|
53
|
+
};
|
|
54
|
+
telephony: {
|
|
55
|
+
minutes: number;
|
|
56
|
+
usd: number;
|
|
57
|
+
};
|
|
58
|
+
totalUsd: number;
|
|
59
|
+
tts: {
|
|
60
|
+
audioMs: number;
|
|
61
|
+
characters: number;
|
|
62
|
+
usd: number;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
export type VoiceCostAccountant = {
|
|
66
|
+
recordLLM: (usage: VoiceCostLLMRecord) => void;
|
|
67
|
+
recordSTT: (input: VoiceCostSTTRecord) => void;
|
|
68
|
+
recordTTS: (input: VoiceCostTTSRecord) => void;
|
|
69
|
+
recordTelephony: (input: VoiceCostTelephonyRecord) => void;
|
|
70
|
+
snapshot: () => VoiceCostBreakdown;
|
|
71
|
+
};
|
|
72
|
+
export type CreateVoiceCostAccountantOptions = {
|
|
73
|
+
priceBook?: VoicePriceBook;
|
|
74
|
+
sessionId?: string;
|
|
75
|
+
};
|
|
76
|
+
export declare const createVoiceCostAccountant: (options?: CreateVoiceCostAccountantOptions) => VoiceCostAccountant;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type VoicePriceBook } from "./costAccounting";
|
|
2
|
+
export type VoiceCostProfile = {
|
|
3
|
+
/** Stored callers? Set to true to include caller-memory storage costs (per snapshot, monthly). Default false (we don't model storage here). */
|
|
4
|
+
includeCallerMemory?: boolean;
|
|
5
|
+
/** Inbound calls per day. */
|
|
6
|
+
inboundPerDay?: number;
|
|
7
|
+
/** Average input tokens per agent turn. */
|
|
8
|
+
inputTokensPerTurn: number;
|
|
9
|
+
/** LLM model id used for provider:model price lookup. */
|
|
10
|
+
llmModel: string;
|
|
11
|
+
/** LLM provider — must match price book namespace. */
|
|
12
|
+
llmProvider: string;
|
|
13
|
+
/** Average minutes per call. */
|
|
14
|
+
minutesPerCall: number;
|
|
15
|
+
/** Outbound calls per day. */
|
|
16
|
+
outboundPerDay?: number;
|
|
17
|
+
/** Average output tokens per agent turn. */
|
|
18
|
+
outputTokensPerTurn: number;
|
|
19
|
+
/** STT model. */
|
|
20
|
+
sttModel?: string;
|
|
21
|
+
/** STT provider. */
|
|
22
|
+
sttProvider?: string;
|
|
23
|
+
/** Telephony provider key in the price book (e.g. 'twilio', 'telnyx'). */
|
|
24
|
+
telephonyProvider?: string;
|
|
25
|
+
/** Total turns per call. */
|
|
26
|
+
turnsPerCall: number;
|
|
27
|
+
/** Average TTS characters spoken per agent turn. */
|
|
28
|
+
ttsCharsPerTurn: number;
|
|
29
|
+
/** TTS model / voice id. */
|
|
30
|
+
ttsModel?: string;
|
|
31
|
+
/** TTS provider. */
|
|
32
|
+
ttsProvider?: string;
|
|
33
|
+
};
|
|
34
|
+
export type VoiceCostPrediction = {
|
|
35
|
+
callsPerDay: number;
|
|
36
|
+
monthly: {
|
|
37
|
+
llmUsd: number;
|
|
38
|
+
sttUsd: number;
|
|
39
|
+
telephonyUsd: number;
|
|
40
|
+
totalUsd: number;
|
|
41
|
+
ttsUsd: number;
|
|
42
|
+
};
|
|
43
|
+
perCall: {
|
|
44
|
+
llmUsd: number;
|
|
45
|
+
sttUsd: number;
|
|
46
|
+
telephonyUsd: number;
|
|
47
|
+
totalUsd: number;
|
|
48
|
+
ttsUsd: number;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export type PredictVoiceCallCostInput = {
|
|
52
|
+
priceBook?: VoicePriceBook;
|
|
53
|
+
profile: VoiceCostProfile;
|
|
54
|
+
};
|
|
55
|
+
export declare const predictVoiceCallCost: (input: PredictVoiceCallCostInput) => VoiceCostPrediction;
|
|
56
|
+
export type VoiceCostScenarioComparison = {
|
|
57
|
+
delta: {
|
|
58
|
+
monthlyUsd: number;
|
|
59
|
+
perCallUsd: number;
|
|
60
|
+
};
|
|
61
|
+
prediction: VoiceCostPrediction;
|
|
62
|
+
scenarioId: string;
|
|
63
|
+
};
|
|
64
|
+
export declare const compareVoiceCostScenarios: (input: {
|
|
65
|
+
baselineId: string;
|
|
66
|
+
priceBook?: VoicePriceBook;
|
|
67
|
+
scenarios: ReadonlyArray<{
|
|
68
|
+
id: string;
|
|
69
|
+
profile: VoiceCostProfile;
|
|
70
|
+
}>;
|
|
71
|
+
}) => {
|
|
72
|
+
baseline: VoiceCostPrediction;
|
|
73
|
+
scenarios: VoiceCostScenarioComparison[];
|
|
74
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { VoiceCRMContract } from "./crmContract";
|
|
2
|
+
export type VoiceCRMCallLoggerInput = {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
contactId?: string;
|
|
5
|
+
startedAt: number;
|
|
6
|
+
endedAt?: number;
|
|
7
|
+
durationSeconds?: number;
|
|
8
|
+
summary?: string;
|
|
9
|
+
disposition?: string;
|
|
10
|
+
recordingUrl?: string;
|
|
11
|
+
transcriptUrl?: string;
|
|
12
|
+
metadata?: Record<string, unknown>;
|
|
13
|
+
};
|
|
14
|
+
export type VoiceCRMCallLogResult = {
|
|
15
|
+
activityId: string;
|
|
16
|
+
vendor: string;
|
|
17
|
+
loggedAt: number;
|
|
18
|
+
};
|
|
19
|
+
export type VoiceCRMCallLogErrorPolicy = "throw" | "swallow" | "queue";
|
|
20
|
+
export type CreateVoiceCRMCallLoggerOptions = {
|
|
21
|
+
contract: VoiceCRMContract;
|
|
22
|
+
errorPolicy?: VoiceCRMCallLogErrorPolicy;
|
|
23
|
+
onError?: (error: Error, input: VoiceCRMCallLoggerInput) => void | Promise<void>;
|
|
24
|
+
enqueueOnFailure?: (input: VoiceCRMCallLoggerInput) => Promise<void> | void;
|
|
25
|
+
now?: () => number;
|
|
26
|
+
};
|
|
27
|
+
export declare const createVoiceCRMCallLogger: (options: CreateVoiceCRMCallLoggerOptions) => {
|
|
28
|
+
contract: VoiceCRMContract;
|
|
29
|
+
logCallEnd: (input: VoiceCRMCallLoggerInput) => Promise<VoiceCRMCallLogResult | null>;
|
|
30
|
+
noteOnContact: (input: {
|
|
31
|
+
contactId: string;
|
|
32
|
+
body: string;
|
|
33
|
+
}) => Promise<{
|
|
34
|
+
noteId: string;
|
|
35
|
+
} | null>;
|
|
36
|
+
};
|
|
37
|
+
export type VoiceCRMCallLogger = ReturnType<typeof createVoiceCRMCallLogger>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export type VoiceCRMContactSummary = {
|
|
2
|
+
id: string;
|
|
3
|
+
vendor?: string;
|
|
4
|
+
firstName?: string;
|
|
5
|
+
lastName?: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
phone?: string;
|
|
8
|
+
jobTitle?: string;
|
|
9
|
+
metadata?: Record<string, unknown>;
|
|
10
|
+
};
|
|
11
|
+
export type VoiceCRMLeadInput = {
|
|
12
|
+
firstName?: string;
|
|
13
|
+
lastName?: string;
|
|
14
|
+
email?: string;
|
|
15
|
+
phone?: string;
|
|
16
|
+
company?: string;
|
|
17
|
+
jobTitle?: string;
|
|
18
|
+
source?: string;
|
|
19
|
+
notes?: string;
|
|
20
|
+
metadata?: Record<string, unknown>;
|
|
21
|
+
};
|
|
22
|
+
export type VoiceCRMCallActivityInput = {
|
|
23
|
+
contactId?: string;
|
|
24
|
+
sessionId: string;
|
|
25
|
+
startedAt: number;
|
|
26
|
+
endedAt: number;
|
|
27
|
+
durationSeconds: number;
|
|
28
|
+
summary?: string;
|
|
29
|
+
disposition?: string;
|
|
30
|
+
recordingUrl?: string;
|
|
31
|
+
transcriptUrl?: string;
|
|
32
|
+
metadata?: Record<string, unknown>;
|
|
33
|
+
};
|
|
34
|
+
export type VoiceCRMNoteInput = {
|
|
35
|
+
contactId: string;
|
|
36
|
+
body: string;
|
|
37
|
+
metadata?: Record<string, unknown>;
|
|
38
|
+
};
|
|
39
|
+
export type VoiceCRMTaskInput = {
|
|
40
|
+
contactId?: string;
|
|
41
|
+
subject: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
dueAt?: number;
|
|
44
|
+
priority?: "low" | "normal" | "high";
|
|
45
|
+
};
|
|
46
|
+
export type VoiceCRMContract = {
|
|
47
|
+
readonly vendor: string;
|
|
48
|
+
lookupByPhone(phone: string): Promise<VoiceCRMContactSummary | null>;
|
|
49
|
+
lookupByEmail(email: string): Promise<VoiceCRMContactSummary | null>;
|
|
50
|
+
createLead(input: VoiceCRMLeadInput): Promise<VoiceCRMContactSummary>;
|
|
51
|
+
logCall(input: VoiceCRMCallActivityInput): Promise<{
|
|
52
|
+
activityId: string;
|
|
53
|
+
}>;
|
|
54
|
+
addNote(input: VoiceCRMNoteInput): Promise<{
|
|
55
|
+
noteId: string;
|
|
56
|
+
}>;
|
|
57
|
+
createTask?(input: VoiceCRMTaskInput): Promise<{
|
|
58
|
+
taskId: string;
|
|
59
|
+
}>;
|
|
60
|
+
};
|
|
61
|
+
export type VoiceCRMRegistry = {
|
|
62
|
+
default(): VoiceCRMContract | null;
|
|
63
|
+
get(vendor: string): VoiceCRMContract | null;
|
|
64
|
+
list(): VoiceCRMContract[];
|
|
65
|
+
};
|
|
66
|
+
export type CreateVoiceCRMRegistryOptions = {
|
|
67
|
+
contracts: VoiceCRMContract[];
|
|
68
|
+
defaultVendor?: string;
|
|
69
|
+
};
|
|
70
|
+
export declare const createVoiceCRMRegistry: (options: CreateVoiceCRMRegistryOptions) => VoiceCRMRegistry;
|