@truepic/vision-api-types 3.84.0 → 3.85.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.
Files changed (2) hide show
  1. package/index.d.ts +16 -8
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -3155,13 +3155,19 @@ export interface components {
3155
3155
  input_fingerprint: string | null;
3156
3156
  /** @description FK to ai_inspection_item_results.id. */
3157
3157
  inspection_item_id: number;
3158
+ /** @description VISION-2692: true when this `found` result selected the field's configured "not present / can't determine" option, so it reports ABSENCE rather than a detection. Read-time consumers (disposition, status rollup, alert count, conflict detection, PDF) use this instead of trying to recognise absence from the value text. Always false on `not_captured` / `conflict` rows and on rows predating the flag. */
3159
+ not_captured_option_selected: boolean;
3158
3160
  override_at: string | null;
3159
3161
  /** @description FK to users.id; set when a user overrides the disposition (Sprint 2). */
3160
3162
  override_user_id: number | null;
3161
3163
  reasoning: string | null;
3162
3164
  /** @description Evidence sources for this extraction. Empty when status !== 'found'. */
3163
3165
  sources: components["schemas"]["Source"][];
3164
- /** @description Per-field extraction status ( {@link FieldStatus } ). The DB column is a free-form string so future values (skipped, error, partial, low_confidence) need no migration; adding one means widening {@link FieldStatus } and the model-layer Joi `.valid(...)` together. */
3166
+ /**
3167
+ * @description Per-field extraction status ( {@link FieldStatus } ). The DB column is a free-form string so future values (skipped, error, partial) need no migration; adding one means widening {@link FieldStatus } and the model-layer Joi `.valid(...)` together.
3168
+ *
3169
+ * Model uncertainty is deliberately not one of them. A status is a terminal verdict occupying the same slot as `not_captured`, and would carry no value, sources or confidence; the product needs the opposite — a field that keeps its answer and is flagged alongside it, so it can read as low confidence and still pass. That is the serialized `is_low_confidence` flag (VISION-2911), derived from `confidence` at read time.
3170
+ */
3165
3171
  status: components["schemas"]["FieldStatus"];
3166
3172
  /**
3167
3173
  * Format: date-time
@@ -3315,6 +3321,12 @@ export interface components {
3315
3321
  disposition: "pass" | "warn";
3316
3322
  field_id: number;
3317
3323
  field_name: string;
3324
+ /**
3325
+ * @description True when a `found` field's `confidence` is below the configured threshold. Never true for a row whose value is the field's own configured "not present" option: that reports absence, so its confidence describes a selection rather than an answer.
3326
+ *
3327
+ * Independent of `disposition`, which reports only whether the answer is wrong or missing and never warns for low confidence alone — so `disposition: 'pass'` with `is_low_confidence: true` means "the answer looks fine but the model was unsure", and the inspection's `ai_status` and alert still flag it for review. A field can be both.
3328
+ */
3329
+ is_low_confidence: boolean;
3318
3330
  reasoning: string | null;
3319
3331
  sources: components["schemas"]["Source"][];
3320
3332
  status: components["schemas"]["FieldStatus"];
@@ -6995,12 +7007,6 @@ export interface components {
6995
7007
  * @example true
6996
7008
  */
6997
7009
  test_insecure_device: boolean;
6998
- /**
6999
- * @description Whether or not to surface an Inspection Readiness fail/warn as an alert. Opt-in: defaults to false so an org's alerting behavior does not change until it explicitly enables Inspection Readiness alerting.
7000
- * @default false
7001
- * @example false
7002
- */
7003
- test_inspection_readiness: boolean;
7004
7010
  /**
7005
7011
  * @description Whether or not to include the object detection test in this alert.
7006
7012
  * @default true
@@ -8740,7 +8746,7 @@ export interface components {
8740
8746
  updated_by_user_id: number | null;
8741
8747
  };
8742
8748
  /** @enum {string} */
8743
- OrganizationEnabledFeatureType: "ai_analysis" | "ask_for_app_review" | "inspection_device_insights" | "device_details" | "risk_network" | "external_risk_network" | "content_analysis_odometer" | "content_analysis_text_matching" | "content_analysis_vin" | "content_analysis_dot_tin" | "object_detection_auto" | "object_detection_jewelry" | "object_detection_real_estate" | "landing_pages" | "inspection_readiness" | "dashboard_user_feedback_forms" | "member_homepage" | "reuse_detection" | "restrict_members_to_inspection_details" | "ai_analysis_configuration" | "guided_capture" | "verisk_sso";
8749
+ OrganizationEnabledFeatureType: "ai_analysis" | "ask_for_app_review" | "inspection_device_insights" | "device_details" | "risk_network" | "external_risk_network" | "content_analysis_odometer" | "content_analysis_text_matching" | "content_analysis_vin" | "content_analysis_dot_tin" | "object_detection_auto" | "object_detection_jewelry" | "object_detection_real_estate" | "landing_pages" | "dashboard_user_feedback_forms" | "member_homepage" | "reuse_detection" | "restrict_members_to_inspection_details" | "ai_analysis_configuration" | "guided_capture" | "verisk_sso";
8744
8750
  /** @description A possible outcome for an inspection */
8745
8751
  Outcome: {
8746
8752
  /**
@@ -9933,6 +9939,8 @@ export interface components {
9933
9939
  ai_inspection_items_pipeline_id: number | null;
9934
9940
  ai_inspection_ready_result?: components["schemas"]["AIInspectionReadyResult"] | unknown;
9935
9941
  ai_item_type_instances?: components["schemas"]["PopulatedAIItemTypeInstance"][];
9942
+ /** @description Low-confidence threshold resolved from `global_configs` by `inspection-ai-items-populator`, carried here because the serializers that apply it are synchronous. Present whenever `ai_item_type_instances` is. */
9943
+ ai_low_confidence_threshold?: number;
9936
9944
  /**
9937
9945
  * @description The AI analysis result for this inspection.
9938
9946
  * @example pass
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truepic/vision-api-types",
3
- "version": "3.84.0",
3
+ "version": "3.85.0",
4
4
  "description": "TypeScript type declarations for Truepic Vision API v3",
5
5
  "license": "MIT",
6
6
  "types": "index.d.ts",