@claritylabs/cl-sdk 3.2.12 → 4.0.1
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/README.md +10 -14
- package/dist/application.d.mts +1 -1
- package/dist/application.d.ts +1 -1
- package/dist/application.js +426 -402
- package/dist/application.js.map +1 -1
- package/dist/application.mjs +426 -402
- package/dist/application.mjs.map +1 -1
- package/dist/{index-WjheX6Dt.d.mts → index-Cte-BzHF.d.mts} +356 -259
- package/dist/{index-WjheX6Dt.d.ts → index-Cte-BzHF.d.ts} +356 -259
- package/dist/index.d.mts +93 -85
- package/dist/index.d.ts +93 -85
- package/dist/index.js +2050 -1825
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2037 -1819
- package/dist/index.mjs.map +1 -1
- package/dist/storage-sqlite.d.mts +188 -188
- package/dist/storage-sqlite.d.ts +188 -188
- package/dist/storage-sqlite.js +426 -402
- package/dist/storage-sqlite.js.map +1 -1
- package/dist/storage-sqlite.mjs +426 -402
- package/dist/storage-sqlite.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -294,57 +294,6 @@ function expectedOutputTokensFloor(taskKind, schemaTokens, expectedListLength, h
|
|
|
294
294
|
|
|
295
295
|
// src/schemas/enums.ts
|
|
296
296
|
import { z as z2 } from "zod";
|
|
297
|
-
var PolicyTypeSchema = z2.enum([
|
|
298
|
-
// Commercial lines
|
|
299
|
-
"general_liability",
|
|
300
|
-
"commercial_property",
|
|
301
|
-
"commercial_auto",
|
|
302
|
-
"non_owned_auto",
|
|
303
|
-
"workers_comp",
|
|
304
|
-
"umbrella",
|
|
305
|
-
"excess_liability",
|
|
306
|
-
"professional_liability",
|
|
307
|
-
"cyber",
|
|
308
|
-
"epli",
|
|
309
|
-
"directors_officers",
|
|
310
|
-
"fiduciary_liability",
|
|
311
|
-
"crime_fidelity",
|
|
312
|
-
"inland_marine",
|
|
313
|
-
"builders_risk",
|
|
314
|
-
"environmental",
|
|
315
|
-
"ocean_marine",
|
|
316
|
-
"surety",
|
|
317
|
-
"product_liability",
|
|
318
|
-
"bop",
|
|
319
|
-
"management_liability_package",
|
|
320
|
-
"property",
|
|
321
|
-
// Personal lines
|
|
322
|
-
"homeowners_ho3",
|
|
323
|
-
"homeowners_ho5",
|
|
324
|
-
"renters_ho4",
|
|
325
|
-
"condo_ho6",
|
|
326
|
-
"dwelling_fire",
|
|
327
|
-
"mobile_home",
|
|
328
|
-
"personal_auto",
|
|
329
|
-
"personal_umbrella",
|
|
330
|
-
"flood_nfip",
|
|
331
|
-
"flood_private",
|
|
332
|
-
"earthquake",
|
|
333
|
-
"personal_inland_marine",
|
|
334
|
-
"watercraft",
|
|
335
|
-
"recreational_vehicle",
|
|
336
|
-
"farm_ranch",
|
|
337
|
-
"life",
|
|
338
|
-
"critical_illness",
|
|
339
|
-
"disability",
|
|
340
|
-
"long_term_care",
|
|
341
|
-
"pet",
|
|
342
|
-
"travel",
|
|
343
|
-
"identity_theft",
|
|
344
|
-
"title",
|
|
345
|
-
"other"
|
|
346
|
-
]);
|
|
347
|
-
var POLICY_TYPES = PolicyTypeSchema.options;
|
|
348
297
|
var EndorsementTypeSchema = z2.enum([
|
|
349
298
|
"additional_insured",
|
|
350
299
|
"waiver_of_subrogation",
|
|
@@ -565,85 +514,419 @@ var TITLE_POLICY_TYPES = TitlePolicyTypeSchema.options;
|
|
|
565
514
|
var PetSpeciesSchema = z2.enum(["dog", "cat", "other"]);
|
|
566
515
|
var PET_SPECIES = PetSpeciesSchema.options;
|
|
567
516
|
|
|
568
|
-
// src/schemas/
|
|
517
|
+
// src/schemas/lines-of-business.ts
|
|
569
518
|
import { z as z3 } from "zod";
|
|
570
|
-
var
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
519
|
+
var ACORD_LOB_CODES = [
|
|
520
|
+
"AAPPL",
|
|
521
|
+
"AGLIA",
|
|
522
|
+
"AGPP",
|
|
523
|
+
"AGPR",
|
|
524
|
+
"AIRC",
|
|
525
|
+
"AIRPFB",
|
|
526
|
+
"APKG",
|
|
527
|
+
"APKGE",
|
|
528
|
+
"APROD",
|
|
529
|
+
"ARVP",
|
|
530
|
+
"AUTO",
|
|
531
|
+
"AUTOB",
|
|
532
|
+
"AUTOP",
|
|
533
|
+
"AVPKG",
|
|
534
|
+
"BANDM",
|
|
535
|
+
"BLANK",
|
|
536
|
+
"BMISC",
|
|
537
|
+
"BOAT",
|
|
538
|
+
"BOP",
|
|
539
|
+
"BOPGL",
|
|
540
|
+
"BOPPR",
|
|
541
|
+
"CAVN",
|
|
542
|
+
"CEQFL",
|
|
543
|
+
"CFIRE",
|
|
544
|
+
"CFRM",
|
|
545
|
+
"CGL",
|
|
546
|
+
"COMAR",
|
|
547
|
+
"COMR",
|
|
548
|
+
"CONTR",
|
|
549
|
+
"CPKGE",
|
|
550
|
+
"CPMP",
|
|
551
|
+
"CRIME",
|
|
552
|
+
"DFIRE",
|
|
553
|
+
"DISAB",
|
|
554
|
+
"DO",
|
|
555
|
+
"EDP",
|
|
556
|
+
"EL",
|
|
557
|
+
"EO",
|
|
558
|
+
"EPLI",
|
|
559
|
+
"EQ",
|
|
560
|
+
"EQPFL",
|
|
561
|
+
"EXLIA",
|
|
562
|
+
"FIDTY",
|
|
563
|
+
"FIDUC",
|
|
564
|
+
"FINEA",
|
|
565
|
+
"FLOOD",
|
|
566
|
+
"GARAG",
|
|
567
|
+
"GL",
|
|
568
|
+
"GLASS",
|
|
569
|
+
"HANG",
|
|
570
|
+
"HBB",
|
|
571
|
+
"HOME",
|
|
572
|
+
"INBR",
|
|
573
|
+
"INMAR",
|
|
574
|
+
"INMRC",
|
|
575
|
+
"INMRP",
|
|
576
|
+
"JUDCL",
|
|
577
|
+
"KIDRA",
|
|
578
|
+
"LL",
|
|
579
|
+
"MHOME",
|
|
580
|
+
"MMAL",
|
|
581
|
+
"Motorcycle",
|
|
582
|
+
"MTRTK",
|
|
583
|
+
"OLIB",
|
|
584
|
+
"PHYS",
|
|
585
|
+
"PKG",
|
|
586
|
+
"PL",
|
|
587
|
+
"PLMSC",
|
|
588
|
+
"PPKGE",
|
|
589
|
+
"PROP",
|
|
590
|
+
"PROPC",
|
|
591
|
+
"PUBOF",
|
|
592
|
+
"RECV",
|
|
593
|
+
"SCHPR",
|
|
594
|
+
"SIGNS",
|
|
595
|
+
"SMP",
|
|
596
|
+
"SURE",
|
|
597
|
+
"TRANS",
|
|
598
|
+
"TRUCK",
|
|
599
|
+
"UMBRC",
|
|
600
|
+
"UMBRL",
|
|
601
|
+
"UMBRP",
|
|
602
|
+
"UN",
|
|
603
|
+
"WCMA",
|
|
604
|
+
"WIND",
|
|
605
|
+
"WORK",
|
|
606
|
+
"WORKP",
|
|
607
|
+
"WORKV"
|
|
608
|
+
];
|
|
609
|
+
var AcordLobCodeSchema = z3.enum(ACORD_LOB_CODES);
|
|
610
|
+
var ACORD_LOB_LABELS = {
|
|
611
|
+
AAPPL: "Aircraft / Aerial Applicator",
|
|
612
|
+
AGLIA: "Agricultural Liability",
|
|
613
|
+
AGPP: "Agricultural Personal Property",
|
|
614
|
+
AGPR: "Agricultural Property",
|
|
615
|
+
AIRC: "Aircraft",
|
|
616
|
+
AIRPFB: "Airport / Fixed Base Operator",
|
|
617
|
+
APKG: "Agricultural Package",
|
|
618
|
+
APKGE: "Agricultural Package (Extended)",
|
|
619
|
+
APROD: "Agricultural Products",
|
|
620
|
+
ARVP: "Recreational Vehicle Package",
|
|
621
|
+
AUTO: "Automobile",
|
|
622
|
+
AUTOB: "Business Auto",
|
|
623
|
+
AUTOP: "Personal Auto",
|
|
624
|
+
AVPKG: "Aviation Package",
|
|
625
|
+
BANDM: "Boiler & Machinery",
|
|
626
|
+
BLANK: "Blanket",
|
|
627
|
+
BMISC: "Business Miscellaneous",
|
|
628
|
+
BOAT: "Boat",
|
|
629
|
+
BOP: "Businessowners Policy",
|
|
630
|
+
BOPGL: "BOP - General Liability",
|
|
631
|
+
BOPPR: "BOP - Property",
|
|
632
|
+
CAVN: "Commercial Aviation",
|
|
633
|
+
CEQFL: "Contractors Equipment Floater",
|
|
634
|
+
CFIRE: "Commercial Fire",
|
|
635
|
+
CFRM: "Commercial Farm",
|
|
636
|
+
CGL: "Commercial General Liability",
|
|
637
|
+
COMAR: "Commercial Marine / Ocean Marine",
|
|
638
|
+
COMR: "Commercial (misc.)",
|
|
639
|
+
CONTR: "Contractors",
|
|
640
|
+
CPKGE: "Commercial Package",
|
|
641
|
+
CPMP: "Commercial Package (multi-peril)",
|
|
642
|
+
CRIME: "Crime",
|
|
643
|
+
DFIRE: "Dwelling Fire",
|
|
644
|
+
DISAB: "Disability",
|
|
645
|
+
DO: "Directors & Officers Liability",
|
|
646
|
+
EDP: "Electronic Data Processing",
|
|
647
|
+
EL: "Employers Liability",
|
|
648
|
+
EO: "Errors & Omissions",
|
|
649
|
+
EPLI: "Employment Practices Liability",
|
|
650
|
+
EQ: "Earthquake",
|
|
651
|
+
EQPFL: "Equipment Floater",
|
|
652
|
+
EXLIA: "Excess Liability",
|
|
653
|
+
FIDTY: "Fidelity",
|
|
654
|
+
FIDUC: "Fiduciary Liability",
|
|
655
|
+
FINEA: "Fine Arts",
|
|
656
|
+
FLOOD: "Flood",
|
|
657
|
+
GARAG: "Garage",
|
|
658
|
+
GL: "General Liability",
|
|
659
|
+
GLASS: "Glass",
|
|
660
|
+
HANG: "Hangar (Aviation)",
|
|
661
|
+
HBB: "Home-Based Business",
|
|
662
|
+
HOME: "Homeowners",
|
|
663
|
+
INBR: "Inland Marine - Brokers",
|
|
664
|
+
INMAR: "Inland Marine",
|
|
665
|
+
INMRC: "Inland Marine - Commercial",
|
|
666
|
+
INMRP: "Inland Marine - Personal",
|
|
667
|
+
JUDCL: "Judicial Bonds",
|
|
668
|
+
KIDRA: "Kidnap & Ransom",
|
|
669
|
+
LL: "Liquor Liability",
|
|
670
|
+
MHOME: "Mobile Home",
|
|
671
|
+
MMAL: "Medical Malpractice",
|
|
672
|
+
Motorcycle: "Motorcycle",
|
|
673
|
+
MTRTK: "Motor Truck Cargo",
|
|
674
|
+
OLIB: "Other Liability",
|
|
675
|
+
PHYS: "Physical Damage",
|
|
676
|
+
PKG: "Package",
|
|
677
|
+
PL: "Professional Liability",
|
|
678
|
+
PLMSC: "Personal Lines Miscellaneous",
|
|
679
|
+
PPKGE: "Personal Package",
|
|
680
|
+
PROP: "Property",
|
|
681
|
+
PROPC: "Property - Commercial",
|
|
682
|
+
PUBOF: "Public Officials Liability",
|
|
683
|
+
RECV: "Recreational Vehicle",
|
|
684
|
+
SCHPR: "Scheduled Property",
|
|
685
|
+
SIGNS: "Signs",
|
|
686
|
+
SMP: "Special Multi-Peril",
|
|
687
|
+
SURE: "Surety",
|
|
688
|
+
TRANS: "Transportation",
|
|
689
|
+
TRUCK: "Trucking",
|
|
690
|
+
UMBRC: "Umbrella - Commercial",
|
|
691
|
+
UMBRL: "Umbrella",
|
|
692
|
+
UMBRP: "Umbrella - Personal",
|
|
693
|
+
UN: "Unspecified / Unknown",
|
|
694
|
+
WCMA: "Workers Comp - Monopolistic/State",
|
|
695
|
+
WIND: "Wind",
|
|
696
|
+
WORK: "Workers Compensation",
|
|
697
|
+
WORKP: "Workers Compensation (Personal/Package)",
|
|
698
|
+
WORKV: "Workers Compensation (Voluntary)"
|
|
699
|
+
};
|
|
700
|
+
var EXCLUDED_ACORD_LOB_CODES = /* @__PURE__ */ new Set([
|
|
701
|
+
"ACHE",
|
|
702
|
+
"INTER",
|
|
703
|
+
"LICPT",
|
|
704
|
+
"LSTIN",
|
|
705
|
+
"NWFGR",
|
|
706
|
+
"PAPER",
|
|
707
|
+
"SCAP",
|
|
708
|
+
"SFRNC"
|
|
709
|
+
]);
|
|
710
|
+
var LEGACY_POLICY_TYPE_TO_LOB = {
|
|
711
|
+
general_liability: ["CGL"],
|
|
712
|
+
commercial_property: ["PROPC"],
|
|
713
|
+
commercial_auto: ["AUTOB"],
|
|
714
|
+
non_owned_auto: ["AUTOB"],
|
|
715
|
+
workers_comp: ["WORK"],
|
|
716
|
+
umbrella: ["UMBRC"],
|
|
717
|
+
excess_liability: ["EXLIA"],
|
|
718
|
+
professional_liability: ["EO"],
|
|
719
|
+
cyber: ["OLIB"],
|
|
720
|
+
epli: ["EPLI"],
|
|
721
|
+
directors_officers: ["DO"],
|
|
722
|
+
fiduciary_liability: ["FIDUC"],
|
|
723
|
+
crime_fidelity: ["CRIME"],
|
|
724
|
+
inland_marine: ["INMRC"],
|
|
725
|
+
builders_risk: ["INMRC"],
|
|
726
|
+
environmental: ["OLIB"],
|
|
727
|
+
ocean_marine: ["COMAR"],
|
|
728
|
+
surety: ["SURE"],
|
|
729
|
+
product_liability: ["OLIB"],
|
|
730
|
+
bop: ["BOP"],
|
|
731
|
+
management_liability_package: ["DO", "EPLI", "FIDUC"],
|
|
732
|
+
property: ["PROP"],
|
|
733
|
+
homeowners_ho3: ["HOME"],
|
|
734
|
+
homeowners_ho5: ["HOME"],
|
|
735
|
+
renters_ho4: ["HOME"],
|
|
736
|
+
condo_ho6: ["HOME"],
|
|
737
|
+
dwelling_fire: ["DFIRE"],
|
|
738
|
+
mobile_home: ["MHOME"],
|
|
739
|
+
personal_auto: ["AUTOP"],
|
|
740
|
+
personal_umbrella: ["UMBRP"],
|
|
741
|
+
flood_nfip: ["FLOOD"],
|
|
742
|
+
flood_private: ["FLOOD"],
|
|
743
|
+
earthquake: ["EQ"],
|
|
744
|
+
personal_inland_marine: ["INMRP"],
|
|
745
|
+
watercraft: ["BOAT"],
|
|
746
|
+
recreational_vehicle: ["RECV"],
|
|
747
|
+
farm_ranch: ["CFRM"],
|
|
748
|
+
life: ["UN"],
|
|
749
|
+
critical_illness: ["DISAB"],
|
|
750
|
+
disability: ["DISAB"],
|
|
751
|
+
long_term_care: ["UN"],
|
|
752
|
+
pet: ["UN"],
|
|
753
|
+
travel: ["UN"],
|
|
754
|
+
identity_theft: ["UN"],
|
|
755
|
+
title: ["UN"],
|
|
756
|
+
other: ["UN"],
|
|
757
|
+
unknown: ["UN"],
|
|
758
|
+
auto: ["AUTOB"],
|
|
759
|
+
crime: ["CRIME"],
|
|
760
|
+
crim: ["CRIME"],
|
|
761
|
+
fiduciary: ["FIDUC"],
|
|
762
|
+
d_and_o: ["DO"],
|
|
763
|
+
d_o: ["DO"],
|
|
764
|
+
homeowners: ["HOME"],
|
|
765
|
+
renters: ["HOME"],
|
|
766
|
+
flood: ["FLOOD"],
|
|
767
|
+
boat: ["BOAT"],
|
|
768
|
+
motorcycle: ["Motorcycle"]
|
|
769
|
+
};
|
|
770
|
+
var PERSONAL_LOB_CODES = /* @__PURE__ */ new Set([
|
|
771
|
+
"AUTOP",
|
|
772
|
+
"HOME",
|
|
773
|
+
"MHOME",
|
|
774
|
+
"DFIRE",
|
|
775
|
+
"FLOOD",
|
|
776
|
+
"EQ",
|
|
777
|
+
"INMRP",
|
|
778
|
+
"UMBRP",
|
|
779
|
+
"BOAT",
|
|
780
|
+
"RECV",
|
|
781
|
+
"Motorcycle",
|
|
782
|
+
"PPKGE",
|
|
783
|
+
"DISAB",
|
|
784
|
+
"PLMSC",
|
|
785
|
+
"HBB"
|
|
786
|
+
]);
|
|
787
|
+
function hasOwn(object, key) {
|
|
788
|
+
return Object.prototype.hasOwnProperty.call(object, key);
|
|
789
|
+
}
|
|
790
|
+
function canonicalLegacyKey(value) {
|
|
791
|
+
return value.trim().toLowerCase().replace(/&/g, " and ").replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").replace(/_+/g, "_");
|
|
792
|
+
}
|
|
793
|
+
function humanize(value) {
|
|
794
|
+
return value.trim().replace(/[_-]+/g, " ").replace(/\b\w/g, (char) => char.toUpperCase());
|
|
795
|
+
}
|
|
796
|
+
function isLobCode(value) {
|
|
797
|
+
return typeof value === "string" && hasOwn(ACORD_LOB_LABELS, value);
|
|
798
|
+
}
|
|
799
|
+
function resolveLobCode(value) {
|
|
800
|
+
const trimmed = value.trim();
|
|
801
|
+
if (!trimmed) return void 0;
|
|
802
|
+
if (isLobCode(trimmed)) return trimmed;
|
|
803
|
+
if (trimmed.toLowerCase() === "motorcycle") return "Motorcycle";
|
|
804
|
+
const legacy = LEGACY_POLICY_TYPE_TO_LOB[canonicalLegacyKey(trimmed)];
|
|
805
|
+
if (legacy?.[0]) return legacy[0];
|
|
806
|
+
const upper = trimmed.toUpperCase();
|
|
807
|
+
if (upper === "CRIM") return "CRIME";
|
|
808
|
+
if (isLobCode(upper)) return upper;
|
|
809
|
+
return void 0;
|
|
810
|
+
}
|
|
811
|
+
function normalizeOperationalLinesOfBusiness(values) {
|
|
812
|
+
const source = Array.isArray(values) ? values.filter((value) => typeof value === "string" && value.trim().length > 0) : [];
|
|
813
|
+
return toLobCodes(source);
|
|
814
|
+
}
|
|
815
|
+
function toLobCodes(values) {
|
|
816
|
+
const source = values?.filter((value) => typeof value === "string" && value.trim()) ?? [];
|
|
817
|
+
if (source.length === 0) return ["UN"];
|
|
818
|
+
const codes = [];
|
|
819
|
+
for (const value of source) {
|
|
820
|
+
const trimmed = value.trim();
|
|
821
|
+
if (isLobCode(trimmed)) {
|
|
822
|
+
codes.push(trimmed);
|
|
823
|
+
continue;
|
|
824
|
+
}
|
|
825
|
+
if (trimmed.toUpperCase() === "CRIM") {
|
|
826
|
+
codes.push("CRIME");
|
|
827
|
+
continue;
|
|
828
|
+
}
|
|
829
|
+
const mapped = LEGACY_POLICY_TYPE_TO_LOB[canonicalLegacyKey(trimmed)];
|
|
830
|
+
if (mapped) {
|
|
831
|
+
codes.push(...mapped);
|
|
832
|
+
continue;
|
|
833
|
+
}
|
|
834
|
+
const upper = trimmed.toUpperCase();
|
|
835
|
+
if (isLobCode(upper)) {
|
|
836
|
+
codes.push(upper);
|
|
837
|
+
continue;
|
|
838
|
+
}
|
|
839
|
+
codes.push("UN");
|
|
840
|
+
}
|
|
841
|
+
return Array.from(new Set(codes));
|
|
842
|
+
}
|
|
843
|
+
function lobLabel(value) {
|
|
844
|
+
const code = resolveLobCode(value);
|
|
845
|
+
return code ? ACORD_LOB_LABELS[code] : humanize(value);
|
|
846
|
+
}
|
|
847
|
+
function isPersonalLob(code) {
|
|
848
|
+
return isLobCode(code) && PERSONAL_LOB_CODES.has(code);
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
// src/schemas/shared.ts
|
|
852
|
+
import { z as z4 } from "zod";
|
|
853
|
+
var SourceProvenanceSchema = z4.object({
|
|
854
|
+
sourceSpanIds: z4.array(z4.string().min(1)).min(1),
|
|
855
|
+
documentNodeId: z4.string().optional(),
|
|
856
|
+
sourceTextHash: z4.string().optional(),
|
|
857
|
+
pageStart: z4.number().int().positive().optional(),
|
|
858
|
+
pageEnd: z4.number().int().positive().optional()
|
|
859
|
+
});
|
|
860
|
+
var AddressSchema = z4.object({
|
|
861
|
+
street1: z4.string(),
|
|
862
|
+
street2: z4.string().optional(),
|
|
863
|
+
city: z4.string(),
|
|
864
|
+
state: z4.string(),
|
|
865
|
+
zip: z4.string(),
|
|
866
|
+
country: z4.string().optional()
|
|
584
867
|
});
|
|
585
868
|
var SourceBackedAddressSchema = AddressSchema.merge(SourceProvenanceSchema);
|
|
586
|
-
var ContactSchema =
|
|
587
|
-
name:
|
|
588
|
-
title:
|
|
589
|
-
type:
|
|
590
|
-
phone:
|
|
591
|
-
fax:
|
|
592
|
-
email:
|
|
869
|
+
var ContactSchema = z4.object({
|
|
870
|
+
name: z4.string().optional(),
|
|
871
|
+
title: z4.string().optional(),
|
|
872
|
+
type: z4.string().optional(),
|
|
873
|
+
phone: z4.string().optional(),
|
|
874
|
+
fax: z4.string().optional(),
|
|
875
|
+
email: z4.string().optional(),
|
|
593
876
|
address: AddressSchema.optional(),
|
|
594
|
-
hours:
|
|
877
|
+
hours: z4.string().optional()
|
|
595
878
|
}).merge(SourceProvenanceSchema);
|
|
596
|
-
var FormReferenceSchema =
|
|
597
|
-
formNumber:
|
|
598
|
-
editionDate:
|
|
599
|
-
title:
|
|
600
|
-
formType:
|
|
601
|
-
pageStart:
|
|
602
|
-
pageEnd:
|
|
603
|
-
documentNodeId:
|
|
604
|
-
sourceSpanIds:
|
|
605
|
-
sourceTextHash:
|
|
606
|
-
});
|
|
607
|
-
var TaxFeeItemSchema =
|
|
608
|
-
name:
|
|
609
|
-
amount:
|
|
610
|
-
amountValue:
|
|
611
|
-
type:
|
|
612
|
-
description:
|
|
613
|
-
documentNodeId:
|
|
614
|
-
sourceSpanIds:
|
|
615
|
-
sourceTextHash:
|
|
616
|
-
});
|
|
617
|
-
var RatingBasisSchema =
|
|
879
|
+
var FormReferenceSchema = z4.object({
|
|
880
|
+
formNumber: z4.string(),
|
|
881
|
+
editionDate: z4.string().optional(),
|
|
882
|
+
title: z4.string().optional(),
|
|
883
|
+
formType: z4.enum(["coverage", "endorsement", "declarations", "application", "notice", "other"]),
|
|
884
|
+
pageStart: z4.number().optional(),
|
|
885
|
+
pageEnd: z4.number().optional(),
|
|
886
|
+
documentNodeId: z4.string().optional(),
|
|
887
|
+
sourceSpanIds: z4.array(z4.string()).optional(),
|
|
888
|
+
sourceTextHash: z4.string().optional()
|
|
889
|
+
});
|
|
890
|
+
var TaxFeeItemSchema = z4.object({
|
|
891
|
+
name: z4.string(),
|
|
892
|
+
amount: z4.string(),
|
|
893
|
+
amountValue: z4.number().optional(),
|
|
894
|
+
type: z4.enum(["tax", "fee", "surcharge", "assessment"]).optional(),
|
|
895
|
+
description: z4.string().optional(),
|
|
896
|
+
documentNodeId: z4.string().optional(),
|
|
897
|
+
sourceSpanIds: z4.array(z4.string()).optional(),
|
|
898
|
+
sourceTextHash: z4.string().optional()
|
|
899
|
+
});
|
|
900
|
+
var RatingBasisSchema = z4.object({
|
|
618
901
|
type: RatingBasisTypeSchema,
|
|
619
|
-
amount:
|
|
620
|
-
description:
|
|
621
|
-
});
|
|
622
|
-
var SublimitSchema =
|
|
623
|
-
name:
|
|
624
|
-
limit:
|
|
625
|
-
appliesTo:
|
|
626
|
-
deductible:
|
|
627
|
-
});
|
|
628
|
-
var SharedLimitSchema =
|
|
629
|
-
description:
|
|
630
|
-
limit:
|
|
631
|
-
coverageParts:
|
|
632
|
-
});
|
|
633
|
-
var ExtendedReportingPeriodSchema =
|
|
634
|
-
basicDays:
|
|
635
|
-
supplementalYears:
|
|
636
|
-
supplementalPremium:
|
|
637
|
-
});
|
|
638
|
-
var NamedInsuredSchema =
|
|
639
|
-
name:
|
|
640
|
-
relationship:
|
|
902
|
+
amount: z4.string().optional(),
|
|
903
|
+
description: z4.string().optional()
|
|
904
|
+
});
|
|
905
|
+
var SublimitSchema = z4.object({
|
|
906
|
+
name: z4.string(),
|
|
907
|
+
limit: z4.string(),
|
|
908
|
+
appliesTo: z4.string().optional(),
|
|
909
|
+
deductible: z4.string().optional()
|
|
910
|
+
});
|
|
911
|
+
var SharedLimitSchema = z4.object({
|
|
912
|
+
description: z4.string(),
|
|
913
|
+
limit: z4.string(),
|
|
914
|
+
coverageParts: z4.array(z4.string())
|
|
915
|
+
});
|
|
916
|
+
var ExtendedReportingPeriodSchema = z4.object({
|
|
917
|
+
basicDays: z4.number().optional(),
|
|
918
|
+
supplementalYears: z4.number().optional(),
|
|
919
|
+
supplementalPremium: z4.string().optional()
|
|
920
|
+
});
|
|
921
|
+
var NamedInsuredSchema = z4.object({
|
|
922
|
+
name: z4.string(),
|
|
923
|
+
relationship: z4.string().optional(),
|
|
641
924
|
address: AddressSchema.optional()
|
|
642
925
|
}).merge(SourceProvenanceSchema);
|
|
643
926
|
|
|
644
927
|
// src/schemas/coverage.ts
|
|
645
|
-
import { z as
|
|
646
|
-
var CoverageValueTypeSchema =
|
|
928
|
+
import { z as z5 } from "zod";
|
|
929
|
+
var CoverageValueTypeSchema = z5.enum([
|
|
647
930
|
"numeric",
|
|
648
931
|
"included",
|
|
649
932
|
"not_included",
|
|
@@ -652,116 +935,98 @@ var CoverageValueTypeSchema = z4.enum([
|
|
|
652
935
|
"referential",
|
|
653
936
|
"other"
|
|
654
937
|
]);
|
|
655
|
-
var CoverageSchema =
|
|
656
|
-
name:
|
|
657
|
-
limit:
|
|
658
|
-
limitAmount:
|
|
938
|
+
var CoverageSchema = z5.object({
|
|
939
|
+
name: z5.string(),
|
|
940
|
+
limit: z5.string(),
|
|
941
|
+
limitAmount: z5.number().optional(),
|
|
659
942
|
limitType: LimitTypeSchema.optional(),
|
|
660
943
|
limitValueType: CoverageValueTypeSchema.optional(),
|
|
661
|
-
deductible:
|
|
662
|
-
deductibleAmount:
|
|
944
|
+
deductible: z5.string().optional(),
|
|
945
|
+
deductibleAmount: z5.number().optional(),
|
|
663
946
|
deductibleValueType: CoverageValueTypeSchema.optional(),
|
|
664
947
|
trigger: CoverageTriggerSchema.optional(),
|
|
665
|
-
retroactiveDate:
|
|
666
|
-
formNumber:
|
|
667
|
-
pageNumber:
|
|
668
|
-
sectionRef:
|
|
669
|
-
originalContent:
|
|
670
|
-
recordId:
|
|
671
|
-
documentNodeId:
|
|
672
|
-
sourceSpanIds:
|
|
673
|
-
sourceTextHash:
|
|
948
|
+
retroactiveDate: z5.string().optional(),
|
|
949
|
+
formNumber: z5.string().optional(),
|
|
950
|
+
pageNumber: z5.number().optional(),
|
|
951
|
+
sectionRef: z5.string().optional(),
|
|
952
|
+
originalContent: z5.string().optional(),
|
|
953
|
+
recordId: z5.string().optional(),
|
|
954
|
+
documentNodeId: z5.string().optional(),
|
|
955
|
+
sourceSpanIds: z5.array(z5.string()).optional(),
|
|
956
|
+
sourceTextHash: z5.string().optional()
|
|
674
957
|
});
|
|
675
|
-
var EnrichedCoverageSchema =
|
|
676
|
-
name:
|
|
677
|
-
coverageCode:
|
|
678
|
-
formNumber:
|
|
679
|
-
formEditionDate:
|
|
680
|
-
limit:
|
|
681
|
-
limitAmount:
|
|
958
|
+
var EnrichedCoverageSchema = z5.object({
|
|
959
|
+
name: z5.string(),
|
|
960
|
+
coverageCode: z5.string().optional(),
|
|
961
|
+
formNumber: z5.string().optional(),
|
|
962
|
+
formEditionDate: z5.string().optional(),
|
|
963
|
+
limit: z5.string(),
|
|
964
|
+
limitAmount: z5.number().optional(),
|
|
682
965
|
limitType: LimitTypeSchema.optional(),
|
|
683
966
|
limitValueType: CoverageValueTypeSchema.optional(),
|
|
684
|
-
deductible:
|
|
685
|
-
deductibleAmount:
|
|
967
|
+
deductible: z5.string().optional(),
|
|
968
|
+
deductibleAmount: z5.number().optional(),
|
|
686
969
|
deductibleType: DeductibleTypeSchema.optional(),
|
|
687
970
|
deductibleValueType: CoverageValueTypeSchema.optional(),
|
|
688
|
-
sir:
|
|
689
|
-
sublimit:
|
|
690
|
-
coinsurance:
|
|
971
|
+
sir: z5.string().optional(),
|
|
972
|
+
sublimit: z5.string().optional(),
|
|
973
|
+
coinsurance: z5.string().optional(),
|
|
691
974
|
valuation: ValuationMethodSchema.optional(),
|
|
692
|
-
territory:
|
|
975
|
+
territory: z5.string().optional(),
|
|
693
976
|
trigger: CoverageTriggerSchema.optional(),
|
|
694
|
-
retroactiveDate:
|
|
695
|
-
included:
|
|
696
|
-
premium:
|
|
697
|
-
pageNumber:
|
|
698
|
-
sectionRef:
|
|
699
|
-
originalContent:
|
|
700
|
-
recordId: z4.string().optional(),
|
|
701
|
-
documentNodeId: z4.string().optional(),
|
|
702
|
-
sourceSpanIds: z4.array(z4.string()).optional(),
|
|
703
|
-
sourceTextHash: z4.string().optional()
|
|
704
|
-
});
|
|
705
|
-
|
|
706
|
-
// src/schemas/endorsement.ts
|
|
707
|
-
import { z as z5 } from "zod";
|
|
708
|
-
var EndorsementPartySchema = z5.object({
|
|
709
|
-
name: z5.string(),
|
|
710
|
-
role: EndorsementPartyRoleSchema,
|
|
711
|
-
address: AddressSchema.optional(),
|
|
712
|
-
relationship: z5.string().optional(),
|
|
713
|
-
scope: z5.string().optional()
|
|
714
|
-
}).merge(SourceProvenanceSchema);
|
|
715
|
-
var EndorsementSchema = z5.object({
|
|
716
|
-
formNumber: z5.string(),
|
|
717
|
-
editionDate: z5.string().optional(),
|
|
718
|
-
title: z5.string(),
|
|
719
|
-
endorsementType: EndorsementTypeSchema,
|
|
720
|
-
effectiveDate: z5.string().optional(),
|
|
721
|
-
affectedCoverageParts: z5.array(z5.string()).optional(),
|
|
722
|
-
namedParties: z5.array(EndorsementPartySchema).optional(),
|
|
723
|
-
keyTerms: z5.array(z5.string()).optional(),
|
|
724
|
-
premiumImpact: z5.string().optional(),
|
|
725
|
-
excerpt: z5.string().optional(),
|
|
726
|
-
content: z5.string().optional(),
|
|
727
|
-
pageStart: z5.number(),
|
|
728
|
-
pageEnd: z5.number().optional(),
|
|
977
|
+
retroactiveDate: z5.string().optional(),
|
|
978
|
+
included: z5.boolean(),
|
|
979
|
+
premium: z5.string().optional(),
|
|
980
|
+
pageNumber: z5.number().optional(),
|
|
981
|
+
sectionRef: z5.string().optional(),
|
|
982
|
+
originalContent: z5.string().optional(),
|
|
729
983
|
recordId: z5.string().optional(),
|
|
730
984
|
documentNodeId: z5.string().optional(),
|
|
731
985
|
sourceSpanIds: z5.array(z5.string()).optional(),
|
|
732
986
|
sourceTextHash: z5.string().optional()
|
|
733
987
|
});
|
|
734
988
|
|
|
735
|
-
// src/schemas/
|
|
989
|
+
// src/schemas/endorsement.ts
|
|
736
990
|
import { z as z6 } from "zod";
|
|
737
|
-
var
|
|
991
|
+
var EndorsementPartySchema = z6.object({
|
|
738
992
|
name: z6.string(),
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
993
|
+
role: EndorsementPartyRoleSchema,
|
|
994
|
+
address: AddressSchema.optional(),
|
|
995
|
+
relationship: z6.string().optional(),
|
|
996
|
+
scope: z6.string().optional()
|
|
997
|
+
}).merge(SourceProvenanceSchema);
|
|
998
|
+
var EndorsementSchema = z6.object({
|
|
999
|
+
formNumber: z6.string(),
|
|
1000
|
+
editionDate: z6.string().optional(),
|
|
1001
|
+
title: z6.string(),
|
|
1002
|
+
endorsementType: EndorsementTypeSchema,
|
|
1003
|
+
effectiveDate: z6.string().optional(),
|
|
1004
|
+
affectedCoverageParts: z6.array(z6.string()).optional(),
|
|
1005
|
+
namedParties: z6.array(EndorsementPartySchema).optional(),
|
|
1006
|
+
keyTerms: z6.array(z6.string()).optional(),
|
|
1007
|
+
premiumImpact: z6.string().optional(),
|
|
1008
|
+
excerpt: z6.string().optional(),
|
|
1009
|
+
content: z6.string().optional(),
|
|
1010
|
+
pageStart: z6.number(),
|
|
1011
|
+
pageEnd: z6.number().optional(),
|
|
748
1012
|
recordId: z6.string().optional(),
|
|
749
1013
|
documentNodeId: z6.string().optional(),
|
|
750
1014
|
sourceSpanIds: z6.array(z6.string()).optional(),
|
|
751
1015
|
sourceTextHash: z6.string().optional()
|
|
752
1016
|
});
|
|
753
1017
|
|
|
754
|
-
// src/schemas/
|
|
1018
|
+
// src/schemas/exclusion.ts
|
|
755
1019
|
import { z as z7 } from "zod";
|
|
756
|
-
var
|
|
757
|
-
key: z7.string(),
|
|
758
|
-
value: z7.string()
|
|
759
|
-
});
|
|
760
|
-
var PolicyConditionSchema = z7.object({
|
|
1020
|
+
var ExclusionSchema = z7.object({
|
|
761
1021
|
name: z7.string(),
|
|
762
|
-
|
|
1022
|
+
formNumber: z7.string().optional(),
|
|
1023
|
+
excludedPerils: z7.array(z7.string()).optional(),
|
|
1024
|
+
isAbsolute: z7.boolean().optional(),
|
|
1025
|
+
exceptions: z7.array(z7.string()).optional(),
|
|
1026
|
+
buybackAvailable: z7.boolean().optional(),
|
|
1027
|
+
buybackEndorsement: z7.string().optional(),
|
|
1028
|
+
appliesTo: z7.array(z7.string()).optional(),
|
|
763
1029
|
content: z7.string(),
|
|
764
|
-
keyValues: z7.array(ConditionKeyValueSchema).optional(),
|
|
765
1030
|
pageNumber: z7.number().optional(),
|
|
766
1031
|
recordId: z7.string().optional(),
|
|
767
1032
|
documentNodeId: z7.string().optional(),
|
|
@@ -769,543 +1034,561 @@ var PolicyConditionSchema = z7.object({
|
|
|
769
1034
|
sourceTextHash: z7.string().optional()
|
|
770
1035
|
});
|
|
771
1036
|
|
|
772
|
-
// src/schemas/
|
|
1037
|
+
// src/schemas/condition.ts
|
|
773
1038
|
import { z as z8 } from "zod";
|
|
774
|
-
var
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
1039
|
+
var ConditionKeyValueSchema = z8.object({
|
|
1040
|
+
key: z8.string(),
|
|
1041
|
+
value: z8.string()
|
|
1042
|
+
});
|
|
1043
|
+
var PolicyConditionSchema = z8.object({
|
|
1044
|
+
name: z8.string(),
|
|
1045
|
+
conditionType: ConditionTypeSchema,
|
|
1046
|
+
content: z8.string(),
|
|
1047
|
+
keyValues: z8.array(ConditionKeyValueSchema).optional(),
|
|
1048
|
+
pageNumber: z8.number().optional(),
|
|
1049
|
+
recordId: z8.string().optional(),
|
|
1050
|
+
documentNodeId: z8.string().optional(),
|
|
1051
|
+
sourceSpanIds: z8.array(z8.string()).optional(),
|
|
1052
|
+
sourceTextHash: z8.string().optional()
|
|
1053
|
+
});
|
|
1054
|
+
|
|
1055
|
+
// src/schemas/parties.ts
|
|
1056
|
+
import { z as z9 } from "zod";
|
|
1057
|
+
var InsurerInfoSchema = z9.object({
|
|
1058
|
+
legalName: z9.string(),
|
|
1059
|
+
naicNumber: z9.string().optional(),
|
|
1060
|
+
amBestRating: z9.string().optional(),
|
|
1061
|
+
amBestNumber: z9.string().optional(),
|
|
779
1062
|
admittedStatus: AdmittedStatusSchema.optional(),
|
|
780
|
-
stateOfDomicile:
|
|
1063
|
+
stateOfDomicile: z9.string().optional()
|
|
781
1064
|
}).merge(SourceProvenanceSchema);
|
|
782
|
-
var ProducerInfoSchema =
|
|
783
|
-
agencyName:
|
|
784
|
-
contactName:
|
|
785
|
-
licenseNumber:
|
|
786
|
-
phone:
|
|
787
|
-
email:
|
|
1065
|
+
var ProducerInfoSchema = z9.object({
|
|
1066
|
+
agencyName: z9.string(),
|
|
1067
|
+
contactName: z9.string().optional(),
|
|
1068
|
+
licenseNumber: z9.string().optional(),
|
|
1069
|
+
phone: z9.string().optional(),
|
|
1070
|
+
email: z9.string().optional(),
|
|
788
1071
|
address: AddressSchema.optional()
|
|
789
1072
|
}).merge(SourceProvenanceSchema);
|
|
790
1073
|
|
|
791
1074
|
// src/schemas/financial.ts
|
|
792
|
-
import { z as
|
|
793
|
-
var PaymentInstallmentSchema =
|
|
794
|
-
dueDate:
|
|
795
|
-
amount:
|
|
796
|
-
description:
|
|
1075
|
+
import { z as z10 } from "zod";
|
|
1076
|
+
var PaymentInstallmentSchema = z10.object({
|
|
1077
|
+
dueDate: z10.string(),
|
|
1078
|
+
amount: z10.string(),
|
|
1079
|
+
description: z10.string().optional()
|
|
797
1080
|
});
|
|
798
|
-
var PaymentPlanSchema =
|
|
799
|
-
installments:
|
|
800
|
-
financeCharge:
|
|
1081
|
+
var PaymentPlanSchema = z10.object({
|
|
1082
|
+
installments: z10.array(PaymentInstallmentSchema),
|
|
1083
|
+
financeCharge: z10.string().optional()
|
|
801
1084
|
});
|
|
802
|
-
var LocationPremiumSchema =
|
|
803
|
-
locationNumber:
|
|
804
|
-
premium:
|
|
805
|
-
description:
|
|
1085
|
+
var LocationPremiumSchema = z10.object({
|
|
1086
|
+
locationNumber: z10.number(),
|
|
1087
|
+
premium: z10.string(),
|
|
1088
|
+
description: z10.string().optional()
|
|
806
1089
|
});
|
|
807
1090
|
|
|
808
1091
|
// src/schemas/loss-history.ts
|
|
809
|
-
import { z as
|
|
810
|
-
var ClaimRecordSchema =
|
|
811
|
-
dateOfLoss:
|
|
812
|
-
claimNumber:
|
|
813
|
-
description:
|
|
1092
|
+
import { z as z11 } from "zod";
|
|
1093
|
+
var ClaimRecordSchema = z11.object({
|
|
1094
|
+
dateOfLoss: z11.string(),
|
|
1095
|
+
claimNumber: z11.string().optional(),
|
|
1096
|
+
description: z11.string(),
|
|
814
1097
|
status: ClaimStatusSchema,
|
|
815
|
-
paid:
|
|
816
|
-
reserved:
|
|
817
|
-
incurred:
|
|
818
|
-
claimant:
|
|
819
|
-
coverageLine:
|
|
820
|
-
});
|
|
821
|
-
var LossSummarySchema =
|
|
822
|
-
period:
|
|
823
|
-
totalClaims:
|
|
824
|
-
totalIncurred:
|
|
825
|
-
totalPaid:
|
|
826
|
-
totalReserved:
|
|
827
|
-
lossRatio:
|
|
828
|
-
});
|
|
829
|
-
var ExperienceModSchema =
|
|
830
|
-
factor:
|
|
831
|
-
effectiveDate:
|
|
832
|
-
state:
|
|
1098
|
+
paid: z11.string().optional(),
|
|
1099
|
+
reserved: z11.string().optional(),
|
|
1100
|
+
incurred: z11.string().optional(),
|
|
1101
|
+
claimant: z11.string().optional(),
|
|
1102
|
+
coverageLine: z11.string().optional()
|
|
1103
|
+
});
|
|
1104
|
+
var LossSummarySchema = z11.object({
|
|
1105
|
+
period: z11.string().optional(),
|
|
1106
|
+
totalClaims: z11.number().optional(),
|
|
1107
|
+
totalIncurred: z11.string().optional(),
|
|
1108
|
+
totalPaid: z11.string().optional(),
|
|
1109
|
+
totalReserved: z11.string().optional(),
|
|
1110
|
+
lossRatio: z11.string().optional()
|
|
1111
|
+
});
|
|
1112
|
+
var ExperienceModSchema = z11.object({
|
|
1113
|
+
factor: z11.number(),
|
|
1114
|
+
effectiveDate: z11.string().optional(),
|
|
1115
|
+
state: z11.string().optional()
|
|
833
1116
|
});
|
|
834
1117
|
|
|
835
1118
|
// src/schemas/underwriting.ts
|
|
836
|
-
import { z as
|
|
837
|
-
var EnrichedSubjectivitySchema =
|
|
838
|
-
description:
|
|
1119
|
+
import { z as z12 } from "zod";
|
|
1120
|
+
var EnrichedSubjectivitySchema = z12.object({
|
|
1121
|
+
description: z12.string(),
|
|
839
1122
|
category: SubjectivityCategorySchema.optional(),
|
|
840
|
-
dueDate:
|
|
841
|
-
status:
|
|
842
|
-
pageNumber:
|
|
1123
|
+
dueDate: z12.string().optional(),
|
|
1124
|
+
status: z12.enum(["open", "satisfied", "waived"]).optional(),
|
|
1125
|
+
pageNumber: z12.number().optional()
|
|
843
1126
|
});
|
|
844
|
-
var EnrichedUnderwritingConditionSchema =
|
|
845
|
-
description:
|
|
846
|
-
category:
|
|
847
|
-
pageNumber:
|
|
1127
|
+
var EnrichedUnderwritingConditionSchema = z12.object({
|
|
1128
|
+
description: z12.string(),
|
|
1129
|
+
category: z12.string().optional(),
|
|
1130
|
+
pageNumber: z12.number().optional()
|
|
848
1131
|
});
|
|
849
|
-
var BindingAuthoritySchema =
|
|
850
|
-
authorizedBy:
|
|
851
|
-
method:
|
|
852
|
-
expiration:
|
|
853
|
-
conditions:
|
|
1132
|
+
var BindingAuthoritySchema = z12.object({
|
|
1133
|
+
authorizedBy: z12.string().optional(),
|
|
1134
|
+
method: z12.string().optional(),
|
|
1135
|
+
expiration: z12.string().optional(),
|
|
1136
|
+
conditions: z12.array(z12.string()).optional()
|
|
854
1137
|
});
|
|
855
1138
|
|
|
856
1139
|
// src/schemas/declarations/index.ts
|
|
857
|
-
import { z as
|
|
1140
|
+
import { z as z16 } from "zod";
|
|
858
1141
|
|
|
859
1142
|
// src/schemas/declarations/personal.ts
|
|
860
|
-
import { z as
|
|
1143
|
+
import { z as z14 } from "zod";
|
|
861
1144
|
|
|
862
1145
|
// src/schemas/declarations/shared.ts
|
|
863
|
-
import { z as
|
|
864
|
-
var EmployersLiabilityLimitsSchema =
|
|
865
|
-
eachAccident:
|
|
866
|
-
diseasePolicyLimit:
|
|
867
|
-
diseaseEachEmployee:
|
|
868
|
-
});
|
|
869
|
-
var LimitScheduleSchema =
|
|
870
|
-
perOccurrence:
|
|
871
|
-
generalAggregate:
|
|
872
|
-
productsCompletedOpsAggregate:
|
|
873
|
-
personalAdvertisingInjury:
|
|
874
|
-
eachEmployee:
|
|
875
|
-
fireDamage:
|
|
876
|
-
medicalExpense:
|
|
877
|
-
combinedSingleLimit:
|
|
878
|
-
bodilyInjuryPerPerson:
|
|
879
|
-
bodilyInjuryPerAccident:
|
|
880
|
-
propertyDamage:
|
|
881
|
-
eachOccurrenceUmbrella:
|
|
882
|
-
umbrellaAggregate:
|
|
883
|
-
umbrellaRetention:
|
|
884
|
-
statutory:
|
|
1146
|
+
import { z as z13 } from "zod";
|
|
1147
|
+
var EmployersLiabilityLimitsSchema = z13.object({
|
|
1148
|
+
eachAccident: z13.string(),
|
|
1149
|
+
diseasePolicyLimit: z13.string(),
|
|
1150
|
+
diseaseEachEmployee: z13.string()
|
|
1151
|
+
});
|
|
1152
|
+
var LimitScheduleSchema = z13.object({
|
|
1153
|
+
perOccurrence: z13.string().optional(),
|
|
1154
|
+
generalAggregate: z13.string().optional(),
|
|
1155
|
+
productsCompletedOpsAggregate: z13.string().optional(),
|
|
1156
|
+
personalAdvertisingInjury: z13.string().optional(),
|
|
1157
|
+
eachEmployee: z13.string().optional(),
|
|
1158
|
+
fireDamage: z13.string().optional(),
|
|
1159
|
+
medicalExpense: z13.string().optional(),
|
|
1160
|
+
combinedSingleLimit: z13.string().optional(),
|
|
1161
|
+
bodilyInjuryPerPerson: z13.string().optional(),
|
|
1162
|
+
bodilyInjuryPerAccident: z13.string().optional(),
|
|
1163
|
+
propertyDamage: z13.string().optional(),
|
|
1164
|
+
eachOccurrenceUmbrella: z13.string().optional(),
|
|
1165
|
+
umbrellaAggregate: z13.string().optional(),
|
|
1166
|
+
umbrellaRetention: z13.string().optional(),
|
|
1167
|
+
statutory: z13.boolean().optional(),
|
|
885
1168
|
employersLiability: EmployersLiabilityLimitsSchema.optional(),
|
|
886
|
-
sublimits:
|
|
887
|
-
sharedLimits:
|
|
1169
|
+
sublimits: z13.array(SublimitSchema).optional(),
|
|
1170
|
+
sharedLimits: z13.array(SharedLimitSchema).optional(),
|
|
888
1171
|
defenseCostTreatment: DefenseCostTreatmentSchema.optional()
|
|
889
1172
|
});
|
|
890
|
-
var DeductibleScheduleSchema =
|
|
891
|
-
perClaim:
|
|
892
|
-
perOccurrence:
|
|
893
|
-
aggregateDeductible:
|
|
894
|
-
selfInsuredRetention:
|
|
895
|
-
corridorDeductible:
|
|
896
|
-
waitingPeriod:
|
|
897
|
-
appliesTo:
|
|
898
|
-
});
|
|
899
|
-
var InsuredLocationSchema =
|
|
900
|
-
number:
|
|
1173
|
+
var DeductibleScheduleSchema = z13.object({
|
|
1174
|
+
perClaim: z13.string().optional(),
|
|
1175
|
+
perOccurrence: z13.string().optional(),
|
|
1176
|
+
aggregateDeductible: z13.string().optional(),
|
|
1177
|
+
selfInsuredRetention: z13.string().optional(),
|
|
1178
|
+
corridorDeductible: z13.string().optional(),
|
|
1179
|
+
waitingPeriod: z13.string().optional(),
|
|
1180
|
+
appliesTo: z13.enum(["damages_only", "damages_and_defense", "defense_only"]).optional()
|
|
1181
|
+
});
|
|
1182
|
+
var InsuredLocationSchema = z13.object({
|
|
1183
|
+
number: z13.number(),
|
|
901
1184
|
address: AddressSchema,
|
|
902
|
-
description:
|
|
903
|
-
buildingValue:
|
|
904
|
-
contentsValue:
|
|
905
|
-
businessIncomeValue:
|
|
906
|
-
constructionType:
|
|
907
|
-
yearBuilt:
|
|
908
|
-
squareFootage:
|
|
909
|
-
protectionClass:
|
|
910
|
-
sprinklered:
|
|
911
|
-
alarmType:
|
|
912
|
-
occupancy:
|
|
913
|
-
});
|
|
914
|
-
var VehicleCoverageSchema =
|
|
1185
|
+
description: z13.string().optional(),
|
|
1186
|
+
buildingValue: z13.string().optional(),
|
|
1187
|
+
contentsValue: z13.string().optional(),
|
|
1188
|
+
businessIncomeValue: z13.string().optional(),
|
|
1189
|
+
constructionType: z13.string().optional(),
|
|
1190
|
+
yearBuilt: z13.number().optional(),
|
|
1191
|
+
squareFootage: z13.number().optional(),
|
|
1192
|
+
protectionClass: z13.string().optional(),
|
|
1193
|
+
sprinklered: z13.boolean().optional(),
|
|
1194
|
+
alarmType: z13.string().optional(),
|
|
1195
|
+
occupancy: z13.string().optional()
|
|
1196
|
+
});
|
|
1197
|
+
var VehicleCoverageSchema = z13.object({
|
|
915
1198
|
type: VehicleCoverageTypeSchema,
|
|
916
|
-
limit:
|
|
917
|
-
deductible:
|
|
918
|
-
included:
|
|
919
|
-
});
|
|
920
|
-
var InsuredVehicleSchema =
|
|
921
|
-
number:
|
|
922
|
-
year:
|
|
923
|
-
make:
|
|
924
|
-
model:
|
|
925
|
-
vin:
|
|
926
|
-
costNew:
|
|
927
|
-
statedValue:
|
|
928
|
-
garageLocation:
|
|
929
|
-
coverages:
|
|
930
|
-
radius:
|
|
931
|
-
vehicleType:
|
|
932
|
-
});
|
|
933
|
-
var ClassificationCodeSchema =
|
|
934
|
-
code:
|
|
935
|
-
description:
|
|
936
|
-
premiumBasis:
|
|
937
|
-
basisAmount:
|
|
938
|
-
rate:
|
|
939
|
-
premium:
|
|
940
|
-
locationNumber:
|
|
941
|
-
});
|
|
942
|
-
var DwellingDetailsSchema =
|
|
1199
|
+
limit: z13.string().optional(),
|
|
1200
|
+
deductible: z13.string().optional(),
|
|
1201
|
+
included: z13.boolean()
|
|
1202
|
+
});
|
|
1203
|
+
var InsuredVehicleSchema = z13.object({
|
|
1204
|
+
number: z13.number(),
|
|
1205
|
+
year: z13.number(),
|
|
1206
|
+
make: z13.string(),
|
|
1207
|
+
model: z13.string(),
|
|
1208
|
+
vin: z13.string(),
|
|
1209
|
+
costNew: z13.string().optional(),
|
|
1210
|
+
statedValue: z13.string().optional(),
|
|
1211
|
+
garageLocation: z13.number().optional(),
|
|
1212
|
+
coverages: z13.array(VehicleCoverageSchema).optional(),
|
|
1213
|
+
radius: z13.string().optional(),
|
|
1214
|
+
vehicleType: z13.string().optional()
|
|
1215
|
+
});
|
|
1216
|
+
var ClassificationCodeSchema = z13.object({
|
|
1217
|
+
code: z13.string(),
|
|
1218
|
+
description: z13.string(),
|
|
1219
|
+
premiumBasis: z13.string(),
|
|
1220
|
+
basisAmount: z13.string().optional(),
|
|
1221
|
+
rate: z13.string().optional(),
|
|
1222
|
+
premium: z13.string().optional(),
|
|
1223
|
+
locationNumber: z13.number().optional()
|
|
1224
|
+
});
|
|
1225
|
+
var DwellingDetailsSchema = z13.object({
|
|
943
1226
|
constructionType: ConstructionTypeSchema.optional(),
|
|
944
|
-
yearBuilt:
|
|
945
|
-
squareFootage:
|
|
946
|
-
stories:
|
|
1227
|
+
yearBuilt: z13.number().optional(),
|
|
1228
|
+
squareFootage: z13.number().optional(),
|
|
1229
|
+
stories: z13.number().optional(),
|
|
947
1230
|
roofType: RoofTypeSchema.optional(),
|
|
948
|
-
roofAge:
|
|
949
|
-
heatingType:
|
|
1231
|
+
roofAge: z13.number().optional(),
|
|
1232
|
+
heatingType: z13.enum(["central", "baseboard", "radiant", "space_heater", "heat_pump", "other"]).optional(),
|
|
950
1233
|
foundationType: FoundationTypeSchema.optional(),
|
|
951
|
-
plumbingType:
|
|
952
|
-
electricalType:
|
|
953
|
-
electricalAmps:
|
|
954
|
-
hasSwimmingPool:
|
|
955
|
-
poolType:
|
|
956
|
-
hasTrampoline:
|
|
957
|
-
hasDog:
|
|
958
|
-
dogBreed:
|
|
959
|
-
protectiveDevices:
|
|
960
|
-
distanceToFireStation:
|
|
961
|
-
distanceToHydrant:
|
|
962
|
-
fireProtectionClass:
|
|
963
|
-
});
|
|
964
|
-
var DriverRecordSchema =
|
|
965
|
-
name:
|
|
966
|
-
dateOfBirth:
|
|
967
|
-
licenseNumber:
|
|
968
|
-
licenseState:
|
|
969
|
-
relationship:
|
|
970
|
-
yearsLicensed:
|
|
971
|
-
gender:
|
|
972
|
-
maritalStatus:
|
|
973
|
-
goodStudentDiscount:
|
|
974
|
-
defensiveDriverDiscount:
|
|
975
|
-
violations:
|
|
976
|
-
date:
|
|
977
|
-
type:
|
|
978
|
-
description:
|
|
1234
|
+
plumbingType: z13.enum(["copper", "pex", "galvanized", "polybutylene", "cpvc", "other"]).optional(),
|
|
1235
|
+
electricalType: z13.enum(["circuit_breaker", "fuse_box", "knob_and_tube", "other"]).optional(),
|
|
1236
|
+
electricalAmps: z13.number().optional(),
|
|
1237
|
+
hasSwimmingPool: z13.boolean().optional(),
|
|
1238
|
+
poolType: z13.enum(["in_ground", "above_ground"]).optional(),
|
|
1239
|
+
hasTrampoline: z13.boolean().optional(),
|
|
1240
|
+
hasDog: z13.boolean().optional(),
|
|
1241
|
+
dogBreed: z13.string().optional(),
|
|
1242
|
+
protectiveDevices: z13.array(z13.string()).optional(),
|
|
1243
|
+
distanceToFireStation: z13.string().optional(),
|
|
1244
|
+
distanceToHydrant: z13.string().optional(),
|
|
1245
|
+
fireProtectionClass: z13.string().optional()
|
|
1246
|
+
});
|
|
1247
|
+
var DriverRecordSchema = z13.object({
|
|
1248
|
+
name: z13.string(),
|
|
1249
|
+
dateOfBirth: z13.string().optional(),
|
|
1250
|
+
licenseNumber: z13.string().optional(),
|
|
1251
|
+
licenseState: z13.string().optional(),
|
|
1252
|
+
relationship: z13.enum(["named_insured", "spouse", "child", "other_household", "other"]).optional(),
|
|
1253
|
+
yearsLicensed: z13.number().optional(),
|
|
1254
|
+
gender: z13.string().optional(),
|
|
1255
|
+
maritalStatus: z13.string().optional(),
|
|
1256
|
+
goodStudentDiscount: z13.boolean().optional(),
|
|
1257
|
+
defensiveDriverDiscount: z13.boolean().optional(),
|
|
1258
|
+
violations: z13.array(z13.object({
|
|
1259
|
+
date: z13.string().optional(),
|
|
1260
|
+
type: z13.string().optional(),
|
|
1261
|
+
description: z13.string().optional()
|
|
979
1262
|
})).optional(),
|
|
980
|
-
accidents:
|
|
981
|
-
date:
|
|
982
|
-
atFault:
|
|
983
|
-
description:
|
|
984
|
-
amountPaid:
|
|
1263
|
+
accidents: z13.array(z13.object({
|
|
1264
|
+
date: z13.string().optional(),
|
|
1265
|
+
atFault: z13.boolean().optional(),
|
|
1266
|
+
description: z13.string().optional(),
|
|
1267
|
+
amountPaid: z13.string().optional()
|
|
985
1268
|
})).optional(),
|
|
986
|
-
sr22Required:
|
|
987
|
-
});
|
|
988
|
-
var PersonalVehicleDetailsSchema =
|
|
989
|
-
number:
|
|
990
|
-
year:
|
|
991
|
-
make:
|
|
992
|
-
model:
|
|
993
|
-
vin:
|
|
994
|
-
bodyType:
|
|
1269
|
+
sr22Required: z13.boolean().optional()
|
|
1270
|
+
});
|
|
1271
|
+
var PersonalVehicleDetailsSchema = z13.object({
|
|
1272
|
+
number: z13.number().optional(),
|
|
1273
|
+
year: z13.number().optional(),
|
|
1274
|
+
make: z13.string().optional(),
|
|
1275
|
+
model: z13.string().optional(),
|
|
1276
|
+
vin: z13.string().optional(),
|
|
1277
|
+
bodyType: z13.string().optional(),
|
|
995
1278
|
garagingAddress: AddressSchema.optional(),
|
|
996
1279
|
usage: PersonalAutoUsageSchema.optional(),
|
|
997
|
-
annualMileage:
|
|
998
|
-
odometerReading:
|
|
999
|
-
driverAssignment:
|
|
1280
|
+
annualMileage: z13.number().optional(),
|
|
1281
|
+
odometerReading: z13.number().optional(),
|
|
1282
|
+
driverAssignment: z13.string().optional(),
|
|
1000
1283
|
lienHolder: EndorsementPartySchema.optional(),
|
|
1001
|
-
collisionDeductible:
|
|
1002
|
-
comprehensiveDeductible:
|
|
1003
|
-
rentalReimbursement:
|
|
1004
|
-
towing:
|
|
1284
|
+
collisionDeductible: z13.string().optional(),
|
|
1285
|
+
comprehensiveDeductible: z13.string().optional(),
|
|
1286
|
+
rentalReimbursement: z13.boolean().optional(),
|
|
1287
|
+
towing: z13.boolean().optional()
|
|
1005
1288
|
});
|
|
1006
1289
|
|
|
1007
1290
|
// src/schemas/declarations/personal.ts
|
|
1008
|
-
var HomeownersDeclarationsSchema =
|
|
1009
|
-
line:
|
|
1291
|
+
var HomeownersDeclarationsSchema = z14.object({
|
|
1292
|
+
line: z14.literal("homeowners"),
|
|
1010
1293
|
formType: HomeownersFormTypeSchema,
|
|
1011
|
-
coverageA:
|
|
1012
|
-
coverageB:
|
|
1013
|
-
coverageC:
|
|
1014
|
-
coverageD:
|
|
1015
|
-
coverageE:
|
|
1016
|
-
coverageF:
|
|
1017
|
-
allPerilDeductible:
|
|
1018
|
-
windHailDeductible:
|
|
1019
|
-
hurricaneDeductible:
|
|
1294
|
+
coverageA: z14.string().optional(),
|
|
1295
|
+
coverageB: z14.string().optional(),
|
|
1296
|
+
coverageC: z14.string().optional(),
|
|
1297
|
+
coverageD: z14.string().optional(),
|
|
1298
|
+
coverageE: z14.string().optional(),
|
|
1299
|
+
coverageF: z14.string().optional(),
|
|
1300
|
+
allPerilDeductible: z14.string().optional(),
|
|
1301
|
+
windHailDeductible: z14.string().optional(),
|
|
1302
|
+
hurricaneDeductible: z14.string().optional(),
|
|
1020
1303
|
lossSettlement: LossSettlementSchema.optional(),
|
|
1021
1304
|
dwelling: DwellingDetailsSchema,
|
|
1022
1305
|
mortgagee: EndorsementPartySchema.optional(),
|
|
1023
|
-
additionalMortgagees:
|
|
1024
|
-
});
|
|
1025
|
-
var PersonalAutoDeclarationsSchema =
|
|
1026
|
-
line:
|
|
1027
|
-
vehicles:
|
|
1028
|
-
drivers:
|
|
1029
|
-
liabilityLimits:
|
|
1030
|
-
bodilyInjuryPerPerson:
|
|
1031
|
-
bodilyInjuryPerAccident:
|
|
1032
|
-
propertyDamage:
|
|
1033
|
-
combinedSingleLimit:
|
|
1306
|
+
additionalMortgagees: z14.array(EndorsementPartySchema).optional()
|
|
1307
|
+
});
|
|
1308
|
+
var PersonalAutoDeclarationsSchema = z14.object({
|
|
1309
|
+
line: z14.literal("personal_auto"),
|
|
1310
|
+
vehicles: z14.array(PersonalVehicleDetailsSchema),
|
|
1311
|
+
drivers: z14.array(DriverRecordSchema),
|
|
1312
|
+
liabilityLimits: z14.object({
|
|
1313
|
+
bodilyInjuryPerPerson: z14.string().optional(),
|
|
1314
|
+
bodilyInjuryPerAccident: z14.string().optional(),
|
|
1315
|
+
propertyDamage: z14.string().optional(),
|
|
1316
|
+
combinedSingleLimit: z14.string().optional()
|
|
1034
1317
|
}).optional(),
|
|
1035
|
-
umLimits:
|
|
1036
|
-
bodilyInjuryPerPerson:
|
|
1037
|
-
bodilyInjuryPerAccident:
|
|
1318
|
+
umLimits: z14.object({
|
|
1319
|
+
bodilyInjuryPerPerson: z14.string().optional(),
|
|
1320
|
+
bodilyInjuryPerAccident: z14.string().optional()
|
|
1038
1321
|
}).optional(),
|
|
1039
|
-
uimLimits:
|
|
1040
|
-
bodilyInjuryPerPerson:
|
|
1041
|
-
bodilyInjuryPerAccident:
|
|
1322
|
+
uimLimits: z14.object({
|
|
1323
|
+
bodilyInjuryPerPerson: z14.string().optional(),
|
|
1324
|
+
bodilyInjuryPerAccident: z14.string().optional()
|
|
1042
1325
|
}).optional(),
|
|
1043
|
-
pipLimit:
|
|
1044
|
-
medPayLimit:
|
|
1326
|
+
pipLimit: z14.string().optional(),
|
|
1327
|
+
medPayLimit: z14.string().optional()
|
|
1045
1328
|
});
|
|
1046
|
-
var DwellingFireDeclarationsSchema =
|
|
1047
|
-
line:
|
|
1329
|
+
var DwellingFireDeclarationsSchema = z14.object({
|
|
1330
|
+
line: z14.literal("dwelling_fire"),
|
|
1048
1331
|
formType: DwellingFireFormTypeSchema,
|
|
1049
|
-
dwellingLimit:
|
|
1050
|
-
otherStructuresLimit:
|
|
1051
|
-
personalPropertyLimit:
|
|
1052
|
-
fairRentalValueLimit:
|
|
1053
|
-
liabilityLimit:
|
|
1054
|
-
medicalPaymentsLimit:
|
|
1055
|
-
deductible:
|
|
1332
|
+
dwellingLimit: z14.string().optional(),
|
|
1333
|
+
otherStructuresLimit: z14.string().optional(),
|
|
1334
|
+
personalPropertyLimit: z14.string().optional(),
|
|
1335
|
+
fairRentalValueLimit: z14.string().optional(),
|
|
1336
|
+
liabilityLimit: z14.string().optional(),
|
|
1337
|
+
medicalPaymentsLimit: z14.string().optional(),
|
|
1338
|
+
deductible: z14.string().optional(),
|
|
1056
1339
|
dwelling: DwellingDetailsSchema
|
|
1057
1340
|
});
|
|
1058
|
-
var FloodDeclarationsSchema =
|
|
1059
|
-
line:
|
|
1060
|
-
programType:
|
|
1341
|
+
var FloodDeclarationsSchema = z14.object({
|
|
1342
|
+
line: z14.literal("flood"),
|
|
1343
|
+
programType: z14.enum(["nfip", "private"]),
|
|
1061
1344
|
floodZone: FloodZoneSchema.optional(),
|
|
1062
|
-
communityNumber:
|
|
1063
|
-
communityRating:
|
|
1064
|
-
buildingCoverage:
|
|
1065
|
-
contentsCoverage:
|
|
1066
|
-
iccCoverage:
|
|
1067
|
-
deductible:
|
|
1068
|
-
waitingPeriodDays:
|
|
1069
|
-
elevationCertificate:
|
|
1070
|
-
elevationDifference:
|
|
1071
|
-
buildingDiagramNumber:
|
|
1072
|
-
basementOrEnclosure:
|
|
1073
|
-
postFirmConstruction:
|
|
1074
|
-
});
|
|
1075
|
-
var EarthquakeDeclarationsSchema =
|
|
1076
|
-
line:
|
|
1077
|
-
dwellingCoverage:
|
|
1078
|
-
contentsCoverage:
|
|
1079
|
-
lossOfUseCoverage:
|
|
1080
|
-
deductiblePercent:
|
|
1081
|
-
retrofitDiscount:
|
|
1082
|
-
masonryVeneerCoverage:
|
|
1083
|
-
});
|
|
1084
|
-
var PersonalUmbrellaDeclarationsSchema =
|
|
1085
|
-
line:
|
|
1086
|
-
perOccurrenceLimit:
|
|
1087
|
-
aggregateLimit:
|
|
1088
|
-
retainedLimit:
|
|
1089
|
-
underlyingPolicies:
|
|
1090
|
-
carrier:
|
|
1091
|
-
policyNumber:
|
|
1092
|
-
policyType:
|
|
1093
|
-
limits:
|
|
1345
|
+
communityNumber: z14.string().optional(),
|
|
1346
|
+
communityRating: z14.number().optional(),
|
|
1347
|
+
buildingCoverage: z14.string().optional(),
|
|
1348
|
+
contentsCoverage: z14.string().optional(),
|
|
1349
|
+
iccCoverage: z14.string().optional(),
|
|
1350
|
+
deductible: z14.string().optional(),
|
|
1351
|
+
waitingPeriodDays: z14.number().optional(),
|
|
1352
|
+
elevationCertificate: z14.boolean().optional(),
|
|
1353
|
+
elevationDifference: z14.string().optional(),
|
|
1354
|
+
buildingDiagramNumber: z14.number().optional(),
|
|
1355
|
+
basementOrEnclosure: z14.boolean().optional(),
|
|
1356
|
+
postFirmConstruction: z14.boolean().optional()
|
|
1357
|
+
});
|
|
1358
|
+
var EarthquakeDeclarationsSchema = z14.object({
|
|
1359
|
+
line: z14.literal("earthquake"),
|
|
1360
|
+
dwellingCoverage: z14.string().optional(),
|
|
1361
|
+
contentsCoverage: z14.string().optional(),
|
|
1362
|
+
lossOfUseCoverage: z14.string().optional(),
|
|
1363
|
+
deductiblePercent: z14.number().optional(),
|
|
1364
|
+
retrofitDiscount: z14.boolean().optional(),
|
|
1365
|
+
masonryVeneerCoverage: z14.boolean().optional()
|
|
1366
|
+
});
|
|
1367
|
+
var PersonalUmbrellaDeclarationsSchema = z14.object({
|
|
1368
|
+
line: z14.literal("personal_umbrella"),
|
|
1369
|
+
perOccurrenceLimit: z14.string().optional(),
|
|
1370
|
+
aggregateLimit: z14.string().optional(),
|
|
1371
|
+
retainedLimit: z14.string().optional(),
|
|
1372
|
+
underlyingPolicies: z14.array(z14.object({
|
|
1373
|
+
carrier: z14.string().optional(),
|
|
1374
|
+
policyNumber: z14.string().optional(),
|
|
1375
|
+
policyType: z14.string().optional(),
|
|
1376
|
+
limits: z14.string().optional()
|
|
1094
1377
|
}))
|
|
1095
1378
|
});
|
|
1096
|
-
var PersonalArticlesDeclarationsSchema =
|
|
1097
|
-
line:
|
|
1098
|
-
scheduledItems:
|
|
1099
|
-
itemNumber:
|
|
1379
|
+
var PersonalArticlesDeclarationsSchema = z14.object({
|
|
1380
|
+
line: z14.literal("personal_articles"),
|
|
1381
|
+
scheduledItems: z14.array(z14.object({
|
|
1382
|
+
itemNumber: z14.number().optional(),
|
|
1100
1383
|
category: ScheduledItemCategorySchema.optional(),
|
|
1101
|
-
description:
|
|
1102
|
-
appraisedValue:
|
|
1103
|
-
appraisalDate:
|
|
1384
|
+
description: z14.string(),
|
|
1385
|
+
appraisedValue: z14.string(),
|
|
1386
|
+
appraisalDate: z14.string().optional()
|
|
1104
1387
|
})),
|
|
1105
|
-
blanketCoverage:
|
|
1106
|
-
deductible:
|
|
1107
|
-
worldwideCoverage:
|
|
1108
|
-
breakageCoverage:
|
|
1388
|
+
blanketCoverage: z14.string().optional(),
|
|
1389
|
+
deductible: z14.string().optional(),
|
|
1390
|
+
worldwideCoverage: z14.boolean().optional(),
|
|
1391
|
+
breakageCoverage: z14.boolean().optional()
|
|
1109
1392
|
});
|
|
1110
|
-
var WatercraftDeclarationsSchema =
|
|
1111
|
-
line:
|
|
1393
|
+
var WatercraftDeclarationsSchema = z14.object({
|
|
1394
|
+
line: z14.literal("watercraft"),
|
|
1112
1395
|
boatType: BoatTypeSchema.optional(),
|
|
1113
|
-
year:
|
|
1114
|
-
make:
|
|
1115
|
-
model:
|
|
1116
|
-
length:
|
|
1117
|
-
hullMaterial:
|
|
1118
|
-
hullValue:
|
|
1119
|
-
motorHorsepower:
|
|
1120
|
-
motorType:
|
|
1121
|
-
navigationLimits:
|
|
1122
|
-
layupPeriod:
|
|
1123
|
-
liabilityLimit:
|
|
1124
|
-
medicalPaymentsLimit:
|
|
1125
|
-
physicalDamageDeductible:
|
|
1126
|
-
uninsuredBoaterLimit:
|
|
1127
|
-
trailerCovered:
|
|
1128
|
-
trailerValue:
|
|
1129
|
-
});
|
|
1130
|
-
var RecreationalVehicleDeclarationsSchema =
|
|
1131
|
-
line:
|
|
1396
|
+
year: z14.number().optional(),
|
|
1397
|
+
make: z14.string().optional(),
|
|
1398
|
+
model: z14.string().optional(),
|
|
1399
|
+
length: z14.string().optional(),
|
|
1400
|
+
hullMaterial: z14.enum(["fiberglass", "aluminum", "wood", "steel", "inflatable", "other"]).optional(),
|
|
1401
|
+
hullValue: z14.string().optional(),
|
|
1402
|
+
motorHorsepower: z14.number().optional(),
|
|
1403
|
+
motorType: z14.enum(["outboard", "inboard", "inboard_outboard", "jet"]).optional(),
|
|
1404
|
+
navigationLimits: z14.string().optional(),
|
|
1405
|
+
layupPeriod: z14.string().optional(),
|
|
1406
|
+
liabilityLimit: z14.string().optional(),
|
|
1407
|
+
medicalPaymentsLimit: z14.string().optional(),
|
|
1408
|
+
physicalDamageDeductible: z14.string().optional(),
|
|
1409
|
+
uninsuredBoaterLimit: z14.string().optional(),
|
|
1410
|
+
trailerCovered: z14.boolean().optional(),
|
|
1411
|
+
trailerValue: z14.string().optional()
|
|
1412
|
+
});
|
|
1413
|
+
var RecreationalVehicleDeclarationsSchema = z14.object({
|
|
1414
|
+
line: z14.literal("recreational_vehicle"),
|
|
1132
1415
|
vehicleType: RVTypeSchema,
|
|
1133
|
-
year:
|
|
1134
|
-
make:
|
|
1135
|
-
model:
|
|
1136
|
-
vin:
|
|
1137
|
-
value:
|
|
1138
|
-
liabilityLimit:
|
|
1139
|
-
collisionDeductible:
|
|
1140
|
-
comprehensiveDeductible:
|
|
1141
|
-
personalEffectsCoverage:
|
|
1142
|
-
fullTimerCoverage:
|
|
1143
|
-
});
|
|
1144
|
-
var FarmRanchDeclarationsSchema =
|
|
1145
|
-
line:
|
|
1146
|
-
dwellingCoverage:
|
|
1147
|
-
farmPersonalPropertyCoverage:
|
|
1148
|
-
farmLiabilityLimit:
|
|
1149
|
-
farmAutoIncluded:
|
|
1150
|
-
livestock:
|
|
1151
|
-
type:
|
|
1152
|
-
headCount:
|
|
1153
|
-
value:
|
|
1416
|
+
year: z14.number().optional(),
|
|
1417
|
+
make: z14.string().optional(),
|
|
1418
|
+
model: z14.string().optional(),
|
|
1419
|
+
vin: z14.string().optional(),
|
|
1420
|
+
value: z14.string().optional(),
|
|
1421
|
+
liabilityLimit: z14.string().optional(),
|
|
1422
|
+
collisionDeductible: z14.string().optional(),
|
|
1423
|
+
comprehensiveDeductible: z14.string().optional(),
|
|
1424
|
+
personalEffectsCoverage: z14.string().optional(),
|
|
1425
|
+
fullTimerCoverage: z14.boolean().optional()
|
|
1426
|
+
});
|
|
1427
|
+
var FarmRanchDeclarationsSchema = z14.object({
|
|
1428
|
+
line: z14.literal("farm_ranch"),
|
|
1429
|
+
dwellingCoverage: z14.string().optional(),
|
|
1430
|
+
farmPersonalPropertyCoverage: z14.string().optional(),
|
|
1431
|
+
farmLiabilityLimit: z14.string().optional(),
|
|
1432
|
+
farmAutoIncluded: z14.boolean().optional(),
|
|
1433
|
+
livestock: z14.array(z14.object({
|
|
1434
|
+
type: z14.string(),
|
|
1435
|
+
headCount: z14.number(),
|
|
1436
|
+
value: z14.string().optional()
|
|
1154
1437
|
})).optional(),
|
|
1155
|
-
equipmentSchedule:
|
|
1156
|
-
description:
|
|
1157
|
-
value:
|
|
1438
|
+
equipmentSchedule: z14.array(z14.object({
|
|
1439
|
+
description: z14.string(),
|
|
1440
|
+
value: z14.string()
|
|
1158
1441
|
})).optional(),
|
|
1159
|
-
acreage:
|
|
1442
|
+
acreage: z14.number().optional(),
|
|
1160
1443
|
dwelling: DwellingDetailsSchema.optional()
|
|
1161
1444
|
});
|
|
1162
|
-
var TitleDeclarationsSchema =
|
|
1163
|
-
line:
|
|
1445
|
+
var TitleDeclarationsSchema = z14.object({
|
|
1446
|
+
line: z14.literal("title"),
|
|
1164
1447
|
policyType: TitlePolicyTypeSchema,
|
|
1165
|
-
policyAmount:
|
|
1166
|
-
legalDescription:
|
|
1448
|
+
policyAmount: z14.string(),
|
|
1449
|
+
legalDescription: z14.string().optional(),
|
|
1167
1450
|
propertyAddress: AddressSchema.optional(),
|
|
1168
|
-
effectiveDate:
|
|
1169
|
-
exceptions:
|
|
1170
|
-
number:
|
|
1171
|
-
description:
|
|
1451
|
+
effectiveDate: z14.string().optional(),
|
|
1452
|
+
exceptions: z14.array(z14.object({
|
|
1453
|
+
number: z14.number(),
|
|
1454
|
+
description: z14.string()
|
|
1172
1455
|
})).optional(),
|
|
1173
|
-
underwriter:
|
|
1456
|
+
underwriter: z14.string().optional()
|
|
1174
1457
|
});
|
|
1175
|
-
var PetDeclarationsSchema =
|
|
1176
|
-
line:
|
|
1458
|
+
var PetDeclarationsSchema = z14.object({
|
|
1459
|
+
line: z14.literal("pet"),
|
|
1177
1460
|
species: PetSpeciesSchema,
|
|
1178
|
-
breed:
|
|
1179
|
-
petName:
|
|
1180
|
-
age:
|
|
1181
|
-
annualLimit:
|
|
1182
|
-
perIncidentLimit:
|
|
1183
|
-
deductible:
|
|
1184
|
-
reimbursementPercent:
|
|
1185
|
-
waitingPeriodDays:
|
|
1186
|
-
preExistingConditionsExcluded:
|
|
1187
|
-
wellnessCoverage:
|
|
1188
|
-
});
|
|
1189
|
-
var TravelDeclarationsSchema =
|
|
1190
|
-
line:
|
|
1191
|
-
tripDepartureDate:
|
|
1192
|
-
tripReturnDate:
|
|
1193
|
-
destinations:
|
|
1194
|
-
travelers:
|
|
1195
|
-
name:
|
|
1196
|
-
age:
|
|
1461
|
+
breed: z14.string().optional(),
|
|
1462
|
+
petName: z14.string().optional(),
|
|
1463
|
+
age: z14.number().optional(),
|
|
1464
|
+
annualLimit: z14.string().optional(),
|
|
1465
|
+
perIncidentLimit: z14.string().optional(),
|
|
1466
|
+
deductible: z14.string().optional(),
|
|
1467
|
+
reimbursementPercent: z14.number().optional(),
|
|
1468
|
+
waitingPeriodDays: z14.number().optional(),
|
|
1469
|
+
preExistingConditionsExcluded: z14.boolean().optional(),
|
|
1470
|
+
wellnessCoverage: z14.boolean().optional()
|
|
1471
|
+
});
|
|
1472
|
+
var TravelDeclarationsSchema = z14.object({
|
|
1473
|
+
line: z14.literal("travel"),
|
|
1474
|
+
tripDepartureDate: z14.string().optional(),
|
|
1475
|
+
tripReturnDate: z14.string().optional(),
|
|
1476
|
+
destinations: z14.array(z14.string()).optional(),
|
|
1477
|
+
travelers: z14.array(z14.object({
|
|
1478
|
+
name: z14.string(),
|
|
1479
|
+
age: z14.number().optional()
|
|
1197
1480
|
})).optional(),
|
|
1198
|
-
tripCost:
|
|
1199
|
-
tripCancellationLimit:
|
|
1200
|
-
medicalLimit:
|
|
1201
|
-
evacuationLimit:
|
|
1202
|
-
baggageLimit:
|
|
1481
|
+
tripCost: z14.string().optional(),
|
|
1482
|
+
tripCancellationLimit: z14.string().optional(),
|
|
1483
|
+
medicalLimit: z14.string().optional(),
|
|
1484
|
+
evacuationLimit: z14.string().optional(),
|
|
1485
|
+
baggageLimit: z14.string().optional()
|
|
1203
1486
|
});
|
|
1204
|
-
var IdentityTheftDeclarationsSchema =
|
|
1205
|
-
line:
|
|
1206
|
-
coverageLimit:
|
|
1207
|
-
expenseReimbursement:
|
|
1208
|
-
creditMonitoring:
|
|
1209
|
-
restorationServices:
|
|
1210
|
-
lostWagesLimit:
|
|
1487
|
+
var IdentityTheftDeclarationsSchema = z14.object({
|
|
1488
|
+
line: z14.literal("identity_theft"),
|
|
1489
|
+
coverageLimit: z14.string().optional(),
|
|
1490
|
+
expenseReimbursement: z14.string().optional(),
|
|
1491
|
+
creditMonitoring: z14.boolean().optional(),
|
|
1492
|
+
restorationServices: z14.boolean().optional(),
|
|
1493
|
+
lostWagesLimit: z14.string().optional()
|
|
1211
1494
|
});
|
|
1212
1495
|
|
|
1213
1496
|
// src/schemas/declarations/commercial.ts
|
|
1214
|
-
import { z as
|
|
1215
|
-
var GLDeclarationsSchema =
|
|
1216
|
-
line:
|
|
1497
|
+
import { z as z15 } from "zod";
|
|
1498
|
+
var GLDeclarationsSchema = z15.object({
|
|
1499
|
+
line: z15.literal("gl"),
|
|
1217
1500
|
coverageForm: CoverageFormSchema.optional(),
|
|
1218
|
-
perOccurrenceLimit:
|
|
1219
|
-
generalAggregate:
|
|
1220
|
-
productsCompletedOpsAggregate:
|
|
1221
|
-
personalAdvertisingInjury:
|
|
1222
|
-
fireDamage:
|
|
1223
|
-
medicalExpense:
|
|
1501
|
+
perOccurrenceLimit: z15.string().optional(),
|
|
1502
|
+
generalAggregate: z15.string().optional(),
|
|
1503
|
+
productsCompletedOpsAggregate: z15.string().optional(),
|
|
1504
|
+
personalAdvertisingInjury: z15.string().optional(),
|
|
1505
|
+
fireDamage: z15.string().optional(),
|
|
1506
|
+
medicalExpense: z15.string().optional(),
|
|
1224
1507
|
defenseCostTreatment: DefenseCostTreatmentSchema.optional(),
|
|
1225
|
-
deductible:
|
|
1226
|
-
classifications:
|
|
1227
|
-
retroactiveDate:
|
|
1228
|
-
});
|
|
1229
|
-
var CommercialPropertyDeclarationsSchema =
|
|
1230
|
-
line:
|
|
1231
|
-
causesOfLossForm:
|
|
1232
|
-
coinsurancePercent:
|
|
1508
|
+
deductible: z15.string().optional(),
|
|
1509
|
+
classifications: z15.array(ClassificationCodeSchema).optional(),
|
|
1510
|
+
retroactiveDate: z15.string().optional()
|
|
1511
|
+
});
|
|
1512
|
+
var CommercialPropertyDeclarationsSchema = z15.object({
|
|
1513
|
+
line: z15.literal("commercial_property"),
|
|
1514
|
+
causesOfLossForm: z15.enum(["basic", "broad", "special"]).optional(),
|
|
1515
|
+
coinsurancePercent: z15.number().optional(),
|
|
1233
1516
|
valuationMethod: ValuationMethodSchema.optional(),
|
|
1234
|
-
locations:
|
|
1235
|
-
blanketLimit:
|
|
1236
|
-
businessIncomeLimit:
|
|
1237
|
-
extraExpenseLimit:
|
|
1238
|
-
});
|
|
1239
|
-
var CommercialAutoDeclarationsSchema =
|
|
1240
|
-
line:
|
|
1241
|
-
vehicles:
|
|
1242
|
-
coveredAutoSymbols:
|
|
1243
|
-
liabilityLimit:
|
|
1244
|
-
umLimit:
|
|
1245
|
-
uimLimit:
|
|
1246
|
-
hiredAutoLiability:
|
|
1247
|
-
nonOwnedAutoLiability:
|
|
1248
|
-
});
|
|
1249
|
-
var WorkersCompDeclarationsSchema =
|
|
1250
|
-
line:
|
|
1251
|
-
coveredStates:
|
|
1252
|
-
classifications:
|
|
1517
|
+
locations: z15.array(InsuredLocationSchema),
|
|
1518
|
+
blanketLimit: z15.string().optional(),
|
|
1519
|
+
businessIncomeLimit: z15.string().optional(),
|
|
1520
|
+
extraExpenseLimit: z15.string().optional()
|
|
1521
|
+
});
|
|
1522
|
+
var CommercialAutoDeclarationsSchema = z15.object({
|
|
1523
|
+
line: z15.literal("commercial_auto"),
|
|
1524
|
+
vehicles: z15.array(InsuredVehicleSchema),
|
|
1525
|
+
coveredAutoSymbols: z15.array(z15.number()).optional(),
|
|
1526
|
+
liabilityLimit: z15.string().optional(),
|
|
1527
|
+
umLimit: z15.string().optional(),
|
|
1528
|
+
uimLimit: z15.string().optional(),
|
|
1529
|
+
hiredAutoLiability: z15.boolean().optional(),
|
|
1530
|
+
nonOwnedAutoLiability: z15.boolean().optional()
|
|
1531
|
+
});
|
|
1532
|
+
var WorkersCompDeclarationsSchema = z15.object({
|
|
1533
|
+
line: z15.literal("workers_comp"),
|
|
1534
|
+
coveredStates: z15.array(z15.string()).optional(),
|
|
1535
|
+
classifications: z15.array(ClassificationCodeSchema),
|
|
1253
1536
|
experienceMod: ExperienceModSchema.optional(),
|
|
1254
1537
|
employersLiability: EmployersLiabilityLimitsSchema.optional()
|
|
1255
1538
|
});
|
|
1256
|
-
var UmbrellaExcessDeclarationsSchema =
|
|
1257
|
-
line:
|
|
1258
|
-
perOccurrenceLimit:
|
|
1259
|
-
aggregateLimit:
|
|
1260
|
-
retention:
|
|
1261
|
-
underlyingPolicies:
|
|
1262
|
-
carrier:
|
|
1263
|
-
policyNumber:
|
|
1264
|
-
policyType:
|
|
1265
|
-
limits:
|
|
1539
|
+
var UmbrellaExcessDeclarationsSchema = z15.object({
|
|
1540
|
+
line: z15.literal("umbrella_excess"),
|
|
1541
|
+
perOccurrenceLimit: z15.string().optional(),
|
|
1542
|
+
aggregateLimit: z15.string().optional(),
|
|
1543
|
+
retention: z15.string().optional(),
|
|
1544
|
+
underlyingPolicies: z15.array(z15.object({
|
|
1545
|
+
carrier: z15.string().optional(),
|
|
1546
|
+
policyNumber: z15.string().optional(),
|
|
1547
|
+
policyType: z15.string().optional(),
|
|
1548
|
+
limits: z15.string().optional()
|
|
1266
1549
|
}))
|
|
1267
1550
|
});
|
|
1268
|
-
var ProfessionalLiabilityDeclarationsSchema =
|
|
1269
|
-
line:
|
|
1270
|
-
perClaimLimit:
|
|
1271
|
-
aggregateLimit:
|
|
1272
|
-
retroactiveDate:
|
|
1551
|
+
var ProfessionalLiabilityDeclarationsSchema = z15.object({
|
|
1552
|
+
line: z15.literal("professional_liability"),
|
|
1553
|
+
perClaimLimit: z15.string().optional(),
|
|
1554
|
+
aggregateLimit: z15.string().optional(),
|
|
1555
|
+
retroactiveDate: z15.string().optional(),
|
|
1273
1556
|
defenseCostTreatment: DefenseCostTreatmentSchema.optional(),
|
|
1274
1557
|
extendedReportingPeriod: ExtendedReportingPeriodSchema.optional()
|
|
1275
1558
|
});
|
|
1276
|
-
var CyberDeclarationsSchema =
|
|
1277
|
-
line:
|
|
1278
|
-
aggregateLimit:
|
|
1279
|
-
retroactiveDate:
|
|
1280
|
-
waitingPeriodHours:
|
|
1281
|
-
sublimits:
|
|
1282
|
-
coverageName:
|
|
1283
|
-
limit:
|
|
1559
|
+
var CyberDeclarationsSchema = z15.object({
|
|
1560
|
+
line: z15.literal("cyber"),
|
|
1561
|
+
aggregateLimit: z15.string().optional(),
|
|
1562
|
+
retroactiveDate: z15.string().optional(),
|
|
1563
|
+
waitingPeriodHours: z15.number().optional(),
|
|
1564
|
+
sublimits: z15.array(z15.object({
|
|
1565
|
+
coverageName: z15.string(),
|
|
1566
|
+
limit: z15.string()
|
|
1284
1567
|
})).optional()
|
|
1285
1568
|
});
|
|
1286
|
-
var DODeclarationsSchema =
|
|
1287
|
-
line:
|
|
1288
|
-
sideALimit:
|
|
1289
|
-
sideBLimit:
|
|
1290
|
-
sideCLimit:
|
|
1291
|
-
sideARetention:
|
|
1292
|
-
sideBRetention:
|
|
1293
|
-
sideCRetention:
|
|
1294
|
-
continuityDate:
|
|
1295
|
-
});
|
|
1296
|
-
var CrimeDeclarationsSchema =
|
|
1297
|
-
line:
|
|
1298
|
-
formType:
|
|
1299
|
-
agreements:
|
|
1300
|
-
agreement:
|
|
1301
|
-
coverageName:
|
|
1302
|
-
limit:
|
|
1303
|
-
deductible:
|
|
1569
|
+
var DODeclarationsSchema = z15.object({
|
|
1570
|
+
line: z15.literal("directors_officers"),
|
|
1571
|
+
sideALimit: z15.string().optional(),
|
|
1572
|
+
sideBLimit: z15.string().optional(),
|
|
1573
|
+
sideCLimit: z15.string().optional(),
|
|
1574
|
+
sideARetention: z15.string().optional(),
|
|
1575
|
+
sideBRetention: z15.string().optional(),
|
|
1576
|
+
sideCRetention: z15.string().optional(),
|
|
1577
|
+
continuityDate: z15.string().optional()
|
|
1578
|
+
});
|
|
1579
|
+
var CrimeDeclarationsSchema = z15.object({
|
|
1580
|
+
line: z15.literal("crime"),
|
|
1581
|
+
formType: z15.enum(["discovery", "loss_sustained"]).optional(),
|
|
1582
|
+
agreements: z15.array(z15.object({
|
|
1583
|
+
agreement: z15.string(),
|
|
1584
|
+
coverageName: z15.string(),
|
|
1585
|
+
limit: z15.string(),
|
|
1586
|
+
deductible: z15.string()
|
|
1304
1587
|
}))
|
|
1305
1588
|
});
|
|
1306
1589
|
|
|
1307
1590
|
// src/schemas/declarations/index.ts
|
|
1308
|
-
var DeclarationsSchema =
|
|
1591
|
+
var DeclarationsSchema = z16.discriminatedUnion("line", [
|
|
1309
1592
|
// Personal lines
|
|
1310
1593
|
HomeownersDeclarationsSchema,
|
|
1311
1594
|
PersonalAutoDeclarationsSchema,
|
|
@@ -1334,251 +1617,251 @@ var DeclarationsSchema = z15.discriminatedUnion("line", [
|
|
|
1334
1617
|
]);
|
|
1335
1618
|
|
|
1336
1619
|
// src/schemas/document.ts
|
|
1337
|
-
import { z as
|
|
1338
|
-
var SubsectionSchema =
|
|
1339
|
-
title:
|
|
1340
|
-
sectionNumber:
|
|
1341
|
-
pageNumber:
|
|
1342
|
-
excerpt:
|
|
1343
|
-
content:
|
|
1344
|
-
documentNodeId:
|
|
1345
|
-
sourceSpanIds:
|
|
1346
|
-
sourceTextHash:
|
|
1347
|
-
});
|
|
1348
|
-
var SectionSchema =
|
|
1349
|
-
title:
|
|
1350
|
-
sectionNumber:
|
|
1351
|
-
pageStart:
|
|
1352
|
-
pageEnd:
|
|
1353
|
-
type:
|
|
1354
|
-
coverageType:
|
|
1355
|
-
excerpt:
|
|
1356
|
-
content:
|
|
1357
|
-
subsections:
|
|
1358
|
-
recordId:
|
|
1359
|
-
documentNodeId:
|
|
1360
|
-
sourceSpanIds:
|
|
1361
|
-
sourceTextHash:
|
|
1362
|
-
});
|
|
1363
|
-
var SubjectivitySchema =
|
|
1364
|
-
description:
|
|
1365
|
-
category:
|
|
1366
|
-
});
|
|
1367
|
-
var UnderwritingConditionSchema =
|
|
1368
|
-
description:
|
|
1369
|
-
});
|
|
1370
|
-
var PremiumLineSchema =
|
|
1371
|
-
line:
|
|
1372
|
-
amount:
|
|
1373
|
-
amountValue:
|
|
1374
|
-
documentNodeId:
|
|
1375
|
-
sourceSpanIds:
|
|
1376
|
-
sourceTextHash:
|
|
1377
|
-
});
|
|
1378
|
-
var AuxiliaryFactSchema =
|
|
1379
|
-
key:
|
|
1380
|
-
value:
|
|
1381
|
-
subject:
|
|
1382
|
-
context:
|
|
1383
|
-
documentNodeId:
|
|
1384
|
-
sourceSpanIds:
|
|
1385
|
-
sourceTextHash:
|
|
1386
|
-
});
|
|
1387
|
-
var DefinitionSchema =
|
|
1388
|
-
term:
|
|
1389
|
-
definition:
|
|
1390
|
-
pageNumber:
|
|
1391
|
-
formNumber:
|
|
1392
|
-
formTitle:
|
|
1393
|
-
sectionRef:
|
|
1394
|
-
originalContent:
|
|
1395
|
-
recordId:
|
|
1396
|
-
documentNodeId:
|
|
1397
|
-
sourceSpanIds:
|
|
1398
|
-
sourceTextHash:
|
|
1399
|
-
});
|
|
1400
|
-
var CoveredReasonSchema =
|
|
1401
|
-
coverageName:
|
|
1402
|
-
reasonNumber:
|
|
1403
|
-
title:
|
|
1404
|
-
content:
|
|
1405
|
-
conditions:
|
|
1406
|
-
exceptions:
|
|
1407
|
-
appliesTo:
|
|
1408
|
-
pageNumber:
|
|
1409
|
-
formNumber:
|
|
1410
|
-
formTitle:
|
|
1411
|
-
sectionRef:
|
|
1412
|
-
originalContent:
|
|
1413
|
-
recordId:
|
|
1414
|
-
documentNodeId:
|
|
1415
|
-
sourceSpanIds:
|
|
1416
|
-
sourceTextHash:
|
|
1417
|
-
});
|
|
1418
|
-
var DocumentTableOfContentsEntrySchema =
|
|
1419
|
-
title:
|
|
1420
|
-
level:
|
|
1421
|
-
pageStart:
|
|
1422
|
-
pageEnd:
|
|
1423
|
-
documentNodeId:
|
|
1424
|
-
sourceSpanIds:
|
|
1425
|
-
});
|
|
1426
|
-
var DocumentPageMapEntrySchema =
|
|
1427
|
-
page:
|
|
1428
|
-
label:
|
|
1429
|
-
formNumber:
|
|
1430
|
-
formTitle:
|
|
1431
|
-
sectionTitle:
|
|
1432
|
-
extractorNames:
|
|
1433
|
-
sourceSpanIds:
|
|
1434
|
-
});
|
|
1435
|
-
var DocumentAgentGuidanceSchema =
|
|
1436
|
-
kind:
|
|
1437
|
-
title:
|
|
1438
|
-
detail:
|
|
1439
|
-
sourceSpanIds:
|
|
1440
|
-
});
|
|
1441
|
-
var DocumentMetadataSchema =
|
|
1442
|
-
sourceTreeVersion:
|
|
1443
|
-
sourceTreeCanonical:
|
|
1444
|
-
formInventory:
|
|
1445
|
-
tableOfContents:
|
|
1446
|
-
pageMap:
|
|
1447
|
-
agentGuidance:
|
|
1448
|
-
});
|
|
1449
|
-
var DocumentNodeSchema =
|
|
1450
|
-
() =>
|
|
1451
|
-
id:
|
|
1452
|
-
title:
|
|
1453
|
-
originalTitle:
|
|
1454
|
-
type:
|
|
1455
|
-
label:
|
|
1456
|
-
level:
|
|
1457
|
-
sectionNumber:
|
|
1458
|
-
pageStart:
|
|
1459
|
-
pageEnd:
|
|
1460
|
-
formNumber:
|
|
1461
|
-
formTitle:
|
|
1462
|
-
excerpt:
|
|
1463
|
-
content:
|
|
1464
|
-
interpretationLabels:
|
|
1465
|
-
sourceSpanIds:
|
|
1466
|
-
sourceTextHash:
|
|
1467
|
-
children:
|
|
1620
|
+
import { z as z17 } from "zod";
|
|
1621
|
+
var SubsectionSchema = z17.object({
|
|
1622
|
+
title: z17.string(),
|
|
1623
|
+
sectionNumber: z17.string().optional(),
|
|
1624
|
+
pageNumber: z17.number().optional(),
|
|
1625
|
+
excerpt: z17.string().optional(),
|
|
1626
|
+
content: z17.string().optional(),
|
|
1627
|
+
documentNodeId: z17.string().optional(),
|
|
1628
|
+
sourceSpanIds: z17.array(z17.string()).optional(),
|
|
1629
|
+
sourceTextHash: z17.string().optional()
|
|
1630
|
+
});
|
|
1631
|
+
var SectionSchema = z17.object({
|
|
1632
|
+
title: z17.string(),
|
|
1633
|
+
sectionNumber: z17.string().optional(),
|
|
1634
|
+
pageStart: z17.number(),
|
|
1635
|
+
pageEnd: z17.number().optional(),
|
|
1636
|
+
type: z17.string(),
|
|
1637
|
+
coverageType: z17.string().optional(),
|
|
1638
|
+
excerpt: z17.string().optional(),
|
|
1639
|
+
content: z17.string().optional(),
|
|
1640
|
+
subsections: z17.array(SubsectionSchema).optional(),
|
|
1641
|
+
recordId: z17.string().optional(),
|
|
1642
|
+
documentNodeId: z17.string().optional(),
|
|
1643
|
+
sourceSpanIds: z17.array(z17.string()).optional(),
|
|
1644
|
+
sourceTextHash: z17.string().optional()
|
|
1645
|
+
});
|
|
1646
|
+
var SubjectivitySchema = z17.object({
|
|
1647
|
+
description: z17.string(),
|
|
1648
|
+
category: z17.string().optional()
|
|
1649
|
+
});
|
|
1650
|
+
var UnderwritingConditionSchema = z17.object({
|
|
1651
|
+
description: z17.string()
|
|
1652
|
+
});
|
|
1653
|
+
var PremiumLineSchema = z17.object({
|
|
1654
|
+
line: z17.string(),
|
|
1655
|
+
amount: z17.string(),
|
|
1656
|
+
amountValue: z17.number().optional(),
|
|
1657
|
+
documentNodeId: z17.string().optional(),
|
|
1658
|
+
sourceSpanIds: z17.array(z17.string()).optional(),
|
|
1659
|
+
sourceTextHash: z17.string().optional()
|
|
1660
|
+
});
|
|
1661
|
+
var AuxiliaryFactSchema = z17.object({
|
|
1662
|
+
key: z17.string(),
|
|
1663
|
+
value: z17.string(),
|
|
1664
|
+
subject: z17.string().optional(),
|
|
1665
|
+
context: z17.string().optional(),
|
|
1666
|
+
documentNodeId: z17.string().optional(),
|
|
1667
|
+
sourceSpanIds: z17.array(z17.string()).optional(),
|
|
1668
|
+
sourceTextHash: z17.string().optional()
|
|
1669
|
+
});
|
|
1670
|
+
var DefinitionSchema = z17.object({
|
|
1671
|
+
term: z17.string(),
|
|
1672
|
+
definition: z17.string(),
|
|
1673
|
+
pageNumber: z17.number().optional(),
|
|
1674
|
+
formNumber: z17.string().optional(),
|
|
1675
|
+
formTitle: z17.string().optional(),
|
|
1676
|
+
sectionRef: z17.string().optional(),
|
|
1677
|
+
originalContent: z17.string().optional(),
|
|
1678
|
+
recordId: z17.string().optional(),
|
|
1679
|
+
documentNodeId: z17.string().optional(),
|
|
1680
|
+
sourceSpanIds: z17.array(z17.string()).optional(),
|
|
1681
|
+
sourceTextHash: z17.string().optional()
|
|
1682
|
+
});
|
|
1683
|
+
var CoveredReasonSchema = z17.object({
|
|
1684
|
+
coverageName: z17.string(),
|
|
1685
|
+
reasonNumber: z17.string().optional(),
|
|
1686
|
+
title: z17.string().optional(),
|
|
1687
|
+
content: z17.string(),
|
|
1688
|
+
conditions: z17.array(z17.string()).optional(),
|
|
1689
|
+
exceptions: z17.array(z17.string()).optional(),
|
|
1690
|
+
appliesTo: z17.array(z17.string()).optional(),
|
|
1691
|
+
pageNumber: z17.number().optional(),
|
|
1692
|
+
formNumber: z17.string().optional(),
|
|
1693
|
+
formTitle: z17.string().optional(),
|
|
1694
|
+
sectionRef: z17.string().optional(),
|
|
1695
|
+
originalContent: z17.string().optional(),
|
|
1696
|
+
recordId: z17.string().optional(),
|
|
1697
|
+
documentNodeId: z17.string().optional(),
|
|
1698
|
+
sourceSpanIds: z17.array(z17.string()).optional(),
|
|
1699
|
+
sourceTextHash: z17.string().optional()
|
|
1700
|
+
});
|
|
1701
|
+
var DocumentTableOfContentsEntrySchema = z17.object({
|
|
1702
|
+
title: z17.string(),
|
|
1703
|
+
level: z17.number().int().positive().optional(),
|
|
1704
|
+
pageStart: z17.number().optional(),
|
|
1705
|
+
pageEnd: z17.number().optional(),
|
|
1706
|
+
documentNodeId: z17.string().optional(),
|
|
1707
|
+
sourceSpanIds: z17.array(z17.string()).optional()
|
|
1708
|
+
});
|
|
1709
|
+
var DocumentPageMapEntrySchema = z17.object({
|
|
1710
|
+
page: z17.number().int().positive(),
|
|
1711
|
+
label: z17.string().optional(),
|
|
1712
|
+
formNumber: z17.string().optional(),
|
|
1713
|
+
formTitle: z17.string().optional(),
|
|
1714
|
+
sectionTitle: z17.string().optional(),
|
|
1715
|
+
extractorNames: z17.array(z17.string()).optional(),
|
|
1716
|
+
sourceSpanIds: z17.array(z17.string()).optional()
|
|
1717
|
+
});
|
|
1718
|
+
var DocumentAgentGuidanceSchema = z17.object({
|
|
1719
|
+
kind: z17.string(),
|
|
1720
|
+
title: z17.string(),
|
|
1721
|
+
detail: z17.string(),
|
|
1722
|
+
sourceSpanIds: z17.array(z17.string()).optional()
|
|
1723
|
+
});
|
|
1724
|
+
var DocumentMetadataSchema = z17.object({
|
|
1725
|
+
sourceTreeVersion: z17.string().optional(),
|
|
1726
|
+
sourceTreeCanonical: z17.boolean().optional(),
|
|
1727
|
+
formInventory: z17.array(FormReferenceSchema).optional(),
|
|
1728
|
+
tableOfContents: z17.array(DocumentTableOfContentsEntrySchema).optional(),
|
|
1729
|
+
pageMap: z17.array(DocumentPageMapEntrySchema).optional(),
|
|
1730
|
+
agentGuidance: z17.array(DocumentAgentGuidanceSchema).optional()
|
|
1731
|
+
});
|
|
1732
|
+
var DocumentNodeSchema = z17.lazy(
|
|
1733
|
+
() => z17.object({
|
|
1734
|
+
id: z17.string(),
|
|
1735
|
+
title: z17.string(),
|
|
1736
|
+
originalTitle: z17.string().optional(),
|
|
1737
|
+
type: z17.string().optional(),
|
|
1738
|
+
label: z17.string().optional(),
|
|
1739
|
+
level: z17.number().int().positive().optional(),
|
|
1740
|
+
sectionNumber: z17.string().optional(),
|
|
1741
|
+
pageStart: z17.number().optional(),
|
|
1742
|
+
pageEnd: z17.number().optional(),
|
|
1743
|
+
formNumber: z17.string().optional(),
|
|
1744
|
+
formTitle: z17.string().optional(),
|
|
1745
|
+
excerpt: z17.string().optional(),
|
|
1746
|
+
content: z17.string().optional(),
|
|
1747
|
+
interpretationLabels: z17.array(z17.string()).optional(),
|
|
1748
|
+
sourceSpanIds: z17.array(z17.string()).optional(),
|
|
1749
|
+
sourceTextHash: z17.string().optional(),
|
|
1750
|
+
children: z17.array(DocumentNodeSchema).optional()
|
|
1468
1751
|
})
|
|
1469
1752
|
);
|
|
1470
1753
|
var BaseDocumentFields = {
|
|
1471
|
-
id:
|
|
1472
|
-
carrier:
|
|
1473
|
-
security:
|
|
1474
|
-
insuredName:
|
|
1475
|
-
premium:
|
|
1476
|
-
premiumAmount:
|
|
1477
|
-
summary:
|
|
1478
|
-
|
|
1479
|
-
coverages:
|
|
1754
|
+
id: z17.string(),
|
|
1755
|
+
carrier: z17.string(),
|
|
1756
|
+
security: z17.string().optional(),
|
|
1757
|
+
insuredName: z17.string(),
|
|
1758
|
+
premium: z17.string().optional(),
|
|
1759
|
+
premiumAmount: z17.number().optional(),
|
|
1760
|
+
summary: z17.string().optional(),
|
|
1761
|
+
linesOfBusiness: z17.array(z17.string()).optional(),
|
|
1762
|
+
coverages: z17.array(CoverageSchema),
|
|
1480
1763
|
documentMetadata: DocumentMetadataSchema,
|
|
1481
|
-
documentOutline:
|
|
1482
|
-
sections:
|
|
1483
|
-
definitions:
|
|
1484
|
-
coveredReasons:
|
|
1764
|
+
documentOutline: z17.array(DocumentNodeSchema),
|
|
1765
|
+
sections: z17.array(SectionSchema).optional(),
|
|
1766
|
+
definitions: z17.array(DefinitionSchema).optional(),
|
|
1767
|
+
coveredReasons: z17.array(CoveredReasonSchema).optional(),
|
|
1485
1768
|
// Enriched fields (v1.2+)
|
|
1486
|
-
carrierLegalName:
|
|
1487
|
-
carrierNaicNumber:
|
|
1488
|
-
carrierAmBestRating:
|
|
1489
|
-
carrierAdmittedStatus:
|
|
1490
|
-
mga:
|
|
1491
|
-
underwriter:
|
|
1492
|
-
brokerAgency:
|
|
1493
|
-
brokerContactName:
|
|
1494
|
-
brokerLicenseNumber:
|
|
1495
|
-
priorPolicyNumber:
|
|
1496
|
-
programName:
|
|
1497
|
-
isRenewal:
|
|
1498
|
-
isPackage:
|
|
1499
|
-
insuredDba:
|
|
1769
|
+
carrierLegalName: z17.string().optional(),
|
|
1770
|
+
carrierNaicNumber: z17.string().optional(),
|
|
1771
|
+
carrierAmBestRating: z17.string().optional(),
|
|
1772
|
+
carrierAdmittedStatus: z17.string().optional(),
|
|
1773
|
+
mga: z17.string().optional(),
|
|
1774
|
+
underwriter: z17.string().optional(),
|
|
1775
|
+
brokerAgency: z17.string().optional(),
|
|
1776
|
+
brokerContactName: z17.string().optional(),
|
|
1777
|
+
brokerLicenseNumber: z17.string().optional(),
|
|
1778
|
+
priorPolicyNumber: z17.string().optional(),
|
|
1779
|
+
programName: z17.string().optional(),
|
|
1780
|
+
isRenewal: z17.boolean().optional(),
|
|
1781
|
+
isPackage: z17.boolean().optional(),
|
|
1782
|
+
insuredDba: z17.string().optional(),
|
|
1500
1783
|
insuredAddress: SourceBackedAddressSchema.optional(),
|
|
1501
1784
|
insuredEntityType: EntityTypeSchema.optional(),
|
|
1502
|
-
additionalNamedInsureds:
|
|
1503
|
-
insuredSicCode:
|
|
1504
|
-
insuredNaicsCode:
|
|
1505
|
-
insuredFein:
|
|
1506
|
-
enrichedCoverages:
|
|
1507
|
-
endorsements:
|
|
1508
|
-
exclusions:
|
|
1509
|
-
conditions:
|
|
1785
|
+
additionalNamedInsureds: z17.array(NamedInsuredSchema).optional(),
|
|
1786
|
+
insuredSicCode: z17.string().optional(),
|
|
1787
|
+
insuredNaicsCode: z17.string().optional(),
|
|
1788
|
+
insuredFein: z17.string().optional(),
|
|
1789
|
+
enrichedCoverages: z17.array(EnrichedCoverageSchema).optional(),
|
|
1790
|
+
endorsements: z17.array(EndorsementSchema).optional(),
|
|
1791
|
+
exclusions: z17.array(ExclusionSchema).optional(),
|
|
1792
|
+
conditions: z17.array(PolicyConditionSchema).optional(),
|
|
1510
1793
|
limits: LimitScheduleSchema.optional(),
|
|
1511
1794
|
deductibles: DeductibleScheduleSchema.optional(),
|
|
1512
|
-
locations:
|
|
1513
|
-
vehicles:
|
|
1514
|
-
classifications:
|
|
1515
|
-
formInventory:
|
|
1795
|
+
locations: z17.array(InsuredLocationSchema).optional(),
|
|
1796
|
+
vehicles: z17.array(InsuredVehicleSchema).optional(),
|
|
1797
|
+
classifications: z17.array(ClassificationCodeSchema).optional(),
|
|
1798
|
+
formInventory: z17.array(FormReferenceSchema).optional(),
|
|
1516
1799
|
declarations: DeclarationsSchema.optional(),
|
|
1517
1800
|
coverageForm: CoverageFormSchema.optional(),
|
|
1518
|
-
retroactiveDate:
|
|
1801
|
+
retroactiveDate: z17.string().optional(),
|
|
1519
1802
|
extendedReportingPeriod: ExtendedReportingPeriodSchema.optional(),
|
|
1520
1803
|
insurer: InsurerInfoSchema.optional(),
|
|
1521
1804
|
producer: ProducerInfoSchema.optional(),
|
|
1522
|
-
claimsContacts:
|
|
1523
|
-
regulatoryContacts:
|
|
1524
|
-
thirdPartyAdministrators:
|
|
1525
|
-
additionalInsureds:
|
|
1526
|
-
lossPayees:
|
|
1527
|
-
mortgageHolders:
|
|
1528
|
-
taxesAndFees:
|
|
1529
|
-
totalCost:
|
|
1530
|
-
totalCostAmount:
|
|
1531
|
-
minimumPremium:
|
|
1532
|
-
minimumPremiumAmount:
|
|
1533
|
-
depositPremium:
|
|
1534
|
-
depositPremiumAmount:
|
|
1805
|
+
claimsContacts: z17.array(ContactSchema).optional(),
|
|
1806
|
+
regulatoryContacts: z17.array(ContactSchema).optional(),
|
|
1807
|
+
thirdPartyAdministrators: z17.array(ContactSchema).optional(),
|
|
1808
|
+
additionalInsureds: z17.array(EndorsementPartySchema).optional(),
|
|
1809
|
+
lossPayees: z17.array(EndorsementPartySchema).optional(),
|
|
1810
|
+
mortgageHolders: z17.array(EndorsementPartySchema).optional(),
|
|
1811
|
+
taxesAndFees: z17.array(TaxFeeItemSchema).optional(),
|
|
1812
|
+
totalCost: z17.string().optional(),
|
|
1813
|
+
totalCostAmount: z17.number().optional(),
|
|
1814
|
+
minimumPremium: z17.string().optional(),
|
|
1815
|
+
minimumPremiumAmount: z17.number().optional(),
|
|
1816
|
+
depositPremium: z17.string().optional(),
|
|
1817
|
+
depositPremiumAmount: z17.number().optional(),
|
|
1535
1818
|
paymentPlan: PaymentPlanSchema.optional(),
|
|
1536
1819
|
auditType: AuditTypeSchema.optional(),
|
|
1537
|
-
ratingBasis:
|
|
1538
|
-
premiumByLocation:
|
|
1820
|
+
ratingBasis: z17.array(RatingBasisSchema).optional(),
|
|
1821
|
+
premiumByLocation: z17.array(LocationPremiumSchema).optional(),
|
|
1539
1822
|
lossSummary: LossSummarySchema.optional(),
|
|
1540
|
-
individualClaims:
|
|
1823
|
+
individualClaims: z17.array(ClaimRecordSchema).optional(),
|
|
1541
1824
|
experienceMod: ExperienceModSchema.optional(),
|
|
1542
|
-
cancellationNoticeDays:
|
|
1543
|
-
nonrenewalNoticeDays:
|
|
1544
|
-
supplementaryFacts:
|
|
1825
|
+
cancellationNoticeDays: z17.number().optional(),
|
|
1826
|
+
nonrenewalNoticeDays: z17.number().optional(),
|
|
1827
|
+
supplementaryFacts: z17.array(AuxiliaryFactSchema).optional()
|
|
1545
1828
|
};
|
|
1546
|
-
var PolicyDocumentSchema =
|
|
1829
|
+
var PolicyDocumentSchema = z17.object({
|
|
1547
1830
|
...BaseDocumentFields,
|
|
1548
|
-
type:
|
|
1549
|
-
policyNumber:
|
|
1550
|
-
effectiveDate:
|
|
1551
|
-
expirationDate:
|
|
1831
|
+
type: z17.literal("policy"),
|
|
1832
|
+
policyNumber: z17.string(),
|
|
1833
|
+
effectiveDate: z17.string(),
|
|
1834
|
+
expirationDate: z17.string().optional(),
|
|
1552
1835
|
policyTermType: PolicyTermTypeSchema.optional(),
|
|
1553
|
-
nextReviewDate:
|
|
1554
|
-
effectiveTime:
|
|
1836
|
+
nextReviewDate: z17.string().optional(),
|
|
1837
|
+
effectiveTime: z17.string().optional()
|
|
1555
1838
|
});
|
|
1556
|
-
var QuoteDocumentSchema =
|
|
1839
|
+
var QuoteDocumentSchema = z17.object({
|
|
1557
1840
|
...BaseDocumentFields,
|
|
1558
|
-
type:
|
|
1559
|
-
quoteNumber:
|
|
1560
|
-
proposedEffectiveDate:
|
|
1561
|
-
proposedExpirationDate:
|
|
1562
|
-
quoteExpirationDate:
|
|
1563
|
-
subjectivities:
|
|
1564
|
-
underwritingConditions:
|
|
1565
|
-
premiumBreakdown:
|
|
1841
|
+
type: z17.literal("quote"),
|
|
1842
|
+
quoteNumber: z17.string(),
|
|
1843
|
+
proposedEffectiveDate: z17.string().optional(),
|
|
1844
|
+
proposedExpirationDate: z17.string().optional(),
|
|
1845
|
+
quoteExpirationDate: z17.string().optional(),
|
|
1846
|
+
subjectivities: z17.array(SubjectivitySchema).optional(),
|
|
1847
|
+
underwritingConditions: z17.array(UnderwritingConditionSchema).optional(),
|
|
1848
|
+
premiumBreakdown: z17.array(PremiumLineSchema).optional(),
|
|
1566
1849
|
// Enriched quote fields (v1.2+)
|
|
1567
|
-
enrichedSubjectivities:
|
|
1568
|
-
enrichedUnderwritingConditions:
|
|
1569
|
-
warrantyRequirements:
|
|
1570
|
-
lossControlRecommendations:
|
|
1850
|
+
enrichedSubjectivities: z17.array(EnrichedSubjectivitySchema).optional(),
|
|
1851
|
+
enrichedUnderwritingConditions: z17.array(EnrichedUnderwritingConditionSchema).optional(),
|
|
1852
|
+
warrantyRequirements: z17.array(z17.string()).optional(),
|
|
1853
|
+
lossControlRecommendations: z17.array(z17.string()).optional(),
|
|
1571
1854
|
bindingAuthority: BindingAuthoritySchema.optional()
|
|
1572
1855
|
});
|
|
1573
|
-
var InsuranceDocumentSchema =
|
|
1856
|
+
var InsuranceDocumentSchema = z17.discriminatedUnion("type", [
|
|
1574
1857
|
PolicyDocumentSchema,
|
|
1575
1858
|
QuoteDocumentSchema
|
|
1576
1859
|
]);
|
|
1577
1860
|
|
|
1578
1861
|
// src/schemas/platform.ts
|
|
1579
|
-
import { z as
|
|
1580
|
-
var PlatformSchema =
|
|
1581
|
-
var CommunicationIntentSchema =
|
|
1862
|
+
import { z as z18 } from "zod";
|
|
1863
|
+
var PlatformSchema = z18.enum(["email", "chat", "sms", "slack", "discord"]);
|
|
1864
|
+
var CommunicationIntentSchema = z18.enum(["direct", "mediated", "observed"]);
|
|
1582
1865
|
var PLATFORM_CONFIGS = {
|
|
1583
1866
|
email: {
|
|
1584
1867
|
supportsMarkdown: false,
|
|
@@ -1611,65 +1894,65 @@ var PLATFORM_CONFIGS = {
|
|
|
1611
1894
|
};
|
|
1612
1895
|
|
|
1613
1896
|
// src/schemas/pce.ts
|
|
1614
|
-
import { z as
|
|
1897
|
+
import { z as z20 } from "zod";
|
|
1615
1898
|
|
|
1616
1899
|
// src/case/index.ts
|
|
1617
|
-
import { z as
|
|
1618
|
-
var CaseEvidenceSourceSchema =
|
|
1619
|
-
id:
|
|
1620
|
-
label:
|
|
1621
|
-
documentId:
|
|
1622
|
-
page:
|
|
1623
|
-
fieldPath:
|
|
1624
|
-
text:
|
|
1625
|
-
metadata:
|
|
1626
|
-
});
|
|
1627
|
-
var CaseCitationSchema =
|
|
1628
|
-
sourceId:
|
|
1629
|
-
quote:
|
|
1630
|
-
page:
|
|
1631
|
-
fieldPath:
|
|
1632
|
-
});
|
|
1633
|
-
var ValidationIssueSeveritySchema =
|
|
1634
|
-
var CaseValidationIssueSchema =
|
|
1635
|
-
code:
|
|
1900
|
+
import { z as z19 } from "zod";
|
|
1901
|
+
var CaseEvidenceSourceSchema = z19.object({
|
|
1902
|
+
id: z19.string(),
|
|
1903
|
+
label: z19.string().optional(),
|
|
1904
|
+
documentId: z19.string().optional(),
|
|
1905
|
+
page: z19.number().optional(),
|
|
1906
|
+
fieldPath: z19.string().optional(),
|
|
1907
|
+
text: z19.string().describe("Source text available for span validation and citation"),
|
|
1908
|
+
metadata: z19.record(z19.string(), z19.string()).optional()
|
|
1909
|
+
});
|
|
1910
|
+
var CaseCitationSchema = z19.object({
|
|
1911
|
+
sourceId: z19.string(),
|
|
1912
|
+
quote: z19.string(),
|
|
1913
|
+
page: z19.number().optional(),
|
|
1914
|
+
fieldPath: z19.string().optional()
|
|
1915
|
+
});
|
|
1916
|
+
var ValidationIssueSeveritySchema = z19.enum(["info", "warning", "blocking"]);
|
|
1917
|
+
var CaseValidationIssueSchema = z19.object({
|
|
1918
|
+
code: z19.string(),
|
|
1636
1919
|
severity: ValidationIssueSeveritySchema,
|
|
1637
|
-
message:
|
|
1638
|
-
itemId:
|
|
1639
|
-
fieldPath:
|
|
1640
|
-
sourceId:
|
|
1641
|
-
});
|
|
1642
|
-
var MissingInfoQuestionSchema =
|
|
1643
|
-
id:
|
|
1644
|
-
itemId:
|
|
1645
|
-
fieldPath:
|
|
1646
|
-
question:
|
|
1647
|
-
reason:
|
|
1648
|
-
answer:
|
|
1649
|
-
});
|
|
1650
|
-
var CasePacketArtifactKindSchema =
|
|
1920
|
+
message: z19.string(),
|
|
1921
|
+
itemId: z19.string().optional(),
|
|
1922
|
+
fieldPath: z19.string().optional(),
|
|
1923
|
+
sourceId: z19.string().optional()
|
|
1924
|
+
});
|
|
1925
|
+
var MissingInfoQuestionSchema = z19.object({
|
|
1926
|
+
id: z19.string(),
|
|
1927
|
+
itemId: z19.string().optional(),
|
|
1928
|
+
fieldPath: z19.string().optional(),
|
|
1929
|
+
question: z19.string(),
|
|
1930
|
+
reason: z19.string(),
|
|
1931
|
+
answer: z19.string().optional()
|
|
1932
|
+
});
|
|
1933
|
+
var CasePacketArtifactKindSchema = z19.enum([
|
|
1651
1934
|
"underwriter_summary",
|
|
1652
1935
|
"carrier_email",
|
|
1653
1936
|
"missing_info_request",
|
|
1654
1937
|
"json_packet",
|
|
1655
1938
|
"validation_report"
|
|
1656
1939
|
]);
|
|
1657
|
-
var CasePacketArtifactSchema =
|
|
1658
|
-
id:
|
|
1940
|
+
var CasePacketArtifactSchema = z19.object({
|
|
1941
|
+
id: z19.string(),
|
|
1659
1942
|
kind: CasePacketArtifactKindSchema,
|
|
1660
|
-
title:
|
|
1661
|
-
content:
|
|
1662
|
-
citations:
|
|
1663
|
-
});
|
|
1664
|
-
var CaseSubmissionPacketSchema =
|
|
1665
|
-
id:
|
|
1666
|
-
caseId:
|
|
1667
|
-
artifacts:
|
|
1668
|
-
validationIssues:
|
|
1669
|
-
missingInfoQuestions:
|
|
1670
|
-
createdAt:
|
|
1671
|
-
});
|
|
1672
|
-
var CaseActionSchema =
|
|
1943
|
+
title: z19.string(),
|
|
1944
|
+
content: z19.string(),
|
|
1945
|
+
citations: z19.array(CaseCitationSchema).default([])
|
|
1946
|
+
});
|
|
1947
|
+
var CaseSubmissionPacketSchema = z19.object({
|
|
1948
|
+
id: z19.string(),
|
|
1949
|
+
caseId: z19.string(),
|
|
1950
|
+
artifacts: z19.array(CasePacketArtifactSchema),
|
|
1951
|
+
validationIssues: z19.array(CaseValidationIssueSchema),
|
|
1952
|
+
missingInfoQuestions: z19.array(MissingInfoQuestionSchema),
|
|
1953
|
+
createdAt: z19.number()
|
|
1954
|
+
});
|
|
1955
|
+
var CaseActionSchema = z19.enum([
|
|
1673
1956
|
"inspect_attachments",
|
|
1674
1957
|
"retrieve_policy_evidence",
|
|
1675
1958
|
"retrieve_prior_applications",
|
|
@@ -1682,23 +1965,23 @@ var CaseActionSchema = z18.enum([
|
|
|
1682
1965
|
"generate_packet",
|
|
1683
1966
|
"answer_field_or_case_question"
|
|
1684
1967
|
]);
|
|
1685
|
-
var AgenticExecutionModeSchema =
|
|
1686
|
-
var CaseProposalScoreSchema =
|
|
1687
|
-
grounding:
|
|
1688
|
-
completeness:
|
|
1689
|
-
consistency:
|
|
1690
|
-
determinism:
|
|
1691
|
-
risk:
|
|
1692
|
-
cost:
|
|
1693
|
-
});
|
|
1694
|
-
var CaseProposalSchema =
|
|
1695
|
-
id:
|
|
1696
|
-
sourceSpanIds:
|
|
1697
|
-
confidence:
|
|
1698
|
-
missingInfo:
|
|
1699
|
-
validationIssues:
|
|
1700
|
-
estimatedRisk:
|
|
1701
|
-
estimatedCost:
|
|
1968
|
+
var AgenticExecutionModeSchema = z19.enum(["deterministic_tree", "market_eval", "hybrid"]);
|
|
1969
|
+
var CaseProposalScoreSchema = z19.object({
|
|
1970
|
+
grounding: z19.number().min(0).max(1),
|
|
1971
|
+
completeness: z19.number().min(0).max(1),
|
|
1972
|
+
consistency: z19.number().min(0).max(1),
|
|
1973
|
+
determinism: z19.number().min(0).max(1),
|
|
1974
|
+
risk: z19.number().min(0).max(1),
|
|
1975
|
+
cost: z19.number().min(0).max(1)
|
|
1976
|
+
});
|
|
1977
|
+
var CaseProposalSchema = z19.object({
|
|
1978
|
+
id: z19.string(),
|
|
1979
|
+
sourceSpanIds: z19.array(z19.string()).default([]),
|
|
1980
|
+
confidence: z19.number().min(0).max(1),
|
|
1981
|
+
missingInfo: z19.array(z19.string()).default([]),
|
|
1982
|
+
validationIssues: z19.array(CaseValidationIssueSchema).default([]),
|
|
1983
|
+
estimatedRisk: z19.number().min(0).max(1).default(0.5),
|
|
1984
|
+
estimatedCost: z19.number().min(0).max(1).default(0.5),
|
|
1702
1985
|
score: CaseProposalScoreSchema.optional()
|
|
1703
1986
|
});
|
|
1704
1987
|
function stableCaseId(prefix, parts) {
|
|
@@ -1817,8 +2100,8 @@ function totalProposalScore(score) {
|
|
|
1817
2100
|
}
|
|
1818
2101
|
|
|
1819
2102
|
// src/schemas/pce.ts
|
|
1820
|
-
var PolicyChangeActionSchema =
|
|
1821
|
-
var PolicyChangeKindSchema =
|
|
2103
|
+
var PolicyChangeActionSchema = z20.enum(["add", "remove", "update", "replace", "clarify"]);
|
|
2104
|
+
var PolicyChangeKindSchema = z20.enum([
|
|
1822
2105
|
"named_insured_change",
|
|
1823
2106
|
"additional_insured_change",
|
|
1824
2107
|
"coverage_change",
|
|
@@ -1832,70 +2115,70 @@ var PolicyChangeKindSchema = z19.enum([
|
|
|
1832
2115
|
"renewal_submission_update",
|
|
1833
2116
|
"general_endorsement"
|
|
1834
2117
|
]);
|
|
1835
|
-
var PolicyChangeConfidenceSchema =
|
|
1836
|
-
var PolicyChangeStatusSchema =
|
|
1837
|
-
var PolicyChangeItemSchema =
|
|
1838
|
-
id:
|
|
2118
|
+
var PolicyChangeConfidenceSchema = z20.enum(["high", "medium", "low"]);
|
|
2119
|
+
var PolicyChangeStatusSchema = z20.enum(["draft", "needs_info", "ready", "blocked"]);
|
|
2120
|
+
var PolicyChangeItemSchema = z20.object({
|
|
2121
|
+
id: z20.string(),
|
|
1839
2122
|
kind: PolicyChangeKindSchema.default("general_endorsement"),
|
|
1840
2123
|
action: PolicyChangeActionSchema,
|
|
1841
|
-
affectedPolicyId:
|
|
1842
|
-
fieldPath:
|
|
1843
|
-
label:
|
|
1844
|
-
beforeValue:
|
|
1845
|
-
afterValue:
|
|
1846
|
-
requestedValue:
|
|
1847
|
-
effectiveDate:
|
|
1848
|
-
reason:
|
|
1849
|
-
sourceIds:
|
|
1850
|
-
sourceSpanIds:
|
|
1851
|
-
userSourceSpanIds:
|
|
1852
|
-
citations:
|
|
2124
|
+
affectedPolicyId: z20.string().default("unknown"),
|
|
2125
|
+
fieldPath: z20.string().describe("Stable policy field path or business field name"),
|
|
2126
|
+
label: z20.string(),
|
|
2127
|
+
beforeValue: z20.string().optional().describe("Existing policy value, when cited from policy evidence"),
|
|
2128
|
+
afterValue: z20.string().optional().describe("Requested new value"),
|
|
2129
|
+
requestedValue: z20.string().optional().describe("Alias for afterValue used by policy-change workflows"),
|
|
2130
|
+
effectiveDate: z20.string().optional(),
|
|
2131
|
+
reason: z20.string().optional(),
|
|
2132
|
+
sourceIds: z20.array(z20.string()).default([]),
|
|
2133
|
+
sourceSpanIds: z20.array(z20.string()).default([]),
|
|
2134
|
+
userSourceSpanIds: z20.array(z20.string()).optional(),
|
|
2135
|
+
citations: z20.array(CaseCitationSchema).default([]),
|
|
1853
2136
|
confidence: PolicyChangeConfidenceSchema.default("medium"),
|
|
1854
|
-
confidenceScore:
|
|
2137
|
+
confidenceScore: z20.number().min(0).max(1).optional(),
|
|
1855
2138
|
status: PolicyChangeStatusSchema.default("ready")
|
|
1856
2139
|
});
|
|
1857
|
-
var PceNormalizationResultSchema =
|
|
1858
|
-
summary:
|
|
1859
|
-
items:
|
|
1860
|
-
id:
|
|
2140
|
+
var PceNormalizationResultSchema = z20.object({
|
|
2141
|
+
summary: z20.string(),
|
|
2142
|
+
items: z20.array(PolicyChangeItemSchema.omit({ id: true, status: true }).extend({
|
|
2143
|
+
id: z20.string().optional(),
|
|
1861
2144
|
status: PolicyChangeStatusSchema.optional()
|
|
1862
2145
|
})),
|
|
1863
|
-
missingInfoQuestions:
|
|
1864
|
-
id:
|
|
2146
|
+
missingInfoQuestions: z20.array(MissingInfoQuestionSchema.omit({ id: true }).extend({
|
|
2147
|
+
id: z20.string().optional()
|
|
1865
2148
|
})).default([])
|
|
1866
2149
|
});
|
|
1867
|
-
var PolicyChangeImpactSchema =
|
|
1868
|
-
itemId:
|
|
1869
|
-
beforeValue:
|
|
1870
|
-
requestedValue:
|
|
1871
|
-
likelyEndorsementRequired:
|
|
1872
|
-
carrierApprovalLikelyRequired:
|
|
1873
|
-
affectedCoverageForms:
|
|
1874
|
-
sourceSpanIds:
|
|
1875
|
-
});
|
|
1876
|
-
var PceCaseStateSchema =
|
|
1877
|
-
id:
|
|
1878
|
-
requestText:
|
|
1879
|
-
summary:
|
|
2150
|
+
var PolicyChangeImpactSchema = z20.object({
|
|
2151
|
+
itemId: z20.string(),
|
|
2152
|
+
beforeValue: z20.string().optional(),
|
|
2153
|
+
requestedValue: z20.string().optional(),
|
|
2154
|
+
likelyEndorsementRequired: z20.boolean().default(true),
|
|
2155
|
+
carrierApprovalLikelyRequired: z20.boolean().default(true),
|
|
2156
|
+
affectedCoverageForms: z20.array(z20.string()).default([]),
|
|
2157
|
+
sourceSpanIds: z20.array(z20.string()).default([])
|
|
2158
|
+
});
|
|
2159
|
+
var PceCaseStateSchema = z20.object({
|
|
2160
|
+
id: z20.string(),
|
|
2161
|
+
requestText: z20.string(),
|
|
2162
|
+
summary: z20.string(),
|
|
1880
2163
|
executionMode: AgenticExecutionModeSchema.default("deterministic_tree"),
|
|
1881
|
-
items:
|
|
1882
|
-
impacts:
|
|
1883
|
-
evidenceSources:
|
|
1884
|
-
validationIssues:
|
|
1885
|
-
missingInfoQuestions:
|
|
1886
|
-
createdAt:
|
|
1887
|
-
updatedAt:
|
|
1888
|
-
});
|
|
1889
|
-
var PolicyChangeRequestSchema =
|
|
1890
|
-
id:
|
|
1891
|
-
text:
|
|
2164
|
+
items: z20.array(PolicyChangeItemSchema),
|
|
2165
|
+
impacts: z20.array(PolicyChangeImpactSchema),
|
|
2166
|
+
evidenceSources: z20.array(CaseEvidenceSourceSchema),
|
|
2167
|
+
validationIssues: z20.array(CaseValidationIssueSchema),
|
|
2168
|
+
missingInfoQuestions: z20.array(MissingInfoQuestionSchema),
|
|
2169
|
+
createdAt: z20.number(),
|
|
2170
|
+
updatedAt: z20.number()
|
|
2171
|
+
});
|
|
2172
|
+
var PolicyChangeRequestSchema = z20.object({
|
|
2173
|
+
id: z20.string(),
|
|
2174
|
+
text: z20.string(),
|
|
1892
2175
|
executionMode: AgenticExecutionModeSchema.optional(),
|
|
1893
|
-
userSourceSpanIds:
|
|
1894
|
-
createdAt:
|
|
2176
|
+
userSourceSpanIds: z20.array(z20.string()).optional(),
|
|
2177
|
+
createdAt: z20.number().optional()
|
|
1895
2178
|
});
|
|
1896
2179
|
var PceSubmissionPacketSchema = CaseSubmissionPacketSchema.extend({
|
|
1897
2180
|
pceCase: PceCaseStateSchema,
|
|
1898
|
-
artifacts:
|
|
2181
|
+
artifacts: z20.array(CasePacketArtifactSchema)
|
|
1899
2182
|
});
|
|
1900
2183
|
|
|
1901
2184
|
// src/schemas/context-keys.ts
|
|
@@ -1913,7 +2196,7 @@ var CONTEXT_KEY_MAP = [
|
|
|
1913
2196
|
{ extractedField: "totalPremium", category: "financial", contextKey: "current_premium", description: "Total policy premium" },
|
|
1914
2197
|
{ extractedField: "locations[].buildingValue", category: "financial", contextKey: "total_property_values", description: "Sum of building values" },
|
|
1915
2198
|
{ extractedField: "locations[].contentsValue", category: "financial", contextKey: "total_contents_values", description: "Sum of contents values" },
|
|
1916
|
-
{ extractedField: "
|
|
2199
|
+
{ extractedField: "linesOfBusiness", category: "coverage", contextKey: "coverage_types", description: "ACORD lines of business covered" },
|
|
1917
2200
|
{ extractedField: "coverages[].limit", category: "coverage", contextKey: "current_limits", description: "Current coverage limits" },
|
|
1918
2201
|
{ extractedField: "coverages[].deductible", category: "coverage", contextKey: "current_deductibles", description: "Current deductibles" },
|
|
1919
2202
|
{ extractedField: "experienceMod.factor", category: "loss_history", contextKey: "experience_mod", description: "Workers comp experience modification factor" },
|
|
@@ -1951,8 +2234,8 @@ var CONTEXT_KEY_MAP = [
|
|
|
1951
2234
|
];
|
|
1952
2235
|
|
|
1953
2236
|
// src/source/schemas.ts
|
|
1954
|
-
import { z as
|
|
1955
|
-
var SourceSpanKindSchema =
|
|
2237
|
+
import { z as z21 } from "zod";
|
|
2238
|
+
var SourceSpanKindSchema = z21.enum([
|
|
1956
2239
|
"pdf_text",
|
|
1957
2240
|
"pdf_image",
|
|
1958
2241
|
"html",
|
|
@@ -1960,7 +2243,7 @@ var SourceSpanKindSchema = z20.enum([
|
|
|
1960
2243
|
"plain_text",
|
|
1961
2244
|
"structured_field"
|
|
1962
2245
|
]);
|
|
1963
|
-
var SourceSpanUnitSchema =
|
|
2246
|
+
var SourceSpanUnitSchema = z21.enum([
|
|
1964
2247
|
"page",
|
|
1965
2248
|
"section",
|
|
1966
2249
|
"table",
|
|
@@ -1969,78 +2252,78 @@ var SourceSpanUnitSchema = z20.enum([
|
|
|
1969
2252
|
"key_value",
|
|
1970
2253
|
"text"
|
|
1971
2254
|
]);
|
|
1972
|
-
var SourceKindSchema =
|
|
2255
|
+
var SourceKindSchema = z21.enum([
|
|
1973
2256
|
"policy_pdf",
|
|
1974
2257
|
"application_pdf",
|
|
1975
2258
|
"email",
|
|
1976
2259
|
"attachment",
|
|
1977
2260
|
"manual_note"
|
|
1978
2261
|
]);
|
|
1979
|
-
var SourceSpanBBoxSchema =
|
|
1980
|
-
page:
|
|
1981
|
-
x:
|
|
1982
|
-
y:
|
|
1983
|
-
width:
|
|
1984
|
-
height:
|
|
1985
|
-
});
|
|
1986
|
-
var SourceSpanLocationSchema =
|
|
1987
|
-
page:
|
|
1988
|
-
startPage:
|
|
1989
|
-
endPage:
|
|
1990
|
-
charStart:
|
|
1991
|
-
charEnd:
|
|
1992
|
-
lineStart:
|
|
1993
|
-
lineEnd:
|
|
1994
|
-
fieldPath:
|
|
1995
|
-
});
|
|
1996
|
-
var SourceSpanTableLocationSchema =
|
|
1997
|
-
tableId:
|
|
1998
|
-
rowIndex:
|
|
1999
|
-
columnIndex:
|
|
2000
|
-
columnName:
|
|
2001
|
-
rowSpanId:
|
|
2002
|
-
tableSpanId:
|
|
2003
|
-
isHeader:
|
|
2004
|
-
});
|
|
2005
|
-
var SourceSpanSchema =
|
|
2006
|
-
id:
|
|
2007
|
-
documentId:
|
|
2262
|
+
var SourceSpanBBoxSchema = z21.object({
|
|
2263
|
+
page: z21.number().int().positive(),
|
|
2264
|
+
x: z21.number(),
|
|
2265
|
+
y: z21.number(),
|
|
2266
|
+
width: z21.number(),
|
|
2267
|
+
height: z21.number()
|
|
2268
|
+
});
|
|
2269
|
+
var SourceSpanLocationSchema = z21.object({
|
|
2270
|
+
page: z21.number().int().positive().optional(),
|
|
2271
|
+
startPage: z21.number().int().positive().optional(),
|
|
2272
|
+
endPage: z21.number().int().positive().optional(),
|
|
2273
|
+
charStart: z21.number().int().nonnegative().optional(),
|
|
2274
|
+
charEnd: z21.number().int().nonnegative().optional(),
|
|
2275
|
+
lineStart: z21.number().int().positive().optional(),
|
|
2276
|
+
lineEnd: z21.number().int().positive().optional(),
|
|
2277
|
+
fieldPath: z21.string().optional()
|
|
2278
|
+
});
|
|
2279
|
+
var SourceSpanTableLocationSchema = z21.object({
|
|
2280
|
+
tableId: z21.string().optional(),
|
|
2281
|
+
rowIndex: z21.number().int().nonnegative().optional(),
|
|
2282
|
+
columnIndex: z21.number().int().nonnegative().optional(),
|
|
2283
|
+
columnName: z21.string().optional(),
|
|
2284
|
+
rowSpanId: z21.string().optional(),
|
|
2285
|
+
tableSpanId: z21.string().optional(),
|
|
2286
|
+
isHeader: z21.boolean().optional()
|
|
2287
|
+
});
|
|
2288
|
+
var SourceSpanSchema = z21.object({
|
|
2289
|
+
id: z21.string().min(1),
|
|
2290
|
+
documentId: z21.string().min(1),
|
|
2008
2291
|
sourceKind: SourceKindSchema.optional(),
|
|
2009
|
-
chunkId:
|
|
2292
|
+
chunkId: z21.string().optional(),
|
|
2010
2293
|
kind: SourceSpanKindSchema,
|
|
2011
|
-
text:
|
|
2012
|
-
hash:
|
|
2013
|
-
textHash:
|
|
2014
|
-
pageStart:
|
|
2015
|
-
pageEnd:
|
|
2016
|
-
sectionId:
|
|
2017
|
-
formNumber:
|
|
2294
|
+
text: z21.string(),
|
|
2295
|
+
hash: z21.string().min(1),
|
|
2296
|
+
textHash: z21.string().optional(),
|
|
2297
|
+
pageStart: z21.number().int().positive().optional(),
|
|
2298
|
+
pageEnd: z21.number().int().positive().optional(),
|
|
2299
|
+
sectionId: z21.string().optional(),
|
|
2300
|
+
formNumber: z21.string().optional(),
|
|
2018
2301
|
sourceUnit: SourceSpanUnitSchema.optional(),
|
|
2019
|
-
parentSpanId:
|
|
2302
|
+
parentSpanId: z21.string().optional(),
|
|
2020
2303
|
table: SourceSpanTableLocationSchema.optional(),
|
|
2021
|
-
bbox:
|
|
2304
|
+
bbox: z21.array(SourceSpanBBoxSchema).optional(),
|
|
2022
2305
|
location: SourceSpanLocationSchema.optional(),
|
|
2023
|
-
metadata:
|
|
2024
|
-
});
|
|
2025
|
-
var SourceSpanRefSchema =
|
|
2026
|
-
sourceSpanId:
|
|
2027
|
-
documentId:
|
|
2028
|
-
chunkId:
|
|
2029
|
-
quote:
|
|
2030
|
-
hash:
|
|
2306
|
+
metadata: z21.record(z21.string(), z21.string()).optional()
|
|
2307
|
+
});
|
|
2308
|
+
var SourceSpanRefSchema = z21.object({
|
|
2309
|
+
sourceSpanId: z21.string().min(1),
|
|
2310
|
+
documentId: z21.string().min(1).optional(),
|
|
2311
|
+
chunkId: z21.string().optional(),
|
|
2312
|
+
quote: z21.string().optional(),
|
|
2313
|
+
hash: z21.string().optional(),
|
|
2031
2314
|
location: SourceSpanLocationSchema.optional()
|
|
2032
2315
|
});
|
|
2033
|
-
var SourceChunkSchema =
|
|
2034
|
-
id:
|
|
2035
|
-
documentId:
|
|
2036
|
-
sourceSpanIds:
|
|
2037
|
-
text:
|
|
2038
|
-
textHash:
|
|
2039
|
-
pageStart:
|
|
2040
|
-
pageEnd:
|
|
2041
|
-
metadata:
|
|
2042
|
-
});
|
|
2043
|
-
var DocumentSourceNodeKindSchema =
|
|
2316
|
+
var SourceChunkSchema = z21.object({
|
|
2317
|
+
id: z21.string().min(1),
|
|
2318
|
+
documentId: z21.string().min(1),
|
|
2319
|
+
sourceSpanIds: z21.array(z21.string().min(1)),
|
|
2320
|
+
text: z21.string(),
|
|
2321
|
+
textHash: z21.string().min(1),
|
|
2322
|
+
pageStart: z21.number().int().positive().optional(),
|
|
2323
|
+
pageEnd: z21.number().int().positive().optional(),
|
|
2324
|
+
metadata: z21.record(z21.string(), z21.string()).default({})
|
|
2325
|
+
});
|
|
2326
|
+
var DocumentSourceNodeKindSchema = z21.enum([
|
|
2044
2327
|
"document",
|
|
2045
2328
|
"page_group",
|
|
2046
2329
|
"page",
|
|
@@ -2054,31 +2337,31 @@ var DocumentSourceNodeKindSchema = z20.enum([
|
|
|
2054
2337
|
"table_cell",
|
|
2055
2338
|
"text"
|
|
2056
2339
|
]);
|
|
2057
|
-
var DocumentSourceNodeSchema =
|
|
2058
|
-
id:
|
|
2059
|
-
documentId:
|
|
2060
|
-
parentId:
|
|
2340
|
+
var DocumentSourceNodeSchema = z21.object({
|
|
2341
|
+
id: z21.string().min(1),
|
|
2342
|
+
documentId: z21.string().min(1),
|
|
2343
|
+
parentId: z21.string().optional(),
|
|
2061
2344
|
kind: DocumentSourceNodeKindSchema,
|
|
2062
|
-
title:
|
|
2063
|
-
description:
|
|
2064
|
-
textExcerpt:
|
|
2065
|
-
sourceSpanIds:
|
|
2066
|
-
pageStart:
|
|
2067
|
-
pageEnd:
|
|
2068
|
-
bbox:
|
|
2069
|
-
order:
|
|
2070
|
-
path:
|
|
2071
|
-
metadata:
|
|
2072
|
-
});
|
|
2073
|
-
var SourceBackedValueSchema =
|
|
2074
|
-
value:
|
|
2075
|
-
normalizedValue:
|
|
2076
|
-
confidence:
|
|
2077
|
-
sourceNodeIds:
|
|
2078
|
-
sourceSpanIds:
|
|
2079
|
-
});
|
|
2080
|
-
var OperationalCoverageTermSchema =
|
|
2081
|
-
kind:
|
|
2345
|
+
title: z21.string(),
|
|
2346
|
+
description: z21.string(),
|
|
2347
|
+
textExcerpt: z21.string().optional(),
|
|
2348
|
+
sourceSpanIds: z21.array(z21.string().min(1)),
|
|
2349
|
+
pageStart: z21.number().int().positive().optional(),
|
|
2350
|
+
pageEnd: z21.number().int().positive().optional(),
|
|
2351
|
+
bbox: z21.array(SourceSpanBBoxSchema).optional(),
|
|
2352
|
+
order: z21.number().int().nonnegative(),
|
|
2353
|
+
path: z21.string(),
|
|
2354
|
+
metadata: z21.record(z21.string(), z21.unknown()).optional()
|
|
2355
|
+
});
|
|
2356
|
+
var SourceBackedValueSchema = z21.object({
|
|
2357
|
+
value: z21.string(),
|
|
2358
|
+
normalizedValue: z21.string().optional(),
|
|
2359
|
+
confidence: z21.enum(["low", "medium", "high"]).default("medium"),
|
|
2360
|
+
sourceNodeIds: z21.array(z21.string().min(1)).default([]),
|
|
2361
|
+
sourceSpanIds: z21.array(z21.string().min(1)).default([])
|
|
2362
|
+
});
|
|
2363
|
+
var OperationalCoverageTermSchema = z21.object({
|
|
2364
|
+
kind: z21.enum([
|
|
2082
2365
|
"each_claim_limit",
|
|
2083
2366
|
"each_occurrence_limit",
|
|
2084
2367
|
"each_loss_limit",
|
|
@@ -2090,183 +2373,132 @@ var OperationalCoverageTermSchema = z20.object({
|
|
|
2090
2373
|
"premium",
|
|
2091
2374
|
"other"
|
|
2092
2375
|
]).default("other"),
|
|
2093
|
-
label:
|
|
2094
|
-
value:
|
|
2095
|
-
amount:
|
|
2096
|
-
appliesTo:
|
|
2097
|
-
sourceNodeIds:
|
|
2098
|
-
sourceSpanIds:
|
|
2099
|
-
});
|
|
2100
|
-
var OperationalCoverageLineSchema =
|
|
2101
|
-
name:
|
|
2102
|
-
coverageCode:
|
|
2103
|
-
limit:
|
|
2104
|
-
deductible:
|
|
2105
|
-
premium:
|
|
2106
|
-
retroactiveDate:
|
|
2107
|
-
formNumber:
|
|
2108
|
-
sectionRef:
|
|
2109
|
-
endorsementNumber:
|
|
2110
|
-
limits:
|
|
2111
|
-
sourceNodeIds:
|
|
2112
|
-
sourceSpanIds:
|
|
2113
|
-
});
|
|
2114
|
-
var OperationalPartySchema =
|
|
2115
|
-
role:
|
|
2116
|
-
name:
|
|
2117
|
-
sourceNodeIds:
|
|
2118
|
-
sourceSpanIds:
|
|
2119
|
-
});
|
|
2120
|
-
var OperationalEndorsementSupportSchema =
|
|
2121
|
-
kind:
|
|
2122
|
-
status:
|
|
2123
|
-
summary:
|
|
2124
|
-
sourceNodeIds:
|
|
2125
|
-
sourceSpanIds:
|
|
2126
|
-
});
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2376
|
+
label: z21.string(),
|
|
2377
|
+
value: z21.string(),
|
|
2378
|
+
amount: z21.number().optional(),
|
|
2379
|
+
appliesTo: z21.string().optional(),
|
|
2380
|
+
sourceNodeIds: z21.array(z21.string().min(1)).default([]),
|
|
2381
|
+
sourceSpanIds: z21.array(z21.string().min(1)).default([])
|
|
2382
|
+
});
|
|
2383
|
+
var OperationalCoverageLineSchema = z21.object({
|
|
2384
|
+
name: z21.string(),
|
|
2385
|
+
coverageCode: z21.string().optional(),
|
|
2386
|
+
limit: z21.string().optional(),
|
|
2387
|
+
deductible: z21.string().optional(),
|
|
2388
|
+
premium: z21.string().optional(),
|
|
2389
|
+
retroactiveDate: z21.string().optional(),
|
|
2390
|
+
formNumber: z21.string().optional(),
|
|
2391
|
+
sectionRef: z21.string().optional(),
|
|
2392
|
+
endorsementNumber: z21.string().optional(),
|
|
2393
|
+
limits: z21.array(OperationalCoverageTermSchema).default([]),
|
|
2394
|
+
sourceNodeIds: z21.array(z21.string().min(1)).default([]),
|
|
2395
|
+
sourceSpanIds: z21.array(z21.string().min(1)).default([])
|
|
2396
|
+
});
|
|
2397
|
+
var OperationalPartySchema = z21.object({
|
|
2398
|
+
role: z21.string(),
|
|
2399
|
+
name: z21.string(),
|
|
2400
|
+
sourceNodeIds: z21.array(z21.string().min(1)).default([]),
|
|
2401
|
+
sourceSpanIds: z21.array(z21.string().min(1)).default([])
|
|
2402
|
+
});
|
|
2403
|
+
var OperationalEndorsementSupportSchema = z21.object({
|
|
2404
|
+
kind: z21.string(),
|
|
2405
|
+
status: z21.enum(["supported", "excluded", "requires_review"]),
|
|
2406
|
+
summary: z21.string(),
|
|
2407
|
+
sourceNodeIds: z21.array(z21.string().min(1)).default([]),
|
|
2408
|
+
sourceSpanIds: z21.array(z21.string().min(1)).default([])
|
|
2409
|
+
});
|
|
2410
|
+
function legacyOperationalProfileInput(value) {
|
|
2411
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
2412
|
+
const record = value;
|
|
2413
|
+
if ("linesOfBusiness" in record) return value;
|
|
2414
|
+
if (!("policyTypes" in record)) return value;
|
|
2415
|
+
return {
|
|
2416
|
+
...record,
|
|
2417
|
+
linesOfBusiness: record.policyTypes
|
|
2418
|
+
};
|
|
2419
|
+
}
|
|
2420
|
+
var OperationalLinesOfBusinessSchema = z21.preprocess(
|
|
2421
|
+
(value) => Array.isArray(value) ? toLobCodes(value.filter((item) => typeof item === "string")) : void 0,
|
|
2422
|
+
z21.array(AcordLobCodeSchema).default(["UN"])
|
|
2423
|
+
);
|
|
2424
|
+
var PolicyOperationalProfileSchema = z21.preprocess(
|
|
2425
|
+
legacyOperationalProfileInput,
|
|
2426
|
+
z21.object({
|
|
2427
|
+
documentType: z21.enum(["policy", "quote"]).default("policy"),
|
|
2428
|
+
linesOfBusiness: OperationalLinesOfBusinessSchema,
|
|
2429
|
+
policyNumber: SourceBackedValueSchema.optional(),
|
|
2430
|
+
namedInsured: SourceBackedValueSchema.optional(),
|
|
2431
|
+
insurer: SourceBackedValueSchema.optional(),
|
|
2432
|
+
broker: SourceBackedValueSchema.optional(),
|
|
2433
|
+
effectiveDate: SourceBackedValueSchema.optional(),
|
|
2434
|
+
expirationDate: SourceBackedValueSchema.optional(),
|
|
2435
|
+
retroactiveDate: SourceBackedValueSchema.optional(),
|
|
2436
|
+
premium: SourceBackedValueSchema.optional(),
|
|
2437
|
+
coverages: z21.array(OperationalCoverageLineSchema).default([]),
|
|
2438
|
+
parties: z21.array(OperationalPartySchema).default([]),
|
|
2439
|
+
endorsementSupport: z21.array(OperationalEndorsementSupportSchema).default([]),
|
|
2440
|
+
sourceNodeIds: z21.array(z21.string().min(1)).default([]),
|
|
2441
|
+
sourceSpanIds: z21.array(z21.string().min(1)).default([]),
|
|
2442
|
+
warnings: z21.array(z21.string()).default([])
|
|
2443
|
+
})
|
|
2444
|
+
);
|
|
2145
2445
|
|
|
2146
2446
|
// src/source/policy-types.ts
|
|
2147
|
-
var
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
"
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
"motor truck cargo": "inland_marine",
|
|
2187
|
-
"motor truck cargo legal liability": "inland_marine",
|
|
2188
|
-
"builders risk insurance": "builders_risk",
|
|
2189
|
-
"pollution liability": "environmental",
|
|
2190
|
-
"premises pollution liability": "environmental",
|
|
2191
|
-
"environmental liability": "environmental",
|
|
2192
|
-
"ocean marine insurance": "ocean_marine",
|
|
2193
|
-
"surety bond": "surety",
|
|
2194
|
-
"product liability insurance": "product_liability",
|
|
2195
|
-
"life insurance": "life",
|
|
2196
|
-
"permanent life": "life",
|
|
2197
|
-
"term life": "life",
|
|
2198
|
-
"whole life": "life",
|
|
2199
|
-
"universal life": "life",
|
|
2200
|
-
"critical illness": "critical_illness",
|
|
2201
|
-
"critical illness insurance": "critical_illness",
|
|
2202
|
-
"disability insurance": "disability",
|
|
2203
|
-
"long term care": "long_term_care",
|
|
2204
|
-
"long-term care": "long_term_care"
|
|
2205
|
-
};
|
|
2206
|
-
var POLICY_TYPE_TEXT_PATTERNS = [
|
|
2207
|
-
{ type: "general_liability", pattern: /\b(?:commercial\s+)?general\s+liability\b|\bcgl\b/i },
|
|
2208
|
-
{ type: "commercial_property", pattern: /\bcommercial\s+property\b|\bproperty\s+insurance\b/i },
|
|
2209
|
-
{ type: "commercial_auto", pattern: /\bcommercial\s+auto(?:mobile)?\b|\bbusiness\s+auto(?:mobile)?\b|\bauto(?:mobile)?\s+physical\s+damage\b/i },
|
|
2210
|
-
{ type: "non_owned_auto", pattern: /\b(?:hired\s+(?:and\s+)?)?non[-\s]?owned\s+auto\b/i },
|
|
2211
|
-
{ type: "workers_comp", pattern: /\bworkers['’]?\s+comp(?:ensation)?\b/i },
|
|
2212
|
-
{ type: "umbrella", pattern: /\bcommercial\s+umbrella\b|\bumbrella\s+liability\b/i },
|
|
2213
|
-
{ type: "excess_liability", pattern: /\bexcess\s+liability\b/i },
|
|
2214
|
-
{ type: "professional_liability", pattern: /\bprofessional\s+liability\b|\berrors?\s*(?:and|&)\s*omissions?\b|\be&o\b/i },
|
|
2215
|
-
{ type: "cyber", pattern: /\bcyber\b|\bnetwork\s+security\b|\bprivacy\s+liability\b/i },
|
|
2216
|
-
{ type: "epli", pattern: /\bemployment\s+practices?\s+liability\b|\bepli\b/i },
|
|
2217
|
-
{ type: "directors_officers", pattern: /\bdirectors?\s*(?:and|&)\s*officers?\b|\bd&o\b/i },
|
|
2218
|
-
{ type: "fiduciary_liability", pattern: /\bfiduciary\s+liability\b/i },
|
|
2219
|
-
{ type: "crime_fidelity", pattern: /\bcrime\b|\bfidelity\b/i },
|
|
2220
|
-
{ type: "inland_marine", pattern: /\binland\s+marine\b|\bmotor\s+truck\s+cargo\b|\bcargo\s+legal\s+liability\b/i },
|
|
2221
|
-
{ type: "builders_risk", pattern: /\bbuilders?\s+risk\b/i },
|
|
2222
|
-
{ type: "environmental", pattern: /\bpollution\s+liability\b|\benvironmental\s+liability\b/i },
|
|
2223
|
-
{ type: "ocean_marine", pattern: /\bocean\s+marine\b/i },
|
|
2224
|
-
{ type: "surety", pattern: /\bsurety\b/i },
|
|
2225
|
-
{ type: "product_liability", pattern: /\bproduct\s+liability\b|\bproducts?\s+completed\s+operations\b/i },
|
|
2226
|
-
{ type: "bop", pattern: /\bbusiness\s*owners?\s+policy\b|\bbop\b/i },
|
|
2227
|
-
{ type: "homeowners_ho3", pattern: /\bhomeowners?\s*(?:ho[-\s]?3)?\b/i },
|
|
2228
|
-
{ type: "homeowners_ho5", pattern: /\bho[-\s]?5\b/i },
|
|
2229
|
-
{ type: "renters_ho4", pattern: /\brenters?\b|\bho[-\s]?4\b/i },
|
|
2230
|
-
{ type: "condo_ho6", pattern: /\bcondo(?:minium)?\b|\bho[-\s]?6\b/i },
|
|
2231
|
-
{ type: "dwelling_fire", pattern: /\bdwelling\s+fire\b/i },
|
|
2232
|
-
{ type: "personal_auto", pattern: /\bpersonal\s+auto\b/i },
|
|
2233
|
-
{ type: "personal_umbrella", pattern: /\bpersonal\s+umbrella\b/i },
|
|
2234
|
-
{ type: "flood_private", pattern: /\bflood\b/i },
|
|
2235
|
-
{ type: "earthquake", pattern: /\bearthquake\b/i },
|
|
2236
|
-
{ type: "personal_inland_marine", pattern: /\bpersonal\s+(?:articles|inland\s+marine)\b/i },
|
|
2237
|
-
{ type: "watercraft", pattern: /\bwatercraft\b|\bboat\s+insurance\b/i },
|
|
2238
|
-
{ type: "recreational_vehicle", pattern: /\brecreational\s+vehicle\b|\brv\s+insurance\b/i },
|
|
2239
|
-
{ type: "farm_ranch", pattern: /\bfarm\b|\branch\b/i },
|
|
2240
|
-
{ type: "life", pattern: /\blife\s+insurance\b|\bterm\s+life\b|\bwhole\s+life\b|\buniversal\s+life\b/i },
|
|
2241
|
-
{ type: "critical_illness", pattern: /\bcritical\s+illness\b/i },
|
|
2242
|
-
{ type: "disability", pattern: /\bdisability\s+insurance\b|\btotal\s+disability\b/i },
|
|
2243
|
-
{ type: "long_term_care", pattern: /\blong[-\s]?term\s+care\b/i },
|
|
2244
|
-
{ type: "pet", pattern: /\bpet\s+insurance\b/i },
|
|
2245
|
-
{ type: "travel", pattern: /\btravel\s+insurance\b/i },
|
|
2246
|
-
{ type: "identity_theft", pattern: /\bidentity\s+theft\b/i },
|
|
2247
|
-
{ type: "title", pattern: /\btitle\s+insurance\b/i }
|
|
2447
|
+
var LOB_TEXT_PATTERNS = [
|
|
2448
|
+
{ codes: ["CGL"], pattern: /\b(?:commercial\s+)?general\s+liability\b|\bcgl\b/i },
|
|
2449
|
+
{ codes: ["PROPC"], pattern: /\bcommercial\s+property\b|\bproperty\s+insurance\b/i },
|
|
2450
|
+
{ codes: ["PROP"], pattern: /\bproperty\b/i },
|
|
2451
|
+
{ codes: ["AUTOB"], pattern: /\bcommercial\s+auto(?:mobile)?\b|\bbusiness\s+auto(?:mobile)?\b|\bauto(?:mobile)?\s+physical\s+damage\b/i },
|
|
2452
|
+
{ codes: ["AUTOB"], pattern: /\b(?:hired\s+(?:and\s+)?)?non[-\s]?owned\s+auto\b/i },
|
|
2453
|
+
{ codes: ["WORK"], pattern: /\bworkers['’]?\s+comp(?:ensation)?\b/i },
|
|
2454
|
+
{ codes: ["UMBRC"], pattern: /\bcommercial\s+umbrella\b|\bumbrella\s+liability\b/i },
|
|
2455
|
+
{ codes: ["EXLIA"], pattern: /\bexcess\s+liability\b/i },
|
|
2456
|
+
{ codes: ["EO"], pattern: /\bprofessional\s+liability\b|\berrors?\s*(?:and|&)\s*omissions?\b|\be&o\b/i },
|
|
2457
|
+
{ codes: ["OLIB"], pattern: /\bcyber\b|\bnetwork\s+security\b|\bprivacy\s+liability\b/i },
|
|
2458
|
+
{ codes: ["EPLI"], pattern: /\bemployment\s+practices?\s+liability\b|\bepli\b/i },
|
|
2459
|
+
{ codes: ["DO"], pattern: /\bdirectors?\s*(?:and|&)\s*officers?\b|\bd&o\b/i },
|
|
2460
|
+
{ codes: ["FIDUC"], pattern: /\bfiduciary\s+liability\b/i },
|
|
2461
|
+
{ codes: ["CRIME"], pattern: /\bcrime\b|\bfidelity\b/i },
|
|
2462
|
+
{ codes: ["INMRC"], pattern: /\binland\s+marine\b|\bmotor\s+truck\s+cargo\b|\bcargo\s+legal\s+liability\b/i },
|
|
2463
|
+
{ codes: ["INMRC"], pattern: /\bbuilders?\s+risk\b/i },
|
|
2464
|
+
{ codes: ["OLIB"], pattern: /\bpollution\s+liability\b|\benvironmental\s+liability\b/i },
|
|
2465
|
+
{ codes: ["COMAR"], pattern: /\bocean\s+marine\b/i },
|
|
2466
|
+
{ codes: ["SURE"], pattern: /\bsurety\b/i },
|
|
2467
|
+
{ codes: ["OLIB"], pattern: /\bproduct\s+liability\b|\bproducts?\s+completed\s+operations\b/i },
|
|
2468
|
+
{ codes: ["BOP"], pattern: /\bbusiness\s*owners?\s+policy\b|\bbop\b/i },
|
|
2469
|
+
{ codes: ["DO", "EPLI", "FIDUC"], pattern: /\bmanagement\s+liability\b/i },
|
|
2470
|
+
{ codes: ["HOME"], pattern: /\bhomeowners?\s*(?:ho[-\s]?[35])?\b|\bho[-\s]?[35]\b/i },
|
|
2471
|
+
{ codes: ["HOME"], pattern: /\brenters?\b|\bho[-\s]?4\b/i },
|
|
2472
|
+
{ codes: ["HOME"], pattern: /\bcondo(?:minium)?\b|\bho[-\s]?6\b/i },
|
|
2473
|
+
{ codes: ["DFIRE"], pattern: /\bdwelling\s+fire\b/i },
|
|
2474
|
+
{ codes: ["MHOME"], pattern: /\bmobile\s+home\b|\bmanufactured\s+home\b/i },
|
|
2475
|
+
{ codes: ["AUTOP"], pattern: /\bpersonal\s+auto\b/i },
|
|
2476
|
+
{ codes: ["UMBRP"], pattern: /\bpersonal\s+umbrella\b/i },
|
|
2477
|
+
{ codes: ["FLOOD"], pattern: /\bflood\b/i },
|
|
2478
|
+
{ codes: ["EQ"], pattern: /\bearthquake\b/i },
|
|
2479
|
+
{ codes: ["INMRP"], pattern: /\bpersonal\s+(?:articles|inland\s+marine)\b/i },
|
|
2480
|
+
{ codes: ["BOAT"], pattern: /\bwatercraft\b|\bboat\s+insurance\b/i },
|
|
2481
|
+
{ codes: ["RECV"], pattern: /\brecreational\s+vehicle\b|\brv\s+insurance\b/i },
|
|
2482
|
+
{ codes: ["CFRM"], pattern: /\bfarm\b|\branch\b/i },
|
|
2483
|
+
{ codes: ["UN"], pattern: /\blife\s+insurance\b|\bterm\s+life\b|\bwhole\s+life\b|\buniversal\s+life\b/i },
|
|
2484
|
+
{ codes: ["DISAB"], pattern: /\bcritical\s+illness\b|\bdisability\s+insurance\b|\btotal\s+disability\b/i },
|
|
2485
|
+
{ codes: ["UN"], pattern: /\blong[-\s]?term\s+care\b|\bpet\s+insurance\b|\btravel\s+insurance\b|\bidentity\s+theft\b|\btitle\s+insurance\b/i }
|
|
2248
2486
|
];
|
|
2249
|
-
var POLICY_TYPES_FROM_COVERAGES_WARNING = "Policy types augmented from extracted coverage labels.";
|
|
2250
2487
|
function normalizeWhitespace(value) {
|
|
2251
2488
|
return value.replace(/\s+/g, " ").trim();
|
|
2252
2489
|
}
|
|
2253
|
-
function
|
|
2254
|
-
|
|
2255
|
-
const controlled = types.map((type) => type.trim().toLowerCase().replace(/\s+/g, " ")).map((type) => POLICY_TYPE_ALIASES[type] ?? type.replace(/[\s-]+/g, "_")).filter((type) => POLICY_TYPE_KEYS.has(type));
|
|
2256
|
-
const unique = [...new Set(controlled)].slice(0, 6);
|
|
2257
|
-
return unique.length ? unique : ["other"];
|
|
2258
|
-
}
|
|
2259
|
-
function hasSpecificPolicyType(types) {
|
|
2260
|
-
return types.some((type) => type !== "other");
|
|
2490
|
+
function hasSpecificLineOfBusiness(codes) {
|
|
2491
|
+
return codes.some((code) => code !== "UN");
|
|
2261
2492
|
}
|
|
2262
|
-
function
|
|
2493
|
+
function linesOfBusinessFromText(value) {
|
|
2263
2494
|
const text = normalizeWhitespace(value ?? "");
|
|
2264
2495
|
if (!text) return [];
|
|
2265
|
-
const
|
|
2266
|
-
if (
|
|
2267
|
-
|
|
2496
|
+
const direct = toLobCodes([text]);
|
|
2497
|
+
if (direct.some((code) => code !== "UN") || isLobCode(text) || text.toUpperCase() === "UN") return direct;
|
|
2498
|
+
const inferred = LOB_TEXT_PATTERNS.flatMap(({ codes, pattern }) => pattern.test(text) ? codes : []);
|
|
2499
|
+
return Array.from(new Set(inferred));
|
|
2268
2500
|
}
|
|
2269
|
-
function
|
|
2501
|
+
function inferLinesOfBusinessFromOperationalCoverages(coverages) {
|
|
2270
2502
|
const inferred = [];
|
|
2271
2503
|
for (const coverage of coverages) {
|
|
2272
2504
|
const limits = coverage.limits ?? [];
|
|
@@ -2277,43 +2509,23 @@ function inferPolicyTypesFromOperationalCoverages(coverages) {
|
|
|
2277
2509
|
...limits.flatMap((term) => [term.appliesTo, term.label])
|
|
2278
2510
|
].filter((value) => typeof value === "string" && value.trim().length > 0);
|
|
2279
2511
|
for (const value of text) {
|
|
2280
|
-
for (const
|
|
2281
|
-
if (!inferred.includes(
|
|
2512
|
+
for (const code of linesOfBusinessFromText(value)) {
|
|
2513
|
+
if (!inferred.includes(code)) inferred.push(code);
|
|
2282
2514
|
}
|
|
2283
2515
|
}
|
|
2284
2516
|
}
|
|
2285
2517
|
return inferred.slice(0, 6);
|
|
2286
2518
|
}
|
|
2287
|
-
function
|
|
2288
|
-
const
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
];
|
|
2292
|
-
const unique = [...new Set(merged)].slice(0, 6);
|
|
2293
|
-
return unique.length ? unique : base;
|
|
2294
|
-
}
|
|
2295
|
-
function resolveOperationalProfilePolicyTypes(params) {
|
|
2296
|
-
const inferred = inferPolicyTypesFromOperationalCoverages(params.coverages ?? []);
|
|
2297
|
-
const controlled = normalizeOperationalPolicyTypes(params.profileTypes);
|
|
2298
|
-
if (hasSpecificPolicyType(controlled)) {
|
|
2299
|
-
const policyTypes = mergePolicyTypes(controlled, inferred);
|
|
2300
|
-
return {
|
|
2301
|
-
policyTypes,
|
|
2302
|
-
source: policyTypes.length > controlled.filter((type) => type !== "other").length ? "profile_augmented" : "profile"
|
|
2303
|
-
};
|
|
2304
|
-
}
|
|
2305
|
-
const existingControlled = normalizeOperationalPolicyTypes(params.existingTypes);
|
|
2306
|
-
if (hasSpecificPolicyType(existingControlled)) {
|
|
2307
|
-
const policyTypes = mergePolicyTypes(existingControlled, inferred);
|
|
2308
|
-
return {
|
|
2309
|
-
policyTypes,
|
|
2310
|
-
source: policyTypes.length > existingControlled.filter((type) => type !== "other").length ? "existing_augmented" : "existing"
|
|
2311
|
-
};
|
|
2312
|
-
}
|
|
2313
|
-
if (inferred.length > 0) {
|
|
2314
|
-
return { policyTypes: inferred, source: "inferred" };
|
|
2519
|
+
function resolveOperationalProfileLinesOfBusiness(params) {
|
|
2520
|
+
const inferred = inferLinesOfBusinessFromOperationalCoverages(params.coverages ?? []);
|
|
2521
|
+
if (inferred.some((code) => code !== "UN")) {
|
|
2522
|
+
return { linesOfBusiness: inferred, source: "coverage" };
|
|
2315
2523
|
}
|
|
2316
|
-
|
|
2524
|
+
const controlled = normalizeOperationalLinesOfBusiness(params.profileLinesOfBusiness);
|
|
2525
|
+
if (hasSpecificLineOfBusiness(controlled)) return { linesOfBusiness: controlled, source: "profile_hint" };
|
|
2526
|
+
const existingControlled = normalizeOperationalLinesOfBusiness(params.existingLinesOfBusiness);
|
|
2527
|
+
if (hasSpecificLineOfBusiness(existingControlled)) return { linesOfBusiness: existingControlled, source: "existing_hint" };
|
|
2528
|
+
return { linesOfBusiness: controlled, source: "default" };
|
|
2317
2529
|
}
|
|
2318
2530
|
|
|
2319
2531
|
// src/source/ids.ts
|
|
@@ -3545,7 +3757,7 @@ function shouldFailQualityGate(mode, status) {
|
|
|
3545
3757
|
}
|
|
3546
3758
|
|
|
3547
3759
|
// src/extraction/source-tree-extractor.ts
|
|
3548
|
-
import { z as
|
|
3760
|
+
import { z as z23 } from "zod";
|
|
3549
3761
|
|
|
3550
3762
|
// src/source/operational-profile.ts
|
|
3551
3763
|
function normalizeWhitespace4(value) {
|
|
@@ -3718,18 +3930,17 @@ function mergeOperationalProfile(base, candidate, validNodeIds, validSpanIds) {
|
|
|
3718
3930
|
...base.warnings,
|
|
3719
3931
|
...Array.isArray(candidate.warnings) ? candidate.warnings.filter((warning) => typeof warning === "string" && warning.trim().length > 0) : []
|
|
3720
3932
|
];
|
|
3721
|
-
const
|
|
3722
|
-
|
|
3723
|
-
|
|
3933
|
+
const candidateLinesOfBusiness = candidate.linesOfBusiness ?? candidate.policyTypes;
|
|
3934
|
+
const baseLinesOfBusiness = base.linesOfBusiness ?? base.policyTypes;
|
|
3935
|
+
const resolvedLinesOfBusiness = resolveOperationalProfileLinesOfBusiness({
|
|
3936
|
+
profileLinesOfBusiness: candidateLinesOfBusiness,
|
|
3937
|
+
existingLinesOfBusiness: baseLinesOfBusiness,
|
|
3724
3938
|
coverages
|
|
3725
3939
|
});
|
|
3726
|
-
if (resolvedPolicyTypes.source === "profile_augmented" || resolvedPolicyTypes.source === "existing_augmented" || resolvedPolicyTypes.source === "inferred") {
|
|
3727
|
-
warnings.push(POLICY_TYPES_FROM_COVERAGES_WARNING);
|
|
3728
|
-
}
|
|
3729
3940
|
return PolicyOperationalProfileSchema.parse({
|
|
3730
3941
|
...base,
|
|
3731
3942
|
documentType: candidate.documentType === "policy" ? "policy" : base.documentType,
|
|
3732
|
-
|
|
3943
|
+
linesOfBusiness: resolvedLinesOfBusiness.linesOfBusiness,
|
|
3733
3944
|
policyNumber,
|
|
3734
3945
|
namedInsured,
|
|
3735
3946
|
insurer,
|
|
@@ -3748,7 +3959,7 @@ function mergeOperationalProfile(base, candidate, validNodeIds, validSpanIds) {
|
|
|
3748
3959
|
}
|
|
3749
3960
|
|
|
3750
3961
|
// src/extraction/operational-profile-cleanup.ts
|
|
3751
|
-
import { z as
|
|
3962
|
+
import { z as z22 } from "zod";
|
|
3752
3963
|
var OPERATIONAL_COVERAGE_TERM_KINDS2 = [
|
|
3753
3964
|
"each_claim_limit",
|
|
3754
3965
|
"each_occurrence_limit",
|
|
@@ -3761,33 +3972,33 @@ var OPERATIONAL_COVERAGE_TERM_KINDS2 = [
|
|
|
3761
3972
|
"premium",
|
|
3762
3973
|
"other"
|
|
3763
3974
|
];
|
|
3764
|
-
var OperationalCoverageTermKindSchema =
|
|
3765
|
-
var OperationalProfileCleanupSchema =
|
|
3766
|
-
coverageDecisions:
|
|
3767
|
-
coverageIndex:
|
|
3768
|
-
action:
|
|
3769
|
-
reason:
|
|
3770
|
-
name:
|
|
3771
|
-
limit:
|
|
3772
|
-
deductible:
|
|
3773
|
-
premium:
|
|
3774
|
-
retroactiveDate:
|
|
3775
|
-
sourceNodeIds:
|
|
3776
|
-
sourceSpanIds:
|
|
3777
|
-
termDecisions:
|
|
3778
|
-
termIndex:
|
|
3779
|
-
action:
|
|
3780
|
-
reason:
|
|
3975
|
+
var OperationalCoverageTermKindSchema = z22.enum(OPERATIONAL_COVERAGE_TERM_KINDS2);
|
|
3976
|
+
var OperationalProfileCleanupSchema = z22.object({
|
|
3977
|
+
coverageDecisions: z22.array(z22.object({
|
|
3978
|
+
coverageIndex: z22.number().int().nonnegative(),
|
|
3979
|
+
action: z22.enum(["keep", "drop", "update"]),
|
|
3980
|
+
reason: z22.string().optional(),
|
|
3981
|
+
name: z22.string().optional(),
|
|
3982
|
+
limit: z22.string().nullable().optional(),
|
|
3983
|
+
deductible: z22.string().nullable().optional(),
|
|
3984
|
+
premium: z22.string().nullable().optional(),
|
|
3985
|
+
retroactiveDate: z22.string().nullable().optional(),
|
|
3986
|
+
sourceNodeIds: z22.array(z22.string()).optional(),
|
|
3987
|
+
sourceSpanIds: z22.array(z22.string()).optional(),
|
|
3988
|
+
termDecisions: z22.array(z22.object({
|
|
3989
|
+
termIndex: z22.number().int().nonnegative(),
|
|
3990
|
+
action: z22.enum(["keep", "drop", "update"]),
|
|
3991
|
+
reason: z22.string().optional(),
|
|
3781
3992
|
kind: OperationalCoverageTermKindSchema.optional(),
|
|
3782
|
-
label:
|
|
3783
|
-
value:
|
|
3784
|
-
amount:
|
|
3785
|
-
appliesTo:
|
|
3786
|
-
sourceNodeIds:
|
|
3787
|
-
sourceSpanIds:
|
|
3993
|
+
label: z22.string().optional(),
|
|
3994
|
+
value: z22.string().optional(),
|
|
3995
|
+
amount: z22.number().nullable().optional(),
|
|
3996
|
+
appliesTo: z22.string().nullable().optional(),
|
|
3997
|
+
sourceNodeIds: z22.array(z22.string()).optional(),
|
|
3998
|
+
sourceSpanIds: z22.array(z22.string()).optional()
|
|
3788
3999
|
})).optional()
|
|
3789
4000
|
})).default([]),
|
|
3790
|
-
warnings:
|
|
4001
|
+
warnings: z22.array(z22.string()).default([])
|
|
3791
4002
|
});
|
|
3792
4003
|
var CLEANUP_CANDIDATE_ID_LIMIT = 12;
|
|
3793
4004
|
var CLEANUP_SOURCE_NODE_LIMIT = 90;
|
|
@@ -3943,7 +4154,7 @@ function buildOperationalProfileCleanupPrompt(sourceTree, profile, options = {})
|
|
|
3943
4154
|
));
|
|
3944
4155
|
const candidate = {
|
|
3945
4156
|
documentType: profile.documentType,
|
|
3946
|
-
|
|
4157
|
+
linesOfBusiness: profile.linesOfBusiness,
|
|
3947
4158
|
coverages: coverageEntries.map(({ coverage, coverageIndex }) => compactCoverageForCleanup(coverage, coverageIndex))
|
|
3948
4159
|
};
|
|
3949
4160
|
return `Review and clean a source-backed operational profile projection for an insurance policy.
|
|
@@ -4241,16 +4452,16 @@ function applyOperationalProfileCleanup(profile, cleanup, validNodeIds, validSpa
|
|
|
4241
4452
|
}
|
|
4242
4453
|
|
|
4243
4454
|
// src/extraction/source-tree-extractor.ts
|
|
4244
|
-
var SourceBackedValueForPromptSchema =
|
|
4245
|
-
value:
|
|
4246
|
-
normalizedValue:
|
|
4247
|
-
confidence:
|
|
4248
|
-
sourceNodeIds:
|
|
4249
|
-
sourceSpanIds:
|
|
4250
|
-
});
|
|
4251
|
-
var OperationalProfilePromptSchema =
|
|
4252
|
-
documentType:
|
|
4253
|
-
|
|
4455
|
+
var SourceBackedValueForPromptSchema = z23.object({
|
|
4456
|
+
value: z23.string(),
|
|
4457
|
+
normalizedValue: z23.string().optional(),
|
|
4458
|
+
confidence: z23.enum(["low", "medium", "high"]).optional(),
|
|
4459
|
+
sourceNodeIds: z23.array(z23.string()),
|
|
4460
|
+
sourceSpanIds: z23.array(z23.string())
|
|
4461
|
+
});
|
|
4462
|
+
var OperationalProfilePromptSchema = z23.object({
|
|
4463
|
+
documentType: z23.enum(["policy", "quote"]).optional(),
|
|
4464
|
+
linesOfBusiness: z23.array(z23.string()).optional(),
|
|
4254
4465
|
policyNumber: SourceBackedValueForPromptSchema.optional(),
|
|
4255
4466
|
namedInsured: SourceBackedValueForPromptSchema.optional(),
|
|
4256
4467
|
insurer: SourceBackedValueForPromptSchema.optional(),
|
|
@@ -4259,30 +4470,30 @@ var OperationalProfilePromptSchema = z22.object({
|
|
|
4259
4470
|
expirationDate: SourceBackedValueForPromptSchema.optional(),
|
|
4260
4471
|
retroactiveDate: SourceBackedValueForPromptSchema.optional(),
|
|
4261
4472
|
premium: SourceBackedValueForPromptSchema.optional(),
|
|
4262
|
-
coverages:
|
|
4263
|
-
name:
|
|
4264
|
-
coverageCode:
|
|
4265
|
-
limit:
|
|
4266
|
-
deductible:
|
|
4267
|
-
premium:
|
|
4268
|
-
retroactiveDate:
|
|
4269
|
-
formNumber:
|
|
4270
|
-
sectionRef:
|
|
4271
|
-
endorsementNumber:
|
|
4272
|
-
limits:
|
|
4473
|
+
coverages: z23.array(z23.object({
|
|
4474
|
+
name: z23.string(),
|
|
4475
|
+
coverageCode: z23.string().optional(),
|
|
4476
|
+
limit: z23.string().optional(),
|
|
4477
|
+
deductible: z23.string().optional(),
|
|
4478
|
+
premium: z23.string().optional(),
|
|
4479
|
+
retroactiveDate: z23.string().optional(),
|
|
4480
|
+
formNumber: z23.string().optional(),
|
|
4481
|
+
sectionRef: z23.string().optional(),
|
|
4482
|
+
endorsementNumber: z23.string().optional(),
|
|
4483
|
+
limits: z23.array(z23.object({
|
|
4273
4484
|
kind: OperationalCoverageTermKindSchema.optional(),
|
|
4274
|
-
label:
|
|
4275
|
-
value:
|
|
4276
|
-
amount:
|
|
4277
|
-
appliesTo:
|
|
4278
|
-
sourceNodeIds:
|
|
4279
|
-
sourceSpanIds:
|
|
4485
|
+
label: z23.string(),
|
|
4486
|
+
value: z23.string(),
|
|
4487
|
+
amount: z23.number().optional(),
|
|
4488
|
+
appliesTo: z23.string().optional(),
|
|
4489
|
+
sourceNodeIds: z23.array(z23.string()),
|
|
4490
|
+
sourceSpanIds: z23.array(z23.string())
|
|
4280
4491
|
})).optional(),
|
|
4281
|
-
sourceNodeIds:
|
|
4282
|
-
sourceSpanIds:
|
|
4492
|
+
sourceNodeIds: z23.array(z23.string()),
|
|
4493
|
+
sourceSpanIds: z23.array(z23.string())
|
|
4283
4494
|
})).optional(),
|
|
4284
|
-
sourceNodeIds:
|
|
4285
|
-
sourceSpanIds:
|
|
4495
|
+
sourceNodeIds: z23.array(z23.string()).optional(),
|
|
4496
|
+
sourceSpanIds: z23.array(z23.string()).optional()
|
|
4286
4497
|
});
|
|
4287
4498
|
function cleanText(value, fallback) {
|
|
4288
4499
|
const text = value?.replace(/\s+/g, " ").trim();
|
|
@@ -5289,7 +5500,7 @@ function operationalProfilePromptNodes(sourceTree) {
|
|
|
5289
5500
|
function emptyOperationalProfile() {
|
|
5290
5501
|
return {
|
|
5291
5502
|
documentType: "policy",
|
|
5292
|
-
|
|
5503
|
+
linesOfBusiness: ["UN"],
|
|
5293
5504
|
coverages: [],
|
|
5294
5505
|
parties: [],
|
|
5295
5506
|
endorsementSupport: [],
|
|
@@ -5440,7 +5651,7 @@ function materializeDocument(params) {
|
|
|
5440
5651
|
carrier !== "Unknown" ? carrier : void 0,
|
|
5441
5652
|
policyNumber !== "Unknown" ? `#${policyNumber}` : void 0,
|
|
5442
5653
|
insuredName !== "Unknown" ? `for ${insuredName}` : void 0,
|
|
5443
|
-
profile.
|
|
5654
|
+
profile.linesOfBusiness.length ? `covering ${profile.linesOfBusiness.slice(0, 5).join(", ")}` : void 0
|
|
5444
5655
|
].filter(Boolean).join(" ");
|
|
5445
5656
|
const base = {
|
|
5446
5657
|
id: params.id,
|
|
@@ -5454,7 +5665,7 @@ function materializeDocument(params) {
|
|
|
5454
5665
|
brokerAgency: broker,
|
|
5455
5666
|
producer: { agencyName: broker, ...brokerProvenance }
|
|
5456
5667
|
} : {},
|
|
5457
|
-
|
|
5668
|
+
linesOfBusiness: profile.linesOfBusiness,
|
|
5458
5669
|
formInventory: params.formInventory.filter((form) => typeof form.formNumber === "string" && form.formNumber.trim().length > 0).map((form) => ({
|
|
5459
5670
|
formNumber: form.formNumber,
|
|
5460
5671
|
editionDate: form.editionDate,
|
|
@@ -5840,13 +6051,13 @@ function chunkDocument(doc) {
|
|
|
5840
6051
|
};
|
|
5841
6052
|
const chunks = [];
|
|
5842
6053
|
const docId = doc.id;
|
|
5843
|
-
const
|
|
6054
|
+
const linesOfBusinessStr = doc.linesOfBusiness?.length ? doc.linesOfBusiness.join(",") : void 0;
|
|
5844
6055
|
const extendedDoc = doc;
|
|
5845
6056
|
function stringMetadata(entries) {
|
|
5846
6057
|
const base = Object.fromEntries(
|
|
5847
6058
|
Object.entries(entries).filter(([, value]) => value !== void 0 && value !== null && String(value).length > 0).map(([key, value]) => [key, String(value)])
|
|
5848
6059
|
);
|
|
5849
|
-
if (
|
|
6060
|
+
if (linesOfBusinessStr) base.linesOfBusiness = linesOfBusinessStr;
|
|
5850
6061
|
return base;
|
|
5851
6062
|
}
|
|
5852
6063
|
function lines(values) {
|
|
@@ -5880,7 +6091,7 @@ function chunkDocument(doc) {
|
|
|
5880
6091
|
doc.isRenewal != null ? `Renewal: ${doc.isRenewal ? "Yes" : "No"}` : null,
|
|
5881
6092
|
doc.isPackage != null ? `Package: ${doc.isPackage ? "Yes" : "No"}` : null,
|
|
5882
6093
|
doc.security ? `Security: ${doc.security}` : null,
|
|
5883
|
-
doc.
|
|
6094
|
+
doc.linesOfBusiness?.length ? `Lines of Business: ${doc.linesOfBusiness.join(", ")}` : null
|
|
5884
6095
|
]),
|
|
5885
6096
|
{ carrier: doc.carrier, documentType: doc.type }
|
|
5886
6097
|
);
|
|
@@ -7215,8 +7426,8 @@ Respond with JSON only:
|
|
|
7215
7426
|
}`;
|
|
7216
7427
|
|
|
7217
7428
|
// src/schemas/application.ts
|
|
7218
|
-
import { z as
|
|
7219
|
-
var FieldTypeSchema =
|
|
7429
|
+
import { z as z24 } from "zod";
|
|
7430
|
+
var FieldTypeSchema = z24.enum([
|
|
7220
7431
|
"text",
|
|
7221
7432
|
"numeric",
|
|
7222
7433
|
"currency",
|
|
@@ -7225,223 +7436,223 @@ var FieldTypeSchema = z23.enum([
|
|
|
7225
7436
|
"table",
|
|
7226
7437
|
"declaration"
|
|
7227
7438
|
]);
|
|
7228
|
-
var ApplicationFieldSchema =
|
|
7229
|
-
id:
|
|
7230
|
-
label:
|
|
7231
|
-
section:
|
|
7439
|
+
var ApplicationFieldSchema = z24.object({
|
|
7440
|
+
id: z24.string(),
|
|
7441
|
+
label: z24.string(),
|
|
7442
|
+
section: z24.string(),
|
|
7232
7443
|
fieldType: FieldTypeSchema,
|
|
7233
|
-
required:
|
|
7234
|
-
options:
|
|
7235
|
-
columns:
|
|
7236
|
-
requiresExplanationIfYes:
|
|
7237
|
-
condition:
|
|
7238
|
-
dependsOn:
|
|
7239
|
-
whenValue:
|
|
7444
|
+
required: z24.boolean(),
|
|
7445
|
+
options: z24.array(z24.string()).optional(),
|
|
7446
|
+
columns: z24.array(z24.string()).optional(),
|
|
7447
|
+
requiresExplanationIfYes: z24.boolean().optional(),
|
|
7448
|
+
condition: z24.object({
|
|
7449
|
+
dependsOn: z24.string(),
|
|
7450
|
+
whenValue: z24.string()
|
|
7240
7451
|
}).optional(),
|
|
7241
|
-
value:
|
|
7242
|
-
source:
|
|
7243
|
-
confidence:
|
|
7244
|
-
sourceSpanIds:
|
|
7245
|
-
userSourceSpanIds:
|
|
7246
|
-
pageNumber:
|
|
7247
|
-
fieldAnchorId:
|
|
7248
|
-
acroFormName:
|
|
7249
|
-
validationStatus:
|
|
7250
|
-
});
|
|
7251
|
-
var ApplicationQuestionConditionSchema =
|
|
7252
|
-
dependsOn:
|
|
7253
|
-
operator:
|
|
7254
|
-
value:
|
|
7255
|
-
whenValue:
|
|
7256
|
-
values:
|
|
7257
|
-
});
|
|
7258
|
-
var ApplicationRepeatSchema =
|
|
7259
|
-
min:
|
|
7260
|
-
max:
|
|
7261
|
-
label:
|
|
7262
|
-
});
|
|
7263
|
-
var ApplicationQuestionNodeSchema =
|
|
7264
|
-
() =>
|
|
7265
|
-
id:
|
|
7266
|
-
nodeType:
|
|
7267
|
-
fieldId:
|
|
7268
|
-
fieldPath:
|
|
7269
|
-
parentId:
|
|
7270
|
-
order:
|
|
7271
|
-
label:
|
|
7272
|
-
section:
|
|
7452
|
+
value: z24.string().optional(),
|
|
7453
|
+
source: z24.string().optional().describe("Where the value came from: auto-fill, user, lookup"),
|
|
7454
|
+
confidence: z24.enum(["confirmed", "high", "medium", "low"]).optional(),
|
|
7455
|
+
sourceSpanIds: z24.array(z24.string()).optional().describe("Stable source spans that support the field value or field anchor"),
|
|
7456
|
+
userSourceSpanIds: z24.array(z24.string()).optional().describe("Message or attachment spans that support user-provided values"),
|
|
7457
|
+
pageNumber: z24.number().int().positive().optional().describe("Application page where the field label or anchor appears"),
|
|
7458
|
+
fieldAnchorId: z24.string().optional().describe("Stable field anchor ID derived from page, section, label, and form metadata"),
|
|
7459
|
+
acroFormName: z24.string().optional().describe("Native PDF AcroForm field name when available"),
|
|
7460
|
+
validationStatus: z24.enum(["valid", "needs_review", "unsupported", "missing"]).optional()
|
|
7461
|
+
});
|
|
7462
|
+
var ApplicationQuestionConditionSchema = z24.object({
|
|
7463
|
+
dependsOn: z24.string(),
|
|
7464
|
+
operator: z24.enum(["equals", "not_equals", "in", "not_in", "exists"]).optional(),
|
|
7465
|
+
value: z24.string().optional(),
|
|
7466
|
+
whenValue: z24.string().optional(),
|
|
7467
|
+
values: z24.array(z24.string()).optional()
|
|
7468
|
+
});
|
|
7469
|
+
var ApplicationRepeatSchema = z24.object({
|
|
7470
|
+
min: z24.number().int().nonnegative().optional(),
|
|
7471
|
+
max: z24.number().int().positive().optional(),
|
|
7472
|
+
label: z24.string().optional()
|
|
7473
|
+
});
|
|
7474
|
+
var ApplicationQuestionNodeSchema = z24.lazy(
|
|
7475
|
+
() => z24.object({
|
|
7476
|
+
id: z24.string(),
|
|
7477
|
+
nodeType: z24.enum(["group", "question", "repeat_group", "table"]),
|
|
7478
|
+
fieldId: z24.string().optional(),
|
|
7479
|
+
fieldPath: z24.string().optional(),
|
|
7480
|
+
parentId: z24.string().optional(),
|
|
7481
|
+
order: z24.number().int().nonnegative().optional(),
|
|
7482
|
+
label: z24.string(),
|
|
7483
|
+
section: z24.string().optional(),
|
|
7273
7484
|
fieldType: FieldTypeSchema.optional(),
|
|
7274
|
-
required:
|
|
7275
|
-
prompt:
|
|
7276
|
-
options:
|
|
7277
|
-
columns:
|
|
7485
|
+
required: z24.boolean().optional(),
|
|
7486
|
+
prompt: z24.string().optional(),
|
|
7487
|
+
options: z24.array(z24.string()).optional(),
|
|
7488
|
+
columns: z24.array(z24.string()).optional(),
|
|
7278
7489
|
condition: ApplicationQuestionConditionSchema.optional(),
|
|
7279
7490
|
repeat: ApplicationRepeatSchema.optional(),
|
|
7280
|
-
children:
|
|
7491
|
+
children: z24.array(ApplicationQuestionNodeSchema).optional()
|
|
7281
7492
|
})
|
|
7282
7493
|
);
|
|
7283
|
-
var ApplicationQuestionGraphSchema =
|
|
7284
|
-
id:
|
|
7285
|
-
version:
|
|
7286
|
-
title:
|
|
7287
|
-
applicationType:
|
|
7288
|
-
source:
|
|
7289
|
-
rootNodeIds:
|
|
7290
|
-
nodes:
|
|
7291
|
-
});
|
|
7292
|
-
var ApplicationTemplateSchema =
|
|
7293
|
-
id:
|
|
7294
|
-
version:
|
|
7295
|
-
title:
|
|
7296
|
-
applicationType:
|
|
7494
|
+
var ApplicationQuestionGraphSchema = z24.object({
|
|
7495
|
+
id: z24.string(),
|
|
7496
|
+
version: z24.string(),
|
|
7497
|
+
title: z24.string().optional(),
|
|
7498
|
+
applicationType: z24.string().nullable().optional(),
|
|
7499
|
+
source: z24.enum(["pdf", "manual", "imported", "generated"]).default("generated"),
|
|
7500
|
+
rootNodeIds: z24.array(z24.string()).optional(),
|
|
7501
|
+
nodes: z24.array(ApplicationQuestionNodeSchema)
|
|
7502
|
+
});
|
|
7503
|
+
var ApplicationTemplateSchema = z24.object({
|
|
7504
|
+
id: z24.string(),
|
|
7505
|
+
version: z24.string(),
|
|
7506
|
+
title: z24.string(),
|
|
7507
|
+
applicationType: z24.string().nullable().optional(),
|
|
7297
7508
|
questionGraph: ApplicationQuestionGraphSchema,
|
|
7298
|
-
fields:
|
|
7299
|
-
});
|
|
7300
|
-
var ApplicationClassifyResultSchema = z23.object({
|
|
7301
|
-
isApplication: z23.boolean(),
|
|
7302
|
-
confidence: z23.number().min(0).max(1),
|
|
7303
|
-
applicationType: z23.string().nullable()
|
|
7304
|
-
});
|
|
7305
|
-
var FieldExtractionResultSchema = z23.object({
|
|
7306
|
-
fields: z23.array(ApplicationFieldSchema)
|
|
7307
|
-
});
|
|
7308
|
-
var AutoFillMatchSchema = z23.object({
|
|
7309
|
-
fieldId: z23.string(),
|
|
7310
|
-
value: z23.string(),
|
|
7311
|
-
confidence: z23.enum(["confirmed"]),
|
|
7312
|
-
contextKey: z23.string()
|
|
7313
|
-
});
|
|
7314
|
-
var AutoFillResultSchema = z23.object({
|
|
7315
|
-
matches: z23.array(AutoFillMatchSchema)
|
|
7316
|
-
});
|
|
7317
|
-
var QuestionBatchResultSchema = z23.object({
|
|
7318
|
-
batches: z23.array(z23.array(z23.string()).describe("Array of field IDs in this batch"))
|
|
7319
|
-
});
|
|
7320
|
-
var LookupRequestSchema = z23.object({
|
|
7321
|
-
type: z23.string().describe("Type of lookup: 'records', 'website', 'policy'"),
|
|
7322
|
-
description: z23.string(),
|
|
7323
|
-
url: z23.string().optional(),
|
|
7324
|
-
targetFieldIds: z23.array(z23.string())
|
|
7325
|
-
});
|
|
7326
|
-
var ReplyIntentSchema = z23.object({
|
|
7327
|
-
primaryIntent: z23.enum(["answers_only", "question", "lookup_request", "mixed"]),
|
|
7328
|
-
hasAnswers: z23.boolean(),
|
|
7329
|
-
questionText: z23.string().optional(),
|
|
7330
|
-
questionFieldIds: z23.array(z23.string()).optional(),
|
|
7331
|
-
lookupRequests: z23.array(LookupRequestSchema).optional()
|
|
7332
|
-
});
|
|
7333
|
-
var ParsedAnswerSchema = z23.object({
|
|
7334
|
-
fieldId: z23.string(),
|
|
7335
|
-
value: z23.string(),
|
|
7336
|
-
explanation: z23.string().optional()
|
|
7337
|
-
});
|
|
7338
|
-
var AnswerParsingResultSchema = z23.object({
|
|
7339
|
-
answers: z23.array(ParsedAnswerSchema),
|
|
7340
|
-
unanswered: z23.array(z23.string()).describe("Field IDs that were not answered")
|
|
7341
|
-
});
|
|
7342
|
-
var LookupFillSchema = z23.object({
|
|
7343
|
-
fieldId: z23.string(),
|
|
7344
|
-
value: z23.string(),
|
|
7345
|
-
source: z23.string().describe("Specific citable reference, e.g. 'GL Policy #POL-12345 (Hartford)'"),
|
|
7346
|
-
sourceSpanIds: z23.array(z23.string()).optional()
|
|
7509
|
+
fields: z24.array(ApplicationFieldSchema).optional()
|
|
7347
7510
|
});
|
|
7348
|
-
var
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
});
|
|
7353
|
-
var
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
});
|
|
7362
|
-
var
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
var
|
|
7369
|
-
|
|
7370
|
-
|
|
7511
|
+
var ApplicationClassifyResultSchema = z24.object({
|
|
7512
|
+
isApplication: z24.boolean(),
|
|
7513
|
+
confidence: z24.number().min(0).max(1),
|
|
7514
|
+
applicationType: z24.string().nullable()
|
|
7515
|
+
});
|
|
7516
|
+
var FieldExtractionResultSchema = z24.object({
|
|
7517
|
+
fields: z24.array(ApplicationFieldSchema)
|
|
7518
|
+
});
|
|
7519
|
+
var AutoFillMatchSchema = z24.object({
|
|
7520
|
+
fieldId: z24.string(),
|
|
7521
|
+
value: z24.string(),
|
|
7522
|
+
confidence: z24.enum(["confirmed"]),
|
|
7523
|
+
contextKey: z24.string()
|
|
7524
|
+
});
|
|
7525
|
+
var AutoFillResultSchema = z24.object({
|
|
7526
|
+
matches: z24.array(AutoFillMatchSchema)
|
|
7527
|
+
});
|
|
7528
|
+
var QuestionBatchResultSchema = z24.object({
|
|
7529
|
+
batches: z24.array(z24.array(z24.string()).describe("Array of field IDs in this batch"))
|
|
7530
|
+
});
|
|
7531
|
+
var LookupRequestSchema = z24.object({
|
|
7532
|
+
type: z24.string().describe("Type of lookup: 'records', 'website', 'policy'"),
|
|
7533
|
+
description: z24.string(),
|
|
7534
|
+
url: z24.string().optional(),
|
|
7535
|
+
targetFieldIds: z24.array(z24.string())
|
|
7536
|
+
});
|
|
7537
|
+
var ReplyIntentSchema = z24.object({
|
|
7538
|
+
primaryIntent: z24.enum(["answers_only", "question", "lookup_request", "mixed"]),
|
|
7539
|
+
hasAnswers: z24.boolean(),
|
|
7540
|
+
questionText: z24.string().optional(),
|
|
7541
|
+
questionFieldIds: z24.array(z24.string()).optional(),
|
|
7542
|
+
lookupRequests: z24.array(LookupRequestSchema).optional()
|
|
7543
|
+
});
|
|
7544
|
+
var ParsedAnswerSchema = z24.object({
|
|
7545
|
+
fieldId: z24.string(),
|
|
7546
|
+
value: z24.string(),
|
|
7547
|
+
explanation: z24.string().optional()
|
|
7548
|
+
});
|
|
7549
|
+
var AnswerParsingResultSchema = z24.object({
|
|
7550
|
+
answers: z24.array(ParsedAnswerSchema),
|
|
7551
|
+
unanswered: z24.array(z24.string()).describe("Field IDs that were not answered")
|
|
7552
|
+
});
|
|
7553
|
+
var LookupFillSchema = z24.object({
|
|
7554
|
+
fieldId: z24.string(),
|
|
7555
|
+
value: z24.string(),
|
|
7556
|
+
source: z24.string().describe("Specific citable reference, e.g. 'GL Policy #POL-12345 (Hartford)'"),
|
|
7557
|
+
sourceSpanIds: z24.array(z24.string()).optional()
|
|
7558
|
+
});
|
|
7559
|
+
var LookupFillResultSchema = z24.object({
|
|
7560
|
+
fills: z24.array(LookupFillSchema),
|
|
7561
|
+
unfillable: z24.array(z24.string()),
|
|
7562
|
+
explanation: z24.string().optional()
|
|
7563
|
+
});
|
|
7564
|
+
var FlatPdfPlacementSchema = z24.object({
|
|
7565
|
+
fieldId: z24.string(),
|
|
7566
|
+
page: z24.number(),
|
|
7567
|
+
x: z24.number().describe("Percentage from left edge (0-100)"),
|
|
7568
|
+
y: z24.number().describe("Percentage from top edge (0-100)"),
|
|
7569
|
+
text: z24.string(),
|
|
7570
|
+
fontSize: z24.number().optional(),
|
|
7571
|
+
isCheckmark: z24.boolean().optional()
|
|
7572
|
+
});
|
|
7573
|
+
var AcroFormMappingSchema = z24.object({
|
|
7574
|
+
fieldId: z24.string(),
|
|
7575
|
+
acroFormName: z24.string(),
|
|
7576
|
+
value: z24.string()
|
|
7577
|
+
});
|
|
7578
|
+
var QualityGateStatusSchema = z24.enum(["passed", "warning", "failed"]);
|
|
7579
|
+
var QualitySeveritySchema = z24.enum(["info", "warning", "blocking"]);
|
|
7580
|
+
var ApplicationQualityIssueSchema = z24.object({
|
|
7581
|
+
code: z24.string(),
|
|
7371
7582
|
severity: QualitySeveritySchema,
|
|
7372
|
-
message:
|
|
7373
|
-
fieldId:
|
|
7583
|
+
message: z24.string(),
|
|
7584
|
+
fieldId: z24.string().optional()
|
|
7374
7585
|
});
|
|
7375
|
-
var ApplicationQualityRoundSchema =
|
|
7376
|
-
round:
|
|
7377
|
-
kind:
|
|
7586
|
+
var ApplicationQualityRoundSchema = z24.object({
|
|
7587
|
+
round: z24.number(),
|
|
7588
|
+
kind: z24.string(),
|
|
7378
7589
|
status: QualityGateStatusSchema,
|
|
7379
|
-
summary:
|
|
7590
|
+
summary: z24.string().optional()
|
|
7380
7591
|
});
|
|
7381
|
-
var ApplicationQualityArtifactSchema =
|
|
7382
|
-
kind:
|
|
7383
|
-
label:
|
|
7384
|
-
itemCount:
|
|
7592
|
+
var ApplicationQualityArtifactSchema = z24.object({
|
|
7593
|
+
kind: z24.string(),
|
|
7594
|
+
label: z24.string().optional(),
|
|
7595
|
+
itemCount: z24.number().optional()
|
|
7385
7596
|
});
|
|
7386
|
-
var ApplicationEmailReviewSchema =
|
|
7387
|
-
issues:
|
|
7597
|
+
var ApplicationEmailReviewSchema = z24.object({
|
|
7598
|
+
issues: z24.array(ApplicationQualityIssueSchema),
|
|
7388
7599
|
qualityGateStatus: QualityGateStatusSchema
|
|
7389
7600
|
});
|
|
7390
|
-
var ApplicationQualityReportSchema =
|
|
7391
|
-
issues:
|
|
7392
|
-
rounds:
|
|
7393
|
-
artifacts:
|
|
7601
|
+
var ApplicationQualityReportSchema = z24.object({
|
|
7602
|
+
issues: z24.array(ApplicationQualityIssueSchema),
|
|
7603
|
+
rounds: z24.array(ApplicationQualityRoundSchema).optional(),
|
|
7604
|
+
artifacts: z24.array(ApplicationQualityArtifactSchema).optional(),
|
|
7394
7605
|
emailReview: ApplicationEmailReviewSchema.optional(),
|
|
7395
7606
|
qualityGateStatus: QualityGateStatusSchema
|
|
7396
7607
|
});
|
|
7397
|
-
var ApplicationContextProposalSchema =
|
|
7398
|
-
id:
|
|
7399
|
-
fieldId:
|
|
7400
|
-
key:
|
|
7401
|
-
value:
|
|
7402
|
-
category:
|
|
7403
|
-
source:
|
|
7404
|
-
confidence:
|
|
7405
|
-
sourceSpanIds:
|
|
7406
|
-
userSourceSpanIds:
|
|
7407
|
-
});
|
|
7408
|
-
var ApplicationPacketAnswerSchema =
|
|
7409
|
-
fieldId:
|
|
7410
|
-
label:
|
|
7411
|
-
section:
|
|
7412
|
-
value:
|
|
7413
|
-
source:
|
|
7414
|
-
confidence:
|
|
7415
|
-
sourceSpanIds:
|
|
7416
|
-
userSourceSpanIds:
|
|
7417
|
-
});
|
|
7418
|
-
var ApplicationPacketSchema =
|
|
7419
|
-
id:
|
|
7420
|
-
applicationId:
|
|
7421
|
-
title:
|
|
7422
|
-
status:
|
|
7423
|
-
answers:
|
|
7424
|
-
missingFieldIds:
|
|
7608
|
+
var ApplicationContextProposalSchema = z24.object({
|
|
7609
|
+
id: z24.string(),
|
|
7610
|
+
fieldId: z24.string().optional(),
|
|
7611
|
+
key: z24.string(),
|
|
7612
|
+
value: z24.string(),
|
|
7613
|
+
category: z24.string(),
|
|
7614
|
+
source: z24.enum(["application", "user", "lookup", "policy", "email", "chat", "imessage", "mcp"]),
|
|
7615
|
+
confidence: z24.enum(["confirmed", "high", "medium", "low"]),
|
|
7616
|
+
sourceSpanIds: z24.array(z24.string()).optional(),
|
|
7617
|
+
userSourceSpanIds: z24.array(z24.string()).optional()
|
|
7618
|
+
});
|
|
7619
|
+
var ApplicationPacketAnswerSchema = z24.object({
|
|
7620
|
+
fieldId: z24.string(),
|
|
7621
|
+
label: z24.string(),
|
|
7622
|
+
section: z24.string(),
|
|
7623
|
+
value: z24.string(),
|
|
7624
|
+
source: z24.string(),
|
|
7625
|
+
confidence: z24.enum(["confirmed", "high", "medium", "low"]).optional(),
|
|
7626
|
+
sourceSpanIds: z24.array(z24.string()).optional(),
|
|
7627
|
+
userSourceSpanIds: z24.array(z24.string()).optional()
|
|
7628
|
+
});
|
|
7629
|
+
var ApplicationPacketSchema = z24.object({
|
|
7630
|
+
id: z24.string(),
|
|
7631
|
+
applicationId: z24.string(),
|
|
7632
|
+
title: z24.string(),
|
|
7633
|
+
status: z24.enum(["draft", "broker_ready", "submitted"]),
|
|
7634
|
+
answers: z24.array(ApplicationPacketAnswerSchema),
|
|
7635
|
+
missingFieldIds: z24.array(z24.string()),
|
|
7425
7636
|
qualityReport: ApplicationQualityReportSchema,
|
|
7426
|
-
submissionNotes:
|
|
7427
|
-
createdAt:
|
|
7428
|
-
});
|
|
7429
|
-
var ApplicationStateSchema =
|
|
7430
|
-
id:
|
|
7431
|
-
pdfBase64:
|
|
7432
|
-
templateId:
|
|
7433
|
-
templateVersion:
|
|
7637
|
+
submissionNotes: z24.string().optional(),
|
|
7638
|
+
createdAt: z24.number()
|
|
7639
|
+
});
|
|
7640
|
+
var ApplicationStateSchema = z24.object({
|
|
7641
|
+
id: z24.string(),
|
|
7642
|
+
pdfBase64: z24.string().optional().describe("Original PDF, omitted after extraction"),
|
|
7643
|
+
templateId: z24.string().optional(),
|
|
7644
|
+
templateVersion: z24.string().optional(),
|
|
7434
7645
|
templateSnapshot: ApplicationTemplateSchema.optional(),
|
|
7435
|
-
title:
|
|
7436
|
-
applicationType:
|
|
7646
|
+
title: z24.string().optional(),
|
|
7647
|
+
applicationType: z24.string().nullable().optional(),
|
|
7437
7648
|
questionGraph: ApplicationQuestionGraphSchema.optional(),
|
|
7438
|
-
fields:
|
|
7439
|
-
batches:
|
|
7440
|
-
currentBatchIndex:
|
|
7441
|
-
contextProposals:
|
|
7649
|
+
fields: z24.array(ApplicationFieldSchema),
|
|
7650
|
+
batches: z24.array(z24.array(z24.string())).optional(),
|
|
7651
|
+
currentBatchIndex: z24.number().default(0),
|
|
7652
|
+
contextProposals: z24.array(ApplicationContextProposalSchema).optional(),
|
|
7442
7653
|
packet: ApplicationPacketSchema.optional(),
|
|
7443
7654
|
qualityReport: ApplicationQualityReportSchema.optional(),
|
|
7444
|
-
status:
|
|
7655
|
+
status: z24.enum([
|
|
7445
7656
|
"classifying",
|
|
7446
7657
|
"extracting",
|
|
7447
7658
|
"auto_filling",
|
|
@@ -7455,8 +7666,8 @@ var ApplicationStateSchema = z23.object({
|
|
|
7455
7666
|
"cancelled",
|
|
7456
7667
|
"complete"
|
|
7457
7668
|
]),
|
|
7458
|
-
createdAt:
|
|
7459
|
-
updatedAt:
|
|
7669
|
+
createdAt: z24.number(),
|
|
7670
|
+
updatedAt: z24.number()
|
|
7460
7671
|
});
|
|
7461
7672
|
|
|
7462
7673
|
// src/application/agents/classifier.ts
|
|
@@ -9190,106 +9401,106 @@ Respond with the final answer, deduplicated citations array, overall confidence
|
|
|
9190
9401
|
}
|
|
9191
9402
|
|
|
9192
9403
|
// src/schemas/query.ts
|
|
9193
|
-
import { z as
|
|
9194
|
-
var QueryIntentSchema =
|
|
9404
|
+
import { z as z25 } from "zod";
|
|
9405
|
+
var QueryIntentSchema = z25.enum([
|
|
9195
9406
|
"policy_question",
|
|
9196
9407
|
"coverage_comparison",
|
|
9197
9408
|
"document_search",
|
|
9198
9409
|
"claims_inquiry",
|
|
9199
9410
|
"general_knowledge"
|
|
9200
9411
|
]);
|
|
9201
|
-
var QueryAttachmentKindSchema =
|
|
9202
|
-
var QueryAttachmentSchema =
|
|
9203
|
-
id:
|
|
9412
|
+
var QueryAttachmentKindSchema = z25.enum(["image", "pdf", "text"]);
|
|
9413
|
+
var QueryAttachmentSchema = z25.object({
|
|
9414
|
+
id: z25.string().optional().describe("Optional stable attachment ID from the caller"),
|
|
9204
9415
|
kind: QueryAttachmentKindSchema,
|
|
9205
|
-
name:
|
|
9206
|
-
mimeType:
|
|
9207
|
-
base64:
|
|
9208
|
-
text:
|
|
9209
|
-
description:
|
|
9416
|
+
name: z25.string().optional().describe("Original filename or user-facing label"),
|
|
9417
|
+
mimeType: z25.string().optional().describe("MIME type such as image/jpeg or application/pdf"),
|
|
9418
|
+
base64: z25.string().optional().describe("Base64-encoded file content for image/pdf attachments"),
|
|
9419
|
+
text: z25.string().optional().describe("Plain-text attachment content when available"),
|
|
9420
|
+
description: z25.string().optional().describe("Caller-provided description of the attachment")
|
|
9210
9421
|
});
|
|
9211
|
-
var QueryRetrievalModeSchema =
|
|
9422
|
+
var QueryRetrievalModeSchema = z25.enum([
|
|
9212
9423
|
"graph_only",
|
|
9213
9424
|
"source_rag",
|
|
9214
9425
|
"long_context",
|
|
9215
9426
|
"hybrid"
|
|
9216
9427
|
]);
|
|
9217
|
-
var SubQuestionSchema =
|
|
9218
|
-
question:
|
|
9428
|
+
var SubQuestionSchema = z25.object({
|
|
9429
|
+
question: z25.string().describe("Atomic sub-question to retrieve and answer independently"),
|
|
9219
9430
|
intent: QueryIntentSchema,
|
|
9220
|
-
chunkTypes:
|
|
9221
|
-
documentFilters:
|
|
9222
|
-
type:
|
|
9223
|
-
carrier:
|
|
9224
|
-
insuredName:
|
|
9225
|
-
policyNumber:
|
|
9226
|
-
quoteNumber:
|
|
9227
|
-
|
|
9431
|
+
chunkTypes: z25.array(z25.string()).optional().describe("Chunk types to filter retrieval (e.g. coverage, endorsement, declaration)"),
|
|
9432
|
+
documentFilters: z25.object({
|
|
9433
|
+
type: z25.enum(["policy", "quote"]).optional(),
|
|
9434
|
+
carrier: z25.string().optional(),
|
|
9435
|
+
insuredName: z25.string().optional(),
|
|
9436
|
+
policyNumber: z25.string().optional(),
|
|
9437
|
+
quoteNumber: z25.string().optional(),
|
|
9438
|
+
linesOfBusiness: z25.array(AcordLobCodeSchema).optional().describe("Filter by ACORD line of business code (e.g. HOME, AUTOP, DISAB) to avoid mixing up similar policies")
|
|
9228
9439
|
}).optional().describe("Structured filters to narrow document lookup")
|
|
9229
9440
|
});
|
|
9230
|
-
var QueryClassifyResultSchema =
|
|
9441
|
+
var QueryClassifyResultSchema = z25.object({
|
|
9231
9442
|
intent: QueryIntentSchema,
|
|
9232
|
-
subQuestions:
|
|
9233
|
-
requiresDocumentLookup:
|
|
9234
|
-
requiresChunkSearch:
|
|
9235
|
-
requiresConversationHistory:
|
|
9443
|
+
subQuestions: z25.array(SubQuestionSchema).min(1).describe("Decomposed atomic sub-questions"),
|
|
9444
|
+
requiresDocumentLookup: z25.boolean().describe("Whether structured document lookup is needed"),
|
|
9445
|
+
requiresChunkSearch: z25.boolean().describe("Whether semantic chunk search is needed"),
|
|
9446
|
+
requiresConversationHistory: z25.boolean().describe("Whether conversation history is relevant"),
|
|
9236
9447
|
retrievalMode: QueryRetrievalModeSchema.optional().describe("Preferred retrieval strategy for the query when source-span retrieval is available")
|
|
9237
9448
|
});
|
|
9238
|
-
var EvidenceItemSchema =
|
|
9239
|
-
source:
|
|
9240
|
-
chunkId:
|
|
9241
|
-
sourceNodeId:
|
|
9242
|
-
sourceSpanId:
|
|
9243
|
-
documentId:
|
|
9244
|
-
turnId:
|
|
9245
|
-
attachmentId:
|
|
9246
|
-
text:
|
|
9247
|
-
relevance:
|
|
9449
|
+
var EvidenceItemSchema = z25.object({
|
|
9450
|
+
source: z25.enum(["chunk", "document", "conversation", "attachment", "source_span", "source_node"]),
|
|
9451
|
+
chunkId: z25.string().optional(),
|
|
9452
|
+
sourceNodeId: z25.string().optional(),
|
|
9453
|
+
sourceSpanId: z25.string().optional(),
|
|
9454
|
+
documentId: z25.string().optional(),
|
|
9455
|
+
turnId: z25.string().optional(),
|
|
9456
|
+
attachmentId: z25.string().optional(),
|
|
9457
|
+
text: z25.string().describe("Text excerpt from the source"),
|
|
9458
|
+
relevance: z25.number().min(0).max(1),
|
|
9248
9459
|
retrievalMode: QueryRetrievalModeSchema.optional(),
|
|
9249
9460
|
sourceLocation: SourceSpanLocationSchema.optional(),
|
|
9250
|
-
metadata:
|
|
9251
|
-
});
|
|
9252
|
-
var AttachmentInterpretationSchema =
|
|
9253
|
-
summary:
|
|
9254
|
-
extractedFacts:
|
|
9255
|
-
recommendedFocus:
|
|
9256
|
-
confidence:
|
|
9257
|
-
});
|
|
9258
|
-
var RetrievalResultSchema =
|
|
9259
|
-
subQuestion:
|
|
9260
|
-
evidence:
|
|
9261
|
-
});
|
|
9262
|
-
var CitationSchema =
|
|
9263
|
-
index:
|
|
9264
|
-
chunkId:
|
|
9265
|
-
sourceNodeId:
|
|
9266
|
-
sourceSpanId:
|
|
9267
|
-
documentId:
|
|
9268
|
-
documentType:
|
|
9269
|
-
field:
|
|
9270
|
-
quote:
|
|
9271
|
-
relevance:
|
|
9461
|
+
metadata: z25.array(z25.object({ key: z25.string(), value: z25.string() })).optional()
|
|
9462
|
+
});
|
|
9463
|
+
var AttachmentInterpretationSchema = z25.object({
|
|
9464
|
+
summary: z25.string().describe("Concise summary of what the attachment shows or contains"),
|
|
9465
|
+
extractedFacts: z25.array(z25.string()).describe("Specific observable or document facts grounded in the attachment"),
|
|
9466
|
+
recommendedFocus: z25.array(z25.string()).describe("Important details to incorporate when answering follow-up questions"),
|
|
9467
|
+
confidence: z25.number().min(0).max(1)
|
|
9468
|
+
});
|
|
9469
|
+
var RetrievalResultSchema = z25.object({
|
|
9470
|
+
subQuestion: z25.string(),
|
|
9471
|
+
evidence: z25.array(EvidenceItemSchema)
|
|
9472
|
+
});
|
|
9473
|
+
var CitationSchema = z25.object({
|
|
9474
|
+
index: z25.number().describe("Citation number [1], [2], etc."),
|
|
9475
|
+
chunkId: z25.string().optional().describe("Source chunk ID, e.g. doc-123:coverage:2"),
|
|
9476
|
+
sourceNodeId: z25.string().optional().describe("Source tree node ID when available"),
|
|
9477
|
+
sourceSpanId: z25.string().optional().describe("Precise source span ID when available"),
|
|
9478
|
+
documentId: z25.string(),
|
|
9479
|
+
documentType: z25.enum(["policy", "quote"]).optional(),
|
|
9480
|
+
field: z25.string().optional().describe("Specific field path, e.g. coverages[0].deductible"),
|
|
9481
|
+
quote: z25.string().describe("Exact text from source that supports the claim"),
|
|
9482
|
+
relevance: z25.number().min(0).max(1),
|
|
9272
9483
|
retrievalMode: QueryRetrievalModeSchema.optional(),
|
|
9273
9484
|
sourceLocation: SourceSpanLocationSchema.optional()
|
|
9274
9485
|
});
|
|
9275
|
-
var SubAnswerSchema =
|
|
9276
|
-
subQuestion:
|
|
9277
|
-
answer:
|
|
9278
|
-
citations:
|
|
9279
|
-
confidence:
|
|
9280
|
-
needsMoreContext:
|
|
9281
|
-
});
|
|
9282
|
-
var VerifyResultSchema =
|
|
9283
|
-
approved:
|
|
9284
|
-
issues:
|
|
9285
|
-
retrySubQuestions:
|
|
9286
|
-
});
|
|
9287
|
-
var QueryResultSchema =
|
|
9288
|
-
answer:
|
|
9289
|
-
citations:
|
|
9486
|
+
var SubAnswerSchema = z25.object({
|
|
9487
|
+
subQuestion: z25.string(),
|
|
9488
|
+
answer: z25.string(),
|
|
9489
|
+
citations: z25.array(CitationSchema),
|
|
9490
|
+
confidence: z25.number().min(0).max(1),
|
|
9491
|
+
needsMoreContext: z25.boolean().describe("True if evidence was insufficient to answer fully")
|
|
9492
|
+
});
|
|
9493
|
+
var VerifyResultSchema = z25.object({
|
|
9494
|
+
approved: z25.boolean().describe("Whether all sub-answers are adequately grounded"),
|
|
9495
|
+
issues: z25.array(z25.string()).describe("Specific grounding or consistency issues found"),
|
|
9496
|
+
retrySubQuestions: z25.array(z25.string()).optional().describe("Sub-questions that need additional retrieval or re-reasoning")
|
|
9497
|
+
});
|
|
9498
|
+
var QueryResultSchema = z25.object({
|
|
9499
|
+
answer: z25.string(),
|
|
9500
|
+
citations: z25.array(CitationSchema),
|
|
9290
9501
|
intent: QueryIntentSchema,
|
|
9291
|
-
confidence:
|
|
9292
|
-
followUp:
|
|
9502
|
+
confidence: z25.number().min(0).max(1),
|
|
9503
|
+
followUp: z25.string().optional().describe("Suggested follow-up question if applicable")
|
|
9293
9504
|
});
|
|
9294
9505
|
|
|
9295
9506
|
// src/query/retriever.ts
|
|
@@ -10356,7 +10567,7 @@ ${sa.answer}`).join("\n\n"),
|
|
|
10356
10567
|
}
|
|
10357
10568
|
|
|
10358
10569
|
// src/pce/index.ts
|
|
10359
|
-
import { z as
|
|
10570
|
+
import { z as z26 } from "zod";
|
|
10360
10571
|
|
|
10361
10572
|
// src/prompts/pce/index.ts
|
|
10362
10573
|
function buildPceNormalizePrompt(input) {
|
|
@@ -10390,11 +10601,11 @@ ${input.openQuestions.map((question) => `- ${question.id}${question.fieldPath ?
|
|
|
10390
10601
|
}
|
|
10391
10602
|
|
|
10392
10603
|
// src/pce/index.ts
|
|
10393
|
-
var ReplyAnswersSchema =
|
|
10394
|
-
answers:
|
|
10395
|
-
questionId:
|
|
10396
|
-
fieldPath:
|
|
10397
|
-
answer:
|
|
10604
|
+
var ReplyAnswersSchema = z26.object({
|
|
10605
|
+
answers: z26.array(z26.object({
|
|
10606
|
+
questionId: z26.string().optional(),
|
|
10607
|
+
fieldPath: z26.string().optional(),
|
|
10608
|
+
answer: z26.string()
|
|
10398
10609
|
}))
|
|
10399
10610
|
});
|
|
10400
10611
|
function createPceAgent(config = {}) {
|
|
@@ -11123,7 +11334,7 @@ var COI_GENERATION_TOOL = {
|
|
|
11123
11334
|
};
|
|
11124
11335
|
var COVERAGE_COMPARISON_TOOL = {
|
|
11125
11336
|
name: "coverage_comparison",
|
|
11126
|
-
description: "Compare coverages across two or more insurance documents (policies and/or quotes). Returns a side-by-side comparison of
|
|
11337
|
+
description: "Compare coverages across two or more insurance documents (policies and/or quotes). Returns a side-by-side comparison of lines of business, limits, and deductibles.",
|
|
11127
11338
|
input_schema: {
|
|
11128
11339
|
type: "object",
|
|
11129
11340
|
properties: {
|
|
@@ -11132,10 +11343,10 @@ var COVERAGE_COMPARISON_TOOL = {
|
|
|
11132
11343
|
items: { type: "string" },
|
|
11133
11344
|
description: "Array of document IDs (policies or quotes) to compare."
|
|
11134
11345
|
},
|
|
11135
|
-
|
|
11346
|
+
linesOfBusiness: {
|
|
11136
11347
|
type: "array",
|
|
11137
11348
|
items: { type: "string" },
|
|
11138
|
-
description: "Optional filter: only compare these
|
|
11349
|
+
description: "Optional filter: only compare these ACORD line of business codes or labels (e.g. 'CGL', 'WORK'). Omit to compare all."
|
|
11139
11350
|
}
|
|
11140
11351
|
},
|
|
11141
11352
|
required: ["documentIds"]
|
|
@@ -11148,23 +11359,23 @@ var AGENT_TOOLS = [
|
|
|
11148
11359
|
];
|
|
11149
11360
|
|
|
11150
11361
|
// src/prompts/extractors/carrier-info.ts
|
|
11151
|
-
import { z as
|
|
11152
|
-
var CarrierInfoSchema =
|
|
11153
|
-
carrierName:
|
|
11154
|
-
carrierLegalName:
|
|
11155
|
-
naicNumber:
|
|
11156
|
-
amBestRating:
|
|
11157
|
-
admittedStatus:
|
|
11158
|
-
mga:
|
|
11159
|
-
underwriter:
|
|
11160
|
-
brokerAgency:
|
|
11161
|
-
brokerContactName:
|
|
11162
|
-
brokerLicenseNumber:
|
|
11163
|
-
policyNumber:
|
|
11164
|
-
effectiveDate:
|
|
11165
|
-
expirationDate:
|
|
11166
|
-
quoteNumber:
|
|
11167
|
-
proposedEffectiveDate:
|
|
11362
|
+
import { z as z27 } from "zod";
|
|
11363
|
+
var CarrierInfoSchema = z27.object({
|
|
11364
|
+
carrierName: z27.string().describe("Primary insurance company name for display"),
|
|
11365
|
+
carrierLegalName: z27.string().optional().describe("Legal entity name of insurer"),
|
|
11366
|
+
naicNumber: z27.string().optional().describe("NAIC company code"),
|
|
11367
|
+
amBestRating: z27.string().optional().describe("AM Best rating, e.g. 'A+ XV'"),
|
|
11368
|
+
admittedStatus: z27.enum(["admitted", "non_admitted", "surplus_lines"]).optional().describe("Admitted status of the carrier"),
|
|
11369
|
+
mga: z27.string().optional().describe("Managing General Agent or Program Administrator name"),
|
|
11370
|
+
underwriter: z27.string().optional().describe("Named individual underwriter"),
|
|
11371
|
+
brokerAgency: z27.string().optional().describe("Broker or producer agency name"),
|
|
11372
|
+
brokerContactName: z27.string().optional().describe("Broker or producer contact person name"),
|
|
11373
|
+
brokerLicenseNumber: z27.string().optional().describe("Broker or producer license number"),
|
|
11374
|
+
policyNumber: z27.string().optional().describe("Policy or quote reference number"),
|
|
11375
|
+
effectiveDate: z27.string().optional().describe("Policy effective date (MM/DD/YYYY)"),
|
|
11376
|
+
expirationDate: z27.string().optional().describe("Policy expiration date (MM/DD/YYYY)"),
|
|
11377
|
+
quoteNumber: z27.string().optional().describe("Quote or proposal reference number"),
|
|
11378
|
+
proposedEffectiveDate: z27.string().optional().describe("Proposed effective date for quotes (MM/DD/YYYY)")
|
|
11168
11379
|
});
|
|
11169
11380
|
function buildCarrierInfoPrompt() {
|
|
11170
11381
|
return `You are an expert insurance document analyst. Extract carrier and policy identification information from this document.
|
|
@@ -11187,21 +11398,21 @@ Return JSON only.`;
|
|
|
11187
11398
|
}
|
|
11188
11399
|
|
|
11189
11400
|
// src/prompts/extractors/named-insured.ts
|
|
11190
|
-
import { z as
|
|
11191
|
-
var AdditionalNamedInsuredSchema =
|
|
11192
|
-
name:
|
|
11193
|
-
relationship:
|
|
11401
|
+
import { z as z28 } from "zod";
|
|
11402
|
+
var AdditionalNamedInsuredSchema = z28.object({
|
|
11403
|
+
name: z28.string(),
|
|
11404
|
+
relationship: z28.string().optional().describe("e.g. subsidiary, affiliate"),
|
|
11194
11405
|
address: SourceBackedAddressSchema.optional()
|
|
11195
11406
|
}).merge(SourceProvenanceSchema);
|
|
11196
|
-
var ScheduledPartySchema =
|
|
11197
|
-
name:
|
|
11407
|
+
var ScheduledPartySchema = z28.object({
|
|
11408
|
+
name: z28.string(),
|
|
11198
11409
|
address: SourceBackedAddressSchema.optional()
|
|
11199
11410
|
}).merge(SourceProvenanceSchema);
|
|
11200
|
-
var NamedInsuredSchema2 =
|
|
11201
|
-
insuredName:
|
|
11202
|
-
insuredDba:
|
|
11411
|
+
var NamedInsuredSchema2 = z28.object({
|
|
11412
|
+
insuredName: z28.string().describe("Name of primary named insured"),
|
|
11413
|
+
insuredDba: z28.string().optional().describe("Doing-business-as name"),
|
|
11203
11414
|
insuredAddress: SourceBackedAddressSchema.optional().describe("Primary insured mailing address"),
|
|
11204
|
-
insuredEntityType:
|
|
11415
|
+
insuredEntityType: z28.enum([
|
|
11205
11416
|
"corporation",
|
|
11206
11417
|
"llc",
|
|
11207
11418
|
"partnership",
|
|
@@ -11214,12 +11425,12 @@ var NamedInsuredSchema2 = z27.object({
|
|
|
11214
11425
|
"married_couple",
|
|
11215
11426
|
"other"
|
|
11216
11427
|
]).optional().describe("Legal entity type of the insured"),
|
|
11217
|
-
insuredFein:
|
|
11218
|
-
insuredSicCode:
|
|
11219
|
-
insuredNaicsCode:
|
|
11220
|
-
additionalNamedInsureds:
|
|
11221
|
-
lossPayees:
|
|
11222
|
-
mortgageHolders:
|
|
11428
|
+
insuredFein: z28.string().optional().describe("Federal Employer Identification Number"),
|
|
11429
|
+
insuredSicCode: z28.string().optional().describe("SIC code"),
|
|
11430
|
+
insuredNaicsCode: z28.string().optional().describe("NAICS code"),
|
|
11431
|
+
additionalNamedInsureds: z28.array(AdditionalNamedInsuredSchema).optional().describe("Additional named insureds listed on the policy"),
|
|
11432
|
+
lossPayees: z28.array(ScheduledPartySchema).optional().describe("Loss payees listed on the policy"),
|
|
11433
|
+
mortgageHolders: z28.array(ScheduledPartySchema).optional().describe("Mortgage holders / lienholders listed on the policy")
|
|
11223
11434
|
});
|
|
11224
11435
|
function buildNamedInsuredPrompt() {
|
|
11225
11436
|
return `You are an expert insurance document analyst. Extract all named insured information from this document.
|
|
@@ -11246,14 +11457,14 @@ Return JSON only.`;
|
|
|
11246
11457
|
}
|
|
11247
11458
|
|
|
11248
11459
|
// src/prompts/extractors/coverage-limits.ts
|
|
11249
|
-
import { z as
|
|
11460
|
+
import { z as z29 } from "zod";
|
|
11250
11461
|
var ExtractorCoverageSchema = CoverageSchema.extend({
|
|
11251
|
-
coverageCode:
|
|
11462
|
+
coverageCode: z29.string().optional().describe("Coverage code or class code")
|
|
11252
11463
|
});
|
|
11253
|
-
var CoverageLimitsSchema =
|
|
11254
|
-
coverages:
|
|
11255
|
-
coverageForm:
|
|
11256
|
-
retroactiveDate:
|
|
11464
|
+
var CoverageLimitsSchema = z29.object({
|
|
11465
|
+
coverages: z29.array(ExtractorCoverageSchema).describe("All coverages with their limits"),
|
|
11466
|
+
coverageForm: z29.enum(["occurrence", "claims_made", "accident"]).optional().describe("Primary coverage trigger type"),
|
|
11467
|
+
retroactiveDate: z29.string().optional().describe("Retroactive date for claims-made policies (MM/DD/YYYY)")
|
|
11257
11468
|
});
|
|
11258
11469
|
function buildCoverageLimitsPrompt() {
|
|
11259
11470
|
return `You are an expert insurance document analyst. Extract all coverage limits and deductibles from this document.
|
|
@@ -11295,14 +11506,14 @@ Return JSON only.`;
|
|
|
11295
11506
|
}
|
|
11296
11507
|
|
|
11297
11508
|
// src/prompts/extractors/endorsements.ts
|
|
11298
|
-
import { z as
|
|
11299
|
-
var EndorsementsSchema =
|
|
11300
|
-
endorsements:
|
|
11301
|
-
|
|
11302
|
-
formNumber:
|
|
11303
|
-
editionDate:
|
|
11304
|
-
title:
|
|
11305
|
-
endorsementType:
|
|
11509
|
+
import { z as z30 } from "zod";
|
|
11510
|
+
var EndorsementsSchema = z30.object({
|
|
11511
|
+
endorsements: z30.array(
|
|
11512
|
+
z30.object({
|
|
11513
|
+
formNumber: z30.string().describe("Form number, e.g. 'CG 21 47'"),
|
|
11514
|
+
editionDate: z30.string().optional().describe("Edition date, e.g. '12 07'"),
|
|
11515
|
+
title: z30.string().describe("Endorsement title"),
|
|
11516
|
+
endorsementType: z30.enum([
|
|
11306
11517
|
"additional_insured",
|
|
11307
11518
|
"waiver_of_subrogation",
|
|
11308
11519
|
"primary_noncontributory",
|
|
@@ -11322,12 +11533,12 @@ var EndorsementsSchema = z29.object({
|
|
|
11322
11533
|
"territorial_extension",
|
|
11323
11534
|
"other"
|
|
11324
11535
|
]).describe("Endorsement type classification"),
|
|
11325
|
-
effectiveDate:
|
|
11326
|
-
affectedCoverageParts:
|
|
11327
|
-
namedParties:
|
|
11328
|
-
|
|
11329
|
-
name:
|
|
11330
|
-
role:
|
|
11536
|
+
effectiveDate: z30.string().optional().describe("Endorsement effective date"),
|
|
11537
|
+
affectedCoverageParts: z30.array(z30.string()).optional().describe("Coverage parts affected by this endorsement"),
|
|
11538
|
+
namedParties: z30.array(
|
|
11539
|
+
z30.object({
|
|
11540
|
+
name: z30.string().describe("Party name"),
|
|
11541
|
+
role: z30.enum([
|
|
11331
11542
|
"additional_insured",
|
|
11332
11543
|
"loss_payee",
|
|
11333
11544
|
"mortgage_holder",
|
|
@@ -11336,18 +11547,18 @@ var EndorsementsSchema = z29.object({
|
|
|
11336
11547
|
"designated_person",
|
|
11337
11548
|
"other"
|
|
11338
11549
|
]).describe("Party role"),
|
|
11339
|
-
relationship:
|
|
11340
|
-
scope:
|
|
11550
|
+
relationship: z30.string().optional().describe("Relationship to insured"),
|
|
11551
|
+
scope: z30.string().optional().describe("Scope of coverage for this party")
|
|
11341
11552
|
})
|
|
11342
11553
|
).optional().describe("Named parties (additional insureds, loss payees, etc.)"),
|
|
11343
|
-
keyTerms:
|
|
11344
|
-
premiumImpact:
|
|
11345
|
-
excerpt:
|
|
11346
|
-
content:
|
|
11347
|
-
pageStart:
|
|
11348
|
-
pageEnd:
|
|
11349
|
-
sourceSpanIds:
|
|
11350
|
-
sourceTextHash:
|
|
11554
|
+
keyTerms: z30.array(z30.string()).optional().describe("Key terms or notable provisions in the endorsement"),
|
|
11555
|
+
premiumImpact: z30.string().optional().describe("Additional premium or credit"),
|
|
11556
|
+
excerpt: z30.string().optional().describe("Short source excerpt, not full verbatim text"),
|
|
11557
|
+
content: z30.string().optional().describe("Legacy fallback only; do not return full text when sourceSpanIds are available"),
|
|
11558
|
+
pageStart: z30.number().describe("Starting page number of this endorsement"),
|
|
11559
|
+
pageEnd: z30.number().optional().describe("Ending page number of this endorsement"),
|
|
11560
|
+
sourceSpanIds: z30.array(z30.string()).optional().describe("Source span IDs grounding this endorsement"),
|
|
11561
|
+
sourceTextHash: z30.string().optional().describe("Hash of the source text when available")
|
|
11351
11562
|
})
|
|
11352
11563
|
).describe("All endorsements found in the document")
|
|
11353
11564
|
});
|
|
@@ -11385,20 +11596,20 @@ Return JSON only.`;
|
|
|
11385
11596
|
}
|
|
11386
11597
|
|
|
11387
11598
|
// src/prompts/extractors/exclusions.ts
|
|
11388
|
-
import { z as
|
|
11389
|
-
var ExclusionsSchema =
|
|
11390
|
-
exclusions:
|
|
11391
|
-
|
|
11392
|
-
name:
|
|
11393
|
-
formNumber:
|
|
11394
|
-
excludedPerils:
|
|
11395
|
-
isAbsolute:
|
|
11396
|
-
exceptions:
|
|
11397
|
-
buybackAvailable:
|
|
11398
|
-
buybackEndorsement:
|
|
11399
|
-
appliesTo:
|
|
11400
|
-
content:
|
|
11401
|
-
pageNumber:
|
|
11599
|
+
import { z as z31 } from "zod";
|
|
11600
|
+
var ExclusionsSchema = z31.object({
|
|
11601
|
+
exclusions: z31.array(
|
|
11602
|
+
z31.object({
|
|
11603
|
+
name: z31.string().describe("Exclusion title or short description"),
|
|
11604
|
+
formNumber: z31.string().optional().describe("Form number if part of a named endorsement"),
|
|
11605
|
+
excludedPerils: z31.array(z31.string()).optional().describe("Specific perils excluded"),
|
|
11606
|
+
isAbsolute: z31.boolean().optional().describe("Whether the exclusion is absolute (no exceptions)"),
|
|
11607
|
+
exceptions: z31.array(z31.string()).optional().describe("Exceptions to the exclusion, if any"),
|
|
11608
|
+
buybackAvailable: z31.boolean().optional().describe("Whether coverage can be bought back via endorsement"),
|
|
11609
|
+
buybackEndorsement: z31.string().optional().describe("Form number of the buyback endorsement if available"),
|
|
11610
|
+
appliesTo: z31.array(z31.string()).optional().describe("Policy types this exclusion applies to"),
|
|
11611
|
+
content: z31.string().describe("Full verbatim exclusion text"),
|
|
11612
|
+
pageNumber: z31.number().optional().describe("Page number where exclusion appears")
|
|
11402
11613
|
})
|
|
11403
11614
|
).describe("All exclusions found in the document")
|
|
11404
11615
|
});
|
|
@@ -11413,7 +11624,7 @@ For EACH exclusion, extract:
|
|
|
11413
11624
|
- exceptions: any exceptions to the exclusion (things still covered despite the exclusion)
|
|
11414
11625
|
- buybackAvailable: whether coverage can be purchased back via endorsement
|
|
11415
11626
|
- buybackEndorsement: the form number of the buyback endorsement if known
|
|
11416
|
-
- appliesTo: which
|
|
11627
|
+
- appliesTo: which lines of business or coverages this exclusion applies to (as an array)
|
|
11417
11628
|
- content: full verbatim exclusion text \u2014 REQUIRED
|
|
11418
11629
|
- pageNumber: page number where the exclusion appears
|
|
11419
11630
|
|
|
@@ -11434,12 +11645,12 @@ Return JSON only.`;
|
|
|
11434
11645
|
}
|
|
11435
11646
|
|
|
11436
11647
|
// src/prompts/extractors/conditions.ts
|
|
11437
|
-
import { z as
|
|
11438
|
-
var ConditionsSchema =
|
|
11439
|
-
conditions:
|
|
11440
|
-
|
|
11441
|
-
name:
|
|
11442
|
-
conditionType:
|
|
11648
|
+
import { z as z32 } from "zod";
|
|
11649
|
+
var ConditionsSchema = z32.object({
|
|
11650
|
+
conditions: z32.array(
|
|
11651
|
+
z32.object({
|
|
11652
|
+
name: z32.string().describe("Condition title"),
|
|
11653
|
+
conditionType: z32.enum([
|
|
11443
11654
|
"duties_after_loss",
|
|
11444
11655
|
"notice_requirements",
|
|
11445
11656
|
"other_insurance",
|
|
@@ -11458,14 +11669,14 @@ var ConditionsSchema = z31.object({
|
|
|
11458
11669
|
"separation_of_insureds",
|
|
11459
11670
|
"other"
|
|
11460
11671
|
]).describe("Condition category"),
|
|
11461
|
-
content:
|
|
11462
|
-
keyValues:
|
|
11463
|
-
|
|
11464
|
-
key:
|
|
11465
|
-
value:
|
|
11672
|
+
content: z32.string().describe("Full verbatim condition text"),
|
|
11673
|
+
keyValues: z32.array(
|
|
11674
|
+
z32.object({
|
|
11675
|
+
key: z32.string().describe("Key name (e.g. 'noticePeriod', 'suitDeadline')"),
|
|
11676
|
+
value: z32.string().describe("Value (e.g. '30 days', '2 years')")
|
|
11466
11677
|
})
|
|
11467
11678
|
).optional().describe("Key values extracted from the condition (notice periods, deadlines, etc.)"),
|
|
11468
|
-
pageNumber:
|
|
11679
|
+
pageNumber: z32.number().optional().describe("Page number where condition appears")
|
|
11469
11680
|
})
|
|
11470
11681
|
).describe("All policy conditions found in the document")
|
|
11471
11682
|
});
|
|
@@ -11503,34 +11714,34 @@ Return JSON only.`;
|
|
|
11503
11714
|
}
|
|
11504
11715
|
|
|
11505
11716
|
// src/prompts/extractors/premium-breakdown.ts
|
|
11506
|
-
import { z as
|
|
11507
|
-
var PremiumBreakdownSchema =
|
|
11508
|
-
premium:
|
|
11509
|
-
premiumAmount:
|
|
11510
|
-
totalCost:
|
|
11511
|
-
totalCostAmount:
|
|
11512
|
-
premiumBreakdown:
|
|
11513
|
-
|
|
11514
|
-
line:
|
|
11515
|
-
amount:
|
|
11516
|
-
amountValue:
|
|
11717
|
+
import { z as z33 } from "zod";
|
|
11718
|
+
var PremiumBreakdownSchema = z33.object({
|
|
11719
|
+
premium: z33.string().optional().describe("Total premium amount, e.g. '$5,000'"),
|
|
11720
|
+
premiumAmount: z33.number().optional().describe("Total premium as a plain number with no currency symbols or commas"),
|
|
11721
|
+
totalCost: z33.string().optional().describe("Total cost including taxes and fees, e.g. '$5,250'"),
|
|
11722
|
+
totalCostAmount: z33.number().optional().describe("Total cost as a plain number with no currency symbols or commas"),
|
|
11723
|
+
premiumBreakdown: z33.array(
|
|
11724
|
+
z33.object({
|
|
11725
|
+
line: z33.string().describe("Coverage line name"),
|
|
11726
|
+
amount: z33.string().describe("Premium amount for this line"),
|
|
11727
|
+
amountValue: z33.number().optional().describe("Premium amount as a plain number with no currency symbols or commas")
|
|
11517
11728
|
})
|
|
11518
11729
|
).optional().describe("Per-coverage-line premium breakdown"),
|
|
11519
|
-
taxesAndFees:
|
|
11520
|
-
|
|
11521
|
-
name:
|
|
11522
|
-
amount:
|
|
11523
|
-
amountValue:
|
|
11524
|
-
type:
|
|
11730
|
+
taxesAndFees: z33.array(
|
|
11731
|
+
z33.object({
|
|
11732
|
+
name: z33.string().describe("Fee or tax name"),
|
|
11733
|
+
amount: z33.string().describe("Dollar amount"),
|
|
11734
|
+
amountValue: z33.number().optional().describe("Fee or tax amount as a plain number with no currency symbols or commas"),
|
|
11735
|
+
type: z33.enum(["tax", "fee", "surcharge", "assessment"]).optional().describe("Fee category")
|
|
11525
11736
|
})
|
|
11526
11737
|
).optional().describe("Taxes, fees, surcharges, and assessments"),
|
|
11527
|
-
minimumPremium:
|
|
11528
|
-
minimumPremiumAmount:
|
|
11529
|
-
depositPremium:
|
|
11530
|
-
depositPremiumAmount:
|
|
11531
|
-
paymentPlan:
|
|
11532
|
-
auditType:
|
|
11533
|
-
ratingBasis:
|
|
11738
|
+
minimumPremium: z33.string().optional().describe("Minimum premium if stated"),
|
|
11739
|
+
minimumPremiumAmount: z33.number().optional().describe("Minimum premium as a plain number when the source states a fixed amount"),
|
|
11740
|
+
depositPremium: z33.string().optional().describe("Deposit premium if stated"),
|
|
11741
|
+
depositPremiumAmount: z33.number().optional().describe("Deposit premium as a plain number when the source states a fixed amount"),
|
|
11742
|
+
paymentPlan: z33.string().optional().describe("Payment plan description"),
|
|
11743
|
+
auditType: z33.enum(["annual", "semi_annual", "quarterly", "monthly", "final", "self"]).optional().describe("Premium audit type"),
|
|
11744
|
+
ratingBasis: z33.string().optional().describe("Rating basis, e.g. payroll, revenue, area, units")
|
|
11534
11745
|
});
|
|
11535
11746
|
function buildPremiumBreakdownPrompt() {
|
|
11536
11747
|
return `You are an expert insurance document analyst. Extract all premium and cost information from this document.
|
|
@@ -11552,14 +11763,14 @@ Return JSON only.`;
|
|
|
11552
11763
|
}
|
|
11553
11764
|
|
|
11554
11765
|
// src/prompts/extractors/declarations.ts
|
|
11555
|
-
import { z as
|
|
11556
|
-
var DeclarationsFieldSchema =
|
|
11557
|
-
field:
|
|
11558
|
-
value:
|
|
11559
|
-
section:
|
|
11766
|
+
import { z as z34 } from "zod";
|
|
11767
|
+
var DeclarationsFieldSchema = z34.object({
|
|
11768
|
+
field: z34.string().describe("Descriptive field name (e.g. 'policyNumber', 'effectiveDate', 'coverageALimit')"),
|
|
11769
|
+
value: z34.string().describe("Extracted value exactly as it appears in the document"),
|
|
11770
|
+
section: z34.string().optional().describe("Section or grouping this field belongs to (e.g. 'Coverage Limits', 'Vehicle Schedule')")
|
|
11560
11771
|
});
|
|
11561
|
-
var DeclarationsExtractSchema =
|
|
11562
|
-
fields:
|
|
11772
|
+
var DeclarationsExtractSchema = z34.object({
|
|
11773
|
+
fields: z34.array(DeclarationsFieldSchema).describe("All declarations page fields extracted as key-value pairs. Structure varies by line of business.")
|
|
11563
11774
|
});
|
|
11564
11775
|
function buildDeclarationsPrompt() {
|
|
11565
11776
|
return `You are an expert insurance document analyst. Extract all declarations page data from this document into a flexible key-value structure.
|
|
@@ -11599,21 +11810,21 @@ Preserve original values exactly as they appear. Return JSON only.`;
|
|
|
11599
11810
|
}
|
|
11600
11811
|
|
|
11601
11812
|
// src/prompts/extractors/loss-history.ts
|
|
11602
|
-
import { z as
|
|
11603
|
-
var LossHistorySchema =
|
|
11604
|
-
lossSummary:
|
|
11605
|
-
individualClaims:
|
|
11606
|
-
|
|
11607
|
-
date:
|
|
11608
|
-
type:
|
|
11609
|
-
description:
|
|
11610
|
-
amountPaid:
|
|
11611
|
-
amountReserved:
|
|
11612
|
-
status:
|
|
11613
|
-
claimNumber:
|
|
11813
|
+
import { z as z35 } from "zod";
|
|
11814
|
+
var LossHistorySchema = z35.object({
|
|
11815
|
+
lossSummary: z35.string().optional().describe("Summary of loss history, e.g. '3 claims in past 5 years totaling $125,000'"),
|
|
11816
|
+
individualClaims: z35.array(
|
|
11817
|
+
z35.object({
|
|
11818
|
+
date: z35.string().optional().describe("Date of loss or claim"),
|
|
11819
|
+
type: z35.string().optional().describe("Type of claim, e.g. 'property damage', 'bodily injury'"),
|
|
11820
|
+
description: z35.string().optional().describe("Brief description of the claim"),
|
|
11821
|
+
amountPaid: z35.string().optional().describe("Amount paid"),
|
|
11822
|
+
amountReserved: z35.string().optional().describe("Amount reserved"),
|
|
11823
|
+
status: z35.enum(["open", "closed", "reopened"]).optional().describe("Claim status"),
|
|
11824
|
+
claimNumber: z35.string().optional().describe("Claim reference number")
|
|
11614
11825
|
})
|
|
11615
11826
|
).optional().describe("Individual claim records"),
|
|
11616
|
-
experienceMod:
|
|
11827
|
+
experienceMod: z35.string().optional().describe("Experience modification factor for workers comp, e.g. '0.85'")
|
|
11617
11828
|
});
|
|
11618
11829
|
function buildLossHistoryPrompt() {
|
|
11619
11830
|
return `You are an expert insurance document analyst. Extract all loss history and claims information from this document.
|
|
@@ -11630,21 +11841,21 @@ Return JSON only.`;
|
|
|
11630
11841
|
}
|
|
11631
11842
|
|
|
11632
11843
|
// src/prompts/extractors/sections.ts
|
|
11633
|
-
import { z as
|
|
11634
|
-
var SubsectionSchema2 =
|
|
11635
|
-
title:
|
|
11636
|
-
sectionNumber:
|
|
11637
|
-
pageNumber:
|
|
11638
|
-
excerpt:
|
|
11639
|
-
content:
|
|
11640
|
-
sourceSpanIds:
|
|
11641
|
-
sourceTextHash:
|
|
11642
|
-
});
|
|
11643
|
-
var SectionsSchema =
|
|
11644
|
-
sections:
|
|
11645
|
-
|
|
11646
|
-
title:
|
|
11647
|
-
type:
|
|
11844
|
+
import { z as z36 } from "zod";
|
|
11845
|
+
var SubsectionSchema2 = z36.object({
|
|
11846
|
+
title: z36.string().describe("Subsection title"),
|
|
11847
|
+
sectionNumber: z36.string().optional().describe("Subsection number"),
|
|
11848
|
+
pageNumber: z36.number().optional().describe("Page number"),
|
|
11849
|
+
excerpt: z36.string().optional().describe("Short source excerpt, not full verbatim text"),
|
|
11850
|
+
content: z36.string().optional().describe("Legacy fallback only; do not return full text when sourceSpanIds are available"),
|
|
11851
|
+
sourceSpanIds: z36.array(z36.string()).optional().describe("Source span IDs grounding this subsection"),
|
|
11852
|
+
sourceTextHash: z36.string().optional().describe("Hash of the source text when available")
|
|
11853
|
+
});
|
|
11854
|
+
var SectionsSchema = z36.object({
|
|
11855
|
+
sections: z36.array(
|
|
11856
|
+
z36.object({
|
|
11857
|
+
title: z36.string().describe("Section title"),
|
|
11858
|
+
type: z36.enum([
|
|
11648
11859
|
"declarations",
|
|
11649
11860
|
"insuring_agreement",
|
|
11650
11861
|
"policy_form",
|
|
@@ -11659,13 +11870,13 @@ var SectionsSchema = z35.object({
|
|
|
11659
11870
|
"regulatory",
|
|
11660
11871
|
"other"
|
|
11661
11872
|
]).describe("Section type classification"),
|
|
11662
|
-
excerpt:
|
|
11663
|
-
content:
|
|
11664
|
-
pageStart:
|
|
11665
|
-
pageEnd:
|
|
11666
|
-
sourceSpanIds:
|
|
11667
|
-
sourceTextHash:
|
|
11668
|
-
subsections:
|
|
11873
|
+
excerpt: z36.string().optional().describe("Short source excerpt, not full verbatim text"),
|
|
11874
|
+
content: z36.string().optional().describe("Legacy fallback only; do not return full text when sourceSpanIds are available"),
|
|
11875
|
+
pageStart: z36.number().describe("Starting page number"),
|
|
11876
|
+
pageEnd: z36.number().optional().describe("Ending page number"),
|
|
11877
|
+
sourceSpanIds: z36.array(z36.string()).optional().describe("Source span IDs grounding this section"),
|
|
11878
|
+
sourceTextHash: z36.string().optional().describe("Hash of the source text when available"),
|
|
11879
|
+
subsections: z36.array(SubsectionSchema2).optional().describe("Subsections within this section")
|
|
11669
11880
|
})
|
|
11670
11881
|
).describe("All document sections")
|
|
11671
11882
|
});
|
|
@@ -11699,20 +11910,20 @@ Return JSON only.`;
|
|
|
11699
11910
|
}
|
|
11700
11911
|
|
|
11701
11912
|
// src/prompts/extractors/supplementary.ts
|
|
11702
|
-
import { z as
|
|
11703
|
-
var AuxiliaryFactSchema2 =
|
|
11704
|
-
key:
|
|
11705
|
-
value:
|
|
11706
|
-
subject:
|
|
11707
|
-
context:
|
|
11708
|
-
});
|
|
11709
|
-
var SupplementarySchema =
|
|
11710
|
-
regulatoryContacts:
|
|
11711
|
-
claimsContacts:
|
|
11712
|
-
thirdPartyAdministrators:
|
|
11713
|
-
cancellationNoticeDays:
|
|
11714
|
-
nonrenewalNoticeDays:
|
|
11715
|
-
auxiliaryFacts:
|
|
11913
|
+
import { z as z37 } from "zod";
|
|
11914
|
+
var AuxiliaryFactSchema2 = z37.object({
|
|
11915
|
+
key: z37.string().describe("Normalized machine-readable fact key, e.g. 'policyholder_age' or 'insured_name'"),
|
|
11916
|
+
value: z37.string().describe("Concrete extracted fact value"),
|
|
11917
|
+
subject: z37.string().optional().describe("Person, entity, vehicle, property, or schedule item this fact belongs to"),
|
|
11918
|
+
context: z37.string().optional().describe("Short disambiguating context, such as 'Driver Schedule' or 'Named Insured'")
|
|
11919
|
+
});
|
|
11920
|
+
var SupplementarySchema = z37.object({
|
|
11921
|
+
regulatoryContacts: z37.array(ContactSchema).optional().describe("Regulatory body contacts (state department of insurance, ombudsman)"),
|
|
11922
|
+
claimsContacts: z37.array(ContactSchema).optional().describe("Claims reporting contacts and instructions"),
|
|
11923
|
+
thirdPartyAdministrators: z37.array(ContactSchema).optional().describe("Third-party administrators for claims handling"),
|
|
11924
|
+
cancellationNoticeDays: z37.number().optional().describe("Required notice period for cancellation in days"),
|
|
11925
|
+
nonrenewalNoticeDays: z37.number().optional().describe("Required notice period for nonrenewal in days"),
|
|
11926
|
+
auxiliaryFacts: z37.array(AuxiliaryFactSchema2).optional().describe("Additional retrieval-only facts that do not fit the strict primary schema")
|
|
11716
11927
|
});
|
|
11717
11928
|
function buildSupplementaryPrompt(alreadyExtractedSummary) {
|
|
11718
11929
|
const exclusionBlock = alreadyExtractedSummary ? `
|
|
@@ -11752,17 +11963,17 @@ Return JSON only.`;
|
|
|
11752
11963
|
}
|
|
11753
11964
|
|
|
11754
11965
|
// src/prompts/extractors/definitions.ts
|
|
11755
|
-
import { z as
|
|
11756
|
-
var DefinitionsSchema =
|
|
11757
|
-
definitions:
|
|
11758
|
-
|
|
11759
|
-
term:
|
|
11760
|
-
definition:
|
|
11761
|
-
pageNumber:
|
|
11762
|
-
formNumber:
|
|
11763
|
-
formTitle:
|
|
11764
|
-
sectionRef:
|
|
11765
|
-
originalContent:
|
|
11966
|
+
import { z as z38 } from "zod";
|
|
11967
|
+
var DefinitionsSchema = z38.object({
|
|
11968
|
+
definitions: z38.array(
|
|
11969
|
+
z38.object({
|
|
11970
|
+
term: z38.string().describe("Defined term exactly as shown in the document"),
|
|
11971
|
+
definition: z38.string().describe("Full verbatim definition text, preserving original wording"),
|
|
11972
|
+
pageNumber: z38.number().optional().describe("Original document page number"),
|
|
11973
|
+
formNumber: z38.string().optional().describe("Form number where this definition appears"),
|
|
11974
|
+
formTitle: z38.string().optional().describe("Form title where this definition appears"),
|
|
11975
|
+
sectionRef: z38.string().optional().describe("Definition section heading or subsection reference"),
|
|
11976
|
+
originalContent: z38.string().optional().describe("Short verbatim source snippet containing the term and definition")
|
|
11766
11977
|
})
|
|
11767
11978
|
).describe("All substantive insurance definitions found in the document")
|
|
11768
11979
|
});
|
|
@@ -11796,22 +12007,22 @@ Return JSON only.`;
|
|
|
11796
12007
|
}
|
|
11797
12008
|
|
|
11798
12009
|
// src/prompts/extractors/covered-reasons.ts
|
|
11799
|
-
import { z as
|
|
11800
|
-
var CoveredReasonsSchema =
|
|
11801
|
-
coveredReasons:
|
|
11802
|
-
|
|
11803
|
-
coverageName:
|
|
11804
|
-
reasonNumber:
|
|
11805
|
-
title:
|
|
11806
|
-
content:
|
|
11807
|
-
conditions:
|
|
11808
|
-
exceptions:
|
|
11809
|
-
appliesTo:
|
|
11810
|
-
pageNumber:
|
|
11811
|
-
formNumber:
|
|
11812
|
-
formTitle:
|
|
11813
|
-
sectionRef:
|
|
11814
|
-
originalContent:
|
|
12010
|
+
import { z as z39 } from "zod";
|
|
12011
|
+
var CoveredReasonsSchema = z39.object({
|
|
12012
|
+
coveredReasons: z39.array(
|
|
12013
|
+
z39.object({
|
|
12014
|
+
coverageName: z39.string().describe("Coverage, coverage part, or form this covered reason belongs to"),
|
|
12015
|
+
reasonNumber: z39.string().optional().describe("Source number or letter for the covered reason, if shown"),
|
|
12016
|
+
title: z39.string().optional().describe("Covered reason title, peril, cause of loss, trigger, or short name"),
|
|
12017
|
+
content: z39.string().describe("Full verbatim covered-reason or insuring-agreement text"),
|
|
12018
|
+
conditions: z39.array(z39.string()).optional().describe("Conditions, timing rules, documentation requirements, or prerequisites attached to this covered reason"),
|
|
12019
|
+
exceptions: z39.array(z39.string()).optional().describe("Exceptions or limitations attached to this covered reason"),
|
|
12020
|
+
appliesTo: z39.array(z39.string()).optional().describe("Covered property, persons, autos, locations, operations, or coverage parts this reason applies to"),
|
|
12021
|
+
pageNumber: z39.number().optional().describe("Original document page number"),
|
|
12022
|
+
formNumber: z39.string().optional().describe("Form number where this covered reason appears"),
|
|
12023
|
+
formTitle: z39.string().optional().describe("Form title where this covered reason appears"),
|
|
12024
|
+
sectionRef: z39.string().optional().describe("Section heading where this covered reason appears"),
|
|
12025
|
+
originalContent: z39.string().optional().describe("Short verbatim source snippet used for this covered reason")
|
|
11815
12026
|
})
|
|
11816
12027
|
).describe("Covered causes, perils, triggers, or reasons that affirmatively grant coverage")
|
|
11817
12028
|
});
|
|
@@ -12654,10 +12865,13 @@ function getTemplate(policyType) {
|
|
|
12654
12865
|
return TEMPLATE_MAP[policyType] ?? DEFAULT_TEMPLATE;
|
|
12655
12866
|
}
|
|
12656
12867
|
export {
|
|
12868
|
+
ACORD_LOB_CODES,
|
|
12869
|
+
ACORD_LOB_LABELS,
|
|
12657
12870
|
ADMITTED_STATUSES,
|
|
12658
12871
|
AGENT_TOOLS,
|
|
12659
12872
|
APPLICATION_CLASSIFY_PROMPT,
|
|
12660
12873
|
AUDIT_TYPES,
|
|
12874
|
+
AcordLobCodeSchema,
|
|
12661
12875
|
AcroFormMappingSchema,
|
|
12662
12876
|
AddressSchema,
|
|
12663
12877
|
AdmittedStatusSchema,
|
|
@@ -12750,6 +12964,7 @@ export {
|
|
|
12750
12964
|
ENDORSEMENT_PARTY_ROLES,
|
|
12751
12965
|
ENDORSEMENT_TYPES,
|
|
12752
12966
|
ENTITY_TYPES,
|
|
12967
|
+
EXCLUDED_ACORD_LOB_CODES,
|
|
12753
12968
|
EarthquakeDeclarationsSchema,
|
|
12754
12969
|
EmployersLiabilityLimitsSchema,
|
|
12755
12970
|
EndorsementPartyRoleSchema,
|
|
@@ -12783,6 +12998,7 @@ export {
|
|
|
12783
12998
|
InsuredLocationSchema,
|
|
12784
12999
|
InsuredVehicleSchema,
|
|
12785
13000
|
InsurerInfoSchema,
|
|
13001
|
+
LEGACY_POLICY_TYPE_TO_LOB,
|
|
12786
13002
|
LIMIT_TYPES,
|
|
12787
13003
|
LOSS_SETTLEMENTS,
|
|
12788
13004
|
LimitScheduleSchema,
|
|
@@ -12801,12 +13017,11 @@ export {
|
|
|
12801
13017
|
OperationalEndorsementSupportSchema,
|
|
12802
13018
|
OperationalPartySchema,
|
|
12803
13019
|
PERSONAL_AUTO_USAGES,
|
|
13020
|
+
PERSONAL_LOB_CODES,
|
|
12804
13021
|
PET_SPECIES,
|
|
12805
13022
|
PLATFORM_CONFIGS,
|
|
12806
13023
|
POLICY_SECTION_TYPES,
|
|
12807
13024
|
POLICY_TERM_TYPES,
|
|
12808
|
-
POLICY_TYPES,
|
|
12809
|
-
POLICY_TYPES_FROM_COVERAGES_WARNING,
|
|
12810
13025
|
ParsedAnswerSchema,
|
|
12811
13026
|
PaymentInstallmentSchema,
|
|
12812
13027
|
PaymentPlanSchema,
|
|
@@ -12833,7 +13048,6 @@ export {
|
|
|
12833
13048
|
PolicyOperationalProfileSchema,
|
|
12834
13049
|
PolicySectionTypeSchema,
|
|
12835
13050
|
PolicyTermTypeSchema,
|
|
12836
|
-
PolicyTypeSchema,
|
|
12837
13051
|
PremiumLineSchema,
|
|
12838
13052
|
ProducerInfoSchema,
|
|
12839
13053
|
ProfessionalLiabilityDeclarationsSchema,
|
|
@@ -12962,16 +13176,19 @@ export {
|
|
|
12962
13176
|
getNextApplicationQuestions,
|
|
12963
13177
|
getPdfPageCount,
|
|
12964
13178
|
getTemplate,
|
|
12965
|
-
|
|
13179
|
+
inferLinesOfBusinessFromOperationalCoverages,
|
|
12966
13180
|
isDoclingExtractionInput,
|
|
12967
13181
|
isFileReference,
|
|
13182
|
+
isLobCode,
|
|
13183
|
+
isPersonalLob,
|
|
13184
|
+
lobLabel,
|
|
12968
13185
|
mergeQuestionAnswers,
|
|
12969
13186
|
mergeSourceSpans,
|
|
12970
13187
|
normalizeApplicationQuestionGraph,
|
|
12971
13188
|
normalizeDoclingDocument,
|
|
12972
13189
|
normalizeDocumentSourceTreePaths,
|
|
12973
13190
|
normalizeForMatch,
|
|
12974
|
-
|
|
13191
|
+
normalizeOperationalLinesOfBusiness,
|
|
12975
13192
|
normalizeSourceSpans,
|
|
12976
13193
|
orderSourceEvidence,
|
|
12977
13194
|
overlayTextOnPdf,
|
|
@@ -12982,7 +13199,7 @@ export {
|
|
|
12982
13199
|
processReply,
|
|
12983
13200
|
proposeContextWrites,
|
|
12984
13201
|
resolveModelBudget,
|
|
12985
|
-
|
|
13202
|
+
resolveOperationalProfileLinesOfBusiness,
|
|
12986
13203
|
safeGenerateObject,
|
|
12987
13204
|
sanitizeNulls,
|
|
12988
13205
|
scoreCaseProposal,
|
|
@@ -12993,6 +13210,7 @@ export {
|
|
|
12993
13210
|
stablePolicyChangeItemId,
|
|
12994
13211
|
stableStringify,
|
|
12995
13212
|
stripFences,
|
|
13213
|
+
toLobCodes,
|
|
12996
13214
|
toStrictSchema,
|
|
12997
13215
|
validateApplicationPacket,
|
|
12998
13216
|
validateEvidence,
|