@autologix-engineering/shared 1.2.378 → 1.2.379
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/package.json +1 -1
- package/src/lib/data-transfer-objects/src/update.pickup.detection.config.dto.d.ts +1 -1
- package/src/lib/data-transfer-objects/src/update.pickup.detection.config.dto.js +1 -1
- package/src/lib/data-transfer-objects/src/update.pickup.detection.config.dto.js.map +1 -1
- package/src/lib/models/src/vehicle.association.file.model.d.ts +29 -4
- package/src/lib/models/src/vehicle.association.file.model.js +27 -3
- package/src/lib/models/src/vehicle.association.file.model.js.map +1 -1
- package/src/lib/utilities/src/index.d.ts +1 -0
- package/src/lib/utilities/src/index.js +1 -0
- package/src/lib/utilities/src/index.js.map +1 -1
- package/src/lib/utilities/src/insurer.match.d.ts +45 -0
- package/src/lib/utilities/src/insurer.match.js +55 -0
- package/src/lib/utilities/src/insurer.match.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { IsEnum, IsInt, IsPositive, IsUUID } from 'class-validator';
|
|
3
|
-
import { PickupDetectionMode } from '
|
|
3
|
+
import { PickupDetectionMode } from '../../enums/src/index';
|
|
4
4
|
export class UpdatePickupDetectionConfigDTO {
|
|
5
5
|
constructor(obj) {
|
|
6
6
|
Object.assign(this, obj);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.pickup.detection.config.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/update.pickup.detection.config.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"update.pickup.detection.config.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/update.pickup.detection.config.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,OAAO,8BAA8B;IAS1C,YAAY,GAA6C;QACxD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAVA;IADC,MAAM,EAAE;;uEACe;AAExB;IADC,MAAM,CAAC,mBAAmB,CAAC;;2EACa;AAGzC;IAFC,UAAU,EAAE;IACZ,KAAK,EAAE;;+EACwB"}
|
|
@@ -64,11 +64,35 @@ export declare enum VehicleAssociationFileField {
|
|
|
64
64
|
* underwriter, while the vendor master only holds counterparties the
|
|
65
65
|
* business transacts with, so there is often no correct row to point at.
|
|
66
66
|
*
|
|
67
|
-
* So this
|
|
68
|
-
* reported, and
|
|
69
|
-
*
|
|
67
|
+
* So this stays evidence, not a reference: it is always shown verbatim as
|
|
68
|
+
* what Vahan reported, and it is never overwritten by whatever the vendor
|
|
69
|
+
* master happens to call the same company.
|
|
70
|
+
*
|
|
71
|
+
* See {@link VehicleAssociationFileField.IssuerVendorId} for the one narrow
|
|
72
|
+
* case where a link IS drawn.
|
|
73
|
+
*/
|
|
74
|
+
Issuer = "cmplIssuer",
|
|
75
|
+
/**
|
|
76
|
+
* The vendor this issuer resolves to, when — and only when — the name is an
|
|
77
|
+
* exact match in the vendor master.
|
|
78
|
+
*
|
|
79
|
+
* The blanket "never resolve automatically" rule above was relaxed by
|
|
80
|
+
* product to exactly this case. Exact is doing real work: a match means the
|
|
81
|
+
* two strings ARE the same name, not that they look alike, so it cannot
|
|
82
|
+
* bind a policy to a near-miss legal entity. Ambiguity resolves to null
|
|
83
|
+
* rather than to a guess, and candidates are narrowed to vendors the user
|
|
84
|
+
* could have picked from the dropdown by hand.
|
|
85
|
+
*
|
|
86
|
+
* Null is the normal, expected state. The RTO names the actual underwriter
|
|
87
|
+
* while the vendor master holds counterparties the business transacts with,
|
|
88
|
+
* so there is frequently no correct row to point at — on staging today no
|
|
89
|
+
* issuer Vahan has returned exists in the master at all. This saves a click
|
|
90
|
+
* where it can and stays out of the way where it cannot.
|
|
91
|
+
*
|
|
92
|
+
* {@link VehicleAssociationFileField.Issuer} remains the source of truth
|
|
93
|
+
* for what the provider actually said.
|
|
70
94
|
*/
|
|
71
|
-
|
|
95
|
+
IssuerVendorId = "cmplIssuerVendorId"
|
|
72
96
|
}
|
|
73
97
|
export interface IVehicleAssociationFile extends TypedModel {
|
|
74
98
|
[VehicleAssociationFileField.VehicleAssociationFileId]: string;
|
|
@@ -98,4 +122,5 @@ export interface IVehicleAssociationFile extends TypedModel {
|
|
|
98
122
|
[VehicleAssociationFileField.GraceUntil]?: Date | null;
|
|
99
123
|
[VehicleAssociationFileField.DocumentNumber]?: string | null;
|
|
100
124
|
[VehicleAssociationFileField.Issuer]?: string | null;
|
|
125
|
+
[VehicleAssociationFileField.IssuerVendorId]?: string | null;
|
|
101
126
|
}
|
|
@@ -70,10 +70,34 @@ export var VehicleAssociationFileField;
|
|
|
70
70
|
* underwriter, while the vendor master only holds counterparties the
|
|
71
71
|
* business transacts with, so there is often no correct row to point at.
|
|
72
72
|
*
|
|
73
|
-
* So this
|
|
74
|
-
* reported, and
|
|
75
|
-
*
|
|
73
|
+
* So this stays evidence, not a reference: it is always shown verbatim as
|
|
74
|
+
* what Vahan reported, and it is never overwritten by whatever the vendor
|
|
75
|
+
* master happens to call the same company.
|
|
76
|
+
*
|
|
77
|
+
* See {@link VehicleAssociationFileField.IssuerVendorId} for the one narrow
|
|
78
|
+
* case where a link IS drawn.
|
|
76
79
|
*/
|
|
77
80
|
VehicleAssociationFileField["Issuer"] = "cmplIssuer";
|
|
81
|
+
/**
|
|
82
|
+
* The vendor this issuer resolves to, when — and only when — the name is an
|
|
83
|
+
* exact match in the vendor master.
|
|
84
|
+
*
|
|
85
|
+
* The blanket "never resolve automatically" rule above was relaxed by
|
|
86
|
+
* product to exactly this case. Exact is doing real work: a match means the
|
|
87
|
+
* two strings ARE the same name, not that they look alike, so it cannot
|
|
88
|
+
* bind a policy to a near-miss legal entity. Ambiguity resolves to null
|
|
89
|
+
* rather than to a guess, and candidates are narrowed to vendors the user
|
|
90
|
+
* could have picked from the dropdown by hand.
|
|
91
|
+
*
|
|
92
|
+
* Null is the normal, expected state. The RTO names the actual underwriter
|
|
93
|
+
* while the vendor master holds counterparties the business transacts with,
|
|
94
|
+
* so there is frequently no correct row to point at — on staging today no
|
|
95
|
+
* issuer Vahan has returned exists in the master at all. This saves a click
|
|
96
|
+
* where it can and stays out of the way where it cannot.
|
|
97
|
+
*
|
|
98
|
+
* {@link VehicleAssociationFileField.Issuer} remains the source of truth
|
|
99
|
+
* for what the provider actually said.
|
|
100
|
+
*/
|
|
101
|
+
VehicleAssociationFileField["IssuerVendorId"] = "cmplIssuerVendorId";
|
|
78
102
|
})(VehicleAssociationFileField || (VehicleAssociationFileField = {}));
|
|
79
103
|
//# sourceMappingURL=vehicle.association.file.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vehicle.association.file.model.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/models/src/vehicle.association.file.model.ts"],"names":[],"mappings":"AAUA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"vehicle.association.file.model.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/models/src/vehicle.association.file.model.ts"],"names":[],"mappings":"AAUA,MAAM,CAAN,IAAY,2BAsGX;AAtGD,WAAY,2BAA2B;IACtC,oFAAqD,CAAA;IACrD,wEAAyC,CAAA;IACzC,4EAA6C,CAAA;IAC7C,4CAAa,CAAA;IACb,wDAAyB,CAAA;IACzB,sDAAuB,CAAA;IACvB,sDAAuB,CAAA;IACvB,sDAAuB,CAAA;IACvB,wDAAyB,CAAA;IACzB,wDAAyB,CAAA;IACzB,4CAAa,CAAA;IACb,gDAAiB,CAAA;IACjB,kDAAmB,CAAA;IACnB,kDAAmB,CAAA;IACnB,sDAAuB,CAAA;IACvB,oDAAqB,CAAA;IACrB,kDAAmB,CAAA;IAEnB,2EAA2E;IAC3E,2EAA2E;IAC3E,wEAAwE;IACxE,0EAA0E;IAC1E,iCAAiC;IACjC,EAAE;IACF,mEAAmE;IACnE,4EAA4E;IAC5E,uEAAuE;IACvE,uDAAuD;IAEvD,yEAAyE;IACzE,oDAAqB,CAAA;IACrB,wEAAwE;IACxE,kEAAmC,CAAA;IACnC,kEAAmC,CAAA;IACnC,2CAA2C;IAC3C,oEAAqC,CAAA;IACrC;;;;OAIG;IACH,oEAAqC,CAAA;IACrC,gEAAgE;IAChE,iFAAkD,CAAA;IAClD,+EAA+E;IAC/E,4DAA6B,CAAA;IAC7B;;;;;;;;OAQG;IACH,2DAA4B,CAAA;IAC5B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,oDAAqB,CAAA;IACrB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,oEAAqC,CAAA;AACtC,CAAC,EAtGW,2BAA2B,KAA3B,2BAA2B,QAsGtC"}
|
|
@@ -44,5 +44,6 @@ export * from './resolve.gst.state';
|
|
|
44
44
|
export * from './ba.contract.lock';
|
|
45
45
|
export * from './vehicle.insurance.validity';
|
|
46
46
|
export * from './spot.placeholder.registration';
|
|
47
|
+
export * from './insurer.match';
|
|
47
48
|
export * from './ba.payout.workshop.days';
|
|
48
49
|
export * from './financial.year';
|
|
@@ -44,6 +44,7 @@ export * from './resolve.gst.state';
|
|
|
44
44
|
export * from './ba.contract.lock';
|
|
45
45
|
export * from './vehicle.insurance.validity';
|
|
46
46
|
export * from './spot.placeholder.registration';
|
|
47
|
+
export * from './insurer.match';
|
|
47
48
|
export * from './ba.payout.workshop.days';
|
|
48
49
|
export * from './financial.year';
|
|
49
50
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,OAAO,CAAC;AACtB,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uCAAuC,CAAC;AACtD,cAAc,mBAAmB,CAAC;AAClC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,OAAO,CAAC;AACtB,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uCAAuC,CAAC;AACtD,cAAc,mBAAmB,CAAC;AAClC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exact-match resolution of a provider's free-text insurer name onto the
|
|
3
|
+
* internal vendor master (AD-3140).
|
|
4
|
+
*
|
|
5
|
+
* The rule is deliberately EXACT, not similar. Binding a policy to the wrong
|
|
6
|
+
* legal entity is worse than leaving the link empty: VehicleInsurance.Company
|
|
7
|
+
* points at a VendorPersona carrying a GSTIN, a PAN and bank details, and it is
|
|
8
|
+
* reachable from maintenance invoicing. A near-miss that silently picks the
|
|
9
|
+
* wrong underwriter is a financial record pointing at the wrong company, and
|
|
10
|
+
* nothing downstream would flag it. An empty field, by contrast, is obvious and
|
|
11
|
+
* a human fixes it in one click.
|
|
12
|
+
*
|
|
13
|
+
* "Exact" here means exact after normalising away differences that carry no
|
|
14
|
+
* meaning — letter case, and runs of whitespace. Nothing else. The RTO really
|
|
15
|
+
* does emit names like 'Shriram General Insurance Co. Ltd.' with a doubled
|
|
16
|
+
* space, so a raw === would fail on data that is character-for-character the
|
|
17
|
+
* same name; that is a transcription artefact, not a different company.
|
|
18
|
+
*
|
|
19
|
+
* Punctuation is NOT normalised away, and that is a decision rather than an
|
|
20
|
+
* oversight. Folding '.' and ',' would make 'ICICI LOMBARD GENERAL INSURANCE CO
|
|
21
|
+
* LTD' match the RTO's 'ICICI LOMBARD General Insurance Co. Ltd.' — probably
|
|
22
|
+
* correct — but it also erodes the property that makes this safe to run
|
|
23
|
+
* unattended: that a match means the two strings ARE the same name. Each
|
|
24
|
+
* loosening has to be argued for on its own; this one has not been.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Case-folded, whitespace-collapsed form used for comparison only.
|
|
28
|
+
* Never persist or display this — the stored issuer text stays verbatim.
|
|
29
|
+
*/
|
|
30
|
+
export declare const normaliseInsurerName: (name: string | null | undefined) => string;
|
|
31
|
+
/**
|
|
32
|
+
* Picks the single vendor whose name is exactly the provider's insurer name.
|
|
33
|
+
*
|
|
34
|
+
* Returns null when there is no match AND when there is more than one, because
|
|
35
|
+
* ambiguity is not a tie to be broken: two vendors sharing a name are two
|
|
36
|
+
* different legal entities, and guessing between them is the failure this whole
|
|
37
|
+
* routine exists to avoid. The vendor master has no uniqueness constraint on
|
|
38
|
+
* name, so duplicates are possible in principle even where none exist today.
|
|
39
|
+
*
|
|
40
|
+
* `candidates` must already be narrowed to vendors the user could have picked
|
|
41
|
+
* by hand — same business context, Insurance category, not disconnected. An
|
|
42
|
+
* auto-link that points somewhere the dropdown would never offer is a bug, not
|
|
43
|
+
* a convenience.
|
|
44
|
+
*/
|
|
45
|
+
export declare const matchInsurerVendor: <T>(issuerName: string | null | undefined, candidates: readonly T[], nameOf: (candidate: T) => string | null | undefined) => T | null;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exact-match resolution of a provider's free-text insurer name onto the
|
|
3
|
+
* internal vendor master (AD-3140).
|
|
4
|
+
*
|
|
5
|
+
* The rule is deliberately EXACT, not similar. Binding a policy to the wrong
|
|
6
|
+
* legal entity is worse than leaving the link empty: VehicleInsurance.Company
|
|
7
|
+
* points at a VendorPersona carrying a GSTIN, a PAN and bank details, and it is
|
|
8
|
+
* reachable from maintenance invoicing. A near-miss that silently picks the
|
|
9
|
+
* wrong underwriter is a financial record pointing at the wrong company, and
|
|
10
|
+
* nothing downstream would flag it. An empty field, by contrast, is obvious and
|
|
11
|
+
* a human fixes it in one click.
|
|
12
|
+
*
|
|
13
|
+
* "Exact" here means exact after normalising away differences that carry no
|
|
14
|
+
* meaning — letter case, and runs of whitespace. Nothing else. The RTO really
|
|
15
|
+
* does emit names like 'Shriram General Insurance Co. Ltd.' with a doubled
|
|
16
|
+
* space, so a raw === would fail on data that is character-for-character the
|
|
17
|
+
* same name; that is a transcription artefact, not a different company.
|
|
18
|
+
*
|
|
19
|
+
* Punctuation is NOT normalised away, and that is a decision rather than an
|
|
20
|
+
* oversight. Folding '.' and ',' would make 'ICICI LOMBARD GENERAL INSURANCE CO
|
|
21
|
+
* LTD' match the RTO's 'ICICI LOMBARD General Insurance Co. Ltd.' — probably
|
|
22
|
+
* correct — but it also erodes the property that makes this safe to run
|
|
23
|
+
* unattended: that a match means the two strings ARE the same name. Each
|
|
24
|
+
* loosening has to be argued for on its own; this one has not been.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Case-folded, whitespace-collapsed form used for comparison only.
|
|
28
|
+
* Never persist or display this — the stored issuer text stays verbatim.
|
|
29
|
+
*/
|
|
30
|
+
export const normaliseInsurerName = (name) => (name ?? '')
|
|
31
|
+
.replace(/\s+/g, ' ')
|
|
32
|
+
.trim()
|
|
33
|
+
.toLowerCase();
|
|
34
|
+
/**
|
|
35
|
+
* Picks the single vendor whose name is exactly the provider's insurer name.
|
|
36
|
+
*
|
|
37
|
+
* Returns null when there is no match AND when there is more than one, because
|
|
38
|
+
* ambiguity is not a tie to be broken: two vendors sharing a name are two
|
|
39
|
+
* different legal entities, and guessing between them is the failure this whole
|
|
40
|
+
* routine exists to avoid. The vendor master has no uniqueness constraint on
|
|
41
|
+
* name, so duplicates are possible in principle even where none exist today.
|
|
42
|
+
*
|
|
43
|
+
* `candidates` must already be narrowed to vendors the user could have picked
|
|
44
|
+
* by hand — same business context, Insurance category, not disconnected. An
|
|
45
|
+
* auto-link that points somewhere the dropdown would never offer is a bug, not
|
|
46
|
+
* a convenience.
|
|
47
|
+
*/
|
|
48
|
+
export const matchInsurerVendor = (issuerName, candidates, nameOf) => {
|
|
49
|
+
const target = normaliseInsurerName(issuerName);
|
|
50
|
+
if (!target)
|
|
51
|
+
return null;
|
|
52
|
+
const matches = candidates.filter((candidate) => normaliseInsurerName(nameOf(candidate)) === target);
|
|
53
|
+
return matches.length === 1 ? matches[0] : null;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=insurer.match.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insurer.match.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/insurer.match.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAA+B,EAAU,EAAE,CAC/E,CAAC,IAAI,IAAI,EAAE,CAAC;KACV,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;KACpB,IAAI,EAAE;KACN,WAAW,EAAE,CAAC;AAEjB;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CACjC,UAAqC,EACrC,UAAwB,EACxB,MAAmD,EACxC,EAAE;IACb,MAAM,MAAM,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAChD,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAChC,CAAC,SAAS,EAAE,EAAE,CAAC,oBAAoB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,MAAM,CACjE,CAAC;IAEF,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC,CAAC"}
|