@claritylabs/cl-sdk 0.5.0 → 0.7.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.
package/dist/index.d.mts CHANGED
@@ -1,3 +1,4 @@
1
+ import * as zod from 'zod';
1
2
  import { ZodSchema, z } from 'zod';
2
3
  import { PDFDocument } from 'pdf-lib';
3
4
 
@@ -55,6 +56,81 @@ declare function stripFences(text: string): string;
55
56
  */
56
57
  declare function sanitizeNulls<T>(obj: T): T;
57
58
 
59
+ interface SafeGenerateOptions<T> {
60
+ /** Return this value instead of throwing when all retries are exhausted. */
61
+ fallback?: T;
62
+ /** Number of retries for non-rate-limit errors (schema validation, malformed response). Default 1. */
63
+ maxRetries?: number;
64
+ /** Called on each error for observability. */
65
+ onError?: (error: unknown, attempt: number) => void;
66
+ /** Logger for pipeline status messages. */
67
+ log?: LogFn;
68
+ }
69
+ interface SafeGenerateParams {
70
+ prompt: string;
71
+ system?: string;
72
+ maxTokens: number;
73
+ providerOptions?: Record<string, unknown>;
74
+ }
75
+ /**
76
+ * Wraps a `generateObject` call with two layers of resilience:
77
+ *
78
+ * 1. Inner: `withRetry` handles 429 / rate-limit errors with exponential backoff
79
+ * 2. Outer: catches all other errors (schema validation, malformed JSON, transient API errors)
80
+ * and retries up to `maxRetries` times. If all retries fail, returns `fallback` (if provided)
81
+ * or re-throws.
82
+ *
83
+ * This prevents a single malformed LLM response from crashing an entire pipeline.
84
+ */
85
+ declare function safeGenerateObject<T>(generateObject: GenerateObject<T>, params: SafeGenerateParams & {
86
+ schema: zod.ZodSchema<T>;
87
+ }, options?: SafeGenerateOptions<T>): Promise<{
88
+ object: T;
89
+ usage?: TokenUsage;
90
+ }>;
91
+
92
+ /**
93
+ * Lightweight checkpoint system for agent pipelines.
94
+ *
95
+ * Allows pipelines to save state at phase boundaries and resume from the
96
+ * last successful checkpoint if a later phase fails.
97
+ */
98
+ interface PipelineCheckpoint<TState> {
99
+ /** Phase name that produced this checkpoint (e.g. "classify", "extract"). */
100
+ phase: string;
101
+ /** Serializable pipeline state at this point. */
102
+ state: TState;
103
+ /** When the checkpoint was saved. */
104
+ timestamp: number;
105
+ }
106
+ interface PipelineContext<TState> {
107
+ /** Pipeline run identifier. */
108
+ readonly id: string;
109
+ /** Save a checkpoint after completing a phase. */
110
+ save(phase: string, state: TState): Promise<void>;
111
+ /** Get the most recent checkpoint (from resume or latest save). */
112
+ getCheckpoint(): PipelineCheckpoint<TState> | undefined;
113
+ /** Check if a given phase was already completed (for skip-on-resume). */
114
+ isPhaseComplete(phase: string): boolean;
115
+ /** Clear all checkpoints (e.g. on successful pipeline completion). */
116
+ clear(): void;
117
+ }
118
+ interface PipelineContextOptions<TState> {
119
+ /** Pipeline run identifier. */
120
+ id: string;
121
+ /** Optional callback to persist checkpoints externally (database, file, etc.). */
122
+ onSave?: (checkpoint: PipelineCheckpoint<TState>) => Promise<void>;
123
+ /** Resume from a previously saved checkpoint. */
124
+ resumeFrom?: PipelineCheckpoint<TState>;
125
+ }
126
+ /**
127
+ * Create a pipeline context for checkpoint-based save/resume.
128
+ *
129
+ * In-memory by default. Consumers can provide `onSave` to persist checkpoints
130
+ * to external storage and `resumeFrom` to resume from a prior checkpoint.
131
+ */
132
+ declare function createPipelineContext<TState>(opts: PipelineContextOptions<TState>): PipelineContext<TState>;
133
+
58
134
  declare const PolicyTypeSchema: z.ZodEnum<["general_liability", "commercial_property", "commercial_auto", "non_owned_auto", "workers_comp", "umbrella", "excess_liability", "professional_liability", "cyber", "epli", "directors_officers", "fiduciary_liability", "crime_fidelity", "inland_marine", "builders_risk", "environmental", "ocean_marine", "surety", "product_liability", "bop", "management_liability_package", "property", "homeowners_ho3", "homeowners_ho5", "renters_ho4", "condo_ho6", "dwelling_fire", "mobile_home", "personal_auto", "personal_umbrella", "flood_nfip", "flood_private", "earthquake", "personal_inland_marine", "watercraft", "recreational_vehicle", "farm_ranch", "pet", "travel", "identity_theft", "title", "other"]>;
59
135
  type PolicyType = z.infer<typeof PolicyTypeSchema>;
60
136
  declare const POLICY_TYPES: ["general_liability", "commercial_property", "commercial_auto", "non_owned_auto", "workers_comp", "umbrella", "excess_liability", "professional_liability", "cyber", "epli", "directors_officers", "fiduciary_liability", "crime_fidelity", "inland_marine", "builders_risk", "environmental", "ocean_marine", "surety", "product_liability", "bop", "management_liability_package", "property", "homeowners_ho3", "homeowners_ho5", "renters_ho4", "condo_ho6", "dwelling_fire", "mobile_home", "personal_auto", "personal_umbrella", "flood_nfip", "flood_private", "earthquake", "personal_inland_marine", "watercraft", "recreational_vehicle", "farm_ranch", "pet", "travel", "identity_theft", "title", "other"];
@@ -686,24 +762,49 @@ declare const ExclusionSchema: z.ZodObject<{
686
762
  }>;
687
763
  type Exclusion = z.infer<typeof ExclusionSchema>;
688
764
 
765
+ declare const ConditionKeyValueSchema: z.ZodObject<{
766
+ key: z.ZodString;
767
+ value: z.ZodString;
768
+ }, "strip", z.ZodTypeAny, {
769
+ key: string;
770
+ value: string;
771
+ }, {
772
+ key: string;
773
+ value: string;
774
+ }>;
689
775
  declare const PolicyConditionSchema: z.ZodObject<{
690
776
  name: z.ZodString;
691
777
  conditionType: z.ZodEnum<["duties_after_loss", "notice_requirements", "other_insurance", "cancellation", "nonrenewal", "transfer_of_rights", "liberalization", "arbitration", "concealment_fraud", "examination_under_oath", "legal_action", "loss_payment", "appraisal", "mortgage_holders", "policy_territory", "separation_of_insureds", "other"]>;
692
778
  content: z.ZodString;
693
- keyValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
779
+ keyValues: z.ZodOptional<z.ZodArray<z.ZodObject<{
780
+ key: z.ZodString;
781
+ value: z.ZodString;
782
+ }, "strip", z.ZodTypeAny, {
783
+ key: string;
784
+ value: string;
785
+ }, {
786
+ key: string;
787
+ value: string;
788
+ }>, "many">>;
694
789
  pageNumber: z.ZodOptional<z.ZodNumber>;
695
790
  }, "strip", z.ZodTypeAny, {
696
791
  name: string;
697
792
  content: string;
698
793
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
699
794
  pageNumber?: number | undefined;
700
- keyValues?: Record<string, string> | undefined;
795
+ keyValues?: {
796
+ key: string;
797
+ value: string;
798
+ }[] | undefined;
701
799
  }, {
702
800
  name: string;
703
801
  content: string;
704
802
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
705
803
  pageNumber?: number | undefined;
706
- keyValues?: Record<string, string> | undefined;
804
+ keyValues?: {
805
+ key: string;
806
+ value: string;
807
+ }[] | undefined;
707
808
  }>;
708
809
  type PolicyCondition = z.infer<typeof PolicyConditionSchema>;
709
810
 
