sysone-api-mapper 1.0.110 → 1.0.112
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
CHANGED
|
@@ -2,11 +2,11 @@ import moment from 'moment';
|
|
|
2
2
|
|
|
3
3
|
const getInsureds_CNP = async (response) => {
|
|
4
4
|
const objectMapped = {
|
|
5
|
-
total: response
|
|
5
|
+
total: response?.insureds?.length || 0,
|
|
6
6
|
totalActive: null,
|
|
7
|
-
values: response
|
|
7
|
+
values: response?.insureds?.length > 0 ? response?.insureds?.map((i) => ({
|
|
8
8
|
code: i.code,
|
|
9
|
-
number: i.
|
|
9
|
+
number: i.code,
|
|
10
10
|
firstName: i.firstName || i.name,
|
|
11
11
|
lastName: i.lastName,
|
|
12
12
|
type: {
|
|
@@ -14,8 +14,8 @@ const getInsureds_CNP = async (response) => {
|
|
|
14
14
|
name: i.role.code === "T" ? "Titular" : "Adherente"
|
|
15
15
|
},
|
|
16
16
|
status: {
|
|
17
|
-
code: "
|
|
18
|
-
name: "
|
|
17
|
+
code: i.status?.code || "-",
|
|
18
|
+
name: i.status?.name || "-"
|
|
19
19
|
},
|
|
20
20
|
insuredAmount: i.insuredAmount,
|
|
21
21
|
inclusionDate: i.entranceDate,
|
|
@@ -27,7 +27,7 @@ const getInsureds_CNP = async (response) => {
|
|
|
27
27
|
code: i.identification.type.code
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
}))
|
|
30
|
+
})) : []
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
return objectMapped
|
|
@@ -436,7 +436,7 @@ export const getProductsBySubsections = async (response) => {
|
|
|
436
436
|
version: item.version,
|
|
437
437
|
subsection: item?.subsection || null,
|
|
438
438
|
fieldExclusions: item?.fieldExclusions || null,
|
|
439
|
-
|
|
439
|
+
fields: item?.fieldValues || item?.fields || null
|
|
440
440
|
})),
|
|
441
441
|
};
|
|
442
442
|
return objectMapped;
|