@absolutejs/voice 0.0.22-beta.216 → 0.0.22-beta.217
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.js +2 -1
- package/dist/providerSlo.d.ts +2 -0
- package/dist/resilienceRoutes.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21397,6 +21397,7 @@ var listVoiceRoutingEvents = (events) => {
|
|
|
21397
21397
|
operation: getString13(event.payload.operation),
|
|
21398
21398
|
provider,
|
|
21399
21399
|
routing: getString13(event.payload.routing),
|
|
21400
|
+
scenarioId: event.scenarioId,
|
|
21400
21401
|
selectedProvider: getString13(event.payload.selectedProvider),
|
|
21401
21402
|
sessionId: event.sessionId,
|
|
21402
21403
|
status: providerStatus,
|
|
@@ -22067,7 +22068,7 @@ var summarizeSessions = (events) => {
|
|
|
22067
22068
|
var buildVoiceProviderSloReport = async (options = {}) => {
|
|
22068
22069
|
const rawEvents = options.events ?? await options.store?.list() ?? [];
|
|
22069
22070
|
const now = options.now ?? Date.now();
|
|
22070
|
-
const events = normalizeEvents2(rawEvents).filter((event) => typeof options.maxAgeMs !== "number" || now - event.at <= options.maxAgeMs);
|
|
22071
|
+
const events = normalizeEvents2(rawEvents).filter((event) => (typeof options.maxAgeMs !== "number" || now - event.at <= options.maxAgeMs) && (!options.sessionId || event.sessionId === options.sessionId) && (!options.scenarioId || event.scenarioId === options.scenarioId));
|
|
22071
22072
|
const thresholds = mergeThresholds(options.thresholds);
|
|
22072
22073
|
const observedKinds = new Set(events.map((event) => event.kind));
|
|
22073
22074
|
const requiredKinds = new Set(options.requiredKinds ?? [...observedKinds]);
|
package/dist/providerSlo.d.ts
CHANGED
|
@@ -65,6 +65,8 @@ export type VoiceProviderSloReportOptions = {
|
|
|
65
65
|
maxAgeMs?: number;
|
|
66
66
|
now?: number;
|
|
67
67
|
requiredKinds?: readonly VoiceRoutingEventKind[];
|
|
68
|
+
scenarioId?: string;
|
|
69
|
+
sessionId?: string;
|
|
68
70
|
store?: VoiceTraceEventStore;
|
|
69
71
|
thresholds?: VoiceProviderSloThresholdConfig;
|
|
70
72
|
};
|