sysone-api-mapper 1.0.148 → 1.0.149

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.
Files changed (46) hide show
  1. package/{axiosInstance.js → dist/axiosInstance.js} +5 -7
  2. package/dist/index.d.ts +2 -2
  3. package/{index.ts → dist/index.js} +7 -20
  4. package/dist/services.js +92 -0
  5. package/dist/servicesData.js +996 -0
  6. package/dist/src/adapters/createApiAdapter.js +8 -0
  7. package/{src → dist/src}/adapters/financeAdapter.js +4 -5
  8. package/{src → dist/src}/adapters/locationAdapter.js +5 -6
  9. package/{src → dist/src}/adapters/partyAdapter.js +7 -8
  10. package/{src → dist/src}/components/notificationToast.js +35 -37
  11. package/dist/src/contexts/actionsContext.js +43 -0
  12. package/{src → dist/src}/contexts/apiContext.js +8 -9
  13. package/dist/src/contexts/translationContext.js +19 -0
  14. package/dist/src/mapper/Mapper.js +98 -0
  15. package/{src → dist/src}/mapper/endpointsConfig.js +821 -915
  16. package/{src → dist/src}/mapper/helpers/mappingHelpers.js +24 -26
  17. package/{src → dist/src}/mapper/modules/billing/index.js +128 -131
  18. package/{src → dist/src}/mapper/modules/claim/index.js +15 -17
  19. package/{src → dist/src}/mapper/modules/general/index.js +6 -7
  20. package/{src → dist/src}/mapper/modules/party/index.js +119 -128
  21. package/dist/src/mapper/modules/policy/index.js +573 -0
  22. package/dist/src/mapper/modules/quotation/index.js +477 -0
  23. package/{src → dist/src}/mapper/modules/request/index.js +60 -67
  24. package/dist/src/public/index.js +7 -0
  25. package/{src → dist/src}/server.js +18 -23
  26. package/package.json +3 -3
  27. package/.babelrc +0 -4
  28. package/.gitlab-ci.yml +0 -42
  29. package/config/dist/index.js +0 -307
  30. package/config/dist/index.js.LICENSE.txt +0 -1
  31. package/config/dist/index.ts +0 -319
  32. package/config/webpack.dev.js +0 -63
  33. package/config/webpack.prod.js +0 -63
  34. package/index.d.ts +0 -5
  35. package/services.js +0 -105
  36. package/servicesData.js +0 -1013
  37. package/src/adapters/createApiAdapter.ts +0 -29
  38. package/src/contexts/actionsContext.js +0 -54
  39. package/src/contexts/translationContext.js +0 -29
  40. package/src/mapper/Mapper.js +0 -141
  41. package/src/mapper/modules/policy/index.js +0 -613
  42. package/src/mapper/modules/quotation/index.js +0 -480
  43. package/src/public/index.html +0 -15
  44. package/src/public/index.js +0 -9
  45. package/test/script.js +0 -0
  46. package/tsconfig.json +0 -9
