@reproapp/node-sdk 0.0.46 → 0.0.47
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 +10 -2
- package/dist/index.js +235 -123
- package/dist/ingest/client.js +11 -0
- package/dist/privacy.d.ts +1 -0
- package/dist/privacy.js +306 -7
- package/package.json +3 -3
- package/src/index.ts +355 -108
- package/src/ingest/client.ts +13 -0
- package/src/privacy.ts +409 -7
- package/test/ingest-high-priority-fairness.test.js +76 -0
- package/test/policy-capture-attestation.test.js +234 -0
- package/test/policy-session-completion.testcontainers.test.js +271 -0
- package/test/privacy-policy-index.test.js +194 -0
- package/test/sdk-background-timeout-isolation.test.js +39 -0
- package/test/trace-batch-size.test.js +4 -0
package/dist/index.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ type PendingTraceEventRecord = TraceEventRecord & {
|
|
|
87
87
|
__reproTraceValueEntries?: TraceValueBatchEntry[];
|
|
88
88
|
};
|
|
89
89
|
type TraceValueCaptureRef = {
|
|
90
|
-
status: 'stored' | 'truncated-for-storage' | 'skipped-non-meaningful';
|
|
90
|
+
status: 'stored' | 'truncated-for-storage' | 'skipped-non-meaningful' | 'failed-policy';
|
|
91
91
|
valueId?: string;
|
|
92
92
|
projectedKind?: string;
|
|
93
93
|
};
|
|
@@ -287,6 +287,14 @@ type RequestCaptureScopeState = {
|
|
|
287
287
|
traceBatchCount: number;
|
|
288
288
|
dbChangeCount: number;
|
|
289
289
|
emailEventCount: number;
|
|
290
|
+
captureFailures: Array<{
|
|
291
|
+
stage: string;
|
|
292
|
+
target: string;
|
|
293
|
+
reason: string;
|
|
294
|
+
}>;
|
|
295
|
+
privacyMode: 'policy' | 'fallback' | 'raw';
|
|
296
|
+
privacyPolicyFingerprint?: string;
|
|
297
|
+
privacyStatementCount: number;
|
|
290
298
|
};
|
|
291
299
|
type BackendLiveTimingConfig = {
|
|
292
300
|
sessionMaxDurationMs: number;
|
|
@@ -324,7 +332,7 @@ type InlinePrivacyMaterializationResult = {
|
|
|
324
332
|
limit?: number;
|
|
325
333
|
};
|
|
326
334
|
};
|
|
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>;
|
|
335
|
+
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
336
|
declare function getEventTraceValueEntries(event: TraceEventRecord | PendingTraceEventRecord): TraceValueBatchEntry[] | undefined;
|
|
329
337
|
declare function estimateTraceBatchSerializedBytes(batch: TraceEventRecord[], requestRid: string, actionId: string | null | undefined, batchIndex: number): number;
|
|
330
338
|
declare function chunkTraceEventsForTransport(events: TraceEventRecord[], requestRid: string, actionId: string | null | undefined): TraceEventRecord[][];
|