/** * Response data-classification tags. A route can declare the highest sensitivity its response body * carries (`schema.classification`). This is a declarative, compile-time + introspection fact - never * read on the request hot path and never enforced at runtime here. Downstream consumers use it: a * partner-API surface refuses to expose a route whose response is `pii`/`secret`, privacy tooling * learns which routes emit regulated data, and the capability lockfile records it so a route that * *starts* returning PII flips the lockfile and forces a review. */ /** Sensitivity of the data a response carries. Ordered `public` < `pii` < `secret`. */ export type DataClassification = "public" | "pii" | "secret"; /** Field paths use JSON Pointer segments; array items use a `*` segment. */ export interface ResponseClassification { readonly fields: Readonly>; readonly max: DataClassification; } declare const CLASSIFICATION: unique symbol; export type ClassifiedSchema = S & { readonly [CLASSIFICATION]: DataClassification; }; /** Total order over classifications; higher = more sensitive. */ export declare const DATA_CLASSIFICATION_RANK: Readonly>; /** Whether `value` is a known classification token. */ export declare function isDataClassification(value: unknown): value is DataClassification; /** The most sensitive classification among the inputs; `"public"` when none are given. */ export declare function maxClassification(values: Iterable): DataClassification; /** True when `value` is at least as sensitive as `floor` (e.g. `classificationAtLeast(x, "pii")`). */ export declare function classificationAtLeast(value: DataClassification, floor: DataClassification): boolean; /** * Attach data-classification metadata without changing validation or inferred input/output types. * For Nifra/TypeBox carriers the raw JSON Schema node is tagged too, so metadata survives composition * through `t.object`, `t.array`, `t.optional`, and unions. */ export declare function classified(schema: S, classification: DataClassification): ClassifiedSchema; /** Read field-level metadata from an introspectable response schema. Never invokes its validator. */ export declare function reflectClassification(schema: unknown): ResponseClassification | undefined; /** Merge field metadata with an optional route-level sensitivity fallback. */ export declare function routeClassification(responseSchema: unknown, fallback: DataClassification | undefined): ResponseClassification | undefined; export {}; //# sourceMappingURL=classification.d.ts.map