@absolutejs/voice 0.0.22-beta.282 → 0.0.22-beta.283

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -123,7 +123,7 @@ export type { VoicePhoneAgentCarrier, VoicePhoneAgentCarrierSummary, VoicePhoneA
123
123
  export type { VoicePhoneAgentProductionSmokeIssue, VoicePhoneAgentProductionSmokeHandlerOptions, VoicePhoneAgentProductionSmokeHTMLHandlerOptions, VoicePhoneAgentProductionSmokeOptions, VoicePhoneAgentProductionSmokeReport, VoicePhoneAgentProductionSmokeRoutesOptions, VoicePhoneAgentProductionSmokeRequirement } from './phoneAgentProductionSmoke';
124
124
  export type { VoiceOpsConsoleLink, VoiceOpsConsoleReport, VoiceOpsConsoleRoutesOptions } from './opsConsoleRoutes';
125
125
  export type { VoiceOpsStatus, VoiceOpsStatusLink, VoiceOpsStatusOptions, VoiceOpsStatusReport, VoiceOpsStatusRoutesOptions } from './opsStatus';
126
- export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptions, VoiceProductionReadinessAuditRequirement, VoiceProductionReadinessAuditSummary, VoiceProductionReadinessAssertionInput, VoiceProductionReadinessAssertionReport, VoiceProductionReadinessCheck, VoiceProductionReadinessGateIssue, VoiceProductionReadinessGateOptions, VoiceProductionReadinessGateProfile, VoiceProductionReadinessGateProfileSurface, VoiceProductionReadinessGateReport, VoiceProductionReadinessOpsActionHistoryOptions, VoiceProductionReadinessOpsActionHistorySummary, VoiceProductionReadinessOperationsRecordLink, VoiceProductionReadinessOperationsRecordLinks, VoiceProductionReadinessProfileExplanation, VoiceProductionReadinessProfileSurface, VoiceProductionReadinessProofSource, VoiceProductionReadinessReport, VoiceProductionReadinessRoutesOptions, VoiceProductionReadinessTraceDeliverySummary, VoiceProductionReadinessAuditDeliveryOptions, VoiceProductionReadinessAuditDeliverySummary, VoiceProductionReadinessTraceDeliveryOptions, VoiceProductionReadinessStatus } from './productionReadiness';
126
+ export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptions, VoiceProductionReadinessAuditRequirement, VoiceProductionReadinessAuditSummary, VoiceProductionReadinessAssertionInput, VoiceProductionReadinessAssertionReport, VoiceProductionReadinessCheck, VoiceProductionReadinessGateIssue, VoiceProductionReadinessGateOptions, VoiceProductionReadinessGateProfile, VoiceProductionReadinessGateProfileSurface, VoiceProductionReadinessGateReport, VoiceProductionReadinessOpsActionHistoryOptions, VoiceProductionReadinessOpsActionHistorySummary, VoiceProductionReadinessOperationsRecordLink, VoiceProductionReadinessOperationsRecordLinks, VoiceProductionReadinessProfileExplanation, VoiceProductionReadinessProfileSurface, VoiceProductionReadinessProofSource, VoiceProductionReadinessReport, VoiceProductionReadinessRouteInput, VoiceProductionReadinessRoutesOptions, VoiceProductionReadinessTraceDeliverySummary, VoiceProductionReadinessAuditDeliveryOptions, VoiceProductionReadinessAuditDeliverySummary, VoiceProductionReadinessTraceDeliveryOptions, VoiceProductionReadinessStatus } from './productionReadiness';
127
127
  export type { VoiceMonitorDefinition, VoiceMonitorEvaluation, VoiceMonitorEvaluationInput, VoiceMonitorIssue, VoiceMonitorIssueStatus, VoiceMonitorIssueStore, VoiceMonitorNotifier, VoiceMonitorNotifierDeliveryInput, VoiceMonitorNotifierDeliveryOptions, VoiceMonitorNotifierDeliveryReceipt, VoiceMonitorNotifierDeliveryReceiptStore, VoiceMonitorNotifierDeliveryReport, VoiceMonitorNotifierDeliveryResult, VoiceMonitorRoutesOptions, VoiceMonitorRun, VoiceMonitorRunOptions, VoiceMonitorRunReport, VoiceMonitorRunner, VoiceMonitorRunnerOptions, VoiceMonitorRunnerRoutesOptions, VoiceMonitorRunnerTickResult, VoiceMonitorSeverity, VoiceMonitorStatus, VoiceMonitorWebhookNotifierOptions } from './voiceMonitoring';
128
128
  export type { VoiceReadinessProfileName, VoiceReadinessProfileOptions, VoiceReadinessProfileRecommendation, VoiceReadinessProfileRecommendationScore, VoiceReadinessProfileRoutesOptions } from './readinessProfiles';
