sysone-api-mapper 1.0.122 → 1.0.124
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
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
getIdentificationTypes,
|
|
10
10
|
getMaritalStatuses,
|
|
11
11
|
getProductsBySubsections_Request,
|
|
12
|
-
getProvinces
|
|
12
|
+
getProvinces,
|
|
13
|
+
partySearchParams
|
|
13
14
|
} from "./modules/party";
|
|
14
15
|
import {
|
|
15
16
|
getEndorsements_CNP,
|
|
@@ -338,6 +339,23 @@ const partyModule = {
|
|
|
338
339
|
},
|
|
339
340
|
},
|
|
340
341
|
|
|
342
|
+
GET_PARTIES: {
|
|
343
|
+
default: {
|
|
344
|
+
url: 'party/v1/individuals',
|
|
345
|
+
method: methods.GET,
|
|
346
|
+
source: "https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1individuals/get",
|
|
347
|
+
requestMapper: (request) => ({ mappedParams: request }),
|
|
348
|
+
responseMapper: (response) => response.data,
|
|
349
|
+
},
|
|
350
|
+
cnp: {
|
|
351
|
+
url: 'party/v1/parties',
|
|
352
|
+
method: methods.GET,
|
|
353
|
+
source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-parties",
|
|
354
|
+
requestMapper: request => ({ mappedParams: partySearchParams(request) }),
|
|
355
|
+
responseMapper: (response) => response.data,
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
|
|
341
359
|
POST_AGE: {
|
|
342
360
|
default: {
|
|
343
361
|
url: '',
|
|
@@ -62,7 +62,13 @@ export const getProductsBySubsections_Request = (params) => {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
export const partySearchParams = (params) => {
|
|
66
|
+
return {
|
|
67
|
+
firstName: params.firstName || null,
|
|
68
|
+
lastName: params.lastName || null,
|
|
69
|
+
identification: params.identificationValue || null,
|
|
70
|
+
}
|
|
71
|
+
}
|
|
66
72
|
|
|
67
73
|
export const getCoverages = (p) => {
|
|
68
74
|
const objectMapped = {
|