sysone-api-mapper 1.0.148 → 1.0.150

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