@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.js
CHANGED
|
@@ -30,10 +30,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
|
+
ACORD_LOB_CODES: () => ACORD_LOB_CODES,
|
|
34
|
+
ACORD_LOB_LABELS: () => ACORD_LOB_LABELS,
|
|
33
35
|
ADMITTED_STATUSES: () => ADMITTED_STATUSES,
|
|
34
36
|
AGENT_TOOLS: () => AGENT_TOOLS,
|
|
35
37
|
APPLICATION_CLASSIFY_PROMPT: () => APPLICATION_CLASSIFY_PROMPT,
|
|
36
38
|
AUDIT_TYPES: () => AUDIT_TYPES,
|
|
39
|
+
AcordLobCodeSchema: () => AcordLobCodeSchema,
|
|
37
40
|
AcroFormMappingSchema: () => AcroFormMappingSchema,
|
|
38
41
|
AddressSchema: () => AddressSchema,
|
|
39
42
|
AdmittedStatusSchema: () => AdmittedStatusSchema,
|
|
@@ -126,6 +129,7 @@ __export(src_exports, {
|
|
|
126
129
|
ENDORSEMENT_PARTY_ROLES: () => ENDORSEMENT_PARTY_ROLES,
|
|
127
130
|
ENDORSEMENT_TYPES: () => ENDORSEMENT_TYPES,
|
|
128
131
|
ENTITY_TYPES: () => ENTITY_TYPES,
|
|
132
|
+
EXCLUDED_ACORD_LOB_CODES: () => EXCLUDED_ACORD_LOB_CODES,
|
|
129
133
|
EarthquakeDeclarationsSchema: () => EarthquakeDeclarationsSchema,
|
|
130
134
|
EmployersLiabilityLimitsSchema: () => EmployersLiabilityLimitsSchema,
|
|
131
135
|
EndorsementPartyRoleSchema: () => EndorsementPartyRoleSchema,
|
|
@@ -159,6 +163,7 @@ __export(src_exports, {
|
|
|
159
163
|
InsuredLocationSchema: () => InsuredLocationSchema,
|
|
160
164
|
InsuredVehicleSchema: () => InsuredVehicleSchema,
|
|
161
165
|
InsurerInfoSchema: () => InsurerInfoSchema,
|
|
166
|
+
LEGACY_POLICY_TYPE_TO_LOB: () => LEGACY_POLICY_TYPE_TO_LOB,
|
|
162
167
|
LIMIT_TYPES: () => LIMIT_TYPES,
|
|
163
168
|
LOSS_SETTLEMENTS: () => LOSS_SETTLEMENTS,
|
|
164
169
|
LimitScheduleSchema: () => LimitScheduleSchema,
|
|
@@ -177,12 +182,11 @@ __export(src_exports, {
|
|
|
177
182
|
OperationalEndorsementSupportSchema: () => OperationalEndorsementSupportSchema,
|
|
178
183
|
OperationalPartySchema: () => OperationalPartySchema,
|
|
179
184
|
PERSONAL_AUTO_USAGES: () => PERSONAL_AUTO_USAGES,
|
|
185
|
+
PERSONAL_LOB_CODES: () => PERSONAL_LOB_CODES,
|
|
180
186
|
PET_SPECIES: () => PET_SPECIES,
|
|
181
187
|
PLATFORM_CONFIGS: () => PLATFORM_CONFIGS,
|
|
182
188
|
POLICY_SECTION_TYPES: () => POLICY_SECTION_TYPES,
|
|
183
189
|
POLICY_TERM_TYPES: () => POLICY_TERM_TYPES,
|
|
184
|
-
POLICY_TYPES: () => POLICY_TYPES,
|
|
185
|
-
POLICY_TYPES_FROM_COVERAGES_WARNING: () => POLICY_TYPES_FROM_COVERAGES_WARNING,
|
|
186
190
|
ParsedAnswerSchema: () => ParsedAnswerSchema,
|
|
187
191
|
PaymentInstallmentSchema: () => PaymentInstallmentSchema,
|
|
188
192
|
PaymentPlanSchema: () => PaymentPlanSchema,
|
|
@@ -209,7 +213,6 @@ __export(src_exports, {
|
|
|
209
213
|
PolicyOperationalProfileSchema: () => PolicyOperationalProfileSchema,
|
|
210
214
|
PolicySectionTypeSchema: () => PolicySectionTypeSchema,
|
|
211
215
|
PolicyTermTypeSchema: () => PolicyTermTypeSchema,
|
|
212
|
-
PolicyTypeSchema: () => PolicyTypeSchema,
|
|
213
216
|
PremiumLineSchema: () => PremiumLineSchema,
|
|
214
217
|
ProducerInfoSchema: () => ProducerInfoSchema,
|
|
215
218
|
ProfessionalLiabilityDeclarationsSchema: () => ProfessionalLiabilityDeclarationsSchema,
|
|
@@ -338,16 +341,19 @@ __export(src_exports, {
|
|
|
338
341
|
getNextApplicationQuestions: () => getNextApplicationQuestions,
|
|
339
342
|
getPdfPageCount: () => getPdfPageCount,
|
|
340
343
|
getTemplate: () => getTemplate,
|
|
341
|
-
|
|
344
|
+
inferLinesOfBusinessFromOperationalCoverages: () => inferLinesOfBusinessFromOperationalCoverages,
|
|
342
345
|
isDoclingExtractionInput: () => isDoclingExtractionInput,
|
|
343
346
|
isFileReference: () => isFileReference,
|
|
347
|
+
isLobCode: () => isLobCode,
|
|
348
|
+
isPersonalLob: () => isPersonalLob,
|
|
349
|
+
lobLabel: () => lobLabel,
|
|
344
350
|
mergeQuestionAnswers: () => mergeQuestionAnswers,
|
|
345
351
|
mergeSourceSpans: () => mergeSourceSpans,
|
|
346
352
|
normalizeApplicationQuestionGraph: () => normalizeApplicationQuestionGraph,
|
|
347
353
|
normalizeDoclingDocument: () => normalizeDoclingDocument,
|
|
348
354
|
normalizeDocumentSourceTreePaths: () => normalizeDocumentSourceTreePaths,
|
|
349
355
|
normalizeForMatch: () => normalizeForMatch,
|
|
350
|
-
|
|
356
|
+
normalizeOperationalLinesOfBusiness: () => normalizeOperationalLinesOfBusiness,
|
|
351
357
|
normalizeSourceSpans: () => normalizeSourceSpans,
|
|
352
358
|
orderSourceEvidence: () => orderSourceEvidence,
|
|
353
359
|
overlayTextOnPdf: () => overlayTextOnPdf,
|
|
@@ -358,7 +364,7 @@ __export(src_exports, {
|
|
|
358
364
|
processReply: () => processReply,
|
|
359
365
|
proposeContextWrites: () => proposeContextWrites,
|
|
360
366
|
resolveModelBudget: () => resolveModelBudget,
|
|
361
|
-
|
|
367
|
+
resolveOperationalProfileLinesOfBusiness: () => resolveOperationalProfileLinesOfBusiness,
|
|
362
368
|
safeGenerateObject: () => safeGenerateObject,
|
|
363
369
|
sanitizeNulls: () => sanitizeNulls,
|
|
364
370
|
scoreCaseProposal: () => scoreCaseProposal,
|
|
@@ -369,6 +375,7 @@ __export(src_exports, {
|
|
|
369
375
|
stablePolicyChangeItemId: () => stablePolicyChangeItemId,
|
|
370
376
|
stableStringify: () => stableStringify,
|
|
371
377
|
stripFences: () => stripFences,
|
|
378
|
+
toLobCodes: () => toLobCodes,
|
|
372
379
|
toStrictSchema: () => toStrictSchema,
|
|
373
380
|
validateApplicationPacket: () => validateApplicationPacket,
|
|
374
381
|
validateEvidence: () => validateEvidence,
|
|
@@ -674,57 +681,6 @@ function expectedOutputTokensFloor(taskKind, schemaTokens, expectedListLength, h
|
|
|
674
681
|
|
|
675
682
|
// src/schemas/enums.ts
|
|
676
683
|
var import_zod2 = require("zod");
|
|
677
|
-
var PolicyTypeSchema = import_zod2.z.enum([
|
|
678
|
-
// Commercial lines
|
|
679
|
-
"general_liability",
|
|
680
|
-
"commercial_property",
|
|
681
|
-
"commercial_auto",
|
|
682
|
-
"non_owned_auto",
|
|
683
|
-
"workers_comp",
|
|
684
|
-
"umbrella",
|
|
685
|
-
"excess_liability",
|
|
686
|
-
"professional_liability",
|
|
687
|
-
"cyber",
|
|
688
|
-
"epli",
|
|
689
|
-
"directors_officers",
|
|
690
|
-
"fiduciary_liability",
|
|
691
|
-
"crime_fidelity",
|
|
692
|
-
"inland_marine",
|
|
693
|
-
"builders_risk",
|
|
694
|
-
"environmental",
|
|
695
|
-
"ocean_marine",
|
|
696
|
-
"surety",
|
|
697
|
-
"product_liability",
|
|
698
|
-
"bop",
|
|
699
|
-
"management_liability_package",
|
|
700
|
-
"property",
|
|
701
|
-
// Personal lines
|
|
702
|
-
"homeowners_ho3",
|
|
703
|
-
"homeowners_ho5",
|
|
704
|
-
"renters_ho4",
|
|
705
|
-
"condo_ho6",
|
|
706
|
-
"dwelling_fire",
|
|
707
|
-
"mobile_home",
|
|
708
|
-
"personal_auto",
|
|
709
|
-
"personal_umbrella",
|
|
710
|
-
"flood_nfip",
|
|
711
|
-
"flood_private",
|
|
712
|
-
"earthquake",
|
|
713
|
-
"personal_inland_marine",
|
|
714
|
-
"watercraft",
|
|
715
|
-
"recreational_vehicle",
|
|
716
|
-
"farm_ranch",
|
|
717
|
-
"life",
|
|
718
|
-
"critical_illness",
|
|
719
|
-
"disability",
|
|
720
|
-
"long_term_care",
|
|
721
|
-
"pet",
|
|
722
|
-
"travel",
|
|
723
|
-
"identity_theft",
|
|
724
|
-
"title",
|
|
725
|
-
"other"
|
|
726
|
-
]);
|
|
727
|
-
var POLICY_TYPES = PolicyTypeSchema.options;
|
|
728
684
|
var EndorsementTypeSchema = import_zod2.z.enum([
|
|
729
685
|
"additional_insured",
|
|
730
686
|
"waiver_of_subrogation",
|
|
@@ -945,85 +901,419 @@ var TITLE_POLICY_TYPES = TitlePolicyTypeSchema.options;
|
|
|
945
901
|
var PetSpeciesSchema = import_zod2.z.enum(["dog", "cat", "other"]);
|
|
946
902
|
var PET_SPECIES = PetSpeciesSchema.options;
|
|
947
903
|
|
|
948
|
-
// src/schemas/
|
|
904
|
+
// src/schemas/lines-of-business.ts
|
|
949
905
|
var import_zod3 = require("zod");
|
|
950
|
-
var
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
906
|
+
var ACORD_LOB_CODES = [
|
|
907
|
+
"AAPPL",
|
|
908
|
+
"AGLIA",
|
|
909
|
+
"AGPP",
|
|
910
|
+
"AGPR",
|
|
911
|
+
"AIRC",
|
|
912
|
+
"AIRPFB",
|
|
913
|
+
"APKG",
|
|
914
|
+
"APKGE",
|
|
915
|
+
"APROD",
|
|
916
|
+
"ARVP",
|
|
917
|
+
"AUTO",
|
|
918
|
+
"AUTOB",
|
|
919
|
+
"AUTOP",
|
|
920
|
+
"AVPKG",
|
|
921
|
+
"BANDM",
|
|
922
|
+
"BLANK",
|
|
923
|
+
"BMISC",
|
|
924
|
+
"BOAT",
|
|
925
|
+
"BOP",
|
|
926
|
+
"BOPGL",
|
|
927
|
+
"BOPPR",
|
|
928
|
+
"CAVN",
|
|
929
|
+
"CEQFL",
|
|
930
|
+
"CFIRE",
|
|
931
|
+
"CFRM",
|
|
932
|
+
"CGL",
|
|
933
|
+
"COMAR",
|
|
934
|
+
"COMR",
|
|
935
|
+
"CONTR",
|
|
936
|
+
"CPKGE",
|
|
937
|
+
"CPMP",
|
|
938
|
+
"CRIME",
|
|
939
|
+
"DFIRE",
|
|
940
|
+
"DISAB",
|
|
941
|
+
"DO",
|
|
942
|
+
"EDP",
|
|
943
|
+
"EL",
|
|
944
|
+
"EO",
|
|
945
|
+
"EPLI",
|
|
946
|
+
"EQ",
|
|
947
|
+
"EQPFL",
|
|
948
|
+
"EXLIA",
|
|
949
|
+
"FIDTY",
|
|
950
|
+
"FIDUC",
|
|
951
|
+
"FINEA",
|
|
952
|
+
"FLOOD",
|
|
953
|
+
"GARAG",
|
|
954
|
+
"GL",
|
|
955
|
+
"GLASS",
|
|
956
|
+
"HANG",
|
|
957
|
+
"HBB",
|
|
958
|
+
"HOME",
|
|
959
|
+
"INBR",
|
|
960
|
+
"INMAR",
|
|
961
|
+
"INMRC",
|
|
962
|
+
"INMRP",
|
|
963
|
+
"JUDCL",
|
|
964
|
+
"KIDRA",
|
|
965
|
+
"LL",
|
|
966
|
+
"MHOME",
|
|
967
|
+
"MMAL",
|
|
968
|
+
"Motorcycle",
|
|
969
|
+
"MTRTK",
|
|
970
|
+
"OLIB",
|
|
971
|
+
"PHYS",
|
|
972
|
+
"PKG",
|
|
973
|
+
"PL",
|
|
974
|
+
"PLMSC",
|
|
975
|
+
"PPKGE",
|
|
976
|
+
"PROP",
|
|
977
|
+
"PROPC",
|
|
978
|
+
"PUBOF",
|
|
979
|
+
"RECV",
|
|
980
|
+
"SCHPR",
|
|
981
|
+
"SIGNS",
|
|
982
|
+
"SMP",
|
|
983
|
+
"SURE",
|
|
984
|
+
"TRANS",
|
|
985
|
+
"TRUCK",
|
|
986
|
+
"UMBRC",
|
|
987
|
+
"UMBRL",
|
|
988
|
+
"UMBRP",
|
|
989
|
+
"UN",
|
|
990
|
+
"WCMA",
|
|
991
|
+
"WIND",
|
|
992
|
+
"WORK",
|
|
993
|
+
"WORKP",
|
|
994
|
+
"WORKV"
|
|
995
|
+
];
|
|
996
|
+
var AcordLobCodeSchema = import_zod3.z.enum(ACORD_LOB_CODES);
|
|
997
|
+
var ACORD_LOB_LABELS = {
|
|
998
|
+
AAPPL: "Aircraft / Aerial Applicator",
|
|
999
|
+
AGLIA: "Agricultural Liability",
|
|
1000
|
+
AGPP: "Agricultural Personal Property",
|
|
1001
|
+
AGPR: "Agricultural Property",
|
|
1002
|
+
AIRC: "Aircraft",
|
|
1003
|
+
AIRPFB: "Airport / Fixed Base Operator",
|
|
1004
|
+
APKG: "Agricultural Package",
|
|
1005
|
+
APKGE: "Agricultural Package (Extended)",
|
|
1006
|
+
APROD: "Agricultural Products",
|
|
1007
|
+
ARVP: "Recreational Vehicle Package",
|
|
1008
|
+
AUTO: "Automobile",
|
|
1009
|
+
AUTOB: "Business Auto",
|
|
1010
|
+
AUTOP: "Personal Auto",
|
|
1011
|
+
AVPKG: "Aviation Package",
|
|
1012
|
+
BANDM: "Boiler & Machinery",
|
|
1013
|
+
BLANK: "Blanket",
|
|
1014
|
+
BMISC: "Business Miscellaneous",
|
|
1015
|
+
BOAT: "Boat",
|
|
1016
|
+
BOP: "Businessowners Policy",
|
|
1017
|
+
BOPGL: "BOP - General Liability",
|
|
1018
|
+
BOPPR: "BOP - Property",
|
|
1019
|
+
CAVN: "Commercial Aviation",
|
|
1020
|
+
CEQFL: "Contractors Equipment Floater",
|
|
1021
|
+
CFIRE: "Commercial Fire",
|
|
1022
|
+
CFRM: "Commercial Farm",
|
|
1023
|
+
CGL: "Commercial General Liability",
|
|
1024
|
+
COMAR: "Commercial Marine / Ocean Marine",
|
|
1025
|
+
COMR: "Commercial (misc.)",
|
|
1026
|
+
CONTR: "Contractors",
|
|
1027
|
+
CPKGE: "Commercial Package",
|
|
1028
|
+
CPMP: "Commercial Package (multi-peril)",
|
|
1029
|
+
CRIME: "Crime",
|
|
1030
|
+
DFIRE: "Dwelling Fire",
|
|
1031
|
+
DISAB: "Disability",
|
|
1032
|
+
DO: "Directors & Officers Liability",
|
|
1033
|
+
EDP: "Electronic Data Processing",
|
|
1034
|
+
EL: "Employers Liability",
|
|
1035
|
+
EO: "Errors & Omissions",
|
|
1036
|
+
EPLI: "Employment Practices Liability",
|
|
1037
|
+
EQ: "Earthquake",
|
|
1038
|
+
EQPFL: "Equipment Floater",
|
|
1039
|
+
EXLIA: "Excess Liability",
|
|
1040
|
+
FIDTY: "Fidelity",
|
|
1041
|
+
FIDUC: "Fiduciary Liability",
|
|
1042
|
+
FINEA: "Fine Arts",
|
|
1043
|
+
FLOOD: "Flood",
|
|
1044
|
+
GARAG: "Garage",
|
|
1045
|
+
GL: "General Liability",
|
|
1046
|
+
GLASS: "Glass",
|
|
1047
|
+
HANG: "Hangar (Aviation)",
|
|
1048
|
+
HBB: "Home-Based Business",
|
|
1049
|
+
HOME: "Homeowners",
|
|
1050
|
+
INBR: "Inland Marine - Brokers",
|
|
1051
|
+
INMAR: "Inland Marine",
|
|
1052
|
+
INMRC: "Inland Marine - Commercial",
|
|
1053
|
+
INMRP: "Inland Marine - Personal",
|
|
1054
|
+
JUDCL: "Judicial Bonds",
|
|
1055
|
+
KIDRA: "Kidnap & Ransom",
|
|
1056
|
+
LL: "Liquor Liability",
|
|
1057
|
+
MHOME: "Mobile Home",
|
|
1058
|
+
MMAL: "Medical Malpractice",
|
|
1059
|
+
Motorcycle: "Motorcycle",
|
|
1060
|
+
MTRTK: "Motor Truck Cargo",
|
|
1061
|
+
OLIB: "Other Liability",
|
|
1062
|
+
PHYS: "Physical Damage",
|
|
1063
|
+
PKG: "Package",
|
|
1064
|
+
PL: "Professional Liability",
|
|
1065
|
+
PLMSC: "Personal Lines Miscellaneous",
|
|
1066
|
+
PPKGE: "Personal Package",
|
|
1067
|
+
PROP: "Property",
|
|
1068
|
+
PROPC: "Property - Commercial",
|
|
1069
|
+
PUBOF: "Public Officials Liability",
|
|
1070
|
+
RECV: "Recreational Vehicle",
|
|
1071
|
+
SCHPR: "Scheduled Property",
|
|
1072
|
+
SIGNS: "Signs",
|
|
1073
|
+
SMP: "Special Multi-Peril",
|
|
1074
|
+
SURE: "Surety",
|
|
1075
|
+
TRANS: "Transportation",
|
|
1076
|
+
TRUCK: "Trucking",
|
|
1077
|
+
UMBRC: "Umbrella - Commercial",
|
|
1078
|
+
UMBRL: "Umbrella",
|
|
1079
|
+
UMBRP: "Umbrella - Personal",
|
|
1080
|
+
UN: "Unspecified / Unknown",
|
|
1081
|
+
WCMA: "Workers Comp - Monopolistic/State",
|
|
1082
|
+
WIND: "Wind",
|
|
1083
|
+
WORK: "Workers Compensation",
|
|
1084
|
+
WORKP: "Workers Compensation (Personal/Package)",
|
|
1085
|
+
WORKV: "Workers Compensation (Voluntary)"
|
|
1086
|
+
};
|
|
1087
|
+
var EXCLUDED_ACORD_LOB_CODES = /* @__PURE__ */ new Set([
|
|
1088
|
+
"ACHE",
|
|
1089
|
+
"INTER",
|
|
1090
|
+
"LICPT",
|
|
1091
|
+
"LSTIN",
|
|
1092
|
+
"NWFGR",
|
|
1093
|
+
"PAPER",
|
|
1094
|
+
"SCAP",
|
|
1095
|
+
"SFRNC"
|
|
1096
|
+
]);
|
|
1097
|
+
var LEGACY_POLICY_TYPE_TO_LOB = {
|
|
1098
|
+
general_liability: ["CGL"],
|
|
1099
|
+
commercial_property: ["PROPC"],
|
|
1100
|
+
commercial_auto: ["AUTOB"],
|
|
1101
|
+
non_owned_auto: ["AUTOB"],
|
|
1102
|
+
workers_comp: ["WORK"],
|
|
1103
|
+
umbrella: ["UMBRC"],
|
|
1104
|
+
excess_liability: ["EXLIA"],
|
|
1105
|
+
professional_liability: ["EO"],
|
|
1106
|
+
cyber: ["OLIB"],
|
|
1107
|
+
epli: ["EPLI"],
|
|
1108
|
+
directors_officers: ["DO"],
|
|
1109
|
+
fiduciary_liability: ["FIDUC"],
|
|
1110
|
+
crime_fidelity: ["CRIME"],
|
|
1111
|
+
inland_marine: ["INMRC"],
|
|
1112
|
+
builders_risk: ["INMRC"],
|
|
1113
|
+
environmental: ["OLIB"],
|
|
1114
|
+
ocean_marine: ["COMAR"],
|
|
1115
|
+
surety: ["SURE"],
|
|
1116
|
+
product_liability: ["OLIB"],
|
|
1117
|
+
bop: ["BOP"],
|
|
1118
|
+
management_liability_package: ["DO", "EPLI", "FIDUC"],
|
|
1119
|
+
property: ["PROP"],
|
|
1120
|
+
homeowners_ho3: ["HOME"],
|
|
1121
|
+
homeowners_ho5: ["HOME"],
|
|
1122
|
+
renters_ho4: ["HOME"],
|
|
1123
|
+
condo_ho6: ["HOME"],
|
|
1124
|
+
dwelling_fire: ["DFIRE"],
|
|
1125
|
+
mobile_home: ["MHOME"],
|
|
1126
|
+
personal_auto: ["AUTOP"],
|
|
1127
|
+
personal_umbrella: ["UMBRP"],
|
|
1128
|
+
flood_nfip: ["FLOOD"],
|
|
1129
|
+
flood_private: ["FLOOD"],
|
|
1130
|
+
earthquake: ["EQ"],
|
|
1131
|
+
personal_inland_marine: ["INMRP"],
|
|
1132
|
+
watercraft: ["BOAT"],
|
|
1133
|
+
recreational_vehicle: ["RECV"],
|
|
1134
|
+
farm_ranch: ["CFRM"],
|
|
1135
|
+
life: ["UN"],
|
|
1136
|
+
critical_illness: ["DISAB"],
|
|
1137
|
+
disability: ["DISAB"],
|
|
1138
|
+
long_term_care: ["UN"],
|
|
1139
|
+
pet: ["UN"],
|
|
1140
|
+
travel: ["UN"],
|
|
1141
|
+
identity_theft: ["UN"],
|
|
1142
|
+
title: ["UN"],
|
|
1143
|
+
other: ["UN"],
|
|
1144
|
+
unknown: ["UN"],
|
|
1145
|
+
auto: ["AUTOB"],
|
|
1146
|
+
crime: ["CRIME"],
|
|
1147
|
+
crim: ["CRIME"],
|
|
1148
|
+
fiduciary: ["FIDUC"],
|
|
1149
|
+
d_and_o: ["DO"],
|
|
1150
|
+
d_o: ["DO"],
|
|
1151
|
+
homeowners: ["HOME"],
|
|
1152
|
+
renters: ["HOME"],
|
|
1153
|
+
flood: ["FLOOD"],
|
|
1154
|
+
boat: ["BOAT"],
|
|
1155
|
+
motorcycle: ["Motorcycle"]
|
|
1156
|
+
};
|
|
1157
|
+
var PERSONAL_LOB_CODES = /* @__PURE__ */ new Set([
|
|
1158
|
+
"AUTOP",
|
|
1159
|
+
"HOME",
|
|
1160
|
+
"MHOME",
|
|
1161
|
+
"DFIRE",
|
|
1162
|
+
"FLOOD",
|
|
1163
|
+
"EQ",
|
|
1164
|
+
"INMRP",
|
|
1165
|
+
"UMBRP",
|
|
1166
|
+
"BOAT",
|
|
1167
|
+
"RECV",
|
|
1168
|
+
"Motorcycle",
|
|
1169
|
+
"PPKGE",
|
|
1170
|
+
"DISAB",
|
|
1171
|
+
"PLMSC",
|
|
1172
|
+
"HBB"
|
|
1173
|
+
]);
|
|
1174
|
+
function hasOwn(object, key) {
|
|
1175
|
+
return Object.prototype.hasOwnProperty.call(object, key);
|
|
1176
|
+
}
|
|
1177
|
+
function canonicalLegacyKey(value) {
|
|
1178
|
+
return value.trim().toLowerCase().replace(/&/g, " and ").replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").replace(/_+/g, "_");
|
|
1179
|
+
}
|
|
1180
|
+
function humanize(value) {
|
|
1181
|
+
return value.trim().replace(/[_-]+/g, " ").replace(/\b\w/g, (char) => char.toUpperCase());
|
|
1182
|
+
}
|
|
1183
|
+
function isLobCode(value) {
|
|
1184
|
+
return typeof value === "string" && hasOwn(ACORD_LOB_LABELS, value);
|
|
1185
|
+
}
|
|
1186
|
+
function resolveLobCode(value) {
|
|
1187
|
+
const trimmed = value.trim();
|
|
1188
|
+
if (!trimmed) return void 0;
|
|
1189
|
+
if (isLobCode(trimmed)) return trimmed;
|
|
1190
|
+
if (trimmed.toLowerCase() === "motorcycle") return "Motorcycle";
|
|
1191
|
+
const legacy = LEGACY_POLICY_TYPE_TO_LOB[canonicalLegacyKey(trimmed)];
|
|
1192
|
+
if (legacy?.[0]) return legacy[0];
|
|
1193
|
+
const upper = trimmed.toUpperCase();
|
|
1194
|
+
if (upper === "CRIM") return "CRIME";
|
|
1195
|
+
if (isLobCode(upper)) return upper;
|
|
1196
|
+
return void 0;
|
|
1197
|
+
}
|
|
1198
|
+
function normalizeOperationalLinesOfBusiness(values) {
|
|
1199
|
+
const source = Array.isArray(values) ? values.filter((value) => typeof value === "string" && value.trim().length > 0) : [];
|
|
1200
|
+
return toLobCodes(source);
|
|
1201
|
+
}
|
|
1202
|
+
function toLobCodes(values) {
|
|
1203
|
+
const source = values?.filter((value) => typeof value === "string" && value.trim()) ?? [];
|
|
1204
|
+
if (source.length === 0) return ["UN"];
|
|
1205
|
+
const codes = [];
|
|
1206
|
+
for (const value of source) {
|
|
1207
|
+
const trimmed = value.trim();
|
|
1208
|
+
if (isLobCode(trimmed)) {
|
|
1209
|
+
codes.push(trimmed);
|
|
1210
|
+
continue;
|
|
1211
|
+
}
|
|
1212
|
+
if (trimmed.toUpperCase() === "CRIM") {
|
|
1213
|
+
codes.push("CRIME");
|
|
1214
|
+
continue;
|
|
1215
|
+
}
|
|
1216
|
+
const mapped = LEGACY_POLICY_TYPE_TO_LOB[canonicalLegacyKey(trimmed)];
|
|
1217
|
+
if (mapped) {
|
|
1218
|
+
codes.push(...mapped);
|
|
1219
|
+
continue;
|
|
1220
|
+
}
|
|
1221
|
+
const upper = trimmed.toUpperCase();
|
|
1222
|
+
if (isLobCode(upper)) {
|
|
1223
|
+
codes.push(upper);
|
|
1224
|
+
continue;
|
|
1225
|
+
}
|
|
1226
|
+
codes.push("UN");
|
|
1227
|
+
}
|
|
1228
|
+
return Array.from(new Set(codes));
|
|
1229
|
+
}
|
|
1230
|
+
function lobLabel(value) {
|
|
1231
|
+
const code = resolveLobCode(value);
|
|
1232
|
+
return code ? ACORD_LOB_LABELS[code] : humanize(value);
|
|
1233
|
+
}
|
|
1234
|
+
function isPersonalLob(code) {
|
|
1235
|
+
return isLobCode(code) && PERSONAL_LOB_CODES.has(code);
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
// src/schemas/shared.ts
|
|
1239
|
+
var import_zod4 = require("zod");
|
|
1240
|
+
var SourceProvenanceSchema = import_zod4.z.object({
|
|
1241
|
+
sourceSpanIds: import_zod4.z.array(import_zod4.z.string().min(1)).min(1),
|
|
1242
|
+
documentNodeId: import_zod4.z.string().optional(),
|
|
1243
|
+
sourceTextHash: import_zod4.z.string().optional(),
|
|
1244
|
+
pageStart: import_zod4.z.number().int().positive().optional(),
|
|
1245
|
+
pageEnd: import_zod4.z.number().int().positive().optional()
|
|
1246
|
+
});
|
|
1247
|
+
var AddressSchema = import_zod4.z.object({
|
|
1248
|
+
street1: import_zod4.z.string(),
|
|
1249
|
+
street2: import_zod4.z.string().optional(),
|
|
1250
|
+
city: import_zod4.z.string(),
|
|
1251
|
+
state: import_zod4.z.string(),
|
|
1252
|
+
zip: import_zod4.z.string(),
|
|
1253
|
+
country: import_zod4.z.string().optional()
|
|
964
1254
|
});
|
|
965
1255
|
var SourceBackedAddressSchema = AddressSchema.merge(SourceProvenanceSchema);
|
|
966
|
-
var ContactSchema =
|
|
967
|
-
name:
|
|
968
|
-
title:
|
|
969
|
-
type:
|
|
970
|
-
phone:
|
|
971
|
-
fax:
|
|
972
|
-
email:
|
|
1256
|
+
var ContactSchema = import_zod4.z.object({
|
|
1257
|
+
name: import_zod4.z.string().optional(),
|
|
1258
|
+
title: import_zod4.z.string().optional(),
|
|
1259
|
+
type: import_zod4.z.string().optional(),
|
|
1260
|
+
phone: import_zod4.z.string().optional(),
|
|
1261
|
+
fax: import_zod4.z.string().optional(),
|
|
1262
|
+
email: import_zod4.z.string().optional(),
|
|
973
1263
|
address: AddressSchema.optional(),
|
|
974
|
-
hours:
|
|
1264
|
+
hours: import_zod4.z.string().optional()
|
|
975
1265
|
}).merge(SourceProvenanceSchema);
|
|
976
|
-
var FormReferenceSchema =
|
|
977
|
-
formNumber:
|
|
978
|
-
editionDate:
|
|
979
|
-
title:
|
|
980
|
-
formType:
|
|
981
|
-
pageStart:
|
|
982
|
-
pageEnd:
|
|
983
|
-
documentNodeId:
|
|
984
|
-
sourceSpanIds:
|
|
985
|
-
sourceTextHash:
|
|
986
|
-
});
|
|
987
|
-
var TaxFeeItemSchema =
|
|
988
|
-
name:
|
|
989
|
-
amount:
|
|
990
|
-
amountValue:
|
|
991
|
-
type:
|
|
992
|
-
description:
|
|
993
|
-
documentNodeId:
|
|
994
|
-
sourceSpanIds:
|
|
995
|
-
sourceTextHash:
|
|
996
|
-
});
|
|
997
|
-
var RatingBasisSchema =
|
|
1266
|
+
var FormReferenceSchema = import_zod4.z.object({
|
|
1267
|
+
formNumber: import_zod4.z.string(),
|
|
1268
|
+
editionDate: import_zod4.z.string().optional(),
|
|
1269
|
+
title: import_zod4.z.string().optional(),
|
|
1270
|
+
formType: import_zod4.z.enum(["coverage", "endorsement", "declarations", "application", "notice", "other"]),
|
|
1271
|
+
pageStart: import_zod4.z.number().optional(),
|
|
1272
|
+
pageEnd: import_zod4.z.number().optional(),
|
|
1273
|
+
documentNodeId: import_zod4.z.string().optional(),
|
|
1274
|
+
sourceSpanIds: import_zod4.z.array(import_zod4.z.string()).optional(),
|
|
1275
|
+
sourceTextHash: import_zod4.z.string().optional()
|
|
1276
|
+
});
|
|
1277
|
+
var TaxFeeItemSchema = import_zod4.z.object({
|
|
1278
|
+
name: import_zod4.z.string(),
|
|
1279
|
+
amount: import_zod4.z.string(),
|
|
1280
|
+
amountValue: import_zod4.z.number().optional(),
|
|
1281
|
+
type: import_zod4.z.enum(["tax", "fee", "surcharge", "assessment"]).optional(),
|
|
1282
|
+
description: import_zod4.z.string().optional(),
|
|
1283
|
+
documentNodeId: import_zod4.z.string().optional(),
|
|
1284
|
+
sourceSpanIds: import_zod4.z.array(import_zod4.z.string()).optional(),
|
|
1285
|
+
sourceTextHash: import_zod4.z.string().optional()
|
|
1286
|
+
});
|
|
1287
|
+
var RatingBasisSchema = import_zod4.z.object({
|
|
998
1288
|
type: RatingBasisTypeSchema,
|
|
999
|
-
amount:
|
|
1000
|
-
description:
|
|
1001
|
-
});
|
|
1002
|
-
var SublimitSchema =
|
|
1003
|
-
name:
|
|
1004
|
-
limit:
|
|
1005
|
-
appliesTo:
|
|
1006
|
-
deductible:
|
|
1007
|
-
});
|
|
1008
|
-
var SharedLimitSchema =
|
|
1009
|
-
description:
|
|
1010
|
-
limit:
|
|
1011
|
-
coverageParts:
|
|
1012
|
-
});
|
|
1013
|
-
var ExtendedReportingPeriodSchema =
|
|
1014
|
-
basicDays:
|
|
1015
|
-
supplementalYears:
|
|
1016
|
-
supplementalPremium:
|
|
1017
|
-
});
|
|
1018
|
-
var NamedInsuredSchema =
|
|
1019
|
-
name:
|
|
1020
|
-
relationship:
|
|
1289
|
+
amount: import_zod4.z.string().optional(),
|
|
1290
|
+
description: import_zod4.z.string().optional()
|
|
1291
|
+
});
|
|
1292
|
+
var SublimitSchema = import_zod4.z.object({
|
|
1293
|
+
name: import_zod4.z.string(),
|
|
1294
|
+
limit: import_zod4.z.string(),
|
|
1295
|
+
appliesTo: import_zod4.z.string().optional(),
|
|
1296
|
+
deductible: import_zod4.z.string().optional()
|
|
1297
|
+
});
|
|
1298
|
+
var SharedLimitSchema = import_zod4.z.object({
|
|
1299
|
+
description: import_zod4.z.string(),
|
|
1300
|
+
limit: import_zod4.z.string(),
|
|
1301
|
+
coverageParts: import_zod4.z.array(import_zod4.z.string())
|
|
1302
|
+
});
|
|
1303
|
+
var ExtendedReportingPeriodSchema = import_zod4.z.object({
|
|
1304
|
+
basicDays: import_zod4.z.number().optional(),
|
|
1305
|
+
supplementalYears: import_zod4.z.number().optional(),
|
|
1306
|
+
supplementalPremium: import_zod4.z.string().optional()
|
|
1307
|
+
});
|
|
1308
|
+
var NamedInsuredSchema = import_zod4.z.object({
|
|
1309
|
+
name: import_zod4.z.string(),
|
|
1310
|
+
relationship: import_zod4.z.string().optional(),
|
|
1021
1311
|
address: AddressSchema.optional()
|
|
1022
1312
|
}).merge(SourceProvenanceSchema);
|
|
1023
1313
|
|
|
1024
1314
|
// src/schemas/coverage.ts
|
|
1025
|
-
var
|
|
1026
|
-
var CoverageValueTypeSchema =
|
|
1315
|
+
var import_zod5 = require("zod");
|
|
1316
|
+
var CoverageValueTypeSchema = import_zod5.z.enum([
|
|
1027
1317
|
"numeric",
|
|
1028
1318
|
"included",
|
|
1029
1319
|
"not_included",
|
|
@@ -1032,116 +1322,98 @@ var CoverageValueTypeSchema = import_zod4.z.enum([
|
|
|
1032
1322
|
"referential",
|
|
1033
1323
|
"other"
|
|
1034
1324
|
]);
|
|
1035
|
-
var CoverageSchema =
|
|
1036
|
-
name:
|
|
1037
|
-
limit:
|
|
1038
|
-
limitAmount:
|
|
1325
|
+
var CoverageSchema = import_zod5.z.object({
|
|
1326
|
+
name: import_zod5.z.string(),
|
|
1327
|
+
limit: import_zod5.z.string(),
|
|
1328
|
+
limitAmount: import_zod5.z.number().optional(),
|
|
1039
1329
|
limitType: LimitTypeSchema.optional(),
|
|
1040
1330
|
limitValueType: CoverageValueTypeSchema.optional(),
|
|
1041
|
-
deductible:
|
|
1042
|
-
deductibleAmount:
|
|
1331
|
+
deductible: import_zod5.z.string().optional(),
|
|
1332
|
+
deductibleAmount: import_zod5.z.number().optional(),
|
|
1043
1333
|
deductibleValueType: CoverageValueTypeSchema.optional(),
|
|
1044
1334
|
trigger: CoverageTriggerSchema.optional(),
|
|
1045
|
-
retroactiveDate:
|
|
1046
|
-
formNumber:
|
|
1047
|
-
pageNumber:
|
|
1048
|
-
sectionRef:
|
|
1049
|
-
originalContent:
|
|
1050
|
-
recordId:
|
|
1051
|
-
documentNodeId:
|
|
1052
|
-
sourceSpanIds:
|
|
1053
|
-
sourceTextHash:
|
|
1335
|
+
retroactiveDate: import_zod5.z.string().optional(),
|
|
1336
|
+
formNumber: import_zod5.z.string().optional(),
|
|
1337
|
+
pageNumber: import_zod5.z.number().optional(),
|
|
1338
|
+
sectionRef: import_zod5.z.string().optional(),
|
|
1339
|
+
originalContent: import_zod5.z.string().optional(),
|
|
1340
|
+
recordId: import_zod5.z.string().optional(),
|
|
1341
|
+
documentNodeId: import_zod5.z.string().optional(),
|
|
1342
|
+
sourceSpanIds: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1343
|
+
sourceTextHash: import_zod5.z.string().optional()
|
|
1054
1344
|
});
|
|
1055
|
-
var EnrichedCoverageSchema =
|
|
1056
|
-
name:
|
|
1057
|
-
coverageCode:
|
|
1058
|
-
formNumber:
|
|
1059
|
-
formEditionDate:
|
|
1060
|
-
limit:
|
|
1061
|
-
limitAmount:
|
|
1345
|
+
var EnrichedCoverageSchema = import_zod5.z.object({
|
|
1346
|
+
name: import_zod5.z.string(),
|
|
1347
|
+
coverageCode: import_zod5.z.string().optional(),
|
|
1348
|
+
formNumber: import_zod5.z.string().optional(),
|
|
1349
|
+
formEditionDate: import_zod5.z.string().optional(),
|
|
1350
|
+
limit: import_zod5.z.string(),
|
|
1351
|
+
limitAmount: import_zod5.z.number().optional(),
|
|
1062
1352
|
limitType: LimitTypeSchema.optional(),
|
|
1063
1353
|
limitValueType: CoverageValueTypeSchema.optional(),
|
|
1064
|
-
deductible:
|
|
1065
|
-
deductibleAmount:
|
|
1354
|
+
deductible: import_zod5.z.string().optional(),
|
|
1355
|
+
deductibleAmount: import_zod5.z.number().optional(),
|
|
1066
1356
|
deductibleType: DeductibleTypeSchema.optional(),
|
|
1067
1357
|
deductibleValueType: CoverageValueTypeSchema.optional(),
|
|
1068
|
-
sir:
|
|
1069
|
-
sublimit:
|
|
1070
|
-
coinsurance:
|
|
1358
|
+
sir: import_zod5.z.string().optional(),
|
|
1359
|
+
sublimit: import_zod5.z.string().optional(),
|
|
1360
|
+
coinsurance: import_zod5.z.string().optional(),
|
|
1071
1361
|
valuation: ValuationMethodSchema.optional(),
|
|
1072
|
-
territory:
|
|
1362
|
+
territory: import_zod5.z.string().optional(),
|
|
1073
1363
|
trigger: CoverageTriggerSchema.optional(),
|
|
1074
|
-
retroactiveDate:
|
|
1075
|
-
included:
|
|
1076
|
-
premium:
|
|
1077
|
-
pageNumber:
|
|
1078
|
-
sectionRef:
|
|
1079
|
-
originalContent:
|
|
1080
|
-
recordId: import_zod4.z.string().optional(),
|
|
1081
|
-
documentNodeId: import_zod4.z.string().optional(),
|
|
1082
|
-
sourceSpanIds: import_zod4.z.array(import_zod4.z.string()).optional(),
|
|
1083
|
-
sourceTextHash: import_zod4.z.string().optional()
|
|
1084
|
-
});
|
|
1085
|
-
|
|
1086
|
-
// src/schemas/endorsement.ts
|
|
1087
|
-
var import_zod5 = require("zod");
|
|
1088
|
-
var EndorsementPartySchema = import_zod5.z.object({
|
|
1089
|
-
name: import_zod5.z.string(),
|
|
1090
|
-
role: EndorsementPartyRoleSchema,
|
|
1091
|
-
address: AddressSchema.optional(),
|
|
1092
|
-
relationship: import_zod5.z.string().optional(),
|
|
1093
|
-
scope: import_zod5.z.string().optional()
|
|
1094
|
-
}).merge(SourceProvenanceSchema);
|
|
1095
|
-
var EndorsementSchema = import_zod5.z.object({
|
|
1096
|
-
formNumber: import_zod5.z.string(),
|
|
1097
|
-
editionDate: import_zod5.z.string().optional(),
|
|
1098
|
-
title: import_zod5.z.string(),
|
|
1099
|
-
endorsementType: EndorsementTypeSchema,
|
|
1100
|
-
effectiveDate: import_zod5.z.string().optional(),
|
|
1101
|
-
affectedCoverageParts: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1102
|
-
namedParties: import_zod5.z.array(EndorsementPartySchema).optional(),
|
|
1103
|
-
keyTerms: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1104
|
-
premiumImpact: import_zod5.z.string().optional(),
|
|
1105
|
-
excerpt: import_zod5.z.string().optional(),
|
|
1106
|
-
content: import_zod5.z.string().optional(),
|
|
1107
|
-
pageStart: import_zod5.z.number(),
|
|
1108
|
-
pageEnd: import_zod5.z.number().optional(),
|
|
1364
|
+
retroactiveDate: import_zod5.z.string().optional(),
|
|
1365
|
+
included: import_zod5.z.boolean(),
|
|
1366
|
+
premium: import_zod5.z.string().optional(),
|
|
1367
|
+
pageNumber: import_zod5.z.number().optional(),
|
|
1368
|
+
sectionRef: import_zod5.z.string().optional(),
|
|
1369
|
+
originalContent: import_zod5.z.string().optional(),
|
|
1109
1370
|
recordId: import_zod5.z.string().optional(),
|
|
1110
1371
|
documentNodeId: import_zod5.z.string().optional(),
|
|
1111
1372
|
sourceSpanIds: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1112
1373
|
sourceTextHash: import_zod5.z.string().optional()
|
|
1113
1374
|
});
|
|
1114
1375
|
|
|
1115
|
-
// src/schemas/
|
|
1376
|
+
// src/schemas/endorsement.ts
|
|
1116
1377
|
var import_zod6 = require("zod");
|
|
1117
|
-
var
|
|
1378
|
+
var EndorsementPartySchema = import_zod6.z.object({
|
|
1118
1379
|
name: import_zod6.z.string(),
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1380
|
+
role: EndorsementPartyRoleSchema,
|
|
1381
|
+
address: AddressSchema.optional(),
|
|
1382
|
+
relationship: import_zod6.z.string().optional(),
|
|
1383
|
+
scope: import_zod6.z.string().optional()
|
|
1384
|
+
}).merge(SourceProvenanceSchema);
|
|
1385
|
+
var EndorsementSchema = import_zod6.z.object({
|
|
1386
|
+
formNumber: import_zod6.z.string(),
|
|
1387
|
+
editionDate: import_zod6.z.string().optional(),
|
|
1388
|
+
title: import_zod6.z.string(),
|
|
1389
|
+
endorsementType: EndorsementTypeSchema,
|
|
1390
|
+
effectiveDate: import_zod6.z.string().optional(),
|
|
1391
|
+
affectedCoverageParts: import_zod6.z.array(import_zod6.z.string()).optional(),
|
|
1392
|
+
namedParties: import_zod6.z.array(EndorsementPartySchema).optional(),
|
|
1393
|
+
keyTerms: import_zod6.z.array(import_zod6.z.string()).optional(),
|
|
1394
|
+
premiumImpact: import_zod6.z.string().optional(),
|
|
1395
|
+
excerpt: import_zod6.z.string().optional(),
|
|
1396
|
+
content: import_zod6.z.string().optional(),
|
|
1397
|
+
pageStart: import_zod6.z.number(),
|
|
1398
|
+
pageEnd: import_zod6.z.number().optional(),
|
|
1128
1399
|
recordId: import_zod6.z.string().optional(),
|
|
1129
1400
|
documentNodeId: import_zod6.z.string().optional(),
|
|
1130
1401
|
sourceSpanIds: import_zod6.z.array(import_zod6.z.string()).optional(),
|
|
1131
1402
|
sourceTextHash: import_zod6.z.string().optional()
|
|
1132
1403
|
});
|
|
1133
1404
|
|
|
1134
|
-
// src/schemas/
|
|
1405
|
+
// src/schemas/exclusion.ts
|
|
1135
1406
|
var import_zod7 = require("zod");
|
|
1136
|
-
var
|
|
1137
|
-
key: import_zod7.z.string(),
|
|
1138
|
-
value: import_zod7.z.string()
|
|
1139
|
-
});
|
|
1140
|
-
var PolicyConditionSchema = import_zod7.z.object({
|
|
1407
|
+
var ExclusionSchema = import_zod7.z.object({
|
|
1141
1408
|
name: import_zod7.z.string(),
|
|
1142
|
-
|
|
1409
|
+
formNumber: import_zod7.z.string().optional(),
|
|
1410
|
+
excludedPerils: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
1411
|
+
isAbsolute: import_zod7.z.boolean().optional(),
|
|
1412
|
+
exceptions: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
1413
|
+
buybackAvailable: import_zod7.z.boolean().optional(),
|
|
1414
|
+
buybackEndorsement: import_zod7.z.string().optional(),
|
|
1415
|
+
appliesTo: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
1143
1416
|
content: import_zod7.z.string(),
|
|
1144
|
-
keyValues: import_zod7.z.array(ConditionKeyValueSchema).optional(),
|
|
1145
1417
|
pageNumber: import_zod7.z.number().optional(),
|
|
1146
1418
|
recordId: import_zod7.z.string().optional(),
|
|
1147
1419
|
documentNodeId: import_zod7.z.string().optional(),
|
|
@@ -1149,543 +1421,561 @@ var PolicyConditionSchema = import_zod7.z.object({
|
|
|
1149
1421
|
sourceTextHash: import_zod7.z.string().optional()
|
|
1150
1422
|
});
|
|
1151
1423
|
|
|
1152
|
-
// src/schemas/
|
|
1424
|
+
// src/schemas/condition.ts
|
|
1153
1425
|
var import_zod8 = require("zod");
|
|
1154
|
-
var
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1426
|
+
var ConditionKeyValueSchema = import_zod8.z.object({
|
|
1427
|
+
key: import_zod8.z.string(),
|
|
1428
|
+
value: import_zod8.z.string()
|
|
1429
|
+
});
|
|
1430
|
+
var PolicyConditionSchema = import_zod8.z.object({
|
|
1431
|
+
name: import_zod8.z.string(),
|
|
1432
|
+
conditionType: ConditionTypeSchema,
|
|
1433
|
+
content: import_zod8.z.string(),
|
|
1434
|
+
keyValues: import_zod8.z.array(ConditionKeyValueSchema).optional(),
|
|
1435
|
+
pageNumber: import_zod8.z.number().optional(),
|
|
1436
|
+
recordId: import_zod8.z.string().optional(),
|
|
1437
|
+
documentNodeId: import_zod8.z.string().optional(),
|
|
1438
|
+
sourceSpanIds: import_zod8.z.array(import_zod8.z.string()).optional(),
|
|
1439
|
+
sourceTextHash: import_zod8.z.string().optional()
|
|
1440
|
+
});
|
|
1441
|
+
|
|
1442
|
+
// src/schemas/parties.ts
|
|
1443
|
+
var import_zod9 = require("zod");
|
|
1444
|
+
var InsurerInfoSchema = import_zod9.z.object({
|
|
1445
|
+
legalName: import_zod9.z.string(),
|
|
1446
|
+
naicNumber: import_zod9.z.string().optional(),
|
|
1447
|
+
amBestRating: import_zod9.z.string().optional(),
|
|
1448
|
+
amBestNumber: import_zod9.z.string().optional(),
|
|
1159
1449
|
admittedStatus: AdmittedStatusSchema.optional(),
|
|
1160
|
-
stateOfDomicile:
|
|
1450
|
+
stateOfDomicile: import_zod9.z.string().optional()
|
|
1161
1451
|
}).merge(SourceProvenanceSchema);
|
|
1162
|
-
var ProducerInfoSchema =
|
|
1163
|
-
agencyName:
|
|
1164
|
-
contactName:
|
|
1165
|
-
licenseNumber:
|
|
1166
|
-
phone:
|
|
1167
|
-
email:
|
|
1452
|
+
var ProducerInfoSchema = import_zod9.z.object({
|
|
1453
|
+
agencyName: import_zod9.z.string(),
|
|
1454
|
+
contactName: import_zod9.z.string().optional(),
|
|
1455
|
+
licenseNumber: import_zod9.z.string().optional(),
|
|
1456
|
+
phone: import_zod9.z.string().optional(),
|
|
1457
|
+
email: import_zod9.z.string().optional(),
|
|
1168
1458
|
address: AddressSchema.optional()
|
|
1169
1459
|
}).merge(SourceProvenanceSchema);
|
|
1170
1460
|
|
|
1171
1461
|
// src/schemas/financial.ts
|
|
1172
|
-
var
|
|
1173
|
-
var PaymentInstallmentSchema =
|
|
1174
|
-
dueDate:
|
|
1175
|
-
amount:
|
|
1176
|
-
description:
|
|
1462
|
+
var import_zod10 = require("zod");
|
|
1463
|
+
var PaymentInstallmentSchema = import_zod10.z.object({
|
|
1464
|
+
dueDate: import_zod10.z.string(),
|
|
1465
|
+
amount: import_zod10.z.string(),
|
|
1466
|
+
description: import_zod10.z.string().optional()
|
|
1177
1467
|
});
|
|
1178
|
-
var PaymentPlanSchema =
|
|
1179
|
-
installments:
|
|
1180
|
-
financeCharge:
|
|
1468
|
+
var PaymentPlanSchema = import_zod10.z.object({
|
|
1469
|
+
installments: import_zod10.z.array(PaymentInstallmentSchema),
|
|
1470
|
+
financeCharge: import_zod10.z.string().optional()
|
|
1181
1471
|
});
|
|
1182
|
-
var LocationPremiumSchema =
|
|
1183
|
-
locationNumber:
|
|
1184
|
-
premium:
|
|
1185
|
-
description:
|
|
1472
|
+
var LocationPremiumSchema = import_zod10.z.object({
|
|
1473
|
+
locationNumber: import_zod10.z.number(),
|
|
1474
|
+
premium: import_zod10.z.string(),
|
|
1475
|
+
description: import_zod10.z.string().optional()
|
|
1186
1476
|
});
|
|
1187
1477
|
|
|
1188
1478
|
// src/schemas/loss-history.ts
|
|
1189
|
-
var
|
|
1190
|
-
var ClaimRecordSchema =
|
|
1191
|
-
dateOfLoss:
|
|
1192
|
-
claimNumber:
|
|
1193
|
-
description:
|
|
1479
|
+
var import_zod11 = require("zod");
|
|
1480
|
+
var ClaimRecordSchema = import_zod11.z.object({
|
|
1481
|
+
dateOfLoss: import_zod11.z.string(),
|
|
1482
|
+
claimNumber: import_zod11.z.string().optional(),
|
|
1483
|
+
description: import_zod11.z.string(),
|
|
1194
1484
|
status: ClaimStatusSchema,
|
|
1195
|
-
paid:
|
|
1196
|
-
reserved:
|
|
1197
|
-
incurred:
|
|
1198
|
-
claimant:
|
|
1199
|
-
coverageLine:
|
|
1200
|
-
});
|
|
1201
|
-
var LossSummarySchema =
|
|
1202
|
-
period:
|
|
1203
|
-
totalClaims:
|
|
1204
|
-
totalIncurred:
|
|
1205
|
-
totalPaid:
|
|
1206
|
-
totalReserved:
|
|
1207
|
-
lossRatio:
|
|
1208
|
-
});
|
|
1209
|
-
var ExperienceModSchema =
|
|
1210
|
-
factor:
|
|
1211
|
-
effectiveDate:
|
|
1212
|
-
state:
|
|
1485
|
+
paid: import_zod11.z.string().optional(),
|
|
1486
|
+
reserved: import_zod11.z.string().optional(),
|
|
1487
|
+
incurred: import_zod11.z.string().optional(),
|
|
1488
|
+
claimant: import_zod11.z.string().optional(),
|
|
1489
|
+
coverageLine: import_zod11.z.string().optional()
|
|
1490
|
+
});
|
|
1491
|
+
var LossSummarySchema = import_zod11.z.object({
|
|
1492
|
+
period: import_zod11.z.string().optional(),
|
|
1493
|
+
totalClaims: import_zod11.z.number().optional(),
|
|
1494
|
+
totalIncurred: import_zod11.z.string().optional(),
|
|
1495
|
+
totalPaid: import_zod11.z.string().optional(),
|
|
1496
|
+
totalReserved: import_zod11.z.string().optional(),
|
|
1497
|
+
lossRatio: import_zod11.z.string().optional()
|
|
1498
|
+
});
|
|
1499
|
+
var ExperienceModSchema = import_zod11.z.object({
|
|
1500
|
+
factor: import_zod11.z.number(),
|
|
1501
|
+
effectiveDate: import_zod11.z.string().optional(),
|
|
1502
|
+
state: import_zod11.z.string().optional()
|
|
1213
1503
|
});
|
|
1214
1504
|
|
|
1215
1505
|
// src/schemas/underwriting.ts
|
|
1216
|
-
var
|
|
1217
|
-
var EnrichedSubjectivitySchema =
|
|
1218
|
-
description:
|
|
1506
|
+
var import_zod12 = require("zod");
|
|
1507
|
+
var EnrichedSubjectivitySchema = import_zod12.z.object({
|
|
1508
|
+
description: import_zod12.z.string(),
|
|
1219
1509
|
category: SubjectivityCategorySchema.optional(),
|
|
1220
|
-
dueDate:
|
|
1221
|
-
status:
|
|
1222
|
-
pageNumber:
|
|
1510
|
+
dueDate: import_zod12.z.string().optional(),
|
|
1511
|
+
status: import_zod12.z.enum(["open", "satisfied", "waived"]).optional(),
|
|
1512
|
+
pageNumber: import_zod12.z.number().optional()
|
|
1223
1513
|
});
|
|
1224
|
-
var EnrichedUnderwritingConditionSchema =
|
|
1225
|
-
description:
|
|
1226
|
-
category:
|
|
1227
|
-
pageNumber:
|
|
1514
|
+
var EnrichedUnderwritingConditionSchema = import_zod12.z.object({
|
|
1515
|
+
description: import_zod12.z.string(),
|
|
1516
|
+
category: import_zod12.z.string().optional(),
|
|
1517
|
+
pageNumber: import_zod12.z.number().optional()
|
|
1228
1518
|
});
|
|
1229
|
-
var BindingAuthoritySchema =
|
|
1230
|
-
authorizedBy:
|
|
1231
|
-
method:
|
|
1232
|
-
expiration:
|
|
1233
|
-
conditions:
|
|
1519
|
+
var BindingAuthoritySchema = import_zod12.z.object({
|
|
1520
|
+
authorizedBy: import_zod12.z.string().optional(),
|
|
1521
|
+
method: import_zod12.z.string().optional(),
|
|
1522
|
+
expiration: import_zod12.z.string().optional(),
|
|
1523
|
+
conditions: import_zod12.z.array(import_zod12.z.string()).optional()
|
|
1234
1524
|
});
|
|
1235
1525
|
|
|
1236
1526
|
// src/schemas/declarations/index.ts
|
|
1237
|
-
var
|
|
1527
|
+
var import_zod16 = require("zod");
|
|
1238
1528
|
|
|
1239
1529
|
// src/schemas/declarations/personal.ts
|
|
1240
|
-
var
|
|
1530
|
+
var import_zod14 = require("zod");
|
|
1241
1531
|
|
|
1242
1532
|
// src/schemas/declarations/shared.ts
|
|
1243
|
-
var
|
|
1244
|
-
var EmployersLiabilityLimitsSchema =
|
|
1245
|
-
eachAccident:
|
|
1246
|
-
diseasePolicyLimit:
|
|
1247
|
-
diseaseEachEmployee:
|
|
1248
|
-
});
|
|
1249
|
-
var LimitScheduleSchema =
|
|
1250
|
-
perOccurrence:
|
|
1251
|
-
generalAggregate:
|
|
1252
|
-
productsCompletedOpsAggregate:
|
|
1253
|
-
personalAdvertisingInjury:
|
|
1254
|
-
eachEmployee:
|
|
1255
|
-
fireDamage:
|
|
1256
|
-
medicalExpense:
|
|
1257
|
-
combinedSingleLimit:
|
|
1258
|
-
bodilyInjuryPerPerson:
|
|
1259
|
-
bodilyInjuryPerAccident:
|
|
1260
|
-
propertyDamage:
|
|
1261
|
-
eachOccurrenceUmbrella:
|
|
1262
|
-
umbrellaAggregate:
|
|
1263
|
-
umbrellaRetention:
|
|
1264
|
-
statutory:
|
|
1533
|
+
var import_zod13 = require("zod");
|
|
1534
|
+
var EmployersLiabilityLimitsSchema = import_zod13.z.object({
|
|
1535
|
+
eachAccident: import_zod13.z.string(),
|
|
1536
|
+
diseasePolicyLimit: import_zod13.z.string(),
|
|
1537
|
+
diseaseEachEmployee: import_zod13.z.string()
|
|
1538
|
+
});
|
|
1539
|
+
var LimitScheduleSchema = import_zod13.z.object({
|
|
1540
|
+
perOccurrence: import_zod13.z.string().optional(),
|
|
1541
|
+
generalAggregate: import_zod13.z.string().optional(),
|
|
1542
|
+
productsCompletedOpsAggregate: import_zod13.z.string().optional(),
|
|
1543
|
+
personalAdvertisingInjury: import_zod13.z.string().optional(),
|
|
1544
|
+
eachEmployee: import_zod13.z.string().optional(),
|
|
1545
|
+
fireDamage: import_zod13.z.string().optional(),
|
|
1546
|
+
medicalExpense: import_zod13.z.string().optional(),
|
|
1547
|
+
combinedSingleLimit: import_zod13.z.string().optional(),
|
|
1548
|
+
bodilyInjuryPerPerson: import_zod13.z.string().optional(),
|
|
1549
|
+
bodilyInjuryPerAccident: import_zod13.z.string().optional(),
|
|
1550
|
+
propertyDamage: import_zod13.z.string().optional(),
|
|
1551
|
+
eachOccurrenceUmbrella: import_zod13.z.string().optional(),
|
|
1552
|
+
umbrellaAggregate: import_zod13.z.string().optional(),
|
|
1553
|
+
umbrellaRetention: import_zod13.z.string().optional(),
|
|
1554
|
+
statutory: import_zod13.z.boolean().optional(),
|
|
1265
1555
|
employersLiability: EmployersLiabilityLimitsSchema.optional(),
|
|
1266
|
-
sublimits:
|
|
1267
|
-
sharedLimits:
|
|
1556
|
+
sublimits: import_zod13.z.array(SublimitSchema).optional(),
|
|
1557
|
+
sharedLimits: import_zod13.z.array(SharedLimitSchema).optional(),
|
|
1268
1558
|
defenseCostTreatment: DefenseCostTreatmentSchema.optional()
|
|
1269
1559
|
});
|
|
1270
|
-
var DeductibleScheduleSchema =
|
|
1271
|
-
perClaim:
|
|
1272
|
-
perOccurrence:
|
|
1273
|
-
aggregateDeductible:
|
|
1274
|
-
selfInsuredRetention:
|
|
1275
|
-
corridorDeductible:
|
|
1276
|
-
waitingPeriod:
|
|
1277
|
-
appliesTo:
|
|
1278
|
-
});
|
|
1279
|
-
var InsuredLocationSchema =
|
|
1280
|
-
number:
|
|
1560
|
+
var DeductibleScheduleSchema = import_zod13.z.object({
|
|
1561
|
+
perClaim: import_zod13.z.string().optional(),
|
|
1562
|
+
perOccurrence: import_zod13.z.string().optional(),
|
|
1563
|
+
aggregateDeductible: import_zod13.z.string().optional(),
|
|
1564
|
+
selfInsuredRetention: import_zod13.z.string().optional(),
|
|
1565
|
+
corridorDeductible: import_zod13.z.string().optional(),
|
|
1566
|
+
waitingPeriod: import_zod13.z.string().optional(),
|
|
1567
|
+
appliesTo: import_zod13.z.enum(["damages_only", "damages_and_defense", "defense_only"]).optional()
|
|
1568
|
+
});
|
|
1569
|
+
var InsuredLocationSchema = import_zod13.z.object({
|
|
1570
|
+
number: import_zod13.z.number(),
|
|
1281
1571
|
address: AddressSchema,
|
|
1282
|
-
description:
|
|
1283
|
-
buildingValue:
|
|
1284
|
-
contentsValue:
|
|
1285
|
-
businessIncomeValue:
|
|
1286
|
-
constructionType:
|
|
1287
|
-
yearBuilt:
|
|
1288
|
-
squareFootage:
|
|
1289
|
-
protectionClass:
|
|
1290
|
-
sprinklered:
|
|
1291
|
-
alarmType:
|
|
1292
|
-
occupancy:
|
|
1293
|
-
});
|
|
1294
|
-
var VehicleCoverageSchema =
|
|
1572
|
+
description: import_zod13.z.string().optional(),
|
|
1573
|
+
buildingValue: import_zod13.z.string().optional(),
|
|
1574
|
+
contentsValue: import_zod13.z.string().optional(),
|
|
1575
|
+
businessIncomeValue: import_zod13.z.string().optional(),
|
|
1576
|
+
constructionType: import_zod13.z.string().optional(),
|
|
1577
|
+
yearBuilt: import_zod13.z.number().optional(),
|
|
1578
|
+
squareFootage: import_zod13.z.number().optional(),
|
|
1579
|
+
protectionClass: import_zod13.z.string().optional(),
|
|
1580
|
+
sprinklered: import_zod13.z.boolean().optional(),
|
|
1581
|
+
alarmType: import_zod13.z.string().optional(),
|
|
1582
|
+
occupancy: import_zod13.z.string().optional()
|
|
1583
|
+
});
|
|
1584
|
+
var VehicleCoverageSchema = import_zod13.z.object({
|
|
1295
1585
|
type: VehicleCoverageTypeSchema,
|
|
1296
|
-
limit:
|
|
1297
|
-
deductible:
|
|
1298
|
-
included:
|
|
1299
|
-
});
|
|
1300
|
-
var InsuredVehicleSchema =
|
|
1301
|
-
number:
|
|
1302
|
-
year:
|
|
1303
|
-
make:
|
|
1304
|
-
model:
|
|
1305
|
-
vin:
|
|
1306
|
-
costNew:
|
|
1307
|
-
statedValue:
|
|
1308
|
-
garageLocation:
|
|
1309
|
-
coverages:
|
|
1310
|
-
radius:
|
|
1311
|
-
vehicleType:
|
|
1312
|
-
});
|
|
1313
|
-
var ClassificationCodeSchema =
|
|
1314
|
-
code:
|
|
1315
|
-
description:
|
|
1316
|
-
premiumBasis:
|
|
1317
|
-
basisAmount:
|
|
1318
|
-
rate:
|
|
1319
|
-
premium:
|
|
1320
|
-
locationNumber:
|
|
1321
|
-
});
|
|
1322
|
-
var DwellingDetailsSchema =
|
|
1586
|
+
limit: import_zod13.z.string().optional(),
|
|
1587
|
+
deductible: import_zod13.z.string().optional(),
|
|
1588
|
+
included: import_zod13.z.boolean()
|
|
1589
|
+
});
|
|
1590
|
+
var InsuredVehicleSchema = import_zod13.z.object({
|
|
1591
|
+
number: import_zod13.z.number(),
|
|
1592
|
+
year: import_zod13.z.number(),
|
|
1593
|
+
make: import_zod13.z.string(),
|
|
1594
|
+
model: import_zod13.z.string(),
|
|
1595
|
+
vin: import_zod13.z.string(),
|
|
1596
|
+
costNew: import_zod13.z.string().optional(),
|
|
1597
|
+
statedValue: import_zod13.z.string().optional(),
|
|
1598
|
+
garageLocation: import_zod13.z.number().optional(),
|
|
1599
|
+
coverages: import_zod13.z.array(VehicleCoverageSchema).optional(),
|
|
1600
|
+
radius: import_zod13.z.string().optional(),
|
|
1601
|
+
vehicleType: import_zod13.z.string().optional()
|
|
1602
|
+
});
|
|
1603
|
+
var ClassificationCodeSchema = import_zod13.z.object({
|
|
1604
|
+
code: import_zod13.z.string(),
|
|
1605
|
+
description: import_zod13.z.string(),
|
|
1606
|
+
premiumBasis: import_zod13.z.string(),
|
|
1607
|
+
basisAmount: import_zod13.z.string().optional(),
|
|
1608
|
+
rate: import_zod13.z.string().optional(),
|
|
1609
|
+
premium: import_zod13.z.string().optional(),
|
|
1610
|
+
locationNumber: import_zod13.z.number().optional()
|
|
1611
|
+
});
|
|
1612
|
+
var DwellingDetailsSchema = import_zod13.z.object({
|
|
1323
1613
|
constructionType: ConstructionTypeSchema.optional(),
|
|
1324
|
-
yearBuilt:
|
|
1325
|
-
squareFootage:
|
|
1326
|
-
stories:
|
|
1614
|
+
yearBuilt: import_zod13.z.number().optional(),
|
|
1615
|
+
squareFootage: import_zod13.z.number().optional(),
|
|
1616
|
+
stories: import_zod13.z.number().optional(),
|
|
1327
1617
|
roofType: RoofTypeSchema.optional(),
|
|
1328
|
-
roofAge:
|
|
1329
|
-
heatingType:
|
|
1618
|
+
roofAge: import_zod13.z.number().optional(),
|
|
1619
|
+
heatingType: import_zod13.z.enum(["central", "baseboard", "radiant", "space_heater", "heat_pump", "other"]).optional(),
|
|
1330
1620
|
foundationType: FoundationTypeSchema.optional(),
|
|
1331
|
-
plumbingType:
|
|
1332
|
-
electricalType:
|
|
1333
|
-
electricalAmps:
|
|
1334
|
-
hasSwimmingPool:
|
|
1335
|
-
poolType:
|
|
1336
|
-
hasTrampoline:
|
|
1337
|
-
hasDog:
|
|
1338
|
-
dogBreed:
|
|
1339
|
-
protectiveDevices:
|
|
1340
|
-
distanceToFireStation:
|
|
1341
|
-
distanceToHydrant:
|
|
1342
|
-
fireProtectionClass:
|
|
1343
|
-
});
|
|
1344
|
-
var DriverRecordSchema =
|
|
1345
|
-
name:
|
|
1346
|
-
dateOfBirth:
|
|
1347
|
-
licenseNumber:
|
|
1348
|
-
licenseState:
|
|
1349
|
-
relationship:
|
|
1350
|
-
yearsLicensed:
|
|
1351
|
-
gender:
|
|
1352
|
-
maritalStatus:
|
|
1353
|
-
goodStudentDiscount:
|
|
1354
|
-
defensiveDriverDiscount:
|
|
1355
|
-
violations:
|
|
1356
|
-
date:
|
|
1357
|
-
type:
|
|
1358
|
-
description:
|
|
1621
|
+
plumbingType: import_zod13.z.enum(["copper", "pex", "galvanized", "polybutylene", "cpvc", "other"]).optional(),
|
|
1622
|
+
electricalType: import_zod13.z.enum(["circuit_breaker", "fuse_box", "knob_and_tube", "other"]).optional(),
|
|
1623
|
+
electricalAmps: import_zod13.z.number().optional(),
|
|
1624
|
+
hasSwimmingPool: import_zod13.z.boolean().optional(),
|
|
1625
|
+
poolType: import_zod13.z.enum(["in_ground", "above_ground"]).optional(),
|
|
1626
|
+
hasTrampoline: import_zod13.z.boolean().optional(),
|
|
1627
|
+
hasDog: import_zod13.z.boolean().optional(),
|
|
1628
|
+
dogBreed: import_zod13.z.string().optional(),
|
|
1629
|
+
protectiveDevices: import_zod13.z.array(import_zod13.z.string()).optional(),
|
|
1630
|
+
distanceToFireStation: import_zod13.z.string().optional(),
|
|
1631
|
+
distanceToHydrant: import_zod13.z.string().optional(),
|
|
1632
|
+
fireProtectionClass: import_zod13.z.string().optional()
|
|
1633
|
+
});
|
|
1634
|
+
var DriverRecordSchema = import_zod13.z.object({
|
|
1635
|
+
name: import_zod13.z.string(),
|
|
1636
|
+
dateOfBirth: import_zod13.z.string().optional(),
|
|
1637
|
+
licenseNumber: import_zod13.z.string().optional(),
|
|
1638
|
+
licenseState: import_zod13.z.string().optional(),
|
|
1639
|
+
relationship: import_zod13.z.enum(["named_insured", "spouse", "child", "other_household", "other"]).optional(),
|
|
1640
|
+
yearsLicensed: import_zod13.z.number().optional(),
|
|
1641
|
+
gender: import_zod13.z.string().optional(),
|
|
1642
|
+
maritalStatus: import_zod13.z.string().optional(),
|
|
1643
|
+
goodStudentDiscount: import_zod13.z.boolean().optional(),
|
|
1644
|
+
defensiveDriverDiscount: import_zod13.z.boolean().optional(),
|
|
1645
|
+
violations: import_zod13.z.array(import_zod13.z.object({
|
|
1646
|
+
date: import_zod13.z.string().optional(),
|
|
1647
|
+
type: import_zod13.z.string().optional(),
|
|
1648
|
+
description: import_zod13.z.string().optional()
|
|
1359
1649
|
})).optional(),
|
|
1360
|
-
accidents:
|
|
1361
|
-
date:
|
|
1362
|
-
atFault:
|
|
1363
|
-
description:
|
|
1364
|
-
amountPaid:
|
|
1650
|
+
accidents: import_zod13.z.array(import_zod13.z.object({
|
|
1651
|
+
date: import_zod13.z.string().optional(),
|
|
1652
|
+
atFault: import_zod13.z.boolean().optional(),
|
|
1653
|
+
description: import_zod13.z.string().optional(),
|
|
1654
|
+
amountPaid: import_zod13.z.string().optional()
|
|
1365
1655
|
})).optional(),
|
|
1366
|
-
sr22Required:
|
|
1367
|
-
});
|
|
1368
|
-
var PersonalVehicleDetailsSchema =
|
|
1369
|
-
number:
|
|
1370
|
-
year:
|
|
1371
|
-
make:
|
|
1372
|
-
model:
|
|
1373
|
-
vin:
|
|
1374
|
-
bodyType:
|
|
1656
|
+
sr22Required: import_zod13.z.boolean().optional()
|
|
1657
|
+
});
|
|
1658
|
+
var PersonalVehicleDetailsSchema = import_zod13.z.object({
|
|
1659
|
+
number: import_zod13.z.number().optional(),
|
|
1660
|
+
year: import_zod13.z.number().optional(),
|
|
1661
|
+
make: import_zod13.z.string().optional(),
|
|
1662
|
+
model: import_zod13.z.string().optional(),
|
|
1663
|
+
vin: import_zod13.z.string().optional(),
|
|
1664
|
+
bodyType: import_zod13.z.string().optional(),
|
|
1375
1665
|
garagingAddress: AddressSchema.optional(),
|
|
1376
1666
|
usage: PersonalAutoUsageSchema.optional(),
|
|
1377
|
-
annualMileage:
|
|
1378
|
-
odometerReading:
|
|
1379
|
-
driverAssignment:
|
|
1667
|
+
annualMileage: import_zod13.z.number().optional(),
|
|
1668
|
+
odometerReading: import_zod13.z.number().optional(),
|
|
1669
|
+
driverAssignment: import_zod13.z.string().optional(),
|
|
1380
1670
|
lienHolder: EndorsementPartySchema.optional(),
|
|
1381
|
-
collisionDeductible:
|
|
1382
|
-
comprehensiveDeductible:
|
|
1383
|
-
rentalReimbursement:
|
|
1384
|
-
towing:
|
|
1671
|
+
collisionDeductible: import_zod13.z.string().optional(),
|
|
1672
|
+
comprehensiveDeductible: import_zod13.z.string().optional(),
|
|
1673
|
+
rentalReimbursement: import_zod13.z.boolean().optional(),
|
|
1674
|
+
towing: import_zod13.z.boolean().optional()
|
|
1385
1675
|
});
|
|
1386
1676
|
|
|
1387
1677
|
// src/schemas/declarations/personal.ts
|
|
1388
|
-
var HomeownersDeclarationsSchema =
|
|
1389
|
-
line:
|
|
1678
|
+
var HomeownersDeclarationsSchema = import_zod14.z.object({
|
|
1679
|
+
line: import_zod14.z.literal("homeowners"),
|
|
1390
1680
|
formType: HomeownersFormTypeSchema,
|
|
1391
|
-
coverageA:
|
|
1392
|
-
coverageB:
|
|
1393
|
-
coverageC:
|
|
1394
|
-
coverageD:
|
|
1395
|
-
coverageE:
|
|
1396
|
-
coverageF:
|
|
1397
|
-
allPerilDeductible:
|
|
1398
|
-
windHailDeductible:
|
|
1399
|
-
hurricaneDeductible:
|
|
1681
|
+
coverageA: import_zod14.z.string().optional(),
|
|
1682
|
+
coverageB: import_zod14.z.string().optional(),
|
|
1683
|
+
coverageC: import_zod14.z.string().optional(),
|
|
1684
|
+
coverageD: import_zod14.z.string().optional(),
|
|
1685
|
+
coverageE: import_zod14.z.string().optional(),
|
|
1686
|
+
coverageF: import_zod14.z.string().optional(),
|
|
1687
|
+
allPerilDeductible: import_zod14.z.string().optional(),
|
|
1688
|
+
windHailDeductible: import_zod14.z.string().optional(),
|
|
1689
|
+
hurricaneDeductible: import_zod14.z.string().optional(),
|
|
1400
1690
|
lossSettlement: LossSettlementSchema.optional(),
|
|
1401
1691
|
dwelling: DwellingDetailsSchema,
|
|
1402
1692
|
mortgagee: EndorsementPartySchema.optional(),
|
|
1403
|
-
additionalMortgagees:
|
|
1404
|
-
});
|
|
1405
|
-
var PersonalAutoDeclarationsSchema =
|
|
1406
|
-
line:
|
|
1407
|
-
vehicles:
|
|
1408
|
-
drivers:
|
|
1409
|
-
liabilityLimits:
|
|
1410
|
-
bodilyInjuryPerPerson:
|
|
1411
|
-
bodilyInjuryPerAccident:
|
|
1412
|
-
propertyDamage:
|
|
1413
|
-
combinedSingleLimit:
|
|
1693
|
+
additionalMortgagees: import_zod14.z.array(EndorsementPartySchema).optional()
|
|
1694
|
+
});
|
|
1695
|
+
var PersonalAutoDeclarationsSchema = import_zod14.z.object({
|
|
1696
|
+
line: import_zod14.z.literal("personal_auto"),
|
|
1697
|
+
vehicles: import_zod14.z.array(PersonalVehicleDetailsSchema),
|
|
1698
|
+
drivers: import_zod14.z.array(DriverRecordSchema),
|
|
1699
|
+
liabilityLimits: import_zod14.z.object({
|
|
1700
|
+
bodilyInjuryPerPerson: import_zod14.z.string().optional(),
|
|
1701
|
+
bodilyInjuryPerAccident: import_zod14.z.string().optional(),
|
|
1702
|
+
propertyDamage: import_zod14.z.string().optional(),
|
|
1703
|
+
combinedSingleLimit: import_zod14.z.string().optional()
|
|
1414
1704
|
}).optional(),
|
|
1415
|
-
umLimits:
|
|
1416
|
-
bodilyInjuryPerPerson:
|
|
1417
|
-
bodilyInjuryPerAccident:
|
|
1705
|
+
umLimits: import_zod14.z.object({
|
|
1706
|
+
bodilyInjuryPerPerson: import_zod14.z.string().optional(),
|
|
1707
|
+
bodilyInjuryPerAccident: import_zod14.z.string().optional()
|
|
1418
1708
|
}).optional(),
|
|
1419
|
-
uimLimits:
|
|
1420
|
-
bodilyInjuryPerPerson:
|
|
1421
|
-
bodilyInjuryPerAccident:
|
|
1709
|
+
uimLimits: import_zod14.z.object({
|
|
1710
|
+
bodilyInjuryPerPerson: import_zod14.z.string().optional(),
|
|
1711
|
+
bodilyInjuryPerAccident: import_zod14.z.string().optional()
|
|
1422
1712
|
}).optional(),
|
|
1423
|
-
pipLimit:
|
|
1424
|
-
medPayLimit:
|
|
1713
|
+
pipLimit: import_zod14.z.string().optional(),
|
|
1714
|
+
medPayLimit: import_zod14.z.string().optional()
|
|
1425
1715
|
});
|
|
1426
|
-
var DwellingFireDeclarationsSchema =
|
|
1427
|
-
line:
|
|
1716
|
+
var DwellingFireDeclarationsSchema = import_zod14.z.object({
|
|
1717
|
+
line: import_zod14.z.literal("dwelling_fire"),
|
|
1428
1718
|
formType: DwellingFireFormTypeSchema,
|
|
1429
|
-
dwellingLimit:
|
|
1430
|
-
otherStructuresLimit:
|
|
1431
|
-
personalPropertyLimit:
|
|
1432
|
-
fairRentalValueLimit:
|
|
1433
|
-
liabilityLimit:
|
|
1434
|
-
medicalPaymentsLimit:
|
|
1435
|
-
deductible:
|
|
1719
|
+
dwellingLimit: import_zod14.z.string().optional(),
|
|
1720
|
+
otherStructuresLimit: import_zod14.z.string().optional(),
|
|
1721
|
+
personalPropertyLimit: import_zod14.z.string().optional(),
|
|
1722
|
+
fairRentalValueLimit: import_zod14.z.string().optional(),
|
|
1723
|
+
liabilityLimit: import_zod14.z.string().optional(),
|
|
1724
|
+
medicalPaymentsLimit: import_zod14.z.string().optional(),
|
|
1725
|
+
deductible: import_zod14.z.string().optional(),
|
|
1436
1726
|
dwelling: DwellingDetailsSchema
|
|
1437
1727
|
});
|
|
1438
|
-
var FloodDeclarationsSchema =
|
|
1439
|
-
line:
|
|
1440
|
-
programType:
|
|
1728
|
+
var FloodDeclarationsSchema = import_zod14.z.object({
|
|
1729
|
+
line: import_zod14.z.literal("flood"),
|
|
1730
|
+
programType: import_zod14.z.enum(["nfip", "private"]),
|
|
1441
1731
|
floodZone: FloodZoneSchema.optional(),
|
|
1442
|
-
communityNumber:
|
|
1443
|
-
communityRating:
|
|
1444
|
-
buildingCoverage:
|
|
1445
|
-
contentsCoverage:
|
|
1446
|
-
iccCoverage:
|
|
1447
|
-
deductible:
|
|
1448
|
-
waitingPeriodDays:
|
|
1449
|
-
elevationCertificate:
|
|
1450
|
-
elevationDifference:
|
|
1451
|
-
buildingDiagramNumber:
|
|
1452
|
-
basementOrEnclosure:
|
|
1453
|
-
postFirmConstruction:
|
|
1454
|
-
});
|
|
1455
|
-
var EarthquakeDeclarationsSchema =
|
|
1456
|
-
line:
|
|
1457
|
-
dwellingCoverage:
|
|
1458
|
-
contentsCoverage:
|
|
1459
|
-
lossOfUseCoverage:
|
|
1460
|
-
deductiblePercent:
|
|
1461
|
-
retrofitDiscount:
|
|
1462
|
-
masonryVeneerCoverage:
|
|
1463
|
-
});
|
|
1464
|
-
var PersonalUmbrellaDeclarationsSchema =
|
|
1465
|
-
line:
|
|
1466
|
-
perOccurrenceLimit:
|
|
1467
|
-
aggregateLimit:
|
|
1468
|
-
retainedLimit:
|
|
1469
|
-
underlyingPolicies:
|
|
1470
|
-
carrier:
|
|
1471
|
-
policyNumber:
|
|
1472
|
-
policyType:
|
|
1473
|
-
limits:
|
|
1732
|
+
communityNumber: import_zod14.z.string().optional(),
|
|
1733
|
+
communityRating: import_zod14.z.number().optional(),
|
|
1734
|
+
buildingCoverage: import_zod14.z.string().optional(),
|
|
1735
|
+
contentsCoverage: import_zod14.z.string().optional(),
|
|
1736
|
+
iccCoverage: import_zod14.z.string().optional(),
|
|
1737
|
+
deductible: import_zod14.z.string().optional(),
|
|
1738
|
+
waitingPeriodDays: import_zod14.z.number().optional(),
|
|
1739
|
+
elevationCertificate: import_zod14.z.boolean().optional(),
|
|
1740
|
+
elevationDifference: import_zod14.z.string().optional(),
|
|
1741
|
+
buildingDiagramNumber: import_zod14.z.number().optional(),
|
|
1742
|
+
basementOrEnclosure: import_zod14.z.boolean().optional(),
|
|
1743
|
+
postFirmConstruction: import_zod14.z.boolean().optional()
|
|
1744
|
+
});
|
|
1745
|
+
var EarthquakeDeclarationsSchema = import_zod14.z.object({
|
|
1746
|
+
line: import_zod14.z.literal("earthquake"),
|
|
1747
|
+
dwellingCoverage: import_zod14.z.string().optional(),
|
|
1748
|
+
contentsCoverage: import_zod14.z.string().optional(),
|
|
1749
|
+
lossOfUseCoverage: import_zod14.z.string().optional(),
|
|
1750
|
+
deductiblePercent: import_zod14.z.number().optional(),
|
|
1751
|
+
retrofitDiscount: import_zod14.z.boolean().optional(),
|
|
1752
|
+
masonryVeneerCoverage: import_zod14.z.boolean().optional()
|
|
1753
|
+
});
|
|
1754
|
+
var PersonalUmbrellaDeclarationsSchema = import_zod14.z.object({
|
|
1755
|
+
line: import_zod14.z.literal("personal_umbrella"),
|
|
1756
|
+
perOccurrenceLimit: import_zod14.z.string().optional(),
|
|
1757
|
+
aggregateLimit: import_zod14.z.string().optional(),
|
|
1758
|
+
retainedLimit: import_zod14.z.string().optional(),
|
|
1759
|
+
underlyingPolicies: import_zod14.z.array(import_zod14.z.object({
|
|
1760
|
+
carrier: import_zod14.z.string().optional(),
|
|
1761
|
+
policyNumber: import_zod14.z.string().optional(),
|
|
1762
|
+
policyType: import_zod14.z.string().optional(),
|
|
1763
|
+
limits: import_zod14.z.string().optional()
|
|
1474
1764
|
}))
|
|
1475
1765
|
});
|
|
1476
|
-
var PersonalArticlesDeclarationsSchema =
|
|
1477
|
-
line:
|
|
1478
|
-
scheduledItems:
|
|
1479
|
-
itemNumber:
|
|
1766
|
+
var PersonalArticlesDeclarationsSchema = import_zod14.z.object({
|
|
1767
|
+
line: import_zod14.z.literal("personal_articles"),
|
|
1768
|
+
scheduledItems: import_zod14.z.array(import_zod14.z.object({
|
|
1769
|
+
itemNumber: import_zod14.z.number().optional(),
|
|
1480
1770
|
category: ScheduledItemCategorySchema.optional(),
|
|
1481
|
-
description:
|
|
1482
|
-
appraisedValue:
|
|
1483
|
-
appraisalDate:
|
|
1771
|
+
description: import_zod14.z.string(),
|
|
1772
|
+
appraisedValue: import_zod14.z.string(),
|
|
1773
|
+
appraisalDate: import_zod14.z.string().optional()
|
|
1484
1774
|
})),
|
|
1485
|
-
blanketCoverage:
|
|
1486
|
-
deductible:
|
|
1487
|
-
worldwideCoverage:
|
|
1488
|
-
breakageCoverage:
|
|
1775
|
+
blanketCoverage: import_zod14.z.string().optional(),
|
|
1776
|
+
deductible: import_zod14.z.string().optional(),
|
|
1777
|
+
worldwideCoverage: import_zod14.z.boolean().optional(),
|
|
1778
|
+
breakageCoverage: import_zod14.z.boolean().optional()
|
|
1489
1779
|
});
|
|
1490
|
-
var WatercraftDeclarationsSchema =
|
|
1491
|
-
line:
|
|
1780
|
+
var WatercraftDeclarationsSchema = import_zod14.z.object({
|
|
1781
|
+
line: import_zod14.z.literal("watercraft"),
|
|
1492
1782
|
boatType: BoatTypeSchema.optional(),
|
|
1493
|
-
year:
|
|
1494
|
-
make:
|
|
1495
|
-
model:
|
|
1496
|
-
length:
|
|
1497
|
-
hullMaterial:
|
|
1498
|
-
hullValue:
|
|
1499
|
-
motorHorsepower:
|
|
1500
|
-
motorType:
|
|
1501
|
-
navigationLimits:
|
|
1502
|
-
layupPeriod:
|
|
1503
|
-
liabilityLimit:
|
|
1504
|
-
medicalPaymentsLimit:
|
|
1505
|
-
physicalDamageDeductible:
|
|
1506
|
-
uninsuredBoaterLimit:
|
|
1507
|
-
trailerCovered:
|
|
1508
|
-
trailerValue:
|
|
1509
|
-
});
|
|
1510
|
-
var RecreationalVehicleDeclarationsSchema =
|
|
1511
|
-
line:
|
|
1783
|
+
year: import_zod14.z.number().optional(),
|
|
1784
|
+
make: import_zod14.z.string().optional(),
|
|
1785
|
+
model: import_zod14.z.string().optional(),
|
|
1786
|
+
length: import_zod14.z.string().optional(),
|
|
1787
|
+
hullMaterial: import_zod14.z.enum(["fiberglass", "aluminum", "wood", "steel", "inflatable", "other"]).optional(),
|
|
1788
|
+
hullValue: import_zod14.z.string().optional(),
|
|
1789
|
+
motorHorsepower: import_zod14.z.number().optional(),
|
|
1790
|
+
motorType: import_zod14.z.enum(["outboard", "inboard", "inboard_outboard", "jet"]).optional(),
|
|
1791
|
+
navigationLimits: import_zod14.z.string().optional(),
|
|
1792
|
+
layupPeriod: import_zod14.z.string().optional(),
|
|
1793
|
+
liabilityLimit: import_zod14.z.string().optional(),
|
|
1794
|
+
medicalPaymentsLimit: import_zod14.z.string().optional(),
|
|
1795
|
+
physicalDamageDeductible: import_zod14.z.string().optional(),
|
|
1796
|
+
uninsuredBoaterLimit: import_zod14.z.string().optional(),
|
|
1797
|
+
trailerCovered: import_zod14.z.boolean().optional(),
|
|
1798
|
+
trailerValue: import_zod14.z.string().optional()
|
|
1799
|
+
});
|
|
1800
|
+
var RecreationalVehicleDeclarationsSchema = import_zod14.z.object({
|
|
1801
|
+
line: import_zod14.z.literal("recreational_vehicle"),
|
|
1512
1802
|
vehicleType: RVTypeSchema,
|
|
1513
|
-
year:
|
|
1514
|
-
make:
|
|
1515
|
-
model:
|
|
1516
|
-
vin:
|
|
1517
|
-
value:
|
|
1518
|
-
liabilityLimit:
|
|
1519
|
-
collisionDeductible:
|
|
1520
|
-
comprehensiveDeductible:
|
|
1521
|
-
personalEffectsCoverage:
|
|
1522
|
-
fullTimerCoverage:
|
|
1523
|
-
});
|
|
1524
|
-
var FarmRanchDeclarationsSchema =
|
|
1525
|
-
line:
|
|
1526
|
-
dwellingCoverage:
|
|
1527
|
-
farmPersonalPropertyCoverage:
|
|
1528
|
-
farmLiabilityLimit:
|
|
1529
|
-
farmAutoIncluded:
|
|
1530
|
-
livestock:
|
|
1531
|
-
type:
|
|
1532
|
-
headCount:
|
|
1533
|
-
value:
|
|
1803
|
+
year: import_zod14.z.number().optional(),
|
|
1804
|
+
make: import_zod14.z.string().optional(),
|
|
1805
|
+
model: import_zod14.z.string().optional(),
|
|
1806
|
+
vin: import_zod14.z.string().optional(),
|
|
1807
|
+
value: import_zod14.z.string().optional(),
|
|
1808
|
+
liabilityLimit: import_zod14.z.string().optional(),
|
|
1809
|
+
collisionDeductible: import_zod14.z.string().optional(),
|
|
1810
|
+
comprehensiveDeductible: import_zod14.z.string().optional(),
|
|
1811
|
+
personalEffectsCoverage: import_zod14.z.string().optional(),
|
|
1812
|
+
fullTimerCoverage: import_zod14.z.boolean().optional()
|
|
1813
|
+
});
|
|
1814
|
+
var FarmRanchDeclarationsSchema = import_zod14.z.object({
|
|
1815
|
+
line: import_zod14.z.literal("farm_ranch"),
|
|
1816
|
+
dwellingCoverage: import_zod14.z.string().optional(),
|
|
1817
|
+
farmPersonalPropertyCoverage: import_zod14.z.string().optional(),
|
|
1818
|
+
farmLiabilityLimit: import_zod14.z.string().optional(),
|
|
1819
|
+
farmAutoIncluded: import_zod14.z.boolean().optional(),
|
|
1820
|
+
livestock: import_zod14.z.array(import_zod14.z.object({
|
|
1821
|
+
type: import_zod14.z.string(),
|
|
1822
|
+
headCount: import_zod14.z.number(),
|
|
1823
|
+
value: import_zod14.z.string().optional()
|
|
1534
1824
|
})).optional(),
|
|
1535
|
-
equipmentSchedule:
|
|
1536
|
-
description:
|
|
1537
|
-
value:
|
|
1825
|
+
equipmentSchedule: import_zod14.z.array(import_zod14.z.object({
|
|
1826
|
+
description: import_zod14.z.string(),
|
|
1827
|
+
value: import_zod14.z.string()
|
|
1538
1828
|
})).optional(),
|
|
1539
|
-
acreage:
|
|
1829
|
+
acreage: import_zod14.z.number().optional(),
|
|
1540
1830
|
dwelling: DwellingDetailsSchema.optional()
|
|
1541
1831
|
});
|
|
1542
|
-
var TitleDeclarationsSchema =
|
|
1543
|
-
line:
|
|
1832
|
+
var TitleDeclarationsSchema = import_zod14.z.object({
|
|
1833
|
+
line: import_zod14.z.literal("title"),
|
|
1544
1834
|
policyType: TitlePolicyTypeSchema,
|
|
1545
|
-
policyAmount:
|
|
1546
|
-
legalDescription:
|
|
1835
|
+
policyAmount: import_zod14.z.string(),
|
|
1836
|
+
legalDescription: import_zod14.z.string().optional(),
|
|
1547
1837
|
propertyAddress: AddressSchema.optional(),
|
|
1548
|
-
effectiveDate:
|
|
1549
|
-
exceptions:
|
|
1550
|
-
number:
|
|
1551
|
-
description:
|
|
1838
|
+
effectiveDate: import_zod14.z.string().optional(),
|
|
1839
|
+
exceptions: import_zod14.z.array(import_zod14.z.object({
|
|
1840
|
+
number: import_zod14.z.number(),
|
|
1841
|
+
description: import_zod14.z.string()
|
|
1552
1842
|
})).optional(),
|
|
1553
|
-
underwriter:
|
|
1843
|
+
underwriter: import_zod14.z.string().optional()
|
|
1554
1844
|
});
|
|
1555
|
-
var PetDeclarationsSchema =
|
|
1556
|
-
line:
|
|
1845
|
+
var PetDeclarationsSchema = import_zod14.z.object({
|
|
1846
|
+
line: import_zod14.z.literal("pet"),
|
|
1557
1847
|
species: PetSpeciesSchema,
|
|
1558
|
-
breed:
|
|
1559
|
-
petName:
|
|
1560
|
-
age:
|
|
1561
|
-
annualLimit:
|
|
1562
|
-
perIncidentLimit:
|
|
1563
|
-
deductible:
|
|
1564
|
-
reimbursementPercent:
|
|
1565
|
-
waitingPeriodDays:
|
|
1566
|
-
preExistingConditionsExcluded:
|
|
1567
|
-
wellnessCoverage:
|
|
1568
|
-
});
|
|
1569
|
-
var TravelDeclarationsSchema =
|
|
1570
|
-
line:
|
|
1571
|
-
tripDepartureDate:
|
|
1572
|
-
tripReturnDate:
|
|
1573
|
-
destinations:
|
|
1574
|
-
travelers:
|
|
1575
|
-
name:
|
|
1576
|
-
age:
|
|
1848
|
+
breed: import_zod14.z.string().optional(),
|
|
1849
|
+
petName: import_zod14.z.string().optional(),
|
|
1850
|
+
age: import_zod14.z.number().optional(),
|
|
1851
|
+
annualLimit: import_zod14.z.string().optional(),
|
|
1852
|
+
perIncidentLimit: import_zod14.z.string().optional(),
|
|
1853
|
+
deductible: import_zod14.z.string().optional(),
|
|
1854
|
+
reimbursementPercent: import_zod14.z.number().optional(),
|
|
1855
|
+
waitingPeriodDays: import_zod14.z.number().optional(),
|
|
1856
|
+
preExistingConditionsExcluded: import_zod14.z.boolean().optional(),
|
|
1857
|
+
wellnessCoverage: import_zod14.z.boolean().optional()
|
|
1858
|
+
});
|
|
1859
|
+
var TravelDeclarationsSchema = import_zod14.z.object({
|
|
1860
|
+
line: import_zod14.z.literal("travel"),
|
|
1861
|
+
tripDepartureDate: import_zod14.z.string().optional(),
|
|
1862
|
+
tripReturnDate: import_zod14.z.string().optional(),
|
|
1863
|
+
destinations: import_zod14.z.array(import_zod14.z.string()).optional(),
|
|
1864
|
+
travelers: import_zod14.z.array(import_zod14.z.object({
|
|
1865
|
+
name: import_zod14.z.string(),
|
|
1866
|
+
age: import_zod14.z.number().optional()
|
|
1577
1867
|
})).optional(),
|
|
1578
|
-
tripCost:
|
|
1579
|
-
tripCancellationLimit:
|
|
1580
|
-
medicalLimit:
|
|
1581
|
-
evacuationLimit:
|
|
1582
|
-
baggageLimit:
|
|
1868
|
+
tripCost: import_zod14.z.string().optional(),
|
|
1869
|
+
tripCancellationLimit: import_zod14.z.string().optional(),
|
|
1870
|
+
medicalLimit: import_zod14.z.string().optional(),
|
|
1871
|
+
evacuationLimit: import_zod14.z.string().optional(),
|
|
1872
|
+
baggageLimit: import_zod14.z.string().optional()
|
|
1583
1873
|
});
|
|
1584
|
-
var IdentityTheftDeclarationsSchema =
|
|
1585
|
-
line:
|
|
1586
|
-
coverageLimit:
|
|
1587
|
-
expenseReimbursement:
|
|
1588
|
-
creditMonitoring:
|
|
1589
|
-
restorationServices:
|
|
1590
|
-
lostWagesLimit:
|
|
1874
|
+
var IdentityTheftDeclarationsSchema = import_zod14.z.object({
|
|
1875
|
+
line: import_zod14.z.literal("identity_theft"),
|
|
1876
|
+
coverageLimit: import_zod14.z.string().optional(),
|
|
1877
|
+
expenseReimbursement: import_zod14.z.string().optional(),
|
|
1878
|
+
creditMonitoring: import_zod14.z.boolean().optional(),
|
|
1879
|
+
restorationServices: import_zod14.z.boolean().optional(),
|
|
1880
|
+
lostWagesLimit: import_zod14.z.string().optional()
|
|
1591
1881
|
});
|
|
1592
1882
|
|
|
1593
1883
|
// src/schemas/declarations/commercial.ts
|
|
1594
|
-
var
|
|
1595
|
-
var GLDeclarationsSchema =
|
|
1596
|
-
line:
|
|
1884
|
+
var import_zod15 = require("zod");
|
|
1885
|
+
var GLDeclarationsSchema = import_zod15.z.object({
|
|
1886
|
+
line: import_zod15.z.literal("gl"),
|
|
1597
1887
|
coverageForm: CoverageFormSchema.optional(),
|
|
1598
|
-
perOccurrenceLimit:
|
|
1599
|
-
generalAggregate:
|
|
1600
|
-
productsCompletedOpsAggregate:
|
|
1601
|
-
personalAdvertisingInjury:
|
|
1602
|
-
fireDamage:
|
|
1603
|
-
medicalExpense:
|
|
1888
|
+
perOccurrenceLimit: import_zod15.z.string().optional(),
|
|
1889
|
+
generalAggregate: import_zod15.z.string().optional(),
|
|
1890
|
+
productsCompletedOpsAggregate: import_zod15.z.string().optional(),
|
|
1891
|
+
personalAdvertisingInjury: import_zod15.z.string().optional(),
|
|
1892
|
+
fireDamage: import_zod15.z.string().optional(),
|
|
1893
|
+
medicalExpense: import_zod15.z.string().optional(),
|
|
1604
1894
|
defenseCostTreatment: DefenseCostTreatmentSchema.optional(),
|
|
1605
|
-
deductible:
|
|
1606
|
-
classifications:
|
|
1607
|
-
retroactiveDate:
|
|
1608
|
-
});
|
|
1609
|
-
var CommercialPropertyDeclarationsSchema =
|
|
1610
|
-
line:
|
|
1611
|
-
causesOfLossForm:
|
|
1612
|
-
coinsurancePercent:
|
|
1895
|
+
deductible: import_zod15.z.string().optional(),
|
|
1896
|
+
classifications: import_zod15.z.array(ClassificationCodeSchema).optional(),
|
|
1897
|
+
retroactiveDate: import_zod15.z.string().optional()
|
|
1898
|
+
});
|
|
1899
|
+
var CommercialPropertyDeclarationsSchema = import_zod15.z.object({
|
|
1900
|
+
line: import_zod15.z.literal("commercial_property"),
|
|
1901
|
+
causesOfLossForm: import_zod15.z.enum(["basic", "broad", "special"]).optional(),
|
|
1902
|
+
coinsurancePercent: import_zod15.z.number().optional(),
|
|
1613
1903
|
valuationMethod: ValuationMethodSchema.optional(),
|
|
1614
|
-
locations:
|
|
1615
|
-
blanketLimit:
|
|
1616
|
-
businessIncomeLimit:
|
|
1617
|
-
extraExpenseLimit:
|
|
1618
|
-
});
|
|
1619
|
-
var CommercialAutoDeclarationsSchema =
|
|
1620
|
-
line:
|
|
1621
|
-
vehicles:
|
|
1622
|
-
coveredAutoSymbols:
|
|
1623
|
-
liabilityLimit:
|
|
1624
|
-
umLimit:
|
|
1625
|
-
uimLimit:
|
|
1626
|
-
hiredAutoLiability:
|
|
1627
|
-
nonOwnedAutoLiability:
|
|
1628
|
-
});
|
|
1629
|
-
var WorkersCompDeclarationsSchema =
|
|
1630
|
-
line:
|
|
1631
|
-
coveredStates:
|
|
1632
|
-
classifications:
|
|
1904
|
+
locations: import_zod15.z.array(InsuredLocationSchema),
|
|
1905
|
+
blanketLimit: import_zod15.z.string().optional(),
|
|
1906
|
+
businessIncomeLimit: import_zod15.z.string().optional(),
|
|
1907
|
+
extraExpenseLimit: import_zod15.z.string().optional()
|
|
1908
|
+
});
|
|
1909
|
+
var CommercialAutoDeclarationsSchema = import_zod15.z.object({
|
|
1910
|
+
line: import_zod15.z.literal("commercial_auto"),
|
|
1911
|
+
vehicles: import_zod15.z.array(InsuredVehicleSchema),
|
|
1912
|
+
coveredAutoSymbols: import_zod15.z.array(import_zod15.z.number()).optional(),
|
|
1913
|
+
liabilityLimit: import_zod15.z.string().optional(),
|
|
1914
|
+
umLimit: import_zod15.z.string().optional(),
|
|
1915
|
+
uimLimit: import_zod15.z.string().optional(),
|
|
1916
|
+
hiredAutoLiability: import_zod15.z.boolean().optional(),
|
|
1917
|
+
nonOwnedAutoLiability: import_zod15.z.boolean().optional()
|
|
1918
|
+
});
|
|
1919
|
+
var WorkersCompDeclarationsSchema = import_zod15.z.object({
|
|
1920
|
+
line: import_zod15.z.literal("workers_comp"),
|
|
1921
|
+
coveredStates: import_zod15.z.array(import_zod15.z.string()).optional(),
|
|
1922
|
+
classifications: import_zod15.z.array(ClassificationCodeSchema),
|
|
1633
1923
|
experienceMod: ExperienceModSchema.optional(),
|
|
1634
1924
|
employersLiability: EmployersLiabilityLimitsSchema.optional()
|
|
1635
1925
|
});
|
|
1636
|
-
var UmbrellaExcessDeclarationsSchema =
|
|
1637
|
-
line:
|
|
1638
|
-
perOccurrenceLimit:
|
|
1639
|
-
aggregateLimit:
|
|
1640
|
-
retention:
|
|
1641
|
-
underlyingPolicies:
|
|
1642
|
-
carrier:
|
|
1643
|
-
policyNumber:
|
|
1644
|
-
policyType:
|
|
1645
|
-
limits:
|
|
1926
|
+
var UmbrellaExcessDeclarationsSchema = import_zod15.z.object({
|
|
1927
|
+
line: import_zod15.z.literal("umbrella_excess"),
|
|
1928
|
+
perOccurrenceLimit: import_zod15.z.string().optional(),
|
|
1929
|
+
aggregateLimit: import_zod15.z.string().optional(),
|
|
1930
|
+
retention: import_zod15.z.string().optional(),
|
|
1931
|
+
underlyingPolicies: import_zod15.z.array(import_zod15.z.object({
|
|
1932
|
+
carrier: import_zod15.z.string().optional(),
|
|
1933
|
+
policyNumber: import_zod15.z.string().optional(),
|
|
1934
|
+
policyType: import_zod15.z.string().optional(),
|
|
1935
|
+
limits: import_zod15.z.string().optional()
|
|
1646
1936
|
}))
|
|
1647
1937
|
});
|
|
1648
|
-
var ProfessionalLiabilityDeclarationsSchema =
|
|
1649
|
-
line:
|
|
1650
|
-
perClaimLimit:
|
|
1651
|
-
aggregateLimit:
|
|
1652
|
-
retroactiveDate:
|
|
1938
|
+
var ProfessionalLiabilityDeclarationsSchema = import_zod15.z.object({
|
|
1939
|
+
line: import_zod15.z.literal("professional_liability"),
|
|
1940
|
+
perClaimLimit: import_zod15.z.string().optional(),
|
|
1941
|
+
aggregateLimit: import_zod15.z.string().optional(),
|
|
1942
|
+
retroactiveDate: import_zod15.z.string().optional(),
|
|
1653
1943
|
defenseCostTreatment: DefenseCostTreatmentSchema.optional(),
|
|
1654
1944
|
extendedReportingPeriod: ExtendedReportingPeriodSchema.optional()
|
|
1655
1945
|
});
|
|
1656
|
-
var CyberDeclarationsSchema =
|
|
1657
|
-
line:
|
|
1658
|
-
aggregateLimit:
|
|
1659
|
-
retroactiveDate:
|
|
1660
|
-
waitingPeriodHours:
|
|
1661
|
-
sublimits:
|
|
1662
|
-
coverageName:
|
|
1663
|
-
limit:
|
|
1946
|
+
var CyberDeclarationsSchema = import_zod15.z.object({
|
|
1947
|
+
line: import_zod15.z.literal("cyber"),
|
|
1948
|
+
aggregateLimit: import_zod15.z.string().optional(),
|
|
1949
|
+
retroactiveDate: import_zod15.z.string().optional(),
|
|
1950
|
+
waitingPeriodHours: import_zod15.z.number().optional(),
|
|
1951
|
+
sublimits: import_zod15.z.array(import_zod15.z.object({
|
|
1952
|
+
coverageName: import_zod15.z.string(),
|
|
1953
|
+
limit: import_zod15.z.string()
|
|
1664
1954
|
})).optional()
|
|
1665
1955
|
});
|
|
1666
|
-
var DODeclarationsSchema =
|
|
1667
|
-
line:
|
|
1668
|
-
sideALimit:
|
|
1669
|
-
sideBLimit:
|
|
1670
|
-
sideCLimit:
|
|
1671
|
-
sideARetention:
|
|
1672
|
-
sideBRetention:
|
|
1673
|
-
sideCRetention:
|
|
1674
|
-
continuityDate:
|
|
1675
|
-
});
|
|
1676
|
-
var CrimeDeclarationsSchema =
|
|
1677
|
-
line:
|
|
1678
|
-
formType:
|
|
1679
|
-
agreements:
|
|
1680
|
-
agreement:
|
|
1681
|
-
coverageName:
|
|
1682
|
-
limit:
|
|
1683
|
-
deductible:
|
|
1956
|
+
var DODeclarationsSchema = import_zod15.z.object({
|
|
1957
|
+
line: import_zod15.z.literal("directors_officers"),
|
|
1958
|
+
sideALimit: import_zod15.z.string().optional(),
|
|
1959
|
+
sideBLimit: import_zod15.z.string().optional(),
|
|
1960
|
+
sideCLimit: import_zod15.z.string().optional(),
|
|
1961
|
+
sideARetention: import_zod15.z.string().optional(),
|
|
1962
|
+
sideBRetention: import_zod15.z.string().optional(),
|
|
1963
|
+
sideCRetention: import_zod15.z.string().optional(),
|
|
1964
|
+
continuityDate: import_zod15.z.string().optional()
|
|
1965
|
+
});
|
|
1966
|
+
var CrimeDeclarationsSchema = import_zod15.z.object({
|
|
1967
|
+
line: import_zod15.z.literal("crime"),
|
|
1968
|
+
formType: import_zod15.z.enum(["discovery", "loss_sustained"]).optional(),
|
|
1969
|
+
agreements: import_zod15.z.array(import_zod15.z.object({
|
|
1970
|
+
agreement: import_zod15.z.string(),
|
|
1971
|
+
coverageName: import_zod15.z.string(),
|
|
1972
|
+
limit: import_zod15.z.string(),
|
|
1973
|
+
deductible: import_zod15.z.string()
|
|
1684
1974
|
}))
|
|
1685
1975
|
});
|
|
1686
1976
|
|
|
1687
1977
|
// src/schemas/declarations/index.ts
|
|
1688
|
-
var DeclarationsSchema =
|
|
1978
|
+
var DeclarationsSchema = import_zod16.z.discriminatedUnion("line", [
|
|
1689
1979
|
// Personal lines
|
|
1690
1980
|
HomeownersDeclarationsSchema,
|
|
1691
1981
|
PersonalAutoDeclarationsSchema,
|
|
@@ -1714,251 +2004,251 @@ var DeclarationsSchema = import_zod15.z.discriminatedUnion("line", [
|
|
|
1714
2004
|
]);
|
|
1715
2005
|
|
|
1716
2006
|
// src/schemas/document.ts
|
|
1717
|
-
var
|
|
1718
|
-
var SubsectionSchema =
|
|
1719
|
-
title:
|
|
1720
|
-
sectionNumber:
|
|
1721
|
-
pageNumber:
|
|
1722
|
-
excerpt:
|
|
1723
|
-
content:
|
|
1724
|
-
documentNodeId:
|
|
1725
|
-
sourceSpanIds:
|
|
1726
|
-
sourceTextHash:
|
|
1727
|
-
});
|
|
1728
|
-
var SectionSchema =
|
|
1729
|
-
title:
|
|
1730
|
-
sectionNumber:
|
|
1731
|
-
pageStart:
|
|
1732
|
-
pageEnd:
|
|
1733
|
-
type:
|
|
1734
|
-
coverageType:
|
|
1735
|
-
excerpt:
|
|
1736
|
-
content:
|
|
1737
|
-
subsections:
|
|
1738
|
-
recordId:
|
|
1739
|
-
documentNodeId:
|
|
1740
|
-
sourceSpanIds:
|
|
1741
|
-
sourceTextHash:
|
|
1742
|
-
});
|
|
1743
|
-
var SubjectivitySchema =
|
|
1744
|
-
description:
|
|
1745
|
-
category:
|
|
1746
|
-
});
|
|
1747
|
-
var UnderwritingConditionSchema =
|
|
1748
|
-
description:
|
|
1749
|
-
});
|
|
1750
|
-
var PremiumLineSchema =
|
|
1751
|
-
line:
|
|
1752
|
-
amount:
|
|
1753
|
-
amountValue:
|
|
1754
|
-
documentNodeId:
|
|
1755
|
-
sourceSpanIds:
|
|
1756
|
-
sourceTextHash:
|
|
1757
|
-
});
|
|
1758
|
-
var AuxiliaryFactSchema =
|
|
1759
|
-
key:
|
|
1760
|
-
value:
|
|
1761
|
-
subject:
|
|
1762
|
-
context:
|
|
1763
|
-
documentNodeId:
|
|
1764
|
-
sourceSpanIds:
|
|
1765
|
-
sourceTextHash:
|
|
1766
|
-
});
|
|
1767
|
-
var DefinitionSchema =
|
|
1768
|
-
term:
|
|
1769
|
-
definition:
|
|
1770
|
-
pageNumber:
|
|
1771
|
-
formNumber:
|
|
1772
|
-
formTitle:
|
|
1773
|
-
sectionRef:
|
|
1774
|
-
originalContent:
|
|
1775
|
-
recordId:
|
|
1776
|
-
documentNodeId:
|
|
1777
|
-
sourceSpanIds:
|
|
1778
|
-
sourceTextHash:
|
|
1779
|
-
});
|
|
1780
|
-
var CoveredReasonSchema =
|
|
1781
|
-
coverageName:
|
|
1782
|
-
reasonNumber:
|
|
1783
|
-
title:
|
|
1784
|
-
content:
|
|
1785
|
-
conditions:
|
|
1786
|
-
exceptions:
|
|
1787
|
-
appliesTo:
|
|
1788
|
-
pageNumber:
|
|
1789
|
-
formNumber:
|
|
1790
|
-
formTitle:
|
|
1791
|
-
sectionRef:
|
|
1792
|
-
originalContent:
|
|
1793
|
-
recordId:
|
|
1794
|
-
documentNodeId:
|
|
1795
|
-
sourceSpanIds:
|
|
1796
|
-
sourceTextHash:
|
|
1797
|
-
});
|
|
1798
|
-
var DocumentTableOfContentsEntrySchema =
|
|
1799
|
-
title:
|
|
1800
|
-
level:
|
|
1801
|
-
pageStart:
|
|
1802
|
-
pageEnd:
|
|
1803
|
-
documentNodeId:
|
|
1804
|
-
sourceSpanIds:
|
|
1805
|
-
});
|
|
1806
|
-
var DocumentPageMapEntrySchema =
|
|
1807
|
-
page:
|
|
1808
|
-
label:
|
|
1809
|
-
formNumber:
|
|
1810
|
-
formTitle:
|
|
1811
|
-
sectionTitle:
|
|
1812
|
-
extractorNames:
|
|
1813
|
-
sourceSpanIds:
|
|
1814
|
-
});
|
|
1815
|
-
var DocumentAgentGuidanceSchema =
|
|
1816
|
-
kind:
|
|
1817
|
-
title:
|
|
1818
|
-
detail:
|
|
1819
|
-
sourceSpanIds:
|
|
1820
|
-
});
|
|
1821
|
-
var DocumentMetadataSchema =
|
|
1822
|
-
sourceTreeVersion:
|
|
1823
|
-
sourceTreeCanonical:
|
|
1824
|
-
formInventory:
|
|
1825
|
-
tableOfContents:
|
|
1826
|
-
pageMap:
|
|
1827
|
-
agentGuidance:
|
|
1828
|
-
});
|
|
1829
|
-
var DocumentNodeSchema =
|
|
1830
|
-
() =>
|
|
1831
|
-
id:
|
|
1832
|
-
title:
|
|
1833
|
-
originalTitle:
|
|
1834
|
-
type:
|
|
1835
|
-
label:
|
|
1836
|
-
level:
|
|
1837
|
-
sectionNumber:
|
|
1838
|
-
pageStart:
|
|
1839
|
-
pageEnd:
|
|
1840
|
-
formNumber:
|
|
1841
|
-
formTitle:
|
|
1842
|
-
excerpt:
|
|
1843
|
-
content:
|
|
1844
|
-
interpretationLabels:
|
|
1845
|
-
sourceSpanIds:
|
|
1846
|
-
sourceTextHash:
|
|
1847
|
-
children:
|
|
2007
|
+
var import_zod17 = require("zod");
|
|
2008
|
+
var SubsectionSchema = import_zod17.z.object({
|
|
2009
|
+
title: import_zod17.z.string(),
|
|
2010
|
+
sectionNumber: import_zod17.z.string().optional(),
|
|
2011
|
+
pageNumber: import_zod17.z.number().optional(),
|
|
2012
|
+
excerpt: import_zod17.z.string().optional(),
|
|
2013
|
+
content: import_zod17.z.string().optional(),
|
|
2014
|
+
documentNodeId: import_zod17.z.string().optional(),
|
|
2015
|
+
sourceSpanIds: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2016
|
+
sourceTextHash: import_zod17.z.string().optional()
|
|
2017
|
+
});
|
|
2018
|
+
var SectionSchema = import_zod17.z.object({
|
|
2019
|
+
title: import_zod17.z.string(),
|
|
2020
|
+
sectionNumber: import_zod17.z.string().optional(),
|
|
2021
|
+
pageStart: import_zod17.z.number(),
|
|
2022
|
+
pageEnd: import_zod17.z.number().optional(),
|
|
2023
|
+
type: import_zod17.z.string(),
|
|
2024
|
+
coverageType: import_zod17.z.string().optional(),
|
|
2025
|
+
excerpt: import_zod17.z.string().optional(),
|
|
2026
|
+
content: import_zod17.z.string().optional(),
|
|
2027
|
+
subsections: import_zod17.z.array(SubsectionSchema).optional(),
|
|
2028
|
+
recordId: import_zod17.z.string().optional(),
|
|
2029
|
+
documentNodeId: import_zod17.z.string().optional(),
|
|
2030
|
+
sourceSpanIds: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2031
|
+
sourceTextHash: import_zod17.z.string().optional()
|
|
2032
|
+
});
|
|
2033
|
+
var SubjectivitySchema = import_zod17.z.object({
|
|
2034
|
+
description: import_zod17.z.string(),
|
|
2035
|
+
category: import_zod17.z.string().optional()
|
|
2036
|
+
});
|
|
2037
|
+
var UnderwritingConditionSchema = import_zod17.z.object({
|
|
2038
|
+
description: import_zod17.z.string()
|
|
2039
|
+
});
|
|
2040
|
+
var PremiumLineSchema = import_zod17.z.object({
|
|
2041
|
+
line: import_zod17.z.string(),
|
|
2042
|
+
amount: import_zod17.z.string(),
|
|
2043
|
+
amountValue: import_zod17.z.number().optional(),
|
|
2044
|
+
documentNodeId: import_zod17.z.string().optional(),
|
|
2045
|
+
sourceSpanIds: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2046
|
+
sourceTextHash: import_zod17.z.string().optional()
|
|
2047
|
+
});
|
|
2048
|
+
var AuxiliaryFactSchema = import_zod17.z.object({
|
|
2049
|
+
key: import_zod17.z.string(),
|
|
2050
|
+
value: import_zod17.z.string(),
|
|
2051
|
+
subject: import_zod17.z.string().optional(),
|
|
2052
|
+
context: import_zod17.z.string().optional(),
|
|
2053
|
+
documentNodeId: import_zod17.z.string().optional(),
|
|
2054
|
+
sourceSpanIds: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2055
|
+
sourceTextHash: import_zod17.z.string().optional()
|
|
2056
|
+
});
|
|
2057
|
+
var DefinitionSchema = import_zod17.z.object({
|
|
2058
|
+
term: import_zod17.z.string(),
|
|
2059
|
+
definition: import_zod17.z.string(),
|
|
2060
|
+
pageNumber: import_zod17.z.number().optional(),
|
|
2061
|
+
formNumber: import_zod17.z.string().optional(),
|
|
2062
|
+
formTitle: import_zod17.z.string().optional(),
|
|
2063
|
+
sectionRef: import_zod17.z.string().optional(),
|
|
2064
|
+
originalContent: import_zod17.z.string().optional(),
|
|
2065
|
+
recordId: import_zod17.z.string().optional(),
|
|
2066
|
+
documentNodeId: import_zod17.z.string().optional(),
|
|
2067
|
+
sourceSpanIds: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2068
|
+
sourceTextHash: import_zod17.z.string().optional()
|
|
2069
|
+
});
|
|
2070
|
+
var CoveredReasonSchema = import_zod17.z.object({
|
|
2071
|
+
coverageName: import_zod17.z.string(),
|
|
2072
|
+
reasonNumber: import_zod17.z.string().optional(),
|
|
2073
|
+
title: import_zod17.z.string().optional(),
|
|
2074
|
+
content: import_zod17.z.string(),
|
|
2075
|
+
conditions: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2076
|
+
exceptions: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2077
|
+
appliesTo: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2078
|
+
pageNumber: import_zod17.z.number().optional(),
|
|
2079
|
+
formNumber: import_zod17.z.string().optional(),
|
|
2080
|
+
formTitle: import_zod17.z.string().optional(),
|
|
2081
|
+
sectionRef: import_zod17.z.string().optional(),
|
|
2082
|
+
originalContent: import_zod17.z.string().optional(),
|
|
2083
|
+
recordId: import_zod17.z.string().optional(),
|
|
2084
|
+
documentNodeId: import_zod17.z.string().optional(),
|
|
2085
|
+
sourceSpanIds: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2086
|
+
sourceTextHash: import_zod17.z.string().optional()
|
|
2087
|
+
});
|
|
2088
|
+
var DocumentTableOfContentsEntrySchema = import_zod17.z.object({
|
|
2089
|
+
title: import_zod17.z.string(),
|
|
2090
|
+
level: import_zod17.z.number().int().positive().optional(),
|
|
2091
|
+
pageStart: import_zod17.z.number().optional(),
|
|
2092
|
+
pageEnd: import_zod17.z.number().optional(),
|
|
2093
|
+
documentNodeId: import_zod17.z.string().optional(),
|
|
2094
|
+
sourceSpanIds: import_zod17.z.array(import_zod17.z.string()).optional()
|
|
2095
|
+
});
|
|
2096
|
+
var DocumentPageMapEntrySchema = import_zod17.z.object({
|
|
2097
|
+
page: import_zod17.z.number().int().positive(),
|
|
2098
|
+
label: import_zod17.z.string().optional(),
|
|
2099
|
+
formNumber: import_zod17.z.string().optional(),
|
|
2100
|
+
formTitle: import_zod17.z.string().optional(),
|
|
2101
|
+
sectionTitle: import_zod17.z.string().optional(),
|
|
2102
|
+
extractorNames: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2103
|
+
sourceSpanIds: import_zod17.z.array(import_zod17.z.string()).optional()
|
|
2104
|
+
});
|
|
2105
|
+
var DocumentAgentGuidanceSchema = import_zod17.z.object({
|
|
2106
|
+
kind: import_zod17.z.string(),
|
|
2107
|
+
title: import_zod17.z.string(),
|
|
2108
|
+
detail: import_zod17.z.string(),
|
|
2109
|
+
sourceSpanIds: import_zod17.z.array(import_zod17.z.string()).optional()
|
|
2110
|
+
});
|
|
2111
|
+
var DocumentMetadataSchema = import_zod17.z.object({
|
|
2112
|
+
sourceTreeVersion: import_zod17.z.string().optional(),
|
|
2113
|
+
sourceTreeCanonical: import_zod17.z.boolean().optional(),
|
|
2114
|
+
formInventory: import_zod17.z.array(FormReferenceSchema).optional(),
|
|
2115
|
+
tableOfContents: import_zod17.z.array(DocumentTableOfContentsEntrySchema).optional(),
|
|
2116
|
+
pageMap: import_zod17.z.array(DocumentPageMapEntrySchema).optional(),
|
|
2117
|
+
agentGuidance: import_zod17.z.array(DocumentAgentGuidanceSchema).optional()
|
|
2118
|
+
});
|
|
2119
|
+
var DocumentNodeSchema = import_zod17.z.lazy(
|
|
2120
|
+
() => import_zod17.z.object({
|
|
2121
|
+
id: import_zod17.z.string(),
|
|
2122
|
+
title: import_zod17.z.string(),
|
|
2123
|
+
originalTitle: import_zod17.z.string().optional(),
|
|
2124
|
+
type: import_zod17.z.string().optional(),
|
|
2125
|
+
label: import_zod17.z.string().optional(),
|
|
2126
|
+
level: import_zod17.z.number().int().positive().optional(),
|
|
2127
|
+
sectionNumber: import_zod17.z.string().optional(),
|
|
2128
|
+
pageStart: import_zod17.z.number().optional(),
|
|
2129
|
+
pageEnd: import_zod17.z.number().optional(),
|
|
2130
|
+
formNumber: import_zod17.z.string().optional(),
|
|
2131
|
+
formTitle: import_zod17.z.string().optional(),
|
|
2132
|
+
excerpt: import_zod17.z.string().optional(),
|
|
2133
|
+
content: import_zod17.z.string().optional(),
|
|
2134
|
+
interpretationLabels: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2135
|
+
sourceSpanIds: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2136
|
+
sourceTextHash: import_zod17.z.string().optional(),
|
|
2137
|
+
children: import_zod17.z.array(DocumentNodeSchema).optional()
|
|
1848
2138
|
})
|
|
1849
2139
|
);
|
|
1850
2140
|
var BaseDocumentFields = {
|
|
1851
|
-
id:
|
|
1852
|
-
carrier:
|
|
1853
|
-
security:
|
|
1854
|
-
insuredName:
|
|
1855
|
-
premium:
|
|
1856
|
-
premiumAmount:
|
|
1857
|
-
summary:
|
|
1858
|
-
|
|
1859
|
-
coverages:
|
|
2141
|
+
id: import_zod17.z.string(),
|
|
2142
|
+
carrier: import_zod17.z.string(),
|
|
2143
|
+
security: import_zod17.z.string().optional(),
|
|
2144
|
+
insuredName: import_zod17.z.string(),
|
|
2145
|
+
premium: import_zod17.z.string().optional(),
|
|
2146
|
+
premiumAmount: import_zod17.z.number().optional(),
|
|
2147
|
+
summary: import_zod17.z.string().optional(),
|
|
2148
|
+
linesOfBusiness: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2149
|
+
coverages: import_zod17.z.array(CoverageSchema),
|
|
1860
2150
|
documentMetadata: DocumentMetadataSchema,
|
|
1861
|
-
documentOutline:
|
|
1862
|
-
sections:
|
|
1863
|
-
definitions:
|
|
1864
|
-
coveredReasons:
|
|
2151
|
+
documentOutline: import_zod17.z.array(DocumentNodeSchema),
|
|
2152
|
+
sections: import_zod17.z.array(SectionSchema).optional(),
|
|
2153
|
+
definitions: import_zod17.z.array(DefinitionSchema).optional(),
|
|
2154
|
+
coveredReasons: import_zod17.z.array(CoveredReasonSchema).optional(),
|
|
1865
2155
|
// Enriched fields (v1.2+)
|
|
1866
|
-
carrierLegalName:
|
|
1867
|
-
carrierNaicNumber:
|
|
1868
|
-
carrierAmBestRating:
|
|
1869
|
-
carrierAdmittedStatus:
|
|
1870
|
-
mga:
|
|
1871
|
-
underwriter:
|
|
1872
|
-
brokerAgency:
|
|
1873
|
-
brokerContactName:
|
|
1874
|
-
brokerLicenseNumber:
|
|
1875
|
-
priorPolicyNumber:
|
|
1876
|
-
programName:
|
|
1877
|
-
isRenewal:
|
|
1878
|
-
isPackage:
|
|
1879
|
-
insuredDba:
|
|
2156
|
+
carrierLegalName: import_zod17.z.string().optional(),
|
|
2157
|
+
carrierNaicNumber: import_zod17.z.string().optional(),
|
|
2158
|
+
carrierAmBestRating: import_zod17.z.string().optional(),
|
|
2159
|
+
carrierAdmittedStatus: import_zod17.z.string().optional(),
|
|
2160
|
+
mga: import_zod17.z.string().optional(),
|
|
2161
|
+
underwriter: import_zod17.z.string().optional(),
|
|
2162
|
+
brokerAgency: import_zod17.z.string().optional(),
|
|
2163
|
+
brokerContactName: import_zod17.z.string().optional(),
|
|
2164
|
+
brokerLicenseNumber: import_zod17.z.string().optional(),
|
|
2165
|
+
priorPolicyNumber: import_zod17.z.string().optional(),
|
|
2166
|
+
programName: import_zod17.z.string().optional(),
|
|
2167
|
+
isRenewal: import_zod17.z.boolean().optional(),
|
|
2168
|
+
isPackage: import_zod17.z.boolean().optional(),
|
|
2169
|
+
insuredDba: import_zod17.z.string().optional(),
|
|
1880
2170
|
insuredAddress: SourceBackedAddressSchema.optional(),
|
|
1881
2171
|
insuredEntityType: EntityTypeSchema.optional(),
|
|
1882
|
-
additionalNamedInsureds:
|
|
1883
|
-
insuredSicCode:
|
|
1884
|
-
insuredNaicsCode:
|
|
1885
|
-
insuredFein:
|
|
1886
|
-
enrichedCoverages:
|
|
1887
|
-
endorsements:
|
|
1888
|
-
exclusions:
|
|
1889
|
-
conditions:
|
|
2172
|
+
additionalNamedInsureds: import_zod17.z.array(NamedInsuredSchema).optional(),
|
|
2173
|
+
insuredSicCode: import_zod17.z.string().optional(),
|
|
2174
|
+
insuredNaicsCode: import_zod17.z.string().optional(),
|
|
2175
|
+
insuredFein: import_zod17.z.string().optional(),
|
|
2176
|
+
enrichedCoverages: import_zod17.z.array(EnrichedCoverageSchema).optional(),
|
|
2177
|
+
endorsements: import_zod17.z.array(EndorsementSchema).optional(),
|
|
2178
|
+
exclusions: import_zod17.z.array(ExclusionSchema).optional(),
|
|
2179
|
+
conditions: import_zod17.z.array(PolicyConditionSchema).optional(),
|
|
1890
2180
|
limits: LimitScheduleSchema.optional(),
|
|
1891
2181
|
deductibles: DeductibleScheduleSchema.optional(),
|
|
1892
|
-
locations:
|
|
1893
|
-
vehicles:
|
|
1894
|
-
classifications:
|
|
1895
|
-
formInventory:
|
|
2182
|
+
locations: import_zod17.z.array(InsuredLocationSchema).optional(),
|
|
2183
|
+
vehicles: import_zod17.z.array(InsuredVehicleSchema).optional(),
|
|
2184
|
+
classifications: import_zod17.z.array(ClassificationCodeSchema).optional(),
|
|
2185
|
+
formInventory: import_zod17.z.array(FormReferenceSchema).optional(),
|
|
1896
2186
|
declarations: DeclarationsSchema.optional(),
|
|
1897
2187
|
coverageForm: CoverageFormSchema.optional(),
|
|
1898
|
-
retroactiveDate:
|
|
2188
|
+
retroactiveDate: import_zod17.z.string().optional(),
|
|
1899
2189
|
extendedReportingPeriod: ExtendedReportingPeriodSchema.optional(),
|
|
1900
2190
|
insurer: InsurerInfoSchema.optional(),
|
|
1901
2191
|
producer: ProducerInfoSchema.optional(),
|
|
1902
|
-
claimsContacts:
|
|
1903
|
-
regulatoryContacts:
|
|
1904
|
-
thirdPartyAdministrators:
|
|
1905
|
-
additionalInsureds:
|
|
1906
|
-
lossPayees:
|
|
1907
|
-
mortgageHolders:
|
|
1908
|
-
taxesAndFees:
|
|
1909
|
-
totalCost:
|
|
1910
|
-
totalCostAmount:
|
|
1911
|
-
minimumPremium:
|
|
1912
|
-
minimumPremiumAmount:
|
|
1913
|
-
depositPremium:
|
|
1914
|
-
depositPremiumAmount:
|
|
2192
|
+
claimsContacts: import_zod17.z.array(ContactSchema).optional(),
|
|
2193
|
+
regulatoryContacts: import_zod17.z.array(ContactSchema).optional(),
|
|
2194
|
+
thirdPartyAdministrators: import_zod17.z.array(ContactSchema).optional(),
|
|
2195
|
+
additionalInsureds: import_zod17.z.array(EndorsementPartySchema).optional(),
|
|
2196
|
+
lossPayees: import_zod17.z.array(EndorsementPartySchema).optional(),
|
|
2197
|
+
mortgageHolders: import_zod17.z.array(EndorsementPartySchema).optional(),
|
|
2198
|
+
taxesAndFees: import_zod17.z.array(TaxFeeItemSchema).optional(),
|
|
2199
|
+
totalCost: import_zod17.z.string().optional(),
|
|
2200
|
+
totalCostAmount: import_zod17.z.number().optional(),
|
|
2201
|
+
minimumPremium: import_zod17.z.string().optional(),
|
|
2202
|
+
minimumPremiumAmount: import_zod17.z.number().optional(),
|
|
2203
|
+
depositPremium: import_zod17.z.string().optional(),
|
|
2204
|
+
depositPremiumAmount: import_zod17.z.number().optional(),
|
|
1915
2205
|
paymentPlan: PaymentPlanSchema.optional(),
|
|
1916
2206
|
auditType: AuditTypeSchema.optional(),
|
|
1917
|
-
ratingBasis:
|
|
1918
|
-
premiumByLocation:
|
|
2207
|
+
ratingBasis: import_zod17.z.array(RatingBasisSchema).optional(),
|
|
2208
|
+
premiumByLocation: import_zod17.z.array(LocationPremiumSchema).optional(),
|
|
1919
2209
|
lossSummary: LossSummarySchema.optional(),
|
|
1920
|
-
individualClaims:
|
|
2210
|
+
individualClaims: import_zod17.z.array(ClaimRecordSchema).optional(),
|
|
1921
2211
|
experienceMod: ExperienceModSchema.optional(),
|
|
1922
|
-
cancellationNoticeDays:
|
|
1923
|
-
nonrenewalNoticeDays:
|
|
1924
|
-
supplementaryFacts:
|
|
2212
|
+
cancellationNoticeDays: import_zod17.z.number().optional(),
|
|
2213
|
+
nonrenewalNoticeDays: import_zod17.z.number().optional(),
|
|
2214
|
+
supplementaryFacts: import_zod17.z.array(AuxiliaryFactSchema).optional()
|
|
1925
2215
|
};
|
|
1926
|
-
var PolicyDocumentSchema =
|
|
2216
|
+
var PolicyDocumentSchema = import_zod17.z.object({
|
|
1927
2217
|
...BaseDocumentFields,
|
|
1928
|
-
type:
|
|
1929
|
-
policyNumber:
|
|
1930
|
-
effectiveDate:
|
|
1931
|
-
expirationDate:
|
|
2218
|
+
type: import_zod17.z.literal("policy"),
|
|
2219
|
+
policyNumber: import_zod17.z.string(),
|
|
2220
|
+
effectiveDate: import_zod17.z.string(),
|
|
2221
|
+
expirationDate: import_zod17.z.string().optional(),
|
|
1932
2222
|
policyTermType: PolicyTermTypeSchema.optional(),
|
|
1933
|
-
nextReviewDate:
|
|
1934
|
-
effectiveTime:
|
|
2223
|
+
nextReviewDate: import_zod17.z.string().optional(),
|
|
2224
|
+
effectiveTime: import_zod17.z.string().optional()
|
|
1935
2225
|
});
|
|
1936
|
-
var QuoteDocumentSchema =
|
|
2226
|
+
var QuoteDocumentSchema = import_zod17.z.object({
|
|
1937
2227
|
...BaseDocumentFields,
|
|
1938
|
-
type:
|
|
1939
|
-
quoteNumber:
|
|
1940
|
-
proposedEffectiveDate:
|
|
1941
|
-
proposedExpirationDate:
|
|
1942
|
-
quoteExpirationDate:
|
|
1943
|
-
subjectivities:
|
|
1944
|
-
underwritingConditions:
|
|
1945
|
-
premiumBreakdown:
|
|
2228
|
+
type: import_zod17.z.literal("quote"),
|
|
2229
|
+
quoteNumber: import_zod17.z.string(),
|
|
2230
|
+
proposedEffectiveDate: import_zod17.z.string().optional(),
|
|
2231
|
+
proposedExpirationDate: import_zod17.z.string().optional(),
|
|
2232
|
+
quoteExpirationDate: import_zod17.z.string().optional(),
|
|
2233
|
+
subjectivities: import_zod17.z.array(SubjectivitySchema).optional(),
|
|
2234
|
+
underwritingConditions: import_zod17.z.array(UnderwritingConditionSchema).optional(),
|
|
2235
|
+
premiumBreakdown: import_zod17.z.array(PremiumLineSchema).optional(),
|
|
1946
2236
|
// Enriched quote fields (v1.2+)
|
|
1947
|
-
enrichedSubjectivities:
|
|
1948
|
-
enrichedUnderwritingConditions:
|
|
1949
|
-
warrantyRequirements:
|
|
1950
|
-
lossControlRecommendations:
|
|
2237
|
+
enrichedSubjectivities: import_zod17.z.array(EnrichedSubjectivitySchema).optional(),
|
|
2238
|
+
enrichedUnderwritingConditions: import_zod17.z.array(EnrichedUnderwritingConditionSchema).optional(),
|
|
2239
|
+
warrantyRequirements: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2240
|
+
lossControlRecommendations: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
1951
2241
|
bindingAuthority: BindingAuthoritySchema.optional()
|
|
1952
2242
|
});
|
|
1953
|
-
var InsuranceDocumentSchema =
|
|
2243
|
+
var InsuranceDocumentSchema = import_zod17.z.discriminatedUnion("type", [
|
|
1954
2244
|
PolicyDocumentSchema,
|
|
1955
2245
|
QuoteDocumentSchema
|
|
1956
2246
|
]);
|
|
1957
2247
|
|
|
1958
2248
|
// src/schemas/platform.ts
|
|
1959
|
-
var
|
|
1960
|
-
var PlatformSchema =
|
|
1961
|
-
var CommunicationIntentSchema =
|
|
2249
|
+
var import_zod18 = require("zod");
|
|
2250
|
+
var PlatformSchema = import_zod18.z.enum(["email", "chat", "sms", "slack", "discord"]);
|
|
2251
|
+
var CommunicationIntentSchema = import_zod18.z.enum(["direct", "mediated", "observed"]);
|
|
1962
2252
|
var PLATFORM_CONFIGS = {
|
|
1963
2253
|
email: {
|
|
1964
2254
|
supportsMarkdown: false,
|
|
@@ -1991,65 +2281,65 @@ var PLATFORM_CONFIGS = {
|
|
|
1991
2281
|
};
|
|
1992
2282
|
|
|
1993
2283
|
// src/schemas/pce.ts
|
|
1994
|
-
var
|
|
2284
|
+
var import_zod20 = require("zod");
|
|
1995
2285
|
|
|
1996
2286
|
// src/case/index.ts
|
|
1997
|
-
var
|
|
1998
|
-
var CaseEvidenceSourceSchema =
|
|
1999
|
-
id:
|
|
2000
|
-
label:
|
|
2001
|
-
documentId:
|
|
2002
|
-
page:
|
|
2003
|
-
fieldPath:
|
|
2004
|
-
text:
|
|
2005
|
-
metadata:
|
|
2006
|
-
});
|
|
2007
|
-
var CaseCitationSchema =
|
|
2008
|
-
sourceId:
|
|
2009
|
-
quote:
|
|
2010
|
-
page:
|
|
2011
|
-
fieldPath:
|
|
2012
|
-
});
|
|
2013
|
-
var ValidationIssueSeveritySchema =
|
|
2014
|
-
var CaseValidationIssueSchema =
|
|
2015
|
-
code:
|
|
2287
|
+
var import_zod19 = require("zod");
|
|
2288
|
+
var CaseEvidenceSourceSchema = import_zod19.z.object({
|
|
2289
|
+
id: import_zod19.z.string(),
|
|
2290
|
+
label: import_zod19.z.string().optional(),
|
|
2291
|
+
documentId: import_zod19.z.string().optional(),
|
|
2292
|
+
page: import_zod19.z.number().optional(),
|
|
2293
|
+
fieldPath: import_zod19.z.string().optional(),
|
|
2294
|
+
text: import_zod19.z.string().describe("Source text available for span validation and citation"),
|
|
2295
|
+
metadata: import_zod19.z.record(import_zod19.z.string(), import_zod19.z.string()).optional()
|
|
2296
|
+
});
|
|
2297
|
+
var CaseCitationSchema = import_zod19.z.object({
|
|
2298
|
+
sourceId: import_zod19.z.string(),
|
|
2299
|
+
quote: import_zod19.z.string(),
|
|
2300
|
+
page: import_zod19.z.number().optional(),
|
|
2301
|
+
fieldPath: import_zod19.z.string().optional()
|
|
2302
|
+
});
|
|
2303
|
+
var ValidationIssueSeveritySchema = import_zod19.z.enum(["info", "warning", "blocking"]);
|
|
2304
|
+
var CaseValidationIssueSchema = import_zod19.z.object({
|
|
2305
|
+
code: import_zod19.z.string(),
|
|
2016
2306
|
severity: ValidationIssueSeveritySchema,
|
|
2017
|
-
message:
|
|
2018
|
-
itemId:
|
|
2019
|
-
fieldPath:
|
|
2020
|
-
sourceId:
|
|
2021
|
-
});
|
|
2022
|
-
var MissingInfoQuestionSchema =
|
|
2023
|
-
id:
|
|
2024
|
-
itemId:
|
|
2025
|
-
fieldPath:
|
|
2026
|
-
question:
|
|
2027
|
-
reason:
|
|
2028
|
-
answer:
|
|
2029
|
-
});
|
|
2030
|
-
var CasePacketArtifactKindSchema =
|
|
2307
|
+
message: import_zod19.z.string(),
|
|
2308
|
+
itemId: import_zod19.z.string().optional(),
|
|
2309
|
+
fieldPath: import_zod19.z.string().optional(),
|
|
2310
|
+
sourceId: import_zod19.z.string().optional()
|
|
2311
|
+
});
|
|
2312
|
+
var MissingInfoQuestionSchema = import_zod19.z.object({
|
|
2313
|
+
id: import_zod19.z.string(),
|
|
2314
|
+
itemId: import_zod19.z.string().optional(),
|
|
2315
|
+
fieldPath: import_zod19.z.string().optional(),
|
|
2316
|
+
question: import_zod19.z.string(),
|
|
2317
|
+
reason: import_zod19.z.string(),
|
|
2318
|
+
answer: import_zod19.z.string().optional()
|
|
2319
|
+
});
|
|
2320
|
+
var CasePacketArtifactKindSchema = import_zod19.z.enum([
|
|
2031
2321
|
"underwriter_summary",
|
|
2032
2322
|
"carrier_email",
|
|
2033
2323
|
"missing_info_request",
|
|
2034
2324
|
"json_packet",
|
|
2035
2325
|
"validation_report"
|
|
2036
2326
|
]);
|
|
2037
|
-
var CasePacketArtifactSchema =
|
|
2038
|
-
id:
|
|
2327
|
+
var CasePacketArtifactSchema = import_zod19.z.object({
|
|
2328
|
+
id: import_zod19.z.string(),
|
|
2039
2329
|
kind: CasePacketArtifactKindSchema,
|
|
2040
|
-
title:
|
|
2041
|
-
content:
|
|
2042
|
-
citations:
|
|
2043
|
-
});
|
|
2044
|
-
var CaseSubmissionPacketSchema =
|
|
2045
|
-
id:
|
|
2046
|
-
caseId:
|
|
2047
|
-
artifacts:
|
|
2048
|
-
validationIssues:
|
|
2049
|
-
missingInfoQuestions:
|
|
2050
|
-
createdAt:
|
|
2051
|
-
});
|
|
2052
|
-
var CaseActionSchema =
|
|
2330
|
+
title: import_zod19.z.string(),
|
|
2331
|
+
content: import_zod19.z.string(),
|
|
2332
|
+
citations: import_zod19.z.array(CaseCitationSchema).default([])
|
|
2333
|
+
});
|
|
2334
|
+
var CaseSubmissionPacketSchema = import_zod19.z.object({
|
|
2335
|
+
id: import_zod19.z.string(),
|
|
2336
|
+
caseId: import_zod19.z.string(),
|
|
2337
|
+
artifacts: import_zod19.z.array(CasePacketArtifactSchema),
|
|
2338
|
+
validationIssues: import_zod19.z.array(CaseValidationIssueSchema),
|
|
2339
|
+
missingInfoQuestions: import_zod19.z.array(MissingInfoQuestionSchema),
|
|
2340
|
+
createdAt: import_zod19.z.number()
|
|
2341
|
+
});
|
|
2342
|
+
var CaseActionSchema = import_zod19.z.enum([
|
|
2053
2343
|
"inspect_attachments",
|
|
2054
2344
|
"retrieve_policy_evidence",
|
|
2055
2345
|
"retrieve_prior_applications",
|
|
@@ -2062,23 +2352,23 @@ var CaseActionSchema = import_zod18.z.enum([
|
|
|
2062
2352
|
"generate_packet",
|
|
2063
2353
|
"answer_field_or_case_question"
|
|
2064
2354
|
]);
|
|
2065
|
-
var AgenticExecutionModeSchema =
|
|
2066
|
-
var CaseProposalScoreSchema =
|
|
2067
|
-
grounding:
|
|
2068
|
-
completeness:
|
|
2069
|
-
consistency:
|
|
2070
|
-
determinism:
|
|
2071
|
-
risk:
|
|
2072
|
-
cost:
|
|
2073
|
-
});
|
|
2074
|
-
var CaseProposalSchema =
|
|
2075
|
-
id:
|
|
2076
|
-
sourceSpanIds:
|
|
2077
|
-
confidence:
|
|
2078
|
-
missingInfo:
|
|
2079
|
-
validationIssues:
|
|
2080
|
-
estimatedRisk:
|
|
2081
|
-
estimatedCost:
|
|
2355
|
+
var AgenticExecutionModeSchema = import_zod19.z.enum(["deterministic_tree", "market_eval", "hybrid"]);
|
|
2356
|
+
var CaseProposalScoreSchema = import_zod19.z.object({
|
|
2357
|
+
grounding: import_zod19.z.number().min(0).max(1),
|
|
2358
|
+
completeness: import_zod19.z.number().min(0).max(1),
|
|
2359
|
+
consistency: import_zod19.z.number().min(0).max(1),
|
|
2360
|
+
determinism: import_zod19.z.number().min(0).max(1),
|
|
2361
|
+
risk: import_zod19.z.number().min(0).max(1),
|
|
2362
|
+
cost: import_zod19.z.number().min(0).max(1)
|
|
2363
|
+
});
|
|
2364
|
+
var CaseProposalSchema = import_zod19.z.object({
|
|
2365
|
+
id: import_zod19.z.string(),
|
|
2366
|
+
sourceSpanIds: import_zod19.z.array(import_zod19.z.string()).default([]),
|
|
2367
|
+
confidence: import_zod19.z.number().min(0).max(1),
|
|
2368
|
+
missingInfo: import_zod19.z.array(import_zod19.z.string()).default([]),
|
|
2369
|
+
validationIssues: import_zod19.z.array(CaseValidationIssueSchema).default([]),
|
|
2370
|
+
estimatedRisk: import_zod19.z.number().min(0).max(1).default(0.5),
|
|
2371
|
+
estimatedCost: import_zod19.z.number().min(0).max(1).default(0.5),
|
|
2082
2372
|
score: CaseProposalScoreSchema.optional()
|
|
2083
2373
|
});
|
|
2084
2374
|
function stableCaseId(prefix, parts) {
|
|
@@ -2197,8 +2487,8 @@ function totalProposalScore(score) {
|
|
|
2197
2487
|
}
|
|
2198
2488
|
|
|
2199
2489
|
// src/schemas/pce.ts
|
|
2200
|
-
var PolicyChangeActionSchema =
|
|
2201
|
-
var PolicyChangeKindSchema =
|
|
2490
|
+
var PolicyChangeActionSchema = import_zod20.z.enum(["add", "remove", "update", "replace", "clarify"]);
|
|
2491
|
+
var PolicyChangeKindSchema = import_zod20.z.enum([
|
|
2202
2492
|
"named_insured_change",
|
|
2203
2493
|
"additional_insured_change",
|
|
2204
2494
|
"coverage_change",
|
|
@@ -2212,70 +2502,70 @@ var PolicyChangeKindSchema = import_zod19.z.enum([
|
|
|
2212
2502
|
"renewal_submission_update",
|
|
2213
2503
|
"general_endorsement"
|
|
2214
2504
|
]);
|
|
2215
|
-
var PolicyChangeConfidenceSchema =
|
|
2216
|
-
var PolicyChangeStatusSchema =
|
|
2217
|
-
var PolicyChangeItemSchema =
|
|
2218
|
-
id:
|
|
2505
|
+
var PolicyChangeConfidenceSchema = import_zod20.z.enum(["high", "medium", "low"]);
|
|
2506
|
+
var PolicyChangeStatusSchema = import_zod20.z.enum(["draft", "needs_info", "ready", "blocked"]);
|
|
2507
|
+
var PolicyChangeItemSchema = import_zod20.z.object({
|
|
2508
|
+
id: import_zod20.z.string(),
|
|
2219
2509
|
kind: PolicyChangeKindSchema.default("general_endorsement"),
|
|
2220
2510
|
action: PolicyChangeActionSchema,
|
|
2221
|
-
affectedPolicyId:
|
|
2222
|
-
fieldPath:
|
|
2223
|
-
label:
|
|
2224
|
-
beforeValue:
|
|
2225
|
-
afterValue:
|
|
2226
|
-
requestedValue:
|
|
2227
|
-
effectiveDate:
|
|
2228
|
-
reason:
|
|
2229
|
-
sourceIds:
|
|
2230
|
-
sourceSpanIds:
|
|
2231
|
-
userSourceSpanIds:
|
|
2232
|
-
citations:
|
|
2511
|
+
affectedPolicyId: import_zod20.z.string().default("unknown"),
|
|
2512
|
+
fieldPath: import_zod20.z.string().describe("Stable policy field path or business field name"),
|
|
2513
|
+
label: import_zod20.z.string(),
|
|
2514
|
+
beforeValue: import_zod20.z.string().optional().describe("Existing policy value, when cited from policy evidence"),
|
|
2515
|
+
afterValue: import_zod20.z.string().optional().describe("Requested new value"),
|
|
2516
|
+
requestedValue: import_zod20.z.string().optional().describe("Alias for afterValue used by policy-change workflows"),
|
|
2517
|
+
effectiveDate: import_zod20.z.string().optional(),
|
|
2518
|
+
reason: import_zod20.z.string().optional(),
|
|
2519
|
+
sourceIds: import_zod20.z.array(import_zod20.z.string()).default([]),
|
|
2520
|
+
sourceSpanIds: import_zod20.z.array(import_zod20.z.string()).default([]),
|
|
2521
|
+
userSourceSpanIds: import_zod20.z.array(import_zod20.z.string()).optional(),
|
|
2522
|
+
citations: import_zod20.z.array(CaseCitationSchema).default([]),
|
|
2233
2523
|
confidence: PolicyChangeConfidenceSchema.default("medium"),
|
|
2234
|
-
confidenceScore:
|
|
2524
|
+
confidenceScore: import_zod20.z.number().min(0).max(1).optional(),
|
|
2235
2525
|
status: PolicyChangeStatusSchema.default("ready")
|
|
2236
2526
|
});
|
|
2237
|
-
var PceNormalizationResultSchema =
|
|
2238
|
-
summary:
|
|
2239
|
-
items:
|
|
2240
|
-
id:
|
|
2527
|
+
var PceNormalizationResultSchema = import_zod20.z.object({
|
|
2528
|
+
summary: import_zod20.z.string(),
|
|
2529
|
+
items: import_zod20.z.array(PolicyChangeItemSchema.omit({ id: true, status: true }).extend({
|
|
2530
|
+
id: import_zod20.z.string().optional(),
|
|
2241
2531
|
status: PolicyChangeStatusSchema.optional()
|
|
2242
2532
|
})),
|
|
2243
|
-
missingInfoQuestions:
|
|
2244
|
-
id:
|
|
2533
|
+
missingInfoQuestions: import_zod20.z.array(MissingInfoQuestionSchema.omit({ id: true }).extend({
|
|
2534
|
+
id: import_zod20.z.string().optional()
|
|
2245
2535
|
})).default([])
|
|
2246
2536
|
});
|
|
2247
|
-
var PolicyChangeImpactSchema =
|
|
2248
|
-
itemId:
|
|
2249
|
-
beforeValue:
|
|
2250
|
-
requestedValue:
|
|
2251
|
-
likelyEndorsementRequired:
|
|
2252
|
-
carrierApprovalLikelyRequired:
|
|
2253
|
-
affectedCoverageForms:
|
|
2254
|
-
sourceSpanIds:
|
|
2255
|
-
});
|
|
2256
|
-
var PceCaseStateSchema =
|
|
2257
|
-
id:
|
|
2258
|
-
requestText:
|
|
2259
|
-
summary:
|
|
2537
|
+
var PolicyChangeImpactSchema = import_zod20.z.object({
|
|
2538
|
+
itemId: import_zod20.z.string(),
|
|
2539
|
+
beforeValue: import_zod20.z.string().optional(),
|
|
2540
|
+
requestedValue: import_zod20.z.string().optional(),
|
|
2541
|
+
likelyEndorsementRequired: import_zod20.z.boolean().default(true),
|
|
2542
|
+
carrierApprovalLikelyRequired: import_zod20.z.boolean().default(true),
|
|
2543
|
+
affectedCoverageForms: import_zod20.z.array(import_zod20.z.string()).default([]),
|
|
2544
|
+
sourceSpanIds: import_zod20.z.array(import_zod20.z.string()).default([])
|
|
2545
|
+
});
|
|
2546
|
+
var PceCaseStateSchema = import_zod20.z.object({
|
|
2547
|
+
id: import_zod20.z.string(),
|
|
2548
|
+
requestText: import_zod20.z.string(),
|
|
2549
|
+
summary: import_zod20.z.string(),
|
|
2260
2550
|
executionMode: AgenticExecutionModeSchema.default("deterministic_tree"),
|
|
2261
|
-
items:
|
|
2262
|
-
impacts:
|
|
2263
|
-
evidenceSources:
|
|
2264
|
-
validationIssues:
|
|
2265
|
-
missingInfoQuestions:
|
|
2266
|
-
createdAt:
|
|
2267
|
-
updatedAt:
|
|
2268
|
-
});
|
|
2269
|
-
var PolicyChangeRequestSchema =
|
|
2270
|
-
id:
|
|
2271
|
-
text:
|
|
2551
|
+
items: import_zod20.z.array(PolicyChangeItemSchema),
|
|
2552
|
+
impacts: import_zod20.z.array(PolicyChangeImpactSchema),
|
|
2553
|
+
evidenceSources: import_zod20.z.array(CaseEvidenceSourceSchema),
|
|
2554
|
+
validationIssues: import_zod20.z.array(CaseValidationIssueSchema),
|
|
2555
|
+
missingInfoQuestions: import_zod20.z.array(MissingInfoQuestionSchema),
|
|
2556
|
+
createdAt: import_zod20.z.number(),
|
|
2557
|
+
updatedAt: import_zod20.z.number()
|
|
2558
|
+
});
|
|
2559
|
+
var PolicyChangeRequestSchema = import_zod20.z.object({
|
|
2560
|
+
id: import_zod20.z.string(),
|
|
2561
|
+
text: import_zod20.z.string(),
|
|
2272
2562
|
executionMode: AgenticExecutionModeSchema.optional(),
|
|
2273
|
-
userSourceSpanIds:
|
|
2274
|
-
createdAt:
|
|
2563
|
+
userSourceSpanIds: import_zod20.z.array(import_zod20.z.string()).optional(),
|
|
2564
|
+
createdAt: import_zod20.z.number().optional()
|
|
2275
2565
|
});
|
|
2276
2566
|
var PceSubmissionPacketSchema = CaseSubmissionPacketSchema.extend({
|
|
2277
2567
|
pceCase: PceCaseStateSchema,
|
|
2278
|
-
artifacts:
|
|
2568
|
+
artifacts: import_zod20.z.array(CasePacketArtifactSchema)
|
|
2279
2569
|
});
|
|
2280
2570
|
|
|
2281
2571
|
// src/schemas/context-keys.ts
|
|
@@ -2293,7 +2583,7 @@ var CONTEXT_KEY_MAP = [
|
|
|
2293
2583
|
{ extractedField: "totalPremium", category: "financial", contextKey: "current_premium", description: "Total policy premium" },
|
|
2294
2584
|
{ extractedField: "locations[].buildingValue", category: "financial", contextKey: "total_property_values", description: "Sum of building values" },
|
|
2295
2585
|
{ extractedField: "locations[].contentsValue", category: "financial", contextKey: "total_contents_values", description: "Sum of contents values" },
|
|
2296
|
-
{ extractedField: "
|
|
2586
|
+
{ extractedField: "linesOfBusiness", category: "coverage", contextKey: "coverage_types", description: "ACORD lines of business covered" },
|
|
2297
2587
|
{ extractedField: "coverages[].limit", category: "coverage", contextKey: "current_limits", description: "Current coverage limits" },
|
|
2298
2588
|
{ extractedField: "coverages[].deductible", category: "coverage", contextKey: "current_deductibles", description: "Current deductibles" },
|
|
2299
2589
|
{ extractedField: "experienceMod.factor", category: "loss_history", contextKey: "experience_mod", description: "Workers comp experience modification factor" },
|
|
@@ -2331,8 +2621,8 @@ var CONTEXT_KEY_MAP = [
|
|
|
2331
2621
|
];
|
|
2332
2622
|
|
|
2333
2623
|
// src/source/schemas.ts
|
|
2334
|
-
var
|
|
2335
|
-
var SourceSpanKindSchema =
|
|
2624
|
+
var import_zod21 = require("zod");
|
|
2625
|
+
var SourceSpanKindSchema = import_zod21.z.enum([
|
|
2336
2626
|
"pdf_text",
|
|
2337
2627
|
"pdf_image",
|
|
2338
2628
|
"html",
|
|
@@ -2340,7 +2630,7 @@ var SourceSpanKindSchema = import_zod20.z.enum([
|
|
|
2340
2630
|
"plain_text",
|
|
2341
2631
|
"structured_field"
|
|
2342
2632
|
]);
|
|
2343
|
-
var SourceSpanUnitSchema =
|
|
2633
|
+
var SourceSpanUnitSchema = import_zod21.z.enum([
|
|
2344
2634
|
"page",
|
|
2345
2635
|
"section",
|
|
2346
2636
|
"table",
|
|
@@ -2349,78 +2639,78 @@ var SourceSpanUnitSchema = import_zod20.z.enum([
|
|
|
2349
2639
|
"key_value",
|
|
2350
2640
|
"text"
|
|
2351
2641
|
]);
|
|
2352
|
-
var SourceKindSchema =
|
|
2642
|
+
var SourceKindSchema = import_zod21.z.enum([
|
|
2353
2643
|
"policy_pdf",
|
|
2354
2644
|
"application_pdf",
|
|
2355
2645
|
"email",
|
|
2356
2646
|
"attachment",
|
|
2357
2647
|
"manual_note"
|
|
2358
2648
|
]);
|
|
2359
|
-
var SourceSpanBBoxSchema =
|
|
2360
|
-
page:
|
|
2361
|
-
x:
|
|
2362
|
-
y:
|
|
2363
|
-
width:
|
|
2364
|
-
height:
|
|
2365
|
-
});
|
|
2366
|
-
var SourceSpanLocationSchema =
|
|
2367
|
-
page:
|
|
2368
|
-
startPage:
|
|
2369
|
-
endPage:
|
|
2370
|
-
charStart:
|
|
2371
|
-
charEnd:
|
|
2372
|
-
lineStart:
|
|
2373
|
-
lineEnd:
|
|
2374
|
-
fieldPath:
|
|
2375
|
-
});
|
|
2376
|
-
var SourceSpanTableLocationSchema =
|
|
2377
|
-
tableId:
|
|
2378
|
-
rowIndex:
|
|
2379
|
-
columnIndex:
|
|
2380
|
-
columnName:
|
|
2381
|
-
rowSpanId:
|
|
2382
|
-
tableSpanId:
|
|
2383
|
-
isHeader:
|
|
2384
|
-
});
|
|
2385
|
-
var SourceSpanSchema =
|
|
2386
|
-
id:
|
|
2387
|
-
documentId:
|
|
2649
|
+
var SourceSpanBBoxSchema = import_zod21.z.object({
|
|
2650
|
+
page: import_zod21.z.number().int().positive(),
|
|
2651
|
+
x: import_zod21.z.number(),
|
|
2652
|
+
y: import_zod21.z.number(),
|
|
2653
|
+
width: import_zod21.z.number(),
|
|
2654
|
+
height: import_zod21.z.number()
|
|
2655
|
+
});
|
|
2656
|
+
var SourceSpanLocationSchema = import_zod21.z.object({
|
|
2657
|
+
page: import_zod21.z.number().int().positive().optional(),
|
|
2658
|
+
startPage: import_zod21.z.number().int().positive().optional(),
|
|
2659
|
+
endPage: import_zod21.z.number().int().positive().optional(),
|
|
2660
|
+
charStart: import_zod21.z.number().int().nonnegative().optional(),
|
|
2661
|
+
charEnd: import_zod21.z.number().int().nonnegative().optional(),
|
|
2662
|
+
lineStart: import_zod21.z.number().int().positive().optional(),
|
|
2663
|
+
lineEnd: import_zod21.z.number().int().positive().optional(),
|
|
2664
|
+
fieldPath: import_zod21.z.string().optional()
|
|
2665
|
+
});
|
|
2666
|
+
var SourceSpanTableLocationSchema = import_zod21.z.object({
|
|
2667
|
+
tableId: import_zod21.z.string().optional(),
|
|
2668
|
+
rowIndex: import_zod21.z.number().int().nonnegative().optional(),
|
|
2669
|
+
columnIndex: import_zod21.z.number().int().nonnegative().optional(),
|
|
2670
|
+
columnName: import_zod21.z.string().optional(),
|
|
2671
|
+
rowSpanId: import_zod21.z.string().optional(),
|
|
2672
|
+
tableSpanId: import_zod21.z.string().optional(),
|
|
2673
|
+
isHeader: import_zod21.z.boolean().optional()
|
|
2674
|
+
});
|
|
2675
|
+
var SourceSpanSchema = import_zod21.z.object({
|
|
2676
|
+
id: import_zod21.z.string().min(1),
|
|
2677
|
+
documentId: import_zod21.z.string().min(1),
|
|
2388
2678
|
sourceKind: SourceKindSchema.optional(),
|
|
2389
|
-
chunkId:
|
|
2679
|
+
chunkId: import_zod21.z.string().optional(),
|
|
2390
2680
|
kind: SourceSpanKindSchema,
|
|
2391
|
-
text:
|
|
2392
|
-
hash:
|
|
2393
|
-
textHash:
|
|
2394
|
-
pageStart:
|
|
2395
|
-
pageEnd:
|
|
2396
|
-
sectionId:
|
|
2397
|
-
formNumber:
|
|
2681
|
+
text: import_zod21.z.string(),
|
|
2682
|
+
hash: import_zod21.z.string().min(1),
|
|
2683
|
+
textHash: import_zod21.z.string().optional(),
|
|
2684
|
+
pageStart: import_zod21.z.number().int().positive().optional(),
|
|
2685
|
+
pageEnd: import_zod21.z.number().int().positive().optional(),
|
|
2686
|
+
sectionId: import_zod21.z.string().optional(),
|
|
2687
|
+
formNumber: import_zod21.z.string().optional(),
|
|
2398
2688
|
sourceUnit: SourceSpanUnitSchema.optional(),
|
|
2399
|
-
parentSpanId:
|
|
2689
|
+
parentSpanId: import_zod21.z.string().optional(),
|
|
2400
2690
|
table: SourceSpanTableLocationSchema.optional(),
|
|
2401
|
-
bbox:
|
|
2691
|
+
bbox: import_zod21.z.array(SourceSpanBBoxSchema).optional(),
|
|
2402
2692
|
location: SourceSpanLocationSchema.optional(),
|
|
2403
|
-
metadata:
|
|
2404
|
-
});
|
|
2405
|
-
var SourceSpanRefSchema =
|
|
2406
|
-
sourceSpanId:
|
|
2407
|
-
documentId:
|
|
2408
|
-
chunkId:
|
|
2409
|
-
quote:
|
|
2410
|
-
hash:
|
|
2693
|
+
metadata: import_zod21.z.record(import_zod21.z.string(), import_zod21.z.string()).optional()
|
|
2694
|
+
});
|
|
2695
|
+
var SourceSpanRefSchema = import_zod21.z.object({
|
|
2696
|
+
sourceSpanId: import_zod21.z.string().min(1),
|
|
2697
|
+
documentId: import_zod21.z.string().min(1).optional(),
|
|
2698
|
+
chunkId: import_zod21.z.string().optional(),
|
|
2699
|
+
quote: import_zod21.z.string().optional(),
|
|
2700
|
+
hash: import_zod21.z.string().optional(),
|
|
2411
2701
|
location: SourceSpanLocationSchema.optional()
|
|
2412
2702
|
});
|
|
2413
|
-
var SourceChunkSchema =
|
|
2414
|
-
id:
|
|
2415
|
-
documentId:
|
|
2416
|
-
sourceSpanIds:
|
|
2417
|
-
text:
|
|
2418
|
-
textHash:
|
|
2419
|
-
pageStart:
|
|
2420
|
-
pageEnd:
|
|
2421
|
-
metadata:
|
|
2422
|
-
});
|
|
2423
|
-
var DocumentSourceNodeKindSchema =
|
|
2703
|
+
var SourceChunkSchema = import_zod21.z.object({
|
|
2704
|
+
id: import_zod21.z.string().min(1),
|
|
2705
|
+
documentId: import_zod21.z.string().min(1),
|
|
2706
|
+
sourceSpanIds: import_zod21.z.array(import_zod21.z.string().min(1)),
|
|
2707
|
+
text: import_zod21.z.string(),
|
|
2708
|
+
textHash: import_zod21.z.string().min(1),
|
|
2709
|
+
pageStart: import_zod21.z.number().int().positive().optional(),
|
|
2710
|
+
pageEnd: import_zod21.z.number().int().positive().optional(),
|
|
2711
|
+
metadata: import_zod21.z.record(import_zod21.z.string(), import_zod21.z.string()).default({})
|
|
2712
|
+
});
|
|
2713
|
+
var DocumentSourceNodeKindSchema = import_zod21.z.enum([
|
|
2424
2714
|
"document",
|
|
2425
2715
|
"page_group",
|
|
2426
2716
|
"page",
|
|
@@ -2434,31 +2724,31 @@ var DocumentSourceNodeKindSchema = import_zod20.z.enum([
|
|
|
2434
2724
|
"table_cell",
|
|
2435
2725
|
"text"
|
|
2436
2726
|
]);
|
|
2437
|
-
var DocumentSourceNodeSchema =
|
|
2438
|
-
id:
|
|
2439
|
-
documentId:
|
|
2440
|
-
parentId:
|
|
2727
|
+
var DocumentSourceNodeSchema = import_zod21.z.object({
|
|
2728
|
+
id: import_zod21.z.string().min(1),
|
|
2729
|
+
documentId: import_zod21.z.string().min(1),
|
|
2730
|
+
parentId: import_zod21.z.string().optional(),
|
|
2441
2731
|
kind: DocumentSourceNodeKindSchema,
|
|
2442
|
-
title:
|
|
2443
|
-
description:
|
|
2444
|
-
textExcerpt:
|
|
2445
|
-
sourceSpanIds:
|
|
2446
|
-
pageStart:
|
|
2447
|
-
pageEnd:
|
|
2448
|
-
bbox:
|
|
2449
|
-
order:
|
|
2450
|
-
path:
|
|
2451
|
-
metadata:
|
|
2452
|
-
});
|
|
2453
|
-
var SourceBackedValueSchema =
|
|
2454
|
-
value:
|
|
2455
|
-
normalizedValue:
|
|
2456
|
-
confidence:
|
|
2457
|
-
sourceNodeIds:
|
|
2458
|
-
sourceSpanIds:
|
|
2459
|
-
});
|
|
2460
|
-
var OperationalCoverageTermSchema =
|
|
2461
|
-
kind:
|
|
2732
|
+
title: import_zod21.z.string(),
|
|
2733
|
+
description: import_zod21.z.string(),
|
|
2734
|
+
textExcerpt: import_zod21.z.string().optional(),
|
|
2735
|
+
sourceSpanIds: import_zod21.z.array(import_zod21.z.string().min(1)),
|
|
2736
|
+
pageStart: import_zod21.z.number().int().positive().optional(),
|
|
2737
|
+
pageEnd: import_zod21.z.number().int().positive().optional(),
|
|
2738
|
+
bbox: import_zod21.z.array(SourceSpanBBoxSchema).optional(),
|
|
2739
|
+
order: import_zod21.z.number().int().nonnegative(),
|
|
2740
|
+
path: import_zod21.z.string(),
|
|
2741
|
+
metadata: import_zod21.z.record(import_zod21.z.string(), import_zod21.z.unknown()).optional()
|
|
2742
|
+
});
|
|
2743
|
+
var SourceBackedValueSchema = import_zod21.z.object({
|
|
2744
|
+
value: import_zod21.z.string(),
|
|
2745
|
+
normalizedValue: import_zod21.z.string().optional(),
|
|
2746
|
+
confidence: import_zod21.z.enum(["low", "medium", "high"]).default("medium"),
|
|
2747
|
+
sourceNodeIds: import_zod21.z.array(import_zod21.z.string().min(1)).default([]),
|
|
2748
|
+
sourceSpanIds: import_zod21.z.array(import_zod21.z.string().min(1)).default([])
|
|
2749
|
+
});
|
|
2750
|
+
var OperationalCoverageTermSchema = import_zod21.z.object({
|
|
2751
|
+
kind: import_zod21.z.enum([
|
|
2462
2752
|
"each_claim_limit",
|
|
2463
2753
|
"each_occurrence_limit",
|
|
2464
2754
|
"each_loss_limit",
|
|
@@ -2470,183 +2760,132 @@ var OperationalCoverageTermSchema = import_zod20.z.object({
|
|
|
2470
2760
|
"premium",
|
|
2471
2761
|
"other"
|
|
2472
2762
|
]).default("other"),
|
|
2473
|
-
label:
|
|
2474
|
-
value:
|
|
2475
|
-
amount:
|
|
2476
|
-
appliesTo:
|
|
2477
|
-
sourceNodeIds:
|
|
2478
|
-
sourceSpanIds:
|
|
2479
|
-
});
|
|
2480
|
-
var OperationalCoverageLineSchema =
|
|
2481
|
-
name:
|
|
2482
|
-
coverageCode:
|
|
2483
|
-
limit:
|
|
2484
|
-
deductible:
|
|
2485
|
-
premium:
|
|
2486
|
-
retroactiveDate:
|
|
2487
|
-
formNumber:
|
|
2488
|
-
sectionRef:
|
|
2489
|
-
endorsementNumber:
|
|
2490
|
-
limits:
|
|
2491
|
-
sourceNodeIds:
|
|
2492
|
-
sourceSpanIds:
|
|
2493
|
-
});
|
|
2494
|
-
var OperationalPartySchema =
|
|
2495
|
-
role:
|
|
2496
|
-
name:
|
|
2497
|
-
sourceNodeIds:
|
|
2498
|
-
sourceSpanIds:
|
|
2499
|
-
});
|
|
2500
|
-
var OperationalEndorsementSupportSchema =
|
|
2501
|
-
kind:
|
|
2502
|
-
status:
|
|
2503
|
-
summary:
|
|
2504
|
-
sourceNodeIds:
|
|
2505
|
-
sourceSpanIds:
|
|
2506
|
-
});
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2763
|
+
label: import_zod21.z.string(),
|
|
2764
|
+
value: import_zod21.z.string(),
|
|
2765
|
+
amount: import_zod21.z.number().optional(),
|
|
2766
|
+
appliesTo: import_zod21.z.string().optional(),
|
|
2767
|
+
sourceNodeIds: import_zod21.z.array(import_zod21.z.string().min(1)).default([]),
|
|
2768
|
+
sourceSpanIds: import_zod21.z.array(import_zod21.z.string().min(1)).default([])
|
|
2769
|
+
});
|
|
2770
|
+
var OperationalCoverageLineSchema = import_zod21.z.object({
|
|
2771
|
+
name: import_zod21.z.string(),
|
|
2772
|
+
coverageCode: import_zod21.z.string().optional(),
|
|
2773
|
+
limit: import_zod21.z.string().optional(),
|
|
2774
|
+
deductible: import_zod21.z.string().optional(),
|
|
2775
|
+
premium: import_zod21.z.string().optional(),
|
|
2776
|
+
retroactiveDate: import_zod21.z.string().optional(),
|
|
2777
|
+
formNumber: import_zod21.z.string().optional(),
|
|
2778
|
+
sectionRef: import_zod21.z.string().optional(),
|
|
2779
|
+
endorsementNumber: import_zod21.z.string().optional(),
|
|
2780
|
+
limits: import_zod21.z.array(OperationalCoverageTermSchema).default([]),
|
|
2781
|
+
sourceNodeIds: import_zod21.z.array(import_zod21.z.string().min(1)).default([]),
|
|
2782
|
+
sourceSpanIds: import_zod21.z.array(import_zod21.z.string().min(1)).default([])
|
|
2783
|
+
});
|
|
2784
|
+
var OperationalPartySchema = import_zod21.z.object({
|
|
2785
|
+
role: import_zod21.z.string(),
|
|
2786
|
+
name: import_zod21.z.string(),
|
|
2787
|
+
sourceNodeIds: import_zod21.z.array(import_zod21.z.string().min(1)).default([]),
|
|
2788
|
+
sourceSpanIds: import_zod21.z.array(import_zod21.z.string().min(1)).default([])
|
|
2789
|
+
});
|
|
2790
|
+
var OperationalEndorsementSupportSchema = import_zod21.z.object({
|
|
2791
|
+
kind: import_zod21.z.string(),
|
|
2792
|
+
status: import_zod21.z.enum(["supported", "excluded", "requires_review"]),
|
|
2793
|
+
summary: import_zod21.z.string(),
|
|
2794
|
+
sourceNodeIds: import_zod21.z.array(import_zod21.z.string().min(1)).default([]),
|
|
2795
|
+
sourceSpanIds: import_zod21.z.array(import_zod21.z.string().min(1)).default([])
|
|
2796
|
+
});
|
|
2797
|
+
function legacyOperationalProfileInput(value) {
|
|
2798
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
2799
|
+
const record = value;
|
|
2800
|
+
if ("linesOfBusiness" in record) return value;
|
|
2801
|
+
if (!("policyTypes" in record)) return value;
|
|
2802
|
+
return {
|
|
2803
|
+
...record,
|
|
2804
|
+
linesOfBusiness: record.policyTypes
|
|
2805
|
+
};
|
|
2806
|
+
}
|
|
2807
|
+
var OperationalLinesOfBusinessSchema = import_zod21.z.preprocess(
|
|
2808
|
+
(value) => Array.isArray(value) ? toLobCodes(value.filter((item) => typeof item === "string")) : void 0,
|
|
2809
|
+
import_zod21.z.array(AcordLobCodeSchema).default(["UN"])
|
|
2810
|
+
);
|
|
2811
|
+
var PolicyOperationalProfileSchema = import_zod21.z.preprocess(
|
|
2812
|
+
legacyOperationalProfileInput,
|
|
2813
|
+
import_zod21.z.object({
|
|
2814
|
+
documentType: import_zod21.z.enum(["policy", "quote"]).default("policy"),
|
|
2815
|
+
linesOfBusiness: OperationalLinesOfBusinessSchema,
|
|
2816
|
+
policyNumber: SourceBackedValueSchema.optional(),
|
|
2817
|
+
namedInsured: SourceBackedValueSchema.optional(),
|
|
2818
|
+
insurer: SourceBackedValueSchema.optional(),
|
|
2819
|
+
broker: SourceBackedValueSchema.optional(),
|
|
2820
|
+
effectiveDate: SourceBackedValueSchema.optional(),
|
|
2821
|
+
expirationDate: SourceBackedValueSchema.optional(),
|
|
2822
|
+
retroactiveDate: SourceBackedValueSchema.optional(),
|
|
2823
|
+
premium: SourceBackedValueSchema.optional(),
|
|
2824
|
+
coverages: import_zod21.z.array(OperationalCoverageLineSchema).default([]),
|
|
2825
|
+
parties: import_zod21.z.array(OperationalPartySchema).default([]),
|
|
2826
|
+
endorsementSupport: import_zod21.z.array(OperationalEndorsementSupportSchema).default([]),
|
|
2827
|
+
sourceNodeIds: import_zod21.z.array(import_zod21.z.string().min(1)).default([]),
|
|
2828
|
+
sourceSpanIds: import_zod21.z.array(import_zod21.z.string().min(1)).default([]),
|
|
2829
|
+
warnings: import_zod21.z.array(import_zod21.z.string()).default([])
|
|
2830
|
+
})
|
|
2831
|
+
);
|
|
2525
2832
|
|
|
2526
2833
|
// src/source/policy-types.ts
|
|
2527
|
-
var
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
"
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
"motor truck cargo": "inland_marine",
|
|
2567
|
-
"motor truck cargo legal liability": "inland_marine",
|
|
2568
|
-
"builders risk insurance": "builders_risk",
|
|
2569
|
-
"pollution liability": "environmental",
|
|
2570
|
-
"premises pollution liability": "environmental",
|
|
2571
|
-
"environmental liability": "environmental",
|
|
2572
|
-
"ocean marine insurance": "ocean_marine",
|
|
2573
|
-
"surety bond": "surety",
|
|
2574
|
-
"product liability insurance": "product_liability",
|
|
2575
|
-
"life insurance": "life",
|
|
2576
|
-
"permanent life": "life",
|
|
2577
|
-
"term life": "life",
|
|
2578
|
-
"whole life": "life",
|
|
2579
|
-
"universal life": "life",
|
|
2580
|
-
"critical illness": "critical_illness",
|
|
2581
|
-
"critical illness insurance": "critical_illness",
|
|
2582
|
-
"disability insurance": "disability",
|
|
2583
|
-
"long term care": "long_term_care",
|
|
2584
|
-
"long-term care": "long_term_care"
|
|
2585
|
-
};
|
|
2586
|
-
var POLICY_TYPE_TEXT_PATTERNS = [
|
|
2587
|
-
{ type: "general_liability", pattern: /\b(?:commercial\s+)?general\s+liability\b|\bcgl\b/i },
|
|
2588
|
-
{ type: "commercial_property", pattern: /\bcommercial\s+property\b|\bproperty\s+insurance\b/i },
|
|
2589
|
-
{ type: "commercial_auto", pattern: /\bcommercial\s+auto(?:mobile)?\b|\bbusiness\s+auto(?:mobile)?\b|\bauto(?:mobile)?\s+physical\s+damage\b/i },
|
|
2590
|
-
{ type: "non_owned_auto", pattern: /\b(?:hired\s+(?:and\s+)?)?non[-\s]?owned\s+auto\b/i },
|
|
2591
|
-
{ type: "workers_comp", pattern: /\bworkers['’]?\s+comp(?:ensation)?\b/i },
|
|
2592
|
-
{ type: "umbrella", pattern: /\bcommercial\s+umbrella\b|\bumbrella\s+liability\b/i },
|
|
2593
|
-
{ type: "excess_liability", pattern: /\bexcess\s+liability\b/i },
|
|
2594
|
-
{ type: "professional_liability", pattern: /\bprofessional\s+liability\b|\berrors?\s*(?:and|&)\s*omissions?\b|\be&o\b/i },
|
|
2595
|
-
{ type: "cyber", pattern: /\bcyber\b|\bnetwork\s+security\b|\bprivacy\s+liability\b/i },
|
|
2596
|
-
{ type: "epli", pattern: /\bemployment\s+practices?\s+liability\b|\bepli\b/i },
|
|
2597
|
-
{ type: "directors_officers", pattern: /\bdirectors?\s*(?:and|&)\s*officers?\b|\bd&o\b/i },
|
|
2598
|
-
{ type: "fiduciary_liability", pattern: /\bfiduciary\s+liability\b/i },
|
|
2599
|
-
{ type: "crime_fidelity", pattern: /\bcrime\b|\bfidelity\b/i },
|
|
2600
|
-
{ type: "inland_marine", pattern: /\binland\s+marine\b|\bmotor\s+truck\s+cargo\b|\bcargo\s+legal\s+liability\b/i },
|
|
2601
|
-
{ type: "builders_risk", pattern: /\bbuilders?\s+risk\b/i },
|
|
2602
|
-
{ type: "environmental", pattern: /\bpollution\s+liability\b|\benvironmental\s+liability\b/i },
|
|
2603
|
-
{ type: "ocean_marine", pattern: /\bocean\s+marine\b/i },
|
|
2604
|
-
{ type: "surety", pattern: /\bsurety\b/i },
|
|
2605
|
-
{ type: "product_liability", pattern: /\bproduct\s+liability\b|\bproducts?\s+completed\s+operations\b/i },
|
|
2606
|
-
{ type: "bop", pattern: /\bbusiness\s*owners?\s+policy\b|\bbop\b/i },
|
|
2607
|
-
{ type: "homeowners_ho3", pattern: /\bhomeowners?\s*(?:ho[-\s]?3)?\b/i },
|
|
2608
|
-
{ type: "homeowners_ho5", pattern: /\bho[-\s]?5\b/i },
|
|
2609
|
-
{ type: "renters_ho4", pattern: /\brenters?\b|\bho[-\s]?4\b/i },
|
|
2610
|
-
{ type: "condo_ho6", pattern: /\bcondo(?:minium)?\b|\bho[-\s]?6\b/i },
|
|
2611
|
-
{ type: "dwelling_fire", pattern: /\bdwelling\s+fire\b/i },
|
|
2612
|
-
{ type: "personal_auto", pattern: /\bpersonal\s+auto\b/i },
|
|
2613
|
-
{ type: "personal_umbrella", pattern: /\bpersonal\s+umbrella\b/i },
|
|
2614
|
-
{ type: "flood_private", pattern: /\bflood\b/i },
|
|
2615
|
-
{ type: "earthquake", pattern: /\bearthquake\b/i },
|
|
2616
|
-
{ type: "personal_inland_marine", pattern: /\bpersonal\s+(?:articles|inland\s+marine)\b/i },
|
|
2617
|
-
{ type: "watercraft", pattern: /\bwatercraft\b|\bboat\s+insurance\b/i },
|
|
2618
|
-
{ type: "recreational_vehicle", pattern: /\brecreational\s+vehicle\b|\brv\s+insurance\b/i },
|
|
2619
|
-
{ type: "farm_ranch", pattern: /\bfarm\b|\branch\b/i },
|
|
2620
|
-
{ type: "life", pattern: /\blife\s+insurance\b|\bterm\s+life\b|\bwhole\s+life\b|\buniversal\s+life\b/i },
|
|
2621
|
-
{ type: "critical_illness", pattern: /\bcritical\s+illness\b/i },
|
|
2622
|
-
{ type: "disability", pattern: /\bdisability\s+insurance\b|\btotal\s+disability\b/i },
|
|
2623
|
-
{ type: "long_term_care", pattern: /\blong[-\s]?term\s+care\b/i },
|
|
2624
|
-
{ type: "pet", pattern: /\bpet\s+insurance\b/i },
|
|
2625
|
-
{ type: "travel", pattern: /\btravel\s+insurance\b/i },
|
|
2626
|
-
{ type: "identity_theft", pattern: /\bidentity\s+theft\b/i },
|
|
2627
|
-
{ type: "title", pattern: /\btitle\s+insurance\b/i }
|
|
2834
|
+
var LOB_TEXT_PATTERNS = [
|
|
2835
|
+
{ codes: ["CGL"], pattern: /\b(?:commercial\s+)?general\s+liability\b|\bcgl\b/i },
|
|
2836
|
+
{ codes: ["PROPC"], pattern: /\bcommercial\s+property\b|\bproperty\s+insurance\b/i },
|
|
2837
|
+
{ codes: ["PROP"], pattern: /\bproperty\b/i },
|
|
2838
|
+
{ codes: ["AUTOB"], pattern: /\bcommercial\s+auto(?:mobile)?\b|\bbusiness\s+auto(?:mobile)?\b|\bauto(?:mobile)?\s+physical\s+damage\b/i },
|
|
2839
|
+
{ codes: ["AUTOB"], pattern: /\b(?:hired\s+(?:and\s+)?)?non[-\s]?owned\s+auto\b/i },
|
|
2840
|
+
{ codes: ["WORK"], pattern: /\bworkers['’]?\s+comp(?:ensation)?\b/i },
|
|
2841
|
+
{ codes: ["UMBRC"], pattern: /\bcommercial\s+umbrella\b|\bumbrella\s+liability\b/i },
|
|
2842
|
+
{ codes: ["EXLIA"], pattern: /\bexcess\s+liability\b/i },
|
|
2843
|
+
{ codes: ["EO"], pattern: /\bprofessional\s+liability\b|\berrors?\s*(?:and|&)\s*omissions?\b|\be&o\b/i },
|
|
2844
|
+
{ codes: ["OLIB"], pattern: /\bcyber\b|\bnetwork\s+security\b|\bprivacy\s+liability\b/i },
|
|
2845
|
+
{ codes: ["EPLI"], pattern: /\bemployment\s+practices?\s+liability\b|\bepli\b/i },
|
|
2846
|
+
{ codes: ["DO"], pattern: /\bdirectors?\s*(?:and|&)\s*officers?\b|\bd&o\b/i },
|
|
2847
|
+
{ codes: ["FIDUC"], pattern: /\bfiduciary\s+liability\b/i },
|
|
2848
|
+
{ codes: ["CRIME"], pattern: /\bcrime\b|\bfidelity\b/i },
|
|
2849
|
+
{ codes: ["INMRC"], pattern: /\binland\s+marine\b|\bmotor\s+truck\s+cargo\b|\bcargo\s+legal\s+liability\b/i },
|
|
2850
|
+
{ codes: ["INMRC"], pattern: /\bbuilders?\s+risk\b/i },
|
|
2851
|
+
{ codes: ["OLIB"], pattern: /\bpollution\s+liability\b|\benvironmental\s+liability\b/i },
|
|
2852
|
+
{ codes: ["COMAR"], pattern: /\bocean\s+marine\b/i },
|
|
2853
|
+
{ codes: ["SURE"], pattern: /\bsurety\b/i },
|
|
2854
|
+
{ codes: ["OLIB"], pattern: /\bproduct\s+liability\b|\bproducts?\s+completed\s+operations\b/i },
|
|
2855
|
+
{ codes: ["BOP"], pattern: /\bbusiness\s*owners?\s+policy\b|\bbop\b/i },
|
|
2856
|
+
{ codes: ["DO", "EPLI", "FIDUC"], pattern: /\bmanagement\s+liability\b/i },
|
|
2857
|
+
{ codes: ["HOME"], pattern: /\bhomeowners?\s*(?:ho[-\s]?[35])?\b|\bho[-\s]?[35]\b/i },
|
|
2858
|
+
{ codes: ["HOME"], pattern: /\brenters?\b|\bho[-\s]?4\b/i },
|
|
2859
|
+
{ codes: ["HOME"], pattern: /\bcondo(?:minium)?\b|\bho[-\s]?6\b/i },
|
|
2860
|
+
{ codes: ["DFIRE"], pattern: /\bdwelling\s+fire\b/i },
|
|
2861
|
+
{ codes: ["MHOME"], pattern: /\bmobile\s+home\b|\bmanufactured\s+home\b/i },
|
|
2862
|
+
{ codes: ["AUTOP"], pattern: /\bpersonal\s+auto\b/i },
|
|
2863
|
+
{ codes: ["UMBRP"], pattern: /\bpersonal\s+umbrella\b/i },
|
|
2864
|
+
{ codes: ["FLOOD"], pattern: /\bflood\b/i },
|
|
2865
|
+
{ codes: ["EQ"], pattern: /\bearthquake\b/i },
|
|
2866
|
+
{ codes: ["INMRP"], pattern: /\bpersonal\s+(?:articles|inland\s+marine)\b/i },
|
|
2867
|
+
{ codes: ["BOAT"], pattern: /\bwatercraft\b|\bboat\s+insurance\b/i },
|
|
2868
|
+
{ codes: ["RECV"], pattern: /\brecreational\s+vehicle\b|\brv\s+insurance\b/i },
|
|
2869
|
+
{ codes: ["CFRM"], pattern: /\bfarm\b|\branch\b/i },
|
|
2870
|
+
{ codes: ["UN"], pattern: /\blife\s+insurance\b|\bterm\s+life\b|\bwhole\s+life\b|\buniversal\s+life\b/i },
|
|
2871
|
+
{ codes: ["DISAB"], pattern: /\bcritical\s+illness\b|\bdisability\s+insurance\b|\btotal\s+disability\b/i },
|
|
2872
|
+
{ 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 }
|
|
2628
2873
|
];
|
|
2629
|
-
var POLICY_TYPES_FROM_COVERAGES_WARNING = "Policy types augmented from extracted coverage labels.";
|
|
2630
2874
|
function normalizeWhitespace(value) {
|
|
2631
2875
|
return value.replace(/\s+/g, " ").trim();
|
|
2632
2876
|
}
|
|
2633
|
-
function
|
|
2634
|
-
|
|
2635
|
-
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));
|
|
2636
|
-
const unique = [...new Set(controlled)].slice(0, 6);
|
|
2637
|
-
return unique.length ? unique : ["other"];
|
|
2638
|
-
}
|
|
2639
|
-
function hasSpecificPolicyType(types) {
|
|
2640
|
-
return types.some((type) => type !== "other");
|
|
2877
|
+
function hasSpecificLineOfBusiness(codes) {
|
|
2878
|
+
return codes.some((code) => code !== "UN");
|
|
2641
2879
|
}
|
|
2642
|
-
function
|
|
2880
|
+
function linesOfBusinessFromText(value) {
|
|
2643
2881
|
const text = normalizeWhitespace(value ?? "");
|
|
2644
2882
|
if (!text) return [];
|
|
2645
|
-
const
|
|
2646
|
-
if (
|
|
2647
|
-
|
|
2883
|
+
const direct = toLobCodes([text]);
|
|
2884
|
+
if (direct.some((code) => code !== "UN") || isLobCode(text) || text.toUpperCase() === "UN") return direct;
|
|
2885
|
+
const inferred = LOB_TEXT_PATTERNS.flatMap(({ codes, pattern }) => pattern.test(text) ? codes : []);
|
|
2886
|
+
return Array.from(new Set(inferred));
|
|
2648
2887
|
}
|
|
2649
|
-
function
|
|
2888
|
+
function inferLinesOfBusinessFromOperationalCoverages(coverages) {
|
|
2650
2889
|
const inferred = [];
|
|
2651
2890
|
for (const coverage of coverages) {
|
|
2652
2891
|
const limits = coverage.limits ?? [];
|
|
@@ -2657,43 +2896,23 @@ function inferPolicyTypesFromOperationalCoverages(coverages) {
|
|
|
2657
2896
|
...limits.flatMap((term) => [term.appliesTo, term.label])
|
|
2658
2897
|
].filter((value) => typeof value === "string" && value.trim().length > 0);
|
|
2659
2898
|
for (const value of text) {
|
|
2660
|
-
for (const
|
|
2661
|
-
if (!inferred.includes(
|
|
2899
|
+
for (const code of linesOfBusinessFromText(value)) {
|
|
2900
|
+
if (!inferred.includes(code)) inferred.push(code);
|
|
2662
2901
|
}
|
|
2663
2902
|
}
|
|
2664
2903
|
}
|
|
2665
2904
|
return inferred.slice(0, 6);
|
|
2666
2905
|
}
|
|
2667
|
-
function
|
|
2668
|
-
const
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
];
|
|
2672
|
-
const unique = [...new Set(merged)].slice(0, 6);
|
|
2673
|
-
return unique.length ? unique : base;
|
|
2674
|
-
}
|
|
2675
|
-
function resolveOperationalProfilePolicyTypes(params) {
|
|
2676
|
-
const inferred = inferPolicyTypesFromOperationalCoverages(params.coverages ?? []);
|
|
2677
|
-
const controlled = normalizeOperationalPolicyTypes(params.profileTypes);
|
|
2678
|
-
if (hasSpecificPolicyType(controlled)) {
|
|
2679
|
-
const policyTypes = mergePolicyTypes(controlled, inferred);
|
|
2680
|
-
return {
|
|
2681
|
-
policyTypes,
|
|
2682
|
-
source: policyTypes.length > controlled.filter((type) => type !== "other").length ? "profile_augmented" : "profile"
|
|
2683
|
-
};
|
|
2684
|
-
}
|
|
2685
|
-
const existingControlled = normalizeOperationalPolicyTypes(params.existingTypes);
|
|
2686
|
-
if (hasSpecificPolicyType(existingControlled)) {
|
|
2687
|
-
const policyTypes = mergePolicyTypes(existingControlled, inferred);
|
|
2688
|
-
return {
|
|
2689
|
-
policyTypes,
|
|
2690
|
-
source: policyTypes.length > existingControlled.filter((type) => type !== "other").length ? "existing_augmented" : "existing"
|
|
2691
|
-
};
|
|
2692
|
-
}
|
|
2693
|
-
if (inferred.length > 0) {
|
|
2694
|
-
return { policyTypes: inferred, source: "inferred" };
|
|
2906
|
+
function resolveOperationalProfileLinesOfBusiness(params) {
|
|
2907
|
+
const inferred = inferLinesOfBusinessFromOperationalCoverages(params.coverages ?? []);
|
|
2908
|
+
if (inferred.some((code) => code !== "UN")) {
|
|
2909
|
+
return { linesOfBusiness: inferred, source: "coverage" };
|
|
2695
2910
|
}
|
|
2696
|
-
|
|
2911
|
+
const controlled = normalizeOperationalLinesOfBusiness(params.profileLinesOfBusiness);
|
|
2912
|
+
if (hasSpecificLineOfBusiness(controlled)) return { linesOfBusiness: controlled, source: "profile_hint" };
|
|
2913
|
+
const existingControlled = normalizeOperationalLinesOfBusiness(params.existingLinesOfBusiness);
|
|
2914
|
+
if (hasSpecificLineOfBusiness(existingControlled)) return { linesOfBusiness: existingControlled, source: "existing_hint" };
|
|
2915
|
+
return { linesOfBusiness: controlled, source: "default" };
|
|
2697
2916
|
}
|
|
2698
2917
|
|
|
2699
2918
|
// src/source/ids.ts
|
|
@@ -3925,7 +4144,7 @@ function shouldFailQualityGate(mode, status) {
|
|
|
3925
4144
|
}
|
|
3926
4145
|
|
|
3927
4146
|
// src/extraction/source-tree-extractor.ts
|
|
3928
|
-
var
|
|
4147
|
+
var import_zod23 = require("zod");
|
|
3929
4148
|
|
|
3930
4149
|
// src/source/operational-profile.ts
|
|
3931
4150
|
function normalizeWhitespace4(value) {
|
|
@@ -4098,18 +4317,17 @@ function mergeOperationalProfile(base, candidate, validNodeIds, validSpanIds) {
|
|
|
4098
4317
|
...base.warnings,
|
|
4099
4318
|
...Array.isArray(candidate.warnings) ? candidate.warnings.filter((warning) => typeof warning === "string" && warning.trim().length > 0) : []
|
|
4100
4319
|
];
|
|
4101
|
-
const
|
|
4102
|
-
|
|
4103
|
-
|
|
4320
|
+
const candidateLinesOfBusiness = candidate.linesOfBusiness ?? candidate.policyTypes;
|
|
4321
|
+
const baseLinesOfBusiness = base.linesOfBusiness ?? base.policyTypes;
|
|
4322
|
+
const resolvedLinesOfBusiness = resolveOperationalProfileLinesOfBusiness({
|
|
4323
|
+
profileLinesOfBusiness: candidateLinesOfBusiness,
|
|
4324
|
+
existingLinesOfBusiness: baseLinesOfBusiness,
|
|
4104
4325
|
coverages
|
|
4105
4326
|
});
|
|
4106
|
-
if (resolvedPolicyTypes.source === "profile_augmented" || resolvedPolicyTypes.source === "existing_augmented" || resolvedPolicyTypes.source === "inferred") {
|
|
4107
|
-
warnings.push(POLICY_TYPES_FROM_COVERAGES_WARNING);
|
|
4108
|
-
}
|
|
4109
4327
|
return PolicyOperationalProfileSchema.parse({
|
|
4110
4328
|
...base,
|
|
4111
4329
|
documentType: candidate.documentType === "policy" ? "policy" : base.documentType,
|
|
4112
|
-
|
|
4330
|
+
linesOfBusiness: resolvedLinesOfBusiness.linesOfBusiness,
|
|
4113
4331
|
policyNumber,
|
|
4114
4332
|
namedInsured,
|
|
4115
4333
|
insurer,
|
|
@@ -4128,7 +4346,7 @@ function mergeOperationalProfile(base, candidate, validNodeIds, validSpanIds) {
|
|
|
4128
4346
|
}
|
|
4129
4347
|
|
|
4130
4348
|
// src/extraction/operational-profile-cleanup.ts
|
|
4131
|
-
var
|
|
4349
|
+
var import_zod22 = require("zod");
|
|
4132
4350
|
var OPERATIONAL_COVERAGE_TERM_KINDS2 = [
|
|
4133
4351
|
"each_claim_limit",
|
|
4134
4352
|
"each_occurrence_limit",
|
|
@@ -4141,33 +4359,33 @@ var OPERATIONAL_COVERAGE_TERM_KINDS2 = [
|
|
|
4141
4359
|
"premium",
|
|
4142
4360
|
"other"
|
|
4143
4361
|
];
|
|
4144
|
-
var OperationalCoverageTermKindSchema =
|
|
4145
|
-
var OperationalProfileCleanupSchema =
|
|
4146
|
-
coverageDecisions:
|
|
4147
|
-
coverageIndex:
|
|
4148
|
-
action:
|
|
4149
|
-
reason:
|
|
4150
|
-
name:
|
|
4151
|
-
limit:
|
|
4152
|
-
deductible:
|
|
4153
|
-
premium:
|
|
4154
|
-
retroactiveDate:
|
|
4155
|
-
sourceNodeIds:
|
|
4156
|
-
sourceSpanIds:
|
|
4157
|
-
termDecisions:
|
|
4158
|
-
termIndex:
|
|
4159
|
-
action:
|
|
4160
|
-
reason:
|
|
4362
|
+
var OperationalCoverageTermKindSchema = import_zod22.z.enum(OPERATIONAL_COVERAGE_TERM_KINDS2);
|
|
4363
|
+
var OperationalProfileCleanupSchema = import_zod22.z.object({
|
|
4364
|
+
coverageDecisions: import_zod22.z.array(import_zod22.z.object({
|
|
4365
|
+
coverageIndex: import_zod22.z.number().int().nonnegative(),
|
|
4366
|
+
action: import_zod22.z.enum(["keep", "drop", "update"]),
|
|
4367
|
+
reason: import_zod22.z.string().optional(),
|
|
4368
|
+
name: import_zod22.z.string().optional(),
|
|
4369
|
+
limit: import_zod22.z.string().nullable().optional(),
|
|
4370
|
+
deductible: import_zod22.z.string().nullable().optional(),
|
|
4371
|
+
premium: import_zod22.z.string().nullable().optional(),
|
|
4372
|
+
retroactiveDate: import_zod22.z.string().nullable().optional(),
|
|
4373
|
+
sourceNodeIds: import_zod22.z.array(import_zod22.z.string()).optional(),
|
|
4374
|
+
sourceSpanIds: import_zod22.z.array(import_zod22.z.string()).optional(),
|
|
4375
|
+
termDecisions: import_zod22.z.array(import_zod22.z.object({
|
|
4376
|
+
termIndex: import_zod22.z.number().int().nonnegative(),
|
|
4377
|
+
action: import_zod22.z.enum(["keep", "drop", "update"]),
|
|
4378
|
+
reason: import_zod22.z.string().optional(),
|
|
4161
4379
|
kind: OperationalCoverageTermKindSchema.optional(),
|
|
4162
|
-
label:
|
|
4163
|
-
value:
|
|
4164
|
-
amount:
|
|
4165
|
-
appliesTo:
|
|
4166
|
-
sourceNodeIds:
|
|
4167
|
-
sourceSpanIds:
|
|
4380
|
+
label: import_zod22.z.string().optional(),
|
|
4381
|
+
value: import_zod22.z.string().optional(),
|
|
4382
|
+
amount: import_zod22.z.number().nullable().optional(),
|
|
4383
|
+
appliesTo: import_zod22.z.string().nullable().optional(),
|
|
4384
|
+
sourceNodeIds: import_zod22.z.array(import_zod22.z.string()).optional(),
|
|
4385
|
+
sourceSpanIds: import_zod22.z.array(import_zod22.z.string()).optional()
|
|
4168
4386
|
})).optional()
|
|
4169
4387
|
})).default([]),
|
|
4170
|
-
warnings:
|
|
4388
|
+
warnings: import_zod22.z.array(import_zod22.z.string()).default([])
|
|
4171
4389
|
});
|
|
4172
4390
|
var CLEANUP_CANDIDATE_ID_LIMIT = 12;
|
|
4173
4391
|
var CLEANUP_SOURCE_NODE_LIMIT = 90;
|
|
@@ -4323,7 +4541,7 @@ function buildOperationalProfileCleanupPrompt(sourceTree, profile, options = {})
|
|
|
4323
4541
|
));
|
|
4324
4542
|
const candidate = {
|
|
4325
4543
|
documentType: profile.documentType,
|
|
4326
|
-
|
|
4544
|
+
linesOfBusiness: profile.linesOfBusiness,
|
|
4327
4545
|
coverages: coverageEntries.map(({ coverage, coverageIndex }) => compactCoverageForCleanup(coverage, coverageIndex))
|
|
4328
4546
|
};
|
|
4329
4547
|
return `Review and clean a source-backed operational profile projection for an insurance policy.
|
|
@@ -4621,16 +4839,16 @@ function applyOperationalProfileCleanup(profile, cleanup, validNodeIds, validSpa
|
|
|
4621
4839
|
}
|
|
4622
4840
|
|
|
4623
4841
|
// src/extraction/source-tree-extractor.ts
|
|
4624
|
-
var SourceBackedValueForPromptSchema =
|
|
4625
|
-
value:
|
|
4626
|
-
normalizedValue:
|
|
4627
|
-
confidence:
|
|
4628
|
-
sourceNodeIds:
|
|
4629
|
-
sourceSpanIds:
|
|
4630
|
-
});
|
|
4631
|
-
var OperationalProfilePromptSchema =
|
|
4632
|
-
documentType:
|
|
4633
|
-
|
|
4842
|
+
var SourceBackedValueForPromptSchema = import_zod23.z.object({
|
|
4843
|
+
value: import_zod23.z.string(),
|
|
4844
|
+
normalizedValue: import_zod23.z.string().optional(),
|
|
4845
|
+
confidence: import_zod23.z.enum(["low", "medium", "high"]).optional(),
|
|
4846
|
+
sourceNodeIds: import_zod23.z.array(import_zod23.z.string()),
|
|
4847
|
+
sourceSpanIds: import_zod23.z.array(import_zod23.z.string())
|
|
4848
|
+
});
|
|
4849
|
+
var OperationalProfilePromptSchema = import_zod23.z.object({
|
|
4850
|
+
documentType: import_zod23.z.enum(["policy", "quote"]).optional(),
|
|
4851
|
+
linesOfBusiness: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
4634
4852
|
policyNumber: SourceBackedValueForPromptSchema.optional(),
|
|
4635
4853
|
namedInsured: SourceBackedValueForPromptSchema.optional(),
|
|
4636
4854
|
insurer: SourceBackedValueForPromptSchema.optional(),
|
|
@@ -4639,30 +4857,30 @@ var OperationalProfilePromptSchema = import_zod22.z.object({
|
|
|
4639
4857
|
expirationDate: SourceBackedValueForPromptSchema.optional(),
|
|
4640
4858
|
retroactiveDate: SourceBackedValueForPromptSchema.optional(),
|
|
4641
4859
|
premium: SourceBackedValueForPromptSchema.optional(),
|
|
4642
|
-
coverages:
|
|
4643
|
-
name:
|
|
4644
|
-
coverageCode:
|
|
4645
|
-
limit:
|
|
4646
|
-
deductible:
|
|
4647
|
-
premium:
|
|
4648
|
-
retroactiveDate:
|
|
4649
|
-
formNumber:
|
|
4650
|
-
sectionRef:
|
|
4651
|
-
endorsementNumber:
|
|
4652
|
-
limits:
|
|
4860
|
+
coverages: import_zod23.z.array(import_zod23.z.object({
|
|
4861
|
+
name: import_zod23.z.string(),
|
|
4862
|
+
coverageCode: import_zod23.z.string().optional(),
|
|
4863
|
+
limit: import_zod23.z.string().optional(),
|
|
4864
|
+
deductible: import_zod23.z.string().optional(),
|
|
4865
|
+
premium: import_zod23.z.string().optional(),
|
|
4866
|
+
retroactiveDate: import_zod23.z.string().optional(),
|
|
4867
|
+
formNumber: import_zod23.z.string().optional(),
|
|
4868
|
+
sectionRef: import_zod23.z.string().optional(),
|
|
4869
|
+
endorsementNumber: import_zod23.z.string().optional(),
|
|
4870
|
+
limits: import_zod23.z.array(import_zod23.z.object({
|
|
4653
4871
|
kind: OperationalCoverageTermKindSchema.optional(),
|
|
4654
|
-
label:
|
|
4655
|
-
value:
|
|
4656
|
-
amount:
|
|
4657
|
-
appliesTo:
|
|
4658
|
-
sourceNodeIds:
|
|
4659
|
-
sourceSpanIds:
|
|
4872
|
+
label: import_zod23.z.string(),
|
|
4873
|
+
value: import_zod23.z.string(),
|
|
4874
|
+
amount: import_zod23.z.number().optional(),
|
|
4875
|
+
appliesTo: import_zod23.z.string().optional(),
|
|
4876
|
+
sourceNodeIds: import_zod23.z.array(import_zod23.z.string()),
|
|
4877
|
+
sourceSpanIds: import_zod23.z.array(import_zod23.z.string())
|
|
4660
4878
|
})).optional(),
|
|
4661
|
-
sourceNodeIds:
|
|
4662
|
-
sourceSpanIds:
|
|
4879
|
+
sourceNodeIds: import_zod23.z.array(import_zod23.z.string()),
|
|
4880
|
+
sourceSpanIds: import_zod23.z.array(import_zod23.z.string())
|
|
4663
4881
|
})).optional(),
|
|
4664
|
-
sourceNodeIds:
|
|
4665
|
-
sourceSpanIds:
|
|
4882
|
+
sourceNodeIds: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
4883
|
+
sourceSpanIds: import_zod23.z.array(import_zod23.z.string()).optional()
|
|
4666
4884
|
});
|
|
4667
4885
|
function cleanText(value, fallback) {
|
|
4668
4886
|
const text = value?.replace(/\s+/g, " ").trim();
|
|
@@ -5669,7 +5887,7 @@ function operationalProfilePromptNodes(sourceTree) {
|
|
|
5669
5887
|
function emptyOperationalProfile() {
|
|
5670
5888
|
return {
|
|
5671
5889
|
documentType: "policy",
|
|
5672
|
-
|
|
5890
|
+
linesOfBusiness: ["UN"],
|
|
5673
5891
|
coverages: [],
|
|
5674
5892
|
parties: [],
|
|
5675
5893
|
endorsementSupport: [],
|
|
@@ -5820,7 +6038,7 @@ function materializeDocument(params) {
|
|
|
5820
6038
|
carrier !== "Unknown" ? carrier : void 0,
|
|
5821
6039
|
policyNumber !== "Unknown" ? `#${policyNumber}` : void 0,
|
|
5822
6040
|
insuredName !== "Unknown" ? `for ${insuredName}` : void 0,
|
|
5823
|
-
profile.
|
|
6041
|
+
profile.linesOfBusiness.length ? `covering ${profile.linesOfBusiness.slice(0, 5).join(", ")}` : void 0
|
|
5824
6042
|
].filter(Boolean).join(" ");
|
|
5825
6043
|
const base = {
|
|
5826
6044
|
id: params.id,
|
|
@@ -5834,7 +6052,7 @@ function materializeDocument(params) {
|
|
|
5834
6052
|
brokerAgency: broker,
|
|
5835
6053
|
producer: { agencyName: broker, ...brokerProvenance }
|
|
5836
6054
|
} : {},
|
|
5837
|
-
|
|
6055
|
+
linesOfBusiness: profile.linesOfBusiness,
|
|
5838
6056
|
formInventory: params.formInventory.filter((form) => typeof form.formNumber === "string" && form.formNumber.trim().length > 0).map((form) => ({
|
|
5839
6057
|
formNumber: form.formNumber,
|
|
5840
6058
|
editionDate: form.editionDate,
|
|
@@ -6220,13 +6438,13 @@ function chunkDocument(doc) {
|
|
|
6220
6438
|
};
|
|
6221
6439
|
const chunks = [];
|
|
6222
6440
|
const docId = doc.id;
|
|
6223
|
-
const
|
|
6441
|
+
const linesOfBusinessStr = doc.linesOfBusiness?.length ? doc.linesOfBusiness.join(",") : void 0;
|
|
6224
6442
|
const extendedDoc = doc;
|
|
6225
6443
|
function stringMetadata(entries) {
|
|
6226
6444
|
const base = Object.fromEntries(
|
|
6227
6445
|
Object.entries(entries).filter(([, value]) => value !== void 0 && value !== null && String(value).length > 0).map(([key, value]) => [key, String(value)])
|
|
6228
6446
|
);
|
|
6229
|
-
if (
|
|
6447
|
+
if (linesOfBusinessStr) base.linesOfBusiness = linesOfBusinessStr;
|
|
6230
6448
|
return base;
|
|
6231
6449
|
}
|
|
6232
6450
|
function lines(values) {
|
|
@@ -6260,7 +6478,7 @@ function chunkDocument(doc) {
|
|
|
6260
6478
|
doc.isRenewal != null ? `Renewal: ${doc.isRenewal ? "Yes" : "No"}` : null,
|
|
6261
6479
|
doc.isPackage != null ? `Package: ${doc.isPackage ? "Yes" : "No"}` : null,
|
|
6262
6480
|
doc.security ? `Security: ${doc.security}` : null,
|
|
6263
|
-
doc.
|
|
6481
|
+
doc.linesOfBusiness?.length ? `Lines of Business: ${doc.linesOfBusiness.join(", ")}` : null
|
|
6264
6482
|
]),
|
|
6265
6483
|
{ carrier: doc.carrier, documentType: doc.type }
|
|
6266
6484
|
);
|
|
@@ -7587,8 +7805,8 @@ Respond with JSON only:
|
|
|
7587
7805
|
}`;
|
|
7588
7806
|
|
|
7589
7807
|
// src/schemas/application.ts
|
|
7590
|
-
var
|
|
7591
|
-
var FieldTypeSchema =
|
|
7808
|
+
var import_zod24 = require("zod");
|
|
7809
|
+
var FieldTypeSchema = import_zod24.z.enum([
|
|
7592
7810
|
"text",
|
|
7593
7811
|
"numeric",
|
|
7594
7812
|
"currency",
|
|
@@ -7597,223 +7815,223 @@ var FieldTypeSchema = import_zod23.z.enum([
|
|
|
7597
7815
|
"table",
|
|
7598
7816
|
"declaration"
|
|
7599
7817
|
]);
|
|
7600
|
-
var ApplicationFieldSchema =
|
|
7601
|
-
id:
|
|
7602
|
-
label:
|
|
7603
|
-
section:
|
|
7818
|
+
var ApplicationFieldSchema = import_zod24.z.object({
|
|
7819
|
+
id: import_zod24.z.string(),
|
|
7820
|
+
label: import_zod24.z.string(),
|
|
7821
|
+
section: import_zod24.z.string(),
|
|
7604
7822
|
fieldType: FieldTypeSchema,
|
|
7605
|
-
required:
|
|
7606
|
-
options:
|
|
7607
|
-
columns:
|
|
7608
|
-
requiresExplanationIfYes:
|
|
7609
|
-
condition:
|
|
7610
|
-
dependsOn:
|
|
7611
|
-
whenValue:
|
|
7823
|
+
required: import_zod24.z.boolean(),
|
|
7824
|
+
options: import_zod24.z.array(import_zod24.z.string()).optional(),
|
|
7825
|
+
columns: import_zod24.z.array(import_zod24.z.string()).optional(),
|
|
7826
|
+
requiresExplanationIfYes: import_zod24.z.boolean().optional(),
|
|
7827
|
+
condition: import_zod24.z.object({
|
|
7828
|
+
dependsOn: import_zod24.z.string(),
|
|
7829
|
+
whenValue: import_zod24.z.string()
|
|
7612
7830
|
}).optional(),
|
|
7613
|
-
value:
|
|
7614
|
-
source:
|
|
7615
|
-
confidence:
|
|
7616
|
-
sourceSpanIds:
|
|
7617
|
-
userSourceSpanIds:
|
|
7618
|
-
pageNumber:
|
|
7619
|
-
fieldAnchorId:
|
|
7620
|
-
acroFormName:
|
|
7621
|
-
validationStatus:
|
|
7622
|
-
});
|
|
7623
|
-
var ApplicationQuestionConditionSchema =
|
|
7624
|
-
dependsOn:
|
|
7625
|
-
operator:
|
|
7626
|
-
value:
|
|
7627
|
-
whenValue:
|
|
7628
|
-
values:
|
|
7629
|
-
});
|
|
7630
|
-
var ApplicationRepeatSchema =
|
|
7631
|
-
min:
|
|
7632
|
-
max:
|
|
7633
|
-
label:
|
|
7634
|
-
});
|
|
7635
|
-
var ApplicationQuestionNodeSchema =
|
|
7636
|
-
() =>
|
|
7637
|
-
id:
|
|
7638
|
-
nodeType:
|
|
7639
|
-
fieldId:
|
|
7640
|
-
fieldPath:
|
|
7641
|
-
parentId:
|
|
7642
|
-
order:
|
|
7643
|
-
label:
|
|
7644
|
-
section:
|
|
7831
|
+
value: import_zod24.z.string().optional(),
|
|
7832
|
+
source: import_zod24.z.string().optional().describe("Where the value came from: auto-fill, user, lookup"),
|
|
7833
|
+
confidence: import_zod24.z.enum(["confirmed", "high", "medium", "low"]).optional(),
|
|
7834
|
+
sourceSpanIds: import_zod24.z.array(import_zod24.z.string()).optional().describe("Stable source spans that support the field value or field anchor"),
|
|
7835
|
+
userSourceSpanIds: import_zod24.z.array(import_zod24.z.string()).optional().describe("Message or attachment spans that support user-provided values"),
|
|
7836
|
+
pageNumber: import_zod24.z.number().int().positive().optional().describe("Application page where the field label or anchor appears"),
|
|
7837
|
+
fieldAnchorId: import_zod24.z.string().optional().describe("Stable field anchor ID derived from page, section, label, and form metadata"),
|
|
7838
|
+
acroFormName: import_zod24.z.string().optional().describe("Native PDF AcroForm field name when available"),
|
|
7839
|
+
validationStatus: import_zod24.z.enum(["valid", "needs_review", "unsupported", "missing"]).optional()
|
|
7840
|
+
});
|
|
7841
|
+
var ApplicationQuestionConditionSchema = import_zod24.z.object({
|
|
7842
|
+
dependsOn: import_zod24.z.string(),
|
|
7843
|
+
operator: import_zod24.z.enum(["equals", "not_equals", "in", "not_in", "exists"]).optional(),
|
|
7844
|
+
value: import_zod24.z.string().optional(),
|
|
7845
|
+
whenValue: import_zod24.z.string().optional(),
|
|
7846
|
+
values: import_zod24.z.array(import_zod24.z.string()).optional()
|
|
7847
|
+
});
|
|
7848
|
+
var ApplicationRepeatSchema = import_zod24.z.object({
|
|
7849
|
+
min: import_zod24.z.number().int().nonnegative().optional(),
|
|
7850
|
+
max: import_zod24.z.number().int().positive().optional(),
|
|
7851
|
+
label: import_zod24.z.string().optional()
|
|
7852
|
+
});
|
|
7853
|
+
var ApplicationQuestionNodeSchema = import_zod24.z.lazy(
|
|
7854
|
+
() => import_zod24.z.object({
|
|
7855
|
+
id: import_zod24.z.string(),
|
|
7856
|
+
nodeType: import_zod24.z.enum(["group", "question", "repeat_group", "table"]),
|
|
7857
|
+
fieldId: import_zod24.z.string().optional(),
|
|
7858
|
+
fieldPath: import_zod24.z.string().optional(),
|
|
7859
|
+
parentId: import_zod24.z.string().optional(),
|
|
7860
|
+
order: import_zod24.z.number().int().nonnegative().optional(),
|
|
7861
|
+
label: import_zod24.z.string(),
|
|
7862
|
+
section: import_zod24.z.string().optional(),
|
|
7645
7863
|
fieldType: FieldTypeSchema.optional(),
|
|
7646
|
-
required:
|
|
7647
|
-
prompt:
|
|
7648
|
-
options:
|
|
7649
|
-
columns:
|
|
7864
|
+
required: import_zod24.z.boolean().optional(),
|
|
7865
|
+
prompt: import_zod24.z.string().optional(),
|
|
7866
|
+
options: import_zod24.z.array(import_zod24.z.string()).optional(),
|
|
7867
|
+
columns: import_zod24.z.array(import_zod24.z.string()).optional(),
|
|
7650
7868
|
condition: ApplicationQuestionConditionSchema.optional(),
|
|
7651
7869
|
repeat: ApplicationRepeatSchema.optional(),
|
|
7652
|
-
children:
|
|
7870
|
+
children: import_zod24.z.array(ApplicationQuestionNodeSchema).optional()
|
|
7653
7871
|
})
|
|
7654
7872
|
);
|
|
7655
|
-
var ApplicationQuestionGraphSchema =
|
|
7656
|
-
id:
|
|
7657
|
-
version:
|
|
7658
|
-
title:
|
|
7659
|
-
applicationType:
|
|
7660
|
-
source:
|
|
7661
|
-
rootNodeIds:
|
|
7662
|
-
nodes:
|
|
7663
|
-
});
|
|
7664
|
-
var ApplicationTemplateSchema =
|
|
7665
|
-
id:
|
|
7666
|
-
version:
|
|
7667
|
-
title:
|
|
7668
|
-
applicationType:
|
|
7873
|
+
var ApplicationQuestionGraphSchema = import_zod24.z.object({
|
|
7874
|
+
id: import_zod24.z.string(),
|
|
7875
|
+
version: import_zod24.z.string(),
|
|
7876
|
+
title: import_zod24.z.string().optional(),
|
|
7877
|
+
applicationType: import_zod24.z.string().nullable().optional(),
|
|
7878
|
+
source: import_zod24.z.enum(["pdf", "manual", "imported", "generated"]).default("generated"),
|
|
7879
|
+
rootNodeIds: import_zod24.z.array(import_zod24.z.string()).optional(),
|
|
7880
|
+
nodes: import_zod24.z.array(ApplicationQuestionNodeSchema)
|
|
7881
|
+
});
|
|
7882
|
+
var ApplicationTemplateSchema = import_zod24.z.object({
|
|
7883
|
+
id: import_zod24.z.string(),
|
|
7884
|
+
version: import_zod24.z.string(),
|
|
7885
|
+
title: import_zod24.z.string(),
|
|
7886
|
+
applicationType: import_zod24.z.string().nullable().optional(),
|
|
7669
7887
|
questionGraph: ApplicationQuestionGraphSchema,
|
|
7670
|
-
fields:
|
|
7671
|
-
});
|
|
7672
|
-
var ApplicationClassifyResultSchema = import_zod23.z.object({
|
|
7673
|
-
isApplication: import_zod23.z.boolean(),
|
|
7674
|
-
confidence: import_zod23.z.number().min(0).max(1),
|
|
7675
|
-
applicationType: import_zod23.z.string().nullable()
|
|
7676
|
-
});
|
|
7677
|
-
var FieldExtractionResultSchema = import_zod23.z.object({
|
|
7678
|
-
fields: import_zod23.z.array(ApplicationFieldSchema)
|
|
7679
|
-
});
|
|
7680
|
-
var AutoFillMatchSchema = import_zod23.z.object({
|
|
7681
|
-
fieldId: import_zod23.z.string(),
|
|
7682
|
-
value: import_zod23.z.string(),
|
|
7683
|
-
confidence: import_zod23.z.enum(["confirmed"]),
|
|
7684
|
-
contextKey: import_zod23.z.string()
|
|
7685
|
-
});
|
|
7686
|
-
var AutoFillResultSchema = import_zod23.z.object({
|
|
7687
|
-
matches: import_zod23.z.array(AutoFillMatchSchema)
|
|
7688
|
-
});
|
|
7689
|
-
var QuestionBatchResultSchema = import_zod23.z.object({
|
|
7690
|
-
batches: import_zod23.z.array(import_zod23.z.array(import_zod23.z.string()).describe("Array of field IDs in this batch"))
|
|
7691
|
-
});
|
|
7692
|
-
var LookupRequestSchema = import_zod23.z.object({
|
|
7693
|
-
type: import_zod23.z.string().describe("Type of lookup: 'records', 'website', 'policy'"),
|
|
7694
|
-
description: import_zod23.z.string(),
|
|
7695
|
-
url: import_zod23.z.string().optional(),
|
|
7696
|
-
targetFieldIds: import_zod23.z.array(import_zod23.z.string())
|
|
7697
|
-
});
|
|
7698
|
-
var ReplyIntentSchema = import_zod23.z.object({
|
|
7699
|
-
primaryIntent: import_zod23.z.enum(["answers_only", "question", "lookup_request", "mixed"]),
|
|
7700
|
-
hasAnswers: import_zod23.z.boolean(),
|
|
7701
|
-
questionText: import_zod23.z.string().optional(),
|
|
7702
|
-
questionFieldIds: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
7703
|
-
lookupRequests: import_zod23.z.array(LookupRequestSchema).optional()
|
|
7704
|
-
});
|
|
7705
|
-
var ParsedAnswerSchema = import_zod23.z.object({
|
|
7706
|
-
fieldId: import_zod23.z.string(),
|
|
7707
|
-
value: import_zod23.z.string(),
|
|
7708
|
-
explanation: import_zod23.z.string().optional()
|
|
7709
|
-
});
|
|
7710
|
-
var AnswerParsingResultSchema = import_zod23.z.object({
|
|
7711
|
-
answers: import_zod23.z.array(ParsedAnswerSchema),
|
|
7712
|
-
unanswered: import_zod23.z.array(import_zod23.z.string()).describe("Field IDs that were not answered")
|
|
7713
|
-
});
|
|
7714
|
-
var LookupFillSchema = import_zod23.z.object({
|
|
7715
|
-
fieldId: import_zod23.z.string(),
|
|
7716
|
-
value: import_zod23.z.string(),
|
|
7717
|
-
source: import_zod23.z.string().describe("Specific citable reference, e.g. 'GL Policy #POL-12345 (Hartford)'"),
|
|
7718
|
-
sourceSpanIds: import_zod23.z.array(import_zod23.z.string()).optional()
|
|
7888
|
+
fields: import_zod24.z.array(ApplicationFieldSchema).optional()
|
|
7719
7889
|
});
|
|
7720
|
-
var
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
});
|
|
7725
|
-
var
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
});
|
|
7734
|
-
var
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
var
|
|
7741
|
-
|
|
7742
|
-
|
|
7890
|
+
var ApplicationClassifyResultSchema = import_zod24.z.object({
|
|
7891
|
+
isApplication: import_zod24.z.boolean(),
|
|
7892
|
+
confidence: import_zod24.z.number().min(0).max(1),
|
|
7893
|
+
applicationType: import_zod24.z.string().nullable()
|
|
7894
|
+
});
|
|
7895
|
+
var FieldExtractionResultSchema = import_zod24.z.object({
|
|
7896
|
+
fields: import_zod24.z.array(ApplicationFieldSchema)
|
|
7897
|
+
});
|
|
7898
|
+
var AutoFillMatchSchema = import_zod24.z.object({
|
|
7899
|
+
fieldId: import_zod24.z.string(),
|
|
7900
|
+
value: import_zod24.z.string(),
|
|
7901
|
+
confidence: import_zod24.z.enum(["confirmed"]),
|
|
7902
|
+
contextKey: import_zod24.z.string()
|
|
7903
|
+
});
|
|
7904
|
+
var AutoFillResultSchema = import_zod24.z.object({
|
|
7905
|
+
matches: import_zod24.z.array(AutoFillMatchSchema)
|
|
7906
|
+
});
|
|
7907
|
+
var QuestionBatchResultSchema = import_zod24.z.object({
|
|
7908
|
+
batches: import_zod24.z.array(import_zod24.z.array(import_zod24.z.string()).describe("Array of field IDs in this batch"))
|
|
7909
|
+
});
|
|
7910
|
+
var LookupRequestSchema = import_zod24.z.object({
|
|
7911
|
+
type: import_zod24.z.string().describe("Type of lookup: 'records', 'website', 'policy'"),
|
|
7912
|
+
description: import_zod24.z.string(),
|
|
7913
|
+
url: import_zod24.z.string().optional(),
|
|
7914
|
+
targetFieldIds: import_zod24.z.array(import_zod24.z.string())
|
|
7915
|
+
});
|
|
7916
|
+
var ReplyIntentSchema = import_zod24.z.object({
|
|
7917
|
+
primaryIntent: import_zod24.z.enum(["answers_only", "question", "lookup_request", "mixed"]),
|
|
7918
|
+
hasAnswers: import_zod24.z.boolean(),
|
|
7919
|
+
questionText: import_zod24.z.string().optional(),
|
|
7920
|
+
questionFieldIds: import_zod24.z.array(import_zod24.z.string()).optional(),
|
|
7921
|
+
lookupRequests: import_zod24.z.array(LookupRequestSchema).optional()
|
|
7922
|
+
});
|
|
7923
|
+
var ParsedAnswerSchema = import_zod24.z.object({
|
|
7924
|
+
fieldId: import_zod24.z.string(),
|
|
7925
|
+
value: import_zod24.z.string(),
|
|
7926
|
+
explanation: import_zod24.z.string().optional()
|
|
7927
|
+
});
|
|
7928
|
+
var AnswerParsingResultSchema = import_zod24.z.object({
|
|
7929
|
+
answers: import_zod24.z.array(ParsedAnswerSchema),
|
|
7930
|
+
unanswered: import_zod24.z.array(import_zod24.z.string()).describe("Field IDs that were not answered")
|
|
7931
|
+
});
|
|
7932
|
+
var LookupFillSchema = import_zod24.z.object({
|
|
7933
|
+
fieldId: import_zod24.z.string(),
|
|
7934
|
+
value: import_zod24.z.string(),
|
|
7935
|
+
source: import_zod24.z.string().describe("Specific citable reference, e.g. 'GL Policy #POL-12345 (Hartford)'"),
|
|
7936
|
+
sourceSpanIds: import_zod24.z.array(import_zod24.z.string()).optional()
|
|
7937
|
+
});
|
|
7938
|
+
var LookupFillResultSchema = import_zod24.z.object({
|
|
7939
|
+
fills: import_zod24.z.array(LookupFillSchema),
|
|
7940
|
+
unfillable: import_zod24.z.array(import_zod24.z.string()),
|
|
7941
|
+
explanation: import_zod24.z.string().optional()
|
|
7942
|
+
});
|
|
7943
|
+
var FlatPdfPlacementSchema = import_zod24.z.object({
|
|
7944
|
+
fieldId: import_zod24.z.string(),
|
|
7945
|
+
page: import_zod24.z.number(),
|
|
7946
|
+
x: import_zod24.z.number().describe("Percentage from left edge (0-100)"),
|
|
7947
|
+
y: import_zod24.z.number().describe("Percentage from top edge (0-100)"),
|
|
7948
|
+
text: import_zod24.z.string(),
|
|
7949
|
+
fontSize: import_zod24.z.number().optional(),
|
|
7950
|
+
isCheckmark: import_zod24.z.boolean().optional()
|
|
7951
|
+
});
|
|
7952
|
+
var AcroFormMappingSchema = import_zod24.z.object({
|
|
7953
|
+
fieldId: import_zod24.z.string(),
|
|
7954
|
+
acroFormName: import_zod24.z.string(),
|
|
7955
|
+
value: import_zod24.z.string()
|
|
7956
|
+
});
|
|
7957
|
+
var QualityGateStatusSchema = import_zod24.z.enum(["passed", "warning", "failed"]);
|
|
7958
|
+
var QualitySeveritySchema = import_zod24.z.enum(["info", "warning", "blocking"]);
|
|
7959
|
+
var ApplicationQualityIssueSchema = import_zod24.z.object({
|
|
7960
|
+
code: import_zod24.z.string(),
|
|
7743
7961
|
severity: QualitySeveritySchema,
|
|
7744
|
-
message:
|
|
7745
|
-
fieldId:
|
|
7962
|
+
message: import_zod24.z.string(),
|
|
7963
|
+
fieldId: import_zod24.z.string().optional()
|
|
7746
7964
|
});
|
|
7747
|
-
var ApplicationQualityRoundSchema =
|
|
7748
|
-
round:
|
|
7749
|
-
kind:
|
|
7965
|
+
var ApplicationQualityRoundSchema = import_zod24.z.object({
|
|
7966
|
+
round: import_zod24.z.number(),
|
|
7967
|
+
kind: import_zod24.z.string(),
|
|
7750
7968
|
status: QualityGateStatusSchema,
|
|
7751
|
-
summary:
|
|
7969
|
+
summary: import_zod24.z.string().optional()
|
|
7752
7970
|
});
|
|
7753
|
-
var ApplicationQualityArtifactSchema =
|
|
7754
|
-
kind:
|
|
7755
|
-
label:
|
|
7756
|
-
itemCount:
|
|
7971
|
+
var ApplicationQualityArtifactSchema = import_zod24.z.object({
|
|
7972
|
+
kind: import_zod24.z.string(),
|
|
7973
|
+
label: import_zod24.z.string().optional(),
|
|
7974
|
+
itemCount: import_zod24.z.number().optional()
|
|
7757
7975
|
});
|
|
7758
|
-
var ApplicationEmailReviewSchema =
|
|
7759
|
-
issues:
|
|
7976
|
+
var ApplicationEmailReviewSchema = import_zod24.z.object({
|
|
7977
|
+
issues: import_zod24.z.array(ApplicationQualityIssueSchema),
|
|
7760
7978
|
qualityGateStatus: QualityGateStatusSchema
|
|
7761
7979
|
});
|
|
7762
|
-
var ApplicationQualityReportSchema =
|
|
7763
|
-
issues:
|
|
7764
|
-
rounds:
|
|
7765
|
-
artifacts:
|
|
7980
|
+
var ApplicationQualityReportSchema = import_zod24.z.object({
|
|
7981
|
+
issues: import_zod24.z.array(ApplicationQualityIssueSchema),
|
|
7982
|
+
rounds: import_zod24.z.array(ApplicationQualityRoundSchema).optional(),
|
|
7983
|
+
artifacts: import_zod24.z.array(ApplicationQualityArtifactSchema).optional(),
|
|
7766
7984
|
emailReview: ApplicationEmailReviewSchema.optional(),
|
|
7767
7985
|
qualityGateStatus: QualityGateStatusSchema
|
|
7768
7986
|
});
|
|
7769
|
-
var ApplicationContextProposalSchema =
|
|
7770
|
-
id:
|
|
7771
|
-
fieldId:
|
|
7772
|
-
key:
|
|
7773
|
-
value:
|
|
7774
|
-
category:
|
|
7775
|
-
source:
|
|
7776
|
-
confidence:
|
|
7777
|
-
sourceSpanIds:
|
|
7778
|
-
userSourceSpanIds:
|
|
7779
|
-
});
|
|
7780
|
-
var ApplicationPacketAnswerSchema =
|
|
7781
|
-
fieldId:
|
|
7782
|
-
label:
|
|
7783
|
-
section:
|
|
7784
|
-
value:
|
|
7785
|
-
source:
|
|
7786
|
-
confidence:
|
|
7787
|
-
sourceSpanIds:
|
|
7788
|
-
userSourceSpanIds:
|
|
7789
|
-
});
|
|
7790
|
-
var ApplicationPacketSchema =
|
|
7791
|
-
id:
|
|
7792
|
-
applicationId:
|
|
7793
|
-
title:
|
|
7794
|
-
status:
|
|
7795
|
-
answers:
|
|
7796
|
-
missingFieldIds:
|
|
7987
|
+
var ApplicationContextProposalSchema = import_zod24.z.object({
|
|
7988
|
+
id: import_zod24.z.string(),
|
|
7989
|
+
fieldId: import_zod24.z.string().optional(),
|
|
7990
|
+
key: import_zod24.z.string(),
|
|
7991
|
+
value: import_zod24.z.string(),
|
|
7992
|
+
category: import_zod24.z.string(),
|
|
7993
|
+
source: import_zod24.z.enum(["application", "user", "lookup", "policy", "email", "chat", "imessage", "mcp"]),
|
|
7994
|
+
confidence: import_zod24.z.enum(["confirmed", "high", "medium", "low"]),
|
|
7995
|
+
sourceSpanIds: import_zod24.z.array(import_zod24.z.string()).optional(),
|
|
7996
|
+
userSourceSpanIds: import_zod24.z.array(import_zod24.z.string()).optional()
|
|
7997
|
+
});
|
|
7998
|
+
var ApplicationPacketAnswerSchema = import_zod24.z.object({
|
|
7999
|
+
fieldId: import_zod24.z.string(),
|
|
8000
|
+
label: import_zod24.z.string(),
|
|
8001
|
+
section: import_zod24.z.string(),
|
|
8002
|
+
value: import_zod24.z.string(),
|
|
8003
|
+
source: import_zod24.z.string(),
|
|
8004
|
+
confidence: import_zod24.z.enum(["confirmed", "high", "medium", "low"]).optional(),
|
|
8005
|
+
sourceSpanIds: import_zod24.z.array(import_zod24.z.string()).optional(),
|
|
8006
|
+
userSourceSpanIds: import_zod24.z.array(import_zod24.z.string()).optional()
|
|
8007
|
+
});
|
|
8008
|
+
var ApplicationPacketSchema = import_zod24.z.object({
|
|
8009
|
+
id: import_zod24.z.string(),
|
|
8010
|
+
applicationId: import_zod24.z.string(),
|
|
8011
|
+
title: import_zod24.z.string(),
|
|
8012
|
+
status: import_zod24.z.enum(["draft", "broker_ready", "submitted"]),
|
|
8013
|
+
answers: import_zod24.z.array(ApplicationPacketAnswerSchema),
|
|
8014
|
+
missingFieldIds: import_zod24.z.array(import_zod24.z.string()),
|
|
7797
8015
|
qualityReport: ApplicationQualityReportSchema,
|
|
7798
|
-
submissionNotes:
|
|
7799
|
-
createdAt:
|
|
7800
|
-
});
|
|
7801
|
-
var ApplicationStateSchema =
|
|
7802
|
-
id:
|
|
7803
|
-
pdfBase64:
|
|
7804
|
-
templateId:
|
|
7805
|
-
templateVersion:
|
|
8016
|
+
submissionNotes: import_zod24.z.string().optional(),
|
|
8017
|
+
createdAt: import_zod24.z.number()
|
|
8018
|
+
});
|
|
8019
|
+
var ApplicationStateSchema = import_zod24.z.object({
|
|
8020
|
+
id: import_zod24.z.string(),
|
|
8021
|
+
pdfBase64: import_zod24.z.string().optional().describe("Original PDF, omitted after extraction"),
|
|
8022
|
+
templateId: import_zod24.z.string().optional(),
|
|
8023
|
+
templateVersion: import_zod24.z.string().optional(),
|
|
7806
8024
|
templateSnapshot: ApplicationTemplateSchema.optional(),
|
|
7807
|
-
title:
|
|
7808
|
-
applicationType:
|
|
8025
|
+
title: import_zod24.z.string().optional(),
|
|
8026
|
+
applicationType: import_zod24.z.string().nullable().optional(),
|
|
7809
8027
|
questionGraph: ApplicationQuestionGraphSchema.optional(),
|
|
7810
|
-
fields:
|
|
7811
|
-
batches:
|
|
7812
|
-
currentBatchIndex:
|
|
7813
|
-
contextProposals:
|
|
8028
|
+
fields: import_zod24.z.array(ApplicationFieldSchema),
|
|
8029
|
+
batches: import_zod24.z.array(import_zod24.z.array(import_zod24.z.string())).optional(),
|
|
8030
|
+
currentBatchIndex: import_zod24.z.number().default(0),
|
|
8031
|
+
contextProposals: import_zod24.z.array(ApplicationContextProposalSchema).optional(),
|
|
7814
8032
|
packet: ApplicationPacketSchema.optional(),
|
|
7815
8033
|
qualityReport: ApplicationQualityReportSchema.optional(),
|
|
7816
|
-
status:
|
|
8034
|
+
status: import_zod24.z.enum([
|
|
7817
8035
|
"classifying",
|
|
7818
8036
|
"extracting",
|
|
7819
8037
|
"auto_filling",
|
|
@@ -7827,8 +8045,8 @@ var ApplicationStateSchema = import_zod23.z.object({
|
|
|
7827
8045
|
"cancelled",
|
|
7828
8046
|
"complete"
|
|
7829
8047
|
]),
|
|
7830
|
-
createdAt:
|
|
7831
|
-
updatedAt:
|
|
8048
|
+
createdAt: import_zod24.z.number(),
|
|
8049
|
+
updatedAt: import_zod24.z.number()
|
|
7832
8050
|
});
|
|
7833
8051
|
|
|
7834
8052
|
// src/application/agents/classifier.ts
|
|
@@ -9562,106 +9780,106 @@ Respond with the final answer, deduplicated citations array, overall confidence
|
|
|
9562
9780
|
}
|
|
9563
9781
|
|
|
9564
9782
|
// src/schemas/query.ts
|
|
9565
|
-
var
|
|
9566
|
-
var QueryIntentSchema =
|
|
9783
|
+
var import_zod25 = require("zod");
|
|
9784
|
+
var QueryIntentSchema = import_zod25.z.enum([
|
|
9567
9785
|
"policy_question",
|
|
9568
9786
|
"coverage_comparison",
|
|
9569
9787
|
"document_search",
|
|
9570
9788
|
"claims_inquiry",
|
|
9571
9789
|
"general_knowledge"
|
|
9572
9790
|
]);
|
|
9573
|
-
var QueryAttachmentKindSchema =
|
|
9574
|
-
var QueryAttachmentSchema =
|
|
9575
|
-
id:
|
|
9791
|
+
var QueryAttachmentKindSchema = import_zod25.z.enum(["image", "pdf", "text"]);
|
|
9792
|
+
var QueryAttachmentSchema = import_zod25.z.object({
|
|
9793
|
+
id: import_zod25.z.string().optional().describe("Optional stable attachment ID from the caller"),
|
|
9576
9794
|
kind: QueryAttachmentKindSchema,
|
|
9577
|
-
name:
|
|
9578
|
-
mimeType:
|
|
9579
|
-
base64:
|
|
9580
|
-
text:
|
|
9581
|
-
description:
|
|
9795
|
+
name: import_zod25.z.string().optional().describe("Original filename or user-facing label"),
|
|
9796
|
+
mimeType: import_zod25.z.string().optional().describe("MIME type such as image/jpeg or application/pdf"),
|
|
9797
|
+
base64: import_zod25.z.string().optional().describe("Base64-encoded file content for image/pdf attachments"),
|
|
9798
|
+
text: import_zod25.z.string().optional().describe("Plain-text attachment content when available"),
|
|
9799
|
+
description: import_zod25.z.string().optional().describe("Caller-provided description of the attachment")
|
|
9582
9800
|
});
|
|
9583
|
-
var QueryRetrievalModeSchema =
|
|
9801
|
+
var QueryRetrievalModeSchema = import_zod25.z.enum([
|
|
9584
9802
|
"graph_only",
|
|
9585
9803
|
"source_rag",
|
|
9586
9804
|
"long_context",
|
|
9587
9805
|
"hybrid"
|
|
9588
9806
|
]);
|
|
9589
|
-
var SubQuestionSchema =
|
|
9590
|
-
question:
|
|
9807
|
+
var SubQuestionSchema = import_zod25.z.object({
|
|
9808
|
+
question: import_zod25.z.string().describe("Atomic sub-question to retrieve and answer independently"),
|
|
9591
9809
|
intent: QueryIntentSchema,
|
|
9592
|
-
chunkTypes:
|
|
9593
|
-
documentFilters:
|
|
9594
|
-
type:
|
|
9595
|
-
carrier:
|
|
9596
|
-
insuredName:
|
|
9597
|
-
policyNumber:
|
|
9598
|
-
quoteNumber:
|
|
9599
|
-
|
|
9810
|
+
chunkTypes: import_zod25.z.array(import_zod25.z.string()).optional().describe("Chunk types to filter retrieval (e.g. coverage, endorsement, declaration)"),
|
|
9811
|
+
documentFilters: import_zod25.z.object({
|
|
9812
|
+
type: import_zod25.z.enum(["policy", "quote"]).optional(),
|
|
9813
|
+
carrier: import_zod25.z.string().optional(),
|
|
9814
|
+
insuredName: import_zod25.z.string().optional(),
|
|
9815
|
+
policyNumber: import_zod25.z.string().optional(),
|
|
9816
|
+
quoteNumber: import_zod25.z.string().optional(),
|
|
9817
|
+
linesOfBusiness: import_zod25.z.array(AcordLobCodeSchema).optional().describe("Filter by ACORD line of business code (e.g. HOME, AUTOP, DISAB) to avoid mixing up similar policies")
|
|
9600
9818
|
}).optional().describe("Structured filters to narrow document lookup")
|
|
9601
9819
|
});
|
|
9602
|
-
var QueryClassifyResultSchema =
|
|
9820
|
+
var QueryClassifyResultSchema = import_zod25.z.object({
|
|
9603
9821
|
intent: QueryIntentSchema,
|
|
9604
|
-
subQuestions:
|
|
9605
|
-
requiresDocumentLookup:
|
|
9606
|
-
requiresChunkSearch:
|
|
9607
|
-
requiresConversationHistory:
|
|
9822
|
+
subQuestions: import_zod25.z.array(SubQuestionSchema).min(1).describe("Decomposed atomic sub-questions"),
|
|
9823
|
+
requiresDocumentLookup: import_zod25.z.boolean().describe("Whether structured document lookup is needed"),
|
|
9824
|
+
requiresChunkSearch: import_zod25.z.boolean().describe("Whether semantic chunk search is needed"),
|
|
9825
|
+
requiresConversationHistory: import_zod25.z.boolean().describe("Whether conversation history is relevant"),
|
|
9608
9826
|
retrievalMode: QueryRetrievalModeSchema.optional().describe("Preferred retrieval strategy for the query when source-span retrieval is available")
|
|
9609
9827
|
});
|
|
9610
|
-
var EvidenceItemSchema =
|
|
9611
|
-
source:
|
|
9612
|
-
chunkId:
|
|
9613
|
-
sourceNodeId:
|
|
9614
|
-
sourceSpanId:
|
|
9615
|
-
documentId:
|
|
9616
|
-
turnId:
|
|
9617
|
-
attachmentId:
|
|
9618
|
-
text:
|
|
9619
|
-
relevance:
|
|
9828
|
+
var EvidenceItemSchema = import_zod25.z.object({
|
|
9829
|
+
source: import_zod25.z.enum(["chunk", "document", "conversation", "attachment", "source_span", "source_node"]),
|
|
9830
|
+
chunkId: import_zod25.z.string().optional(),
|
|
9831
|
+
sourceNodeId: import_zod25.z.string().optional(),
|
|
9832
|
+
sourceSpanId: import_zod25.z.string().optional(),
|
|
9833
|
+
documentId: import_zod25.z.string().optional(),
|
|
9834
|
+
turnId: import_zod25.z.string().optional(),
|
|
9835
|
+
attachmentId: import_zod25.z.string().optional(),
|
|
9836
|
+
text: import_zod25.z.string().describe("Text excerpt from the source"),
|
|
9837
|
+
relevance: import_zod25.z.number().min(0).max(1),
|
|
9620
9838
|
retrievalMode: QueryRetrievalModeSchema.optional(),
|
|
9621
9839
|
sourceLocation: SourceSpanLocationSchema.optional(),
|
|
9622
|
-
metadata:
|
|
9623
|
-
});
|
|
9624
|
-
var AttachmentInterpretationSchema =
|
|
9625
|
-
summary:
|
|
9626
|
-
extractedFacts:
|
|
9627
|
-
recommendedFocus:
|
|
9628
|
-
confidence:
|
|
9629
|
-
});
|
|
9630
|
-
var RetrievalResultSchema =
|
|
9631
|
-
subQuestion:
|
|
9632
|
-
evidence:
|
|
9633
|
-
});
|
|
9634
|
-
var CitationSchema =
|
|
9635
|
-
index:
|
|
9636
|
-
chunkId:
|
|
9637
|
-
sourceNodeId:
|
|
9638
|
-
sourceSpanId:
|
|
9639
|
-
documentId:
|
|
9640
|
-
documentType:
|
|
9641
|
-
field:
|
|
9642
|
-
quote:
|
|
9643
|
-
relevance:
|
|
9840
|
+
metadata: import_zod25.z.array(import_zod25.z.object({ key: import_zod25.z.string(), value: import_zod25.z.string() })).optional()
|
|
9841
|
+
});
|
|
9842
|
+
var AttachmentInterpretationSchema = import_zod25.z.object({
|
|
9843
|
+
summary: import_zod25.z.string().describe("Concise summary of what the attachment shows or contains"),
|
|
9844
|
+
extractedFacts: import_zod25.z.array(import_zod25.z.string()).describe("Specific observable or document facts grounded in the attachment"),
|
|
9845
|
+
recommendedFocus: import_zod25.z.array(import_zod25.z.string()).describe("Important details to incorporate when answering follow-up questions"),
|
|
9846
|
+
confidence: import_zod25.z.number().min(0).max(1)
|
|
9847
|
+
});
|
|
9848
|
+
var RetrievalResultSchema = import_zod25.z.object({
|
|
9849
|
+
subQuestion: import_zod25.z.string(),
|
|
9850
|
+
evidence: import_zod25.z.array(EvidenceItemSchema)
|
|
9851
|
+
});
|
|
9852
|
+
var CitationSchema = import_zod25.z.object({
|
|
9853
|
+
index: import_zod25.z.number().describe("Citation number [1], [2], etc."),
|
|
9854
|
+
chunkId: import_zod25.z.string().optional().describe("Source chunk ID, e.g. doc-123:coverage:2"),
|
|
9855
|
+
sourceNodeId: import_zod25.z.string().optional().describe("Source tree node ID when available"),
|
|
9856
|
+
sourceSpanId: import_zod25.z.string().optional().describe("Precise source span ID when available"),
|
|
9857
|
+
documentId: import_zod25.z.string(),
|
|
9858
|
+
documentType: import_zod25.z.enum(["policy", "quote"]).optional(),
|
|
9859
|
+
field: import_zod25.z.string().optional().describe("Specific field path, e.g. coverages[0].deductible"),
|
|
9860
|
+
quote: import_zod25.z.string().describe("Exact text from source that supports the claim"),
|
|
9861
|
+
relevance: import_zod25.z.number().min(0).max(1),
|
|
9644
9862
|
retrievalMode: QueryRetrievalModeSchema.optional(),
|
|
9645
9863
|
sourceLocation: SourceSpanLocationSchema.optional()
|
|
9646
9864
|
});
|
|
9647
|
-
var SubAnswerSchema =
|
|
9648
|
-
subQuestion:
|
|
9649
|
-
answer:
|
|
9650
|
-
citations:
|
|
9651
|
-
confidence:
|
|
9652
|
-
needsMoreContext:
|
|
9653
|
-
});
|
|
9654
|
-
var VerifyResultSchema =
|
|
9655
|
-
approved:
|
|
9656
|
-
issues:
|
|
9657
|
-
retrySubQuestions:
|
|
9658
|
-
});
|
|
9659
|
-
var QueryResultSchema =
|
|
9660
|
-
answer:
|
|
9661
|
-
citations:
|
|
9865
|
+
var SubAnswerSchema = import_zod25.z.object({
|
|
9866
|
+
subQuestion: import_zod25.z.string(),
|
|
9867
|
+
answer: import_zod25.z.string(),
|
|
9868
|
+
citations: import_zod25.z.array(CitationSchema),
|
|
9869
|
+
confidence: import_zod25.z.number().min(0).max(1),
|
|
9870
|
+
needsMoreContext: import_zod25.z.boolean().describe("True if evidence was insufficient to answer fully")
|
|
9871
|
+
});
|
|
9872
|
+
var VerifyResultSchema = import_zod25.z.object({
|
|
9873
|
+
approved: import_zod25.z.boolean().describe("Whether all sub-answers are adequately grounded"),
|
|
9874
|
+
issues: import_zod25.z.array(import_zod25.z.string()).describe("Specific grounding or consistency issues found"),
|
|
9875
|
+
retrySubQuestions: import_zod25.z.array(import_zod25.z.string()).optional().describe("Sub-questions that need additional retrieval or re-reasoning")
|
|
9876
|
+
});
|
|
9877
|
+
var QueryResultSchema = import_zod25.z.object({
|
|
9878
|
+
answer: import_zod25.z.string(),
|
|
9879
|
+
citations: import_zod25.z.array(CitationSchema),
|
|
9662
9880
|
intent: QueryIntentSchema,
|
|
9663
|
-
confidence:
|
|
9664
|
-
followUp:
|
|
9881
|
+
confidence: import_zod25.z.number().min(0).max(1),
|
|
9882
|
+
followUp: import_zod25.z.string().optional().describe("Suggested follow-up question if applicable")
|
|
9665
9883
|
});
|
|
9666
9884
|
|
|
9667
9885
|
// src/query/retriever.ts
|
|
@@ -10728,7 +10946,7 @@ ${sa.answer}`).join("\n\n"),
|
|
|
10728
10946
|
}
|
|
10729
10947
|
|
|
10730
10948
|
// src/pce/index.ts
|
|
10731
|
-
var
|
|
10949
|
+
var import_zod26 = require("zod");
|
|
10732
10950
|
|
|
10733
10951
|
// src/prompts/pce/index.ts
|
|
10734
10952
|
function buildPceNormalizePrompt(input) {
|
|
@@ -10762,11 +10980,11 @@ ${input.openQuestions.map((question) => `- ${question.id}${question.fieldPath ?
|
|
|
10762
10980
|
}
|
|
10763
10981
|
|
|
10764
10982
|
// src/pce/index.ts
|
|
10765
|
-
var ReplyAnswersSchema =
|
|
10766
|
-
answers:
|
|
10767
|
-
questionId:
|
|
10768
|
-
fieldPath:
|
|
10769
|
-
answer:
|
|
10983
|
+
var ReplyAnswersSchema = import_zod26.z.object({
|
|
10984
|
+
answers: import_zod26.z.array(import_zod26.z.object({
|
|
10985
|
+
questionId: import_zod26.z.string().optional(),
|
|
10986
|
+
fieldPath: import_zod26.z.string().optional(),
|
|
10987
|
+
answer: import_zod26.z.string()
|
|
10770
10988
|
}))
|
|
10771
10989
|
});
|
|
10772
10990
|
function createPceAgent(config = {}) {
|
|
@@ -11495,7 +11713,7 @@ var COI_GENERATION_TOOL = {
|
|
|
11495
11713
|
};
|
|
11496
11714
|
var COVERAGE_COMPARISON_TOOL = {
|
|
11497
11715
|
name: "coverage_comparison",
|
|
11498
|
-
description: "Compare coverages across two or more insurance documents (policies and/or quotes). Returns a side-by-side comparison of
|
|
11716
|
+
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.",
|
|
11499
11717
|
input_schema: {
|
|
11500
11718
|
type: "object",
|
|
11501
11719
|
properties: {
|
|
@@ -11504,10 +11722,10 @@ var COVERAGE_COMPARISON_TOOL = {
|
|
|
11504
11722
|
items: { type: "string" },
|
|
11505
11723
|
description: "Array of document IDs (policies or quotes) to compare."
|
|
11506
11724
|
},
|
|
11507
|
-
|
|
11725
|
+
linesOfBusiness: {
|
|
11508
11726
|
type: "array",
|
|
11509
11727
|
items: { type: "string" },
|
|
11510
|
-
description: "Optional filter: only compare these
|
|
11728
|
+
description: "Optional filter: only compare these ACORD line of business codes or labels (e.g. 'CGL', 'WORK'). Omit to compare all."
|
|
11511
11729
|
}
|
|
11512
11730
|
},
|
|
11513
11731
|
required: ["documentIds"]
|
|
@@ -11520,23 +11738,23 @@ var AGENT_TOOLS = [
|
|
|
11520
11738
|
];
|
|
11521
11739
|
|
|
11522
11740
|
// src/prompts/extractors/carrier-info.ts
|
|
11523
|
-
var
|
|
11524
|
-
var CarrierInfoSchema =
|
|
11525
|
-
carrierName:
|
|
11526
|
-
carrierLegalName:
|
|
11527
|
-
naicNumber:
|
|
11528
|
-
amBestRating:
|
|
11529
|
-
admittedStatus:
|
|
11530
|
-
mga:
|
|
11531
|
-
underwriter:
|
|
11532
|
-
brokerAgency:
|
|
11533
|
-
brokerContactName:
|
|
11534
|
-
brokerLicenseNumber:
|
|
11535
|
-
policyNumber:
|
|
11536
|
-
effectiveDate:
|
|
11537
|
-
expirationDate:
|
|
11538
|
-
quoteNumber:
|
|
11539
|
-
proposedEffectiveDate:
|
|
11741
|
+
var import_zod27 = require("zod");
|
|
11742
|
+
var CarrierInfoSchema = import_zod27.z.object({
|
|
11743
|
+
carrierName: import_zod27.z.string().describe("Primary insurance company name for display"),
|
|
11744
|
+
carrierLegalName: import_zod27.z.string().optional().describe("Legal entity name of insurer"),
|
|
11745
|
+
naicNumber: import_zod27.z.string().optional().describe("NAIC company code"),
|
|
11746
|
+
amBestRating: import_zod27.z.string().optional().describe("AM Best rating, e.g. 'A+ XV'"),
|
|
11747
|
+
admittedStatus: import_zod27.z.enum(["admitted", "non_admitted", "surplus_lines"]).optional().describe("Admitted status of the carrier"),
|
|
11748
|
+
mga: import_zod27.z.string().optional().describe("Managing General Agent or Program Administrator name"),
|
|
11749
|
+
underwriter: import_zod27.z.string().optional().describe("Named individual underwriter"),
|
|
11750
|
+
brokerAgency: import_zod27.z.string().optional().describe("Broker or producer agency name"),
|
|
11751
|
+
brokerContactName: import_zod27.z.string().optional().describe("Broker or producer contact person name"),
|
|
11752
|
+
brokerLicenseNumber: import_zod27.z.string().optional().describe("Broker or producer license number"),
|
|
11753
|
+
policyNumber: import_zod27.z.string().optional().describe("Policy or quote reference number"),
|
|
11754
|
+
effectiveDate: import_zod27.z.string().optional().describe("Policy effective date (MM/DD/YYYY)"),
|
|
11755
|
+
expirationDate: import_zod27.z.string().optional().describe("Policy expiration date (MM/DD/YYYY)"),
|
|
11756
|
+
quoteNumber: import_zod27.z.string().optional().describe("Quote or proposal reference number"),
|
|
11757
|
+
proposedEffectiveDate: import_zod27.z.string().optional().describe("Proposed effective date for quotes (MM/DD/YYYY)")
|
|
11540
11758
|
});
|
|
11541
11759
|
function buildCarrierInfoPrompt() {
|
|
11542
11760
|
return `You are an expert insurance document analyst. Extract carrier and policy identification information from this document.
|
|
@@ -11559,21 +11777,21 @@ Return JSON only.`;
|
|
|
11559
11777
|
}
|
|
11560
11778
|
|
|
11561
11779
|
// src/prompts/extractors/named-insured.ts
|
|
11562
|
-
var
|
|
11563
|
-
var AdditionalNamedInsuredSchema =
|
|
11564
|
-
name:
|
|
11565
|
-
relationship:
|
|
11780
|
+
var import_zod28 = require("zod");
|
|
11781
|
+
var AdditionalNamedInsuredSchema = import_zod28.z.object({
|
|
11782
|
+
name: import_zod28.z.string(),
|
|
11783
|
+
relationship: import_zod28.z.string().optional().describe("e.g. subsidiary, affiliate"),
|
|
11566
11784
|
address: SourceBackedAddressSchema.optional()
|
|
11567
11785
|
}).merge(SourceProvenanceSchema);
|
|
11568
|
-
var ScheduledPartySchema =
|
|
11569
|
-
name:
|
|
11786
|
+
var ScheduledPartySchema = import_zod28.z.object({
|
|
11787
|
+
name: import_zod28.z.string(),
|
|
11570
11788
|
address: SourceBackedAddressSchema.optional()
|
|
11571
11789
|
}).merge(SourceProvenanceSchema);
|
|
11572
|
-
var NamedInsuredSchema2 =
|
|
11573
|
-
insuredName:
|
|
11574
|
-
insuredDba:
|
|
11790
|
+
var NamedInsuredSchema2 = import_zod28.z.object({
|
|
11791
|
+
insuredName: import_zod28.z.string().describe("Name of primary named insured"),
|
|
11792
|
+
insuredDba: import_zod28.z.string().optional().describe("Doing-business-as name"),
|
|
11575
11793
|
insuredAddress: SourceBackedAddressSchema.optional().describe("Primary insured mailing address"),
|
|
11576
|
-
insuredEntityType:
|
|
11794
|
+
insuredEntityType: import_zod28.z.enum([
|
|
11577
11795
|
"corporation",
|
|
11578
11796
|
"llc",
|
|
11579
11797
|
"partnership",
|
|
@@ -11586,12 +11804,12 @@ var NamedInsuredSchema2 = import_zod27.z.object({
|
|
|
11586
11804
|
"married_couple",
|
|
11587
11805
|
"other"
|
|
11588
11806
|
]).optional().describe("Legal entity type of the insured"),
|
|
11589
|
-
insuredFein:
|
|
11590
|
-
insuredSicCode:
|
|
11591
|
-
insuredNaicsCode:
|
|
11592
|
-
additionalNamedInsureds:
|
|
11593
|
-
lossPayees:
|
|
11594
|
-
mortgageHolders:
|
|
11807
|
+
insuredFein: import_zod28.z.string().optional().describe("Federal Employer Identification Number"),
|
|
11808
|
+
insuredSicCode: import_zod28.z.string().optional().describe("SIC code"),
|
|
11809
|
+
insuredNaicsCode: import_zod28.z.string().optional().describe("NAICS code"),
|
|
11810
|
+
additionalNamedInsureds: import_zod28.z.array(AdditionalNamedInsuredSchema).optional().describe("Additional named insureds listed on the policy"),
|
|
11811
|
+
lossPayees: import_zod28.z.array(ScheduledPartySchema).optional().describe("Loss payees listed on the policy"),
|
|
11812
|
+
mortgageHolders: import_zod28.z.array(ScheduledPartySchema).optional().describe("Mortgage holders / lienholders listed on the policy")
|
|
11595
11813
|
});
|
|
11596
11814
|
function buildNamedInsuredPrompt() {
|
|
11597
11815
|
return `You are an expert insurance document analyst. Extract all named insured information from this document.
|
|
@@ -11618,14 +11836,14 @@ Return JSON only.`;
|
|
|
11618
11836
|
}
|
|
11619
11837
|
|
|
11620
11838
|
// src/prompts/extractors/coverage-limits.ts
|
|
11621
|
-
var
|
|
11839
|
+
var import_zod29 = require("zod");
|
|
11622
11840
|
var ExtractorCoverageSchema = CoverageSchema.extend({
|
|
11623
|
-
coverageCode:
|
|
11841
|
+
coverageCode: import_zod29.z.string().optional().describe("Coverage code or class code")
|
|
11624
11842
|
});
|
|
11625
|
-
var CoverageLimitsSchema =
|
|
11626
|
-
coverages:
|
|
11627
|
-
coverageForm:
|
|
11628
|
-
retroactiveDate:
|
|
11843
|
+
var CoverageLimitsSchema = import_zod29.z.object({
|
|
11844
|
+
coverages: import_zod29.z.array(ExtractorCoverageSchema).describe("All coverages with their limits"),
|
|
11845
|
+
coverageForm: import_zod29.z.enum(["occurrence", "claims_made", "accident"]).optional().describe("Primary coverage trigger type"),
|
|
11846
|
+
retroactiveDate: import_zod29.z.string().optional().describe("Retroactive date for claims-made policies (MM/DD/YYYY)")
|
|
11629
11847
|
});
|
|
11630
11848
|
function buildCoverageLimitsPrompt() {
|
|
11631
11849
|
return `You are an expert insurance document analyst. Extract all coverage limits and deductibles from this document.
|
|
@@ -11667,14 +11885,14 @@ Return JSON only.`;
|
|
|
11667
11885
|
}
|
|
11668
11886
|
|
|
11669
11887
|
// src/prompts/extractors/endorsements.ts
|
|
11670
|
-
var
|
|
11671
|
-
var EndorsementsSchema =
|
|
11672
|
-
endorsements:
|
|
11673
|
-
|
|
11674
|
-
formNumber:
|
|
11675
|
-
editionDate:
|
|
11676
|
-
title:
|
|
11677
|
-
endorsementType:
|
|
11888
|
+
var import_zod30 = require("zod");
|
|
11889
|
+
var EndorsementsSchema = import_zod30.z.object({
|
|
11890
|
+
endorsements: import_zod30.z.array(
|
|
11891
|
+
import_zod30.z.object({
|
|
11892
|
+
formNumber: import_zod30.z.string().describe("Form number, e.g. 'CG 21 47'"),
|
|
11893
|
+
editionDate: import_zod30.z.string().optional().describe("Edition date, e.g. '12 07'"),
|
|
11894
|
+
title: import_zod30.z.string().describe("Endorsement title"),
|
|
11895
|
+
endorsementType: import_zod30.z.enum([
|
|
11678
11896
|
"additional_insured",
|
|
11679
11897
|
"waiver_of_subrogation",
|
|
11680
11898
|
"primary_noncontributory",
|
|
@@ -11694,12 +11912,12 @@ var EndorsementsSchema = import_zod29.z.object({
|
|
|
11694
11912
|
"territorial_extension",
|
|
11695
11913
|
"other"
|
|
11696
11914
|
]).describe("Endorsement type classification"),
|
|
11697
|
-
effectiveDate:
|
|
11698
|
-
affectedCoverageParts:
|
|
11699
|
-
namedParties:
|
|
11700
|
-
|
|
11701
|
-
name:
|
|
11702
|
-
role:
|
|
11915
|
+
effectiveDate: import_zod30.z.string().optional().describe("Endorsement effective date"),
|
|
11916
|
+
affectedCoverageParts: import_zod30.z.array(import_zod30.z.string()).optional().describe("Coverage parts affected by this endorsement"),
|
|
11917
|
+
namedParties: import_zod30.z.array(
|
|
11918
|
+
import_zod30.z.object({
|
|
11919
|
+
name: import_zod30.z.string().describe("Party name"),
|
|
11920
|
+
role: import_zod30.z.enum([
|
|
11703
11921
|
"additional_insured",
|
|
11704
11922
|
"loss_payee",
|
|
11705
11923
|
"mortgage_holder",
|
|
@@ -11708,18 +11926,18 @@ var EndorsementsSchema = import_zod29.z.object({
|
|
|
11708
11926
|
"designated_person",
|
|
11709
11927
|
"other"
|
|
11710
11928
|
]).describe("Party role"),
|
|
11711
|
-
relationship:
|
|
11712
|
-
scope:
|
|
11929
|
+
relationship: import_zod30.z.string().optional().describe("Relationship to insured"),
|
|
11930
|
+
scope: import_zod30.z.string().optional().describe("Scope of coverage for this party")
|
|
11713
11931
|
})
|
|
11714
11932
|
).optional().describe("Named parties (additional insureds, loss payees, etc.)"),
|
|
11715
|
-
keyTerms:
|
|
11716
|
-
premiumImpact:
|
|
11717
|
-
excerpt:
|
|
11718
|
-
content:
|
|
11719
|
-
pageStart:
|
|
11720
|
-
pageEnd:
|
|
11721
|
-
sourceSpanIds:
|
|
11722
|
-
sourceTextHash:
|
|
11933
|
+
keyTerms: import_zod30.z.array(import_zod30.z.string()).optional().describe("Key terms or notable provisions in the endorsement"),
|
|
11934
|
+
premiumImpact: import_zod30.z.string().optional().describe("Additional premium or credit"),
|
|
11935
|
+
excerpt: import_zod30.z.string().optional().describe("Short source excerpt, not full verbatim text"),
|
|
11936
|
+
content: import_zod30.z.string().optional().describe("Legacy fallback only; do not return full text when sourceSpanIds are available"),
|
|
11937
|
+
pageStart: import_zod30.z.number().describe("Starting page number of this endorsement"),
|
|
11938
|
+
pageEnd: import_zod30.z.number().optional().describe("Ending page number of this endorsement"),
|
|
11939
|
+
sourceSpanIds: import_zod30.z.array(import_zod30.z.string()).optional().describe("Source span IDs grounding this endorsement"),
|
|
11940
|
+
sourceTextHash: import_zod30.z.string().optional().describe("Hash of the source text when available")
|
|
11723
11941
|
})
|
|
11724
11942
|
).describe("All endorsements found in the document")
|
|
11725
11943
|
});
|
|
@@ -11757,20 +11975,20 @@ Return JSON only.`;
|
|
|
11757
11975
|
}
|
|
11758
11976
|
|
|
11759
11977
|
// src/prompts/extractors/exclusions.ts
|
|
11760
|
-
var
|
|
11761
|
-
var ExclusionsSchema =
|
|
11762
|
-
exclusions:
|
|
11763
|
-
|
|
11764
|
-
name:
|
|
11765
|
-
formNumber:
|
|
11766
|
-
excludedPerils:
|
|
11767
|
-
isAbsolute:
|
|
11768
|
-
exceptions:
|
|
11769
|
-
buybackAvailable:
|
|
11770
|
-
buybackEndorsement:
|
|
11771
|
-
appliesTo:
|
|
11772
|
-
content:
|
|
11773
|
-
pageNumber:
|
|
11978
|
+
var import_zod31 = require("zod");
|
|
11979
|
+
var ExclusionsSchema = import_zod31.z.object({
|
|
11980
|
+
exclusions: import_zod31.z.array(
|
|
11981
|
+
import_zod31.z.object({
|
|
11982
|
+
name: import_zod31.z.string().describe("Exclusion title or short description"),
|
|
11983
|
+
formNumber: import_zod31.z.string().optional().describe("Form number if part of a named endorsement"),
|
|
11984
|
+
excludedPerils: import_zod31.z.array(import_zod31.z.string()).optional().describe("Specific perils excluded"),
|
|
11985
|
+
isAbsolute: import_zod31.z.boolean().optional().describe("Whether the exclusion is absolute (no exceptions)"),
|
|
11986
|
+
exceptions: import_zod31.z.array(import_zod31.z.string()).optional().describe("Exceptions to the exclusion, if any"),
|
|
11987
|
+
buybackAvailable: import_zod31.z.boolean().optional().describe("Whether coverage can be bought back via endorsement"),
|
|
11988
|
+
buybackEndorsement: import_zod31.z.string().optional().describe("Form number of the buyback endorsement if available"),
|
|
11989
|
+
appliesTo: import_zod31.z.array(import_zod31.z.string()).optional().describe("Policy types this exclusion applies to"),
|
|
11990
|
+
content: import_zod31.z.string().describe("Full verbatim exclusion text"),
|
|
11991
|
+
pageNumber: import_zod31.z.number().optional().describe("Page number where exclusion appears")
|
|
11774
11992
|
})
|
|
11775
11993
|
).describe("All exclusions found in the document")
|
|
11776
11994
|
});
|
|
@@ -11785,7 +12003,7 @@ For EACH exclusion, extract:
|
|
|
11785
12003
|
- exceptions: any exceptions to the exclusion (things still covered despite the exclusion)
|
|
11786
12004
|
- buybackAvailable: whether coverage can be purchased back via endorsement
|
|
11787
12005
|
- buybackEndorsement: the form number of the buyback endorsement if known
|
|
11788
|
-
- appliesTo: which
|
|
12006
|
+
- appliesTo: which lines of business or coverages this exclusion applies to (as an array)
|
|
11789
12007
|
- content: full verbatim exclusion text \u2014 REQUIRED
|
|
11790
12008
|
- pageNumber: page number where the exclusion appears
|
|
11791
12009
|
|
|
@@ -11806,12 +12024,12 @@ Return JSON only.`;
|
|
|
11806
12024
|
}
|
|
11807
12025
|
|
|
11808
12026
|
// src/prompts/extractors/conditions.ts
|
|
11809
|
-
var
|
|
11810
|
-
var ConditionsSchema =
|
|
11811
|
-
conditions:
|
|
11812
|
-
|
|
11813
|
-
name:
|
|
11814
|
-
conditionType:
|
|
12027
|
+
var import_zod32 = require("zod");
|
|
12028
|
+
var ConditionsSchema = import_zod32.z.object({
|
|
12029
|
+
conditions: import_zod32.z.array(
|
|
12030
|
+
import_zod32.z.object({
|
|
12031
|
+
name: import_zod32.z.string().describe("Condition title"),
|
|
12032
|
+
conditionType: import_zod32.z.enum([
|
|
11815
12033
|
"duties_after_loss",
|
|
11816
12034
|
"notice_requirements",
|
|
11817
12035
|
"other_insurance",
|
|
@@ -11830,14 +12048,14 @@ var ConditionsSchema = import_zod31.z.object({
|
|
|
11830
12048
|
"separation_of_insureds",
|
|
11831
12049
|
"other"
|
|
11832
12050
|
]).describe("Condition category"),
|
|
11833
|
-
content:
|
|
11834
|
-
keyValues:
|
|
11835
|
-
|
|
11836
|
-
key:
|
|
11837
|
-
value:
|
|
12051
|
+
content: import_zod32.z.string().describe("Full verbatim condition text"),
|
|
12052
|
+
keyValues: import_zod32.z.array(
|
|
12053
|
+
import_zod32.z.object({
|
|
12054
|
+
key: import_zod32.z.string().describe("Key name (e.g. 'noticePeriod', 'suitDeadline')"),
|
|
12055
|
+
value: import_zod32.z.string().describe("Value (e.g. '30 days', '2 years')")
|
|
11838
12056
|
})
|
|
11839
12057
|
).optional().describe("Key values extracted from the condition (notice periods, deadlines, etc.)"),
|
|
11840
|
-
pageNumber:
|
|
12058
|
+
pageNumber: import_zod32.z.number().optional().describe("Page number where condition appears")
|
|
11841
12059
|
})
|
|
11842
12060
|
).describe("All policy conditions found in the document")
|
|
11843
12061
|
});
|
|
@@ -11875,34 +12093,34 @@ Return JSON only.`;
|
|
|
11875
12093
|
}
|
|
11876
12094
|
|
|
11877
12095
|
// src/prompts/extractors/premium-breakdown.ts
|
|
11878
|
-
var
|
|
11879
|
-
var PremiumBreakdownSchema =
|
|
11880
|
-
premium:
|
|
11881
|
-
premiumAmount:
|
|
11882
|
-
totalCost:
|
|
11883
|
-
totalCostAmount:
|
|
11884
|
-
premiumBreakdown:
|
|
11885
|
-
|
|
11886
|
-
line:
|
|
11887
|
-
amount:
|
|
11888
|
-
amountValue:
|
|
12096
|
+
var import_zod33 = require("zod");
|
|
12097
|
+
var PremiumBreakdownSchema = import_zod33.z.object({
|
|
12098
|
+
premium: import_zod33.z.string().optional().describe("Total premium amount, e.g. '$5,000'"),
|
|
12099
|
+
premiumAmount: import_zod33.z.number().optional().describe("Total premium as a plain number with no currency symbols or commas"),
|
|
12100
|
+
totalCost: import_zod33.z.string().optional().describe("Total cost including taxes and fees, e.g. '$5,250'"),
|
|
12101
|
+
totalCostAmount: import_zod33.z.number().optional().describe("Total cost as a plain number with no currency symbols or commas"),
|
|
12102
|
+
premiumBreakdown: import_zod33.z.array(
|
|
12103
|
+
import_zod33.z.object({
|
|
12104
|
+
line: import_zod33.z.string().describe("Coverage line name"),
|
|
12105
|
+
amount: import_zod33.z.string().describe("Premium amount for this line"),
|
|
12106
|
+
amountValue: import_zod33.z.number().optional().describe("Premium amount as a plain number with no currency symbols or commas")
|
|
11889
12107
|
})
|
|
11890
12108
|
).optional().describe("Per-coverage-line premium breakdown"),
|
|
11891
|
-
taxesAndFees:
|
|
11892
|
-
|
|
11893
|
-
name:
|
|
11894
|
-
amount:
|
|
11895
|
-
amountValue:
|
|
11896
|
-
type:
|
|
12109
|
+
taxesAndFees: import_zod33.z.array(
|
|
12110
|
+
import_zod33.z.object({
|
|
12111
|
+
name: import_zod33.z.string().describe("Fee or tax name"),
|
|
12112
|
+
amount: import_zod33.z.string().describe("Dollar amount"),
|
|
12113
|
+
amountValue: import_zod33.z.number().optional().describe("Fee or tax amount as a plain number with no currency symbols or commas"),
|
|
12114
|
+
type: import_zod33.z.enum(["tax", "fee", "surcharge", "assessment"]).optional().describe("Fee category")
|
|
11897
12115
|
})
|
|
11898
12116
|
).optional().describe("Taxes, fees, surcharges, and assessments"),
|
|
11899
|
-
minimumPremium:
|
|
11900
|
-
minimumPremiumAmount:
|
|
11901
|
-
depositPremium:
|
|
11902
|
-
depositPremiumAmount:
|
|
11903
|
-
paymentPlan:
|
|
11904
|
-
auditType:
|
|
11905
|
-
ratingBasis:
|
|
12117
|
+
minimumPremium: import_zod33.z.string().optional().describe("Minimum premium if stated"),
|
|
12118
|
+
minimumPremiumAmount: import_zod33.z.number().optional().describe("Minimum premium as a plain number when the source states a fixed amount"),
|
|
12119
|
+
depositPremium: import_zod33.z.string().optional().describe("Deposit premium if stated"),
|
|
12120
|
+
depositPremiumAmount: import_zod33.z.number().optional().describe("Deposit premium as a plain number when the source states a fixed amount"),
|
|
12121
|
+
paymentPlan: import_zod33.z.string().optional().describe("Payment plan description"),
|
|
12122
|
+
auditType: import_zod33.z.enum(["annual", "semi_annual", "quarterly", "monthly", "final", "self"]).optional().describe("Premium audit type"),
|
|
12123
|
+
ratingBasis: import_zod33.z.string().optional().describe("Rating basis, e.g. payroll, revenue, area, units")
|
|
11906
12124
|
});
|
|
11907
12125
|
function buildPremiumBreakdownPrompt() {
|
|
11908
12126
|
return `You are an expert insurance document analyst. Extract all premium and cost information from this document.
|
|
@@ -11924,14 +12142,14 @@ Return JSON only.`;
|
|
|
11924
12142
|
}
|
|
11925
12143
|
|
|
11926
12144
|
// src/prompts/extractors/declarations.ts
|
|
11927
|
-
var
|
|
11928
|
-
var DeclarationsFieldSchema =
|
|
11929
|
-
field:
|
|
11930
|
-
value:
|
|
11931
|
-
section:
|
|
12145
|
+
var import_zod34 = require("zod");
|
|
12146
|
+
var DeclarationsFieldSchema = import_zod34.z.object({
|
|
12147
|
+
field: import_zod34.z.string().describe("Descriptive field name (e.g. 'policyNumber', 'effectiveDate', 'coverageALimit')"),
|
|
12148
|
+
value: import_zod34.z.string().describe("Extracted value exactly as it appears in the document"),
|
|
12149
|
+
section: import_zod34.z.string().optional().describe("Section or grouping this field belongs to (e.g. 'Coverage Limits', 'Vehicle Schedule')")
|
|
11932
12150
|
});
|
|
11933
|
-
var DeclarationsExtractSchema =
|
|
11934
|
-
fields:
|
|
12151
|
+
var DeclarationsExtractSchema = import_zod34.z.object({
|
|
12152
|
+
fields: import_zod34.z.array(DeclarationsFieldSchema).describe("All declarations page fields extracted as key-value pairs. Structure varies by line of business.")
|
|
11935
12153
|
});
|
|
11936
12154
|
function buildDeclarationsPrompt() {
|
|
11937
12155
|
return `You are an expert insurance document analyst. Extract all declarations page data from this document into a flexible key-value structure.
|
|
@@ -11971,21 +12189,21 @@ Preserve original values exactly as they appear. Return JSON only.`;
|
|
|
11971
12189
|
}
|
|
11972
12190
|
|
|
11973
12191
|
// src/prompts/extractors/loss-history.ts
|
|
11974
|
-
var
|
|
11975
|
-
var LossHistorySchema =
|
|
11976
|
-
lossSummary:
|
|
11977
|
-
individualClaims:
|
|
11978
|
-
|
|
11979
|
-
date:
|
|
11980
|
-
type:
|
|
11981
|
-
description:
|
|
11982
|
-
amountPaid:
|
|
11983
|
-
amountReserved:
|
|
11984
|
-
status:
|
|
11985
|
-
claimNumber:
|
|
12192
|
+
var import_zod35 = require("zod");
|
|
12193
|
+
var LossHistorySchema = import_zod35.z.object({
|
|
12194
|
+
lossSummary: import_zod35.z.string().optional().describe("Summary of loss history, e.g. '3 claims in past 5 years totaling $125,000'"),
|
|
12195
|
+
individualClaims: import_zod35.z.array(
|
|
12196
|
+
import_zod35.z.object({
|
|
12197
|
+
date: import_zod35.z.string().optional().describe("Date of loss or claim"),
|
|
12198
|
+
type: import_zod35.z.string().optional().describe("Type of claim, e.g. 'property damage', 'bodily injury'"),
|
|
12199
|
+
description: import_zod35.z.string().optional().describe("Brief description of the claim"),
|
|
12200
|
+
amountPaid: import_zod35.z.string().optional().describe("Amount paid"),
|
|
12201
|
+
amountReserved: import_zod35.z.string().optional().describe("Amount reserved"),
|
|
12202
|
+
status: import_zod35.z.enum(["open", "closed", "reopened"]).optional().describe("Claim status"),
|
|
12203
|
+
claimNumber: import_zod35.z.string().optional().describe("Claim reference number")
|
|
11986
12204
|
})
|
|
11987
12205
|
).optional().describe("Individual claim records"),
|
|
11988
|
-
experienceMod:
|
|
12206
|
+
experienceMod: import_zod35.z.string().optional().describe("Experience modification factor for workers comp, e.g. '0.85'")
|
|
11989
12207
|
});
|
|
11990
12208
|
function buildLossHistoryPrompt() {
|
|
11991
12209
|
return `You are an expert insurance document analyst. Extract all loss history and claims information from this document.
|
|
@@ -12002,21 +12220,21 @@ Return JSON only.`;
|
|
|
12002
12220
|
}
|
|
12003
12221
|
|
|
12004
12222
|
// src/prompts/extractors/sections.ts
|
|
12005
|
-
var
|
|
12006
|
-
var SubsectionSchema2 =
|
|
12007
|
-
title:
|
|
12008
|
-
sectionNumber:
|
|
12009
|
-
pageNumber:
|
|
12010
|
-
excerpt:
|
|
12011
|
-
content:
|
|
12012
|
-
sourceSpanIds:
|
|
12013
|
-
sourceTextHash:
|
|
12014
|
-
});
|
|
12015
|
-
var SectionsSchema =
|
|
12016
|
-
sections:
|
|
12017
|
-
|
|
12018
|
-
title:
|
|
12019
|
-
type:
|
|
12223
|
+
var import_zod36 = require("zod");
|
|
12224
|
+
var SubsectionSchema2 = import_zod36.z.object({
|
|
12225
|
+
title: import_zod36.z.string().describe("Subsection title"),
|
|
12226
|
+
sectionNumber: import_zod36.z.string().optional().describe("Subsection number"),
|
|
12227
|
+
pageNumber: import_zod36.z.number().optional().describe("Page number"),
|
|
12228
|
+
excerpt: import_zod36.z.string().optional().describe("Short source excerpt, not full verbatim text"),
|
|
12229
|
+
content: import_zod36.z.string().optional().describe("Legacy fallback only; do not return full text when sourceSpanIds are available"),
|
|
12230
|
+
sourceSpanIds: import_zod36.z.array(import_zod36.z.string()).optional().describe("Source span IDs grounding this subsection"),
|
|
12231
|
+
sourceTextHash: import_zod36.z.string().optional().describe("Hash of the source text when available")
|
|
12232
|
+
});
|
|
12233
|
+
var SectionsSchema = import_zod36.z.object({
|
|
12234
|
+
sections: import_zod36.z.array(
|
|
12235
|
+
import_zod36.z.object({
|
|
12236
|
+
title: import_zod36.z.string().describe("Section title"),
|
|
12237
|
+
type: import_zod36.z.enum([
|
|
12020
12238
|
"declarations",
|
|
12021
12239
|
"insuring_agreement",
|
|
12022
12240
|
"policy_form",
|
|
@@ -12031,13 +12249,13 @@ var SectionsSchema = import_zod35.z.object({
|
|
|
12031
12249
|
"regulatory",
|
|
12032
12250
|
"other"
|
|
12033
12251
|
]).describe("Section type classification"),
|
|
12034
|
-
excerpt:
|
|
12035
|
-
content:
|
|
12036
|
-
pageStart:
|
|
12037
|
-
pageEnd:
|
|
12038
|
-
sourceSpanIds:
|
|
12039
|
-
sourceTextHash:
|
|
12040
|
-
subsections:
|
|
12252
|
+
excerpt: import_zod36.z.string().optional().describe("Short source excerpt, not full verbatim text"),
|
|
12253
|
+
content: import_zod36.z.string().optional().describe("Legacy fallback only; do not return full text when sourceSpanIds are available"),
|
|
12254
|
+
pageStart: import_zod36.z.number().describe("Starting page number"),
|
|
12255
|
+
pageEnd: import_zod36.z.number().optional().describe("Ending page number"),
|
|
12256
|
+
sourceSpanIds: import_zod36.z.array(import_zod36.z.string()).optional().describe("Source span IDs grounding this section"),
|
|
12257
|
+
sourceTextHash: import_zod36.z.string().optional().describe("Hash of the source text when available"),
|
|
12258
|
+
subsections: import_zod36.z.array(SubsectionSchema2).optional().describe("Subsections within this section")
|
|
12041
12259
|
})
|
|
12042
12260
|
).describe("All document sections")
|
|
12043
12261
|
});
|
|
@@ -12071,20 +12289,20 @@ Return JSON only.`;
|
|
|
12071
12289
|
}
|
|
12072
12290
|
|
|
12073
12291
|
// src/prompts/extractors/supplementary.ts
|
|
12074
|
-
var
|
|
12075
|
-
var AuxiliaryFactSchema2 =
|
|
12076
|
-
key:
|
|
12077
|
-
value:
|
|
12078
|
-
subject:
|
|
12079
|
-
context:
|
|
12080
|
-
});
|
|
12081
|
-
var SupplementarySchema =
|
|
12082
|
-
regulatoryContacts:
|
|
12083
|
-
claimsContacts:
|
|
12084
|
-
thirdPartyAdministrators:
|
|
12085
|
-
cancellationNoticeDays:
|
|
12086
|
-
nonrenewalNoticeDays:
|
|
12087
|
-
auxiliaryFacts:
|
|
12292
|
+
var import_zod37 = require("zod");
|
|
12293
|
+
var AuxiliaryFactSchema2 = import_zod37.z.object({
|
|
12294
|
+
key: import_zod37.z.string().describe("Normalized machine-readable fact key, e.g. 'policyholder_age' or 'insured_name'"),
|
|
12295
|
+
value: import_zod37.z.string().describe("Concrete extracted fact value"),
|
|
12296
|
+
subject: import_zod37.z.string().optional().describe("Person, entity, vehicle, property, or schedule item this fact belongs to"),
|
|
12297
|
+
context: import_zod37.z.string().optional().describe("Short disambiguating context, such as 'Driver Schedule' or 'Named Insured'")
|
|
12298
|
+
});
|
|
12299
|
+
var SupplementarySchema = import_zod37.z.object({
|
|
12300
|
+
regulatoryContacts: import_zod37.z.array(ContactSchema).optional().describe("Regulatory body contacts (state department of insurance, ombudsman)"),
|
|
12301
|
+
claimsContacts: import_zod37.z.array(ContactSchema).optional().describe("Claims reporting contacts and instructions"),
|
|
12302
|
+
thirdPartyAdministrators: import_zod37.z.array(ContactSchema).optional().describe("Third-party administrators for claims handling"),
|
|
12303
|
+
cancellationNoticeDays: import_zod37.z.number().optional().describe("Required notice period for cancellation in days"),
|
|
12304
|
+
nonrenewalNoticeDays: import_zod37.z.number().optional().describe("Required notice period for nonrenewal in days"),
|
|
12305
|
+
auxiliaryFacts: import_zod37.z.array(AuxiliaryFactSchema2).optional().describe("Additional retrieval-only facts that do not fit the strict primary schema")
|
|
12088
12306
|
});
|
|
12089
12307
|
function buildSupplementaryPrompt(alreadyExtractedSummary) {
|
|
12090
12308
|
const exclusionBlock = alreadyExtractedSummary ? `
|
|
@@ -12124,17 +12342,17 @@ Return JSON only.`;
|
|
|
12124
12342
|
}
|
|
12125
12343
|
|
|
12126
12344
|
// src/prompts/extractors/definitions.ts
|
|
12127
|
-
var
|
|
12128
|
-
var DefinitionsSchema =
|
|
12129
|
-
definitions:
|
|
12130
|
-
|
|
12131
|
-
term:
|
|
12132
|
-
definition:
|
|
12133
|
-
pageNumber:
|
|
12134
|
-
formNumber:
|
|
12135
|
-
formTitle:
|
|
12136
|
-
sectionRef:
|
|
12137
|
-
originalContent:
|
|
12345
|
+
var import_zod38 = require("zod");
|
|
12346
|
+
var DefinitionsSchema = import_zod38.z.object({
|
|
12347
|
+
definitions: import_zod38.z.array(
|
|
12348
|
+
import_zod38.z.object({
|
|
12349
|
+
term: import_zod38.z.string().describe("Defined term exactly as shown in the document"),
|
|
12350
|
+
definition: import_zod38.z.string().describe("Full verbatim definition text, preserving original wording"),
|
|
12351
|
+
pageNumber: import_zod38.z.number().optional().describe("Original document page number"),
|
|
12352
|
+
formNumber: import_zod38.z.string().optional().describe("Form number where this definition appears"),
|
|
12353
|
+
formTitle: import_zod38.z.string().optional().describe("Form title where this definition appears"),
|
|
12354
|
+
sectionRef: import_zod38.z.string().optional().describe("Definition section heading or subsection reference"),
|
|
12355
|
+
originalContent: import_zod38.z.string().optional().describe("Short verbatim source snippet containing the term and definition")
|
|
12138
12356
|
})
|
|
12139
12357
|
).describe("All substantive insurance definitions found in the document")
|
|
12140
12358
|
});
|
|
@@ -12168,22 +12386,22 @@ Return JSON only.`;
|
|
|
12168
12386
|
}
|
|
12169
12387
|
|
|
12170
12388
|
// src/prompts/extractors/covered-reasons.ts
|
|
12171
|
-
var
|
|
12172
|
-
var CoveredReasonsSchema =
|
|
12173
|
-
coveredReasons:
|
|
12174
|
-
|
|
12175
|
-
coverageName:
|
|
12176
|
-
reasonNumber:
|
|
12177
|
-
title:
|
|
12178
|
-
content:
|
|
12179
|
-
conditions:
|
|
12180
|
-
exceptions:
|
|
12181
|
-
appliesTo:
|
|
12182
|
-
pageNumber:
|
|
12183
|
-
formNumber:
|
|
12184
|
-
formTitle:
|
|
12185
|
-
sectionRef:
|
|
12186
|
-
originalContent:
|
|
12389
|
+
var import_zod39 = require("zod");
|
|
12390
|
+
var CoveredReasonsSchema = import_zod39.z.object({
|
|
12391
|
+
coveredReasons: import_zod39.z.array(
|
|
12392
|
+
import_zod39.z.object({
|
|
12393
|
+
coverageName: import_zod39.z.string().describe("Coverage, coverage part, or form this covered reason belongs to"),
|
|
12394
|
+
reasonNumber: import_zod39.z.string().optional().describe("Source number or letter for the covered reason, if shown"),
|
|
12395
|
+
title: import_zod39.z.string().optional().describe("Covered reason title, peril, cause of loss, trigger, or short name"),
|
|
12396
|
+
content: import_zod39.z.string().describe("Full verbatim covered-reason or insuring-agreement text"),
|
|
12397
|
+
conditions: import_zod39.z.array(import_zod39.z.string()).optional().describe("Conditions, timing rules, documentation requirements, or prerequisites attached to this covered reason"),
|
|
12398
|
+
exceptions: import_zod39.z.array(import_zod39.z.string()).optional().describe("Exceptions or limitations attached to this covered reason"),
|
|
12399
|
+
appliesTo: import_zod39.z.array(import_zod39.z.string()).optional().describe("Covered property, persons, autos, locations, operations, or coverage parts this reason applies to"),
|
|
12400
|
+
pageNumber: import_zod39.z.number().optional().describe("Original document page number"),
|
|
12401
|
+
formNumber: import_zod39.z.string().optional().describe("Form number where this covered reason appears"),
|
|
12402
|
+
formTitle: import_zod39.z.string().optional().describe("Form title where this covered reason appears"),
|
|
12403
|
+
sectionRef: import_zod39.z.string().optional().describe("Section heading where this covered reason appears"),
|
|
12404
|
+
originalContent: import_zod39.z.string().optional().describe("Short verbatim source snippet used for this covered reason")
|
|
12187
12405
|
})
|
|
12188
12406
|
).describe("Covered causes, perils, triggers, or reasons that affirmatively grant coverage")
|
|
12189
12407
|
});
|
|
@@ -13027,10 +13245,13 @@ function getTemplate(policyType) {
|
|
|
13027
13245
|
}
|
|
13028
13246
|
// Annotate the CommonJS export names for ESM import in node:
|
|
13029
13247
|
0 && (module.exports = {
|
|
13248
|
+
ACORD_LOB_CODES,
|
|
13249
|
+
ACORD_LOB_LABELS,
|
|
13030
13250
|
ADMITTED_STATUSES,
|
|
13031
13251
|
AGENT_TOOLS,
|
|
13032
13252
|
APPLICATION_CLASSIFY_PROMPT,
|
|
13033
13253
|
AUDIT_TYPES,
|
|
13254
|
+
AcordLobCodeSchema,
|
|
13034
13255
|
AcroFormMappingSchema,
|
|
13035
13256
|
AddressSchema,
|
|
13036
13257
|
AdmittedStatusSchema,
|
|
@@ -13123,6 +13344,7 @@ function getTemplate(policyType) {
|
|
|
13123
13344
|
ENDORSEMENT_PARTY_ROLES,
|
|
13124
13345
|
ENDORSEMENT_TYPES,
|
|
13125
13346
|
ENTITY_TYPES,
|
|
13347
|
+
EXCLUDED_ACORD_LOB_CODES,
|
|
13126
13348
|
EarthquakeDeclarationsSchema,
|
|
13127
13349
|
EmployersLiabilityLimitsSchema,
|
|
13128
13350
|
EndorsementPartyRoleSchema,
|
|
@@ -13156,6 +13378,7 @@ function getTemplate(policyType) {
|
|
|
13156
13378
|
InsuredLocationSchema,
|
|
13157
13379
|
InsuredVehicleSchema,
|
|
13158
13380
|
InsurerInfoSchema,
|
|
13381
|
+
LEGACY_POLICY_TYPE_TO_LOB,
|
|
13159
13382
|
LIMIT_TYPES,
|
|
13160
13383
|
LOSS_SETTLEMENTS,
|
|
13161
13384
|
LimitScheduleSchema,
|
|
@@ -13174,12 +13397,11 @@ function getTemplate(policyType) {
|
|
|
13174
13397
|
OperationalEndorsementSupportSchema,
|
|
13175
13398
|
OperationalPartySchema,
|
|
13176
13399
|
PERSONAL_AUTO_USAGES,
|
|
13400
|
+
PERSONAL_LOB_CODES,
|
|
13177
13401
|
PET_SPECIES,
|
|
13178
13402
|
PLATFORM_CONFIGS,
|
|
13179
13403
|
POLICY_SECTION_TYPES,
|
|
13180
13404
|
POLICY_TERM_TYPES,
|
|
13181
|
-
POLICY_TYPES,
|
|
13182
|
-
POLICY_TYPES_FROM_COVERAGES_WARNING,
|
|
13183
13405
|
ParsedAnswerSchema,
|
|
13184
13406
|
PaymentInstallmentSchema,
|
|
13185
13407
|
PaymentPlanSchema,
|
|
@@ -13206,7 +13428,6 @@ function getTemplate(policyType) {
|
|
|
13206
13428
|
PolicyOperationalProfileSchema,
|
|
13207
13429
|
PolicySectionTypeSchema,
|
|
13208
13430
|
PolicyTermTypeSchema,
|
|
13209
|
-
PolicyTypeSchema,
|
|
13210
13431
|
PremiumLineSchema,
|
|
13211
13432
|
ProducerInfoSchema,
|
|
13212
13433
|
ProfessionalLiabilityDeclarationsSchema,
|
|
@@ -13335,16 +13556,19 @@ function getTemplate(policyType) {
|
|
|
13335
13556
|
getNextApplicationQuestions,
|
|
13336
13557
|
getPdfPageCount,
|
|
13337
13558
|
getTemplate,
|
|
13338
|
-
|
|
13559
|
+
inferLinesOfBusinessFromOperationalCoverages,
|
|
13339
13560
|
isDoclingExtractionInput,
|
|
13340
13561
|
isFileReference,
|
|
13562
|
+
isLobCode,
|
|
13563
|
+
isPersonalLob,
|
|
13564
|
+
lobLabel,
|
|
13341
13565
|
mergeQuestionAnswers,
|
|
13342
13566
|
mergeSourceSpans,
|
|
13343
13567
|
normalizeApplicationQuestionGraph,
|
|
13344
13568
|
normalizeDoclingDocument,
|
|
13345
13569
|
normalizeDocumentSourceTreePaths,
|
|
13346
13570
|
normalizeForMatch,
|
|
13347
|
-
|
|
13571
|
+
normalizeOperationalLinesOfBusiness,
|
|
13348
13572
|
normalizeSourceSpans,
|
|
13349
13573
|
orderSourceEvidence,
|
|
13350
13574
|
overlayTextOnPdf,
|
|
@@ -13355,7 +13579,7 @@ function getTemplate(policyType) {
|
|
|
13355
13579
|
processReply,
|
|
13356
13580
|
proposeContextWrites,
|
|
13357
13581
|
resolveModelBudget,
|
|
13358
|
-
|
|
13582
|
+
resolveOperationalProfileLinesOfBusiness,
|
|
13359
13583
|
safeGenerateObject,
|
|
13360
13584
|
sanitizeNulls,
|
|
13361
13585
|
scoreCaseProposal,
|
|
@@ -13366,6 +13590,7 @@ function getTemplate(policyType) {
|
|
|
13366
13590
|
stablePolicyChangeItemId,
|
|
13367
13591
|
stableStringify,
|
|
13368
13592
|
stripFences,
|
|
13593
|
+
toLobCodes,
|
|
13369
13594
|
toStrictSchema,
|
|
13370
13595
|
validateApplicationPacket,
|
|
13371
13596
|
validateEvidence,
|