@nvisy/sdk 0.33.0 → 0.34.0

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.
@@ -1227,23 +1227,30 @@ interface paths {
1227
1227
  };
1228
1228
  /**
1229
1229
  * List workspace activities
1230
- * @description Returns the workspace's activity log, most recent first, cursor-paginated. Optional filters: `type` (repeatable, e.g. `file.created`), `actor` (an account id), and a `from`/`to` day range (each bound narrows only when given; the feed is otherwise all-time).
1230
+ * @description Returns the workspace's activity log, most recent first, cursor-paginated. Optional filters: `type` (repeatable, e.g. `file.created`), `actor` (a username), and a `from`/`to` day range (each bound narrows only when given; the feed is otherwise all-time).
1231
1231
  */
1232
1232
  get: {
1233
1233
  parameters: {
1234
1234
  query?: {
1235
- /** @description Keep only activities performed by this account. Omit for any actor. */
1236
- actor?: string;
1235
+ /** @description Username of the account whose activities to keep. Omit for any actor. */
1236
+ actor?: components["schemas"]["Handle"];
1237
1237
  /**
1238
- * @description Cursor pointing to the last item of the previous page.
1239
- * Obtain this from the `nextCursor` field in the response.
1238
+ * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
1239
+ * parameter for several; omit for no type constraint.
1240
1240
  */
1241
- after?: string;
1241
+ type?: components["schemas"]["ActivityType"][];
1242
1242
  /**
1243
1243
  * @description First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the range
1244
1244
  * spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
1245
1245
  */
1246
1246
  from?: string;
1247
+ /** @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC). */
1248
+ to?: string;
1249
+ /**
1250
+ * @description Cursor pointing to the last item of the previous page.
1251
+ * Obtain this from the `nextCursor` field in the response.
1252
+ */
1253
+ after?: string;
1247
1254
  /**
1248
1255
  * @description Whether to include the total item count in the response's `total` field.
1249
1256
  * Defaults to `false`, since counting is an extra query; set it to `true`
@@ -1252,14 +1259,6 @@ interface paths {
1252
1259
  includeCount?: boolean;
1253
1260
  /** @description The maximum number of records to return (1-100, default: 20). */
1254
1261
  limit?: number;
1255
- /** @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC). */
1256
- to?: string;
1257
- /**
1258
- * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
1259
- * parameter for several; omit for no type constraint. The field is `types`
1260
- * since `type` is a reserved word.
1261
- */
1262
- type?: components["schemas"]["ActivityType"][];
1263
1262
  };
1264
1263
  header?: never;
1265
1264
  path: {
@@ -1339,10 +1338,13 @@ interface paths {
1339
1338
  get: {
1340
1339
  parameters: {
1341
1340
  query?: {
1342
- /** @description Keep only activities performed by this account. Omit for any actor. */
1343
- actor?: string;
1344
- /** @description Output format; defaults to `csv`. */
1345
- format?: components["schemas"]["ExportFormat"];
1341
+ /** @description Username of the account whose activities to keep. Omit for any actor. */
1342
+ actor?: components["schemas"]["Handle"];
1343
+ /**
1344
+ * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
1345
+ * parameter for several; omit for no type constraint.
1346
+ */
1347
+ type?: components["schemas"]["ActivityType"][];
1346
1348
  /**
1347
1349
  * @description First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the range
1348
1350
  * spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
@@ -1350,12 +1352,8 @@ interface paths {
1350
1352
  from?: string;
1351
1353
  /** @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC). */
1352
1354
  to?: string;
1353
- /**
1354
- * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
1355
- * parameter for several; omit for no type constraint. The field is `types`
1356
- * since `type` is a reserved word.
1357
- */
1358
- type?: components["schemas"]["ActivityType"][];
1355
+ /** @description Output format; defaults to `csv`. */
1356
+ format?: components["schemas"]["ExportFormat"];
1359
1357
  };
1360
1358
  header?: never;
1361
1359
  path: {
@@ -5441,22 +5439,34 @@ interface paths {
5441
5439
  requestBody?: never;
5442
5440
  responses: {
5443
5441
  /**
5444
- * @description What detection found in one document.
5442
+ * @description What detection found in one document, plus what a reviewer
5443
+ * decided about it.
5444
+ *
5445
+ * Wraps elide's [`Report`] with the three things elide does not
5446
+ * model: the recognition [`DocumentContext`] the entities were
5447
+ * scored against, how the document decoded, and the reviewer
5448
+ * decisions in [`edits`](Self::edits).
5449
+ *
5450
+ * # Serialization
5445
5451
  *
5446
- * The body group plus per-container-part groups (each tagged by
5447
- * modality) plus the recognition [`AuditContext`] the entities
5448
- * were scored against.
5452
+ * [`Serialize`] but deliberately **not** `Deserialize`: a
5453
+ * serialized report tags entity groups by modality *name*, so
5454
+ * rebuilding one needs the registry [`Engine`] holds. Read an
5455
+ * audit back with [`Engine::deserialize_audit`].
5449
5456
  *
5450
- * The context travels with the entities so anonymize can rebuild
5451
- * an orchestrator against exactly the vocabulary analyze used.
5452
- * Anything a policy predicate compares against beyond the label
5453
- * catalog (asserted languages, jurisdictions, document tags) is
5454
- * here; labels are re-derived from the policy set on each
5455
- * anonymize call.
5457
+ * # Schema
5456
5458
  *
5457
- * No [`Default`]: a well-formed audit must carry a real
5458
- * [`AuditContext`] with a real correlation id. Callers building
5459
- * an audit outside the analyze path construct it explicitly.
5459
+ * Generate under the **serialize** contract
5460
+ * ([`SchemaSettings::for_serialize`]). `edits` and `usage` are
5461
+ * `skip_serializing_if`, and only that contract marks them
5462
+ * optional — `schema_for!` defaults to deserialize and declares
5463
+ * both required, so a generated client would reject responses this
5464
+ * crate really emits.
5465
+ *
5466
+ * [`Engine`]: super::Engine
5467
+ * [`Engine::deserialize_audit`]: super::Engine::deserialize_audit
5468
+ * [`Report`]: elide::Report
5469
+ * [`SchemaSettings::for_serialize`]: schemars::generate::SchemaSettings::for_serialize
5460
5470
  */
5461
5471
  200: {
5462
5472
  headers: {
@@ -8712,79 +8722,31 @@ interface components {
8712
8722
  workspaceSlug: components["schemas"]["Handle"];
8713
8723
  };
8714
8724
  /**
8715
- * @description Query parameters for the activity export: the type/actor filter, a bounded date
8716
- * window (defaulted and capped, since the export materializes rows), and the
8717
- * output `format`. See [`DateWindow`] for the range defaults and bounds.
8725
+ * @description The export-only query parameter: the output format. Kept separate from the
8726
+ * shared filter and window so each is extracted on its own (see
8727
+ * [`ActivityFilterQuery`] for why flattening is avoided).
8718
8728
  */
8719
- ActivityExportQuery: {
8720
- /**
8721
- * Format: uuid
8722
- * @description Keep only activities performed by this account. Omit for any actor.
8723
- */
8724
- actor?: string;
8729
+ ActivityExportOptions: {
8725
8730
  /** @description Output format; defaults to `csv`. */
8726
8731
  format?: components["schemas"]["ExportFormat"];
8727
- /**
8728
- * Format: date
8729
- * @description First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the range
8730
- * spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
8731
- */
8732
- from?: string;
8733
- /**
8734
- * Format: date
8735
- * @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC).
8736
- */
8737
- to?: string;
8738
- /**
8739
- * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
8740
- * parameter for several; omit for no type constraint. The field is `types`
8741
- * since `type` is a reserved word.
8742
- */
8743
- type?: components["schemas"]["ActivityType"][];
8744
8732
  };
8745
8733
  /**
8746
- * @description Query parameters for the activity feed: the type/actor filter, an optional date
8747
- * window (narrows only when given — the feed is otherwise all-time), and cursor
8748
- * pagination.
8734
+ * @description The activity-specific filter parameters: which activity types to keep and
8735
+ * whose activities to keep.
8736
+ *
8737
+ * This is its own query struct so an endpoint composes it alongside the shared
8738
+ * [`CursorPagination`](crate::handler::request::CursorPagination) and
8739
+ * [`DateWindow`] as separate query extractors, rather than `#[serde(flatten)]`ing
8740
+ * them into one struct: the query extractor (`serde_html_form`) mis-handles
8741
+ * flattened sub-structs — a flattened pagination struct fails to deserialize even
8742
+ * a bare `?limit=` — so each concern is extracted on its own.
8749
8743
  */
8750
- ActivityListQuery: {
8751
- /**
8752
- * Format: uuid
8753
- * @description Keep only activities performed by this account. Omit for any actor.
8754
- */
8755
- actor?: string;
8756
- /**
8757
- * @description Cursor pointing to the last item of the previous page.
8758
- * Obtain this from the `nextCursor` field in the response.
8759
- */
8760
- after?: string;
8761
- /**
8762
- * Format: date
8763
- * @description First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the range
8764
- * spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
8765
- */
8766
- from?: string;
8767
- /**
8768
- * @description Whether to include the total item count in the response's `total` field.
8769
- * Defaults to `false`, since counting is an extra query; set it to `true`
8770
- * only when the count is actually needed.
8771
- * @default false
8772
- */
8773
- includeCount?: boolean;
8774
- /**
8775
- * Format: uint32
8776
- * @description The maximum number of records to return (1-100, default: 20).
8777
- */
8778
- limit?: number;
8779
- /**
8780
- * Format: date
8781
- * @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC).
8782
- */
8783
- to?: string;
8744
+ ActivityFilterQuery: {
8745
+ /** @description Username of the account whose activities to keep. Omit for any actor. */
8746
+ actor?: components["schemas"]["Handle"];
8784
8747
  /**
8785
8748
  * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
8786
- * parameter for several; omit for no type constraint. The field is `types`
8787
- * since `type` is a reserved word.
8749
+ * parameter for several; omit for no type constraint.
8788
8750
  */
8789
8751
  type?: components["schemas"]["ActivityType"][];
8790
8752
  };
@@ -9050,42 +9012,50 @@ interface components {
9050
9012
  * it on the entity's [`Redaction`] event so an audit can trace a change back to
9051
9013
  * the policy that demanded it.
9052
9014
  *
9053
- * The rationale takes one of two [`kind`](Attribution::kind)s, by how much
9054
- * structure the author has ([`AttributionKind::Freeform`] /
9055
- * [`AttributionKind::Cited`]). Orthogonal to that, an attribution may carry a
9056
- * [`source_id`](Attribution::source_id): an opaque, caller-owned [`Uuid`] the
9057
- * policy layer uses to link back to a source record (a rule, a request, a
9058
- * document). elide-core stores and hashes it verbatim; it never resolves or
9059
- * validates it.
9015
+ * The rationale takes one of two shapes, by how much structure the author has:
9016
+ * a [`Freeform`](Attribution::Freeform) label or a formal
9017
+ * [`Cited`](Attribution::Cited) authority. Start one with
9018
+ * [`Attribution::freeform`] / [`Attribution::cited`], refine it with the
9019
+ * shape's `with_*` builder, and let it convert into an `Attribution`:
9020
+ *
9021
+ * ```
9022
+ * # use elide_core::entity::audit::Attribution;
9023
+ * let attribution: Attribution =
9024
+ * Attribution::freeform("gdpr-art-17")
9025
+ * .with_description("right to erasure")
9026
+ * .into();
9027
+ * ```
9060
9028
  *
9061
9029
  * [`Redaction`]: crate::entity::audit::AuditKind::Redaction
9062
9030
  */
9063
- Attribution: {
9064
- /** @description The shape of the rationale: a freeform label or a formal citation. */
9065
- kind: components["schemas"]["AttributionKind"];
9066
- /**
9067
- * Format: uuid
9068
- * @description Opaque, caller-owned link to a source record, when given.
9069
- */
9070
- source_id?: string;
9071
- };
9072
- /** @description The shape of an [`Attribution`]'s rationale. */
9073
- AttributionKind: {
9074
- /** @description Human-readable description (e.g. `"right to erasure"`), when given. */
9075
- description?: string;
9031
+ Attribution: ({
9076
9032
  /** @constant */
9077
9033
  kind: "freeform";
9078
- /** @description The policy's name (e.g. `"gdpr-art-17"`, `"hipaa-safe-harbor"`). */
9079
- name: string;
9080
- } | {
9081
- /** @description The authority cited (e.g. `"GDPR"`, `"HIPAA"`, `"internal-policy"`). */
9082
- authority: string;
9083
- /** @description The citation within that authority (e.g. `"Art. 17(1)"`, `"§164.514"`). */
9084
- citation: string;
9034
+ } & components["schemas"]["FreeformAttribution"]) | ({
9085
9035
  /** @constant */
9086
9036
  kind: "cited";
9087
- /** @description Why the citation applies here (e.g. `"data subject requested erasure"`). */
9088
- rationale: string;
9037
+ } & components["schemas"]["CitedAttribution"]);
9038
+ /**
9039
+ * @description A detection recognition missed.
9040
+ *
9041
+ * Recorded on the report with human provenance, so it is never
9042
+ * mistaken for an automatic hit, then redacted under the policy set
9043
+ * like any other entity: an added label the policy does not cover
9044
+ * is left alone.
9045
+ *
9046
+ * Carries no entity id — the entity does not exist yet, and the
9047
+ * engine mints one when the edit is applied, so a client cannot
9048
+ * collide with a real detection or shadow an existing entity.
9049
+ */
9050
+ AudioAdd: {
9051
+ /** @description Who made it, when the caller said. */
9052
+ actor?: string;
9053
+ /** @description What the reviewer says this is. */
9054
+ label: components["schemas"]["LabelRef"];
9055
+ /** @description Where it sits in the document. */
9056
+ location: components["schemas"]["AudioLocation"];
9057
+ /** @description The rationale, when one was given. */
9058
+ reason?: string;
9089
9059
  };
9090
9060
  /**
9091
9061
  * @description One node in an entity's audit DAG: a thing that happened, with its
@@ -9162,115 +9132,70 @@ interface components {
9162
9132
  * @description Kind of an [`AuditEvent`], carrying its event-specific detail and the
9163
9133
  * rationale for why it happened.
9164
9134
  *
9165
- * `#[non_exhaustive]`: new event kinds (verification, annotation, …)
9166
- * can be added compatibly. The recognition kinds ([`Pattern`],
9167
- * [`Model`]) carry the matched [`Location`]; the rest carry their own
9168
- * data.
9169
- *
9135
+ * A thin tagged union: each variant wraps one payload struct (e.g.
9136
+ * [`Redaction`], [`Selection`], [`Manual`]) that owns that kind's fields, its
9137
+ * docs, and how it folds into the audit hash. Match on a variant to reach its
9138
+ * payload:
9139
+ *
9140
+ * ```
9141
+ * # use elide_core::entity::audit::AuditKind;
9142
+ * # use elide_core::modality::text::Text;
9143
+ * # fn show(kind: &AuditKind<Text>) {
9144
+ * if let AuditKind::Redaction(redaction) = kind {
9145
+ * let _ = &redaction.operator;
9146
+ * }
9147
+ * # }
9148
+ * ```
9149
+ *
9150
+ * `#[non_exhaustive]`: new event kinds (verification, annotation, …) can be
9151
+ * added compatibly. The recognition kinds ([`Pattern`], [`Model`]) carry the
9152
+ * matched [`Location`]; the rest carry their own data.
9153
+ *
9154
+ * [`AuditEvent`]: super::AuditEvent
9170
9155
  * [`Pattern`]: AuditKind::Pattern
9171
9156
  * [`Model`]: AuditKind::Model
9172
9157
  * [`Location`]: Modality::Location
9173
9158
  */
9174
9159
  AudioAuditKind: {
9160
+ detail: components["schemas"]["AudioPattern"];
9175
9161
  /** @constant */
9176
9162
  kind: "pattern";
9177
- /** @description Where the recognizer matched. */
9178
- location: components["schemas"]["AudioLocation"];
9179
- /** @description Pattern detail. */
9180
- pattern: components["schemas"]["PatternEvent"];
9181
9163
  } | {
9164
+ detail: components["schemas"]["AudioModel"];
9182
9165
  /** @constant */
9183
9166
  kind: "model";
9184
- /** @description Where the recognizer matched. */
9185
- location: components["schemas"]["AudioLocation"];
9186
- /** @description Model detail. */
9187
- model: components["schemas"]["ModelEvent"];
9188
9167
  } | {
9168
+ detail: components["schemas"]["Deduplication"];
9189
9169
  /** @constant */
9190
9170
  kind: "deduplication";
9191
- /** @description Name of the fusion strategy that combined them. */
9192
- strategy: string;
9193
9171
  } | {
9194
- /** @description The loser's confidence at resolution time. */
9195
- competing_confidence: components["schemas"]["Confidence"];
9196
- /** @description The label of the detection that lost arbitration. */
9197
- competing_label: components["schemas"]["LabelRef"];
9172
+ detail: components["schemas"]["Conflict"];
9198
9173
  /** @constant */
9199
9174
  kind: "conflict";
9200
- /** @description Name of the conflict policy that chose the winner. */
9201
- resolved_by: string;
9202
9175
  } | {
9203
- /** @description The competing detection's confidence. */
9204
- competing_confidence: components["schemas"]["Confidence"];
9205
- /** @description The label of the competing detection. */
9206
- competing_label: components["schemas"]["LabelRef"];
9207
- /** @description Name of the policy that flagged the contest. */
9208
- flagged_by: string;
9176
+ detail: components["schemas"]["Contested"];
9209
9177
  /** @constant */
9210
9178
  kind: "contested";
9211
9179
  } | {
9212
- /**
9213
- * Format: double
9214
- * @description Multiplier applied.
9215
- */
9216
- factor: number;
9180
+ detail: components["schemas"]["Calibration"];
9217
9181
  /** @constant */
9218
9182
  kind: "calibration";
9219
9183
  } | {
9220
- /**
9221
- * @description The located [`Hint`] the keyword fired from, when the match came
9222
- * from an out-of-band hint (a column header, a key) rather than
9223
- * the in-text word window. `None` for an in-text-window match.
9224
- *
9225
- * [`Hint`]: crate::modality::Hint
9226
- */
9227
- hint?: components["schemas"]["AudioHint"];
9228
- /** @description Keyword that fired the boost. */
9229
- keyword: string;
9184
+ detail: components["schemas"]["AudioRefinement"];
9230
9185
  /** @constant */
9231
9186
  kind: "refinement";
9232
- /**
9233
- * @description Where the boosting keyword sits in the medium. For a hint match
9234
- * this mirrors the hint's own location; for an in-text-window match
9235
- * it is the keyword resolved through the modality's [`locate`] (a
9236
- * pixel box for image, a time span for audio, the byte range for
9237
- * text/tabular). `None` when the keyword's stream range could not be
9238
- * placed, symmetric with a match the recognizer itself drops.
9239
- *
9240
- * [`locate`]: crate::modality::TextRecognizable::locate
9241
- */
9242
- location?: components["schemas"]["AudioLocation"];
9243
9187
  } | {
9244
- /**
9245
- * @description The author-supplied policy rationale, when the operator carried an
9246
- * [`Attribution`]; `None` otherwise.
9247
- */
9248
- attribution?: components["schemas"]["Attribution"];
9249
- /** @description Identifier of the key needed to reverse it, if reversible. */
9250
- key_id?: string;
9188
+ detail: components["schemas"]["Redaction"];
9251
9189
  /** @constant */
9252
9190
  kind: "redaction";
9253
- /** @description How much the output leaks about the original. */
9254
- leak_profile: components["schemas"]["LeakProfile"];
9255
- /**
9256
- * @description Which selection rule chose this operator: the automatic "why"
9257
- * (matched a label, a tag, a predicate, or the fallback).
9258
- */
9259
- matched_by: components["schemas"]["RuleMatch"];
9260
- /** @description Which operator (name + version) ran. */
9261
- operator: components["schemas"]["OperatorId"];
9262
- /**
9263
- * @description BLAKE3 digest of the original text the operator hid, when the
9264
- * redaction layer recorded it. Proves *what* was redacted without
9265
- * storing the plaintext; `None` when the operator did not capture it.
9266
- */
9267
- span_hash?: components["schemas"]["AuditHash"];
9268
- /**
9269
- * Format: uint32
9270
- * @description Byte length of the original text the operator hid, paired with
9271
- * [`span_hash`](Self::Redaction::span_hash). `None` when not captured.
9272
- */
9273
- span_length?: number;
9191
+ } | {
9192
+ detail: components["schemas"]["Selection"];
9193
+ /** @constant */
9194
+ kind: "selection";
9195
+ } | {
9196
+ detail: components["schemas"]["AudioManual"];
9197
+ /** @constant */
9198
+ kind: "manual";
9274
9199
  };
9275
9200
  /**
9276
9201
  * @description Full audit trail of an [`Entity`]: every [`AuditEvent`] in its life, as a
@@ -9327,6 +9252,26 @@ interface components {
9327
9252
  /** @description Original filename, when known. */
9328
9253
  filename?: string;
9329
9254
  };
9255
+ /**
9256
+ * @description One change to an analyzed document.
9257
+ *
9258
+ * `Add` carries no id because the entity does not exist yet; the
9259
+ * engine mints one when the edit is applied, so a client cannot
9260
+ * collide with a real detection or shadow an existing entity.
9261
+ */
9262
+ AudioEdit: ({
9263
+ /** @constant */
9264
+ op: "add";
9265
+ } & components["schemas"]["AudioAdd"]) | ({
9266
+ /** @constant */
9267
+ op: "retag";
9268
+ } & components["schemas"]["AudioRetag"]) | ({
9269
+ /** @constant */
9270
+ op: "suppress";
9271
+ } & components["schemas"]["Suppress"]) | ({
9272
+ /** @constant */
9273
+ op: "redact";
9274
+ } & components["schemas"]["AudioRedact"]);
9330
9275
  /**
9331
9276
  * @description Detected piece of sensitive information within some medium.
9332
9277
  *
@@ -9355,7 +9300,12 @@ interface components {
9355
9300
  AudioEntity: {
9356
9301
  /**
9357
9302
  * @description Tamper-evident audit trail: every contributing detection, the fusion
9358
- * event if any, and the redaction that hid it, as a hash-linked DAG.
9303
+ * event if any, and the redaction that hid it, as a hash-linked DAG. It is
9304
+ * also the single source of truth for whether a reviewer
9305
+ * [suppressed](Self::is_suppressed) the entity — a suppression is a
9306
+ * [`Manual`] event on this trail, not a separate flag.
9307
+ *
9308
+ * [`Manual`]: crate::entity::audit::AuditKind::Manual
9359
9309
  */
9360
9310
  audit: components["schemas"]["AudioAuditLog"];
9361
9311
  /** @description Effective confidence in `0.0..=1.0` (fused, if applicable). */
@@ -9400,30 +9350,6 @@ interface components {
9400
9350
  */
9401
9351
  recognized_range?: components["schemas"]["Range_of_uint"];
9402
9352
  };
9403
- /**
9404
- * @description One recognized entity plus the optional reviewer override.
9405
- *
9406
- * The bound mirrors elide's [`Entity<M>`]: serialization needs
9407
- * `M::Location` and `M::Data` (de)serializable, and JsonSchema
9408
- * derivation needs them schema-able. All four modalities elide
9409
- * ships satisfy these under the `serde` + `schema` features.
9410
- */
9411
- AudioEntityRecord: {
9412
- /** @description The elide entity, as recognition produced it. */
9413
- entity: components["schemas"]["AudioEntity"];
9414
- /**
9415
- * @description Reviewer-supplied redaction override.
9416
- *
9417
- * `None` means "use the matching policy rule's decision";
9418
- * `Some(...)` overrides that rule for this specific entity
9419
- * at apply time. Reviewer overrides take precedence over
9420
- * every policy rule and inherit the authority of the
9421
- * [`Review::policy_id`] they name: the audit event's
9422
- * attribution stamps that policy so the trail names the
9423
- * authority under which the override fired.
9424
- */
9425
- review?: components["schemas"]["Review"];
9426
- };
9427
9353
  /**
9428
9354
  * @description Located, typed piece of context a recognizer may treat as in-context
9429
9355
  * for a nearby value.
@@ -9464,6 +9390,85 @@ interface components {
9464
9390
  /** @description Diarization label of the speaker, when a diarizer assigned one. */
9465
9391
  speaker_id?: string;
9466
9392
  };
9393
+ /**
9394
+ * @description A human override, outside automatic detection: an entity a reviewer added by
9395
+ * hand, or a detected one they marked to ignore. Its provenance is a person's
9396
+ * decision, not a recognizer's — so the trail records *why* (an
9397
+ * [`Attribution`], when supplied). *Who* made the override is the event's
9398
+ * [`source`], not a payload field.
9399
+ *
9400
+ * [`source`]: super::AuditEvent::source
9401
+ */
9402
+ AudioManual: {
9403
+ /**
9404
+ * @description The reviewer's rationale, when supplied (e.g. a freeform
9405
+ * `"false positive"`, or a cited authority). `None` for an unexplained
9406
+ * override.
9407
+ */
9408
+ attribution?: components["schemas"]["Attribution"];
9409
+ /**
9410
+ * @description Which human decision this records: including a missed entity, or
9411
+ * suppressing a detected one. This is the authority on whether the entity
9412
+ * is redacted — [`AuditLog::is_suppressed`] reads it, so there is no
9413
+ * separate flag to keep in sync.
9414
+ *
9415
+ * [`AuditLog::is_suppressed`]: crate::entity::audit::AuditLog::is_suppressed
9416
+ */
9417
+ intent: components["schemas"]["ManualIntent"];
9418
+ /** @description Where the override applies, in modality-native coordinates. */
9419
+ location: components["schemas"]["AudioLocation"];
9420
+ };
9421
+ /**
9422
+ * @description Detail of a model/NER recognition: a model matched at `location`, with its
9423
+ * metadata in `model`.
9424
+ */
9425
+ AudioModel: {
9426
+ /** @description Where the recognizer matched. */
9427
+ location: components["schemas"]["AudioLocation"];
9428
+ /** @description Model metadata (name, version, contextual flag). */
9429
+ model: components["schemas"]["ModelEvent"];
9430
+ };
9431
+ /**
9432
+ * @description Detail of a pattern/dictionary recognition: a recognizer matched at
9433
+ * `location`, with the pattern metadata in `pattern`.
9434
+ */
9435
+ AudioPattern: {
9436
+ /** @description Where the recognizer matched. */
9437
+ location: components["schemas"]["AudioLocation"];
9438
+ /** @description Pattern metadata (name, regex, validator, contextual flag). */
9439
+ pattern: components["schemas"]["PatternEvent"];
9440
+ };
9441
+ /**
9442
+ * @description Redact this entity with `action` instead of the operator the
9443
+ * policy picked.
9444
+ */
9445
+ AudioRedact: {
9446
+ /**
9447
+ * @description The operator to run, typed to the entity's own modality so a
9448
+ * text entity cannot be given an image operator.
9449
+ */
9450
+ action: components["schemas"]["AudioRedaction"];
9451
+ /** @description Who made it, when the caller said. */
9452
+ actor?: string;
9453
+ /**
9454
+ * Format: uuid
9455
+ * @description The entity to redact.
9456
+ */
9457
+ id: string;
9458
+ /**
9459
+ * Format: uuid
9460
+ * @description The policy whose authority the reviewer exercises. Must match
9461
+ * a submitted policy's `id`.
9462
+ *
9463
+ * Not only for audit: it picks which per-policy pseudonym vault
9464
+ * and `KeyProvider` the operator resolves against, so an
9465
+ * override using `Pseudonymize` or `HmacHash` stays consistent
9466
+ * with that policy's other rules.
9467
+ */
9468
+ policyId: string;
9469
+ /** @description The rationale, when one was given. */
9470
+ reason?: string;
9471
+ };
9467
9472
  /** @description Operator spec a `redact` audio rule carries. */
9468
9473
  AudioRedaction: {
9469
9474
  /** @constant */
@@ -9497,140 +9502,145 @@ interface components {
9497
9502
  */
9498
9503
  waveform?: components["schemas"]["Waveform"];
9499
9504
  };
9505
+ /** @description A context keyword near the entity lifted its confidence. */
9506
+ AudioRefinement: {
9507
+ /**
9508
+ * @description The located [`Hint`] the keyword fired from, when the match came from an
9509
+ * out-of-band hint (a column header, a key) rather than the in-text word
9510
+ * window. `None` for an in-text-window match.
9511
+ *
9512
+ * [`Hint`]: crate::modality::Hint
9513
+ */
9514
+ hint?: components["schemas"]["AudioHint"];
9515
+ /** @description Keyword that fired the boost. */
9516
+ keyword: string;
9517
+ /**
9518
+ * @description Where the boosting keyword sits in the medium. For a hint match this
9519
+ * mirrors the hint's own location; for an in-text-window match it is the
9520
+ * keyword resolved through the modality's [`locate`]. `None` when the
9521
+ * keyword's stream range could not be placed.
9522
+ *
9523
+ * [`locate`]: crate::modality::TextRecognizable::locate
9524
+ */
9525
+ location?: components["schemas"]["AudioLocation"];
9526
+ };
9527
+ /**
9528
+ * @description Correct what an existing detection *is* or *covers*, then redact
9529
+ * it under the policy set as corrected.
9530
+ *
9531
+ * A reviewer fixing recognition's mistake rather than overriding
9532
+ * its consequence. Retagging into a label the policy does not cover
9533
+ * leaves the entity alone, exactly as if it had been detected that
9534
+ * way — which is why it is auditable rather than a mutable field.
9535
+ */
9536
+ AudioRetag: {
9537
+ /** @description Who made it, when the caller said. */
9538
+ actor?: string;
9539
+ /**
9540
+ * Format: uuid
9541
+ * @description The entity being corrected.
9542
+ */
9543
+ id: string;
9544
+ /** @description The corrected label, when recognition got it wrong. */
9545
+ label?: components["schemas"]["LabelRef"];
9546
+ /**
9547
+ * @description The corrected location, when the span clipped the value or
9548
+ * ran past it.
9549
+ */
9550
+ location?: components["schemas"]["AudioLocation"];
9551
+ /** @description The rationale, when one was given. */
9552
+ reason?: string;
9553
+ };
9500
9554
  /**
9501
- * @description What detection found in one document.
9555
+ * @description What detection found in one document, plus what a reviewer
9556
+ * decided about it.
9557
+ *
9558
+ * Wraps elide's [`Report`] with the three things elide does not
9559
+ * model: the recognition [`DocumentContext`] the entities were
9560
+ * scored against, how the document decoded, and the reviewer
9561
+ * decisions in [`edits`](Self::edits).
9562
+ *
9563
+ * # Serialization
9502
9564
  *
9503
- * The body group plus per-container-part groups (each tagged by
9504
- * modality) plus the recognition [`AuditContext`] the entities
9505
- * were scored against.
9565
+ * [`Serialize`] but deliberately **not** `Deserialize`: a
9566
+ * serialized report tags entity groups by modality *name*, so
9567
+ * rebuilding one needs the registry [`Engine`] holds. Read an
9568
+ * audit back with [`Engine::deserialize_audit`].
9506
9569
  *
9507
- * The context travels with the entities so anonymize can rebuild
9508
- * an orchestrator against exactly the vocabulary analyze used.
9509
- * Anything a policy predicate compares against beyond the label
9510
- * catalog (asserted languages, jurisdictions, document tags) is
9511
- * here; labels are re-derived from the policy set on each
9512
- * anonymize call.
9570
+ * # Schema
9513
9571
  *
9514
- * No [`Default`]: a well-formed audit must carry a real
9515
- * [`AuditContext`] with a real correlation id. Callers building
9516
- * an audit outside the analyze path construct it explicitly.
9572
+ * Generate under the **serialize** contract
9573
+ * ([`SchemaSettings::for_serialize`]). `edits` and `usage` are
9574
+ * `skip_serializing_if`, and only that contract marks them
9575
+ * optional — `schema_for!` defaults to deserialize and declares
9576
+ * both required, so a generated client would reject responses this
9577
+ * crate really emits.
9578
+ *
9579
+ * [`Engine`]: super::Engine
9580
+ * [`Engine::deserialize_audit`]: super::Engine::deserialize_audit
9581
+ * [`Report`]: elide::Report
9582
+ * [`SchemaSettings::for_serialize`]: schemars::generate::SchemaSettings::for_serialize
9517
9583
  */
9518
9584
  Audit: {
9519
9585
  /**
9520
- * @description The body group.
9586
+ * @description How this document was decoded when it was analyzed.
9521
9587
  *
9522
- * `None` when no body pipeline produced entities (pre-analyze,
9523
- * or the codec resolved the doc to a modality with no
9524
- * pipeline).
9588
+ * Carried back so anonymize decodes identically: the entity
9589
+ * offsets below are stored against the first decode, and a
9590
+ * differently-rendered second one would not line up.
9525
9591
  */
9526
- body?: components["schemas"]["EntityGroup"];
9592
+ codec: components["schemas"]["CodecParams"];
9527
9593
  /**
9528
- * @description Recognition context.
9529
- *
9530
- * The asserted languages, countries, document tags, and the
9531
- * analyze-side correlation id. Held so
9532
- * [`Engine::anonymize`] can compile against the same
9533
- * vocabulary analyze used without the caller re-passing an
9534
- * `AnalyzerParams`.
9594
+ * @description What the caller asserted when this document was analyzed:
9595
+ * languages, jurisdictions, document tags.
9535
9596
  *
9536
- * Required on the wire: a missing context on an incoming
9537
- * [`Audit`] rejects at deserialize time so the shape
9538
- * mismatch surfaces at load, not at apply.
9597
+ * Carried back so [`Engine::anonymize`] compiles against the
9598
+ * same vocabulary analyze used, and re-decodes under the same
9599
+ * codec configuration, without the caller re-passing it.
9539
9600
  *
9540
9601
  * [`Engine::anonymize`]: super::Engine::anonymize
9541
9602
  */
9542
- context: components["schemas"]["AuditContext"];
9603
+ context: components["schemas"]["DocumentContext"];
9543
9604
  /**
9544
- * @description One entry per container part the orchestrator surfaced.
9605
+ * @description What a reviewer changed: detections they added, corrected,
9606
+ * suppressed, or chose an operator for.
9607
+ *
9608
+ * A list rather than one decision per entity, because the
9609
+ * operations feed independent channels — a retag and an
9610
+ * operator override on the same entity are both legitimate.
9611
+ *
9612
+ * Separate from the report because elide has no concept of a
9613
+ * per-entity operator override: [`anonymize_with`] re-resolves
9614
+ * operators from live policy at apply time.
9545
9615
  *
9546
- * Keyed by the container-private part id (e.g. a DOCX zip
9547
- * entry name like `"word/media/image1.png"`); each value
9548
- * carries that part's modality + entities.
9616
+ * [`anonymize_with`]: elide::Orchestrator::anonymize_with
9549
9617
  */
9550
- parts?: {
9551
- [key: string]: components["schemas"]["EntityGroup"];
9552
- };
9618
+ edits: components["schemas"]["EditSet"];
9553
9619
  /**
9554
- * @description What the analyze pass cost: one entry per recognizer and
9555
- * enricher that ran, each self-identifying by the name the
9556
- * deployment configured it under.
9620
+ * @description The detections: elide's own report, body and container
9621
+ * parts, each entity carrying its provenance chain.
9557
9622
  *
9558
- * Empty when nothing model-backed ran, which is the common
9559
- * case for a pattern-only pass. Recorded on analyze and not
9560
- * re-derived at anonymize time, so a host that bills or rate
9561
- * limits on model spend reads it straight off the returned
9562
- * [`Audit`].
9563
- */
9564
- usage?: components["schemas"]["UsageReport"];
9565
- };
9566
- /**
9567
- * @description Recognition-side facts that travel from analyze to anonymize.
9568
- *
9569
- * Mirrors elide's [`Scope`] shape one-for-one: direct fields
9570
- * for `languages` and `countries` (typed, elide-native), a
9571
- * [`metadata`] sub-struct for free-form classification strings
9572
- * (`tags`, `purpose`, `audience`), and the analyze-time
9573
- * [`correlation_id`]. The label catalog is not on here -
9574
- * labels are policy-owned, and anonymize re-derives them from
9575
- * the policy set it was handed.
9576
- *
9577
- * No [`Default`]: `correlation_id` has no meaningful default
9578
- * (a nil UUID would silently collapse unrelated audits under
9579
- * one bucket in downstream trace aggregators), so callers
9580
- * supply one explicitly. Everything else defaults to empty.
9581
- *
9582
- * [`Scope`]: elide::recognition::Scope
9583
- * [`metadata`]: Self::metadata
9584
- * [`correlation_id`]: Self::correlation_id
9585
- */
9586
- AuditContext: {
9587
- /**
9588
- * Format: uuid
9589
- * @description Analyze-time correlation id.
9623
+ * Edit it through [`Report`]'s own API [`include`],
9624
+ * [`suppress`], [`entities`] for the decisions elide models.
9625
+ * Operator overrides live in [`edits`](Self::edits).
9590
9626
  *
9591
- * Threaded into every tracing span on the recognition path;
9592
- * carried over so the anonymize path can link its own spans
9593
- * to the same request. The anonymize call supplies a fresh
9594
- * id from the passed [`Document`] as the anonymize-side
9595
- * correlation id: this one stays as the analyze-side
9596
- * pointer.
9597
- *
9598
- * Required on the wire.
9599
- *
9600
- * [`Document`]: elide_wire::file::Document
9627
+ * [`Report`]: elide::Report
9628
+ * [`include`]: elide::Report::include
9629
+ * [`suppress`]: elide::Report::suppress
9630
+ * [`entities`]: elide::Report::entities
9601
9631
  */
9602
- correlationId: string;
9632
+ report: components["schemas"]["Report"];
9603
9633
  /**
9604
- * @description Caller-asserted jurisdictions.
9605
- *
9606
- * Recorded from `AnalyzerParams.scope.countries`.
9607
- */
9608
- countries?: components["schemas"]["CountryCode"][];
9609
- /**
9610
- * @description Caller-asserted languages for the analysis.
9634
+ * @description What the analyze pass cost: one entry per recognizer and
9635
+ * enricher that ran, each self-identifying by the name the
9636
+ * deployment configured it under.
9611
9637
  *
9612
- * Recorded from `AnalyzerParams.scope.languages` at analyze
9613
- * time; anonymize re-uses them verbatim.
9614
- * @default []
9615
- */
9616
- languages?: components["schemas"]["Languages"];
9617
- /**
9618
- * @description Free-form request context: document tags, request purpose,
9619
- * output audience. See elide's [`ScopeMetadata`].
9638
+ * Carried here rather than read off the report: elide derives
9639
+ * usage during analysis and drops it when a report is rebuilt
9640
+ * from the wire, so a host that bills on model spend would
9641
+ * lose it on the round trip.
9620
9642
  */
9621
- metadata?: components["schemas"]["ScopeMetadata"];
9622
- /**
9623
- * @description OCR mode the analyze call decoded with. Recorded so the
9624
- * anonymize call re-decodes the same document under the same
9625
- * codec configuration: otherwise entity offsets stored in
9626
- * the audit wouldn't line up against a differently-rendered
9627
- * second decode. Defaults to [`RasterMode::Auto`] (the codec's
9628
- * built-in behaviour) when omitted.
9629
- * @default {
9630
- * "kind": "auto"
9631
- * }
9632
- */
9633
- rasterMode?: components["schemas"]["RasterMode"];
9643
+ usage: components["schemas"]["UsageReport"];
9634
9644
  };
9635
9645
  /**
9636
9646
  * @description A 32-byte BLAKE3 digest.
@@ -9717,6 +9727,14 @@ interface components {
9717
9727
  /** @description Minimum corner (top-left, conventionally). */
9718
9728
  min: components["schemas"]["Point"];
9719
9729
  };
9730
+ /** @description The entity's confidence was rescaled by a per-recognizer factor. */
9731
+ Calibration: {
9732
+ /**
9733
+ * Format: double
9734
+ * @description Multiplier applied.
9735
+ */
9736
+ factor: number;
9737
+ };
9720
9738
  /**
9721
9739
  * @description The coarse group a [`Label`] belongs to, for organizing detected entities
9722
9740
  * by kind (`financial`, `health`, `identity`, …).
@@ -9819,6 +9837,21 @@ interface components {
9819
9837
  /** @description The text delta. */
9820
9838
  delta: string;
9821
9839
  };
9840
+ /**
9841
+ * @description A [`Cited`](Attribution::Cited) rationale: a citable authority, the citation
9842
+ * within it, and an optional rationale for why it applies.
9843
+ */
9844
+ CitedAttribution: {
9845
+ /** @description The authority cited (e.g. `"GDPR"`, `"HIPAA"`, `"internal-policy"`). */
9846
+ authority: string;
9847
+ /** @description The citation within that authority (e.g. `"Art. 17(1)"`, `"§164.514"`). */
9848
+ citation: string;
9849
+ /**
9850
+ * @description Why the citation applies here (e.g. `"data subject requested erasure"`),
9851
+ * when given.
9852
+ */
9853
+ rationale?: string;
9854
+ };
9822
9855
  /**
9823
9856
  * @description Text a [`TextRedaction::Clamp`] emits for out-of-range values.
9824
9857
  *
@@ -9845,6 +9878,24 @@ interface components {
9845
9878
  } | {
9846
9879
  [key: string]: string;
9847
9880
  };
9881
+ /**
9882
+ * @description How the codec decodes this document.
9883
+ *
9884
+ * Defaults to the codec's own behaviour, so a caller with no
9885
+ * opinion passes [`CodecParams::default`].
9886
+ */
9887
+ CodecParams: {
9888
+ /**
9889
+ * @description How container formats carrying both a text layer and page
9890
+ * images treat OCR.
9891
+ *
9892
+ * Defaults to [`RasterMode::Auto`], the codec's own behaviour.
9893
+ * @default {
9894
+ * "kind": "auto"
9895
+ * }
9896
+ */
9897
+ rasterMode?: components["schemas"]["RasterMode"];
9898
+ };
9848
9899
  /**
9849
9900
  * @description Color as 8-bit RGB.
9850
9901
  *
@@ -9904,6 +9955,18 @@ interface components {
9904
9955
  * [`Confidence`]: crate::primitive::Confidence
9905
9956
  */
9906
9957
  ConfidenceThreshold: number;
9958
+ /**
9959
+ * @description A competing detection of a *different* label over the same span was resolved
9960
+ * against this (winning) entity — the loser is recorded, not dropped.
9961
+ */
9962
+ Conflict: {
9963
+ /** @description The loser's confidence at resolution time. */
9964
+ competing_confidence: components["schemas"]["Confidence"];
9965
+ /** @description The label of the detection that lost arbitration. */
9966
+ competing_label: components["schemas"]["LabelRef"];
9967
+ /** @description Name of the conflict policy that chose the winner. */
9968
+ resolved_by: string;
9969
+ };
9907
9970
  /**
9908
9971
  * @description Response type for a workspace connection.
9909
9972
  *
@@ -10087,6 +10150,19 @@ interface components {
10087
10150
  */
10088
10151
  provider?: string[];
10089
10152
  };
10153
+ /**
10154
+ * @description A competing detection of a different label over the same span was left
10155
+ * *unresolved*: both entities survive, flagged for a human. Recorded on each
10156
+ * entity of the contested pair, naming the other.
10157
+ */
10158
+ Contested: {
10159
+ /** @description The competing detection's confidence. */
10160
+ competing_confidence: components["schemas"]["Confidence"];
10161
+ /** @description The label of the competing detection. */
10162
+ competing_label: components["schemas"]["LabelRef"];
10163
+ /** @description Name of the policy that flagged the contest. */
10164
+ flagged_by: string;
10165
+ };
10090
10166
  /**
10091
10167
  * @description [ISO 3166-1] country, identified by its code.
10092
10168
  *
@@ -10195,7 +10271,7 @@ interface components {
10195
10271
  * Overrides the pipeline's `defaultScope` when present; absent falls back to
10196
10272
  * the pipeline default.
10197
10273
  */
10198
- scope?: components["schemas"]["ScopeParams"];
10274
+ scope?: components["schemas"]["DocumentContext"];
10199
10275
  };
10200
10276
  /**
10201
10277
  * @description Request payload for creating a new workspace policy.
@@ -10329,6 +10405,11 @@ interface components {
10329
10405
  */
10330
10406
  to?: string;
10331
10407
  };
10408
+ /** @description Several detections were fused into one entity. */
10409
+ Deduplication: {
10410
+ /** @description Name of the fusion strategy that combined them. */
10411
+ strategy: string;
10412
+ };
10332
10413
  /**
10333
10414
  * @description Pixel dimensions of an image or any 2-D canvas.
10334
10415
  *
@@ -10352,6 +10433,36 @@ interface components {
10352
10433
  */
10353
10434
  width: number;
10354
10435
  };
10436
+ /**
10437
+ * @description What a caller asserts about the document being processed.
10438
+ *
10439
+ * Everything defaults to empty, so a caller asserting nothing
10440
+ * passes [`DocumentContext::default`] and lets the recognizers use
10441
+ * their own defaults.
10442
+ */
10443
+ DocumentContext: {
10444
+ /**
10445
+ * @description Jurisdictions the caller asserts apply.
10446
+ *
10447
+ * Read by policy predicates that vary by jurisdiction, so a
10448
+ * rule can act on a document from one country and not another.
10449
+ */
10450
+ countries?: components["schemas"]["CountryCode"][];
10451
+ /**
10452
+ * @description Languages the caller asserts the document is in.
10453
+ *
10454
+ * Recognizers that take a language hint use it; the
10455
+ * language-detection enricher fills the gap when this is
10456
+ * empty.
10457
+ * @default []
10458
+ */
10459
+ languages?: components["schemas"]["Languages"];
10460
+ /**
10461
+ * @description Free-form request context: document tags, request purpose,
10462
+ * output audience. See elide's [`ScopeMetadata`].
10463
+ */
10464
+ metadata?: components["schemas"]["ScopeMetadata"];
10465
+ };
10355
10466
  /**
10356
10467
  * Format: uint16
10357
10468
  * @description Dots-per-inch resolution for rasterizing vector content.
@@ -10365,6 +10476,21 @@ interface components {
10365
10476
  * [`scale_factor`]: Self::scale_factor
10366
10477
  */
10367
10478
  Dpi: number;
10479
+ /**
10480
+ * @description Reviewer edits for one document, one list per modality.
10481
+ *
10482
+ * Empty by default: an audit nobody has reviewed carries none.
10483
+ */
10484
+ EditSet: {
10485
+ /** @description Edits to audio entities. */
10486
+ audio?: components["schemas"]["AudioEdit"][];
10487
+ /** @description Edits to image entities. */
10488
+ image?: components["schemas"]["ImageEdit"][];
10489
+ /** @description Edits to tabular entities. */
10490
+ tabular?: components["schemas"]["TabularEdit"][];
10491
+ /** @description Edits to text entities. */
10492
+ text?: components["schemas"]["TextEdit"][];
10493
+ };
10368
10494
  /**
10369
10495
  * @description Coreference identifier shared by entities that denote the same
10370
10496
  * real-world thing.
@@ -10380,36 +10506,6 @@ interface components {
10380
10506
  * mentions, not a global key.
10381
10507
  */
10382
10508
  EntityCoRef: string;
10383
- /**
10384
- * @description A modality-tagged group of recognised entities.
10385
- *
10386
- * The unit [`Audit`] stores in `body` and in every `parts`
10387
- * entry.
10388
- *
10389
- * Tagged by `modality` (snake_case) so deserialization picks the
10390
- * right variant and the entity vec inside is statically typed
10391
- * per modality: apply-time we hand each variant back to elide
10392
- * as a `Vec<Entity<M>>` for the appropriate `M`.
10393
- *
10394
- * [`Audit`]: crate::Audit
10395
- */
10396
- EntityGroup: {
10397
- entities: components["schemas"]["TextEntityRecord"][];
10398
- /** @constant */
10399
- modality: "text";
10400
- } | {
10401
- entities: components["schemas"]["TabularEntityRecord"][];
10402
- /** @constant */
10403
- modality: "tabular";
10404
- } | {
10405
- entities: components["schemas"]["ImageEntityRecord"][];
10406
- /** @constant */
10407
- modality: "image";
10408
- } | {
10409
- entities: components["schemas"]["AudioEntityRecord"][];
10410
- /** @constant */
10411
- modality: "audio";
10412
- };
10413
10509
  /**
10414
10510
  * @description HTTP error response representation with security-conscious design.
10415
10511
  *
@@ -10527,6 +10623,16 @@ interface components {
10527
10623
  * @enum {string}
10528
10624
  */
10529
10625
  FormatToken: "csv" | "docx" | "htm" | "html" | "jpeg" | "jpg" | "json" | "log" | "pdf" | "png" | "rtf" | "tif" | "tiff" | "txt" | "wav" | "xlsx" | "xml";
10626
+ /**
10627
+ * @description A [`Freeform`](Attribution::Freeform) rationale: a policy label and an
10628
+ * optional human description, with no formal citation.
10629
+ */
10630
+ FreeformAttribution: {
10631
+ /** @description Human-readable description (e.g. `"right to erasure"`), when given. */
10632
+ description?: string;
10633
+ /** @description The policy's name (e.g. `"gdpr-art-17"`, `"hipaa-safe-harbor"`). */
10634
+ name: string;
10635
+ };
10530
10636
  /**
10531
10637
  * @description Typed credentials for Google Cloud Storage.
10532
10638
  *
@@ -10657,6 +10763,28 @@ interface components {
10657
10763
  * as de-identified.
10658
10764
  */
10659
10765
  HipaaDeidMethod: "safe_harbor" | "limited_data_set" | "expert_determination";
10766
+ /**
10767
+ * @description A detection recognition missed.
10768
+ *
10769
+ * Recorded on the report with human provenance, so it is never
10770
+ * mistaken for an automatic hit, then redacted under the policy set
10771
+ * like any other entity: an added label the policy does not cover
10772
+ * is left alone.
10773
+ *
10774
+ * Carries no entity id — the entity does not exist yet, and the
10775
+ * engine mints one when the edit is applied, so a client cannot
10776
+ * collide with a real detection or shadow an existing entity.
10777
+ */
10778
+ ImageAdd: {
10779
+ /** @description Who made it, when the caller said. */
10780
+ actor?: string;
10781
+ /** @description What the reviewer says this is. */
10782
+ label: components["schemas"]["LabelRef"];
10783
+ /** @description Where it sits in the document. */
10784
+ location: components["schemas"]["ImageLocation"];
10785
+ /** @description The rationale, when one was given. */
10786
+ reason?: string;
10787
+ };
10660
10788
  /**
10661
10789
  * @description One node in an entity's audit DAG: a thing that happened, with its
10662
10790
  * effect on confidence and its tamper-evident links.
@@ -10732,115 +10860,70 @@ interface components {
10732
10860
  * @description Kind of an [`AuditEvent`], carrying its event-specific detail and the
10733
10861
  * rationale for why it happened.
10734
10862
  *
10735
- * `#[non_exhaustive]`: new event kinds (verification, annotation, …)
10736
- * can be added compatibly. The recognition kinds ([`Pattern`],
10737
- * [`Model`]) carry the matched [`Location`]; the rest carry their own
10738
- * data.
10739
- *
10863
+ * A thin tagged union: each variant wraps one payload struct (e.g.
10864
+ * [`Redaction`], [`Selection`], [`Manual`]) that owns that kind's fields, its
10865
+ * docs, and how it folds into the audit hash. Match on a variant to reach its
10866
+ * payload:
10867
+ *
10868
+ * ```
10869
+ * # use elide_core::entity::audit::AuditKind;
10870
+ * # use elide_core::modality::text::Text;
10871
+ * # fn show(kind: &AuditKind<Text>) {
10872
+ * if let AuditKind::Redaction(redaction) = kind {
10873
+ * let _ = &redaction.operator;
10874
+ * }
10875
+ * # }
10876
+ * ```
10877
+ *
10878
+ * `#[non_exhaustive]`: new event kinds (verification, annotation, …) can be
10879
+ * added compatibly. The recognition kinds ([`Pattern`], [`Model`]) carry the
10880
+ * matched [`Location`]; the rest carry their own data.
10881
+ *
10882
+ * [`AuditEvent`]: super::AuditEvent
10740
10883
  * [`Pattern`]: AuditKind::Pattern
10741
10884
  * [`Model`]: AuditKind::Model
10742
10885
  * [`Location`]: Modality::Location
10743
10886
  */
10744
10887
  ImageAuditKind: {
10888
+ detail: components["schemas"]["ImagePattern"];
10745
10889
  /** @constant */
10746
10890
  kind: "pattern";
10747
- /** @description Where the recognizer matched. */
10748
- location: components["schemas"]["ImageLocation"];
10749
- /** @description Pattern detail. */
10750
- pattern: components["schemas"]["PatternEvent"];
10751
10891
  } | {
10892
+ detail: components["schemas"]["ImageModel"];
10752
10893
  /** @constant */
10753
10894
  kind: "model";
10754
- /** @description Where the recognizer matched. */
10755
- location: components["schemas"]["ImageLocation"];
10756
- /** @description Model detail. */
10757
- model: components["schemas"]["ModelEvent"];
10758
10895
  } | {
10896
+ detail: components["schemas"]["Deduplication"];
10759
10897
  /** @constant */
10760
10898
  kind: "deduplication";
10761
- /** @description Name of the fusion strategy that combined them. */
10762
- strategy: string;
10763
10899
  } | {
10764
- /** @description The loser's confidence at resolution time. */
10765
- competing_confidence: components["schemas"]["Confidence"];
10766
- /** @description The label of the detection that lost arbitration. */
10767
- competing_label: components["schemas"]["LabelRef"];
10900
+ detail: components["schemas"]["Conflict"];
10768
10901
  /** @constant */
10769
10902
  kind: "conflict";
10770
- /** @description Name of the conflict policy that chose the winner. */
10771
- resolved_by: string;
10772
10903
  } | {
10773
- /** @description The competing detection's confidence. */
10774
- competing_confidence: components["schemas"]["Confidence"];
10775
- /** @description The label of the competing detection. */
10776
- competing_label: components["schemas"]["LabelRef"];
10777
- /** @description Name of the policy that flagged the contest. */
10778
- flagged_by: string;
10904
+ detail: components["schemas"]["Contested"];
10779
10905
  /** @constant */
10780
10906
  kind: "contested";
10781
10907
  } | {
10782
- /**
10783
- * Format: double
10784
- * @description Multiplier applied.
10785
- */
10786
- factor: number;
10908
+ detail: components["schemas"]["Calibration"];
10787
10909
  /** @constant */
10788
10910
  kind: "calibration";
10789
10911
  } | {
10790
- /**
10791
- * @description The located [`Hint`] the keyword fired from, when the match came
10792
- * from an out-of-band hint (a column header, a key) rather than
10793
- * the in-text word window. `None` for an in-text-window match.
10794
- *
10795
- * [`Hint`]: crate::modality::Hint
10796
- */
10797
- hint?: components["schemas"]["ImageHint"];
10798
- /** @description Keyword that fired the boost. */
10799
- keyword: string;
10912
+ detail: components["schemas"]["ImageRefinement"];
10800
10913
  /** @constant */
10801
10914
  kind: "refinement";
10802
- /**
10803
- * @description Where the boosting keyword sits in the medium. For a hint match
10804
- * this mirrors the hint's own location; for an in-text-window match
10805
- * it is the keyword resolved through the modality's [`locate`] (a
10806
- * pixel box for image, a time span for audio, the byte range for
10807
- * text/tabular). `None` when the keyword's stream range could not be
10808
- * placed, symmetric with a match the recognizer itself drops.
10809
- *
10810
- * [`locate`]: crate::modality::TextRecognizable::locate
10811
- */
10812
- location?: components["schemas"]["ImageLocation"];
10813
10915
  } | {
10814
- /**
10815
- * @description The author-supplied policy rationale, when the operator carried an
10816
- * [`Attribution`]; `None` otherwise.
10817
- */
10818
- attribution?: components["schemas"]["Attribution"];
10819
- /** @description Identifier of the key needed to reverse it, if reversible. */
10820
- key_id?: string;
10916
+ detail: components["schemas"]["Redaction"];
10821
10917
  /** @constant */
10822
10918
  kind: "redaction";
10823
- /** @description How much the output leaks about the original. */
10824
- leak_profile: components["schemas"]["LeakProfile"];
10825
- /**
10826
- * @description Which selection rule chose this operator: the automatic "why"
10827
- * (matched a label, a tag, a predicate, or the fallback).
10828
- */
10829
- matched_by: components["schemas"]["RuleMatch"];
10830
- /** @description Which operator (name + version) ran. */
10831
- operator: components["schemas"]["OperatorId"];
10832
- /**
10833
- * @description BLAKE3 digest of the original text the operator hid, when the
10834
- * redaction layer recorded it. Proves *what* was redacted without
10835
- * storing the plaintext; `None` when the operator did not capture it.
10836
- */
10837
- span_hash?: components["schemas"]["AuditHash"];
10838
- /**
10839
- * Format: uint32
10840
- * @description Byte length of the original text the operator hid, paired with
10841
- * [`span_hash`](Self::Redaction::span_hash). `None` when not captured.
10842
- */
10843
- span_length?: number;
10919
+ } | {
10920
+ detail: components["schemas"]["Selection"];
10921
+ /** @constant */
10922
+ kind: "selection";
10923
+ } | {
10924
+ detail: components["schemas"]["ImageManual"];
10925
+ /** @constant */
10926
+ kind: "manual";
10844
10927
  };
10845
10928
  /**
10846
10929
  * @description Full audit trail of an [`Entity`]: every [`AuditEvent`] in its life, as a
@@ -10895,6 +10978,26 @@ interface components {
10895
10978
  /** @description Original filename, when known. */
10896
10979
  filename?: string;
10897
10980
  };
10981
+ /**
10982
+ * @description One change to an analyzed document.
10983
+ *
10984
+ * `Add` carries no id because the entity does not exist yet; the
10985
+ * engine mints one when the edit is applied, so a client cannot
10986
+ * collide with a real detection or shadow an existing entity.
10987
+ */
10988
+ ImageEdit: ({
10989
+ /** @constant */
10990
+ op: "add";
10991
+ } & components["schemas"]["ImageAdd"]) | ({
10992
+ /** @constant */
10993
+ op: "retag";
10994
+ } & components["schemas"]["ImageRetag"]) | ({
10995
+ /** @constant */
10996
+ op: "suppress";
10997
+ } & components["schemas"]["Suppress"]) | ({
10998
+ /** @constant */
10999
+ op: "redact";
11000
+ } & components["schemas"]["ImageRedact"]);
10898
11001
  /**
10899
11002
  * @description Detected piece of sensitive information within some medium.
10900
11003
  *
@@ -10923,7 +11026,12 @@ interface components {
10923
11026
  ImageEntity: {
10924
11027
  /**
10925
11028
  * @description Tamper-evident audit trail: every contributing detection, the fusion
10926
- * event if any, and the redaction that hid it, as a hash-linked DAG.
11029
+ * event if any, and the redaction that hid it, as a hash-linked DAG. It is
11030
+ * also the single source of truth for whether a reviewer
11031
+ * [suppressed](Self::is_suppressed) the entity — a suppression is a
11032
+ * [`Manual`] event on this trail, not a separate flag.
11033
+ *
11034
+ * [`Manual`]: crate::entity::audit::AuditKind::Manual
10927
11035
  */
10928
11036
  audit: components["schemas"]["ImageAuditLog"];
10929
11037
  /** @description Effective confidence in `0.0..=1.0` (fused, if applicable). */
@@ -10968,30 +11076,6 @@ interface components {
10968
11076
  */
10969
11077
  recognized_range?: components["schemas"]["Range_of_uint"];
10970
11078
  };
10971
- /**
10972
- * @description One recognized entity plus the optional reviewer override.
10973
- *
10974
- * The bound mirrors elide's [`Entity<M>`]: serialization needs
10975
- * `M::Location` and `M::Data` (de)serializable, and JsonSchema
10976
- * derivation needs them schema-able. All four modalities elide
10977
- * ships satisfy these under the `serde` + `schema` features.
10978
- */
10979
- ImageEntityRecord: {
10980
- /** @description The elide entity, as recognition produced it. */
10981
- entity: components["schemas"]["ImageEntity"];
10982
- /**
10983
- * @description Reviewer-supplied redaction override.
10984
- *
10985
- * `None` means "use the matching policy rule's decision";
10986
- * `Some(...)` overrides that rule for this specific entity
10987
- * at apply time. Reviewer overrides take precedence over
10988
- * every policy rule and inherit the authority of the
10989
- * [`Review::policy_id`] they name: the audit event's
10990
- * attribution stamps that policy so the trail names the
10991
- * authority under which the override fired.
10992
- */
10993
- review?: components["schemas"]["Review"];
10994
- };
10995
11079
  /**
10996
11080
  * @description Located, typed piece of context a recognizer may treat as in-context
10997
11081
  * for a nearby value.
@@ -11037,6 +11121,85 @@ interface components {
11037
11121
  */
11038
11122
  polygon?: components["schemas"]["Polygon"];
11039
11123
  };
11124
+ /**
11125
+ * @description A human override, outside automatic detection: an entity a reviewer added by
11126
+ * hand, or a detected one they marked to ignore. Its provenance is a person's
11127
+ * decision, not a recognizer's — so the trail records *why* (an
11128
+ * [`Attribution`], when supplied). *Who* made the override is the event's
11129
+ * [`source`], not a payload field.
11130
+ *
11131
+ * [`source`]: super::AuditEvent::source
11132
+ */
11133
+ ImageManual: {
11134
+ /**
11135
+ * @description The reviewer's rationale, when supplied (e.g. a freeform
11136
+ * `"false positive"`, or a cited authority). `None` for an unexplained
11137
+ * override.
11138
+ */
11139
+ attribution?: components["schemas"]["Attribution"];
11140
+ /**
11141
+ * @description Which human decision this records: including a missed entity, or
11142
+ * suppressing a detected one. This is the authority on whether the entity
11143
+ * is redacted — [`AuditLog::is_suppressed`] reads it, so there is no
11144
+ * separate flag to keep in sync.
11145
+ *
11146
+ * [`AuditLog::is_suppressed`]: crate::entity::audit::AuditLog::is_suppressed
11147
+ */
11148
+ intent: components["schemas"]["ManualIntent"];
11149
+ /** @description Where the override applies, in modality-native coordinates. */
11150
+ location: components["schemas"]["ImageLocation"];
11151
+ };
11152
+ /**
11153
+ * @description Detail of a model/NER recognition: a model matched at `location`, with its
11154
+ * metadata in `model`.
11155
+ */
11156
+ ImageModel: {
11157
+ /** @description Where the recognizer matched. */
11158
+ location: components["schemas"]["ImageLocation"];
11159
+ /** @description Model metadata (name, version, contextual flag). */
11160
+ model: components["schemas"]["ModelEvent"];
11161
+ };
11162
+ /**
11163
+ * @description Detail of a pattern/dictionary recognition: a recognizer matched at
11164
+ * `location`, with the pattern metadata in `pattern`.
11165
+ */
11166
+ ImagePattern: {
11167
+ /** @description Where the recognizer matched. */
11168
+ location: components["schemas"]["ImageLocation"];
11169
+ /** @description Pattern metadata (name, regex, validator, contextual flag). */
11170
+ pattern: components["schemas"]["PatternEvent"];
11171
+ };
11172
+ /**
11173
+ * @description Redact this entity with `action` instead of the operator the
11174
+ * policy picked.
11175
+ */
11176
+ ImageRedact: {
11177
+ /**
11178
+ * @description The operator to run, typed to the entity's own modality so a
11179
+ * text entity cannot be given an image operator.
11180
+ */
11181
+ action: components["schemas"]["ImageRedaction"];
11182
+ /** @description Who made it, when the caller said. */
11183
+ actor?: string;
11184
+ /**
11185
+ * Format: uuid
11186
+ * @description The entity to redact.
11187
+ */
11188
+ id: string;
11189
+ /**
11190
+ * Format: uuid
11191
+ * @description The policy whose authority the reviewer exercises. Must match
11192
+ * a submitted policy's `id`.
11193
+ *
11194
+ * Not only for audit: it picks which per-policy pseudonym vault
11195
+ * and `KeyProvider` the operator resolves against, so an
11196
+ * override using `Pseudonymize` or `HmacHash` stays consistent
11197
+ * with that policy's other rules.
11198
+ */
11199
+ policyId: string;
11200
+ /** @description The rationale, when one was given. */
11201
+ reason?: string;
11202
+ };
11040
11203
  /** @description Operator spec a `redact` image rule carries. */
11041
11204
  ImageRedaction: {
11042
11205
  /** @constant */
@@ -11077,6 +11240,55 @@ interface components {
11077
11240
  /** @constant */
11078
11241
  kind: "blackbox";
11079
11242
  };
11243
+ /** @description A context keyword near the entity lifted its confidence. */
11244
+ ImageRefinement: {
11245
+ /**
11246
+ * @description The located [`Hint`] the keyword fired from, when the match came from an
11247
+ * out-of-band hint (a column header, a key) rather than the in-text word
11248
+ * window. `None` for an in-text-window match.
11249
+ *
11250
+ * [`Hint`]: crate::modality::Hint
11251
+ */
11252
+ hint?: components["schemas"]["ImageHint"];
11253
+ /** @description Keyword that fired the boost. */
11254
+ keyword: string;
11255
+ /**
11256
+ * @description Where the boosting keyword sits in the medium. For a hint match this
11257
+ * mirrors the hint's own location; for an in-text-window match it is the
11258
+ * keyword resolved through the modality's [`locate`]. `None` when the
11259
+ * keyword's stream range could not be placed.
11260
+ *
11261
+ * [`locate`]: crate::modality::TextRecognizable::locate
11262
+ */
11263
+ location?: components["schemas"]["ImageLocation"];
11264
+ };
11265
+ /**
11266
+ * @description Correct what an existing detection *is* or *covers*, then redact
11267
+ * it under the policy set as corrected.
11268
+ *
11269
+ * A reviewer fixing recognition's mistake rather than overriding
11270
+ * its consequence. Retagging into a label the policy does not cover
11271
+ * leaves the entity alone, exactly as if it had been detected that
11272
+ * way — which is why it is auditable rather than a mutable field.
11273
+ */
11274
+ ImageRetag: {
11275
+ /** @description Who made it, when the caller said. */
11276
+ actor?: string;
11277
+ /**
11278
+ * Format: uuid
11279
+ * @description The entity being corrected.
11280
+ */
11281
+ id: string;
11282
+ /** @description The corrected label, when recognition got it wrong. */
11283
+ label?: components["schemas"]["LabelRef"];
11284
+ /**
11285
+ * @description The corrected location, when the span clipped the value or
11286
+ * ran past it.
11287
+ */
11288
+ location?: components["schemas"]["ImageLocation"];
11289
+ /** @description The rationale, when one was given. */
11290
+ reason?: string;
11291
+ };
11080
11292
  /**
11081
11293
  * @description Workspace invite with complete information.
11082
11294
  *
@@ -11354,7 +11566,7 @@ interface components {
11354
11566
  * categories), so this is where that mapping is recorded as
11355
11567
  * data rather than prose.
11356
11568
  */
11357
- attribution?: components["schemas"]["AttributionKind"];
11569
+ attribution?: components["schemas"]["Attribution"];
11358
11570
  /** @description Optional description for reviewers. */
11359
11571
  description?: string;
11360
11572
  /**
@@ -11563,6 +11775,12 @@ interface components {
11563
11775
  */
11564
11776
  rememberMe?: boolean;
11565
11777
  };
11778
+ /**
11779
+ * @description Which human decision a [`Manual`] event records — the reviewer actions on a
11780
+ * finding: [`Flag`](ManualIntent::Flag) a miss, [`Suppress`](ManualIntent::Suppress)
11781
+ * a false positive, or [`Amend`](ManualIntent::Amend) an existing finding.
11782
+ */
11783
+ ManualIntent: "flag" | "suppress" | "amend";
11566
11784
  /** @description Response type for a mark-all-read action. */
11567
11785
  MarkedReadStatus: {
11568
11786
  /**
@@ -11661,7 +11879,7 @@ interface components {
11661
11879
  * @enum {string}
11662
11880
  */
11663
11881
  ModalityToken: "audio" | "image" | "tabular" | "text";
11664
- /** @description Detail of a model/NER recognition. */
11882
+ /** @description Metadata of a model/NER recognition, carried by [`Model`]. */
11665
11883
  ModelEvent: {
11666
11884
  /** @description Whether contextual analysis adjusted the score for this match. */
11667
11885
  contextual: boolean;
@@ -11866,11 +12084,11 @@ interface components {
11866
12084
  /** @description The new password (will be hashed before storage). */
11867
12085
  newPassword: string;
11868
12086
  };
11869
- /** @description Detail of a pattern/dictionary recognition. */
12087
+ /** @description Metadata of a pattern/dictionary recognition, carried by [`Pattern`]. */
11870
12088
  PatternEvent: {
11871
12089
  /**
11872
- * @description Whether contextual analysis (keyword co-occurrence) adjusted the
11873
- * score for this match.
12090
+ * @description Whether contextual analysis (keyword co-occurrence) adjusted the score
12091
+ * for this match.
11874
12092
  */
11875
12093
  contextual: boolean;
11876
12094
  /** @description Name of the pattern that matched (e.g. `"ssn"`, `"email"`). */
@@ -11987,7 +12205,7 @@ interface components {
11987
12205
  * A document's own scope overrides this at detect time; absent here means
11988
12206
  * the document must assert its own.
11989
12207
  */
11990
- defaultScope?: components["schemas"]["ScopeParams"];
12208
+ defaultScope?: components["schemas"]["DocumentContext"];
11991
12209
  /**
11992
12210
  * @description Slugs of workspace policies applied at redaction.
11993
12211
  *
@@ -12305,11 +12523,11 @@ interface components {
12305
12523
  * @description Human-readable name. Display-only. Does not key anything.
12306
12524
  *
12307
12525
  * Names the policy in a redaction event's [`Attribution`]
12308
- * when a rule that fired carried no [`AttributionKind::Cited`]
12526
+ * when a rule that fired carried no [`Attribution::Cited`]
12309
12527
  * attribution to render.
12310
12528
  *
12311
12529
  * [`Attribution`]: elide_core::entity::audit::Attribution
12312
- * [`AttributionKind::Cited`]: elide_core::entity::audit::AttributionKind::Cited
12530
+ * [`Attribution::Cited`]: elide_core::entity::audit::Attribution::Cited
12313
12531
  */
12314
12532
  name: string;
12315
12533
  /** @description Ordered rules. First match wins within this policy. */
@@ -12391,26 +12609,29 @@ interface components {
12391
12609
  * @description Why this rule exists: the authority it answers to.
12392
12610
  *
12393
12611
  * The engine renders it into the redaction event's
12394
- * [`Attribution`], so a reviewer sees the provision rather
12395
- * than a bare UUID. `None` falls back to recording the
12396
- * policy and rule ids alone.
12612
+ * [`Attribution`] verbatim, so a reviewer sees the provision
12613
+ * the rule answers to. `None` falls back to a freeform
12614
+ * attribution under the enclosing policy's name and
12615
+ * description — the rule itself is not named in the trail.
12397
12616
  *
12398
12617
  * Optional so ad-hoc and hand-authored rules stay cheap to
12399
12618
  * write; the shipped templates set it on every rule.
12400
12619
  *
12401
12620
  * [`Attribution`]: elide_core::entity::audit::Attribution
12402
12621
  */
12403
- attribution?: components["schemas"]["AttributionKind"];
12622
+ attribution?: components["schemas"]["Attribution"];
12404
12623
  /** @description Optional description for reviewers. */
12405
12624
  description?: string;
12406
12625
  /**
12407
12626
  * Format: uuid
12408
- * @description Stable identifier. UUIDv7 recommended. Engine stamps it
12409
- * into the redaction event's [`Attribution::source_id`] so
12410
- * reviewers can trace which rule fired. Every attachment a
12411
- * [`RuleDispatch::Table`] expands into shares this UUID.
12627
+ * @description Stable identifier. UUIDv7 recommended. Every attachment a
12628
+ * [`RuleDispatch::Table`] expands into shares this UUID, so
12629
+ * one authored rule stays one rule however many labels it
12630
+ * dispatches over.
12412
12631
  *
12413
- * [`Attribution::source_id`]: elide_core::entity::audit::Attribution::source_id
12632
+ * Not carried onto the audit trail: a redaction event names
12633
+ * the [`attribution`](Self::attribution) the rule declared, or
12634
+ * its policy's, rather than the rule's own id.
12414
12635
  */
12415
12636
  id: string;
12416
12637
  /** @description Human-readable name. Display-only. */
@@ -12496,7 +12717,7 @@ interface components {
12496
12717
  *
12497
12718
  * Serialises as an internally-tagged object under `kind`,
12498
12719
  * matching the house pattern for option-bearing enums
12499
- * (`Predicate`, `TextRedaction`, `AnyRedaction`). A caller
12720
+ * (`Predicate`, `TextRedaction`). A caller
12500
12721
  * wire-picks a template as
12501
12722
  * `{"kind": "hipaa_safe_harbor"}` or, for variants with
12502
12723
  * operator options,
@@ -12696,6 +12917,40 @@ interface components {
12696
12917
  /** @description Recognizer's version at the time it ran. */
12697
12918
  version: string;
12698
12919
  };
12920
+ /** @description An operator hid the entity. */
12921
+ Redaction: {
12922
+ /**
12923
+ * @description The author-supplied policy rationale, when the operator carried an
12924
+ * [`Attribution`]; `None` otherwise.
12925
+ */
12926
+ attribution?: components["schemas"]["Attribution"];
12927
+ /** @description Identifier of the key needed to reverse it, if reversible. */
12928
+ key_id?: string;
12929
+ /**
12930
+ * @description How much the output leaks about the original, when the operator claimed a
12931
+ * profile; `None` when it made no claim.
12932
+ */
12933
+ leak_profile?: components["schemas"]["LeakProfile"];
12934
+ /**
12935
+ * @description Which selection rule chose this operator: the automatic "why" (matched a
12936
+ * label, a tag, a predicate, or the fallback).
12937
+ */
12938
+ matched_by: components["schemas"]["RuleMatch"];
12939
+ /** @description Which operator (name + version) ran. */
12940
+ operator: components["schemas"]["OperatorId"];
12941
+ /**
12942
+ * @description BLAKE3 digest of the original text the operator hid, when the redaction
12943
+ * layer recorded it. Proves *what* was redacted without storing the
12944
+ * plaintext; `None` when the operator did not capture it.
12945
+ */
12946
+ span_hash?: components["schemas"]["AuditHash"];
12947
+ /**
12948
+ * Format: uint32
12949
+ * @description Byte length of the original text the operator hid, paired with
12950
+ * [`span_hash`](Self::span_hash). `None` when not captured.
12951
+ */
12952
+ span_length?: number;
12953
+ };
12699
12954
  /**
12700
12955
  * @description Public view of one recognizer in the engine's NER or LLM
12701
12956
  * lineup.
@@ -12737,6 +12992,45 @@ interface components {
12737
12992
  /** @description Whether to accept or decline the invitation. */
12738
12993
  acceptInvite: boolean;
12739
12994
  };
12995
+ Report: {
12996
+ body: ({
12997
+ entities: components["schemas"]["TextEntity"][];
12998
+ /** @constant */
12999
+ modality: "text";
13000
+ } | {
13001
+ entities: components["schemas"]["ImageEntity"][];
13002
+ /** @constant */
13003
+ modality: "image";
13004
+ } | {
13005
+ entities: components["schemas"]["AudioEntity"][];
13006
+ /** @constant */
13007
+ modality: "audio";
13008
+ } | {
13009
+ entities: components["schemas"]["TabularEntity"][];
13010
+ /** @constant */
13011
+ modality: "tabular";
13012
+ }) | null;
13013
+ parts: {
13014
+ [key: string]: {
13015
+ entities: components["schemas"]["TextEntity"][];
13016
+ /** @constant */
13017
+ modality: "text";
13018
+ } | {
13019
+ entities: components["schemas"]["ImageEntity"][];
13020
+ /** @constant */
13021
+ modality: "image";
13022
+ } | {
13023
+ entities: components["schemas"]["AudioEntity"][];
13024
+ /** @constant */
13025
+ modality: "audio";
13026
+ } | {
13027
+ entities: components["schemas"]["TabularEntity"][];
13028
+ /** @constant */
13029
+ modality: "tabular";
13030
+ };
13031
+ };
13032
+ usage?: components["schemas"]["UsageReport"];
13033
+ };
12740
13034
  /**
12741
13035
  * @description How long a class of data is retained.
12742
13036
  *
@@ -12799,38 +13093,6 @@ interface components {
12799
13093
  */
12800
13094
  redactedDocuments?: components["schemas"]["Retention"];
12801
13095
  };
12802
- /**
12803
- * @description A reviewer-supplied redaction override with the policy
12804
- * authority it draws from.
12805
- *
12806
- * The `policy_id` isn't just for audit: it also picks which
12807
- * per-policy pseudonym vault and per-policy [`KeyProvider`] the
12808
- * override's operator resolves against, so an override using
12809
- * [`Pseudonymize`] or [`HmacHash`] stays consistent with the
12810
- * authoring policy's other rules.
12811
- *
12812
- * [`KeyProvider`]: elide::redaction::operators::KeyProvider
12813
- * [`Pseudonymize`]: elide::redaction::operators::Pseudonymize
12814
- * [`HmacHash`]: elide::redaction::operators::HmacHash
12815
- */
12816
- Review: {
12817
- /**
12818
- * @description The per-modality redaction operators to run for this
12819
- * entity. Overrides whatever the policy set would have
12820
- * picked for the same entity.
12821
- */
12822
- action: components["schemas"]["ModalityRedactions"];
12823
- /**
12824
- * Format: uuid
12825
- * @description The policy whose authority the reviewer exercises. Must
12826
- * match the `id` of a [`PolicyDefinition`] submitted with
12827
- * the anonymize request. The audit event stamps this UUID
12828
- * as the attribution `name`.
12829
- *
12830
- * [`PolicyDefinition`]: elide_governance::PolicyDefinition
12831
- */
12832
- policyId: string;
12833
- };
12834
13096
  /**
12835
13097
  * @description A serializable summary of *which selection rule* bound an operator to an
12836
13098
  * entity — the automatic "why" behind a redaction.
@@ -13071,39 +13333,28 @@ interface components {
13071
13333
  tags?: string[];
13072
13334
  };
13073
13335
  /**
13074
- * @description Caller-asserted scope for one request.
13075
- *
13076
- * A narrower wire projection of `elide::recognition::Scope`:
13077
- * `languages` and `countries` (typed, elide-native), plus
13078
- * elide's [`ScopeMetadata`] block for free-form classification
13079
- * strings (`tags`, `purpose`, `audience`). The engine assembles
13080
- * this plus a server-minted `correlation_id` and a policy-derived
13081
- * label catalog into the orchestrator's `Scope` at compile time.
13336
+ * @description An operator was *picked* to hide the entity — the redaction decision,
13337
+ * recorded before it is applied so it can be reviewed (and the entity edited)
13338
+ * first. The [`Redaction`] event that follows records the operator actually
13339
+ * run.
13082
13340
  */
13083
- ScopeParams: {
13341
+ Selection: {
13084
13342
  /**
13085
- * @description Caller-asserted jurisdictions.
13086
- *
13087
- * When non-empty, recognizers that carry per-rule country
13088
- * scopes skip rules that match none of them. An empty list
13089
- * means "any": rules that declare countries still run as a
13090
- * permissive fallback so callers who don't assert a
13091
- * jurisdiction don't lose detections.
13343
+ * @description The author-supplied policy rationale, when the matched rule carried an
13344
+ * [`Attribution`]; `None` otherwise.
13092
13345
  */
13093
- countries?: components["schemas"]["CountryCode"][];
13346
+ attribution?: components["schemas"]["Attribution"];
13094
13347
  /**
13095
- * @description Caller-asserted languages for the analysis.
13096
- *
13097
- * Empty means the caller asserted none, leaving detection
13098
- * (if a language enricher runs) to fill in.
13099
- * @default []
13348
+ * @description Which selection rule chose this operator: the automatic "why" (matched a
13349
+ * label, a tag, a predicate, or the fallback).
13100
13350
  */
13101
- languages?: components["schemas"]["Languages"];
13351
+ matched_by: components["schemas"]["RuleMatch"];
13102
13352
  /**
13103
- * @description Free-form request context: document tags, request purpose,
13104
- * output audience. See elide's [`ScopeMetadata`].
13353
+ * @description Identity (name + version) of the operator picked. Its *config* is not
13354
+ * recorded it lives in the policy that will run it, so apply re-resolves
13355
+ * the configured operator rather than reading it here.
13105
13356
  */
13106
- metadata?: components["schemas"]["ScopeMetadata"];
13357
+ operator: components["schemas"]["OperatorId"];
13107
13358
  };
13108
13359
  /** @description Request to send a message and stream the assistant's reply. */
13109
13360
  SendChatMessage: {
@@ -13247,6 +13498,24 @@ interface components {
13247
13498
  */
13248
13499
  totalBytes: number;
13249
13500
  };
13501
+ /**
13502
+ * @description Leave this entity alone: a reviewer calling it a false positive.
13503
+ *
13504
+ * It keeps its place and its provenance; the redaction pass skips
13505
+ * it. Recorded as a `Manual` event, so *who* decided and *why* is
13506
+ * auditable rather than the detection silently disappearing.
13507
+ */
13508
+ Suppress: {
13509
+ /** @description Who made it, when the caller said. */
13510
+ actor?: string;
13511
+ /**
13512
+ * Format: uuid
13513
+ * @description The entity to leave alone.
13514
+ */
13515
+ id: string;
13516
+ /** @description The rationale, when one was given. */
13517
+ reason?: string;
13518
+ };
13250
13519
  /**
13251
13520
  * @description Request payload to trigger a connection sync.
13252
13521
  *
@@ -13328,6 +13597,28 @@ interface components {
13328
13597
  * to track whether a run was manually triggered, scheduled, or triggered by a webhook.
13329
13598
  */
13330
13599
  SyncTriggerType: "manual" | "scheduled" | "webhook";
13600
+ /**
13601
+ * @description A detection recognition missed.
13602
+ *
13603
+ * Recorded on the report with human provenance, so it is never
13604
+ * mistaken for an automatic hit, then redacted under the policy set
13605
+ * like any other entity: an added label the policy does not cover
13606
+ * is left alone.
13607
+ *
13608
+ * Carries no entity id — the entity does not exist yet, and the
13609
+ * engine mints one when the edit is applied, so a client cannot
13610
+ * collide with a real detection or shadow an existing entity.
13611
+ */
13612
+ TabularAdd: {
13613
+ /** @description Who made it, when the caller said. */
13614
+ actor?: string;
13615
+ /** @description What the reviewer says this is. */
13616
+ label: components["schemas"]["LabelRef"];
13617
+ /** @description Where it sits in the document. */
13618
+ location: components["schemas"]["TabularLocation"];
13619
+ /** @description The rationale, when one was given. */
13620
+ reason?: string;
13621
+ };
13331
13622
  /**
13332
13623
  * @description One node in an entity's audit DAG: a thing that happened, with its
13333
13624
  * effect on confidence and its tamper-evident links.
@@ -13403,115 +13694,70 @@ interface components {
13403
13694
  * @description Kind of an [`AuditEvent`], carrying its event-specific detail and the
13404
13695
  * rationale for why it happened.
13405
13696
  *
13406
- * `#[non_exhaustive]`: new event kinds (verification, annotation, …)
13407
- * can be added compatibly. The recognition kinds ([`Pattern`],
13408
- * [`Model`]) carry the matched [`Location`]; the rest carry their own
13409
- * data.
13410
- *
13697
+ * A thin tagged union: each variant wraps one payload struct (e.g.
13698
+ * [`Redaction`], [`Selection`], [`Manual`]) that owns that kind's fields, its
13699
+ * docs, and how it folds into the audit hash. Match on a variant to reach its
13700
+ * payload:
13701
+ *
13702
+ * ```
13703
+ * # use elide_core::entity::audit::AuditKind;
13704
+ * # use elide_core::modality::text::Text;
13705
+ * # fn show(kind: &AuditKind<Text>) {
13706
+ * if let AuditKind::Redaction(redaction) = kind {
13707
+ * let _ = &redaction.operator;
13708
+ * }
13709
+ * # }
13710
+ * ```
13711
+ *
13712
+ * `#[non_exhaustive]`: new event kinds (verification, annotation, …) can be
13713
+ * added compatibly. The recognition kinds ([`Pattern`], [`Model`]) carry the
13714
+ * matched [`Location`]; the rest carry their own data.
13715
+ *
13716
+ * [`AuditEvent`]: super::AuditEvent
13411
13717
  * [`Pattern`]: AuditKind::Pattern
13412
13718
  * [`Model`]: AuditKind::Model
13413
13719
  * [`Location`]: Modality::Location
13414
13720
  */
13415
13721
  TabularAuditKind: {
13722
+ detail: components["schemas"]["TabularPattern"];
13416
13723
  /** @constant */
13417
13724
  kind: "pattern";
13418
- /** @description Where the recognizer matched. */
13419
- location: components["schemas"]["TabularLocation"];
13420
- /** @description Pattern detail. */
13421
- pattern: components["schemas"]["PatternEvent"];
13422
13725
  } | {
13726
+ detail: components["schemas"]["TabularModel"];
13423
13727
  /** @constant */
13424
13728
  kind: "model";
13425
- /** @description Where the recognizer matched. */
13426
- location: components["schemas"]["TabularLocation"];
13427
- /** @description Model detail. */
13428
- model: components["schemas"]["ModelEvent"];
13429
13729
  } | {
13730
+ detail: components["schemas"]["Deduplication"];
13430
13731
  /** @constant */
13431
13732
  kind: "deduplication";
13432
- /** @description Name of the fusion strategy that combined them. */
13433
- strategy: string;
13434
13733
  } | {
13435
- /** @description The loser's confidence at resolution time. */
13436
- competing_confidence: components["schemas"]["Confidence"];
13437
- /** @description The label of the detection that lost arbitration. */
13438
- competing_label: components["schemas"]["LabelRef"];
13734
+ detail: components["schemas"]["Conflict"];
13439
13735
  /** @constant */
13440
13736
  kind: "conflict";
13441
- /** @description Name of the conflict policy that chose the winner. */
13442
- resolved_by: string;
13443
13737
  } | {
13444
- /** @description The competing detection's confidence. */
13445
- competing_confidence: components["schemas"]["Confidence"];
13446
- /** @description The label of the competing detection. */
13447
- competing_label: components["schemas"]["LabelRef"];
13448
- /** @description Name of the policy that flagged the contest. */
13449
- flagged_by: string;
13738
+ detail: components["schemas"]["Contested"];
13450
13739
  /** @constant */
13451
13740
  kind: "contested";
13452
13741
  } | {
13453
- /**
13454
- * Format: double
13455
- * @description Multiplier applied.
13456
- */
13457
- factor: number;
13742
+ detail: components["schemas"]["Calibration"];
13458
13743
  /** @constant */
13459
13744
  kind: "calibration";
13460
13745
  } | {
13461
- /**
13462
- * @description The located [`Hint`] the keyword fired from, when the match came
13463
- * from an out-of-band hint (a column header, a key) rather than
13464
- * the in-text word window. `None` for an in-text-window match.
13465
- *
13466
- * [`Hint`]: crate::modality::Hint
13467
- */
13468
- hint?: components["schemas"]["TabularHint"];
13469
- /** @description Keyword that fired the boost. */
13470
- keyword: string;
13471
- /** @constant */
13472
- kind: "refinement";
13473
- /**
13474
- * @description Where the boosting keyword sits in the medium. For a hint match
13475
- * this mirrors the hint's own location; for an in-text-window match
13476
- * it is the keyword resolved through the modality's [`locate`] (a
13477
- * pixel box for image, a time span for audio, the byte range for
13478
- * text/tabular). `None` when the keyword's stream range could not be
13479
- * placed, symmetric with a match the recognizer itself drops.
13480
- *
13481
- * [`locate`]: crate::modality::TextRecognizable::locate
13482
- */
13483
- location?: components["schemas"]["TabularLocation"];
13484
- } | {
13485
- /**
13486
- * @description The author-supplied policy rationale, when the operator carried an
13487
- * [`Attribution`]; `None` otherwise.
13488
- */
13489
- attribution?: components["schemas"]["Attribution"];
13490
- /** @description Identifier of the key needed to reverse it, if reversible. */
13491
- key_id?: string;
13746
+ detail: components["schemas"]["TabularRefinement"];
13747
+ /** @constant */
13748
+ kind: "refinement";
13749
+ } | {
13750
+ detail: components["schemas"]["Redaction"];
13492
13751
  /** @constant */
13493
13752
  kind: "redaction";
13494
- /** @description How much the output leaks about the original. */
13495
- leak_profile: components["schemas"]["LeakProfile"];
13496
- /**
13497
- * @description Which selection rule chose this operator: the automatic "why"
13498
- * (matched a label, a tag, a predicate, or the fallback).
13499
- */
13500
- matched_by: components["schemas"]["RuleMatch"];
13501
- /** @description Which operator (name + version) ran. */
13502
- operator: components["schemas"]["OperatorId"];
13503
- /**
13504
- * @description BLAKE3 digest of the original text the operator hid, when the
13505
- * redaction layer recorded it. Proves *what* was redacted without
13506
- * storing the plaintext; `None` when the operator did not capture it.
13507
- */
13508
- span_hash?: components["schemas"]["AuditHash"];
13509
- /**
13510
- * Format: uint32
13511
- * @description Byte length of the original text the operator hid, paired with
13512
- * [`span_hash`](Self::Redaction::span_hash). `None` when not captured.
13513
- */
13514
- span_length?: number;
13753
+ } | {
13754
+ detail: components["schemas"]["Selection"];
13755
+ /** @constant */
13756
+ kind: "selection";
13757
+ } | {
13758
+ detail: components["schemas"]["TabularManual"];
13759
+ /** @constant */
13760
+ kind: "manual";
13515
13761
  };
13516
13762
  /**
13517
13763
  * @description Full audit trail of an [`Entity`]: every [`AuditEvent`] in its life, as a
@@ -13550,6 +13796,26 @@ interface components {
13550
13796
  * [`verify`]: Self::verify
13551
13797
  */
13552
13798
  TabularAuditLog: components["schemas"]["TabularAuditEvent"][];
13799
+ /**
13800
+ * @description One change to an analyzed document.
13801
+ *
13802
+ * `Add` carries no id because the entity does not exist yet; the
13803
+ * engine mints one when the edit is applied, so a client cannot
13804
+ * collide with a real detection or shadow an existing entity.
13805
+ */
13806
+ TabularEdit: ({
13807
+ /** @constant */
13808
+ op: "add";
13809
+ } & components["schemas"]["TabularAdd"]) | ({
13810
+ /** @constant */
13811
+ op: "retag";
13812
+ } & components["schemas"]["TabularRetag"]) | ({
13813
+ /** @constant */
13814
+ op: "suppress";
13815
+ } & components["schemas"]["Suppress"]) | ({
13816
+ /** @constant */
13817
+ op: "redact";
13818
+ } & components["schemas"]["TabularRedact"]);
13553
13819
  /**
13554
13820
  * @description Detected piece of sensitive information within some medium.
13555
13821
  *
@@ -13578,7 +13844,12 @@ interface components {
13578
13844
  TabularEntity: {
13579
13845
  /**
13580
13846
  * @description Tamper-evident audit trail: every contributing detection, the fusion
13581
- * event if any, and the redaction that hid it, as a hash-linked DAG.
13847
+ * event if any, and the redaction that hid it, as a hash-linked DAG. It is
13848
+ * also the single source of truth for whether a reviewer
13849
+ * [suppressed](Self::is_suppressed) the entity — a suppression is a
13850
+ * [`Manual`] event on this trail, not a separate flag.
13851
+ *
13852
+ * [`Manual`]: crate::entity::audit::AuditKind::Manual
13582
13853
  */
13583
13854
  audit: components["schemas"]["TabularAuditLog"];
13584
13855
  /** @description Effective confidence in `0.0..=1.0` (fused, if applicable). */
@@ -13623,30 +13894,6 @@ interface components {
13623
13894
  */
13624
13895
  recognized_range?: components["schemas"]["Range_of_uint"];
13625
13896
  };
13626
- /**
13627
- * @description One recognized entity plus the optional reviewer override.
13628
- *
13629
- * The bound mirrors elide's [`Entity<M>`]: serialization needs
13630
- * `M::Location` and `M::Data` (de)serializable, and JsonSchema
13631
- * derivation needs them schema-able. All four modalities elide
13632
- * ships satisfy these under the `serde` + `schema` features.
13633
- */
13634
- TabularEntityRecord: {
13635
- /** @description The elide entity, as recognition produced it. */
13636
- entity: components["schemas"]["TabularEntity"];
13637
- /**
13638
- * @description Reviewer-supplied redaction override.
13639
- *
13640
- * `None` means "use the matching policy rule's decision";
13641
- * `Some(...)` overrides that rule for this specific entity
13642
- * at apply time. Reviewer overrides take precedence over
13643
- * every policy rule and inherit the authority of the
13644
- * [`Review::policy_id`] they name: the audit event's
13645
- * attribution stamps that policy so the trail names the
13646
- * authority under which the override fired.
13647
- */
13648
- review?: components["schemas"]["Review"];
13649
- };
13650
13897
  /**
13651
13898
  * @description Located, typed piece of context a recognizer may treat as in-context
13652
13899
  * for a nearby value.
@@ -13717,6 +13964,85 @@ interface components {
13717
13964
  */
13718
13965
  start_offset?: number;
13719
13966
  };
13967
+ /**
13968
+ * @description A human override, outside automatic detection: an entity a reviewer added by
13969
+ * hand, or a detected one they marked to ignore. Its provenance is a person's
13970
+ * decision, not a recognizer's — so the trail records *why* (an
13971
+ * [`Attribution`], when supplied). *Who* made the override is the event's
13972
+ * [`source`], not a payload field.
13973
+ *
13974
+ * [`source`]: super::AuditEvent::source
13975
+ */
13976
+ TabularManual: {
13977
+ /**
13978
+ * @description The reviewer's rationale, when supplied (e.g. a freeform
13979
+ * `"false positive"`, or a cited authority). `None` for an unexplained
13980
+ * override.
13981
+ */
13982
+ attribution?: components["schemas"]["Attribution"];
13983
+ /**
13984
+ * @description Which human decision this records: including a missed entity, or
13985
+ * suppressing a detected one. This is the authority on whether the entity
13986
+ * is redacted — [`AuditLog::is_suppressed`] reads it, so there is no
13987
+ * separate flag to keep in sync.
13988
+ *
13989
+ * [`AuditLog::is_suppressed`]: crate::entity::audit::AuditLog::is_suppressed
13990
+ */
13991
+ intent: components["schemas"]["ManualIntent"];
13992
+ /** @description Where the override applies, in modality-native coordinates. */
13993
+ location: components["schemas"]["TabularLocation"];
13994
+ };
13995
+ /**
13996
+ * @description Detail of a model/NER recognition: a model matched at `location`, with its
13997
+ * metadata in `model`.
13998
+ */
13999
+ TabularModel: {
14000
+ /** @description Where the recognizer matched. */
14001
+ location: components["schemas"]["TabularLocation"];
14002
+ /** @description Model metadata (name, version, contextual flag). */
14003
+ model: components["schemas"]["ModelEvent"];
14004
+ };
14005
+ /**
14006
+ * @description Detail of a pattern/dictionary recognition: a recognizer matched at
14007
+ * `location`, with the pattern metadata in `pattern`.
14008
+ */
14009
+ TabularPattern: {
14010
+ /** @description Where the recognizer matched. */
14011
+ location: components["schemas"]["TabularLocation"];
14012
+ /** @description Pattern metadata (name, regex, validator, contextual flag). */
14013
+ pattern: components["schemas"]["PatternEvent"];
14014
+ };
14015
+ /**
14016
+ * @description Redact this entity with `action` instead of the operator the
14017
+ * policy picked.
14018
+ */
14019
+ TabularRedact: {
14020
+ /**
14021
+ * @description The operator to run, typed to the entity's own modality so a
14022
+ * text entity cannot be given an image operator.
14023
+ */
14024
+ action: components["schemas"]["TabularRedaction"];
14025
+ /** @description Who made it, when the caller said. */
14026
+ actor?: string;
14027
+ /**
14028
+ * Format: uuid
14029
+ * @description The entity to redact.
14030
+ */
14031
+ id: string;
14032
+ /**
14033
+ * Format: uuid
14034
+ * @description The policy whose authority the reviewer exercises. Must match
14035
+ * a submitted policy's `id`.
14036
+ *
14037
+ * Not only for audit: it picks which per-policy pseudonym vault
14038
+ * and `KeyProvider` the operator resolves against, so an
14039
+ * override using `Pseudonymize` or `HmacHash` stays consistent
14040
+ * with that policy's other rules.
14041
+ */
14042
+ policyId: string;
14043
+ /** @description The rationale, when one was given. */
14044
+ reason?: string;
14045
+ };
13720
14046
  /** @description Operator spec a `redact` tabular rule carries. */
13721
14047
  TabularRedaction: {
13722
14048
  /** @constant */
@@ -13734,6 +14060,55 @@ interface components {
13734
14060
  /** @constant */
13735
14061
  kind: "drop_column";
13736
14062
  };
14063
+ /** @description A context keyword near the entity lifted its confidence. */
14064
+ TabularRefinement: {
14065
+ /**
14066
+ * @description The located [`Hint`] the keyword fired from, when the match came from an
14067
+ * out-of-band hint (a column header, a key) rather than the in-text word
14068
+ * window. `None` for an in-text-window match.
14069
+ *
14070
+ * [`Hint`]: crate::modality::Hint
14071
+ */
14072
+ hint?: components["schemas"]["TabularHint"];
14073
+ /** @description Keyword that fired the boost. */
14074
+ keyword: string;
14075
+ /**
14076
+ * @description Where the boosting keyword sits in the medium. For a hint match this
14077
+ * mirrors the hint's own location; for an in-text-window match it is the
14078
+ * keyword resolved through the modality's [`locate`]. `None` when the
14079
+ * keyword's stream range could not be placed.
14080
+ *
14081
+ * [`locate`]: crate::modality::TextRecognizable::locate
14082
+ */
14083
+ location?: components["schemas"]["TabularLocation"];
14084
+ };
14085
+ /**
14086
+ * @description Correct what an existing detection *is* or *covers*, then redact
14087
+ * it under the policy set as corrected.
14088
+ *
14089
+ * A reviewer fixing recognition's mistake rather than overriding
14090
+ * its consequence. Retagging into a label the policy does not cover
14091
+ * leaves the entity alone, exactly as if it had been detected that
14092
+ * way — which is why it is auditable rather than a mutable field.
14093
+ */
14094
+ TabularRetag: {
14095
+ /** @description Who made it, when the caller said. */
14096
+ actor?: string;
14097
+ /**
14098
+ * Format: uuid
14099
+ * @description The entity being corrected.
14100
+ */
14101
+ id: string;
14102
+ /** @description The corrected label, when recognition got it wrong. */
14103
+ label?: components["schemas"]["LabelRef"];
14104
+ /**
14105
+ * @description The corrected location, when the span clipped the value or
14106
+ * ran past it.
14107
+ */
14108
+ location?: components["schemas"]["TabularLocation"];
14109
+ /** @description The rationale, when one was given. */
14110
+ reason?: string;
14111
+ };
13737
14112
  /**
13738
14113
  * @description The template a [`PolicyDefinition`] was built from.
13739
14114
  *
@@ -13826,6 +14201,28 @@ interface components {
13826
14201
  */
13827
14202
  payload?: unknown;
13828
14203
  };
14204
+ /**
14205
+ * @description A detection recognition missed.
14206
+ *
14207
+ * Recorded on the report with human provenance, so it is never
14208
+ * mistaken for an automatic hit, then redacted under the policy set
14209
+ * like any other entity: an added label the policy does not cover
14210
+ * is left alone.
14211
+ *
14212
+ * Carries no entity id — the entity does not exist yet, and the
14213
+ * engine mints one when the edit is applied, so a client cannot
14214
+ * collide with a real detection or shadow an existing entity.
14215
+ */
14216
+ TextAdd: {
14217
+ /** @description Who made it, when the caller said. */
14218
+ actor?: string;
14219
+ /** @description What the reviewer says this is. */
14220
+ label: components["schemas"]["LabelRef"];
14221
+ /** @description Where it sits in the document. */
14222
+ location: components["schemas"]["TextLocation"];
14223
+ /** @description The rationale, when one was given. */
14224
+ reason?: string;
14225
+ };
13829
14226
  /**
13830
14227
  * @description One node in an entity's audit DAG: a thing that happened, with its
13831
14228
  * effect on confidence and its tamper-evident links.
@@ -13901,115 +14298,70 @@ interface components {
13901
14298
  * @description Kind of an [`AuditEvent`], carrying its event-specific detail and the
13902
14299
  * rationale for why it happened.
13903
14300
  *
13904
- * `#[non_exhaustive]`: new event kinds (verification, annotation, …)
13905
- * can be added compatibly. The recognition kinds ([`Pattern`],
13906
- * [`Model`]) carry the matched [`Location`]; the rest carry their own
13907
- * data.
13908
- *
14301
+ * A thin tagged union: each variant wraps one payload struct (e.g.
14302
+ * [`Redaction`], [`Selection`], [`Manual`]) that owns that kind's fields, its
14303
+ * docs, and how it folds into the audit hash. Match on a variant to reach its
14304
+ * payload:
14305
+ *
14306
+ * ```
14307
+ * # use elide_core::entity::audit::AuditKind;
14308
+ * # use elide_core::modality::text::Text;
14309
+ * # fn show(kind: &AuditKind<Text>) {
14310
+ * if let AuditKind::Redaction(redaction) = kind {
14311
+ * let _ = &redaction.operator;
14312
+ * }
14313
+ * # }
14314
+ * ```
14315
+ *
14316
+ * `#[non_exhaustive]`: new event kinds (verification, annotation, …) can be
14317
+ * added compatibly. The recognition kinds ([`Pattern`], [`Model`]) carry the
14318
+ * matched [`Location`]; the rest carry their own data.
14319
+ *
14320
+ * [`AuditEvent`]: super::AuditEvent
13909
14321
  * [`Pattern`]: AuditKind::Pattern
13910
14322
  * [`Model`]: AuditKind::Model
13911
14323
  * [`Location`]: Modality::Location
13912
14324
  */
13913
14325
  TextAuditKind: {
14326
+ detail: components["schemas"]["TextPattern"];
13914
14327
  /** @constant */
13915
14328
  kind: "pattern";
13916
- /** @description Where the recognizer matched. */
13917
- location: components["schemas"]["TextLocation"];
13918
- /** @description Pattern detail. */
13919
- pattern: components["schemas"]["PatternEvent"];
13920
14329
  } | {
14330
+ detail: components["schemas"]["TextModel"];
13921
14331
  /** @constant */
13922
14332
  kind: "model";
13923
- /** @description Where the recognizer matched. */
13924
- location: components["schemas"]["TextLocation"];
13925
- /** @description Model detail. */
13926
- model: components["schemas"]["ModelEvent"];
13927
14333
  } | {
14334
+ detail: components["schemas"]["Deduplication"];
13928
14335
  /** @constant */
13929
14336
  kind: "deduplication";
13930
- /** @description Name of the fusion strategy that combined them. */
13931
- strategy: string;
13932
14337
  } | {
13933
- /** @description The loser's confidence at resolution time. */
13934
- competing_confidence: components["schemas"]["Confidence"];
13935
- /** @description The label of the detection that lost arbitration. */
13936
- competing_label: components["schemas"]["LabelRef"];
14338
+ detail: components["schemas"]["Conflict"];
13937
14339
  /** @constant */
13938
14340
  kind: "conflict";
13939
- /** @description Name of the conflict policy that chose the winner. */
13940
- resolved_by: string;
13941
14341
  } | {
13942
- /** @description The competing detection's confidence. */
13943
- competing_confidence: components["schemas"]["Confidence"];
13944
- /** @description The label of the competing detection. */
13945
- competing_label: components["schemas"]["LabelRef"];
13946
- /** @description Name of the policy that flagged the contest. */
13947
- flagged_by: string;
14342
+ detail: components["schemas"]["Contested"];
13948
14343
  /** @constant */
13949
14344
  kind: "contested";
13950
14345
  } | {
13951
- /**
13952
- * Format: double
13953
- * @description Multiplier applied.
13954
- */
13955
- factor: number;
14346
+ detail: components["schemas"]["Calibration"];
13956
14347
  /** @constant */
13957
14348
  kind: "calibration";
13958
14349
  } | {
13959
- /**
13960
- * @description The located [`Hint`] the keyword fired from, when the match came
13961
- * from an out-of-band hint (a column header, a key) rather than
13962
- * the in-text word window. `None` for an in-text-window match.
13963
- *
13964
- * [`Hint`]: crate::modality::Hint
13965
- */
13966
- hint?: components["schemas"]["TextHint"];
13967
- /** @description Keyword that fired the boost. */
13968
- keyword: string;
14350
+ detail: components["schemas"]["TextRefinement"];
13969
14351
  /** @constant */
13970
14352
  kind: "refinement";
13971
- /**
13972
- * @description Where the boosting keyword sits in the medium. For a hint match
13973
- * this mirrors the hint's own location; for an in-text-window match
13974
- * it is the keyword resolved through the modality's [`locate`] (a
13975
- * pixel box for image, a time span for audio, the byte range for
13976
- * text/tabular). `None` when the keyword's stream range could not be
13977
- * placed, symmetric with a match the recognizer itself drops.
13978
- *
13979
- * [`locate`]: crate::modality::TextRecognizable::locate
13980
- */
13981
- location?: components["schemas"]["TextLocation"];
13982
14353
  } | {
13983
- /**
13984
- * @description The author-supplied policy rationale, when the operator carried an
13985
- * [`Attribution`]; `None` otherwise.
13986
- */
13987
- attribution?: components["schemas"]["Attribution"];
13988
- /** @description Identifier of the key needed to reverse it, if reversible. */
13989
- key_id?: string;
14354
+ detail: components["schemas"]["Redaction"];
13990
14355
  /** @constant */
13991
14356
  kind: "redaction";
13992
- /** @description How much the output leaks about the original. */
13993
- leak_profile: components["schemas"]["LeakProfile"];
13994
- /**
13995
- * @description Which selection rule chose this operator: the automatic "why"
13996
- * (matched a label, a tag, a predicate, or the fallback).
13997
- */
13998
- matched_by: components["schemas"]["RuleMatch"];
13999
- /** @description Which operator (name + version) ran. */
14000
- operator: components["schemas"]["OperatorId"];
14001
- /**
14002
- * @description BLAKE3 digest of the original text the operator hid, when the
14003
- * redaction layer recorded it. Proves *what* was redacted without
14004
- * storing the plaintext; `None` when the operator did not capture it.
14005
- */
14006
- span_hash?: components["schemas"]["AuditHash"];
14007
- /**
14008
- * Format: uint32
14009
- * @description Byte length of the original text the operator hid, paired with
14010
- * [`span_hash`](Self::Redaction::span_hash). `None` when not captured.
14011
- */
14012
- span_length?: number;
14357
+ } | {
14358
+ detail: components["schemas"]["Selection"];
14359
+ /** @constant */
14360
+ kind: "selection";
14361
+ } | {
14362
+ detail: components["schemas"]["TextManual"];
14363
+ /** @constant */
14364
+ kind: "manual";
14013
14365
  };
14014
14366
  /**
14015
14367
  * @description Full audit trail of an [`Entity`]: every [`AuditEvent`] in its life, as a
@@ -14059,6 +14411,26 @@ interface components {
14059
14411
  * several recognizers.
14060
14412
  */
14061
14413
  TextData: string;
14414
+ /**
14415
+ * @description One change to an analyzed document.
14416
+ *
14417
+ * `Add` carries no id because the entity does not exist yet; the
14418
+ * engine mints one when the edit is applied, so a client cannot
14419
+ * collide with a real detection or shadow an existing entity.
14420
+ */
14421
+ TextEdit: ({
14422
+ /** @constant */
14423
+ op: "add";
14424
+ } & components["schemas"]["TextAdd"]) | ({
14425
+ /** @constant */
14426
+ op: "retag";
14427
+ } & components["schemas"]["TextRetag"]) | ({
14428
+ /** @constant */
14429
+ op: "suppress";
14430
+ } & components["schemas"]["Suppress"]) | ({
14431
+ /** @constant */
14432
+ op: "redact";
14433
+ } & components["schemas"]["TextRedact"]);
14062
14434
  /**
14063
14435
  * @description Detected piece of sensitive information within some medium.
14064
14436
  *
@@ -14087,7 +14459,12 @@ interface components {
14087
14459
  TextEntity: {
14088
14460
  /**
14089
14461
  * @description Tamper-evident audit trail: every contributing detection, the fusion
14090
- * event if any, and the redaction that hid it, as a hash-linked DAG.
14462
+ * event if any, and the redaction that hid it, as a hash-linked DAG. It is
14463
+ * also the single source of truth for whether a reviewer
14464
+ * [suppressed](Self::is_suppressed) the entity — a suppression is a
14465
+ * [`Manual`] event on this trail, not a separate flag.
14466
+ *
14467
+ * [`Manual`]: crate::entity::audit::AuditKind::Manual
14091
14468
  */
14092
14469
  audit: components["schemas"]["TextAuditLog"];
14093
14470
  /** @description Effective confidence in `0.0..=1.0` (fused, if applicable). */
@@ -14132,30 +14509,6 @@ interface components {
14132
14509
  */
14133
14510
  recognized_range?: components["schemas"]["Range_of_uint"];
14134
14511
  };
14135
- /**
14136
- * @description One recognized entity plus the optional reviewer override.
14137
- *
14138
- * The bound mirrors elide's [`Entity<M>`]: serialization needs
14139
- * `M::Location` and `M::Data` (de)serializable, and JsonSchema
14140
- * derivation needs them schema-able. All four modalities elide
14141
- * ships satisfy these under the `serde` + `schema` features.
14142
- */
14143
- TextEntityRecord: {
14144
- /** @description The elide entity, as recognition produced it. */
14145
- entity: components["schemas"]["TextEntity"];
14146
- /**
14147
- * @description Reviewer-supplied redaction override.
14148
- *
14149
- * `None` means "use the matching policy rule's decision";
14150
- * `Some(...)` overrides that rule for this specific entity
14151
- * at apply time. Reviewer overrides take precedence over
14152
- * every policy rule and inherit the authority of the
14153
- * [`Review::policy_id`] they name: the audit event's
14154
- * attribution stamps that policy so the trail names the
14155
- * authority under which the override fired.
14156
- */
14157
- review?: components["schemas"]["Review"];
14158
- };
14159
14512
  /**
14160
14513
  * @description Located, typed piece of context a recognizer may treat as in-context
14161
14514
  * for a nearby value.
@@ -14205,6 +14558,85 @@ interface components {
14205
14558
  */
14206
14559
  source?: components["schemas"]["SourceRef"][];
14207
14560
  };
14561
+ /**
14562
+ * @description A human override, outside automatic detection: an entity a reviewer added by
14563
+ * hand, or a detected one they marked to ignore. Its provenance is a person's
14564
+ * decision, not a recognizer's — so the trail records *why* (an
14565
+ * [`Attribution`], when supplied). *Who* made the override is the event's
14566
+ * [`source`], not a payload field.
14567
+ *
14568
+ * [`source`]: super::AuditEvent::source
14569
+ */
14570
+ TextManual: {
14571
+ /**
14572
+ * @description The reviewer's rationale, when supplied (e.g. a freeform
14573
+ * `"false positive"`, or a cited authority). `None` for an unexplained
14574
+ * override.
14575
+ */
14576
+ attribution?: components["schemas"]["Attribution"];
14577
+ /**
14578
+ * @description Which human decision this records: including a missed entity, or
14579
+ * suppressing a detected one. This is the authority on whether the entity
14580
+ * is redacted — [`AuditLog::is_suppressed`] reads it, so there is no
14581
+ * separate flag to keep in sync.
14582
+ *
14583
+ * [`AuditLog::is_suppressed`]: crate::entity::audit::AuditLog::is_suppressed
14584
+ */
14585
+ intent: components["schemas"]["ManualIntent"];
14586
+ /** @description Where the override applies, in modality-native coordinates. */
14587
+ location: components["schemas"]["TextLocation"];
14588
+ };
14589
+ /**
14590
+ * @description Detail of a model/NER recognition: a model matched at `location`, with its
14591
+ * metadata in `model`.
14592
+ */
14593
+ TextModel: {
14594
+ /** @description Where the recognizer matched. */
14595
+ location: components["schemas"]["TextLocation"];
14596
+ /** @description Model metadata (name, version, contextual flag). */
14597
+ model: components["schemas"]["ModelEvent"];
14598
+ };
14599
+ /**
14600
+ * @description Detail of a pattern/dictionary recognition: a recognizer matched at
14601
+ * `location`, with the pattern metadata in `pattern`.
14602
+ */
14603
+ TextPattern: {
14604
+ /** @description Where the recognizer matched. */
14605
+ location: components["schemas"]["TextLocation"];
14606
+ /** @description Pattern metadata (name, regex, validator, contextual flag). */
14607
+ pattern: components["schemas"]["PatternEvent"];
14608
+ };
14609
+ /**
14610
+ * @description Redact this entity with `action` instead of the operator the
14611
+ * policy picked.
14612
+ */
14613
+ TextRedact: {
14614
+ /**
14615
+ * @description The operator to run, typed to the entity's own modality so a
14616
+ * text entity cannot be given an image operator.
14617
+ */
14618
+ action: components["schemas"]["TextRedaction"];
14619
+ /** @description Who made it, when the caller said. */
14620
+ actor?: string;
14621
+ /**
14622
+ * Format: uuid
14623
+ * @description The entity to redact.
14624
+ */
14625
+ id: string;
14626
+ /**
14627
+ * Format: uuid
14628
+ * @description The policy whose authority the reviewer exercises. Must match
14629
+ * a submitted policy's `id`.
14630
+ *
14631
+ * Not only for audit: it picks which per-policy pseudonym vault
14632
+ * and `KeyProvider` the operator resolves against, so an
14633
+ * override using `Pseudonymize` or `HmacHash` stays consistent
14634
+ * with that policy's other rules.
14635
+ */
14636
+ policyId: string;
14637
+ /** @description The rationale, when one was given. */
14638
+ reason?: string;
14639
+ };
14208
14640
  /** @description Operator spec a `redact` text rule carries. */
14209
14641
  TextRedaction: {
14210
14642
  /** @constant */
@@ -14351,6 +14783,55 @@ interface components {
14351
14783
  */
14352
14784
  style?: components["schemas"]["DateStyle"];
14353
14785
  };
14786
+ /** @description A context keyword near the entity lifted its confidence. */
14787
+ TextRefinement: {
14788
+ /**
14789
+ * @description The located [`Hint`] the keyword fired from, when the match came from an
14790
+ * out-of-band hint (a column header, a key) rather than the in-text word
14791
+ * window. `None` for an in-text-window match.
14792
+ *
14793
+ * [`Hint`]: crate::modality::Hint
14794
+ */
14795
+ hint?: components["schemas"]["TextHint"];
14796
+ /** @description Keyword that fired the boost. */
14797
+ keyword: string;
14798
+ /**
14799
+ * @description Where the boosting keyword sits in the medium. For a hint match this
14800
+ * mirrors the hint's own location; for an in-text-window match it is the
14801
+ * keyword resolved through the modality's [`locate`]. `None` when the
14802
+ * keyword's stream range could not be placed.
14803
+ *
14804
+ * [`locate`]: crate::modality::TextRecognizable::locate
14805
+ */
14806
+ location?: components["schemas"]["TextLocation"];
14807
+ };
14808
+ /**
14809
+ * @description Correct what an existing detection *is* or *covers*, then redact
14810
+ * it under the policy set as corrected.
14811
+ *
14812
+ * A reviewer fixing recognition's mistake rather than overriding
14813
+ * its consequence. Retagging into a label the policy does not cover
14814
+ * leaves the entity alone, exactly as if it had been detected that
14815
+ * way — which is why it is auditable rather than a mutable field.
14816
+ */
14817
+ TextRetag: {
14818
+ /** @description Who made it, when the caller said. */
14819
+ actor?: string;
14820
+ /**
14821
+ * Format: uuid
14822
+ * @description The entity being corrected.
14823
+ */
14824
+ id: string;
14825
+ /** @description The corrected label, when recognition got it wrong. */
14826
+ label?: components["schemas"]["LabelRef"];
14827
+ /**
14828
+ * @description The corrected location, when the span clipped the value or
14829
+ * ran past it.
14830
+ */
14831
+ location?: components["schemas"]["TextLocation"];
14832
+ /** @description The rationale, when one was given. */
14833
+ reason?: string;
14834
+ };
14354
14835
  /**
14355
14836
  * @description Half-open `[start, end)` stream interval, measured in microseconds.
14356
14837
  *
@@ -14985,8 +15466,8 @@ type Schemas$21 = components["schemas"];
14985
15466
  type Activity = Schemas$21["Activity"];
14986
15467
  type ActivityPage = Schemas$21["ActivityPage"];
14987
15468
  type ActivityType = Schemas$21["ActivityType"];
14988
- type ActivityListQuery = Schemas$21["ActivityListQuery"];
14989
- type ActivityExportQuery = Schemas$21["ActivityExportQuery"];
15469
+ type ActivityFilterQuery = Schemas$21["ActivityFilterQuery"];
15470
+ type ActivityExportOptions = Schemas$21["ActivityExportOptions"];
14990
15471
  type ActivityPayload = Schemas$21["ActivityPayload"];
14991
15472
  type WorkspaceActivityParams = Schemas$21["WorkspaceActivityParams"];
14992
15473
  type MemberActivityParams = Schemas$21["MemberActivityParams"];
@@ -15028,18 +15509,29 @@ type ApiTokenPage = Schemas$19["ApiTokenPage"];
15028
15509
  //#endregion
15029
15510
  //#region src/datatypes/audit.d.ts
15030
15511
  type Schemas$18 = components["schemas"];
15031
- type EntityGroup = Schemas$18["EntityGroup"];
15032
- type AuditContext = Schemas$18["AuditContext"];
15512
+ type Audit = Schemas$18["Audit"];
15513
+ type DocumentContext = Schemas$18["DocumentContext"];
15514
+ type CodecParams = Schemas$18["CodecParams"];
15033
15515
  type EntityCoRef = Schemas$18["EntityCoRef"];
15516
+ type Report = Schemas$18["Report"];
15517
+ type EditSet = Schemas$18["EditSet"];
15034
15518
  type RasterMode = Schemas$18["RasterMode"];
15035
15519
  type Dpi = Schemas$18["Dpi"];
15036
- type Review = Schemas$18["Review"];
15037
- type Attribution = Schemas$18["Attribution"];
15038
- type AttributionKind = Schemas$18["AttributionKind"];
15520
+ type Redaction = Schemas$18["Redaction"];
15521
+ type Selection = Schemas$18["Selection"];
15522
+ type Suppress = Schemas$18["Suppress"];
15523
+ type ManualIntent = Schemas$18["ManualIntent"];
15039
15524
  type LeakProfile = Schemas$18["LeakProfile"];
15040
15525
  type RuleMatch = Schemas$18["RuleMatch"];
15526
+ type Attribution = Schemas$18["Attribution"];
15527
+ type CitedAttribution = Schemas$18["CitedAttribution"];
15528
+ type FreeformAttribution = Schemas$18["FreeformAttribution"];
15041
15529
  type ModelEvent = Schemas$18["ModelEvent"];
15042
15530
  type PatternEvent = Schemas$18["PatternEvent"];
15531
+ type Conflict = Schemas$18["Conflict"];
15532
+ type Contested = Schemas$18["Contested"];
15533
+ type Deduplication = Schemas$18["Deduplication"];
15534
+ type Calibration = Schemas$18["Calibration"];
15043
15535
  type OperatorId = Schemas$18["OperatorId"];
15044
15536
  type AuditHash = Schemas$18["AuditHash"];
15045
15537
  type Category = Schemas$18["Category"];
@@ -15052,36 +15544,64 @@ type Polygon = Schemas$18["Polygon"];
15052
15544
  type Dimensions = Schemas$18["Dimensions"];
15053
15545
  type TimeSpan = Schemas$18["TimeSpan"];
15054
15546
  type TextEntity = Schemas$18["TextEntity"];
15055
- type TextEntityRecord = Schemas$18["TextEntityRecord"];
15056
15547
  type TextAuditEvent = Schemas$18["TextAuditEvent"];
15057
15548
  type TextAuditKind = Schemas$18["TextAuditKind"];
15549
+ type TextAuditLog = Schemas$18["TextAuditLog"];
15058
15550
  type TextHint = Schemas$18["TextHint"];
15059
15551
  type TextLocation = Schemas$18["TextLocation"];
15060
- type TextAuditLog = Schemas$18["TextAuditLog"];
15061
15552
  type TextData = Schemas$18["TextData"];
15553
+ type TextModel = Schemas$18["TextModel"];
15554
+ type TextPattern = Schemas$18["TextPattern"];
15555
+ type TextManual = Schemas$18["TextManual"];
15556
+ type TextEdit = Schemas$18["TextEdit"];
15557
+ type TextAdd = Schemas$18["TextAdd"];
15558
+ type TextRedact = Schemas$18["TextRedact"];
15559
+ type TextRefinement = Schemas$18["TextRefinement"];
15560
+ type TextRetag = Schemas$18["TextRetag"];
15062
15561
  type ImageEntity = Schemas$18["ImageEntity"];
15063
- type ImageEntityRecord = Schemas$18["ImageEntityRecord"];
15064
15562
  type ImageAuditEvent = Schemas$18["ImageAuditEvent"];
15065
15563
  type ImageAuditKind = Schemas$18["ImageAuditKind"];
15564
+ type ImageAuditLog = Schemas$18["ImageAuditLog"];
15066
15565
  type ImageHint = Schemas$18["ImageHint"];
15067
15566
  type ImageLocation = Schemas$18["ImageLocation"];
15068
- type ImageAuditLog = Schemas$18["ImageAuditLog"];
15069
15567
  type ImageData = Schemas$18["ImageData"];
15568
+ type ImageModel = Schemas$18["ImageModel"];
15569
+ type ImagePattern = Schemas$18["ImagePattern"];
15570
+ type ImageManual = Schemas$18["ImageManual"];
15571
+ type ImageEdit = Schemas$18["ImageEdit"];
15572
+ type ImageAdd = Schemas$18["ImageAdd"];
15573
+ type ImageRedact = Schemas$18["ImageRedact"];
15574
+ type ImageRefinement = Schemas$18["ImageRefinement"];
15575
+ type ImageRetag = Schemas$18["ImageRetag"];
15070
15576
  type AudioEntity = Schemas$18["AudioEntity"];
15071
- type AudioEntityRecord = Schemas$18["AudioEntityRecord"];
15072
15577
  type AudioAuditEvent = Schemas$18["AudioAuditEvent"];
15073
15578
  type AudioAuditKind = Schemas$18["AudioAuditKind"];
15579
+ type AudioAuditLog = Schemas$18["AudioAuditLog"];
15074
15580
  type AudioHint = Schemas$18["AudioHint"];
15075
15581
  type AudioLocation = Schemas$18["AudioLocation"];
15076
- type AudioAuditLog = Schemas$18["AudioAuditLog"];
15077
15582
  type AudioData = Schemas$18["AudioData"];
15583
+ type AudioModel = Schemas$18["AudioModel"];
15584
+ type AudioPattern = Schemas$18["AudioPattern"];
15585
+ type AudioManual = Schemas$18["AudioManual"];
15586
+ type AudioEdit = Schemas$18["AudioEdit"];
15587
+ type AudioAdd = Schemas$18["AudioAdd"];
15588
+ type AudioRedact = Schemas$18["AudioRedact"];
15589
+ type AudioRefinement = Schemas$18["AudioRefinement"];
15590
+ type AudioRetag = Schemas$18["AudioRetag"];
15078
15591
  type TabularEntity = Schemas$18["TabularEntity"];
15079
- type TabularEntityRecord = Schemas$18["TabularEntityRecord"];
15080
15592
  type TabularAuditEvent = Schemas$18["TabularAuditEvent"];
15081
15593
  type TabularAuditKind = Schemas$18["TabularAuditKind"];
15594
+ type TabularAuditLog = Schemas$18["TabularAuditLog"];
15082
15595
  type TabularHint = Schemas$18["TabularHint"];
15083
15596
  type TabularLocation = Schemas$18["TabularLocation"];
15084
- type TabularAuditLog = Schemas$18["TabularAuditLog"];
15597
+ type TabularModel = Schemas$18["TabularModel"];
15598
+ type TabularPattern = Schemas$18["TabularPattern"];
15599
+ type TabularManual = Schemas$18["TabularManual"];
15600
+ type TabularEdit = Schemas$18["TabularEdit"];
15601
+ type TabularAdd = Schemas$18["TabularAdd"];
15602
+ type TabularRedact = Schemas$18["TabularRedact"];
15603
+ type TabularRefinement = Schemas$18["TabularRefinement"];
15604
+ type TabularRetag = Schemas$18["TabularRetag"];
15085
15605
  //#endregion
15086
15606
  //#region src/datatypes/auth.d.ts
15087
15607
  type Schemas$17 = components["schemas"];
@@ -15270,11 +15790,9 @@ type PipelineRunStatus = Schemas$3["PipelineRunStatus"];
15270
15790
  type PipelineRunPage = Schemas$3["PipelineRunPage"];
15271
15791
  type PipelineRunsQuery = Schemas$3["PipelineRunsQuery"];
15272
15792
  type RunStatusEvent = Schemas$3["RunStatusEvent"];
15273
- type Audit = Schemas$3["Audit"];
15274
15793
  //#endregion
15275
15794
  //#region src/datatypes/scope.d.ts
15276
15795
  type Schemas$2 = components["schemas"];
15277
- type ScopeParams = Schemas$2["ScopeParams"];
15278
15796
  type ScopeMetadata = Schemas$2["ScopeMetadata"];
15279
15797
  type CountryCode = Schemas$2["CountryCode"];
15280
15798
  type Language = Schemas$2["Language"];
@@ -15309,5 +15827,5 @@ type Retention = Schemas["Retention"];
15309
15827
  type RetentionSettings = Schemas["RetentionSettings"];
15310
15828
  type RetentionOverride = Schemas["RetentionOverride"];
15311
15829
  //#endregion
15312
- export { LabelRef as $, ChatSessionPage as $n, TextAuditEvent as $r, GenerateInviteCode as $t, CreatePipelineRun as A, Activity as Ai, ConnectionId as An, ImageData as Ar, CursorPagination as At, Color as B, PipelineActivityParams as Bi, S3Credentials as Bn, Polygon as Br, NotificationSettings as Bt, Language as C, StorageAnalytics as Ci, ExportQuery as Cn, Dimensions as Cr, PipelineDefinition as Ct, ScopeMetadata as D, UsageAnalytics as Di, AzureCredentials as Dn, ImageAuditEvent as Dr, PipelineSummaryPage as Dt, Languages as E, Usage as Ei, AnthropicCredentials as En, EntityGroup as Er, PipelineSummary as Et, RunId as F, ActivityType as Fi, ConnectionsQuery as Fn, LeakProfile as Fr, MemberJoinedParams as Ft, GdprArticle9Treatment as G, Account as Gi, SyncSchedule as Gn, SourceRef as Gr, UnreadStatus as Gt, CreatePolicy as H, PolicyActivityParams as Hi, SyncConnection as Hn, RasterMode as Hr, PipelineRunCompletedParams as Ht, RunMetadata as I, ConnectionActivityParams as Ii, CreateConnection as In, ModelEvent as Ir, Notification as It, HipaaDeidMethod as J, PasswordChange as Ji, SyncTriggerType as Jn, TabularAuditLog as Jr, Member as Jt, GdprSensitiveScope as K, AccountRef as Ki, SyncScheduleInput as Kn, TabularAuditEvent as Kr, UpdateNotificationSettings as Kt, RunStatusEvent as L, FileActivityParams as Li, GcsCredentials as Ln, OperatorId as Lr, NotificationEvent as Lt, PipelineRunPage as M, ActivityListQuery as Mi, ConnectionSync as Mn, ImageEntityRecord as Mr, ConnectionSyncFailedParams as Mt, PipelineRunStatus as N, ActivityPage as Ni, ConnectionSyncPage as Nn, ImageHint as Nr, MarkedReadStatus as Nt, ScopeParams as O, UsageReport as Oi, Connection as On, ImageAuditKind as Or, PipelineTriggerType as Ot, PipelineRunsQuery as P, ActivityPayload as Pi, ConnectionVerification as Pn, ImageLocation as Pr, MemberInvitedParams as Pt, LabelLocale as Q, ChatSession as Qn, TabularLocation as Qr, CreateInvite as Qt, AudioRedaction as R, InviteActivityParams as Ri, LlmConfig as Rn, PatternEvent as Rr, NotificationPage as Rt, CountryCode as S, RunTimeSeries as Si, ExportFormat as Sn, Category as Sr, Pipeline as St, LanguageSpan as T, TokenCounts as Ti, ValidationErrorDetail as Tn, EntityCoRef as Tr, PipelineStatus as Tt, DateGranularity as U, WebhookActivityParams as Ui, SyncDeletionPolicy as Un, Review as Ur, PipelineRunFailedParams as Ut, ConfidenceThreshold as V, PipelineRunActivityParams as Vi, StorageConfig as Vn, RangeOfUint as Vr, PipelineRunAnalyzedParams as Vt, DateStyle as W, WorkspaceActivityParams as Wi, SyncMode as Wn, RuleMatch as Wr, UnreadCountEvent as Wt, Label as X, UpdateAccount as Xi, ChatMessage as Xn, TabularEntityRecord as Xr, MemberSortField as Xt, ImageRedaction as Y, PublicAccount as Yi, UpdateConnection as Yn, TabularEntity as Yr, MemberPage as Yt, LabelEntry as Z, paths as Zi, ChatRole as Zn, TabularHint as Zr, UpdateMember as Zt, WebhookId as _, ProviderType as _i, FormatToken as _n, AudioHint as _r, TerminalFallback as _t, RetentionSettings as a, TextHint as ai, InviteSent as an, RegisteredRecognizer as ar, PciPanRender as at, WebhookStatus as b, RunDayEntry as bi, UpdateFile as bn, AuditHash as br, Waveform as bt, WorkspacePage as c, ApiToken as ci, ListInvites as cn, Signup as cr, PolicyDraft as ct, CreateWebhook as d, ApiTokenWithJWT as di, ComponentHealth as dn, AudioAuditEvent as dr, PolicySummaryPage as dt, TextAuditKind as ei, Invite as en, ChatToken as er, LabelScope as et, TestWebhook as f, CreateApiToken as fi, Health as fn, AudioAuditKind as fr, PolicyTemplate as ft, WebhookEvent as g, ModelUsageEntry as gi, FilePage as gn, AudioEntityRecord as gr, TemplateOrigin as gt, WebhookCreated as h, ModelUsage as hi, FileKind as hn, AudioEntity as hr, TabularRedaction as ht, RetentionOverride as i, TextEntityRecord as ii, InvitePreview as in, RecognizerCatalog as ir, PciDssPart as it, PipelineRun as j, ActivityExportQuery as ji, ConnectionPage as jn, ImageEntity as jr, ConnectionSyncCompletedParams as jt, Audit as k, WorkspaceAnalytics as ki, ConnectionConfig as kn, ImageAuditLog as kr, UpdatePipeline as kt, WorkspaceRole as l, ApiTokenPage as li, ReplyInvite as ln, Attribution as lr, PolicyRule as lt, Webhook as m, UpdateApiToken as mi, File as mn, AudioData as mr, Sha2Algorithm as mt, OcrPolicy as n, TextData as ni, InviteExpiration as nn, SendChatMessage as nr, LocalizedText as nt, UpdateWorkspace as o, TextLocation as oi, InviteSortField as on, AuthToken as or, Policy as ot, UpdateWebhook as p, TokenExpiration as pi, HealthStatus as pn, AudioAuditLog as pr, Predicate as pt, HipaaAccountNumbers as q, Handle as qi, SyncStatus as qn, TabularAuditKind as qr, ListMembers as qt, Retention as r, TextEntity as ri, InvitePage as rn, LabelCatalog as rr, ModalityRedactions as rt, Workspace as s, TimeSpan as si, InviteStatus as sn, Login as sr, PolicyDefinition as st, CreateWorkspace as t, TextAuditLog as ti, InviteCode as tn, CreateChatSession as tr, LanguageTag as tt, WorkspaceSettings as u, ApiTokenType as ui, SortOrder as un, AttributionKind as ur, PolicySummary as ut, WebhookPage as v, RecognizerId as vi, ListFiles as vn, AudioLocation as vr, TextRedaction as vt, LanguageProvenance as w, StorageKindEntry as wi, ErrorResponse as wn, Dpi as wr, PipelineFilter as wt, Confidence as x, RunStatusEntry as xi, DateWindow as xn, BoundingBox as xr, CreatePipeline as xt, WebhookResult as y, RunAnalytics as yi, ModalityToken as yn, AuditContext as yr, UpdatePolicy as yt, ClampBucket as z, MemberActivityParams as zi, OpenAiCredentials as zn, Point as zr, NotificationPayload as zt };
15313
- //# sourceMappingURL=index-0_K3HaXB.d.ts.map
15830
+ export { LanguageTag as $, ModelUsageEntry as $i, CreateChatSession as $n, ImageRetag as $r, InviteCode as $t, PipelineRunPage as A, Handle as Aa, TextAuditEvent as Ai, ConnectionSync as An, Conflict as Ar, ConnectionSyncFailedParams as At, CreatePolicy as B, TextPattern as Bi, SyncConnection as Bn, ImageAuditEvent as Br, PipelineRunCompletedParams as Bt, Language as C, PipelineActivityParams as Ca, TabularManual as Ci, ValidationErrorDetail as Cn, Audit as Cr, PipelineStatus as Ct, ScopeMetadata as D, WorkspaceActivityParams as Da, TabularRefinement as Di, ConnectionConfig as Dn, Category as Dr, UpdatePipeline as Dt, Languages as E, WebhookActivityParams as Ea, TabularRedact as Ei, Connection as En, Calibration as Er, PipelineTriggerType as Et, RunStatusEvent as F, TextEntity as Fi, GcsCredentials as Fn, Dpi as Fr, NotificationEvent as Ft, HipaaAccountNumbers as G, ApiToken as Gi, SyncStatus as Gn, ImageEntity as Gr, ListMembers as Gt, DateStyle as H, TextRefinement as Hi, SyncMode as Hn, ImageAuditLog as Hr, UnreadCountEvent as Ht, AudioRedaction as I, TextHint as Ii, LlmConfig as In, EditSet as Ir, NotificationPage as It, Label as J, ApiTokenWithJWT as Ji, ChatMessage as Jn, ImageManual as Jr, MemberSortField as Jt, HipaaDeidMethod as K, ApiTokenPage as Ki, SyncTriggerType as Kn, ImageHint as Kr, Member as Kt, ClampBucket as L, TextLocation as Li, OpenAiCredentials as Ln, EntityCoRef as Lr, NotificationPayload as Lt, PipelineRunsQuery as M, PublicAccount as Ma, TextAuditLog as Mi, ConnectionVerification as Mn, Deduplication as Mr, MemberInvitedParams as Mt, RunId as N, UpdateAccount as Na, TextData as Ni, ConnectionsQuery as Nn, Dimensions as Nr, MemberJoinedParams as Nt, CreatePipelineRun as O, Account as Oa, TabularRetag as Oi, ConnectionId as On, CitedAttribution as Or, CursorPagination as Ot, RunMetadata as P, paths as Pa, TextEdit as Pi, CreateConnection as Pn, DocumentContext as Pr, Notification as Pt, LabelScope as Q, ModelUsage as Qi, ChatToken as Qn, ImageRefinement as Qr, Invite as Qt, Color as R, TextManual as Ri, S3Credentials as Rn, FreeformAttribution as Rr, NotificationSettings as Rt, CountryCode as S, MemberActivityParams as Sa, TabularLocation as Si, ErrorResponse as Sn, AudioRetag as Sr, PipelineFilter as St, LanguageSpan as T, PolicyActivityParams as Ta, TabularPattern as Ti, AzureCredentials as Tn, BoundingBox as Tr, PipelineSummaryPage as Tt, GdprArticle9Treatment as U, TextRetag as Ui, SyncSchedule as Un, ImageData as Ur, UnreadStatus as Ut, DateGranularity as V, TextRedact as Vi, SyncDeletionPolicy as Vn, ImageAuditKind as Vr, PipelineRunFailedParams as Vt, GdprSensitiveScope as W, TimeSpan as Wi, SyncScheduleInput as Wn, ImageEdit as Wr, UpdateNotificationSettings as Wt, LabelLocale as X, TokenExpiration as Xi, ChatSession as Xn, ImagePattern as Xr, CreateInvite as Xt, LabelEntry as Y, CreateApiToken as Yi, ChatRole as Yn, ImageModel as Yr, UpdateMember as Yt, LabelRef as Z, UpdateApiToken as Zi, ChatSessionPage as Zn, ImageRedact as Zr, GenerateInviteCode as Zt, WebhookId as _, ActivityPayload as _a, TabularAuditKind as _i, ModalityToken as _n, AudioManual as _r, UpdatePolicy as _t, RetentionSettings as a, RunTimeSeries as aa, Point as ai, InviteStatus as an, Login as ar, PolicyDefinition as at, WebhookStatus as b, FileActivityParams as ba, TabularEntity as bi, ExportFormat as bn, AudioRedact as br, Pipeline as bt, WorkspacePage as c, TokenCounts as ca, RasterMode as ci, SortOrder as cn, AudioAdd as cr, PolicySummary as ct, CreateWebhook as d, UsageReport as da, RuleMatch as di, HealthStatus as dn, AudioAuditLog as dr, Predicate as dt, ProviderType as ea, LeakProfile as ei, InviteExpiration as en, SendChatMessage as er, LocalizedText as et, TestWebhook as f, WorkspaceAnalytics as fa, Selection as fi, File as fn, AudioData as fr, Sha2Algorithm as ft, WebhookEvent as g, ActivityPage as ga, TabularAuditEvent as gi, ListFiles as gn, AudioLocation as gr, TextRedaction as gt, WebhookCreated as h, ActivityFilterQuery as ha, TabularAdd as hi, FormatToken as hn, AudioHint as hr, TerminalFallback as ht, RetentionOverride as i, RunStatusEntry as ia, PatternEvent as ii, InviteSortField as in, AuthToken as ir, Policy as it, PipelineRunStatus as j, PasswordChange as ja, TextAuditKind as ji, ConnectionSyncPage as jn, Contested as jr, MarkedReadStatus as jt, PipelineRun as k, AccountRef as ka, TextAdd as ki, ConnectionPage as kn, CodecParams as kr, ConnectionSyncCompletedParams as kt, WorkspaceRole as l, Usage as la, Redaction as li, ComponentHealth as ln, AudioAuditEvent as lr, PolicySummaryPage as lt, Webhook as m, ActivityExportOptions as ma, Suppress as mi, FilePage as mn, AudioEntity as mr, TemplateOrigin as mt, OcrPolicy as n, RunAnalytics as na, ModelEvent as ni, InvitePreview as nn, RecognizerCatalog as nr, PciDssPart as nt, UpdateWorkspace as o, StorageAnalytics as oa, Polygon as oi, ListInvites as on, Signup as or, PolicyDraft as ot, UpdateWebhook as p, Activity as pa, SourceRef as pi, FileKind as pn, AudioEdit as pr, TabularRedaction as pt, ImageRedaction as q, ApiTokenType as qi, UpdateConnection as qn, ImageLocation as qr, MemberPage as qt, Retention as r, RunDayEntry as ra, OperatorId as ri, InviteSent as rn, RegisteredRecognizer as rr, PciPanRender as rt, Workspace as s, StorageKindEntry as sa, RangeOfUint as si, ReplyInvite as sn, Attribution as sr, PolicyRule as st, CreateWorkspace as t, RecognizerId as ta, ManualIntent as ti, InvitePage as tn, LabelCatalog as tr, ModalityRedactions as tt, WorkspaceSettings as u, UsageAnalytics as ua, Report as ui, Health as un, AudioAuditKind as ur, PolicyTemplate as ut, WebhookPage as v, ActivityType as va, TabularAuditLog as vi, UpdateFile as vn, AudioModel as vr, Waveform as vt, LanguageProvenance as w, PipelineRunActivityParams as wa, TabularModel as wi, AnthropicCredentials as wn, AuditHash as wr, PipelineSummary as wt, Confidence as x, InviteActivityParams as xa, TabularHint as xi, ExportQuery as xn, AudioRefinement as xr, PipelineDefinition as xt, WebhookResult as y, ConnectionActivityParams as ya, TabularEdit as yi, DateWindow as yn, AudioPattern as yr, CreatePipeline as yt, ConfidenceThreshold as z, TextModel as zi, StorageConfig as zn, ImageAdd as zr, PipelineRunAnalyzedParams as zt };
15831
+ //# sourceMappingURL=index-BsijAKTe.d.ts.map