@absolutejs/voice 0.0.22-beta.215 → 0.0.22-beta.216
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/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22066,7 +22066,8 @@ var summarizeSessions = (events) => {
|
|
|
22066
22066
|
};
|
|
22067
22067
|
var buildVoiceProviderSloReport = async (options = {}) => {
|
|
22068
22068
|
const rawEvents = options.events ?? await options.store?.list() ?? [];
|
|
22069
|
-
const
|
|
22069
|
+
const now = options.now ?? Date.now();
|
|
22070
|
+
const events = normalizeEvents2(rawEvents).filter((event) => typeof options.maxAgeMs !== "number" || now - event.at <= options.maxAgeMs);
|
|
22070
22071
|
const thresholds = mergeThresholds(options.thresholds);
|
|
22071
22072
|
const observedKinds = new Set(events.map((event) => event.kind));
|
|
22072
22073
|
const requiredKinds = new Set(options.requiredKinds ?? [...observedKinds]);
|
package/dist/providerSlo.d.ts
CHANGED
|
@@ -62,6 +62,8 @@ export type VoiceProviderSloReport = {
|
|
|
62
62
|
};
|
|
63
63
|
export type VoiceProviderSloReportOptions = {
|
|
64
64
|
events?: StoredVoiceTraceEvent[] | VoiceRoutingEvent[];
|
|
65
|
+
maxAgeMs?: number;
|
|
66
|
+
now?: number;
|
|
65
67
|
requiredKinds?: readonly VoiceRoutingEventKind[];
|
|
66
68
|
store?: VoiceTraceEventStore;
|
|
67
69
|
thresholds?: VoiceProviderSloThresholdConfig;
|