@absolutejs/voice 0.0.22-beta.44 → 0.0.22-beta.441
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 +4269 -603
- package/dist/agent.d.ts +67 -5
- package/dist/agentSquadContract.d.ts +98 -0
- package/dist/angular/index.d.ts +22 -3
- package/dist/angular/index.js +4647 -1140
- 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-campaign-dialer-proof.service.d.ts +14 -0
- package/dist/angular/voice-controller.service.d.ts +2 -1
- package/dist/angular/voice-delivery-runtime.component.d.ts +17 -0
- package/dist/angular/voice-delivery-runtime.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.component.d.ts +15 -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-routing-status.service.d.ts +11 -0
- package/dist/angular/voice-session-snapshot.service.d.ts +13 -0
- package/dist/angular/voice-stream.service.d.ts +3 -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-workflow-status.service.d.ts +12 -0
- package/dist/assistant.d.ts +11 -11
- package/dist/assistantHealth.d.ts +6 -6
- package/dist/assistantMemory.d.ts +3 -3
- package/dist/audioConditioning.d.ts +1 -1
- package/dist/audit.d.ts +131 -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 +151 -0
- package/dist/bargeInRoutes.d.ts +56 -0
- package/dist/browserCallProfiles.d.ts +120 -0
- package/dist/browserMediaRoutes.d.ts +62 -0
- package/dist/callDebugger.d.ts +66 -0
- package/dist/campaign.d.ts +794 -0
- package/dist/campaignDialers.d.ts +111 -0
- 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/callDebugger.d.ts +19 -0
- package/dist/client/callDebuggerWidget.d.ts +30 -0
- package/dist/client/campaignDialerProof.d.ts +23 -0
- package/dist/client/connection.d.ts +3 -3
- package/dist/client/controller.d.ts +1 -1
- package/dist/client/createVoiceStream.d.ts +1 -1
- package/dist/client/deliveryRuntime.d.ts +34 -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/htmxBootstrap.js +950 -14
- package/dist/client/index.d.ts +96 -9
- package/dist/client/index.js +9916 -52
- 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 +54 -0
- package/dist/client/opsActionCenterWidget.d.ts +29 -0
- package/dist/client/opsActionHistory.d.ts +19 -0
- package/dist/client/opsActionHistoryWidget.d.ts +11 -0
- package/dist/client/opsStatus.d.ts +19 -0
- package/dist/client/opsStatusWidget.d.ts +40 -0
- package/dist/client/platformCoverage.d.ts +19 -0
- package/dist/client/platformCoverageWidget.d.ts +37 -0
- package/dist/client/profileComparison.d.ts +19 -0
- package/dist/client/profileComparisonWidget.d.ts +41 -0
- package/dist/client/profileSwitchRecommendation.d.ts +19 -0
- package/dist/client/profileSwitchRecommendationWidget.d.ts +12 -0
- package/dist/client/proofTrends.d.ts +19 -0
- package/dist/client/proofTrendsWidget.d.ts +37 -0
- package/dist/client/providerCapabilities.d.ts +19 -0
- package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
- package/dist/client/providerContracts.d.ts +19 -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 +1 -1
- package/dist/client/providerStatusWidget.d.ts +32 -0
- package/dist/client/readinessFailures.d.ts +19 -0
- package/dist/client/readinessFailuresWidget.d.ts +42 -0
- package/dist/client/routingStatus.d.ts +19 -0
- package/dist/client/routingStatusWidget.d.ts +32 -0
- package/dist/client/sessionSnapshot.d.ts +21 -0
- package/dist/client/sessionSnapshotWidget.d.ts +33 -0
- package/dist/client/store.d.ts +1 -1
- package/dist/client/traceTimeline.d.ts +19 -0
- package/dist/client/traceTimelineWidget.d.ts +36 -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/competitiveCoverage.d.ts +141 -0
- package/dist/correction.d.ts +2 -2
- package/dist/dataControl.d.ts +180 -0
- package/dist/deliveryRuntime.d.ts +158 -0
- package/dist/deliverySinkRoutes.d.ts +117 -0
- package/dist/demoReadyRoutes.d.ts +98 -0
- package/dist/diagnosticsRoutes.d.ts +2 -2
- package/dist/evalRoutes.d.ts +47 -4
- package/dist/fileStore.d.ts +19 -7
- package/dist/guardrails.d.ts +128 -0
- package/dist/handoff.d.ts +6 -6
- package/dist/handoffHealth.d.ts +5 -5
- package/dist/htmx.d.ts +1 -1
- package/dist/incidentBundle.d.ts +119 -0
- package/dist/incidentTimeline.d.ts +259 -0
- package/dist/index.d.ts +215 -70
- package/dist/index.js +35848 -6762
- package/dist/latencySlo.d.ts +56 -0
- package/dist/liveLatency.d.ts +78 -0
- package/dist/liveOps.d.ts +190 -0
- package/dist/logger.d.ts +1 -1
- package/dist/mediaPipelineRoutes.d.ts +117 -0
- package/dist/memoryStore.d.ts +1 -1
- package/dist/modelAdapters.d.ts +59 -7
- package/dist/observabilityExport.d.ts +501 -0
- package/dist/openaiTTS.d.ts +18 -0
- package/dist/operationalStatus.d.ts +87 -0
- package/dist/operationsRecord.d.ts +351 -0
- package/dist/ops.d.ts +12 -12
- package/dist/opsActionAuditRoutes.d.ts +99 -0
- package/dist/opsConsoleRoutes.d.ts +8 -5
- package/dist/opsPresets.d.ts +2 -2
- package/dist/opsRecovery.d.ts +137 -0
- package/dist/opsRuntime.d.ts +6 -6
- package/dist/opsSinks.d.ts +13 -13
- package/dist/opsStatus.d.ts +76 -0
- package/dist/opsStatusRoutes.d.ts +33 -0
- package/dist/opsWebhook.d.ts +6 -6
- package/dist/outcomeContract.d.ts +146 -0
- package/dist/outcomeRecipes.d.ts +4 -4
- package/dist/phoneAgent.d.ts +139 -0
- package/dist/phoneAgentProductionSmoke.d.ts +115 -0
- package/dist/platformCoverage.d.ts +91 -0
- package/dist/plugin.d.ts +2 -2
- package/dist/postCallAnalysis.d.ts +98 -0
- package/dist/postgresStore.d.ts +17 -6
- package/dist/presets.d.ts +3 -3
- package/dist/productionReadiness.d.ts +738 -0
- package/dist/profileSwitchRecommendation.d.ts +350 -0
- package/dist/proofAssertions.d.ts +32 -0
- package/dist/proofPack.d.ts +206 -0
- package/dist/proofRunner.d.ts +79 -0
- package/dist/proofTrends.d.ts +715 -0
- package/dist/providerAdapters.d.ts +16 -5
- package/dist/providerCapabilities.d.ts +92 -0
- package/dist/providerDecisionTraces.d.ts +130 -0
- package/dist/providerHealth.d.ts +3 -3
- package/dist/providerOrchestration.d.ts +109 -0
- package/dist/providerRouterTraces.d.ts +35 -0
- package/dist/providerRoutingContract.d.ts +71 -0
- package/dist/providerSlo.d.ts +142 -0
- package/dist/providerStackRecommendations.d.ts +187 -0
- package/dist/qualityRoutes.d.ts +4 -4
- package/dist/queue.d.ts +23 -14
- package/dist/react/VoiceAgentSquadStatus.d.ts +5 -0
- package/dist/react/VoiceCallDebuggerLaunch.d.ts +6 -0
- package/dist/react/VoiceDeliveryRuntime.d.ts +7 -0
- package/dist/react/VoiceOpsActionCenter.d.ts +5 -0
- package/dist/react/VoiceOpsStatus.d.ts +6 -0
- 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/VoiceRoutingStatus.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/index.d.ts +43 -3
- package/dist/react/index.js +10650 -31
- 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 +3 -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/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/react/useVoiceSessionSnapshot.d.ts +9 -0
- package/dist/react/useVoiceStream.d.ts +3 -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 +8 -0
- package/dist/readinessProfiles.d.ts +45 -0
- package/dist/realtimeChannel.d.ts +136 -0
- package/dist/realtimeProviderContracts.d.ts +133 -0
- package/dist/reconnectContract.d.ts +88 -0
- package/dist/resilienceRoutes.d.ts +45 -5
- package/dist/routing.d.ts +1 -1
- package/dist/runtimeOps.d.ts +3 -3
- package/dist/s3Store.d.ts +3 -3
- package/dist/session.d.ts +1 -1
- package/dist/sessionReplay.d.ts +19 -7
- package/dist/sessionSnapshot.d.ts +109 -0
- package/dist/simulationSuite.d.ts +143 -0
- package/dist/sloCalibration.d.ts +185 -0
- package/dist/sqliteStore.d.ts +17 -6
- package/dist/store.d.ts +1 -1
- package/dist/svelte/createVoiceAgentSquadStatus.d.ts +9 -0
- package/dist/svelte/createVoiceCallDebugger.d.ts +12 -0
- package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
- package/dist/svelte/createVoiceDeliveryRuntime.d.ts +11 -0
- package/dist/svelte/createVoiceLiveOps.d.ts +13 -0
- package/dist/svelte/createVoiceOpsActionCenter.d.ts +10 -0
- package/dist/svelte/createVoiceOpsStatus.d.ts +9 -0
- 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 +4 -2
- package/dist/svelte/createVoiceReadinessFailures.d.ts +7 -0
- package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
- package/dist/svelte/createVoiceSessionSnapshot.d.ts +13 -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/createVoiceWorkflowStatus.d.ts +8 -0
- package/dist/svelte/index.d.ts +23 -3
- package/dist/svelte/index.js +6425 -460
- 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 +147 -13
- package/dist/telephonyMediaRoutes.d.ts +72 -0
- package/dist/telephonyOutcome.d.ts +273 -0
- package/dist/testing/accuracy.d.ts +1 -1
- package/dist/testing/benchmark.d.ts +9 -9
- package/dist/testing/corrected.d.ts +5 -5
- package/dist/testing/duplex.d.ts +3 -3
- package/dist/testing/fixtures.d.ts +3 -3
- package/dist/testing/index.d.ts +13 -13
- package/dist/testing/index.js +5413 -184
- package/dist/testing/ioProviderSimulator.d.ts +5 -5
- package/dist/testing/providerSimulator.d.ts +5 -5
- package/dist/testing/review.d.ts +4 -4
- package/dist/testing/sessionBenchmark.d.ts +3 -3
- package/dist/testing/stt.d.ts +3 -3
- package/dist/testing/telephony.d.ts +25 -0
- package/dist/testing/tts.d.ts +1 -1
- package/dist/toolContract.d.ts +161 -0
- package/dist/toolRuntime.d.ts +50 -0
- package/dist/trace.d.ts +46 -7
- package/dist/traceDeliveryRoutes.d.ts +86 -0
- package/dist/traceTimeline.d.ts +97 -0
- package/dist/turnDetection.d.ts +1 -1
- package/dist/turnLatency.d.ts +95 -0
- package/dist/turnProfiles.d.ts +2 -2
- package/dist/turnQuality.d.ts +94 -0
- package/dist/types.d.ts +234 -80
- package/dist/voiceMonitoring.d.ts +444 -0
- package/dist/vue/VoiceCallDebuggerLaunch.d.ts +68 -0
- package/dist/vue/VoiceDeliveryRuntime.d.ts +30 -0
- package/dist/vue/VoiceOpsActionCenter.d.ts +13 -0
- package/dist/vue/VoiceOpsStatus.d.ts +30 -0
- package/dist/vue/VoicePlatformCoverage.d.ts +23 -0
- package/dist/vue/VoiceProofTrends.d.ts +21 -0
- package/dist/vue/VoiceProviderCapabilities.d.ts +51 -0
- package/dist/vue/VoiceProviderContracts.d.ts +21 -0
- package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
- package/dist/vue/VoiceProviderStatus.d.ts +51 -0
- package/dist/vue/VoiceReadinessFailures.d.ts +21 -0
- package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
- package/dist/vue/VoiceSessionSnapshot.d.ts +68 -0
- package/dist/vue/VoiceTurnLatency.d.ts +69 -0
- package/dist/vue/VoiceTurnQuality.d.ts +51 -0
- package/dist/vue/index.d.ts +38 -3
- package/dist/vue/index.js +10095 -56
- 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 +3 -2
- 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 +943 -0
- package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/vue/useVoiceSessionSnapshot.d.ts +10 -0
- package/dist/vue/useVoiceStream.d.ts +4 -2
- 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/fixtures/manifest.json +356 -197
- package/package.json +260 -256
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import type { VoiceCampaignStore } from "./campaign";
|
|
2
|
+
import { Elysia } from "elysia";
|
|
3
|
+
import { type VoiceAuditActor, type VoiceAuditEventFilter, type VoiceAuditEventStore } from "./audit";
|
|
4
|
+
import { exportVoiceAuditTrail } from "./auditExport";
|
|
5
|
+
import type { VoiceAuditSinkDeliveryStore } from "./auditSinks";
|
|
6
|
+
import type { VoiceIntegrationEventStore, VoiceOpsTaskStore } from "./ops";
|
|
7
|
+
import type { VoiceIncidentBundleStore } from "./incidentBundle";
|
|
8
|
+
import type { VoiceCallReviewStore } from "./testing/review";
|
|
9
|
+
import type { VoiceTraceEventStore, VoiceTracePruneFilter, VoiceTraceSinkDeliveryStore } from "./trace";
|
|
10
|
+
import type { VoiceSessionStore } from "./types";
|
|
11
|
+
export declare const voiceComplianceRedactionDefaults: {
|
|
12
|
+
keys: string[];
|
|
13
|
+
redactEmails: true;
|
|
14
|
+
redactPhoneNumbers: true;
|
|
15
|
+
};
|
|
16
|
+
export type VoiceDataRetentionScope = "auditDeliveries" | "campaigns" | "events" | "incidentBundles" | "reviews" | "sessions" | "tasks" | "traceDeliveries" | "traces";
|
|
17
|
+
export type VoiceDataRetentionStores = {
|
|
18
|
+
campaigns?: VoiceCampaignStore;
|
|
19
|
+
events?: VoiceIntegrationEventStore;
|
|
20
|
+
incidentBundles?: VoiceIncidentBundleStore;
|
|
21
|
+
reviews?: VoiceCallReviewStore;
|
|
22
|
+
session?: VoiceSessionStore;
|
|
23
|
+
sessions?: VoiceSessionStore;
|
|
24
|
+
tasks?: VoiceOpsTaskStore;
|
|
25
|
+
traceDeliveries?: VoiceTraceSinkDeliveryStore;
|
|
26
|
+
traces?: VoiceTraceEventStore;
|
|
27
|
+
};
|
|
28
|
+
export type VoiceDataRetentionPolicy = VoiceDataRetentionStores & {
|
|
29
|
+
audit?: VoiceAuditEventStore;
|
|
30
|
+
auditDeliveries?: VoiceAuditSinkDeliveryStore;
|
|
31
|
+
auditActor?: VoiceAuditActor;
|
|
32
|
+
before?: number;
|
|
33
|
+
beforeOrAt?: number;
|
|
34
|
+
dryRun?: boolean;
|
|
35
|
+
keepNewest?: Partial<Record<VoiceDataRetentionScope, number>>;
|
|
36
|
+
limit?: number;
|
|
37
|
+
scopes?: VoiceDataRetentionScope[];
|
|
38
|
+
traceFilter?: VoiceTracePruneFilter;
|
|
39
|
+
};
|
|
40
|
+
export type VoiceDataRetentionScopeReport = {
|
|
41
|
+
deletedIds: string[];
|
|
42
|
+
deletedCount: number;
|
|
43
|
+
dryRun: boolean;
|
|
44
|
+
keepNewest?: number;
|
|
45
|
+
scannedCount: number;
|
|
46
|
+
scope: VoiceDataRetentionScope;
|
|
47
|
+
skippedReason?: "missing-store" | "missing-selector";
|
|
48
|
+
};
|
|
49
|
+
export type VoiceDataRetentionReport = {
|
|
50
|
+
checkedAt: number;
|
|
51
|
+
deletedCount: number;
|
|
52
|
+
dryRun: boolean;
|
|
53
|
+
scopes: VoiceDataRetentionScopeReport[];
|
|
54
|
+
};
|
|
55
|
+
export type VoiceDataControlStorageSurface = {
|
|
56
|
+
configured: boolean;
|
|
57
|
+
control: "audit" | "artifact" | "queue" | "session" | "workflow";
|
|
58
|
+
name: string;
|
|
59
|
+
selfHosted: boolean;
|
|
60
|
+
};
|
|
61
|
+
export type VoiceDataControlProviderKeySurface = {
|
|
62
|
+
env?: string;
|
|
63
|
+
name: string;
|
|
64
|
+
recommendation: string;
|
|
65
|
+
required: boolean;
|
|
66
|
+
};
|
|
67
|
+
export type VoiceDataControlReport = {
|
|
68
|
+
auditExport?: Awaited<ReturnType<typeof exportVoiceAuditTrail>>;
|
|
69
|
+
checkedAt: number;
|
|
70
|
+
deletionProof?: VoiceDataRetentionReport;
|
|
71
|
+
redaction: {
|
|
72
|
+
defaults: typeof voiceComplianceRedactionDefaults;
|
|
73
|
+
enabled: boolean;
|
|
74
|
+
};
|
|
75
|
+
retentionPlan: VoiceDataRetentionReport;
|
|
76
|
+
storage: VoiceDataControlStorageSurface[];
|
|
77
|
+
providerKeys: VoiceDataControlProviderKeySurface[];
|
|
78
|
+
zeroRetentionAvailable: boolean;
|
|
79
|
+
};
|
|
80
|
+
export type VoiceDataControlAssertionInput = {
|
|
81
|
+
maxDeletionDeleted?: number;
|
|
82
|
+
maxMissingConfiguredStorage?: number;
|
|
83
|
+
maxMissingSelfHostedStorage?: number;
|
|
84
|
+
maxRetentionDeleted?: number;
|
|
85
|
+
minAuditExportEvents?: number;
|
|
86
|
+
minConfiguredStorage?: number;
|
|
87
|
+
minProviderKeys?: number;
|
|
88
|
+
requiredControls?: VoiceDataControlStorageSurface["control"][];
|
|
89
|
+
requiredDeletionScopes?: VoiceDataRetentionScope[];
|
|
90
|
+
requiredProviderKeys?: string[];
|
|
91
|
+
requiredRetentionScopes?: VoiceDataRetentionScope[];
|
|
92
|
+
requiredStorage?: string[];
|
|
93
|
+
requireAuditExport?: boolean;
|
|
94
|
+
requireDeletionDryRun?: boolean;
|
|
95
|
+
requireDeletionProof?: boolean;
|
|
96
|
+
requireRedaction?: boolean;
|
|
97
|
+
requireRetentionDryRun?: boolean;
|
|
98
|
+
requireSelfHostedStorage?: boolean;
|
|
99
|
+
requireZeroRetentionAvailable?: boolean;
|
|
100
|
+
};
|
|
101
|
+
export type VoiceDataControlAssertionReport = {
|
|
102
|
+
auditExportEvents: number;
|
|
103
|
+
configuredStorage: string[];
|
|
104
|
+
controls: VoiceDataControlStorageSurface["control"][];
|
|
105
|
+
deletionDeleted: number;
|
|
106
|
+
deletionDryRun?: boolean;
|
|
107
|
+
deletionScopes: VoiceDataRetentionScope[];
|
|
108
|
+
issues: string[];
|
|
109
|
+
ok: boolean;
|
|
110
|
+
providerKeys: string[];
|
|
111
|
+
redactionEnabled: boolean;
|
|
112
|
+
retentionDeleted: number;
|
|
113
|
+
retentionDryRun: boolean;
|
|
114
|
+
retentionScopes: VoiceDataRetentionScope[];
|
|
115
|
+
selfHostedConfiguredStorage: string[];
|
|
116
|
+
zeroRetentionAvailable: boolean;
|
|
117
|
+
};
|
|
118
|
+
export type VoiceDataControlRoutesOptions = VoiceDataRetentionStores & {
|
|
119
|
+
audit?: VoiceAuditEventStore;
|
|
120
|
+
auditActor?: VoiceAuditActor;
|
|
121
|
+
auditDeliveries?: VoiceAuditSinkDeliveryStore;
|
|
122
|
+
headers?: HeadersInit;
|
|
123
|
+
name?: string;
|
|
124
|
+
path?: string;
|
|
125
|
+
providerKeys?: VoiceDataControlProviderKeySurface[];
|
|
126
|
+
redact?: import("./trace").VoiceTraceRedactionConfig | boolean;
|
|
127
|
+
title?: string;
|
|
128
|
+
traceDeliveries?: VoiceTraceSinkDeliveryStore;
|
|
129
|
+
};
|
|
130
|
+
export declare const applyVoiceDataRetentionPolicy: (options: VoiceDataRetentionPolicy) => Promise<VoiceDataRetentionReport>;
|
|
131
|
+
export declare const buildVoiceDataRetentionPlan: (options: Omit<VoiceDataRetentionPolicy, "dryRun">) => Promise<VoiceDataRetentionReport>;
|
|
132
|
+
export declare const evaluateVoiceDataControlEvidence: (report: VoiceDataControlReport, input?: VoiceDataControlAssertionInput) => VoiceDataControlAssertionReport;
|
|
133
|
+
export declare const assertVoiceDataControlEvidence: (report: VoiceDataControlReport, input?: VoiceDataControlAssertionInput) => VoiceDataControlAssertionReport;
|
|
134
|
+
export declare const createVoiceZeroRetentionPolicy: (options: VoiceDataRetentionStores & {
|
|
135
|
+
audit?: VoiceAuditEventStore;
|
|
136
|
+
auditActor?: VoiceAuditActor;
|
|
137
|
+
auditDeliveries?: VoiceAuditSinkDeliveryStore;
|
|
138
|
+
beforeOrAt?: number;
|
|
139
|
+
dryRun?: boolean;
|
|
140
|
+
scopes?: VoiceDataRetentionScope[];
|
|
141
|
+
traceDeliveries?: VoiceTraceSinkDeliveryStore;
|
|
142
|
+
}) => VoiceDataRetentionPolicy;
|
|
143
|
+
export declare const buildVoiceDataControlReport: (options: VoiceDataControlRoutesOptions & {
|
|
144
|
+
auditFilter?: VoiceAuditEventFilter;
|
|
145
|
+
retention?: Omit<VoiceDataRetentionPolicy, "dryRun">;
|
|
146
|
+
}) => Promise<VoiceDataControlReport>;
|
|
147
|
+
export declare const renderVoiceDataControlHTML: (report: VoiceDataControlReport, options?: {
|
|
148
|
+
title?: string;
|
|
149
|
+
}) => string;
|
|
150
|
+
export declare const renderVoiceDataControlMarkdown: (report: VoiceDataControlReport, options?: {
|
|
151
|
+
title?: string;
|
|
152
|
+
}) => string;
|
|
153
|
+
export declare const createVoiceDataControlRoutes: (options: VoiceDataControlRoutesOptions) => Elysia<"", {
|
|
154
|
+
decorator: {};
|
|
155
|
+
store: {};
|
|
156
|
+
derive: {};
|
|
157
|
+
resolve: {};
|
|
158
|
+
}, {
|
|
159
|
+
typebox: {};
|
|
160
|
+
error: {};
|
|
161
|
+
}, {
|
|
162
|
+
schema: {};
|
|
163
|
+
standaloneSchema: {};
|
|
164
|
+
macro: {};
|
|
165
|
+
macroFn: {};
|
|
166
|
+
parser: {};
|
|
167
|
+
response: {};
|
|
168
|
+
}, {}, {
|
|
169
|
+
derive: {};
|
|
170
|
+
resolve: {};
|
|
171
|
+
schema: {};
|
|
172
|
+
standaloneSchema: {};
|
|
173
|
+
response: {};
|
|
174
|
+
}, {
|
|
175
|
+
derive: {};
|
|
176
|
+
resolve: {};
|
|
177
|
+
schema: {};
|
|
178
|
+
standaloneSchema: {};
|
|
179
|
+
response: {};
|
|
180
|
+
}>;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
import { createVoiceAuditSinkDeliveryWorker, type VoiceAuditSinkDeliveryQueueSummary, type VoiceAuditSinkDeliveryRecord, type VoiceAuditSinkDeliveryStore, type VoiceAuditSinkDeliveryWorkerOptions, type VoiceAuditSinkDeliveryWorkerResult, type VoiceS3AuditSinkClient } from "./auditSinks";
|
|
3
|
+
import { createVoiceTraceSinkDeliveryWorker, type VoiceRedisTaskLeaseCoordinator, type VoiceTraceSinkDeliveryQueueSummary, type VoiceTraceSinkDeliveryWorkerOptions, type VoiceTraceSinkDeliveryWorkerResult } from "./queue";
|
|
4
|
+
import { type StoredVoiceTraceEvent, type VoiceS3TraceSinkClient, type VoiceTraceSinkDeliveryRecord, type VoiceTraceSinkDeliveryStore } from "./trace";
|
|
5
|
+
import type { StoredVoiceAuditEvent } from "./audit";
|
|
6
|
+
export type VoiceDeliveryRuntimeAuditConfig<TDelivery extends VoiceAuditSinkDeliveryRecord = VoiceAuditSinkDeliveryRecord> = VoiceAuditSinkDeliveryWorkerOptions<TDelivery> & {
|
|
7
|
+
autoStart?: boolean;
|
|
8
|
+
onError?: (error: unknown) => Promise<void> | void;
|
|
9
|
+
pollIntervalMs?: number;
|
|
10
|
+
};
|
|
11
|
+
export type VoiceDeliveryRuntimeTraceConfig<TDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord> = VoiceTraceSinkDeliveryWorkerOptions<TDelivery> & {
|
|
12
|
+
autoStart?: boolean;
|
|
13
|
+
onError?: (error: unknown) => Promise<void> | void;
|
|
14
|
+
pollIntervalMs?: number;
|
|
15
|
+
};
|
|
16
|
+
export type VoiceDeliveryRuntimeConfig<TAuditDelivery extends VoiceAuditSinkDeliveryRecord = VoiceAuditSinkDeliveryRecord, TTraceDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord> = {
|
|
17
|
+
audit?: VoiceDeliveryRuntimeAuditConfig<TAuditDelivery>;
|
|
18
|
+
trace?: VoiceDeliveryRuntimeTraceConfig<TTraceDelivery>;
|
|
19
|
+
};
|
|
20
|
+
export type VoiceDeliveryRuntimeTickResult = {
|
|
21
|
+
audit?: VoiceAuditSinkDeliveryWorkerResult;
|
|
22
|
+
trace?: VoiceTraceSinkDeliveryWorkerResult;
|
|
23
|
+
};
|
|
24
|
+
export type VoiceDeliveryRuntimeRequeueDeadLettersResult = {
|
|
25
|
+
audit: number;
|
|
26
|
+
trace: number;
|
|
27
|
+
total: number;
|
|
28
|
+
};
|
|
29
|
+
export type VoiceDeliveryRuntimeSummary = {
|
|
30
|
+
audit?: VoiceAuditSinkDeliveryQueueSummary;
|
|
31
|
+
trace?: VoiceTraceSinkDeliveryQueueSummary;
|
|
32
|
+
};
|
|
33
|
+
export type VoiceDeliveryRuntime = {
|
|
34
|
+
audit?: ReturnType<typeof createVoiceAuditSinkDeliveryWorker>;
|
|
35
|
+
isRunning: () => boolean;
|
|
36
|
+
requeueDeadLetters: () => Promise<VoiceDeliveryRuntimeRequeueDeadLettersResult>;
|
|
37
|
+
start: () => void;
|
|
38
|
+
stop: () => void;
|
|
39
|
+
summarize: () => Promise<VoiceDeliveryRuntimeSummary>;
|
|
40
|
+
tick: () => Promise<VoiceDeliveryRuntimeTickResult>;
|
|
41
|
+
trace?: ReturnType<typeof createVoiceTraceSinkDeliveryWorker>;
|
|
42
|
+
};
|
|
43
|
+
export type VoiceDeliveryRuntimeReport = {
|
|
44
|
+
checkedAt: number;
|
|
45
|
+
isRunning: boolean;
|
|
46
|
+
summary: VoiceDeliveryRuntimeSummary;
|
|
47
|
+
};
|
|
48
|
+
export type VoiceDeliveryRuntimeRoutesOptions = {
|
|
49
|
+
headers?: HeadersInit;
|
|
50
|
+
htmlPath?: false | string;
|
|
51
|
+
name?: string;
|
|
52
|
+
path?: string;
|
|
53
|
+
render?: (report: VoiceDeliveryRuntimeReport, options: {
|
|
54
|
+
requeueDeadLettersPath?: false | string;
|
|
55
|
+
tickPath?: false | string;
|
|
56
|
+
title?: string;
|
|
57
|
+
}) => string | Promise<string>;
|
|
58
|
+
runtime: VoiceDeliveryRuntime;
|
|
59
|
+
requeueDeadLettersPath?: false | string;
|
|
60
|
+
tickPath?: false | string;
|
|
61
|
+
title?: string;
|
|
62
|
+
};
|
|
63
|
+
export type VoiceDeliveryRuntimePresetMode = "file" | "s3" | "webhook";
|
|
64
|
+
export type VoiceDeliveryRuntimePresetLeaseConfig = VoiceRedisTaskLeaseCoordinator | {
|
|
65
|
+
audit: VoiceRedisTaskLeaseCoordinator;
|
|
66
|
+
trace: VoiceRedisTaskLeaseCoordinator;
|
|
67
|
+
};
|
|
68
|
+
export type VoiceDeliveryRuntimePresetBaseOptions = {
|
|
69
|
+
auditDeliveries: VoiceAuditSinkDeliveryStore;
|
|
70
|
+
auditSinkId?: string;
|
|
71
|
+
auditWorkerId?: string;
|
|
72
|
+
autoStart?: boolean;
|
|
73
|
+
failures?: {
|
|
74
|
+
maxFailures?: number;
|
|
75
|
+
};
|
|
76
|
+
leases: VoiceDeliveryRuntimePresetLeaseConfig;
|
|
77
|
+
pollIntervalMs?: number;
|
|
78
|
+
traceDeliveries: VoiceTraceSinkDeliveryStore;
|
|
79
|
+
traceSinkId?: string;
|
|
80
|
+
traceWorkerId?: string;
|
|
81
|
+
};
|
|
82
|
+
export type VoiceDeliveryRuntimeWebhookPresetOptions = VoiceDeliveryRuntimePresetBaseOptions & {
|
|
83
|
+
backoffMs?: number;
|
|
84
|
+
body?: {
|
|
85
|
+
audit?: (input: {
|
|
86
|
+
events: StoredVoiceAuditEvent[];
|
|
87
|
+
}) => Promise<Record<string, unknown>> | Record<string, unknown>;
|
|
88
|
+
trace?: (input: {
|
|
89
|
+
events: StoredVoiceTraceEvent[];
|
|
90
|
+
}) => Promise<Record<string, unknown>> | Record<string, unknown>;
|
|
91
|
+
};
|
|
92
|
+
fetch?: typeof fetch;
|
|
93
|
+
headers?: Record<string, string>;
|
|
94
|
+
mode: "webhook";
|
|
95
|
+
retries?: number;
|
|
96
|
+
signingSecret?: string;
|
|
97
|
+
timeoutMs?: number;
|
|
98
|
+
url: string;
|
|
99
|
+
};
|
|
100
|
+
export type VoiceDeliveryRuntimeS3PresetOptions = VoiceDeliveryRuntimePresetBaseOptions & {
|
|
101
|
+
bucket?: string;
|
|
102
|
+
client?: VoiceS3AuditSinkClient & VoiceS3TraceSinkClient;
|
|
103
|
+
keyPrefix?: string;
|
|
104
|
+
mode: "s3";
|
|
105
|
+
};
|
|
106
|
+
export type VoiceDeliveryRuntimeFilePresetOptions = VoiceDeliveryRuntimePresetBaseOptions & {
|
|
107
|
+
directory: string;
|
|
108
|
+
mode: "file";
|
|
109
|
+
};
|
|
110
|
+
export type VoiceDeliveryRuntimePresetOptions = VoiceDeliveryRuntimeFilePresetOptions | VoiceDeliveryRuntimeS3PresetOptions | VoiceDeliveryRuntimeWebhookPresetOptions;
|
|
111
|
+
export declare const createVoiceDeliveryRuntimePresetConfig: (options: VoiceDeliveryRuntimePresetOptions) => VoiceDeliveryRuntimeConfig;
|
|
112
|
+
export declare const createVoiceDeliveryRuntime: <TAuditDelivery extends VoiceAuditSinkDeliveryRecord = VoiceAuditSinkDeliveryRecord, TTraceDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord>(config: VoiceDeliveryRuntimeConfig<TAuditDelivery, TTraceDelivery>) => VoiceDeliveryRuntime;
|
|
113
|
+
export declare const buildVoiceDeliveryRuntimeReport: (runtime: VoiceDeliveryRuntime) => Promise<VoiceDeliveryRuntimeReport>;
|
|
114
|
+
export declare const renderVoiceDeliveryRuntimeHTML: (report: VoiceDeliveryRuntimeReport, options?: {
|
|
115
|
+
requeueDeadLettersPath?: false | string;
|
|
116
|
+
tickPath?: false | string;
|
|
117
|
+
title?: string;
|
|
118
|
+
}) => string;
|
|
119
|
+
export declare const createVoiceDeliveryRuntimeRoutes: (options: VoiceDeliveryRuntimeRoutesOptions) => Elysia<"", {
|
|
120
|
+
decorator: {};
|
|
121
|
+
store: {};
|
|
122
|
+
derive: {};
|
|
123
|
+
resolve: {};
|
|
124
|
+
}, {
|
|
125
|
+
typebox: {};
|
|
126
|
+
error: {};
|
|
127
|
+
}, {
|
|
128
|
+
schema: {};
|
|
129
|
+
standaloneSchema: {};
|
|
130
|
+
macro: {};
|
|
131
|
+
macroFn: {};
|
|
132
|
+
parser: {};
|
|
133
|
+
response: {};
|
|
134
|
+
}, {
|
|
135
|
+
[x: string]: {
|
|
136
|
+
get: {
|
|
137
|
+
body: unknown;
|
|
138
|
+
params: {};
|
|
139
|
+
query: unknown;
|
|
140
|
+
headers: unknown;
|
|
141
|
+
response: {
|
|
142
|
+
200: VoiceDeliveryRuntimeReport;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
}, {
|
|
147
|
+
derive: {};
|
|
148
|
+
resolve: {};
|
|
149
|
+
schema: {};
|
|
150
|
+
standaloneSchema: {};
|
|
151
|
+
response: {};
|
|
152
|
+
}, {
|
|
153
|
+
derive: {};
|
|
154
|
+
resolve: {};
|
|
155
|
+
schema: {};
|
|
156
|
+
standaloneSchema: {};
|
|
157
|
+
response: {};
|
|
158
|
+
}>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
import { type VoiceAuditSinkDeliveryStore, type VoiceAuditSinkDeliveryQueueSummary } from "./auditSinks";
|
|
3
|
+
import { type VoiceTraceSinkDeliveryQueueSummary } from "./queue";
|
|
4
|
+
import type { VoiceTraceSinkDeliveryStore } from "./trace";
|
|
5
|
+
export type VoiceDeliverySinkKind = "file" | "postgres" | "s3" | "sqlite" | "webhook" | (string & {});
|
|
6
|
+
export type VoiceDeliverySinkDescriptor = {
|
|
7
|
+
description?: string;
|
|
8
|
+
href?: string;
|
|
9
|
+
id: string;
|
|
10
|
+
kind: VoiceDeliverySinkKind;
|
|
11
|
+
label: string;
|
|
12
|
+
mode?: string;
|
|
13
|
+
target?: string;
|
|
14
|
+
};
|
|
15
|
+
export type VoiceDeliverySinkDescriptorInput = {
|
|
16
|
+
description?: string;
|
|
17
|
+
href?: string;
|
|
18
|
+
id?: string;
|
|
19
|
+
kind: VoiceDeliverySinkKind;
|
|
20
|
+
label?: string;
|
|
21
|
+
mode?: string;
|
|
22
|
+
target?: string;
|
|
23
|
+
};
|
|
24
|
+
export type VoiceDeliverySinkPairOptions = {
|
|
25
|
+
auditHref?: string;
|
|
26
|
+
auditId?: string;
|
|
27
|
+
auditLabel?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
kind: VoiceDeliverySinkKind;
|
|
30
|
+
mode?: string;
|
|
31
|
+
target?: string;
|
|
32
|
+
traceHref?: string;
|
|
33
|
+
traceId?: string;
|
|
34
|
+
traceLabel?: string;
|
|
35
|
+
};
|
|
36
|
+
export type VoiceDeliverySinkReport = {
|
|
37
|
+
auditDeliveries?: VoiceTraceDeliverySinkSurface<VoiceAuditSinkDeliveryQueueSummary>;
|
|
38
|
+
checkedAt: number;
|
|
39
|
+
sinks: VoiceDeliverySinkDescriptor[];
|
|
40
|
+
status: "fail" | "pass" | "warn";
|
|
41
|
+
traceDeliveries?: VoiceTraceDeliverySinkSurface<VoiceTraceSinkDeliveryQueueSummary>;
|
|
42
|
+
};
|
|
43
|
+
export type VoiceTraceDeliverySinkSurface<TSummary> = {
|
|
44
|
+
href?: string;
|
|
45
|
+
label: string;
|
|
46
|
+
summary: TSummary;
|
|
47
|
+
};
|
|
48
|
+
export type VoiceDeliverySinkRoutesOptions = {
|
|
49
|
+
auditDeliveries?: {
|
|
50
|
+
href?: string;
|
|
51
|
+
label?: string;
|
|
52
|
+
store: VoiceAuditSinkDeliveryStore;
|
|
53
|
+
};
|
|
54
|
+
headers?: HeadersInit;
|
|
55
|
+
htmlPath?: false | string;
|
|
56
|
+
name?: string;
|
|
57
|
+
path?: string;
|
|
58
|
+
render?: (report: VoiceDeliverySinkReport) => string | Promise<string>;
|
|
59
|
+
sinks?: readonly VoiceDeliverySinkDescriptor[];
|
|
60
|
+
title?: string;
|
|
61
|
+
traceDeliveries?: {
|
|
62
|
+
href?: string;
|
|
63
|
+
label?: string;
|
|
64
|
+
store: VoiceTraceSinkDeliveryStore;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export declare const createVoiceDeliverySinkDescriptor: (input: VoiceDeliverySinkDescriptorInput) => VoiceDeliverySinkDescriptor;
|
|
68
|
+
export declare const createVoiceFileDeliverySink: (input?: Omit<VoiceDeliverySinkDescriptorInput, "kind">) => VoiceDeliverySinkDescriptor;
|
|
69
|
+
export declare const createVoiceWebhookDeliverySink: (input?: Omit<VoiceDeliverySinkDescriptorInput, "kind">) => VoiceDeliverySinkDescriptor;
|
|
70
|
+
export declare const createVoiceS3DeliverySink: (input?: Omit<VoiceDeliverySinkDescriptorInput, "kind">) => VoiceDeliverySinkDescriptor;
|
|
71
|
+
export declare const createVoicePostgresDeliverySink: (input?: Omit<VoiceDeliverySinkDescriptorInput, "kind">) => VoiceDeliverySinkDescriptor;
|
|
72
|
+
export declare const createVoiceSQLiteDeliverySink: (input?: Omit<VoiceDeliverySinkDescriptorInput, "kind">) => VoiceDeliverySinkDescriptor;
|
|
73
|
+
export declare const createVoiceDeliverySinkPair: (options: VoiceDeliverySinkPairOptions) => VoiceDeliverySinkDescriptor[];
|
|
74
|
+
export declare const buildVoiceDeliverySinkReport: (options: VoiceDeliverySinkRoutesOptions) => Promise<VoiceDeliverySinkReport>;
|
|
75
|
+
export declare const renderVoiceDeliverySinkHTML: (report: VoiceDeliverySinkReport, options?: {
|
|
76
|
+
title?: string;
|
|
77
|
+
}) => string;
|
|
78
|
+
export declare const createVoiceDeliverySinkRoutes: (options: VoiceDeliverySinkRoutesOptions) => Elysia<"", {
|
|
79
|
+
decorator: {};
|
|
80
|
+
store: {};
|
|
81
|
+
derive: {};
|
|
82
|
+
resolve: {};
|
|
83
|
+
}, {
|
|
84
|
+
typebox: {};
|
|
85
|
+
error: {};
|
|
86
|
+
}, {
|
|
87
|
+
schema: {};
|
|
88
|
+
standaloneSchema: {};
|
|
89
|
+
macro: {};
|
|
90
|
+
macroFn: {};
|
|
91
|
+
parser: {};
|
|
92
|
+
response: {};
|
|
93
|
+
}, {
|
|
94
|
+
[x: string]: {
|
|
95
|
+
get: {
|
|
96
|
+
body: unknown;
|
|
97
|
+
params: {};
|
|
98
|
+
query: unknown;
|
|
99
|
+
headers: unknown;
|
|
100
|
+
response: {
|
|
101
|
+
200: VoiceDeliverySinkReport;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
}, {
|
|
106
|
+
derive: {};
|
|
107
|
+
resolve: {};
|
|
108
|
+
schema: {};
|
|
109
|
+
standaloneSchema: {};
|
|
110
|
+
response: {};
|
|
111
|
+
}, {
|
|
112
|
+
derive: {};
|
|
113
|
+
resolve: {};
|
|
114
|
+
schema: {};
|
|
115
|
+
standaloneSchema: {};
|
|
116
|
+
response: {};
|
|
117
|
+
}>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
import type { VoiceOpsStatusReport } from "./opsStatus";
|
|
3
|
+
import type { VoicePhoneAgentProductionSmokeReport } from "./phoneAgentProductionSmoke";
|
|
4
|
+
import type { VoicePhoneAgentSetupReport } from "./phoneAgent";
|
|
5
|
+
import type { VoiceProductionReadinessReport } from "./productionReadiness";
|
|
6
|
+
export type VoiceDemoReadyStatus = "fail" | "pass" | "warn";
|
|
7
|
+
export type VoiceDemoReadySection = {
|
|
8
|
+
description?: string;
|
|
9
|
+
href?: string;
|
|
10
|
+
label: string;
|
|
11
|
+
status: VoiceDemoReadyStatus;
|
|
12
|
+
value?: number | string;
|
|
13
|
+
};
|
|
14
|
+
export type VoiceDemoReadyReport = {
|
|
15
|
+
checkedAt: number;
|
|
16
|
+
sections: VoiceDemoReadySection[];
|
|
17
|
+
status: VoiceDemoReadyStatus;
|
|
18
|
+
summary: {
|
|
19
|
+
opsStatus?: Pick<VoiceOpsStatusReport, "failed" | "passed" | "status" | "total">;
|
|
20
|
+
phoneSetup?: {
|
|
21
|
+
carriers: number;
|
|
22
|
+
ready: boolean;
|
|
23
|
+
};
|
|
24
|
+
phoneSmoke?: {
|
|
25
|
+
issues: number;
|
|
26
|
+
pass: boolean;
|
|
27
|
+
provider?: string;
|
|
28
|
+
sessionId?: string;
|
|
29
|
+
};
|
|
30
|
+
productionReadiness?: {
|
|
31
|
+
checks: number;
|
|
32
|
+
status: VoiceProductionReadinessReport["status"];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
title: string;
|
|
36
|
+
};
|
|
37
|
+
type VoiceDemoReadyLoader<TValue> = TValue | ((input: {
|
|
38
|
+
query: Record<string, unknown>;
|
|
39
|
+
request: Request;
|
|
40
|
+
}) => Promise<TValue | undefined> | TValue | undefined);
|
|
41
|
+
export type VoiceDemoReadyRoutesOptions = {
|
|
42
|
+
opsStatus?: false | {
|
|
43
|
+
href?: string;
|
|
44
|
+
load: VoiceDemoReadyLoader<VoiceOpsStatusReport>;
|
|
45
|
+
};
|
|
46
|
+
headers?: HeadersInit;
|
|
47
|
+
htmlPath?: false | string;
|
|
48
|
+
name?: string;
|
|
49
|
+
path?: string;
|
|
50
|
+
phoneSetup?: false | {
|
|
51
|
+
href?: string;
|
|
52
|
+
load: VoiceDemoReadyLoader<VoicePhoneAgentSetupReport>;
|
|
53
|
+
};
|
|
54
|
+
phoneSmoke?: false | {
|
|
55
|
+
href?: string;
|
|
56
|
+
load: VoiceDemoReadyLoader<VoicePhoneAgentProductionSmokeReport>;
|
|
57
|
+
};
|
|
58
|
+
productionReadiness?: false | {
|
|
59
|
+
href?: string;
|
|
60
|
+
load: VoiceDemoReadyLoader<VoiceProductionReadinessReport>;
|
|
61
|
+
};
|
|
62
|
+
render?: (report: VoiceDemoReadyReport) => Promise<string> | string;
|
|
63
|
+
title?: string;
|
|
64
|
+
};
|
|
65
|
+
export declare const buildVoiceDemoReadyReport: (options: VoiceDemoReadyRoutesOptions, input?: {
|
|
66
|
+
query?: Record<string, unknown>;
|
|
67
|
+
request?: Request;
|
|
68
|
+
}) => Promise<VoiceDemoReadyReport>;
|
|
69
|
+
export declare const renderVoiceDemoReadyHTML: (report: VoiceDemoReadyReport) => string;
|
|
70
|
+
export declare const createVoiceDemoReadyRoutes: (options: VoiceDemoReadyRoutesOptions) => Elysia<"", {
|
|
71
|
+
decorator: {};
|
|
72
|
+
store: {};
|
|
73
|
+
derive: {};
|
|
74
|
+
resolve: {};
|
|
75
|
+
}, {
|
|
76
|
+
typebox: {};
|
|
77
|
+
error: {};
|
|
78
|
+
}, {
|
|
79
|
+
schema: {};
|
|
80
|
+
standaloneSchema: {};
|
|
81
|
+
macro: {};
|
|
82
|
+
macroFn: {};
|
|
83
|
+
parser: {};
|
|
84
|
+
response: {};
|
|
85
|
+
}, {}, {
|
|
86
|
+
derive: {};
|
|
87
|
+
resolve: {};
|
|
88
|
+
schema: {};
|
|
89
|
+
standaloneSchema: {};
|
|
90
|
+
response: {};
|
|
91
|
+
}, {
|
|
92
|
+
derive: {};
|
|
93
|
+
resolve: {};
|
|
94
|
+
schema: {};
|
|
95
|
+
standaloneSchema: {};
|
|
96
|
+
response: {};
|
|
97
|
+
}>;
|
|
98
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Elysia } from
|
|
2
|
-
import { evaluateVoiceTrace, type StoredVoiceTraceEvent, type VoiceTraceEventFilter, type VoiceTraceEventStore, type VoiceTraceRedactionConfig } from
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
import { evaluateVoiceTrace, type StoredVoiceTraceEvent, type VoiceTraceEventFilter, type VoiceTraceEventStore, type VoiceTraceRedactionConfig } from "./trace";
|
|
3
3
|
export type VoiceDiagnosticsRoutesOptions = {
|
|
4
4
|
evaluation?: Parameters<typeof evaluateVoiceTrace>[1];
|
|
5
5
|
headers?: HeadersInit;
|
package/dist/evalRoutes.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Elysia } from
|
|
2
|
-
import { type VoiceQualityReport, type VoiceQualityThresholds } from
|
|
3
|
-
import { summarizeVoiceTrace, type StoredVoiceTraceEvent, type VoiceTraceEventStore } from
|
|
4
|
-
export type VoiceEvalStatus =
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
import { type VoiceQualityReport, type VoiceQualityThresholds } from "./qualityRoutes";
|
|
3
|
+
import { summarizeVoiceTrace, type StoredVoiceTraceEvent, type VoiceTraceEventStore } from "./trace";
|
|
4
|
+
export type VoiceEvalStatus = "pass" | "fail";
|
|
5
5
|
export type VoiceEvalSessionReport = {
|
|
6
6
|
endedAt?: number;
|
|
7
7
|
eventCount: number;
|
|
8
|
+
operationsRecordHref?: string;
|
|
8
9
|
quality: VoiceQualityReport;
|
|
9
10
|
scenarioId?: string;
|
|
10
11
|
sessionId: string;
|
|
@@ -75,11 +76,13 @@ export type VoiceScenarioEvalDefinition = {
|
|
|
75
76
|
requiredLifecycleTypes?: string[];
|
|
76
77
|
requiredPayloadPaths?: string[];
|
|
77
78
|
requiredTranscriptIncludes?: string[];
|
|
79
|
+
requiredWorkflowContracts?: string[];
|
|
78
80
|
scenarioId?: string;
|
|
79
81
|
};
|
|
80
82
|
export type VoiceScenarioEvalSessionResult = {
|
|
81
83
|
eventCount: number;
|
|
82
84
|
issues: string[];
|
|
85
|
+
operationsRecordHref?: string;
|
|
83
86
|
sessionId: string;
|
|
84
87
|
status: VoiceEvalStatus;
|
|
85
88
|
};
|
|
@@ -102,6 +105,30 @@ export type VoiceScenarioEvalReport = {
|
|
|
102
105
|
status: VoiceEvalStatus;
|
|
103
106
|
total: number;
|
|
104
107
|
};
|
|
108
|
+
export type VoiceScenarioFixture = {
|
|
109
|
+
description?: string;
|
|
110
|
+
events: StoredVoiceTraceEvent[];
|
|
111
|
+
id: string;
|
|
112
|
+
label?: string;
|
|
113
|
+
};
|
|
114
|
+
export type VoiceScenarioFixtureStore = {
|
|
115
|
+
list: () => Promise<VoiceScenarioFixture[]>;
|
|
116
|
+
};
|
|
117
|
+
export type VoiceScenarioFixtureEvalResult = {
|
|
118
|
+
description?: string;
|
|
119
|
+
fixtureId: string;
|
|
120
|
+
label: string;
|
|
121
|
+
report: VoiceScenarioEvalReport;
|
|
122
|
+
status: VoiceEvalStatus;
|
|
123
|
+
};
|
|
124
|
+
export type VoiceScenarioFixtureEvalReport = {
|
|
125
|
+
checkedAt: number;
|
|
126
|
+
failed: number;
|
|
127
|
+
fixtures: VoiceScenarioFixtureEvalResult[];
|
|
128
|
+
passed: number;
|
|
129
|
+
status: VoiceEvalStatus;
|
|
130
|
+
total: number;
|
|
131
|
+
};
|
|
105
132
|
export type VoiceEvalLink = {
|
|
106
133
|
href: string;
|
|
107
134
|
label: string;
|
|
@@ -111,10 +138,13 @@ export type VoiceEvalRoutesOptions = {
|
|
|
111
138
|
baselineComparison?: VoiceEvalBaselineComparisonOptions;
|
|
112
139
|
baselineStore?: VoiceEvalBaselineStore;
|
|
113
140
|
events?: StoredVoiceTraceEvent[];
|
|
141
|
+
fixtures?: VoiceScenarioFixture[];
|
|
142
|
+
fixtureStore?: VoiceScenarioFixtureStore;
|
|
114
143
|
headers?: HeadersInit;
|
|
115
144
|
links?: VoiceEvalLink[];
|
|
116
145
|
limit?: number;
|
|
117
146
|
name?: string;
|
|
147
|
+
operationsRecordHref?: false | string | ((sessionId: string) => string);
|
|
118
148
|
path?: string;
|
|
119
149
|
scenarios?: VoiceScenarioEvalDefinition[];
|
|
120
150
|
store?: VoiceTraceEventStore;
|
|
@@ -124,16 +154,25 @@ export type VoiceEvalRoutesOptions = {
|
|
|
124
154
|
export declare const runVoiceSessionEvals: (options?: {
|
|
125
155
|
events?: StoredVoiceTraceEvent[];
|
|
126
156
|
limit?: number;
|
|
157
|
+
operationsRecordHref?: false | string | ((sessionId: string) => string);
|
|
127
158
|
store?: VoiceTraceEventStore;
|
|
128
159
|
thresholds?: VoiceQualityThresholds;
|
|
129
160
|
}) => Promise<VoiceEvalReport>;
|
|
130
161
|
export declare const runVoiceScenarioEvals: (options?: {
|
|
131
162
|
events?: StoredVoiceTraceEvent[];
|
|
163
|
+
operationsRecordHref?: false | string | ((sessionId: string) => string);
|
|
132
164
|
scenarios?: VoiceScenarioEvalDefinition[];
|
|
133
165
|
store?: VoiceTraceEventStore;
|
|
134
166
|
}) => Promise<VoiceScenarioEvalReport>;
|
|
167
|
+
export declare const runVoiceScenarioFixtureEvals: (options?: {
|
|
168
|
+
fixtures?: VoiceScenarioFixture[];
|
|
169
|
+
fixtureStore?: VoiceScenarioFixtureStore;
|
|
170
|
+
operationsRecordHref?: false | string | ((sessionId: string) => string);
|
|
171
|
+
scenarios?: VoiceScenarioEvalDefinition[];
|
|
172
|
+
}) => Promise<VoiceScenarioFixtureEvalReport>;
|
|
135
173
|
export declare const compareVoiceEvalBaseline: (currentReport: VoiceEvalReport, baselineReport: VoiceEvalReport, options?: VoiceEvalBaselineComparisonOptions) => VoiceEvalBaselineComparison;
|
|
136
174
|
export declare const createVoiceFileEvalBaselineStore: (filePath: string) => VoiceEvalBaselineStore;
|
|
175
|
+
export declare const createVoiceFileScenarioFixtureStore: (filePath: string) => VoiceScenarioFixtureStore;
|
|
137
176
|
export declare const renderVoiceEvalHTML: (report: VoiceEvalReport, options?: {
|
|
138
177
|
links?: VoiceEvalLink[];
|
|
139
178
|
title?: string;
|
|
@@ -146,6 +185,10 @@ export declare const renderVoiceScenarioEvalHTML: (report: VoiceScenarioEvalRepo
|
|
|
146
185
|
links?: VoiceEvalLink[];
|
|
147
186
|
title?: string;
|
|
148
187
|
}) => string;
|
|
188
|
+
export declare const renderVoiceScenarioFixtureEvalHTML: (report: VoiceScenarioFixtureEvalReport, options?: {
|
|
189
|
+
links?: VoiceEvalLink[];
|
|
190
|
+
title?: string;
|
|
191
|
+
}) => string;
|
|
149
192
|
export declare const createVoiceEvalRoutes: (options: VoiceEvalRoutesOptions) => Elysia<"", {
|
|
150
193
|
decorator: {};
|
|
151
194
|
store: {};
|