@reproapp/node-sdk 0.0.46 → 0.0.48

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 CHANGED
@@ -27,6 +27,7 @@ import type { Request, Response, NextFunction } from 'express';
27
27
  import type { Schema } from 'mongoose';
28
28
  import { type IngestClientConfig } from './ingest/client';
29
29
  import { type NormalizedRuntimePrivacyPolicy, type RuntimePrivacyConfig, type RuntimePrivacyDbContext, type RuntimePrivacySurface } from './privacy';
30
+ import { projectSemanticInfrastructureValue } from './semantic-serialization';
30
31
  type SpanContext = {
31
32
  traceId: string | null;
32
33
  spanId: string | number | null;
@@ -87,7 +88,7 @@ type PendingTraceEventRecord = TraceEventRecord & {
87
88
  __reproTraceValueEntries?: TraceValueBatchEntry[];
88
89
  };
89
90
  type TraceValueCaptureRef = {
90
- status: 'stored' | 'truncated-for-storage' | 'skipped-non-meaningful';
91
+ status: 'stored' | 'truncated-for-storage' | 'skipped-non-meaningful' | 'failed-policy';
91
92
  valueId?: string;
92
93
  projectedKind?: string;
93
94
  };
@@ -106,6 +107,7 @@ type TraceValueBatchEntry = {
106
107
  eventIndex?: number;
107
108
  };
108
109
  type TraceMaterializationConfig = {
110
+ tenantId: string;
109
111
  appId: string;
110
112
  appSecret?: string;
111
113
  appName?: string;
@@ -118,6 +120,7 @@ type TraceMaterializationWorkerPayload = {
118
120
  masking: NormalizedMaskingConfig | null;
119
121
  privacy: NormalizedRuntimePrivacyPolicy | null;
120
122
  fullValueCaptureEnabled: boolean;
123
+ valueNamespace?: string;
121
124
  };
122
125
  export type HeaderRule = string | RegExp;
123
126
  export type HeaderCaptureOptions = {
@@ -287,6 +290,15 @@ type RequestCaptureScopeState = {
287
290
  traceBatchCount: number;
288
291
  dbChangeCount: number;
289
292
  emailEventCount: number;
293
+ captureFailures: Array<{
294
+ stage: string;
295
+ target: string;
296
+ reason: string;
297
+ }>;
298
+ privacyMode: 'policy' | 'fallback' | 'raw';
299
+ privacyPolicyFingerprint?: string;
300
+ privacyStatementCount: number;
301
+ emittedValueDefinitionIds: Set<string>;
290
302
  };
291
303
  type BackendLiveTimingConfig = {
292
304
  sessionMaxDurationMs: number;
@@ -324,9 +336,9 @@ type InlinePrivacyMaterializationResult = {
324
336
  limit?: number;
325
337
  };
326
338
  };
327
- declare function materializeInlinePrivacyValueAsync(target: RuntimePrivacySurface, value: any, cfg: ReproMiddlewareConfig, req: MaskRequestContext, trace: TraceEventForFilter | null, masking: NormalizedMaskingConfig | null, privacy: NormalizedRuntimePrivacyPolicy | null, db?: RuntimePrivacyDbContext | null): Promise<InlinePrivacyMaterializationResult>;
339
+ declare function materializeInlinePrivacyValueAsync(target: RuntimePrivacySurface, value: any, cfg: ReproMiddlewareConfig, req: MaskRequestContext, trace: TraceEventForFilter | null, masking: NormalizedMaskingConfig | null, privacy: NormalizedRuntimePrivacyPolicy | null, db?: RuntimePrivacyDbContext | null, captureScope?: RequestCaptureScopeState | null): Promise<InlinePrivacyMaterializationResult>;
328
340
  declare function getEventTraceValueEntries(event: TraceEventRecord | PendingTraceEventRecord): TraceValueBatchEntry[] | undefined;
329
- declare function estimateTraceBatchSerializedBytes(batch: TraceEventRecord[], requestRid: string, actionId: string | null | undefined, batchIndex: number): number;
341
+ declare function estimateTraceBatchSerializedBytes(batch: TraceEventRecord[], requestRid: string, actionId: string | null | undefined, batchIndex: number, previouslyEmittedValueIds?: ReadonlySet<string>): number;
330
342
  declare function chunkTraceEventsForTransport(events: TraceEventRecord[], requestRid: string, actionId: string | null | undefined): TraceEventRecord[][];
331
343
  export type ReproMiddlewareConfig = IngestClientConfig & {
332
344
  /** API base used for backend-owned live session documents. Defaults to REPRO_API_BASE_URL/REPRO_API_BASE/privacy.apiBase. */
@@ -483,6 +495,7 @@ export declare const __reproTestHooks: {
483
495
  estimateTraceBatchSerializedBytesForTest: typeof estimateTraceBatchSerializedBytes;
484
496
  sanitizeTraceValueForPrivacyForTest: typeof sanitizeTraceValueForPrivacy;
485
497
  sanitizeMaterializedTraceValueForTest: typeof sanitizeMaterializedTraceValue;
498
+ projectSemanticInfrastructureValueForTest: typeof projectSemanticInfrastructureValue;
486
499
  getEventTraceValueEntriesForTest: typeof getEventTraceValueEntries;
487
500
  };
488
501
  export {};