@truepic/vision-api-types 3.76.0 → 3.81.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 (4) hide show
  1. package/README.md +10 -44
  2. package/index.d.ts +1450 -298
  3. package/package.json +3 -10
  4. package/LICENSE +0 -20
package/index.d.ts CHANGED
@@ -1832,6 +1832,60 @@ export interface paths {
1832
1832
  patch?: never;
1833
1833
  trace?: never;
1834
1834
  };
1835
+ "/ready": {
1836
+ parameters: {
1837
+ query?: never;
1838
+ header?: never;
1839
+ path?: never;
1840
+ cookie?: never;
1841
+ };
1842
+ /**
1843
+ * Readiness probe
1844
+ * @description Returns 200 when the API is ready to serve traffic (DB reachable), 503 otherwise. Intended for K8s readinessProbe.
1845
+ */
1846
+ get: {
1847
+ parameters: {
1848
+ query?: never;
1849
+ header?: never;
1850
+ path?: never;
1851
+ cookie?: never;
1852
+ };
1853
+ requestBody?: never;
1854
+ responses: {
1855
+ /** @description Ready */
1856
+ 200: {
1857
+ headers: {
1858
+ [name: string]: unknown;
1859
+ };
1860
+ content: {
1861
+ "application/json": components["schemas"]["ResponseData"];
1862
+ };
1863
+ };
1864
+ 400: components["responses"]["ErrorBadRequest"];
1865
+ 401: components["responses"]["ErrorUnauthorized"];
1866
+ 403: components["responses"]["ErrorForbidden"];
1867
+ 404: components["responses"]["ErrorNotFound"];
1868
+ 412: components["responses"]["ErrorPreconditionFailed"];
1869
+ 500: components["responses"]["ErrorUnhandled"];
1870
+ /** @description Not ready */
1871
+ 503: {
1872
+ headers: {
1873
+ [name: string]: unknown;
1874
+ };
1875
+ content: {
1876
+ "application/json": components["schemas"]["ResponseData"];
1877
+ };
1878
+ };
1879
+ };
1880
+ };
1881
+ put?: never;
1882
+ post?: never;
1883
+ delete?: never;
1884
+ options?: never;
1885
+ head?: never;
1886
+ patch?: never;
1887
+ trace?: never;
1888
+ };
1835
1889
  "/inspection-types": {
1836
1890
  parameters: {
1837
1891
  query?: never;
@@ -2016,7 +2070,7 @@ export interface paths {
2016
2070
  };
2017
2071
  requestBody: {
2018
2072
  content: {
2019
- "application/json": Record<string, never>;
2073
+ "application/json": components["schemas"]["UpdateInspectionTypeBody"];
2020
2074
  };
2021
2075
  };
2022
2076
  responses: {
@@ -2026,7 +2080,7 @@ export interface paths {
2026
2080
  [name: string]: unknown;
2027
2081
  };
2028
2082
  content: {
2029
- "application/json": components["schemas"]["CreateInspectionTypeBody"];
2083
+ "application/json": components["schemas"]["ResponseData"];
2030
2084
  };
2031
2085
  };
2032
2086
  400: components["responses"]["ErrorBadRequest"];
@@ -2690,50 +2744,270 @@ export interface paths {
2690
2744
  patch?: never;
2691
2745
  trace?: never;
2692
2746
  };
2747
+ "/ai-item-types": {
2748
+ parameters: {
2749
+ query?: never;
2750
+ header?: never;
2751
+ path?: never;
2752
+ cookie?: never;
2753
+ };
2754
+ /** List AI Item Types for the organization */
2755
+ get: {
2756
+ parameters: {
2757
+ query?: {
2758
+ inspection_type_id?: number;
2759
+ };
2760
+ header?: never;
2761
+ path?: never;
2762
+ cookie?: never;
2763
+ };
2764
+ requestBody?: never;
2765
+ responses: {
2766
+ /** @description Success */
2767
+ 200: {
2768
+ headers: {
2769
+ [name: string]: unknown;
2770
+ };
2771
+ content?: never;
2772
+ };
2773
+ 400: components["responses"]["ErrorBadRequest"];
2774
+ 401: components["responses"]["ErrorUnauthorized"];
2775
+ 403: components["responses"]["ErrorForbidden"];
2776
+ 404: components["responses"]["ErrorNotFound"];
2777
+ 412: components["responses"]["ErrorPreconditionFailed"];
2778
+ 500: components["responses"]["ErrorUnhandled"];
2779
+ };
2780
+ };
2781
+ put?: never;
2782
+ /** Create an AI Item Type for the organization */
2783
+ post: {
2784
+ parameters: {
2785
+ query?: never;
2786
+ header?: never;
2787
+ path?: never;
2788
+ cookie?: never;
2789
+ };
2790
+ requestBody?: never;
2791
+ responses: {
2792
+ /** @description Created */
2793
+ 201: {
2794
+ headers: {
2795
+ [name: string]: unknown;
2796
+ };
2797
+ content?: never;
2798
+ };
2799
+ /** @description Validation error */
2800
+ 400: {
2801
+ headers: {
2802
+ [name: string]: unknown;
2803
+ };
2804
+ content?: never;
2805
+ };
2806
+ 401: components["responses"]["ErrorUnauthorized"];
2807
+ 403: components["responses"]["ErrorForbidden"];
2808
+ /** @description Inspection Type not in organization */
2809
+ 404: {
2810
+ headers: {
2811
+ [name: string]: unknown;
2812
+ };
2813
+ content?: never;
2814
+ };
2815
+ 412: components["responses"]["ErrorPreconditionFailed"];
2816
+ 500: components["responses"]["ErrorUnhandled"];
2817
+ };
2818
+ };
2819
+ delete?: never;
2820
+ options?: never;
2821
+ head?: never;
2822
+ patch?: never;
2823
+ trace?: never;
2824
+ };
2825
+ "/ai-item-types/{itemTypeId}": {
2826
+ parameters: {
2827
+ query?: never;
2828
+ header?: never;
2829
+ path?: never;
2830
+ cookie?: never;
2831
+ };
2832
+ get?: never;
2833
+ /** Replace an AI Item Type (replace-by-tree) */
2834
+ put: {
2835
+ parameters: {
2836
+ query?: never;
2837
+ header?: never;
2838
+ path: {
2839
+ itemTypeId: number;
2840
+ };
2841
+ cookie?: never;
2842
+ };
2843
+ requestBody?: never;
2844
+ responses: {
2845
+ /** @description Success */
2846
+ 200: {
2847
+ headers: {
2848
+ [name: string]: unknown;
2849
+ };
2850
+ content?: never;
2851
+ };
2852
+ /** @description Validation error */
2853
+ 400: {
2854
+ headers: {
2855
+ [name: string]: unknown;
2856
+ };
2857
+ content?: never;
2858
+ };
2859
+ 401: components["responses"]["ErrorUnauthorized"];
2860
+ 403: components["responses"]["ErrorForbidden"];
2861
+ /** @description Not found */
2862
+ 404: {
2863
+ headers: {
2864
+ [name: string]: unknown;
2865
+ };
2866
+ content?: never;
2867
+ };
2868
+ 412: components["responses"]["ErrorPreconditionFailed"];
2869
+ 500: components["responses"]["ErrorUnhandled"];
2870
+ };
2871
+ };
2872
+ post?: never;
2873
+ /** Delete an AI Item Type */
2874
+ delete: {
2875
+ parameters: {
2876
+ query?: never;
2877
+ header?: never;
2878
+ path: {
2879
+ itemTypeId: number;
2880
+ };
2881
+ cookie?: never;
2882
+ };
2883
+ requestBody?: never;
2884
+ responses: {
2885
+ /** @description No Content */
2886
+ 204: {
2887
+ headers: {
2888
+ [name: string]: unknown;
2889
+ };
2890
+ content?: never;
2891
+ };
2892
+ 400: components["responses"]["ErrorBadRequest"];
2893
+ 401: components["responses"]["ErrorUnauthorized"];
2894
+ 403: components["responses"]["ErrorForbidden"];
2895
+ /** @description Not found */
2896
+ 404: {
2897
+ headers: {
2898
+ [name: string]: unknown;
2899
+ };
2900
+ content?: never;
2901
+ };
2902
+ /** @description Still linked to inspection types */
2903
+ 409: {
2904
+ headers: {
2905
+ [name: string]: unknown;
2906
+ };
2907
+ content?: never;
2908
+ };
2909
+ 412: components["responses"]["ErrorPreconditionFailed"];
2910
+ 500: components["responses"]["ErrorUnhandled"];
2911
+ };
2912
+ };
2913
+ options?: never;
2914
+ head?: never;
2915
+ patch?: never;
2916
+ trace?: never;
2917
+ };
2918
+ "/ai-item-types/{itemTypeId}/inspection-types/{inspectionTypeId}": {
2919
+ parameters: {
2920
+ query?: never;
2921
+ header?: never;
2922
+ path?: never;
2923
+ cookie?: never;
2924
+ };
2925
+ get?: never;
2926
+ put?: never;
2927
+ /** Link an AI Item Type to an Inspection Type */
2928
+ post: {
2929
+ parameters: {
2930
+ query?: never;
2931
+ header?: never;
2932
+ path: {
2933
+ itemTypeId: number;
2934
+ inspectionTypeId: number;
2935
+ };
2936
+ cookie?: never;
2937
+ };
2938
+ requestBody?: never;
2939
+ responses: {
2940
+ /** @description Linked (idempotent) */
2941
+ 204: {
2942
+ headers: {
2943
+ [name: string]: unknown;
2944
+ };
2945
+ content?: never;
2946
+ };
2947
+ 400: components["responses"]["ErrorBadRequest"];
2948
+ 401: components["responses"]["ErrorUnauthorized"];
2949
+ 403: components["responses"]["ErrorForbidden"];
2950
+ /** @description Not found */
2951
+ 404: {
2952
+ headers: {
2953
+ [name: string]: unknown;
2954
+ };
2955
+ content?: never;
2956
+ };
2957
+ 412: components["responses"]["ErrorPreconditionFailed"];
2958
+ 500: components["responses"]["ErrorUnhandled"];
2959
+ };
2960
+ };
2961
+ /** Unlink an AI Item Type from an Inspection Type (auto-deletes the item type if no links remain in V1) */
2962
+ delete: {
2963
+ parameters: {
2964
+ query?: never;
2965
+ header?: never;
2966
+ path: {
2967
+ itemTypeId: number;
2968
+ inspectionTypeId: number;
2969
+ };
2970
+ cookie?: never;
2971
+ };
2972
+ requestBody?: never;
2973
+ responses: {
2974
+ /** @description Unlinked (idempotent) */
2975
+ 204: {
2976
+ headers: {
2977
+ [name: string]: unknown;
2978
+ };
2979
+ content?: never;
2980
+ };
2981
+ 400: components["responses"]["ErrorBadRequest"];
2982
+ 401: components["responses"]["ErrorUnauthorized"];
2983
+ 403: components["responses"]["ErrorForbidden"];
2984
+ /** @description Not found */
2985
+ 404: {
2986
+ headers: {
2987
+ [name: string]: unknown;
2988
+ };
2989
+ content?: never;
2990
+ };
2991
+ 412: components["responses"]["ErrorPreconditionFailed"];
2992
+ 500: components["responses"]["ErrorUnhandled"];
2993
+ };
2994
+ };
2995
+ options?: never;
2996
+ head?: never;
2997
+ patch?: never;
2998
+ trace?: never;
2999
+ };
2693
3000
  }
2694
3001
  export type webhooks = Record<string, never>;
2695
3002
  export interface components {
2696
3003
  schemas: {
2697
- AIAnalysisSetPayload: {
2698
- /**
2699
- * Format: date-time
2700
- * @description The date/time the resource was created
2701
- * @example 2020-05-01T21:44:40.000Z
2702
- */
2703
- created_at: string;
2704
- /**
2705
- * @description The id of the user that created this AI Analysis Set.
2706
- * @example 894
2707
- */
2708
- created_by_user_id: number;
2709
- /**
2710
- * @description The id of the resource.
2711
- * @example 1843
2712
- */
2713
- id: number;
2714
- is_deleted: unknown;
2715
- /**
2716
- * @description The id of the user that last edited this AI Analysis Set.
2717
- * @example 542
2718
- */
2719
- modified_by_user_id?: number;
2720
- /**
2721
- * @description The name of the AI Analysis Set
2722
- * @example AI Analysis Set Name
2723
- */
2724
- name: string;
2725
- /**
2726
- * @description The id of the organization that owns this AI Analysis Set
2727
- * @example 532
2728
- */
2729
- organization_id: number;
2730
- questions: string[];
2731
- /**
2732
- * Format: date-time
2733
- * @description The date/time the resource was last updated
2734
- * @example 2020-05-01T21:44:40.000Z
2735
- */
2736
- updated_at: string;
3004
+ AIAnalysisStatus: {
3005
+ completed_event_count?: number;
3006
+ /** @description Number of non-deleted truepics actually evaluated by the latest completed AI Analysis run, after the AI capture cap (VISION-2118). Equals the total non-deleted count when under the cap; the cap value when over. Present only when the inspection has at least one completed extraction event — drives the summary's "N images analyzed" clause so the user sees the actually-evaluated number rather than the total non-deleted count. */
3007
+ evaluated_truepic_count?: number;
3008
+ last_completed_at: string | null;
3009
+ /** @enum {string} */
3010
+ state: "idle" | "waiting" | "running" | "completed" | "failed";
2737
3011
  };
2738
3012
  AIInspectionCriteriaEvaluationModelResultV1: {
2739
3013
  cachedTokens: number;
@@ -2745,7 +3019,7 @@ export interface components {
2745
3019
  overview: components["schemas"]["SubmitOverviewToolCallParams"] | unknown;
2746
3020
  qaDetails: components["schemas"]["SubmitQADetailsToolCallParams"][];
2747
3021
  queryTimeMs: number;
2748
- totalCostUSD: number;
3022
+ totalCostUSD: number | null;
2749
3023
  };
2750
3024
  AIInspectionCriteriaEvaluationResultV1: {
2751
3025
  cachedTokens: number;
@@ -2757,7 +3031,118 @@ export interface components {
2757
3031
  overview: components["schemas"]["SubmitOverviewToolCallParams"] | unknown;
2758
3032
  qaDetails: components["schemas"]["SubmitQADetailsToolCallParams"][];
2759
3033
  queryTimeMs: number;
2760
- totalCostUSD: number;
3034
+ totalCostUSD: number | null;
3035
+ };
3036
+ AIInspectionFeedback: {
3037
+ created_at: string;
3038
+ created_by_member_user_id: number;
3039
+ feedback: components["schemas"]["AIInspectionFeedbackSections"];
3040
+ id: number;
3041
+ inspection_id: number;
3042
+ };
3043
+ /** @enum {string} */
3044
+ AIInspectionFeedbackDecision: "accept" | "reject";
3045
+ AIInspectionFeedbackItem: {
3046
+ comment: string | null;
3047
+ decision: components["schemas"]["AIInspectionFeedbackDecision"];
3048
+ list_item_id: number;
3049
+ };
3050
+ AIInspectionFeedbackOverall: {
3051
+ comment: string | null;
3052
+ decision: components["schemas"]["AIInspectionFeedbackDecision"] | unknown;
3053
+ reason?: string | null;
3054
+ };
3055
+ /** @description The three feedback surfaces, each optional. A row carries whichever sections the user has submitted feedback for. */
3056
+ AIInspectionFeedbackSections: {
3057
+ additional_details?: components["schemas"]["AIInspectionSubjectScopedFeedbackSection"];
3058
+ inspection_ready?: components["schemas"]["AIInspectionReadyFeedbackSection"];
3059
+ item_information?: components["schemas"]["AIInspectionSubjectScopedFeedbackSection"];
3060
+ };
3061
+ /** @description One per-Subject verdict row for the `item_information` and `additional_details` surfaces, keyed by the detected `ai_items[].id`. */
3062
+ AIInspectionFeedbackSubjectItem: {
3063
+ comment: string | null;
3064
+ decision: components["schemas"]["AIInspectionFeedbackDecision"];
3065
+ item_id: number;
3066
+ reason?: string | null;
3067
+ };
3068
+ AIInspectionItemAdditionalDetailsResult: {
3069
+ /** @description Per-model call audit data for the Additional Details extraction step. */
3070
+ audit_json: components["schemas"]["AuditEntry"][];
3071
+ /** @description AI observations responding to the configured considerations text. */
3072
+ considerations_observations: components["schemas"]["ConsiderationsObservationEntry"][];
3073
+ /** @description Self-referential reuse provenance (VISION-2080): the prior `ai_inspection_item_additional_details_results.id` this row was cloned from. Null on freshly-computed rows. ON DELETE SET NULL — deleting the source row leaves this as a tombstone. */
3074
+ copied_from_additional_details_result_id: number | null;
3075
+ /**
3076
+ * Format: date-time
3077
+ * @description The date/time the resource was created
3078
+ * @example 2020-05-01T21:44:40.000Z
3079
+ */
3080
+ created_at: string;
3081
+ id: number;
3082
+ /** @description Row-level hex SHA-256 over the canonical projection of the additional_details inputs for every eligible item in this event (VISION-2080). The table stores one row per event with every item's findings merged, so the fingerprint covers the whole row's inputs — any single item's change invalidates the whole row. Drives the prior-result reuse fast path. Null on rows that predate the feature. */
3083
+ input_fingerprint: string | null;
3084
+ inspection_id: number;
3085
+ /** @description Configured items-to-look-for that were found, plus adjacent discoveries. lookfor_id is a UUID referencing the item type's additional_details_lookfor array; null for adjacent-discovery items. */
3086
+ items_found: components["schemas"]["ItemsFoundEntry"][];
3087
+ /** @description FK to ai_extraction_events.id — the run that produced this row. */
3088
+ triggering_event_id?: number;
3089
+ /**
3090
+ * Format: date-time
3091
+ * @description The date/time the resource was last updated
3092
+ * @example 2020-05-01T21:44:40.000Z
3093
+ */
3094
+ updated_at: string;
3095
+ };
3096
+ AIInspectionItemFieldResult: {
3097
+ /**
3098
+ * @description AI-derived disposition.
3099
+ * @enum {string|null}
3100
+ */
3101
+ ai_disposition: "pass" | "warn" | null;
3102
+ /** @description Per-model call audit data for this field extraction step, plus (when a rerun drift was suppressed) the suppressed verdict — VISION-2126. */
3103
+ audit_json: components["schemas"]["FieldResultAuditEntry"][];
3104
+ /** @description Cross-extraction conflict candidates. Present and non-empty only when status='conflict'. Not deduplicated — vote distribution is preserved. */
3105
+ candidate_values: components["schemas"]["CandidateValue"][];
3106
+ /** @description 0..1 consensus confidence; null when status !== 'found'. */
3107
+ confidence: number | null;
3108
+ /** @description Self-referential reuse provenance (VISION-2080): the prior `ai_inspection_item_field_results.id` this row was cloned from. Null on freshly-computed rows. ON DELETE SET NULL — deleting the source row leaves this as a tombstone. */
3109
+ copied_from_field_result_id: number | null;
3110
+ /**
3111
+ * Format: date-time
3112
+ * @description The date/time the resource was created
3113
+ * @example 2020-05-01T21:44:40.000Z
3114
+ */
3115
+ created_at: string;
3116
+ /**
3117
+ * @description Override disposition (Sprint 2).
3118
+ * @enum {string|null}
3119
+ */
3120
+ current_disposition: "pass" | "warn" | null;
3121
+ /** @description Models that disagreed with the consensus within this extraction run. */
3122
+ dissenters: components["schemas"]["Dissenter"][];
3123
+ /** @description FK to ai_item_type_fields.id (INSTANCE row); ON DELETE RESTRICT. */
3124
+ field_id: number;
3125
+ id: number;
3126
+ /** @description Hex SHA-256 over the canonical projection of every input the item_information prompt fed the model for this (item, field) call (VISION-2080). On rerun, the executor recomputes this and compares against the prior row's fingerprint; on match it skips the AI call entirely and copies the prior row's value verbatim. Null on rows that predate the feature. */
3127
+ input_fingerprint: string | null;
3128
+ /** @description FK to ai_inspection_item_results.id. */
3129
+ inspection_item_id: number;
3130
+ override_at: string | null;
3131
+ /** @description FK to users.id; set when a user overrides the disposition (Sprint 2). */
3132
+ override_user_id: number | null;
3133
+ reasoning: string | null;
3134
+ /** @description Evidence sources for this extraction. Empty when status !== 'found'. */
3135
+ sources: components["schemas"]["Source"][];
3136
+ /** @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. */
3137
+ status: components["schemas"]["FieldStatus"];
3138
+ /**
3139
+ * Format: date-time
3140
+ * @description The date/time the resource was last updated
3141
+ * @example 2020-05-01T21:44:40.000Z
3142
+ */
3143
+ updated_at: string;
3144
+ /** @description Polymorphic: string for open_answer / single-select; string[] for multi-select; null when status !== 'found'. */
3145
+ value: string | string[] | unknown;
2761
3146
  };
2762
3147
  AIInspectionReadyCriteriaResultV1: {
2763
3148
  cachedTokens: number;
@@ -2766,7 +3151,7 @@ export interface components {
2766
3151
  inputTokens: number;
2767
3152
  outputTokens: number;
2768
3153
  queryTimeMs: number;
2769
- totalCostUSD: number;
3154
+ totalCostUSD: number | null;
2770
3155
  };
2771
3156
  AIInspectionReadyCriteriaResultV2: {
2772
3157
  cachedTokens: number;
@@ -2775,7 +3160,12 @@ export interface components {
2775
3160
  inputTokens: number;
2776
3161
  outputTokens: number;
2777
3162
  queryTimeMs: number;
2778
- totalCostUSD: number;
3163
+ totalCostUSD: number | null;
3164
+ };
3165
+ /** @description Content Summary / Inspection Readiness — overall verdict plus per-item feedback. */
3166
+ AIInspectionReadyFeedbackSection: {
3167
+ items: components["schemas"]["AIInspectionFeedbackItem"][];
3168
+ overall: components["schemas"]["AIInspectionFeedbackOverall"];
2779
3169
  };
2780
3170
  AIInspectionReadyResult: {
2781
3171
  client_override_date?: string | null;
@@ -2798,8 +3188,139 @@ export interface components {
2798
3188
  criteriaEvaluation: components["schemas"]["AIInspectionCriteriaEvaluationResultV1"][] | unknown;
2799
3189
  schema_version: number;
2800
3190
  };
3191
+ /** @description AI Item Information & Additional Details — per-Subject verdicts. Both surfaces render once per detected Subject, so feedback is scoped to each `ai_items[].id` rather than a single overall verdict. */
3192
+ AIInspectionSubjectScopedFeedbackSection: {
3193
+ items: components["schemas"]["AIInspectionFeedbackSubjectItem"][];
3194
+ };
3195
+ AIItemType: {
3196
+ additional_details_considerations: string | null;
3197
+ /** @description Items-to-look-for for Additional Details. Each entry carries a UUID stable across template→instance copies; items_found[*].lookfor_id references it. */
3198
+ additional_details_lookfor: components["schemas"]["AIItemTypeLookforEntry"][];
3199
+ /**
3200
+ * Format: date-time
3201
+ * @description The date/time the resource was created
3202
+ * @example 2020-05-01T21:44:40.000Z
3203
+ */
3204
+ created_at: string;
3205
+ id: number;
3206
+ /** @description Set for INSTANCE rows; null for TEMPLATE rows. Template rows are associated with inspection types via the ai_item_type_inspection_types junction table. */
3207
+ inspection_id: number | null;
3208
+ name: string;
3209
+ organization_id: number;
3210
+ /** @description Informational pointer to the TEMPLATE row this INSTANCE was deep-copied from. Not a FK — survives template deletion intentionally. */
3211
+ source_item_type_id: number | null;
3212
+ /**
3213
+ * @description Discriminates template rows (owned by an inspection type) from instance rows (frozen copies owned by an inspection).
3214
+ * @enum {string}
3215
+ */
3216
+ type: "TEMPLATE" | "INSTANCE";
3217
+ /**
3218
+ * Format: date-time
3219
+ * @description The date/time the resource was last updated
3220
+ * @example 2020-05-01T21:44:40.000Z
3221
+ */
3222
+ updated_at: string;
3223
+ };
3224
+ AIItemTypeField: {
3225
+ /**
3226
+ * Format: date-time
3227
+ * @description The date/time the resource was created
3228
+ * @example 2020-05-01T21:44:40.000Z
3229
+ */
3230
+ created_at: string;
3231
+ description: string;
3232
+ id: number;
3233
+ item_type_id: number;
3234
+ name: string;
3235
+ /** @description Populated for choose_from_options fields; empty array for open_answer. No per-option IDs — the array is replaced atomically on update. */
3236
+ options: components["schemas"]["AIItemTypeOption"][];
3237
+ /** @description Required when response_mode='choose_from_options'; null for open_answer. */
3238
+ options_multiple: boolean | null;
3239
+ position: number;
3240
+ /** @enum {string} */
3241
+ response_mode: "open_answer" | "choose_from_options";
3242
+ /**
3243
+ * Format: date-time
3244
+ * @description The date/time the resource was last updated
3245
+ * @example 2020-05-01T21:44:40.000Z
3246
+ */
3247
+ updated_at: string;
3248
+ /**
3249
+ * @description 'missing' = warn if AI doesn't find it; 'found' = warn if AI does find it; null = no warning.
3250
+ * @enum {string|null}
3251
+ */
3252
+ warn_mode: "missing" | "found" | null;
3253
+ };
3254
+ /** @description One entry in ai_item_types.additional_details_lookfor. The uuid is server-generated and preserved verbatim through template→instance copies. */
3255
+ AIItemTypeLookforEntry: {
3256
+ label: string;
3257
+ position: number;
3258
+ uuid: string;
3259
+ };
3260
+ /** @description One entry in ai_item_type_fields.options (choose_from_options fields). */
3261
+ AIItemTypeOption: {
3262
+ label: string;
3263
+ position: number;
3264
+ };
2801
3265
  /** @description The details of the AI status for an inspection */
2802
3266
  AIStatusDetails: {
3267
+ /** @description Configured AI Analysis additional details */
3268
+ ai_additional_details?: {
3269
+ /** @description AI observations responding to the configured considerations text. */
3270
+ considerations_observations: components["schemas"]["ConsiderationsObservationEntry"][];
3271
+ /** @description Configured items-to-look-for that were found, plus adjacent discoveries. lookfor_id is a UUID referencing the item type's additional_details_lookfor array; null for adjacent-discovery items. */
3272
+ items_found: components["schemas"]["ItemsFoundEntry"][];
3273
+ } | unknown;
3274
+ /** @description Current configured AI Analysis run state */
3275
+ ai_analysis_status?: components["schemas"]["AIAnalysisStatus"];
3276
+ /** @description Configured AI Analysis expected items and field results */
3277
+ ai_items?: {
3278
+ additional_details_attribution: number[];
3279
+ classification_confidence: number | null;
3280
+ detected_type: string;
3281
+ id: number;
3282
+ item_index: number | null;
3283
+ item_information: {
3284
+ candidate_values: components["schemas"]["CandidateValue"][];
3285
+ confidence: number | null;
3286
+ /** @enum {string} */
3287
+ disposition: "pass" | "warn";
3288
+ field_id: number;
3289
+ field_name: string;
3290
+ reasoning: string | null;
3291
+ sources: components["schemas"]["Source"][];
3292
+ status: components["schemas"]["FieldStatus"];
3293
+ value: string | string[] | unknown;
3294
+ }[];
3295
+ item_type_id: number | null;
3296
+ truepic_ids: number[];
3297
+ }[];
3298
+ /** @description Configured AI Analysis unexpected items */
3299
+ ai_unexpected_items?: {
3300
+ classification_confidence: number | null;
3301
+ detected_type: string;
3302
+ id: number;
3303
+ message: string | null;
3304
+ truepic_ids: number[];
3305
+ }[];
3306
+ /** @description AI Analysis Configuration rollup of detected items for the L1 sidebar (Contract §2.7). Present only on inspections running the new feature; mirrors entries in `ai_items[]` / `ai_unexpected_items[]` by `id`, stripped to a rollup shape. */
3307
+ detected_items?: {
3308
+ /** @description Free-text classification label (e.g. `'watch'`). */
3309
+ detected_type: string;
3310
+ /** @description Matches the corresponding `ai_items[].id` / `ai_unexpected_items[].id`. */
3311
+ id: number;
3312
+ /** @description 0-indexed position within the expected items; null for unexpected. */
3313
+ item_index: number | null;
3314
+ /**
3315
+ * @description Whether this is a configured (expected) item or an unexpected detection.
3316
+ * @enum {string}
3317
+ */
3318
+ kind: "expected" | "unexpected";
3319
+ /** @description Short rollup summary for the sidebar. */
3320
+ summary?: string;
3321
+ /** @description Truepic IDs of the captures associated with this item. */
3322
+ truepic_ids: number[];
3323
+ }[];
2803
3324
  /** @description AI analyses per-list-item */
2804
3325
  list_items?: {
2805
3326
  /** @description The id of the list item this AI analysis corresponds to */
@@ -2822,6 +3343,10 @@ export interface components {
2822
3343
  };
2823
3344
  /** @enum {string} */
2824
3345
  AIStatusReason: "COMPLETE_WITH_NO_INCONSISTENCIES" | "COMPLETE_WITH_INCONSISTENCIES" | "INCOMPLETE";
3346
+ AISuggestedSource: {
3347
+ truepic_ids: number[];
3348
+ type: string;
3349
+ };
2825
3350
  AIUserCriteriaResult: {
2826
3351
  client_override_date?: string | null;
2827
3352
  client_override_result?: string | null;
@@ -2837,6 +3362,46 @@ export interface components {
2837
3362
  photo_id?: number;
2838
3363
  test_key: string;
2839
3364
  };
3365
+ /** @description One entry per model call in audit_json arrays on result tables. */
3366
+ AuditEntry: {
3367
+ /** @description ISO 8601 timestamp when this model call completed. */
3368
+ completed_at: string;
3369
+ /** @description Raw provider-side grounding metadata captured when a provider tool fired during this query (e.g. Gemini `google_search` / `url_context`, OpenAI `web_search`, per VISION-1850). Persisted verbatim — operators reviewing a flagged inspection need the full citation chain the provider returned, not just whatever the model summarized into the `sources[]` array. Absent when no provider tool fired. */
3370
+ grounding_metadata?: {
3371
+ [key: string]: unknown;
3372
+ };
3373
+ /** @description Discriminates this per-model-call entry from other audit_json entry shapes (e.g. `SuppressedExtractionAuditEntry`). Optional on read so rows persisted before this field existed validate; written going forward by `buildAuditFields`. Nothing branches on it today — it's a forward-looking discriminator only. */
3374
+ kind?: string;
3375
+ model_name: string;
3376
+ prompt_id: number;
3377
+ query_time_ms: number;
3378
+ /** @description Model's free-form reasoning text alongside its terminal tool call (VISION-2075). Gemini 3.x preview surfaces a structured chain-of-thought as `text` parts that capture observations, source evaluation, and self-checks — much richer than the one-sentence `reasoning` field the model writes into its own output, and the only audit-time record of rejected first-attempt content when a retry succeeds. Absent on queriers that don't yet populate it. */
3379
+ reasoning_text?: string;
3380
+ /** @description Provider-reported reason the model stopped generating (VISION-2023). Surfaces truncation (`max_tokens`) and policy declines (`refusal`) per step/model so observability can spot them without grepping logs. Provider-specific values: Anthropic emits `end_turn`, `tool_use`, `max_tokens`, `refusal`, `pause_turn`; OpenAI emits `completed`, `incomplete`; Gemini emits raw `STOP`, `MAX_TOKENS`, etc. Absent on queriers that don't yet populate it. */
3381
+ stop_reason?: string;
3382
+ tokens: components["schemas"]["AuditEntryTokens"];
3383
+ /** @description Per-tool-call audit records for any non-terminal tool invocations the model issued during this query (VISION-1965). One entry per invocation, in invocation order; shape is the tool's own `auditRecord` field from its `PipelineToolResult`. Absent / empty when the query didn't use any non-terminal tools. */
3384
+ tool_calls?: {
3385
+ [key: string]: unknown;
3386
+ }[];
3387
+ total_cost_usd: number;
3388
+ };
3389
+ AuditEntryTokens: {
3390
+ cached?: number;
3391
+ input: number;
3392
+ output: number;
3393
+ };
3394
+ /**
3395
+ * @description One entry in ai_inspection_item_field_results.candidate_values. Populated when status='conflict'; never deduplicated.
3396
+ *
3397
+ * `value` is nullable: when a field disappears across runs (found in a prior run, `not_captured` in a later one), the null candidate represents the "missing on this side" vote so the comparison UI can render both outcomes against each other. (Appearance — `not_captured` then `found` — no longer produces a conflict or candidate; see VISION-2054.)
3398
+ */
3399
+ CandidateValue: {
3400
+ confidence: number;
3401
+ reasoning: string;
3402
+ sources: components["schemas"]["Source"][];
3403
+ value: string | string[] | unknown;
3404
+ };
2840
3405
  /** @description The request body for PUT /inspections/{inspectionId}/inspection-type */
2841
3406
  ChangeInspectionTypeBody: {
2842
3407
  /**
@@ -2845,6 +3410,15 @@ export interface components {
2845
3410
  */
2846
3411
  inspection_type_id: number;
2847
3412
  };
3413
+ /** @description One entry in ai_inspection_item_additional_details_results.considerations_observations. */
3414
+ ConsiderationsObservationEntry: {
3415
+ confidence: number;
3416
+ id: number;
3417
+ /** @description id from ai_inspection_item_results (same event); null when attribution is ambiguous. */
3418
+ item_id: number | null;
3419
+ observation: string;
3420
+ sources: components["schemas"]["Source"][];
3421
+ };
2848
3422
  ContentAnalysisDetails: {
2849
3423
  /**
2850
3424
  * @description The expected result of the content analysis test. Will be an object specifying a min and mix on the vehicle odometer for ODOMETER tests. Will be a string representing the expected VIN number on the vehicle for VIN tests. Will be a string representing the expected DOT TIN on the vehicle tire for DOT TIN tests.
@@ -3219,8 +3793,6 @@ export interface components {
3219
3793
  * @enum {string}
3220
3794
  */
3221
3795
  ContentAnalysisType: "ODOMETER" | "VIN" | "TEXT_MATCHING" | "CUSTOM_FIELD_MATCHING" | "DOT_TIN";
3222
- CreateAIAnalysisSetProps: components["schemas"]["AIAnalysisSetPayload"];
3223
- CreateAIAnalysisSetResult: components["schemas"]["SuccessfulCreationResponseData"];
3224
3796
  /** @description The response body for POST /auth/auth0 */
3225
3797
  CreateAPICredentialsResult: {
3226
3798
  /**
@@ -3329,7 +3901,12 @@ export interface components {
3329
3901
  * @example 3028675309
3330
3902
  */
3331
3903
  customer_phone_number?: string;
3332
- include_list?: unknown;
3904
+ /**
3905
+ * @description This must be set to `true` when including items in the `list` object.
3906
+ * @default false
3907
+ * @example false
3908
+ */
3909
+ include_list: boolean;
3333
3910
  /**
3334
3911
  * @description Free-form inspection-ready criteria text. Max length 10KB.
3335
3912
  * @example Capture all rooms and appliances.
@@ -3373,7 +3950,7 @@ export interface components {
3373
3950
  /** @description The method(s) to send the inspection request to the customer completing the inspection. */
3374
3951
  send_methods?: {
3375
3952
  /**
3376
- * @description When true, will send text messages to the customer_email_address
3953
+ * @description When true, will send emails to the customer_email_address
3377
3954
  * @example false
3378
3955
  */
3379
3956
  email: boolean;
@@ -3408,7 +3985,7 @@ export interface components {
3408
3985
  response_code: number;
3409
3986
  result: components["schemas"]["SerializedInspection"];
3410
3987
  };
3411
- /** @description Request Body for POST /inspections */
3988
+ /** @description Request Body for POST /inspection-types */
3412
3989
  CreateInspectionTypeBody: {
3413
3990
  /**
3414
3991
  * @description the id of the user who created this inspection type. References `users.id`
@@ -3469,6 +4046,20 @@ export interface components {
3469
4046
  * @example 539
3470
4047
  */
3471
4048
  outcome_set_id?: number;
4049
+ /**
4050
+ * @description The teams that are allowed to use this inspection type. Pass each team as an object containing its `id`. Passing an empty array removes all team associations.
4051
+ * @example [
4052
+ * {
4053
+ * "id": 12
4054
+ * },
4055
+ * {
4056
+ * "id": 24
4057
+ * }
4058
+ * ]
4059
+ */
4060
+ teams?: {
4061
+ id: number;
4062
+ }[];
3472
4063
  /**
3473
4064
  * @description When true, there is only one name for the user to fill out rather than a separate first name and last name field
3474
4065
  * @example true
@@ -3791,7 +4382,12 @@ export interface components {
3791
4382
  custom_field_option_set_id?: number;
3792
4383
  /** @description The entry method for the custom field */
3793
4384
  entry_method: components["schemas"]["CustomFieldEntryMethods"];
3794
- is_required: unknown;
4385
+ /**
4386
+ * @description When true, the user must supply a value for this custom field in order to create an inspection
4387
+ * @default false
4388
+ * @example true
4389
+ */
4390
+ is_required: boolean;
3795
4391
  /** @description The label for the custom field */
3796
4392
  label?: string;
3797
4393
  };
@@ -3833,6 +4429,13 @@ export interface components {
3833
4429
  issue_description: string;
3834
4430
  related_item_ids: number[];
3835
4431
  };
4432
+ /** @description A model whose response differed from the consensus value within a single extraction run. Stored in ai_inspection_item_field_results.dissenters. */
4433
+ Dissenter: {
4434
+ confidence: number | null;
4435
+ model_name: string;
4436
+ reasoning: string | null;
4437
+ value: string | string[] | unknown;
4438
+ };
3836
4439
  /** @description An email token used for unsubscribing and resubscribing from emails */
3837
4440
  EmailToken: {
3838
4441
  /**
@@ -3884,6 +4487,13 @@ export interface components {
3884
4487
  */
3885
4488
  tz: string;
3886
4489
  };
4490
+ /** @description An entry in a field result's `audit_json` array: either a per-model-call record or a suppressed-rerun verdict (VISION-2126). */
4491
+ FieldResultAuditEntry: components["schemas"]["AuditEntry"] | components["schemas"]["SuppressedExtractionAuditEntry"];
4492
+ /**
4493
+ * @description Per-field extraction status. V1 emits exactly these three values; adding a member requires updating both this union and the model-layer Joi `.valid(...)` (`ai-inspection-item-field-results.model.ts`) and the runtime set in `ai-status-consolidator.ts`. Single source of truth for the status literal.
4494
+ * @enum {string}
4495
+ */
4496
+ FieldStatus: "found" | "not_captured" | "conflict";
3887
4497
  /** @description Request body for POST /inspections/{inspectionId}/flag-device */
3888
4498
  FlagDeviceRequestBody: {
3889
4499
  /** @description The comment to apply to the activity log for this flag action. */
@@ -3893,73 +4503,6 @@ export interface components {
3893
4503
  /** @description The complete list of flags to apply to the device for this inspection. This will update the list of flags to match this array by adding and/or removing any existing flags. */
3894
4504
  flags: components["schemas"]["DeviceFlagType"][];
3895
4505
  };
3896
- GetAIAnalysisSetQuestionTruepicsExamplesResult: {
3897
- question: string;
3898
- question_id: number;
3899
- truepics: components["schemas"]["QuestionTruepicExampleItem"][];
3900
- }[];
3901
- GetAIAnalysisSetResult: {
3902
- /**
3903
- * @description The current version number of the Vision API
3904
- * @example 3.0.0
3905
- */
3906
- api_version: string;
3907
- /**
3908
- * @description The human readable-status of the response
3909
- * @example Success
3910
- */
3911
- message: string;
3912
- /**
3913
- * @description The HTTP status code of the response
3914
- * @example 200
3915
- */
3916
- response_code: number;
3917
- result: {
3918
- id: number;
3919
- name?: string | null;
3920
- num_evaluated_truepics: number;
3921
- questions: string[];
3922
- };
3923
- };
3924
- GetAIAnalysisSetsResult: {
3925
- /**
3926
- * @description The current version number of the Vision API
3927
- * @example 3.0.0
3928
- */
3929
- api_version: string;
3930
- /**
3931
- * @description The human readable-status of the response
3932
- * @example Success
3933
- */
3934
- message: string;
3935
- /**
3936
- * @description The total number of pages for the given query
3937
- * @example 12
3938
- */
3939
- pageCount: number;
3940
- /**
3941
- * @description The HTTP status code of the response
3942
- * @example 200
3943
- */
3944
- response_code: number;
3945
- result: {
3946
- created_at: string;
3947
- id: number;
3948
- name?: string | null;
3949
- num_evaluated_truepics: number;
3950
- questions: string[];
3951
- }[];
3952
- /**
3953
- * @description The total number of results for the given page
3954
- * @example 25
3955
- */
3956
- total: number;
3957
- /**
3958
- * @description The total number of results for the given query
3959
- * @example 251
3960
- */
3961
- totalResults: number;
3962
- };
3963
4506
  /** @description The response body for GET /auth/auth0 */
3964
4507
  GetAPICredentialsResult: components["schemas"]["CreateAPICredentialsResult"];
3965
4508
  /** @description Response Body for GET /inspections/bearer */
@@ -3997,6 +4540,8 @@ export interface components {
3997
4540
  * @example 40.0612708
3998
4541
  */
3999
4542
  address_lng?: string;
4543
+ /** @description Per-inspection lock for the AI Analysis Configuration "inspection items" pipeline. Null until the first AI run resolves it from global_configs.VISION_AI_INSPECTION_ITEMS_PIPELINE_ID under FOR UPDATE; immutable thereafter so the audit chain attaches to a single pipeline even if the global config is later changed. Spec §2.7, §3.4. */
4544
+ ai_inspection_items_pipeline_id?: number | null;
4000
4545
  /**
4001
4546
  * @description The AI analysis result for this inspection.
4002
4547
  * @example pass
@@ -4005,16 +4550,22 @@ export interface components {
4005
4550
  /** @description The details of the AI status for this inspection. This may include information about the criteria evaluation, any inconsistencies detected, and more. */
4006
4551
  ai_status_details?: components["schemas"]["AIStatusDetails"];
4007
4552
  /**
4008
- * @description The reason for the AI analysis result for this inspection.
4009
- * @example COMPLETE_WITH_NO_INCONSISTENCIES
4553
+ * @description Whether the Vision app has been opened by the customer
4554
+ * @default false
4555
+ * @example true
4010
4556
  */
4011
- ai_status_reason?: components["schemas"]["AIStatusReason"];
4012
- app_opened?: unknown;
4557
+ app_opened: boolean;
4013
4558
  /**
4014
4559
  * @description The id of the user this inspection is assigned to.
4015
4560
  * @example 19
4016
4561
  */
4017
4562
  assigned_to_member_user_id?: number;
4563
+ /**
4564
+ * Format: date-time
4565
+ * @description The date/time the inspection was closed. `null` if not closed.
4566
+ * @example 2020-05-01T21:44:40.000Z
4567
+ */
4568
+ closed_at?: string | null;
4018
4569
  /**
4019
4570
  * Format: date-time
4020
4571
  * @description The date/time the resource was created
@@ -4089,6 +4640,12 @@ export interface components {
4089
4640
  * @example 2023-01-04 15:11:39.642
4090
4641
  */
4091
4642
  email_auto_reply_sent?: string;
4643
+ /**
4644
+ * Format: date-time
4645
+ * @description The date/time the inspection token expires. Updated each time a new token is issued.
4646
+ * @example 2020-05-01T21:44:40.000Z
4647
+ */
4648
+ expires_at?: string | null;
4092
4649
  /**
4093
4650
  * @description The id of the group this inspection is for.
4094
4651
  * @example 23
@@ -4115,12 +4672,22 @@ export interface components {
4115
4672
  */
4116
4673
  inspection_status_id?: components["schemas"]["InspectionStatusId"];
4117
4674
  /**
4118
- * @description The id of the inspection type this inspection is for.
4119
- * @example 12
4675
+ * @description The id of the inspection type this inspection is for.
4676
+ * @example 12
4677
+ */
4678
+ inspection_type_id?: number;
4679
+ /**
4680
+ * @description Represents if the inspection has been soft-deleted
4681
+ * @default false
4682
+ * @example true
4683
+ */
4684
+ is_deleted: boolean;
4685
+ /**
4686
+ * @description Whether the inspection has expired
4687
+ * @default false
4688
+ * @example true
4120
4689
  */
4121
- inspection_type_id?: number;
4122
- is_deleted?: unknown;
4123
- is_expired?: unknown;
4690
+ is_expired: boolean;
4124
4691
  /**
4125
4692
  * @description The maximum distance, in meters, from the address that the photos/videos must be taken in order to be valid
4126
4693
  * @example 1000
@@ -4168,7 +4735,7 @@ export interface components {
4168
4735
  /** @description The method(s) to send the inspection request to the customer completing the inspection. */
4169
4736
  send_methods?: {
4170
4737
  /**
4171
- * @description When true, will send text messages to the customer_email_address
4738
+ * @description When true, will send emails to the customer_email_address
4172
4739
  * @example false
4173
4740
  */
4174
4741
  email: boolean;
@@ -4407,7 +4974,12 @@ export interface components {
4407
4974
  */
4408
4975
  inspection_id?: number;
4409
4976
  inspection_types: components["schemas"]["InspectionType"][];
4410
- is_deleted: unknown;
4977
+ /**
4978
+ * @description Whether or not this list has been soft-deleted
4979
+ * @default false
4980
+ * @example true
4981
+ */
4982
+ is_deleted: boolean;
4411
4983
  items: components["schemas"]["ListItem"][];
4412
4984
  /**
4413
4985
  * @description The auto-generated name of the list.
@@ -4684,7 +5256,12 @@ export interface components {
4684
5256
  */
4685
5257
  inspection_id?: number;
4686
5258
  inspection_types: components["schemas"]["InspectionType"][];
4687
- is_deleted: unknown;
5259
+ /**
5260
+ * @description Whether or not this list has been soft-deleted
5261
+ * @default false
5262
+ * @example true
5263
+ */
5264
+ is_deleted: boolean;
4688
5265
  items: components["schemas"]["ListItem"][];
4689
5266
  /**
4690
5267
  * @description The auto-generated name of the list.
@@ -4842,7 +5419,7 @@ export interface components {
4842
5419
  inspection_id?: number;
4843
5420
  isActiveUser: boolean;
4844
5421
  isBot: boolean;
4845
- isCustomer?: boolean;
5422
+ isCustomer: boolean;
4846
5423
  isGroupMember: boolean;
4847
5424
  /**
4848
5425
  * @description Members can create inspections and review all inspections in assigned teams.
@@ -4899,7 +5476,12 @@ export interface components {
4899
5476
  * @example 1843
4900
5477
  */
4901
5478
  id: number;
4902
- is_mfa_required: unknown;
5479
+ /**
5480
+ * @description Whether multi-factor authentication is required for user login.
5481
+ * @default false
5482
+ * @example true
5483
+ */
5484
+ is_mfa_required: boolean;
4903
5485
  /**
4904
5486
  * @description The name of the organization.
4905
5487
  * @example Quality Capital
@@ -5162,6 +5744,11 @@ export interface components {
5162
5744
  */
5163
5745
  web_camera: boolean;
5164
5746
  };
5747
+ /**
5748
+ * @description An identifier from an external system used to reference the team. It must be unique within an organization when set.
5749
+ * @example X50100039
5750
+ */
5751
+ external_id?: string | null;
5165
5752
  /**
5166
5753
  * @description The accuracy threshold that GPS coordinates must not exceed in meters.
5167
5754
  * @example 1500
@@ -5189,7 +5776,12 @@ export interface components {
5189
5776
  */
5190
5777
  name: string;
5191
5778
  };
5192
- include_list?: unknown;
5779
+ /**
5780
+ * @description Whether to include the inspection type's list by default with new inspection requests.
5781
+ * @default false
5782
+ * @example true
5783
+ */
5784
+ include_list: boolean;
5193
5785
  inspection_types: {
5194
5786
  /**
5195
5787
  * Format: date-time
@@ -5248,7 +5840,12 @@ export interface components {
5248
5840
  * @example 1000
5249
5841
  */
5250
5842
  is_address_required: boolean;
5251
- is_deleted: unknown;
5843
+ /**
5844
+ * @description Whether this inspection type is deleted
5845
+ * @default false
5846
+ * @example true
5847
+ */
5848
+ is_deleted: boolean;
5252
5849
  /**
5253
5850
  * @description When true, the list associated with this inspection type cannot be changed
5254
5851
  * @example false
@@ -5289,7 +5886,12 @@ export interface components {
5289
5886
  */
5290
5887
  inspection_id?: number;
5291
5888
  inspection_types: components["schemas"]["InspectionType"][];
5292
- is_deleted: unknown;
5889
+ /**
5890
+ * @description Whether or not this list has been soft-deleted
5891
+ * @default false
5892
+ * @example true
5893
+ */
5894
+ is_deleted: boolean;
5293
5895
  items: components["schemas"]["ListItem"][];
5294
5896
  /**
5295
5897
  * @description The auto-generated name of the list.
@@ -5388,7 +5990,12 @@ export interface components {
5388
5990
  */
5389
5991
  use_single_name_field: boolean;
5390
5992
  }[];
5391
- is_deleted: unknown;
5993
+ /**
5994
+ * @description Whether or not this config has been soft-deleted
5995
+ * @default false
5996
+ * @example true
5997
+ */
5998
+ is_deleted: boolean;
5392
5999
  /**
5393
6000
  * @description The amount of time before an admin member's login token when switching teams expires. Any format supported by https://github.com/vercel/ms is valid.
5394
6001
  * @default 72h
@@ -5433,7 +6040,12 @@ export interface components {
5433
6040
  */
5434
6041
  inspection_id?: number;
5435
6042
  inspection_types: components["schemas"]["InspectionType"][];
5436
- is_deleted: unknown;
6043
+ /**
6044
+ * @description Whether or not this list has been soft-deleted
6045
+ * @default false
6046
+ * @example true
6047
+ */
6048
+ is_deleted: boolean;
5437
6049
  items: components["schemas"]["ListItem"][];
5438
6050
  /**
5439
6051
  * @description The auto-generated name of the list.
@@ -5535,7 +6147,12 @@ export interface components {
5535
6147
  * @example 2020-05-01T21:44:40.000Z
5536
6148
  */
5537
6149
  updated_at: string;
5538
- video_enabled?: unknown;
6150
+ /**
6151
+ * @description Whether video is enabled as a capture method in the app.
6152
+ * @default false
6153
+ * @example true
6154
+ */
6155
+ video_enabled: boolean;
5539
6156
  };
5540
6157
  };
5541
6158
  GetTeamWebhookResult: {
@@ -5802,52 +6419,7 @@ export interface components {
5802
6419
  * @example 200
5803
6420
  */
5804
6421
  response_code: number;
5805
- result: {
5806
- inspection_types: {
5807
- /** @description An array of custom fields that are used by this inspection type */
5808
- custom_fields: components["schemas"]["CustomField"][];
5809
- /**
5810
- * @description The id of the inspection type
5811
- * @example 1843
5812
- */
5813
- id: number;
5814
- /**
5815
- * @description Controls whether an address is required for the inspection or not
5816
- * @example 1000
5817
- */
5818
- is_address_required: boolean;
5819
- /**
5820
- * @description The name of the inspection type
5821
- * @example My Type
5822
- */
5823
- name: string;
5824
- /**
5825
- * @description When true, there is only one name for the user to fill out rather than a separate first name and last name field
5826
- * @example true
5827
- */
5828
- use_single_name_field: boolean;
5829
- }[];
5830
- /**
5831
- * @description Whether the email field is required on the website form. Defaults to `false`.
5832
- * @example false
5833
- */
5834
- is_email_required: boolean;
5835
- /**
5836
- * @description Whether the phone field is required on the website form. Defaults to `false`.
5837
- * @example false
5838
- */
5839
- is_phone_required: boolean;
5840
- /**
5841
- * @description Whether the address field should be shown on the website form when it is optional. The field is always shown if it is required by the inspection type. Defaults to `false`.
5842
- * @example false
5843
- */
5844
- should_show_address: boolean;
5845
- /**
5846
- * @description The unique token used by the website form to authenticate with the API.
5847
- * @example -SQuSE62r4ISFCE4EOOTtu3yx1SW8i6PE7VMZwvVZ8TNyliC
5848
- */
5849
- token: string;
5850
- };
6422
+ result: components["schemas"]["WebsiteFormBearerSerialized"];
5851
6423
  };
5852
6424
  GetWebsiteFormResult: {
5853
6425
  /**
@@ -5953,6 +6525,8 @@ export interface components {
5953
6525
  * @example 40.0612708
5954
6526
  */
5955
6527
  address_lng?: string;
6528
+ /** @description Per-inspection lock for the AI Analysis Configuration "inspection items" pipeline. Null until the first AI run resolves it from global_configs.VISION_AI_INSPECTION_ITEMS_PIPELINE_ID under FOR UPDATE; immutable thereafter so the audit chain attaches to a single pipeline even if the global config is later changed. Spec §2.7, §3.4. */
6529
+ ai_inspection_items_pipeline_id: number | null;
5956
6530
  /**
5957
6531
  * @description The AI analysis result for this inspection.
5958
6532
  * @example pass
@@ -5961,16 +6535,22 @@ export interface components {
5961
6535
  /** @description The details of the AI status for this inspection. This may include information about the criteria evaluation, any inconsistencies detected, and more. */
5962
6536
  ai_status_details?: components["schemas"]["AIStatusDetails"];
5963
6537
  /**
5964
- * @description The reason for the AI analysis result for this inspection.
5965
- * @example COMPLETE_WITH_NO_INCONSISTENCIES
6538
+ * @description Whether the Vision app has been opened by the customer
6539
+ * @default false
6540
+ * @example true
5966
6541
  */
5967
- ai_status_reason?: components["schemas"]["AIStatusReason"];
5968
- app_opened: unknown;
6542
+ app_opened: boolean;
5969
6543
  /**
5970
6544
  * @description The id of the user this inspection is assigned to.
5971
6545
  * @example 19
5972
6546
  */
5973
6547
  assigned_to_member_user_id: number;
6548
+ /**
6549
+ * Format: date-time
6550
+ * @description The date/time the inspection was closed. `null` if not closed.
6551
+ * @example 2020-05-01T21:44:40.000Z
6552
+ */
6553
+ closed_at?: string | null;
5974
6554
  /**
5975
6555
  * Format: date-time
5976
6556
  * @description The date/time the resource was created
@@ -6045,6 +6625,12 @@ export interface components {
6045
6625
  * @example 2023-01-04 15:11:39.642
6046
6626
  */
6047
6627
  email_auto_reply_sent?: string;
6628
+ /**
6629
+ * Format: date-time
6630
+ * @description The date/time the inspection token expires. Updated each time a new token is issued.
6631
+ * @example 2020-05-01T21:44:40.000Z
6632
+ */
6633
+ expires_at?: string | null;
6048
6634
  /**
6049
6635
  * @description The id of the group this inspection is for.
6050
6636
  * @example 23
@@ -6075,8 +6661,18 @@ export interface components {
6075
6661
  * @example 12
6076
6662
  */
6077
6663
  inspection_type_id: number;
6078
- is_deleted: unknown;
6079
- is_expired: unknown;
6664
+ /**
6665
+ * @description Represents if the inspection has been soft-deleted
6666
+ * @default false
6667
+ * @example true
6668
+ */
6669
+ is_deleted: boolean;
6670
+ /**
6671
+ * @description Whether the inspection has expired
6672
+ * @default false
6673
+ * @example true
6674
+ */
6675
+ is_expired: boolean;
6080
6676
  /**
6081
6677
  * @description The maximum distance, in meters, from the address that the photos/videos must be taken in order to be valid
6082
6678
  * @example 1000
@@ -6124,7 +6720,7 @@ export interface components {
6124
6720
  /** @description The method(s) to send the inspection request to the customer completing the inspection. */
6125
6721
  send_methods: {
6126
6722
  /**
6127
- * @description When true, will send text messages to the customer_email_address
6723
+ * @description When true, will send emails to the customer_email_address
6128
6724
  * @example false
6129
6725
  */
6130
6726
  email: boolean;
@@ -6198,7 +6794,12 @@ export interface components {
6198
6794
  * @example 1843
6199
6795
  */
6200
6796
  id: number;
6201
- is_deleted: unknown;
6797
+ /**
6798
+ * @description Whether or not this alert has been soft-deleted
6799
+ * @default false
6800
+ * @example true
6801
+ */
6802
+ is_deleted: boolean;
6202
6803
  /**
6203
6804
  * @description The id of the user that last edited the alert.
6204
6805
  * @example 124
@@ -6214,6 +6815,12 @@ export interface components {
6214
6815
  * @example 531
6215
6816
  */
6216
6817
  organization_id: number;
6818
+ /**
6819
+ * @description Whether or not to surface an AI Analysis warn/fail as an alert. Opt-in: defaults to false so an org's alerting behavior does not change until it explicitly enables AI Analysis alerting.
6820
+ * @default false
6821
+ * @example false
6822
+ */
6823
+ test_ai_analysis: boolean;
6217
6824
  /**
6218
6825
  * @description Whether or not to include the blurriness test in this alert.
6219
6826
  * @example true
@@ -6230,6 +6837,12 @@ export interface components {
6230
6837
  * @example true
6231
6838
  */
6232
6839
  test_content_analysis_dot_tin: boolean;
6840
+ /**
6841
+ * @description Whether or not to surface a `dot_tin_reuse` insight as an alert failure. Opt-in per VISION-1424: defaults to false so existing orgs do not start receiving alerts when the org-level reuse_detection feature is enabled.
6842
+ * @default false
6843
+ * @example false
6844
+ */
6845
+ test_content_analysis_dot_tin_reuse: boolean;
6233
6846
  /**
6234
6847
  * @description Whether or not to include the odometer test in this alert.
6235
6848
  * @example true
@@ -6245,6 +6858,12 @@ export interface components {
6245
6858
  * @example true
6246
6859
  */
6247
6860
  test_content_analysis_vin: boolean;
6861
+ /**
6862
+ * @description Whether or not to surface a `vin_reuse` insight as an alert failure. Opt-in per VISION-1425: defaults to false so existing orgs do not start receiving alerts when the org-level reuse_detection feature is enabled.
6863
+ * @default false
6864
+ * @example false
6865
+ */
6866
+ test_content_analysis_vin_reuse: boolean;
6248
6867
  /**
6249
6868
  * @description Whether or not to include the datetime test in this alert.
6250
6869
  * @example true
@@ -6266,7 +6885,7 @@ export interface components {
6266
6885
  * @description Whether or not to include the device integrity test in this alert.
6267
6886
  * @example true
6268
6887
  */
6269
- test_device_integrity?: boolean;
6888
+ test_device_integrity: boolean;
6270
6889
  /**
6271
6890
  * @description Whether or not to include the distance-from-address test in this alert.
6272
6891
  * @example true
@@ -6282,13 +6901,19 @@ export interface components {
6282
6901
  * @description Whether or not to include the geolocation test in this alert.
6283
6902
  * @example true
6284
6903
  */
6285
- test_geolocation?: boolean;
6904
+ test_geolocation: boolean;
6286
6905
  /**
6287
6906
  * @description Whether or not to include the jailbroken or rooted device test in this alert.
6288
6907
  * @default true
6289
6908
  * @example true
6290
6909
  */
6291
6910
  test_insecure_device: boolean;
6911
+ /**
6912
+ * @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.
6913
+ * @default false
6914
+ * @example false
6915
+ */
6916
+ test_inspection_readiness: boolean;
6292
6917
  /**
6293
6918
  * @description Whether or not to include the object detection test in this alert.
6294
6919
  * @default true
@@ -6431,18 +7056,13 @@ export interface components {
6431
7056
  updated_at: string;
6432
7057
  };
6433
7058
  /** @enum {string} */
6434
- InspectionInsightType: "insecure_device" | "falsified_location" | "device_found_other_inspections" | "device_flagged_other_inspections";
7059
+ InspectionInsightType: "insecure_device" | "falsified_location" | "device_found_other_inspections" | "device_flagged_other_inspections" | "dot_tin_reuse" | "vin_reuse";
6435
7060
  InspectionListItemWithPhotos: {
6436
7061
  /**
6437
7062
  * @description Whether or not to accept existing images for this list item.
6438
7063
  * @example false
6439
7064
  */
6440
7065
  accept_existing_images?: boolean;
6441
- /**
6442
- * @description The id of the AI Analysis Set used for Vision AI Analysis. References `ai_analysis_sets.id`
6443
- * @example 3
6444
- */
6445
- ai_analysis_set_id?: number | null;
6446
7066
  /**
6447
7067
  * @description Limit the number of images taken for this list item. Must be positive number
6448
7068
  * @example 11
@@ -6503,8 +7123,18 @@ export interface components {
6503
7123
  id: number;
6504
7124
  /** @description The timestamp when the list item was marked as incomplete. */
6505
7125
  incomplete_at?: string;
6506
- is_deleted: unknown;
6507
- is_required: unknown;
7126
+ /**
7127
+ * @description Whether or not this item has been soft-deleted
7128
+ * @default false
7129
+ * @example true
7130
+ */
7131
+ is_deleted: boolean;
7132
+ /**
7133
+ * @description Whether the photo/video/question is required to finish the inspection.
7134
+ * @default false
7135
+ * @example true
7136
+ */
7137
+ is_required: boolean;
6508
7138
  /**
6509
7139
  * @description The id of the list that is item is associated with.
6510
7140
  * @example 1256
@@ -6591,16 +7221,11 @@ export interface components {
6591
7221
  */
6592
7222
  accuracy?: number;
6593
7223
  /**
6594
- * @description Whether the AI analysis test is complete for this Truepic.
7224
+ * @description Whether the Truepic has been archived
7225
+ * @default false
6595
7226
  * @example true
6596
7227
  */
6597
- ai_analysis_done?: boolean;
6598
- /**
6599
- * @description The status of an AI analysis test on this Truepic.
6600
- * @example P
6601
- */
6602
- ai_analysis_status: components["schemas"]["TestResult"];
6603
- archived: unknown;
7228
+ archived: boolean;
6604
7229
  /**
6605
7230
  * @description The status of a blockchain test on this Truepic.
6606
7231
  * @example P
@@ -6657,8 +7282,8 @@ export interface components {
6657
7282
  * @example 2018-08-06T15:29:47.000Z
6658
7283
  */
6659
7284
  device_time: string;
6660
- distance_from_customer_address?: number;
6661
- distance_from_customer_address_exceeds_threshold?: boolean;
7285
+ distance_from_customer_address: number;
7286
+ distance_from_customer_address_exceeds_threshold: boolean;
6662
7287
  /**
6663
7288
  * @description The video duration of this Truepic, if it is a video.
6664
7289
  * @example 0:00:30
@@ -6704,14 +7329,112 @@ export interface components {
6704
7329
  * @example Looks damaged.
6705
7330
  */
6706
7331
  internal_note?: string;
6707
- is_deleted: unknown;
6708
- is_rooted: unknown;
7332
+ /**
7333
+ * @description Whether this Truepic has been deleted.
7334
+ * @default false
7335
+ * @example true
7336
+ */
7337
+ is_deleted: boolean;
7338
+ /**
7339
+ * @description Whether the device that captured the Truepic is rooted
7340
+ * @default false
7341
+ * @example true
7342
+ */
7343
+ is_rooted: boolean;
6709
7344
  /**
6710
7345
  * @description The GPS latitude where the photo/video was taken.
6711
7346
  * @example 33.5565051716316
6712
7347
  */
6713
7348
  lat: string;
6714
- lens_transfer_done: unknown;
7349
+ /**
7350
+ * @description Whether the transfer from Lens is complete for this Truepic.
7351
+ * @default false
7352
+ * @example true
7353
+ */
7354
+ lens_transfer_done: boolean;
7355
+ /** @description The list item this photo/video was captured for, if any. */
7356
+ list_item?: {
7357
+ /**
7358
+ * @description The completion status of the list item for this inspection.
7359
+ * @example 0
7360
+ */
7361
+ completed: number;
7362
+ /** @description Indicates that the contents of the photo should be analyzed to determine if it contains the correct information. */
7363
+ content_analysis?: components["schemas"]["ContentAnalysisDetails"];
7364
+ /**
7365
+ * Format: date-time
7366
+ * @description The date/time the resource was created
7367
+ * @example 2020-05-01T21:44:40.000Z
7368
+ */
7369
+ created_at: string;
7370
+ /**
7371
+ * @description The id of the group that this list item is associated with.
7372
+ * @example 1256
7373
+ */
7374
+ group_id?: string;
7375
+ /**
7376
+ * @description The id of the resource.
7377
+ * @example 1843
7378
+ */
7379
+ id: number;
7380
+ /**
7381
+ * @description Whether or not this item has been soft-deleted
7382
+ * @default false
7383
+ * @example true
7384
+ */
7385
+ is_deleted: boolean;
7386
+ /**
7387
+ * @description Whether the photo/video/question is required to finish the inspection.
7388
+ * @default false
7389
+ * @example true
7390
+ */
7391
+ is_required: boolean;
7392
+ /**
7393
+ * @description A description of the requested photo or video when `type` is `IMAGE`, `PHOTO`, or `VIDEO`. A question for the customer to answer when `type` is `QUESTION`. The customer will see this value in the Vision app during the inspection.
7394
+ * @example Front of car
7395
+ */
7396
+ name: string;
7397
+ /** @description An object containing information about the expected items in a Truepic. */
7398
+ object_detection?: components["schemas"]["ObjectDetectionConfig"];
7399
+ /**
7400
+ * @description The numerical order of the list item within the list. Starts at `1`.
7401
+ * @example 1
7402
+ */
7403
+ order?: number;
7404
+ /** @description The question associated with this list item, if any. */
7405
+ question?: {
7406
+ /** @description The answer(s) selected by the user, or null if unanswered */
7407
+ answer?: (unknown | {
7408
+ /** @description The user's custom text answer. Used for answer options where `allow_custom` is `true` */
7409
+ custom?: string;
7410
+ /**
7411
+ * @description A selected answer to the question.
7412
+ * @example Excellent
7413
+ */
7414
+ name: string;
7415
+ }[]) | (string | null) | (string | null);
7416
+ /** @description The possible choices for this question */
7417
+ options?: {
7418
+ allow_multiple: boolean;
7419
+ choices: components["schemas"]["ListItemQuestionChoice"][];
7420
+ } | unknown | {
7421
+ /** @description The latest date that can be selected, in ISO 8601 format */
7422
+ max?: string;
7423
+ /** @description The earliest date that can be selected, in ISO 8601 format */
7424
+ min?: string;
7425
+ };
7426
+ /** @description The type of question this list item is. Must be `MULTIPLE_CHOICE`, `TEXT`, or `DATE`. */
7427
+ type: string;
7428
+ };
7429
+ /** @description The type of the list item. */
7430
+ type: components["schemas"]["ListItemType"];
7431
+ /**
7432
+ * Format: date-time
7433
+ * @description The date/time the resource was last updated
7434
+ * @example 2020-05-01T21:44:40.000Z
7435
+ */
7436
+ updated_at: string;
7437
+ };
6715
7438
  /**
6716
7439
  * @description The GPS longitude where the photo/video was taken.
6717
7440
  * @example 33.5565051716316
@@ -6762,7 +7485,12 @@ export interface components {
6762
7485
  * @example 11.4.1
6763
7486
  */
6764
7487
  os?: string;
6765
- pending_upload: unknown;
7488
+ /**
7489
+ * @description Whether the Truepic is still uploading
7490
+ * @default false
7491
+ * @example true
7492
+ */
7493
+ pending_upload: boolean;
6766
7494
  /**
6767
7495
  * @description The photo list id this Truepic is a part of
6768
7496
  * @example 5678
@@ -6809,7 +7537,12 @@ export interface components {
6809
7537
  * @example CA
6810
7538
  */
6811
7539
  state?: string;
6812
- status_overridden: unknown;
7540
+ /**
7541
+ * @description Whether the status for this Truepic has been overridden
7542
+ * @default false
7543
+ * @example true
7544
+ */
7545
+ status_overridden: boolean;
6813
7546
  /**
6814
7547
  * @description The timestamp of the capture of the Truepic
6815
7548
  * @example 2018-08-07 13:16:15
@@ -6880,7 +7613,12 @@ export interface components {
6880
7613
  * @example 1000
6881
7614
  */
6882
7615
  is_address_required: boolean;
6883
- is_deleted: unknown;
7616
+ /**
7617
+ * @description Whether this inspection type is deleted
7618
+ * @default false
7619
+ * @example true
7620
+ */
7621
+ is_deleted: boolean;
6884
7622
  /**
6885
7623
  * @description When true, the list associated with this inspection type cannot be changed
6886
7624
  * @example false
@@ -7024,6 +7762,18 @@ export interface components {
7024
7762
  */
7025
7763
  use_single_name_field: boolean;
7026
7764
  };
7765
+ /** @description One entry in ai_inspection_item_additional_details_results.items_found. */
7766
+ ItemsFoundEntry: {
7767
+ confidence: number;
7768
+ id: number;
7769
+ /** @description id from ai_inspection_item_results (same event); null when attribution is ambiguous. */
7770
+ item_id: number | null;
7771
+ label: string;
7772
+ /** @description UUID from the matching ai_item_types.additional_details_lookfor entry (INSTANCE row). null for adjacent-discovery items the AI surfaced without a configured match. */
7773
+ lookfor_id: string | null;
7774
+ observation: string;
7775
+ sources: components["schemas"]["Source"][];
7776
+ };
7027
7777
  LandingPageContentSerialized: {
7028
7778
  assets: {
7029
7779
  [key: string]: string;
@@ -7043,13 +7793,7 @@ export interface components {
7043
7793
  * @example Start your application today!
7044
7794
  */
7045
7795
  page_title: string;
7046
- website_form: {
7047
- /**
7048
- * @description The unique token used by the website form to authenticate with the API.
7049
- * @example -SQuSE62r4ISFCE4EOOTtu3yx1SW8i6PE7VMZwvVZ8TNyliC
7050
- */
7051
- token: string;
7052
- };
7796
+ website_form: unknown;
7053
7797
  };
7054
7798
  LandingPageSerialized: {
7055
7799
  /**
@@ -7184,11 +7928,6 @@ export interface components {
7184
7928
  * @example false
7185
7929
  */
7186
7930
  accept_existing_images?: boolean;
7187
- /**
7188
- * @description The id of the AI Analysis Set used for Vision AI Analysis. References `ai_analysis_sets.id`
7189
- * @example 3
7190
- */
7191
- ai_analysis_set_id?: number | null;
7192
7931
  /**
7193
7932
  * @description Limit the number of images taken for this list item. Must be positive number
7194
7933
  * @example 11
@@ -7250,8 +7989,18 @@ export interface components {
7250
7989
  id: number;
7251
7990
  /** @description The timestamp when the list item was marked as incomplete. */
7252
7991
  incomplete_at?: string;
7253
- is_deleted: unknown;
7254
- is_required: unknown;
7992
+ /**
7993
+ * @description Whether or not this item has been soft-deleted
7994
+ * @default false
7995
+ * @example true
7996
+ */
7997
+ is_deleted: boolean;
7998
+ /**
7999
+ * @description Whether the photo/video/question is required to finish the inspection.
8000
+ * @default false
8001
+ * @example true
8002
+ */
8003
+ is_required: boolean;
7255
8004
  /**
7256
8005
  * @description The id of the list that is item is associated with.
7257
8006
  * @example 1256
@@ -7367,11 +8116,6 @@ export interface components {
7367
8116
  * @example false
7368
8117
  */
7369
8118
  accept_existing_images?: boolean;
7370
- /**
7371
- * @description The id of the AI Analysis Set used for Vision AI Analysis. References `ai_analysis_sets.id`
7372
- * @example 3
7373
- */
7374
- ai_analysis_set_id?: number | null;
7375
8119
  /**
7376
8120
  * @description Limit the number of images taken for this list item. Must be positive number
7377
8121
  * @example 11
@@ -7422,7 +8166,12 @@ export interface components {
7422
8166
  * @example true
7423
8167
  */
7424
8168
  incomplete?: boolean;
7425
- is_required: unknown;
8169
+ /**
8170
+ * @description Whether the photo/video/question is required to finish the inspection.
8171
+ * @default false
8172
+ * @example true
8173
+ */
8174
+ is_required: boolean;
7426
8175
  /**
7427
8176
  * @description A description of the requested photo or video when `type` is `IMAGE`, `PHOTO`, or `VIDEO`. A question for the customer to answer when `type` is `QUESTION`. The customer will see this value in the Vision app during the inspection.
7428
8177
  * @example Front of car
@@ -7538,7 +8287,12 @@ export interface components {
7538
8287
  * @example Inspection Finished for {{OrganizationFirstName}}
7539
8288
  */
7540
8289
  inspection_finished_subject: string;
7541
- is_deleted: unknown;
8290
+ /**
8291
+ * @description Whether or not this message template set has been soft-deleted
8292
+ * @default false
8293
+ * @example true
8294
+ */
8295
+ is_deleted: boolean;
7542
8296
  /**
7543
8297
  * @description The name of the message template set
7544
8298
  * @example Default Set
@@ -7814,8 +8568,18 @@ export interface components {
7814
8568
  * @example 1843
7815
8569
  */
7816
8570
  id: number;
7817
- is_deleted: unknown;
7818
- is_mfa_required: unknown;
8571
+ /**
8572
+ * @description Whether or not this organization has been soft-deleted.
8573
+ * @default false
8574
+ * @example true
8575
+ */
8576
+ is_deleted: boolean;
8577
+ /**
8578
+ * @description Whether multi-factor authentication is required for user login.
8579
+ * @default false
8580
+ * @example true
8581
+ */
8582
+ is_mfa_required: boolean;
7819
8583
  /**
7820
8584
  * @description The name of the organization.
7821
8585
  * @example Quality Capital
@@ -7884,7 +8648,7 @@ export interface components {
7884
8648
  updated_by_user_id: number | null;
7885
8649
  };
7886
8650
  /** @enum {string} */
7887
- 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_ai_criteria" | "dashboard_user_feedback_forms";
8651
+ 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";
7888
8652
  /** @description A possible outcome for an inspection */
7889
8653
  Outcome: {
7890
8654
  /**
@@ -7903,7 +8667,12 @@ export interface components {
7903
8667
  * @example 1843
7904
8668
  */
7905
8669
  id: number;
7906
- is_deleted: unknown;
8670
+ /**
8671
+ * @description Whether or not this outcome set has been soft-deleted
8672
+ * @default false
8673
+ * @example true
8674
+ */
8675
+ is_deleted: boolean;
7907
8676
  /**
7908
8677
  * @description The id of the user that last edited this outcome set.
7909
8678
  * @example 542
@@ -7944,7 +8713,12 @@ export interface components {
7944
8713
  * @example 1843
7945
8714
  */
7946
8715
  id: number;
7947
- is_deleted: unknown;
8716
+ /**
8717
+ * @description Whether or not this outcome set has been soft-deleted
8718
+ * @default false
8719
+ * @example true
8720
+ */
8721
+ is_deleted: boolean;
7948
8722
  /**
7949
8723
  * @description The id of the user that last edited this outcome set.
7950
8724
  * @example 542
@@ -8026,14 +8800,63 @@ export interface components {
8026
8800
  */
8027
8801
  total: number;
8028
8802
  /**
8029
- * @description The total number of results for the given query
8030
- * @example 251
8803
+ * @description The total number of results for the given query
8804
+ * @example 251
8805
+ */
8806
+ totalResults: number;
8807
+ };
8808
+ /** @description General format for sorting results. The order of properties given is important, as sorting is applied in the order specified. */
8809
+ PaginationSorting: {
8810
+ [key: string]: "asc" | "desc";
8811
+ };
8812
+ PhotoDetectedSource: {
8813
+ tag: string;
8814
+ truepic_ids: number[];
8815
+ type: string;
8816
+ };
8817
+ PhotoTextSource: {
8818
+ string: string;
8819
+ truepic_ids: number[];
8820
+ type: string;
8821
+ };
8822
+ /** @description Attached by `inspection-ai-items-populator` (via `InspectionPopulator` when constructed with `includeAIItems: true`). Holds the result snapshot from the latest *completed* extraction event, the derived analysis status, and the inspection's frozen AI Item Type schema. Optional fields on `PopulatedInspection` because they're only present on the inspection-detail code path. */
8823
+ PopulatedAIInspectionItem: {
8824
+ /** @description Per-model call audit data from the classification step. */
8825
+ classification_audit_json: components["schemas"]["AuditEntry"][] | unknown;
8826
+ /** @description 0..1 classifier confidence for this item identification. */
8827
+ classification_confidence: number | null;
8828
+ /**
8829
+ * Format: date-time
8830
+ * @description The date/time the resource was created
8831
+ * @example 2020-05-01T21:44:40.000Z
8832
+ */
8833
+ created_at: string;
8834
+ detected_type: string;
8835
+ fields: components["schemas"]["AIInspectionItemFieldResult"][];
8836
+ id: number;
8837
+ inspection_id: number;
8838
+ /** @description 0-indexed position within the set of EXPECTED items for this event. */
8839
+ item_index: number | null;
8840
+ /** @description FK to ai_item_types.id (INSTANCE row); null for UNEXPECTED items. */
8841
+ item_type_id: number | null;
8842
+ /** @enum {string} */
8843
+ kind: "EXPECTED" | "UNEXPECTED";
8844
+ /** @description Populated for UNEXPECTED items; null for EXPECTED. */
8845
+ message: string | null;
8846
+ /** @description FK to ai_extraction_events.id — the run that produced this row. */
8847
+ triggering_event_id?: number;
8848
+ /** @description Truepic IDs of all captures the classifier associated with this item. */
8849
+ truepic_ids: number[];
8850
+ /**
8851
+ * Format: date-time
8852
+ * @description The date/time the resource was last updated
8853
+ * @example 2020-05-01T21:44:40.000Z
8031
8854
  */
8032
- totalResults: number;
8855
+ updated_at: string;
8033
8856
  };
8034
- /** @description General format for sorting results. The order of properties given is important, as sorting is applied in the order specified. */
8035
- PaginationSorting: {
8036
- [key: string]: "asc" | "desc";
8857
+ PopulatedAIItemTypeInstance: {
8858
+ fields: components["schemas"]["AIItemTypeField"][];
8859
+ itemType: components["schemas"]["AIItemType"];
8037
8860
  };
8038
8861
  PopulatedCustomField: {
8039
8862
  /** @description The id of the custom field option set used by this custom field when the entry method is ENTRY_METHOD_SELECTABLE */
@@ -8050,7 +8873,12 @@ export interface components {
8050
8873
  custom_field_options?: components["schemas"]["CustomFieldOption"][];
8051
8874
  /** @description The entry method for the custom field */
8052
8875
  entry_method: components["schemas"]["CustomFieldEntryMethods"];
8053
- is_required: unknown;
8876
+ /**
8877
+ * @description When true, the user must supply a value for this custom field in order to create an inspection
8878
+ * @default false
8879
+ * @example true
8880
+ */
8881
+ is_required: boolean;
8054
8882
  /** @description The label for the custom field */
8055
8883
  label?: string;
8056
8884
  };
@@ -8083,7 +8911,12 @@ export interface components {
8083
8911
  */
8084
8912
  name: string;
8085
8913
  }[];
8086
- is_deleted: unknown;
8914
+ /**
8915
+ * @description Whether or not this custom field option set has been soft-deleted
8916
+ * @default false
8917
+ * @example true
8918
+ */
8919
+ is_deleted: boolean;
8087
8920
  /**
8088
8921
  * @description The id of the user that last edited this custom field option set.
8089
8922
  * @example 542
@@ -8302,6 +9135,11 @@ export interface components {
8302
9135
  */
8303
9136
  web_camera: boolean;
8304
9137
  };
9138
+ /**
9139
+ * @description An identifier from an external system used to reference the team. It must be unique within an organization when set.
9140
+ * @example X50100039
9141
+ */
9142
+ external_id?: string | null;
8305
9143
  /**
8306
9144
  * @description The accuracy threshold that GPS coordinates must not exceed in meters.
8307
9145
  * @example 1500
@@ -8334,7 +9172,12 @@ export interface components {
8334
9172
  * @example 1843
8335
9173
  */
8336
9174
  id: number;
8337
- include_list?: unknown;
9175
+ /**
9176
+ * @description Whether to include the inspection type's list by default with new inspection requests.
9177
+ * @default false
9178
+ * @example true
9179
+ */
9180
+ include_list: boolean;
8338
9181
  inspection_types: {
8339
9182
  /**
8340
9183
  * Format: date-time
@@ -8393,7 +9236,12 @@ export interface components {
8393
9236
  * @example 1000
8394
9237
  */
8395
9238
  is_address_required: boolean;
8396
- is_deleted: unknown;
9239
+ /**
9240
+ * @description Whether this inspection type is deleted
9241
+ * @default false
9242
+ * @example true
9243
+ */
9244
+ is_deleted: boolean;
8397
9245
  /**
8398
9246
  * @description When true, the list associated with this inspection type cannot be changed
8399
9247
  * @example false
@@ -8434,7 +9282,12 @@ export interface components {
8434
9282
  */
8435
9283
  inspection_id?: number;
8436
9284
  inspection_types: components["schemas"]["InspectionType"][];
8437
- is_deleted: unknown;
9285
+ /**
9286
+ * @description Whether or not this list has been soft-deleted
9287
+ * @default false
9288
+ * @example true
9289
+ */
9290
+ is_deleted: boolean;
8438
9291
  items: components["schemas"]["ListItem"][];
8439
9292
  /**
8440
9293
  * @description The auto-generated name of the list.
@@ -8533,7 +9386,12 @@ export interface components {
8533
9386
  */
8534
9387
  use_single_name_field: boolean;
8535
9388
  }[];
8536
- is_deleted: unknown;
9389
+ /**
9390
+ * @description Whether or not this config has been soft-deleted
9391
+ * @default false
9392
+ * @example true
9393
+ */
9394
+ is_deleted: boolean;
8537
9395
  /**
8538
9396
  * @description The amount of time before an admin member's login token when switching teams expires. Any format supported by https://github.com/vercel/ms is valid.
8539
9397
  * @default 72h
@@ -8578,7 +9436,12 @@ export interface components {
8578
9436
  */
8579
9437
  inspection_id?: number;
8580
9438
  inspection_types: components["schemas"]["InspectionType"][];
8581
- is_deleted: unknown;
9439
+ /**
9440
+ * @description Whether or not this list has been soft-deleted
9441
+ * @default false
9442
+ * @example true
9443
+ */
9444
+ is_deleted: boolean;
8582
9445
  items: components["schemas"]["ListItem"][];
8583
9446
  /**
8584
9447
  * @description The auto-generated name of the list.
@@ -8680,7 +9543,12 @@ export interface components {
8680
9543
  * @example 2020-05-01T21:44:40.000Z
8681
9544
  */
8682
9545
  updated_at: string;
8683
- video_enabled?: unknown;
9546
+ /**
9547
+ * @description Whether video is enabled as a capture method in the app.
9548
+ * @default false
9549
+ * @example true
9550
+ */
9551
+ video_enabled: boolean;
8684
9552
  };
8685
9553
  PopulatedTextMatchingSet: {
8686
9554
  can_delete: boolean;
@@ -8700,7 +9568,12 @@ export interface components {
8700
9568
  * @example 1843
8701
9569
  */
8702
9570
  id: number;
8703
- is_deleted: unknown;
9571
+ /**
9572
+ * @description Whether or not this text matching set has been soft-deleted
9573
+ * @default false
9574
+ * @example true
9575
+ */
9576
+ is_deleted: boolean;
8704
9577
  lists: {
8705
9578
  id: number;
8706
9579
  name: string;
@@ -8795,14 +9668,6 @@ export interface components {
8795
9668
  /** @description The identifier for the user */
8796
9669
  user_id: string;
8797
9670
  };
8798
- QuestionTruepicExampleItem: {
8799
- accepted: boolean;
8800
- confidence?: number | null;
8801
- consensus?: boolean | null;
8802
- reason: string | null;
8803
- truepic_id: number;
8804
- url: string;
8805
- };
8806
9671
  RecordWebsiteFormBearerActivityBody: {
8807
9672
  activity: string;
8808
9673
  data?: Record<string, never>;
@@ -8828,6 +9693,24 @@ export interface components {
8828
9693
  */
8829
9694
  response_code: number;
8830
9695
  };
9696
+ /** @description Top-level reuse rollup attached to a populated inspection for one string type (DOT TIN or VIN). Mirrors `flags_other_inspections` in shape; see Vision-UI Contract §1.2. */
9697
+ ReuseRollup: {
9698
+ /** @description Capped at MAX_INSPECTIONS_PER_ROLLUP entries — see VISION-1430 for the cap-value lock. `total_matched_inspections` continues to reflect the true count. */
9699
+ inspections: components["schemas"]["ReuseRollupInspection"][];
9700
+ /** @description Truepic IDs on this inspection that produced ≥1 match. */
9701
+ matched_truepic_ids: number[];
9702
+ total_matched_inspections: number;
9703
+ };
9704
+ /** @description One entry in a reuse rollup's `inspections[]` array — a remote inspection in the same org that shares at least one extracted value with the local inspection. See Vision-UI Contract §1.2. */
9705
+ ReuseRollupInspection: {
9706
+ /** @description UI hint: does the requesting user pass `requires-inspection-access` for the remote inspection? Server-side click-through (the inspection-detail endpoint's existing 403 path) remains the authoritative gate per VISION-1429 H2 — this flag avoids surfacing enabled controls that would 403 on click. */
9707
+ accessible: boolean;
9708
+ /** @description Earliest truepic-capture timestamp across the matching truepics on the remote inspection, ISO 8601. */
9709
+ first_match_at: string;
9710
+ inspection_id: number;
9711
+ /** @description Truepic IDs on **this** inspection whose extracted value triggered this remote match. Always non-empty for entries present in `inspections[]`. */
9712
+ triggered_by_truepic_ids: number[];
9713
+ };
8831
9714
  /** @description The request body for PUT /text/reminder-to-finish */
8832
9715
  SendFinishReminderTextBody: components["schemas"]["SendWelcomeTextBody"];
8833
9716
  /** @description The response body for PUT /text/reminder-to-finish */
@@ -8855,7 +9738,12 @@ export interface components {
8855
9738
  };
8856
9739
  /** @description The request body for PUT /text/request */
8857
9740
  SendRequestMoreTextBody: {
8858
- include_list?: unknown;
9741
+ /**
9742
+ * @description Set to true when sending list items in the `list` property.
9743
+ * @default false
9744
+ * @example true
9745
+ */
9746
+ include_list: boolean;
8859
9747
  /**
8860
9748
  * @description The id of the inspection
8861
9749
  * @example 123
@@ -8940,7 +9828,16 @@ export interface components {
8940
9828
  name: string;
8941
9829
  };
8942
9830
  SerializedInspection: {
9831
+ ai_analysis_status?: components["schemas"]["AIAnalysisStatus"];
9832
+ ai_inspection_additional_details?: components["schemas"]["AIInspectionItemAdditionalDetailsResult"] | unknown;
9833
+ /** @description The reviewing member user's latest consolidated verdict feedback (all surfaces), surfaced on GET /inspections/{id}. Null when no feedback has been submitted. */
9834
+ ai_inspection_feedback?: components["schemas"]["AIInspectionFeedback"] | unknown;
9835
+ /** @description Populated by `inspection-ai-items-populator` only — present when the populator was constructed with `includeAIItems: true`. */
9836
+ ai_inspection_items?: components["schemas"]["PopulatedAIInspectionItem"][];
9837
+ /** @description Per-inspection lock for the AI Analysis Configuration "inspection items" pipeline. Null until the first AI run resolves it from global_configs.VISION_AI_INSPECTION_ITEMS_PIPELINE_ID under FOR UPDATE; immutable thereafter so the audit chain attaches to a single pipeline even if the global config is later changed. Spec §2.7, §3.4. */
9838
+ ai_inspection_items_pipeline_id: number | null;
8943
9839
  ai_inspection_ready_result?: components["schemas"]["AIInspectionReadyResult"] | unknown;
9840
+ ai_item_type_instances?: components["schemas"]["PopulatedAIItemTypeInstance"][];
8944
9841
  /**
8945
9842
  * @description The AI analysis result for this inspection.
8946
9843
  * @example pass
@@ -8948,20 +9845,26 @@ export interface components {
8948
9845
  ai_status?: components["schemas"]["VerificationResult"];
8949
9846
  /** @description The details of the AI status for this inspection. This may include information about the criteria evaluation, any inconsistencies detected, and more. */
8950
9847
  ai_status_details?: components["schemas"]["AIStatusDetails"];
8951
- /**
8952
- * @description The reason for the AI analysis result for this inspection.
8953
- * @example COMPLETE_WITH_NO_INCONSISTENCIES
8954
- */
8955
- ai_status_reason?: components["schemas"]["AIStatusReason"];
8956
9848
  ai_user_criteria_result?: components["schemas"]["AIUserCriteriaResult"] | unknown;
8957
9849
  alert: components["schemas"]["InspectionAlertResult"];
8958
- app_opened: unknown;
9850
+ /**
9851
+ * @description Whether the Vision app has been opened by the customer
9852
+ * @default false
9853
+ * @example true
9854
+ */
9855
+ app_opened: boolean;
8959
9856
  assigned_to_member_user: components["schemas"]["User"];
8960
9857
  /**
8961
9858
  * @description The id of the user this inspection is assigned to.
8962
9859
  * @example 19
8963
9860
  */
8964
9861
  assigned_to_member_user_id: number;
9862
+ /**
9863
+ * Format: date-time
9864
+ * @description The date/time the inspection was closed. `null` if not closed.
9865
+ * @example 2020-05-01T21:44:40.000Z
9866
+ */
9867
+ closed_at?: string | null;
8965
9868
  /**
8966
9869
  * Format: date-time
8967
9870
  * @description The date/time the resource was created
@@ -9023,6 +9926,10 @@ export interface components {
9023
9926
  * @example 3028675309
9024
9927
  */
9025
9928
  customer_phone_number?: string;
9929
+ customer_token_status: {
9930
+ expires?: number | null;
9931
+ is_valid: boolean;
9932
+ };
9026
9933
  /**
9027
9934
  * Format: date-time
9028
9935
  * @description The date/time the inspection was deleted. `null` if not deleted.
@@ -9035,12 +9942,20 @@ export interface components {
9035
9942
  */
9036
9943
  deleted_by_user_id?: number | null;
9037
9944
  devices: components["schemas"]["InspectionDeviceInfo"][];
9945
+ /** @description VISION-1427: in-org DOT TIN reuse rollup. Absent when the `reuse_detection` org feature flag is off or the populator detects no matches. */
9946
+ dot_tin_reuse?: components["schemas"]["ReuseRollup"];
9038
9947
  /**
9039
9948
  * Format: date-time
9040
9949
  * @description The datetime an email automated reply was sent
9041
9950
  * @example 2023-01-04 15:11:39.642
9042
9951
  */
9043
9952
  email_auto_reply_sent?: string;
9953
+ /**
9954
+ * Format: date-time
9955
+ * @description The date/time the inspection token expires. Updated each time a new token is issued.
9956
+ * @example 2020-05-01T21:44:40.000Z
9957
+ */
9958
+ expires_at?: string | null;
9044
9959
  group?: components["schemas"]["Group"];
9045
9960
  /**
9046
9961
  * @description The id of the group this inspection is for.
@@ -9130,7 +10045,12 @@ export interface components {
9130
10045
  * @example 1000
9131
10046
  */
9132
10047
  is_address_required: boolean;
9133
- is_deleted: unknown;
10048
+ /**
10049
+ * @description Whether this inspection type is deleted
10050
+ * @default false
10051
+ * @example true
10052
+ */
10053
+ is_deleted: boolean;
9134
10054
  /**
9135
10055
  * @description When true, the list associated with this inspection type cannot be changed
9136
10056
  * @example false
@@ -9171,7 +10091,12 @@ export interface components {
9171
10091
  */
9172
10092
  inspection_id?: number;
9173
10093
  inspection_types: components["schemas"]["InspectionType"][];
9174
- is_deleted: unknown;
10094
+ /**
10095
+ * @description Whether or not this list has been soft-deleted
10096
+ * @default false
10097
+ * @example true
10098
+ */
10099
+ is_deleted: boolean;
9175
10100
  items: components["schemas"]["ListItem"][];
9176
10101
  /**
9177
10102
  * @description The auto-generated name of the list.
@@ -9275,8 +10200,18 @@ export interface components {
9275
10200
  * @example 12
9276
10201
  */
9277
10202
  inspection_type_id: number;
9278
- is_deleted: unknown;
9279
- is_expired: unknown;
10203
+ /**
10204
+ * @description Represents if the inspection has been soft-deleted
10205
+ * @default false
10206
+ * @example true
10207
+ */
10208
+ is_deleted: boolean;
10209
+ /**
10210
+ * @description Whether the inspection has expired
10211
+ * @default false
10212
+ * @example true
10213
+ */
10214
+ is_expired: boolean;
9280
10215
  list: {
9281
10216
  /**
9282
10217
  * @description The groups of items in the list
@@ -9353,7 +10288,7 @@ export interface components {
9353
10288
  /** @description The method(s) to send the inspection request to the customer completing the inspection. */
9354
10289
  send_methods: {
9355
10290
  /**
9356
- * @description When true, will send text messages to the customer_email_address
10291
+ * @description When true, will send emails to the customer_email_address
9357
10292
  * @example false
9358
10293
  */
9359
10294
  email: boolean;
@@ -9469,7 +10404,12 @@ export interface components {
9469
10404
  * @example 4335
9470
10405
  */
9471
10406
  inspection_id: number;
9472
- is_deleted?: unknown;
10407
+ /**
10408
+ * @description Whether or not this action has been soft-deleted
10409
+ * @default false
10410
+ * @example true
10411
+ */
10412
+ is_deleted: boolean;
9473
10413
  location: components["schemas"]["PopulatedLocation"];
9474
10414
  /**
9475
10415
  * @description The id of the location record
@@ -9506,10 +10446,8 @@ export interface components {
9506
10446
  * @example pass
9507
10447
  */
9508
10448
  verification_result?: components["schemas"]["VerificationResult"];
9509
- organization_token_status: {
9510
- expires?: number | null;
9511
- is_valid: boolean;
9512
- };
10449
+ /** @description VISION-1427: in-org VIN reuse rollup. Absent when the `reuse_detection` org feature flag is off or the populator detects no matches. */
10450
+ vin_reuse?: components["schemas"]["ReuseRollup"];
9513
10451
  };
9514
10452
  /** @description A user object that's been serialized for the client. This is usually the object returned from the API and is used for client-side rendering. */
9515
10453
  SerializedUser: {
@@ -9588,7 +10526,12 @@ export interface components {
9588
10526
  * @example 1843
9589
10527
  */
9590
10528
  id: number;
9591
- is_mfa_required: unknown;
10529
+ /**
10530
+ * @description Whether multi-factor authentication is required for user login.
10531
+ * @default false
10532
+ * @example true
10533
+ */
10534
+ is_mfa_required: boolean;
9592
10535
  /**
9593
10536
  * @description The name of the organization.
9594
10537
  * @example Quality Capital
@@ -9643,6 +10586,7 @@ export interface components {
9643
10586
  name?: string;
9644
10587
  }[];
9645
10588
  };
10589
+ Source: components["schemas"]["PhotoTextSource"] | components["schemas"]["PhotoDetectedSource"] | components["schemas"]["AISuggestedSource"] | components["schemas"]["OrganizationStatedSource"] | components["schemas"]["WebLookupSource"];
9646
10590
  SubmitItemDetailsToolCallParams: {
9647
10591
  auditor_notes: string;
9648
10592
  criteria_results: {
@@ -9690,6 +10634,16 @@ export interface components {
9690
10634
  */
9691
10635
  response_code: number;
9692
10636
  };
10637
+ /** @description Records a rerun verdict that was suppressed in favor of the prior value (VISION-2126). When an `open_answer` field re-runs without genuinely-new evidence, the persisted columns keep the prior value, but the verdict the rerun actually produced is preserved here in the field's `audit_json` so the suppressed answer (and its dissent) isn't lost. The `dissenters` that belong to this rerun live on this entry rather than on the row, keeping the row's own `dissenters` aligned with its (prior) value. */
10638
+ SuppressedExtractionAuditEntry: {
10639
+ confidence: number | null;
10640
+ dissenters: components["schemas"]["Dissenter"][];
10641
+ kind: string;
10642
+ reasoning: string | null;
10643
+ sources: components["schemas"]["Source"][];
10644
+ status: components["schemas"]["FieldStatus"];
10645
+ value: string | string[] | unknown;
10646
+ };
9693
10647
  /** @description A Team that exists under an organization in Vision that sends out inspection requests */
9694
10648
  Team: {
9695
10649
  /**
@@ -9780,6 +10734,11 @@ export interface components {
9780
10734
  */
9781
10735
  web_camera: boolean;
9782
10736
  };
10737
+ /**
10738
+ * @description An identifier from an external system used to reference the team. It must be unique within an organization when set.
10739
+ * @example X50100039
10740
+ */
10741
+ external_id?: string | null;
9783
10742
  /**
9784
10743
  * @description The accuracy threshold that GPS coordinates must not exceed in meters.
9785
10744
  * @example 1500
@@ -9795,8 +10754,18 @@ export interface components {
9795
10754
  * @example 1843
9796
10755
  */
9797
10756
  id: number;
9798
- include_list?: unknown;
9799
- is_deleted: unknown;
10757
+ /**
10758
+ * @description Whether to include the inspection type's list by default with new inspection requests.
10759
+ * @default false
10760
+ * @example true
10761
+ */
10762
+ include_list: boolean;
10763
+ /**
10764
+ * @description Whether or not this config has been soft-deleted
10765
+ * @default false
10766
+ * @example true
10767
+ */
10768
+ is_deleted: boolean;
9800
10769
  /**
9801
10770
  * @description The amount of time before an admin member's login token when switching teams expires. Any format supported by https://github.com/vercel/ms is valid.
9802
10771
  * @default 72h
@@ -9879,7 +10848,12 @@ export interface components {
9879
10848
  * @example 2020-05-01T21:44:40.000Z
9880
10849
  */
9881
10850
  updated_at: string;
9882
- video_enabled?: unknown;
10851
+ /**
10852
+ * @description Whether video is enabled as a capture method in the app.
10853
+ * @default false
10854
+ * @example true
10855
+ */
10856
+ video_enabled: boolean;
9883
10857
  };
9884
10858
  TeamPayload: {
9885
10859
  /**
@@ -9970,6 +10944,11 @@ export interface components {
9970
10944
  */
9971
10945
  web_camera: boolean;
9972
10946
  };
10947
+ /**
10948
+ * @description An identifier from an external system used to reference the team. It must be unique within an organization when set.
10949
+ * @example X50100039
10950
+ */
10951
+ external_id?: string | null;
9973
10952
  /**
9974
10953
  * @description The accuracy threshold that GPS coordinates must not exceed in meters.
9975
10954
  * @example 1500
@@ -9985,8 +10964,18 @@ export interface components {
9985
10964
  * @example 1843
9986
10965
  */
9987
10966
  id?: number;
9988
- include_list?: unknown;
9989
- is_deleted?: unknown;
10967
+ /**
10968
+ * @description Whether to include the inspection type's list by default with new inspection requests.
10969
+ * @default false
10970
+ * @example true
10971
+ */
10972
+ include_list: boolean;
10973
+ /**
10974
+ * @description Whether or not this config has been soft-deleted
10975
+ * @default false
10976
+ * @example true
10977
+ */
10978
+ is_deleted: boolean;
9990
10979
  /**
9991
10980
  * @description The amount of time before an admin member's login token when switching teams expires. Any format supported by https://github.com/vercel/ms is valid.
9992
10981
  * @default 72h
@@ -10072,7 +11061,12 @@ export interface components {
10072
11061
  * @example 2020-05-01T21:44:40.000Z
10073
11062
  */
10074
11063
  updated_at?: string;
10075
- video_enabled?: unknown;
11064
+ /**
11065
+ * @description Whether video is enabled as a capture method in the app.
11066
+ * @default false
11067
+ * @example true
11068
+ */
11069
+ video_enabled: boolean;
10076
11070
  };
10077
11071
  TeamWebhookDBPayload: {
10078
11072
  /**
@@ -10402,7 +11396,12 @@ export interface components {
10402
11396
  * @example true
10403
11397
  */
10404
11398
  is_enabled: boolean;
10405
- is_required: unknown;
11399
+ /**
11400
+ * @description When true, the user must supply a value for this custom field in order to create an inspection
11401
+ * @default false
11402
+ * @example true
11403
+ */
11404
+ is_required: boolean;
10406
11405
  /** @description The label for the custom field */
10407
11406
  label?: string;
10408
11407
  };
@@ -10453,11 +11452,11 @@ export interface components {
10453
11452
  */
10454
11453
  custom_field_values?: string[];
10455
11454
  /** @description The address where the inspection will be performed. */
10456
- customer_address?: string;
11455
+ customer_address: string;
10457
11456
  /** @description The latitude of the address where the inspection will be performed. */
10458
- customer_address_lat?: string;
11457
+ customer_address_lat: string;
10459
11458
  /** @description The longitude of the address where the inspection will be performed. */
10460
- customer_address_lng?: string;
11459
+ customer_address_lng: string;
10461
11460
  /**
10462
11461
  * Format: email
10463
11462
  * @description The email address of the customer completing the inspection. Required if `send_methods.email` is `true`.
@@ -10490,7 +11489,12 @@ export interface components {
10490
11489
  * @example 3028675309
10491
11490
  */
10492
11491
  customer_phone_number?: string;
10493
- include_list?: unknown;
11492
+ /**
11493
+ * @description Must be true when including `list`.
11494
+ * @default false
11495
+ * @example false
11496
+ */
11497
+ include_list: boolean;
10494
11498
  /**
10495
11499
  * @description Free-form inspection-ready criteria text. Max length 10KB.
10496
11500
  * @example Capture all rooms and appliances.
@@ -10544,7 +11548,7 @@ export interface components {
10544
11548
  /** @description The method(s) to send the inspection request to the customer completing the inspection. */
10545
11549
  send_methods?: {
10546
11550
  /**
10547
- * @description When true, will send text messages to the customer_email_address
11551
+ * @description When true, will send emails to the customer_email_address
10548
11552
  * @example false
10549
11553
  */
10550
11554
  email: boolean;
@@ -10580,6 +11584,87 @@ export interface components {
10580
11584
  id: number;
10581
11585
  };
10582
11586
  };
11587
+ /** @description Request Body for PUT /inspection-types/{inspectionTypeId} */
11588
+ UpdateInspectionTypeBody: {
11589
+ /**
11590
+ * @description the id of the user who created this inspection type. References `users.id`
11591
+ * @example 2343
11592
+ */
11593
+ created_by_member_user_id?: number;
11594
+ /** @description An array of custom fields that are used by this inspection type */
11595
+ custom_fields?: components["schemas"]["CustomField"][];
11596
+ /**
11597
+ * @description The id of the inspection alert configuration that is used by this inspection type. References `inspection_alert_configs.id`
11598
+ * @example 539
11599
+ */
11600
+ inspection_alert_config_id?: number;
11601
+ /**
11602
+ * @description Optional inspection-ready criteria text for this inspection type.
11603
+ * @example Capture the VIN plate clearly and include a full odometer photo.
11604
+ */
11605
+ inspection_ready_criteria_text?: string | null;
11606
+ /**
11607
+ * @description Controls whether an address is required for the inspection or not
11608
+ * @example 1000
11609
+ */
11610
+ is_address_required?: boolean;
11611
+ /**
11612
+ * @description When true, the list associated with this inspection type cannot be changed
11613
+ * @example false
11614
+ */
11615
+ is_list_locked?: boolean;
11616
+ /** @description The IETF language tag for the intended language of the inspection. Non-customizable text in emails will use the language specified here. */
11617
+ language?: components["schemas"]["LocalizationLanguages"];
11618
+ /**
11619
+ * @description The id of the list that is used by this inspection type. References `lists.id`
11620
+ * @example 3345
11621
+ */
11622
+ list_id?: number;
11623
+ /**
11624
+ * @description the maximum distance away from the configured inspection address that an inspection can be completed in meters.
11625
+ * @example 1000
11626
+ */
11627
+ max_distance_from_address_threshold?: number;
11628
+ /**
11629
+ * @description The id of the message template set that is used by this inspection type. References `message_template_sets.id`
11630
+ * @example 539
11631
+ */
11632
+ message_template_set_id?: number;
11633
+ /**
11634
+ * @description the id of the user who last modified this inspection type. References `users.id`
11635
+ * @example 2343
11636
+ */
11637
+ modified_by_member_user_id?: number;
11638
+ /**
11639
+ * @description The name of the inspection type
11640
+ * @example My Type
11641
+ */
11642
+ name?: string;
11643
+ /**
11644
+ * @description The id of the outcome set that is used by this inspection type. References `outcome_sets.id`
11645
+ * @example 539
11646
+ */
11647
+ outcome_set_id?: number;
11648
+ /**
11649
+ * @description The teams that are allowed to use this inspection type. Pass each team as an object containing its `id`. Passing an empty array removes all team associations.
11650
+ * @example [
11651
+ * {
11652
+ * "id": 12
11653
+ * },
11654
+ * {
11655
+ * "id": 24
11656
+ * }
11657
+ * ]
11658
+ */
11659
+ teams?: {
11660
+ id: number;
11661
+ }[];
11662
+ /**
11663
+ * @description When true, there is only one name for the user to fill out rather than a separate first name and last name field
11664
+ * @example true
11665
+ */
11666
+ use_single_name_field?: boolean;
11667
+ };
10583
11668
  UpdateInternalNoteBody: components["schemas"]["CreateInternalNoteBody"];
10584
11669
  UpdateLandingPageBody: {
10585
11670
  /**
@@ -10885,6 +11970,62 @@ export interface components {
10885
11970
  * @enum {string}
10886
11971
  */
10887
11972
  VisionRole: "SUPER_ADMIN" | "VISION_AGENT_ADMIN" | "VISION_AGENT" | "VISION_CONSUMER" | "AUTH0_BOT" | "WEBSITE_FORM_BOT" | "GROUP_AGENT" | "VISION_AGENT_OWN_INSPECTIONS" | "VIEW_ONLY" | "VISION_AGENT_REPORT";
11973
+ /** @description A citation backed by a provider-side web call — any of the registered provider tools (Google Search grounding, URL fetching, web search). Surfaces per VISION-1850. */
11974
+ WebLookupSource: {
11975
+ /** @description Excerpt or snippet from the cited content; absent when the provider didn't return one. */
11976
+ snippet?: string;
11977
+ /** @description Page/document title from the provider's grounding metadata. Absent when the provider didn't return one. */
11978
+ title?: string;
11979
+ type: string;
11980
+ /** @description URI of the page or document the model relied on. One URI per source — multiple supporting URIs become multiple `web_lookup` entries. */
11981
+ uri: string;
11982
+ };
11983
+ WebsiteFormBearerSerialized: {
11984
+ inspection_types: {
11985
+ /** @description An array of custom fields that are used by this inspection type */
11986
+ custom_fields: components["schemas"]["CustomField"][];
11987
+ /**
11988
+ * @description The id of the inspection type
11989
+ * @example 1843
11990
+ */
11991
+ id: number;
11992
+ /**
11993
+ * @description Controls whether an address is required for the inspection or not
11994
+ * @example 1000
11995
+ */
11996
+ is_address_required: boolean;
11997
+ /**
11998
+ * @description The name of the inspection type
11999
+ * @example My Type
12000
+ */
12001
+ name: string;
12002
+ /**
12003
+ * @description When true, there is only one name for the user to fill out rather than a separate first name and last name field
12004
+ * @example true
12005
+ */
12006
+ use_single_name_field: boolean;
12007
+ }[];
12008
+ /**
12009
+ * @description Whether the email field is required on the website form. Defaults to `false`.
12010
+ * @example false
12011
+ */
12012
+ is_email_required: boolean;
12013
+ /**
12014
+ * @description Whether the phone field is required on the website form. Defaults to `false`.
12015
+ * @example false
12016
+ */
12017
+ is_phone_required: boolean;
12018
+ /**
12019
+ * @description Whether the address field should be shown on the website form when it is optional. The field is always shown if it is required by the inspection type. Defaults to `false`.
12020
+ * @example false
12021
+ */
12022
+ should_show_address: boolean;
12023
+ /**
12024
+ * @description The unique token used by the website form to authenticate with the API.
12025
+ * @example -SQuSE62r4ISFCE4EOOTtu3yx1SW8i6PE7VMZwvVZ8TNyliC
12026
+ */
12027
+ token: string;
12028
+ };
10888
12029
  WebsiteFormInspectionSerialized: {
10889
12030
  can_email: boolean;
10890
12031
  can_text: boolean;
@@ -11017,6 +12158,17 @@ export interface components {
11017
12158
  */
11018
12159
  updated_at: string;
11019
12160
  };
12161
+ /** @description V1 emits two intake_field values; additional values are reserved for post-V1. */
12162
+ OrganizationStatedSource: {
12163
+ /** @enum {string} */
12164
+ intake_field: "comment" | "list_item_answer";
12165
+ /** @description Present when intake_field='list_item_answer' — the answered list_items.id values. */
12166
+ list_item_ids?: number[];
12167
+ string: string;
12168
+ /** @description Present when intake_field='comment' — the capture(s) the comment is on. */
12169
+ truepic_ids?: number[];
12170
+ type: string;
12171
+ };
11020
12172
  };
11021
12173
  responses: {
11022
12174
  /** @description The request body couldn't be parsed. */