129
129
  export type { VoiceProviderStackChoice, VoiceProviderStackCapabilities, VoiceProviderStackCapabilityGap, VoiceProviderStackCapabilityGapInput, VoiceProviderStackCapabilityGapReport, VoiceProviderContractCheck, VoiceProviderContractCheckStatus, VoiceProviderContractDefinition, VoiceProviderContractMatrixAssertionInput, VoiceProviderContractMatrixAssertionReport, VoiceProviderContractMatrixHandlerOptions, VoiceProviderContractMatrixHTMLHandlerOptions, VoiceProviderContractMatrixInput, VoiceProviderContractMatrixPresetOptions, VoiceProviderContractMatrixReport, VoiceProviderContractMatrixRoutesOptions, VoiceProviderContractMatrixRow, VoiceProviderStackAssertionInput, VoiceProviderStackAssertionReport, VoiceProviderStackInput, VoiceProviderStackKind, VoiceProviderStackRecommendation } from './providerStackRecommendations';
package/dist/index.js CHANGED
@@ -28734,17 +28734,27 @@ var createVoiceProductionReadinessRoutes = (options) => {
28734
28734
  const routes = new Elysia44({
28735
28735
  name: options.name ?? "absolutejs-voice-production-readiness"
28736
28736
  });
28737
- routes.get(path, async ({ query, request }) => buildVoiceProductionReadinessReport(options, { query, request }));
28737
+ const resolveOptions = async (input) => {
28738
+ if (!options.resolveOptions) {
28739
+ return options;
28740
+ }
28741
+ return {
28742
+ ...options,
28743
+ ...await options.resolveOptions(input)
28744
+ };
28745
+ };
28746
+ routes.get(path, async ({ query, request }) => buildVoiceProductionReadinessReport(await resolveOptions({ query, request }), { query, request }));
28738
28747
  if (gatePath !== false) {
28739
28748
  routes.get(gatePath, async ({ query, request }) => {
28740
- const gate = await buildVoiceProductionReadinessGate(options, {
28749
+ const resolvedOptions = await resolveOptions({ query, request });
28750
+ const gate = await buildVoiceProductionReadinessGate(resolvedOptions, {
28741
28751
  query,
28742
28752
  request
28743
28753
  });
28744
28754
  return new Response(JSON.stringify(gate), {
28745
28755
  headers: {
28746
28756
  "Content-Type": "application/json; charset=utf-8",
28747
- ...options.headers
28757
+ ...resolvedOptions.headers
28748
28758
  },
28749
28759
  status: gate.ok ? 200 : 503
28750
28760
  });
@@ -28752,15 +28762,16 @@ var createVoiceProductionReadinessRoutes = (options) => {
28752
28762
  }
28753
28763
  if (htmlPath !== false) {
28754
28764
  routes.get(htmlPath, async ({ query, request }) => {
28755
- const report = await buildVoiceProductionReadinessReport(options, {
28765
+ const resolvedOptions = await resolveOptions({ query, request });
28766
+ const report = await buildVoiceProductionReadinessReport(resolvedOptions, {
28756
28767
  query,
28757
28768
  request
28758
28769
  });
28759
- const body = await (options.render ?? renderVoiceProductionReadinessHTML)(report);
28770
+ const body = await (resolvedOptions.render ?? renderVoiceProductionReadinessHTML)(report);
28760
28771
  return new Response(body, {
28761
28772
  headers: {
28762
28773
  "Content-Type": "text/html; charset=utf-8",
28763
- ...options.headers
28774
+ ...resolvedOptions.headers
28764
28775
  }
28765
28776
  });
28766
28777
  });
@@ -379,6 +379,10 @@ export type VoiceProductionReadinessOpsActionHistoryOptions = VoiceAuditEventSto
379
379
  store: VoiceAuditEventStore;
380
380
  warnWhenEmpty?: boolean;
381
381
  };
382
+ export type VoiceProductionReadinessRouteInput = {
383
+ query: Record<string, unknown>;
384
+ request: Request;
385
+ };
382
386
  export type VoiceProductionReadinessRoutesOptions = {
383
387
  agentSquadContracts?: false | readonly VoiceAgentSquadContractReport[] | ((input: {
384
388
  query: Record<string, unknown>;
@@ -469,6 +473,7 @@ export type VoiceProductionReadinessRoutesOptions = {
469
473
  }) => Promise<Record<string, VoiceProductionReadinessProofSource>> | Record<string, VoiceProductionReadinessProofSource>);
470
474
  profile?: false | VoiceProductionReadinessProfileExplanation;
471
475
  render?: (report: VoiceProductionReadinessReport) => string | Promise<string>;
476
+ resolveOptions?: (input: VoiceProductionReadinessRouteInput) => Promise<Partial<Omit<VoiceProductionReadinessRoutesOptions, 'resolveOptions'>>> | Partial<Omit<VoiceProductionReadinessRoutesOptions, 'resolveOptions'>>;
472
477
  store: VoiceTraceEventStore;
473
478
  sttProviders?: readonly string[];
474
479
  title?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.282",
3
+ "version": "0.0.22-beta.283",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",