@absolutejs/voice 0.0.22-beta.359 → 0.0.22-beta.360
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 -2
- package/dist/index.js +674 -521
- package/dist/profileSwitchRecommendation.d.ts +87 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
1
2
|
import type { VoiceRealCallProfileDefault, VoiceRealCallProfileDefaultsReport, VoiceRealCallProfileHistoryReport } from './proofTrends';
|
|
2
3
|
import { type StoredVoiceAuditEvent, type VoiceAuditActor, type VoiceAuditEventStore } from './audit';
|
|
3
4
|
export type VoiceProfileSwitchObservedSignals = {
|
|
@@ -67,5 +68,91 @@ export type VoiceProfileSwitchGuardOptions = VoiceProfileSwitchRecommendationOpt
|
|
|
67
68
|
sessionId?: string;
|
|
68
69
|
traceId?: string;
|
|
69
70
|
};
|
|
71
|
+
export type VoiceProfileSwitchPolicyProofCase = {
|
|
72
|
+
description?: string;
|
|
73
|
+
expectedAction?: VoiceProfileSwitchGuardAction;
|
|
74
|
+
expectedBlockedByPolicy?: VoiceProfileSwitchGuardDecision['blockedByPolicy'];
|
|
75
|
+
id: string;
|
|
76
|
+
label?: string;
|
|
77
|
+
options?: Partial<Omit<VoiceProfileSwitchGuardOptions, 'defaults' | 'observed'>> & {
|
|
78
|
+
observed?: VoiceProfileSwitchObservedSignals;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export type VoiceProfileSwitchPolicyProofCaseResult = VoiceProfileSwitchPolicyProofCase & {
|
|
82
|
+
decision: VoiceProfileSwitchGuardDecision;
|
|
83
|
+
ok: boolean;
|
|
84
|
+
};
|
|
85
|
+
export type VoiceProfileSwitchPolicyProofReport = {
|
|
86
|
+
generatedAt: string;
|
|
87
|
+
ok: boolean;
|
|
88
|
+
observed: VoiceProfileSwitchObservedSignals;
|
|
89
|
+
results: VoiceProfileSwitchPolicyProofCaseResult[];
|
|
90
|
+
summary: {
|
|
91
|
+
failed: number;
|
|
92
|
+
passed: number;
|
|
93
|
+
total: number;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export type VoiceProfileSwitchPolicyProofOptions = {
|
|
97
|
+
actor?: VoiceAuditActor;
|
|
98
|
+
allowedProfileIds?: string[];
|
|
99
|
+
audit?: VoiceAuditEventStore;
|
|
100
|
+
cases?: VoiceProfileSwitchPolicyProofCase[];
|
|
101
|
+
defaults: VoiceRealCallProfileDefaultsReport | VoiceRealCallProfileHistoryReport | (() => Promise<VoiceRealCallProfileDefaultsReport | VoiceRealCallProfileHistoryReport> | VoiceRealCallProfileDefaultsReport | VoiceRealCallProfileHistoryReport);
|
|
102
|
+
metadata?: Record<string, unknown>;
|
|
103
|
+
minConfidence?: number;
|
|
104
|
+
observed?: VoiceProfileSwitchObservedSignals;
|
|
105
|
+
title?: string;
|
|
106
|
+
};
|
|
107
|
+
export type VoiceProfileSwitchPolicyProofRoutesOptions = VoiceProfileSwitchPolicyProofOptions & {
|
|
108
|
+
htmlPath?: false | string;
|
|
109
|
+
name?: string;
|
|
110
|
+
path?: string;
|
|
111
|
+
render?: (report: VoiceProfileSwitchPolicyProofReport) => string | Promise<string>;
|
|
112
|
+
};
|
|
70
113
|
export declare const recommendVoiceProfileSwitch: (options: VoiceProfileSwitchRecommendationOptions) => VoiceProfileSwitchRecommendation;
|
|
71
114
|
export declare const applyVoiceProfileSwitchGuard: (options: VoiceProfileSwitchGuardOptions) => Promise<VoiceProfileSwitchGuardDecision>;
|
|
115
|
+
export declare const runVoiceProfileSwitchPolicyProof: (options: VoiceProfileSwitchPolicyProofOptions) => Promise<VoiceProfileSwitchPolicyProofReport>;
|
|
116
|
+
export declare const renderVoiceProfileSwitchPolicyProofHTML: (report: VoiceProfileSwitchPolicyProofReport, options?: {
|
|
117
|
+
title?: string;
|
|
118
|
+
}) => string;
|
|
119
|
+
export declare const createVoiceProfileSwitchPolicyProofRoutes: (options: VoiceProfileSwitchPolicyProofRoutesOptions) => 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: VoiceProfileSwitchPolicyProofReport;
|
|
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
|
+
}>;
|