import type { Encodable } from "./index.js"; /** Runtime representation of a whole-value or structural sensitivity policy. */ export type SensitivityMask = true | readonly SensitivityMask[] | { readonly [key: string]: SensitivityMask | undefined; }; /** Codec object types whose internal properties are not maskable structure. */ type AtomicEncodableObject = ArrayBuffer | ArrayBufferView | Blob | Date | File | Headers | Map | RegExp | Request | Response | Set | URL | URLSearchParams; /** * Mirrors an output value with `true` at each subtree that must not be exposed. * * A one-element array mask applies to every array element. Non-structural codec * values can only be marked wholly sensitive. */ export type StructuralSensitivityMask = true | (T extends unknown ? NonNullable extends AtomicEncodableObject ? never : NonNullable extends readonly (infer TItem)[] ? readonly [StructuralSensitivityMask] : NonNullable extends object ? { readonly [TKey in keyof NonNullable]?: StructuralSensitivityMask[TKey]>; } : never : never); /** * Returns whether a value is a valid runtime sensitivity mask. * * @param value - Candidate mask. */ export declare function isSensitivityMask(value: unknown): value is SensitivityMask; /** * Replaces structurally sensitive subtrees with `undefined` for persistence in * author-visible execution data. * * @param value - Validated codec value being projected. * @param mask - Structural policy declared by the value's producer. * @throws {TypeError} When the mask does not match the value structure. */ export declare function redactSensitiveValue(value: T, mask: SensitivityMask): T | undefined; /** * Projects a structural mask through one property access. * * @param mask - Parent sensitivity mask. * @param property - Accessed property name or array index. */ export declare function projectSensitivityMask(mask: SensitivityMask | undefined, property: string): SensitivityMask | undefined; export {};