@nvisy/sdk 0.32.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,11 +1227,25 @@ interface paths {
1227
1227
  };
1228
1228
  /**
1229
1229
  * List workspace activities
1230
- * @description Returns the workspace's activity log, most recent first, cursor-paginated.
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 Username of the account whose activities to keep. Omit for any actor. */
1236
+ actor?: components["schemas"]["Handle"];
1237
+ /**
1238
+ * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
1239
+ * parameter for several; omit for no type constraint.
1240
+ */
1241
+ type?: components["schemas"]["ActivityType"][];
1242
+ /**
1243
+ * @description First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the range
1244
+ * spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
1245
+ */
1246
+ from?: string;
1247
+ /** @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC). */
1248
+ to?: string;
1235
1249
  /**
1236
1250
  * @description Cursor pointing to the last item of the previous page.
1237
1251
  * Obtain this from the `nextCursor` field in the response.
@@ -1319,13 +1333,18 @@ interface paths {
1319
1333
  };
1320
1334
  /**
1321
1335
  * Export workspace activities
1322
- * @description Exports a workspace's activity log over a date window as a downloadable file. The window is `from`/`to` (inclusive, YYYY-MM-DD); it defaults to the last 30 days and is capped at 366 days. `format` is `csv` (default) or `json`. Each activity is a flat row: timestamp, the type split into object/action, the actor, and the acted-on object's id and label, oldest first. At most 100,000 rows are returned (the oldest in the window); a truncated export sets the `X-Export-Truncated` response header.
1336
+ * @description Exports a workspace's activity log over a date window as a downloadable file. The window is `from`/`to` (inclusive, YYYY-MM-DD); it defaults to the last 30 days and is capped at 366 days. The same `type` (repeatable) and `actor` filters as the feed apply. `format` is `csv` (default) or `json`. Each activity is a flat row: timestamp, the type split into object/action, the actor, and the acted-on object's id and label, oldest first. At most 100,000 rows are returned (the oldest in the window); a truncated export sets the `X-Export-Truncated` response header.
1323
1337
  */
