@absolutejs/voice 0.0.22-beta.161 → 0.0.22-beta.162

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
@@ -103,7 +103,7 @@ export type { VoicePhoneAgentCarrier, VoicePhoneAgentCarrierSummary, VoicePhoneA
103
103
  export type { VoicePhoneAgentProductionSmokeIssue, VoicePhoneAgentProductionSmokeHandlerOptions, VoicePhoneAgentProductionSmokeHTMLHandlerOptions, VoicePhoneAgentProductionSmokeOptions, VoicePhoneAgentProductionSmokeReport, VoicePhoneAgentProductionSmokeRoutesOptions, VoicePhoneAgentProductionSmokeRequirement } from './phoneAgentProductionSmoke';
104
104
  export type { VoiceOpsConsoleLink, VoiceOpsConsoleReport, VoiceOpsConsoleRoutesOptions } from './opsConsoleRoutes';
105
105
  export type { VoiceOpsStatus, VoiceOpsStatusLink, VoiceOpsStatusOptions, VoiceOpsStatusReport, VoiceOpsStatusRoutesOptions } from './opsStatus';
106
- export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptions, VoiceProductionReadinessAuditRequirement, VoiceProductionReadinessAuditSummary, VoiceProductionReadinessCheck, VoiceProductionReadinessGateIssue, VoiceProductionReadinessGateOptions, VoiceProductionReadinessGateReport, VoiceProductionReadinessOpsActionHistoryOptions, VoiceProductionReadinessOpsActionHistorySummary, VoiceProductionReadinessProfileExplanation, VoiceProductionReadinessProfileSurface, VoiceProductionReadinessProofSource, VoiceProductionReadinessReport, VoiceProductionReadinessRoutesOptions, VoiceProductionReadinessTraceDeliverySummary, VoiceProductionReadinessAuditDeliveryOptions, VoiceProductionReadinessAuditDeliverySummary, VoiceProductionReadinessTraceDeliveryOptions, VoiceProductionReadinessStatus } from './productionReadiness';
106
+ export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptions, VoiceProductionReadinessAuditRequirement, VoiceProductionReadinessAuditSummary, VoiceProductionReadinessCheck, VoiceProductionReadinessGateIssue, VoiceProductionReadinessGateOptions, VoiceProductionReadinessGateProfile, VoiceProductionReadinessGateProfileSurface, VoiceProductionReadinessGateReport, VoiceProductionReadinessOpsActionHistoryOptions, VoiceProductionReadinessOpsActionHistorySummary, VoiceProductionReadinessProfileExplanation, VoiceProductionReadinessProfileSurface, VoiceProductionReadinessProofSource, VoiceProductionReadinessReport, VoiceProductionReadinessRoutesOptions, VoiceProductionReadinessTraceDeliverySummary, VoiceProductionReadinessAuditDeliveryOptions, VoiceProductionReadinessAuditDeliverySummary, VoiceProductionReadinessTraceDeliveryOptions, VoiceProductionReadinessStatus } from './productionReadiness';
107
107
  export type { VoiceReadinessProfileName, VoiceReadinessProfileOptions, VoiceReadinessProfileRoutesOptions } from './readinessProfiles';
108
108
  export type { VoiceQualityLink, VoiceQualityMetric, VoiceQualityReport, VoiceQualityRoutesOptions, VoiceQualityStatus, VoiceQualityThresholds } from './qualityRoutes';
109
109
  export type { VoiceResilienceIOSimulator, VoiceResilienceLink, VoiceResiliencePageData, VoiceResilienceRoutesOptions, VoiceResilienceSimulationProvider, VoiceRoutingKindSummary, VoiceRoutingDecisionSummary, VoiceRoutingDecisionSummaryOptions, VoiceRoutingEvent, VoiceRoutingEventKind, VoiceRoutingSessionSummary, VoiceRoutingSessionSummaryOptions } from './resilienceRoutes';
package/dist/index.js CHANGED
@@ -20149,6 +20149,27 @@ var readinessGateCodes = {
20149
20149
  "Trace sink delivery": "voice.readiness.trace_sink_delivery"
20150
20150
  };
20151
20151
  var readinessGateCodeForCheck = (check) => readinessGateCodes[check.label] ?? `voice.readiness.${check.label.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "")}`;
20152
+ var normalizeReadinessLabel = (value) => value.toLowerCase().replace(/[^a-z0-9]+/g, "");
20153
+ var issueMatchesProfileSurface = (issue, surface) => normalizeReadinessLabel(issue.label) === normalizeReadinessLabel(surface.label) || issue.code.includes(surface.key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9]+/g, "_"));
20154
+ var summarizeProfileSurfaceStatus = (issues) => issues.some((issue) => issue.status === "fail") ? "fail" : issues.some((issue) => issue.status === "warn") ? "warn" : "pass";
20155
+ var summarizeVoiceProductionReadinessGateProfile = (report, issues) => {
20156
+ if (!report.profile) {
20157
+ return;
20158
+ }
20159
+ return {
20160
+ description: report.profile.description,
20161
+ name: report.profile.name,
20162
+ purpose: report.profile.purpose,
20163
+ surfaces: report.profile.surfaces.map((surface) => {
20164
+ const surfaceIssues = issues.filter((issue) => issueMatchesProfileSurface(issue, surface));
20165
+ return {
20166
+ ...surface,
20167
+ issues: surfaceIssues,
20168
+ status: summarizeProfileSurfaceStatus(surfaceIssues)
20169
+ };
20170
+ })
20171
+ };
20172
+ };
20152
20173
  var summarizeVoiceProductionReadinessGate = (report, options = {}) => {
20153
20174
  const issues = report.checks.filter((check) => check.status !== "pass").map((check) => ({
20154
20175
  code: readinessGateCodeForCheck(check),
@@ -20165,6 +20186,7 @@ var summarizeVoiceProductionReadinessGate = (report, options = {}) => {
20165
20186
  checkedAt: report.checkedAt,
20166
20187
  failures,
20167
20188
  ok,
20189
+ profile: summarizeVoiceProductionReadinessGateProfile(report, issues),
20168
20190
  status: ok ? report.status : "fail",
20169
20191
  warnings
20170
20192
  };
@@ -42,6 +42,7 @@ export type VoiceProductionReadinessGateReport = {
42
42
  checkedAt: number;
43
43
  failures: VoiceProductionReadinessGateIssue[];
44
44
  ok: boolean;
45
+ profile?: VoiceProductionReadinessGateProfile;
45
46
  status: VoiceProductionReadinessStatus;
46
47
  warnings: VoiceProductionReadinessGateIssue[];
47
48
  };
@@ -64,6 +65,13 @@ export type VoiceProductionReadinessProfileExplanation = {
64
65
  purpose: string;
65
66
  surfaces: VoiceProductionReadinessProfileSurface[];
66
67
  };
68
+ export type VoiceProductionReadinessGateProfileSurface = VoiceProductionReadinessProfileSurface & {
69
+ issues: VoiceProductionReadinessGateIssue[];
70
+ status: VoiceProductionReadinessStatus;
71
+ };
72
+ export type VoiceProductionReadinessGateProfile = Omit<VoiceProductionReadinessProfileExplanation, 'surfaces'> & {
73
+ surfaces: VoiceProductionReadinessGateProfileSurface[];
74
+ };
67
75
  export type VoiceProductionReadinessReport = {
68
76
  checkedAt: number;
69
77
  checks: VoiceProductionReadinessCheck[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.161",
3
+ "version": "0.0.22-beta.162",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",