@@ -0,0 +1,573 @@
1
+ import dayjs from 'dayjs';
2
+ import customParseFormat from 'dayjs/plugin/customParseFormat';
3
+ dayjs.extend(customParseFormat);
4
+ const parseSafeDate = (dateString) => {
5
+ if (!dateString)
6
+ return null;
7
+ try {
8
+ // Parsear explícitamente con el formato DD/MM/YYYY
9
+ // El tercer parámetro 'true' activa el modo strict
10
+ const parsed = dayjs(dateString, 'DD/MM/YYYY', true);
11
+ // Verificar si la fecha es válida
12
+ if (!parsed.isValid()) {
13
+ console.warn(`Invalid date format: ${dateString}`);
14
+ return null;
15
+ }
16
+ return parsed.toISOString();
17
+ }
18
+ catch (error) {
19
+ console.error(`Error parsing date: ${dateString}`, error);
20
+ return null;
21
+ }
22
+ };
23
+ const getInsureds_CNP = async (response) => {
24
+ var _a, _b, _c;
25
+ const objectMapped = {
26
+ total: ((_a = response === null || response === void 0 ? void 0 : response.insureds) === null || _a === void 0 ? void 0 : _a.length) || 0,
27
+ totalActive: null,
28
+ values: ((_b = response === null || response === void 0 ? void 0 : response.insureds) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (_c = response === null || response === void 0 ? void 0 : response.insureds) === null || _c === void 0 ? void 0 : _c.map((i) => {
29
+ var _a, _b;
30
+ return ({
31
+ code: i.code,
32
+ number: i.code,
33
+ firstName: i.firstName || i.name,
34
+ lastName: i.lastName,
35
+ type: {
36
+ code: i.role.code === "T" ? "OWNER" : "ADHERENT",
37
+ name: i.role.code === "T" ? "Titular" : "Adherente"
38
+ },
39
+ status: {
40
+ code: ((_a = i.status) === null || _a === void 0 ? void 0 : _a.code) || "-",
41
+ name: ((_b = i.status) === null || _b === void 0 ? void 0 : _b.name) || "-"
42
+ },
43
+ insuredAmount: i.insuredAmount,
44
+ inclusionDate: i.entranceDate,
45
+ exclusionDate: i.cancellationDate,
46
+ identification: {
47
+ value: i.identification.number,
48
+ type: {
49
+ name: i.identification.type.name,
50
+ code: i.identification.type.code
51
+ }
52
+ }
53
+ });
54
+ }) : []
55
+ };
56
+ return objectMapped;
57
+ };
58
+ const getInsureds_CNP_Request = (inputParams) => {
59
+ return {
60
+ code: inputParams.number || undefined,
61
+ name: inputParams.firstName || undefined,
62
+ };
63
+ };
64
+ const postInsureds_CNP = (payload) => {
65
+ const objectMapped = {
66
+ salary: typeof payload.salary === 'string' ? payload.salary : String(payload.salary),
67
+ identification: typeof payload.identification === 'string' ? payload.identification : String(payload.identification)
68
+ };
69
+ return objectMapped;
70
+ };
71
+ const getEndorsements_CNP = async (response) => {
72
+ const objectMapped = {
73
+ values: response.endorsements.map((e) => ({
74
+ activeDate: e.dateFrom ? parseSafeDate(e.dateFrom) : null,
75
+ number: e.number,
76
+ type: {
77
+ code: e.detail,
78
+ name: e.detail,
79
+ group: {}
80
+ },
81
+ validityFrom: e.dateFrom ? parseSafeDate(e.dateFrom) : null,
82
+ validityTo: e.dateTo ? parseSafeDate(e.dateTo) : null,
83
+ })),
84
+ total: response.endorsements.length,
85
+ };
86
+ return objectMapped;
87
+ };
88
+ const getEndorsements_Request = (inputParams) => {
89
+ return {};
90
+ };
91
+ const getPolicies_CNP = async (response) => {
92
+ if (!(response === null || response === void 0 ? void 0 : response.policies) || response.policies.length === 0) {
93
+ return {
94
+ values: [],
95
+ total: 0
96
+ };
97
+ }
98
+ const objectMapped = {
99
+ values: response.policies.map((p) => {
100
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
101
+ return ({
102
+ number: p.number,
103
+ validityFrom: parseSafeDate(p.issueDate),
104
+ validityTo: "N/A",
105
+ ingress: parseSafeDate(p.issueDate),
106
+ holder: {
107
+ name: ((_a = p.holder) === null || _a === void 0 ? void 0 : _a.name) || ((_b = p.holder) === null || _b === void 0 ? void 0 : _b.firstName),
108
+ identifications: {
109
+ values: [
110
+ {
111
+ value: ((_d = (_c = p.holder) === null || _c === void 0 ? void 0 : _c.identification) === null || _d === void 0 ? void 0 : _d.number) || null,
112
+ type: {
113
+ name: ((_g = (_f = (_e = p.holder) === null || _e === void 0 ? void 0 : _e.identification) === null || _f === void 0 ? void 0 : _f.type) === null || _g === void 0 ? void 0 : _g.name) || null,
114
+ code: ((_k = (_j = (_h = p.holder) === null || _h === void 0 ? void 0 : _h.identification) === null || _j === void 0 ? void 0 : _j.type) === null || _k === void 0 ? void 0 : _k.code) || null
115
+ },
116
+ default: true
117
+ }
118
+ ]
119
+ }
120
+ },
121
+ code: p.number,
122
+ alias: "N/A",
123
+ product: {
124
+ code: ((_m = (_l = p.product) === null || _l === void 0 ? void 0 : _l.code) === null || _m === void 0 ? void 0 : _m.toString()) || null,
125
+ name: ((_o = p.product) === null || _o === void 0 ? void 0 : _o.name) || null,
126
+ subsection: {
127
+ name: "N/A",
128
+ code: "N/A",
129
+ section: {
130
+ name: ((_p = p.section) === null || _p === void 0 ? void 0 : _p.name) || null,
131
+ code: ((_q = p.section) === null || _q === void 0 ? void 0 : _q.code) || null,
132
+ }
133
+ }
134
+ },
135
+ process: {
136
+ name: ((_r = p.status) === null || _r === void 0 ? void 0 : _r.name) || null,
137
+ code: "N/A"
138
+ }
139
+ });
140
+ }),
141
+ total: response.totalRecord || 0,
142
+ };
143
+ return objectMapped;
144
+ };
145
+ const getPolicies_CNP_Request = (inputParams) => {
146
+ return {
147
+ sort: "TomadorCodigo",
148
+ orderType: "desc",
149
+ pageNumber: inputParams.page || 1,
150
+ pageSize: inputParams.pageSize || 10,
151
+ allPolicies: null,
152
+ policyNumber: inputParams.number,
153
+ holderIdentification: inputParams.holderPartyCode,
154
+ requestNumber: inputParams.requestNumber,
155
+ };
156
+ };
157
+ const getPolicyDetail_CNP = async (data) => {
158
+ var _a, _b, _c, _d, _e, _f, _g, _h;
159
+ const objectMapped = {
160
+ policyData: {
161
+ alias: null,
162
+ creationDate: data.insured.policyDateFrom,
163
+ currency: data === null || data === void 0 ? void 0 : data.currency,
164
+ number: data.number,
165
+ process: data.status,
166
+ renewable: null,
167
+ validityy: {
168
+ dateFrom: data === null || data === void 0 ? void 0 : data.vigencyDateFrom,
169
+ dateTo: data === null || data === void 0 ? void 0 : data.vigencyDateTo,
170
+ },
171
+ },
172
+ roleData: {
173
+ holder: {
174
+ identification: {
175
+ type: data === null || data === void 0 ? void 0 : data.holder.identification.type,
176
+ value: (_a = data === null || data === void 0 ? void 0 : data.holder.identification) === null || _a === void 0 ? void 0 : _a.number
177
+ },
178
+ name: data.holder.name,
179
+ partyCode: data.holder.code || data.holder.id,
180
+ partyType: null
181
+ },
182
+ contacts: [
183
+ {
184
+ identification: {
185
+ type: data === null || data === void 0 ? void 0 : data.holder.identification.type,
186
+ value: (_b = data === null || data === void 0 ? void 0 : data.holder.identification) === null || _b === void 0 ? void 0 : _b.number
187
+ },
188
+ name: data.holder.name,
189
+ partyCode: data.holder.code || data.holder.id,
190
+ partyType: null
191
+ },
192
+ ]
193
+ },
194
+ collectionData: {
195
+ paymentMethodData: {
196
+ simpleMethodData: {
197
+ number: data.paymentMethod.number,
198
+ type: data.paymentMethod.type,
199
+ }
200
+ },
201
+ paymentFrequency: data.paymentMethod.periodicity
202
+ },
203
+ commercialStructureData: {
204
+ data: {},
205
+ intermediaries: {
206
+ values: [
207
+ {
208
+ code: data.intermediary.id,
209
+ name: data.intermediary.name,
210
+ role: null,
211
+ status: null
212
+ }
213
+ ]
214
+ }
215
+ },
216
+ productData: {
217
+ number: data.product.code || data.product.id,
218
+ name: data.product.name,
219
+ status: {},
220
+ subsection: {
221
+ name: null,
222
+ code: null,
223
+ section: data.section
224
+ }
225
+ },
226
+ coverageData: {
227
+ coverages: (_c = data === null || data === void 0 ? void 0 : data.insured) === null || _c === void 0 ? void 0 : _c.coverages.map(cv => ({
228
+ ageType: null,
229
+ deductible: null,
230
+ coverage: {
231
+ calculatorType: null,
232
+ code: null,
233
+ name: cv.name,
234
+ type: cv.type
235
+ },
236
+ values: [{
237
+ minValue: cv.amount,
238
+ maxValue: cv.amount,
239
+ type: {
240
+ code: "INSURED_AMOUNT",
241
+ name: "Suma aseguradas"
242
+ }
243
+ }]
244
+ })),
245
+ },
246
+ expenseData: {
247
+ values: []
248
+ },
249
+ wordingData: {
250
+ wordings: []
251
+ },
252
+ termData: {
253
+ values: []
254
+ },
255
+ documentationData: {
256
+ files: [],
257
+ comments: "",
258
+ },
259
+ endorsementData: {
260
+ number: data === null || data === void 0 ? void 0 : data.endorsementNumber
261
+ },
262
+ insurableData: {
263
+ minimumQuantityInsured: 0,
264
+ estimatedDeadline: ((_d = data === null || data === void 0 ? void 0 : data.insured) === null || _d === void 0 ? void 0 : _d.entranceDate) || null,
265
+ minimumAge: 0,
266
+ maximumAge: 0,
267
+ maximumQuantityInsuredByEvent: 0,
268
+ maximumAmountToIndemnify: 0,
269
+ insurables: (data === null || data === void 0 ? void 0 : data.insured) ? [{
270
+ type: {
271
+ name: ((_f = (_e = data === null || data === void 0 ? void 0 : data.insured) === null || _e === void 0 ? void 0 : _e.type) === null || _f === void 0 ? void 0 : _f.name) || null,
272
+ code: ((_h = (_g = data === null || data === void 0 ? void 0 : data.insured) === null || _g === void 0 ? void 0 : _g.type) === null || _h === void 0 ? void 0 : _h.code) || null,
273
+ },
274
+ wording: null,
275
+ minimumEntryAge: 0,
276
+ maximumEntryAge: 0,
277
+ endingAgePrincipalCoverage: 0,
278
+ endingAgeAditionalCoverage: 0,
279
+ }] : null
280
+ },
281
+ savings: {
282
+ accountBalance: (data === null || data === void 0 ? void 0 : data.accountBalance) || null,
283
+ annualPremium: (data === null || data === void 0 ? void 0 : data.annualPremium) || null,
284
+ premium: (data === null || data === void 0 ? void 0 : data.premium) || null,
285
+ prize: (data === null || data === void 0 ? void 0 : data.prize) || null,
286
+ simpleEndorsementPremium: (data === null || data === void 0 ? void 0 : data.simpleEndorsementPremium) || null,
287
+ },
288
+ salesAgent: (data === null || data === void 0 ? void 0 : data.salesAgent) || null,
289
+ salesBranch: (data === null || data === void 0 ? void 0 : data.salesBranch) || null,
290
+ };
291
+ return objectMapped;
292
+ };
293
+ const getPolicyCollection = async (data) => {
294
+ const objectMapped = {
295
+ billingForm: {},
296
+ holderDistribution: null,
297
+ insuredDistribution: null,
298
+ paymentFrecuency: data.paymentMethod.periodicity,
299
+ paymentMethodData: {
300
+ simpleMethodData: {
301
+ number: data.paymentMethod.number,
302
+ method: data.paymentMethod.type,
303
+ }
304
+ },
305
+ };
306
+ return objectMapped;
307
+ };
308
+ const getPolicyCollectiveDetail_CNP = async (response) => {
309
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16;
310
+ const objectMapped = {
311
+ policyData: {
312
+ number: (response === null || response === void 0 ? void 0 : response.number) || null,
313
+ alias: "N/A",
314
+ currency: {
315
+ name: ((_a = response === null || response === void 0 ? void 0 : response.currency) === null || _a === void 0 ? void 0 : _a.name) || null,
316
+ code: ((_b = response === null || response === void 0 ? void 0 : response.currency) === null || _b === void 0 ? void 0 : _b.code) || null,
317
+ mnemonic: "N/A",
318
+ symbol: ((_c = response === null || response === void 0 ? void 0 : response.currency) === null || _c === void 0 ? void 0 : _c.symbol) || null
319
+ },
320
+ validity: {
321
+ type: {
322
+ name: ((_d = response === null || response === void 0 ? void 0 : response.currency) === null || _d === void 0 ? void 0 : _d.name) || null,
323
+ code: ((_e = response === null || response === void 0 ? void 0 : response.currency) === null || _e === void 0 ? void 0 : _e.code) || null,
324
+ months: "N/A"
325
+ },
326
+ dateFrom: (response === null || response === void 0 ? void 0 : response.vigencyDateFrom) ? parseSafeDate(response.vigencyDateFrom) : null,
327
+ dateTo: (response === null || response === void 0 ? void 0 : response.vigencyDateTo) ? parseSafeDate(response.vigencyDateTo) : null,
328
+ },
329
+ creationDate: (response === null || response === void 0 ? void 0 : response.issueDate) ? parseSafeDate(response.issueDate) : null,
330
+ renewable: true,
331
+ process: {
332
+ name: ((_f = response === null || response === void 0 ? void 0 : response.status) === null || _f === void 0 ? void 0 : _f.name) || null,
333
+ code: "N/A"
334
+ }
335
+ },
336
+ roleData: {
337
+ holder: {
338
+ partyCode: ((_g = response === null || response === void 0 ? void 0 : response.holder) === null || _g === void 0 ? void 0 : _g.code) || null,
339
+ name: ((_h = response === null || response === void 0 ? void 0 : response.holder) === null || _h === void 0 ? void 0 : _h.firstName) && ((_j = response === null || response === void 0 ? void 0 : response.holder) === null || _j === void 0 ? void 0 : _j.lastName)
340
+ ? `${response.holder.firstName} ${response.holder.lastName}` : ((_k = response === null || response === void 0 ? void 0 : response.holder) === null || _k === void 0 ? void 0 : _k.name) || null,
341
+ identification: {
342
+ value: ((_m = (_l = response === null || response === void 0 ? void 0 : response.holder) === null || _l === void 0 ? void 0 : _l.identification) === null || _m === void 0 ? void 0 : _m.number) || null,
343
+ type: {
344
+ code: ((_q = (_p = (_o = response === null || response === void 0 ? void 0 : response.holder) === null || _o === void 0 ? void 0 : _o.identification) === null || _p === void 0 ? void 0 : _p.type) === null || _q === void 0 ? void 0 : _q.code) || null,
345
+ name: ((_t = (_s = (_r = response === null || response === void 0 ? void 0 : response.holder) === null || _r === void 0 ? void 0 : _r.identification) === null || _s === void 0 ? void 0 : _s.type) === null || _t === void 0 ? void 0 : _t.name) || null,
346
+ }
347
+ },
348
+ },
349
+ contacts: [
350
+ {
351
+ partyCode: "N/A",
352
+ name: "N/A",
353
+ identification: {
354
+ value: "N/A",
355
+ type: {
356
+ name: "N/A",
357
+ code: "N/A"
358
+ }
359
+ },
360
+ }
361
+ ],
362
+ legalResponsible: {
363
+ partyCode: "N/A",
364
+ name: "N/A",
365
+ identification: {
366
+ value: "N/A",
367
+ type: {
368
+ name: "N/A",
369
+ code: "N/A"
370
+ }
371
+ },
372
+ }
373
+ },
374
+ collectionData: {
375
+ holderDistribution: 0,
376
+ insuredDistribution: 0,
377
+ paymentFrequency: {
378
+ name: ((_v = (_u = response === null || response === void 0 ? void 0 : response.paymentMethod) === null || _u === void 0 ? void 0 : _u.periodicity) === null || _v === void 0 ? void 0 : _v.name) || null,
379
+ code: "N/A",
380
+ },
381
+ paymentMethodData: {
382
+ cashMethodData: ((_w = response === null || response === void 0 ? void 0 : response.paymentMethod) === null || _w === void 0 ? void 0 : _w.name) === "CASH" ? {
383
+ values: [
384
+ {
385
+ code: "N/A",
386
+ name: ((_x = response === null || response === void 0 ? void 0 : response.currency) === null || _x === void 0 ? void 0 : _x.name) || null
387
+ }
388
+ ]
389
+ } : null,
390
+ bankAccountData: ((_y = response === null || response === void 0 ? void 0 : response.paymentMethod) === null || _y === void 0 ? void 0 : _y.name) === "CBU" ? {
391
+ values: [
392
+ {
393
+ code: "BA-1",
394
+ number: "1",
395
+ cbu: ((_z = response === null || response === void 0 ? void 0 : response.paymentMethod) === null || _z === void 0 ? void 0 : _z.bankAccountNumber) || null,
396
+ alias: "N/A",
397
+ currency: {
398
+ code: "N/A",
399
+ name: ((_0 = response === null || response === void 0 ? void 0 : response.currency) === null || _0 === void 0 ? void 0 : _0.name) || null
400
+ },
401
+ bankBranch: {
402
+ name: "N/A",
403
+ code: "N/A",
404
+ bank: {
405
+ name: "N/A",
406
+ code: "N/A"
407
+ }
408
+ },
409
+ bankAccountType: {
410
+ name: "N/A",
411
+ code: "N/A"
412
+ }
413
+ }
414
+ ]
415
+ } : null,
416
+ creditCardData: ((_1 = response === null || response === void 0 ? void 0 : response.paymentMethod) === null || _1 === void 0 ? void 0 : _1.name) === "CREDIT" ? {
417
+ values: [
418
+ {
419
+ code: "N/A",
420
+ ownerName: "N/A",
421
+ cardType: {
422
+ name: "N/A",
423
+ code: "N/A"
424
+ },
425
+ cardProvider: {
426
+ name: "N/A",
427
+ code: "N/A"
428
+ },
429
+ number: "N/A",
430
+ securityCode: "N/A",
431
+ dateTo: "N/A"
432
+ }
433
+ ]
434
+ } : null
435
+ },
436
+ },
437
+ commercialStructureData: {
438
+ data: {
439
+ name: "N/A",
440
+ code: "N/A",
441
+ version: 0,
442
+ description: "N/A",
443
+ status: {
444
+ name: "N/A",
445
+ code: "N/A"
446
+ }
447
+ },
448
+ intermediaries: {
449
+ values: [
450
+ {
451
+ code: ((_3 = (_2 = response === null || response === void 0 ? void 0 : response.intermediary) === null || _2 === void 0 ? void 0 : _2.code) === null || _3 === void 0 ? void 0 : _3.toString()) || null,
452
+ name: ((_4 = response === null || response === void 0 ? void 0 : response.intermediary) === null || _4 === void 0 ? void 0 : _4.name) || null,
453
+ licence: "N/A",
454
+ role: {
455
+ name: "N/A",
456
+ code: "N/A"
457
+ },
458
+ status: {
459
+ name: "N/A",
460
+ code: "N/A"
461
+ }
462
+ }
463
+ ]
464
+ }
465
+ },
466
+ productData: {
467
+ name: ((_5 = response === null || response === void 0 ? void 0 : response.product) === null || _5 === void 0 ? void 0 : _5.name) || null,
468
+ code: ((_6 = response === null || response === void 0 ? void 0 : response.product) === null || _6 === void 0 ? void 0 : _6.code) || null,
469
+ version: 0,
470
+ subsection: {
471
+ name: "N/A",
472
+ code: "N/A",
473
+ section: {
474
+ name: ((_7 = response === null || response === void 0 ? void 0 : response.section) === null || _7 === void 0 ? void 0 : _7.name) || null,
475
+ code: ((_8 = response === null || response === void 0 ? void 0 : response.section) === null || _8 === void 0 ? void 0 : _8.code) || null,
476
+ }
477
+ },
478
+ status: {
479
+ name: ((_9 = response === null || response === void 0 ? void 0 : response.status) === null || _9 === void 0 ? void 0 : _9.name) || null,
480
+ code: "N/A"
481
+ },
482
+ },
483
+ coverageData: {
484
+ coverages: ((_11 = (_10 = response === null || response === void 0 ? void 0 : response.insured) === null || _10 === void 0 ? void 0 : _10.coverages) === null || _11 === void 0 ? void 0 : _11.map((c) => ({
485
+ coverage: {
486
+ name: (c === null || c === void 0 ? void 0 : c.name) || null,
487
+ code: 'N/A',
488
+ calculatorType: {
489
+ name: "N/A",
490
+ code: "N/A"
491
+ },
492
+ type: {
493
+ name: "N/A",
494
+ code: "N/A",
495
+ },
496
+ },
497
+ values: [
498
+ {
499
+ type: {
500
+ name: "N/A",
501
+ code: "N/A"
502
+ },
503
+ maxValue: "N/A",
504
+ minValue: "N/A",
505
+ }
506
+ ],
507
+ mortalityTable: {
508
+ name: "N/A",
509
+ code: "N/A",
510
+ },
511
+ ageType: {
512
+ name: "N/A",
513
+ code: "N/A",
514
+ },
515
+ }))) || []
516
+ },
517
+ expenseData: {
518
+ values: []
519
+ },
520
+ wordingData: {
521
+ wordings: []
522
+ },
523
+ termData: {
524
+ values: []
525
+ },
526
+ documentationData: {
527
+ files: [],
528
+ comments: "N/A",
529
+ },
530
+ endorsementData: {
531
+ number: (response === null || response === void 0 ? void 0 : response.endorsementNumber) || 0,
532
+ validityFrom: "N/A",
533
+ validityTo: "N/A",
534
+ type: {
535
+ name: "N/A",
536
+ code: "N/A",
537
+ }
538
+ },
539
+ insurableData: {
540
+ minimumQuantityInsured: 0,
541
+ estimatedDeadline: ((_12 = response === null || response === void 0 ? void 0 : response.insured) === null || _12 === void 0 ? void 0 : _12.entranceDate) || null,
542
+ minimumAge: 0,
543
+ maximumAge: 0,
544
+ maximumQuantityInsuredByEvent: 0,
545
+ maximumAmountToIndemnify: "N/A",
546
+ insurables: (response === null || response === void 0 ? void 0 : response.insured) ? [{
547
+ type: {
548
+ name: ((_14 = (_13 = response === null || response === void 0 ? void 0 : response.insured) === null || _13 === void 0 ? void 0 : _13.type) === null || _14 === void 0 ? void 0 : _14.name) || null,
549
+ code: ((_16 = (_15 = response === null || response === void 0 ? void 0 : response.insured) === null || _15 === void 0 ? void 0 : _15.type) === null || _16 === void 0 ? void 0 : _16.code) || null,
550
+ },
551
+ wording: "N/A",
552
+ minimumEntryAge: 0,
553
+ maximumEntryAge: 0,
554
+ endingAgePrincipalCoverage: 0,
555
+ endingAgeAditionalCoverage: 0,
556
+ }] : null
557
+ },
558
+ };
559
+ return objectMapped;
560
+ };
561
+ const getPolicyDetail_Request = (inputParams) => {
562
+ return {};
563
+ };
564
+ const getPolicyCollection_Request = (inputParams) => {
565
+ return {};
566
+ };
567
+ const getPolicyCollectiveDetail_Request = (inputParams) => {
568
+ return {};
569
+ };
570
+ const getPolicyIndividualDetail_Request = (inputParams) => {
571
+ return {};
572
+ };
573
+ export { getInsureds_CNP, getInsureds_CNP_Request, postInsureds_CNP, getEndorsements_CNP, getPolicies_CNP, getPolicies_CNP_Request, getPolicyDetail_CNP, getPolicyCollectiveDetail_CNP, getPolicyCollectiveDetail_Request, getPolicyIndividualDetail_Request, getPolicyCollection_Request, getEndorsements_Request, getPolicyDetail_Request, getPolicyCollection };