@claritylabs/cl-sdk 3.2.13 → 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 -84
- package/dist/index.d.ts +93 -84
- package/dist/index.js +2050 -1799
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2037 -1794
- 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,11 +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
190
|
ParsedAnswerSchema: () => ParsedAnswerSchema,
|
|
186
191
|
PaymentInstallmentSchema: () => PaymentInstallmentSchema,
|
|
187
192
|
PaymentPlanSchema: () => PaymentPlanSchema,
|
|
@@ -208,7 +213,6 @@ __export(src_exports, {
|
|
|
208
213
|
PolicyOperationalProfileSchema: () => PolicyOperationalProfileSchema,
|
|
209
214
|
PolicySectionTypeSchema: () => PolicySectionTypeSchema,
|
|
210
215
|
PolicyTermTypeSchema: () => PolicyTermTypeSchema,
|
|
211
|
-
PolicyTypeSchema: () => PolicyTypeSchema,
|
|
212
216
|
PremiumLineSchema: () => PremiumLineSchema,
|
|
213
217
|
ProducerInfoSchema: () => ProducerInfoSchema,
|
|
214
218
|
ProfessionalLiabilityDeclarationsSchema: () => ProfessionalLiabilityDeclarationsSchema,
|
|
@@ -337,16 +341,19 @@ __export(src_exports, {
|
|
|
337
341
|
getNextApplicationQuestions: () => getNextApplicationQuestions,
|
|
338
342
|
getPdfPageCount: () => getPdfPageCount,
|
|
339
343
|
getTemplate: () => getTemplate,
|
|
340
|
-
|
|
344
|
+
inferLinesOfBusinessFromOperationalCoverages: () => inferLinesOfBusinessFromOperationalCoverages,
|
|
341
345
|
isDoclingExtractionInput: () => isDoclingExtractionInput,
|
|
342
346
|
isFileReference: () => isFileReference,
|
|
347
|
+
isLobCode: () => isLobCode,
|
|
348
|
+
isPersonalLob: () => isPersonalLob,
|
|
349
|
+
lobLabel: () => lobLabel,
|
|
343
350
|
mergeQuestionAnswers: () => mergeQuestionAnswers,
|
|
344
351
|
mergeSourceSpans: () => mergeSourceSpans,
|
|
345
352
|
normalizeApplicationQuestionGraph: () => normalizeApplicationQuestionGraph,
|
|
346
353
|
normalizeDoclingDocument: () => normalizeDoclingDocument,
|
|
347
354
|
normalizeDocumentSourceTreePaths: () => normalizeDocumentSourceTreePaths,
|
|
348
355
|
normalizeForMatch: () => normalizeForMatch,
|
|
349
|
-
|
|
356
|
+
normalizeOperationalLinesOfBusiness: () => normalizeOperationalLinesOfBusiness,
|
|
350
357
|
normalizeSourceSpans: () => normalizeSourceSpans,
|
|
351
358
|
orderSourceEvidence: () => orderSourceEvidence,
|
|
352
359
|
overlayTextOnPdf: () => overlayTextOnPdf,
|
|
@@ -357,7 +364,7 @@ __export(src_exports, {
|
|
|
357
364
|
processReply: () => processReply,
|
|
358
365
|
proposeContextWrites: () => proposeContextWrites,
|
|
359
366
|
resolveModelBudget: () => resolveModelBudget,
|
|
360
|
-
|
|
367
|
+
resolveOperationalProfileLinesOfBusiness: () => resolveOperationalProfileLinesOfBusiness,
|
|
361
368
|
safeGenerateObject: () => safeGenerateObject,
|
|
362
369
|
sanitizeNulls: () => sanitizeNulls,
|
|
363
370
|
scoreCaseProposal: () => scoreCaseProposal,
|
|
@@ -368,6 +375,7 @@ __export(src_exports, {
|
|
|
368
375
|
stablePolicyChangeItemId: () => stablePolicyChangeItemId,
|
|
369
376
|
stableStringify: () => stableStringify,
|
|
370
377
|
stripFences: () => stripFences,
|
|
378
|
+
toLobCodes: () => toLobCodes,
|
|
371
379
|
toStrictSchema: () => toStrictSchema,
|
|
372
380
|
validateApplicationPacket: () => validateApplicationPacket,
|
|
373
381
|
validateEvidence: () => validateEvidence,
|
|
@@ -673,57 +681,6 @@ function expectedOutputTokensFloor(taskKind, schemaTokens, expectedListLength, h
|
|
|
673
681
|
|
|
674
682
|
// src/schemas/enums.ts
|
|
675
683
|
var import_zod2 = require("zod");
|
|
676
|
-
var PolicyTypeSchema = import_zod2.z.enum([
|
|
677
|
-
// Commercial lines
|
|
678
|
-
"general_liability",
|
|
679
|
-
"commercial_property",
|
|
680
|
-
"commercial_auto",
|
|
681
|
-
"non_owned_auto",
|
|
682
|
-
"workers_comp",
|
|
683
|
-
"umbrella",
|
|
684
|
-
"excess_liability",
|
|
685
|
-
"professional_liability",
|
|
686
|
-
"cyber",
|
|
687
|
-
"epli",
|
|
688
|
-
"directors_officers",
|
|
689
|
-
"fiduciary_liability",
|
|
690
|
-
"crime_fidelity",
|
|
691
|
-
"inland_marine",
|
|
692
|
-
"builders_risk",
|
|
693
|
-
"environmental",
|
|
694
|
-
"ocean_marine",
|
|
695
|
-
"surety",
|
|
696
|
-
"product_liability",
|
|
697
|
-
"bop",
|
|
698
|
-
"management_liability_package",
|
|
699
|
-
"property",
|
|
700
|
-
// Personal lines
|
|
701
|
-
"homeowners_ho3",
|
|
702
|
-
"homeowners_ho5",
|
|
703
|
-
"renters_ho4",
|
|
704
|
-
"condo_ho6",
|
|
705
|
-
"dwelling_fire",
|
|
706
|
-
"mobile_home",
|
|
707
|
-
"personal_auto",
|
|
708
|
-
"personal_umbrella",
|
|
709
|
-
"flood_nfip",
|
|
710
|
-
"flood_private",
|
|
711
|
-
"earthquake",
|
|
712
|
-
"personal_inland_marine",
|
|
713
|
-
"watercraft",
|
|
714
|
-
"recreational_vehicle",
|
|
715
|
-
"farm_ranch",
|
|
716
|
-
"life",
|
|
717
|
-
"critical_illness",
|
|
718
|
-
"disability",
|
|
719
|
-
"long_term_care",
|
|
720
|
-
"pet",
|
|
721
|
-
"travel",
|
|
722
|
-
"identity_theft",
|
|
723
|
-
"title",
|
|
724
|
-
"other"
|
|
725
|
-
]);
|
|
726
|
-
var POLICY_TYPES = PolicyTypeSchema.options;
|
|
727
684
|
var EndorsementTypeSchema = import_zod2.z.enum([
|
|
728
685
|
"additional_insured",
|
|
729
686
|
"waiver_of_subrogation",
|
|
@@ -944,85 +901,419 @@ var TITLE_POLICY_TYPES = TitlePolicyTypeSchema.options;
|
|
|
944
901
|
var PetSpeciesSchema = import_zod2.z.enum(["dog", "cat", "other"]);
|
|
945
902
|
var PET_SPECIES = PetSpeciesSchema.options;
|
|
946
903
|
|
|
947
|
-
// src/schemas/
|
|
904
|
+
// src/schemas/lines-of-business.ts
|
|
948
905
|
var import_zod3 = require("zod");
|
|
949
|
-
var
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
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()
|
|
963
1254
|
});
|
|
964
1255
|
var SourceBackedAddressSchema = AddressSchema.merge(SourceProvenanceSchema);
|
|
965
|
-
var ContactSchema =
|
|
966
|
-
name:
|
|
967
|
-
title:
|
|
968
|
-
type:
|
|
969
|
-
phone:
|
|
970
|
-
fax:
|
|
971
|
-
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(),
|
|
972
1263
|
address: AddressSchema.optional(),
|
|
973
|
-
hours:
|
|
1264
|
+
hours: import_zod4.z.string().optional()
|
|
974
1265
|
}).merge(SourceProvenanceSchema);
|
|
975
|
-
var FormReferenceSchema =
|
|
976
|
-
formNumber:
|
|
977
|
-
editionDate:
|
|
978
|
-
title:
|
|
979
|
-
formType:
|
|
980
|
-
pageStart:
|
|
981
|
-
pageEnd:
|
|
982
|
-
documentNodeId:
|
|
983
|
-
sourceSpanIds:
|
|
984
|
-
sourceTextHash:
|
|
985
|
-
});
|
|
986
|
-
var TaxFeeItemSchema =
|
|
987
|
-
name:
|
|
988
|
-
amount:
|
|
989
|
-
amountValue:
|
|
990
|
-
type:
|
|
991
|
-
description:
|
|
992
|
-
documentNodeId:
|
|
993
|
-
sourceSpanIds:
|
|
994
|
-
sourceTextHash:
|
|
995
|
-
});
|
|
996
|
-
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({
|
|
997
1288
|
type: RatingBasisTypeSchema,
|
|
998
|
-
amount:
|
|
999
|
-
description:
|
|
1000
|
-
});
|
|
1001
|
-
var SublimitSchema =
|
|
1002
|
-
name:
|
|
1003
|
-
limit:
|
|
1004
|
-
appliesTo:
|
|
1005
|
-
deductible:
|
|
1006
|
-
});
|
|
1007
|
-
var SharedLimitSchema =
|
|
1008
|
-
description:
|
|
1009
|
-
limit:
|
|
1010
|
-
coverageParts:
|
|
1011
|
-
});
|
|
1012
|
-
var ExtendedReportingPeriodSchema =
|
|
1013
|
-
basicDays:
|
|
1014
|
-
supplementalYears:
|
|
1015
|
-
supplementalPremium:
|
|
1016
|
-
});
|
|
1017
|
-
var NamedInsuredSchema =
|
|
1018
|
-
name:
|
|
1019
|
-
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(),
|
|
1020
1311
|
address: AddressSchema.optional()
|
|
1021
1312
|
}).merge(SourceProvenanceSchema);
|
|
1022
1313
|
|
|
1023
1314
|
// src/schemas/coverage.ts
|
|
1024
|
-
var
|
|
1025
|
-
var CoverageValueTypeSchema =
|
|
1315
|
+
var import_zod5 = require("zod");
|
|
1316
|
+
var CoverageValueTypeSchema = import_zod5.z.enum([
|
|
1026
1317
|
"numeric",
|
|
1027
1318
|
"included",
|
|
1028
1319
|
"not_included",
|
|
@@ -1031,116 +1322,98 @@ var CoverageValueTypeSchema = import_zod4.z.enum([
|
|
|
1031
1322
|
"referential",
|
|
1032
1323
|
"other"
|
|
1033
1324
|
]);
|
|
1034
|
-
var CoverageSchema =
|
|
1035
|
-
name:
|
|
1036
|
-
limit:
|
|
1037
|
-
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(),
|
|
1038
1329
|
limitType: LimitTypeSchema.optional(),
|
|
1039
1330
|
limitValueType: CoverageValueTypeSchema.optional(),
|
|
1040
|
-
deductible:
|
|
1041
|
-
deductibleAmount:
|
|
1331
|
+
deductible: import_zod5.z.string().optional(),
|
|
1332
|
+
deductibleAmount: import_zod5.z.number().optional(),
|
|
1042
1333
|
deductibleValueType: CoverageValueTypeSchema.optional(),
|
|
1043
1334
|
trigger: CoverageTriggerSchema.optional(),
|
|
1044
|
-
retroactiveDate:
|
|
1045
|
-
formNumber:
|
|
1046
|
-
pageNumber:
|
|
1047
|
-
sectionRef:
|
|
1048
|
-
originalContent:
|
|
1049
|
-
recordId:
|
|
1050
|
-
documentNodeId:
|
|
1051
|
-
sourceSpanIds:
|
|
1052
|
-
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()
|
|
1053
1344
|
});
|
|
1054
|
-
var EnrichedCoverageSchema =
|
|
1055
|
-
name:
|
|
1056
|
-
coverageCode:
|
|
1057
|
-
formNumber:
|
|
1058
|
-
formEditionDate:
|
|
1059
|
-
limit:
|
|
1060
|
-
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(),
|
|
1061
1352
|
limitType: LimitTypeSchema.optional(),
|
|
1062
1353
|
limitValueType: CoverageValueTypeSchema.optional(),
|
|
1063
|
-
deductible:
|
|
1064
|
-
deductibleAmount:
|
|
1354
|
+
deductible: import_zod5.z.string().optional(),
|
|
1355
|
+
deductibleAmount: import_zod5.z.number().optional(),
|
|
1065
1356
|
deductibleType: DeductibleTypeSchema.optional(),
|
|
1066
1357
|
deductibleValueType: CoverageValueTypeSchema.optional(),
|
|
1067
|
-
sir:
|
|
1068
|
-
sublimit:
|
|
1069
|
-
coinsurance:
|
|
1358
|
+
sir: import_zod5.z.string().optional(),
|
|
1359
|
+
sublimit: import_zod5.z.string().optional(),
|
|
1360
|
+
coinsurance: import_zod5.z.string().optional(),
|
|
1070
1361
|
valuation: ValuationMethodSchema.optional(),
|
|
1071
|
-
territory:
|
|
1362
|
+
territory: import_zod5.z.string().optional(),
|
|
1072
1363
|
trigger: CoverageTriggerSchema.optional(),
|
|
1073
|
-
retroactiveDate:
|
|
1074
|
-
included:
|
|
1075
|
-
premium:
|
|
1076
|
-
pageNumber:
|
|
1077
|
-
sectionRef:
|
|
1078
|
-
originalContent:
|
|
1079
|
-
recordId: import_zod4.z.string().optional(),
|
|
1080
|
-
documentNodeId: import_zod4.z.string().optional(),
|
|
1081
|
-
sourceSpanIds: import_zod4.z.array(import_zod4.z.string()).optional(),
|
|
1082
|
-
sourceTextHash: import_zod4.z.string().optional()
|
|
1083
|
-
});
|
|
1084
|
-
|
|
1085
|
-
// src/schemas/endorsement.ts
|
|
1086
|
-
var import_zod5 = require("zod");
|
|
1087
|
-
var EndorsementPartySchema = import_zod5.z.object({
|
|
1088
|
-
name: import_zod5.z.string(),
|
|
1089
|
-
role: EndorsementPartyRoleSchema,
|
|
1090
|
-
address: AddressSchema.optional(),
|
|
1091
|
-
relationship: import_zod5.z.string().optional(),
|
|
1092
|
-
scope: import_zod5.z.string().optional()
|
|
1093
|
-
}).merge(SourceProvenanceSchema);
|
|
1094
|
-
var EndorsementSchema = import_zod5.z.object({
|
|
1095
|
-
formNumber: import_zod5.z.string(),
|
|
1096
|
-
editionDate: import_zod5.z.string().optional(),
|
|
1097
|
-
title: import_zod5.z.string(),
|
|
1098
|
-
endorsementType: EndorsementTypeSchema,
|
|
1099
|
-
effectiveDate: import_zod5.z.string().optional(),
|
|
1100
|
-
affectedCoverageParts: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1101
|
-
namedParties: import_zod5.z.array(EndorsementPartySchema).optional(),
|
|
1102
|
-
keyTerms: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1103
|
-
premiumImpact: import_zod5.z.string().optional(),
|
|
1104
|
-
excerpt: import_zod5.z.string().optional(),
|
|
1105
|
-
content: import_zod5.z.string().optional(),
|
|
1106
|
-
pageStart: import_zod5.z.number(),
|
|
1107
|
-
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(),
|
|
1108
1370
|
recordId: import_zod5.z.string().optional(),
|
|
1109
1371
|
documentNodeId: import_zod5.z.string().optional(),
|
|
1110
1372
|
sourceSpanIds: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1111
1373
|
sourceTextHash: import_zod5.z.string().optional()
|
|
1112
1374
|
});
|
|
1113
1375
|
|
|
1114
|
-
// src/schemas/
|
|
1376
|
+
// src/schemas/endorsement.ts
|
|
1115
1377
|
var import_zod6 = require("zod");
|
|
1116
|
-
var
|
|
1378
|
+
var EndorsementPartySchema = import_zod6.z.object({
|
|
1117
1379
|
name: import_zod6.z.string(),
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
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(),
|
|
1127
1399
|
recordId: import_zod6.z.string().optional(),
|
|
1128
1400
|
documentNodeId: import_zod6.z.string().optional(),
|
|
1129
1401
|
sourceSpanIds: import_zod6.z.array(import_zod6.z.string()).optional(),
|
|
1130
1402
|
sourceTextHash: import_zod6.z.string().optional()
|
|
1131
1403
|
});
|
|
1132
1404
|
|
|
1133
|
-
// src/schemas/
|
|
1405
|
+
// src/schemas/exclusion.ts
|
|
1134
1406
|
var import_zod7 = require("zod");
|
|
1135
|
-
var
|
|
1136
|
-
key: import_zod7.z.string(),
|
|
1137
|
-
value: import_zod7.z.string()
|
|
1138
|
-
});
|
|
1139
|
-
var PolicyConditionSchema = import_zod7.z.object({
|
|
1407
|
+
var ExclusionSchema = import_zod7.z.object({
|
|
1140
1408
|
name: import_zod7.z.string(),
|
|
1141
|
-
|
|
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(),
|
|
1142
1416
|
content: import_zod7.z.string(),
|
|
1143
|
-
keyValues: import_zod7.z.array(ConditionKeyValueSchema).optional(),
|
|
1144
1417
|
pageNumber: import_zod7.z.number().optional(),
|
|
1145
1418
|
recordId: import_zod7.z.string().optional(),
|
|
1146
1419
|
documentNodeId: import_zod7.z.string().optional(),
|
|
@@ -1148,543 +1421,561 @@ var PolicyConditionSchema = import_zod7.z.object({
|
|
|
1148
1421
|
sourceTextHash: import_zod7.z.string().optional()
|
|
1149
1422
|
});
|
|
1150
1423
|
|
|
1151
|
-
// src/schemas/
|
|
1424
|
+
// src/schemas/condition.ts
|
|
1152
1425
|
var import_zod8 = require("zod");
|
|
1153
|
-
var
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
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(),
|
|
1158
1449
|
admittedStatus: AdmittedStatusSchema.optional(),
|
|
1159
|
-
stateOfDomicile:
|
|
1450
|
+
stateOfDomicile: import_zod9.z.string().optional()
|
|
1160
1451
|
}).merge(SourceProvenanceSchema);
|
|
1161
|
-
var ProducerInfoSchema =
|
|
1162
|
-
agencyName:
|
|
1163
|
-
contactName:
|
|
1164
|
-
licenseNumber:
|
|
1165
|
-
phone:
|
|
1166
|
-
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(),
|
|
1167
1458
|
address: AddressSchema.optional()
|
|
1168
1459
|
}).merge(SourceProvenanceSchema);
|
|
1169
1460
|
|
|
1170
1461
|
// src/schemas/financial.ts
|
|
1171
|
-
var
|
|
1172
|
-
var PaymentInstallmentSchema =
|
|
1173
|
-
dueDate:
|
|
1174
|
-
amount:
|
|
1175
|
-
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()
|
|
1176
1467
|
});
|
|
1177
|
-
var PaymentPlanSchema =
|
|
1178
|
-
installments:
|
|
1179
|
-
financeCharge:
|
|
1468
|
+
var PaymentPlanSchema = import_zod10.z.object({
|
|
1469
|
+
installments: import_zod10.z.array(PaymentInstallmentSchema),
|
|
1470
|
+
financeCharge: import_zod10.z.string().optional()
|
|
1180
1471
|
});
|
|
1181
|
-
var LocationPremiumSchema =
|
|
1182
|
-
locationNumber:
|
|
1183
|
-
premium:
|
|
1184
|
-
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()
|
|
1185
1476
|
});
|
|
1186
1477
|
|
|
1187
1478
|
// src/schemas/loss-history.ts
|
|
1188
|
-
var
|
|
1189
|
-
var ClaimRecordSchema =
|
|
1190
|
-
dateOfLoss:
|
|
1191
|
-
claimNumber:
|
|
1192
|
-
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(),
|
|
1193
1484
|
status: ClaimStatusSchema,
|
|
1194
|
-
paid:
|
|
1195
|
-
reserved:
|
|
1196
|
-
incurred:
|
|
1197
|
-
claimant:
|
|
1198
|
-
coverageLine:
|
|
1199
|
-
});
|
|
1200
|
-
var LossSummarySchema =
|
|
1201
|
-
period:
|
|
1202
|
-
totalClaims:
|
|
1203
|
-
totalIncurred:
|
|
1204
|
-
totalPaid:
|
|
1205
|
-
totalReserved:
|
|
1206
|
-
lossRatio:
|
|
1207
|
-
});
|
|
1208
|
-
var ExperienceModSchema =
|
|
1209
|
-
factor:
|
|
1210
|
-
effectiveDate:
|
|
1211
|
-
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()
|
|
1212
1503
|
});
|
|
1213
1504
|
|
|
1214
1505
|
// src/schemas/underwriting.ts
|
|
1215
|
-
var
|
|
1216
|
-
var EnrichedSubjectivitySchema =
|
|
1217
|
-
description:
|
|
1506
|
+
var import_zod12 = require("zod");
|
|
1507
|
+
var EnrichedSubjectivitySchema = import_zod12.z.object({
|
|
1508
|
+
description: import_zod12.z.string(),
|
|
1218
1509
|
category: SubjectivityCategorySchema.optional(),
|
|
1219
|
-
dueDate:
|
|
1220
|
-
status:
|
|
1221
|
-
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()
|
|
1222
1513
|
});
|
|
1223
|
-
var EnrichedUnderwritingConditionSchema =
|
|
1224
|
-
description:
|
|
1225
|
-
category:
|
|
1226
|
-
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()
|
|
1227
1518
|
});
|
|
1228
|
-
var BindingAuthoritySchema =
|
|
1229
|
-
authorizedBy:
|
|
1230
|
-
method:
|
|
1231
|
-
expiration:
|
|
1232
|
-
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()
|
|
1233
1524
|
});
|
|
1234
1525
|
|
|
1235
1526
|
// src/schemas/declarations/index.ts
|
|
1236
|
-
var
|
|
1527
|
+
var import_zod16 = require("zod");
|
|
1237
1528
|
|
|
1238
1529
|
// src/schemas/declarations/personal.ts
|
|
1239
|
-
var
|
|
1530
|
+
var import_zod14 = require("zod");
|
|
1240
1531
|
|
|
1241
1532
|
// src/schemas/declarations/shared.ts
|
|
1242
|
-
var
|
|
1243
|
-
var EmployersLiabilityLimitsSchema =
|
|
1244
|
-
eachAccident:
|
|
1245
|
-
diseasePolicyLimit:
|
|
1246
|
-
diseaseEachEmployee:
|
|
1247
|
-
});
|
|
1248
|
-
var LimitScheduleSchema =
|
|
1249
|
-
perOccurrence:
|
|
1250
|
-
generalAggregate:
|
|
1251
|
-
productsCompletedOpsAggregate:
|
|
1252
|
-
personalAdvertisingInjury:
|
|
1253
|
-
eachEmployee:
|
|
1254
|
-
fireDamage:
|
|
1255
|
-
medicalExpense:
|
|
1256
|
-
combinedSingleLimit:
|
|
1257
|
-
bodilyInjuryPerPerson:
|
|
1258
|
-
bodilyInjuryPerAccident:
|
|
1259
|
-
propertyDamage:
|
|
1260
|
-
eachOccurrenceUmbrella:
|
|
1261
|
-
umbrellaAggregate:
|
|
1262
|
-
umbrellaRetention:
|
|
1263
|
-
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(),
|
|
1264
1555
|
employersLiability: EmployersLiabilityLimitsSchema.optional(),
|
|
1265
|
-
sublimits:
|
|
1266
|
-
sharedLimits:
|
|
1556
|
+
sublimits: import_zod13.z.array(SublimitSchema).optional(),
|
|
1557
|
+
sharedLimits: import_zod13.z.array(SharedLimitSchema).optional(),
|
|
1267
1558
|
defenseCostTreatment: DefenseCostTreatmentSchema.optional()
|
|
1268
1559
|
});
|
|
1269
|
-
var DeductibleScheduleSchema =
|
|
1270
|
-
perClaim:
|
|
1271
|
-
perOccurrence:
|
|
1272
|
-
aggregateDeductible:
|
|
1273
|
-
selfInsuredRetention:
|
|
1274
|
-
corridorDeductible:
|
|
1275
|
-
waitingPeriod:
|
|
1276
|
-
appliesTo:
|
|
1277
|
-
});
|
|
1278
|
-
var InsuredLocationSchema =
|
|
1279
|
-
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(),
|
|
1280
1571
|
address: AddressSchema,
|
|
1281
|
-
description:
|
|
1282
|
-
buildingValue:
|
|
1283
|
-
contentsValue:
|
|
1284
|
-
businessIncomeValue:
|
|
1285
|
-
constructionType:
|
|
1286
|
-
yearBuilt:
|
|
1287
|
-
squareFootage:
|
|
1288
|
-
protectionClass:
|
|
1289
|
-
sprinklered:
|
|
1290
|
-
alarmType:
|
|
1291
|
-
occupancy:
|
|
1292
|
-
});
|
|
1293
|
-
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({
|
|
1294
1585
|
type: VehicleCoverageTypeSchema,
|
|
1295
|
-
limit:
|
|
1296
|
-
deductible:
|
|
1297
|
-
included:
|
|
1298
|
-
});
|
|
1299
|
-
var InsuredVehicleSchema =
|
|
1300
|
-
number:
|
|
1301
|
-
year:
|
|
1302
|
-
make:
|
|
1303
|
-
model:
|
|
1304
|
-
vin:
|
|
1305
|
-
costNew:
|
|
1306
|
-
statedValue:
|
|
1307
|
-
garageLocation:
|
|
1308
|
-
coverages:
|
|
1309
|
-
radius:
|
|
1310
|
-
vehicleType:
|
|
1311
|
-
});
|
|
1312
|
-
var ClassificationCodeSchema =
|
|
1313
|
-
code:
|
|
1314
|
-
description:
|
|
1315
|
-
premiumBasis:
|
|
1316
|
-
basisAmount:
|
|
1317
|
-
rate:
|
|
1318
|
-
premium:
|
|
1319
|
-
locationNumber:
|
|
1320
|
-
});
|
|
1321
|
-
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({
|
|
1322
1613
|
constructionType: ConstructionTypeSchema.optional(),
|
|
1323
|
-
yearBuilt:
|
|
1324
|
-
squareFootage:
|
|
1325
|
-
stories:
|
|
1614
|
+
yearBuilt: import_zod13.z.number().optional(),
|
|
1615
|
+
squareFootage: import_zod13.z.number().optional(),
|
|
1616
|
+
stories: import_zod13.z.number().optional(),
|
|
1326
1617
|
roofType: RoofTypeSchema.optional(),
|
|
1327
|
-
roofAge:
|
|
1328
|
-
heatingType:
|
|
1618
|
+
roofAge: import_zod13.z.number().optional(),
|
|
1619
|
+
heatingType: import_zod13.z.enum(["central", "baseboard", "radiant", "space_heater", "heat_pump", "other"]).optional(),
|
|
1329
1620
|
foundationType: FoundationTypeSchema.optional(),
|
|
1330
|
-
plumbingType:
|
|
1331
|
-
electricalType:
|
|
1332
|
-
electricalAmps:
|
|
1333
|
-
hasSwimmingPool:
|
|
1334
|
-
poolType:
|
|
1335
|
-
hasTrampoline:
|
|
1336
|
-
hasDog:
|
|
1337
|
-
dogBreed:
|
|
1338
|
-
protectiveDevices:
|
|
1339
|
-
distanceToFireStation:
|
|
1340
|
-
distanceToHydrant:
|
|
1341
|
-
fireProtectionClass:
|
|
1342
|
-
});
|
|
1343
|
-
var DriverRecordSchema =
|
|
1344
|
-
name:
|
|
1345
|
-
dateOfBirth:
|
|
1346
|
-
licenseNumber:
|
|
1347
|
-
licenseState:
|
|
1348
|
-
relationship:
|
|
1349
|
-
yearsLicensed:
|
|
1350
|
-
gender:
|
|
1351
|
-
maritalStatus:
|
|
1352
|
-
goodStudentDiscount:
|
|
1353
|
-
defensiveDriverDiscount:
|
|
1354
|
-
violations:
|
|
1355
|
-
date:
|
|
1356
|
-
type:
|
|
1357
|
-
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()
|
|
1358
1649
|
})).optional(),
|
|
1359
|
-
accidents:
|
|
1360
|
-
date:
|
|
1361
|
-
atFault:
|
|
1362
|
-
description:
|
|
1363
|
-
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()
|
|
1364
1655
|
})).optional(),
|
|
1365
|
-
sr22Required:
|
|
1366
|
-
});
|
|
1367
|
-
var PersonalVehicleDetailsSchema =
|
|
1368
|
-
number:
|
|
1369
|
-
year:
|
|
1370
|
-
make:
|
|
1371
|
-
model:
|
|
1372
|
-
vin:
|
|
1373
|
-
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(),
|
|
1374
1665
|
garagingAddress: AddressSchema.optional(),
|
|
1375
1666
|
usage: PersonalAutoUsageSchema.optional(),
|
|
1376
|
-
annualMileage:
|
|
1377
|
-
odometerReading:
|
|
1378
|
-
driverAssignment:
|
|
1667
|
+
annualMileage: import_zod13.z.number().optional(),
|
|
1668
|
+
odometerReading: import_zod13.z.number().optional(),
|
|
1669
|
+
driverAssignment: import_zod13.z.string().optional(),
|
|
1379
1670
|
lienHolder: EndorsementPartySchema.optional(),
|
|
1380
|
-
collisionDeductible:
|
|
1381
|
-
comprehensiveDeductible:
|
|
1382
|
-
rentalReimbursement:
|
|
1383
|
-
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()
|
|
1384
1675
|
});
|
|
1385
1676
|
|
|
1386
1677
|
// src/schemas/declarations/personal.ts
|
|
1387
|
-
var HomeownersDeclarationsSchema =
|
|
1388
|
-
line:
|
|
1678
|
+
var HomeownersDeclarationsSchema = import_zod14.z.object({
|
|
1679
|
+
line: import_zod14.z.literal("homeowners"),
|
|
1389
1680
|
formType: HomeownersFormTypeSchema,
|
|
1390
|
-
coverageA:
|
|
1391
|
-
coverageB:
|
|
1392
|
-
coverageC:
|
|
1393
|
-
coverageD:
|
|
1394
|
-
coverageE:
|
|
1395
|
-
coverageF:
|
|
1396
|
-
allPerilDeductible:
|
|
1397
|
-
windHailDeductible:
|
|
1398
|
-
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(),
|
|
1399
1690
|
lossSettlement: LossSettlementSchema.optional(),
|
|
1400
1691
|
dwelling: DwellingDetailsSchema,
|
|
1401
1692
|
mortgagee: EndorsementPartySchema.optional(),
|
|
1402
|
-
additionalMortgagees:
|
|
1403
|
-
});
|
|
1404
|
-
var PersonalAutoDeclarationsSchema =
|
|
1405
|
-
line:
|
|
1406
|
-
vehicles:
|
|
1407
|
-
drivers:
|
|
1408
|
-
liabilityLimits:
|
|
1409
|
-
bodilyInjuryPerPerson:
|
|
1410
|
-
bodilyInjuryPerAccident:
|
|
1411
|
-
propertyDamage:
|
|
1412
|
-
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()
|
|
1413
1704
|
}).optional(),
|
|
1414
|
-
umLimits:
|
|
1415
|
-
bodilyInjuryPerPerson:
|
|
1416
|
-
bodilyInjuryPerAccident:
|
|
1705
|
+
umLimits: import_zod14.z.object({
|
|
1706
|
+
bodilyInjuryPerPerson: import_zod14.z.string().optional(),
|
|
1707
|
+
bodilyInjuryPerAccident: import_zod14.z.string().optional()
|
|
1417
1708
|
}).optional(),
|
|
1418
|
-
uimLimits:
|
|
1419
|
-
bodilyInjuryPerPerson:
|
|
1420
|
-
bodilyInjuryPerAccident:
|
|
1709
|
+
uimLimits: import_zod14.z.object({
|
|
1710
|
+
bodilyInjuryPerPerson: import_zod14.z.string().optional(),
|
|
1711
|
+
bodilyInjuryPerAccident: import_zod14.z.string().optional()
|
|
1421
1712
|
}).optional(),
|
|
1422
|
-
pipLimit:
|
|
1423
|
-
medPayLimit:
|
|
1713
|
+
pipLimit: import_zod14.z.string().optional(),
|
|
1714
|
+
medPayLimit: import_zod14.z.string().optional()
|
|
1424
1715
|
});
|
|
1425
|
-
var DwellingFireDeclarationsSchema =
|
|
1426
|
-
line:
|
|
1716
|
+
var DwellingFireDeclarationsSchema = import_zod14.z.object({
|
|
1717
|
+
line: import_zod14.z.literal("dwelling_fire"),
|
|
1427
1718
|
formType: DwellingFireFormTypeSchema,
|
|
1428
|
-
dwellingLimit:
|
|
1429
|
-
otherStructuresLimit:
|
|
1430
|
-
personalPropertyLimit:
|
|
1431
|
-
fairRentalValueLimit:
|
|
1432
|
-
liabilityLimit:
|
|
1433
|
-
medicalPaymentsLimit:
|
|
1434
|
-
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(),
|
|
1435
1726
|
dwelling: DwellingDetailsSchema
|
|
1436
1727
|
});
|
|
1437
|
-
var FloodDeclarationsSchema =
|
|
1438
|
-
line:
|
|
1439
|
-
programType:
|
|
1728
|
+
var FloodDeclarationsSchema = import_zod14.z.object({
|
|
1729
|
+
line: import_zod14.z.literal("flood"),
|
|
1730
|
+
programType: import_zod14.z.enum(["nfip", "private"]),
|
|
1440
1731
|
floodZone: FloodZoneSchema.optional(),
|
|
1441
|
-
communityNumber:
|
|
1442
|
-
communityRating:
|
|
1443
|
-
buildingCoverage:
|
|
1444
|
-
contentsCoverage:
|
|
1445
|
-
iccCoverage:
|
|
1446
|
-
deductible:
|
|
1447
|
-
waitingPeriodDays:
|
|
1448
|
-
elevationCertificate:
|
|
1449
|
-
elevationDifference:
|
|
1450
|
-
buildingDiagramNumber:
|
|
1451
|
-
basementOrEnclosure:
|
|
1452
|
-
postFirmConstruction:
|
|
1453
|
-
});
|
|
1454
|
-
var EarthquakeDeclarationsSchema =
|
|
1455
|
-
line:
|
|
1456
|
-
dwellingCoverage:
|
|
1457
|
-
contentsCoverage:
|
|
1458
|
-
lossOfUseCoverage:
|
|
1459
|
-
deductiblePercent:
|
|
1460
|
-
retrofitDiscount:
|
|
1461
|
-
masonryVeneerCoverage:
|
|
1462
|
-
});
|
|
1463
|
-
var PersonalUmbrellaDeclarationsSchema =
|
|
1464
|
-
line:
|
|
1465
|
-
perOccurrenceLimit:
|
|
1466
|
-
aggregateLimit:
|
|
1467
|
-
retainedLimit:
|
|
1468
|
-
underlyingPolicies:
|
|
1469
|
-
carrier:
|
|
1470
|
-
policyNumber:
|
|
1471
|
-
policyType:
|
|
1472
|
-
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()
|
|
1473
1764
|
}))
|
|
1474
1765
|
});
|
|
1475
|
-
var PersonalArticlesDeclarationsSchema =
|
|
1476
|
-
line:
|
|
1477
|
-
scheduledItems:
|
|
1478
|
-
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(),
|
|
1479
1770
|
category: ScheduledItemCategorySchema.optional(),
|
|
1480
|
-
description:
|
|
1481
|
-
appraisedValue:
|
|
1482
|
-
appraisalDate:
|
|
1771
|
+
description: import_zod14.z.string(),
|
|
1772
|
+
appraisedValue: import_zod14.z.string(),
|
|
1773
|
+
appraisalDate: import_zod14.z.string().optional()
|
|
1483
1774
|
})),
|
|
1484
|
-
blanketCoverage:
|
|
1485
|
-
deductible:
|
|
1486
|
-
worldwideCoverage:
|
|
1487
|
-
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()
|
|
1488
1779
|
});
|
|
1489
|
-
var WatercraftDeclarationsSchema =
|
|
1490
|
-
line:
|
|
1780
|
+
var WatercraftDeclarationsSchema = import_zod14.z.object({
|
|
1781
|
+
line: import_zod14.z.literal("watercraft"),
|
|
1491
1782
|
boatType: BoatTypeSchema.optional(),
|
|
1492
|
-
year:
|
|
1493
|
-
make:
|
|
1494
|
-
model:
|
|
1495
|
-
length:
|
|
1496
|
-
hullMaterial:
|
|
1497
|
-
hullValue:
|
|
1498
|
-
motorHorsepower:
|
|
1499
|
-
motorType:
|
|
1500
|
-
navigationLimits:
|
|
1501
|
-
layupPeriod:
|
|
1502
|
-
liabilityLimit:
|
|
1503
|
-
medicalPaymentsLimit:
|
|
1504
|
-
physicalDamageDeductible:
|
|
1505
|
-
uninsuredBoaterLimit:
|
|
1506
|
-
trailerCovered:
|
|
1507
|
-
trailerValue:
|
|
1508
|
-
});
|
|
1509
|
-
var RecreationalVehicleDeclarationsSchema =
|
|
1510
|
-
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"),
|
|
1511
1802
|
vehicleType: RVTypeSchema,
|
|
1512
|
-
year:
|
|
1513
|
-
make:
|
|
1514
|
-
model:
|
|
1515
|
-
vin:
|
|
1516
|
-
value:
|
|
1517
|
-
liabilityLimit:
|
|
1518
|
-
collisionDeductible:
|
|
1519
|
-
comprehensiveDeductible:
|
|
1520
|
-
personalEffectsCoverage:
|
|
1521
|
-
fullTimerCoverage:
|
|
1522
|
-
});
|
|
1523
|
-
var FarmRanchDeclarationsSchema =
|
|
1524
|
-
line:
|
|
1525
|
-
dwellingCoverage:
|
|
1526
|
-
farmPersonalPropertyCoverage:
|
|
1527
|
-
farmLiabilityLimit:
|
|
1528
|
-
farmAutoIncluded:
|
|
1529
|
-
livestock:
|
|
1530
|
-
type:
|
|
1531
|
-
headCount:
|
|
1532
|
-
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()
|
|
1533
1824
|
})).optional(),
|
|
1534
|
-
equipmentSchedule:
|
|
1535
|
-
description:
|
|
1536
|
-
value:
|
|
1825
|
+
equipmentSchedule: import_zod14.z.array(import_zod14.z.object({
|
|
1826
|
+
description: import_zod14.z.string(),
|
|
1827
|
+
value: import_zod14.z.string()
|
|
1537
1828
|
})).optional(),
|
|
1538
|
-
acreage:
|
|
1829
|
+
acreage: import_zod14.z.number().optional(),
|
|
1539
1830
|
dwelling: DwellingDetailsSchema.optional()
|
|
1540
1831
|
});
|
|
1541
|
-
var TitleDeclarationsSchema =
|
|
1542
|
-
line:
|
|
1832
|
+
var TitleDeclarationsSchema = import_zod14.z.object({
|
|
1833
|
+
line: import_zod14.z.literal("title"),
|
|
1543
1834
|
policyType: TitlePolicyTypeSchema,
|
|
1544
|
-
policyAmount:
|
|
1545
|
-
legalDescription:
|
|
1835
|
+
policyAmount: import_zod14.z.string(),
|
|
1836
|
+
legalDescription: import_zod14.z.string().optional(),
|
|
1546
1837
|
propertyAddress: AddressSchema.optional(),
|
|
1547
|
-
effectiveDate:
|
|
1548
|
-
exceptions:
|
|
1549
|
-
number:
|
|
1550
|
-
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()
|
|
1551
1842
|
})).optional(),
|
|
1552
|
-
underwriter:
|
|
1843
|
+
underwriter: import_zod14.z.string().optional()
|
|
1553
1844
|
});
|
|
1554
|
-
var PetDeclarationsSchema =
|
|
1555
|
-
line:
|
|
1845
|
+
var PetDeclarationsSchema = import_zod14.z.object({
|
|
1846
|
+
line: import_zod14.z.literal("pet"),
|
|
1556
1847
|
species: PetSpeciesSchema,
|
|
1557
|
-
breed:
|
|
1558
|
-
petName:
|
|
1559
|
-
age:
|
|
1560
|
-
annualLimit:
|
|
1561
|
-
perIncidentLimit:
|
|
1562
|
-
deductible:
|
|
1563
|
-
reimbursementPercent:
|
|
1564
|
-
waitingPeriodDays:
|
|
1565
|
-
preExistingConditionsExcluded:
|
|
1566
|
-
wellnessCoverage:
|
|
1567
|
-
});
|
|
1568
|
-
var TravelDeclarationsSchema =
|
|
1569
|
-
line:
|
|
1570
|
-
tripDepartureDate:
|
|
1571
|
-
tripReturnDate:
|
|
1572
|
-
destinations:
|
|
1573
|
-
travelers:
|
|
1574
|
-
name:
|
|
1575
|
-
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()
|
|
1576
1867
|
})).optional(),
|
|
1577
|
-
tripCost:
|
|
1578
|
-
tripCancellationLimit:
|
|
1579
|
-
medicalLimit:
|
|
1580
|
-
evacuationLimit:
|
|
1581
|
-
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()
|
|
1582
1873
|
});
|
|
1583
|
-
var IdentityTheftDeclarationsSchema =
|
|
1584
|
-
line:
|
|
1585
|
-
coverageLimit:
|
|
1586
|
-
expenseReimbursement:
|
|
1587
|
-
creditMonitoring:
|
|
1588
|
-
restorationServices:
|
|
1589
|
-
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()
|
|
1590
1881
|
});
|
|
1591
1882
|
|
|
1592
1883
|
// src/schemas/declarations/commercial.ts
|
|
1593
|
-
var
|
|
1594
|
-
var GLDeclarationsSchema =
|
|
1595
|
-
line:
|
|
1884
|
+
var import_zod15 = require("zod");
|
|
1885
|
+
var GLDeclarationsSchema = import_zod15.z.object({
|
|
1886
|
+
line: import_zod15.z.literal("gl"),
|
|
1596
1887
|
coverageForm: CoverageFormSchema.optional(),
|
|
1597
|
-
perOccurrenceLimit:
|
|
1598
|
-
generalAggregate:
|
|
1599
|
-
productsCompletedOpsAggregate:
|
|
1600
|
-
personalAdvertisingInjury:
|
|
1601
|
-
fireDamage:
|
|
1602
|
-
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(),
|
|
1603
1894
|
defenseCostTreatment: DefenseCostTreatmentSchema.optional(),
|
|
1604
|
-
deductible:
|
|
1605
|
-
classifications:
|
|
1606
|
-
retroactiveDate:
|
|
1607
|
-
});
|
|
1608
|
-
var CommercialPropertyDeclarationsSchema =
|
|
1609
|
-
line:
|
|
1610
|
-
causesOfLossForm:
|
|
1611
|
-
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(),
|
|
1612
1903
|
valuationMethod: ValuationMethodSchema.optional(),
|
|
1613
|
-
locations:
|
|
1614
|
-
blanketLimit:
|
|
1615
|
-
businessIncomeLimit:
|
|
1616
|
-
extraExpenseLimit:
|
|
1617
|
-
});
|
|
1618
|
-
var CommercialAutoDeclarationsSchema =
|
|
1619
|
-
line:
|
|
1620
|
-
vehicles:
|
|
1621
|
-
coveredAutoSymbols:
|
|
1622
|
-
liabilityLimit:
|
|
1623
|
-
umLimit:
|
|
1624
|
-
uimLimit:
|
|
1625
|
-
hiredAutoLiability:
|
|
1626
|
-
nonOwnedAutoLiability:
|
|
1627
|
-
});
|
|
1628
|
-
var WorkersCompDeclarationsSchema =
|
|
1629
|
-
line:
|
|
1630
|
-
coveredStates:
|
|
1631
|
-
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),
|
|
1632
1923
|
experienceMod: ExperienceModSchema.optional(),
|
|
1633
1924
|
employersLiability: EmployersLiabilityLimitsSchema.optional()
|
|
1634
1925
|
});
|
|
1635
|
-
var UmbrellaExcessDeclarationsSchema =
|
|
1636
|
-
line:
|
|
1637
|
-
perOccurrenceLimit:
|
|
1638
|
-
aggregateLimit:
|
|
1639
|
-
retention:
|
|
1640
|
-
underlyingPolicies:
|
|
1641
|
-
carrier:
|
|
1642
|
-
policyNumber:
|
|
1643
|
-
policyType:
|
|
1644
|
-
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()
|
|
1645
1936
|
}))
|
|
1646
1937
|
});
|
|
1647
|
-
var ProfessionalLiabilityDeclarationsSchema =
|
|
1648
|
-
line:
|
|
1649
|
-
perClaimLimit:
|
|
1650
|
-
aggregateLimit:
|
|
1651
|
-
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(),
|
|
1652
1943
|
defenseCostTreatment: DefenseCostTreatmentSchema.optional(),
|
|
1653
1944
|
extendedReportingPeriod: ExtendedReportingPeriodSchema.optional()
|
|
1654
1945
|
});
|
|
1655
|
-
var CyberDeclarationsSchema =
|
|
1656
|
-
line:
|
|
1657
|
-
aggregateLimit:
|
|
1658
|
-
retroactiveDate:
|
|
1659
|
-
waitingPeriodHours:
|
|
1660
|
-
sublimits:
|
|
1661
|
-
coverageName:
|
|
1662
|
-
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()
|
|
1663
1954
|
})).optional()
|
|
1664
1955
|
});
|
|
1665
|
-
var DODeclarationsSchema =
|
|
1666
|
-
line:
|
|
1667
|
-
sideALimit:
|
|
1668
|
-
sideBLimit:
|
|
1669
|
-
sideCLimit:
|
|
1670
|
-
sideARetention:
|
|
1671
|
-
sideBRetention:
|
|
1672
|
-
sideCRetention:
|
|
1673
|
-
continuityDate:
|
|
1674
|
-
});
|
|
1675
|
-
var CrimeDeclarationsSchema =
|
|
1676
|
-
line:
|
|
1677
|
-
formType:
|
|
1678
|
-
agreements:
|
|
1679
|
-
agreement:
|
|
1680
|
-
coverageName:
|
|
1681
|
-
limit:
|
|
1682
|
-
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()
|
|
1683
1974
|
}))
|
|
1684
1975
|
});
|
|
1685
1976
|
|
|
1686
1977
|
// src/schemas/declarations/index.ts
|
|
1687
|
-
var DeclarationsSchema =
|
|
1978
|
+
var DeclarationsSchema = import_zod16.z.discriminatedUnion("line", [
|
|
1688
1979
|
// Personal lines
|
|
1689
1980
|
HomeownersDeclarationsSchema,
|
|
1690
1981
|
PersonalAutoDeclarationsSchema,
|
|
@@ -1713,251 +2004,251 @@ var DeclarationsSchema = import_zod15.z.discriminatedUnion("line", [
|
|
|
1713
2004
|
]);
|
|
1714
2005
|
|
|
1715
2006
|
// src/schemas/document.ts
|
|
1716
|
-
var
|
|
1717
|
-
var SubsectionSchema =
|
|
1718
|
-
title:
|
|
1719
|
-
sectionNumber:
|
|
1720
|
-
pageNumber:
|
|
1721
|
-
excerpt:
|
|
1722
|
-
content:
|
|
1723
|
-
documentNodeId:
|
|
1724
|
-
sourceSpanIds:
|
|
1725
|
-
sourceTextHash:
|
|
1726
|
-
});
|
|
1727
|
-
var SectionSchema =
|
|
1728
|
-
title:
|
|
1729
|
-
sectionNumber:
|
|
1730
|
-
pageStart:
|
|
1731
|
-
pageEnd:
|
|
1732
|
-
type:
|
|
1733
|
-
coverageType:
|
|
1734
|
-
excerpt:
|
|
1735
|
-
content:
|
|
1736
|
-
subsections:
|
|
1737
|
-
recordId:
|
|
1738
|
-
documentNodeId:
|
|
1739
|
-
sourceSpanIds:
|
|
1740
|
-
sourceTextHash:
|
|
1741
|
-
});
|
|
1742
|
-
var SubjectivitySchema =
|
|
1743
|
-
description:
|
|
1744
|
-
category:
|
|
1745
|
-
});
|
|
1746
|
-
var UnderwritingConditionSchema =
|
|
1747
|
-
description:
|
|
1748
|
-
});
|
|
1749
|
-
var PremiumLineSchema =
|
|
1750
|
-
line:
|
|
1751
|
-
amount:
|
|
1752
|
-
amountValue:
|
|
1753
|
-
documentNodeId:
|
|
1754
|
-
sourceSpanIds:
|
|
1755
|
-
sourceTextHash:
|
|
1756
|
-
});
|
|
1757
|
-
var AuxiliaryFactSchema =
|
|
1758
|
-
key:
|
|
1759
|
-
value:
|
|
1760
|
-
subject:
|
|
1761
|
-
context:
|
|
1762
|
-
documentNodeId:
|
|
1763
|
-
sourceSpanIds:
|
|
1764
|
-
sourceTextHash:
|
|
1765
|
-
});
|
|
1766
|
-
var DefinitionSchema =
|
|
1767
|
-
term:
|
|
1768
|
-
definition:
|
|
1769
|
-
pageNumber:
|
|
1770
|
-
formNumber:
|
|
1771
|
-
formTitle:
|
|
1772
|
-
sectionRef:
|
|
1773
|
-
originalContent:
|
|
1774
|
-
recordId:
|
|
1775
|
-
documentNodeId:
|
|
1776
|
-
sourceSpanIds:
|
|
1777
|
-
sourceTextHash:
|
|
1778
|
-
});
|
|
1779
|
-
var CoveredReasonSchema =
|
|
1780
|
-
coverageName:
|
|
1781
|
-
reasonNumber:
|
|
1782
|
-
title:
|
|
1783
|
-
content:
|
|
1784
|
-
conditions:
|
|
1785
|
-
exceptions:
|
|
1786
|
-
appliesTo:
|
|
1787
|
-
pageNumber:
|
|
1788
|
-
formNumber:
|
|
1789
|
-
formTitle:
|
|
1790
|
-
sectionRef:
|
|
1791
|
-
originalContent:
|
|
1792
|
-
recordId:
|
|
1793
|
-
documentNodeId:
|
|
1794
|
-
sourceSpanIds:
|
|
1795
|
-
sourceTextHash:
|
|
1796
|
-
});
|
|
1797
|
-
var DocumentTableOfContentsEntrySchema =
|
|
1798
|
-
title:
|
|
1799
|
-
level:
|
|
1800
|
-
pageStart:
|
|
1801
|
-
pageEnd:
|
|
1802
|
-
documentNodeId:
|
|
1803
|
-
sourceSpanIds:
|
|
1804
|
-
});
|
|
1805
|
-
var DocumentPageMapEntrySchema =
|
|
1806
|
-
page:
|
|
1807
|
-
label:
|
|
1808
|
-
formNumber:
|
|
1809
|
-
formTitle:
|
|
1810
|
-
sectionTitle:
|
|
1811
|
-
extractorNames:
|
|
1812
|
-
sourceSpanIds:
|
|
1813
|
-
});
|
|
1814
|
-
var DocumentAgentGuidanceSchema =
|
|
1815
|
-
kind:
|
|
1816
|
-
title:
|
|
1817
|
-
detail:
|
|
1818
|
-
sourceSpanIds:
|
|
1819
|
-
});
|
|
1820
|
-
var DocumentMetadataSchema =
|
|
1821
|
-
sourceTreeVersion:
|
|
1822
|
-
sourceTreeCanonical:
|
|
1823
|
-
formInventory:
|
|
1824
|
-
tableOfContents:
|
|
1825
|
-
pageMap:
|
|
1826
|
-
agentGuidance:
|
|
1827
|
-
});
|
|
1828
|
-
var DocumentNodeSchema =
|
|
1829
|
-
() =>
|
|
1830
|
-
id:
|
|
1831
|
-
title:
|
|
1832
|
-
originalTitle:
|
|
1833
|
-
type:
|
|
1834
|
-
label:
|
|
1835
|
-
level:
|
|
1836
|
-
sectionNumber:
|
|
1837
|
-
pageStart:
|
|
1838
|
-
pageEnd:
|
|
1839
|
-
formNumber:
|
|
1840
|
-
formTitle:
|
|
1841
|
-
excerpt:
|
|
1842
|
-
content:
|
|
1843
|
-
interpretationLabels:
|
|
1844
|
-
sourceSpanIds:
|
|
1845
|
-
sourceTextHash:
|
|
1846
|
-
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()
|
|
1847
2138
|
})
|
|
1848
2139
|
);
|
|
1849
2140
|
var BaseDocumentFields = {
|
|
1850
|
-
id:
|
|
1851
|
-
carrier:
|
|
1852
|
-
security:
|
|
1853
|
-
insuredName:
|
|
1854
|
-
premium:
|
|
1855
|
-
premiumAmount:
|
|
1856
|
-
summary:
|
|
1857
|
-
|
|
1858
|
-
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),
|
|
1859
2150
|
documentMetadata: DocumentMetadataSchema,
|
|
1860
|
-
documentOutline:
|
|
1861
|
-
sections:
|
|
1862
|
-
definitions:
|
|
1863
|
-
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(),
|
|
1864
2155
|
// Enriched fields (v1.2+)
|
|
1865
|
-
carrierLegalName:
|
|
1866
|
-
carrierNaicNumber:
|
|
1867
|
-
carrierAmBestRating:
|
|
1868
|
-
carrierAdmittedStatus:
|
|
1869
|
-
mga:
|
|
1870
|
-
underwriter:
|
|
1871
|
-
brokerAgency:
|
|
1872
|
-
brokerContactName:
|
|
1873
|
-
brokerLicenseNumber:
|
|
1874
|
-
priorPolicyNumber:
|
|
1875
|
-
programName:
|
|
1876
|
-
isRenewal:
|
|
1877
|
-
isPackage:
|
|
1878
|
-
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(),
|
|
1879
2170
|
insuredAddress: SourceBackedAddressSchema.optional(),
|
|
1880
2171
|
insuredEntityType: EntityTypeSchema.optional(),
|
|
1881
|
-
additionalNamedInsureds:
|
|
1882
|
-
insuredSicCode:
|
|
1883
|
-
insuredNaicsCode:
|
|
1884
|
-
insuredFein:
|
|
1885
|
-
enrichedCoverages:
|
|
1886
|
-
endorsements:
|
|
1887
|
-
exclusions:
|
|
1888
|
-
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(),
|
|
1889
2180
|
limits: LimitScheduleSchema.optional(),
|
|
1890
2181
|
deductibles: DeductibleScheduleSchema.optional(),
|
|
1891
|
-
locations:
|
|
1892
|
-
vehicles:
|
|
1893
|
-
classifications:
|
|
1894
|
-
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(),
|
|
1895
2186
|
declarations: DeclarationsSchema.optional(),
|
|
1896
2187
|
coverageForm: CoverageFormSchema.optional(),
|
|
1897
|
-
retroactiveDate:
|
|
2188
|
+
retroactiveDate: import_zod17.z.string().optional(),
|
|
1898
2189
|
extendedReportingPeriod: ExtendedReportingPeriodSchema.optional(),
|
|
1899
2190
|
insurer: InsurerInfoSchema.optional(),
|
|
1900
2191
|
producer: ProducerInfoSchema.optional(),
|
|
1901
|
-
claimsContacts:
|
|
1902
|
-
regulatoryContacts:
|
|
1903
|
-
thirdPartyAdministrators:
|
|
1904
|
-
additionalInsureds:
|
|
1905
|
-
lossPayees:
|
|
1906
|
-
mortgageHolders:
|
|
1907
|
-
taxesAndFees:
|
|
1908
|
-
totalCost:
|
|
1909
|
-
totalCostAmount:
|
|
1910
|
-
minimumPremium:
|
|
1911
|
-
minimumPremiumAmount:
|
|
1912
|
-
depositPremium:
|
|
1913
|
-
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(),
|
|
1914
2205
|
paymentPlan: PaymentPlanSchema.optional(),
|
|
1915
2206
|
auditType: AuditTypeSchema.optional(),
|
|
1916
|
-
ratingBasis:
|
|
1917
|
-
premiumByLocation:
|
|
2207
|
+
ratingBasis: import_zod17.z.array(RatingBasisSchema).optional(),
|
|
2208
|
+
premiumByLocation: import_zod17.z.array(LocationPremiumSchema).optional(),
|
|
1918
2209
|
lossSummary: LossSummarySchema.optional(),
|
|
1919
|
-
individualClaims:
|
|
2210
|
+
individualClaims: import_zod17.z.array(ClaimRecordSchema).optional(),
|
|
1920
2211
|
experienceMod: ExperienceModSchema.optional(),
|
|
1921
|
-
cancellationNoticeDays:
|
|
1922
|
-
nonrenewalNoticeDays:
|
|
1923
|
-
supplementaryFacts:
|
|
2212
|
+
cancellationNoticeDays: import_zod17.z.number().optional(),
|
|
2213
|
+
nonrenewalNoticeDays: import_zod17.z.number().optional(),
|
|
2214
|
+
supplementaryFacts: import_zod17.z.array(AuxiliaryFactSchema).optional()
|
|
1924
2215
|
};
|
|
1925
|
-
var PolicyDocumentSchema =
|
|
2216
|
+
var PolicyDocumentSchema = import_zod17.z.object({
|
|
1926
2217
|
...BaseDocumentFields,
|
|
1927
|
-
type:
|
|
1928
|
-
policyNumber:
|
|
1929
|
-
effectiveDate:
|
|
1930
|
-
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(),
|
|
1931
2222
|
policyTermType: PolicyTermTypeSchema.optional(),
|
|
1932
|
-
nextReviewDate:
|
|
1933
|
-
effectiveTime:
|
|
2223
|
+
nextReviewDate: import_zod17.z.string().optional(),
|
|
2224
|
+
effectiveTime: import_zod17.z.string().optional()
|
|
1934
2225
|
});
|
|
1935
|
-
var QuoteDocumentSchema =
|
|
2226
|
+
var QuoteDocumentSchema = import_zod17.z.object({
|
|
1936
2227
|
...BaseDocumentFields,
|
|
1937
|
-
type:
|
|
1938
|
-
quoteNumber:
|
|
1939
|
-
proposedEffectiveDate:
|
|
1940
|
-
proposedExpirationDate:
|
|
1941
|
-
quoteExpirationDate:
|
|
1942
|
-
subjectivities:
|
|
1943
|
-
underwritingConditions:
|
|
1944
|
-
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(),
|
|
1945
2236
|
// Enriched quote fields (v1.2+)
|
|
1946
|
-
enrichedSubjectivities:
|
|
1947
|
-
enrichedUnderwritingConditions:
|
|
1948
|
-
warrantyRequirements:
|
|
1949
|
-
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(),
|
|
1950
2241
|
bindingAuthority: BindingAuthoritySchema.optional()
|
|
1951
2242
|
});
|
|
1952
|
-
var InsuranceDocumentSchema =
|
|
2243
|
+
var InsuranceDocumentSchema = import_zod17.z.discriminatedUnion("type", [
|
|
1953
2244
|
PolicyDocumentSchema,
|
|
1954
2245
|
QuoteDocumentSchema
|
|
1955
2246
|
]);
|
|
1956
2247
|
|
|
1957
2248
|
// src/schemas/platform.ts
|
|
1958
|
-
var
|
|
1959
|
-
var PlatformSchema =
|
|
1960
|
-
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"]);
|
|
1961
2252
|
var PLATFORM_CONFIGS = {
|
|
1962
2253
|
email: {
|
|
1963
2254
|
supportsMarkdown: false,
|
|
@@ -1990,65 +2281,65 @@ var PLATFORM_CONFIGS = {
|
|
|
1990
2281
|
};
|
|
1991
2282
|
|
|
1992
2283
|
// src/schemas/pce.ts
|
|
1993
|
-
var
|
|
2284
|
+
var import_zod20 = require("zod");
|
|
1994
2285
|
|
|
1995
2286
|
// src/case/index.ts
|
|
1996
|
-
var
|
|
1997
|
-
var CaseEvidenceSourceSchema =
|
|
1998
|
-
id:
|
|
1999
|
-
label:
|
|
2000
|
-
documentId:
|
|
2001
|
-
page:
|
|
2002
|
-
fieldPath:
|
|
2003
|
-
text:
|
|
2004
|
-
metadata:
|
|
2005
|
-
});
|
|
2006
|
-
var CaseCitationSchema =
|
|
2007
|
-
sourceId:
|
|
2008
|
-
quote:
|
|
2009
|
-
page:
|
|
2010
|
-
fieldPath:
|
|
2011
|
-
});
|
|
2012
|
-
var ValidationIssueSeveritySchema =
|
|
2013
|
-
var CaseValidationIssueSchema =
|
|
2014
|
-
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(),
|
|
2015
2306
|
severity: ValidationIssueSeveritySchema,
|
|
2016
|
-
message:
|
|
2017
|
-
itemId:
|
|
2018
|
-
fieldPath:
|
|
2019
|
-
sourceId:
|
|
2020
|
-
});
|
|
2021
|
-
var MissingInfoQuestionSchema =
|
|
2022
|
-
id:
|
|
2023
|
-
itemId:
|
|
2024
|
-
fieldPath:
|
|
2025
|
-
question:
|
|
2026
|
-
reason:
|
|
2027
|
-
answer:
|
|
2028
|
-
});
|
|
2029
|
-
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([
|
|
2030
2321
|
"underwriter_summary",
|
|
2031
2322
|
"carrier_email",
|
|
2032
2323
|
"missing_info_request",
|
|
2033
2324
|
"json_packet",
|
|
2034
2325
|
"validation_report"
|
|
2035
2326
|
]);
|
|
2036
|
-
var CasePacketArtifactSchema =
|
|
2037
|
-
id:
|
|
2327
|
+
var CasePacketArtifactSchema = import_zod19.z.object({
|
|
2328
|
+
id: import_zod19.z.string(),
|
|
2038
2329
|
kind: CasePacketArtifactKindSchema,
|
|
2039
|
-
title:
|
|
2040
|
-
content:
|
|
2041
|
-
citations:
|
|
2042
|
-
});
|
|
2043
|
-
var CaseSubmissionPacketSchema =
|
|
2044
|
-
id:
|
|
2045
|
-
caseId:
|
|
2046
|
-
artifacts:
|
|
2047
|
-
validationIssues:
|
|
2048
|
-
missingInfoQuestions:
|
|
2049
|
-
createdAt:
|
|
2050
|
-
});
|
|
2051
|
-
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([
|
|
2052
2343
|
"inspect_attachments",
|
|
2053
2344
|
"retrieve_policy_evidence",
|
|
2054
2345
|
"retrieve_prior_applications",
|
|
@@ -2061,23 +2352,23 @@ var CaseActionSchema = import_zod18.z.enum([
|
|
|
2061
2352
|
"generate_packet",
|
|
2062
2353
|
"answer_field_or_case_question"
|
|
2063
2354
|
]);
|
|
2064
|
-
var AgenticExecutionModeSchema =
|
|
2065
|
-
var CaseProposalScoreSchema =
|
|
2066
|
-
grounding:
|
|
2067
|
-
completeness:
|
|
2068
|
-
consistency:
|
|
2069
|
-
determinism:
|
|
2070
|
-
risk:
|
|
2071
|
-
cost:
|
|
2072
|
-
});
|
|
2073
|
-
var CaseProposalSchema =
|
|
2074
|
-
id:
|
|
2075
|
-
sourceSpanIds:
|
|
2076
|
-
confidence:
|
|
2077
|
-
missingInfo:
|
|
2078
|
-
validationIssues:
|
|
2079
|
-
estimatedRisk:
|
|
2080
|
-
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),
|
|
2081
2372
|
score: CaseProposalScoreSchema.optional()
|
|
2082
2373
|
});
|
|
2083
2374
|
function stableCaseId(prefix, parts) {
|
|
@@ -2196,8 +2487,8 @@ function totalProposalScore(score) {
|
|
|
2196
2487
|
}
|
|
2197
2488
|
|
|
2198
2489
|
// src/schemas/pce.ts
|
|
2199
|
-
var PolicyChangeActionSchema =
|
|
2200
|
-
var PolicyChangeKindSchema =
|
|
2490
|
+
var PolicyChangeActionSchema = import_zod20.z.enum(["add", "remove", "update", "replace", "clarify"]);
|
|
2491
|
+
var PolicyChangeKindSchema = import_zod20.z.enum([
|
|
2201
2492
|
"named_insured_change",
|
|
2202
2493
|
"additional_insured_change",
|
|
2203
2494
|
"coverage_change",
|
|
@@ -2211,70 +2502,70 @@ var PolicyChangeKindSchema = import_zod19.z.enum([
|
|
|
2211
2502
|
"renewal_submission_update",
|
|
2212
2503
|
"general_endorsement"
|
|
2213
2504
|
]);
|
|
2214
|
-
var PolicyChangeConfidenceSchema =
|
|
2215
|
-
var PolicyChangeStatusSchema =
|
|
2216
|
-
var PolicyChangeItemSchema =
|
|
2217
|
-
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(),
|
|
2218
2509
|
kind: PolicyChangeKindSchema.default("general_endorsement"),
|
|
2219
2510
|
action: PolicyChangeActionSchema,
|
|
2220
|
-
affectedPolicyId:
|
|
2221
|
-
fieldPath:
|
|
2222
|
-
label:
|
|
2223
|
-
beforeValue:
|
|
2224
|
-
afterValue:
|
|
2225
|
-
requestedValue:
|
|
2226
|
-
effectiveDate:
|
|
2227
|
-
reason:
|
|
2228
|
-
sourceIds:
|
|
2229
|
-
sourceSpanIds:
|
|
2230
|
-
userSourceSpanIds:
|
|
2231
|
-
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([]),
|
|
2232
2523
|
confidence: PolicyChangeConfidenceSchema.default("medium"),
|
|
2233
|
-
confidenceScore:
|
|
2524
|
+
confidenceScore: import_zod20.z.number().min(0).max(1).optional(),
|
|
2234
2525
|
status: PolicyChangeStatusSchema.default("ready")
|
|
2235
2526
|
});
|
|
2236
|
-
var PceNormalizationResultSchema =
|
|
2237
|
-
summary:
|
|
2238
|
-
items:
|
|
2239
|
-
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(),
|
|
2240
2531
|
status: PolicyChangeStatusSchema.optional()
|
|
2241
2532
|
})),
|
|
2242
|
-
missingInfoQuestions:
|
|
2243
|
-
id:
|
|
2533
|
+
missingInfoQuestions: import_zod20.z.array(MissingInfoQuestionSchema.omit({ id: true }).extend({
|
|
2534
|
+
id: import_zod20.z.string().optional()
|
|
2244
2535
|
})).default([])
|
|
2245
2536
|
});
|
|
2246
|
-
var PolicyChangeImpactSchema =
|
|
2247
|
-
itemId:
|
|
2248
|
-
beforeValue:
|
|
2249
|
-
requestedValue:
|
|
2250
|
-
likelyEndorsementRequired:
|
|
2251
|
-
carrierApprovalLikelyRequired:
|
|
2252
|
-
affectedCoverageForms:
|
|
2253
|
-
sourceSpanIds:
|
|
2254
|
-
});
|
|
2255
|
-
var PceCaseStateSchema =
|
|
2256
|
-
id:
|
|
2257
|
-
requestText:
|
|
2258
|
-
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(),
|
|
2259
2550
|
executionMode: AgenticExecutionModeSchema.default("deterministic_tree"),
|
|
2260
|
-
items:
|
|
2261
|
-
impacts:
|
|
2262
|
-
evidenceSources:
|
|
2263
|
-
validationIssues:
|
|
2264
|
-
missingInfoQuestions:
|
|
2265
|
-
createdAt:
|
|
2266
|
-
updatedAt:
|
|
2267
|
-
});
|
|
2268
|
-
var PolicyChangeRequestSchema =
|
|
2269
|
-
id:
|
|
2270
|
-
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(),
|
|
2271
2562
|
executionMode: AgenticExecutionModeSchema.optional(),
|
|
2272
|
-
userSourceSpanIds:
|
|
2273
|
-
createdAt:
|
|
2563
|
+
userSourceSpanIds: import_zod20.z.array(import_zod20.z.string()).optional(),
|
|
2564
|
+
createdAt: import_zod20.z.number().optional()
|
|
2274
2565
|
});
|
|
2275
2566
|
var PceSubmissionPacketSchema = CaseSubmissionPacketSchema.extend({
|
|
2276
2567
|
pceCase: PceCaseStateSchema,
|
|
2277
|
-
artifacts:
|
|
2568
|
+
artifacts: import_zod20.z.array(CasePacketArtifactSchema)
|
|
2278
2569
|
});
|
|
2279
2570
|
|
|
2280
2571
|
// src/schemas/context-keys.ts
|
|
@@ -2292,7 +2583,7 @@ var CONTEXT_KEY_MAP = [
|
|
|
2292
2583
|
{ extractedField: "totalPremium", category: "financial", contextKey: "current_premium", description: "Total policy premium" },
|
|
2293
2584
|
{ extractedField: "locations[].buildingValue", category: "financial", contextKey: "total_property_values", description: "Sum of building values" },
|
|
2294
2585
|
{ extractedField: "locations[].contentsValue", category: "financial", contextKey: "total_contents_values", description: "Sum of contents values" },
|
|
2295
|
-
{ extractedField: "
|
|
2586
|
+
{ extractedField: "linesOfBusiness", category: "coverage", contextKey: "coverage_types", description: "ACORD lines of business covered" },
|
|
2296
2587
|
{ extractedField: "coverages[].limit", category: "coverage", contextKey: "current_limits", description: "Current coverage limits" },
|
|
2297
2588
|
{ extractedField: "coverages[].deductible", category: "coverage", contextKey: "current_deductibles", description: "Current deductibles" },
|
|
2298
2589
|
{ extractedField: "experienceMod.factor", category: "loss_history", contextKey: "experience_mod", description: "Workers comp experience modification factor" },
|
|
@@ -2330,8 +2621,8 @@ var CONTEXT_KEY_MAP = [
|
|
|
2330
2621
|
];
|
|
2331
2622
|
|
|
2332
2623
|
// src/source/schemas.ts
|
|
2333
|
-
var
|
|
2334
|
-
var SourceSpanKindSchema =
|
|
2624
|
+
var import_zod21 = require("zod");
|
|
2625
|
+
var SourceSpanKindSchema = import_zod21.z.enum([
|
|
2335
2626
|
"pdf_text",
|
|
2336
2627
|
"pdf_image",
|
|
2337
2628
|
"html",
|
|
@@ -2339,7 +2630,7 @@ var SourceSpanKindSchema = import_zod20.z.enum([
|
|
|
2339
2630
|
"plain_text",
|
|
2340
2631
|
"structured_field"
|
|
2341
2632
|
]);
|
|
2342
|
-
var SourceSpanUnitSchema =
|
|
2633
|
+
var SourceSpanUnitSchema = import_zod21.z.enum([
|
|
2343
2634
|
"page",
|
|
2344
2635
|
"section",
|
|
2345
2636
|
"table",
|
|
@@ -2348,78 +2639,78 @@ var SourceSpanUnitSchema = import_zod20.z.enum([
|
|
|
2348
2639
|
"key_value",
|
|
2349
2640
|
"text"
|
|
2350
2641
|
]);
|
|
2351
|
-
var SourceKindSchema =
|
|
2642
|
+
var SourceKindSchema = import_zod21.z.enum([
|
|
2352
2643
|
"policy_pdf",
|
|
2353
2644
|
"application_pdf",
|
|
2354
2645
|
"email",
|
|
2355
2646
|
"attachment",
|
|
2356
2647
|
"manual_note"
|
|
2357
2648
|
]);
|
|
2358
|
-
var SourceSpanBBoxSchema =
|
|
2359
|
-
page:
|
|
2360
|
-
x:
|
|
2361
|
-
y:
|
|
2362
|
-
width:
|
|
2363
|
-
height:
|
|
2364
|
-
});
|
|
2365
|
-
var SourceSpanLocationSchema =
|
|
2366
|
-
page:
|
|
2367
|
-
startPage:
|
|
2368
|
-
endPage:
|
|
2369
|
-
charStart:
|
|
2370
|
-
charEnd:
|
|
2371
|
-
lineStart:
|
|
2372
|
-
lineEnd:
|
|
2373
|
-
fieldPath:
|
|
2374
|
-
});
|
|
2375
|
-
var SourceSpanTableLocationSchema =
|
|
2376
|
-
tableId:
|
|
2377
|
-
rowIndex:
|
|
2378
|
-
columnIndex:
|
|
2379
|
-
columnName:
|
|
2380
|
-
rowSpanId:
|
|
2381
|
-
tableSpanId:
|
|
2382
|
-
isHeader:
|
|
2383
|
-
});
|
|
2384
|
-
var SourceSpanSchema =
|
|
2385
|
-
id:
|
|
2386
|
-
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),
|
|
2387
2678
|
sourceKind: SourceKindSchema.optional(),
|
|
2388
|
-
chunkId:
|
|
2679
|
+
chunkId: import_zod21.z.string().optional(),
|
|
2389
2680
|
kind: SourceSpanKindSchema,
|
|
2390
|
-
text:
|
|
2391
|
-
hash:
|
|
2392
|
-
textHash:
|
|
2393
|
-
pageStart:
|
|
2394
|
-
pageEnd:
|
|
2395
|
-
sectionId:
|
|
2396
|
-
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(),
|
|
2397
2688
|
sourceUnit: SourceSpanUnitSchema.optional(),
|
|
2398
|
-
parentSpanId:
|
|
2689
|
+
parentSpanId: import_zod21.z.string().optional(),
|
|
2399
2690
|
table: SourceSpanTableLocationSchema.optional(),
|
|
2400
|
-
bbox:
|
|
2691
|
+
bbox: import_zod21.z.array(SourceSpanBBoxSchema).optional(),
|
|
2401
2692
|
location: SourceSpanLocationSchema.optional(),
|
|
2402
|
-
metadata:
|
|
2403
|
-
});
|
|
2404
|
-
var SourceSpanRefSchema =
|
|
2405
|
-
sourceSpanId:
|
|
2406
|
-
documentId:
|
|
2407
|
-
chunkId:
|
|
2408
|
-
quote:
|
|
2409
|
-
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(),
|
|
2410
2701
|
location: SourceSpanLocationSchema.optional()
|
|
2411
2702
|
});
|
|
2412
|
-
var SourceChunkSchema =
|
|
2413
|
-
id:
|
|
2414
|
-
documentId:
|
|
2415
|
-
sourceSpanIds:
|
|
2416
|
-
text:
|
|
2417
|
-
textHash:
|
|
2418
|
-
pageStart:
|
|
2419
|
-
pageEnd:
|
|
2420
|
-
metadata:
|
|
2421
|
-
});
|
|
2422
|
-
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([
|
|
2423
2714
|
"document",
|
|
2424
2715
|
"page_group",
|
|
2425
2716
|
"page",
|
|
@@ -2433,31 +2724,31 @@ var DocumentSourceNodeKindSchema = import_zod20.z.enum([
|
|
|
2433
2724
|
"table_cell",
|
|
2434
2725
|
"text"
|
|
2435
2726
|
]);
|
|
2436
|
-
var DocumentSourceNodeSchema =
|
|
2437
|
-
id:
|
|
2438
|
-
documentId:
|
|
2439
|
-
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(),
|
|
2440
2731
|
kind: DocumentSourceNodeKindSchema,
|
|
2441
|
-
title:
|
|
2442
|
-
description:
|
|
2443
|
-
textExcerpt:
|
|
2444
|
-
sourceSpanIds:
|
|
2445
|
-
pageStart:
|
|
2446
|
-
pageEnd:
|
|
2447
|
-
bbox:
|
|
2448
|
-
order:
|
|
2449
|
-
path:
|
|
2450
|
-
metadata:
|
|
2451
|
-
});
|
|
2452
|
-
var SourceBackedValueSchema =
|
|
2453
|
-
value:
|
|
2454
|
-
normalizedValue:
|
|
2455
|
-
confidence:
|
|
2456
|
-
sourceNodeIds:
|
|
2457
|
-
sourceSpanIds:
|
|
2458
|
-
});
|
|
2459
|
-
var OperationalCoverageTermSchema =
|
|
2460
|
-
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([
|
|
2461
2752
|
"each_claim_limit",
|
|
2462
2753
|
"each_occurrence_limit",
|
|
2463
2754
|
"each_loss_limit",
|
|
@@ -2469,182 +2760,132 @@ var OperationalCoverageTermSchema = import_zod20.z.object({
|
|
|
2469
2760
|
"premium",
|
|
2470
2761
|
"other"
|
|
2471
2762
|
]).default("other"),
|
|
2472
|
-
label:
|
|
2473
|
-
value:
|
|
2474
|
-
amount:
|
|
2475
|
-
appliesTo:
|
|
2476
|
-
sourceNodeIds:
|
|
2477
|
-
sourceSpanIds:
|
|
2478
|
-
});
|
|
2479
|
-
var OperationalCoverageLineSchema =
|
|
2480
|
-
name:
|
|
2481
|
-
coverageCode:
|
|
2482
|
-
limit:
|
|
2483
|
-
deductible:
|
|
2484
|
-
premium:
|
|
2485
|
-
retroactiveDate:
|
|
2486
|
-
formNumber:
|
|
2487
|
-
sectionRef:
|
|
2488
|
-
endorsementNumber:
|
|
2489
|
-
limits:
|
|
2490
|
-
sourceNodeIds:
|
|
2491
|
-
sourceSpanIds:
|
|
2492
|
-
});
|
|
2493
|
-
var OperationalPartySchema =
|
|
2494
|
-
role:
|
|
2495
|
-
name:
|
|
2496
|
-
sourceNodeIds:
|
|
2497
|
-
sourceSpanIds:
|
|
2498
|
-
});
|
|
2499
|
-
var OperationalEndorsementSupportSchema =
|
|
2500
|
-
kind:
|
|
2501
|
-
status:
|
|
2502
|
-
summary:
|
|
2503
|
-
sourceNodeIds:
|
|
2504
|
-
sourceSpanIds:
|
|
2505
|
-
});
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
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
|
+
);
|
|
2524
2832
|
|
|
2525
2833
|
// src/source/policy-types.ts
|
|
2526
|
-
var
|
|
2527
|
-
|
|
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
|
-
"motor truck cargo": "inland_marine",
|
|
2566
|
-
"motor truck cargo legal liability": "inland_marine",
|
|
2567
|
-
"builders risk insurance": "builders_risk",
|
|
2568
|
-
"pollution liability": "environmental",
|
|
2569
|
-
"premises pollution liability": "environmental",
|
|
2570
|
-
"environmental liability": "environmental",
|
|
2571
|
-
"ocean marine insurance": "ocean_marine",
|
|
2572
|
-
"surety bond": "surety",
|
|
2573
|
-
"product liability insurance": "product_liability",
|
|
2574
|
-
"life insurance": "life",
|
|
2575
|
-
"permanent life": "life",
|
|
2576
|
-
"term life": "life",
|
|
2577
|
-
"whole life": "life",
|
|
2578
|
-
"universal life": "life",
|
|
2579
|
-
"critical illness": "critical_illness",
|
|
2580
|
-
"critical illness insurance": "critical_illness",
|
|
2581
|
-
"disability insurance": "disability",
|
|
2582
|
-
"long term care": "long_term_care",
|
|
2583
|
-
"long-term care": "long_term_care"
|
|
2584
|
-
};
|
|
2585
|
-
var POLICY_TYPE_TEXT_PATTERNS = [
|
|
2586
|
-
{ type: "general_liability", pattern: /\b(?:commercial\s+)?general\s+liability\b|\bcgl\b/i },
|
|
2587
|
-
{ type: "commercial_property", pattern: /\bcommercial\s+property\b|\bproperty\s+insurance\b/i },
|
|
2588
|
-
{ type: "commercial_auto", pattern: /\bcommercial\s+auto(?:mobile)?\b|\bbusiness\s+auto(?:mobile)?\b|\bauto(?:mobile)?\s+physical\s+damage\b/i },
|
|
2589
|
-
{ type: "non_owned_auto", pattern: /\b(?:hired\s+(?:and\s+)?)?non[-\s]?owned\s+auto\b/i },
|
|
2590
|
-
{ type: "workers_comp", pattern: /\bworkers['’]?\s+comp(?:ensation)?\b/i },
|
|
2591
|
-
{ type: "umbrella", pattern: /\bcommercial\s+umbrella\b|\bumbrella\s+liability\b/i },
|
|
2592
|
-
{ type: "excess_liability", pattern: /\bexcess\s+liability\b/i },
|
|
2593
|
-
{ type: "professional_liability", pattern: /\bprofessional\s+liability\b|\berrors?\s*(?:and|&)\s*omissions?\b|\be&o\b/i },
|
|
2594
|
-
{ type: "cyber", pattern: /\bcyber\b|\bnetwork\s+security\b|\bprivacy\s+liability\b/i },
|
|
2595
|
-
{ type: "epli", pattern: /\bemployment\s+practices?\s+liability\b|\bepli\b/i },
|
|
2596
|
-
{ type: "directors_officers", pattern: /\bdirectors?\s*(?:and|&)\s*officers?\b|\bd&o\b/i },
|
|
2597
|
-
{ type: "fiduciary_liability", pattern: /\bfiduciary\s+liability\b/i },
|
|
2598
|
-
{ type: "crime_fidelity", pattern: /\bcrime\b|\bfidelity\b/i },
|
|
2599
|
-
{ type: "inland_marine", pattern: /\binland\s+marine\b|\bmotor\s+truck\s+cargo\b|\bcargo\s+legal\s+liability\b/i },
|
|
2600
|
-
{ type: "builders_risk", pattern: /\bbuilders?\s+risk\b/i },
|
|
2601
|
-
{ type: "environmental", pattern: /\bpollution\s+liability\b|\benvironmental\s+liability\b/i },
|
|
2602
|
-
{ type: "ocean_marine", pattern: /\bocean\s+marine\b/i },
|
|
2603
|
-
{ type: "surety", pattern: /\bsurety\b/i },
|
|
2604
|
-
{ type: "product_liability", pattern: /\bproduct\s+liability\b|\bproducts?\s+completed\s+operations\b/i },
|
|
2605
|
-
{ type: "bop", pattern: /\bbusiness\s*owners?\s+policy\b|\bbop\b/i },
|
|
2606
|
-
{ type: "homeowners_ho3", pattern: /\bhomeowners?\s*(?:ho[-\s]?3)?\b/i },
|
|
2607
|
-
{ type: "homeowners_ho5", pattern: /\bho[-\s]?5\b/i },
|
|
2608
|
-
{ type: "renters_ho4", pattern: /\brenters?\b|\bho[-\s]?4\b/i },
|
|
2609
|
-
{ type: "condo_ho6", pattern: /\bcondo(?:minium)?\b|\bho[-\s]?6\b/i },
|
|
2610
|
-
{ type: "dwelling_fire", pattern: /\bdwelling\s+fire\b/i },
|
|
2611
|
-
{ type: "personal_auto", pattern: /\bpersonal\s+auto\b/i },
|
|
2612
|
-
{ type: "personal_umbrella", pattern: /\bpersonal\s+umbrella\b/i },
|
|
2613
|
-
{ type: "flood_private", pattern: /\bflood\b/i },
|
|
2614
|
-
{ type: "earthquake", pattern: /\bearthquake\b/i },
|
|
2615
|
-
{ type: "personal_inland_marine", pattern: /\bpersonal\s+(?:articles|inland\s+marine)\b/i },
|
|
2616
|
-
{ type: "watercraft", pattern: /\bwatercraft\b|\bboat\s+insurance\b/i },
|
|
2617
|
-
{ type: "recreational_vehicle", pattern: /\brecreational\s+vehicle\b|\brv\s+insurance\b/i },
|
|
2618
|
-
{ type: "farm_ranch", pattern: /\bfarm\b|\branch\b/i },
|
|
2619
|
-
{ type: "life", pattern: /\blife\s+insurance\b|\bterm\s+life\b|\bwhole\s+life\b|\buniversal\s+life\b/i },
|
|
2620
|
-
{ type: "critical_illness", pattern: /\bcritical\s+illness\b/i },
|
|
2621
|
-
{ type: "disability", pattern: /\bdisability\s+insurance\b|\btotal\s+disability\b/i },
|
|
2622
|
-
{ type: "long_term_care", pattern: /\blong[-\s]?term\s+care\b/i },
|
|
2623
|
-
{ type: "pet", pattern: /\bpet\s+insurance\b/i },
|
|
2624
|
-
{ type: "travel", pattern: /\btravel\s+insurance\b/i },
|
|
2625
|
-
{ type: "identity_theft", pattern: /\bidentity\s+theft\b/i },
|
|
2626
|
-
{ 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 }
|
|
2627
2873
|
];
|
|
2628
2874
|
function normalizeWhitespace(value) {
|
|
2629
2875
|
return value.replace(/\s+/g, " ").trim();
|
|
2630
2876
|
}
|
|
2631
|
-
function
|
|
2632
|
-
|
|
2633
|
-
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));
|
|
2634
|
-
const unique = [...new Set(controlled)].slice(0, 6);
|
|
2635
|
-
return unique.length ? unique : ["other"];
|
|
2877
|
+
function hasSpecificLineOfBusiness(codes) {
|
|
2878
|
+
return codes.some((code) => code !== "UN");
|
|
2636
2879
|
}
|
|
2637
|
-
function
|
|
2638
|
-
return types.some((type) => type !== "other");
|
|
2639
|
-
}
|
|
2640
|
-
function policyTypesFromText(value) {
|
|
2880
|
+
function linesOfBusinessFromText(value) {
|
|
2641
2881
|
const text = normalizeWhitespace(value ?? "");
|
|
2642
2882
|
if (!text) return [];
|
|
2643
|
-
const
|
|
2644
|
-
if (
|
|
2645
|
-
|
|
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));
|
|
2646
2887
|
}
|
|
2647
|
-
function
|
|
2888
|
+
function inferLinesOfBusinessFromOperationalCoverages(coverages) {
|
|
2648
2889
|
const inferred = [];
|
|
2649
2890
|
for (const coverage of coverages) {
|
|
2650
2891
|
const limits = coverage.limits ?? [];
|
|
@@ -2655,23 +2896,23 @@ function inferPolicyTypesFromOperationalCoverages(coverages) {
|
|
|
2655
2896
|
...limits.flatMap((term) => [term.appliesTo, term.label])
|
|
2656
2897
|
].filter((value) => typeof value === "string" && value.trim().length > 0);
|
|
2657
2898
|
for (const value of text) {
|
|
2658
|
-
for (const
|
|
2659
|
-
if (!inferred.includes(
|
|
2899
|
+
for (const code of linesOfBusinessFromText(value)) {
|
|
2900
|
+
if (!inferred.includes(code)) inferred.push(code);
|
|
2660
2901
|
}
|
|
2661
2902
|
}
|
|
2662
2903
|
}
|
|
2663
2904
|
return inferred.slice(0, 6);
|
|
2664
2905
|
}
|
|
2665
|
-
function
|
|
2666
|
-
const inferred =
|
|
2667
|
-
if (inferred.
|
|
2668
|
-
return {
|
|
2906
|
+
function resolveOperationalProfileLinesOfBusiness(params) {
|
|
2907
|
+
const inferred = inferLinesOfBusinessFromOperationalCoverages(params.coverages ?? []);
|
|
2908
|
+
if (inferred.some((code) => code !== "UN")) {
|
|
2909
|
+
return { linesOfBusiness: inferred, source: "coverage" };
|
|
2669
2910
|
}
|
|
2670
|
-
const controlled =
|
|
2671
|
-
if (
|
|
2672
|
-
const existingControlled =
|
|
2673
|
-
if (
|
|
2674
|
-
return {
|
|
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" };
|
|
2675
2916
|
}
|
|
2676
2917
|
|
|
2677
2918
|
// src/source/ids.ts
|
|
@@ -3903,7 +4144,7 @@ function shouldFailQualityGate(mode, status) {
|
|
|
3903
4144
|
}
|
|
3904
4145
|
|
|
3905
4146
|
// src/extraction/source-tree-extractor.ts
|
|
3906
|
-
var
|
|
4147
|
+
var import_zod23 = require("zod");
|
|
3907
4148
|
|
|
3908
4149
|
// src/source/operational-profile.ts
|
|
3909
4150
|
function normalizeWhitespace4(value) {
|
|
@@ -4076,15 +4317,17 @@ function mergeOperationalProfile(base, candidate, validNodeIds, validSpanIds) {
|
|
|
4076
4317
|
...base.warnings,
|
|
4077
4318
|
...Array.isArray(candidate.warnings) ? candidate.warnings.filter((warning) => typeof warning === "string" && warning.trim().length > 0) : []
|
|
4078
4319
|
];
|
|
4079
|
-
const
|
|
4080
|
-
|
|
4081
|
-
|
|
4320
|
+
const candidateLinesOfBusiness = candidate.linesOfBusiness ?? candidate.policyTypes;
|
|
4321
|
+
const baseLinesOfBusiness = base.linesOfBusiness ?? base.policyTypes;
|
|
4322
|
+
const resolvedLinesOfBusiness = resolveOperationalProfileLinesOfBusiness({
|
|
4323
|
+
profileLinesOfBusiness: candidateLinesOfBusiness,
|
|
4324
|
+
existingLinesOfBusiness: baseLinesOfBusiness,
|
|
4082
4325
|
coverages
|
|
4083
4326
|
});
|
|
4084
4327
|
return PolicyOperationalProfileSchema.parse({
|
|
4085
4328
|
...base,
|
|
4086
4329
|
documentType: candidate.documentType === "policy" ? "policy" : base.documentType,
|
|
4087
|
-
|
|
4330
|
+
linesOfBusiness: resolvedLinesOfBusiness.linesOfBusiness,
|
|
4088
4331
|
policyNumber,
|
|
4089
4332
|
namedInsured,
|
|
4090
4333
|
insurer,
|
|
@@ -4103,7 +4346,7 @@ function mergeOperationalProfile(base, candidate, validNodeIds, validSpanIds) {
|
|
|
4103
4346
|
}
|
|
4104
4347
|
|
|
4105
4348
|
// src/extraction/operational-profile-cleanup.ts
|
|
4106
|
-
var
|
|
4349
|
+
var import_zod22 = require("zod");
|
|
4107
4350
|
var OPERATIONAL_COVERAGE_TERM_KINDS2 = [
|
|
4108
4351
|
"each_claim_limit",
|
|
4109
4352
|
"each_occurrence_limit",
|
|
@@ -4116,33 +4359,33 @@ var OPERATIONAL_COVERAGE_TERM_KINDS2 = [
|
|
|
4116
4359
|
"premium",
|
|
4117
4360
|
"other"
|
|
4118
4361
|
];
|
|
4119
|
-
var OperationalCoverageTermKindSchema =
|
|
4120
|
-
var OperationalProfileCleanupSchema =
|
|
4121
|
-
coverageDecisions:
|
|
4122
|
-
coverageIndex:
|
|
4123
|
-
action:
|
|
4124
|
-
reason:
|
|
4125
|
-
name:
|
|
4126
|
-
limit:
|
|
4127
|
-
deductible:
|
|
4128
|
-
premium:
|
|
4129
|
-
retroactiveDate:
|
|
4130
|
-
sourceNodeIds:
|
|
4131
|
-
sourceSpanIds:
|
|
4132
|
-
termDecisions:
|
|
4133
|
-
termIndex:
|
|
4134
|
-
action:
|
|
4135
|
-
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(),
|
|
4136
4379
|
kind: OperationalCoverageTermKindSchema.optional(),
|
|
4137
|
-
label:
|
|
4138
|
-
value:
|
|
4139
|
-
amount:
|
|
4140
|
-
appliesTo:
|
|
4141
|
-
sourceNodeIds:
|
|
4142
|
-
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()
|
|
4143
4386
|
})).optional()
|
|
4144
4387
|
})).default([]),
|
|
4145
|
-
warnings:
|
|
4388
|
+
warnings: import_zod22.z.array(import_zod22.z.string()).default([])
|
|
4146
4389
|
});
|
|
4147
4390
|
var CLEANUP_CANDIDATE_ID_LIMIT = 12;
|
|
4148
4391
|
var CLEANUP_SOURCE_NODE_LIMIT = 90;
|
|
@@ -4298,7 +4541,7 @@ function buildOperationalProfileCleanupPrompt(sourceTree, profile, options = {})
|
|
|
4298
4541
|
));
|
|
4299
4542
|
const candidate = {
|
|
4300
4543
|
documentType: profile.documentType,
|
|
4301
|
-
|
|
4544
|
+
linesOfBusiness: profile.linesOfBusiness,
|
|
4302
4545
|
coverages: coverageEntries.map(({ coverage, coverageIndex }) => compactCoverageForCleanup(coverage, coverageIndex))
|
|
4303
4546
|
};
|
|
4304
4547
|
return `Review and clean a source-backed operational profile projection for an insurance policy.
|
|
@@ -4596,16 +4839,16 @@ function applyOperationalProfileCleanup(profile, cleanup, validNodeIds, validSpa
|
|
|
4596
4839
|
}
|
|
4597
4840
|
|
|
4598
4841
|
// src/extraction/source-tree-extractor.ts
|
|
4599
|
-
var SourceBackedValueForPromptSchema =
|
|
4600
|
-
value:
|
|
4601
|
-
normalizedValue:
|
|
4602
|
-
confidence:
|
|
4603
|
-
sourceNodeIds:
|
|
4604
|
-
sourceSpanIds:
|
|
4605
|
-
});
|
|
4606
|
-
var OperationalProfilePromptSchema =
|
|
4607
|
-
documentType:
|
|
4608
|
-
|
|
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(),
|
|
4609
4852
|
policyNumber: SourceBackedValueForPromptSchema.optional(),
|
|
4610
4853
|
namedInsured: SourceBackedValueForPromptSchema.optional(),
|
|
4611
4854
|
insurer: SourceBackedValueForPromptSchema.optional(),
|
|
@@ -4614,30 +4857,30 @@ var OperationalProfilePromptSchema = import_zod22.z.object({
|
|
|
4614
4857
|
expirationDate: SourceBackedValueForPromptSchema.optional(),
|
|
4615
4858
|
retroactiveDate: SourceBackedValueForPromptSchema.optional(),
|
|
4616
4859
|
premium: SourceBackedValueForPromptSchema.optional(),
|
|
4617
|
-
coverages:
|
|
4618
|
-
name:
|
|
4619
|
-
coverageCode:
|
|
4620
|
-
limit:
|
|
4621
|
-
deductible:
|
|
4622
|
-
premium:
|
|
4623
|
-
retroactiveDate:
|
|
4624
|
-
formNumber:
|
|
4625
|
-
sectionRef:
|
|
4626
|
-
endorsementNumber:
|
|
4627
|
-
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({
|
|
4628
4871
|
kind: OperationalCoverageTermKindSchema.optional(),
|
|
4629
|
-
label:
|
|
4630
|
-
value:
|
|
4631
|
-
amount:
|
|
4632
|
-
appliesTo:
|
|
4633
|
-
sourceNodeIds:
|
|
4634
|
-
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())
|
|
4635
4878
|
})).optional(),
|
|
4636
|
-
sourceNodeIds:
|
|
4637
|
-
sourceSpanIds:
|
|
4879
|
+
sourceNodeIds: import_zod23.z.array(import_zod23.z.string()),
|
|
4880
|
+
sourceSpanIds: import_zod23.z.array(import_zod23.z.string())
|
|
4638
4881
|
})).optional(),
|
|
4639
|
-
sourceNodeIds:
|
|
4640
|
-
sourceSpanIds:
|
|
4882
|
+
sourceNodeIds: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
4883
|
+
sourceSpanIds: import_zod23.z.array(import_zod23.z.string()).optional()
|
|
4641
4884
|
});
|
|
4642
4885
|
function cleanText(value, fallback) {
|
|
4643
4886
|
const text = value?.replace(/\s+/g, " ").trim();
|
|
@@ -5644,7 +5887,7 @@ function operationalProfilePromptNodes(sourceTree) {
|
|
|
5644
5887
|
function emptyOperationalProfile() {
|
|
5645
5888
|
return {
|
|
5646
5889
|
documentType: "policy",
|
|
5647
|
-
|
|
5890
|
+
linesOfBusiness: ["UN"],
|
|
5648
5891
|
coverages: [],
|
|
5649
5892
|
parties: [],
|
|
5650
5893
|
endorsementSupport: [],
|
|
@@ -5795,7 +6038,7 @@ function materializeDocument(params) {
|
|
|
5795
6038
|
carrier !== "Unknown" ? carrier : void 0,
|
|
5796
6039
|
policyNumber !== "Unknown" ? `#${policyNumber}` : void 0,
|
|
5797
6040
|
insuredName !== "Unknown" ? `for ${insuredName}` : void 0,
|
|
5798
|
-
profile.
|
|
6041
|
+
profile.linesOfBusiness.length ? `covering ${profile.linesOfBusiness.slice(0, 5).join(", ")}` : void 0
|
|
5799
6042
|
].filter(Boolean).join(" ");
|
|
5800
6043
|
const base = {
|
|
5801
6044
|
id: params.id,
|
|
@@ -5809,7 +6052,7 @@ function materializeDocument(params) {
|
|
|
5809
6052
|
brokerAgency: broker,
|
|
5810
6053
|
producer: { agencyName: broker, ...brokerProvenance }
|
|
5811
6054
|
} : {},
|
|
5812
|
-
|
|
6055
|
+
linesOfBusiness: profile.linesOfBusiness,
|
|
5813
6056
|
formInventory: params.formInventory.filter((form) => typeof form.formNumber === "string" && form.formNumber.trim().length > 0).map((form) => ({
|
|
5814
6057
|
formNumber: form.formNumber,
|
|
5815
6058
|
editionDate: form.editionDate,
|
|
@@ -6195,13 +6438,13 @@ function chunkDocument(doc) {
|
|
|
6195
6438
|
};
|
|
6196
6439
|
const chunks = [];
|
|
6197
6440
|
const docId = doc.id;
|
|
6198
|
-
const
|
|
6441
|
+
const linesOfBusinessStr = doc.linesOfBusiness?.length ? doc.linesOfBusiness.join(",") : void 0;
|
|
6199
6442
|
const extendedDoc = doc;
|
|
6200
6443
|
function stringMetadata(entries) {
|
|
6201
6444
|
const base = Object.fromEntries(
|
|
6202
6445
|
Object.entries(entries).filter(([, value]) => value !== void 0 && value !== null && String(value).length > 0).map(([key, value]) => [key, String(value)])
|
|
6203
6446
|
);
|
|
6204
|
-
if (
|
|
6447
|
+
if (linesOfBusinessStr) base.linesOfBusiness = linesOfBusinessStr;
|
|
6205
6448
|
return base;
|
|
6206
6449
|
}
|
|
6207
6450
|
function lines(values) {
|
|
@@ -6235,7 +6478,7 @@ function chunkDocument(doc) {
|
|
|
6235
6478
|
doc.isRenewal != null ? `Renewal: ${doc.isRenewal ? "Yes" : "No"}` : null,
|
|
6236
6479
|
doc.isPackage != null ? `Package: ${doc.isPackage ? "Yes" : "No"}` : null,
|
|
6237
6480
|
doc.security ? `Security: ${doc.security}` : null,
|
|
6238
|
-
doc.
|
|
6481
|
+
doc.linesOfBusiness?.length ? `Lines of Business: ${doc.linesOfBusiness.join(", ")}` : null
|
|
6239
6482
|
]),
|
|
6240
6483
|
{ carrier: doc.carrier, documentType: doc.type }
|
|
6241
6484
|
);
|
|
@@ -7562,8 +7805,8 @@ Respond with JSON only:
|
|
|
7562
7805
|
}`;
|
|
7563
7806
|
|
|
7564
7807
|
// src/schemas/application.ts
|
|
7565
|
-
var
|
|
7566
|
-
var FieldTypeSchema =
|
|
7808
|
+
var import_zod24 = require("zod");
|
|
7809
|
+
var FieldTypeSchema = import_zod24.z.enum([
|
|
7567
7810
|
"text",
|
|
7568
7811
|
"numeric",
|
|
7569
7812
|
"currency",
|
|
@@ -7572,223 +7815,223 @@ var FieldTypeSchema = import_zod23.z.enum([
|
|
|
7572
7815
|
"table",
|
|
7573
7816
|
"declaration"
|
|
7574
7817
|
]);
|
|
7575
|
-
var ApplicationFieldSchema =
|
|
7576
|
-
id:
|
|
7577
|
-
label:
|
|
7578
|
-
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(),
|
|
7579
7822
|
fieldType: FieldTypeSchema,
|
|
7580
|
-
required:
|
|
7581
|
-
options:
|
|
7582
|
-
columns:
|
|
7583
|
-
requiresExplanationIfYes:
|
|
7584
|
-
condition:
|
|
7585
|
-
dependsOn:
|
|
7586
|
-
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()
|
|
7587
7830
|
}).optional(),
|
|
7588
|
-
value:
|
|
7589
|
-
source:
|
|
7590
|
-
confidence:
|
|
7591
|
-
sourceSpanIds:
|
|
7592
|
-
userSourceSpanIds:
|
|
7593
|
-
pageNumber:
|
|
7594
|
-
fieldAnchorId:
|
|
7595
|
-
acroFormName:
|
|
7596
|
-
validationStatus:
|
|
7597
|
-
});
|
|
7598
|
-
var ApplicationQuestionConditionSchema =
|
|
7599
|
-
dependsOn:
|
|
7600
|
-
operator:
|
|
7601
|
-
value:
|
|
7602
|
-
whenValue:
|
|
7603
|
-
values:
|
|
7604
|
-
});
|
|
7605
|
-
var ApplicationRepeatSchema =
|
|
7606
|
-
min:
|
|
7607
|
-
max:
|
|
7608
|
-
label:
|
|
7609
|
-
});
|
|
7610
|
-
var ApplicationQuestionNodeSchema =
|
|
7611
|
-
() =>
|
|
7612
|
-
id:
|
|
7613
|
-
nodeType:
|
|
7614
|
-
fieldId:
|
|
7615
|
-
fieldPath:
|
|
7616
|
-
parentId:
|
|
7617
|
-
order:
|
|
7618
|
-
label:
|
|
7619
|
-
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(),
|
|
7620
7863
|
fieldType: FieldTypeSchema.optional(),
|
|
7621
|
-
required:
|
|
7622
|
-
prompt:
|
|
7623
|
-
options:
|
|
7624
|
-
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(),
|
|
7625
7868
|
condition: ApplicationQuestionConditionSchema.optional(),
|
|
7626
7869
|
repeat: ApplicationRepeatSchema.optional(),
|
|
7627
|
-
children:
|
|
7870
|
+
children: import_zod24.z.array(ApplicationQuestionNodeSchema).optional()
|
|
7628
7871
|
})
|
|
7629
7872
|
);
|
|
7630
|
-
var ApplicationQuestionGraphSchema =
|
|
7631
|
-
id:
|
|
7632
|
-
version:
|
|
7633
|
-
title:
|
|
7634
|
-
applicationType:
|
|
7635
|
-
source:
|
|
7636
|
-
rootNodeIds:
|
|
7637
|
-
nodes:
|
|
7638
|
-
});
|
|
7639
|
-
var ApplicationTemplateSchema =
|
|
7640
|
-
id:
|
|
7641
|
-
version:
|
|
7642
|
-
title:
|
|
7643
|
-
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(),
|
|
7644
7887
|
questionGraph: ApplicationQuestionGraphSchema,
|
|
7645
|
-
fields:
|
|
7646
|
-
});
|
|
7647
|
-
var ApplicationClassifyResultSchema = import_zod23.z.object({
|
|
7648
|
-
isApplication: import_zod23.z.boolean(),
|
|
7649
|
-
confidence: import_zod23.z.number().min(0).max(1),
|
|
7650
|
-
applicationType: import_zod23.z.string().nullable()
|
|
7651
|
-
});
|
|
7652
|
-
var FieldExtractionResultSchema = import_zod23.z.object({
|
|
7653
|
-
fields: import_zod23.z.array(ApplicationFieldSchema)
|
|
7654
|
-
});
|
|
7655
|
-
var AutoFillMatchSchema = import_zod23.z.object({
|
|
7656
|
-
fieldId: import_zod23.z.string(),
|
|
7657
|
-
value: import_zod23.z.string(),
|
|
7658
|
-
confidence: import_zod23.z.enum(["confirmed"]),
|
|
7659
|
-
contextKey: import_zod23.z.string()
|
|
7660
|
-
});
|
|
7661
|
-
var AutoFillResultSchema = import_zod23.z.object({
|
|
7662
|
-
matches: import_zod23.z.array(AutoFillMatchSchema)
|
|
7663
|
-
});
|
|
7664
|
-
var QuestionBatchResultSchema = import_zod23.z.object({
|
|
7665
|
-
batches: import_zod23.z.array(import_zod23.z.array(import_zod23.z.string()).describe("Array of field IDs in this batch"))
|
|
7666
|
-
});
|
|
7667
|
-
var LookupRequestSchema = import_zod23.z.object({
|
|
7668
|
-
type: import_zod23.z.string().describe("Type of lookup: 'records', 'website', 'policy'"),
|
|
7669
|
-
description: import_zod23.z.string(),
|
|
7670
|
-
url: import_zod23.z.string().optional(),
|
|
7671
|
-
targetFieldIds: import_zod23.z.array(import_zod23.z.string())
|
|
7672
|
-
});
|
|
7673
|
-
var ReplyIntentSchema = import_zod23.z.object({
|
|
7674
|
-
primaryIntent: import_zod23.z.enum(["answers_only", "question", "lookup_request", "mixed"]),
|
|
7675
|
-
hasAnswers: import_zod23.z.boolean(),
|
|
7676
|
-
questionText: import_zod23.z.string().optional(),
|
|
7677
|
-
questionFieldIds: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
7678
|
-
lookupRequests: import_zod23.z.array(LookupRequestSchema).optional()
|
|
7679
|
-
});
|
|
7680
|
-
var ParsedAnswerSchema = import_zod23.z.object({
|
|
7681
|
-
fieldId: import_zod23.z.string(),
|
|
7682
|
-
value: import_zod23.z.string(),
|
|
7683
|
-
explanation: import_zod23.z.string().optional()
|
|
7684
|
-
});
|
|
7685
|
-
var AnswerParsingResultSchema = import_zod23.z.object({
|
|
7686
|
-
answers: import_zod23.z.array(ParsedAnswerSchema),
|
|
7687
|
-
unanswered: import_zod23.z.array(import_zod23.z.string()).describe("Field IDs that were not answered")
|
|
7888
|
+
fields: import_zod24.z.array(ApplicationFieldSchema).optional()
|
|
7688
7889
|
});
|
|
7689
|
-
var
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
});
|
|
7709
|
-
var
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
var
|
|
7716
|
-
|
|
7717
|
-
|
|
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(),
|
|
7718
7961
|
severity: QualitySeveritySchema,
|
|
7719
|
-
message:
|
|
7720
|
-
fieldId:
|
|
7962
|
+
message: import_zod24.z.string(),
|
|
7963
|
+
fieldId: import_zod24.z.string().optional()
|
|
7721
7964
|
});
|
|
7722
|
-
var ApplicationQualityRoundSchema =
|
|
7723
|
-
round:
|
|
7724
|
-
kind:
|
|
7965
|
+
var ApplicationQualityRoundSchema = import_zod24.z.object({
|
|
7966
|
+
round: import_zod24.z.number(),
|
|
7967
|
+
kind: import_zod24.z.string(),
|
|
7725
7968
|
status: QualityGateStatusSchema,
|
|
7726
|
-
summary:
|
|
7969
|
+
summary: import_zod24.z.string().optional()
|
|
7727
7970
|
});
|
|
7728
|
-
var ApplicationQualityArtifactSchema =
|
|
7729
|
-
kind:
|
|
7730
|
-
label:
|
|
7731
|
-
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()
|
|
7732
7975
|
});
|
|
7733
|
-
var ApplicationEmailReviewSchema =
|
|
7734
|
-
issues:
|
|
7976
|
+
var ApplicationEmailReviewSchema = import_zod24.z.object({
|
|
7977
|
+
issues: import_zod24.z.array(ApplicationQualityIssueSchema),
|
|
7735
7978
|
qualityGateStatus: QualityGateStatusSchema
|
|
7736
7979
|
});
|
|
7737
|
-
var ApplicationQualityReportSchema =
|
|
7738
|
-
issues:
|
|
7739
|
-
rounds:
|
|
7740
|
-
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(),
|
|
7741
7984
|
emailReview: ApplicationEmailReviewSchema.optional(),
|
|
7742
7985
|
qualityGateStatus: QualityGateStatusSchema
|
|
7743
7986
|
});
|
|
7744
|
-
var ApplicationContextProposalSchema =
|
|
7745
|
-
id:
|
|
7746
|
-
fieldId:
|
|
7747
|
-
key:
|
|
7748
|
-
value:
|
|
7749
|
-
category:
|
|
7750
|
-
source:
|
|
7751
|
-
confidence:
|
|
7752
|
-
sourceSpanIds:
|
|
7753
|
-
userSourceSpanIds:
|
|
7754
|
-
});
|
|
7755
|
-
var ApplicationPacketAnswerSchema =
|
|
7756
|
-
fieldId:
|
|
7757
|
-
label:
|
|
7758
|
-
section:
|
|
7759
|
-
value:
|
|
7760
|
-
source:
|
|
7761
|
-
confidence:
|
|
7762
|
-
sourceSpanIds:
|
|
7763
|
-
userSourceSpanIds:
|
|
7764
|
-
});
|
|
7765
|
-
var ApplicationPacketSchema =
|
|
7766
|
-
id:
|
|
7767
|
-
applicationId:
|
|
7768
|
-
title:
|
|
7769
|
-
status:
|
|
7770
|
-
answers:
|
|
7771
|
-
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()),
|
|
7772
8015
|
qualityReport: ApplicationQualityReportSchema,
|
|
7773
|
-
submissionNotes:
|
|
7774
|
-
createdAt:
|
|
7775
|
-
});
|
|
7776
|
-
var ApplicationStateSchema =
|
|
7777
|
-
id:
|
|
7778
|
-
pdfBase64:
|
|
7779
|
-
templateId:
|
|
7780
|
-
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(),
|
|
7781
8024
|
templateSnapshot: ApplicationTemplateSchema.optional(),
|
|
7782
|
-
title:
|
|
7783
|
-
applicationType:
|
|
8025
|
+
title: import_zod24.z.string().optional(),
|
|
8026
|
+
applicationType: import_zod24.z.string().nullable().optional(),
|
|
7784
8027
|
questionGraph: ApplicationQuestionGraphSchema.optional(),
|
|
7785
|
-
fields:
|
|
7786
|
-
batches:
|
|
7787
|
-
currentBatchIndex:
|
|
7788
|
-
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(),
|
|
7789
8032
|
packet: ApplicationPacketSchema.optional(),
|
|
7790
8033
|
qualityReport: ApplicationQualityReportSchema.optional(),
|
|
7791
|
-
status:
|
|
8034
|
+
status: import_zod24.z.enum([
|
|
7792
8035
|
"classifying",
|
|
7793
8036
|
"extracting",
|
|
7794
8037
|
"auto_filling",
|
|
@@ -7802,8 +8045,8 @@ var ApplicationStateSchema = import_zod23.z.object({
|
|
|
7802
8045
|
"cancelled",
|
|
7803
8046
|
"complete"
|
|
7804
8047
|
]),
|
|
7805
|
-
createdAt:
|
|
7806
|
-
updatedAt:
|
|
8048
|
+
createdAt: import_zod24.z.number(),
|
|
8049
|
+
updatedAt: import_zod24.z.number()
|
|
7807
8050
|
});
|
|
7808
8051
|
|
|
7809
8052
|
// src/application/agents/classifier.ts
|
|
@@ -9537,106 +9780,106 @@ Respond with the final answer, deduplicated citations array, overall confidence
|
|
|
9537
9780
|
}
|
|
9538
9781
|
|
|
9539
9782
|
// src/schemas/query.ts
|
|
9540
|
-
var
|
|
9541
|
-
var QueryIntentSchema =
|
|
9783
|
+
var import_zod25 = require("zod");
|
|
9784
|
+
var QueryIntentSchema = import_zod25.z.enum([
|
|
9542
9785
|
"policy_question",
|
|
9543
9786
|
"coverage_comparison",
|
|
9544
9787
|
"document_search",
|
|
9545
9788
|
"claims_inquiry",
|
|
9546
9789
|
"general_knowledge"
|
|
9547
9790
|
]);
|
|
9548
|
-
var QueryAttachmentKindSchema =
|
|
9549
|
-
var QueryAttachmentSchema =
|
|
9550
|
-
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"),
|
|
9551
9794
|
kind: QueryAttachmentKindSchema,
|
|
9552
|
-
name:
|
|
9553
|
-
mimeType:
|
|
9554
|
-
base64:
|
|
9555
|
-
text:
|
|
9556
|
-
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")
|
|
9557
9800
|
});
|
|
9558
|
-
var QueryRetrievalModeSchema =
|
|
9801
|
+
var QueryRetrievalModeSchema = import_zod25.z.enum([
|
|
9559
9802
|
"graph_only",
|
|
9560
9803
|
"source_rag",
|
|
9561
9804
|
"long_context",
|
|
9562
9805
|
"hybrid"
|
|
9563
9806
|
]);
|
|
9564
|
-
var SubQuestionSchema =
|
|
9565
|
-
question:
|
|
9807
|
+
var SubQuestionSchema = import_zod25.z.object({
|
|
9808
|
+
question: import_zod25.z.string().describe("Atomic sub-question to retrieve and answer independently"),
|
|
9566
9809
|
intent: QueryIntentSchema,
|
|
9567
|
-
chunkTypes:
|
|
9568
|
-
documentFilters:
|
|
9569
|
-
type:
|
|
9570
|
-
carrier:
|
|
9571
|
-
insuredName:
|
|
9572
|
-
policyNumber:
|
|
9573
|
-
quoteNumber:
|
|
9574
|
-
|
|
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")
|
|
9575
9818
|
}).optional().describe("Structured filters to narrow document lookup")
|
|
9576
9819
|
});
|
|
9577
|
-
var QueryClassifyResultSchema =
|
|
9820
|
+
var QueryClassifyResultSchema = import_zod25.z.object({
|
|
9578
9821
|
intent: QueryIntentSchema,
|
|
9579
|
-
subQuestions:
|
|
9580
|
-
requiresDocumentLookup:
|
|
9581
|
-
requiresChunkSearch:
|
|
9582
|
-
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"),
|
|
9583
9826
|
retrievalMode: QueryRetrievalModeSchema.optional().describe("Preferred retrieval strategy for the query when source-span retrieval is available")
|
|
9584
9827
|
});
|
|
9585
|
-
var EvidenceItemSchema =
|
|
9586
|
-
source:
|
|
9587
|
-
chunkId:
|
|
9588
|
-
sourceNodeId:
|
|
9589
|
-
sourceSpanId:
|
|
9590
|
-
documentId:
|
|
9591
|
-
turnId:
|
|
9592
|
-
attachmentId:
|
|
9593
|
-
text:
|
|
9594
|
-
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),
|
|
9595
9838
|
retrievalMode: QueryRetrievalModeSchema.optional(),
|
|
9596
9839
|
sourceLocation: SourceSpanLocationSchema.optional(),
|
|
9597
|
-
metadata:
|
|
9598
|
-
});
|
|
9599
|
-
var AttachmentInterpretationSchema =
|
|
9600
|
-
summary:
|
|
9601
|
-
extractedFacts:
|
|
9602
|
-
recommendedFocus:
|
|
9603
|
-
confidence:
|
|
9604
|
-
});
|
|
9605
|
-
var RetrievalResultSchema =
|
|
9606
|
-
subQuestion:
|
|
9607
|
-
evidence:
|
|
9608
|
-
});
|
|
9609
|
-
var CitationSchema =
|
|
9610
|
-
index:
|
|
9611
|
-
chunkId:
|
|
9612
|
-
sourceNodeId:
|
|
9613
|
-
sourceSpanId:
|
|
9614
|
-
documentId:
|
|
9615
|
-
documentType:
|
|
9616
|
-
field:
|
|
9617
|
-
quote:
|
|
9618
|
-
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),
|
|
9619
9862
|
retrievalMode: QueryRetrievalModeSchema.optional(),
|
|
9620
9863
|
sourceLocation: SourceSpanLocationSchema.optional()
|
|
9621
9864
|
});
|
|
9622
|
-
var SubAnswerSchema =
|
|
9623
|
-
subQuestion:
|
|
9624
|
-
answer:
|
|
9625
|
-
citations:
|
|
9626
|
-
confidence:
|
|
9627
|
-
needsMoreContext:
|
|
9628
|
-
});
|
|
9629
|
-
var VerifyResultSchema =
|
|
9630
|
-
approved:
|
|
9631
|
-
issues:
|
|
9632
|
-
retrySubQuestions:
|
|
9633
|
-
});
|
|
9634
|
-
var QueryResultSchema =
|
|
9635
|
-
answer:
|
|
9636
|
-
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),
|
|
9637
9880
|
intent: QueryIntentSchema,
|
|
9638
|
-
confidence:
|
|
9639
|
-
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")
|
|
9640
9883
|
});
|
|
9641
9884
|
|
|
9642
9885
|
// src/query/retriever.ts
|
|
@@ -10703,7 +10946,7 @@ ${sa.answer}`).join("\n\n"),
|
|
|
10703
10946
|
}
|
|
10704
10947
|
|
|
10705
10948
|
// src/pce/index.ts
|
|
10706
|
-
var
|
|
10949
|
+
var import_zod26 = require("zod");
|
|
10707
10950
|
|
|
10708
10951
|
// src/prompts/pce/index.ts
|
|
10709
10952
|
function buildPceNormalizePrompt(input) {
|
|
@@ -10737,11 +10980,11 @@ ${input.openQuestions.map((question) => `- ${question.id}${question.fieldPath ?
|
|
|
10737
10980
|
}
|
|
10738
10981
|
|
|
10739
10982
|
// src/pce/index.ts
|
|
10740
|
-
var ReplyAnswersSchema =
|
|
10741
|
-
answers:
|
|
10742
|
-
questionId:
|
|
10743
|
-
fieldPath:
|
|
10744
|
-
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()
|
|
10745
10988
|
}))
|
|
10746
10989
|
});
|
|
10747
10990
|
function createPceAgent(config = {}) {
|
|
@@ -11470,7 +11713,7 @@ var COI_GENERATION_TOOL = {
|
|
|
11470
11713
|
};
|
|
11471
11714
|
var COVERAGE_COMPARISON_TOOL = {
|
|
11472
11715
|
name: "coverage_comparison",
|
|
11473
|
-
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.",
|
|
11474
11717
|
input_schema: {
|
|
11475
11718
|
type: "object",
|
|
11476
11719
|
properties: {
|
|
@@ -11479,10 +11722,10 @@ var COVERAGE_COMPARISON_TOOL = {
|
|
|
11479
11722
|
items: { type: "string" },
|
|
11480
11723
|
description: "Array of document IDs (policies or quotes) to compare."
|
|
11481
11724
|
},
|
|
11482
|
-
|
|
11725
|
+
linesOfBusiness: {
|
|
11483
11726
|
type: "array",
|
|
11484
11727
|
items: { type: "string" },
|
|
11485
|
-
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."
|
|
11486
11729
|
}
|
|
11487
11730
|
},
|
|
11488
11731
|
required: ["documentIds"]
|
|
@@ -11495,23 +11738,23 @@ var AGENT_TOOLS = [
|
|
|
11495
11738
|
];
|
|
11496
11739
|
|
|
11497
11740
|
// src/prompts/extractors/carrier-info.ts
|
|
11498
|
-
var
|
|
11499
|
-
var CarrierInfoSchema =
|
|
11500
|
-
carrierName:
|
|
11501
|
-
carrierLegalName:
|
|
11502
|
-
naicNumber:
|
|
11503
|
-
amBestRating:
|
|
11504
|
-
admittedStatus:
|
|
11505
|
-
mga:
|
|
11506
|
-
underwriter:
|
|
11507
|
-
brokerAgency:
|
|
11508
|
-
brokerContactName:
|
|
11509
|
-
brokerLicenseNumber:
|
|
11510
|
-
policyNumber:
|
|
11511
|
-
effectiveDate:
|
|
11512
|
-
expirationDate:
|
|
11513
|
-
quoteNumber:
|
|
11514
|
-
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)")
|
|
11515
11758
|
});
|
|
11516
11759
|
function buildCarrierInfoPrompt() {
|
|
11517
11760
|
return `You are an expert insurance document analyst. Extract carrier and policy identification information from this document.
|
|
@@ -11534,21 +11777,21 @@ Return JSON only.`;
|
|
|
11534
11777
|
}
|
|
11535
11778
|
|
|
11536
11779
|
// src/prompts/extractors/named-insured.ts
|
|
11537
|
-
var
|
|
11538
|
-
var AdditionalNamedInsuredSchema =
|
|
11539
|
-
name:
|
|
11540
|
-
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"),
|
|
11541
11784
|
address: SourceBackedAddressSchema.optional()
|
|
11542
11785
|
}).merge(SourceProvenanceSchema);
|
|
11543
|
-
var ScheduledPartySchema =
|
|
11544
|
-
name:
|
|
11786
|
+
var ScheduledPartySchema = import_zod28.z.object({
|
|
11787
|
+
name: import_zod28.z.string(),
|
|
11545
11788
|
address: SourceBackedAddressSchema.optional()
|
|
11546
11789
|
}).merge(SourceProvenanceSchema);
|
|
11547
|
-
var NamedInsuredSchema2 =
|
|
11548
|
-
insuredName:
|
|
11549
|
-
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"),
|
|
11550
11793
|
insuredAddress: SourceBackedAddressSchema.optional().describe("Primary insured mailing address"),
|
|
11551
|
-
insuredEntityType:
|
|
11794
|
+
insuredEntityType: import_zod28.z.enum([
|
|
11552
11795
|
"corporation",
|
|
11553
11796
|
"llc",
|
|
11554
11797
|
"partnership",
|
|
@@ -11561,12 +11804,12 @@ var NamedInsuredSchema2 = import_zod27.z.object({
|
|
|
11561
11804
|
"married_couple",
|
|
11562
11805
|
"other"
|
|
11563
11806
|
]).optional().describe("Legal entity type of the insured"),
|
|
11564
|
-
insuredFein:
|
|
11565
|
-
insuredSicCode:
|
|
11566
|
-
insuredNaicsCode:
|
|
11567
|
-
additionalNamedInsureds:
|
|
11568
|
-
lossPayees:
|
|
11569
|
-
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")
|
|
11570
11813
|
});
|
|
11571
11814
|
function buildNamedInsuredPrompt() {
|
|
11572
11815
|
return `You are an expert insurance document analyst. Extract all named insured information from this document.
|
|
@@ -11593,14 +11836,14 @@ Return JSON only.`;
|
|
|
11593
11836
|
}
|
|
11594
11837
|
|
|
11595
11838
|
// src/prompts/extractors/coverage-limits.ts
|
|
11596
|
-
var
|
|
11839
|
+
var import_zod29 = require("zod");
|
|
11597
11840
|
var ExtractorCoverageSchema = CoverageSchema.extend({
|
|
11598
|
-
coverageCode:
|
|
11841
|
+
coverageCode: import_zod29.z.string().optional().describe("Coverage code or class code")
|
|
11599
11842
|
});
|
|
11600
|
-
var CoverageLimitsSchema =
|
|
11601
|
-
coverages:
|
|
11602
|
-
coverageForm:
|
|
11603
|
-
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)")
|
|
11604
11847
|
});
|
|
11605
11848
|
function buildCoverageLimitsPrompt() {
|
|
11606
11849
|
return `You are an expert insurance document analyst. Extract all coverage limits and deductibles from this document.
|
|
@@ -11642,14 +11885,14 @@ Return JSON only.`;
|
|
|
11642
11885
|
}
|
|
11643
11886
|
|
|
11644
11887
|
// src/prompts/extractors/endorsements.ts
|
|
11645
|
-
var
|
|
11646
|
-
var EndorsementsSchema =
|
|
11647
|
-
endorsements:
|
|
11648
|
-
|
|
11649
|
-
formNumber:
|
|
11650
|
-
editionDate:
|
|
11651
|
-
title:
|
|
11652
|
-
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([
|
|
11653
11896
|
"additional_insured",
|
|
11654
11897
|
"waiver_of_subrogation",
|
|
11655
11898
|
"primary_noncontributory",
|
|
@@ -11669,12 +11912,12 @@ var EndorsementsSchema = import_zod29.z.object({
|
|
|
11669
11912
|
"territorial_extension",
|
|
11670
11913
|
"other"
|
|
11671
11914
|
]).describe("Endorsement type classification"),
|
|
11672
|
-
effectiveDate:
|
|
11673
|
-
affectedCoverageParts:
|
|
11674
|
-
namedParties:
|
|
11675
|
-
|
|
11676
|
-
name:
|
|
11677
|
-
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([
|
|
11678
11921
|
"additional_insured",
|
|
11679
11922
|
"loss_payee",
|
|
11680
11923
|
"mortgage_holder",
|
|
@@ -11683,18 +11926,18 @@ var EndorsementsSchema = import_zod29.z.object({
|
|
|
11683
11926
|
"designated_person",
|
|
11684
11927
|
"other"
|
|
11685
11928
|
]).describe("Party role"),
|
|
11686
|
-
relationship:
|
|
11687
|
-
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")
|
|
11688
11931
|
})
|
|
11689
11932
|
).optional().describe("Named parties (additional insureds, loss payees, etc.)"),
|
|
11690
|
-
keyTerms:
|
|
11691
|
-
premiumImpact:
|
|
11692
|
-
excerpt:
|
|
11693
|
-
content:
|
|
11694
|
-
pageStart:
|
|
11695
|
-
pageEnd:
|
|
11696
|
-
sourceSpanIds:
|
|
11697
|
-
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")
|
|
11698
11941
|
})
|
|
11699
11942
|
).describe("All endorsements found in the document")
|
|
11700
11943
|
});
|
|
@@ -11732,20 +11975,20 @@ Return JSON only.`;
|
|
|
11732
11975
|
}
|
|
11733
11976
|
|
|
11734
11977
|
// src/prompts/extractors/exclusions.ts
|
|
11735
|
-
var
|
|
11736
|
-
var ExclusionsSchema =
|
|
11737
|
-
exclusions:
|
|
11738
|
-
|
|
11739
|
-
name:
|
|
11740
|
-
formNumber:
|
|
11741
|
-
excludedPerils:
|
|
11742
|
-
isAbsolute:
|
|
11743
|
-
exceptions:
|
|
11744
|
-
buybackAvailable:
|
|
11745
|
-
buybackEndorsement:
|
|
11746
|
-
appliesTo:
|
|
11747
|
-
content:
|
|
11748
|
-
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")
|
|
11749
11992
|
})
|
|
11750
11993
|
).describe("All exclusions found in the document")
|
|
11751
11994
|
});
|
|
@@ -11760,7 +12003,7 @@ For EACH exclusion, extract:
|
|
|
11760
12003
|
- exceptions: any exceptions to the exclusion (things still covered despite the exclusion)
|
|
11761
12004
|
- buybackAvailable: whether coverage can be purchased back via endorsement
|
|
11762
12005
|
- buybackEndorsement: the form number of the buyback endorsement if known
|
|
11763
|
-
- appliesTo: which
|
|
12006
|
+
- appliesTo: which lines of business or coverages this exclusion applies to (as an array)
|
|
11764
12007
|
- content: full verbatim exclusion text \u2014 REQUIRED
|
|
11765
12008
|
- pageNumber: page number where the exclusion appears
|
|
11766
12009
|
|
|
@@ -11781,12 +12024,12 @@ Return JSON only.`;
|
|
|
11781
12024
|
}
|
|
11782
12025
|
|
|
11783
12026
|
// src/prompts/extractors/conditions.ts
|
|
11784
|
-
var
|
|
11785
|
-
var ConditionsSchema =
|
|
11786
|
-
conditions:
|
|
11787
|
-
|
|
11788
|
-
name:
|
|
11789
|
-
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([
|
|
11790
12033
|
"duties_after_loss",
|
|
11791
12034
|
"notice_requirements",
|
|
11792
12035
|
"other_insurance",
|
|
@@ -11805,14 +12048,14 @@ var ConditionsSchema = import_zod31.z.object({
|
|
|
11805
12048
|
"separation_of_insureds",
|
|
11806
12049
|
"other"
|
|
11807
12050
|
]).describe("Condition category"),
|
|
11808
|
-
content:
|
|
11809
|
-
keyValues:
|
|
11810
|
-
|
|
11811
|
-
key:
|
|
11812
|
-
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')")
|
|
11813
12056
|
})
|
|
11814
12057
|
).optional().describe("Key values extracted from the condition (notice periods, deadlines, etc.)"),
|
|
11815
|
-
pageNumber:
|
|
12058
|
+
pageNumber: import_zod32.z.number().optional().describe("Page number where condition appears")
|
|
11816
12059
|
})
|
|
11817
12060
|
).describe("All policy conditions found in the document")
|
|
11818
12061
|
});
|
|
@@ -11850,34 +12093,34 @@ Return JSON only.`;
|
|
|
11850
12093
|
}
|
|
11851
12094
|
|
|
11852
12095
|
// src/prompts/extractors/premium-breakdown.ts
|
|
11853
|
-
var
|
|
11854
|
-
var PremiumBreakdownSchema =
|
|
11855
|
-
premium:
|
|
11856
|
-
premiumAmount:
|
|
11857
|
-
totalCost:
|
|
11858
|
-
totalCostAmount:
|
|
11859
|
-
premiumBreakdown:
|
|
11860
|
-
|
|
11861
|
-
line:
|
|
11862
|
-
amount:
|
|
11863
|
-
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")
|
|
11864
12107
|
})
|
|
11865
12108
|
).optional().describe("Per-coverage-line premium breakdown"),
|
|
11866
|
-
taxesAndFees:
|
|
11867
|
-
|
|
11868
|
-
name:
|
|
11869
|
-
amount:
|
|
11870
|
-
amountValue:
|
|
11871
|
-
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")
|
|
11872
12115
|
})
|
|
11873
12116
|
).optional().describe("Taxes, fees, surcharges, and assessments"),
|
|
11874
|
-
minimumPremium:
|
|
11875
|
-
minimumPremiumAmount:
|
|
11876
|
-
depositPremium:
|
|
11877
|
-
depositPremiumAmount:
|
|
11878
|
-
paymentPlan:
|
|
11879
|
-
auditType:
|
|
11880
|
-
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")
|
|
11881
12124
|
});
|
|
11882
12125
|
function buildPremiumBreakdownPrompt() {
|
|
11883
12126
|
return `You are an expert insurance document analyst. Extract all premium and cost information from this document.
|
|
@@ -11899,14 +12142,14 @@ Return JSON only.`;
|
|
|
11899
12142
|
}
|
|
11900
12143
|
|
|
11901
12144
|
// src/prompts/extractors/declarations.ts
|
|
11902
|
-
var
|
|
11903
|
-
var DeclarationsFieldSchema =
|
|
11904
|
-
field:
|
|
11905
|
-
value:
|
|
11906
|
-
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')")
|
|
11907
12150
|
});
|
|
11908
|
-
var DeclarationsExtractSchema =
|
|
11909
|
-
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.")
|
|
11910
12153
|
});
|
|
11911
12154
|
function buildDeclarationsPrompt() {
|
|
11912
12155
|
return `You are an expert insurance document analyst. Extract all declarations page data from this document into a flexible key-value structure.
|
|
@@ -11946,21 +12189,21 @@ Preserve original values exactly as they appear. Return JSON only.`;
|
|
|
11946
12189
|
}
|
|
11947
12190
|
|
|
11948
12191
|
// src/prompts/extractors/loss-history.ts
|
|
11949
|
-
var
|
|
11950
|
-
var LossHistorySchema =
|
|
11951
|
-
lossSummary:
|
|
11952
|
-
individualClaims:
|
|
11953
|
-
|
|
11954
|
-
date:
|
|
11955
|
-
type:
|
|
11956
|
-
description:
|
|
11957
|
-
amountPaid:
|
|
11958
|
-
amountReserved:
|
|
11959
|
-
status:
|
|
11960
|
-
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")
|
|
11961
12204
|
})
|
|
11962
12205
|
).optional().describe("Individual claim records"),
|
|
11963
|
-
experienceMod:
|
|
12206
|
+
experienceMod: import_zod35.z.string().optional().describe("Experience modification factor for workers comp, e.g. '0.85'")
|
|
11964
12207
|
});
|
|
11965
12208
|
function buildLossHistoryPrompt() {
|
|
11966
12209
|
return `You are an expert insurance document analyst. Extract all loss history and claims information from this document.
|
|
@@ -11977,21 +12220,21 @@ Return JSON only.`;
|
|
|
11977
12220
|
}
|
|
11978
12221
|
|
|
11979
12222
|
// src/prompts/extractors/sections.ts
|
|
11980
|
-
var
|
|
11981
|
-
var SubsectionSchema2 =
|
|
11982
|
-
title:
|
|
11983
|
-
sectionNumber:
|
|
11984
|
-
pageNumber:
|
|
11985
|
-
excerpt:
|
|
11986
|
-
content:
|
|
11987
|
-
sourceSpanIds:
|
|
11988
|
-
sourceTextHash:
|
|
11989
|
-
});
|
|
11990
|
-
var SectionsSchema =
|
|
11991
|
-
sections:
|
|
11992
|
-
|
|
11993
|
-
title:
|
|
11994
|
-
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([
|
|
11995
12238
|
"declarations",
|
|
11996
12239
|
"insuring_agreement",
|
|
11997
12240
|
"policy_form",
|
|
@@ -12006,13 +12249,13 @@ var SectionsSchema = import_zod35.z.object({
|
|
|
12006
12249
|
"regulatory",
|
|
12007
12250
|
"other"
|
|
12008
12251
|
]).describe("Section type classification"),
|
|
12009
|
-
excerpt:
|
|
12010
|
-
content:
|
|
12011
|
-
pageStart:
|
|
12012
|
-
pageEnd:
|
|
12013
|
-
sourceSpanIds:
|
|
12014
|
-
sourceTextHash:
|
|
12015
|
-
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")
|
|
12016
12259
|
})
|
|
12017
12260
|
).describe("All document sections")
|
|
12018
12261
|
});
|
|
@@ -12046,20 +12289,20 @@ Return JSON only.`;
|
|
|
12046
12289
|
}
|
|
12047
12290
|
|
|
12048
12291
|
// src/prompts/extractors/supplementary.ts
|
|
12049
|
-
var
|
|
12050
|
-
var AuxiliaryFactSchema2 =
|
|
12051
|
-
key:
|
|
12052
|
-
value:
|
|
12053
|
-
subject:
|
|
12054
|
-
context:
|
|
12055
|
-
});
|
|
12056
|
-
var SupplementarySchema =
|
|
12057
|
-
regulatoryContacts:
|
|
12058
|
-
claimsContacts:
|
|
12059
|
-
thirdPartyAdministrators:
|
|
12060
|
-
cancellationNoticeDays:
|
|
12061
|
-
nonrenewalNoticeDays:
|
|
12062
|
-
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")
|
|
12063
12306
|
});
|
|
12064
12307
|
function buildSupplementaryPrompt(alreadyExtractedSummary) {
|
|
12065
12308
|
const exclusionBlock = alreadyExtractedSummary ? `
|
|
@@ -12099,17 +12342,17 @@ Return JSON only.`;
|
|
|
12099
12342
|
}
|
|
12100
12343
|
|
|
12101
12344
|
// src/prompts/extractors/definitions.ts
|
|
12102
|
-
var
|
|
12103
|
-
var DefinitionsSchema =
|
|
12104
|
-
definitions:
|
|
12105
|
-
|
|
12106
|
-
term:
|
|
12107
|
-
definition:
|
|
12108
|
-
pageNumber:
|
|
12109
|
-
formNumber:
|
|
12110
|
-
formTitle:
|
|
12111
|
-
sectionRef:
|
|
12112
|
-
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")
|
|
12113
12356
|
})
|
|
12114
12357
|
).describe("All substantive insurance definitions found in the document")
|
|
12115
12358
|
});
|
|
@@ -12143,22 +12386,22 @@ Return JSON only.`;
|
|
|
12143
12386
|
}
|
|
12144
12387
|
|
|
12145
12388
|
// src/prompts/extractors/covered-reasons.ts
|
|
12146
|
-
var
|
|
12147
|
-
var CoveredReasonsSchema =
|
|
12148
|
-
coveredReasons:
|
|
12149
|
-
|
|
12150
|
-
coverageName:
|
|
12151
|
-
reasonNumber:
|
|
12152
|
-
title:
|
|
12153
|
-
content:
|
|
12154
|
-
conditions:
|
|
12155
|
-
exceptions:
|
|
12156
|
-
appliesTo:
|
|
12157
|
-
pageNumber:
|
|
12158
|
-
formNumber:
|
|
12159
|
-
formTitle:
|
|
12160
|
-
sectionRef:
|
|
12161
|
-
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")
|
|
12162
12405
|
})
|
|
12163
12406
|
).describe("Covered causes, perils, triggers, or reasons that affirmatively grant coverage")
|
|
12164
12407
|
});
|
|
@@ -13002,10 +13245,13 @@ function getTemplate(policyType) {
|
|
|
13002
13245
|
}
|
|
13003
13246
|
// Annotate the CommonJS export names for ESM import in node:
|
|
13004
13247
|
0 && (module.exports = {
|
|
13248
|
+
ACORD_LOB_CODES,
|
|
13249
|
+
ACORD_LOB_LABELS,
|
|
13005
13250
|
ADMITTED_STATUSES,
|
|
13006
13251
|
AGENT_TOOLS,
|
|
13007
13252
|
APPLICATION_CLASSIFY_PROMPT,
|
|
13008
13253
|
AUDIT_TYPES,
|
|
13254
|
+
AcordLobCodeSchema,
|
|
13009
13255
|
AcroFormMappingSchema,
|
|
13010
13256
|
AddressSchema,
|
|
13011
13257
|
AdmittedStatusSchema,
|
|
@@ -13098,6 +13344,7 @@ function getTemplate(policyType) {
|
|
|
13098
13344
|
ENDORSEMENT_PARTY_ROLES,
|
|
13099
13345
|
ENDORSEMENT_TYPES,
|
|
13100
13346
|
ENTITY_TYPES,
|
|
13347
|
+
EXCLUDED_ACORD_LOB_CODES,
|
|
13101
13348
|
EarthquakeDeclarationsSchema,
|
|
13102
13349
|
EmployersLiabilityLimitsSchema,
|
|
13103
13350
|
EndorsementPartyRoleSchema,
|
|
@@ -13131,6 +13378,7 @@ function getTemplate(policyType) {
|
|
|
13131
13378
|
InsuredLocationSchema,
|
|
13132
13379
|
InsuredVehicleSchema,
|
|
13133
13380
|
InsurerInfoSchema,
|
|
13381
|
+
LEGACY_POLICY_TYPE_TO_LOB,
|
|
13134
13382
|
LIMIT_TYPES,
|
|
13135
13383
|
LOSS_SETTLEMENTS,
|
|
13136
13384
|
LimitScheduleSchema,
|
|
@@ -13149,11 +13397,11 @@ function getTemplate(policyType) {
|
|
|
13149
13397
|
OperationalEndorsementSupportSchema,
|
|
13150
13398
|
OperationalPartySchema,
|
|
13151
13399
|
PERSONAL_AUTO_USAGES,
|
|
13400
|
+
PERSONAL_LOB_CODES,
|
|
13152
13401
|
PET_SPECIES,
|
|
13153
13402
|
PLATFORM_CONFIGS,
|
|
13154
13403
|
POLICY_SECTION_TYPES,
|
|
13155
13404
|
POLICY_TERM_TYPES,
|
|
13156
|
-
POLICY_TYPES,
|
|
13157
13405
|
ParsedAnswerSchema,
|
|
13158
13406
|
PaymentInstallmentSchema,
|
|
13159
13407
|
PaymentPlanSchema,
|
|
@@ -13180,7 +13428,6 @@ function getTemplate(policyType) {
|
|
|
13180
13428
|
PolicyOperationalProfileSchema,
|
|
13181
13429
|
PolicySectionTypeSchema,
|
|
13182
13430
|
PolicyTermTypeSchema,
|
|
13183
|
-
PolicyTypeSchema,
|
|
13184
13431
|
PremiumLineSchema,
|
|
13185
13432
|
ProducerInfoSchema,
|
|
13186
13433
|
ProfessionalLiabilityDeclarationsSchema,
|
|
@@ -13309,16 +13556,19 @@ function getTemplate(policyType) {
|
|
|
13309
13556
|
getNextApplicationQuestions,
|
|
13310
13557
|
getPdfPageCount,
|
|
13311
13558
|
getTemplate,
|
|
13312
|
-
|
|
13559
|
+
inferLinesOfBusinessFromOperationalCoverages,
|
|
13313
13560
|
isDoclingExtractionInput,
|
|
13314
13561
|
isFileReference,
|
|
13562
|
+
isLobCode,
|
|
13563
|
+
isPersonalLob,
|
|
13564
|
+
lobLabel,
|
|
13315
13565
|
mergeQuestionAnswers,
|
|
13316
13566
|
mergeSourceSpans,
|
|
13317
13567
|
normalizeApplicationQuestionGraph,
|
|
13318
13568
|
normalizeDoclingDocument,
|
|
13319
13569
|
normalizeDocumentSourceTreePaths,
|
|
13320
13570
|
normalizeForMatch,
|
|
13321
|
-
|
|
13571
|
+
normalizeOperationalLinesOfBusiness,
|
|
13322
13572
|
normalizeSourceSpans,
|
|
13323
13573
|
orderSourceEvidence,
|
|
13324
13574
|
overlayTextOnPdf,
|
|
@@ -13329,7 +13579,7 @@ function getTemplate(policyType) {
|
|
|
13329
13579
|
processReply,
|
|
13330
13580
|
proposeContextWrites,
|
|
13331
13581
|
resolveModelBudget,
|
|
13332
|
-
|
|
13582
|
+
resolveOperationalProfileLinesOfBusiness,
|
|
13333
13583
|
safeGenerateObject,
|
|
13334
13584
|
sanitizeNulls,
|
|
13335
13585
|
scoreCaseProposal,
|
|
@@ -13340,6 +13590,7 @@ function getTemplate(policyType) {
|
|
|
13340
13590
|
stablePolicyChangeItemId,
|
|
13341
13591
|
stableStringify,
|
|
13342
13592
|
stripFences,
|
|
13593
|
+
toLobCodes,
|
|
13343
13594
|
toStrictSchema,
|
|
13344
13595
|
validateApplicationPacket,
|
|
13345
13596
|
validateEvidence,
|