@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.js
CHANGED
|
@@ -3345,6 +3345,10 @@ function inferPolicyTypes(nodes) {
|
|
|
3345
3345
|
const add = (pattern, type) => {
|
|
3346
3346
|
if (pattern.test(text) && !types.includes(type)) types.push(type);
|
|
3347
3347
|
};
|
|
3348
|
+
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");
|
|
3349
|
+
add(/\b(critical illness|critical illness insurance|covered critical illness|partial benefit payout)\b/i, "critical_illness");
|
|
3350
|
+
add(/\b(disability benefit|total disability|catastrophic disability|disability waiver|waiver of premium disability)\b/i, "disability");
|
|
3351
|
+
add(/\b(long[-\s]?term care|long term care conversion)\b/i, "long_term_care");
|
|
3348
3352
|
add(/\b(cyber|network security|privacy liability|data breach)\b/i, "cyber");
|
|
3349
3353
|
add(/\b(professional liability|errors?\s*&?\s*omissions|e&o)\b/i, "professional_liability");
|
|
3350
3354
|
add(/\b(commercial general liability|general liability|cgl)\b/i, "general_liability");
|
|
@@ -3789,8 +3793,8 @@ function buildDeterministicOperationalProfile(params) {
|
|
|
3789
3793
|
documentType: inferDocumentType(nodes),
|
|
3790
3794
|
policyTypes: inferPolicyTypes(nodes),
|
|
3791
3795
|
policyNumber: firstMatch(nodes, [
|
|
3792
|
-
/\bpolicy\s*(?:number|no\.?|#)\s*:?\s*([A-Z0-9][A-Z0-9
|
|
3793
|
-
/\bpolicy\s*[:#]\s*([A-Z0-9][A-Z0-9
|
|
3796
|
+
/\bpolicy\s*(?:number|no\.?|#)\s*:?\s*([A-Z0-9][A-Z0-9,.-]{4,}[A-Z0-9])/i,
|
|
3797
|
+
/\bpolicy\s*[:#]\s*([A-Z0-9][A-Z0-9,.-]{4,}[A-Z0-9])/i
|
|
3794
3798
|
]),
|
|
3795
3799
|
namedInsured: firstMatch(nodes, [
|
|
3796
3800
|
/\b(?:named insured|insured name|insured)\s*:?\s*(.+?)(?=\s+(?:coverage|policy number|insurer|carrier|premium|effective|expiration)\b|[|;\n]|$)/i,
|
|
@@ -3799,6 +3803,8 @@ function buildDeterministicOperationalProfile(params) {
|
|
|
3799
3803
|
insurer: firstMatch(nodes, [
|
|
3800
3804
|
/\b(?:insurer|carrier|company|security)\s*:?\s*([^|;\n]{3,120})/i,
|
|
3801
3805
|
/\bunderwritten by\s+([^|;\n]{3,120})/i
|
|
3806
|
+
]) ?? firstMatch(nodes, [
|
|
3807
|
+
/\b(Manulife)\b/i
|
|
3802
3808
|
]),
|
|
3803
3809
|
broker: firstMatch(nodes, [
|
|
3804
3810
|
/\b(?:broker|producer|agent)\s*:?\s*([^|;\n]{3,120})/i
|