@@ -1570,6 +1671,7 @@ declare const PersonalVehicleDetailsSchema: z.ZodObject<{
1570
1671
  towing: z.ZodOptional<z.ZodBoolean>;
1571
1672
  }, "strip", z.ZodTypeAny, {
1572
1673
  number?: number | undefined;
1674
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
1573
1675
  year?: number | undefined;
1574
1676
  make?: string | undefined;
1575
1677
  model?: string | undefined;
@@ -1583,7 +1685,6 @@ declare const PersonalVehicleDetailsSchema: z.ZodObject<{
1583
1685
  street2?: string | undefined;
1584
1686
  country?: string | undefined;
1585
1687
  } | undefined;
1586
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
1587
1688
  annualMileage?: number | undefined;
1588
1689
  odometerReading?: number | undefined;
1589
1690
  driverAssignment?: string | undefined;
@@ -1607,6 +1708,7 @@ declare const PersonalVehicleDetailsSchema: z.ZodObject<{
1607
1708
  towing?: boolean | undefined;
1608
1709
  }, {
1609
1710
  number?: number | undefined;
1711
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
1610
1712
  year?: number | undefined;
1611
1713
  make?: string | undefined;
1612
1714
  model?: string | undefined;
@@ -1620,7 +1722,6 @@ declare const PersonalVehicleDetailsSchema: z.ZodObject<{
1620
1722
  street2?: string | undefined;
1621
1723
  country?: string | undefined;
1622
1724
  } | undefined;
1623
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
1624
1725
  annualMileage?: number | undefined;
1625
1726
  odometerReading?: number | undefined;
1626
1727
  driverAssignment?: string | undefined;
@@ -2053,6 +2154,7 @@ declare const PersonalAutoDeclarationsSchema: z.ZodObject<{
2053
2154
  towing: z.ZodOptional<z.ZodBoolean>;
2054
2155
  }, "strip", z.ZodTypeAny, {
2055
2156
  number?: number | undefined;
2157
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
2056
2158
  year?: number | undefined;
2057
2159
  make?: string | undefined;
2058
2160
  model?: string | undefined;
@@ -2066,7 +2168,6 @@ declare const PersonalAutoDeclarationsSchema: z.ZodObject<{
2066
2168
  street2?: string | undefined;
2067
2169
  country?: string | undefined;
2068
2170
  } | undefined;
2069
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
2070
2171
  annualMileage?: number | undefined;
2071
2172
  odometerReading?: number | undefined;
2072
2173
  driverAssignment?: string | undefined;
@@ -2090,6 +2191,7 @@ declare const PersonalAutoDeclarationsSchema: z.ZodObject<{
2090
2191
  towing?: boolean | undefined;
2091
2192
  }, {
2092
2193
  number?: number | undefined;
2194
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
2093
2195
  year?: number | undefined;
2094
2196
  make?: string | undefined;
2095
2197
  model?: string | undefined;
@@ -2103,7 +2205,6 @@ declare const PersonalAutoDeclarationsSchema: z.ZodObject<{
2103
2205
  street2?: string | undefined;
2104
2206
  country?: string | undefined;
2105
2207
  } | undefined;
2106
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
2107
2208
  annualMileage?: number | undefined;
2108
2209
  odometerReading?: number | undefined;
2109
2210
  driverAssignment?: string | undefined;
@@ -2256,6 +2357,7 @@ declare const PersonalAutoDeclarationsSchema: z.ZodObject<{
2256
2357
  line: "personal_auto";
2257
2358
  vehicles: {
2258
2359
  number?: number | undefined;
2360
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
2259
2361
  year?: number | undefined;
2260
2362
  make?: string | undefined;
2261
2363
  model?: string | undefined;
@@ -2269,7 +2371,6 @@ declare const PersonalAutoDeclarationsSchema: z.ZodObject<{
2269
2371
  street2?: string | undefined;
2270
2372
  country?: string | undefined;
2271
2373
  } | undefined;
2272
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
2273
2374
  annualMileage?: number | undefined;
2274
2375
  odometerReading?: number | undefined;
2275
2376
  driverAssignment?: string | undefined;
@@ -2336,6 +2437,7 @@ declare const PersonalAutoDeclarationsSchema: z.ZodObject<{
2336
2437
  line: "personal_auto";
2337
2438
  vehicles: {
2338
2439
  number?: number | undefined;
2440
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
2339
2441
  year?: number | undefined;
2340
2442
  make?: string | undefined;
2341
2443
  model?: string | undefined;
@@ -2349,7 +2451,6 @@ declare const PersonalAutoDeclarationsSchema: z.ZodObject<{
2349
2451
  street2?: string | undefined;
2350
2452
  country?: string | undefined;
2351
2453
  } | undefined;
2352
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
2353
2454
  annualMileage?: number | undefined;
2354
2455
  odometerReading?: number | undefined;
2355
2456
  driverAssignment?: string | undefined;
@@ -4245,6 +4346,7 @@ declare const DeclarationsSchema: z.ZodDiscriminatedUnion<"line", [z.ZodObject<{
4245
4346
  towing: z.ZodOptional<z.ZodBoolean>;
4246
4347
  }, "strip", z.ZodTypeAny, {
4247
4348
  number?: number | undefined;
4349
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
4248
4350
  year?: number | undefined;
4249
4351
  make?: string | undefined;
4250
4352
  model?: string | undefined;
@@ -4258,7 +4360,6 @@ declare const DeclarationsSchema: z.ZodDiscriminatedUnion<"line", [z.ZodObject<{
4258
4360
  street2?: string | undefined;
4259
4361
  country?: string | undefined;
4260
4362
  } | undefined;
4261
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
4262
4363
  annualMileage?: number | undefined;
4263
4364
  odometerReading?: number | undefined;
4264
4365
  driverAssignment?: string | undefined;
@@ -4282,6 +4383,7 @@ declare const DeclarationsSchema: z.ZodDiscriminatedUnion<"line", [z.ZodObject<{
4282
4383
  towing?: boolean | undefined;
4283
4384
  }, {
4284
4385
  number?: number | undefined;
4386
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
4285
4387
  year?: number | undefined;
4286
4388
  make?: string | undefined;
4287
4389
  model?: string | undefined;
@@ -4295,7 +4397,6 @@ declare const DeclarationsSchema: z.ZodDiscriminatedUnion<"line", [z.ZodObject<{
4295
4397
  street2?: string | undefined;
4296
4398
  country?: string | undefined;
4297
4399
  } | undefined;
4298
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
4299
4400
  annualMileage?: number | undefined;
4300
4401
  odometerReading?: number | undefined;
4301
4402
  driverAssignment?: string | undefined;
@@ -4448,6 +4549,7 @@ declare const DeclarationsSchema: z.ZodDiscriminatedUnion<"line", [z.ZodObject<{
4448
4549
  line: "personal_auto";
4449
4550
  vehicles: {
4450
4551
  number?: number | undefined;
4552
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
4451
4553
  year?: number | undefined;
4452
4554
  make?: string | undefined;
4453
4555
  model?: string | undefined;
@@ -4461,7 +4563,6 @@ declare const DeclarationsSchema: z.ZodDiscriminatedUnion<"line", [z.ZodObject<{
4461
4563
  street2?: string | undefined;
4462
4564
  country?: string | undefined;
4463
4565
  } | undefined;
4464
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
4465
4566
  annualMileage?: number | undefined;
4466
4567
  odometerReading?: number | undefined;
4467
4568
  driverAssignment?: string | undefined;
@@ -4528,6 +4629,7 @@ declare const DeclarationsSchema: z.ZodDiscriminatedUnion<"line", [z.ZodObject<{
4528
4629
  line: "personal_auto";
4529
4630
  vehicles: {
4530
4631
  number?: number | undefined;
4632
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
4531
4633
  year?: number | undefined;
4532
4634
  make?: string | undefined;
4533
4635
  model?: string | undefined;
@@ -4541,7 +4643,6 @@ declare const DeclarationsSchema: z.ZodDiscriminatedUnion<"line", [z.ZodObject<{
4541
4643
  street2?: string | undefined;
4542
4644
  country?: string | undefined;
4543
4645
  } | undefined;
4544
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
4545
4646
  annualMileage?: number | undefined;
4546
4647
  odometerReading?: number | undefined;
4547
4648
  driverAssignment?: string | undefined;
@@ -6482,20 +6583,35 @@ declare const PolicyDocumentSchema: z.ZodObject<{
6482
6583
  name: z.ZodString;
6483
6584
  conditionType: z.ZodEnum<["duties_after_loss", "notice_requirements", "other_insurance", "cancellation", "nonrenewal", "transfer_of_rights", "liberalization", "arbitration", "concealment_fraud", "examination_under_oath", "legal_action", "loss_payment", "appraisal", "mortgage_holders", "policy_territory", "separation_of_insureds", "other"]>;
6484
6585
  content: z.ZodString;
6485
- keyValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6586
+ keyValues: z.ZodOptional<z.ZodArray<z.ZodObject<{
6587
+ key: z.ZodString;
6588
+ value: z.ZodString;
6589
+ }, "strip", z.ZodTypeAny, {
6590
+ key: string;
6591
+ value: string;
6592
+ }, {
6593
+ key: string;
6594
+ value: string;
6595
+ }>, "many">>;
6486
6596
  pageNumber: z.ZodOptional<z.ZodNumber>;
6487
6597
  }, "strip", z.ZodTypeAny, {
6488
6598
  name: string;
6489
6599
  content: string;
6490
6600
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
6491
6601
  pageNumber?: number | undefined;
6492
- keyValues?: Record<string, string> | undefined;
6602
+ keyValues?: {
6603
+ key: string;
6604
+ value: string;
6605
+ }[] | undefined;
6493
6606
  }, {
6494
6607
  name: string;
6495
6608
  content: string;
6496
6609
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
6497
6610
  pageNumber?: number | undefined;
6498
- keyValues?: Record<string, string> | undefined;
6611
+ keyValues?: {
6612
+ key: string;
6613
+ value: string;
6614
+ }[] | undefined;
6499
6615
  }>, "many">>;
6500
6616
  limits: z.ZodOptional<z.ZodObject<{
6501
6617
  perOccurrence: z.ZodOptional<z.ZodString>;
@@ -7235,6 +7351,7 @@ declare const PolicyDocumentSchema: z.ZodObject<{
7235
7351
  towing: z.ZodOptional<z.ZodBoolean>;
7236
7352
  }, "strip", z.ZodTypeAny, {
7237
7353
  number?: number | undefined;
7354
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
7238
7355
  year?: number | undefined;
7239
7356
  make?: string | undefined;
7240
7357
  model?: string | undefined;
@@ -7248,7 +7365,6 @@ declare const PolicyDocumentSchema: z.ZodObject<{
7248
7365
  street2?: string | undefined;
7249
7366
  country?: string | undefined;
7250
7367
  } | undefined;
7251
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
7252
7368
  annualMileage?: number | undefined;
7253
7369
  odometerReading?: number | undefined;
7254
7370
  driverAssignment?: string | undefined;
@@ -7272,6 +7388,7 @@ declare const PolicyDocumentSchema: z.ZodObject<{
7272
7388
  towing?: boolean | undefined;
7273
7389
  }, {
7274
7390
  number?: number | undefined;
7391
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
7275
7392
  year?: number | undefined;
7276
7393
  make?: string | undefined;
7277
7394
  model?: string | undefined;
@@ -7285,7 +7402,6 @@ declare const PolicyDocumentSchema: z.ZodObject<{
7285
7402
  street2?: string | undefined;
7286
7403
  country?: string | undefined;
7287
7404
  } | undefined;
7288
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
7289
7405
  annualMileage?: number | undefined;
7290
7406
  odometerReading?: number | undefined;
7291
7407
  driverAssignment?: string | undefined;
@@ -7438,6 +7554,7 @@ declare const PolicyDocumentSchema: z.ZodObject<{
7438
7554
  line: "personal_auto";
7439
7555
  vehicles: {
7440
7556
  number?: number | undefined;
7557
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
7441
7558
  year?: number | undefined;
7442
7559
  make?: string | undefined;
7443
7560
  model?: string | undefined;
@@ -7451,7 +7568,6 @@ declare const PolicyDocumentSchema: z.ZodObject<{
7451
7568
  street2?: string | undefined;
7452
7569
  country?: string | undefined;
7453
7570
  } | undefined;
7454
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
7455
7571
  annualMileage?: number | undefined;
7456
7572
  odometerReading?: number | undefined;
7457
7573
  driverAssignment?: string | undefined;
@@ -7518,6 +7634,7 @@ declare const PolicyDocumentSchema: z.ZodObject<{
7518
7634
  line: "personal_auto";
7519
7635
  vehicles: {
7520
7636
  number?: number | undefined;
7637
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
7521
7638
  year?: number | undefined;
7522
7639
  make?: string | undefined;
7523
7640
  model?: string | undefined;
@@ -7531,7 +7648,6 @@ declare const PolicyDocumentSchema: z.ZodObject<{
7531
7648
  street2?: string | undefined;
7532
7649
  country?: string | undefined;
7533
7650
  } | undefined;
7534
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
7535
7651
  annualMileage?: number | undefined;
7536
7652
  odometerReading?: number | undefined;
7537
7653
  driverAssignment?: string | undefined;
@@ -9646,6 +9762,7 @@ declare const PolicyDocumentSchema: z.ZodObject<{
9646
9762
  line: "personal_auto";
9647
9763
  vehicles: {
9648
9764
  number?: number | undefined;
9765
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
9649
9766
  year?: number | undefined;
9650
9767
  make?: string | undefined;
9651
9768
  model?: string | undefined;
@@ -9659,7 +9776,6 @@ declare const PolicyDocumentSchema: z.ZodObject<{
9659
9776
  street2?: string | undefined;
9660
9777
  country?: string | undefined;
9661
9778
  } | undefined;
9662
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
9663
9779
  annualMileage?: number | undefined;
9664
9780
  odometerReading?: number | undefined;
9665
9781
  driverAssignment?: string | undefined;
@@ -10079,7 +10195,10 @@ declare const PolicyDocumentSchema: z.ZodObject<{
10079
10195
  content: string;
10080
10196
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
10081
10197
  pageNumber?: number | undefined;
10082
- keyValues?: Record<string, string> | undefined;
10198
+ keyValues?: {
10199
+ key: string;
10200
+ value: string;
10201
+ }[] | undefined;
10083
10202
  }[] | undefined;
10084
10203
  retroactiveDate?: string | undefined;
10085
10204
  premium?: string | undefined;
@@ -10558,6 +10677,7 @@ declare const PolicyDocumentSchema: z.ZodObject<{
10558
10677
  line: "personal_auto";
10559
10678
  vehicles: {
10560
10679
  number?: number | undefined;
10680
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
10561
10681
  year?: number | undefined;
10562
10682
  make?: string | undefined;
10563
10683
  model?: string | undefined;
@@ -10571,7 +10691,6 @@ declare const PolicyDocumentSchema: z.ZodObject<{
10571
10691
  street2?: string | undefined;
10572
10692
  country?: string | undefined;
10573
10693
  } | undefined;
10574
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
10575
10694
  annualMileage?: number | undefined;
10576
10695
  odometerReading?: number | undefined;
10577
10696
  driverAssignment?: string | undefined;
@@ -10991,7 +11110,10 @@ declare const PolicyDocumentSchema: z.ZodObject<{
10991
11110
  content: string;
10992
11111
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
10993
11112
  pageNumber?: number | undefined;
10994
- keyValues?: Record<string, string> | undefined;
11113
+ keyValues?: {
11114
+ key: string;
11115
+ value: string;
11116
+ }[] | undefined;
10995
11117
  }[] | undefined;
10996
11118
  retroactiveDate?: string | undefined;
10997
11119
  premium?: string | undefined;
@@ -11859,20 +11981,35 @@ declare const QuoteDocumentSchema: z.ZodObject<{
11859
11981
  name: z.ZodString;
11860
11982
  conditionType: z.ZodEnum<["duties_after_loss", "notice_requirements", "other_insurance", "cancellation", "nonrenewal", "transfer_of_rights", "liberalization", "arbitration", "concealment_fraud", "examination_under_oath", "legal_action", "loss_payment", "appraisal", "mortgage_holders", "policy_territory", "separation_of_insureds", "other"]>;
11861
11983
  content: z.ZodString;
11862
- keyValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
11984
+ keyValues: z.ZodOptional<z.ZodArray<z.ZodObject<{
11985
+ key: z.ZodString;
11986
+ value: z.ZodString;
11987
+ }, "strip", z.ZodTypeAny, {
11988
+ key: string;
11989
+ value: string;
11990
+ }, {
11991
+ key: string;
11992
+ value: string;
11993
+ }>, "many">>;
11863
11994
  pageNumber: z.ZodOptional<z.ZodNumber>;
11864
11995
  }, "strip", z.ZodTypeAny, {
11865
11996
  name: string;
11866
11997
  content: string;
11867
11998
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
11868
11999
  pageNumber?: number | undefined;
11869
- keyValues?: Record<string, string> | undefined;
12000
+ keyValues?: {
12001
+ key: string;
12002
+ value: string;
12003
+ }[] | undefined;
11870
12004
  }, {
11871
12005
  name: string;
11872
12006
  content: string;
11873
12007
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
11874
12008
  pageNumber?: number | undefined;
11875
- keyValues?: Record<string, string> | undefined;
12009
+ keyValues?: {
12010
+ key: string;
12011
+ value: string;
12012
+ }[] | undefined;
11876
12013
  }>, "many">>;
11877
12014
  limits: z.ZodOptional<z.ZodObject<{
11878
12015
  perOccurrence: z.ZodOptional<z.ZodString>;
@@ -12612,6 +12749,7 @@ declare const QuoteDocumentSchema: z.ZodObject<{
12612
12749
  towing: z.ZodOptional<z.ZodBoolean>;
12613
12750
  }, "strip", z.ZodTypeAny, {
12614
12751
  number?: number | undefined;
12752
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
12615
12753
  year?: number | undefined;
12616
12754
  make?: string | undefined;
12617
12755
  model?: string | undefined;
@@ -12625,7 +12763,6 @@ declare const QuoteDocumentSchema: z.ZodObject<{
12625
12763
  street2?: string | undefined;
12626
12764
  country?: string | undefined;
12627
12765
  } | undefined;
12628
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
12629
12766
  annualMileage?: number | undefined;
12630
12767
  odometerReading?: number | undefined;
12631
12768
  driverAssignment?: string | undefined;
@@ -12649,6 +12786,7 @@ declare const QuoteDocumentSchema: z.ZodObject<{
12649
12786
  towing?: boolean | undefined;
12650
12787
  }, {
12651
12788
  number?: number | undefined;
12789
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
12652
12790
  year?: number | undefined;
12653
12791
  make?: string | undefined;
12654
12792
  model?: string | undefined;
@@ -12662,7 +12800,6 @@ declare const QuoteDocumentSchema: z.ZodObject<{
12662
12800
  street2?: string | undefined;
12663
12801
  country?: string | undefined;
12664
12802
  } | undefined;
12665
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
12666
12803
  annualMileage?: number | undefined;
12667
12804
  odometerReading?: number | undefined;
12668
12805
  driverAssignment?: string | undefined;
@@ -12815,6 +12952,7 @@ declare const QuoteDocumentSchema: z.ZodObject<{
12815
12952
  line: "personal_auto";
12816
12953
  vehicles: {
12817
12954
  number?: number | undefined;
12955
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
12818
12956
  year?: number | undefined;
12819
12957
  make?: string | undefined;
12820
12958
  model?: string | undefined;
@@ -12828,7 +12966,6 @@ declare const QuoteDocumentSchema: z.ZodObject<{
12828
12966
  street2?: string | undefined;
12829
12967
  country?: string | undefined;
12830
12968
  } | undefined;
12831
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
12832
12969
  annualMileage?: number | undefined;
12833
12970
  odometerReading?: number | undefined;
12834
12971
  driverAssignment?: string | undefined;
@@ -12895,6 +13032,7 @@ declare const QuoteDocumentSchema: z.ZodObject<{
12895
13032
  line: "personal_auto";
12896
13033
  vehicles: {
12897
13034
  number?: number | undefined;
13035
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
12898
13036
  year?: number | undefined;
12899
13037
  make?: string | undefined;
12900
13038
  model?: string | undefined;
@@ -12908,7 +13046,6 @@ declare const QuoteDocumentSchema: z.ZodObject<{
12908
13046
  street2?: string | undefined;
12909
13047
  country?: string | undefined;
12910
13048
  } | undefined;
12911
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
12912
13049
  annualMileage?: number | undefined;
12913
13050
  odometerReading?: number | undefined;
12914
13051
  driverAssignment?: string | undefined;
@@ -15022,6 +15159,7 @@ declare const QuoteDocumentSchema: z.ZodObject<{
15022
15159
  line: "personal_auto";
15023
15160
  vehicles: {
15024
15161
  number?: number | undefined;
15162
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
15025
15163
  year?: number | undefined;
15026
15164
  make?: string | undefined;
15027
15165
  model?: string | undefined;
@@ -15035,7 +15173,6 @@ declare const QuoteDocumentSchema: z.ZodObject<{
15035
15173
  street2?: string | undefined;
15036
15174
  country?: string | undefined;
15037
15175
  } | undefined;
15038
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
15039
15176
  annualMileage?: number | undefined;
15040
15177
  odometerReading?: number | undefined;
15041
15178
  driverAssignment?: string | undefined;
@@ -15455,7 +15592,10 @@ declare const QuoteDocumentSchema: z.ZodObject<{
15455
15592
  content: string;
15456
15593
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
15457
15594
  pageNumber?: number | undefined;
15458
- keyValues?: Record<string, string> | undefined;
15595
+ keyValues?: {
15596
+ key: string;
15597
+ value: string;
15598
+ }[] | undefined;
15459
15599
  }[] | undefined;
15460
15600
  retroactiveDate?: string | undefined;
15461
15601
  premium?: string | undefined;
@@ -15963,6 +16103,7 @@ declare const QuoteDocumentSchema: z.ZodObject<{
15963
16103
  line: "personal_auto";
15964
16104
  vehicles: {
15965
16105
  number?: number | undefined;
16106
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
15966
16107
  year?: number | undefined;
15967
16108
  make?: string | undefined;
15968
16109
  model?: string | undefined;
@@ -15976,7 +16117,6 @@ declare const QuoteDocumentSchema: z.ZodObject<{
15976
16117
  street2?: string | undefined;
15977
16118
  country?: string | undefined;
15978
16119
  } | undefined;
15979
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
15980
16120
  annualMileage?: number | undefined;
15981
16121
  odometerReading?: number | undefined;
15982
16122
  driverAssignment?: string | undefined;
@@ -16396,7 +16536,10 @@ declare const QuoteDocumentSchema: z.ZodObject<{
16396
16536
  content: string;
16397
16537
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
16398
16538
  pageNumber?: number | undefined;
16399
- keyValues?: Record<string, string> | undefined;
16539
+ keyValues?: {
16540
+ key: string;
16541
+ value: string;
16542
+ }[] | undefined;
16400
16543
  }[] | undefined;
16401
16544
  retroactiveDate?: string | undefined;
16402
16545
  premium?: string | undefined;
@@ -17219,20 +17362,35 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
17219
17362
  name: z.ZodString;
17220
17363
  conditionType: z.ZodEnum<["duties_after_loss", "notice_requirements", "other_insurance", "cancellation", "nonrenewal", "transfer_of_rights", "liberalization", "arbitration", "concealment_fraud", "examination_under_oath", "legal_action", "loss_payment", "appraisal", "mortgage_holders", "policy_territory", "separation_of_insureds", "other"]>;
17221
17364
  content: z.ZodString;
17222
- keyValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
17365
+ keyValues: z.ZodOptional<z.ZodArray<z.ZodObject<{
17366
+ key: z.ZodString;
17367
+ value: z.ZodString;
17368
+ }, "strip", z.ZodTypeAny, {
17369
+ key: string;
17370
+ value: string;
17371
+ }, {
17372
+ key: string;
17373
+ value: string;
17374
+ }>, "many">>;
17223
17375
  pageNumber: z.ZodOptional<z.ZodNumber>;
17224
17376
  }, "strip", z.ZodTypeAny, {
17225
17377
  name: string;
17226
17378
  content: string;
17227
17379
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
17228
17380
  pageNumber?: number | undefined;
17229
- keyValues?: Record<string, string> | undefined;
17381
+ keyValues?: {
17382
+ key: string;
17383
+ value: string;
17384
+ }[] | undefined;
17230
17385
  }, {
17231
17386
  name: string;
17232
17387
  content: string;
17233
17388
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
17234
17389
  pageNumber?: number | undefined;
17235
- keyValues?: Record<string, string> | undefined;
17390
+ keyValues?: {
17391
+ key: string;
17392
+ value: string;
17393
+ }[] | undefined;
17236
17394
  }>, "many">>;
17237
17395
  limits: z.ZodOptional<z.ZodObject<{
17238
17396
  perOccurrence: z.ZodOptional<z.ZodString>;
@@ -17972,6 +18130,7 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
17972
18130
  towing: z.ZodOptional<z.ZodBoolean>;
17973
18131
  }, "strip", z.ZodTypeAny, {
17974
18132
  number?: number | undefined;
18133
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
17975
18134
  year?: number | undefined;
17976
18135
  make?: string | undefined;
17977
18136
  model?: string | undefined;
@@ -17985,7 +18144,6 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
17985
18144
  street2?: string | undefined;
17986
18145
  country?: string | undefined;
17987
18146
  } | undefined;
17988
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
17989
18147
  annualMileage?: number | undefined;
17990
18148
  odometerReading?: number | undefined;
17991
18149
  driverAssignment?: string | undefined;
@@ -18009,6 +18167,7 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
18009
18167
  towing?: boolean | undefined;
18010
18168
  }, {
18011
18169
  number?: number | undefined;
18170
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
18012
18171
  year?: number | undefined;
18013
18172
  make?: string | undefined;
18014
18173
  model?: string | undefined;
@@ -18022,7 +18181,6 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
18022
18181
  street2?: string | undefined;
18023
18182
  country?: string | undefined;
18024
18183
  } | undefined;
18025
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
18026
18184
  annualMileage?: number | undefined;
18027
18185
  odometerReading?: number | undefined;
18028
18186
  driverAssignment?: string | undefined;
@@ -18175,6 +18333,7 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
18175
18333
  line: "personal_auto";
18176
18334
  vehicles: {
18177
18335
  number?: number | undefined;
18336
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
18178
18337
  year?: number | undefined;
18179
18338
  make?: string | undefined;
18180
18339
  model?: string | undefined;
@@ -18188,7 +18347,6 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
18188
18347
  street2?: string | undefined;
18189
18348
  country?: string | undefined;
18190
18349
  } | undefined;
18191
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
18192
18350
  annualMileage?: number | undefined;
18193
18351
  odometerReading?: number | undefined;
18194
18352
  driverAssignment?: string | undefined;
@@ -18255,6 +18413,7 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
18255
18413
  line: "personal_auto";
18256
18414
  vehicles: {
18257
18415
  number?: number | undefined;
18416
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
18258
18417
  year?: number | undefined;
18259
18418
  make?: string | undefined;
18260
18419
  model?: string | undefined;
@@ -18268,7 +18427,6 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
18268
18427
  street2?: string | undefined;
18269
18428
  country?: string | undefined;
18270
18429
  } | undefined;
18271
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
18272
18430
  annualMileage?: number | undefined;
18273
18431
  odometerReading?: number | undefined;
18274
18432
  driverAssignment?: string | undefined;
@@ -20383,6 +20541,7 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
20383
20541
  line: "personal_auto";
20384
20542
  vehicles: {
20385
20543
  number?: number | undefined;
20544
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
20386
20545
  year?: number | undefined;
20387
20546
  make?: string | undefined;
20388
20547
  model?: string | undefined;
@@ -20396,7 +20555,6 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
20396
20555
  street2?: string | undefined;
20397
20556
  country?: string | undefined;
20398
20557
  } | undefined;
20399
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
20400
20558
  annualMileage?: number | undefined;
20401
20559
  odometerReading?: number | undefined;
20402
20560
  driverAssignment?: string | undefined;
@@ -20816,7 +20974,10 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
20816
20974
  content: string;
20817
20975
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
20818
20976
  pageNumber?: number | undefined;
20819
- keyValues?: Record<string, string> | undefined;
20977
+ keyValues?: {
20978
+ key: string;
20979
+ value: string;
20980
+ }[] | undefined;
20820
20981
  }[] | undefined;
20821
20982
  retroactiveDate?: string | undefined;
20822
20983
  premium?: string | undefined;
@@ -21295,6 +21456,7 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
21295
21456
  line: "personal_auto";
21296
21457
  vehicles: {
21297
21458
  number?: number | undefined;
21459
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
21298
21460
  year?: number | undefined;
21299
21461
  make?: string | undefined;
21300
21462
  model?: string | undefined;
@@ -21308,7 +21470,6 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
21308
21470
  street2?: string | undefined;
21309
21471
  country?: string | undefined;
21310
21472
  } | undefined;
21311
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
21312
21473
  annualMileage?: number | undefined;
21313
21474
  odometerReading?: number | undefined;
21314
21475
  driverAssignment?: string | undefined;
@@ -21728,7 +21889,10 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
21728
21889
  content: string;
21729
21890
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
21730
21891
  pageNumber?: number | undefined;
21731
- keyValues?: Record<string, string> | undefined;
21892
+ keyValues?: {
21893
+ key: string;
21894
+ value: string;
21895
+ }[] | undefined;
21732
21896
  }[] | undefined;
21733
21897
  retroactiveDate?: string | undefined;
21734
21898
  premium?: string | undefined;
@@ -22594,20 +22758,35 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
22594
22758
  name: z.ZodString;
22595
22759
  conditionType: z.ZodEnum<["duties_after_loss", "notice_requirements", "other_insurance", "cancellation", "nonrenewal", "transfer_of_rights", "liberalization", "arbitration", "concealment_fraud", "examination_under_oath", "legal_action", "loss_payment", "appraisal", "mortgage_holders", "policy_territory", "separation_of_insureds", "other"]>;
22596
22760
  content: z.ZodString;
22597
- keyValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
22761
+ keyValues: z.ZodOptional<z.ZodArray<z.ZodObject<{
22762
+ key: z.ZodString;
22763
+ value: z.ZodString;
22764
+ }, "strip", z.ZodTypeAny, {
22765
+ key: string;
22766
+ value: string;
22767
+ }, {
22768
+ key: string;
22769
+ value: string;
22770
+ }>, "many">>;
22598
22771
  pageNumber: z.ZodOptional<z.ZodNumber>;
22599
22772
  }, "strip", z.ZodTypeAny, {
22600
22773
  name: string;
22601
22774
  content: string;
22602
22775
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
22603
22776
  pageNumber?: number | undefined;
22604
- keyValues?: Record<string, string> | undefined;
22777
+ keyValues?: {
22778
+ key: string;
22779
+ value: string;
22780
+ }[] | undefined;
22605
22781
  }, {
22606
22782
  name: string;
22607
22783
  content: string;
22608
22784
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
22609
22785
  pageNumber?: number | undefined;
22610
- keyValues?: Record<string, string> | undefined;
22786
+ keyValues?: {
22787
+ key: string;
22788
+ value: string;
22789
+ }[] | undefined;
22611
22790
  }>, "many">>;
22612
22791
  limits: z.ZodOptional<z.ZodObject<{
22613
22792
  perOccurrence: z.ZodOptional<z.ZodString>;
@@ -23347,6 +23526,7 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
23347
23526
  towing: z.ZodOptional<z.ZodBoolean>;
23348
23527
  }, "strip", z.ZodTypeAny, {
23349
23528
  number?: number | undefined;
23529
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
23350
23530
  year?: number | undefined;
23351
23531
  make?: string | undefined;
23352
23532
  model?: string | undefined;
@@ -23360,7 +23540,6 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
23360
23540
  street2?: string | undefined;
23361
23541
  country?: string | undefined;
23362
23542
  } | undefined;
23363
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
23364
23543
  annualMileage?: number | undefined;
23365
23544
  odometerReading?: number | undefined;
23366
23545
  driverAssignment?: string | undefined;
@@ -23384,6 +23563,7 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
23384
23563
  towing?: boolean | undefined;
23385
23564
  }, {
23386
23565
  number?: number | undefined;
23566
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
23387
23567
  year?: number | undefined;
23388
23568
  make?: string | undefined;
23389
23569
  model?: string | undefined;
@@ -23397,7 +23577,6 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
23397
23577
  street2?: string | undefined;
23398
23578
  country?: string | undefined;
23399
23579
  } | undefined;
23400
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
23401
23580
  annualMileage?: number | undefined;
23402
23581
  odometerReading?: number | undefined;
23403
23582
  driverAssignment?: string | undefined;
@@ -23550,6 +23729,7 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
23550
23729
  line: "personal_auto";
23551
23730
  vehicles: {
23552
23731
  number?: number | undefined;
23732
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
23553
23733
  year?: number | undefined;
23554
23734
  make?: string | undefined;
23555
23735
  model?: string | undefined;
@@ -23563,7 +23743,6 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
23563
23743
  street2?: string | undefined;
23564
23744
  country?: string | undefined;
23565
23745
  } | undefined;
23566
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
23567
23746
  annualMileage?: number | undefined;
23568
23747
  odometerReading?: number | undefined;
23569
23748
  driverAssignment?: string | undefined;
@@ -23630,6 +23809,7 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
23630
23809
  line: "personal_auto";
23631
23810
  vehicles: {
23632
23811
  number?: number | undefined;
23812
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
23633
23813
  year?: number | undefined;
23634
23814
  make?: string | undefined;
23635
23815
  model?: string | undefined;
@@ -23643,7 +23823,6 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
23643
23823
  street2?: string | undefined;
23644
23824
  country?: string | undefined;
23645
23825
  } | undefined;
23646
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
23647
23826
  annualMileage?: number | undefined;
23648
23827
  odometerReading?: number | undefined;
23649
23828
  driverAssignment?: string | undefined;
@@ -25757,6 +25936,7 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
25757
25936
  line: "personal_auto";
25758
25937
  vehicles: {
25759
25938
  number?: number | undefined;
25939
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
25760
25940
  year?: number | undefined;
25761
25941
  make?: string | undefined;
25762
25942
  model?: string | undefined;
@@ -25770,7 +25950,6 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
25770
25950
  street2?: string | undefined;
25771
25951
  country?: string | undefined;
25772
25952
  } | undefined;
25773
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
25774
25953
  annualMileage?: number | undefined;
25775
25954
  odometerReading?: number | undefined;
25776
25955
  driverAssignment?: string | undefined;
@@ -26190,7 +26369,10 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
26190
26369
  content: string;
26191
26370
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
26192
26371
  pageNumber?: number | undefined;
26193
- keyValues?: Record<string, string> | undefined;
26372
+ keyValues?: {
26373
+ key: string;
26374
+ value: string;
26375
+ }[] | undefined;
26194
26376
  }[] | undefined;
26195
26377
  retroactiveDate?: string | undefined;
26196
26378
  premium?: string | undefined;
@@ -26698,6 +26880,7 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
26698
26880
  line: "personal_auto";
26699
26881
  vehicles: {
26700
26882
  number?: number | undefined;
26883
+ usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
26701
26884
  year?: number | undefined;
26702
26885
  make?: string | undefined;
26703
26886
  model?: string | undefined;
@@ -26711,7 +26894,6 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
26711
26894
  street2?: string | undefined;
26712
26895
  country?: string | undefined;
26713
26896
  } | undefined;
26714
- usage?: "pleasure" | "commute" | "business" | "farm" | undefined;
26715
26897
  annualMileage?: number | undefined;
26716
26898
  odometerReading?: number | undefined;
26717
26899
  driverAssignment?: string | undefined;
@@ -27131,7 +27313,10 @@ declare const InsuranceDocumentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
27131
27313
  content: string;
27132
27314
  conditionType: "other" | "duties_after_loss" | "notice_requirements" | "other_insurance" | "cancellation" | "nonrenewal" | "transfer_of_rights" | "liberalization" | "arbitration" | "concealment_fraud" | "examination_under_oath" | "legal_action" | "loss_payment" | "appraisal" | "mortgage_holders" | "policy_territory" | "separation_of_insureds";
27133
27315
  pageNumber?: number | undefined;
27134
- keyValues?: Record<string, string> | undefined;
27316
+ keyValues?: {
27317
+ key: string;
27318
+ value: string;
27319
+ }[] | undefined;
27135
27320
  }[] | undefined;
27136
27321
  retroactiveDate?: string | undefined;
27137
27322
  premium?: string | undefined;
@@ -27636,6 +27821,82 @@ interface DocumentFilters {
27636
27821
  quoteNumber?: string;
27637
27822
  }
27638
27823
 
27824
+ declare const ClassifyResultSchema: z.ZodObject<{
27825
+ documentType: z.ZodEnum<["policy", "quote"]>;
27826
+ policyTypes: z.ZodArray<z.ZodEnum<["general_liability", "commercial_property", "commercial_auto", "non_owned_auto", "workers_comp", "umbrella", "excess_liability", "professional_liability", "cyber", "epli", "directors_officers", "fiduciary_liability", "crime_fidelity", "inland_marine", "builders_risk", "environmental", "ocean_marine", "surety", "product_liability", "bop", "management_liability_package", "property", "homeowners_ho3", "homeowners_ho5", "renters_ho4", "condo_ho6", "dwelling_fire", "mobile_home", "personal_auto", "personal_umbrella", "flood_nfip", "flood_private", "earthquake", "personal_inland_marine", "watercraft", "recreational_vehicle", "farm_ranch", "pet", "travel", "identity_theft", "title", "other"]>, "many">;
27827
+ confidence: z.ZodNumber;
27828
+ }, "strip", z.ZodTypeAny, {
27829
+ policyTypes: ("general_liability" | "commercial_property" | "commercial_auto" | "non_owned_auto" | "workers_comp" | "umbrella" | "excess_liability" | "professional_liability" | "cyber" | "epli" | "directors_officers" | "fiduciary_liability" | "crime_fidelity" | "inland_marine" | "builders_risk" | "environmental" | "ocean_marine" | "surety" | "product_liability" | "bop" | "management_liability_package" | "property" | "homeowners_ho3" | "homeowners_ho5" | "renters_ho4" | "condo_ho6" | "dwelling_fire" | "mobile_home" | "personal_auto" | "personal_umbrella" | "flood_nfip" | "flood_private" | "earthquake" | "personal_inland_marine" | "watercraft" | "recreational_vehicle" | "farm_ranch" | "pet" | "travel" | "identity_theft" | "title" | "other")[];
27830
+ documentType: "policy" | "quote";
27831
+ confidence: number;
27832
+ }, {
27833
+ policyTypes: ("general_liability" | "commercial_property" | "commercial_auto" | "non_owned_auto" | "workers_comp" | "umbrella" | "excess_liability" | "professional_liability" | "cyber" | "epli" | "directors_officers" | "fiduciary_liability" | "crime_fidelity" | "inland_marine" | "builders_risk" | "environmental" | "ocean_marine" | "surety" | "product_liability" | "bop" | "management_liability_package" | "property" | "homeowners_ho3" | "homeowners_ho5" | "renters_ho4" | "condo_ho6" | "dwelling_fire" | "mobile_home" | "personal_auto" | "personal_umbrella" | "flood_nfip" | "flood_private" | "earthquake" | "personal_inland_marine" | "watercraft" | "recreational_vehicle" | "farm_ranch" | "pet" | "travel" | "identity_theft" | "title" | "other")[];
27834
+ documentType: "policy" | "quote";
27835
+ confidence: number;
27836
+ }>;
27837
+ type ClassifyResult = z.infer<typeof ClassifyResultSchema>;
27838
+
27839
+ declare const ExtractionPlanSchema: z.ZodObject<{
27840
+ tasks: z.ZodArray<z.ZodObject<{
27841
+ extractorName: z.ZodString;
27842
+ startPage: z.ZodNumber;
27843
+ endPage: z.ZodNumber;
27844
+ description: z.ZodString;
27845
+ }, "strip", z.ZodTypeAny, {
27846
+ description: string;
27847
+ startPage: number;
27848
+ endPage: number;
27849
+ extractorName: string;
27850
+ }, {
27851
+ description: string;
27852
+ startPage: number;
27853
+ endPage: number;
27854
+ extractorName: string;
27855
+ }>, "many">;
27856
+ pageMap: z.ZodOptional<z.ZodArray<z.ZodObject<{
27857
+ section: z.ZodString;
27858
+ pages: z.ZodString;
27859
+ }, "strip", z.ZodTypeAny, {
27860
+ section: string;
27861
+ pages: string;
27862
+ }, {
27863
+ section: string;
27864
+ pages: string;
27865
+ }>, "many">>;
27866
+ }, "strip", z.ZodTypeAny, {
27867
+ tasks: {
27868
+ description: string;
27869
+ startPage: number;
27870
+ endPage: number;
27871
+ extractorName: string;
27872
+ }[];
27873
+ pageMap?: {
27874
+ section: string;
27875
+ pages: string;
27876
+ }[] | undefined;
27877
+ }, {
27878
+ tasks: {
27879
+ description: string;
27880
+ startPage: number;
27881
+ endPage: number;
27882
+ extractorName: string;
27883
+ }[];
27884
+ pageMap?: {
27885
+ section: string;
27886
+ pages: string;
27887
+ }[] | undefined;
27888
+ }>;
27889
+ type ExtractionPlan = z.infer<typeof ExtractionPlanSchema>;
27890
+
27891
+ /** Internal state checkpointed between extraction phases. */
27892
+ interface ExtractionState {
27893
+ id: string;
27894
+ pageCount: number;
27895
+ classifyResult?: ClassifyResult;
27896
+ plan?: ExtractionPlan;
27897
+ memory: Record<string, unknown>;
27898
+ document?: InsuranceDocument;
27899
+ }
27639
27900
  interface ExtractorConfig {
27640
27901
  generateText: GenerateText;
27641
27902
  generateObject: GenerateObject;
@@ -27646,14 +27907,22 @@ interface ExtractorConfig {
27646
27907
  onProgress?: (message: string) => void;
27647
27908
  log?: LogFn;
27648
27909
  providerOptions?: Record<string, unknown>;
27910
+ /** Optional checkpoint persistence callback. */
27911
+ onCheckpointSave?: (checkpoint: PipelineCheckpoint<ExtractionState>) => Promise<void>;
27649
27912
  }
27650
27913
  interface ExtractionResult {
27651
27914
  document: InsuranceDocument;
27652
27915
  chunks: DocumentChunk[];
27653
27916
  tokenUsage: TokenUsage;
27917
+ /** Last checkpoint — can be passed as `resumeFrom` to retry from a failure point. */
27918
+ checkpoint?: PipelineCheckpoint<ExtractionState>;
27919
+ }
27920
+ interface ExtractOptions {
27921
+ /** Resume extraction from a previously saved checkpoint. */
27922
+ resumeFrom?: PipelineCheckpoint<ExtractionState>;
27654
27923
  }
27655
27924
  declare function createExtractor(config: ExtractorConfig): {
27656
- extract: (pdfBase64: string, documentId?: string) => Promise<ExtractionResult>;
27925
+ extract: (pdfBase64: string, documentId?: string, options?: ExtractOptions) => Promise<ExtractionResult>;
27657
27926
  };
27658
27927
 
27659
27928
  /**
@@ -28639,7 +28908,16 @@ declare const EvidenceItemSchema: z.ZodObject<{
28639
28908
  turnId: z.ZodOptional<z.ZodString>;
28640
28909
  text: z.ZodString;
28641
28910
  relevance: z.ZodNumber;
28642
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
28911
+ metadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
28912
+ key: z.ZodString;
28913
+ value: z.ZodString;
28914
+ }, "strip", z.ZodTypeAny, {
28915
+ key: string;
28916
+ value: string;
28917
+ }, {
28918
+ key: string;
28919
+ value: string;
28920
+ }>, "many">>;
28643
28921
  }, "strip", z.ZodTypeAny, {
28644
28922
  text: string;
28645
28923
  source: "document" | "chunk" | "conversation";
@@ -28647,7 +28925,10 @@ declare const EvidenceItemSchema: z.ZodObject<{
28647
28925
  chunkId?: string | undefined;
28648
28926
  documentId?: string | undefined;
28649
28927
  turnId?: string | undefined;
28650
- metadata?: Record<string, string> | undefined;
28928
+ metadata?: {
28929
+ key: string;
28930
+ value: string;
28931
+ }[] | undefined;
28651
28932
  }, {
28652
28933
  text: string;
28653
28934
  source: "document" | "chunk" | "conversation";
@@ -28655,7 +28936,10 @@ declare const EvidenceItemSchema: z.ZodObject<{
28655
28936
  chunkId?: string | undefined;
28656
28937
  documentId?: string | undefined;
28657
28938
  turnId?: string | undefined;
28658
- metadata?: Record<string, string> | undefined;
28939
+ metadata?: {
28940
+ key: string;
28941
+ value: string;
28942
+ }[] | undefined;
28659
28943
  }>;
28660
28944
  type EvidenceItem = z.infer<typeof EvidenceItemSchema>;
28661
28945
  declare const RetrievalResultSchema: z.ZodObject<{
@@ -28667,7 +28951,16 @@ declare const RetrievalResultSchema: z.ZodObject<{
28667
28951
  turnId: z.ZodOptional<z.ZodString>;
28668
28952
  text: z.ZodString;
28669
28953
  relevance: z.ZodNumber;
28670
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
28954
+ metadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
28955
+ key: z.ZodString;
28956
+ value: z.ZodString;
28957
+ }, "strip", z.ZodTypeAny, {
28958
+ key: string;
28959
+ value: string;
28960
+ }, {
28961
+ key: string;
28962
+ value: string;
28963
+ }>, "many">>;
28671
28964
  }, "strip", z.ZodTypeAny, {
28672
28965
  text: string;
28673
28966
  source: "document" | "chunk" | "conversation";
@@ -28675,7 +28968,10 @@ declare const RetrievalResultSchema: z.ZodObject<{
28675
28968
  chunkId?: string | undefined;
28676
28969
  documentId?: string | undefined;
28677
28970
  turnId?: string | undefined;
28678
- metadata?: Record<string, string> | undefined;
28971
+ metadata?: {
28972
+ key: string;
28973
+ value: string;
28974
+ }[] | undefined;
28679
28975
  }, {
28680
28976
  text: string;
28681
28977
  source: "document" | "chunk" | "conversation";
@@ -28683,7 +28979,10 @@ declare const RetrievalResultSchema: z.ZodObject<{
28683
28979
  chunkId?: string | undefined;
28684
28980
  documentId?: string | undefined;
28685
28981
  turnId?: string | undefined;
28686
- metadata?: Record<string, string> | undefined;
28982
+ metadata?: {
28983
+ key: string;
28984
+ value: string;
28985
+ }[] | undefined;
28687
28986
  }>, "many">;
28688
28987
  }, "strip", z.ZodTypeAny, {
28689
28988
  subQuestion: string;
@@ -28694,7 +28993,10 @@ declare const RetrievalResultSchema: z.ZodObject<{
28694
28993
  chunkId?: string | undefined;
28695
28994
  documentId?: string | undefined;
28696
28995
  turnId?: string | undefined;
28697
- metadata?: Record<string, string> | undefined;
28996
+ metadata?: {
28997
+ key: string;
28998
+ value: string;
28999
+ }[] | undefined;
28698
29000
  }[];
28699
29001
  }, {
28700
29002
  subQuestion: string;
@@ -28705,7 +29007,10 @@ declare const RetrievalResultSchema: z.ZodObject<{
28705
29007
  chunkId?: string | undefined;
28706
29008
  documentId?: string | undefined;
28707
29009
  turnId?: string | undefined;
28708
- metadata?: Record<string, string> | undefined;
29010
+ metadata?: {
29011
+ key: string;
29012
+ value: string;
29013
+ }[] | undefined;
28709
29014
  }[];
28710
29015
  }>;
28711
29016
  type RetrievalResult = z.infer<typeof RetrievalResultSchema>;
@@ -28723,16 +29028,16 @@ declare const CitationSchema: z.ZodObject<{
28723
29028
  documentId: string;
28724
29029
  relevance: number;
28725
29030
  index: number;
28726
- documentType?: "policy" | "quote" | undefined;
28727
29031
  field?: string | undefined;
29032
+ documentType?: "policy" | "quote" | undefined;
28728
29033
  }, {
28729
29034
  quote: string;
28730
29035
  chunkId: string;
28731
29036
  documentId: string;
28732
29037
  relevance: number;
28733
29038
  index: number;
28734
- documentType?: "policy" | "quote" | undefined;
28735
29039
  field?: string | undefined;
29040
+ documentType?: "policy" | "quote" | undefined;
28736
29041
  }>;
28737
29042
  type Citation = z.infer<typeof CitationSchema>;
28738
29043
  declare const SubAnswerSchema: z.ZodObject<{
@@ -28752,16 +29057,16 @@ declare const SubAnswerSchema: z.ZodObject<{
28752
29057
  documentId: string;
28753
29058
  relevance: number;
28754
29059
  index: number;
28755
- documentType?: "policy" | "quote" | undefined;
28756
29060
  field?: string | undefined;
29061
+ documentType?: "policy" | "quote" | undefined;
28757
29062
  }, {
28758
29063
  quote: string;
28759
29064
  chunkId: string;
28760
29065
  documentId: string;
28761
29066
  relevance: number;
28762
29067
  index: number;
28763
- documentType?: "policy" | "quote" | undefined;
28764
29068
  field?: string | undefined;
29069
+ documentType?: "policy" | "quote" | undefined;
28765
29070
  }>, "many">;
28766
29071
  confidence: z.ZodNumber;
28767
29072
  needsMoreContext: z.ZodBoolean;
@@ -28775,8 +29080,8 @@ declare const SubAnswerSchema: z.ZodObject<{
28775
29080
  documentId: string;
28776
29081
  relevance: number;
28777
29082
  index: number;
28778
- documentType?: "policy" | "quote" | undefined;
28779
29083
  field?: string | undefined;
29084
+ documentType?: "policy" | "quote" | undefined;
28780
29085
  }[];
28781
29086
  needsMoreContext: boolean;
28782
29087
  }, {
@@ -28789,8 +29094,8 @@ declare const SubAnswerSchema: z.ZodObject<{
28789
29094
  documentId: string;
28790
29095
  relevance: number;
28791
29096
  index: number;
28792
- documentType?: "policy" | "quote" | undefined;
28793
29097
  field?: string | undefined;
29098
+ documentType?: "policy" | "quote" | undefined;
28794
29099
  }[];
28795
29100
  needsMoreContext: boolean;
28796
29101
  }>;
@@ -28825,16 +29130,16 @@ declare const QueryResultSchema: z.ZodObject<{
28825
29130
  documentId: string;
28826
29131
  relevance: number;
28827
29132
  index: number;
28828
- documentType?: "policy" | "quote" | undefined;
28829
29133
  field?: string | undefined;
29134
+ documentType?: "policy" | "quote" | undefined;
28830
29135
  }, {
28831
29136
  quote: string;
28832
29137
  chunkId: string;
28833
29138
  documentId: string;
28834
29139
  relevance: number;
28835
29140
  index: number;
28836
- documentType?: "policy" | "quote" | undefined;
28837
29141
  field?: string | undefined;
29142
+ documentType?: "policy" | "quote" | undefined;
28838
29143
  }>, "many">;
28839
29144
  intent: z.ZodEnum<["policy_question", "coverage_comparison", "document_search", "claims_inquiry", "general_knowledge"]>;
28840
29145
  confidence: z.ZodNumber;
@@ -28849,8 +29154,8 @@ declare const QueryResultSchema: z.ZodObject<{
28849
29154
  documentId: string;
28850
29155
  relevance: number;
28851
29156
  index: number;
28852
- documentType?: "policy" | "quote" | undefined;
28853
29157
  field?: string | undefined;
29158
+ documentType?: "policy" | "quote" | undefined;
28854
29159
  }[];
28855
29160
  followUp?: string | undefined;
28856
29161
  }, {
@@ -28863,8 +29168,8 @@ declare const QueryResultSchema: z.ZodObject<{
28863
29168
  documentId: string;
28864
29169
  relevance: number;
28865
29170
  index: number;
28866
- documentType?: "policy" | "quote" | undefined;
28867
29171
  field?: string | undefined;
29172
+ documentType?: "policy" | "quote" | undefined;
28868
29173
  }[];
28869
29174
  followUp?: string | undefined;
28870
29175
  }>;
@@ -28959,4 +29264,4 @@ interface DocumentTemplate {
28959
29264
  }
28960
29265
  declare function getTemplate(policyType: string): DocumentTemplate;
28961
29266
 
28962
- export { ADMITTED_STATUSES, AGENT_TOOLS, APPLICATION_CLASSIFY_PROMPT, AUDIT_TYPES, type AcroFormFieldInfo, type AcroFormMapping, AcroFormMappingSchema, type Address, AddressSchema, type AdmittedStatus, AdmittedStatusSchema, type AgentContext, type AnswerParsingResult, AnswerParsingResultSchema, type ApplicationClassifyResult, ApplicationClassifyResultSchema, type ApplicationField, ApplicationFieldSchema, type ApplicationListFilters, type ApplicationPipelineConfig, type ApplicationState, ApplicationStateSchema, type ApplicationStore, type AuditType, AuditTypeSchema, type AutoFillMatch, AutoFillMatchSchema, type AutoFillResult, AutoFillResultSchema, BOAT_TYPES, type BackfillProvider, type BindingAuthority, BindingAuthoritySchema, type BoatType, BoatTypeSchema, CHUNK_TYPES, CLAIM_STATUSES, COI_GENERATION_TOOL, CONDITION_TYPES, CONSTRUCTION_TYPES, CONTEXT_KEY_MAP, COVERAGE_COMPARISON_TOOL, COVERAGE_FORMS, COVERAGE_TRIGGERS, type ChunkFilter, type ChunkType, ChunkTypeSchema, type Citation, CitationSchema, type ClaimRecord, ClaimRecordSchema, type ClaimStatus, ClaimStatusSchema, type ClassificationCode, ClassificationCodeSchema, type CommercialAutoDeclarations, CommercialAutoDeclarationsSchema, type CommercialPropertyDeclarations, CommercialPropertyDeclarationsSchema, type CommunicationIntent, CommunicationIntentSchema, type ConditionType, ConditionTypeSchema, type ConstructionType, ConstructionTypeSchema, type Contact, ContactSchema, type ContextKeyMapping, type ConversationTurn, type ConvertPdfToImagesFn, type Coverage, type CoverageForm, CoverageFormSchema, CoverageSchema, type CoverageTrigger, CoverageTriggerSchema, type CrimeDeclarations, CrimeDeclarationsSchema, type CyberDeclarations, CyberDeclarationsSchema, DEDUCTIBLE_TYPES, DEFENSE_COST_TREATMENTS, DOCUMENT_LOOKUP_TOOL, DOCUMENT_TYPES, type DODeclarations, DODeclarationsSchema, DWELLING_FIRE_FORM_TYPES, type Declarations, DeclarationsSchema, type DeductibleSchedule, DeductibleScheduleSchema, type DeductibleType, DeductibleTypeSchema, type DefenseCostTreatment, DefenseCostTreatmentSchema, type DocumentChunk, type DocumentFilters, type DocumentStore, type DocumentTemplate, type DocumentType, DocumentTypeSchema, type DriverRecord, DriverRecordSchema, type DwellingDetails, DwellingDetailsSchema, type DwellingFireDeclarations, DwellingFireDeclarationsSchema, type DwellingFireFormType, DwellingFireFormTypeSchema, ENDORSEMENT_PARTY_ROLES, ENDORSEMENT_TYPES, ENTITY_TYPES, type EarthquakeDeclarations, EarthquakeDeclarationsSchema, type EmbedText, type EmployersLiabilityLimits, EmployersLiabilityLimitsSchema, type Endorsement, type EndorsementParty, type EndorsementPartyRole, EndorsementPartyRoleSchema, EndorsementPartySchema, EndorsementSchema, type EndorsementType, EndorsementTypeSchema, type EnrichedCoverage, EnrichedCoverageSchema, type EnrichedSubjectivity, EnrichedSubjectivitySchema, type EnrichedUnderwritingCondition, EnrichedUnderwritingConditionSchema, type EntityType, EntityTypeSchema, type EvidenceItem, EvidenceItemSchema, type Exclusion, ExclusionSchema, type ExperienceMod, ExperienceModSchema, type ExtendedReportingPeriod, ExtendedReportingPeriodSchema, type ExtractionResult, type ExtractorConfig, type ExtractorDef, FLOOD_ZONES, FOUNDATION_TYPES, type FarmRanchDeclarations, FarmRanchDeclarationsSchema, type FieldExtractionResult, FieldExtractionResultSchema, type FieldMapping, type FieldType, FieldTypeSchema, type FlatPdfPlacement, FlatPdfPlacementSchema, type FloodDeclarations, FloodDeclarationsSchema, type FloodZone, FloodZoneSchema, type FormReference, FormReferenceSchema, type FoundationType, FoundationTypeSchema, type GLDeclarations, GLDeclarationsSchema, type GenerateObject, type GenerateText, HOMEOWNERS_FORM_TYPES, type HomeownersDeclarations, HomeownersDeclarationsSchema, type HomeownersFormType, HomeownersFormTypeSchema, type IdentityTheftDeclarations, IdentityTheftDeclarationsSchema, type InsuranceDocument, InsuranceDocumentSchema, type InsuredLocation, InsuredLocationSchema, type InsuredVehicle, InsuredVehicleSchema, type InsurerInfo, InsurerInfoSchema, LIMIT_TYPES, LOSS_SETTLEMENTS, type LimitSchedule, LimitScheduleSchema, type LimitType, LimitTypeSchema, type LocationPremium, LocationPremiumSchema, type LogFn, type LookupFill, type LookupFillResult, LookupFillResultSchema, LookupFillSchema, type LookupRequest, LookupRequestSchema, type LossSettlement, LossSettlementSchema, type LossSummary, LossSummarySchema, type MemoryStore, type NamedInsured, NamedInsuredSchema, PERSONAL_AUTO_USAGES, PET_SPECIES, PLATFORM_CONFIGS, POLICY_SECTION_TYPES, POLICY_TERM_TYPES, POLICY_TYPES, type ParsedAnswer, ParsedAnswerSchema, type PaymentInstallment, PaymentInstallmentSchema, type PaymentPlan, PaymentPlanSchema, type PersonalArticlesDeclarations, PersonalArticlesDeclarationsSchema, type PersonalAutoDeclarations, PersonalAutoDeclarationsSchema, type PersonalAutoUsage, PersonalAutoUsageSchema, type PersonalUmbrellaDeclarations, PersonalUmbrellaDeclarationsSchema, type PersonalVehicleDetails, PersonalVehicleDetailsSchema, type PetDeclarations, PetDeclarationsSchema, type PetSpecies, PetSpeciesSchema, type Platform, type PlatformConfig, PlatformSchema, type PolicyCondition, PolicyConditionSchema, type PolicyDocument, PolicyDocumentSchema, type PolicySectionType, PolicySectionTypeSchema, type PolicyTermType, PolicyTermTypeSchema, type PolicyType, PolicyTypeSchema, type PremiumLine, PremiumLineSchema, type PriorAnswer, type ProcessApplicationInput, type ProcessApplicationResult, type ProcessReplyInput, type ProcessReplyResult, type ProducerInfo, ProducerInfoSchema, type ProfessionalLiabilityDeclarations, ProfessionalLiabilityDeclarationsSchema, QUOTE_SECTION_TYPES, type QueryClassifyResult, QueryClassifyResultSchema, type QueryConfig, type QueryInput, type QueryIntent, QueryIntentSchema, type QueryOutput, type QueryResult, QueryResultSchema, type QuestionBatchResult, QuestionBatchResultSchema, type QuoteDocument, QuoteDocumentSchema, type QuoteSectionType, QuoteSectionTypeSchema, RATING_BASIS_TYPES, ROOF_TYPES, type RVType, RVTypeSchema, RV_TYPES, type RatingBasis, RatingBasisSchema, type RatingBasisType, RatingBasisTypeSchema, type RecreationalVehicleDeclarations, RecreationalVehicleDeclarationsSchema, type ReplyIntent, ReplyIntentSchema, type RetrievalResult, RetrievalResultSchema, type RoofType, RoofTypeSchema, SCHEDULED_ITEM_CATEGORIES, SUBJECTIVITY_CATEGORIES, type ScheduledItemCategory, ScheduledItemCategorySchema, type Section, SectionSchema, type SharedLimit, SharedLimitSchema, type SubAnswer, SubAnswerSchema, type SubQuestion, SubQuestionSchema, type Subjectivity, type SubjectivityCategory, SubjectivityCategorySchema, SubjectivitySchema, type Sublimit, SublimitSchema, type Subsection, SubsectionSchema, TITLE_POLICY_TYPES, type TaxFeeItem, TaxFeeItemSchema, type TextOverlay, type TitleDeclarations, TitleDeclarationsSchema, type TitlePolicyType, TitlePolicyTypeSchema, type TokenUsage, type ToolDefinition, type TravelDeclarations, TravelDeclarationsSchema, type UmbrellaExcessDeclarations, UmbrellaExcessDeclarationsSchema, type UnderwritingCondition, UnderwritingConditionSchema, VALUATION_METHODS, VEHICLE_COVERAGE_TYPES, type ValuationMethod, ValuationMethodSchema, type VehicleCoverage, VehicleCoverageSchema, type VehicleCoverageType, VehicleCoverageTypeSchema, type VerifyResult, VerifyResultSchema, type WatercraftDeclarations, WatercraftDeclarationsSchema, type WorkersCompDeclarations, WorkersCompDeclarationsSchema, buildAcroFormMappingPrompt, buildAgentSystemPrompt, buildAnswerParsingPrompt, buildAutoFillPrompt, buildBatchEmailGenerationPrompt, buildClassifyMessagePrompt, buildCoiRoutingPrompt, buildConfirmationSummaryPrompt, buildConversationMemoryGuidance, buildCoverageGapPrompt, buildFieldExplanationPrompt, buildFieldExtractionPrompt, buildFlatPdfMappingPrompt, buildFormattingPrompt, buildIdentityPrompt, buildIntentPrompt, buildLookupFillPrompt, buildQueryClassifyPrompt, buildQuestionBatchPrompt, buildQuotesPoliciesPrompt, buildReasonPrompt, buildReplyIntentClassificationPrompt, buildRespondPrompt, buildSafetyPrompt, buildVerifyPrompt, chunkDocument, createApplicationPipeline, createExtractor, createQueryAgent, extractPageRange, fillAcroForm, getAcroFormFields, getExtractor, getPdfPageCount, getTemplate, overlayTextOnPdf, pLimit, sanitizeNulls, stripFences, withRetry };
29267
+ export { ADMITTED_STATUSES, AGENT_TOOLS, APPLICATION_CLASSIFY_PROMPT, AUDIT_TYPES, type AcroFormFieldInfo, type AcroFormMapping, AcroFormMappingSchema, type Address, AddressSchema, type AdmittedStatus, AdmittedStatusSchema, type AgentContext, type AnswerParsingResult, AnswerParsingResultSchema, type ApplicationClassifyResult, ApplicationClassifyResultSchema, type ApplicationField, ApplicationFieldSchema, type ApplicationListFilters, type ApplicationPipelineConfig, type ApplicationState, ApplicationStateSchema, type ApplicationStore, type AuditType, AuditTypeSchema, type AutoFillMatch, AutoFillMatchSchema, type AutoFillResult, AutoFillResultSchema, BOAT_TYPES, type BackfillProvider, type BindingAuthority, BindingAuthoritySchema, type BoatType, BoatTypeSchema, CHUNK_TYPES, CLAIM_STATUSES, COI_GENERATION_TOOL, CONDITION_TYPES, CONSTRUCTION_TYPES, CONTEXT_KEY_MAP, COVERAGE_COMPARISON_TOOL, COVERAGE_FORMS, COVERAGE_TRIGGERS, type ChunkFilter, type ChunkType, ChunkTypeSchema, type Citation, CitationSchema, type ClaimRecord, ClaimRecordSchema, type ClaimStatus, ClaimStatusSchema, type ClassificationCode, ClassificationCodeSchema, type CommercialAutoDeclarations, CommercialAutoDeclarationsSchema, type CommercialPropertyDeclarations, CommercialPropertyDeclarationsSchema, type CommunicationIntent, CommunicationIntentSchema, ConditionKeyValueSchema, type ConditionType, ConditionTypeSchema, type ConstructionType, ConstructionTypeSchema, type Contact, ContactSchema, type ContextKeyMapping, type ConversationTurn, type ConvertPdfToImagesFn, type Coverage, type CoverageForm, CoverageFormSchema, CoverageSchema, type CoverageTrigger, CoverageTriggerSchema, type CrimeDeclarations, CrimeDeclarationsSchema, type CyberDeclarations, CyberDeclarationsSchema, DEDUCTIBLE_TYPES, DEFENSE_COST_TREATMENTS, DOCUMENT_LOOKUP_TOOL, DOCUMENT_TYPES, type DODeclarations, DODeclarationsSchema, DWELLING_FIRE_FORM_TYPES, type Declarations, DeclarationsSchema, type DeductibleSchedule, DeductibleScheduleSchema, type DeductibleType, DeductibleTypeSchema, type DefenseCostTreatment, DefenseCostTreatmentSchema, type DocumentChunk, type DocumentFilters, type DocumentStore, type DocumentTemplate, type DocumentType, DocumentTypeSchema, type DriverRecord, DriverRecordSchema, type DwellingDetails, DwellingDetailsSchema, type DwellingFireDeclarations, DwellingFireDeclarationsSchema, type DwellingFireFormType, DwellingFireFormTypeSchema, ENDORSEMENT_PARTY_ROLES, ENDORSEMENT_TYPES, ENTITY_TYPES, type EarthquakeDeclarations, EarthquakeDeclarationsSchema, type EmbedText, type EmployersLiabilityLimits, EmployersLiabilityLimitsSchema, type Endorsement, type EndorsementParty, type EndorsementPartyRole, EndorsementPartyRoleSchema, EndorsementPartySchema, EndorsementSchema, type EndorsementType, EndorsementTypeSchema, type EnrichedCoverage, EnrichedCoverageSchema, type EnrichedSubjectivity, EnrichedSubjectivitySchema, type EnrichedUnderwritingCondition, EnrichedUnderwritingConditionSchema, type EntityType, EntityTypeSchema, type EvidenceItem, EvidenceItemSchema, type Exclusion, ExclusionSchema, type ExperienceMod, ExperienceModSchema, type ExtendedReportingPeriod, ExtendedReportingPeriodSchema, type ExtractOptions, type ExtractionResult, type ExtractionState, type ExtractorConfig, type ExtractorDef, FLOOD_ZONES, FOUNDATION_TYPES, type FarmRanchDeclarations, FarmRanchDeclarationsSchema, type FieldExtractionResult, FieldExtractionResultSchema, type FieldMapping, type FieldType, FieldTypeSchema, type FlatPdfPlacement, FlatPdfPlacementSchema, type FloodDeclarations, FloodDeclarationsSchema, type FloodZone, FloodZoneSchema, type FormReference, FormReferenceSchema, type FoundationType, FoundationTypeSchema, type GLDeclarations, GLDeclarationsSchema, type GenerateObject, type GenerateText, HOMEOWNERS_FORM_TYPES, type HomeownersDeclarations, HomeownersDeclarationsSchema, type HomeownersFormType, HomeownersFormTypeSchema, type IdentityTheftDeclarations, IdentityTheftDeclarationsSchema, type InsuranceDocument, InsuranceDocumentSchema, type InsuredLocation, InsuredLocationSchema, type InsuredVehicle, InsuredVehicleSchema, type InsurerInfo, InsurerInfoSchema, LIMIT_TYPES, LOSS_SETTLEMENTS, type LimitSchedule, LimitScheduleSchema, type LimitType, LimitTypeSchema, type LocationPremium, LocationPremiumSchema, type LogFn, type LookupFill, type LookupFillResult, LookupFillResultSchema, LookupFillSchema, type LookupRequest, LookupRequestSchema, type LossSettlement, LossSettlementSchema, type LossSummary, LossSummarySchema, type MemoryStore, type NamedInsured, NamedInsuredSchema, PERSONAL_AUTO_USAGES, PET_SPECIES, PLATFORM_CONFIGS, POLICY_SECTION_TYPES, POLICY_TERM_TYPES, POLICY_TYPES, type ParsedAnswer, ParsedAnswerSchema, type PaymentInstallment, PaymentInstallmentSchema, type PaymentPlan, PaymentPlanSchema, type PersonalArticlesDeclarations, PersonalArticlesDeclarationsSchema, type PersonalAutoDeclarations, PersonalAutoDeclarationsSchema, type PersonalAutoUsage, PersonalAutoUsageSchema, type PersonalUmbrellaDeclarations, PersonalUmbrellaDeclarationsSchema, type PersonalVehicleDetails, PersonalVehicleDetailsSchema, type PetDeclarations, PetDeclarationsSchema, type PetSpecies, PetSpeciesSchema, type PipelineCheckpoint, type PipelineContext, type PipelineContextOptions, type Platform, type PlatformConfig, PlatformSchema, type PolicyCondition, PolicyConditionSchema, type PolicyDocument, PolicyDocumentSchema, type PolicySectionType, PolicySectionTypeSchema, type PolicyTermType, PolicyTermTypeSchema, type PolicyType, PolicyTypeSchema, type PremiumLine, PremiumLineSchema, type PriorAnswer, type ProcessApplicationInput, type ProcessApplicationResult, type ProcessReplyInput, type ProcessReplyResult, type ProducerInfo, ProducerInfoSchema, type ProfessionalLiabilityDeclarations, ProfessionalLiabilityDeclarationsSchema, QUOTE_SECTION_TYPES, type QueryClassifyResult, QueryClassifyResultSchema, type QueryConfig, type QueryInput, type QueryIntent, QueryIntentSchema, type QueryOutput, type QueryResult, QueryResultSchema, type QuestionBatchResult, QuestionBatchResultSchema, type QuoteDocument, QuoteDocumentSchema, type QuoteSectionType, QuoteSectionTypeSchema, RATING_BASIS_TYPES, ROOF_TYPES, type RVType, RVTypeSchema, RV_TYPES, type RatingBasis, RatingBasisSchema, type RatingBasisType, RatingBasisTypeSchema, type RecreationalVehicleDeclarations, RecreationalVehicleDeclarationsSchema, type ReplyIntent, ReplyIntentSchema, type RetrievalResult, RetrievalResultSchema, type RoofType, RoofTypeSchema, SCHEDULED_ITEM_CATEGORIES, SUBJECTIVITY_CATEGORIES, type SafeGenerateOptions, type SafeGenerateParams, type ScheduledItemCategory, ScheduledItemCategorySchema, type Section, SectionSchema, type SharedLimit, SharedLimitSchema, type SubAnswer, SubAnswerSchema, type SubQuestion, SubQuestionSchema, type Subjectivity, type SubjectivityCategory, SubjectivityCategorySchema, SubjectivitySchema, type Sublimit, SublimitSchema, type Subsection, SubsectionSchema, TITLE_POLICY_TYPES, type TaxFeeItem, TaxFeeItemSchema, type TextOverlay, type TitleDeclarations, TitleDeclarationsSchema, type TitlePolicyType, TitlePolicyTypeSchema, type TokenUsage, type ToolDefinition, type TravelDeclarations, TravelDeclarationsSchema, type UmbrellaExcessDeclarations, UmbrellaExcessDeclarationsSchema, type UnderwritingCondition, UnderwritingConditionSchema, VALUATION_METHODS, VEHICLE_COVERAGE_TYPES, type ValuationMethod, ValuationMethodSchema, type VehicleCoverage, VehicleCoverageSchema, type VehicleCoverageType, VehicleCoverageTypeSchema, type VerifyResult, VerifyResultSchema, type WatercraftDeclarations, WatercraftDeclarationsSchema, type WorkersCompDeclarations, WorkersCompDeclarationsSchema, buildAcroFormMappingPrompt, buildAgentSystemPrompt, buildAnswerParsingPrompt, buildAutoFillPrompt, buildBatchEmailGenerationPrompt, buildClassifyMessagePrompt, buildCoiRoutingPrompt, buildConfirmationSummaryPrompt, buildConversationMemoryGuidance, buildCoverageGapPrompt, buildFieldExplanationPrompt, buildFieldExtractionPrompt, buildFlatPdfMappingPrompt, buildFormattingPrompt, buildIdentityPrompt, buildIntentPrompt, buildLookupFillPrompt, buildQueryClassifyPrompt, buildQuestionBatchPrompt, buildQuotesPoliciesPrompt, buildReasonPrompt, buildReplyIntentClassificationPrompt, buildRespondPrompt, buildSafetyPrompt, buildVerifyPrompt, chunkDocument, createApplicationPipeline, createExtractor, createPipelineContext, createQueryAgent, extractPageRange, fillAcroForm, getAcroFormFields, getExtractor, getPdfPageCount, getTemplate, overlayTextOnPdf, pLimit, safeGenerateObject, sanitizeNulls, stripFences, withRetry };