@absolutejs/voice 0.0.22-beta.407 → 0.0.22-beta.408
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 +5 -2
- package/dist/observabilityExport.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33150,12 +33150,15 @@ var buildAuditEnvelope = (event, operationsRecordHref) => ({
|
|
|
33150
33150
|
severity: toSeverityFromAudit(event),
|
|
33151
33151
|
traceId: event.traceId
|
|
33152
33152
|
});
|
|
33153
|
+
var resolveObservabilityExportList = async (value) => typeof value === "function" ? await value() : value ?? [];
|
|
33153
33154
|
var buildVoiceObservabilityExport = async (options = {}) => {
|
|
33154
33155
|
const events = options.events ?? await options.store?.list() ?? [];
|
|
33155
33156
|
const auditEvents = options.audit ? await options.audit.list() : [];
|
|
33156
33157
|
const baseOperationsRecords = options.operationsRecords ?? [];
|
|
33157
|
-
const sessionSnapshots =
|
|
33158
|
-
|
|
33158
|
+
const [sessionSnapshots, callDebuggerReports] = await Promise.all([
|
|
33159
|
+
resolveObservabilityExportList(options.sessionSnapshots),
|
|
33160
|
+
resolveObservabilityExportList(options.callDebuggerReports)
|
|
33161
|
+
]);
|
|
33159
33162
|
const sessionIds = collectSessionIds({
|
|
33160
33163
|
auditEvents,
|
|
33161
33164
|
callDebuggerReports,
|
|
@@ -386,11 +386,11 @@ export type VoiceObservabilityExportOptions = {
|
|
|
386
386
|
operationsRecord?: (sessionId: string) => string;
|
|
387
387
|
sessionSnapshot?: (sessionId: string) => string;
|
|
388
388
|
};
|
|
389
|
-
callDebuggerReports?: VoiceCallDebuggerReport[];
|
|
389
|
+
callDebuggerReports?: VoiceCallDebuggerReport[] | (() => VoiceCallDebuggerReport[] | Promise<VoiceCallDebuggerReport[]>);
|
|
390
390
|
operationsRecords?: VoiceOperationsRecord[];
|
|
391
391
|
redact?: VoiceTraceRedactionConfig;
|
|
392
392
|
sessionIds?: string[];
|
|
393
|
-
sessionSnapshots?: VoiceSessionSnapshot[];
|
|
393
|
+
sessionSnapshots?: VoiceSessionSnapshot[] | (() => VoiceSessionSnapshot[] | Promise<VoiceSessionSnapshot[]>);
|
|
394
394
|
store?: VoiceTraceEventStore;
|
|
395
395
|
traceDeliveries?: VoiceTraceSinkDeliveryRecord[] | VoiceTraceSinkDeliveryStore;
|
|
396
396
|
};
|