sysone-api-mapper 1.0.120 → 1.0.122
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
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
getActivityList,
|
|
32
32
|
getPaymentFrecuencies,
|
|
33
|
+
getProductParameters,
|
|
33
34
|
getProductsBySubsections,
|
|
34
35
|
getQuotationByCode,
|
|
35
36
|
getQuotationByCode_Request,
|
|
@@ -402,6 +403,16 @@ const productModule = {
|
|
|
402
403
|
},
|
|
403
404
|
},
|
|
404
405
|
|
|
406
|
+
GET_PRODUCT_PARAMETERS: {
|
|
407
|
+
cnp: {
|
|
408
|
+
url: `party/v1/products/{0}`,
|
|
409
|
+
method: methods.GET,
|
|
410
|
+
requestMapper: request => ({ mappedParams: request }),
|
|
411
|
+
responseMapper: (response) => getProductParameters(response.data),
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
|
|
415
|
+
|
|
405
416
|
GET_MONETARY_GOALS: {
|
|
406
417
|
cnp: {
|
|
407
418
|
url: 'party/v1/products/{0}/monetary-goals',
|
|
@@ -442,6 +442,20 @@ export const getProductsBySubsections = async (response) => {
|
|
|
442
442
|
return objectMapped;
|
|
443
443
|
};
|
|
444
444
|
|
|
445
|
+
export const getProductParameters = async (item) => {
|
|
446
|
+
|
|
447
|
+
const objectMapped = {
|
|
448
|
+
name: item.name,
|
|
449
|
+
code: item.code,
|
|
450
|
+
version: item.version,
|
|
451
|
+
subsection: item?.subsection || null,
|
|
452
|
+
fieldExclusions: item?.exclusions || null,
|
|
453
|
+
fields: item?.fields || null
|
|
454
|
+
}
|
|
455
|
+
return objectMapped;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
|
|
445
459
|
export const getPaymentFrecuencies = async (response) => {
|
|
446
460
|
const objectMapped = {
|
|
447
461
|
frequencies: response.frequencies.map(a => ({
|