@absolutejs/voice 0.0.22-beta.407 → 0.0.22-beta.409

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 CHANGED
@@ -32368,15 +32368,17 @@ var createOperationArtifact = (record, href) => ({
32368
32368
  sessionId: record.sessionId,
32369
32369
  status: record.status === "failed" ? "fail" : record.status === "warning" ? "warn" : "pass"
32370
32370
  });
32371
- var toSnapshotArtifactStatus = (status) => status === "fail" ? "fail" : status === "warn" ? "warn" : "pass";
32372
32371
  var createSessionSnapshotArtifact = (snapshot, href) => ({
32373
32372
  generatedAt: snapshot.capturedAt,
32374
32373
  href,
32375
32374
  id: `session-snapshot:${snapshot.sessionId}`,
32376
32375
  kind: "session-snapshot",
32377
32376
  label: `Session snapshot ${snapshot.sessionId}`,
32377
+ metadata: {
32378
+ snapshotStatus: snapshot.status
32379
+ },
32378
32380
  sessionId: snapshot.sessionId,
32379
- status: toSnapshotArtifactStatus(snapshot.status)
32381
+ status: "pass"
32380
32382
  });
32381
32383
  var createCallDebuggerArtifact = (report, href) => ({
32382
32384
  generatedAt: report.checkedAt,
@@ -32384,8 +32386,13 @@ var createCallDebuggerArtifact = (report, href) => ({
32384
32386
  id: `call-debugger:${report.sessionId}`,
32385
32387
  kind: "call-debugger",
32386
32388
  label: `Call debugger ${report.sessionId}`,
32389
+ metadata: {
32390
+ callDebuggerStatus: report.status,
32391
+ operationsRecordStatus: report.operationsRecord?.status,
32392
+ snapshotStatus: report.snapshot?.status
32393
+ },
32387
32394
  sessionId: report.sessionId,
32388
- status: report.status === "failed" ? "fail" : report.status === "warning" ? "warn" : "pass"
32395
+ status: "pass"
32389
32396
  });
32390
32397
  var unique2 = (values) => [...new Set(values)].sort();
32391
32398
  var stripArtifactPathAnchor = (path) => path.split("#")[0] ?? path;
@@ -33150,12 +33157,15 @@ var buildAuditEnvelope = (event, operationsRecordHref) => ({
33150
33157
  severity: toSeverityFromAudit(event),
33151
33158
  traceId: event.traceId
33152
33159
  });
33160
+ var resolveObservabilityExportList = async (value) => typeof value === "function" ? await value() : value ?? [];
33153
33161
  var buildVoiceObservabilityExport = async (options = {}) => {
33154
33162
  const events = options.events ?? await options.store?.list() ?? [];
33155
33163
  const auditEvents = options.audit ? await options.audit.list() : [];
33156
33164
  const baseOperationsRecords = options.operationsRecords ?? [];
33157
- const sessionSnapshots = options.sessionSnapshots ?? [];
33158
- const callDebuggerReports = options.callDebuggerReports ?? [];
33165
+ const [sessionSnapshots, callDebuggerReports] = await Promise.all([
33166
+ resolveObservabilityExportList(options.sessionSnapshots),
33167
+ resolveObservabilityExportList(options.callDebuggerReports)
33168
+ ]);
33159
33169
  const sessionIds = collectSessionIds({
33160
33170
  auditEvents,
33161
33171
  callDebuggerReports,
@@ -33280,6 +33290,7 @@ var buildVoiceObservabilityArtifactIndex = (report) => {
33280
33290
  id: artifact.id,
33281
33291
  kind: artifact.kind,
33282
33292
  label: artifact.label,
33293
+ metadata: artifact.metadata,
33283
33294
  required: artifact.required,
33284
33295
  sessionId: artifact.sessionId,
33285
33296
  status: artifact.status
@@ -67,6 +67,7 @@ export type VoiceObservabilityExportArtifact = {
67
67
  kind: VoiceObservabilityExportArtifactKind;
68
68
  label: string;
69
69
  maxAgeMs?: number;
70
+ metadata?: Record<string, unknown>;
70
71
  path?: string;
71
72
  required?: boolean;
72
73
  sessionId?: string;
@@ -130,6 +131,7 @@ export type VoiceObservabilityExportArtifactIndexItem = {
130
131
  id: string;
131
132
  kind: VoiceObservabilityExportArtifactKind;
132
133
  label: string;
134
+ metadata?: Record<string, unknown>;
133
135
  required?: boolean;
134
136
  sessionId?: string;
135
137
  status?: VoiceObservabilityExportStatus;
@@ -386,11 +388,11 @@ export type VoiceObservabilityExportOptions = {
386
388
  operationsRecord?: (sessionId: string) => string;
387
389
  sessionSnapshot?: (sessionId: string) => string;
388
390
  };
389
- callDebuggerReports?: VoiceCallDebuggerReport[];
391
+ callDebuggerReports?: VoiceCallDebuggerReport[] | (() => VoiceCallDebuggerReport[] | Promise<VoiceCallDebuggerReport[]>);
390
392
  operationsRecords?: VoiceOperationsRecord[];
391
393
  redact?: VoiceTraceRedactionConfig;
392
394
  sessionIds?: string[];
393
- sessionSnapshots?: VoiceSessionSnapshot[];
395
+ sessionSnapshots?: VoiceSessionSnapshot[] | (() => VoiceSessionSnapshot[] | Promise<VoiceSessionSnapshot[]>);
394
396
  store?: VoiceTraceEventStore;
395
397
  traceDeliveries?: VoiceTraceSinkDeliveryRecord[] | VoiceTraceSinkDeliveryStore;
396
398
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.407",
3
+ "version": "0.0.22-beta.409",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",