@nvisy/sdk 0.33.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1227,23 +1227,30 @@ interface paths {
1227
1227
  };
1228
1228
  /**
1229
1229
  * List workspace activities
1230
- * @description Returns the workspace's activity log, most recent first, cursor-paginated. Optional filters: `type` (repeatable, e.g. `file.created`), `actor` (an account id), and a `from`/`to` day range (each bound narrows only when given; the feed is otherwise all-time).
1230
+ * @description Returns the workspace's activity log, most recent first, cursor-paginated. Optional filters: `type` (repeatable, e.g. `file.created`), `actor` (a username), and a `from`/`to` day range (each bound narrows only when given; the feed is otherwise all-time).
1231
1231
  */
1232
1232
  get: {
1233
1233
  parameters: {
1234
1234
  query?: {
1235
- /** @description Keep only activities performed by this account. Omit for any actor. */
1236
- actor?: string;
1235
+ /** @description Username of the account whose activities to keep. Omit for any actor. */
1236
+ actor?: components["schemas"]["Handle"];
1237
1237
  /**
1238
- * @description Cursor pointing to the last item of the previous page.
1239
- * Obtain this from the `nextCursor` field in the response.
1238
+ * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
1239
+ * parameter for several; omit for no type constraint.
1240
1240
  */
1241
- after?: string;
1241
+ type?: components["schemas"]["ActivityType"][];
1242
1242
  /**
1243
1243
  * @description First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the range
1244
1244
  * spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
1245
1245
  */
1246
1246
  from?: string;
1247
+ /** @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC). */
1248
+ to?: string;
1249
+ /**
1250
+ * @description Cursor pointing to the last item of the previous page.
1251
+ * Obtain this from the `nextCursor` field in the response.
1252
+ */
1253
+ after?: string;
1247
1254
  /**
1248
1255
  * @description Whether to include the total item count in the response's `total` field.
1249
1256
  * Defaults to `false`, since counting is an extra query; set it to `true`
@@ -1252,14 +1259,6 @@ interface paths {
1252
1259
  includeCount?: boolean;
1253
1260
  /** @description The maximum number of records to return (1-100, default: 20). */
1254
1261
  limit?: number;
1255
- /** @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC). */
1256
- to?: string;
1257
- /**
1258
- * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
1259
- * parameter for several; omit for no type constraint. The field is `types`
1260
- * since `type` is a reserved word.
1261
- */
1262
- type?: components["schemas"]["ActivityType"][];
1263
1262
  };
1264
1263
  header?: never;
1265
1264
  path: {
@@ -1339,10 +1338,13 @@ interface paths {
1339
1338
  get: {
1340
1339
  parameters: {
1341
1340
  query?: {
1342
- /** @description Keep only activities performed by this account. Omit for any actor. */
1343
- actor?: string;
1344
- /** @description Output format; defaults to `csv`. */
1345
- format?: components["schemas"]["ExportFormat"];
1341
+ /** @description Username of the account whose activities to keep. Omit for any actor. */
1342
+ actor?: components["schemas"]["Handle"];
1343
+ /**
1344
+ * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
1345
+ * parameter for several; omit for no type constraint.
1346
+ */
1347
+ type?: components["schemas"]["ActivityType"][];
1346
1348
  /**
1347
1349
  * @description First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the range
1348
1350
  * spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
@@ -1350,12 +1352,8 @@ interface paths {
1350
1352
  from?: string;
1351
1353
  /** @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC). */
1352
1354
  to?: string;
1353
- /**
1354
- * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
1355
- * parameter for several; omit for no type constraint. The field is `types`
1356
- * since `type` is a reserved word.
1357
- */
1358
- type?: components["schemas"]["ActivityType"][];
1355
+ /** @description Output format; defaults to `csv`. */
1356
+ format?: components["schemas"]["ExportFormat"];
1359
1357
  };
1360
1358
  header?: never;
1361
1359
  path: {
@@ -1576,7 +1574,7 @@ interface paths {
1576
1574
  [name: string]: unknown;
1577
1575
  };
1578
1576
  content: {
1579
- "application/json": components["schemas"]["RunTimeSeries"];
1577
+ "application/json": components["schemas"]["DetectionTimeSeries"];
1580
1578
  };
1581
1579
  };
1582
1580
  /**
@@ -4739,7 +4737,7 @@ interface paths {
4739
4737
  };
4740
4738
  trace?: never;
4741
4739
  };
4742
- "/workspaces/{workspaceSlug}/pipelines/runs/": {
4740
+ "/workspaces/{workspaceSlug}/pipelines/detections/": {
4743
4741
  parameters: {
4744
4742
  query?: never;
4745
4743
  header?: never;
@@ -4747,8 +4745,8 @@ interface paths {
4747
4745
  cookie?: never;
4748
4746
  };
4749
4747
  /**
4750
- * List workspace runs
4751
- * @description Returns all pipeline runs across the workspace, most recent first, with optional status, file, pipeline, trigger-account, and trigger-type filters.
4748
+ * List workspace detections
4749
+ * @description Returns all detections across the workspace, most recent first, with optional status, file, pipeline, trigger-account, and trigger-type filters.
4752
4750
  */
4753
4751
  get: {
4754
4752
  parameters: {
@@ -4766,15 +4764,15 @@ interface paths {
4766
4764
  includeCount?: boolean;
4767
4765
  /** @description The maximum number of records to return (1-100, default: 20). */
4768
4766
  limit?: number;
4769
- /** @description Filter by the source file the run analyzes. */
4767
+ /** @description Filter by the source file the detection analyzes. */
4770
4768
  fileId?: string;
4771
4769
  /** @description Filter by the owning pipeline. */
4772
4770
  pipelineId?: string;
4773
- /** @description Filter by run status. */
4774
- status?: components["schemas"]["PipelineRunStatus"];
4775
- /** @description Filter by how the run was initiated (user vs system). */
4771
+ /** @description Filter by detection status. */
4772
+ status?: components["schemas"]["DetectionStatus"];
4773
+ /** @description Filter by how the detection was initiated (user vs system). */
4776
4774
  triggerType?: components["schemas"]["PipelineTriggerType"];
4777
- /** @description Filter by the account that triggered the run. */
4775
+ /** @description Filter by the account that triggered the detection. */
4778
4776
  triggeredBy?: string;
4779
4777
  };
4780
4778
  header?: never;
@@ -4798,7 +4796,7 @@ interface paths {
4798
4796
  [name: string]: unknown;
4799
4797
  };
4800
4798
  content: {
4801
- "application/json": components["schemas"]["PipelineRunPage"];
4799
+ "application/json": components["schemas"]["DetectionPage"];
4802
4800
  };
4803
4801
  };
4804
4802
  /**
@@ -4856,7 +4854,7 @@ interface paths {
4856
4854
  patch?: never;
4857
4855
  trace?: never;
4858
4856
  };
4859
- "/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/runs/": {
4857
+ "/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/detections/": {
4860
4858
  parameters: {
4861
4859
  query?: never;
4862
4860
  header?: never;
@@ -4864,8 +4862,8 @@ interface paths {
4864
4862
  cookie?: never;
4865
4863
  };
4866
4864
  /**
4867
- * List pipeline runs
4868
- * @description Returns runs for a specific pipeline, most recent first, with optional status, file, trigger-account, and trigger-type filters.
4865
+ * List pipeline detections
4866
+ * @description Returns detections for a specific pipeline, most recent first, with optional status, file, trigger-account, and trigger-type filters.
4869
4867
  */
4870
4868
  get: {
4871
4869
  parameters: {
@@ -4883,13 +4881,13 @@ interface paths {
4883
4881
  includeCount?: boolean;
4884
4882
  /** @description The maximum number of records to return (1-100, default: 20). */
4885
4883
  limit?: number;
4886
- /** @description Filter by the source file the run analyzes. */
4884
+ /** @description Filter by the source file the detection analyzes. */
4887
4885
  fileId?: string;
4888
- /** @description Filter by run status. */
4889
- status?: components["schemas"]["PipelineRunStatus"];
4890
- /** @description Filter by how the run was initiated (user vs system). */
4886
+ /** @description Filter by detection status. */
4887
+ status?: components["schemas"]["DetectionStatus"];
4888
+ /** @description Filter by how the detection was initiated (user vs system). */
4891
4889
  triggerType?: components["schemas"]["PipelineTriggerType"];
4892
- /** @description Filter by the account that triggered the run. */
4890
+ /** @description Filter by the account that triggered the detection. */
4893
4891
  triggeredBy?: string;
4894
4892
  };
4895
4893
  header?: never;
@@ -4915,7 +4913,7 @@ interface paths {
4915
4913
  [name: string]: unknown;
4916
4914
  };
4917
4915
  content: {
4918
- "application/json": components["schemas"]["PipelineRunPage"];
4916
+ "application/json": components["schemas"]["DetectionPage"];
4919
4917
  };
4920
4918
  };
4921
4919
  /**
@@ -4967,8 +4965,8 @@ interface paths {
4967
4965
  };
4968
4966
  put?: never;
4969
4967
  /**
4970
- * Start a run (detect)
4971
- * @description Starts detection for a file and returns 202 with the run in the `running` state; the analysis runs in the background. Watch the run's status via the SSE stream at `.../runs/{runId}/events` (or re-read the run) and fetch the findings from `.../runs/{runId}/detections/` once it reaches `analyzed`. A repeated Idempotency-Key returns the existing run.
4968
+ * Start a detection
4969
+ * @description Starts analysis for a file and returns 202 with the detection in the `executing` state; the analysis runs in the background. Watch the detection's status via the SSE stream at `.../detections/{detectionId}/events` (or re-read the detection) and fetch the findings from `.../detections/{detectionId}/analysis/` once it reaches `complete`. A repeated Idempotency-Key returns the existing detection.
4972
4970
  */
4973
4971
  post: {
4974
4972
  parameters: {
@@ -4983,43 +4981,47 @@ interface paths {
4983
4981
  cookie?: never;
4984
4982
  };
4985
4983
  /**
4986
- * @description Request payload to start a run (detect) over a file.
4984
+ * @description Request payload to start a detection over a file.
4987
4985
  *
4988
- * Analyzes the file with the pipeline's configuration and returns the run,
4989
- * which holds the findings for review before redaction.
4986
+ * Analyzes the file with the pipeline's configuration and returns the
4987
+ * detection, which holds the findings for review before redaction.
4990
4988
  */
4991
4989
  requestBody: {
4992
4990
  content: {
4993
- "application/json": components["schemas"]["CreatePipelineRun"];
4991
+ "application/json": components["schemas"]["CreateDetection"];
4994
4992
  };
4995
4993
  };
4996
4994
  responses: {
4997
4995
  /**
4998
- * @description Response type for a pipeline run.
4996
+ * @description Response type for a detection.
4999
4997
  *
5000
- * A run is addressed by its own opaque id; the owning pipeline and workspace
5001
- * slugs are carried for context.
4998
+ * A detection is addressed by its own opaque id; the owning pipeline and
4999
+ * workspace slugs are carried for context. Redacted outputs are not here — a
5000
+ * detection produces many redactions, each fetched from its `redactions`
5001
+ * endpoint.
5002
5002
  */
5003
5003
  200: {
5004
5004
  headers: {
5005
5005
  [name: string]: unknown;
5006
5006
  };
5007
5007
  content: {
5008
- "application/json": components["schemas"]["PipelineRun"];
5008
+ "application/json": components["schemas"]["Detection"];
5009
5009
  };
5010
5010
  };
5011
5011
  /**
5012
- * @description Response type for a pipeline run.
5012
+ * @description Response type for a detection.
5013
5013
  *
5014
- * A run is addressed by its own opaque id; the owning pipeline and workspace
5015
- * slugs are carried for context.
5014
+ * A detection is addressed by its own opaque id; the owning pipeline and
5015
+ * workspace slugs are carried for context. Redacted outputs are not here — a
5016
+ * detection produces many redactions, each fetched from its `redactions`
5017
+ * endpoint.
5016
5018
  */
5017
5019
  202: {
5018
5020
  headers: {
5019
5021
  [name: string]: unknown;
5020
5022
  };
5021
5023
  content: {
5022
- "application/json": components["schemas"]["PipelineRun"];
5024
+ "application/json": components["schemas"]["Detection"];
5023
5025
  };
5024
5026
  };
5025
5027
  /**
@@ -5123,7 +5125,7 @@ interface paths {
5123
5125
  patch?: never;
5124
5126
  trace?: never;
5125
5127
  };
5126
- "/workspaces/{workspaceSlug}/runs/{runId}/": {
5128
+ "/workspaces/{workspaceSlug}/detections/{detectionId}/": {
5127
5129
  parameters: {
5128
5130
  query?: never;
5129
5131
  header?: never;
@@ -5131,8 +5133,8 @@ interface paths {
5131
5133
  cookie?: never;
5132
5134
  };
5133
5135
  /**
5134
- * Get pipeline run
5135
- * @description Returns the run and its status for review.
5136
+ * Get detection
5137
+ * @description Returns the detection and its status for review.
5136
5138
  */
5137
5139
  get: {
5138
5140
  parameters: {
@@ -5141,25 +5143,27 @@ interface paths {
5141
5143
  path: {
5142
5144
  /** @description URL-safe workspace identifier. */
5143
5145
  workspaceSlug: string;
5144
- /** @description Opaque identifier of the run. */
5145
- runId: components["schemas"]["RunId"];
5146
+ /** @description Opaque identifier of the detection. */
5147
+ detectionId: components["schemas"]["DetectionId"];
5146
5148
  };
5147
5149
  cookie?: never;
5148
5150
  };
5149
5151
  requestBody?: never;
5150
5152
  responses: {
5151
5153
  /**
5152
- * @description Response type for a pipeline run.
5154
+ * @description Response type for a detection.
5153
5155
  *
5154
- * A run is addressed by its own opaque id; the owning pipeline and workspace
5155
- * slugs are carried for context.
5156
+ * A detection is addressed by its own opaque id; the owning pipeline and
5157
+ * workspace slugs are carried for context. Redacted outputs are not here — a
5158
+ * detection produces many redactions, each fetched from its `redactions`
5159
+ * endpoint.
5156
5160
  */
5157
5161
  200: {
5158
5162
  headers: {
5159
5163
  [name: string]: unknown;
5160
5164
  };
5161
5165
  content: {
5162
- "application/json": components["schemas"]["PipelineRun"];
5166
+ "application/json": components["schemas"]["Detection"];
5163
5167
  };
5164
5168
  };
5165
5169
  /**
@@ -5217,7 +5221,7 @@ interface paths {
5217
5221
  patch?: never;
5218
5222
  trace?: never;
5219
5223
  };
5220
- "/workspaces/{workspaceSlug}/runs/{runId}/events": {
5224
+ "/workspaces/{workspaceSlug}/detections/{detectionId}/events/": {
5221
5225
  parameters: {
5222
5226
  query?: never;
5223
5227
  header?: never;
@@ -5225,8 +5229,8 @@ interface paths {
5225
5229
  cookie?: never;
5226
5230
  };
5227
5231
  /**
5228
- * Stream pipeline run status
5229
- * @description Opens a Server-Sent Events stream of the run's status changes. Emits the current status immediately, then each transition, and ends once the run settles (analyzed, failed, or cancelled). Each event's `data` is a `RunStatusEvent` (see the response schema). Authenticate with a Bearer token via a `fetch`-based client; the native `EventSource` cannot send an `Authorization` header.
5232
+ * Stream detection status
5233
+ * @description Opens a Server-Sent Events stream of the detection's status changes. Emits the current status immediately, then each transition, and ends once the detection settles (complete or failed). Each event's `data` is a `DetectionStatusEvent` (see the response schema). Authenticate with a Bearer token via a `fetch`-based client; the native `EventSource` cannot send an `Authorization` header.
5230
5234
  */
5231
5235
  get: {
5232
5236
  parameters: {
@@ -5235,8 +5239,8 @@ interface paths {
5235
5239
  path: {
5236
5240
  /** @description URL-safe workspace identifier. */
5237
5241
  workspaceSlug: string;
5238
- /** @description Opaque identifier of the run. */
5239
- runId: components["schemas"]["RunId"];
5242
+ /** @description Opaque identifier of the detection. */
5243
+ detectionId: components["schemas"]["DetectionId"];
5240
5244
  };
5241
5245
  cookie?: never;
5242
5246
  };
@@ -5248,7 +5252,7 @@ interface paths {
5248
5252
  [name: string]: unknown;
5249
5253
  };
5250
5254
  content: {
5251
- "text/event-stream": components["schemas"]["RunStatusEvent"];
5255
+ "text/event-stream": components["schemas"]["DetectionStatusEvent"];
5252
5256
  };
5253
5257
  };
5254
5258
  /**
@@ -5306,18 +5310,111 @@ interface paths {
5306
5310
  patch?: never;
5307
5311
  trace?: never;
5308
5312
  };
5309
- "/workspaces/{workspaceSlug}/runs/{runId}/redactions/": {
5313
+ "/workspaces/{workspaceSlug}/detections/{detectionId}/redactions/": {
5310
5314
  parameters: {
5311
5315
  query?: never;
5312
5316
  header?: never;
5313
5317
  path?: never;
5314
5318
  cookie?: never;
5315
5319
  };
5316
- get?: never;
5320
+ /**
5321
+ * List detection redactions
5322
+ * @description Returns a detection's redactions, most recent first, cursor-paginated. Each redaction is one redact pass with its own reviewer edits, output document, and review audit.
5323
+ */
5324
+ get: {
5325
+ parameters: {
5326
+ query?: {
5327
+ /**
5328
+ * @description Cursor pointing to the last item of the previous page.
5329
+ * Obtain this from the `nextCursor` field in the response.
5330
+ */
5331
+ after?: string;
5332
+ /**
5333
+ * @description Whether to include the total item count in the response's `total` field.
5334
+ * Defaults to `false`, since counting is an extra query; set it to `true`
5335
+ * only when the count is actually needed.
5336
+ */
5337
+ includeCount?: boolean;
5338
+ /** @description The maximum number of records to return (1-100, default: 20). */
5339
+ limit?: number;
5340
+ };
5341
+ header?: never;
5342
+ path: {
5343
+ /** @description URL-safe workspace identifier. */
5344
+ workspaceSlug: string;
5345
+ /** @description Opaque identifier of the detection. */
5346
+ detectionId: components["schemas"]["DetectionId"];
5347
+ };
5348
+ cookie?: never;
5349
+ };
5350
+ requestBody?: never;
5351
+ responses: {
5352
+ /**
5353
+ * @description Generic paginated response wrapper.
5354
+ *
5355
+ * Provides a consistent structure for all paginated API responses with
5356
+ * cursor-based pagination support. When `next_cursor` is present, there
5357
+ * are more items to fetch.
5358
+ */
5359
+ 200: {
5360
+ headers: {
5361
+ [name: string]: unknown;
5362
+ };
5363
+ content: {
5364
+ "application/json": components["schemas"]["RedactionResultPage"];
5365
+ };
5366
+ };
5367
+ /**
5368
+ * @description HTTP error response representation with security-conscious design.
5369
+ *
5370
+ * This struct contains all the information needed to serialize an error
5371
+ * response, including the error name, message, HTTP status code, resource
5372
+ * information, and user-friendly messages.
5373
+ */
5374
+ 401: {
5375
+ headers: {
5376
+ [name: string]: unknown;
5377
+ };
5378
+ content: {
5379
+ "application/json": components["schemas"]["ErrorResponse"];
5380
+ };
5381
+ };
5382
+ /**
5383
+ * @description HTTP error response representation with security-conscious design.
5384
+ *
5385
+ * This struct contains all the information needed to serialize an error
5386
+ * response, including the error name, message, HTTP status code, resource
5387
+ * information, and user-friendly messages.
5388
+ */
5389
+ 403: {
5390
+ headers: {
5391
+ [name: string]: unknown;
5392
+ };
5393
+ content: {
5394
+ "application/json": components["schemas"]["ErrorResponse"];
5395
+ };
5396
+ };
5397
+ /**
5398
+ * @description HTTP error response representation with security-conscious design.
5399
+ *
5400
+ * This struct contains all the information needed to serialize an error
5401
+ * response, including the error name, message, HTTP status code, resource
5402
+ * information, and user-friendly messages.
5403
+ */
5404
+ 404: {
5405
+ headers: {
5406
+ [name: string]: unknown;
5407
+ };
5408
+ content: {
5409
+ "application/json": components["schemas"]["ErrorResponse"];
5410
+ };
5411
+ };
5412
+ };
5413
+ };
5317
5414
  put?: never;
5318
5415
  /**
5319
- * Redact a run
5320
- * @description Applies the pipeline's policies to the run's stored analysis, stores the redacted file, and completes the run.
5416
+ * Redact a detection
5417
+ * @description Applies the pipeline's policies to the detection's stored analysis — with any reviewer `edits` layered on first (suppress a false positive, retag a detection, or add one the analysis missed) and produces a new redaction: a redacted document plus a review audit recording what was redacted. A detection can be redacted more than once. An edit targeting a detection not in the analysis, or a set that contradicts itself, is rejected (400).
5321
5418
  */
5322
5419
  post: {
5323
5420
  parameters: {
@@ -5326,25 +5423,58 @@ interface paths {
5326
5423
  path: {
5327
5424
  /** @description URL-safe workspace identifier. */
5328
5425
  workspaceSlug: string;
5329
- /** @description Opaque identifier of the run. */
5330
- runId: components["schemas"]["RunId"];
5426
+ /** @description Opaque identifier of the detection. */
5427
+ detectionId: components["schemas"]["DetectionId"];
5331
5428
  };
5332
5429
  cookie?: never;
5333
5430
  };
5334
- requestBody?: never;
5431
+ /**
5432
+ * @description Request payload to redact a detection.
5433
+ *
5434
+ * The reviewer's edits layer over the detection's analysis before redaction:
5435
+ * suppress a false positive, retag a detection, or add one the analysis missed.
5436
+ * Omit `edits` to redact with the policy decisions exactly as detected. Each
5437
+ * redact request produces a new redaction.
5438
+ */
5439
+ requestBody: {
5440
+ content: {
5441
+ "application/json": components["schemas"]["RedactDetection"];
5442
+ };
5443
+ };
5335
5444
  responses: {
5336
5445
  /**
5337
- * @description Response type for a pipeline run.
5446
+ * @description Response type for a redaction.
5338
5447
  *
5339
- * A run is addressed by its own opaque id; the owning pipeline and workspace
5340
- * slugs are carried for context.
5448
+ * A redaction is one redact pass over a detection, produced with a specific set
5449
+ * of reviewer edits. It owns the redacted output document (downloadable through
5450
+ * the normal file endpoints) and a review audit recording what was redacted and
5451
+ * why (fetched from the redaction's `review` endpoint).
5452
+ *
5453
+ * Named `RedactionResult` rather than `Redaction` because the engine's audit
5454
+ * schema already carries a `Redaction` (an audit event), and the two must not
5455
+ * collide in the generated OpenAPI.
5341
5456
  */
5342
- 200: {
5457
+ 201: {
5458
+ headers: {
5459
+ [name: string]: unknown;
5460
+ };
5461
+ content: {
5462
+ "application/json": components["schemas"]["RedactionResult"];
5463
+ };
5464
+ };
5465
+ /**
5466
+ * @description HTTP error response representation with security-conscious design.
5467
+ *
5468
+ * This struct contains all the information needed to serialize an error
5469
+ * response, including the error name, message, HTTP status code, resource
5470
+ * information, and user-friendly messages.
5471
+ */
5472
+ 400: {
5343
5473
  headers: {
5344
5474
  [name: string]: unknown;
5345
5475
  };
5346
5476
  content: {
5347
- "application/json": components["schemas"]["PipelineRun"];
5477
+ "application/json": components["schemas"]["ErrorResponse"];
5348
5478
  };
5349
5479
  };
5350
5480
  /**
@@ -5407,6 +5537,24 @@ interface paths {
5407
5537
  "application/json": components["schemas"]["ErrorResponse"];
5408
5538
  };
5409
5539
  };
5540
+ /** @description Expected request with `Content-Type: application/json` */
5541
+ 415: {
5542
+ headers: {
5543
+ [name: string]: unknown;
5544
+ };
5545
+ content: {
5546
+ "text/plain": string;
5547
+ };
5548
+ };
5549
+ /** @description Failed to deserialize the JSON body into the target type */
5550
+ 422: {
5551
+ headers: {
5552
+ [name: string]: unknown;
5553
+ };
5554
+ content: {
5555
+ "text/plain": string;
5556
+ };
5557
+ };
5410
5558
  };
5411
5559
  };
5412
5560
  delete?: never;
@@ -5415,7 +5563,7 @@ interface paths {
5415
5563
  patch?: never;
5416
5564
  trace?: never;
5417
5565
  };
5418
- "/workspaces/{workspaceSlug}/runs/{runId}/detections/": {
5566
+ "/workspaces/{workspaceSlug}/detections/{detectionId}/analysis/": {
5419
5567
  parameters: {
5420
5568
  query?: never;
5421
5569
  header?: never;
@@ -5423,8 +5571,8 @@ interface paths {
5423
5571
  cookie?: never;
5424
5572
  };
5425
5573
  /**
5426
- * Get run detections
5427
- * @description Returns the run's detected findings (the analyzed document) for review.
5574
+ * Get detection findings
5575
+ * @description Returns the detection's detected findings (the analyzed document) for review.
5428
5576
  */
5429
5577
  get: {
5430
5578
  parameters: {
@@ -5433,8 +5581,8 @@ interface paths {
5433
5581
  path: {
5434
5582
  /** @description URL-safe workspace identifier. */
5435
5583
  workspaceSlug: string;
5436
- /** @description Opaque identifier of the run. */
5437
- runId: components["schemas"]["RunId"];
5584
+ /** @description Opaque identifier of the detection. */
5585
+ detectionId: components["schemas"]["DetectionId"];
5438
5586
  };
5439
5587
  cookie?: never;
5440
5588
  };
@@ -5443,20 +5591,36 @@ interface paths {
5443
5591
  /**
5444
5592
  * @description What detection found in one document.
5445
5593
  *
5446
- * The body group plus per-container-part groups (each tagged by
5447
- * modality) plus the recognition [`AuditContext`] the entities
5448
- * were scored against.
5594
+ * Wraps elide's [`Report`] with the things elide does not model:
5595
+ * the recognition [`DocumentContext`] the entities were scored
5596
+ * against, how the document decoded, and what the pass cost.
5597
+ *
5598
+ * Reviewer edits are not here. They are the caller's own input,
5599
+ * applied to the report before anonymize
5600
+ * ([`EditSet::apply`](crate::entity::EditSet::apply)), so an audit
5601
+ * carries what analysis found *as amended* rather than the
5602
+ * amendments themselves.
5603
+ *
5604
+ * # Serialization
5605
+ *
5606
+ * [`Serialize`] but deliberately **not** `Deserialize`: a
5607
+ * serialized report tags entity groups by modality *name*, so
5608
+ * rebuilding one needs the registry [`Engine`] holds. Read an
5609
+ * audit back with [`Engine::deserialize_audit`].
5610
+ *
5611
+ * # Schema
5449
5612
  *
5450
- * The context travels with the entities so anonymize can rebuild
5451
- * an orchestrator against exactly the vocabulary analyze used.
5452
- * Anything a policy predicate compares against beyond the label
5453
- * catalog (asserted languages, jurisdictions, document tags) is
5454
- * here; labels are re-derived from the policy set on each
5455
- * anonymize call.
5613
+ * Generate under the **serialize** contract
5614
+ * ([`SchemaSettings::for_serialize`]). `usage` is
5615
+ * `skip_serializing_if`, and only that contract marks it optional
5616
+ * `schema_for!` defaults to deserialize and declares it
5617
+ * required, so a generated client would reject responses this
5618
+ * crate really emits.
5456
5619
  *
5457
- * No [`Default`]: a well-formed audit must carry a real
5458
- * [`AuditContext`] with a real correlation id. Callers building
5459
- * an audit outside the analyze path construct it explicitly.
5620
+ * [`Engine`]: super::Engine
5621
+ * [`Engine::deserialize_audit`]: super::Engine::deserialize_audit
5622
+ * [`Report`]: elide::Report
5623
+ * [`SchemaSettings::for_serialize`]: schemars::generate::SchemaSettings::for_serialize
5460
5624
  */
5461
5625
  200: {
5462
5626
  headers: {
@@ -5536,7 +5700,7 @@ interface paths {
5536
5700
  patch?: never;
5537
5701
  trace?: never;
5538
5702
  };
5539
- "/workspaces/{workspaceSlug}/runs/{runId}/audit": {
5703
+ "/workspaces/{workspaceSlug}/detections/{detectionId}/audit/": {
5540
5704
  parameters: {
5541
5705
  query?: never;
5542
5706
  header?: never;
@@ -5544,8 +5708,8 @@ interface paths {
5544
5708
  cookie?: never;
5545
5709
  };
5546
5710
  /**
5547
- * Download run audit
5548
- * @description Downloads the run's audit as a file. `format` is `csv` (default) — a zip of entities.csv, provenance.csv, and reviews.csv — or `json`, a pretty-printed JSON file.
5711
+ * Download detection audit
5712
+ * @description Downloads the detection's audit as a file. `format` is `csv` (default) — a zip of entities.csv, provenance.csv, and reviews.csv — or `json`, a pretty-printed JSON file.
5549
5713
  */
5550
5714
  get: {
5551
5715
  parameters: {
@@ -5557,14 +5721,14 @@ interface paths {
5557
5721
  path: {
5558
5722
  /** @description URL-safe workspace identifier. */
5559
5723
  workspaceSlug: string;
5560
- /** @description Opaque identifier of the run. */
5561
- runId: components["schemas"]["RunId"];
5724
+ /** @description Opaque identifier of the detection. */
5725
+ detectionId: components["schemas"]["DetectionId"];
5562
5726
  };
5563
5727
  cookie?: never;
5564
5728
  };
5565
5729
  requestBody?: never;
5566
5730
  responses: {
5567
- /** @description The run's exported audit. */
5731
+ /** @description The detection's exported audit. */
5568
5732
  200: {
5569
5733
  headers: {
5570
5734
  [name: string]: unknown;
@@ -5644,7 +5808,7 @@ interface paths {
5644
5808
  patch?: never;
5645
5809
  trace?: never;
5646
5810
  };
5647
- "/workspaces/{workspaceSlug}/policies/": {
5811
+ "/workspaces/{workspaceSlug}/redactions/{redactionId}/review": {
5648
5812
  parameters: {
5649
5813
  query?: never;
5650
5814
  header?: never;
@@ -5652,48 +5816,63 @@ interface paths {
5652
5816
  cookie?: never;
5653
5817
  };
5654
5818
  /**
5655
- * List policies
5656
- * @description Returns all policies for the workspace.
5819
+ * Get redaction review
5820
+ * @description Returns the redaction's review audit: the detection analysis with the reviewer's edits applied and the per-entity redaction outcome recorded.
5657
5821
  */
5658
5822
  get: {
5659
5823
  parameters: {
5660
- query?: {
5661
- /**
5662
- * @description Cursor pointing to the last item of the previous page.
5663
- * Obtain this from the `nextCursor` field in the response.
5664
- */
5665
- after?: string;
5666
- /**
5667
- * @description Whether to include the total item count in the response's `total` field.
5668
- * Defaults to `false`, since counting is an extra query; set it to `true`
5669
- * only when the count is actually needed.
5670
- */
5671
- includeCount?: boolean;
5672
- /** @description The maximum number of records to return (1-100, default: 20). */
5673
- limit?: number;
5674
- };
5824
+ query?: never;
5675
5825
  header?: never;
5676
5826
  path: {
5677
5827
  /** @description URL-safe workspace identifier. */
5678
5828
  workspaceSlug: string;
5829
+ /** @description Opaque identifier of the redaction. */
5830
+ redactionId: components["schemas"]["RedactionId"];
5679
5831
  };
5680
5832
  cookie?: never;
5681
5833
  };
5682
5834
  requestBody?: never;
5683
5835
  responses: {
5684
5836
  /**
5685
- * @description Generic paginated response wrapper.
5837
+ * @description What detection found in one document.
5686
5838
  *
5687
- * Provides a consistent structure for all paginated API responses with
5688
- * cursor-based pagination support. When `next_cursor` is present, there
5689
- * are more items to fetch.
5839
+ * Wraps elide's [`Report`] with the things elide does not model:
5840
+ * the recognition [`DocumentContext`] the entities were scored
5841
+ * against, how the document decoded, and what the pass cost.
5842
+ *
5843
+ * Reviewer edits are not here. They are the caller's own input,
5844
+ * applied to the report before anonymize
5845
+ * ([`EditSet::apply`](crate::entity::EditSet::apply)), so an audit
5846
+ * carries what analysis found *as amended* rather than the
5847
+ * amendments themselves.
5848
+ *
5849
+ * # Serialization
5850
+ *
5851
+ * [`Serialize`] but deliberately **not** `Deserialize`: a
5852
+ * serialized report tags entity groups by modality *name*, so
5853
+ * rebuilding one needs the registry [`Engine`] holds. Read an
5854
+ * audit back with [`Engine::deserialize_audit`].
5855
+ *
5856
+ * # Schema
5857
+ *
5858
+ * Generate under the **serialize** contract
5859
+ * ([`SchemaSettings::for_serialize`]). `usage` is
5860
+ * `skip_serializing_if`, and only that contract marks it optional
5861
+ * — `schema_for!` defaults to deserialize and declares it
5862
+ * required, so a generated client would reject responses this
5863
+ * crate really emits.
5864
+ *
5865
+ * [`Engine`]: super::Engine
5866
+ * [`Engine::deserialize_audit`]: super::Engine::deserialize_audit
5867
+ * [`Report`]: elide::Report
5868
+ * [`SchemaSettings::for_serialize`]: schemars::generate::SchemaSettings::for_serialize
5690
5869
  */
5691
5870
  200: {
5692
5871
  headers: {
5693
5872
  [name: string]: unknown;
5694
5873
  };
5695
5874
  content: {
5696
- "application/json": components["schemas"]["PolicySummaryPage"];
5875
+ "application/json": components["schemas"]["Audit"];
5697
5876
  };
5698
5877
  };
5699
5878
  /**
@@ -5726,45 +5905,6 @@ interface paths {
5726
5905
  "application/json": components["schemas"]["ErrorResponse"];
5727
5906
  };
5728
5907
  };
5729
- };
5730
- };
5731
- put?: never;
5732
- /**
5733
- * Create policy
5734
- * @description Creates a structured redaction policy for the workspace.
5735
- */
5736
- post: {
5737
- parameters: {
5738
- query?: never;
5739
- header?: never;
5740
- path: {
5741
- /** @description URL-safe workspace identifier. */
5742
- workspaceSlug: string;
5743
- };
5744
- cookie?: never;
5745
- };
5746
- /**
5747
- * @description Request payload for creating a new workspace policy.
5748
- *
5749
- * The body comes from a template or an inline definition (see [`PolicyBody`]).
5750
- * The body's `name` and `description` drive the stored columns unless
5751
- * overridden here.
5752
- */
5753
- requestBody: {
5754
- content: {
5755
- "application/json": components["schemas"]["CreatePolicy"];
5756
- };
5757
- };
5758
- responses: {
5759
- /** @description Response type for a workspace policy. */
5760
- 201: {
5761
- headers: {
5762
- [name: string]: unknown;
5763
- };
5764
- content: {
5765
- "application/json": components["schemas"]["Policy"];
5766
- };
5767
- };
5768
5908
  /**
5769
5909
  * @description HTTP error response representation with security-conscious design.
5770
5910
  *
@@ -5772,7 +5912,7 @@ interface paths {
5772
5912
  * response, including the error name, message, HTTP status code, resource
5773
5913
  * information, and user-friendly messages.
5774
5914
  */
5775
- 400: {
5915
+ 404: {
5776
5916
  headers: {
5777
5917
  [name: string]: unknown;
5778
5918
  };
@@ -5787,7 +5927,7 @@ interface paths {
5787
5927
  * response, including the error name, message, HTTP status code, resource
5788
5928
  * information, and user-friendly messages.
5789
5929
  */
5790
- 401: {
5930
+ 409: {
5791
5931
  headers: {
5792
5932
  [name: string]: unknown;
5793
5933
  };
@@ -5795,19 +5935,180 @@ interface paths {
5795
5935
  "application/json": components["schemas"]["ErrorResponse"];
5796
5936
  };
5797
5937
  };
5798
- /**
5799
- * @description HTTP error response representation with security-conscious design.
5800
- *
5801
- * This struct contains all the information needed to serialize an error
5802
- * response, including the error name, message, HTTP status code, resource
5803
- * information, and user-friendly messages.
5804
- */
5805
- 403: {
5806
- headers: {
5807
- [name: string]: unknown;
5808
- };
5809
- content: {
5810
- "application/json": components["schemas"]["ErrorResponse"];
5938
+ };
5939
+ };
5940
+ put?: never;
5941
+ post?: never;
5942
+ delete?: never;
5943
+ options?: never;
5944
+ head?: never;
5945
+ patch?: never;
5946
+ trace?: never;
5947
+ };
5948
+ "/workspaces/{workspaceSlug}/policies/": {
5949
+ parameters: {
5950
+ query?: never;
5951
+ header?: never;
5952
+ path?: never;
5953
+ cookie?: never;
5954
+ };
5955
+ /**
5956
+ * List policies
5957
+ * @description Returns all policies for the workspace.
5958
+ */
5959
+ get: {
5960
+ parameters: {
5961
+ query?: {
5962
+ /**
5963
+ * @description Cursor pointing to the last item of the previous page.
5964
+ * Obtain this from the `nextCursor` field in the response.
5965
+ */
5966
+ after?: string;
5967
+ /**
5968
+ * @description Whether to include the total item count in the response's `total` field.
5969
+ * Defaults to `false`, since counting is an extra query; set it to `true`
5970
+ * only when the count is actually needed.
5971
+ */
5972
+ includeCount?: boolean;
5973
+ /** @description The maximum number of records to return (1-100, default: 20). */
5974
+ limit?: number;
5975
+ };
5976
+ header?: never;
5977
+ path: {
5978
+ /** @description URL-safe workspace identifier. */
5979
+ workspaceSlug: string;
5980
+ };
5981
+ cookie?: never;
5982
+ };
5983
+ requestBody?: never;
5984
+ responses: {
5985
+ /**
5986
+ * @description Generic paginated response wrapper.
5987
+ *
5988
+ * Provides a consistent structure for all paginated API responses with
5989
+ * cursor-based pagination support. When `next_cursor` is present, there
5990
+ * are more items to fetch.
5991
+ */
5992
+ 200: {
5993
+ headers: {
5994
+ [name: string]: unknown;
5995
+ };
5996
+ content: {
5997
+ "application/json": components["schemas"]["PolicySummaryPage"];
5998
+ };
5999
+ };
6000
+ /**
6001
+ * @description HTTP error response representation with security-conscious design.
6002
+ *
6003
+ * This struct contains all the information needed to serialize an error
6004
+ * response, including the error name, message, HTTP status code, resource
6005
+ * information, and user-friendly messages.
6006
+ */
6007
+ 401: {
6008
+ headers: {
6009
+ [name: string]: unknown;
6010
+ };
6011
+ content: {
6012
+ "application/json": components["schemas"]["ErrorResponse"];
6013
+ };
6014
+ };
6015
+ /**
6016
+ * @description HTTP error response representation with security-conscious design.
6017
+ *
6018
+ * This struct contains all the information needed to serialize an error
6019
+ * response, including the error name, message, HTTP status code, resource
6020
+ * information, and user-friendly messages.
6021
+ */
6022
+ 403: {
6023
+ headers: {
6024
+ [name: string]: unknown;
6025
+ };
6026
+ content: {
6027
+ "application/json": components["schemas"]["ErrorResponse"];
6028
+ };
6029
+ };
6030
+ };
6031
+ };
6032
+ put?: never;
6033
+ /**
6034
+ * Create policy
6035
+ * @description Creates a structured redaction policy for the workspace.
6036
+ */
6037
+ post: {
6038
+ parameters: {
6039
+ query?: never;
6040
+ header?: never;
6041
+ path: {
6042
+ /** @description URL-safe workspace identifier. */
6043
+ workspaceSlug: string;
6044
+ };
6045
+ cookie?: never;
6046
+ };
6047
+ /**
6048
+ * @description Request payload for creating a new workspace policy.
6049
+ *
6050
+ * The body comes from a template or an inline definition (see [`PolicyBody`]).
6051
+ * The body's `name` and `description` drive the stored columns unless
6052
+ * overridden here.
6053
+ */
6054
+ requestBody: {
6055
+ content: {
6056
+ "application/json": components["schemas"]["CreatePolicy"];
6057
+ };
6058
+ };
6059
+ responses: {
6060
+ /** @description Response type for a workspace policy. */
6061
+ 201: {
6062
+ headers: {
6063
+ [name: string]: unknown;
6064
+ };
6065
+ content: {
6066
+ "application/json": components["schemas"]["Policy"];
6067
+ };
6068
+ };
6069
+ /**
6070
+ * @description HTTP error response representation with security-conscious design.
6071
+ *
6072
+ * This struct contains all the information needed to serialize an error
6073
+ * response, including the error name, message, HTTP status code, resource
6074
+ * information, and user-friendly messages.
6075
+ */
6076
+ 400: {
6077
+ headers: {
6078
+ [name: string]: unknown;
6079
+ };
6080
+ content: {
6081
+ "application/json": components["schemas"]["ErrorResponse"];
6082
+ };
6083
+ };
6084
+ /**
6085
+ * @description HTTP error response representation with security-conscious design.
6086
+ *
6087
+ * This struct contains all the information needed to serialize an error
6088
+ * response, including the error name, message, HTTP status code, resource
6089
+ * information, and user-friendly messages.
6090
+ */
6091
+ 401: {
6092
+ headers: {
6093
+ [name: string]: unknown;
6094
+ };
6095
+ content: {
6096
+ "application/json": components["schemas"]["ErrorResponse"];
6097
+ };
6098
+ };
6099
+ /**
6100
+ * @description HTTP error response representation with security-conscious design.
6101
+ *
6102
+ * This struct contains all the information needed to serialize an error
6103
+ * response, including the error name, message, HTTP status code, resource
6104
+ * information, and user-friendly messages.
6105
+ */
6106
+ 403: {
6107
+ headers: {
6108
+ [name: string]: unknown;
6109
+ };
6110
+ content: {
6111
+ "application/json": components["schemas"]["ErrorResponse"];
5811
6112
  };
5812
6113
  };
5813
6114
  /** @description Expected request with `Content-Type: application/json` */
@@ -8712,79 +9013,31 @@ interface components {
8712
9013
  workspaceSlug: components["schemas"]["Handle"];
8713
9014
  };
8714
9015
  /**
8715
- * @description Query parameters for the activity export: the type/actor filter, a bounded date
8716
- * window (defaulted and capped, since the export materializes rows), and the
8717
- * output `format`. See [`DateWindow`] for the range defaults and bounds.
9016
+ * @description The export-only query parameter: the output format. Kept separate from the
9017
+ * shared filter and window so each is extracted on its own (see
9018
+ * [`ActivityFilterQuery`] for why flattening is avoided).
8718
9019
  */
8719
- ActivityExportQuery: {
8720
- /**
8721
- * Format: uuid
8722
- * @description Keep only activities performed by this account. Omit for any actor.
8723
- */
8724
- actor?: string;
9020
+ ActivityExportOptions: {
8725
9021
  /** @description Output format; defaults to `csv`. */
8726
9022
  format?: components["schemas"]["ExportFormat"];
8727
- /**
8728
- * Format: date
8729
- * @description First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the range
8730
- * spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
8731
- */
8732
- from?: string;
8733
- /**
8734
- * Format: date
8735
- * @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC).
8736
- */
8737
- to?: string;
8738
- /**
8739
- * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
8740
- * parameter for several; omit for no type constraint. The field is `types`
8741
- * since `type` is a reserved word.
8742
- */
8743
- type?: components["schemas"]["ActivityType"][];
8744
9023
  };
8745
9024
  /**
8746
- * @description Query parameters for the activity feed: the type/actor filter, an optional date
8747
- * window (narrows only when given — the feed is otherwise all-time), and cursor
8748
- * pagination.
9025
+ * @description The activity-specific filter parameters: which activity types to keep and
9026
+ * whose activities to keep.
9027
+ *
9028
+ * This is its own query struct so an endpoint composes it alongside the shared
9029
+ * [`CursorPagination`](crate::handler::request::CursorPagination) and
9030
+ * [`DateWindow`] as separate query extractors, rather than `#[serde(flatten)]`ing
9031
+ * them into one struct: the query extractor (`serde_html_form`) mis-handles
9032
+ * flattened sub-structs — a flattened pagination struct fails to deserialize even
9033
+ * a bare `?limit=` — so each concern is extracted on its own.
8749
9034
  */
8750
- ActivityListQuery: {
8751
- /**
8752
- * Format: uuid
8753
- * @description Keep only activities performed by this account. Omit for any actor.
8754
- */
8755
- actor?: string;
8756
- /**
8757
- * @description Cursor pointing to the last item of the previous page.
8758
- * Obtain this from the `nextCursor` field in the response.
8759
- */
8760
- after?: string;
8761
- /**
8762
- * Format: date
8763
- * @description First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the range
8764
- * spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
8765
- */
8766
- from?: string;
8767
- /**
8768
- * @description Whether to include the total item count in the response's `total` field.
8769
- * Defaults to `false`, since counting is an extra query; set it to `true`
8770
- * only when the count is actually needed.
8771
- * @default false
8772
- */
8773
- includeCount?: boolean;
8774
- /**
8775
- * Format: uint32
8776
- * @description The maximum number of records to return (1-100, default: 20).
8777
- */
8778
- limit?: number;
8779
- /**
8780
- * Format: date
8781
- * @description Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today (UTC).
8782
- */
8783
- to?: string;
9035
+ ActivityFilterQuery: {
9036
+ /** @description Username of the account whose activities to keep. Omit for any actor. */
9037
+ actor?: components["schemas"]["Handle"];
8784
9038
  /**
8785
9039
  * @description Keep only these activity types (e.g. `file.created`). Repeat the `type`
8786
- * parameter for several; omit for no type constraint. The field is `types`
8787
- * since `type` is a reserved word.
9040
+ * parameter for several; omit for no type constraint.
8788
9041
  */
8789
9042
  type?: components["schemas"]["ActivityType"][];
8790
9043
  };
@@ -8916,21 +9169,21 @@ interface components {
8916
9169
  /** @constant */
8917
9170
  type: "pipeline.deleted";
8918
9171
  } | {
8919
- data: components["schemas"]["PipelineRunActivityParams"];
9172
+ data: components["schemas"]["DetectionActivityParams"];
8920
9173
  /** @constant */
8921
- type: "pipeline.run.started";
9174
+ type: "pipeline.detection.started";
8922
9175
  } | {
8923
- data: components["schemas"]["PipelineRunActivityParams"];
9176
+ data: components["schemas"]["DetectionActivityParams"];
8924
9177
  /** @constant */
8925
- type: "pipeline.run.analyzed";
9178
+ type: "pipeline.detection.completed";
8926
9179
  } | {
8927
- data: components["schemas"]["PipelineRunActivityParams"];
9180
+ data: components["schemas"]["DetectionActivityParams"];
8928
9181
  /** @constant */
8929
- type: "pipeline.run.completed";
9182
+ type: "pipeline.detection.failed";
8930
9183
  } | {
8931
- data: components["schemas"]["PipelineRunActivityParams"];
9184
+ data: components["schemas"]["RedactionActivityParams"];
8932
9185
  /** @constant */
8933
- type: "pipeline.run.failed";
9186
+ type: "pipeline.redaction.created";
8934
9187
  } | {
8935
9188
  data: components["schemas"]["PolicyActivityParams"];
8936
9189
  /** @constant */
@@ -8951,7 +9204,7 @@ interface components {
8951
9204
  * to categorize different types of activities that occur within workspaces for comprehensive
8952
9205
  * audit trail and activity tracking.
8953
9206
  */
8954
- 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";
9207
+ 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.detection.started" | "pipeline.detection.completed" | "pipeline.detection.failed" | "pipeline.redaction.created" | "policy.created" | "policy.updated" | "policy.deleted";
8955
9208
  /** @description Anthropic API credentials. */
8956
9209
  AnthropicCredentials: {
8957
9210
  /** @description Anthropic API key. */
@@ -9050,42 +9303,50 @@ interface components {
9050
9303
  * it on the entity's [`Redaction`] event so an audit can trace a change back to
9051
9304
  * the policy that demanded it.
9052
9305
  *
9053
- * The rationale takes one of two [`kind`](Attribution::kind)s, by how much
9054
- * structure the author has ([`AttributionKind::Freeform`] /
9055
- * [`AttributionKind::Cited`]). Orthogonal to that, an attribution may carry a
9056
- * [`source_id`](Attribution::source_id): an opaque, caller-owned [`Uuid`] the
9057
- * policy layer uses to link back to a source record (a rule, a request, a
9058
- * document). elide-core stores and hashes it verbatim; it never resolves or
9059
- * validates it.
9306
+ * The rationale takes one of two shapes, by how much structure the author has:
9307
+ * a [`Freeform`](Attribution::Freeform) label or a formal
9308
+ * [`Cited`](Attribution::Cited) authority. Start one with
9309
+ * [`Attribution::freeform`] / [`Attribution::cited`], refine it with the
9310
+ * shape's `with_*` builder, and let it convert into an `Attribution`:
9311
+ *
9312
+ * ```
9313
+ * # use elide_core::entity::audit::Attribution;
9314
+ * let attribution: Attribution =
9315
+ * Attribution::freeform("gdpr-art-17")
9316
+ * .with_description("right to erasure")
9317
+ * .into();
9318
+ * ```
9060
9319
  *
9061
9320
  * [`Redaction`]: crate::entity::audit::AuditKind::Redaction
9062
9321
  */
9063
- Attribution: {
9064
- /** @description The shape of the rationale: a freeform label or a formal citation. */
9065
- kind: components["schemas"]["AttributionKind"];
9066
- /**
9067
- * Format: uuid
9068
- * @description Opaque, caller-owned link to a source record, when given.
9069
- */
9070
- source_id?: string;
9071
- };
9072
- /** @description The shape of an [`Attribution`]'s rationale. */
9073
- AttributionKind: {
9074
- /** @description Human-readable description (e.g. `"right to erasure"`), when given. */
9075
- description?: string;
9322
+ Attribution: ({
9076
9323
  /** @constant */
9077
9324
  kind: "freeform";
9078
- /** @description The policy's name (e.g. `"gdpr-art-17"`, `"hipaa-safe-harbor"`). */
9079
- name: string;
9080
- } | {
9081
- /** @description The authority cited (e.g. `"GDPR"`, `"HIPAA"`, `"internal-policy"`). */
9082
- authority: string;
9083
- /** @description The citation within that authority (e.g. `"Art. 17(1)"`, `"§164.514"`). */
9084
- citation: string;
9325
+ } & components["schemas"]["FreeformAttribution"]) | ({
9085
9326
  /** @constant */
9086
9327
  kind: "cited";
9087
- /** @description Why the citation applies here (e.g. `"data subject requested erasure"`). */
9088
- rationale: string;
9328
+ } & components["schemas"]["CitedAttribution"]);
9329
+ /**
9330
+ * @description A detection recognition missed.
9331
+ *
9332
+ * Recorded on the report with human provenance, so it is never
9333
+ * mistaken for an automatic hit, then redacted under the policy set
9334
+ * like any other entity: an added label the policy does not cover
9335
+ * is left alone.
9336
+ *
9337
+ * Carries no entity id — the entity does not exist yet, and the
9338
+ * engine mints one when the edit is applied, so a client cannot
9339
+ * collide with a real detection or shadow an existing entity.
9340
+ */
9341
+ AudioAdd: {
9342
+ /** @description Who made it, when the caller said. */
9343
+ actor?: string;
9344
+ /** @description What the reviewer says this is. */
9345
+ label: components["schemas"]["LabelRef"];
9346
+ /** @description Where it sits in the document. */
9347
+ location: components["schemas"]["AudioLocation"];
9348
+ /** @description The rationale, when one was given. */
9349
+ reason?: string;
9089
9350
  };
9090
9351
  /**
9091
9352
  * @description One node in an entity's audit DAG: a thing that happened, with its
@@ -9162,115 +9423,70 @@ interface components {
9162
9423
  * @description Kind of an [`AuditEvent`], carrying its event-specific detail and the
9163
9424
  * rationale for why it happened.
9164
9425
  *
9165
- * `#[non_exhaustive]`: new event kinds (verification, annotation, …)
9166
- * can be added compatibly. The recognition kinds ([`Pattern`],
9167
- * [`Model`]) carry the matched [`Location`]; the rest carry their own
9168
- * data.
9169
- *
9426
+ * A thin tagged union: each variant wraps one payload struct (e.g.
9427
+ * [`Redaction`], [`Selection`], [`Manual`]) that owns that kind's fields, its
9428
+ * docs, and how it folds into the audit hash. Match on a variant to reach its
9429
+ * payload:
9430
+ *
9431
+ * ```
9432
+ * # use elide_core::entity::audit::AuditKind;
9433
+ * # use elide_core::modality::text::Text;
9434
+ * # fn show(kind: &AuditKind<Text>) {
9435
+ * if let AuditKind::Redaction(redaction) = kind {
9436
+ * let _ = &redaction.operator;
9437
+ * }
9438
+ * # }
9439
+ * ```
9440
+ *
9441
+ * `#[non_exhaustive]`: new event kinds (verification, annotation, …) can be
9442
+ * added compatibly. The recognition kinds ([`Pattern`], [`Model`]) carry the
9443
+ * matched [`Location`]; the rest carry their own data.
9444
+ *
9445
+ * [`AuditEvent`]: super::AuditEvent
9170
9446
  * [`Pattern`]: AuditKind::Pattern
9171
9447
  * [`Model`]: AuditKind::Model
9172
9448
  * [`Location`]: Modality::Location
9173
9449
  */
9174
9450
  AudioAuditKind: {
9451
+ detail: components["schemas"]["AudioPattern"];
9175
9452
  /** @constant */
9176
9453
  kind: "pattern";
9177
- /** @description Where the recognizer matched. */
9178
- location: components["schemas"]["AudioLocation"];
9179
- /** @description Pattern detail. */
9180
- pattern: components["schemas"]["PatternEvent"];
9181
9454
  } | {
9455
+ detail: components["schemas"]["AudioModel"];
9182
9456
  /** @constant */
9183
9457
  kind: "model";
9184
- /** @description Where the recognizer matched. */
9185
- location: components["schemas"]["AudioLocation"];
9186
- /** @description Model detail. */
9187
- model: components["schemas"]["ModelEvent"];
9188
9458
  } | {
9459
+ detail: components["schemas"]["Deduplication"];
9189
9460
  /** @constant */
9190
9461
  kind: "deduplication";
9191
- /** @description Name of the fusion strategy that combined them. */
9192
- strategy: string;
9193
9462
  } | {
9194
- /** @description The loser's confidence at resolution time. */
9195
- competing_confidence: components["schemas"]["Confidence"];
9196
- /** @description The label of the detection that lost arbitration. */
9197
- competing_label: components["schemas"]["LabelRef"];
9463
+ detail: components["schemas"]["Conflict"];
9198
9464
  /** @constant */
9199
9465
  kind: "conflict";
9200
- /** @description Name of the conflict policy that chose the winner. */
9201
- resolved_by: string;
9202
9466
  } | {
9203
- /** @description The competing detection's confidence. */
9204
- competing_confidence: components["schemas"]["Confidence"];
9205
- /** @description The label of the competing detection. */
9206
- competing_label: components["schemas"]["LabelRef"];
9207
- /** @description Name of the policy that flagged the contest. */
9208
- flagged_by: string;
9467
+ detail: components["schemas"]["Contested"];
9209
9468
  /** @constant */
9210
9469
  kind: "contested";
9211
9470
  } | {
9212
- /**
9213
- * Format: double
9214
- * @description Multiplier applied.
9215
- */
9216
- factor: number;
9471
+ detail: components["schemas"]["Calibration"];
9217
9472
  /** @constant */
9218
9473
  kind: "calibration";
9219
9474
  } | {
9220
- /**
9221
- * @description The located [`Hint`] the keyword fired from, when the match came
9222
- * from an out-of-band hint (a column header, a key) rather than
9223
- * the in-text word window. `None` for an in-text-window match.
9224
- *
9225
- * [`Hint`]: crate::modality::Hint
9226
- */
9227
- hint?: components["schemas"]["AudioHint"];
9228
- /** @description Keyword that fired the boost. */
9229
- keyword: string;
9475
+ detail: components["schemas"]["AudioRefinement"];
9230
9476
  /** @constant */
9231
9477
  kind: "refinement";
9232
- /**
9233
- * @description Where the boosting keyword sits in the medium. For a hint match
9234
- * this mirrors the hint's own location; for an in-text-window match
9235
- * it is the keyword resolved through the modality's [`locate`] (a
9236
- * pixel box for image, a time span for audio, the byte range for
9237
- * text/tabular). `None` when the keyword's stream range could not be
9238
- * placed, symmetric with a match the recognizer itself drops.
9239
- *
9240
- * [`locate`]: crate::modality::TextRecognizable::locate
9241
- */
9242
- location?: components["schemas"]["AudioLocation"];
9243
9478
  } | {
9244
- /**
9245
- * @description The author-supplied policy rationale, when the operator carried an
9246
- * [`Attribution`]; `None` otherwise.
9247
- */
9248
- attribution?: components["schemas"]["Attribution"];
9249
- /** @description Identifier of the key needed to reverse it, if reversible. */
9250
- key_id?: string;
9479
+ detail: components["schemas"]["Redaction"];
9251
9480
  /** @constant */
9252
9481
  kind: "redaction";
9253
- /** @description How much the output leaks about the original. */
9254
- leak_profile: components["schemas"]["LeakProfile"];
9255
- /**
9256
- * @description Which selection rule chose this operator: the automatic "why"
9257
- * (matched a label, a tag, a predicate, or the fallback).
9258
- */
9259
- matched_by: components["schemas"]["RuleMatch"];
9260
- /** @description Which operator (name + version) ran. */
9261
- operator: components["schemas"]["OperatorId"];
9262
- /**
9263
- * @description BLAKE3 digest of the original text the operator hid, when the
9264
- * redaction layer recorded it. Proves *what* was redacted without
9265
- * storing the plaintext; `None` when the operator did not capture it.
9266
- */
9267
- span_hash?: components["schemas"]["AuditHash"];
9268
- /**
9269
- * Format: uint32
9270
- * @description Byte length of the original text the operator hid, paired with
9271
- * [`span_hash`](Self::Redaction::span_hash). `None` when not captured.
9272
- */
9273
- span_length?: number;
9482
+ } | {
9483
+ detail: components["schemas"]["Selection"];
9484
+ /** @constant */
9485
+ kind: "selection";
9486
+ } | {
9487
+ detail: components["schemas"]["AudioManual"];
9488
+ /** @constant */
9489
+ kind: "manual";
9274
9490
  };
9275
9491
  /**
9276
9492
  * @description Full audit trail of an [`Entity`]: every [`AuditEvent`] in its life, as a
@@ -9327,6 +9543,23 @@ interface components {
9327
9543
  /** @description Original filename, when known. */
9328
9544
  filename?: string;
9329
9545
  };
9546
+ /**
9547
+ * @description One change to an analyzed document.
9548
+ *
9549
+ * `Add` carries no id because the entity does not exist yet; the
9550
+ * engine mints one when the edit is applied, so a client cannot
9551
+ * collide with a real detection or shadow an existing entity.
9552
+ */
9553
+ AudioEdit: ({
9554
+ /** @constant */
9555
+ op: "add";
9556
+ } & components["schemas"]["AudioAdd"]) | ({
9557
+ /** @constant */
9558
+ op: "retag";
9559
+ } & components["schemas"]["AudioRetag"]) | ({
9560
+ /** @constant */
9561
+ op: "suppress";
9562
+ } & components["schemas"]["Suppress"]);
9330
9563
  /**
9331
9564
  * @description Detected piece of sensitive information within some medium.
9332
9565
  *
@@ -9355,7 +9588,12 @@ interface components {
9355
9588
  AudioEntity: {
9356
9589
  /**
9357
9590
  * @description Tamper-evident audit trail: every contributing detection, the fusion
9358
- * event if any, and the redaction that hid it, as a hash-linked DAG.
9591
+ * event if any, and the redaction that hid it, as a hash-linked DAG. It is
9592
+ * also the single source of truth for whether a reviewer
9593
+ * [suppressed](Self::is_suppressed) the entity — a suppression is a
9594
+ * [`Manual`] event on this trail, not a separate flag.
9595
+ *
9596
+ * [`Manual`]: crate::entity::audit::AuditKind::Manual
9359
9597
  */
9360
9598
  audit: components["schemas"]["AudioAuditLog"];
9361
9599
  /** @description Effective confidence in `0.0..=1.0` (fused, if applicable). */
@@ -9400,30 +9638,6 @@ interface components {
9400
9638
  */
9401
9639
  recognized_range?: components["schemas"]["Range_of_uint"];
9402
9640
  };
9403
- /**
9404
- * @description One recognized entity plus the optional reviewer override.
9405
- *
9406
- * The bound mirrors elide's [`Entity<M>`]: serialization needs
9407
- * `M::Location` and `M::Data` (de)serializable, and JsonSchema
9408
- * derivation needs them schema-able. All four modalities elide
9409
- * ships satisfy these under the `serde` + `schema` features.
9410
- */
9411
- AudioEntityRecord: {
9412
- /** @description The elide entity, as recognition produced it. */
9413
- entity: components["schemas"]["AudioEntity"];
9414
- /**
9415
- * @description Reviewer-supplied redaction override.
9416
- *
9417
- * `None` means "use the matching policy rule's decision";
9418
- * `Some(...)` overrides that rule for this specific entity
9419
- * at apply time. Reviewer overrides take precedence over
9420
- * every policy rule and inherit the authority of the
9421
- * [`Review::policy_id`] they name: the audit event's
9422
- * attribution stamps that policy so the trail names the
9423
- * authority under which the override fired.
9424
- */
9425
- review?: components["schemas"]["Review"];
9426
- };
9427
9641
  /**
9428
9642
  * @description Located, typed piece of context a recognizer may treat as in-context
9429
9643
  * for a nearby value.
@@ -9464,6 +9678,54 @@ interface components {
9464
9678
  /** @description Diarization label of the speaker, when a diarizer assigned one. */
9465
9679
  speaker_id?: string;
9466
9680
  };
9681
+ /**
9682
+ * @description A human override, outside automatic detection: an entity a reviewer added by
9683
+ * hand, or a detected one they marked to ignore. Its provenance is a person's
9684
+ * decision, not a recognizer's — so the trail records *why* (an
9685
+ * [`Attribution`], when supplied). *Who* made the override is the event's
9686
+ * [`source`], not a payload field.
9687
+ *
9688
+ * [`source`]: super::AuditEvent::source
9689
+ */
9690
+ AudioManual: {
9691
+ /**
9692
+ * @description The reviewer's rationale, when supplied (e.g. a freeform
9693
+ * `"false positive"`, or a cited authority). `None` for an unexplained
9694
+ * override.
9695
+ */
9696
+ attribution?: components["schemas"]["Attribution"];
9697
+ /**
9698
+ * @description Which human decision this records: including a missed entity, or
9699
+ * suppressing a detected one. This is the authority on whether the entity
9700
+ * is redacted — [`AuditLog::is_suppressed`] reads it, so there is no
9701
+ * separate flag to keep in sync.
9702
+ *
9703
+ * [`AuditLog::is_suppressed`]: crate::entity::audit::AuditLog::is_suppressed
9704
+ */
9705
+ intent: components["schemas"]["ManualIntent"];
9706
+ /** @description Where the override applies, in modality-native coordinates. */
9707
+ location: components["schemas"]["AudioLocation"];
9708
+ };
9709
+ /**
9710
+ * @description Detail of a model/NER recognition: a model matched at `location`, with its
9711
+ * metadata in `model`.
9712
+ */
9713
+ AudioModel: {
9714
+ /** @description Where the recognizer matched. */
9715
+ location: components["schemas"]["AudioLocation"];
9716
+ /** @description Model metadata (name, version, contextual flag). */
9717
+ model: components["schemas"]["ModelEvent"];
9718
+ };
9719
+ /**
9720
+ * @description Detail of a pattern/dictionary recognition: a recognizer matched at
9721
+ * `location`, with the pattern metadata in `pattern`.
9722
+ */
9723
+ AudioPattern: {
9724
+ /** @description Where the recognizer matched. */
9725
+ location: components["schemas"]["AudioLocation"];
9726
+ /** @description Pattern metadata (name, regex, validator, contextual flag). */
9727
+ pattern: components["schemas"]["PatternEvent"];
9728
+ };
9467
9729
  /** @description Operator spec a `redact` audio rule carries. */
9468
9730
  AudioRedaction: {
9469
9731
  /** @constant */
@@ -9497,140 +9759,133 @@ interface components {
9497
9759
  */
9498
9760
  waveform?: components["schemas"]["Waveform"];
9499
9761
  };
9500
- /**
9501
- * @description What detection found in one document.
9502
- *
9503
- * The body group plus per-container-part groups (each tagged by
9504
- * modality) plus the recognition [`AuditContext`] the entities
9505
- * were scored against.
9506
- *
9507
- * The context travels with the entities so anonymize can rebuild
9508
- * an orchestrator against exactly the vocabulary analyze used.
9509
- * Anything a policy predicate compares against beyond the label
9510
- * catalog (asserted languages, jurisdictions, document tags) is
9511
- * here; labels are re-derived from the policy set on each
9512
- * anonymize call.
9513
- *
9514
- * No [`Default`]: a well-formed audit must carry a real
9515
- * [`AuditContext`] with a real correlation id. Callers building
9516
- * an audit outside the analyze path construct it explicitly.
9517
- */
9518
- Audit: {
9762
+ /** @description A context keyword near the entity lifted its confidence. */
9763
+ AudioRefinement: {
9519
9764
  /**
9520
- * @description The body group.
9765
+ * @description The located [`Hint`] the keyword fired from, when the match came from an
9766
+ * out-of-band hint (a column header, a key) rather than the in-text word
9767
+ * window. `None` for an in-text-window match.
9521
9768
  *
9522
- * `None` when no body pipeline produced entities (pre-analyze,
9523
- * or the codec resolved the doc to a modality with no
9524
- * pipeline).
9769
+ * [`Hint`]: crate::modality::Hint
9525
9770
  */
9526
- body?: components["schemas"]["EntityGroup"];
9771
+ hint?: components["schemas"]["AudioHint"];
9772
+ /** @description Keyword that fired the boost. */
9773
+ keyword: string;
9527
9774
  /**
9528
- * @description Recognition context.
9529
- *
9530
- * The asserted languages, countries, document tags, and the
9531
- * analyze-side correlation id. Held so
9532
- * [`Engine::anonymize`] can compile against the same
9533
- * vocabulary analyze used without the caller re-passing an
9534
- * `AnalyzerParams`.
9775
+ * @description Where the boosting keyword sits in the medium. For a hint match this
9776
+ * mirrors the hint's own location; for an in-text-window match it is the
9777
+ * keyword resolved through the modality's [`locate`]. `None` when the
9778
+ * keyword's stream range could not be placed.
9535
9779
  *
9536
- * Required on the wire: a missing context on an incoming
9537
- * [`Audit`] rejects at deserialize time so the shape
9538
- * mismatch surfaces at load, not at apply.
9539
- *
9540
- * [`Engine::anonymize`]: super::Engine::anonymize
9780
+ * [`locate`]: crate::modality::TextRecognizable::locate
9541
9781
  */
9542
- context: components["schemas"]["AuditContext"];
9782
+ location?: components["schemas"]["AudioLocation"];
9783
+ };
9784
+ /**
9785
+ * @description Correct what an existing detection *is* or *covers*, then redact
9786
+ * it under the policy set as corrected.
9787
+ *
9788
+ * A reviewer fixing recognition's mistake rather than overriding
9789
+ * its consequence. Retagging into a label the policy does not cover
9790
+ * leaves the entity alone, exactly as if it had been detected that
9791
+ * way — which is why it is auditable rather than a mutable field.
9792
+ */
9793
+ AudioRetag: {
9794
+ /** @description Who made it, when the caller said. */
9795
+ actor?: string;
9543
9796
  /**
9544
- * @description One entry per container part the orchestrator surfaced.
9545
- *
9546
- * Keyed by the container-private part id (e.g. a DOCX zip
9547
- * entry name like `"word/media/image1.png"`); each value
9548
- * carries that part's modality + entities.
9797
+ * Format: uuid
9798
+ * @description The entity being corrected.
9549
9799
  */
9550
- parts?: {
9551
- [key: string]: components["schemas"]["EntityGroup"];
9552
- };
9800
+ id: string;
9801
+ /** @description The corrected label, when recognition got it wrong. */
9802
+ label?: components["schemas"]["LabelRef"];
9553
9803
  /**
9554
- * @description What the analyze pass cost: one entry per recognizer and
9555
- * enricher that ran, each self-identifying by the name the
9556
- * deployment configured it under.
9557
- *
9558
- * Empty when nothing model-backed ran, which is the common
9559
- * case for a pattern-only pass. Recorded on analyze and not
9560
- * re-derived at anonymize time, so a host that bills or rate
9561
- * limits on model spend reads it straight off the returned
9562
- * [`Audit`].
9804
+ * @description The corrected location, when the span clipped the value or
9805
+ * ran past it.
9563
9806
  */
9564
- usage?: components["schemas"]["UsageReport"];
9807
+ location?: components["schemas"]["AudioLocation"];
9808
+ /** @description The rationale, when one was given. */
9809
+ reason?: string;
9565
9810
  };
9566
9811
  /**
9567
- * @description Recognition-side facts that travel from analyze to anonymize.
9812
+ * @description What detection found in one document.
9813
+ *
9814
+ * Wraps elide's [`Report`] with the things elide does not model:
9815
+ * the recognition [`DocumentContext`] the entities were scored
9816
+ * against, how the document decoded, and what the pass cost.
9817
+ *
9818
+ * Reviewer edits are not here. They are the caller's own input,
9819
+ * applied to the report before anonymize
9820
+ * ([`EditSet::apply`](crate::entity::EditSet::apply)), so an audit
9821
+ * carries what analysis found *as amended* rather than the
9822
+ * amendments themselves.
9568
9823
  *
9569
- * Mirrors elide's [`Scope`] shape one-for-one: direct fields
9570
- * for `languages` and `countries` (typed, elide-native), a
9571
- * [`metadata`] sub-struct for free-form classification strings
9572
- * (`tags`, `purpose`, `audience`), and the analyze-time
9573
- * [`correlation_id`]. The label catalog is not on here -
9574
- * labels are policy-owned, and anonymize re-derives them from
9575
- * the policy set it was handed.
9824
+ * # Serialization
9576
9825
  *
9577
- * No [`Default`]: `correlation_id` has no meaningful default
9578
- * (a nil UUID would silently collapse unrelated audits under
9579
- * one bucket in downstream trace aggregators), so callers
9580
- * supply one explicitly. Everything else defaults to empty.
9826
+ * [`Serialize`] but deliberately **not** `Deserialize`: a
9827
+ * serialized report tags entity groups by modality *name*, so
9828
+ * rebuilding one needs the registry [`Engine`] holds. Read an
9829
+ * audit back with [`Engine::deserialize_audit`].
9581
9830
  *
9582
- * [`Scope`]: elide::recognition::Scope
9583
- * [`metadata`]: Self::metadata
9584
- * [`correlation_id`]: Self::correlation_id
9831
+ * # Schema
9832
+ *
9833
+ * Generate under the **serialize** contract
9834
+ * ([`SchemaSettings::for_serialize`]). `usage` is
9835
+ * `skip_serializing_if`, and only that contract marks it optional
9836
+ * — `schema_for!` defaults to deserialize and declares it
9837
+ * required, so a generated client would reject responses this
9838
+ * crate really emits.
9839
+ *
9840
+ * [`Engine`]: super::Engine
9841
+ * [`Engine::deserialize_audit`]: super::Engine::deserialize_audit
9842
+ * [`Report`]: elide::Report
9843
+ * [`SchemaSettings::for_serialize`]: schemars::generate::SchemaSettings::for_serialize
9585
9844
  */
9586
- AuditContext: {
9845
+ Audit: {
9587
9846
  /**
9588
- * Format: uuid
9589
- * @description Analyze-time correlation id.
9847
+ * @description How this document was decoded when it was analyzed.
9590
9848
  *
9591
- * Threaded into every tracing span on the recognition path;
9592
- * carried over so the anonymize path can link its own spans
9593
- * to the same request. The anonymize call supplies a fresh
9594
- * id from the passed [`Document`] as the anonymize-side
9595
- * correlation id: this one stays as the analyze-side
9596
- * pointer.
9597
- *
9598
- * Required on the wire.
9599
- *
9600
- * [`Document`]: elide_wire::file::Document
9849
+ * Carried back so anonymize decodes identically: the entity
9850
+ * offsets below are stored against the first decode, and a
9851
+ * differently-rendered second one would not line up.
9601
9852
  */
9602
- correlationId: string;
9853
+ codec: components["schemas"]["CodecParams"];
9603
9854
  /**
9604
- * @description Caller-asserted jurisdictions.
9855
+ * @description What the caller asserted when this document was analyzed:
9856
+ * languages, jurisdictions, document tags.
9605
9857
  *
9606
- * Recorded from `AnalyzerParams.scope.countries`.
9607
- */
9608
- countries?: components["schemas"]["CountryCode"][];
9609
- /**
9610
- * @description Caller-asserted languages for the analysis.
9858
+ * Carried back so [`Engine::anonymize`] compiles against the
9859
+ * same vocabulary analyze used, and re-decodes under the same
9860
+ * codec configuration, without the caller re-passing it.
9611
9861
  *
9612
- * Recorded from `AnalyzerParams.scope.languages` at analyze
9613
- * time; anonymize re-uses them verbatim.
9614
- * @default []
9862
+ * [`Engine::anonymize`]: super::Engine::anonymize
9615
9863
  */
9616
- languages?: components["schemas"]["Languages"];
9864
+ context: components["schemas"]["DocumentContext"];
9617
9865
  /**
9618
- * @description Free-form request context: document tags, request purpose,
9619
- * output audience. See elide's [`ScopeMetadata`].
9866
+ * @description The detections: elide's own report, body and container
9867
+ * parts, each entity carrying its provenance chain.
9868
+ *
9869
+ * Edit it through [`Report`]'s own API — [`include`],
9870
+ * [`suppress`], [`entities`] — for the decisions elide models.
9871
+ *
9872
+ * [`Report`]: elide::Report
9873
+ * [`include`]: elide::Report::include
9874
+ * [`suppress`]: elide::Report::suppress
9875
+ * [`entities`]: elide::Report::entities
9620
9876
  */
9621
- metadata?: components["schemas"]["ScopeMetadata"];
9877
+ report: components["schemas"]["Report"];
9622
9878
  /**
9623
- * @description OCR mode the analyze call decoded with. Recorded so the
9624
- * anonymize call re-decodes the same document under the same
9625
- * codec configuration: otherwise entity offsets stored in
9626
- * the audit wouldn't line up against a differently-rendered
9627
- * second decode. Defaults to [`RasterMode::Auto`] (the codec's
9628
- * built-in behaviour) when omitted.
9629
- * @default {
9630
- * "kind": "auto"
9631
- * }
9879
+ * @description What the analyze pass cost: one entry per recognizer and
9880
+ * enricher that ran, each self-identifying by the name the
9881
+ * deployment configured it under.
9882
+ *
9883
+ * Carried here rather than read off the report: elide derives
9884
+ * usage during analysis and drops it when a report is rebuilt
9885
+ * from the wire, so a host that bills on model spend would
9886
+ * lose it on the round trip.
9632
9887
  */
9633
- rasterMode?: components["schemas"]["RasterMode"];
9888
+ usage: components["schemas"]["UsageReport"];
9634
9889
  };
9635
9890
  /**
9636
9891
  * @description A 32-byte BLAKE3 digest.
@@ -9717,6 +9972,14 @@ interface components {
9717
9972
  /** @description Minimum corner (top-left, conventionally). */
9718
9973
  min: components["schemas"]["Point"];
9719
9974
  };
9975
+ /** @description The entity's confidence was rescaled by a per-recognizer factor. */
9976
+ Calibration: {
9977
+ /**
9978
+ * Format: double
9979
+ * @description Multiplier applied.
9980
+ */
9981
+ factor: number;
9982
+ };
9720
9983
  /**
9721
9984
  * @description The coarse group a [`Label`] belongs to, for organizing detected entities
9722
9985
  * by kind (`financial`, `health`, `identity`, …).
@@ -9819,6 +10082,21 @@ interface components {
9819
10082
  /** @description The text delta. */
9820
10083
  delta: string;
9821
10084
  };
10085
+ /**
10086
+ * @description A [`Cited`](Attribution::Cited) rationale: a citable authority, the citation
10087
+ * within it, and an optional rationale for why it applies.
10088
+ */
10089
+ CitedAttribution: {
10090
+ /** @description The authority cited (e.g. `"GDPR"`, `"HIPAA"`, `"internal-policy"`). */
10091
+ authority: string;
10092
+ /** @description The citation within that authority (e.g. `"Art. 17(1)"`, `"§164.514"`). */
10093
+ citation: string;
10094
+ /**
10095
+ * @description Why the citation applies here (e.g. `"data subject requested erasure"`),
10096
+ * when given.
10097
+ */
10098
+ rationale?: string;
10099
+ };
9822
10100
  /**
9823
10101
  * @description Text a [`TextRedaction::Clamp`] emits for out-of-range values.
9824
10102
  *
@@ -9845,6 +10123,24 @@ interface components {
9845
10123
  } | {
9846
10124
  [key: string]: string;
9847
10125
  };
10126
+ /**
10127
+ * @description How the codec decodes this document.
10128
+ *
10129
+ * Defaults to the codec's own behaviour, so a caller with no
10130
+ * opinion passes [`CodecParams::default`].
10131
+ */
10132
+ CodecParams: {
10133
+ /**
10134
+ * @description How container formats carrying both a text layer and page
10135
+ * images treat OCR.
10136
+ *
10137
+ * Defaults to [`RasterMode::Auto`], the codec's own behaviour.
10138
+ * @default {
10139
+ * "kind": "auto"
10140
+ * }
10141
+ */
10142
+ rasterMode?: components["schemas"]["RasterMode"];
10143
+ };
9848
10144
  /**
9849
10145
  * @description Color as 8-bit RGB.
9850
10146
  *
@@ -9904,6 +10200,18 @@ interface components {
9904
10200
  * [`Confidence`]: crate::primitive::Confidence
9905
10201
  */
9906
10202
  ConfidenceThreshold: number;
10203
+ /**
10204
+ * @description A competing detection of a *different* label over the same span was resolved
10205
+ * against this (winning) entity — the loser is recorded, not dropped.
10206
+ */
10207
+ Conflict: {
10208
+ /** @description The loser's confidence at resolution time. */
10209
+ competing_confidence: components["schemas"]["Confidence"];
10210
+ /** @description The label of the detection that lost arbitration. */
10211
+ competing_label: components["schemas"]["LabelRef"];
10212
+ /** @description Name of the conflict policy that chose the winner. */
10213
+ resolved_by: string;
10214
+ };
9907
10215
  /**
9908
10216
  * @description Response type for a workspace connection.
9909
10217
  *
@@ -10087,6 +10395,19 @@ interface components {
10087
10395
  */
10088
10396
  provider?: string[];
10089
10397
  };
10398
+ /**
10399
+ * @description A competing detection of a different label over the same span was left
10400
+ * *unresolved*: both entities survive, flagged for a human. Recorded on each
10401
+ * entity of the contested pair, naming the other.
10402
+ */
10403
+ Contested: {
10404
+ /** @description The competing detection's confidence. */
10405
+ competing_confidence: components["schemas"]["Confidence"];
10406
+ /** @description The label of the competing detection. */
10407
+ competing_label: components["schemas"]["LabelRef"];
10408
+ /** @description Name of the policy that flagged the contest. */
10409
+ flagged_by: string;
10410
+ };
10090
10411
  /**
10091
10412
  * @description [ISO 3166-1] country, identified by its code.
10092
10413
  *
@@ -10136,6 +10457,26 @@ interface components {
10136
10457
  */
10137
10458
  sync?: components["schemas"]["SyncScheduleInput"];
10138
10459
  };
10460
+ /**
10461
+ * @description Request payload to start a detection over a file.
10462
+ *
10463
+ * Analyzes the file with the pipeline's configuration and returns the
10464
+ * detection, which holds the findings for review before redaction.
10465
+ */
10466
+ CreateDetection: {
10467
+ /**
10468
+ * Format: uuid
10469
+ * @description The file to analyze.
10470
+ */
10471
+ fileId: string;
10472
+ /**
10473
+ * @description Per-document scope (languages, jurisdictions, document labels).
10474
+ *
10475
+ * Overrides the pipeline's `defaultScope` when present; absent falls back to
10476
+ * the pipeline default.
10477
+ */
10478
+ scope?: components["schemas"]["DocumentContext"];
10479
+ };
10139
10480
  /** @description Request payload for creating a new workspace invite. */
10140
10481
  CreateInvite: {
10141
10482
  /** @description When the invitation expires. */
@@ -10177,26 +10518,6 @@ interface components {
10177
10518
  */
10178
10519
  status?: components["schemas"]["PipelineStatus"];
10179
10520
  };
10180
- /**
10181
- * @description Request payload to start a run (detect) over a file.
10182
- *
10183
- * Analyzes the file with the pipeline's configuration and returns the run,
10184
- * which holds the findings for review before redaction.
10185
- */
10186
- CreatePipelineRun: {
10187
- /**
10188
- * Format: uuid
10189
- * @description The file to analyze.
10190
- */
10191
- fileId: string;
10192
- /**
10193
- * @description Per-document scope (languages, jurisdictions, document labels).
10194
- *
10195
- * Overrides the pipeline's `defaultScope` when present; absent falls back to
10196
- * the pipeline default.
10197
- */
10198
- scope?: components["schemas"]["ScopeParams"];
10199
- };
10200
10521
  /**
10201
10522
  * @description Request payload for creating a new workspace policy.
10202
10523
  *
@@ -10329,42 +10650,327 @@ interface components {
10329
10650
  */
10330
10651
  to?: string;
10331
10652
  };
10653
+ /** @description Several detections were fused into one entity. */
10654
+ Deduplication: {
10655
+ /** @description Name of the fusion strategy that combined them. */
10656
+ strategy: string;
10657
+ };
10332
10658
  /**
10333
- * @description Pixel dimensions of an image or any 2-D canvas.
10334
- *
10335
- * Converts between normalized `0.0..=1.0` coordinates (what vision
10336
- * models typically emit) and absolute pixel coordinates (what renderers
10337
- * consume). See
10338
- * [`UnitBoundingBox::denormalize`]
10339
- * for the conversion.
10659
+ * @description Response type for a detection.
10340
10660
  *
10341
- * [`UnitBoundingBox::denormalize`]: super::UnitBoundingBox::denormalize
10661
+ * A detection is addressed by its own opaque id; the owning pipeline and
10662
+ * workspace slugs are carried for context. Redacted outputs are not here — a
10663
+ * detection produces many redactions, each fetched from its `redactions`
10664
+ * endpoint.
10342
10665
  */
10343
- Dimensions: {
10666
+ Detection: {
10344
10667
  /**
10345
- * Format: uint32
10346
- * @description Height in pixels.
10668
+ * Format: date-time
10669
+ * @description When the detection completed analysis.
10347
10670
  */
10348
- height: number;
10671
+ completedAt?: string;
10672
+ /** @description Human-readable failure reason, present only when the detection `failed`. */
10673
+ error?: string;
10674
+ /** @description Opaque identifier of the detection. */
10675
+ id: components["schemas"]["DetectionId"];
10349
10676
  /**
10350
- * Format: uint32
10351
- * @description Width in pixels.
10677
+ * Format: uuid
10678
+ * @description Source document this detection analyzes.
10352
10679
  */
10353
- width: number;
10354
- };
10355
- /**
10356
- * Format: uint16
10357
- * @description Dots-per-inch resolution for rasterizing vector content.
10358
- *
10359
- * Used e.g. for rendering PDF pages to images for OCR.
10360
- *
10361
- * PDF coordinates are in points (1 pt = 1/72 in), so
10362
- * [`scale_factor`] gives the multiplier from points to
10363
- * pixels at this resolution.
10364
- *
10680
+ inputFileId: string;
10681
+ /**
10682
+ * @description Display name of the source document, for showing the detection without a
10683
+ * separate file lookup. `None` if the file was removed (e.g. by retention).
10684
+ */
10685
+ inputFileName?: string;
10686
+ /** @description Non-encrypted metadata for filtering/display. */
10687
+ metadata: components["schemas"]["DetectionMetadata"];
10688
+ /** @description Handle of the pipeline this detection belongs to. */
10689
+ pipelineSlug: components["schemas"]["Handle"];
10690
+ /**
10691
+ * Format: date-time
10692
+ * @description When the detection started.
10693
+ */
10694
+ startedAt: string;
10695
+ /**
10696
+ * @description Current detection status.
10697
+ *
10698
+ * The detections are available to fetch from the detection's `analysis`
10699
+ * endpoint once this reaches `complete`.
10700
+ */
10701
+ status: components["schemas"]["DetectionStatus"];
10702
+ /** @description How the detection was triggered. */
10703
+ triggerType: components["schemas"]["PipelineTriggerType"];
10704
+ /** @description Account that triggered the detection. */
10705
+ triggeredBy: components["schemas"]["AccountRef"];
10706
+ /** @description Handle of the workspace this detection belongs to. */
10707
+ workspaceSlug: components["schemas"]["Handle"];
10708
+ };
10709
+ /** @description Params of a detection activity (`pipeline.detection.*`). */
10710
+ DetectionActivityParams: {
10711
+ /** @description Id of the detection. */
10712
+ detectionId: components["schemas"]["DetectionId"];
10713
+ /** @description Slug of the owning pipeline. */
10714
+ pipelineSlug: components["schemas"]["Handle"];
10715
+ };
10716
+ /** @description Pipeline-run health for a workspace. */
10717
+ DetectionAnalytics: {
10718
+ /**
10719
+ * Format: int64
10720
+ * @description Mean completed-run duration in milliseconds; omitted until a run completes.
10721
+ */
10722
+ avgDurationMs?: number;
10723
+ /**
10724
+ * @description Per-status breakdown, one entry per run status (zero-filled), in a stable
10725
+ * order.
10726
+ */
10727
+ byStatus: components["schemas"]["DetectionStatusEntry"][];
10728
+ /**
10729
+ * Format: double
10730
+ * @description Failed / (completed + failed). Omitted when no run has reached a terminal
10731
+ * state (genuinely no signal, not zero).
10732
+ */
10733
+ errorRate?: number;
10734
+ /**
10735
+ * Format: int64
10736
+ * @description 95th-percentile completed-run duration in milliseconds; omitted until a run
10737
+ * completes.
10738
+ */
10739
+ p95DurationMs?: number;
10740
+ /**
10741
+ * Format: int64
10742
+ * @description Total number of runs.
10743
+ */
10744
+ total: number;
10745
+ };
10746
+ /** @description Params of a `pipeline.detection.completed` notification. */
10747
+ DetectionCompletedParams: {
10748
+ /** @description Id of the detection. */
10749
+ detectionId: components["schemas"]["DetectionId"];
10750
+ /** @description Display name of the analyzed file, if known. */
10751
+ inputFileName?: string;
10752
+ /** @description Slug of the owning pipeline. */
10753
+ pipelineSlug: components["schemas"]["Handle"];
10754
+ };
10755
+ /** @description A single day of run activity. */
10756
+ DetectionDayEntry: {
10757
+ /**
10758
+ * Format: int64
10759
+ * @description Mean completed-run duration (milliseconds) this day; omitted if none completed.
10760
+ */
10761
+ avgDurationMs?: number;
10762
+ /**
10763
+ * Format: date
10764
+ * @description The day (`YYYY-MM-DD`, UTC).
10765
+ */
10766
+ date: string;
10767
+ /**
10768
+ * Format: double
10769
+ * @description Failed / (completed + failed) for this day; omitted when no run reached a
10770
+ * terminal state that day.
10771
+ */
10772
+ errorRate?: number;
10773
+ /**
10774
+ * Format: int64
10775
+ * @description Input/prompt tokens spent by this day's runs; omitted when none used a model.
10776
+ */
10777
+ inputTokens?: number;
10778
+ /**
10779
+ * Format: int64
10780
+ * @description Output/completion tokens spent this day; omitted when none used a model.
10781
+ */
10782
+ outputTokens?: number;
10783
+ /**
10784
+ * Format: int64
10785
+ * @description 95th-percentile completed-run duration (milliseconds) this day; omitted if none.
10786
+ */
10787
+ p95DurationMs?: number;
10788
+ /**
10789
+ * Format: int64
10790
+ * @description Runs started this day (`0` on a quiet day).
10791
+ */
10792
+ runs: number;
10793
+ /**
10794
+ * Format: int64
10795
+ * @description Reported total tokens this day; omitted when none used a model.
10796
+ */
10797
+ totalTokens?: number;
10798
+ };
10799
+ /** @description Params of a `pipeline.detection.failed` notification. */
10800
+ DetectionFailedParams: {
10801
+ /** @description Id of the detection. */
10802
+ detectionId: components["schemas"]["DetectionId"];
10803
+ /** @description Failure reason, if available. */
10804
+ error?: string;
10805
+ /** @description Display name of the analyzed file, if known. */
10806
+ inputFileName?: string;
10807
+ /** @description Slug of the owning pipeline. */
10808
+ pipelineSlug: components["schemas"]["Handle"];
10809
+ };
10810
+ /** @description Opaque detection identifier (detection_<uuid>). */
10811
+ DetectionId: string;
10812
+ /** @description Structured metadata for a detection. */
10813
+ DetectionMetadata: {
10814
+ /** @description Failure reason recorded when the detection failed. */
10815
+ error?: string;
10816
+ /** @description Free-form labels attached to the detection. */
10817
+ tags?: string[];
10818
+ /**
10819
+ * @description The engine's full per-recognizer usage report (durations, per-model token
10820
+ * counts), stored opaquely for drill-down. Per-model token totals for
10821
+ * aggregation live in the `workspace_detection_usage` table; this keeps the
10822
+ * detail. Absent when the detection produced no usage.
10823
+ */
10824
+ usage?: unknown;
10825
+ };
10826
+ /**
10827
+ * @description Generic paginated response wrapper.
10828
+ *
10829
+ * Provides a consistent structure for all paginated API responses with
10830
+ * cursor-based pagination support. When `next_cursor` is present, there
10831
+ * are more items to fetch.
10832
+ */
10833
+ DetectionPage: {
10834
+ /** @description Items in this page. */
10835
+ items: components["schemas"]["Detection"][];
10836
+ /** @description Cursor to fetch the next page. Present only when more items exist. */
10837
+ nextCursor?: string;
10838
+ /**
10839
+ * Format: int64
10840
+ * @description Total count of items matching the query (if requested).
10841
+ */
10842
+ total?: number;
10843
+ };
10844
+ /** @description Path parameters for detection operations. */
10845
+ DetectionPathParams: {
10846
+ /** @description Opaque identifier of the detection. */
10847
+ detectionId: components["schemas"]["DetectionId"];
10848
+ };
10849
+ /**
10850
+ * @description The execution status of a detection (one analysis pass of a file).
10851
+ *
10852
+ * Corresponds to the `DETECTION_STATUS` PostgreSQL enum. A detection is
10853
+ * `Pending` (enqueued, no worker yet), then `Executing` (a worker is actively
10854
+ * analyzing), then settles into `Complete` (analysis done, ready to redact) or
10855
+ * `Failed`. Redaction is a separate, repeatable action over a complete
10856
+ * detection and does not change this status.
10857
+ */
10858
+ DetectionStatus: "pending" | "executing" | "complete" | "failed";
10859
+ /** @description One status's share of a workspace's runs. */
10860
+ DetectionStatusEntry: {
10861
+ /**
10862
+ * Format: int64
10863
+ * @description Number of runs in this status.
10864
+ */
10865
+ count: number;
10866
+ /** @description The run status. */
10867
+ status: components["schemas"]["DetectionStatus"];
10868
+ };
10869
+ /**
10870
+ * @description A detection's status change, broadcast on the core-NATS subject
10871
+ * [`detection_subject`].
10872
+ *
10873
+ * Fan-out to any watching SSE connections; the detection row in Postgres remains
10874
+ * the source of truth, so a missed broadcast is recoverable by re-reading it.
10875
+ */
10876
+ DetectionStatusEvent: {
10877
+ /**
10878
+ * Format: uuid
10879
+ * @description The detection whose status changed.
10880
+ */
10881
+ detectionId: string;
10882
+ /** @description The detection's new status. */
10883
+ status: components["schemas"]["DetectionStatus"];
10884
+ };
10885
+ /**
10886
+ * @description A workspace's daily run activity over a window: one point per day, dense
10887
+ * (quiet days included with `runs: 0`), ready to plot as a continuous series.
10888
+ */
10889
+ DetectionTimeSeries: {
10890
+ /** @description One entry per day in the requested window, oldest first. */
10891
+ points: components["schemas"]["DetectionDayEntry"][];
10892
+ };
10893
+ /**
10894
+ * @description Pixel dimensions of an image or any 2-D canvas.
10895
+ *
10896
+ * Converts between normalized `0.0..=1.0` coordinates (what vision
10897
+ * models typically emit) and absolute pixel coordinates (what renderers
10898
+ * consume). See
10899
+ * [`UnitBoundingBox::denormalize`]
10900
+ * for the conversion.
10901
+ *
10902
+ * [`UnitBoundingBox::denormalize`]: super::UnitBoundingBox::denormalize
10903
+ */
10904
+ Dimensions: {
10905
+ /**
10906
+ * Format: uint32
10907
+ * @description Height in pixels.
10908
+ */
10909
+ height: number;
10910
+ /**
10911
+ * Format: uint32
10912
+ * @description Width in pixels.
10913
+ */
10914
+ width: number;
10915
+ };
10916
+ /**
10917
+ * @description What a caller asserts about the document being processed.
10918
+ *
10919
+ * Everything defaults to empty, so a caller asserting nothing
10920
+ * passes [`DocumentContext::default`] and lets the recognizers use
10921
+ * their own defaults.
10922
+ */
10923
+ DocumentContext: {
10924
+ /**
10925
+ * @description Jurisdictions the caller asserts apply.
10926
+ *
10927
+ * Read by policy predicates that vary by jurisdiction, so a
10928
+ * rule can act on a document from one country and not another.
10929
+ */
10930
+ countries?: components["schemas"]["CountryCode"][];
10931
+ /**
10932
+ * @description Languages the caller asserts the document is in.
10933
+ *
10934
+ * Recognizers that take a language hint use it; the
10935
+ * language-detection enricher fills the gap when this is
10936
+ * empty.
10937
+ * @default []
10938
+ */
10939
+ languages?: components["schemas"]["Languages"];
10940
+ /**
10941
+ * @description Free-form request context: document tags, request purpose,
10942
+ * output audience. See elide's [`ScopeMetadata`].
10943
+ */
10944
+ metadata?: components["schemas"]["ScopeMetadata"];
10945
+ };
10946
+ /**
10947
+ * Format: uint16
10948
+ * @description Dots-per-inch resolution for rasterizing vector content.
10949
+ *
10950
+ * Used e.g. for rendering PDF pages to images for OCR.
10951
+ *
10952
+ * PDF coordinates are in points (1 pt = 1/72 in), so
10953
+ * [`scale_factor`] gives the multiplier from points to
10954
+ * pixels at this resolution.
10955
+ *
10365
10956
  * [`scale_factor`]: Self::scale_factor
10366
10957
  */
10367
10958
  Dpi: number;
10959
+ /**
10960
+ * @description Reviewer edits for one document, one list per modality.
10961
+ *
10962
+ * Empty by default: an audit nobody has reviewed carries none.
10963
+ */
10964
+ EditSet: {
10965
+ /** @description Edits to audio entities. */
10966
+ audio?: components["schemas"]["AudioEdit"][];
10967
+ /** @description Edits to image entities. */
10968
+ image?: components["schemas"]["ImageEdit"][];
10969
+ /** @description Edits to tabular entities. */
10970
+ tabular?: components["schemas"]["TabularEdit"][];
10971
+ /** @description Edits to text entities. */
10972
+ text?: components["schemas"]["TextEdit"][];
10973
+ };
10368
10974
  /**
10369
10975
  * @description Coreference identifier shared by entities that denote the same
10370
10976
  * real-world thing.
@@ -10380,36 +10986,6 @@ interface components {
10380
10986
  * mentions, not a global key.
10381
10987
  */
10382
10988
  EntityCoRef: string;
10383
- /**
10384
- * @description A modality-tagged group of recognised entities.
10385
- *
10386
- * The unit [`Audit`] stores in `body` and in every `parts`
10387
- * entry.
10388
- *
10389
- * Tagged by `modality` (snake_case) so deserialization picks the
10390
- * right variant and the entity vec inside is statically typed
10391
- * per modality: apply-time we hand each variant back to elide
10392
- * as a `Vec<Entity<M>>` for the appropriate `M`.
10393
- *
10394
- * [`Audit`]: crate::Audit
10395
- */
10396
- EntityGroup: {
10397
- entities: components["schemas"]["TextEntityRecord"][];
10398
- /** @constant */
10399
- modality: "text";
10400
- } | {
10401
- entities: components["schemas"]["TabularEntityRecord"][];
10402
- /** @constant */
10403
- modality: "tabular";
10404
- } | {
10405
- entities: components["schemas"]["ImageEntityRecord"][];
10406
- /** @constant */
10407
- modality: "image";
10408
- } | {
10409
- entities: components["schemas"]["AudioEntityRecord"][];
10410
- /** @constant */
10411
- modality: "audio";
10412
- };
10413
10989
  /**
10414
10990
  * @description HTTP error response representation with security-conscious design.
10415
10991
  *
@@ -10503,7 +11079,7 @@ interface components {
10503
11079
  * version chain (lineage); import origin (connection and remote key) lives in
10504
11080
  * the `workspace_file_imports` satellite.
10505
11081
  */
10506
- FileKind: "original" | "redacted" | "audit";
11082
+ FileKind: "original" | "redacted" | "audit" | "review";
10507
11083
  /**
10508
11084
  * @description Generic paginated response wrapper.
10509
11085
  *
@@ -10527,6 +11103,16 @@ interface components {
10527
11103
  * @enum {string}
10528
11104
  */
10529
11105
  FormatToken: "csv" | "docx" | "htm" | "html" | "jpeg" | "jpg" | "json" | "log" | "pdf" | "png" | "rtf" | "tif" | "tiff" | "txt" | "wav" | "xlsx" | "xml";
11106
+ /**
11107
+ * @description A [`Freeform`](Attribution::Freeform) rationale: a policy label and an
11108
+ * optional human description, with no formal citation.
11109
+ */
11110
+ FreeformAttribution: {
11111
+ /** @description Human-readable description (e.g. `"right to erasure"`), when given. */
11112
+ description?: string;
11113
+ /** @description The policy's name (e.g. `"gdpr-art-17"`, `"hipaa-safe-harbor"`). */
11114
+ name: string;
11115
+ };
10530
11116
  /**
10531
11117
  * @description Typed credentials for Google Cloud Storage.
10532
11118
  *
@@ -10657,6 +11243,28 @@ interface components {
10657
11243
  * as de-identified.
10658
11244
  */
10659
11245
  HipaaDeidMethod: "safe_harbor" | "limited_data_set" | "expert_determination";
11246
+ /**
11247
+ * @description A detection recognition missed.
11248
+ *
11249
+ * Recorded on the report with human provenance, so it is never
11250
+ * mistaken for an automatic hit, then redacted under the policy set
11251
+ * like any other entity: an added label the policy does not cover
11252
+ * is left alone.
11253
+ *
11254
+ * Carries no entity id — the entity does not exist yet, and the
11255
+ * engine mints one when the edit is applied, so a client cannot
11256
+ * collide with a real detection or shadow an existing entity.
11257
+ */
11258
+ ImageAdd: {
11259
+ /** @description Who made it, when the caller said. */
11260
+ actor?: string;
11261
+ /** @description What the reviewer says this is. */
11262
+ label: components["schemas"]["LabelRef"];
11263
+ /** @description Where it sits in the document. */
11264
+ location: components["schemas"]["ImageLocation"];
11265
+ /** @description The rationale, when one was given. */
11266
+ reason?: string;
11267
+ };
10660
11268
  /**
10661
11269
  * @description One node in an entity's audit DAG: a thing that happened, with its
10662
11270
  * effect on confidence and its tamper-evident links.
@@ -10732,115 +11340,70 @@ interface components {
10732
11340
  * @description Kind of an [`AuditEvent`], carrying its event-specific detail and the
10733
11341
  * rationale for why it happened.
10734
11342
  *
10735
- * `#[non_exhaustive]`: new event kinds (verification, annotation, …)
10736
- * can be added compatibly. The recognition kinds ([`Pattern`],
10737
- * [`Model`]) carry the matched [`Location`]; the rest carry their own
10738
- * data.
10739
- *
11343
+ * A thin tagged union: each variant wraps one payload struct (e.g.
11344
+ * [`Redaction`], [`Selection`], [`Manual`]) that owns that kind's fields, its
11345
+ * docs, and how it folds into the audit hash. Match on a variant to reach its
11346
+ * payload:
11347
+ *
11348
+ * ```
11349
+ * # use elide_core::entity::audit::AuditKind;
11350
+ * # use elide_core::modality::text::Text;
11351
+ * # fn show(kind: &AuditKind<Text>) {
11352
+ * if let AuditKind::Redaction(redaction) = kind {
11353
+ * let _ = &redaction.operator;
11354
+ * }
11355
+ * # }
11356
+ * ```
11357
+ *
11358
+ * `#[non_exhaustive]`: new event kinds (verification, annotation, …) can be
11359
+ * added compatibly. The recognition kinds ([`Pattern`], [`Model`]) carry the
11360
+ * matched [`Location`]; the rest carry their own data.
11361
+ *
11362
+ * [`AuditEvent`]: super::AuditEvent
10740
11363
  * [`Pattern`]: AuditKind::Pattern
10741
11364
  * [`Model`]: AuditKind::Model
10742
11365
  * [`Location`]: Modality::Location
10743
11366
  */
10744
11367
  ImageAuditKind: {
11368
+ detail: components["schemas"]["ImagePattern"];
10745
11369
  /** @constant */
10746
11370
  kind: "pattern";
10747
- /** @description Where the recognizer matched. */
10748
- location: components["schemas"]["ImageLocation"];
10749
- /** @description Pattern detail. */
10750
- pattern: components["schemas"]["PatternEvent"];
10751
11371
  } | {
11372
+ detail: components["schemas"]["ImageModel"];
10752
11373
  /** @constant */
10753
11374
  kind: "model";
10754
- /** @description Where the recognizer matched. */
10755
- location: components["schemas"]["ImageLocation"];
10756
- /** @description Model detail. */
10757
- model: components["schemas"]["ModelEvent"];
10758
11375
  } | {
11376
+ detail: components["schemas"]["Deduplication"];
10759
11377
  /** @constant */
10760
11378
  kind: "deduplication";
10761
- /** @description Name of the fusion strategy that combined them. */
10762
- strategy: string;
10763
11379
  } | {
10764
- /** @description The loser's confidence at resolution time. */
10765
- competing_confidence: components["schemas"]["Confidence"];
10766
- /** @description The label of the detection that lost arbitration. */
10767
- competing_label: components["schemas"]["LabelRef"];
11380
+ detail: components["schemas"]["Conflict"];
10768
11381
  /** @constant */
10769
11382
  kind: "conflict";
10770
- /** @description Name of the conflict policy that chose the winner. */
10771
- resolved_by: string;
10772
- } | {
10773
- /** @description The competing detection's confidence. */
10774
- competing_confidence: components["schemas"]["Confidence"];
10775
- /** @description The label of the competing detection. */
10776
- competing_label: components["schemas"]["LabelRef"];
10777
- /** @description Name of the policy that flagged the contest. */
10778
- flagged_by: string;
10779
- /** @constant */
10780
- kind: "contested";
10781
- } | {
10782
- /**
10783
- * Format: double
10784
- * @description Multiplier applied.
10785
- */
10786
- factor: number;
11383
+ } | {
11384
+ detail: components["schemas"]["Contested"];
11385
+ /** @constant */
11386
+ kind: "contested";
11387
+ } | {
11388
+ detail: components["schemas"]["Calibration"];
10787
11389
  /** @constant */
10788
11390
  kind: "calibration";
10789
11391
  } | {
10790
- /**
10791
- * @description The located [`Hint`] the keyword fired from, when the match came
10792
- * from an out-of-band hint (a column header, a key) rather than
10793
- * the in-text word window. `None` for an in-text-window match.
10794
- *
10795
- * [`Hint`]: crate::modality::Hint
10796
- */
10797
- hint?: components["schemas"]["ImageHint"];
10798
- /** @description Keyword that fired the boost. */
10799
- keyword: string;
11392
+ detail: components["schemas"]["ImageRefinement"];
10800
11393
  /** @constant */
10801
11394
  kind: "refinement";
10802
- /**
10803
- * @description Where the boosting keyword sits in the medium. For a hint match
10804
- * this mirrors the hint's own location; for an in-text-window match
10805
- * it is the keyword resolved through the modality's [`locate`] (a
10806
- * pixel box for image, a time span for audio, the byte range for
10807
- * text/tabular). `None` when the keyword's stream range could not be
10808
- * placed, symmetric with a match the recognizer itself drops.
10809
- *
10810
- * [`locate`]: crate::modality::TextRecognizable::locate
10811
- */
10812
- location?: components["schemas"]["ImageLocation"];
10813
11395
  } | {
10814
- /**
10815
- * @description The author-supplied policy rationale, when the operator carried an
10816
- * [`Attribution`]; `None` otherwise.
10817
- */
10818
- attribution?: components["schemas"]["Attribution"];
10819
- /** @description Identifier of the key needed to reverse it, if reversible. */
10820
- key_id?: string;
11396
+ detail: components["schemas"]["Redaction"];
10821
11397
  /** @constant */
10822
11398
  kind: "redaction";
10823
- /** @description How much the output leaks about the original. */
10824
- leak_profile: components["schemas"]["LeakProfile"];
10825
- /**
10826
- * @description Which selection rule chose this operator: the automatic "why"
10827
- * (matched a label, a tag, a predicate, or the fallback).
10828
- */
10829
- matched_by: components["schemas"]["RuleMatch"];
10830
- /** @description Which operator (name + version) ran. */
10831
- operator: components["schemas"]["OperatorId"];
10832
- /**
10833
- * @description BLAKE3 digest of the original text the operator hid, when the
10834
- * redaction layer recorded it. Proves *what* was redacted without
10835
- * storing the plaintext; `None` when the operator did not capture it.
10836
- */
10837
- span_hash?: components["schemas"]["AuditHash"];
10838
- /**
10839
- * Format: uint32
10840
- * @description Byte length of the original text the operator hid, paired with
10841
- * [`span_hash`](Self::Redaction::span_hash). `None` when not captured.
10842
- */
10843
- span_length?: number;
11399
+ } | {
11400
+ detail: components["schemas"]["Selection"];
11401
+ /** @constant */
11402
+ kind: "selection";
11403
+ } | {
11404
+ detail: components["schemas"]["ImageManual"];
11405
+ /** @constant */
11406
+ kind: "manual";
10844
11407
  };
10845
11408
  /**
10846
11409
  * @description Full audit trail of an [`Entity`]: every [`AuditEvent`] in its life, as a
@@ -10895,6 +11458,23 @@ interface components {
10895
11458
  /** @description Original filename, when known. */
10896
11459
  filename?: string;
10897
11460
  };
11461
+ /**
11462
+ * @description One change to an analyzed document.
11463
+ *
11464
+ * `Add` carries no id because the entity does not exist yet; the
11465
+ * engine mints one when the edit is applied, so a client cannot
11466
+ * collide with a real detection or shadow an existing entity.
11467
+ */
11468
+ ImageEdit: ({
11469
+ /** @constant */
11470
+ op: "add";
11471
+ } & components["schemas"]["ImageAdd"]) | ({
11472
+ /** @constant */
11473
+ op: "retag";
11474
+ } & components["schemas"]["ImageRetag"]) | ({
11475
+ /** @constant */
11476
+ op: "suppress";
11477
+ } & components["schemas"]["Suppress"]);
10898
11478
  /**
10899
11479
  * @description Detected piece of sensitive information within some medium.
10900
11480
  *
@@ -10923,7 +11503,12 @@ interface components {
10923
11503
  ImageEntity: {
10924
11504
  /**
10925
11505
  * @description Tamper-evident audit trail: every contributing detection, the fusion
10926
- * event if any, and the redaction that hid it, as a hash-linked DAG.
11506
+ * event if any, and the redaction that hid it, as a hash-linked DAG. It is
11507
+ * also the single source of truth for whether a reviewer
11508
+ * [suppressed](Self::is_suppressed) the entity — a suppression is a
11509
+ * [`Manual`] event on this trail, not a separate flag.
11510
+ *
11511
+ * [`Manual`]: crate::entity::audit::AuditKind::Manual
10927
11512
  */
10928
11513
  audit: components["schemas"]["ImageAuditLog"];
10929
11514
  /** @description Effective confidence in `0.0..=1.0` (fused, if applicable). */
@@ -10968,30 +11553,6 @@ interface components {
10968
11553
  */
10969
11554
  recognized_range?: components["schemas"]["Range_of_uint"];
10970
11555
  };
10971
- /**
10972
- * @description One recognized entity plus the optional reviewer override.
10973
- *
10974
- * The bound mirrors elide's [`Entity<M>`]: serialization needs
10975
- * `M::Location` and `M::Data` (de)serializable, and JsonSchema
10976
- * derivation needs them schema-able. All four modalities elide
10977
- * ships satisfy these under the `serde` + `schema` features.
10978
- */
10979
- ImageEntityRecord: {
10980
- /** @description The elide entity, as recognition produced it. */
10981
- entity: components["schemas"]["ImageEntity"];
10982
- /**
10983
- * @description Reviewer-supplied redaction override.
10984
- *
10985
- * `None` means "use the matching policy rule's decision";
10986
- * `Some(...)` overrides that rule for this specific entity
10987
- * at apply time. Reviewer overrides take precedence over
10988
- * every policy rule and inherit the authority of the
10989
- * [`Review::policy_id`] they name: the audit event's
10990
- * attribution stamps that policy so the trail names the
10991
- * authority under which the override fired.
10992
- */
10993
- review?: components["schemas"]["Review"];
10994
- };
10995
11556
  /**
10996
11557
  * @description Located, typed piece of context a recognizer may treat as in-context
10997
11558
  * for a nearby value.
@@ -11037,6 +11598,54 @@ interface components {
11037
11598
  */
11038
11599
  polygon?: components["schemas"]["Polygon"];
11039
11600
  };
11601
+ /**
11602
+ * @description A human override, outside automatic detection: an entity a reviewer added by
11603
+ * hand, or a detected one they marked to ignore. Its provenance is a person's
11604
+ * decision, not a recognizer's — so the trail records *why* (an
11605
+ * [`Attribution`], when supplied). *Who* made the override is the event's
11606
+ * [`source`], not a payload field.
11607
+ *
11608
+ * [`source`]: super::AuditEvent::source
11609
+ */
11610
+ ImageManual: {
11611
+ /**
11612
+ * @description The reviewer's rationale, when supplied (e.g. a freeform
11613
+ * `"false positive"`, or a cited authority). `None` for an unexplained
11614
+ * override.
11615
+ */
11616
+ attribution?: components["schemas"]["Attribution"];
11617
+ /**
11618
+ * @description Which human decision this records: including a missed entity, or
11619
+ * suppressing a detected one. This is the authority on whether the entity
11620
+ * is redacted — [`AuditLog::is_suppressed`] reads it, so there is no
11621
+ * separate flag to keep in sync.
11622
+ *
11623
+ * [`AuditLog::is_suppressed`]: crate::entity::audit::AuditLog::is_suppressed
11624
+ */
11625
+ intent: components["schemas"]["ManualIntent"];
11626
+ /** @description Where the override applies, in modality-native coordinates. */
11627
+ location: components["schemas"]["ImageLocation"];
11628
+ };
11629
+ /**
11630
+ * @description Detail of a model/NER recognition: a model matched at `location`, with its
11631
+ * metadata in `model`.
11632
+ */
11633
+ ImageModel: {
11634
+ /** @description Where the recognizer matched. */
11635
+ location: components["schemas"]["ImageLocation"];
11636
+ /** @description Model metadata (name, version, contextual flag). */
11637
+ model: components["schemas"]["ModelEvent"];
11638
+ };
11639
+ /**
11640
+ * @description Detail of a pattern/dictionary recognition: a recognizer matched at
11641
+ * `location`, with the pattern metadata in `pattern`.
11642
+ */
11643
+ ImagePattern: {
11644
+ /** @description Where the recognizer matched. */
11645
+ location: components["schemas"]["ImageLocation"];
11646
+ /** @description Pattern metadata (name, regex, validator, contextual flag). */
11647
+ pattern: components["schemas"]["PatternEvent"];
11648
+ };
11040
11649
  /** @description Operator spec a `redact` image rule carries. */
11041
11650
  ImageRedaction: {
11042
11651
  /** @constant */
@@ -11077,6 +11686,55 @@ interface components {
11077
11686
  /** @constant */
11078
11687
  kind: "blackbox";
11079
11688
  };
11689
+ /** @description A context keyword near the entity lifted its confidence. */
11690
+ ImageRefinement: {
11691
+ /**
11692
+ * @description The located [`Hint`] the keyword fired from, when the match came from an
11693
+ * out-of-band hint (a column header, a key) rather than the in-text word
11694
+ * window. `None` for an in-text-window match.
11695
+ *
11696
+ * [`Hint`]: crate::modality::Hint
11697
+ */
11698
+ hint?: components["schemas"]["ImageHint"];
11699
+ /** @description Keyword that fired the boost. */
11700
+ keyword: string;
11701
+ /**
11702
+ * @description Where the boosting keyword sits in the medium. For a hint match this
11703
+ * mirrors the hint's own location; for an in-text-window match it is the
11704
+ * keyword resolved through the modality's [`locate`]. `None` when the
11705
+ * keyword's stream range could not be placed.
11706
+ *
11707
+ * [`locate`]: crate::modality::TextRecognizable::locate
11708
+ */
11709
+ location?: components["schemas"]["ImageLocation"];
11710
+ };
11711
+ /**
11712
+ * @description Correct what an existing detection *is* or *covers*, then redact
11713
+ * it under the policy set as corrected.
11714
+ *
11715
+ * A reviewer fixing recognition's mistake rather than overriding
11716
+ * its consequence. Retagging into a label the policy does not cover
11717
+ * leaves the entity alone, exactly as if it had been detected that
11718
+ * way — which is why it is auditable rather than a mutable field.
11719
+ */
11720
+ ImageRetag: {
11721
+ /** @description Who made it, when the caller said. */
11722
+ actor?: string;
11723
+ /**
11724
+ * Format: uuid
11725
+ * @description The entity being corrected.
11726
+ */
11727
+ id: string;
11728
+ /** @description The corrected label, when recognition got it wrong. */
11729
+ label?: components["schemas"]["LabelRef"];
11730
+ /**
11731
+ * @description The corrected location, when the span clipped the value or
11732
+ * ran past it.
11733
+ */
11734
+ location?: components["schemas"]["ImageLocation"];
11735
+ /** @description The rationale, when one was given. */
11736
+ reason?: string;
11737
+ };
11080
11738
  /**
11081
11739
  * @description Workspace invite with complete information.
11082
11740
  *
@@ -11354,7 +12012,7 @@ interface components {
11354
12012
  * categories), so this is where that mapping is recorded as
11355
12013
  * data rather than prose.
11356
12014
  */
11357
- attribution?: components["schemas"]["AttributionKind"];
12015
+ attribution?: components["schemas"]["Attribution"];
11358
12016
  /** @description Optional description for reviewers. */
11359
12017
  description?: string;
11360
12018
  /**
@@ -11563,6 +12221,12 @@ interface components {
11563
12221
  */
11564
12222
  rememberMe?: boolean;
11565
12223
  };
12224
+ /**
12225
+ * @description Which human decision a [`Manual`] event records — the reviewer actions on a
12226
+ * finding: [`Flag`](ManualIntent::Flag) a miss, [`Suppress`](ManualIntent::Suppress)
12227
+ * a false positive, or [`Amend`](ManualIntent::Amend) an existing finding.
12228
+ */
12229
+ ManualIntent: "flag" | "suppress" | "amend";
11566
12230
  /** @description Response type for a mark-all-read action. */
11567
12231
  MarkedReadStatus: {
11568
12232
  /**
@@ -11661,7 +12325,7 @@ interface components {
11661
12325
  * @enum {string}
11662
12326
  */
11663
12327
  ModalityToken: "audio" | "image" | "tabular" | "text";
11664
- /** @description Detail of a model/NER recognition. */
12328
+ /** @description Metadata of a model/NER recognition, carried by [`Model`]. */
11665
12329
  ModelEvent: {
11666
12330
  /** @description Whether contextual analysis adjusted the score for this match. */
11667
12331
  contextual: boolean;
@@ -11740,11 +12404,12 @@ interface components {
11740
12404
  * @description Defines the type of notification event sent to a user.
11741
12405
  *
11742
12406
  * This enumeration corresponds to the `NOTIFICATION_EVENT` PostgreSQL enum and
11743
- * is used for member, connection-sync, pipeline-run, and system notifications.
12407
+ * is used for member, connection-sync, detection, redaction, and system
12408
+ * notifications.
11744
12409
  * The values mirror the [`WebhookEvent`](super::WebhookEvent) naming for the
11745
12410
  * events the two channels share.
11746
12411
  */
11747
- NotificationEvent: "member.invited" | "member.joined" | "connection.sync.completed" | "connection.sync.failed" | "pipeline.run.analyzed" | "pipeline.run.completed" | "pipeline.run.failed";
12412
+ NotificationEvent: "member.invited" | "member.joined" | "connection.sync.completed" | "connection.sync.failed" | "pipeline.detection.completed" | "pipeline.redaction.created" | "pipeline.detection.failed";
11748
12413
  /**
11749
12414
  * @description Generic paginated response wrapper.
11750
12415
  *
@@ -11801,17 +12466,17 @@ interface components {
11801
12466
  /** @constant */
11802
12467
  type: "connection.sync.failed";
11803
12468
  } | {
11804
- data: components["schemas"]["PipelineRunAnalyzedParams"];
12469
+ data: components["schemas"]["DetectionCompletedParams"];
11805
12470
  /** @constant */
11806
- type: "pipeline.run.analyzed";
12471
+ type: "pipeline.detection.completed";
11807
12472
  } | {
11808
- data: components["schemas"]["PipelineRunCompletedParams"];
12473
+ data: components["schemas"]["RedactionCreatedParams"];
11809
12474
  /** @constant */
11810
- type: "pipeline.run.completed";
12475
+ type: "pipeline.redaction.created";
11811
12476
  } | {
11812
- data: components["schemas"]["PipelineRunFailedParams"];
12477
+ data: components["schemas"]["DetectionFailedParams"];
11813
12478
  /** @constant */
11814
- type: "pipeline.run.failed";
12479
+ type: "pipeline.detection.failed";
11815
12480
  };
11816
12481
  /** @description Response for notification settings within a workspace. */
11817
12482
  NotificationSettings: {
@@ -11866,11 +12531,11 @@ interface components {
11866
12531
  /** @description The new password (will be hashed before storage). */
11867
12532
  newPassword: string;
11868
12533
  };
11869
- /** @description Detail of a pattern/dictionary recognition. */
12534
+ /** @description Metadata of a pattern/dictionary recognition, carried by [`Pattern`]. */
11870
12535
  PatternEvent: {
11871
12536
  /**
11872
- * @description Whether contextual analysis (keyword co-occurrence) adjusted the
11873
- * score for this match.
12537
+ * @description Whether contextual analysis (keyword co-occurrence) adjusted the score
12538
+ * for this match.
11874
12539
  */
11875
12540
  contextual: boolean;
11876
12541
  /** @description Name of the pattern that matched (e.g. `"ssn"`, `"email"`). */
@@ -11987,7 +12652,7 @@ interface components {
11987
12652
  * A document's own scope overrides this at detect time; absent here means
11988
12653
  * the document must assert its own.
11989
12654
  */
11990
- defaultScope?: components["schemas"]["ScopeParams"];
12655
+ defaultScope?: components["schemas"]["DocumentContext"];
11991
12656
  /**
11992
12657
  * @description Slugs of workspace policies applied at redaction.
11993
12658
  *
@@ -11996,166 +12661,40 @@ interface components {
11996
12661
  */
11997
12662
  policySlugs?: components["schemas"]["Handle"][];
11998
12663
  };
11999
- /** @description Query parameters for filtering pipelines. */
12000
- PipelineFilter: {
12001
- /** @description Search by pipeline name (trigram similarity). */
12002
- search?: string;
12003
- /** @description Filter by pipeline status. */
12004
- status?: components["schemas"]["PipelineStatus"];
12005
- };
12006
- /** @description Path parameters for pipeline operations. */
12007
- PipelinePathParams: {
12008
- /** @description URL slug of the pipeline, unique within its workspace. */
12009
- pipelineSlug: string;
12010
- };
12011
- /**
12012
- * @description Response type for a pipeline run.
12013
- *
12014
- * A run is addressed by its own opaque id; the owning pipeline and workspace
12015
- * slugs are carried for context.
12016
- */
12017
- PipelineRun: {
12018
- /**
12019
- * Format: date-time
12020
- * @description When the run completed.
12021
- */
12022
- completedAt?: string;
12023
- /** @description Human-readable failure reason, present only when the run `failed`. */
12024
- error?: string;
12025
- /** @description Opaque identifier of the run. */
12026
- id: components["schemas"]["RunId"];
12027
- /**
12028
- * Format: uuid
12029
- * @description Source document this run analyzes / redacts.
12030
- */
12031
- inputFileId: string;
12032
- /**
12033
- * @description Display name of the source document, for showing the run without a
12034
- * separate file lookup. `None` if the file was removed (e.g. by retention).
12035
- */
12036
- inputFileName?: string;
12037
- /** @description Non-encrypted metadata for filtering/display. */
12038
- metadata: components["schemas"]["RunMetadata"];
12039
- /**
12040
- * Format: uuid
12041
- * @description Redacted document produced by the run, once it completes.
12042
- */
12043
- outputFileId?: string;
12044
- /** @description Display name of the redacted output, once the run completes. */
12045
- outputFileName?: string;
12046
- /** @description Handle of the pipeline this run belongs to. */
12047
- pipelineSlug: components["schemas"]["Handle"];
12048
- /**
12049
- * Format: date-time
12050
- * @description When the run started.
12051
- */
12052
- startedAt: string;
12053
- /**
12054
- * @description Current run status.
12055
- *
12056
- * The detections are available to fetch from the run's `detections`
12057
- * endpoint once this reaches `analyzed`.
12058
- */
12059
- status: components["schemas"]["PipelineRunStatus"];
12060
- /** @description How the run was triggered. */
12061
- triggerType: components["schemas"]["PipelineTriggerType"];
12062
- /** @description Account that triggered the run. */
12063
- triggeredBy: components["schemas"]["AccountRef"];
12064
- /** @description Handle of the workspace this run belongs to. */
12065
- workspaceSlug: components["schemas"]["Handle"];
12066
- };
12067
- /** @description Params of a pipeline-run activity (`pipeline.run.*`). */
12068
- PipelineRunActivityParams: {
12069
- /** @description Slug of the owning pipeline. */
12070
- pipelineSlug: components["schemas"]["Handle"];
12071
- /** @description Id of the run. */
12072
- runId: components["schemas"]["RunId"];
12073
- };
12074
- /** @description Params of a `pipeline.run.analyzed` notification. */
12075
- PipelineRunAnalyzedParams: {
12076
- /** @description Display name of the analyzed file, if known. */
12077
- inputFileName?: string;
12078
- /** @description Slug of the owning pipeline. */
12079
- pipelineSlug: components["schemas"]["Handle"];
12080
- /** @description Id of the run. */
12081
- runId: components["schemas"]["RunId"];
12082
- };
12083
- /** @description Params of a `pipeline.run.completed` notification. */
12084
- PipelineRunCompletedParams: {
12085
- /** @description Display name of the analyzed file, if known. */
12086
- inputFileName?: string;
12087
- /** @description Slug of the owning pipeline. */
12088
- pipelineSlug: components["schemas"]["Handle"];
12089
- /** @description Id of the run. */
12090
- runId: components["schemas"]["RunId"];
12091
- };
12092
- /** @description Params of a `pipeline.run.failed` notification. */
12093
- PipelineRunFailedParams: {
12094
- /** @description Failure reason, if available. */
12095
- error?: string;
12096
- /** @description Display name of the analyzed file, if known. */
12097
- inputFileName?: string;
12098
- /** @description Slug of the owning pipeline. */
12099
- pipelineSlug: components["schemas"]["Handle"];
12100
- /** @description Id of the run. */
12101
- runId: components["schemas"]["RunId"];
12102
- };
12103
- /**
12104
- * @description Generic paginated response wrapper.
12105
- *
12106
- * Provides a consistent structure for all paginated API responses with
12107
- * cursor-based pagination support. When `next_cursor` is present, there
12108
- * are more items to fetch.
12109
- */
12110
- PipelineRunPage: {
12111
- /** @description Items in this page. */
12112
- items: components["schemas"]["PipelineRun"][];
12113
- /** @description Cursor to fetch the next page. Present only when more items exist. */
12114
- nextCursor?: string;
12115
- /**
12116
- * Format: int64
12117
- * @description Total count of items matching the query (if requested).
12118
- */
12119
- total?: number;
12120
- };
12121
- /** @description Path parameters for pipeline run operations. */
12122
- PipelineRunPathParams: {
12123
- /** @description Opaque identifier of the run. */
12124
- runId: components["schemas"]["RunId"];
12125
- };
12126
- /**
12127
- * @description Defines the execution status of a pipeline run.
12128
- *
12129
- * This enumeration corresponds to the `PIPELINE_RUN_STATUS` PostgreSQL enum and is used
12130
- * to track the current state of a pipeline execution.
12131
- *
12132
- * The detect phase has two states: `Queued` (the run is enqueued but no worker
12133
- * has begun) and `Analyzing` (a worker is actively analyzing). They settle into
12134
- * `Analyzed` (detection done, awaiting review), then `Completed` after redaction.
12135
- */
12136
- PipelineRunStatus: "queued" | "analyzing" | "analyzed" | "completed" | "failed" | "cancelled";
12137
12664
  /**
12138
- * @description Query parameters for listing a single pipeline's runs.
12665
+ * @description Query parameters for listing a single pipeline's detections.
12139
12666
  *
12140
12667
  * The pipeline is fixed by the route, so it narrows only by status, file,
12141
12668
  * trigger account, and trigger type.
12142
12669
  */
12143
- PipelineRunsQuery: {
12670
+ PipelineDetectionsQuery: {
12144
12671
  /**
12145
12672
  * Format: uuid
12146
- * @description Filter by the source file the run analyzes.
12673
+ * @description Filter by the source file the detection analyzes.
12147
12674
  */
12148
12675
  fileId?: string;
12149
- /** @description Filter by run status. */
12150
- status?: components["schemas"]["PipelineRunStatus"];
12151
- /** @description Filter by how the run was initiated (user vs system). */
12676
+ /** @description Filter by detection status. */
12677
+ status?: components["schemas"]["DetectionStatus"];
12678
+ /** @description Filter by how the detection was initiated (user vs system). */
12152
12679
  triggerType?: components["schemas"]["PipelineTriggerType"];
12153
12680
  /**
12154
12681
  * Format: uuid
12155
- * @description Filter by the account that triggered the run.
12682
+ * @description Filter by the account that triggered the detection.
12156
12683
  */
12157
12684
  triggeredBy?: string;
12158
12685
  };
12686
+ /** @description Query parameters for filtering pipelines. */
12687
+ PipelineFilter: {
12688
+ /** @description Search by pipeline name (trigram similarity). */
12689
+ search?: string;
12690
+ /** @description Filter by pipeline status. */
12691
+ status?: components["schemas"]["PipelineStatus"];
12692
+ };
12693
+ /** @description Path parameters for pipeline operations. */
12694
+ PipelinePathParams: {
12695
+ /** @description URL slug of the pipeline, unique within its workspace. */
12696
+ pipelineSlug: string;
12697
+ };
12159
12698
  /**
12160
12699
  * @description Defines the lifecycle status of a pipeline definition.
12161
12700
  *
@@ -12305,11 +12844,11 @@ interface components {
12305
12844
  * @description Human-readable name. Display-only. Does not key anything.
12306
12845
  *
12307
12846
  * Names the policy in a redaction event's [`Attribution`]
12308
- * when a rule that fired carried no [`AttributionKind::Cited`]
12847
+ * when a rule that fired carried no [`Attribution::Cited`]
12309
12848
  * attribution to render.
12310
12849
  *
12311
12850
  * [`Attribution`]: elide_core::entity::audit::Attribution
12312
- * [`AttributionKind::Cited`]: elide_core::entity::audit::AttributionKind::Cited
12851
+ * [`Attribution::Cited`]: elide_core::entity::audit::Attribution::Cited
12313
12852
  */
12314
12853
  name: string;
12315
12854
  /** @description Ordered rules. First match wins within this policy. */
@@ -12391,26 +12930,29 @@ interface components {
12391
12930
  * @description Why this rule exists: the authority it answers to.
12392
12931
  *
12393
12932
  * The engine renders it into the redaction event's
12394
- * [`Attribution`], so a reviewer sees the provision rather
12395
- * than a bare UUID. `None` falls back to recording the
12396
- * policy and rule ids alone.
12933
+ * [`Attribution`] verbatim, so a reviewer sees the provision
12934
+ * the rule answers to. `None` falls back to a freeform
12935
+ * attribution under the enclosing policy's name and
12936
+ * description — the rule itself is not named in the trail.
12397
12937
  *
12398
12938
  * Optional so ad-hoc and hand-authored rules stay cheap to
12399
12939
  * write; the shipped templates set it on every rule.
12400
12940
  *
12401
12941
  * [`Attribution`]: elide_core::entity::audit::Attribution
12402
12942
  */
12403
- attribution?: components["schemas"]["AttributionKind"];
12943
+ attribution?: components["schemas"]["Attribution"];
12404
12944
  /** @description Optional description for reviewers. */
12405
12945
  description?: string;
12406
12946
  /**
12407
12947
  * Format: uuid
12408
- * @description Stable identifier. UUIDv7 recommended. Engine stamps it
12409
- * into the redaction event's [`Attribution::source_id`] so
12410
- * reviewers can trace which rule fired. Every attachment a
12411
- * [`RuleDispatch::Table`] expands into shares this UUID.
12948
+ * @description Stable identifier. UUIDv7 recommended. Every attachment a
12949
+ * [`RuleDispatch::Table`] expands into shares this UUID, so
12950
+ * one authored rule stays one rule however many labels it
12951
+ * dispatches over.
12412
12952
  *
12413
- * [`Attribution::source_id`]: elide_core::entity::audit::Attribution::source_id
12953
+ * Not carried onto the audit trail: a redaction event names
12954
+ * the [`attribution`](Self::attribution) the rule declared, or
12955
+ * its policy's, rather than the rule's own id.
12414
12956
  */
12415
12957
  id: string;
12416
12958
  /** @description Human-readable name. Display-only. */
@@ -12496,7 +13038,7 @@ interface components {
12496
13038
  *
12497
13039
  * Serialises as an internally-tagged object under `kind`,
12498
13040
  * matching the house pattern for option-bearing enums
12499
- * (`Predicate`, `TextRedaction`, `AnyRedaction`). A caller
13041
+ * (`Predicate`, `TextRedaction`). A caller
12500
13042
  * wire-picks a template as
12501
13043
  * `{"kind": "hipaa_safe_harbor"}` or, for variants with
12502
13044
  * operator options,
@@ -12681,20 +13223,150 @@ interface components {
12681
13223
  ner: components["schemas"]["RegisteredRecognizer"][];
12682
13224
  };
12683
13225
  /**
12684
- * @description Identifies a recognizer (name + version).
13226
+ * @description Identifies a recognizer (name + version).
13227
+ *
13228
+ * Pairs a stable name with a free-form version string so the audit
13229
+ * trail records not just *which* recognizer fired but *which build* of
13230
+ * it: a rerun against an updated ruleset or model is then
13231
+ * distinguishable from the original. The version is opaque text (a
13232
+ * semver, a checkpoint hash, a ruleset date); the core attaches no
13233
+ * ordering or comparison semantics to it.
13234
+ */
13235
+ RecognizerId: {
13236
+ /** @description Stable, human-readable recognizer name (e.g. `"us-ssn-pattern"`). */
13237
+ name: string;
13238
+ /** @description Recognizer's version at the time it ran. */
13239
+ version: string;
13240
+ };
13241
+ /**
13242
+ * @description Request payload to redact a detection.
13243
+ *
13244
+ * The reviewer's edits layer over the detection's analysis before redaction:
13245
+ * suppress a false positive, retag a detection, or add one the analysis missed.
13246
+ * Omit `edits` to redact with the policy decisions exactly as detected. Each
13247
+ * redact request produces a new redaction.
13248
+ */
13249
+ RedactDetection: {
13250
+ /**
13251
+ * @description Reviewer edits to apply before redaction, grouped by modality. Omit to
13252
+ * redact with the policy decisions exactly as detected.
13253
+ */
13254
+ edits?: components["schemas"]["EditSet"];
13255
+ };
13256
+ /** @description An operator hid the entity. */
13257
+ Redaction: {
13258
+ /**
13259
+ * @description The author-supplied policy rationale, when the operator carried an
13260
+ * [`Attribution`]; `None` otherwise.
13261
+ */
13262
+ attribution?: components["schemas"]["Attribution"];
13263
+ /** @description Identifier of the key needed to reverse it, if reversible. */
13264
+ key_id?: string;
13265
+ /**
13266
+ * @description How much the output leaks about the original, when the operator claimed a
13267
+ * profile; `None` when it made no claim.
13268
+ */
13269
+ leak_profile?: components["schemas"]["LeakProfile"];
13270
+ /**
13271
+ * @description Which selection rule chose this operator: the automatic "why" (matched a
13272
+ * label, a tag, a predicate, or the fallback).
13273
+ */
13274
+ matched_by: components["schemas"]["RuleMatch"];
13275
+ /** @description Which operator (name + version) ran. */
13276
+ operator: components["schemas"]["OperatorId"];
13277
+ /**
13278
+ * @description BLAKE3 digest of the original text the operator hid, when the redaction
13279
+ * layer recorded it. Proves *what* was redacted without storing the
13280
+ * plaintext; `None` when the operator did not capture it.
13281
+ */
13282
+ span_hash?: components["schemas"]["AuditHash"];
13283
+ /**
13284
+ * Format: uint32
13285
+ * @description Byte length of the original text the operator hid, paired with
13286
+ * [`span_hash`](Self::span_hash). `None` when not captured.
13287
+ */
13288
+ span_length?: number;
13289
+ };
13290
+ /** @description Params of a redaction activity (`pipeline.redaction.*`). */
13291
+ RedactionActivityParams: {
13292
+ /** @description Slug of the owning pipeline. */
13293
+ pipelineSlug: components["schemas"]["Handle"];
13294
+ /** @description Id of the redaction. */
13295
+ redactionId: components["schemas"]["RedactionId"];
13296
+ };
13297
+ /** @description Params of a `pipeline.redaction.created` notification. */
13298
+ RedactionCreatedParams: {
13299
+ /** @description Id of the detection the redaction was produced from. */
13300
+ detectionId: components["schemas"]["DetectionId"];
13301
+ /** @description Display name of the redacted file, if known. */
13302
+ inputFileName?: string;
13303
+ /** @description Slug of the owning pipeline. */
13304
+ pipelineSlug: components["schemas"]["Handle"];
13305
+ /** @description Id of the redaction. */
13306
+ redactionId: components["schemas"]["RedactionId"];
13307
+ };
13308
+ /** @description Opaque redaction identifier (redaction_<uuid>). */
13309
+ RedactionId: string;
13310
+ /**
13311
+ * @description Path parameters for a redaction.
13312
+ *
13313
+ * The redaction id is globally unique, so a redaction is addressed by id alone
13314
+ * and resolved within the workspace by the query.
13315
+ */
13316
+ RedactionPathParams: {
13317
+ /** @description Opaque identifier of the redaction. */
13318
+ redactionId: components["schemas"]["RedactionId"];
13319
+ };
13320
+ /**
13321
+ * @description Response type for a redaction.
12685
13322
  *
12686
- * Pairs a stable name with a free-form version string so the audit
12687
- * trail records not just *which* recognizer fired but *which build* of
12688
- * it: a rerun against an updated ruleset or model is then
12689
- * distinguishable from the original. The version is opaque text (a
12690
- * semver, a checkpoint hash, a ruleset date); the core attaches no
12691
- * ordering or comparison semantics to it.
13323
+ * A redaction is one redact pass over a detection, produced with a specific set
13324
+ * of reviewer edits. It owns the redacted output document (downloadable through
13325
+ * the normal file endpoints) and a review audit recording what was redacted and
13326
+ * why (fetched from the redaction's `review` endpoint).
13327
+ *
13328
+ * Named `RedactionResult` rather than `Redaction` because the engine's audit
13329
+ * schema already carries a `Redaction` (an audit event), and the two must not
13330
+ * collide in the generated OpenAPI.
12692
13331
  */
12693
- RecognizerId: {
12694
- /** @description Stable, human-readable recognizer name (e.g. `"us-ssn-pattern"`). */
12695
- name: string;
12696
- /** @description Recognizer's version at the time it ran. */
12697
- version: string;
13332
+ RedactionResult: {
13333
+ /**
13334
+ * Format: date-time
13335
+ * @description When the redaction was created.
13336
+ */
13337
+ createdAt: string;
13338
+ /** @description The detection this redaction was produced from. */
13339
+ detectionId: components["schemas"]["DetectionId"];
13340
+ /** @description Opaque identifier of the redaction. */
13341
+ id: components["schemas"]["RedactionId"];
13342
+ /**
13343
+ * Format: uuid
13344
+ * @description Redacted output document this redaction produced. `None` only if the file
13345
+ * was removed (e.g. by retention).
13346
+ */
13347
+ outputFileId?: string;
13348
+ /** @description Account that requested the redaction. */
13349
+ requestedBy: components["schemas"]["AccountRef"];
13350
+ /** @description Handle of the workspace this redaction belongs to. */
13351
+ workspaceSlug: components["schemas"]["Handle"];
13352
+ };
13353
+ /**
13354
+ * @description Generic paginated response wrapper.
13355
+ *
13356
+ * Provides a consistent structure for all paginated API responses with
13357
+ * cursor-based pagination support. When `next_cursor` is present, there
13358
+ * are more items to fetch.
13359
+ */
13360
+ RedactionResultPage: {
13361
+ /** @description Items in this page. */
13362
+ items: components["schemas"]["RedactionResult"][];
13363
+ /** @description Cursor to fetch the next page. Present only when more items exist. */
13364
+ nextCursor?: string;
13365
+ /**
13366
+ * Format: int64
13367
+ * @description Total count of items matching the query (if requested).
13368
+ */
13369
+ total?: number;
12698
13370
  };
12699
13371
  /**
12700
13372
  * @description Public view of one recognizer in the engine's NER or LLM
@@ -12737,6 +13409,45 @@ interface components {
12737
13409
  /** @description Whether to accept or decline the invitation. */
12738
13410
  acceptInvite: boolean;
12739
13411
  };
13412
+ Report: {
13413
+ body: ({
13414
+ entities: components["schemas"]["TextEntity"][];
13415
+ /** @constant */
13416
+ modality: "text";
13417
+ } | {
13418
+ entities: components["schemas"]["ImageEntity"][];
13419
+ /** @constant */
13420
+ modality: "image";
13421
+ } | {
13422
+ entities: components["schemas"]["AudioEntity"][];
13423
+ /** @constant */
13424
+ modality: "audio";
13425
+ } | {
13426
+ entities: components["schemas"]["TabularEntity"][];
13427
+ /** @constant */
13428
+ modality: "tabular";
13429
+ }) | null;
13430
+ parts: {
13431
+ [key: string]: {
13432
+ entities: components["schemas"]["TextEntity"][];
13433
+ /** @constant */
13434
+ modality: "text";
13435
+ } | {
13436
+ entities: components["schemas"]["ImageEntity"][];
13437
+ /** @constant */
13438
+ modality: "image";
13439
+ } | {
13440
+ entities: components["schemas"]["AudioEntity"][];
13441
+ /** @constant */
13442
+ modality: "audio";
13443
+ } | {
13444
+ entities: components["schemas"]["TabularEntity"][];
13445
+ /** @constant */
13446
+ modality: "tabular";
13447
+ };
13448
+ };
13449
+ usage?: components["schemas"]["UsageReport"];
13450
+ };
12740
13451
  /**
12741
13452
  * @description How long a class of data is retained.
12742
13453
  *
@@ -12799,38 +13510,6 @@ interface components {
12799
13510
  */
12800
13511
  redactedDocuments?: components["schemas"]["Retention"];
12801
13512
  };
12802
- /**
12803
- * @description A reviewer-supplied redaction override with the policy
12804
- * authority it draws from.
12805
- *
12806
- * The `policy_id` isn't just for audit: it also picks which
12807
- * per-policy pseudonym vault and per-policy [`KeyProvider`] the
12808
- * override's operator resolves against, so an override using
12809
- * [`Pseudonymize`] or [`HmacHash`] stays consistent with the
12810
- * authoring policy's other rules.
12811
- *
12812
- * [`KeyProvider`]: elide::redaction::operators::KeyProvider
12813
- * [`Pseudonymize`]: elide::redaction::operators::Pseudonymize
12814
- * [`HmacHash`]: elide::redaction::operators::HmacHash
12815
- */
12816
- Review: {
12817
- /**
12818
- * @description The per-modality redaction operators to run for this
12819
- * entity. Overrides whatever the policy set would have
12820
- * picked for the same entity.
12821
- */
12822
- action: components["schemas"]["ModalityRedactions"];
12823
- /**
12824
- * Format: uuid
12825
- * @description The policy whose authority the reviewer exercises. Must
12826
- * match the `id` of a [`PolicyDefinition`] submitted with
12827
- * the anonymize request. The audit event stamps this UUID
12828
- * as the attribution `name`.
12829
- *
12830
- * [`PolicyDefinition`]: elide_governance::PolicyDefinition
12831
- */
12832
- policyId: string;
12833
- };
12834
13513
  /**
12835
13514
  * @description A serializable summary of *which selection rule* bound an operator to an
12836
13515
  * entity — the automatic "why" behind a redaction.
@@ -12852,129 +13531,6 @@ interface components {
12852
13531
  } | {
12853
13532
  tag: string;
12854
13533
  } | "predicate" | "fallback";
12855
- /** @description Pipeline-run health for a workspace. */
12856
- RunAnalytics: {
12857
- /**
12858
- * Format: int64
12859
- * @description Mean completed-run duration in milliseconds; omitted until a run completes.
12860
- */
12861
- avgDurationMs?: number;
12862
- /**
12863
- * @description Per-status breakdown, one entry per run status (zero-filled), in a stable
12864
- * order.
12865
- */
12866
- byStatus: components["schemas"]["RunStatusEntry"][];
12867
- /**
12868
- * Format: double
12869
- * @description Failed / (completed + failed). Omitted when no run has reached a terminal
12870
- * state (genuinely no signal, not zero).
12871
- */
12872
- errorRate?: number;
12873
- /**
12874
- * Format: int64
12875
- * @description 95th-percentile completed-run duration in milliseconds; omitted until a run
12876
- * completes.
12877
- */
12878
- p95DurationMs?: number;
12879
- /**
12880
- * Format: int64
12881
- * @description Total number of runs.
12882
- */
12883
- total: number;
12884
- };
12885
- /** @description A single day of run activity. */
12886
- RunDayEntry: {
12887
- /**
12888
- * Format: int64
12889
- * @description Mean completed-run duration (milliseconds) this day; omitted if none completed.
12890
- */
12891
- avgDurationMs?: number;
12892
- /**
12893
- * Format: date
12894
- * @description The day (`YYYY-MM-DD`, UTC).
12895
- */
12896
- date: string;
12897
- /**
12898
- * Format: double
12899
- * @description Failed / (completed + failed) for this day; omitted when no run reached a
12900
- * terminal state that day.
12901
- */
12902
- errorRate?: number;
12903
- /**
12904
- * Format: int64
12905
- * @description Input/prompt tokens spent by this day's runs; omitted when none used a model.
12906
- */
12907
- inputTokens?: number;
12908
- /**
12909
- * Format: int64
12910
- * @description Output/completion tokens spent this day; omitted when none used a model.
12911
- */
12912
- outputTokens?: number;
12913
- /**
12914
- * Format: int64
12915
- * @description 95th-percentile completed-run duration (milliseconds) this day; omitted if none.
12916
- */
12917
- p95DurationMs?: number;
12918
- /**
12919
- * Format: int64
12920
- * @description Runs started this day (`0` on a quiet day).
12921
- */
12922
- runs: number;
12923
- /**
12924
- * Format: int64
12925
- * @description Reported total tokens this day; omitted when none used a model.
12926
- */
12927
- totalTokens?: number;
12928
- };
12929
- /** @description Opaque run identifier (run_<uuid>). */
12930
- RunId: string;
12931
- /** @description Structured metadata for a pipeline run. */
12932
- RunMetadata: {
12933
- /** @description Failure reason recorded when the run failed. */
12934
- error?: string;
12935
- /** @description Free-form labels attached to the run. */
12936
- tags?: string[];
12937
- /**
12938
- * @description The engine's full per-recognizer usage report (durations, per-model token
12939
- * counts), stored opaquely for drill-down. Per-model token totals for
12940
- * aggregation live in the `workspace_pipeline_run_usage` table; this keeps
12941
- * the detail. Absent when the run produced no usage.
12942
- */
12943
- usage?: unknown;
12944
- };
12945
- /** @description One status's share of a workspace's runs. */
12946
- RunStatusEntry: {
12947
- /**
12948
- * Format: int64
12949
- * @description Number of runs in this status.
12950
- */
12951
- count: number;
12952
- /** @description The run status. */
12953
- status: components["schemas"]["PipelineRunStatus"];
12954
- };
12955
- /**
12956
- * @description A run's status change, broadcast on the core-NATS subject [`run_subject`].
12957
- *
12958
- * Fan-out to any watching SSE connections; the run row in Postgres remains the
12959
- * source of truth, so a missed broadcast is recoverable by re-reading the run.
12960
- */
12961
- RunStatusEvent: {
12962
- /**
12963
- * Format: uuid
12964
- * @description The run whose status changed.
12965
- */
12966
- runId: string;
12967
- /** @description The run's new status. */
12968
- status: components["schemas"]["PipelineRunStatus"];
12969
- };
12970
- /**
12971
- * @description A workspace's daily run activity over a window: one point per day, dense
12972
- * (quiet days included with `runs: 0`), ready to plot as a continuous series.
12973
- */
12974
- RunTimeSeries: {
12975
- /** @description One entry per day in the requested window, oldest first. */
12976
- points: components["schemas"]["RunDayEntry"][];
12977
- };
12978
13534
  /**
12979
13535
  * @description Typed credentials for S3-compatible provider.
12980
13536
  *
@@ -13071,39 +13627,28 @@ interface components {
13071
13627
  tags?: string[];
13072
13628
  };
13073
13629
  /**
13074
- * @description Caller-asserted scope for one request.
13075
- *
13076
- * A narrower wire projection of `elide::recognition::Scope`:
13077
- * `languages` and `countries` (typed, elide-native), plus
13078
- * elide's [`ScopeMetadata`] block for free-form classification
13079
- * strings (`tags`, `purpose`, `audience`). The engine assembles
13080
- * this plus a server-minted `correlation_id` and a policy-derived
13081
- * label catalog into the orchestrator's `Scope` at compile time.
13630
+ * @description An operator was *picked* to hide the entity — the redaction decision,
13631
+ * recorded before it is applied so it can be reviewed (and the entity edited)
13632
+ * first. The [`Redaction`] event that follows records the operator actually
13633
+ * run.
13082
13634
  */
13083
- ScopeParams: {
13635
+ Selection: {
13084
13636
  /**
13085
- * @description Caller-asserted jurisdictions.
13086
- *
13087
- * When non-empty, recognizers that carry per-rule country
13088
- * scopes skip rules that match none of them. An empty list
13089
- * means "any": rules that declare countries still run as a
13090
- * permissive fallback so callers who don't assert a
13091
- * jurisdiction don't lose detections.
13637
+ * @description The author-supplied policy rationale, when the matched rule carried an
13638
+ * [`Attribution`]; `None` otherwise.
13092
13639
  */
13093
- countries?: components["schemas"]["CountryCode"][];
13640
+ attribution?: components["schemas"]["Attribution"];
13094
13641
  /**
13095
- * @description Caller-asserted languages for the analysis.
13096
- *
13097
- * Empty means the caller asserted none, leaving detection
13098
- * (if a language enricher runs) to fill in.
13099
- * @default []
13642
+ * @description Which selection rule chose this operator: the automatic "why" (matched a
13643
+ * label, a tag, a predicate, or the fallback).
13100
13644
  */
13101
- languages?: components["schemas"]["Languages"];
13645
+ matched_by: components["schemas"]["RuleMatch"];
13102
13646
  /**
13103
- * @description Free-form request context: document tags, request purpose,
13104
- * output audience. See elide's [`ScopeMetadata`].
13647
+ * @description Identity (name + version) of the operator picked. Its *config* is not
13648
+ * recorded it lives in the policy that will run it, so apply re-resolves
13649
+ * the configured operator rather than reading it here.
13105
13650
  */
13106
- metadata?: components["schemas"]["ScopeMetadata"];
13651
+ operator: components["schemas"]["OperatorId"];
13107
13652
  };
13108
13653
  /** @description Request to send a message and stream the assistant's reply. */
13109
13654
  SendChatMessage: {
@@ -13247,6 +13792,24 @@ interface components {
13247
13792
  */
13248
13793
  totalBytes: number;
13249
13794
  };
13795
+ /**
13796
+ * @description Leave this entity alone: a reviewer calling it a false positive.
13797
+ *
13798
+ * It keeps its place and its provenance; the redaction pass skips
13799
+ * it. Recorded as a `Manual` event, so *who* decided and *why* is
13800
+ * auditable rather than the detection silently disappearing.
13801
+ */
13802
+ Suppress: {
13803
+ /** @description Who made it, when the caller said. */
13804
+ actor?: string;
13805
+ /**
13806
+ * Format: uuid
13807
+ * @description The entity to leave alone.
13808
+ */
13809
+ id: string;
13810
+ /** @description The rationale, when one was given. */
13811
+ reason?: string;
13812
+ };
13250
13813
  /**
13251
13814
  * @description Request payload to trigger a connection sync.
13252
13815
  *
@@ -13328,6 +13891,28 @@ interface components {
13328
13891
  * to track whether a run was manually triggered, scheduled, or triggered by a webhook.
13329
13892
  */
13330
13893
  SyncTriggerType: "manual" | "scheduled" | "webhook";
13894
+ /**
13895
+ * @description A detection recognition missed.
13896
+ *
13897
+ * Recorded on the report with human provenance, so it is never
13898
+ * mistaken for an automatic hit, then redacted under the policy set
13899
+ * like any other entity: an added label the policy does not cover
13900
+ * is left alone.
13901
+ *
13902
+ * Carries no entity id — the entity does not exist yet, and the
13903
+ * engine mints one when the edit is applied, so a client cannot
13904
+ * collide with a real detection or shadow an existing entity.
13905
+ */
13906
+ TabularAdd: {
13907
+ /** @description Who made it, when the caller said. */
13908
+ actor?: string;
13909
+ /** @description What the reviewer says this is. */
13910
+ label: components["schemas"]["LabelRef"];
13911
+ /** @description Where it sits in the document. */
13912
+ location: components["schemas"]["TabularLocation"];
13913
+ /** @description The rationale, when one was given. */
13914
+ reason?: string;
13915
+ };
13331
13916
  /**
13332
13917
  * @description One node in an entity's audit DAG: a thing that happened, with its
13333
13918
  * effect on confidence and its tamper-evident links.
@@ -13403,115 +13988,70 @@ interface components {
13403
13988
  * @description Kind of an [`AuditEvent`], carrying its event-specific detail and the
13404
13989
  * rationale for why it happened.
13405
13990
  *
13406
- * `#[non_exhaustive]`: new event kinds (verification, annotation, …)
13407
- * can be added compatibly. The recognition kinds ([`Pattern`],
13408
- * [`Model`]) carry the matched [`Location`]; the rest carry their own
13409
- * data.
13410
- *
13991
+ * A thin tagged union: each variant wraps one payload struct (e.g.
13992
+ * [`Redaction`], [`Selection`], [`Manual`]) that owns that kind's fields, its
13993
+ * docs, and how it folds into the audit hash. Match on a variant to reach its
13994
+ * payload:
13995
+ *
13996
+ * ```
13997
+ * # use elide_core::entity::audit::AuditKind;
13998
+ * # use elide_core::modality::text::Text;
13999
+ * # fn show(kind: &AuditKind<Text>) {
14000
+ * if let AuditKind::Redaction(redaction) = kind {
14001
+ * let _ = &redaction.operator;
14002
+ * }
14003
+ * # }
14004
+ * ```
14005
+ *
14006
+ * `#[non_exhaustive]`: new event kinds (verification, annotation, …) can be
14007
+ * added compatibly. The recognition kinds ([`Pattern`], [`Model`]) carry the
14008
+ * matched [`Location`]; the rest carry their own data.
14009
+ *
14010
+ * [`AuditEvent`]: super::AuditEvent
13411
14011
  * [`Pattern`]: AuditKind::Pattern
13412
14012
  * [`Model`]: AuditKind::Model
13413
14013
  * [`Location`]: Modality::Location
13414
14014
  */
13415
14015
  TabularAuditKind: {
14016
+ detail: components["schemas"]["TabularPattern"];
13416
14017
  /** @constant */
13417
14018
  kind: "pattern";
13418
- /** @description Where the recognizer matched. */
13419
- location: components["schemas"]["TabularLocation"];
13420
- /** @description Pattern detail. */
13421
- pattern: components["schemas"]["PatternEvent"];
13422
14019
  } | {
14020
+ detail: components["schemas"]["TabularModel"];
13423
14021
  /** @constant */
13424
14022
  kind: "model";
13425
- /** @description Where the recognizer matched. */
13426
- location: components["schemas"]["TabularLocation"];
13427
- /** @description Model detail. */
13428
- model: components["schemas"]["ModelEvent"];
13429
14023
  } | {
14024
+ detail: components["schemas"]["Deduplication"];
13430
14025
  /** @constant */
13431
14026
  kind: "deduplication";
13432
- /** @description Name of the fusion strategy that combined them. */
13433
- strategy: string;
13434
14027
  } | {
13435
- /** @description The loser's confidence at resolution time. */
13436
- competing_confidence: components["schemas"]["Confidence"];
13437
- /** @description The label of the detection that lost arbitration. */
13438
- competing_label: components["schemas"]["LabelRef"];
14028
+ detail: components["schemas"]["Conflict"];
13439
14029
  /** @constant */
13440
14030
  kind: "conflict";
13441
- /** @description Name of the conflict policy that chose the winner. */
13442
- resolved_by: string;
13443
14031
  } | {
13444
- /** @description The competing detection's confidence. */
13445
- competing_confidence: components["schemas"]["Confidence"];
13446
- /** @description The label of the competing detection. */
13447
- competing_label: components["schemas"]["LabelRef"];
13448
- /** @description Name of the policy that flagged the contest. */
13449
- flagged_by: string;
14032
+ detail: components["schemas"]["Contested"];
13450
14033
  /** @constant */
13451
14034
  kind: "contested";
13452
14035
  } | {
13453
- /**
13454
- * Format: double
13455
- * @description Multiplier applied.
13456
- */
13457
- factor: number;
14036
+ detail: components["schemas"]["Calibration"];
13458
14037
  /** @constant */
13459
14038
  kind: "calibration";
13460
14039
  } | {
13461
- /**
13462
- * @description The located [`Hint`] the keyword fired from, when the match came
13463
- * from an out-of-band hint (a column header, a key) rather than
13464
- * the in-text word window. `None` for an in-text-window match.
13465
- *
13466
- * [`Hint`]: crate::modality::Hint
13467
- */
13468
- hint?: components["schemas"]["TabularHint"];
13469
- /** @description Keyword that fired the boost. */
13470
- keyword: string;
14040
+ detail: components["schemas"]["TabularRefinement"];
13471
14041
  /** @constant */
13472
14042
  kind: "refinement";
13473
- /**
13474
- * @description Where the boosting keyword sits in the medium. For a hint match
13475
- * this mirrors the hint's own location; for an in-text-window match
13476
- * it is the keyword resolved through the modality's [`locate`] (a
13477
- * pixel box for image, a time span for audio, the byte range for
13478
- * text/tabular). `None` when the keyword's stream range could not be
13479
- * placed, symmetric with a match the recognizer itself drops.
13480
- *
13481
- * [`locate`]: crate::modality::TextRecognizable::locate
13482
- */
13483
- location?: components["schemas"]["TabularLocation"];
13484
14043
  } | {
13485
- /**
13486
- * @description The author-supplied policy rationale, when the operator carried an
13487
- * [`Attribution`]; `None` otherwise.
13488
- */
13489
- attribution?: components["schemas"]["Attribution"];
13490
- /** @description Identifier of the key needed to reverse it, if reversible. */
13491
- key_id?: string;
14044
+ detail: components["schemas"]["Redaction"];
13492
14045
  /** @constant */
13493
14046
  kind: "redaction";
13494
- /** @description How much the output leaks about the original. */
13495
- leak_profile: components["schemas"]["LeakProfile"];
13496
- /**
13497
- * @description Which selection rule chose this operator: the automatic "why"
13498
- * (matched a label, a tag, a predicate, or the fallback).
13499
- */
13500
- matched_by: components["schemas"]["RuleMatch"];
13501
- /** @description Which operator (name + version) ran. */
13502
- operator: components["schemas"]["OperatorId"];
13503
- /**
13504
- * @description BLAKE3 digest of the original text the operator hid, when the
13505
- * redaction layer recorded it. Proves *what* was redacted without
13506
- * storing the plaintext; `None` when the operator did not capture it.
13507
- */
13508
- span_hash?: components["schemas"]["AuditHash"];
13509
- /**
13510
- * Format: uint32
13511
- * @description Byte length of the original text the operator hid, paired with
13512
- * [`span_hash`](Self::Redaction::span_hash). `None` when not captured.
13513
- */
13514
- span_length?: number;
14047
+ } | {
14048
+ detail: components["schemas"]["Selection"];
14049
+ /** @constant */
14050
+ kind: "selection";
14051
+ } | {
14052
+ detail: components["schemas"]["TabularManual"];
14053
+ /** @constant */
14054
+ kind: "manual";
13515
14055
  };
13516
14056
  /**
13517
14057
  * @description Full audit trail of an [`Entity`]: every [`AuditEvent`] in its life, as a
@@ -13550,6 +14090,23 @@ interface components {
13550
14090
  * [`verify`]: Self::verify
13551
14091
  */
13552
14092
  TabularAuditLog: components["schemas"]["TabularAuditEvent"][];
14093
+ /**
14094
+ * @description One change to an analyzed document.
14095
+ *
14096
+ * `Add` carries no id because the entity does not exist yet; the
14097
+ * engine mints one when the edit is applied, so a client cannot
14098
+ * collide with a real detection or shadow an existing entity.
14099
+ */
14100
+ TabularEdit: ({
14101
+ /** @constant */
14102
+ op: "add";
14103
+ } & components["schemas"]["TabularAdd"]) | ({
14104
+ /** @constant */
14105
+ op: "retag";
14106
+ } & components["schemas"]["TabularRetag"]) | ({
14107
+ /** @constant */
14108
+ op: "suppress";
14109
+ } & components["schemas"]["Suppress"]);
13553
14110
  /**
13554
14111
  * @description Detected piece of sensitive information within some medium.
13555
14112
  *
@@ -13578,7 +14135,12 @@ interface components {
13578
14135
  TabularEntity: {
13579
14136
  /**
13580
14137
  * @description Tamper-evident audit trail: every contributing detection, the fusion
13581
- * event if any, and the redaction that hid it, as a hash-linked DAG.
14138
+ * event if any, and the redaction that hid it, as a hash-linked DAG. It is
14139
+ * also the single source of truth for whether a reviewer
14140
+ * [suppressed](Self::is_suppressed) the entity — a suppression is a
14141
+ * [`Manual`] event on this trail, not a separate flag.
14142
+ *
14143
+ * [`Manual`]: crate::entity::audit::AuditKind::Manual
13582
14144
  */
13583
14145
  audit: components["schemas"]["TabularAuditLog"];
13584
14146
  /** @description Effective confidence in `0.0..=1.0` (fused, if applicable). */
@@ -13623,30 +14185,6 @@ interface components {
13623
14185
  */
13624
14186
  recognized_range?: components["schemas"]["Range_of_uint"];
13625
14187
  };
13626
- /**
13627
- * @description One recognized entity plus the optional reviewer override.
13628
- *
13629
- * The bound mirrors elide's [`Entity<M>`]: serialization needs
13630
- * `M::Location` and `M::Data` (de)serializable, and JsonSchema
13631
- * derivation needs them schema-able. All four modalities elide
13632
- * ships satisfy these under the `serde` + `schema` features.
13633
- */
13634
- TabularEntityRecord: {
13635
- /** @description The elide entity, as recognition produced it. */
13636
- entity: components["schemas"]["TabularEntity"];
13637
- /**
13638
- * @description Reviewer-supplied redaction override.
13639
- *
13640
- * `None` means "use the matching policy rule's decision";
13641
- * `Some(...)` overrides that rule for this specific entity
13642
- * at apply time. Reviewer overrides take precedence over
13643
- * every policy rule and inherit the authority of the
13644
- * [`Review::policy_id`] they name: the audit event's
13645
- * attribution stamps that policy so the trail names the
13646
- * authority under which the override fired.
13647
- */
13648
- review?: components["schemas"]["Review"];
13649
- };
13650
14188
  /**
13651
14189
  * @description Located, typed piece of context a recognizer may treat as in-context
13652
14190
  * for a nearby value.
@@ -13717,6 +14255,54 @@ interface components {
13717
14255
  */
13718
14256
  start_offset?: number;
13719
14257
  };
14258
+ /**
14259
+ * @description A human override, outside automatic detection: an entity a reviewer added by
14260
+ * hand, or a detected one they marked to ignore. Its provenance is a person's
14261
+ * decision, not a recognizer's — so the trail records *why* (an
14262
+ * [`Attribution`], when supplied). *Who* made the override is the event's
14263
+ * [`source`], not a payload field.
14264
+ *
14265
+ * [`source`]: super::AuditEvent::source
14266
+ */
14267
+ TabularManual: {
14268
+ /**
14269
+ * @description The reviewer's rationale, when supplied (e.g. a freeform
14270
+ * `"false positive"`, or a cited authority). `None` for an unexplained
14271
+ * override.
14272
+ */
14273
+ attribution?: components["schemas"]["Attribution"];
14274
+ /**
14275
+ * @description Which human decision this records: including a missed entity, or
14276
+ * suppressing a detected one. This is the authority on whether the entity
14277
+ * is redacted — [`AuditLog::is_suppressed`] reads it, so there is no
14278
+ * separate flag to keep in sync.
14279
+ *
14280
+ * [`AuditLog::is_suppressed`]: crate::entity::audit::AuditLog::is_suppressed
14281
+ */
14282
+ intent: components["schemas"]["ManualIntent"];
14283
+ /** @description Where the override applies, in modality-native coordinates. */
14284
+ location: components["schemas"]["TabularLocation"];
14285
+ };
14286
+ /**
14287
+ * @description Detail of a model/NER recognition: a model matched at `location`, with its
14288
+ * metadata in `model`.
14289
+ */
14290
+ TabularModel: {
14291
+ /** @description Where the recognizer matched. */
14292
+ location: components["schemas"]["TabularLocation"];
14293
+ /** @description Model metadata (name, version, contextual flag). */
14294
+ model: components["schemas"]["ModelEvent"];
14295
+ };
14296
+ /**
14297
+ * @description Detail of a pattern/dictionary recognition: a recognizer matched at
14298
+ * `location`, with the pattern metadata in `pattern`.
14299
+ */
14300
+ TabularPattern: {
14301
+ /** @description Where the recognizer matched. */
14302
+ location: components["schemas"]["TabularLocation"];
14303
+ /** @description Pattern metadata (name, regex, validator, contextual flag). */
14304
+ pattern: components["schemas"]["PatternEvent"];
14305
+ };
13720
14306
  /** @description Operator spec a `redact` tabular rule carries. */
13721
14307
  TabularRedaction: {
13722
14308
  /** @constant */
@@ -13734,6 +14320,55 @@ interface components {
13734
14320
  /** @constant */
13735
14321
  kind: "drop_column";
13736
14322
  };
14323
+ /** @description A context keyword near the entity lifted its confidence. */
14324
+ TabularRefinement: {
14325
+ /**
14326
+ * @description The located [`Hint`] the keyword fired from, when the match came from an
14327
+ * out-of-band hint (a column header, a key) rather than the in-text word
14328
+ * window. `None` for an in-text-window match.
14329
+ *
14330
+ * [`Hint`]: crate::modality::Hint
14331
+ */
14332
+ hint?: components["schemas"]["TabularHint"];
14333
+ /** @description Keyword that fired the boost. */
14334
+ keyword: string;
14335
+ /**
14336
+ * @description Where the boosting keyword sits in the medium. For a hint match this
14337
+ * mirrors the hint's own location; for an in-text-window match it is the
14338
+ * keyword resolved through the modality's [`locate`]. `None` when the
14339
+ * keyword's stream range could not be placed.
14340
+ *
14341
+ * [`locate`]: crate::modality::TextRecognizable::locate
14342
+ */
14343
+ location?: components["schemas"]["TabularLocation"];
14344
+ };
14345
+ /**
14346
+ * @description Correct what an existing detection *is* or *covers*, then redact
14347
+ * it under the policy set as corrected.
14348
+ *
14349
+ * A reviewer fixing recognition's mistake rather than overriding
14350
+ * its consequence. Retagging into a label the policy does not cover
14351
+ * leaves the entity alone, exactly as if it had been detected that
14352
+ * way — which is why it is auditable rather than a mutable field.
14353
+ */
14354
+ TabularRetag: {
14355
+ /** @description Who made it, when the caller said. */
14356
+ actor?: string;
14357
+ /**
14358
+ * Format: uuid
14359
+ * @description The entity being corrected.
14360
+ */
14361
+ id: string;
14362
+ /** @description The corrected label, when recognition got it wrong. */
14363
+ label?: components["schemas"]["LabelRef"];
14364
+ /**
14365
+ * @description The corrected location, when the span clipped the value or
14366
+ * ran past it.
14367
+ */
14368
+ location?: components["schemas"]["TabularLocation"];
14369
+ /** @description The rationale, when one was given. */
14370
+ reason?: string;
14371
+ };
13737
14372
  /**
13738
14373
  * @description The template a [`PolicyDefinition`] was built from.
13739
14374
  *
@@ -13826,6 +14461,28 @@ interface components {
13826
14461
  */
13827
14462
  payload?: unknown;
13828
14463
  };
14464
+ /**
14465
+ * @description A detection recognition missed.
14466
+ *
14467
+ * Recorded on the report with human provenance, so it is never
14468
+ * mistaken for an automatic hit, then redacted under the policy set
14469
+ * like any other entity: an added label the policy does not cover
14470
+ * is left alone.
14471
+ *
14472
+ * Carries no entity id — the entity does not exist yet, and the
14473
+ * engine mints one when the edit is applied, so a client cannot
14474
+ * collide with a real detection or shadow an existing entity.
14475
+ */
14476
+ TextAdd: {
14477
+ /** @description Who made it, when the caller said. */
14478
+ actor?: string;
14479
+ /** @description What the reviewer says this is. */
14480
+ label: components["schemas"]["LabelRef"];
14481
+ /** @description Where it sits in the document. */
14482
+ location: components["schemas"]["TextLocation"];
14483
+ /** @description The rationale, when one was given. */
14484
+ reason?: string;
14485
+ };
13829
14486
  /**
13830
14487
  * @description One node in an entity's audit DAG: a thing that happened, with its
13831
14488
  * effect on confidence and its tamper-evident links.
@@ -13901,115 +14558,70 @@ interface components {
13901
14558
  * @description Kind of an [`AuditEvent`], carrying its event-specific detail and the
13902
14559
  * rationale for why it happened.
13903
14560
  *
13904
- * `#[non_exhaustive]`: new event kinds (verification, annotation, …)
13905
- * can be added compatibly. The recognition kinds ([`Pattern`],
13906
- * [`Model`]) carry the matched [`Location`]; the rest carry their own
13907
- * data.
13908
- *
14561
+ * A thin tagged union: each variant wraps one payload struct (e.g.
14562
+ * [`Redaction`], [`Selection`], [`Manual`]) that owns that kind's fields, its
14563
+ * docs, and how it folds into the audit hash. Match on a variant to reach its
14564
+ * payload:
14565
+ *
14566
+ * ```
14567
+ * # use elide_core::entity::audit::AuditKind;
14568
+ * # use elide_core::modality::text::Text;
14569
+ * # fn show(kind: &AuditKind<Text>) {
14570
+ * if let AuditKind::Redaction(redaction) = kind {
14571
+ * let _ = &redaction.operator;
14572
+ * }
14573
+ * # }
14574
+ * ```
14575
+ *
14576
+ * `#[non_exhaustive]`: new event kinds (verification, annotation, …) can be
14577
+ * added compatibly. The recognition kinds ([`Pattern`], [`Model`]) carry the
14578
+ * matched [`Location`]; the rest carry their own data.
14579
+ *
14580
+ * [`AuditEvent`]: super::AuditEvent
13909
14581
  * [`Pattern`]: AuditKind::Pattern
13910
14582
  * [`Model`]: AuditKind::Model
13911
14583
  * [`Location`]: Modality::Location
13912
14584
  */
13913
14585
  TextAuditKind: {
14586
+ detail: components["schemas"]["TextPattern"];
13914
14587
  /** @constant */
13915
14588
  kind: "pattern";
13916
- /** @description Where the recognizer matched. */
13917
- location: components["schemas"]["TextLocation"];
13918
- /** @description Pattern detail. */
13919
- pattern: components["schemas"]["PatternEvent"];
13920
14589
  } | {
14590
+ detail: components["schemas"]["TextModel"];
13921
14591
  /** @constant */
13922
14592
  kind: "model";
13923
- /** @description Where the recognizer matched. */
13924
- location: components["schemas"]["TextLocation"];
13925
- /** @description Model detail. */
13926
- model: components["schemas"]["ModelEvent"];
13927
14593
  } | {
14594
+ detail: components["schemas"]["Deduplication"];
13928
14595
  /** @constant */
13929
14596
  kind: "deduplication";
13930
- /** @description Name of the fusion strategy that combined them. */
13931
- strategy: string;
13932
14597
  } | {
13933
- /** @description The loser's confidence at resolution time. */
13934
- competing_confidence: components["schemas"]["Confidence"];
13935
- /** @description The label of the detection that lost arbitration. */
13936
- competing_label: components["schemas"]["LabelRef"];
14598
+ detail: components["schemas"]["Conflict"];
13937
14599
  /** @constant */
13938
14600
  kind: "conflict";
13939
- /** @description Name of the conflict policy that chose the winner. */
13940
- resolved_by: string;
13941
14601
  } | {
13942
- /** @description The competing detection's confidence. */
13943
- competing_confidence: components["schemas"]["Confidence"];
13944
- /** @description The label of the competing detection. */
13945
- competing_label: components["schemas"]["LabelRef"];
13946
- /** @description Name of the policy that flagged the contest. */
13947
- flagged_by: string;
14602
+ detail: components["schemas"]["Contested"];
13948
14603
  /** @constant */
13949
14604
  kind: "contested";
13950
14605
  } | {
13951
- /**
13952
- * Format: double
13953
- * @description Multiplier applied.
13954
- */
13955
- factor: number;
14606
+ detail: components["schemas"]["Calibration"];
13956
14607
  /** @constant */
13957
14608
  kind: "calibration";
13958
14609
  } | {
13959
- /**
13960
- * @description The located [`Hint`] the keyword fired from, when the match came
13961
- * from an out-of-band hint (a column header, a key) rather than
13962
- * the in-text word window. `None` for an in-text-window match.
13963
- *
13964
- * [`Hint`]: crate::modality::Hint
13965
- */
13966
- hint?: components["schemas"]["TextHint"];
13967
- /** @description Keyword that fired the boost. */
13968
- keyword: string;
14610
+ detail: components["schemas"]["TextRefinement"];
13969
14611
  /** @constant */
13970
14612
  kind: "refinement";
13971
- /**
13972
- * @description Where the boosting keyword sits in the medium. For a hint match
13973
- * this mirrors the hint's own location; for an in-text-window match
13974
- * it is the keyword resolved through the modality's [`locate`] (a
13975
- * pixel box for image, a time span for audio, the byte range for
13976
- * text/tabular). `None` when the keyword's stream range could not be
13977
- * placed, symmetric with a match the recognizer itself drops.
13978
- *
13979
- * [`locate`]: crate::modality::TextRecognizable::locate
13980
- */
13981
- location?: components["schemas"]["TextLocation"];
13982
14613
  } | {
13983
- /**
13984
- * @description The author-supplied policy rationale, when the operator carried an
13985
- * [`Attribution`]; `None` otherwise.
13986
- */
13987
- attribution?: components["schemas"]["Attribution"];
13988
- /** @description Identifier of the key needed to reverse it, if reversible. */
13989
- key_id?: string;
14614
+ detail: components["schemas"]["Redaction"];
13990
14615
  /** @constant */
13991
14616
  kind: "redaction";
13992
- /** @description How much the output leaks about the original. */
13993
- leak_profile: components["schemas"]["LeakProfile"];
13994
- /**
13995
- * @description Which selection rule chose this operator: the automatic "why"
13996
- * (matched a label, a tag, a predicate, or the fallback).
13997
- */
13998
- matched_by: components["schemas"]["RuleMatch"];
13999
- /** @description Which operator (name + version) ran. */
14000
- operator: components["schemas"]["OperatorId"];
14001
- /**
14002
- * @description BLAKE3 digest of the original text the operator hid, when the
14003
- * redaction layer recorded it. Proves *what* was redacted without
14004
- * storing the plaintext; `None` when the operator did not capture it.
14005
- */
14006
- span_hash?: components["schemas"]["AuditHash"];
14007
- /**
14008
- * Format: uint32
14009
- * @description Byte length of the original text the operator hid, paired with
14010
- * [`span_hash`](Self::Redaction::span_hash). `None` when not captured.
14011
- */
14012
- span_length?: number;
14617
+ } | {
14618
+ detail: components["schemas"]["Selection"];
14619
+ /** @constant */
14620
+ kind: "selection";
14621
+ } | {
14622
+ detail: components["schemas"]["TextManual"];
14623
+ /** @constant */
14624
+ kind: "manual";
14013
14625
  };
14014
14626
  /**
14015
14627
  * @description Full audit trail of an [`Entity`]: every [`AuditEvent`] in its life, as a
@@ -14059,6 +14671,23 @@ interface components {
14059
14671
  * several recognizers.
14060
14672
  */
14061
14673
  TextData: string;
14674
+ /**
14675
+ * @description One change to an analyzed document.
14676
+ *
14677
+ * `Add` carries no id because the entity does not exist yet; the
14678
+ * engine mints one when the edit is applied, so a client cannot
14679
+ * collide with a real detection or shadow an existing entity.
14680
+ */
14681
+ TextEdit: ({
14682
+ /** @constant */
14683
+ op: "add";
14684
+ } & components["schemas"]["TextAdd"]) | ({
14685
+ /** @constant */
14686
+ op: "retag";
14687
+ } & components["schemas"]["TextRetag"]) | ({
14688
+ /** @constant */
14689
+ op: "suppress";
14690
+ } & components["schemas"]["Suppress"]);
14062
14691
  /**
14063
14692
  * @description Detected piece of sensitive information within some medium.
14064
14693
  *
@@ -14087,7 +14716,12 @@ interface components {
14087
14716
  TextEntity: {
14088
14717
  /**
14089
14718
  * @description Tamper-evident audit trail: every contributing detection, the fusion
14090
- * event if any, and the redaction that hid it, as a hash-linked DAG.
14719
+ * event if any, and the redaction that hid it, as a hash-linked DAG. It is
14720
+ * also the single source of truth for whether a reviewer
14721
+ * [suppressed](Self::is_suppressed) the entity — a suppression is a
14722
+ * [`Manual`] event on this trail, not a separate flag.
14723
+ *
14724
+ * [`Manual`]: crate::entity::audit::AuditKind::Manual
14091
14725
  */
14092
14726
  audit: components["schemas"]["TextAuditLog"];
14093
14727
  /** @description Effective confidence in `0.0..=1.0` (fused, if applicable). */
@@ -14132,30 +14766,6 @@ interface components {
14132
14766
  */
14133
14767
  recognized_range?: components["schemas"]["Range_of_uint"];
14134
14768
  };
14135
- /**
14136
- * @description One recognized entity plus the optional reviewer override.
14137
- *
14138
- * The bound mirrors elide's [`Entity<M>`]: serialization needs
14139
- * `M::Location` and `M::Data` (de)serializable, and JsonSchema
14140
- * derivation needs them schema-able. All four modalities elide
14141
- * ships satisfy these under the `serde` + `schema` features.
14142
- */
14143
- TextEntityRecord: {
14144
- /** @description The elide entity, as recognition produced it. */
14145
- entity: components["schemas"]["TextEntity"];
14146
- /**
14147
- * @description Reviewer-supplied redaction override.
14148
- *
14149
- * `None` means "use the matching policy rule's decision";
14150
- * `Some(...)` overrides that rule for this specific entity
14151
- * at apply time. Reviewer overrides take precedence over
14152
- * every policy rule and inherit the authority of the
14153
- * [`Review::policy_id`] they name: the audit event's
14154
- * attribution stamps that policy so the trail names the
14155
- * authority under which the override fired.
14156
- */
14157
- review?: components["schemas"]["Review"];
14158
- };
14159
14769
  /**
14160
14770
  * @description Located, typed piece of context a recognizer may treat as in-context
14161
14771
  * for a nearby value.
@@ -14205,6 +14815,54 @@ interface components {
14205
14815
  */
14206
14816
  source?: components["schemas"]["SourceRef"][];
14207
14817
  };
14818
+ /**
14819
+ * @description A human override, outside automatic detection: an entity a reviewer added by
14820
+ * hand, or a detected one they marked to ignore. Its provenance is a person's
14821
+ * decision, not a recognizer's — so the trail records *why* (an
14822
+ * [`Attribution`], when supplied). *Who* made the override is the event's
14823
+ * [`source`], not a payload field.
14824
+ *
14825
+ * [`source`]: super::AuditEvent::source
14826
+ */
14827
+ TextManual: {
14828
+ /**
14829
+ * @description The reviewer's rationale, when supplied (e.g. a freeform
14830
+ * `"false positive"`, or a cited authority). `None` for an unexplained
14831
+ * override.
14832
+ */
14833
+ attribution?: components["schemas"]["Attribution"];
14834
+ /**
14835
+ * @description Which human decision this records: including a missed entity, or
14836
+ * suppressing a detected one. This is the authority on whether the entity
14837
+ * is redacted — [`AuditLog::is_suppressed`] reads it, so there is no
14838
+ * separate flag to keep in sync.
14839
+ *
14840
+ * [`AuditLog::is_suppressed`]: crate::entity::audit::AuditLog::is_suppressed
14841
+ */
14842
+ intent: components["schemas"]["ManualIntent"];
14843
+ /** @description Where the override applies, in modality-native coordinates. */
14844
+ location: components["schemas"]["TextLocation"];
14845
+ };
14846
+ /**
14847
+ * @description Detail of a model/NER recognition: a model matched at `location`, with its
14848
+ * metadata in `model`.
14849
+ */
14850
+ TextModel: {
14851
+ /** @description Where the recognizer matched. */
14852
+ location: components["schemas"]["TextLocation"];
14853
+ /** @description Model metadata (name, version, contextual flag). */
14854
+ model: components["schemas"]["ModelEvent"];
14855
+ };
14856
+ /**
14857
+ * @description Detail of a pattern/dictionary recognition: a recognizer matched at
14858
+ * `location`, with the pattern metadata in `pattern`.
14859
+ */
14860
+ TextPattern: {
14861
+ /** @description Where the recognizer matched. */
14862
+ location: components["schemas"]["TextLocation"];
14863
+ /** @description Pattern metadata (name, regex, validator, contextual flag). */
14864
+ pattern: components["schemas"]["PatternEvent"];
14865
+ };
14208
14866
  /** @description Operator spec a `redact` text rule carries. */
14209
14867
  TextRedaction: {
14210
14868
  /** @constant */
@@ -14351,6 +15009,55 @@ interface components {
14351
15009
  */
14352
15010
  style?: components["schemas"]["DateStyle"];
14353
15011
  };
15012
+ /** @description A context keyword near the entity lifted its confidence. */
15013
+ TextRefinement: {
15014
+ /**
15015
+ * @description The located [`Hint`] the keyword fired from, when the match came from an
15016
+ * out-of-band hint (a column header, a key) rather than the in-text word
15017
+ * window. `None` for an in-text-window match.
15018
+ *
15019
+ * [`Hint`]: crate::modality::Hint
15020
+ */
15021
+ hint?: components["schemas"]["TextHint"];
15022
+ /** @description Keyword that fired the boost. */
15023
+ keyword: string;
15024
+ /**
15025
+ * @description Where the boosting keyword sits in the medium. For a hint match this
15026
+ * mirrors the hint's own location; for an in-text-window match it is the
15027
+ * keyword resolved through the modality's [`locate`]. `None` when the
15028
+ * keyword's stream range could not be placed.
15029
+ *
15030
+ * [`locate`]: crate::modality::TextRecognizable::locate
15031
+ */
15032
+ location?: components["schemas"]["TextLocation"];
15033
+ };
15034
+ /**
15035
+ * @description Correct what an existing detection *is* or *covers*, then redact
15036
+ * it under the policy set as corrected.
15037
+ *
15038
+ * A reviewer fixing recognition's mistake rather than overriding
15039
+ * its consequence. Retagging into a label the policy does not cover
15040
+ * leaves the entity alone, exactly as if it had been detected that
15041
+ * way — which is why it is auditable rather than a mutable field.
15042
+ */
15043
+ TextRetag: {
15044
+ /** @description Who made it, when the caller said. */
15045
+ actor?: string;
15046
+ /**
15047
+ * Format: uuid
15048
+ * @description The entity being corrected.
15049
+ */
15050
+ id: string;
15051
+ /** @description The corrected label, when recognition got it wrong. */
15052
+ label?: components["schemas"]["LabelRef"];
15053
+ /**
15054
+ * @description The corrected location, when the span clipped the value or
15055
+ * ran past it.
15056
+ */
15057
+ location?: components["schemas"]["TextLocation"];
15058
+ /** @description The rationale, when one was given. */
15059
+ reason?: string;
15060
+ };
14354
15061
  /**
14355
15062
  * @description Half-open `[start, end)` stream interval, measured in microseconds.
14356
15063
  *
@@ -14773,7 +15480,7 @@ interface components {
14773
15480
  * This enumeration corresponds to the `WEBHOOK_EVENT` PostgreSQL enum and is used
14774
15481
  * to configure which events a webhook should receive notifications for.
14775
15482
  */
14776
- WebhookEvent: "file.created" | "file.updated" | "file.deleted" | "member.added" | "member.deleted" | "member.updated" | "connection.created" | "connection.updated" | "connection.deleted" | "connection.sync.started" | "connection.sync.completed" | "connection.sync.failed" | "pipeline.created" | "pipeline.updated" | "pipeline.deleted" | "pipeline.run.started" | "pipeline.run.analyzed" | "pipeline.run.completed" | "pipeline.run.failed" | "policy.created" | "policy.updated" | "policy.deleted";
15483
+ WebhookEvent: "file.created" | "file.updated" | "file.deleted" | "member.added" | "member.deleted" | "member.updated" | "connection.created" | "connection.updated" | "connection.deleted" | "connection.sync.started" | "connection.sync.completed" | "connection.sync.failed" | "pipeline.created" | "pipeline.updated" | "pipeline.deleted" | "pipeline.detection.started" | "pipeline.detection.completed" | "pipeline.detection.failed" | "pipeline.redaction.created" | "policy.created" | "policy.updated" | "policy.deleted";
14777
15484
  /** @description Opaque whk identifier (whk_<uuid>). */
14778
15485
  WebhookId: string;
14779
15486
  /**
@@ -14857,13 +15564,39 @@ interface components {
14857
15564
  * the inference tokens they spent.
14858
15565
  */
14859
15566
  WorkspaceAnalytics: {
14860
- /** @description Pipeline-run health: volume, status mix, and durations. */
14861
- runs: components["schemas"]["RunAnalytics"];
15567
+ /** @description Detection health: volume, status mix, and durations. */
15568
+ detections: components["schemas"]["DetectionAnalytics"];
14862
15569
  /** @description Stored-file totals and their per-kind breakdown. */
14863
15570
  storage: components["schemas"]["StorageAnalytics"];
14864
15571
  /** @description Inference token usage: workspace totals and a per-model breakdown. */
14865
15572
  usage: components["schemas"]["UsageAnalytics"];
14866
15573
  };
15574
+ /**
15575
+ * @description Query parameters for listing detections across a workspace.
15576
+ *
15577
+ * Every field is an optional filter; unset fields impose no constraint.
15578
+ */
15579
+ WorkspaceDetectionsQuery: {
15580
+ /**
15581
+ * Format: uuid
15582
+ * @description Filter by the source file the detection analyzes.
15583
+ */
15584
+ fileId?: string;
15585
+ /**
15586
+ * Format: uuid
15587
+ * @description Filter by the owning pipeline.
15588
+ */
15589
+ pipelineId?: string;
15590
+ /** @description Filter by detection status. */
15591
+ status?: components["schemas"]["DetectionStatus"];
15592
+ /** @description Filter by how the detection was initiated (user vs system). */
15593
+ triggerType?: components["schemas"]["PipelineTriggerType"];
15594
+ /**
15595
+ * Format: uuid
15596
+ * @description Filter by the account that triggered the detection.
15597
+ */
15598
+ triggeredBy?: string;
15599
+ };
14867
15600
  /** @description Path parameters for file operations within a workspace context. */
14868
15601
  WorkspaceFilePathParams: {
14869
15602
  /**
@@ -14897,32 +15630,6 @@ interface components {
14897
15630
  * hierarchical access control for workspace members with clearly defined capabilities.
14898
15631
  */
14899
15632
  WorkspaceRole: "owner" | "admin" | "member" | "guest";
14900
- /**
14901
- * @description Query parameters for listing runs across a workspace.
14902
- *
14903
- * Every field is an optional filter; unset fields impose no constraint.
14904
- */
14905
- WorkspaceRunsQuery: {
14906
- /**
14907
- * Format: uuid
14908
- * @description Filter by the source file the run analyzes.
14909
- */
14910
- fileId?: string;
14911
- /**
14912
- * Format: uuid
14913
- * @description Filter by the owning pipeline.
14914
- */
14915
- pipelineId?: string;
14916
- /** @description Filter by run status. */
14917
- status?: components["schemas"]["PipelineRunStatus"];
14918
- /** @description Filter by how the run was initiated (user vs system). */
14919
- triggerType?: components["schemas"]["PipelineTriggerType"];
14920
- /**
14921
- * Format: uuid
14922
- * @description Filter by the account that triggered the run.
14923
- */
14924
- triggeredBy?: string;
14925
- };
14926
15633
  /** @description Typed workspace settings, the JSON stored in the `workspaces.settings` column. */
14927
15634
  WorkspaceSettings: {
14928
15635
  /**
@@ -14985,15 +15692,16 @@ type Schemas$21 = components["schemas"];
14985
15692
  type Activity = Schemas$21["Activity"];
14986
15693
  type ActivityPage = Schemas$21["ActivityPage"];
14987
15694
  type ActivityType = Schemas$21["ActivityType"];
14988
- type ActivityListQuery = Schemas$21["ActivityListQuery"];
14989
- type ActivityExportQuery = Schemas$21["ActivityExportQuery"];
15695
+ type ActivityFilterQuery = Schemas$21["ActivityFilterQuery"];
15696
+ type ActivityExportOptions = Schemas$21["ActivityExportOptions"];
14990
15697
  type ActivityPayload = Schemas$21["ActivityPayload"];
14991
15698
  type WorkspaceActivityParams = Schemas$21["WorkspaceActivityParams"];
14992
15699
  type MemberActivityParams = Schemas$21["MemberActivityParams"];
14993
15700
  type InviteActivityParams = Schemas$21["InviteActivityParams"];
14994
15701
  type ConnectionActivityParams = Schemas$21["ConnectionActivityParams"];
14995
15702
  type PipelineActivityParams = Schemas$21["PipelineActivityParams"];
14996
- type PipelineRunActivityParams = Schemas$21["PipelineRunActivityParams"];
15703
+ type DetectionActivityParams = Schemas$21["DetectionActivityParams"];
15704
+ type RedactionActivityParams = Schemas$21["RedactionActivityParams"];
14997
15705
  type PolicyActivityParams = Schemas$21["PolicyActivityParams"];
14998
15706
  type FileActivityParams = Schemas$21["FileActivityParams"];
14999
15707
  type WebhookActivityParams = Schemas$21["WebhookActivityParams"];
@@ -15003,8 +15711,8 @@ type Schemas$20 = components["schemas"];
15003
15711
  type WorkspaceAnalytics = Schemas$20["WorkspaceAnalytics"];
15004
15712
  type StorageAnalytics = Schemas$20["StorageAnalytics"];
15005
15713
  type StorageKindEntry = Schemas$20["StorageKindEntry"];
15006
- type RunAnalytics = Schemas$20["RunAnalytics"];
15007
- type RunStatusEntry = Schemas$20["RunStatusEntry"];
15714
+ type DetectionAnalytics = Schemas$20["DetectionAnalytics"];
15715
+ type DetectionStatusEntry = Schemas$20["DetectionStatusEntry"];
15008
15716
  type UsageAnalytics = Schemas$20["UsageAnalytics"];
15009
15717
  type ModelUsage = Schemas$20["ModelUsage"];
15010
15718
  type ModelUsageEntry = Schemas$20["ModelUsageEntry"];
@@ -15013,8 +15721,8 @@ type UsageReport = Schemas$20["UsageReport"];
15013
15721
  type TokenCounts = Schemas$20["TokenCounts"];
15014
15722
  type ProviderType = Schemas$20["ProviderType"];
15015
15723
  type RecognizerId = Schemas$20["RecognizerId"];
15016
- type RunTimeSeries = Schemas$20["RunTimeSeries"];
15017
- type RunDayEntry = Schemas$20["RunDayEntry"];
15724
+ type DetectionTimeSeries = Schemas$20["DetectionTimeSeries"];
15725
+ type DetectionDayEntry = Schemas$20["DetectionDayEntry"];
15018
15726
  //#endregion
15019
15727
  //#region src/datatypes/api-token.d.ts
15020
15728
  type Schemas$19 = components["schemas"];
@@ -15028,18 +15736,29 @@ type ApiTokenPage = Schemas$19["ApiTokenPage"];
15028
15736
  //#endregion
15029
15737
  //#region src/datatypes/audit.d.ts
15030
15738
  type Schemas$18 = components["schemas"];
15031
- type EntityGroup = Schemas$18["EntityGroup"];
15032
- type AuditContext = Schemas$18["AuditContext"];
15739
+ type Audit = Schemas$18["Audit"];
15740
+ type DocumentContext = Schemas$18["DocumentContext"];
15741
+ type CodecParams = Schemas$18["CodecParams"];
15033
15742
  type EntityCoRef = Schemas$18["EntityCoRef"];
15743
+ type Report = Schemas$18["Report"];
15744
+ type EditSet = Schemas$18["EditSet"];
15034
15745
  type RasterMode = Schemas$18["RasterMode"];
15035
15746
  type Dpi = Schemas$18["Dpi"];
15036
- type Review = Schemas$18["Review"];
15037
- type Attribution = Schemas$18["Attribution"];
15038
- type AttributionKind = Schemas$18["AttributionKind"];
15747
+ type Redaction = Schemas$18["Redaction"];
15748
+ type Selection = Schemas$18["Selection"];
15749
+ type Suppress = Schemas$18["Suppress"];
15750
+ type ManualIntent = Schemas$18["ManualIntent"];
15039
15751
  type LeakProfile = Schemas$18["LeakProfile"];
15040
15752
  type RuleMatch = Schemas$18["RuleMatch"];
15753
+ type Attribution = Schemas$18["Attribution"];
15754
+ type CitedAttribution = Schemas$18["CitedAttribution"];
15755
+ type FreeformAttribution = Schemas$18["FreeformAttribution"];
15041
15756
  type ModelEvent = Schemas$18["ModelEvent"];
15042
15757
  type PatternEvent = Schemas$18["PatternEvent"];
15758
+ type Conflict = Schemas$18["Conflict"];
15759
+ type Contested = Schemas$18["Contested"];
15760
+ type Deduplication = Schemas$18["Deduplication"];
15761
+ type Calibration = Schemas$18["Calibration"];
15043
15762
  type OperatorId = Schemas$18["OperatorId"];
15044
15763
  type AuditHash = Schemas$18["AuditHash"];
15045
15764
  type Category = Schemas$18["Category"];
@@ -15052,36 +15771,60 @@ type Polygon = Schemas$18["Polygon"];
15052
15771
  type Dimensions = Schemas$18["Dimensions"];
15053
15772
  type TimeSpan = Schemas$18["TimeSpan"];
15054
15773
  type TextEntity = Schemas$18["TextEntity"];
15055
- type TextEntityRecord = Schemas$18["TextEntityRecord"];
15056
15774
  type TextAuditEvent = Schemas$18["TextAuditEvent"];
15057
15775
  type TextAuditKind = Schemas$18["TextAuditKind"];
15776
+ type TextAuditLog = Schemas$18["TextAuditLog"];
15058
15777
  type TextHint = Schemas$18["TextHint"];
15059
15778
  type TextLocation = Schemas$18["TextLocation"];
15060
- type TextAuditLog = Schemas$18["TextAuditLog"];
15061
15779
  type TextData = Schemas$18["TextData"];
15780
+ type TextModel = Schemas$18["TextModel"];
15781
+ type TextPattern = Schemas$18["TextPattern"];
15782
+ type TextManual = Schemas$18["TextManual"];
15783
+ type TextEdit = Schemas$18["TextEdit"];
15784
+ type TextAdd = Schemas$18["TextAdd"];
15785
+ type TextRefinement = Schemas$18["TextRefinement"];
15786
+ type TextRetag = Schemas$18["TextRetag"];
15062
15787
  type ImageEntity = Schemas$18["ImageEntity"];
15063
- type ImageEntityRecord = Schemas$18["ImageEntityRecord"];
15064
15788
  type ImageAuditEvent = Schemas$18["ImageAuditEvent"];
15065
15789
  type ImageAuditKind = Schemas$18["ImageAuditKind"];
15790
+ type ImageAuditLog = Schemas$18["ImageAuditLog"];
15066
15791
  type ImageHint = Schemas$18["ImageHint"];
15067
15792
  type ImageLocation = Schemas$18["ImageLocation"];
15068
- type ImageAuditLog = Schemas$18["ImageAuditLog"];
15069
15793
  type ImageData = Schemas$18["ImageData"];
15794
+ type ImageModel = Schemas$18["ImageModel"];
15795
+ type ImagePattern = Schemas$18["ImagePattern"];
15796
+ type ImageManual = Schemas$18["ImageManual"];
15797
+ type ImageEdit = Schemas$18["ImageEdit"];
15798
+ type ImageAdd = Schemas$18["ImageAdd"];
15799
+ type ImageRefinement = Schemas$18["ImageRefinement"];
15800
+ type ImageRetag = Schemas$18["ImageRetag"];
15070
15801
  type AudioEntity = Schemas$18["AudioEntity"];
15071
- type AudioEntityRecord = Schemas$18["AudioEntityRecord"];
15072
15802
  type AudioAuditEvent = Schemas$18["AudioAuditEvent"];
15073
15803
  type AudioAuditKind = Schemas$18["AudioAuditKind"];
15804
+ type AudioAuditLog = Schemas$18["AudioAuditLog"];
15074
15805
  type AudioHint = Schemas$18["AudioHint"];
15075
15806
  type AudioLocation = Schemas$18["AudioLocation"];
15076
- type AudioAuditLog = Schemas$18["AudioAuditLog"];
15077
15807
  type AudioData = Schemas$18["AudioData"];
15808
+ type AudioModel = Schemas$18["AudioModel"];
15809
+ type AudioPattern = Schemas$18["AudioPattern"];
15810
+ type AudioManual = Schemas$18["AudioManual"];
15811
+ type AudioEdit = Schemas$18["AudioEdit"];
15812
+ type AudioAdd = Schemas$18["AudioAdd"];
15813
+ type AudioRefinement = Schemas$18["AudioRefinement"];
15814
+ type AudioRetag = Schemas$18["AudioRetag"];
15078
15815
  type TabularEntity = Schemas$18["TabularEntity"];
15079
- type TabularEntityRecord = Schemas$18["TabularEntityRecord"];
15080
15816
  type TabularAuditEvent = Schemas$18["TabularAuditEvent"];
15081
15817
  type TabularAuditKind = Schemas$18["TabularAuditKind"];
15818
+ type TabularAuditLog = Schemas$18["TabularAuditLog"];
15082
15819
  type TabularHint = Schemas$18["TabularHint"];
15083
15820
  type TabularLocation = Schemas$18["TabularLocation"];
15084
- type TabularAuditLog = Schemas$18["TabularAuditLog"];
15821
+ type TabularModel = Schemas$18["TabularModel"];
15822
+ type TabularPattern = Schemas$18["TabularPattern"];
15823
+ type TabularManual = Schemas$18["TabularManual"];
15824
+ type TabularEdit = Schemas$18["TabularEdit"];
15825
+ type TabularAdd = Schemas$18["TabularAdd"];
15826
+ type TabularRefinement = Schemas$18["TabularRefinement"];
15827
+ type TabularRetag = Schemas$18["TabularRetag"];
15085
15828
  //#endregion
15086
15829
  //#region src/datatypes/auth.d.ts
15087
15830
  type Schemas$17 = components["schemas"];
@@ -15134,147 +15877,150 @@ type OpenAiCredentials = Schemas$14["OpenAiCredentials"];
15134
15877
  type SyncSchedule = Schemas$14["SyncSchedule"];
15135
15878
  type SyncScheduleInput = Schemas$14["SyncScheduleInput"];
15136
15879
  //#endregion
15137
- //#region src/datatypes/error.d.ts
15880
+ //#region src/datatypes/detection.d.ts
15138
15881
  type Schemas$13 = components["schemas"];
15139
- type ErrorResponse = Schemas$13["ErrorResponse"];
15140
- type ValidationErrorDetail = Schemas$13["ValidationErrorDetail"];
15882
+ type DetectionId = Schemas$13["DetectionId"];
15883
+ type Detection = Schemas$13["Detection"];
15884
+ type DetectionMetadata = Schemas$13["DetectionMetadata"];
15885
+ type CreateDetection = Schemas$13["CreateDetection"];
15886
+ type DetectionStatus = Schemas$13["DetectionStatus"];
15887
+ type DetectionPage = Schemas$13["DetectionPage"];
15888
+ type WorkspaceDetectionsQuery = Schemas$13["WorkspaceDetectionsQuery"];
15889
+ type PipelineDetectionsQuery = Schemas$13["PipelineDetectionsQuery"];
15890
+ type DetectionStatusEvent = Schemas$13["DetectionStatusEvent"];
15891
+ type RedactionId = Schemas$13["RedactionId"];
15892
+ type RedactDetection = Schemas$13["RedactDetection"];
15893
+ type RedactionResult = Schemas$13["RedactionResult"];
15894
+ type RedactionResultPage = Schemas$13["RedactionResultPage"];
15141
15895
  //#endregion
15142
- //#region src/datatypes/export.d.ts
15896
+ //#region src/datatypes/error.d.ts
15143
15897
  type Schemas$12 = components["schemas"];
15144
- type ExportFormat = Schemas$12["ExportFormat"];
15145
- type ExportQuery = Schemas$12["ExportQuery"];
15146
- type DateWindow = Schemas$12["DateWindow"];
15898
+ type ErrorResponse = Schemas$12["ErrorResponse"];
15899
+ type ValidationErrorDetail = Schemas$12["ValidationErrorDetail"];
15147
15900
  //#endregion
15148
- //#region src/datatypes/file.d.ts
15901
+ //#region src/datatypes/export.d.ts
15149
15902
  type Schemas$11 = components["schemas"];
15150
- type File = Schemas$11["File"];
15151
- type UpdateFile = Schemas$11["UpdateFile"];
15152
- type FileKind = Schemas$11["FileKind"];
15153
- type FormatToken = Schemas$11["FormatToken"];
15154
- type ModalityToken = Schemas$11["ModalityToken"];
15155
- type ListFiles = Schemas$11["ListFiles"];
15156
- type FilePage = Schemas$11["FilePage"];
15903
+ type ExportFormat = Schemas$11["ExportFormat"];
15904
+ type ExportQuery = Schemas$11["ExportQuery"];
15905
+ type DateWindow = Schemas$11["DateWindow"];
15157
15906
  //#endregion
15158
- //#region src/datatypes/health.d.ts
15907
+ //#region src/datatypes/file.d.ts
15159
15908
  type Schemas$10 = components["schemas"];
15160
- type Health = Schemas$10["Health"];
15161
- type HealthStatus = Schemas$10["HealthStatus"];
15162
- type ComponentHealth = Schemas$10["ComponentHealth"];
15909
+ type File = Schemas$10["File"];
15910
+ type UpdateFile = Schemas$10["UpdateFile"];
15911
+ type FileKind = Schemas$10["FileKind"];
15912
+ type FormatToken = Schemas$10["FormatToken"];
15913
+ type ModalityToken = Schemas$10["ModalityToken"];
15914
+ type ListFiles = Schemas$10["ListFiles"];
15915
+ type FilePage = Schemas$10["FilePage"];
15163
15916
  //#endregion
15164
- //#region src/datatypes/invite.d.ts
15917
+ //#region src/datatypes/health.d.ts
15165
15918
  type Schemas$9 = components["schemas"];
15166
- type Invite = Schemas$9["Invite"];
15167
- type InviteSent = Schemas$9["InviteSent"];
15168
- type CreateInvite = Schemas$9["CreateInvite"];
15169
- type ReplyInvite = Schemas$9["ReplyInvite"];
15170
- type GenerateInviteCode = Schemas$9["GenerateInviteCode"];
15171
- type InviteCode = Schemas$9["InviteCode"];
15172
- type InviteStatus = Schemas$9["InviteStatus"];
15173
- type InviteExpiration = Schemas$9["InviteExpiration"];
15174
- type ListInvites = Schemas$9["ListInvites"];
15175
- type InviteSortField = Schemas$9["InviteSortField"];
15176
- type SortOrder = Schemas$9["SortOrder"];
15177
- type InvitePreview = Schemas$9["InvitePreview"];
15178
- type InvitePage = Schemas$9["InvitePage"];
15919
+ type Health = Schemas$9["Health"];
15920
+ type HealthStatus = Schemas$9["HealthStatus"];
15921
+ type ComponentHealth = Schemas$9["ComponentHealth"];
15179
15922
  //#endregion
15180
- //#region src/datatypes/member.d.ts
15923
+ //#region src/datatypes/invite.d.ts
15181
15924
  type Schemas$8 = components["schemas"];
15182
- type Member = Schemas$8["Member"];
15183
- type UpdateMember = Schemas$8["UpdateMember"];
15184
- type ListMembers = Schemas$8["ListMembers"];
15185
- type MemberSortField = Schemas$8["MemberSortField"];
15186
- type MemberPage = Schemas$8["MemberPage"];
15925
+ type Invite = Schemas$8["Invite"];
15926
+ type InviteSent = Schemas$8["InviteSent"];
15927
+ type CreateInvite = Schemas$8["CreateInvite"];
15928
+ type ReplyInvite = Schemas$8["ReplyInvite"];
15929
+ type GenerateInviteCode = Schemas$8["GenerateInviteCode"];
15930
+ type InviteCode = Schemas$8["InviteCode"];
15931
+ type InviteStatus = Schemas$8["InviteStatus"];
15932
+ type InviteExpiration = Schemas$8["InviteExpiration"];
15933
+ type ListInvites = Schemas$8["ListInvites"];
15934
+ type InviteSortField = Schemas$8["InviteSortField"];
15935
+ type SortOrder = Schemas$8["SortOrder"];
15936
+ type InvitePreview = Schemas$8["InvitePreview"];
15937
+ type InvitePage = Schemas$8["InvitePage"];
15187
15938
  //#endregion
15188
- //#region src/datatypes/notification.d.ts
15939
+ //#region src/datatypes/member.d.ts
15189
15940
  type Schemas$7 = components["schemas"];
15190
- type Notification = Schemas$7["Notification"];
15191
- type NotificationEvent = Schemas$7["NotificationEvent"];
15192
- type NotificationSettings = Schemas$7["NotificationSettings"];
15193
- type UpdateNotificationSettings = Schemas$7["UpdateNotificationSettings"];
15194
- type UnreadStatus = Schemas$7["UnreadStatus"];
15195
- type NotificationPage = Schemas$7["NotificationPage"];
15196
- type MarkedReadStatus = Schemas$7["MarkedReadStatus"];
15197
- type UnreadCountEvent = Schemas$7["UnreadCountEvent"];
15198
- type NotificationPayload = Schemas$7["NotificationPayload"];
15199
- type MemberInvitedParams = Schemas$7["MemberInvitedParams"];
15200
- type MemberJoinedParams = Schemas$7["MemberJoinedParams"];
15201
- type ConnectionSyncCompletedParams = Schemas$7["ConnectionSyncCompletedParams"];
15202
- type ConnectionSyncFailedParams = Schemas$7["ConnectionSyncFailedParams"];
15203
- type PipelineRunAnalyzedParams = Schemas$7["PipelineRunAnalyzedParams"];
15204
- type PipelineRunCompletedParams = Schemas$7["PipelineRunCompletedParams"];
15205
- type PipelineRunFailedParams = Schemas$7["PipelineRunFailedParams"];
15941
+ type Member = Schemas$7["Member"];
15942
+ type UpdateMember = Schemas$7["UpdateMember"];
15943
+ type ListMembers = Schemas$7["ListMembers"];
15944
+ type MemberSortField = Schemas$7["MemberSortField"];
15945
+ type MemberPage = Schemas$7["MemberPage"];
15206
15946
  //#endregion
15207
- //#region src/datatypes/pagination.d.ts
15947
+ //#region src/datatypes/notification.d.ts
15208
15948
  type Schemas$6 = components["schemas"];
15209
- type CursorPagination = Schemas$6["CursorPagination"];
15949
+ type Notification = Schemas$6["Notification"];
15950
+ type NotificationEvent = Schemas$6["NotificationEvent"];
15951
+ type NotificationSettings = Schemas$6["NotificationSettings"];
15952
+ type UpdateNotificationSettings = Schemas$6["UpdateNotificationSettings"];
15953
+ type UnreadStatus = Schemas$6["UnreadStatus"];
15954
+ type NotificationPage = Schemas$6["NotificationPage"];
15955
+ type MarkedReadStatus = Schemas$6["MarkedReadStatus"];
15956
+ type UnreadCountEvent = Schemas$6["UnreadCountEvent"];
15957
+ type NotificationPayload = Schemas$6["NotificationPayload"];
15958
+ type MemberInvitedParams = Schemas$6["MemberInvitedParams"];
15959
+ type MemberJoinedParams = Schemas$6["MemberJoinedParams"];
15960
+ type ConnectionSyncCompletedParams = Schemas$6["ConnectionSyncCompletedParams"];
15961
+ type ConnectionSyncFailedParams = Schemas$6["ConnectionSyncFailedParams"];
15962
+ type DetectionCompletedParams = Schemas$6["DetectionCompletedParams"];
15963
+ type DetectionFailedParams = Schemas$6["DetectionFailedParams"];
15964
+ type RedactionCreatedParams = Schemas$6["RedactionCreatedParams"];
15210
15965
  //#endregion
15211
- //#region src/datatypes/pipeline.d.ts
15966
+ //#region src/datatypes/pagination.d.ts
15212
15967
  type Schemas$5 = components["schemas"];
15213
- type Pipeline = Schemas$5["Pipeline"];
15214
- type CreatePipeline = Schemas$5["CreatePipeline"];
15215
- type UpdatePipeline = Schemas$5["UpdatePipeline"];
15216
- type PipelineDefinition = Schemas$5["PipelineDefinition"];
15217
- type PipelineFilter = Schemas$5["PipelineFilter"];
15218
- type PipelineStatus = Schemas$5["PipelineStatus"];
15219
- type PipelineTriggerType = Schemas$5["PipelineTriggerType"];
15220
- type PipelineSummary = Schemas$5["PipelineSummary"];
15221
- type PipelineSummaryPage = Schemas$5["PipelineSummaryPage"];
15968
+ type CursorPagination = Schemas$5["CursorPagination"];
15222
15969
  //#endregion
15223
- //#region src/datatypes/policy.d.ts
15970
+ //#region src/datatypes/pipeline.d.ts
15224
15971
  type Schemas$4 = components["schemas"];
15225
- type Policy = Schemas$4["Policy"];
15226
- type PolicySummary = Schemas$4["PolicySummary"];
15227
- type PolicySummaryPage = Schemas$4["PolicySummaryPage"];
15228
- type PolicyDefinition = Schemas$4["PolicyDefinition"];
15229
- type PolicyDraft = Schemas$4["PolicyDraft"];
15230
- type CreatePolicy = Schemas$4["CreatePolicy"];
15231
- type UpdatePolicy = Schemas$4["UpdatePolicy"];
15232
- type PolicyRule = Schemas$4["PolicyRule"];
15233
- type PolicyTemplate = Schemas$4["PolicyTemplate"];
15234
- type TemplateOrigin = Schemas$4["TemplateOrigin"];
15235
- type HipaaDeidMethod = Schemas$4["HipaaDeidMethod"];
15236
- type HipaaAccountNumbers = Schemas$4["HipaaAccountNumbers"];
15237
- type GdprArticle9Treatment = Schemas$4["GdprArticle9Treatment"];
15238
- type GdprSensitiveScope = Schemas$4["GdprSensitiveScope"];
15239
- type PciDssPart = Schemas$4["PciDssPart"];
15240
- type PciPanRender = Schemas$4["PciPanRender"];
15241
- type Predicate = Schemas$4["Predicate"];
15242
- type ModalityRedactions = Schemas$4["ModalityRedactions"];
15243
- type TextRedaction = Schemas$4["TextRedaction"];
15244
- type ImageRedaction = Schemas$4["ImageRedaction"];
15245
- type AudioRedaction = Schemas$4["AudioRedaction"];
15246
- type TabularRedaction = Schemas$4["TabularRedaction"];
15247
- type LabelScope = Schemas$4["LabelScope"];
15248
- type LabelEntry = Schemas$4["LabelEntry"];
15249
- type LabelLocale = Schemas$4["LabelLocale"];
15250
- type Label = Schemas$4["Label"];
15251
- type LabelRef = Schemas$4["LabelRef"];
15252
- type LocalizedText = Schemas$4["LocalizedText"];
15253
- type Color = Schemas$4["Color"];
15254
- type Waveform = Schemas$4["Waveform"];
15255
- type ClampBucket = Schemas$4["ClampBucket"];
15256
- type ConfidenceThreshold = Schemas$4["ConfidenceThreshold"];
15257
- type DateStyle = Schemas$4["DateStyle"];
15258
- type DateGranularity = Schemas$4["DateGranularity"];
15259
- type LanguageTag = Schemas$4["LanguageTag"];
15260
- type Sha2Algorithm = Schemas$4["Sha2Algorithm"];
15261
- type TerminalFallback = Schemas$4["TerminalFallback"];
15972
+ type Pipeline = Schemas$4["Pipeline"];
15973
+ type CreatePipeline = Schemas$4["CreatePipeline"];
15974
+ type UpdatePipeline = Schemas$4["UpdatePipeline"];
15975
+ type PipelineDefinition = Schemas$4["PipelineDefinition"];
15976
+ type PipelineFilter = Schemas$4["PipelineFilter"];
15977
+ type PipelineStatus = Schemas$4["PipelineStatus"];
15978
+ type PipelineTriggerType = Schemas$4["PipelineTriggerType"];
15979
+ type PipelineSummary = Schemas$4["PipelineSummary"];
15980
+ type PipelineSummaryPage = Schemas$4["PipelineSummaryPage"];
15262
15981
  //#endregion
15263
- //#region src/datatypes/run.d.ts
15982
+ //#region src/datatypes/policy.d.ts
15264
15983
  type Schemas$3 = components["schemas"];
15265
- type RunId = Schemas$3["RunId"];
15266
- type PipelineRun = Schemas$3["PipelineRun"];
15267
- type RunMetadata = Schemas$3["RunMetadata"];
15268
- type CreatePipelineRun = Schemas$3["CreatePipelineRun"];
15269
- type PipelineRunStatus = Schemas$3["PipelineRunStatus"];
15270
- type PipelineRunPage = Schemas$3["PipelineRunPage"];
15271
- type PipelineRunsQuery = Schemas$3["PipelineRunsQuery"];
15272
- type RunStatusEvent = Schemas$3["RunStatusEvent"];
15273
- type Audit = Schemas$3["Audit"];
15984
+ type Policy = Schemas$3["Policy"];
15985
+ type PolicySummary = Schemas$3["PolicySummary"];
15986
+ type PolicySummaryPage = Schemas$3["PolicySummaryPage"];
15987
+ type PolicyDefinition = Schemas$3["PolicyDefinition"];
15988
+ type PolicyDraft = Schemas$3["PolicyDraft"];
15989
+ type CreatePolicy = Schemas$3["CreatePolicy"];
15990
+ type UpdatePolicy = Schemas$3["UpdatePolicy"];
15991
+ type PolicyRule = Schemas$3["PolicyRule"];
15992
+ type PolicyTemplate = Schemas$3["PolicyTemplate"];
15993
+ type TemplateOrigin = Schemas$3["TemplateOrigin"];
15994
+ type HipaaDeidMethod = Schemas$3["HipaaDeidMethod"];
15995
+ type HipaaAccountNumbers = Schemas$3["HipaaAccountNumbers"];
15996
+ type GdprArticle9Treatment = Schemas$3["GdprArticle9Treatment"];
15997
+ type GdprSensitiveScope = Schemas$3["GdprSensitiveScope"];
15998
+ type PciDssPart = Schemas$3["PciDssPart"];
15999
+ type PciPanRender = Schemas$3["PciPanRender"];
16000
+ type Predicate = Schemas$3["Predicate"];
16001
+ type ModalityRedactions = Schemas$3["ModalityRedactions"];
16002
+ type TextRedaction = Schemas$3["TextRedaction"];
16003
+ type ImageRedaction = Schemas$3["ImageRedaction"];
16004
+ type AudioRedaction = Schemas$3["AudioRedaction"];
16005
+ type TabularRedaction = Schemas$3["TabularRedaction"];
16006
+ type LabelScope = Schemas$3["LabelScope"];
16007
+ type LabelEntry = Schemas$3["LabelEntry"];
16008
+ type LabelLocale = Schemas$3["LabelLocale"];
16009
+ type Label = Schemas$3["Label"];
16010
+ type LabelRef = Schemas$3["LabelRef"];
16011
+ type LocalizedText = Schemas$3["LocalizedText"];
16012
+ type Color = Schemas$3["Color"];
16013
+ type Waveform = Schemas$3["Waveform"];
16014
+ type ClampBucket = Schemas$3["ClampBucket"];
16015
+ type ConfidenceThreshold = Schemas$3["ConfidenceThreshold"];
16016
+ type DateStyle = Schemas$3["DateStyle"];
16017
+ type DateGranularity = Schemas$3["DateGranularity"];
16018
+ type LanguageTag = Schemas$3["LanguageTag"];
16019
+ type Sha2Algorithm = Schemas$3["Sha2Algorithm"];
16020
+ type TerminalFallback = Schemas$3["TerminalFallback"];
15274
16021
  //#endregion
15275
16022
  //#region src/datatypes/scope.d.ts
15276
16023
  type Schemas$2 = components["schemas"];
15277
- type ScopeParams = Schemas$2["ScopeParams"];
15278
16024
  type ScopeMetadata = Schemas$2["ScopeMetadata"];
15279
16025
  type CountryCode = Schemas$2["CountryCode"];
15280
16026
  type Language = Schemas$2["Language"];
@@ -15309,5 +16055,5 @@ type Retention = Schemas["Retention"];
15309
16055
  type RetentionSettings = Schemas["RetentionSettings"];
15310
16056
  type RetentionOverride = Schemas["RetentionOverride"];
15311
16057
  //#endregion
15312
- export { LabelRef as $, ChatSessionPage as $n, TextAuditEvent as $r, GenerateInviteCode as $t, CreatePipelineRun as A, Activity as Ai, ConnectionId as An, ImageData as Ar, CursorPagination as At, Color as B, PipelineActivityParams as Bi, S3Credentials as Bn, Polygon as Br, NotificationSettings as Bt, Language as C, StorageAnalytics as Ci, ExportQuery as Cn, Dimensions as Cr, PipelineDefinition as Ct, ScopeMetadata as D, UsageAnalytics as Di, AzureCredentials as Dn, ImageAuditEvent as Dr, PipelineSummaryPage as Dt, Languages as E, Usage as Ei, AnthropicCredentials as En, EntityGroup as Er, PipelineSummary as Et, RunId as F, ActivityType as Fi, ConnectionsQuery as Fn, LeakProfile as Fr, MemberJoinedParams as Ft, GdprArticle9Treatment as G, Account as Gi, SyncSchedule as Gn, SourceRef as Gr, UnreadStatus as Gt, CreatePolicy as H, PolicyActivityParams as Hi, SyncConnection as Hn, RasterMode as Hr, PipelineRunCompletedParams as Ht, RunMetadata as I, ConnectionActivityParams as Ii, CreateConnection as In, ModelEvent as Ir, Notification as It, HipaaDeidMethod as J, PasswordChange as Ji, SyncTriggerType as Jn, TabularAuditLog as Jr, Member as Jt, GdprSensitiveScope as K, AccountRef as Ki, SyncScheduleInput as Kn, TabularAuditEvent as Kr, UpdateNotificationSettings as Kt, RunStatusEvent as L, FileActivityParams as Li, GcsCredentials as Ln, OperatorId as Lr, NotificationEvent as Lt, PipelineRunPage as M, ActivityListQuery as Mi, ConnectionSync as Mn, ImageEntityRecord as Mr, ConnectionSyncFailedParams as Mt, PipelineRunStatus as N, ActivityPage as Ni, ConnectionSyncPage as Nn, ImageHint as Nr, MarkedReadStatus as Nt, ScopeParams as O, UsageReport as Oi, Connection as On, ImageAuditKind as Or, PipelineTriggerType as Ot, PipelineRunsQuery as P, ActivityPayload as Pi, ConnectionVerification as Pn, ImageLocation as Pr, MemberInvitedParams as Pt, LabelLocale as Q, ChatSession as Qn, TabularLocation as Qr, CreateInvite as Qt, AudioRedaction as R, InviteActivityParams as Ri, LlmConfig as Rn, PatternEvent as Rr, NotificationPage as Rt, CountryCode as S, RunTimeSeries as Si, ExportFormat as Sn, Category as Sr, Pipeline as St, LanguageSpan as T, TokenCounts as Ti, ValidationErrorDetail as Tn, EntityCoRef as Tr, PipelineStatus as Tt, DateGranularity as U, WebhookActivityParams as Ui, SyncDeletionPolicy as Un, Review as Ur, PipelineRunFailedParams as Ut, ConfidenceThreshold as V, PipelineRunActivityParams as Vi, StorageConfig as Vn, RangeOfUint as Vr, PipelineRunAnalyzedParams as Vt, DateStyle as W, WorkspaceActivityParams as Wi, SyncMode as Wn, RuleMatch as Wr, UnreadCountEvent as Wt, Label as X, UpdateAccount as Xi, ChatMessage as Xn, TabularEntityRecord as Xr, MemberSortField as Xt, ImageRedaction as Y, PublicAccount as Yi, UpdateConnection as Yn, TabularEntity as Yr, MemberPage as Yt, LabelEntry as Z, paths as Zi, ChatRole as Zn, TabularHint as Zr, UpdateMember as Zt, WebhookId as _, ProviderType as _i, FormatToken as _n, AudioHint as _r, TerminalFallback as _t, RetentionSettings as a, TextHint as ai, InviteSent as an, RegisteredRecognizer as ar, PciPanRender as at, WebhookStatus as b, RunDayEntry as bi, UpdateFile as bn, AuditHash as br, Waveform as bt, WorkspacePage as c, ApiToken as ci, ListInvites as cn, Signup as cr, PolicyDraft as ct, CreateWebhook as d, ApiTokenWithJWT as di, ComponentHealth as dn, AudioAuditEvent as dr, PolicySummaryPage as dt, TextAuditKind as ei, Invite as en, ChatToken as er, LabelScope as et, TestWebhook as f, CreateApiToken as fi, Health as fn, AudioAuditKind as fr, PolicyTemplate as ft, WebhookEvent as g, ModelUsageEntry as gi, FilePage as gn, AudioEntityRecord as gr, TemplateOrigin as gt, WebhookCreated as h, ModelUsage as hi, FileKind as hn, AudioEntity as hr, TabularRedaction as ht, RetentionOverride as i, TextEntityRecord as ii, InvitePreview as in, RecognizerCatalog as ir, PciDssPart as it, PipelineRun as j, ActivityExportQuery as ji, ConnectionPage as jn, ImageEntity as jr, ConnectionSyncCompletedParams as jt, Audit as k, WorkspaceAnalytics as ki, ConnectionConfig as kn, ImageAuditLog as kr, UpdatePipeline as kt, WorkspaceRole as l, ApiTokenPage as li, ReplyInvite as ln, Attribution as lr, PolicyRule as lt, Webhook as m, UpdateApiToken as mi, File as mn, AudioData as mr, Sha2Algorithm as mt, OcrPolicy as n, TextData as ni, InviteExpiration as nn, SendChatMessage as nr, LocalizedText as nt, UpdateWorkspace as o, TextLocation as oi, InviteSortField as on, AuthToken as or, Policy as ot, UpdateWebhook as p, TokenExpiration as pi, HealthStatus as pn, AudioAuditLog as pr, Predicate as pt, HipaaAccountNumbers as q, Handle as qi, SyncStatus as qn, TabularAuditKind as qr, ListMembers as qt, Retention as r, TextEntity as ri, InvitePage as rn, LabelCatalog as rr, ModalityRedactions as rt, Workspace as s, TimeSpan as si, InviteStatus as sn, Login as sr, PolicyDefinition as st, CreateWorkspace as t, TextAuditLog as ti, InviteCode as tn, CreateChatSession as tr, LanguageTag as tt, WorkspaceSettings as u, ApiTokenType as ui, SortOrder as un, AttributionKind as ur, PolicySummary as ut, WebhookPage as v, RecognizerId as vi, ListFiles as vn, AudioLocation as vr, TextRedaction as vt, LanguageProvenance as w, StorageKindEntry as wi, ErrorResponse as wn, Dpi as wr, PipelineFilter as wt, Confidence as x, RunStatusEntry as xi, DateWindow as xn, BoundingBox as xr, CreatePipeline as xt, WebhookResult as y, RunAnalytics as yi, ModalityToken as yn, AuditContext as yr, UpdatePolicy as yt, ClampBucket as z, MemberActivityParams as zi, OpenAiCredentials as zn, Point as zr, NotificationPayload as zt };
15313
- //# sourceMappingURL=index-0_K3HaXB.d.ts.map
16058
+ export { PolicyRule as $, DetectionAnalytics as $i, ChatMessage as $n, ImageModel as $r, ReplyInvite as $t, Color as A, Account as Aa, TabularRetag as Ai, AzureCredentials as An, Calibration as Ar, NotificationPage as At, Label as B, TextManual as Bi, GcsCredentials as Bn, EditSet as Br, MemberSortField as Bt, Language as C, InviteActivityParams as Ca, TabularEntity as Ci, PipelineDetectionsQuery as Cn, AudioModel as Cr, DetectionCompletedParams as Ct, ScopeMetadata as D, RedactionActivityParams as Da, TabularModel as Di, RedactionResultPage as Dn, Audit as Dr, MemberJoinedParams as Dt, Languages as E, PolicyActivityParams as Ea, TabularManual as Ei, RedactionResult as En, AudioRetag as Er, MemberInvitedParams as Et, GdprArticle9Treatment as F, UpdateAccount as Fa, TextData as Fi, ConnectionSync as Fn, Contested as Fr, UnreadStatus as Ft, LanguageTag as G, TimeSpan as Gi, SyncConnection as Gn, ImageAuditKind as Gr, InviteCode as Gt, LabelLocale as H, TextPattern as Hi, OpenAiCredentials as Hn, FreeformAttribution as Hr, CreateInvite as Ht, GdprSensitiveScope as I, paths as Ia, TextEdit as Ii, ConnectionSyncPage as In, Deduplication as Ir, UpdateNotificationSettings as It, PciDssPart as J, ApiTokenType as Ji, SyncSchedule as Jn, ImageEdit as Jr, InvitePreview as Jt, LocalizedText as K, ApiToken as Ki, SyncDeletionPolicy as Kn, ImageAuditLog as Kr, InviteExpiration as Kt, HipaaAccountNumbers as L, TextEntity as Li, ConnectionVerification as Ln, Dimensions as Lr, ListMembers as Lt, CreatePolicy as M, Handle as Ma, TextAuditEvent as Mi, ConnectionConfig as Mn, CitedAttribution as Mr, NotificationSettings as Mt, DateGranularity as N, PasswordChange as Na, TextAuditKind as Ni, ConnectionId as Nn, CodecParams as Nr, RedactionCreatedParams as Nt, AudioRedaction as O, WebhookActivityParams as Oa, TabularPattern as Oi, WorkspaceDetectionsQuery as On, AuditHash as Or, Notification as Ot, DateStyle as P, PublicAccount as Pa, TextAuditLog as Pi, ConnectionPage as Pn, Conflict as Pr, UnreadCountEvent as Pt, PolicyDraft as Q, UpdateApiToken as Qi, UpdateConnection as Qn, ImageManual as Qr, ListInvites as Qt, HipaaDeidMethod as R, TextHint as Ri, ConnectionsQuery as Rn, DocumentContext as Rr, Member as Rt, CountryCode as S, FileActivityParams as Sa, TabularEdit as Si, DetectionStatusEvent as Sn, AudioManual as Sr, ConnectionSyncFailedParams as St, LanguageSpan as T, PipelineActivityParams as Ta, TabularLocation as Ti, RedactionId as Tn, AudioRefinement as Tr, MarkedReadStatus as Tt, LabelRef as U, TextRefinement as Ui, S3Credentials as Un, ImageAdd as Ur, GenerateInviteCode as Ut, LabelEntry as V, TextModel as Vi, LlmConfig as Vn, EntityCoRef as Vr, UpdateMember as Vt, LabelScope as W, TextRetag as Wi, StorageConfig as Wn, ImageAuditEvent as Wr, Invite as Wt, Policy as X, CreateApiToken as Xi, SyncStatus as Xn, ImageHint as Xr, InviteSortField as Xt, PciPanRender as Y, ApiTokenWithJWT as Yi, SyncScheduleInput as Yn, ImageEntity as Yr, InviteSent as Yt, PolicyDefinition as Z, TokenExpiration as Zi, SyncTriggerType as Zn, ImageLocation as Zr, InviteStatus as Zt, WebhookId as _, ActivityPage as _a, Suppress as _i, Detection as _n, AudioData as _r, PipelineSummaryPage as _t, RetentionSettings as a, ProviderType as aa, ModelEvent as ai, FileKind as an, SendChatMessage as ar, TabularRedaction as at, WebhookStatus as b, ConnectionActivityParams as ba, TabularAuditKind as bi, DetectionPage as bn, AudioHint as br, CursorPagination as bt, WorkspacePage as c, StorageKindEntry as ca, Point as ci, ListFiles as cn, RegisteredRecognizer as cr, TextRedaction as ct, CreateWebhook as d, UsageAnalytics as da, RasterMode as di, DateWindow as dn, Signup as dr, CreatePipeline as dt, DetectionDayEntry as ea, ImagePattern as ei, SortOrder as en, ChatRole as er, PolicySummary as et, TestWebhook as f, UsageReport as fa, Redaction as fi, ExportFormat as fn, Attribution as fr, Pipeline as ft, WebhookEvent as g, ActivityFilterQuery as ga, SourceRef as gi, CreateDetection as gn, AudioAuditLog as gr, PipelineSummary as gt, WebhookCreated as h, ActivityExportOptions as ha, Selection as hi, ValidationErrorDetail as hn, AudioAuditKind as hr, PipelineStatus as ht, RetentionOverride as i, ModelUsageEntry as ia, ManualIntent as ii, File as in, CreateChatSession as ir, Sha2Algorithm as it, ConfidenceThreshold as j, AccountRef as ja, TextAdd as ji, Connection as jn, Category as jr, NotificationPayload as jt, ClampBucket as k, WorkspaceActivityParams as ka, TabularRefinement as ki, AnthropicCredentials as kn, BoundingBox as kr, NotificationEvent as kt, WorkspaceRole as l, TokenCounts as la, Polygon as li, ModalityToken as ln, AuthToken as lr, UpdatePolicy as lt, Webhook as m, Activity as ma, RuleMatch as mi, ErrorResponse as mn, AudioAuditEvent as mr, PipelineFilter as mt, OcrPolicy as n, DetectionTimeSeries as na, ImageRetag as ni, Health as nn, ChatSessionPage as nr, PolicyTemplate as nt, UpdateWorkspace as o, RecognizerId as oa, OperatorId as oi, FilePage as on, LabelCatalog as or, TemplateOrigin as ot, UpdateWebhook as p, WorkspaceAnalytics as pa, Report as pi, ExportQuery as pn, AudioAdd as pr, PipelineDefinition as pt, ModalityRedactions as q, ApiTokenPage as qi, SyncMode as qn, ImageData as qr, InvitePage as qt, Retention as r, ModelUsage as ra, LeakProfile as ri, HealthStatus as rn, ChatToken as rr, Predicate as rt, Workspace as s, StorageAnalytics as sa, PatternEvent as si, FormatToken as sn, RecognizerCatalog as sr, TerminalFallback as st, CreateWorkspace as t, DetectionStatusEntry as ta, ImageRefinement as ti, ComponentHealth as tn, ChatSession as tr, PolicySummaryPage as tt, WorkspaceSettings as u, Usage as ua, RangeOfUint as ui, UpdateFile as un, Login as ur, Waveform as ut, WebhookPage as v, ActivityPayload as va, TabularAdd as vi, DetectionId as vn, AudioEdit as vr, PipelineTriggerType as vt, LanguageProvenance as w, MemberActivityParams as wa, TabularHint as wi, RedactDetection as wn, AudioPattern as wr, DetectionFailedParams as wt, Confidence as x, DetectionActivityParams as xa, TabularAuditLog as xi, DetectionStatus as xn, AudioLocation as xr, ConnectionSyncCompletedParams as xt, WebhookResult as y, ActivityType as ya, TabularAuditEvent as yi, DetectionMetadata as yn, AudioEntity as yr, UpdatePipeline as yt, ImageRedaction as z, TextLocation as zi, CreateConnection as zn, Dpi as zr, MemberPage as zt };
16059
+ //# sourceMappingURL=index-BPKkfko3.d.ts.map