1324
1338
  get: {
1325
1339
  parameters: {
1326
1340
  query?: {
1327
- /** @description Output format; defaults to `csv`. */
1328
- 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"][];
1329
1348
  /**
1330
1349
  * @description First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the range
1331
1350
  * spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
@@ -1333,6 +1352,8 @@ interface paths {
1333
1352
  from?: string;
1334
1353
  /** @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC). */
1335
1354
  to?: string;
1355
+ /** @description Output format; defaults to `csv`. */
1356
+ format?: components["schemas"]["ExportFormat"];
1336
1357
  };
1337
1358
  header?: never;
1338
1359
  path: {
@@ -5418,22 +5439,34 @@ interface paths {
5418
5439
  requestBody?: never;
5419
5440
  responses: {
5420
5441
  /**
5421
- * @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).
5422
5449
  *
5423
- * The body group plus per-container-part groups (each tagged by
5424
- * modality) plus the recognition [`AuditContext`] the entities
5425
- * were scored against.
5450
+ * # Serialization
5426
5451
  *
5427
- * The context travels with the entities so anonymize can rebuild
5428
- * an orchestrator against exactly the vocabulary analyze used.
5429
- * Anything a policy predicate compares against beyond the label
5430
- * catalog (asserted languages, jurisdictions, document tags) is
5431
- * here; labels are re-derived from the policy set on each
5432
- * anonymize call.
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`].
5433
5456
  *
5434
- * No [`Default`]: a well-formed audit must carry a real
5435
- * [`AuditContext`] with a real correlation id. Callers building
5436
- * an audit outside the analyze path construct it explicitly.
5457
+ * # Schema
5458
+ *
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
5437
5470
  */
5438
5471
  200: {
5439
5472
  headers: {
@@ -8689,23 +8722,33 @@ interface components {
8689
8722
  workspaceSlug: components["schemas"]["Handle"];
8690
8723
  };
8691
8724
  /**
8692
- * @description Query parameters for the activity export: a `from`/`to` day range (inclusive)
8693
- * and the 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).
8694
8728
  */
8695
- ActivityExportQuery: {
8729
+ ActivityExportOptions: {
8696
8730
  /** @description Output format; defaults to `csv`. */
8697
8731
  format?: components["schemas"]["ExportFormat"];
8732
+ };
8733
+ /**
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.
8743
+ */
8744
+ ActivityFilterQuery: {
8745
+ /** @description Username of the account whose activities to keep. Omit for any actor. */
8746
+ actor?: components["schemas"]["Handle"];
8698
8747
  /**
8699
- * Format: date
8700
- * @description First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the range
8701
- * spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
8702
- */
8703
- from?: string;
8704
- /**
8705
- * Format: date
8706
- * @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC).
8748
+ * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
8749
+ * parameter for several; omit for no type constraint.
8707
8750
  */
8708
- to?: string;
8751
+ type?: components["schemas"]["ActivityType"][];
8709
8752
  };
8710
8753
  /**
8711
8754
  * @description Generic paginated response wrapper.
@@ -8726,112 +8769,151 @@ interface components {
8726
8769
  total?: number;
8727
8770
  };
8728
8771
  /**
8729
- * @description The typed payload of an audit-log activity, tagged by `activityType`.
8772
+ * @description The typed payload of an audit-log activity, tagged by `type` with its params
8773
+ * under `data` (the same `{type, data}` envelope the notification payload and
8774
+ * outbox event use).
8730
8775
  *
8731
8776
  * Each variant is one activity type carrying its own params. No rendered text is
8732
- * included — the client localizes the copy from `activityType` and the params.
8733
- * The `activityType` values match the `ACTIVITY_TYPE` enum.
8777
+ * included — the client localizes the copy from `type` and the params. The `type`
8778
+ * values match the `ACTIVITY_TYPE` enum.
8734
8779
  */
8735
- ActivityPayload: ({
8736
- /** @constant */
8737
- activityType: "workspace.created";
8738
- } & components["schemas"]["WorkspaceActivityParams"]) | ({
8780
+ ActivityPayload: {
8781
+ data: components["schemas"]["WorkspaceActivityParams"];
8739
8782
  /** @constant */
8740
- activityType: "workspace.updated";
8741
- } & components["schemas"]["WorkspaceActivityParams"]) | ({
8783
+ type: "workspace.created";
8784
+ } | {
8785
+ data: components["schemas"]["WorkspaceActivityParams"];
8742
8786
  /** @constant */
8743
- activityType: "workspace.deleted";
8744
- } & components["schemas"]["WorkspaceActivityParams"]) | ({
8787
+ type: "workspace.updated";
8788
+ } | {
8789
+ data: components["schemas"]["WorkspaceActivityParams"];
8745
8790
  /** @constant */
8746
- activityType: "member.added";
8747
- } & components["schemas"]["MemberActivityParams"]) | ({
8791
+ type: "workspace.deleted";
8792
+ } | {
8793
+ data: components["schemas"]["MemberActivityParams"];
8748
8794
  /** @constant */
8749
- activityType: "member.updated";
8750
- } & components["schemas"]["MemberActivityParams"]) | ({
8795
+ type: "member.added";
8796
+ } | {
8797
+ data: components["schemas"]["MemberActivityParams"];
8751
8798
  /** @constant */
8752
- activityType: "member.deleted";
8753
- } & components["schemas"]["MemberActivityParams"]) | ({
8799
+ type: "member.updated";
8800
+ } | {
8801
+ data: components["schemas"]["MemberActivityParams"];
8754
8802
  /** @constant */
8755
- activityType: "invite.created";
8756
- } & components["schemas"]["InviteActivityParams"]) | ({
8803
+ type: "member.deleted";
8804
+ } | {
8805
+ data: components["schemas"]["InviteActivityParams"];
8757
8806
  /** @constant */
8758
- activityType: "invite.accepted";
8759
- } & components["schemas"]["InviteActivityParams"]) | ({
8807
+ type: "invite.created";
8808
+ } | {
8809
+ data: components["schemas"]["InviteActivityParams"];
8760
8810
  /** @constant */
8761
- activityType: "invite.declined";
8762
- } & components["schemas"]["InviteActivityParams"]) | ({
8811
+ type: "invite.accepted";
8812
+ } | {
8813
+ data: components["schemas"]["InviteActivityParams"];
8763
8814
  /** @constant */
8764
- activityType: "invite.canceled";
8765
- } & components["schemas"]["InviteActivityParams"]) | ({
8815
+ type: "invite.declined";
8816
+ } | {
8817
+ data: components["schemas"]["InviteActivityParams"];
8766
8818
  /** @constant */
8767
- activityType: "connection.created";
8768
- } & components["schemas"]["ConnectionActivityParams"]) | ({
8819
+ type: "invite.canceled";
8820
+ } | {
8821
+ data: components["schemas"]["ConnectionActivityParams"];
8769
8822
  /** @constant */
8770
- activityType: "connection.updated";
8771
- } & components["schemas"]["ConnectionActivityParams"]) | ({
8823
+ type: "connection.created";
8824
+ } | {
8825
+ data: components["schemas"]["ConnectionActivityParams"];
8772
8826
  /** @constant */
8773
- activityType: "connection.deleted";
8774
- } & components["schemas"]["ConnectionActivityParams"]) | ({
8827
+ type: "connection.updated";
8828
+ } | {
8829
+ data: components["schemas"]["ConnectionActivityParams"];
8775
8830
  /** @constant */
8776
- activityType: "connection.sync.completed";
8777
- } & components["schemas"]["ConnectionActivityParams"]) | ({
8831
+ type: "connection.deleted";
8832
+ } | {
8833
+ data: components["schemas"]["ConnectionActivityParams"];
8778
8834
  /** @constant */
8779
- activityType: "connection.sync.failed";
8780
- } & components["schemas"]["ConnectionActivityParams"]) | ({
8835
+ type: "connection.sync.started";
8836
+ } | {
8837
+ data: components["schemas"]["ConnectionActivityParams"];
8781
8838
  /** @constant */
8782
- activityType: "webhook.created";
8783
- } & components["schemas"]["WebhookActivityParams"]) | ({
8839
+ type: "connection.sync.completed";
8840
+ } | {
8841
+ data: components["schemas"]["ConnectionActivityParams"];
8784
8842
  /** @constant */
8785
- activityType: "webhook.updated";
8786
- } & components["schemas"]["WebhookActivityParams"]) | ({
8843
+ type: "connection.sync.failed";
8844
+ } | {
8845
+ data: components["schemas"]["WebhookActivityParams"];
8787
8846
  /** @constant */
8788
- activityType: "webhook.deleted";
8789
- } & components["schemas"]["WebhookActivityParams"]) | ({
8847
+ type: "webhook.created";
8848
+ } | {
8849
+ data: components["schemas"]["WebhookActivityParams"];
8790
8850
  /** @constant */
8791
- activityType: "webhook.triggered";
8792
- } & components["schemas"]["WebhookActivityParams"]) | ({
8851
+ type: "webhook.updated";
8852
+ } | {
8853
+ data: components["schemas"]["WebhookActivityParams"];
8793
8854
  /** @constant */
8794
- activityType: "file.created";
8795
- } & components["schemas"]["FileActivityParams"]) | ({
8855
+ type: "webhook.deleted";
8856
+ } | {
8857
+ data: components["schemas"]["FileActivityParams"];
8796
8858
  /** @constant */
8797
- activityType: "file.updated";
8798
- } & components["schemas"]["FileActivityParams"]) | ({
8859
+ type: "file.created";
8860
+ } | {
8861
+ data: components["schemas"]["FileActivityParams"];
8799
8862
  /** @constant */
8800
- activityType: "file.deleted";
8801
- } & components["schemas"]["FileActivityParams"]) | ({
8863
+ type: "file.updated";
8864
+ } | {
8865
+ data: components["schemas"]["FileActivityParams"];
8802
8866
  /** @constant */
8803
- activityType: "file.verified";
8804
- } & components["schemas"]["FileActivityParams"]) | ({
8867
+ type: "file.deleted";
8868
+ } | {
8869
+ data: components["schemas"]["PipelineActivityParams"];
8805
8870
  /** @constant */
8806
- activityType: "pipeline.created";
8807
- } & components["schemas"]["PipelineActivityParams"]) | ({
8871
+ type: "pipeline.created";
8872
+ } | {
8873
+ data: components["schemas"]["PipelineActivityParams"];
8808
8874
  /** @constant */
8809
- activityType: "pipeline.updated";
8810
- } & components["schemas"]["PipelineActivityParams"]) | ({
8875
+ type: "pipeline.updated";
8876
+ } | {
8877
+ data: components["schemas"]["PipelineActivityParams"];
8811
8878
  /** @constant */
8812
- activityType: "pipeline.deleted";
8813
- } & components["schemas"]["PipelineActivityParams"]) | ({
8879
+ type: "pipeline.deleted";
8880
+ } | {
8881
+ data: components["schemas"]["PipelineRunActivityParams"];
8814
8882
  /** @constant */
8815
- activityType: "pipeline.run.started";
8816
- } & components["schemas"]["PipelineRunActivityParams"]) | ({
8883
+ type: "pipeline.run.started";
8884
+ } | {
8885
+ data: components["schemas"]["PipelineRunActivityParams"];
8817
8886
  /** @constant */
8818
- activityType: "pipeline.run.analyzed";
8819
- } & components["schemas"]["PipelineRunActivityParams"]) | ({
8887
+ type: "pipeline.run.analyzed";
8888
+ } | {
8889
+ data: components["schemas"]["PipelineRunActivityParams"];
8820
8890
  /** @constant */
8821
- activityType: "pipeline.run.completed";
8822
- } & components["schemas"]["PipelineRunActivityParams"]) | ({
8891
+ type: "pipeline.run.completed";
8892
+ } | {
8893
+ data: components["schemas"]["PipelineRunActivityParams"];
8823
8894
  /** @constant */
8824
- activityType: "pipeline.run.failed";
8825
- } & components["schemas"]["PipelineRunActivityParams"]) | ({
8895
+ type: "pipeline.run.failed";
8896
+ } | {
8897
+ data: components["schemas"]["PolicyActivityParams"];
8826
8898
  /** @constant */
8827
- activityType: "policy.created";
8828
- } & components["schemas"]["PolicyActivityParams"]) | ({
8899
+ type: "policy.created";
8900
+ } | {
8901
+ data: components["schemas"]["PolicyActivityParams"];
8829
8902
  /** @constant */
8830
- activityType: "policy.updated";
8831
- } & components["schemas"]["PolicyActivityParams"]) | ({
8903
+ type: "policy.updated";
8904
+ } | {
8905
+ data: components["schemas"]["PolicyActivityParams"];
8832
8906
  /** @constant */
8833
- activityType: "policy.deleted";
8834
- } & components["schemas"]["PolicyActivityParams"]);
8907
+ type: "policy.deleted";
8908
+ };
8909
+ /**
8910
+ * @description Defines the type of activity performed in a workspace for audit logging.
8911
+ *
8912
+ * This enumeration corresponds to the `ACTIVITY_TYPE` PostgreSQL enum and is used
8913
+ * to categorize different types of activities that occur within workspaces for comprehensive
8914
+ * audit trail and activity tracking.
8915
+ */
8916
+ ActivityType: "workspace.created" | "workspace.updated" | "workspace.deleted" | "member.added" | "member.updated" | "member.deleted" | "invite.created" | "invite.accepted" | "invite.declined" | "invite.canceled" | "connection.created" | "connection.updated" | "connection.deleted" | "connection.sync.started" | "connection.sync.completed" | "connection.sync.failed" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "file.created" | "file.updated" | "file.deleted" | "pipeline.created" | "pipeline.updated" | "pipeline.deleted" | "pipeline.run.started" | "pipeline.run.analyzed" | "pipeline.run.completed" | "pipeline.run.failed" | "policy.created" | "policy.updated" | "policy.deleted";
8835
8917
  /** @description Anthropic API credentials. */
8836
8918
  AnthropicCredentials: {
8837
8919
  /** @description Anthropic API key. */
@@ -8930,42 +9012,50 @@ interface components {
8930
9012
  * it on the entity's [`Redaction`] event so an audit can trace a change back to
8931
9013
  * the policy that demanded it.
8932
9014
  *
8933
- * The rationale takes one of two [`kind`](Attribution::kind)s, by how much
8934
- * structure the author has ([`AttributionKind::Freeform`] /
8935
- * [`AttributionKind::Cited`]). Orthogonal to that, an attribution may carry a
8936
- * [`source_id`](Attribution::source_id): an opaque, caller-owned [`Uuid`] the
8937
- * policy layer uses to link back to a source record (a rule, a request, a
8938
- * document). elide-core stores and hashes it verbatim; it never resolves or
8939
- * 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
+ * ```
8940
9028
  *
8941
9029
  * [`Redaction`]: crate::entity::audit::AuditKind::Redaction
8942
9030
  */
8943
- Attribution: {
8944
- /** @description The shape of the rationale: a freeform label or a formal citation. */
8945
- kind: components["schemas"]["AttributionKind"];
8946
- /**
8947
- * Format: uuid
8948
- * @description Opaque, caller-owned link to a source record, when given.
8949
- */
8950
- source_id?: string;
8951
- };
8952
- /** @description The shape of an [`Attribution`]'s rationale. */
8953
- AttributionKind: {
8954
- /** @description Human-readable description (e.g. `"right to erasure"`), when given. */
8955
- description?: string;
9031
+ Attribution: ({
8956
9032
  /** @constant */
8957
9033
  kind: "freeform";
8958
- /** @description The policy's name (e.g. `"gdpr-art-17"`, `"hipaa-safe-harbor"`). */
8959
- name: string;
8960
- } | {
8961
- /** @description The authority cited (e.g. `"GDPR"`, `"HIPAA"`, `"internal-policy"`). */
8962
- authority: string;
8963
- /** @description The citation within that authority (e.g. `"Art. 17(1)"`, `"§164.514"`). */
8964
- citation: string;
9034
+ } & components["schemas"]["FreeformAttribution"]) | ({
8965
9035
  /** @constant */
8966
9036
  kind: "cited";
8967
- /** @description Why the citation applies here (e.g. `"data subject requested erasure"`). */
8968
- 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;
8969
9059
  };
8970
9060
  /**
8971
9061
  * @description One node in an entity's audit DAG: a thing that happened, with its
@@ -9042,115 +9132,70 @@ interface components {
9042
9132
  * @description Kind of an [`AuditEvent`], carrying its event-specific detail and the
9043
9133
  * rationale for why it happened.
9044
9134
  *
9045
- * `#[non_exhaustive]`: new event kinds (verification, annotation, …)
9046
- * can be added compatibly. The recognition kinds ([`Pattern`],
9047
- * [`Model`]) carry the matched [`Location`]; the rest carry their own
9048
- * data.
9049
- *
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
9050
9155
  * [`Pattern`]: AuditKind::Pattern
9051
9156
  * [`Model`]: AuditKind::Model
9052
9157
  * [`Location`]: Modality::Location
9053
9158
  */
9054
9159
  AudioAuditKind: {
9160
+ detail: components["schemas"]["AudioPattern"];
9055
9161
  /** @constant */
9056
9162
  kind: "pattern";
9057
- /** @description Where the recognizer matched. */
9058
- location: components["schemas"]["AudioLocation"];
9059
- /** @description Pattern detail. */
9060
- pattern: components["schemas"]["PatternEvent"];
9061
9163
  } | {
9164
+ detail: components["schemas"]["AudioModel"];
9062
9165
  /** @constant */
9063
9166
  kind: "model";
9064
- /** @description Where the recognizer matched. */
9065
- location: components["schemas"]["AudioLocation"];
9066
- /** @description Model detail. */
9067
- model: components["schemas"]["ModelEvent"];
9068
9167
  } | {
9168
+ detail: components["schemas"]["Deduplication"];
9069
9169
  /** @constant */
9070
9170
  kind: "deduplication";
9071
- /** @description Name of the fusion strategy that combined them. */
9072
- strategy: string;
9073
9171
  } | {
9074
- /** @description The loser's confidence at resolution time. */
9075
- competing_confidence: components["schemas"]["Confidence"];
9076
- /** @description The label of the detection that lost arbitration. */
9077
- competing_label: components["schemas"]["LabelRef"];
9172
+ detail: components["schemas"]["Conflict"];
9078
9173
  /** @constant */
9079
9174
  kind: "conflict";
9080
- /** @description Name of the conflict policy that chose the winner. */
9081
- resolved_by: string;
9082
9175
  } | {
9083
- /** @description The competing detection's confidence. */
9084
- competing_confidence: components["schemas"]["Confidence"];
9085
- /** @description The label of the competing detection. */
9086
- competing_label: components["schemas"]["LabelRef"];
9087
- /** @description Name of the policy that flagged the contest. */
9088
- flagged_by: string;
9176
+ detail: components["schemas"]["Contested"];
9089
9177
  /** @constant */
9090
9178
  kind: "contested";
9091
9179
  } | {
9092
- /**
9093
- * Format: double
9094
- * @description Multiplier applied.
9095
- */
9096
- factor: number;
9180
+ detail: components["schemas"]["Calibration"];
9097
9181
  /** @constant */
9098
9182
  kind: "calibration";
9099
9183
  } | {
9100
- /**
9101
- * @description The located [`Hint`] the keyword fired from, when the match came
9102
- * from an out-of-band hint (a column header, a key) rather than
9103
- * the in-text word window. `None` for an in-text-window match.
9104
- *
9105
- * [`Hint`]: crate::modality::Hint
9106
- */
9107
- hint?: components["schemas"]["AudioHint"];
9108
- /** @description Keyword that fired the boost. */
9109
- keyword: string;
9184
+ detail: components["schemas"]["AudioRefinement"];
9110
9185
  /** @constant */
9111
9186
  kind: "refinement";
9112
- /**
9113
- * @description Where the boosting keyword sits in the medium. For a hint match
9114
- * this mirrors the hint's own location; for an in-text-window match
9115
- * it is the keyword resolved through the modality's [`locate`] (a
9116
- * pixel box for image, a time span for audio, the byte range for
9117
- * text/tabular). `None` when the keyword's stream range could not be
9118
- * placed, symmetric with a match the recognizer itself drops.
9119
- *
9120
- * [`locate`]: crate::modality::TextRecognizable::locate
9121
- */
9122
- location?: components["schemas"]["AudioLocation"];
9123
9187
  } | {
9124
- /**
9125
- * @description The author-supplied policy rationale, when the operator carried an
9126
- * [`Attribution`]; `None` otherwise.
9127
- */
9128
- attribution?: components["schemas"]["Attribution"];
9129
- /** @description Identifier of the key needed to reverse it, if reversible. */
9130
- key_id?: string;
9188
+ detail: components["schemas"]["Redaction"];
9131
9189
  /** @constant */
9132
9190
  kind: "redaction";
9133
- /** @description How much the output leaks about the original. */
9134
- leak_profile: components["schemas"]["LeakProfile"];
9135
- /**
9136
- * @description Which selection rule chose this operator: the automatic "why"
9137
- * (matched a label, a tag, a predicate, or the fallback).
9138
- */
9139
- matched_by: components["schemas"]["RuleMatch"];
9140
- /** @description Which operator (name + version) ran. */
9141
- operator: components["schemas"]["OperatorId"];
9142
- /**
9143
- * @description BLAKE3 digest of the original text the operator hid, when the
9144
- * redaction layer recorded it. Proves *what* was redacted without
9145
- * storing the plaintext; `None` when the operator did not capture it.
9146
- */
9147
- span_hash?: components["schemas"]["AuditHash"];
9148
- /**
9149
- * Format: uint32
9150
- * @description Byte length of the original text the operator hid, paired with
9151
- * [`span_hash`](Self::Redaction::span_hash). `None` when not captured.
9152
- */
9153
- 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";
9154
9199
  };
9155
9200
  /**
9156
9201
  * @description Full audit trail of an [`Entity`]: every [`AuditEvent`] in its life, as a
@@ -9207,6 +9252,26 @@ interface components {
9207
9252
  /** @description Original filename, when known. */
9208
9253
  filename?: string;
9209
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"]);
9210
9275
  /**
9211
9276
  * @description Detected piece of sensitive information within some medium.
9212
9277
  *
@@ -9235,7 +9300,12 @@ interface components {
9235
9300
  AudioEntity: {
9236
9301
  /**
9237
9302
  * @description Tamper-evident audit trail: every contributing detection, the fusion
9238
- * 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
9239
9309
  */
9240
9310
  audit: components["schemas"]["AudioAuditLog"];
9241
9311
  /** @description Effective confidence in `0.0..=1.0` (fused, if applicable). */
@@ -9280,30 +9350,6 @@ interface components {
9280
9350
  */
9281
9351
  recognized_range?: components["schemas"]["Range_of_uint"];
9282
9352
  };
9283
- /**
9284
- * @description One recognized entity plus the optional reviewer override.
9285
- *
9286
- * The bound mirrors elide's [`Entity<M>`]: serialization needs
9287
- * `M::Location` and `M::Data` (de)serializable, and JsonSchema
9288
- * derivation needs them schema-able. All four modalities elide
9289
- * ships satisfy these under the `serde` + `schema` features.
9290
- */
9291
- AudioEntityRecord: {
9292
- /** @description The elide entity, as recognition produced it. */
9293
- entity: components["schemas"]["AudioEntity"];
9294
- /**
9295
- * @description Reviewer-supplied redaction override.
9296
- *
9297
- * `None` means "use the matching policy rule's decision";
9298
- * `Some(...)` overrides that rule for this specific entity
9299
- * at apply time. Reviewer overrides take precedence over
9300
- * every policy rule and inherit the authority of the
9301
- * [`Review::policy_id`] they name: the audit event's
9302
- * attribution stamps that policy so the trail names the
9303
- * authority under which the override fired.
9304
- */
9305
- review?: components["schemas"]["Review"];
9306
- };
9307
9353
  /**
9308
9354
  * @description Located, typed piece of context a recognizer may treat as in-context
9309
9355
  * for a nearby value.
@@ -9344,6 +9390,85 @@ interface components {
9344
9390
  /** @description Diarization label of the speaker, when a diarizer assigned one. */
9345
9391
  speaker_id?: string;
9346
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
+ };
9347
9472
  /** @description Operator spec a `redact` audio rule carries. */
9348
9473
  AudioRedaction: {
9349
9474
  /** @constant */
@@ -9377,160 +9502,165 @@ interface components {
9377
9502
  */
9378
9503
  waveform?: components["schemas"]["Waveform"];
9379
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
+ };
9380
9554
  /**
9381
- * @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
9564
+ *
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`].
9382
9569
  *
9383
- * The body group plus per-container-part groups (each tagged by
9384
- * modality) plus the recognition [`AuditContext`] the entities
9385
- * were scored against.
9570
+ * # Schema
9386
9571
  *
9387
- * The context travels with the entities so anonymize can rebuild
9388
- * an orchestrator against exactly the vocabulary analyze used.
9389
- * Anything a policy predicate compares against beyond the label
9390
- * catalog (asserted languages, jurisdictions, document tags) is
9391
- * here; labels are re-derived from the policy set on each
9392
- * anonymize call.
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.
9393
9578
  *
9394
- * No [`Default`]: a well-formed audit must carry a real
9395
- * [`AuditContext`] with a real correlation id. Callers building
9396
- * an audit outside the analyze path construct it explicitly.
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
9397
9583
  */
9398
9584
  Audit: {
9399
9585
  /**
9400
- * @description The body group.
9586
+ * @description How this document was decoded when it was analyzed.
9401
9587
  *
9402
- * `None` when no body pipeline produced entities (pre-analyze,
9403
- * or the codec resolved the doc to a modality with no
9404
- * 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.
9405
9591
  */
9406
- body?: components["schemas"]["EntityGroup"];
9592
+ codec: components["schemas"]["CodecParams"];
9407
9593
  /**
9408
- * @description Recognition context.
9594
+ * @description What the caller asserted when this document was analyzed:
9595
+ * languages, jurisdictions, document tags.
9409
9596
  *
9410
- * The asserted languages, countries, document tags, and the
9411
- * analyze-side correlation id. Held so
9412
- * [`Engine::anonymize`] can compile against the same
9413
- * vocabulary analyze used without the caller re-passing an
9414
- * `AnalyzerParams`.
9415
- *
9416
- * Required on the wire: a missing context on an incoming
9417
- * [`Audit`] rejects at deserialize time so the shape
9418
- * 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.
9419
9600
  *
9420
9601
  * [`Engine::anonymize`]: super::Engine::anonymize
9421
9602
  */
9422
- context: components["schemas"]["AuditContext"];
9603
+ context: components["schemas"]["DocumentContext"];
9423
9604
  /**
9424
- * @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.
9425
9611
  *
9426
- * Keyed by the container-private part id (e.g. a DOCX zip
9427
- * entry name like `"word/media/image1.png"`); each value
9428
- * carries that part's modality + entities.
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.
9615
+ *
9616
+ * [`anonymize_with`]: elide::Orchestrator::anonymize_with
9429
9617
  */
9430
- parts?: {
9431
- [key: string]: components["schemas"]["EntityGroup"];
9432
- };
9618
+ edits: components["schemas"]["EditSet"];
9619
+ /**
9620
+ * @description The detections: elide's own report, body and container
9621
+ * parts, each entity carrying its provenance chain.
9622
+ *
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).
9626
+ *
9627
+ * [`Report`]: elide::Report
9628
+ * [`include`]: elide::Report::include
9629
+ * [`suppress`]: elide::Report::suppress
9630
+ * [`entities`]: elide::Report::entities
9631
+ */
9632
+ report: components["schemas"]["Report"];
9433
9633
  /**
9434
9634
  * @description What the analyze pass cost: one entry per recognizer and
9435
9635
  * enricher that ran, each self-identifying by the name the
9436
9636
  * deployment configured it under.
9437
9637
  *
9438
- * Empty when nothing model-backed ran, which is the common
9439
- * case for a pattern-only pass. Recorded on analyze and not
9440
- * re-derived at anonymize time, so a host that bills or rate
9441
- * limits on model spend reads it straight off the returned
9442
- * [`Audit`].
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.
9443
9642
  */
9444
- usage?: components["schemas"]["UsageReport"];
9643
+ usage: components["schemas"]["UsageReport"];
9445
9644
  };
9446
9645
  /**
9447
- * @description Recognition-side facts that travel from analyze to anonymize.
9646
+ * @description A 32-byte BLAKE3 digest.
9448
9647
  *
9449
- * Mirrors elide's [`Scope`] shape one-for-one: direct fields
9450
- * for `languages` and `countries` (typed, elide-native), a
9451
- * [`metadata`] sub-struct for free-form classification strings
9452
- * (`tags`, `purpose`, `audience`), and the analyze-time
9453
- * [`correlation_id`]. The label catalog is not on here -
9454
- * labels are policy-owned, and anonymize re-derives them from
9455
- * the policy set it was handed.
9648
+ * The tamper-evident link in an [`AuditLog`] DAG: each [`AuditEvent`] hashes
9649
+ * its payload together with its parents' hashes, so altering any event breaks
9650
+ * every event downstream of it. Displays and (with the `serde` feature)
9651
+ * (de)serializes as lowercase hex.
9456
9652
  *
9457
- * No [`Default`]: `correlation_id` has no meaningful default
9458
- * (a nil UUID would silently collapse unrelated audits under
9459
- * one bucket in downstream trace aggregators), so callers
9460
- * supply one explicitly. Everything else defaults to empty.
9653
+ * The all-zero hash is [`GENESIS`](AuditHash::GENESIS), the link a birth event
9654
+ * (one with no parents) chains from.
9461
9655
  *
9462
- * [`Scope`]: elide::recognition::Scope
9463
- * [`metadata`]: Self::metadata
9464
- * [`correlation_id`]: Self::correlation_id
9656
+ * [`AuditLog`]: crate::entity::audit::AuditLog
9657
+ * [`AuditEvent`]: crate::entity::audit::AuditEvent
9465
9658
  */
9466
- AuditContext: {
9467
- /**
9468
- * Format: uuid
9469
- * @description Analyze-time correlation id.
9470
- *
9471
- * Threaded into every tracing span on the recognition path;
9472
- * carried over so the anonymize path can link its own spans
9473
- * to the same request. The anonymize call supplies a fresh
9474
- * id from the passed [`Document`] as the anonymize-side
9475
- * correlation id: this one stays as the analyze-side
9476
- * pointer.
9477
- *
9478
- * Required on the wire.
9479
- *
9480
- * [`Document`]: elide_wire::file::Document
9481
- */
9482
- correlationId: string;
9483
- /**
9484
- * @description Caller-asserted jurisdictions.
9485
- *
9486
- * Recorded from `AnalyzerParams.scope.countries`.
9487
- */
9488
- countries?: components["schemas"]["CountryCode"][];
9489
- /**
9490
- * @description Caller-asserted languages for the analysis.
9491
- *
9492
- * Recorded from `AnalyzerParams.scope.languages` at analyze
9493
- * time; anonymize re-uses them verbatim.
9494
- * @default []
9495
- */
9496
- languages?: components["schemas"]["Languages"];
9497
- /**
9498
- * @description Free-form request context: document tags, request purpose,
9499
- * output audience. See elide's [`ScopeMetadata`].
9500
- */
9501
- metadata?: components["schemas"]["ScopeMetadata"];
9502
- /**
9503
- * @description OCR mode the analyze call decoded with. Recorded so the
9504
- * anonymize call re-decodes the same document under the same
9505
- * codec configuration: otherwise entity offsets stored in
9506
- * the audit wouldn't line up against a differently-rendered
9507
- * second decode. Defaults to [`RasterMode::Auto`] (the codec's
9508
- * built-in behaviour) when omitted.
9509
- * @default {
9510
- * "kind": "auto"
9511
- * }
9512
- */
9513
- rasterMode?: components["schemas"]["RasterMode"];
9514
- };
9515
- /**
9516
- * @description A 32-byte BLAKE3 digest.
9517
- *
9518
- * The tamper-evident link in an [`AuditLog`] DAG: each [`AuditEvent`] hashes
9519
- * its payload together with its parents' hashes, so altering any event breaks
9520
- * every event downstream of it. Displays and (with the `serde` feature)
9521
- * (de)serializes as lowercase hex.
9522
- *
9523
- * The all-zero hash is [`GENESIS`](AuditHash::GENESIS), the link a birth event
9524
- * (one with no parents) chains from.
9525
- *
9526
- * [`AuditLog`]: crate::entity::audit::AuditLog
9527
- * [`AuditEvent`]: crate::entity::audit::AuditEvent
9528
- */
9529
- AuditHash: string;
9530
- /** @description Response returned after successful authentication (login/signup). */
9531
- AuthToken: {
9532
- /** @description The JWT API token for authentication. */
9533
- apiToken: string;
9659
+ AuditHash: string;
9660
+ /** @description Response returned after successful authentication (login/signup). */
9661
+ AuthToken: {
9662
+ /** @description The JWT API token for authentication. */
9663
+ apiToken: string;
9534
9664
  /**
9535
9665
  * Format: date-time
9536
9666
  * @description Timestamp when the token expires.
@@ -9597,6 +9727,14 @@ interface components {
9597
9727
  /** @description Minimum corner (top-left, conventionally). */
9598
9728
  min: components["schemas"]["Point"];
9599
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
+ };
9600
9738
  /**
9601
9739
  * @description The coarse group a [`Label`] belongs to, for organizing detected entities
9602
9740
  * by kind (`financial`, `health`, `identity`, …).
@@ -9699,6 +9837,21 @@ interface components {
9699
9837
  /** @description The text delta. */
9700
9838
  delta: string;
9701
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
+ };
9702
9855
  /**
9703
9856
  * @description Text a [`TextRedaction::Clamp`] emits for out-of-range values.
9704
9857
  *
@@ -9725,6 +9878,24 @@ interface components {
9725
9878
  } | {
9726
9879
  [key: string]: string;
9727
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
+ };
9728
9899
  /**
9729
9900
  * @description Color as 8-bit RGB.
9730
9901
  *
@@ -9784,6 +9955,18 @@ interface components {
9784
9955
  * [`Confidence`]: crate::primitive::Confidence
9785
9956
  */
9786
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
+ };
9787
9970
  /**
9788
9971
  * @description Response type for a workspace connection.
9789
9972
  *
@@ -9820,11 +10003,10 @@ interface components {
9820
10003
  };
9821
10004
  /** @description Params of a connection activity (`connection.*`). */
9822
10005
  ConnectionActivityParams: {
9823
- /**
9824
- * Format: uuid
9825
- * @description Id of the connection.
9826
- */
9827
- connectionId: string;
10006
+ /** @description Id of the connection. */
10007
+ connectionId: components["schemas"]["ConnectionId"];
10008
+ /** @description Display name of the connection. */
10009
+ connectionName: string;
9828
10010
  };
9829
10011
  /**
9830
10012
  * @description A fully-typed connection configuration for any capability.
@@ -9905,11 +10087,10 @@ interface components {
9905
10087
  };
9906
10088
  /** @description Params of a `connection.sync.completed` notification. */
9907
10089
  ConnectionSyncCompletedParams: {
9908
- /**
9909
- * Format: uuid
9910
- * @description Id of the connection that synced.
9911
- */
9912
- connectionId: string;
10090
+ /** @description Id of the connection that synced. */
10091
+ connectionId: components["schemas"]["ConnectionId"];
10092
+ /** @description Display name of the connection that synced. */
10093
+ connectionName: string;
9913
10094
  /**
9914
10095
  * Format: int64
9915
10096
  * @description Number of records synced, if known.
@@ -9918,11 +10099,10 @@ interface components {
9918
10099
  };
9919
10100
  /** @description Params of a `connection.sync.failed` notification. */
9920
10101
  ConnectionSyncFailedParams: {
9921
- /**
9922
- * Format: uuid
9923
- * @description Id of the connection that failed to sync.
9924
- */
9925
- connectionId: string;
10102
+ /** @description Id of the connection that failed to sync. */
10103
+ connectionId: components["schemas"]["ConnectionId"];
10104
+ /** @description Display name of the connection that failed to sync. */
10105
+ connectionName: string;
9926
10106
  /** @description Failure reason, if available. */
9927
10107
  error?: string;
9928
10108
  };
@@ -9970,6 +10150,19 @@ interface components {
9970
10150
  */
9971
10151
  provider?: string[];
9972
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
+ };
9973
10166
  /**
9974
10167
  * @description [ISO 3166-1] country, identified by its code.
9975
10168
  *
@@ -10078,7 +10271,7 @@ interface components {
10078
10271
  * Overrides the pipeline's `defaultScope` when present; absent falls back to
10079
10272
  * the pipeline default.
10080
10273
  */
10081
- scope?: components["schemas"]["ScopeParams"];
10274
+ scope?: components["schemas"]["DocumentContext"];
10082
10275
  };
10083
10276
  /**
10084
10277
  * @description Request payload for creating a new workspace policy.
@@ -10212,6 +10405,11 @@ interface components {
10212
10405
  */
10213
10406
  to?: string;
10214
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
+ };
10215
10413
  /**
10216
10414
  * @description Pixel dimensions of an image or any 2-D canvas.
10217
10415
  *
@@ -10235,6 +10433,36 @@ interface components {
10235
10433
  */
10236
10434
  width: number;
10237
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
+ };
10238
10466
  /**
10239
10467
  * Format: uint16
10240
10468
  * @description Dots-per-inch resolution for rasterizing vector content.
@@ -10248,6 +10476,21 @@ interface components {
10248
10476
  * [`scale_factor`]: Self::scale_factor
10249
10477
  */
10250
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
+ };
10251
10494
  /**
10252
10495
  * @description Coreference identifier shared by entities that denote the same
10253
10496
  * real-world thing.
@@ -10263,36 +10506,6 @@ interface components {
10263
10506
  * mentions, not a global key.
10264
10507
  */
10265
10508
  EntityCoRef: string;
10266
- /**
10267
- * @description A modality-tagged group of recognised entities.
10268
- *
10269
- * The unit [`Audit`] stores in `body` and in every `parts`
10270
- * entry.
10271
- *
10272
- * Tagged by `modality` (snake_case) so deserialization picks the
10273
- * right variant and the entity vec inside is statically typed
10274
- * per modality: apply-time we hand each variant back to elide
10275
- * as a `Vec<Entity<M>>` for the appropriate `M`.
10276
- *
10277
- * [`Audit`]: crate::Audit
10278
- */
10279
- EntityGroup: {
10280
- entities: components["schemas"]["TextEntityRecord"][];
10281
- /** @constant */
10282
- modality: "text";
10283
- } | {
10284
- entities: components["schemas"]["TabularEntityRecord"][];
10285
- /** @constant */
10286
- modality: "tabular";
10287
- } | {
10288
- entities: components["schemas"]["ImageEntityRecord"][];
10289
- /** @constant */
10290
- modality: "image";
10291
- } | {
10292
- entities: components["schemas"]["AudioEntityRecord"][];
10293
- /** @constant */
10294
- modality: "audio";
10295
- };
10296
10509
  /**
10297
10510
  * @description HTTP error response representation with security-conscious design.
10298
10511
  *
@@ -10410,6 +10623,16 @@ interface components {
10410
10623
  * @enum {string}
10411
10624
  */
10412
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
+ };
10413
10636
  /**
10414
10637
  * @description Typed credentials for Google Cloud Storage.
10415
10638
  *
@@ -10540,6 +10763,28 @@ interface components {
10540
10763
  * as de-identified.
10541
10764
  */
10542
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
+ };
10543
10788
  /**
10544
10789
  * @description One node in an entity's audit DAG: a thing that happened, with its
10545
10790
  * effect on confidence and its tamper-evident links.
@@ -10615,115 +10860,70 @@ interface components {
10615
10860
  * @description Kind of an [`AuditEvent`], carrying its event-specific detail and the
10616
10861
  * rationale for why it happened.
10617
10862
  *
10618
- * `#[non_exhaustive]`: new event kinds (verification, annotation, …)
10619
- * can be added compatibly. The recognition kinds ([`Pattern`],
10620
- * [`Model`]) carry the matched [`Location`]; the rest carry their own
10621
- * data.
10622
- *
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
10623
10883
  * [`Pattern`]: AuditKind::Pattern
10624
10884
  * [`Model`]: AuditKind::Model
10625
10885
  * [`Location`]: Modality::Location
10626
10886
  */
10627
10887
  ImageAuditKind: {
10888
+ detail: components["schemas"]["ImagePattern"];
10628
10889
  /** @constant */
10629
10890
  kind: "pattern";
10630
- /** @description Where the recognizer matched. */
10631
- location: components["schemas"]["ImageLocation"];
10632
- /** @description Pattern detail. */
10633
- pattern: components["schemas"]["PatternEvent"];
10634
10891
  } | {
10892
+ detail: components["schemas"]["ImageModel"];
10635
10893
  /** @constant */
10636
10894
  kind: "model";
10637
- /** @description Where the recognizer matched. */
10638
- location: components["schemas"]["ImageLocation"];
10639
- /** @description Model detail. */
10640
- model: components["schemas"]["ModelEvent"];
10641
10895
  } | {
10896
+ detail: components["schemas"]["Deduplication"];
10642
10897
  /** @constant */
10643
10898
  kind: "deduplication";
10644
- /** @description Name of the fusion strategy that combined them. */
10645
- strategy: string;
10646
10899
  } | {
10647
- /** @description The loser's confidence at resolution time. */
10648
- competing_confidence: components["schemas"]["Confidence"];
10649
- /** @description The label of the detection that lost arbitration. */
10650
- competing_label: components["schemas"]["LabelRef"];
10900
+ detail: components["schemas"]["Conflict"];
10651
10901
  /** @constant */
10652
10902
  kind: "conflict";
10653
- /** @description Name of the conflict policy that chose the winner. */
10654
- resolved_by: string;
10655
10903
  } | {
10656
- /** @description The competing detection's confidence. */
10657
- competing_confidence: components["schemas"]["Confidence"];
10658
- /** @description The label of the competing detection. */
10659
- competing_label: components["schemas"]["LabelRef"];
10660
- /** @description Name of the policy that flagged the contest. */
10661
- flagged_by: string;
10904
+ detail: components["schemas"]["Contested"];
10662
10905
  /** @constant */
10663
10906
  kind: "contested";
10664
10907
  } | {
10665
- /**
10666
- * Format: double
10667
- * @description Multiplier applied.
10668
- */
10669
- factor: number;
10908
+ detail: components["schemas"]["Calibration"];
10670
10909
  /** @constant */
10671
10910
  kind: "calibration";
10672
10911
  } | {
10673
- /**
10674
- * @description The located [`Hint`] the keyword fired from, when the match came
10675
- * from an out-of-band hint (a column header, a key) rather than
10676
- * the in-text word window. `None` for an in-text-window match.
10677
- *
10678
- * [`Hint`]: crate::modality::Hint
10679
- */
10680
- hint?: components["schemas"]["ImageHint"];
10681
- /** @description Keyword that fired the boost. */
10682
- keyword: string;
10912
+ detail: components["schemas"]["ImageRefinement"];
10683
10913
  /** @constant */
10684
10914
  kind: "refinement";
10685
- /**
10686
- * @description Where the boosting keyword sits in the medium. For a hint match
10687
- * this mirrors the hint's own location; for an in-text-window match
10688
- * it is the keyword resolved through the modality's [`locate`] (a
10689
- * pixel box for image, a time span for audio, the byte range for
10690
- * text/tabular). `None` when the keyword's stream range could not be
10691
- * placed, symmetric with a match the recognizer itself drops.
10692
- *
10693
- * [`locate`]: crate::modality::TextRecognizable::locate
10694
- */
10695
- location?: components["schemas"]["ImageLocation"];
10696
10915
  } | {
10697
- /**
10698
- * @description The author-supplied policy rationale, when the operator carried an
10699
- * [`Attribution`]; `None` otherwise.
10700
- */
10701
- attribution?: components["schemas"]["Attribution"];
10702
- /** @description Identifier of the key needed to reverse it, if reversible. */
10703
- key_id?: string;
10916
+ detail: components["schemas"]["Redaction"];
10704
10917
  /** @constant */
10705
10918
  kind: "redaction";
10706
- /** @description How much the output leaks about the original. */
10707
- leak_profile: components["schemas"]["LeakProfile"];
10708
- /**
10709
- * @description Which selection rule chose this operator: the automatic "why"
10710
- * (matched a label, a tag, a predicate, or the fallback).
10711
- */
10712
- matched_by: components["schemas"]["RuleMatch"];
10713
- /** @description Which operator (name + version) ran. */
10714
- operator: components["schemas"]["OperatorId"];
10715
- /**
10716
- * @description BLAKE3 digest of the original text the operator hid, when the
10717
- * redaction layer recorded it. Proves *what* was redacted without
10718
- * storing the plaintext; `None` when the operator did not capture it.
10719
- */
10720
- span_hash?: components["schemas"]["AuditHash"];
10721
- /**
10722
- * Format: uint32
10723
- * @description Byte length of the original text the operator hid, paired with
10724
- * [`span_hash`](Self::Redaction::span_hash). `None` when not captured.
10725
- */
10726
- 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";
10727
10927
  };
10728
10928
  /**
10729
10929
  * @description Full audit trail of an [`Entity`]: every [`AuditEvent`] in its life, as a
@@ -10778,6 +10978,26 @@ interface components {
10778
10978
  /** @description Original filename, when known. */
10779
10979
  filename?: string;
10780
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"]);
10781
11001
  /**
10782
11002
  * @description Detected piece of sensitive information within some medium.
10783
11003
  *
@@ -10806,7 +11026,12 @@ interface components {
10806
11026
  ImageEntity: {
10807
11027
  /**
10808
11028
  * @description Tamper-evident audit trail: every contributing detection, the fusion
10809
- * 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
10810
11035
  */
10811
11036
  audit: components["schemas"]["ImageAuditLog"];
10812
11037
  /** @description Effective confidence in `0.0..=1.0` (fused, if applicable). */
@@ -10851,30 +11076,6 @@ interface components {
10851
11076
  */
10852
11077
  recognized_range?: components["schemas"]["Range_of_uint"];
10853
11078
  };
10854
- /**
10855
- * @description One recognized entity plus the optional reviewer override.
10856
- *
10857
- * The bound mirrors elide's [`Entity<M>`]: serialization needs
10858
- * `M::Location` and `M::Data` (de)serializable, and JsonSchema
10859
- * derivation needs them schema-able. All four modalities elide
10860
- * ships satisfy these under the `serde` + `schema` features.
10861
- */
10862
- ImageEntityRecord: {
10863
- /** @description The elide entity, as recognition produced it. */
10864
- entity: components["schemas"]["ImageEntity"];
10865
- /**
10866
- * @description Reviewer-supplied redaction override.
10867
- *
10868
- * `None` means "use the matching policy rule's decision";
10869
- * `Some(...)` overrides that rule for this specific entity
10870
- * at apply time. Reviewer overrides take precedence over
10871
- * every policy rule and inherit the authority of the
10872
- * [`Review::policy_id`] they name: the audit event's
10873
- * attribution stamps that policy so the trail names the
10874
- * authority under which the override fired.
10875
- */
10876
- review?: components["schemas"]["Review"];
10877
- };
10878
11079
  /**
10879
11080
  * @description Located, typed piece of context a recognizer may treat as in-context
10880
11081
  * for a nearby value.
@@ -10920,6 +11121,85 @@ interface components {
10920
11121
  */
10921
11122
  polygon?: components["schemas"]["Polygon"];
10922
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
+ };
10923
11203
  /** @description Operator spec a `redact` image rule carries. */
10924
11204
  ImageRedaction: {
10925
11205
  /** @constant */
@@ -10960,6 +11240,55 @@ interface components {
10960
11240
  /** @constant */
10961
11241
  kind: "blackbox";
10962
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
+ };
10963
11292
  /**
10964
11293
  * @description Workspace invite with complete information.
10965
11294
  *
@@ -11001,8 +11330,11 @@ interface components {
11001
11330
  };
11002
11331
  /** @description Params of an invite activity (`invite.*`). */
11003
11332
  InviteActivityParams: {
11004
- /** @description Email the invite was addressed to. */
11005
- email: string;
11333
+ /**
11334
+ * @description Email the invite was addressed to, when it recorded one. `None` keeps an
11335
+ * absent address distinct from a blank one.
11336
+ */
11337
+ email?: string;
11006
11338
  /**
11007
11339
  * Format: uuid
11008
11340
  * @description Id of the invite.
@@ -11234,7 +11566,7 @@ interface components {
11234
11566
  * categories), so this is where that mapping is recorded as
11235
11567
  * data rather than prose.
11236
11568
  */
11237
- attribution?: components["schemas"]["AttributionKind"];
11569
+ attribution?: components["schemas"]["Attribution"];
11238
11570
  /** @description Optional description for reviewers. */
11239
11571
  description?: string;
11240
11572
  /**
@@ -11443,6 +11775,12 @@ interface components {
11443
11775
  */
11444
11776
  rememberMe?: boolean;
11445
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";
11446
11784
  /** @description Response type for a mark-all-read action. */
11447
11785
  MarkedReadStatus: {
11448
11786
  /**
@@ -11479,16 +11817,16 @@ interface components {
11479
11817
  /** @description Params of a `member.invited` notification. */
11480
11818
  MemberInvitedParams: {
11481
11819
  /** @description Username of the account that sent the invite, if known. */
11482
- invitedBy?: string;
11820
+ invitedBy?: components["schemas"]["Handle"];
11483
11821
  /** @description Slug of the workspace the account was invited to. */
11484
- workspaceSlug: string;
11822
+ workspaceSlug: components["schemas"]["Handle"];
11485
11823
  };
11486
11824
  /** @description Params of a `member.joined` notification. */
11487
11825
  MemberJoinedParams: {
11488
11826
  /** @description Username of the member that joined. */
11489
- memberUsername: string;
11827
+ memberUsername: components["schemas"]["Handle"];
11490
11828
  /** @description Slug of the workspace the member joined. */
11491
- workspaceSlug: string;
11829
+ workspaceSlug: components["schemas"]["Handle"];
11492
11830
  };
11493
11831
  /**
11494
11832
  * @description Generic paginated response wrapper.
@@ -11541,7 +11879,7 @@ interface components {
11541
11879
  * @enum {string}
11542
11880
  */
11543
11881
  ModalityToken: "audio" | "image" | "tabular" | "text";
11544
- /** @description Detail of a model/NER recognition. */
11882
+ /** @description Metadata of a model/NER recognition, carried by [`Model`]. */
11545
11883
  ModelEvent: {
11546
11884
  /** @description Whether contextual analysis adjusted the score for this match. */
11547
11885
  contextual: boolean;
@@ -11624,7 +11962,7 @@ interface components {
11624
11962
  * The values mirror the [`WebhookEvent`](super::WebhookEvent) naming for the
11625
11963
  * events the two channels share.
11626
11964
  */
11627
- NotificationEvent: "member.invited" | "member.joined" | "connection.sync.completed" | "connection.sync.failed" | "pipeline.run.analyzed" | "pipeline.run.completed" | "pipeline.run.failed" | "system.announcement" | "system.report";
11965
+ NotificationEvent: "member.invited" | "member.joined" | "connection.sync.completed" | "connection.sync.failed" | "pipeline.run.analyzed" | "pipeline.run.completed" | "pipeline.run.failed";
11628
11966
  /**
11629
11967
  * @description Generic paginated response wrapper.
11630
11968
  *
@@ -11657,40 +11995,42 @@ interface components {
11657
11995
  notificationId: string;
11658
11996
  };
11659
11997
  /**
11660
- * @description The typed payload of a notification, tagged by `notifyType`.
11998
+ * @description The typed payload of a notification, tagged by `type` with its params under
11999
+ * `data` (the same `{type, data}` envelope the activity log and outbox event use).
11661
12000
  *
11662
12001
  * Each variant is one notification type carrying its own params struct. The
11663
- * `notifyType` values match [`NotificationEvent`], so the same key drives the
11664
- * member's per-event preferences.
12002
+ * `type` values match `NotificationEvent`, so the same key drives the member's
12003
+ * per-event preferences.
11665
12004
  */
11666
- NotificationPayload: ({
11667
- /** @constant */
11668
- notifyType: "member.invited";
11669
- } & components["schemas"]["MemberInvitedParams"]) | ({
11670
- /** @constant */
11671
- notifyType: "member.joined";
11672
- } & components["schemas"]["MemberJoinedParams"]) | ({
12005
+ NotificationPayload: {
12006
+ data: components["schemas"]["MemberInvitedParams"];
11673
12007
  /** @constant */
11674
- notifyType: "connection.sync.completed";
11675
- } & components["schemas"]["ConnectionSyncCompletedParams"]) | ({
12008
+ type: "member.invited";
12009
+ } | {
12010
+ data: components["schemas"]["MemberJoinedParams"];
11676
12011
  /** @constant */
11677
- notifyType: "connection.sync.failed";
11678
- } & components["schemas"]["ConnectionSyncFailedParams"]) | ({
12012
+ type: "member.joined";
12013
+ } | {
12014
+ data: components["schemas"]["ConnectionSyncCompletedParams"];
11679
12015
  /** @constant */
11680
- notifyType: "pipeline.run.analyzed";
11681
- } & components["schemas"]["PipelineRunAnalyzedParams"]) | ({
12016
+ type: "connection.sync.completed";
12017
+ } | {
12018
+ data: components["schemas"]["ConnectionSyncFailedParams"];
11682
12019
  /** @constant */
11683
- notifyType: "pipeline.run.completed";
11684
- } & components["schemas"]["PipelineRunCompletedParams"]) | ({
12020
+ type: "connection.sync.failed";
12021
+ } | {
12022
+ data: components["schemas"]["PipelineRunAnalyzedParams"];
11685
12023
  /** @constant */
11686
- notifyType: "pipeline.run.failed";
11687
- } & components["schemas"]["PipelineRunFailedParams"]) | ({
12024
+ type: "pipeline.run.analyzed";
12025
+ } | {
12026
+ data: components["schemas"]["PipelineRunCompletedParams"];
11688
12027
  /** @constant */
11689
- notifyType: "system.announcement";
11690
- } & components["schemas"]["SystemAnnouncementParams"]) | ({
12028
+ type: "pipeline.run.completed";
12029
+ } | {
12030
+ data: components["schemas"]["PipelineRunFailedParams"];
11691
12031
  /** @constant */
11692
- notifyType: "system.report";
11693
- } & components["schemas"]["SystemReportParams"]);
12032
+ type: "pipeline.run.failed";
12033
+ };
11694
12034
  /** @description Response for notification settings within a workspace. */
11695
12035
  NotificationSettings: {
11696
12036
  /** @description Notification events to receive in-app. */
@@ -11744,11 +12084,11 @@ interface components {
11744
12084
  /** @description The new password (will be hashed before storage). */
11745
12085
  newPassword: string;
11746
12086
  };
11747
- /** @description Detail of a pattern/dictionary recognition. */
12087
+ /** @description Metadata of a pattern/dictionary recognition, carried by [`Pattern`]. */
11748
12088
  PatternEvent: {
11749
12089
  /**
11750
- * @description Whether contextual analysis (keyword co-occurrence) adjusted the
11751
- * score for this match.
12090
+ * @description Whether contextual analysis (keyword co-occurrence) adjusted the score
12091
+ * for this match.
11752
12092
  */
11753
12093
  contextual: boolean;
11754
12094
  /** @description Name of the pattern that matched (e.g. `"ssn"`, `"email"`). */
@@ -11865,7 +12205,7 @@ interface components {
11865
12205
  * A document's own scope overrides this at detect time; absent here means
11866
12206
  * the document must assert its own.
11867
12207
  */
11868
- defaultScope?: components["schemas"]["ScopeParams"];
12208
+ defaultScope?: components["schemas"]["DocumentContext"];
11869
12209
  /**
11870
12210
  * @description Slugs of workspace policies applied at redaction.
11871
12211
  *
@@ -11946,35 +12286,26 @@ interface components {
11946
12286
  PipelineRunActivityParams: {
11947
12287
  /** @description Slug of the owning pipeline. */
11948
12288
  pipelineSlug: components["schemas"]["Handle"];
11949
- /**
11950
- * Format: uuid
11951
- * @description Id of the run.
11952
- */
11953
- runId: string;
12289
+ /** @description Id of the run. */
12290
+ runId: components["schemas"]["RunId"];
11954
12291
  };
11955
12292
  /** @description Params of a `pipeline.run.analyzed` notification. */
11956
12293
  PipelineRunAnalyzedParams: {
11957
12294
  /** @description Display name of the analyzed file, if known. */
11958
12295
  inputFileName?: string;
11959
12296
  /** @description Slug of the owning pipeline. */
11960
- pipelineSlug: string;
11961
- /**
11962
- * Format: uuid
11963
- * @description Id of the run.
11964
- */
11965
- runId: string;
12297
+ pipelineSlug: components["schemas"]["Handle"];
12298
+ /** @description Id of the run. */
12299
+ runId: components["schemas"]["RunId"];
11966
12300
  };
11967
12301
  /** @description Params of a `pipeline.run.completed` notification. */
11968
12302
  PipelineRunCompletedParams: {
11969
12303
  /** @description Display name of the analyzed file, if known. */
11970
12304
  inputFileName?: string;
11971
12305
  /** @description Slug of the owning pipeline. */
11972
- pipelineSlug: string;
11973
- /**
11974
- * Format: uuid
11975
- * @description Id of the run.
11976
- */
11977
- runId: string;
12306
+ pipelineSlug: components["schemas"]["Handle"];
12307
+ /** @description Id of the run. */
12308
+ runId: components["schemas"]["RunId"];
11978
12309
  };
11979
12310
  /** @description Params of a `pipeline.run.failed` notification. */
11980
12311
  PipelineRunFailedParams: {
@@ -11983,12 +12314,9 @@ interface components {
11983
12314
  /** @description Display name of the analyzed file, if known. */
11984
12315
  inputFileName?: string;
11985
12316
  /** @description Slug of the owning pipeline. */
11986
- pipelineSlug: string;
11987
- /**
11988
- * Format: uuid
11989
- * @description Id of the run.
11990
- */
11991
- runId: string;
12317
+ pipelineSlug: components["schemas"]["Handle"];
12318
+ /** @description Id of the run. */
12319
+ runId: components["schemas"]["RunId"];
11992
12320
  };
11993
12321
  /**
11994
12322
  * @description Generic paginated response wrapper.
@@ -12156,6 +12484,8 @@ interface components {
12156
12484
  * @description Id of the policy.
12157
12485
  */
12158
12486
  policyId: string;
12487
+ /** @description Slug of the policy. */
12488
+ policySlug: components["schemas"]["Handle"];
12159
12489
  };
12160
12490
  /**
12161
12491
  * @description A named governance policy.
@@ -12193,11 +12523,11 @@ interface components {
12193
12523
  * @description Human-readable name. Display-only. Does not key anything.
12194
12524
  *
12195
12525
  * Names the policy in a redaction event's [`Attribution`]
12196
- * when a rule that fired carried no [`AttributionKind::Cited`]
12526
+ * when a rule that fired carried no [`Attribution::Cited`]
12197
12527
  * attribution to render.
12198
12528
  *
12199
12529
  * [`Attribution`]: elide_core::entity::audit::Attribution
12200
- * [`AttributionKind::Cited`]: elide_core::entity::audit::AttributionKind::Cited
12530
+ * [`Attribution::Cited`]: elide_core::entity::audit::Attribution::Cited
12201
12531
  */
12202
12532
  name: string;
12203
12533
  /** @description Ordered rules. First match wins within this policy. */
@@ -12279,26 +12609,29 @@ interface components {
12279
12609
  * @description Why this rule exists: the authority it answers to.
12280
12610
  *
12281
12611
  * The engine renders it into the redaction event's
12282
- * [`Attribution`], so a reviewer sees the provision rather
12283
- * than a bare UUID. `None` falls back to recording the
12284
- * 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.
12285
12616
  *
12286
12617
  * Optional so ad-hoc and hand-authored rules stay cheap to
12287
12618
  * write; the shipped templates set it on every rule.
12288
12619
  *
12289
12620
  * [`Attribution`]: elide_core::entity::audit::Attribution
12290
12621
  */
12291
- attribution?: components["schemas"]["AttributionKind"];
12622
+ attribution?: components["schemas"]["Attribution"];
12292
12623
  /** @description Optional description for reviewers. */
12293
12624
  description?: string;
12294
12625
  /**
12295
12626
  * Format: uuid
12296
- * @description Stable identifier. UUIDv7 recommended. Engine stamps it
12297
- * into the redaction event's [`Attribution::source_id`] so
12298
- * reviewers can trace which rule fired. Every attachment a
12299
- * [`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.
12300
12631
  *
12301
- * [`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.
12302
12635
  */
12303
12636
  id: string;
12304
12637
  /** @description Human-readable name. Display-only. */
@@ -12384,7 +12717,7 @@ interface components {
12384
12717
  *
12385
12718
  * Serialises as an internally-tagged object under `kind`,
12386
12719
  * matching the house pattern for option-bearing enums
12387
- * (`Predicate`, `TextRedaction`, `AnyRedaction`). A caller
12720
+ * (`Predicate`, `TextRedaction`). A caller
12388
12721
  * wire-picks a template as
12389
12722
  * `{"kind": "hipaa_safe_harbor"}` or, for variants with
12390
12723
  * operator options,
@@ -12584,6 +12917,40 @@ interface components {
12584
12917
  /** @description Recognizer's version at the time it ran. */
12585
12918
  version: string;
12586
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
+ };
12587
12954
  /**
12588
12955
  * @description Public view of one recognizer in the engine's NER or LLM
12589
12956
  * lineup.
@@ -12625,6 +12992,45 @@ interface components {
12625
12992
  /** @description Whether to accept or decline the invitation. */
12626
12993
  acceptInvite: boolean;
12627
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
+ };
12628
13034
  /**
12629
13035
  * @description How long a class of data is retained.
12630
13036
  *
@@ -12687,38 +13093,6 @@ interface components {
12687
13093
  */
12688
13094
  redactedDocuments?: components["schemas"]["Retention"];
12689
13095
  };
12690
- /**
12691
- * @description A reviewer-supplied redaction override with the policy
12692
- * authority it draws from.
12693
- *
12694
- * The `policy_id` isn't just for audit: it also picks which
12695
- * per-policy pseudonym vault and per-policy [`KeyProvider`] the
12696
- * override's operator resolves against, so an override using
12697
- * [`Pseudonymize`] or [`HmacHash`] stays consistent with the
12698
- * authoring policy's other rules.
12699
- *
12700
- * [`KeyProvider`]: elide::redaction::operators::KeyProvider
12701
- * [`Pseudonymize`]: elide::redaction::operators::Pseudonymize
12702
- * [`HmacHash`]: elide::redaction::operators::HmacHash
12703
- */
12704
- Review: {
12705
- /**
12706
- * @description The per-modality redaction operators to run for this
12707
- * entity. Overrides whatever the policy set would have
12708
- * picked for the same entity.
12709
- */
12710
- action: components["schemas"]["ModalityRedactions"];
12711
- /**
12712
- * Format: uuid
12713
- * @description The policy whose authority the reviewer exercises. Must
12714
- * match the `id` of a [`PolicyDefinition`] submitted with
12715
- * the anonymize request. The audit event stamps this UUID
12716
- * as the attribution `name`.
12717
- *
12718
- * [`PolicyDefinition`]: elide_governance::PolicyDefinition
12719
- */
12720
- policyId: string;
12721
- };
12722
13096
  /**
12723
13097
  * @description A serializable summary of *which selection rule* bound an operator to an
12724
13098
  * entity — the automatic "why" behind a redaction.
@@ -12959,39 +13333,28 @@ interface components {
12959
13333
  tags?: string[];
12960
13334
  };
12961
13335
  /**
12962
- * @description Caller-asserted scope for one request.
12963
- *
12964
- * A narrower wire projection of `elide::recognition::Scope`:
12965
- * `languages` and `countries` (typed, elide-native), plus
12966
- * elide's [`ScopeMetadata`] block for free-form classification
12967
- * strings (`tags`, `purpose`, `audience`). The engine assembles
12968
- * this plus a server-minted `correlation_id` and a policy-derived
12969
- * 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.
12970
13340
  */
12971
- ScopeParams: {
13341
+ Selection: {
12972
13342
  /**
12973
- * @description Caller-asserted jurisdictions.
12974
- *
12975
- * When non-empty, recognizers that carry per-rule country
12976
- * scopes skip rules that match none of them. An empty list
12977
- * means "any": rules that declare countries still run as a
12978
- * permissive fallback so callers who don't assert a
12979
- * jurisdiction don't lose detections.
13343
+ * @description The author-supplied policy rationale, when the matched rule carried an
13344
+ * [`Attribution`]; `None` otherwise.
12980
13345
  */
12981
- countries?: components["schemas"]["CountryCode"][];
13346
+ attribution?: components["schemas"]["Attribution"];
12982
13347
  /**
12983
- * @description Caller-asserted languages for the analysis.
12984
- *
12985
- * Empty means the caller asserted none, leaving detection
12986
- * (if a language enricher runs) to fill in.
12987
- * @default []
13348
+ * @description Which selection rule chose this operator: the automatic "why" (matched a
13349
+ * label, a tag, a predicate, or the fallback).
12988
13350
  */
12989
- languages?: components["schemas"]["Languages"];
13351
+ matched_by: components["schemas"]["RuleMatch"];
12990
13352
  /**
12991
- * @description Free-form request context: document tags, request purpose,
12992
- * 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.
12993
13356
  */
12994
- metadata?: components["schemas"]["ScopeMetadata"];
13357
+ operator: components["schemas"]["OperatorId"];
12995
13358
  };
12996
13359
  /** @description Request to send a message and stream the assistant's reply. */
12997
13360
  SendChatMessage: {
@@ -13135,6 +13498,24 @@ interface components {
13135
13498
  */
13136
13499
  totalBytes: number;
13137
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
+ };
13138
13519
  /**
13139
13520
  * @description Request payload to trigger a connection sync.
13140
13521
  *
@@ -13216,18 +13597,27 @@ interface components {
13216
13597
  * to track whether a run was manually triggered, scheduled, or triggered by a webhook.
13217
13598
  */
13218
13599
  SyncTriggerType: "manual" | "scheduled" | "webhook";
13219
- /** @description Params of a `system.announcement` notification. */
13220
- SystemAnnouncementParams: {
13221
- /** @description Announcement message key or body. */
13222
- message: string;
13223
- };
13224
- /** @description Params of a `system.report` notification. */
13225
- SystemReportParams: {
13226
- /**
13227
- * Format: uuid
13228
- * @description Id of the generated report, if any.
13229
- */
13230
- reportId?: string;
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;
13231
13621
  };
13232
13622
  /**
13233
13623
  * @description One node in an entity's audit DAG: a thing that happened, with its
@@ -13304,115 +13694,70 @@ interface components {
13304
13694
  * @description Kind of an [`AuditEvent`], carrying its event-specific detail and the
13305
13695
  * rationale for why it happened.
13306
13696
  *
13307
- * `#[non_exhaustive]`: new event kinds (verification, annotation, …)
13308
- * can be added compatibly. The recognition kinds ([`Pattern`],
13309
- * [`Model`]) carry the matched [`Location`]; the rest carry their own
13310
- * data.
13311
- *
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
13312
13717
  * [`Pattern`]: AuditKind::Pattern
13313
13718
  * [`Model`]: AuditKind::Model
13314
13719
  * [`Location`]: Modality::Location
13315
13720
  */
13316
13721
  TabularAuditKind: {
13722
+ detail: components["schemas"]["TabularPattern"];
13317
13723
  /** @constant */
13318
13724
  kind: "pattern";
13319
- /** @description Where the recognizer matched. */
13320
- location: components["schemas"]["TabularLocation"];
13321
- /** @description Pattern detail. */
13322
- pattern: components["schemas"]["PatternEvent"];
13323
13725
  } | {
13726
+ detail: components["schemas"]["TabularModel"];
13324
13727
  /** @constant */
13325
13728
  kind: "model";
13326
- /** @description Where the recognizer matched. */
13327
- location: components["schemas"]["TabularLocation"];
13328
- /** @description Model detail. */
13329
- model: components["schemas"]["ModelEvent"];
13330
13729
  } | {
13730
+ detail: components["schemas"]["Deduplication"];
13331
13731
  /** @constant */
13332
13732
  kind: "deduplication";
13333
- /** @description Name of the fusion strategy that combined them. */
13334
- strategy: string;
13335
13733
  } | {
13336
- /** @description The loser's confidence at resolution time. */
13337
- competing_confidence: components["schemas"]["Confidence"];
13338
- /** @description The label of the detection that lost arbitration. */
13339
- competing_label: components["schemas"]["LabelRef"];
13734
+ detail: components["schemas"]["Conflict"];
13340
13735
  /** @constant */
13341
13736
  kind: "conflict";
13342
- /** @description Name of the conflict policy that chose the winner. */
13343
- resolved_by: string;
13344
13737
  } | {
13345
- /** @description The competing detection's confidence. */
13346
- competing_confidence: components["schemas"]["Confidence"];
13347
- /** @description The label of the competing detection. */
13348
- competing_label: components["schemas"]["LabelRef"];
13349
- /** @description Name of the policy that flagged the contest. */
13350
- flagged_by: string;
13738
+ detail: components["schemas"]["Contested"];
13351
13739
  /** @constant */
13352
13740
  kind: "contested";
13353
13741
  } | {
13354
- /**
13355
- * Format: double
13356
- * @description Multiplier applied.
13357
- */
13358
- factor: number;
13742
+ detail: components["schemas"]["Calibration"];
13359
13743
  /** @constant */
13360
13744
  kind: "calibration";
13361
- } | {
13362
- /**
13363
- * @description The located [`Hint`] the keyword fired from, when the match came
13364
- * from an out-of-band hint (a column header, a key) rather than
13365
- * the in-text word window. `None` for an in-text-window match.
13366
- *
13367
- * [`Hint`]: crate::modality::Hint
13368
- */
13369
- hint?: components["schemas"]["TabularHint"];
13370
- /** @description Keyword that fired the boost. */
13371
- keyword: string;
13372
- /** @constant */
13373
- kind: "refinement";
13374
- /**
13375
- * @description Where the boosting keyword sits in the medium. For a hint match
13376
- * this mirrors the hint's own location; for an in-text-window match
13377
- * it is the keyword resolved through the modality's [`locate`] (a
13378
- * pixel box for image, a time span for audio, the byte range for
13379
- * text/tabular). `None` when the keyword's stream range could not be
13380
- * placed, symmetric with a match the recognizer itself drops.
13381
- *
13382
- * [`locate`]: crate::modality::TextRecognizable::locate
13383
- */
13384
- location?: components["schemas"]["TabularLocation"];
13385
- } | {
13386
- /**
13387
- * @description The author-supplied policy rationale, when the operator carried an
13388
- * [`Attribution`]; `None` otherwise.
13389
- */
13390
- attribution?: components["schemas"]["Attribution"];
13391
- /** @description Identifier of the key needed to reverse it, if reversible. */
13392
- key_id?: string;
13745
+ } | {
13746
+ detail: components["schemas"]["TabularRefinement"];
13747
+ /** @constant */
13748
+ kind: "refinement";
13749
+ } | {
13750
+ detail: components["schemas"]["Redaction"];
13393
13751
  /** @constant */
13394
13752
  kind: "redaction";
13395
- /** @description How much the output leaks about the original. */
13396
- leak_profile: components["schemas"]["LeakProfile"];
13397
- /**
13398
- * @description Which selection rule chose this operator: the automatic "why"
13399
- * (matched a label, a tag, a predicate, or the fallback).
13400
- */
13401
- matched_by: components["schemas"]["RuleMatch"];
13402
- /** @description Which operator (name + version) ran. */
13403
- operator: components["schemas"]["OperatorId"];
13404
- /**
13405
- * @description BLAKE3 digest of the original text the operator hid, when the
13406
- * redaction layer recorded it. Proves *what* was redacted without
13407
- * storing the plaintext; `None` when the operator did not capture it.
13408
- */
13409
- span_hash?: components["schemas"]["AuditHash"];
13410
- /**
13411
- * Format: uint32
13412
- * @description Byte length of the original text the operator hid, paired with
13413
- * [`span_hash`](Self::Redaction::span_hash). `None` when not captured.
13414
- */
13415
- 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";
13416
13761
  };
13417
13762
  /**
13418
13763
  * @description Full audit trail of an [`Entity`]: every [`AuditEvent`] in its life, as a
@@ -13451,6 +13796,26 @@ interface components {
13451
13796
  * [`verify`]: Self::verify
13452
13797
  */
13453
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"]);
13454
13819
  /**
13455
13820
  * @description Detected piece of sensitive information within some medium.
13456
13821
  *
@@ -13479,7 +13844,12 @@ interface components {
13479
13844
  TabularEntity: {
13480
13845
  /**
13481
13846
  * @description Tamper-evident audit trail: every contributing detection, the fusion
13482
- * 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
13483
13853
  */
13484
13854
  audit: components["schemas"]["TabularAuditLog"];
13485
13855
  /** @description Effective confidence in `0.0..=1.0` (fused, if applicable). */
@@ -13524,30 +13894,6 @@ interface components {
13524
13894
  */
13525
13895
  recognized_range?: components["schemas"]["Range_of_uint"];
13526
13896
  };
13527
- /**
13528
- * @description One recognized entity plus the optional reviewer override.
13529
- *
13530
- * The bound mirrors elide's [`Entity<M>`]: serialization needs
13531
- * `M::Location` and `M::Data` (de)serializable, and JsonSchema
13532
- * derivation needs them schema-able. All four modalities elide
13533
- * ships satisfy these under the `serde` + `schema` features.
13534
- */
13535
- TabularEntityRecord: {
13536
- /** @description The elide entity, as recognition produced it. */
13537
- entity: components["schemas"]["TabularEntity"];
13538
- /**
13539
- * @description Reviewer-supplied redaction override.
13540
- *
13541
- * `None` means "use the matching policy rule's decision";
13542
- * `Some(...)` overrides that rule for this specific entity
13543
- * at apply time. Reviewer overrides take precedence over
13544
- * every policy rule and inherit the authority of the
13545
- * [`Review::policy_id`] they name: the audit event's
13546
- * attribution stamps that policy so the trail names the
13547
- * authority under which the override fired.
13548
- */
13549
- review?: components["schemas"]["Review"];
13550
- };
13551
13897
  /**
13552
13898
  * @description Located, typed piece of context a recognizer may treat as in-context
13553
13899
  * for a nearby value.
@@ -13618,6 +13964,85 @@ interface components {
13618
13964
  */
13619
13965
  start_offset?: number;
13620
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
+ };
13621
14046
  /** @description Operator spec a `redact` tabular rule carries. */
13622
14047
  TabularRedaction: {
13623
14048
  /** @constant */
@@ -13635,6 +14060,55 @@ interface components {
13635
14060
  /** @constant */
13636
14061
  kind: "drop_column";
13637
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
+ };
13638
14112
  /**
13639
14113
  * @description The template a [`PolicyDefinition`] was built from.
13640
14114
  *
@@ -13727,6 +14201,28 @@ interface components {
13727
14201
  */
13728
14202
  payload?: unknown;
13729
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
+ };
13730
14226
  /**
13731
14227
  * @description One node in an entity's audit DAG: a thing that happened, with its
13732
14228
  * effect on confidence and its tamper-evident links.
@@ -13802,115 +14298,70 @@ interface components {
13802
14298
  * @description Kind of an [`AuditEvent`], carrying its event-specific detail and the
13803
14299
  * rationale for why it happened.
13804
14300
  *
13805
- * `#[non_exhaustive]`: new event kinds (verification, annotation, …)
13806
- * can be added compatibly. The recognition kinds ([`Pattern`],
13807
- * [`Model`]) carry the matched [`Location`]; the rest carry their own
13808
- * data.
13809
- *
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
13810
14321
  * [`Pattern`]: AuditKind::Pattern
13811
14322
  * [`Model`]: AuditKind::Model
13812
14323
  * [`Location`]: Modality::Location
13813
14324
  */
13814
14325
  TextAuditKind: {
14326
+ detail: components["schemas"]["TextPattern"];
13815
14327
  /** @constant */
13816
14328
  kind: "pattern";
13817
- /** @description Where the recognizer matched. */
13818
- location: components["schemas"]["TextLocation"];
13819
- /** @description Pattern detail. */
13820
- pattern: components["schemas"]["PatternEvent"];
13821
14329
  } | {
14330
+ detail: components["schemas"]["TextModel"];
13822
14331
  /** @constant */
13823
14332
  kind: "model";
13824
- /** @description Where the recognizer matched. */
13825
- location: components["schemas"]["TextLocation"];
13826
- /** @description Model detail. */
13827
- model: components["schemas"]["ModelEvent"];
13828
14333
  } | {
14334
+ detail: components["schemas"]["Deduplication"];
13829
14335
  /** @constant */
13830
14336
  kind: "deduplication";
13831
- /** @description Name of the fusion strategy that combined them. */
13832
- strategy: string;
13833
14337
  } | {
13834
- /** @description The loser's confidence at resolution time. */
13835
- competing_confidence: components["schemas"]["Confidence"];
13836
- /** @description The label of the detection that lost arbitration. */
13837
- competing_label: components["schemas"]["LabelRef"];
14338
+ detail: components["schemas"]["Conflict"];
13838
14339
  /** @constant */
13839
14340
  kind: "conflict";
13840
- /** @description Name of the conflict policy that chose the winner. */
13841
- resolved_by: string;
13842
14341
  } | {
13843
- /** @description The competing detection's confidence. */
13844
- competing_confidence: components["schemas"]["Confidence"];
13845
- /** @description The label of the competing detection. */
13846
- competing_label: components["schemas"]["LabelRef"];
13847
- /** @description Name of the policy that flagged the contest. */
13848
- flagged_by: string;
14342
+ detail: components["schemas"]["Contested"];
13849
14343
  /** @constant */
13850
14344
  kind: "contested";
13851
14345
  } | {
13852
- /**
13853
- * Format: double
13854
- * @description Multiplier applied.
13855
- */
13856
- factor: number;
14346
+ detail: components["schemas"]["Calibration"];
13857
14347
  /** @constant */
13858
14348
  kind: "calibration";
13859
14349
  } | {
13860
- /**
13861
- * @description The located [`Hint`] the keyword fired from, when the match came
13862
- * from an out-of-band hint (a column header, a key) rather than
13863
- * the in-text word window. `None` for an in-text-window match.
13864
- *
13865
- * [`Hint`]: crate::modality::Hint
13866
- */
13867
- hint?: components["schemas"]["TextHint"];
13868
- /** @description Keyword that fired the boost. */
13869
- keyword: string;
14350
+ detail: components["schemas"]["TextRefinement"];
13870
14351
  /** @constant */
13871
14352
  kind: "refinement";
13872
- /**
13873
- * @description Where the boosting keyword sits in the medium. For a hint match
13874
- * this mirrors the hint's own location; for an in-text-window match
13875
- * it is the keyword resolved through the modality's [`locate`] (a
13876
- * pixel box for image, a time span for audio, the byte range for
13877
- * text/tabular). `None` when the keyword's stream range could not be
13878
- * placed, symmetric with a match the recognizer itself drops.
13879
- *
13880
- * [`locate`]: crate::modality::TextRecognizable::locate
13881
- */
13882
- location?: components["schemas"]["TextLocation"];
13883
14353
  } | {
13884
- /**
13885
- * @description The author-supplied policy rationale, when the operator carried an
13886
- * [`Attribution`]; `None` otherwise.
13887
- */
13888
- attribution?: components["schemas"]["Attribution"];
13889
- /** @description Identifier of the key needed to reverse it, if reversible. */
13890
- key_id?: string;
14354
+ detail: components["schemas"]["Redaction"];
13891
14355
  /** @constant */
13892
14356
  kind: "redaction";
13893
- /** @description How much the output leaks about the original. */
13894
- leak_profile: components["schemas"]["LeakProfile"];
13895
- /**
13896
- * @description Which selection rule chose this operator: the automatic "why"
13897
- * (matched a label, a tag, a predicate, or the fallback).
13898
- */
13899
- matched_by: components["schemas"]["RuleMatch"];
13900
- /** @description Which operator (name + version) ran. */
13901
- operator: components["schemas"]["OperatorId"];
13902
- /**
13903
- * @description BLAKE3 digest of the original text the operator hid, when the
13904
- * redaction layer recorded it. Proves *what* was redacted without
13905
- * storing the plaintext; `None` when the operator did not capture it.
13906
- */
13907
- span_hash?: components["schemas"]["AuditHash"];
13908
- /**
13909
- * Format: uint32
13910
- * @description Byte length of the original text the operator hid, paired with
13911
- * [`span_hash`](Self::Redaction::span_hash). `None` when not captured.
13912
- */
13913
- 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";
13914
14365
  };
13915
14366
  /**
13916
14367
  * @description Full audit trail of an [`Entity`]: every [`AuditEvent`] in its life, as a
@@ -13960,6 +14411,26 @@ interface components {
13960
14411
  * several recognizers.
13961
14412
  */
13962
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"]);
13963
14434
  /**
13964
14435
  * @description Detected piece of sensitive information within some medium.
13965
14436
  *
@@ -13988,7 +14459,12 @@ interface components {
13988
14459
  TextEntity: {
13989
14460
  /**
13990
14461
  * @description Tamper-evident audit trail: every contributing detection, the fusion
13991
- * 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
13992
14468
  */
13993
14469
  audit: components["schemas"]["TextAuditLog"];
13994
14470
  /** @description Effective confidence in `0.0..=1.0` (fused, if applicable). */
@@ -14033,30 +14509,6 @@ interface components {
14033
14509
  */
14034
14510
  recognized_range?: components["schemas"]["Range_of_uint"];
14035
14511
  };
14036
- /**
14037
- * @description One recognized entity plus the optional reviewer override.
14038
- *
14039
- * The bound mirrors elide's [`Entity<M>`]: serialization needs
14040
- * `M::Location` and `M::Data` (de)serializable, and JsonSchema
14041
- * derivation needs them schema-able. All four modalities elide
14042
- * ships satisfy these under the `serde` + `schema` features.
14043
- */
14044
- TextEntityRecord: {
14045
- /** @description The elide entity, as recognition produced it. */
14046
- entity: components["schemas"]["TextEntity"];
14047
- /**
14048
- * @description Reviewer-supplied redaction override.
14049
- *
14050
- * `None` means "use the matching policy rule's decision";
14051
- * `Some(...)` overrides that rule for this specific entity
14052
- * at apply time. Reviewer overrides take precedence over
14053
- * every policy rule and inherit the authority of the
14054
- * [`Review::policy_id`] they name: the audit event's
14055
- * attribution stamps that policy so the trail names the
14056
- * authority under which the override fired.
14057
- */
14058
- review?: components["schemas"]["Review"];
14059
- };
14060
14512
  /**
14061
14513
  * @description Located, typed piece of context a recognizer may treat as in-context
14062
14514
  * for a nearby value.
@@ -14106,6 +14558,85 @@ interface components {
14106
14558
  */
14107
14559
  source?: components["schemas"]["SourceRef"][];
14108
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
+ };
14109
14640
  /** @description Operator spec a `redact` text rule carries. */
14110
14641
  TextRedaction: {
14111
14642
  /** @constant */
@@ -14252,6 +14783,55 @@ interface components {
14252
14783
  */
14253
14784
  style?: components["schemas"]["DateStyle"];
14254
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
+ };
14255
14835
  /**
14256
14836
  * @description Half-open `[start, end)` stream interval, measured in microseconds.
14257
14837
  *
@@ -14602,11 +15182,10 @@ interface components {
14602
15182
  };
14603
15183
  /** @description Params of a webhook activity (`webhook.*`). */
14604
15184
  WebhookActivityParams: {
14605
- /**
14606
- * Format: uuid
14607
- * @description Id of the webhook.
14608
- */
14609
- webhookId: string;
15185
+ /** @description Id of the webhook. */
15186
+ webhookId: components["schemas"]["WebhookId"];
15187
+ /** @description Display name of the webhook. */
15188
+ webhookName: string;
14610
15189
  };
14611
15190
  /**
14612
15191
  * @description Webhook creation response that includes the secret (visible only once).
@@ -14886,7 +15465,9 @@ type AccountRef = Schemas$22["AccountRef"];
14886
15465
  type Schemas$21 = components["schemas"];
14887
15466
  type Activity = Schemas$21["Activity"];
14888
15467
  type ActivityPage = Schemas$21["ActivityPage"];
14889
- type ActivityExportQuery = Schemas$21["ActivityExportQuery"];
15468
+ type ActivityType = Schemas$21["ActivityType"];
15469
+ type ActivityFilterQuery = Schemas$21["ActivityFilterQuery"];
15470
+ type ActivityExportOptions = Schemas$21["ActivityExportOptions"];
14890
15471
  type ActivityPayload = Schemas$21["ActivityPayload"];
14891
15472
  type WorkspaceActivityParams = Schemas$21["WorkspaceActivityParams"];
14892
15473
  type MemberActivityParams = Schemas$21["MemberActivityParams"];
@@ -14928,18 +15509,29 @@ type ApiTokenPage = Schemas$19["ApiTokenPage"];
14928
15509
  //#endregion
14929
15510
  //#region src/datatypes/audit.d.ts
14930
15511
  type Schemas$18 = components["schemas"];
14931
- type EntityGroup = Schemas$18["EntityGroup"];
14932
- type AuditContext = Schemas$18["AuditContext"];
15512
+ type Audit = Schemas$18["Audit"];
15513
+ type DocumentContext = Schemas$18["DocumentContext"];
15514
+ type CodecParams = Schemas$18["CodecParams"];
14933
15515
  type EntityCoRef = Schemas$18["EntityCoRef"];
15516
+ type Report = Schemas$18["Report"];
15517
+ type EditSet = Schemas$18["EditSet"];
14934
15518
  type RasterMode = Schemas$18["RasterMode"];
14935
15519
  type Dpi = Schemas$18["Dpi"];
14936
- type Review = Schemas$18["Review"];
14937
- type Attribution = Schemas$18["Attribution"];
14938
- 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"];
14939
15524
  type LeakProfile = Schemas$18["LeakProfile"];
14940
15525
  type RuleMatch = Schemas$18["RuleMatch"];
15526
+ type Attribution = Schemas$18["Attribution"];
15527
+ type CitedAttribution = Schemas$18["CitedAttribution"];
15528
+ type FreeformAttribution = Schemas$18["FreeformAttribution"];
14941
15529
  type ModelEvent = Schemas$18["ModelEvent"];
14942
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"];
14943
15535
  type OperatorId = Schemas$18["OperatorId"];
14944
15536
  type AuditHash = Schemas$18["AuditHash"];
14945
15537
  type Category = Schemas$18["Category"];
@@ -14952,36 +15544,64 @@ type Polygon = Schemas$18["Polygon"];
14952
15544
  type Dimensions = Schemas$18["Dimensions"];
14953
15545
  type TimeSpan = Schemas$18["TimeSpan"];
14954
15546
  type TextEntity = Schemas$18["TextEntity"];
14955
- type TextEntityRecord = Schemas$18["TextEntityRecord"];
14956
15547
  type TextAuditEvent = Schemas$18["TextAuditEvent"];
14957
15548
  type TextAuditKind = Schemas$18["TextAuditKind"];
15549
+ type TextAuditLog = Schemas$18["TextAuditLog"];
14958
15550
  type TextHint = Schemas$18["TextHint"];
14959
15551
  type TextLocation = Schemas$18["TextLocation"];
14960
- type TextAuditLog = Schemas$18["TextAuditLog"];
14961
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"];
14962
15561
  type ImageEntity = Schemas$18["ImageEntity"];
14963
- type ImageEntityRecord = Schemas$18["ImageEntityRecord"];
14964
15562
  type ImageAuditEvent = Schemas$18["ImageAuditEvent"];
14965
15563
  type ImageAuditKind = Schemas$18["ImageAuditKind"];
15564
+ type ImageAuditLog = Schemas$18["ImageAuditLog"];
14966
15565
  type ImageHint = Schemas$18["ImageHint"];
14967
15566
  type ImageLocation = Schemas$18["ImageLocation"];
14968
- type ImageAuditLog = Schemas$18["ImageAuditLog"];
14969
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"];
14970
15576
  type AudioEntity = Schemas$18["AudioEntity"];
14971
- type AudioEntityRecord = Schemas$18["AudioEntityRecord"];
14972
15577
  type AudioAuditEvent = Schemas$18["AudioAuditEvent"];
14973
15578
  type AudioAuditKind = Schemas$18["AudioAuditKind"];
15579
+ type AudioAuditLog = Schemas$18["AudioAuditLog"];
14974
15580
  type AudioHint = Schemas$18["AudioHint"];
14975
15581
  type AudioLocation = Schemas$18["AudioLocation"];
14976
- type AudioAuditLog = Schemas$18["AudioAuditLog"];
14977
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"];
14978
15591
  type TabularEntity = Schemas$18["TabularEntity"];
14979
- type TabularEntityRecord = Schemas$18["TabularEntityRecord"];
14980
15592
  type TabularAuditEvent = Schemas$18["TabularAuditEvent"];
14981
15593
  type TabularAuditKind = Schemas$18["TabularAuditKind"];
15594
+ type TabularAuditLog = Schemas$18["TabularAuditLog"];
14982
15595
  type TabularHint = Schemas$18["TabularHint"];
14983
15596
  type TabularLocation = Schemas$18["TabularLocation"];
14984
- 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"];
14985
15605
  //#endregion
14986
15606
  //#region src/datatypes/auth.d.ts
14987
15607
  type Schemas$17 = components["schemas"];
@@ -15103,8 +15723,6 @@ type ConnectionSyncFailedParams = Schemas$7["ConnectionSyncFailedParams"];
15103
15723
  type PipelineRunAnalyzedParams = Schemas$7["PipelineRunAnalyzedParams"];
15104
15724
  type PipelineRunCompletedParams = Schemas$7["PipelineRunCompletedParams"];
15105
15725
  type PipelineRunFailedParams = Schemas$7["PipelineRunFailedParams"];
15106
- type SystemAnnouncementParams = Schemas$7["SystemAnnouncementParams"];
15107
- type SystemReportParams = Schemas$7["SystemReportParams"];
15108
15726
  //#endregion
15109
15727
  //#region src/datatypes/pagination.d.ts
15110
15728
  type Schemas$6 = components["schemas"];
@@ -15172,11 +15790,9 @@ type PipelineRunStatus = Schemas$3["PipelineRunStatus"];
15172
15790
  type PipelineRunPage = Schemas$3["PipelineRunPage"];
15173
15791
  type PipelineRunsQuery = Schemas$3["PipelineRunsQuery"];
15174
15792
  type RunStatusEvent = Schemas$3["RunStatusEvent"];
15175
- type Audit = Schemas$3["Audit"];
15176
15793
  //#endregion
15177
15794
  //#region src/datatypes/scope.d.ts
15178
15795
  type Schemas$2 = components["schemas"];
15179
- type ScopeParams = Schemas$2["ScopeParams"];
15180
15796
  type ScopeMetadata = Schemas$2["ScopeMetadata"];
15181
15797
  type CountryCode = Schemas$2["CountryCode"];
15182
15798
  type Language = Schemas$2["Language"];
@@ -15211,5 +15827,5 @@ type Retention = Schemas["Retention"];
15211
15827
  type RetentionSettings = Schemas["RetentionSettings"];
15212
15828
  type RetentionOverride = Schemas["RetentionOverride"];
15213
15829
  //#endregion
15214
- export { LabelRef as $, ChatRole as $n, TabularHint as $r, UpdateMember as $t, CreatePipelineRun as A, UsageReport as Ai, Connection as An, ImageAuditKind as Ar, CursorPagination as At, Color as B, PipelineActivityParams as Bi, LlmConfig as Bn, PatternEvent as Br, NotificationSettings as Bt, Language as C, RunStatusEntry as Ci, DateWindow as Cn, BoundingBox as Cr, PipelineDefinition as Ct, ScopeMetadata as D, TokenCounts as Di, ValidationErrorDetail as Dn, EntityCoRef as Dr, PipelineSummaryPage as Dt, Languages as E, StorageKindEntry as Ei, ErrorResponse as En, Dpi as Er, PipelineSummary as Et, RunId as F, ActivityPayload as Fi, ConnectionSyncPage as Fn, ImageHint as Fr, MemberJoinedParams as Ft, GdprArticle9Treatment as G, Account as Gi, SyncDeletionPolicy as Gn, Review as Gr, SystemReportParams as Gt, CreatePolicy as H, PolicyActivityParams as Hi, S3Credentials as Hn, Polygon as Hr, PipelineRunCompletedParams as Ht, RunMetadata as I, ConnectionActivityParams as Ii, ConnectionVerification as In, ImageLocation as Ir, Notification as It, HipaaDeidMethod as J, PasswordChange as Ji, SyncScheduleInput as Jn, TabularAuditEvent as Jr, UpdateNotificationSettings as Jt, GdprSensitiveScope as K, AccountRef as Ki, SyncMode as Kn, RuleMatch as Kr, UnreadCountEvent as Kt, RunStatusEvent as L, FileActivityParams as Li, ConnectionsQuery as Ln, LeakProfile as Lr, NotificationEvent as Lt, PipelineRunPage as M, Activity as Mi, ConnectionId as Mn, ImageData as Mr, ConnectionSyncFailedParams as Mt, PipelineRunStatus as N, ActivityExportQuery as Ni, ConnectionPage as Nn, ImageEntity as Nr, MarkedReadStatus as Nt, ScopeParams as O, Usage as Oi, AnthropicCredentials as On, EntityGroup as Or, PipelineTriggerType as Ot, PipelineRunsQuery as P, ActivityPage as Pi, ConnectionSync as Pn, ImageEntityRecord as Pr, MemberInvitedParams as Pt, LabelLocale as Q, ChatMessage as Qn, TabularEntityRecord as Qr, MemberSortField as Qt, AudioRedaction as R, InviteActivityParams as Ri, CreateConnection as Rn, ModelEvent as Rr, NotificationPage as Rt, CountryCode as S, RunDayEntry as Si, UpdateFile as Sn, AuditHash as Sr, Pipeline as St, LanguageSpan as T, StorageAnalytics as Ti, ExportQuery as Tn, Dimensions as Tr, PipelineStatus as Tt, DateGranularity as U, WebhookActivityParams as Ui, StorageConfig as Un, RangeOfUint as Ur, PipelineRunFailedParams as Ut, ConfidenceThreshold as V, PipelineRunActivityParams as Vi, OpenAiCredentials as Vn, Point as Vr, PipelineRunAnalyzedParams as Vt, DateStyle as W, WorkspaceActivityParams as Wi, SyncConnection as Wn, RasterMode as Wr, SystemAnnouncementParams as Wt, Label as X, UpdateAccount as Xi, SyncTriggerType as Xn, TabularAuditLog as Xr, Member as Xt, ImageRedaction as Y, PublicAccount as Yi, SyncStatus as Yn, TabularAuditKind as Yr, ListMembers as Yt, LabelEntry as Z, paths as Zi, UpdateConnection as Zn, TabularEntity as Zr, MemberPage as Zt, WebhookId as _, ModelUsage as _i, FileKind as _n, AudioEntity as _r, TerminalFallback as _t, RetentionSettings as a, TextEntity as ai, InvitePage as an, LabelCatalog as ar, PciPanRender as at, WebhookStatus as b, RecognizerId as bi, ListFiles as bn, AudioLocation as br, Waveform as bt, WorkspacePage as c, TextLocation as ci, InviteSortField as cn, AuthToken as cr, PolicyDraft as ct, CreateWebhook as d, ApiTokenPage as di, ReplyInvite as dn, Attribution as dr, PolicySummaryPage as dt, TabularLocation as ei, CreateInvite as en, ChatSession as er, LabelScope as et, TestWebhook as f, ApiTokenType as fi, SortOrder as fn, AttributionKind as fr, PolicyTemplate as ft, WebhookEvent as g, UpdateApiToken as gi, File as gn, AudioData as gr, TemplateOrigin as gt, WebhookCreated as h, TokenExpiration as hi, HealthStatus as hn, AudioAuditLog as hr, TabularRedaction as ht, RetentionOverride as i, TextData as ii, InviteExpiration as in, SendChatMessage as ir, PciDssPart as it, PipelineRun as j, WorkspaceAnalytics as ji, ConnectionConfig as jn, ImageAuditLog as jr, ConnectionSyncCompletedParams as jt, Audit as k, UsageAnalytics as ki, AzureCredentials as kn, ImageAuditEvent as kr, UpdatePipeline as kt, WorkspaceRole as l, TimeSpan as li, InviteStatus as ln, Login as lr, PolicyRule as lt, Webhook as m, CreateApiToken as mi, Health as mn, AudioAuditKind as mr, Sha2Algorithm as mt, OcrPolicy as n, TextAuditKind as ni, Invite as nn, ChatToken as nr, LocalizedText as nt, UpdateWorkspace as o, TextEntityRecord as oi, InvitePreview as on, RecognizerCatalog as or, Policy as ot, UpdateWebhook as p, ApiTokenWithJWT as pi, ComponentHealth as pn, AudioAuditEvent as pr, Predicate as pt, HipaaAccountNumbers as q, Handle as qi, SyncSchedule as qn, SourceRef as qr, UnreadStatus as qt, Retention as r, TextAuditLog as ri, InviteCode as rn, CreateChatSession as rr, ModalityRedactions as rt, Workspace as s, TextHint as si, InviteSent as sn, RegisteredRecognizer as sr, PolicyDefinition as st, CreateWorkspace as t, TextAuditEvent as ti, GenerateInviteCode as tn, ChatSessionPage as tr, LanguageTag as tt, WorkspaceSettings as u, ApiToken as ui, ListInvites as un, Signup as ur, PolicySummary as ut, WebhookPage as v, ModelUsageEntry as vi, FilePage as vn, AudioEntityRecord as vr, TextRedaction as vt, LanguageProvenance as w, RunTimeSeries as wi, ExportFormat as wn, Category as wr, PipelineFilter as wt, Confidence as x, RunAnalytics as xi, ModalityToken as xn, AuditContext as xr, CreatePipeline as xt, WebhookResult as y, ProviderType as yi, FormatToken as yn, AudioHint as yr, UpdatePolicy as yt, ClampBucket as z, MemberActivityParams as zi, GcsCredentials as zn, OperatorId as zr, NotificationPayload as zt };
15215
- //# sourceMappingURL=index-CiQYVPsR.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