@claritylabs/cl-sdk 3.0.28 → 3.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2989,6 +2989,10 @@ function inferPolicyTypes(nodes) {
|
|
|
2989
2989
|
const add = (pattern, type) => {
|
|
2990
2990
|
if (pattern.test(text) && !types.includes(type)) types.push(type);
|
|
2991
2991
|
};
|
|
2992
|
+
add(/\b(life insurance|permanent life|term life|whole life|universal life|sun permanent life|sun par protector|manulife par|vitality\s*plus|death benefit)\b/i, "life");
|
|
2993
|
+
add(/\b(critical illness|critical illness insurance|covered critical illness|partial benefit payout)\b/i, "critical_illness");
|
|
2994
|
+
add(/\b(disability benefit|total disability|catastrophic disability|disability waiver|waiver of premium disability)\b/i, "disability");
|
|
2995
|
+
add(/\b(long[-\s]?term care|long term care conversion)\b/i, "long_term_care");
|
|
2992
2996
|
add(/\b(cyber|network security|privacy liability|data breach)\b/i, "cyber");
|
|
2993
2997
|
add(/\b(professional liability|errors?\s*&?\s*omissions|e&o)\b/i, "professional_liability");
|
|
2994
2998
|
add(/\b(commercial general liability|general liability|cgl)\b/i, "general_liability");
|
|
@@ -3433,8 +3437,8 @@ function buildDeterministicOperationalProfile(params) {
|
|
|
3433
3437
|
documentType: inferDocumentType(nodes),
|
|
3434
3438
|
policyTypes: inferPolicyTypes(nodes),
|
|
3435
3439
|
policyNumber: firstMatch(nodes, [
|
|
3436
|
-
/\bpolicy\s*(?:number|no\.?|#)\s*:?\s*([A-Z0-9][A-Z0-9
|
|
3437
|
-
/\bpolicy\s*[:#]\s*([A-Z0-9][A-Z0-9
|
|
3440
|
+
/\bpolicy\s*(?:number|no\.?|#)\s*:?\s*([A-Z0-9][A-Z0-9,.-]{4,}[A-Z0-9])/i,
|
|
3441
|
+
/\bpolicy\s*[:#]\s*([A-Z0-9][A-Z0-9,.-]{4,}[A-Z0-9])/i
|
|
3438
3442
|
]),
|
|
3439
3443
|
namedInsured: firstMatch(nodes, [
|
|
3440
3444
|
/\b(?:named insured|insured name|insured)\s*:?\s*(.+?)(?=\s+(?:coverage|policy number|insurer|carrier|premium|effective|expiration)\b|[|;\n]|$)/i,
|
|
@@ -3443,6 +3447,8 @@ function buildDeterministicOperationalProfile(params) {
|
|
|
3443
3447
|
insurer: firstMatch(nodes, [
|
|
3444
3448
|
/\b(?:insurer|carrier|company|security)\s*:?\s*([^|;\n]{3,120})/i,
|
|
3445
3449
|
/\bunderwritten by\s+([^|;\n]{3,120})/i
|
|
3450
|
+
]) ?? firstMatch(nodes, [
|
|
3451
|
+
/\b(Manulife)\b/i
|
|
3446
3452
|
]),
|
|
3447
3453
|
broker: firstMatch(nodes, [
|
|
3448
3454
|
/\b(?:broker|producer|agent)\s*:?\s*([^|;\n]{3,120})/i
|