@claritylabs/cl-sdk 3.2.12 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -14
- package/dist/application.d.mts +1 -1
- package/dist/application.d.ts +1 -1
- package/dist/application.js +426 -402
- package/dist/application.js.map +1 -1
- package/dist/application.mjs +426 -402
- package/dist/application.mjs.map +1 -1
- package/dist/{index-WjheX6Dt.d.mts → index-Cte-BzHF.d.mts} +356 -259
- package/dist/{index-WjheX6Dt.d.ts → index-Cte-BzHF.d.ts} +356 -259
- package/dist/index.d.mts +93 -85
- package/dist/index.d.ts +93 -85
- package/dist/index.js +2050 -1825
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2037 -1819
- package/dist/index.mjs.map +1 -1
- package/dist/storage-sqlite.d.mts +188 -188
- package/dist/storage-sqlite.d.ts +188 -188
- package/dist/storage-sqlite.js +426 -402
- package/dist/storage-sqlite.js.map +1 -1
- package/dist/storage-sqlite.mjs +426 -402
- package/dist/storage-sqlite.mjs.map +1 -1
- package/package.json +1 -1
package/dist/application.js
CHANGED
|
@@ -1132,8 +1132,291 @@ function isHighValueLookupField(field) {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
|
|
1134
1134
|
// src/source/schemas.ts
|
|
1135
|
+
var import_zod3 = require("zod");
|
|
1136
|
+
|
|
1137
|
+
// src/schemas/lines-of-business.ts
|
|
1135
1138
|
var import_zod2 = require("zod");
|
|
1136
|
-
var
|
|
1139
|
+
var ACORD_LOB_CODES = [
|
|
1140
|
+
"AAPPL",
|
|
1141
|
+
"AGLIA",
|
|
1142
|
+
"AGPP",
|
|
1143
|
+
"AGPR",
|
|
1144
|
+
"AIRC",
|
|
1145
|
+
"AIRPFB",
|
|
1146
|
+
"APKG",
|
|
1147
|
+
"APKGE",
|
|
1148
|
+
"APROD",
|
|
1149
|
+
"ARVP",
|
|
1150
|
+
"AUTO",
|
|
1151
|
+
"AUTOB",
|
|
1152
|
+
"AUTOP",
|
|
1153
|
+
"AVPKG",
|
|
1154
|
+
"BANDM",
|
|
1155
|
+
"BLANK",
|
|
1156
|
+
"BMISC",
|
|
1157
|
+
"BOAT",
|
|
1158
|
+
"BOP",
|
|
1159
|
+
"BOPGL",
|
|
1160
|
+
"BOPPR",
|
|
1161
|
+
"CAVN",
|
|
1162
|
+
"CEQFL",
|
|
1163
|
+
"CFIRE",
|
|
1164
|
+
"CFRM",
|
|
1165
|
+
"CGL",
|
|
1166
|
+
"COMAR",
|
|
1167
|
+
"COMR",
|
|
1168
|
+
"CONTR",
|
|
1169
|
+
"CPKGE",
|
|
1170
|
+
"CPMP",
|
|
1171
|
+
"CRIME",
|
|
1172
|
+
"DFIRE",
|
|
1173
|
+
"DISAB",
|
|
1174
|
+
"DO",
|
|
1175
|
+
"EDP",
|
|
1176
|
+
"EL",
|
|
1177
|
+
"EO",
|
|
1178
|
+
"EPLI",
|
|
1179
|
+
"EQ",
|
|
1180
|
+
"EQPFL",
|
|
1181
|
+
"EXLIA",
|
|
1182
|
+
"FIDTY",
|
|
1183
|
+
"FIDUC",
|
|
1184
|
+
"FINEA",
|
|
1185
|
+
"FLOOD",
|
|
1186
|
+
"GARAG",
|
|
1187
|
+
"GL",
|
|
1188
|
+
"GLASS",
|
|
1189
|
+
"HANG",
|
|
1190
|
+
"HBB",
|
|
1191
|
+
"HOME",
|
|
1192
|
+
"INBR",
|
|
1193
|
+
"INMAR",
|
|
1194
|
+
"INMRC",
|
|
1195
|
+
"INMRP",
|
|
1196
|
+
"JUDCL",
|
|
1197
|
+
"KIDRA",
|
|
1198
|
+
"LL",
|
|
1199
|
+
"MHOME",
|
|
1200
|
+
"MMAL",
|
|
1201
|
+
"Motorcycle",
|
|
1202
|
+
"MTRTK",
|
|
1203
|
+
"OLIB",
|
|
1204
|
+
"PHYS",
|
|
1205
|
+
"PKG",
|
|
1206
|
+
"PL",
|
|
1207
|
+
"PLMSC",
|
|
1208
|
+
"PPKGE",
|
|
1209
|
+
"PROP",
|
|
1210
|
+
"PROPC",
|
|
1211
|
+
"PUBOF",
|
|
1212
|
+
"RECV",
|
|
1213
|
+
"SCHPR",
|
|
1214
|
+
"SIGNS",
|
|
1215
|
+
"SMP",
|
|
1216
|
+
"SURE",
|
|
1217
|
+
"TRANS",
|
|
1218
|
+
"TRUCK",
|
|
1219
|
+
"UMBRC",
|
|
1220
|
+
"UMBRL",
|
|
1221
|
+
"UMBRP",
|
|
1222
|
+
"UN",
|
|
1223
|
+
"WCMA",
|
|
1224
|
+
"WIND",
|
|
1225
|
+
"WORK",
|
|
1226
|
+
"WORKP",
|
|
1227
|
+
"WORKV"
|
|
1228
|
+
];
|
|
1229
|
+
var AcordLobCodeSchema = import_zod2.z.enum(ACORD_LOB_CODES);
|
|
1230
|
+
var ACORD_LOB_LABELS = {
|
|
1231
|
+
AAPPL: "Aircraft / Aerial Applicator",
|
|
1232
|
+
AGLIA: "Agricultural Liability",
|
|
1233
|
+
AGPP: "Agricultural Personal Property",
|
|
1234
|
+
AGPR: "Agricultural Property",
|
|
1235
|
+
AIRC: "Aircraft",
|
|
1236
|
+
AIRPFB: "Airport / Fixed Base Operator",
|
|
1237
|
+
APKG: "Agricultural Package",
|
|
1238
|
+
APKGE: "Agricultural Package (Extended)",
|
|
1239
|
+
APROD: "Agricultural Products",
|
|
1240
|
+
ARVP: "Recreational Vehicle Package",
|
|
1241
|
+
AUTO: "Automobile",
|
|
1242
|
+
AUTOB: "Business Auto",
|
|
1243
|
+
AUTOP: "Personal Auto",
|
|
1244
|
+
AVPKG: "Aviation Package",
|
|
1245
|
+
BANDM: "Boiler & Machinery",
|
|
1246
|
+
BLANK: "Blanket",
|
|
1247
|
+
BMISC: "Business Miscellaneous",
|
|
1248
|
+
BOAT: "Boat",
|
|
1249
|
+
BOP: "Businessowners Policy",
|
|
1250
|
+
BOPGL: "BOP - General Liability",
|
|
1251
|
+
BOPPR: "BOP - Property",
|
|
1252
|
+
CAVN: "Commercial Aviation",
|
|
1253
|
+
CEQFL: "Contractors Equipment Floater",
|
|
1254
|
+
CFIRE: "Commercial Fire",
|
|
1255
|
+
CFRM: "Commercial Farm",
|
|
1256
|
+
CGL: "Commercial General Liability",
|
|
1257
|
+
COMAR: "Commercial Marine / Ocean Marine",
|
|
1258
|
+
COMR: "Commercial (misc.)",
|
|
1259
|
+
CONTR: "Contractors",
|
|
1260
|
+
CPKGE: "Commercial Package",
|
|
1261
|
+
CPMP: "Commercial Package (multi-peril)",
|
|
1262
|
+
CRIME: "Crime",
|
|
1263
|
+
DFIRE: "Dwelling Fire",
|
|
1264
|
+
DISAB: "Disability",
|
|
1265
|
+
DO: "Directors & Officers Liability",
|
|
1266
|
+
EDP: "Electronic Data Processing",
|
|
1267
|
+
EL: "Employers Liability",
|
|
1268
|
+
EO: "Errors & Omissions",
|
|
1269
|
+
EPLI: "Employment Practices Liability",
|
|
1270
|
+
EQ: "Earthquake",
|
|
1271
|
+
EQPFL: "Equipment Floater",
|
|
1272
|
+
EXLIA: "Excess Liability",
|
|
1273
|
+
FIDTY: "Fidelity",
|
|
1274
|
+
FIDUC: "Fiduciary Liability",
|
|
1275
|
+
FINEA: "Fine Arts",
|
|
1276
|
+
FLOOD: "Flood",
|
|
1277
|
+
GARAG: "Garage",
|
|
1278
|
+
GL: "General Liability",
|
|
1279
|
+
GLASS: "Glass",
|
|
1280
|
+
HANG: "Hangar (Aviation)",
|
|
1281
|
+
HBB: "Home-Based Business",
|
|
1282
|
+
HOME: "Homeowners",
|
|
1283
|
+
INBR: "Inland Marine - Brokers",
|
|
1284
|
+
INMAR: "Inland Marine",
|
|
1285
|
+
INMRC: "Inland Marine - Commercial",
|
|
1286
|
+
INMRP: "Inland Marine - Personal",
|
|
1287
|
+
JUDCL: "Judicial Bonds",
|
|
1288
|
+
KIDRA: "Kidnap & Ransom",
|
|
1289
|
+
LL: "Liquor Liability",
|
|
1290
|
+
MHOME: "Mobile Home",
|
|
1291
|
+
MMAL: "Medical Malpractice",
|
|
1292
|
+
Motorcycle: "Motorcycle",
|
|
1293
|
+
MTRTK: "Motor Truck Cargo",
|
|
1294
|
+
OLIB: "Other Liability",
|
|
1295
|
+
PHYS: "Physical Damage",
|
|
1296
|
+
PKG: "Package",
|
|
1297
|
+
PL: "Professional Liability",
|
|
1298
|
+
PLMSC: "Personal Lines Miscellaneous",
|
|
1299
|
+
PPKGE: "Personal Package",
|
|
1300
|
+
PROP: "Property",
|
|
1301
|
+
PROPC: "Property - Commercial",
|
|
1302
|
+
PUBOF: "Public Officials Liability",
|
|
1303
|
+
RECV: "Recreational Vehicle",
|
|
1304
|
+
SCHPR: "Scheduled Property",
|
|
1305
|
+
SIGNS: "Signs",
|
|
1306
|
+
SMP: "Special Multi-Peril",
|
|
1307
|
+
SURE: "Surety",
|
|
1308
|
+
TRANS: "Transportation",
|
|
1309
|
+
TRUCK: "Trucking",
|
|
1310
|
+
UMBRC: "Umbrella - Commercial",
|
|
1311
|
+
UMBRL: "Umbrella",
|
|
1312
|
+
UMBRP: "Umbrella - Personal",
|
|
1313
|
+
UN: "Unspecified / Unknown",
|
|
1314
|
+
WCMA: "Workers Comp - Monopolistic/State",
|
|
1315
|
+
WIND: "Wind",
|
|
1316
|
+
WORK: "Workers Compensation",
|
|
1317
|
+
WORKP: "Workers Compensation (Personal/Package)",
|
|
1318
|
+
WORKV: "Workers Compensation (Voluntary)"
|
|
1319
|
+
};
|
|
1320
|
+
var LEGACY_POLICY_TYPE_TO_LOB = {
|
|
1321
|
+
general_liability: ["CGL"],
|
|
1322
|
+
commercial_property: ["PROPC"],
|
|
1323
|
+
commercial_auto: ["AUTOB"],
|
|
1324
|
+
non_owned_auto: ["AUTOB"],
|
|
1325
|
+
workers_comp: ["WORK"],
|
|
1326
|
+
umbrella: ["UMBRC"],
|
|
1327
|
+
excess_liability: ["EXLIA"],
|
|
1328
|
+
professional_liability: ["EO"],
|
|
1329
|
+
cyber: ["OLIB"],
|
|
1330
|
+
epli: ["EPLI"],
|
|
1331
|
+
directors_officers: ["DO"],
|
|
1332
|
+
fiduciary_liability: ["FIDUC"],
|
|
1333
|
+
crime_fidelity: ["CRIME"],
|
|
1334
|
+
inland_marine: ["INMRC"],
|
|
1335
|
+
builders_risk: ["INMRC"],
|
|
1336
|
+
environmental: ["OLIB"],
|
|
1337
|
+
ocean_marine: ["COMAR"],
|
|
1338
|
+
surety: ["SURE"],
|
|
1339
|
+
product_liability: ["OLIB"],
|
|
1340
|
+
bop: ["BOP"],
|
|
1341
|
+
management_liability_package: ["DO", "EPLI", "FIDUC"],
|
|
1342
|
+
property: ["PROP"],
|
|
1343
|
+
homeowners_ho3: ["HOME"],
|
|
1344
|
+
homeowners_ho5: ["HOME"],
|
|
1345
|
+
renters_ho4: ["HOME"],
|
|
1346
|
+
condo_ho6: ["HOME"],
|
|
1347
|
+
dwelling_fire: ["DFIRE"],
|
|
1348
|
+
mobile_home: ["MHOME"],
|
|
1349
|
+
personal_auto: ["AUTOP"],
|
|
1350
|
+
personal_umbrella: ["UMBRP"],
|
|
1351
|
+
flood_nfip: ["FLOOD"],
|
|
1352
|
+
flood_private: ["FLOOD"],
|
|
1353
|
+
earthquake: ["EQ"],
|
|
1354
|
+
personal_inland_marine: ["INMRP"],
|
|
1355
|
+
watercraft: ["BOAT"],
|
|
1356
|
+
recreational_vehicle: ["RECV"],
|
|
1357
|
+
farm_ranch: ["CFRM"],
|
|
1358
|
+
life: ["UN"],
|
|
1359
|
+
critical_illness: ["DISAB"],
|
|
1360
|
+
disability: ["DISAB"],
|
|
1361
|
+
long_term_care: ["UN"],
|
|
1362
|
+
pet: ["UN"],
|
|
1363
|
+
travel: ["UN"],
|
|
1364
|
+
identity_theft: ["UN"],
|
|
1365
|
+
title: ["UN"],
|
|
1366
|
+
other: ["UN"],
|
|
1367
|
+
unknown: ["UN"],
|
|
1368
|
+
auto: ["AUTOB"],
|
|
1369
|
+
crime: ["CRIME"],
|
|
1370
|
+
crim: ["CRIME"],
|
|
1371
|
+
fiduciary: ["FIDUC"],
|
|
1372
|
+
d_and_o: ["DO"],
|
|
1373
|
+
d_o: ["DO"],
|
|
1374
|
+
homeowners: ["HOME"],
|
|
1375
|
+
renters: ["HOME"],
|
|
1376
|
+
flood: ["FLOOD"],
|
|
1377
|
+
boat: ["BOAT"],
|
|
1378
|
+
motorcycle: ["Motorcycle"]
|
|
1379
|
+
};
|
|
1380
|
+
function hasOwn(object, key) {
|
|
1381
|
+
return Object.prototype.hasOwnProperty.call(object, key);
|
|
1382
|
+
}
|
|
1383
|
+
function canonicalLegacyKey(value) {
|
|
1384
|
+
return value.trim().toLowerCase().replace(/&/g, " and ").replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").replace(/_+/g, "_");
|
|
1385
|
+
}
|
|
1386
|
+
function isLobCode(value) {
|
|
1387
|
+
return typeof value === "string" && hasOwn(ACORD_LOB_LABELS, value);
|
|
1388
|
+
}
|
|
1389
|
+
function toLobCodes(values) {
|
|
1390
|
+
const source = values?.filter((value) => typeof value === "string" && value.trim()) ?? [];
|
|
1391
|
+
if (source.length === 0) return ["UN"];
|
|
1392
|
+
const codes = [];
|
|
1393
|
+
for (const value of source) {
|
|
1394
|
+
const trimmed = value.trim();
|
|
1395
|
+
if (isLobCode(trimmed)) {
|
|
1396
|
+
codes.push(trimmed);
|
|
1397
|
+
continue;
|
|
1398
|
+
}
|
|
1399
|
+
if (trimmed.toUpperCase() === "CRIM") {
|
|
1400
|
+
codes.push("CRIME");
|
|
1401
|
+
continue;
|
|
1402
|
+
}
|
|
1403
|
+
const mapped = LEGACY_POLICY_TYPE_TO_LOB[canonicalLegacyKey(trimmed)];
|
|
1404
|
+
if (mapped) {
|
|
1405
|
+
codes.push(...mapped);
|
|
1406
|
+
continue;
|
|
1407
|
+
}
|
|
1408
|
+
const upper = trimmed.toUpperCase();
|
|
1409
|
+
if (isLobCode(upper)) {
|
|
1410
|
+
codes.push(upper);
|
|
1411
|
+
continue;
|
|
1412
|
+
}
|
|
1413
|
+
codes.push("UN");
|
|
1414
|
+
}
|
|
1415
|
+
return Array.from(new Set(codes));
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
// src/source/schemas.ts
|
|
1419
|
+
var SourceSpanKindSchema = import_zod3.z.enum([
|
|
1137
1420
|
"pdf_text",
|
|
1138
1421
|
"pdf_image",
|
|
1139
1422
|
"html",
|
|
@@ -1141,7 +1424,7 @@ var SourceSpanKindSchema = import_zod2.z.enum([
|
|
|
1141
1424
|
"plain_text",
|
|
1142
1425
|
"structured_field"
|
|
1143
1426
|
]);
|
|
1144
|
-
var SourceSpanUnitSchema =
|
|
1427
|
+
var SourceSpanUnitSchema = import_zod3.z.enum([
|
|
1145
1428
|
"page",
|
|
1146
1429
|
"section",
|
|
1147
1430
|
"table",
|
|
@@ -1150,78 +1433,78 @@ var SourceSpanUnitSchema = import_zod2.z.enum([
|
|
|
1150
1433
|
"key_value",
|
|
1151
1434
|
"text"
|
|
1152
1435
|
]);
|
|
1153
|
-
var SourceKindSchema =
|
|
1436
|
+
var SourceKindSchema = import_zod3.z.enum([
|
|
1154
1437
|
"policy_pdf",
|
|
1155
1438
|
"application_pdf",
|
|
1156
1439
|
"email",
|
|
1157
1440
|
"attachment",
|
|
1158
1441
|
"manual_note"
|
|
1159
1442
|
]);
|
|
1160
|
-
var SourceSpanBBoxSchema =
|
|
1161
|
-
page:
|
|
1162
|
-
x:
|
|
1163
|
-
y:
|
|
1164
|
-
width:
|
|
1165
|
-
height:
|
|
1443
|
+
var SourceSpanBBoxSchema = import_zod3.z.object({
|
|
1444
|
+
page: import_zod3.z.number().int().positive(),
|
|
1445
|
+
x: import_zod3.z.number(),
|
|
1446
|
+
y: import_zod3.z.number(),
|
|
1447
|
+
width: import_zod3.z.number(),
|
|
1448
|
+
height: import_zod3.z.number()
|
|
1166
1449
|
});
|
|
1167
|
-
var SourceSpanLocationSchema =
|
|
1168
|
-
page:
|
|
1169
|
-
startPage:
|
|
1170
|
-
endPage:
|
|
1171
|
-
charStart:
|
|
1172
|
-
charEnd:
|
|
1173
|
-
lineStart:
|
|
1174
|
-
lineEnd:
|
|
1175
|
-
fieldPath:
|
|
1450
|
+
var SourceSpanLocationSchema = import_zod3.z.object({
|
|
1451
|
+
page: import_zod3.z.number().int().positive().optional(),
|
|
1452
|
+
startPage: import_zod3.z.number().int().positive().optional(),
|
|
1453
|
+
endPage: import_zod3.z.number().int().positive().optional(),
|
|
1454
|
+
charStart: import_zod3.z.number().int().nonnegative().optional(),
|
|
1455
|
+
charEnd: import_zod3.z.number().int().nonnegative().optional(),
|
|
1456
|
+
lineStart: import_zod3.z.number().int().positive().optional(),
|
|
1457
|
+
lineEnd: import_zod3.z.number().int().positive().optional(),
|
|
1458
|
+
fieldPath: import_zod3.z.string().optional()
|
|
1176
1459
|
});
|
|
1177
|
-
var SourceSpanTableLocationSchema =
|
|
1178
|
-
tableId:
|
|
1179
|
-
rowIndex:
|
|
1180
|
-
columnIndex:
|
|
1181
|
-
columnName:
|
|
1182
|
-
rowSpanId:
|
|
1183
|
-
tableSpanId:
|
|
1184
|
-
isHeader:
|
|
1460
|
+
var SourceSpanTableLocationSchema = import_zod3.z.object({
|
|
1461
|
+
tableId: import_zod3.z.string().optional(),
|
|
1462
|
+
rowIndex: import_zod3.z.number().int().nonnegative().optional(),
|
|
1463
|
+
columnIndex: import_zod3.z.number().int().nonnegative().optional(),
|
|
1464
|
+
columnName: import_zod3.z.string().optional(),
|
|
1465
|
+
rowSpanId: import_zod3.z.string().optional(),
|
|
1466
|
+
tableSpanId: import_zod3.z.string().optional(),
|
|
1467
|
+
isHeader: import_zod3.z.boolean().optional()
|
|
1185
1468
|
});
|
|
1186
|
-
var SourceSpanSchema =
|
|
1187
|
-
id:
|
|
1188
|
-
documentId:
|
|
1469
|
+
var SourceSpanSchema = import_zod3.z.object({
|
|
1470
|
+
id: import_zod3.z.string().min(1),
|
|
1471
|
+
documentId: import_zod3.z.string().min(1),
|
|
1189
1472
|
sourceKind: SourceKindSchema.optional(),
|
|
1190
|
-
chunkId:
|
|
1473
|
+
chunkId: import_zod3.z.string().optional(),
|
|
1191
1474
|
kind: SourceSpanKindSchema,
|
|
1192
|
-
text:
|
|
1193
|
-
hash:
|
|
1194
|
-
textHash:
|
|
1195
|
-
pageStart:
|
|
1196
|
-
pageEnd:
|
|
1197
|
-
sectionId:
|
|
1198
|
-
formNumber:
|
|
1475
|
+
text: import_zod3.z.string(),
|
|
1476
|
+
hash: import_zod3.z.string().min(1),
|
|
1477
|
+
textHash: import_zod3.z.string().optional(),
|
|
1478
|
+
pageStart: import_zod3.z.number().int().positive().optional(),
|
|
1479
|
+
pageEnd: import_zod3.z.number().int().positive().optional(),
|
|
1480
|
+
sectionId: import_zod3.z.string().optional(),
|
|
1481
|
+
formNumber: import_zod3.z.string().optional(),
|
|
1199
1482
|
sourceUnit: SourceSpanUnitSchema.optional(),
|
|
1200
|
-
parentSpanId:
|
|
1483
|
+
parentSpanId: import_zod3.z.string().optional(),
|
|
1201
1484
|
table: SourceSpanTableLocationSchema.optional(),
|
|
1202
|
-
bbox:
|
|
1485
|
+
bbox: import_zod3.z.array(SourceSpanBBoxSchema).optional(),
|
|
1203
1486
|
location: SourceSpanLocationSchema.optional(),
|
|
1204
|
-
metadata:
|
|
1487
|
+
metadata: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.string()).optional()
|
|
1205
1488
|
});
|
|
1206
|
-
var SourceSpanRefSchema =
|
|
1207
|
-
sourceSpanId:
|
|
1208
|
-
documentId:
|
|
1209
|
-
chunkId:
|
|
1210
|
-
quote:
|
|
1211
|
-
hash:
|
|
1489
|
+
var SourceSpanRefSchema = import_zod3.z.object({
|
|
1490
|
+
sourceSpanId: import_zod3.z.string().min(1),
|
|
1491
|
+
documentId: import_zod3.z.string().min(1).optional(),
|
|
1492
|
+
chunkId: import_zod3.z.string().optional(),
|
|
1493
|
+
quote: import_zod3.z.string().optional(),
|
|
1494
|
+
hash: import_zod3.z.string().optional(),
|
|
1212
1495
|
location: SourceSpanLocationSchema.optional()
|
|
1213
1496
|
});
|
|
1214
|
-
var SourceChunkSchema =
|
|
1215
|
-
id:
|
|
1216
|
-
documentId:
|
|
1217
|
-
sourceSpanIds:
|
|
1218
|
-
text:
|
|
1219
|
-
textHash:
|
|
1220
|
-
pageStart:
|
|
1221
|
-
pageEnd:
|
|
1222
|
-
metadata:
|
|
1497
|
+
var SourceChunkSchema = import_zod3.z.object({
|
|
1498
|
+
id: import_zod3.z.string().min(1),
|
|
1499
|
+
documentId: import_zod3.z.string().min(1),
|
|
1500
|
+
sourceSpanIds: import_zod3.z.array(import_zod3.z.string().min(1)),
|
|
1501
|
+
text: import_zod3.z.string(),
|
|
1502
|
+
textHash: import_zod3.z.string().min(1),
|
|
1503
|
+
pageStart: import_zod3.z.number().int().positive().optional(),
|
|
1504
|
+
pageEnd: import_zod3.z.number().int().positive().optional(),
|
|
1505
|
+
metadata: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.string()).default({})
|
|
1223
1506
|
});
|
|
1224
|
-
var DocumentSourceNodeKindSchema =
|
|
1507
|
+
var DocumentSourceNodeKindSchema = import_zod3.z.enum([
|
|
1225
1508
|
"document",
|
|
1226
1509
|
"page_group",
|
|
1227
1510
|
"page",
|
|
@@ -1235,31 +1518,31 @@ var DocumentSourceNodeKindSchema = import_zod2.z.enum([
|
|
|
1235
1518
|
"table_cell",
|
|
1236
1519
|
"text"
|
|
1237
1520
|
]);
|
|
1238
|
-
var DocumentSourceNodeSchema =
|
|
1239
|
-
id:
|
|
1240
|
-
documentId:
|
|
1241
|
-
parentId:
|
|
1521
|
+
var DocumentSourceNodeSchema = import_zod3.z.object({
|
|
1522
|
+
id: import_zod3.z.string().min(1),
|
|
1523
|
+
documentId: import_zod3.z.string().min(1),
|
|
1524
|
+
parentId: import_zod3.z.string().optional(),
|
|
1242
1525
|
kind: DocumentSourceNodeKindSchema,
|
|
1243
|
-
title:
|
|
1244
|
-
description:
|
|
1245
|
-
textExcerpt:
|
|
1246
|
-
sourceSpanIds:
|
|
1247
|
-
pageStart:
|
|
1248
|
-
pageEnd:
|
|
1249
|
-
bbox:
|
|
1250
|
-
order:
|
|
1251
|
-
path:
|
|
1252
|
-
metadata:
|
|
1526
|
+
title: import_zod3.z.string(),
|
|
1527
|
+
description: import_zod3.z.string(),
|
|
1528
|
+
textExcerpt: import_zod3.z.string().optional(),
|
|
1529
|
+
sourceSpanIds: import_zod3.z.array(import_zod3.z.string().min(1)),
|
|
1530
|
+
pageStart: import_zod3.z.number().int().positive().optional(),
|
|
1531
|
+
pageEnd: import_zod3.z.number().int().positive().optional(),
|
|
1532
|
+
bbox: import_zod3.z.array(SourceSpanBBoxSchema).optional(),
|
|
1533
|
+
order: import_zod3.z.number().int().nonnegative(),
|
|
1534
|
+
path: import_zod3.z.string(),
|
|
1535
|
+
metadata: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.unknown()).optional()
|
|
1253
1536
|
});
|
|
1254
|
-
var SourceBackedValueSchema =
|
|
1255
|
-
value:
|
|
1256
|
-
normalizedValue:
|
|
1257
|
-
confidence:
|
|
1258
|
-
sourceNodeIds:
|
|
1259
|
-
sourceSpanIds:
|
|
1537
|
+
var SourceBackedValueSchema = import_zod3.z.object({
|
|
1538
|
+
value: import_zod3.z.string(),
|
|
1539
|
+
normalizedValue: import_zod3.z.string().optional(),
|
|
1540
|
+
confidence: import_zod3.z.enum(["low", "medium", "high"]).default("medium"),
|
|
1541
|
+
sourceNodeIds: import_zod3.z.array(import_zod3.z.string().min(1)).default([]),
|
|
1542
|
+
sourceSpanIds: import_zod3.z.array(import_zod3.z.string().min(1)).default([])
|
|
1260
1543
|
});
|
|
1261
|
-
var OperationalCoverageTermSchema =
|
|
1262
|
-
kind:
|
|
1544
|
+
var OperationalCoverageTermSchema = import_zod3.z.object({
|
|
1545
|
+
kind: import_zod3.z.enum([
|
|
1263
1546
|
"each_claim_limit",
|
|
1264
1547
|
"each_occurrence_limit",
|
|
1265
1548
|
"each_loss_limit",
|
|
@@ -1271,334 +1554,75 @@ var OperationalCoverageTermSchema = import_zod2.z.object({
|
|
|
1271
1554
|
"premium",
|
|
1272
1555
|
"other"
|
|
1273
1556
|
]).default("other"),
|
|
1274
|
-
label:
|
|
1275
|
-
value:
|
|
1276
|
-
amount:
|
|
1277
|
-
appliesTo:
|
|
1278
|
-
sourceNodeIds:
|
|
1279
|
-
sourceSpanIds:
|
|
1280
|
-
});
|
|
1281
|
-
var OperationalCoverageLineSchema = import_zod2.z.object({
|
|
1282
|
-
name: import_zod2.z.string(),
|
|
1283
|
-
coverageCode: import_zod2.z.string().optional(),
|
|
1284
|
-
limit: import_zod2.z.string().optional(),
|
|
1285
|
-
deductible: import_zod2.z.string().optional(),
|
|
1286
|
-
premium: import_zod2.z.string().optional(),
|
|
1287
|
-
retroactiveDate: import_zod2.z.string().optional(),
|
|
1288
|
-
formNumber: import_zod2.z.string().optional(),
|
|
1289
|
-
sectionRef: import_zod2.z.string().optional(),
|
|
1290
|
-
endorsementNumber: import_zod2.z.string().optional(),
|
|
1291
|
-
limits: import_zod2.z.array(OperationalCoverageTermSchema).default([]),
|
|
1292
|
-
sourceNodeIds: import_zod2.z.array(import_zod2.z.string().min(1)).default([]),
|
|
1293
|
-
sourceSpanIds: import_zod2.z.array(import_zod2.z.string().min(1)).default([])
|
|
1557
|
+
label: import_zod3.z.string(),
|
|
1558
|
+
value: import_zod3.z.string(),
|
|
1559
|
+
amount: import_zod3.z.number().optional(),
|
|
1560
|
+
appliesTo: import_zod3.z.string().optional(),
|
|
1561
|
+
sourceNodeIds: import_zod3.z.array(import_zod3.z.string().min(1)).default([]),
|
|
1562
|
+
sourceSpanIds: import_zod3.z.array(import_zod3.z.string().min(1)).default([])
|
|
1294
1563
|
});
|
|
1295
|
-
var
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1564
|
+
var OperationalCoverageLineSchema = import_zod3.z.object({
|
|
1565
|
+
name: import_zod3.z.string(),
|
|
1566
|
+
coverageCode: import_zod3.z.string().optional(),
|
|
1567
|
+
limit: import_zod3.z.string().optional(),
|
|
1568
|
+
deductible: import_zod3.z.string().optional(),
|
|
1569
|
+
premium: import_zod3.z.string().optional(),
|
|
1570
|
+
retroactiveDate: import_zod3.z.string().optional(),
|
|
1571
|
+
formNumber: import_zod3.z.string().optional(),
|
|
1572
|
+
sectionRef: import_zod3.z.string().optional(),
|
|
1573
|
+
endorsementNumber: import_zod3.z.string().optional(),
|
|
1574
|
+
limits: import_zod3.z.array(OperationalCoverageTermSchema).default([]),
|
|
1575
|
+
sourceNodeIds: import_zod3.z.array(import_zod3.z.string().min(1)).default([]),
|
|
1576
|
+
sourceSpanIds: import_zod3.z.array(import_zod3.z.string().min(1)).default([])
|
|
1300
1577
|
});
|
|
1301
|
-
var
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
sourceSpanIds: import_zod2.z.array(import_zod2.z.string().min(1)).default([])
|
|
1578
|
+
var OperationalPartySchema = import_zod3.z.object({
|
|
1579
|
+
role: import_zod3.z.string(),
|
|
1580
|
+
name: import_zod3.z.string(),
|
|
1581
|
+
sourceNodeIds: import_zod3.z.array(import_zod3.z.string().min(1)).default([]),
|
|
1582
|
+
sourceSpanIds: import_zod3.z.array(import_zod3.z.string().min(1)).default([])
|
|
1307
1583
|
});
|
|
1308
|
-
var
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
broker: SourceBackedValueSchema.optional(),
|
|
1315
|
-
effectiveDate: SourceBackedValueSchema.optional(),
|
|
1316
|
-
expirationDate: SourceBackedValueSchema.optional(),
|
|
1317
|
-
retroactiveDate: SourceBackedValueSchema.optional(),
|
|
1318
|
-
premium: SourceBackedValueSchema.optional(),
|
|
1319
|
-
coverages: import_zod2.z.array(OperationalCoverageLineSchema).default([]),
|
|
1320
|
-
parties: import_zod2.z.array(OperationalPartySchema).default([]),
|
|
1321
|
-
endorsementSupport: import_zod2.z.array(OperationalEndorsementSupportSchema).default([]),
|
|
1322
|
-
sourceNodeIds: import_zod2.z.array(import_zod2.z.string().min(1)).default([]),
|
|
1323
|
-
sourceSpanIds: import_zod2.z.array(import_zod2.z.string().min(1)).default([]),
|
|
1324
|
-
warnings: import_zod2.z.array(import_zod2.z.string()).default([])
|
|
1584
|
+
var OperationalEndorsementSupportSchema = import_zod3.z.object({
|
|
1585
|
+
kind: import_zod3.z.string(),
|
|
1586
|
+
status: import_zod3.z.enum(["supported", "excluded", "requires_review"]),
|
|
1587
|
+
summary: import_zod3.z.string(),
|
|
1588
|
+
sourceNodeIds: import_zod3.z.array(import_zod3.z.string().min(1)).default([]),
|
|
1589
|
+
sourceSpanIds: import_zod3.z.array(import_zod3.z.string().min(1)).default([])
|
|
1325
1590
|
});
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
"
|
|
1338
|
-
"
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
"personal_umbrella",
|
|
1362
|
-
"flood_nfip",
|
|
1363
|
-
"flood_private",
|
|
1364
|
-
"earthquake",
|
|
1365
|
-
"personal_inland_marine",
|
|
1366
|
-
"watercraft",
|
|
1367
|
-
"recreational_vehicle",
|
|
1368
|
-
"farm_ranch",
|
|
1369
|
-
"life",
|
|
1370
|
-
"critical_illness",
|
|
1371
|
-
"disability",
|
|
1372
|
-
"long_term_care",
|
|
1373
|
-
"pet",
|
|
1374
|
-
"travel",
|
|
1375
|
-
"identity_theft",
|
|
1376
|
-
"title",
|
|
1377
|
-
"other"
|
|
1378
|
-
]);
|
|
1379
|
-
var POLICY_TYPES = PolicyTypeSchema.options;
|
|
1380
|
-
var EndorsementTypeSchema = import_zod3.z.enum([
|
|
1381
|
-
"additional_insured",
|
|
1382
|
-
"waiver_of_subrogation",
|
|
1383
|
-
"primary_noncontributory",
|
|
1384
|
-
"blanket_additional_insured",
|
|
1385
|
-
"loss_payee",
|
|
1386
|
-
"mortgage_holder",
|
|
1387
|
-
"broadening",
|
|
1388
|
-
"restriction",
|
|
1389
|
-
"exclusion",
|
|
1390
|
-
"amendatory",
|
|
1391
|
-
"notice_of_cancellation",
|
|
1392
|
-
"designated_premises",
|
|
1393
|
-
"classification_change",
|
|
1394
|
-
"schedule_update",
|
|
1395
|
-
"deductible_change",
|
|
1396
|
-
"limit_change",
|
|
1397
|
-
"territorial_extension",
|
|
1398
|
-
"other"
|
|
1399
|
-
]);
|
|
1400
|
-
var ENDORSEMENT_TYPES = EndorsementTypeSchema.options;
|
|
1401
|
-
var ConditionTypeSchema = import_zod3.z.enum([
|
|
1402
|
-
"duties_after_loss",
|
|
1403
|
-
"notice_requirements",
|
|
1404
|
-
"other_insurance",
|
|
1405
|
-
"cancellation",
|
|
1406
|
-
"nonrenewal",
|
|
1407
|
-
"transfer_of_rights",
|
|
1408
|
-
"liberalization",
|
|
1409
|
-
"arbitration",
|
|
1410
|
-
"concealment_fraud",
|
|
1411
|
-
"examination_under_oath",
|
|
1412
|
-
"legal_action",
|
|
1413
|
-
"loss_payment",
|
|
1414
|
-
"appraisal",
|
|
1415
|
-
"mortgage_holders",
|
|
1416
|
-
"policy_territory",
|
|
1417
|
-
"separation_of_insureds",
|
|
1418
|
-
"other"
|
|
1419
|
-
]);
|
|
1420
|
-
var CONDITION_TYPES = ConditionTypeSchema.options;
|
|
1421
|
-
var PolicySectionTypeSchema = import_zod3.z.enum([
|
|
1422
|
-
"declarations",
|
|
1423
|
-
"insuring_agreement",
|
|
1424
|
-
"policy_form",
|
|
1425
|
-
"endorsement",
|
|
1426
|
-
"application",
|
|
1427
|
-
"exclusion",
|
|
1428
|
-
"condition",
|
|
1429
|
-
"definition",
|
|
1430
|
-
"schedule",
|
|
1431
|
-
"notice",
|
|
1432
|
-
"regulatory",
|
|
1433
|
-
"other"
|
|
1434
|
-
]);
|
|
1435
|
-
var POLICY_SECTION_TYPES = PolicySectionTypeSchema.options;
|
|
1436
|
-
var QuoteSectionTypeSchema = import_zod3.z.enum([
|
|
1437
|
-
"terms_summary",
|
|
1438
|
-
"premium_indication",
|
|
1439
|
-
"underwriting_condition",
|
|
1440
|
-
"subjectivity",
|
|
1441
|
-
"coverage_summary",
|
|
1442
|
-
"exclusion",
|
|
1443
|
-
"other"
|
|
1444
|
-
]);
|
|
1445
|
-
var QUOTE_SECTION_TYPES = QuoteSectionTypeSchema.options;
|
|
1446
|
-
var CoverageFormSchema = import_zod3.z.enum(["occurrence", "claims_made", "accident"]);
|
|
1447
|
-
var COVERAGE_FORMS = CoverageFormSchema.options;
|
|
1448
|
-
var PolicyTermTypeSchema = import_zod3.z.enum(["fixed", "continuous"]);
|
|
1449
|
-
var POLICY_TERM_TYPES = PolicyTermTypeSchema.options;
|
|
1450
|
-
var CoverageTriggerSchema = import_zod3.z.enum(["occurrence", "claims_made", "accident"]);
|
|
1451
|
-
var COVERAGE_TRIGGERS = CoverageTriggerSchema.options;
|
|
1452
|
-
var LimitTypeSchema = import_zod3.z.enum([
|
|
1453
|
-
"per_occurrence",
|
|
1454
|
-
"per_claim",
|
|
1455
|
-
"aggregate",
|
|
1456
|
-
"per_person",
|
|
1457
|
-
"per_accident",
|
|
1458
|
-
"statutory",
|
|
1459
|
-
"blanket",
|
|
1460
|
-
"scheduled"
|
|
1461
|
-
]);
|
|
1462
|
-
var LIMIT_TYPES = LimitTypeSchema.options;
|
|
1463
|
-
var DeductibleTypeSchema = import_zod3.z.enum([
|
|
1464
|
-
"per_occurrence",
|
|
1465
|
-
"per_claim",
|
|
1466
|
-
"aggregate",
|
|
1467
|
-
"percentage",
|
|
1468
|
-
"waiting_period"
|
|
1469
|
-
]);
|
|
1470
|
-
var DEDUCTIBLE_TYPES = DeductibleTypeSchema.options;
|
|
1471
|
-
var ValuationMethodSchema = import_zod3.z.enum([
|
|
1472
|
-
"replacement_cost",
|
|
1473
|
-
"actual_cash_value",
|
|
1474
|
-
"agreed_value",
|
|
1475
|
-
"functional_replacement"
|
|
1476
|
-
]);
|
|
1477
|
-
var VALUATION_METHODS = ValuationMethodSchema.options;
|
|
1478
|
-
var DefenseCostTreatmentSchema = import_zod3.z.enum(["inside_limits", "outside_limits", "supplementary"]);
|
|
1479
|
-
var DEFENSE_COST_TREATMENTS = DefenseCostTreatmentSchema.options;
|
|
1480
|
-
var EntityTypeSchema = import_zod3.z.enum([
|
|
1481
|
-
"corporation",
|
|
1482
|
-
"llc",
|
|
1483
|
-
"partnership",
|
|
1484
|
-
"sole_proprietor",
|
|
1485
|
-
"joint_venture",
|
|
1486
|
-
"trust",
|
|
1487
|
-
"nonprofit",
|
|
1488
|
-
"municipality",
|
|
1489
|
-
"individual",
|
|
1490
|
-
"married_couple",
|
|
1491
|
-
"other"
|
|
1492
|
-
]);
|
|
1493
|
-
var ENTITY_TYPES = EntityTypeSchema.options;
|
|
1494
|
-
var AdmittedStatusSchema = import_zod3.z.enum(["admitted", "non_admitted", "surplus_lines"]);
|
|
1495
|
-
var ADMITTED_STATUSES = AdmittedStatusSchema.options;
|
|
1496
|
-
var AuditTypeSchema = import_zod3.z.enum([
|
|
1497
|
-
"annual",
|
|
1498
|
-
"semi_annual",
|
|
1499
|
-
"quarterly",
|
|
1500
|
-
"monthly",
|
|
1501
|
-
"self",
|
|
1502
|
-
"physical",
|
|
1503
|
-
"none"
|
|
1504
|
-
]);
|
|
1505
|
-
var AUDIT_TYPES = AuditTypeSchema.options;
|
|
1506
|
-
var EndorsementPartyRoleSchema = import_zod3.z.enum([
|
|
1507
|
-
"additional_insured",
|
|
1508
|
-
"loss_payee",
|
|
1509
|
-
"mortgage_holder",
|
|
1510
|
-
"certificate_holder",
|
|
1511
|
-
"notice_recipient",
|
|
1512
|
-
"other"
|
|
1513
|
-
]);
|
|
1514
|
-
var ENDORSEMENT_PARTY_ROLES = EndorsementPartyRoleSchema.options;
|
|
1515
|
-
var ClaimStatusSchema = import_zod3.z.enum(["open", "closed", "reopened"]);
|
|
1516
|
-
var CLAIM_STATUSES = ClaimStatusSchema.options;
|
|
1517
|
-
var SubjectivityCategorySchema = import_zod3.z.enum(["pre_binding", "post_binding", "information"]);
|
|
1518
|
-
var SUBJECTIVITY_CATEGORIES = SubjectivityCategorySchema.options;
|
|
1519
|
-
var DocumentTypeSchema = import_zod3.z.enum(["policy", "quote", "binder", "endorsement", "certificate"]);
|
|
1520
|
-
var DOCUMENT_TYPES = DocumentTypeSchema.options;
|
|
1521
|
-
var ChunkTypeSchema = import_zod3.z.enum([
|
|
1522
|
-
"declarations",
|
|
1523
|
-
"coverage_form",
|
|
1524
|
-
"endorsement",
|
|
1525
|
-
"schedule",
|
|
1526
|
-
"conditions",
|
|
1527
|
-
"mixed"
|
|
1528
|
-
]);
|
|
1529
|
-
var CHUNK_TYPES = ChunkTypeSchema.options;
|
|
1530
|
-
var RatingBasisTypeSchema = import_zod3.z.enum([
|
|
1531
|
-
"payroll",
|
|
1532
|
-
"revenue",
|
|
1533
|
-
"area",
|
|
1534
|
-
"units",
|
|
1535
|
-
"vehicle_count",
|
|
1536
|
-
"employee_count",
|
|
1537
|
-
"per_capita",
|
|
1538
|
-
"dwelling_value",
|
|
1539
|
-
"vehicle_value",
|
|
1540
|
-
"contents_value",
|
|
1541
|
-
"other"
|
|
1542
|
-
]);
|
|
1543
|
-
var RATING_BASIS_TYPES = RatingBasisTypeSchema.options;
|
|
1544
|
-
var VehicleCoverageTypeSchema = import_zod3.z.enum([
|
|
1545
|
-
"liability",
|
|
1546
|
-
"collision",
|
|
1547
|
-
"comprehensive",
|
|
1548
|
-
"uninsured_motorist",
|
|
1549
|
-
"underinsured_motorist",
|
|
1550
|
-
"medical_payments",
|
|
1551
|
-
"hired_auto",
|
|
1552
|
-
"non_owned_auto",
|
|
1553
|
-
"cargo",
|
|
1554
|
-
"physical_damage"
|
|
1555
|
-
]);
|
|
1556
|
-
var VEHICLE_COVERAGE_TYPES = VehicleCoverageTypeSchema.options;
|
|
1557
|
-
var HomeownersFormTypeSchema = import_zod3.z.enum(["HO-3", "HO-5", "HO-4", "HO-6", "HO-7", "HO-8"]);
|
|
1558
|
-
var HOMEOWNERS_FORM_TYPES = HomeownersFormTypeSchema.options;
|
|
1559
|
-
var DwellingFireFormTypeSchema = import_zod3.z.enum(["DP-1", "DP-2", "DP-3"]);
|
|
1560
|
-
var DWELLING_FIRE_FORM_TYPES = DwellingFireFormTypeSchema.options;
|
|
1561
|
-
var FloodZoneSchema = import_zod3.z.enum(["A", "AE", "AH", "AO", "AR", "V", "VE", "B", "C", "X", "D"]);
|
|
1562
|
-
var FLOOD_ZONES = FloodZoneSchema.options;
|
|
1563
|
-
var ConstructionTypeSchema = import_zod3.z.enum(["frame", "masonry", "superior", "mixed", "other"]);
|
|
1564
|
-
var CONSTRUCTION_TYPES = ConstructionTypeSchema.options;
|
|
1565
|
-
var RoofTypeSchema = import_zod3.z.enum(["asphalt_shingle", "tile", "metal", "slate", "flat", "wood_shake", "other"]);
|
|
1566
|
-
var ROOF_TYPES = RoofTypeSchema.options;
|
|
1567
|
-
var FoundationTypeSchema = import_zod3.z.enum(["basement", "crawl_space", "slab", "pier", "other"]);
|
|
1568
|
-
var FOUNDATION_TYPES = FoundationTypeSchema.options;
|
|
1569
|
-
var PersonalAutoUsageSchema = import_zod3.z.enum(["pleasure", "commute", "business", "farm"]);
|
|
1570
|
-
var PERSONAL_AUTO_USAGES = PersonalAutoUsageSchema.options;
|
|
1571
|
-
var LossSettlementSchema = import_zod3.z.enum([
|
|
1572
|
-
"replacement_cost",
|
|
1573
|
-
"actual_cash_value",
|
|
1574
|
-
"extended_replacement_cost",
|
|
1575
|
-
"guaranteed_replacement_cost"
|
|
1576
|
-
]);
|
|
1577
|
-
var LOSS_SETTLEMENTS = LossSettlementSchema.options;
|
|
1578
|
-
var BoatTypeSchema = import_zod3.z.enum(["sailboat", "powerboat", "pontoon", "jet_ski", "kayak_canoe", "yacht", "other"]);
|
|
1579
|
-
var BOAT_TYPES = BoatTypeSchema.options;
|
|
1580
|
-
var RVTypeSchema = import_zod3.z.enum(["rv_motorhome", "travel_trailer", "atv", "snowmobile", "golf_cart", "dirt_bike", "other"]);
|
|
1581
|
-
var RV_TYPES = RVTypeSchema.options;
|
|
1582
|
-
var ScheduledItemCategorySchema = import_zod3.z.enum([
|
|
1583
|
-
"jewelry",
|
|
1584
|
-
"fine_art",
|
|
1585
|
-
"musical_instruments",
|
|
1586
|
-
"silverware",
|
|
1587
|
-
"furs",
|
|
1588
|
-
"cameras",
|
|
1589
|
-
"collectibles",
|
|
1590
|
-
"firearms",
|
|
1591
|
-
"golf_equipment",
|
|
1592
|
-
"other"
|
|
1593
|
-
]);
|
|
1594
|
-
var SCHEDULED_ITEM_CATEGORIES = ScheduledItemCategorySchema.options;
|
|
1595
|
-
var TitlePolicyTypeSchema = import_zod3.z.enum(["owners", "lenders"]);
|
|
1596
|
-
var TITLE_POLICY_TYPES = TitlePolicyTypeSchema.options;
|
|
1597
|
-
var PetSpeciesSchema = import_zod3.z.enum(["dog", "cat", "other"]);
|
|
1598
|
-
var PET_SPECIES = PetSpeciesSchema.options;
|
|
1599
|
-
|
|
1600
|
-
// src/source/policy-types.ts
|
|
1601
|
-
var POLICY_TYPE_KEYS = new Set(POLICY_TYPES);
|
|
1591
|
+
function legacyOperationalProfileInput(value) {
|
|
1592
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
1593
|
+
const record = value;
|
|
1594
|
+
if ("linesOfBusiness" in record) return value;
|
|
1595
|
+
if (!("policyTypes" in record)) return value;
|
|
1596
|
+
return {
|
|
1597
|
+
...record,
|
|
1598
|
+
linesOfBusiness: record.policyTypes
|
|
1599
|
+
};
|
|
1600
|
+
}
|
|
1601
|
+
var OperationalLinesOfBusinessSchema = import_zod3.z.preprocess(
|
|
1602
|
+
(value) => Array.isArray(value) ? toLobCodes(value.filter((item) => typeof item === "string")) : void 0,
|
|
1603
|
+
import_zod3.z.array(AcordLobCodeSchema).default(["UN"])
|
|
1604
|
+
);
|
|
1605
|
+
var PolicyOperationalProfileSchema = import_zod3.z.preprocess(
|
|
1606
|
+
legacyOperationalProfileInput,
|
|
1607
|
+
import_zod3.z.object({
|
|
1608
|
+
documentType: import_zod3.z.enum(["policy", "quote"]).default("policy"),
|
|
1609
|
+
linesOfBusiness: OperationalLinesOfBusinessSchema,
|
|
1610
|
+
policyNumber: SourceBackedValueSchema.optional(),
|
|
1611
|
+
namedInsured: SourceBackedValueSchema.optional(),
|
|
1612
|
+
insurer: SourceBackedValueSchema.optional(),
|
|
1613
|
+
broker: SourceBackedValueSchema.optional(),
|
|
1614
|
+
effectiveDate: SourceBackedValueSchema.optional(),
|
|
1615
|
+
expirationDate: SourceBackedValueSchema.optional(),
|
|
1616
|
+
retroactiveDate: SourceBackedValueSchema.optional(),
|
|
1617
|
+
premium: SourceBackedValueSchema.optional(),
|
|
1618
|
+
coverages: import_zod3.z.array(OperationalCoverageLineSchema).default([]),
|
|
1619
|
+
parties: import_zod3.z.array(OperationalPartySchema).default([]),
|
|
1620
|
+
endorsementSupport: import_zod3.z.array(OperationalEndorsementSupportSchema).default([]),
|
|
1621
|
+
sourceNodeIds: import_zod3.z.array(import_zod3.z.string().min(1)).default([]),
|
|
1622
|
+
sourceSpanIds: import_zod3.z.array(import_zod3.z.string().min(1)).default([]),
|
|
1623
|
+
warnings: import_zod3.z.array(import_zod3.z.string()).default([])
|
|
1624
|
+
})
|
|
1625
|
+
);
|
|
1602
1626
|
|
|
1603
1627
|
// src/source/ids.ts
|
|
1604
1628
|
function normalizeText(text) {
|