@absolutejs/voice 0.0.22-beta.393 → 0.0.22-beta.394
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 +2 -0
- package/dist/index.js +74 -33
- package/dist/proofAssertions.d.ts +32 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export { assertVoiceCompetitiveCoverage, buildVoiceCompetitiveCoverageReport, cr
|
|
|
31
31
|
export type { VoiceCompetitiveCoverageAssertionInput, VoiceCompetitiveCoverageAssertionReport, VoiceCompetitiveCoverageIssue, VoiceCompetitiveCoverageLevel, VoiceCompetitiveCoverageReport, VoiceCompetitiveCoverageReportInput, VoiceCompetitiveCoverageRoutesOptions, VoiceCompetitiveCoverageStatus, VoiceCompetitiveCoverageSummary, VoiceCompetitiveDepthLevel, VoiceCompetitiveEvidence, VoiceCompetitiveSurface } from './competitiveCoverage';
|
|
32
32
|
export type { VoicePlatformCoverageAssertionInput, VoicePlatformCoverageAssertionReport, VoicePlatformCoverageEvidence, VoicePlatformCoverageRoutesOptions, VoicePlatformCoverageStatus, VoicePlatformCoverageSummary, VoicePlatformCoverageSummaryInput, VoicePlatformCoverageSurface } from './platformCoverage';
|
|
33
33
|
export { assertVoiceProofTrendEvidence, appendVoiceRealCallProfileRecoveryEvidence, buildEmptyVoiceProofTrendReport, buildVoiceProofTrendProfileSummaries, buildVoiceProofTrendRecommendationReport, buildVoiceProofTrendReportFromRealCallProfiles, buildVoiceProofTrendReport, buildVoiceRealCallProfileEvidenceFromTraceEvents, buildVoiceRealCallProfileDefaults, buildVoiceRealCallProfileHistoryReport, buildVoiceRealCallProfileReadinessCheck, buildVoiceRealCallProfileRecoveryJobHistoryCheck, buildVoiceRealCallProfileRecoveryActions, createVoiceInMemoryRealCallProfileRecoveryJobStore, createVoiceRealCallProfileTraceCollector, createVoiceSQLiteRealCallProfileRecoveryJobStore, createVoiceProofTrendRecommendationRoutes, createVoiceProofTrendRoutes, createVoiceRealCallProfileHistoryRoutes, createVoiceRealCallProfileRecoveryActionRoutes, DEFAULT_VOICE_PROOF_TREND_PROFILE_DEFINITIONS, DEFAULT_VOICE_PROOF_TRENDS_MAX_AGE_MS, evaluateVoiceProofTrendEvidence, formatVoiceProofTrendAge, loadVoiceRealCallProfileEvidenceFromTraceStore, normalizeVoiceProofTrendReport, readVoiceProofTrendReportFile, renderVoiceProofTrendRecommendationHTML, renderVoiceProofTrendRecommendationMarkdown, renderVoiceRealCallProfileHistoryHTML, renderVoiceRealCallProfileHistoryMarkdown, runVoiceRealCallProfileRecoveryLoop, resolveVoiceRealCallProfileProviderRoute } from './proofTrends';
|
|
34
|
+
export { createVoiceEvidenceAssertion, createVoiceProofAssertion, summarizeVoiceProofAssertions } from './proofAssertions';
|
|
35
|
+
export type { VoiceEvidenceAssertionInput, VoiceProofAssertionInput, VoiceProofAssertionResult, VoiceProofAssertionSummary } from './proofAssertions';
|
|
34
36
|
export { applyVoiceProfileSwitchGuard, buildVoiceProfileSwitchReadinessReport, buildVoiceProfileSwitchLiveDecisionReport, createVoiceProfileSwitchLiveDecisionRoutes, createVoiceProfileSwitchPolicyProofRoutes, createVoiceProfileSwitchReadinessRoutes, recommendVoiceProfileSwitch, renderVoiceProfileSwitchLiveDecisionHTML, renderVoiceProfileSwitchPolicyProofHTML, renderVoiceProfileSwitchReadinessHTML, runVoiceProfileSwitchPolicyProof } from './profileSwitchRecommendation';
|
|
35
37
|
export type { VoiceProfileSwitchGuardAction, VoiceProfileSwitchGuardDecision, VoiceProfileSwitchGuardMode, VoiceProfileSwitchGuardOptions, VoiceProfileSwitchObservedSignals, VoiceProfileSwitchLiveDecisionEvidence, VoiceProfileSwitchLiveDecisionReport, VoiceProfileSwitchLiveDecisionReportOptions, VoiceProfileSwitchLiveDecisionRoutesOptions, VoiceProfileSwitchLiveDecisionSession, VoiceProfileSwitchPolicyProofCase, VoiceProfileSwitchPolicyProofCaseResult, VoiceProfileSwitchPolicyProofOptions, VoiceProfileSwitchPolicyProofReport, VoiceProfileSwitchPolicyProofRoutesOptions, VoiceProfileSwitchReadinessIssue, VoiceProfileSwitchReadinessOptions, VoiceProfileSwitchReadinessReport, VoiceProfileSwitchReadinessRoutesOptions, VoiceProfileSwitchReadinessStatus, VoiceProfileSwitchRecommendation, VoiceProfileSwitchRecommendationOptions } from './profileSwitchRecommendation';
|
|
36
38
|
export { buildVoiceProviderDecisionTraceReport, createVoiceProviderDecisionTraceEvent, createVoiceProviderDecisionTraceRoutes, listVoiceProviderDecisionTraces, renderVoiceProviderDecisionTraceHTML, renderVoiceProviderDecisionTraceMarkdown } from './providerDecisionTraces';
|
package/dist/index.js
CHANGED
|
@@ -18347,6 +18347,44 @@ var formatVoiceProofTrendAge = (ageMs) => {
|
|
|
18347
18347
|
const days = Math.floor(hours / 24);
|
|
18348
18348
|
return `${days}d ${hours % 24}h`;
|
|
18349
18349
|
};
|
|
18350
|
+
// src/proofAssertions.ts
|
|
18351
|
+
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18352
|
+
var createVoiceProofAssertion = (input) => ({
|
|
18353
|
+
kind: "json-assertion",
|
|
18354
|
+
name: input.name,
|
|
18355
|
+
ok: input.ok === true,
|
|
18356
|
+
summary: input.summary ?? (input.ok === true ? undefined : {
|
|
18357
|
+
issues: [input.missingIssue ?? `${input.name} proof is missing.`]
|
|
18358
|
+
})
|
|
18359
|
+
});
|
|
18360
|
+
var createVoiceEvidenceAssertion = (input) => {
|
|
18361
|
+
if (input.evidence === undefined) {
|
|
18362
|
+
return createVoiceProofAssertion({
|
|
18363
|
+
missingIssue: input.missingIssue,
|
|
18364
|
+
name: input.name,
|
|
18365
|
+
ok: false
|
|
18366
|
+
});
|
|
18367
|
+
}
|
|
18368
|
+
return {
|
|
18369
|
+
kind: "json-assertion",
|
|
18370
|
+
name: input.name,
|
|
18371
|
+
ok: input.ok?.(input.evidence) ?? (isRecord(input.evidence) && input.evidence.ok === true),
|
|
18372
|
+
summary: input.summary?.(input.evidence) ?? (isRecord(input.evidence) ? input.evidence : undefined)
|
|
18373
|
+
};
|
|
18374
|
+
};
|
|
18375
|
+
var summarizeVoiceProofAssertions = (assertions) => {
|
|
18376
|
+
const failures = assertions.filter((assertion) => !assertion.ok).map((assertion) => ({
|
|
18377
|
+
name: assertion.name,
|
|
18378
|
+
summary: assertion.summary
|
|
18379
|
+
}));
|
|
18380
|
+
return {
|
|
18381
|
+
failed: failures.length,
|
|
18382
|
+
failures,
|
|
18383
|
+
ok: failures.length === 0,
|
|
18384
|
+
passed: assertions.length - failures.length,
|
|
18385
|
+
total: assertions.length
|
|
18386
|
+
};
|
|
18387
|
+
};
|
|
18350
18388
|
// src/providerRouterTraces.ts
|
|
18351
18389
|
var buildVoiceProviderRouterTraceEvent = (options) => ({
|
|
18352
18390
|
at: options.at ?? options.event.at,
|
|
@@ -23472,7 +23510,7 @@ var DEFAULT_MACHINE_VOICEMAIL_VALUES = [
|
|
|
23472
23510
|
"voicemail"
|
|
23473
23511
|
];
|
|
23474
23512
|
var DEFAULT_NO_ANSWER_SIP_CODES = [408, 480, 486, 487, 603];
|
|
23475
|
-
var
|
|
23513
|
+
var isRecord2 = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
23476
23514
|
var uniqueSorted4 = (values) => Array.from(new Set(values)).sort();
|
|
23477
23515
|
var findMissing3 = (values, required) => {
|
|
23478
23516
|
if (!required?.length) {
|
|
@@ -23514,9 +23552,9 @@ var evaluateVoiceTelephonyWebhookNormalizationEvidence = (input = {}) => {
|
|
|
23514
23552
|
const duplicateDecisions = decisions.filter((decision) => decision.duplicate === true);
|
|
23515
23553
|
const duplicateProviders = uniqueSorted4(duplicateDecisions.map((decision) => decision.provider ?? decision.event?.provider).filter(isTelephonyWebhookProvider));
|
|
23516
23554
|
const duplicateIdempotencyKeys = new Set(duplicateDecisions.map((decision) => decision.idempotencyKey).filter((key) => typeof key === "string" && key.length > 0)).size;
|
|
23517
|
-
const duplicateCampaignOutcomesApplied = duplicateDecisions.filter((decision) =>
|
|
23518
|
-
const duplicateOutcomeReasons = uniqueSorted4(duplicateDecisions.map((decision) =>
|
|
23519
|
-
const routeResults = decisions.filter((decision) =>
|
|
23555
|
+
const duplicateCampaignOutcomesApplied = duplicateDecisions.filter((decision) => isRecord2(decision.campaignOutcome) && decision.campaignOutcome.applied === true).length;
|
|
23556
|
+
const duplicateOutcomeReasons = uniqueSorted4(duplicateDecisions.map((decision) => isRecord2(decision.campaignOutcome) ? decision.campaignOutcome.reason : undefined).filter((reason) => typeof reason === "string"));
|
|
23557
|
+
const routeResults = decisions.filter((decision) => isRecord2(decision.routeResult)).length;
|
|
23520
23558
|
const missingSessionIds = decisions.filter((decision) => !decision.sessionId).length;
|
|
23521
23559
|
const rejectedVerificationAttempts = verificationAttempts.filter((attempt) => attempt.rejected === true || attempt.status === 401 || attempt.verification?.ok === false && attempt.verification.reason === "invalid-signature");
|
|
23522
23560
|
const rejectedVerificationProviders = uniqueSorted4(rejectedVerificationAttempts.map((attempt) => attempt.provider).filter(isTelephonyWebhookProvider));
|
|
@@ -23636,18 +23674,18 @@ var parseMaybeJSON = (value) => {
|
|
|
23636
23674
|
}
|
|
23637
23675
|
};
|
|
23638
23676
|
var flattenPayload = (value) => {
|
|
23639
|
-
if (!
|
|
23677
|
+
if (!isRecord2(value)) {
|
|
23640
23678
|
return {};
|
|
23641
23679
|
}
|
|
23642
|
-
const data =
|
|
23643
|
-
const payload =
|
|
23644
|
-
const event =
|
|
23680
|
+
const data = isRecord2(value.data) ? value.data : undefined;
|
|
23681
|
+
const payload = isRecord2(value.payload) ? value.payload : undefined;
|
|
23682
|
+
const event = isRecord2(value.event) ? value.event : undefined;
|
|
23645
23683
|
return {
|
|
23646
23684
|
...value,
|
|
23647
23685
|
...payload,
|
|
23648
23686
|
...event,
|
|
23649
23687
|
...data,
|
|
23650
|
-
...
|
|
23688
|
+
...isRecord2(data?.payload) ? data.payload : undefined
|
|
23651
23689
|
};
|
|
23652
23690
|
};
|
|
23653
23691
|
var toBase64 = (bytes) => Buffer.from(new Uint8Array(bytes)).toString("base64");
|
|
@@ -31552,12 +31590,12 @@ var assertVoiceObservabilityExportSchema = (input) => {
|
|
|
31552
31590
|
throw new Error(`Unsupported voice observability export schema: ${input.schema?.id ?? "missing"}@${input.schema?.version ?? "missing"}`);
|
|
31553
31591
|
}
|
|
31554
31592
|
};
|
|
31555
|
-
var
|
|
31593
|
+
var isRecord3 = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
31556
31594
|
var isStatus2 = (value) => value === "fail" || value === "pass" || value === "warn";
|
|
31557
|
-
var getRecord2 = (value, key) =>
|
|
31558
|
-
var getRecordArray = (value, key) =>
|
|
31595
|
+
var getRecord2 = (value, key) => isRecord3(value) && isRecord3(value[key]) ? value[key] : undefined;
|
|
31596
|
+
var getRecordArray = (value, key) => isRecord3(value) && Array.isArray(value[key]) ? value[key] : undefined;
|
|
31559
31597
|
var inferVoiceObservabilityExportRecordKind = (record) => {
|
|
31560
|
-
if (
|
|
31598
|
+
if (isRecord3(record.manifest) && isRecord3(record.artifactIndex)) {
|
|
31561
31599
|
return "database-record";
|
|
31562
31600
|
}
|
|
31563
31601
|
if (Array.isArray(record.receipts)) {
|
|
@@ -31566,10 +31604,10 @@ var inferVoiceObservabilityExportRecordKind = (record) => {
|
|
|
31566
31604
|
if (typeof record.runId === "string" && Array.isArray(record.destinations)) {
|
|
31567
31605
|
return "delivery-receipt";
|
|
31568
31606
|
}
|
|
31569
|
-
if (Array.isArray(record.destinations) &&
|
|
31607
|
+
if (Array.isArray(record.destinations) && isRecord3(record.summary) && typeof record.exportStatus === "string") {
|
|
31570
31608
|
return "delivery-report";
|
|
31571
31609
|
}
|
|
31572
|
-
if (Array.isArray(record.artifacts) &&
|
|
31610
|
+
if (Array.isArray(record.artifacts) && isRecord3(record.summary)) {
|
|
31573
31611
|
return Array.isArray(record.envelopes) ? "manifest" : "artifact-index";
|
|
31574
31612
|
}
|
|
31575
31613
|
return;
|
|
@@ -31635,7 +31673,7 @@ var validateDeliveryDestinations = (issues, destinations, path) => {
|
|
|
31635
31673
|
}
|
|
31636
31674
|
destinations.forEach((destination, index) => {
|
|
31637
31675
|
const destinationPath = `${path}.${index}`;
|
|
31638
|
-
if (!
|
|
31676
|
+
if (!isRecord3(destination)) {
|
|
31639
31677
|
pushValidationIssue(issues, {
|
|
31640
31678
|
code: "voice.observability.export.invalid_shape",
|
|
31641
31679
|
message: `${destinationPath} must be an object.`,
|
|
@@ -31656,7 +31694,7 @@ var validateDeliveryDestinations = (issues, destinations, path) => {
|
|
|
31656
31694
|
};
|
|
31657
31695
|
var validateVoiceObservabilityExportRecord = (input, options = {}) => {
|
|
31658
31696
|
const issues = [];
|
|
31659
|
-
if (!
|
|
31697
|
+
if (!isRecord3(input)) {
|
|
31660
31698
|
return {
|
|
31661
31699
|
issues: [
|
|
31662
31700
|
{
|
|
@@ -31691,21 +31729,21 @@ var validateVoiceObservabilityExportRecord = (input, options = {}) => {
|
|
|
31691
31729
|
requireArrayField(issues, input, "sessionIds", "$");
|
|
31692
31730
|
requireNumberField(issues, input, "checkedAt", "$");
|
|
31693
31731
|
requireStatusField(issues, input, "status", "$");
|
|
31694
|
-
if (!
|
|
31732
|
+
if (!isRecord3(input.deliveries)) {
|
|
31695
31733
|
pushValidationIssue(issues, {
|
|
31696
31734
|
code: "voice.observability.export.missing_field",
|
|
31697
31735
|
message: "$.deliveries must be an object.",
|
|
31698
31736
|
path: "$.deliveries"
|
|
31699
31737
|
});
|
|
31700
31738
|
}
|
|
31701
|
-
if (!
|
|
31739
|
+
if (!isRecord3(input.redaction)) {
|
|
31702
31740
|
pushValidationIssue(issues, {
|
|
31703
31741
|
code: "voice.observability.export.missing_field",
|
|
31704
31742
|
message: "$.redaction must be an object.",
|
|
31705
31743
|
path: "$.redaction"
|
|
31706
31744
|
});
|
|
31707
31745
|
}
|
|
31708
|
-
if (!
|
|
31746
|
+
if (!isRecord3(input.summary)) {
|
|
31709
31747
|
pushValidationIssue(issues, {
|
|
31710
31748
|
code: "voice.observability.export.missing_field",
|
|
31711
31749
|
message: "$.summary must be an object.",
|
|
@@ -31717,7 +31755,7 @@ var validateVoiceObservabilityExportRecord = (input, options = {}) => {
|
|
|
31717
31755
|
requireArrayField(issues, input, "artifacts", "$");
|
|
31718
31756
|
requireNumberField(issues, input, "checkedAt", "$");
|
|
31719
31757
|
requireStatusField(issues, input, "status", "$");
|
|
31720
|
-
if (!
|
|
31758
|
+
if (!isRecord3(input.summary)) {
|
|
31721
31759
|
pushValidationIssue(issues, {
|
|
31722
31760
|
code: "voice.observability.export.missing_field",
|
|
31723
31761
|
message: "$.summary must be an object.",
|
|
@@ -31729,7 +31767,7 @@ var validateVoiceObservabilityExportRecord = (input, options = {}) => {
|
|
|
31729
31767
|
requireNumberField(issues, input, "checkedAt", "$");
|
|
31730
31768
|
requireStatusField(issues, input, "status", "$");
|
|
31731
31769
|
requireStatusField(issues, input, "exportStatus", "$");
|
|
31732
|
-
if (!
|
|
31770
|
+
if (!isRecord3(input.manifest)) {
|
|
31733
31771
|
pushValidationIssue(issues, {
|
|
31734
31772
|
code: "voice.observability.export.missing_field",
|
|
31735
31773
|
message: "$.manifest must be an object.",
|
|
@@ -31743,7 +31781,7 @@ var validateVoiceObservabilityExportRecord = (input, options = {}) => {
|
|
|
31743
31781
|
path: `$.manifest${issue.path.slice(1)}`
|
|
31744
31782
|
})));
|
|
31745
31783
|
}
|
|
31746
|
-
if (!
|
|
31784
|
+
if (!isRecord3(input.artifactIndex)) {
|
|
31747
31785
|
pushValidationIssue(issues, {
|
|
31748
31786
|
code: "voice.observability.export.missing_field",
|
|
31749
31787
|
message: "$.artifactIndex must be an object.",
|
|
@@ -31881,11 +31919,11 @@ var buildObservabilityExportDatabaseRecord = (input) => ({
|
|
|
31881
31919
|
});
|
|
31882
31920
|
var parseObservabilityExportJson = (value) => typeof value === "string" ? JSON.parse(value) : value;
|
|
31883
31921
|
var collectReplayDeliveryDestinations = (value) => {
|
|
31884
|
-
if (!
|
|
31922
|
+
if (!isRecord3(value)) {
|
|
31885
31923
|
return [];
|
|
31886
31924
|
}
|
|
31887
31925
|
if (Array.isArray(value.destinations)) {
|
|
31888
|
-
return value.destinations.filter((destination) =>
|
|
31926
|
+
return value.destinations.filter((destination) => isRecord3(destination));
|
|
31889
31927
|
}
|
|
31890
31928
|
if (Array.isArray(value.receipts)) {
|
|
31891
31929
|
return value.receipts.flatMap((receipt) => collectReplayDeliveryDestinations(receipt));
|
|
@@ -31894,8 +31932,8 @@ var collectReplayDeliveryDestinations = (value) => {
|
|
|
31894
31932
|
};
|
|
31895
31933
|
var replayIssueSeverity = (status) => status === "fail" ? "fail" : "warn";
|
|
31896
31934
|
var buildVoiceObservabilityExportReplayReport = (records) => {
|
|
31897
|
-
const manifest = records.manifest ?? (
|
|
31898
|
-
const artifactIndex = records.artifactIndex ?? (
|
|
31935
|
+
const manifest = records.manifest ?? (isRecord3(records.databaseRecord) ? records.databaseRecord.manifest : undefined);
|
|
31936
|
+
const artifactIndex = records.artifactIndex ?? (isRecord3(records.databaseRecord) ? records.databaseRecord.artifactIndex : undefined);
|
|
31899
31937
|
const validations = {
|
|
31900
31938
|
artifactIndex: validateVoiceObservabilityExportRecord(artifactIndex, {
|
|
31901
31939
|
kind: "artifact-index"
|
|
@@ -31920,12 +31958,12 @@ var buildVoiceObservabilityExportReplayReport = (records) => {
|
|
|
31920
31958
|
kind,
|
|
31921
31959
|
issue
|
|
31922
31960
|
})) ?? []);
|
|
31923
|
-
const manifestRecord =
|
|
31924
|
-
const artifactIndexRecord =
|
|
31961
|
+
const manifestRecord = isRecord3(manifest) ? manifest : undefined;
|
|
31962
|
+
const artifactIndexRecord = isRecord3(artifactIndex) ? artifactIndex : undefined;
|
|
31925
31963
|
const artifacts = [
|
|
31926
31964
|
...Array.isArray(manifestRecord?.artifacts) ? manifestRecord.artifacts : [],
|
|
31927
31965
|
...Array.isArray(artifactIndexRecord?.artifacts) ? artifactIndexRecord.artifacts : []
|
|
31928
|
-
].filter((artifact) =>
|
|
31966
|
+
].filter((artifact) => isRecord3(artifact));
|
|
31929
31967
|
const failedArtifacts = artifacts.filter((artifact) => artifact.status === "fail");
|
|
31930
31968
|
const deliveryDestinations = [
|
|
31931
31969
|
...collectReplayDeliveryDestinations(records.deliveryReport),
|
|
@@ -31934,7 +31972,7 @@ var buildVoiceObservabilityExportReplayReport = (records) => {
|
|
|
31934
31972
|
];
|
|
31935
31973
|
const failedDeliveryDestinations = deliveryDestinations.filter((destination) => destination.status === "failed");
|
|
31936
31974
|
const issues = [
|
|
31937
|
-
...!records.manifest && !
|
|
31975
|
+
...!records.manifest && !isRecord3(records.databaseRecord) ? [
|
|
31938
31976
|
{
|
|
31939
31977
|
code: "voice.observability.export_replay.missing_record",
|
|
31940
31978
|
label: "Export manifest",
|
|
@@ -31942,7 +31980,7 @@ var buildVoiceObservabilityExportReplayReport = (records) => {
|
|
|
31942
31980
|
value: "manifest"
|
|
31943
31981
|
}
|
|
31944
31982
|
] : [],
|
|
31945
|
-
...!records.artifactIndex && !
|
|
31983
|
+
...!records.artifactIndex && !isRecord3(records.databaseRecord) ? [
|
|
31946
31984
|
{
|
|
31947
31985
|
code: "voice.observability.export_replay.missing_record",
|
|
31948
31986
|
label: "Artifact index",
|
|
@@ -32120,7 +32158,7 @@ var loadVoiceObservabilityExportReplaySource = async (source) => {
|
|
|
32120
32158
|
};
|
|
32121
32159
|
var replayVoiceObservabilityExport = async (source) => buildVoiceObservabilityExportReplayReport(await loadVoiceObservabilityExportReplaySource(source));
|
|
32122
32160
|
var escapeObservabilityReplayHtml = (value) => String(value).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
32123
|
-
var isVoiceObservabilityExportReplayReport = (value) =>
|
|
32161
|
+
var isVoiceObservabilityExportReplayReport = (value) => isRecord3(value) && isRecord3(value.summary) && isRecord3(value.records) && Array.isArray(value.issues) && typeof value.checkedAt === "number" && isStatus2(value.status);
|
|
32124
32162
|
var resolveVoiceObservabilityExportReplayReport = async (input) => {
|
|
32125
32163
|
const resolved = typeof input === "function" ? await input() : input;
|
|
32126
32164
|
return isVoiceObservabilityExportReplayReport(resolved) ? resolved : replayVoiceObservabilityExport(resolved);
|
|
@@ -39311,6 +39349,7 @@ export {
|
|
|
39311
39349
|
summarizeVoiceProviderHealth,
|
|
39312
39350
|
summarizeVoiceProviderFallbackRecovery,
|
|
39313
39351
|
summarizeVoiceProviderCapabilities,
|
|
39352
|
+
summarizeVoiceProofAssertions,
|
|
39314
39353
|
summarizeVoiceProductionReadinessGate,
|
|
39315
39354
|
summarizeVoiceOpsTasks,
|
|
39316
39355
|
summarizeVoiceOpsTaskQueue,
|
|
@@ -39670,6 +39709,7 @@ export {
|
|
|
39670
39709
|
createVoiceProviderCapabilityHTMLHandler,
|
|
39671
39710
|
createVoiceProofTrendRoutes,
|
|
39672
39711
|
createVoiceProofTrendRecommendationRoutes,
|
|
39712
|
+
createVoiceProofAssertion,
|
|
39673
39713
|
createVoiceProfileTraceTagger,
|
|
39674
39714
|
createVoiceProfileSwitchReadinessRoutes,
|
|
39675
39715
|
createVoiceProfileSwitchPolicyProofRoutes,
|
|
@@ -39780,6 +39820,7 @@ export {
|
|
|
39780
39820
|
createVoiceExternalObjectMapId,
|
|
39781
39821
|
createVoiceExternalObjectMap,
|
|
39782
39822
|
createVoiceExperiment,
|
|
39823
|
+
createVoiceEvidenceAssertion,
|
|
39783
39824
|
createVoiceEvalRoutes,
|
|
39784
39825
|
createVoiceDiagnosticsRoutes,
|
|
39785
39826
|
createVoiceDemoReadyRoutes,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type VoiceProofAssertionResult = {
|
|
2
|
+
kind: 'json-assertion';
|
|
3
|
+
name: string;
|
|
4
|
+
ok: boolean;
|
|
5
|
+
summary?: Record<string, unknown>;
|
|
6
|
+
};
|
|
7
|
+
export type VoiceProofAssertionSummary = {
|
|
8
|
+
failed: number;
|
|
9
|
+
failures: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
summary?: Record<string, unknown>;
|
|
12
|
+
}>;
|
|
13
|
+
ok: boolean;
|
|
14
|
+
passed: number;
|
|
15
|
+
total: number;
|
|
16
|
+
};
|
|
17
|
+
export type VoiceProofAssertionInput = {
|
|
18
|
+
missingIssue?: string;
|
|
19
|
+
name: string;
|
|
20
|
+
ok?: boolean;
|
|
21
|
+
summary?: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
export type VoiceEvidenceAssertionInput<TEvidence> = {
|
|
24
|
+
evidence?: TEvidence;
|
|
25
|
+
missingIssue?: string;
|
|
26
|
+
name: string;
|
|
27
|
+
ok?: (evidence: TEvidence) => boolean;
|
|
28
|
+
summary?: (evidence: TEvidence) => Record<string, unknown>;
|
|
29
|
+
};
|
|
30
|
+
export declare const createVoiceProofAssertion: (input: VoiceProofAssertionInput) => VoiceProofAssertionResult;
|
|
31
|
+
export declare const createVoiceEvidenceAssertion: <TEvidence>(input: VoiceEvidenceAssertionInput<TEvidence>) => VoiceProofAssertionResult;
|
|
32
|
+
export declare const summarizeVoiceProofAssertions: (assertions: VoiceProofAssertionResult[]) => VoiceProofAssertionSummary;
|