sysone-api-mapper 1.0.171 → 1.0.173

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 (56) hide show
  1. package/dist/axiosInstance.d.ts +3 -3
  2. package/dist/axiosInstance.js +10 -10
  3. package/dist/index.d.ts +8 -8
  4. package/dist/index.js +20 -20
  5. package/dist/services.d.ts +2 -2
  6. package/dist/services.js +100 -100
  7. package/dist/servicesData.d.ts +143 -143
  8. package/dist/servicesData.js +999 -999
  9. package/dist/src/adapters/billingAdapter.d.ts +6 -6
  10. package/dist/src/adapters/billingAdapter.js +11 -11
  11. package/dist/src/adapters/claimsAdapter.d.ts +3 -3
  12. package/dist/src/adapters/claimsAdapter.js +8 -8
  13. package/dist/src/adapters/collectionAdapter.d.ts +6 -6
  14. package/dist/src/adapters/collectionAdapter.js +11 -11
  15. package/dist/src/adapters/createApiAdapter.d.ts +57 -55
  16. package/dist/src/adapters/createApiAdapter.js +20 -20
  17. package/dist/src/adapters/financeAdapter.d.ts +6 -6
  18. package/dist/src/adapters/financeAdapter.js +11 -11
  19. package/dist/src/adapters/locationAdapter.d.ts +6 -6
  20. package/dist/src/adapters/locationAdapter.js +11 -11
  21. package/dist/src/adapters/partyAdapter.d.ts +17 -15
  22. package/dist/src/adapters/partyAdapter.js +22 -20
  23. package/dist/src/adapters/policyAdapter.d.ts +11 -11
  24. package/dist/src/adapters/policyAdapter.js +16 -16
  25. package/dist/src/components/notificationToast.js +35 -35
  26. package/dist/src/contexts/actionsContext.d.ts +6 -6
  27. package/dist/src/contexts/actionsContext.js +78 -78
  28. package/dist/src/contexts/apiContext.d.ts +3 -3
  29. package/dist/src/contexts/apiContext.js +12 -12
  30. package/dist/src/contexts/translationContext.d.ts +6 -6
  31. package/dist/src/contexts/translationContext.js +54 -54
  32. package/dist/src/mapper/Mapper.d.ts +2 -2
  33. package/dist/src/mapper/Mapper.js +115 -115
  34. package/dist/src/mapper/endpointsConfig.d.ts +2918 -2884
  35. package/dist/src/mapper/endpointsConfig.js +1034 -1016
  36. package/dist/src/mapper/helpers/mappingHelpers.d.ts +3 -3
  37. package/dist/src/mapper/helpers/mappingHelpers.js +30 -30
  38. package/dist/src/mapper/modules/billing/index.d.ts +20 -20
  39. package/dist/src/mapper/modules/billing/index.js +136 -136
  40. package/dist/src/mapper/modules/claim/index.d.ts +3 -3
  41. package/dist/src/mapper/modules/claim/index.js +19 -19
  42. package/dist/src/mapper/modules/general/index.d.ts +4 -4
  43. package/dist/src/mapper/modules/general/index.js +11 -11
  44. package/dist/src/mapper/modules/party/index.d.ts +29 -29
  45. package/dist/src/mapper/modules/party/index.js +131 -131
  46. package/dist/src/mapper/modules/policy/index.d.ts +366 -366
  47. package/dist/src/mapper/modules/policy/index.js +592 -592
  48. package/dist/src/mapper/modules/quotation/index.d.ts +297 -297
  49. package/dist/src/mapper/modules/quotation/index.js +494 -494
  50. package/dist/src/mapper/modules/request/index.d.ts +42 -42
  51. package/dist/src/mapper/modules/request/index.js +65 -65
  52. package/dist/src/public/index.d.ts +3 -3
  53. package/dist/src/public/index.js +7 -7
  54. package/dist/src/server.d.ts +1 -1
  55. package/dist/src/server.js +18 -18
  56. package/package.json +1 -1
@@ -1,1016 +1,1034 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tenantsConfig = exports.methods = void 0;
4
- // Import modules organized by functionality
5
- const billing_1 = require("./modules/billing");
6
- const claim_1 = require("./modules/claim");
7
- const general_1 = require("./modules/general");
8
- const party_1 = require("./modules/party");
9
- const policy_1 = require("./modules/policy");
10
- const quotation_1 = require("./modules/quotation");
11
- const request_1 = require("./modules/request");
12
- exports.methods = {
13
- GET: "GET",
14
- POST: "POST",
15
- PUT: "PUT",
16
- DELETE: "DELETE",
17
- };
18
- // ============================================================================
19
- // CONFIGURATION MODULE
20
- // ============================================================================
21
- const configurationModule = {
22
- GET_MODULES: {
23
- default: {
24
- url: 'ui-configuration/v1/platforms/link-one/modules',
25
- method: exports.methods.GET,
26
- requestMapper: (request) => ({ mappedParams: request }),
27
- responseMapper: (response) => response.data,
28
- },
29
- cnp: {
30
- url: 'ui-configuration/v1/modules',
31
- method: exports.methods.GET,
32
- requestMapper: request => ({ mappedParams: (0, general_1.getModules_Request)(request) }),
33
- responseMapper: (response) => response.data,
34
- },
35
- },
36
- GET_POWERBI_TOKEN: {
37
- cnp: {
38
- url: 'ui-configuration/v1/embedded-reports',
39
- method: exports.methods.GET,
40
- requestMapper: request => ({ mappedParams: request }),
41
- responseMapper: (response) => response.data,
42
- },
43
- }
44
- };
45
- // ============================================================================
46
- // BILLING MODULE
47
- // ============================================================================
48
- const billingModule = {
49
- GET_BILLINGS: {
50
- default: {
51
- url: 'billing/v1/billing',
52
- method: exports.methods.GET,
53
- requestMapper: (request) => ({ mappedParams: request }),
54
- responseMapper: (response) => response.data,
55
- },
56
- cnp: {
57
- url: 'policy/v1/policy/{0}/{1}/payments',
58
- method: exports.methods.GET,
59
- requestMapper: request => ({ mappedParams: (0, billing_1.getBillingsParams)(request) }),
60
- responseMapper: (response) => (0, billing_1.getBillingsResponse)(response.data),
61
- },
62
- },
63
- GET_POLICY_COLLECTIONS: {
64
- default: {
65
- url: '/collection/v1/collections',
66
- method: exports.methods.GET,
67
- requestMapper: (request) => ({ mappedParams: request }),
68
- responseMapper: (response) => response.data,
69
- },
70
- cnp: {
71
- url: 'policy/v1/policy/{0}/{1}/payments',
72
- method: exports.methods.GET,
73
- requestMapper: request => ({ mappedParams: (0, billing_1.getBillingsParams)(request) }),
74
- responseMapper: (response) => (0, billing_1.getCollecionsResponse)(response.data),
75
- },
76
- },
77
- GET_DEBTORS: {
78
- default: {
79
- url: 'billing/v1/billing',
80
- method: exports.methods.GET,
81
- requestMapper: (request) => ({ mappedParams: request }),
82
- responseMapper: (response) => response.data,
83
- },
84
- cnp: {
85
- url: 'policy/v1/policy/{0}/{1}/payments',
86
- method: exports.methods.GET,
87
- requestMapper: request => ({ mappedParams: (0, billing_1.getBillingsParams)(request) }),
88
- responseMapper: (response) => (0, billing_1.getDebtorsResponse)(response.data),
89
- },
90
- },
91
- GET_BILLING_TYPE: {
92
- default: {
93
- url: 'billing/v1/billing-types',
94
- method: exports.methods.GET,
95
- requestMapper: (request) => ({ mappedParams: request }),
96
- responseMapper: (response) => response.data,
97
- },
98
- cnp: {
99
- url: 'party/v1/genders',
100
- method: exports.methods.GET,
101
- requestMapper: request => ({ mappedParams: request }),
102
- responseMapper: (response) => (0, billing_1.getBillingTypeResponse)(response.data),
103
- },
104
- },
105
- BILLING_GET_BY_CODE: {
106
- default: {
107
- url: 'billing/v1/billing/{0}',
108
- method: exports.methods.GET,
109
- requestMapper: (request) => ({ mappedParams: request }),
110
- responseMapper: (response) => response.data,
111
- },
112
- },
113
- GET_BILLING_REPORT: {
114
- default: {
115
- url: 'billing/v1/billing/{0}/report',
116
- method: exports.methods.GET,
117
- requestMapper: (request) => ({
118
- mappedParams: request,
119
- responseType: "arraybuffer",
120
- }),
121
- responseMapper: (response) => response
122
- },
123
- },
124
- GET_BILLING_PAYMENT_STATUS: {
125
- default: {
126
- url: 'billing/v1/billing-payment-status',
127
- method: exports.methods.GET,
128
- requestMapper: (request) => ({ mappedParams: request }),
129
- responseMapper: (response) => response.data,
130
- },
131
- }
132
- };
133
- // ============================================================================
134
- // INTERMEDIARY MODULE
135
- // ============================================================================
136
- const intermediaryModule = {
137
- GET_INTERMEDIARY_STRUCTURE: {
138
- default: {
139
- url: 'intermediary/v1/intermediary/{0}/commercial-structures',
140
- method: exports.methods.GET,
141
- requestMapper: (request) => ({ mappedParams: request }),
142
- responseMapper: (response) => response.data,
143
- },
144
- },
145
- GET_INTERMEDIARY_BY_CODE: {
146
- default: {
147
- url: 'intermediary/v1/intermediary/{0}',
148
- method: exports.methods.GET,
149
- requestMapper: (request) => ({ mappedParams: request }),
150
- responseMapper: (response) => response.data,
151
- }
152
- },
153
- GET_COMMERCIAL_STRUCTURE: {
154
- default: {
155
- url: 'intermediary/v1/commercial-structures',
156
- method: exports.methods.GET,
157
- requestMapper: (request) => ({ mappedParams: request }),
158
- responseMapper: (response) => response.data,
159
- }
160
- }
161
- };
162
- // ============================================================================
163
- // PARTY MODULE
164
- // ============================================================================
165
- const partyModule = {
166
- GET_INDIVIDUAL_DETAILS: {
167
- default: {
168
- url: 'party/v1/individuals/{0}',
169
- method: exports.methods.GET,
170
- source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1individuals~1%7Bcode%7D/get',
171
- requestMapper: (request) => ({ mappedParams: request }),
172
- responseMapper: (response) => response.data,
173
- },
174
- },
175
- GET_ORGANISATION_DETAILS: {
176
- default: {
177
- url: 'party/v1/organisations/{0}',
178
- method: exports.methods.GET,
179
- source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1organisations~1%7Bcode%7D/get',
180
- requestMapper: (request) => ({ mappedParams: request }),
181
- responseMapper: (response) => response.data,
182
- },
183
- },
184
- GET_CURRENCIES: {
185
- default: {
186
- url: 'finance/v1/currencies',
187
- method: exports.methods.GET,
188
- requestMapper: (request) => ({ mappedParams: request }),
189
- responseMapper: (response) => response.data,
190
- },
191
- cnp: {
192
- url: 'party/v1/currencies',
193
- method: exports.methods.GET,
194
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-currencies",
195
- requestMapper: request => ({ mappedParams: request }),
196
- responseMapper: (response) => response.data,
197
- },
198
- },
199
- GET_GENDERS: {
200
- default: {
201
- url: 'party/v1/genders',
202
- method: exports.methods.GET,
203
- source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1genders/get',
204
- requestMapper: (request) => ({ mappedParams: request }),
205
- responseMapper: (response) => response.data,
206
- },
207
- cnp: {
208
- url: 'party/v1/genders',
209
- method: exports.methods.GET,
210
- requestMapper: request => ({ mappedParams: request }),
211
- responseMapper: (response) => (0, party_1.getGenders)(response.data),
212
- },
213
- },
214
- GET_IDENTIFICATION_TYPES: {
215
- default: {
216
- url: 'party/v1/identification-types',
217
- method: exports.methods.GET,
218
- source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1identification-types/get',
219
- requestMapper: (request) => ({ mappedParams: request }),
220
- responseMapper: (response) => response.data,
221
- },
222
- cnp: {
223
- url: 'party/v1/identification-types',
224
- method: exports.methods.GET,
225
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-identification-types",
226
- requestMapper: request => ({ mappedParams: request }),
227
- responseMapper: (response) => (0, party_1.getIdentificationTypes)(response.data),
228
- },
229
- },
230
- GET_PAYMENT_METHODS_BY_PARTY_CODE: {
231
- default: {
232
- url: 'party/v1/parties/{0}/payment-methods',
233
- method: exports.methods.GET,
234
- source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1parties~1%7Bcode%7D~1payment-methods/get',
235
- requestMapper: (request) => ({ mappedParams: request }),
236
- responseMapper: (response) => response.data,
237
- },
238
- },
239
- PUT_PAYMENT_METHODS_BY_PARTY_CODE: {
240
- default: {
241
- url: 'party/v1/parties/{0}/payment-methods',
242
- method: exports.methods.PUT,
243
- source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1parties~1%7Bcode%7D~1payment-methods/put',
244
- requestMapper: (request) => ({
245
- mappedParams: null,
246
- mappedBody: request,
247
- }),
248
- responseMapper: (response) => response.data,
249
- },
250
- },
251
- PUT_PERSON: {
252
- default: {
253
- url: 'party/v1/individuals/{0}',
254
- method: exports.methods.PUT,
255
- source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1individuals~1%7Bcode%7D/put',
256
- requestMapper: (request) => ({
257
- mappedParams: null,
258
- mappedBody: request,
259
- }),
260
- responseMapper: (response) => response.data,
261
- },
262
- },
263
- GET_COUNTRIES: {
264
- default: {
265
- url: 'location/v1/countries',
266
- method: exports.methods.GET,
267
- source: 'https://apidoc.sysone.com/location/v1/open-api.html#/paths/~1v1~1countries/get',
268
- requestMapper: (request) => ({ mappedParams: request }),
269
- responseMapper: (response) => response.data,
270
- },
271
- cnp: {
272
- url: 'party/v1/countries',
273
- method: exports.methods.GET,
274
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-countries",
275
- requestMapper: request => ({ mappedParams: request }),
276
- responseMapper: (response) => (0, party_1.getCountries)(response.data),
277
- },
278
- },
279
- GET_PROVINCES: {
280
- default: {
281
- url: 'location/v1/countries/{0}/provinces',
282
- method: exports.methods.GET,
283
- source: 'https://apidoc.sysone.com/location/v1/open-api.html#/paths/~1v1~1countries/get',
284
- requestMapper: (request) => ({ mappedParams: request }),
285
- responseMapper: (response) => response.data,
286
- },
287
- cnp: {
288
- url: 'party/v1/countries/{0}/provinces',
289
- method: exports.methods.GET,
290
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-countries",
291
- requestMapper: request => ({ mappedParams: request }),
292
- responseMapper: (response) => (0, party_1.getProvinces)(response.data),
293
- },
294
- },
295
- GET_CITIES: {
296
- default: {
297
- url: 'location/v1/provinces/{0}/cities',
298
- method: exports.methods.GET,
299
- source: 'https://apidoc.sysone.com/location/v1/open-api.html#/paths/~1v1~1provinces~1%7Bcode%7D~1cities/get',
300
- requestMapper: (request) => ({ mappedParams: request }),
301
- responseMapper: (response) => response.data,
302
- },
303
- },
304
- GET_POSTAL_CODES: {
305
- default: {
306
- url: 'location/v1/cities/{0}/postal-codes',
307
- method: exports.methods.GET,
308
- source: 'https://apidoc.sysone.com/location/v1/open-api.html#/paths/~1v1~1cities~1%7Bcode%7D~1postal-codes/get',
309
- requestMapper: (request) => ({ mappedParams: request }),
310
- responseMapper: (response) => response.data,
311
- },
312
- },
313
- GET_MARITAL_STATUS: {
314
- default: {
315
- url: 'party/v1/marital-statuses',
316
- method: exports.methods.GET,
317
- source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1marital-statuses/get',
318
- requestMapper: (request) => ({ mappedParams: request }),
319
- responseMapper: (response) => response.data,
320
- },
321
- cnp: {
322
- url: 'party/v1/marital-statuses',
323
- method: exports.methods.GET,
324
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-marital-statuses",
325
- requestMapper: request => ({ mappedParams: request }),
326
- responseMapper: (response) => (0, party_1.getMaritalStatuses)(response.data),
327
- },
328
- },
329
- GET_ACTIVITY: {
330
- default: {
331
- url: 'party/v1/sectors',
332
- method: exports.methods.GET,
333
- source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1sectors/get',
334
- requestMapper: (request) => ({ mappedParams: request }),
335
- responseMapper: (response) => response.data,
336
- },
337
- cnp: {
338
- url: 'party/v1/activities',
339
- method: exports.methods.GET,
340
- source: "https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-activity",
341
- requestMapper: request => ({ mappedParams: request }),
342
- responseMapper: (response) => (0, quotation_1.getActivityList)(response.data),
343
- },
344
- },
345
- GET_BLOOD_PRESSURES: {
346
- cnp: {
347
- url: 'party/v1/blood-pressures',
348
- method: exports.methods.GET,
349
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-blood-pressures",
350
- requestMapper: request => ({ mappedParams: request }),
351
- responseMapper: (response) => response.data
352
- },
353
- },
354
- GET_PAYMENT_FRECUENCIES: {
355
- default: {
356
- url: 'quotation/v1/payment-frequencies',
357
- method: exports.methods.GET,
358
- requestMapper: (request) => ({ mappedParams: request }),
359
- responseMapper: (response) => response.data,
360
- },
361
- cnp: {
362
- url: 'party/v1/payment-frequencies',
363
- method: exports.methods.GET,
364
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-payment-frequencies",
365
- requestMapper: request => ({ mappedParams: request }),
366
- responseMapper: (response) => (0, quotation_1.getPaymentFrecuencies)(response.data),
367
- },
368
- },
369
- GET_PAYMENT_TYPES: {
370
- default: {
371
- url: 'collection/v1/payment-types',
372
- method: exports.methods.GET,
373
- requestMapper: (request) => ({ mappedParams: request }),
374
- responseMapper: (response) => response.data,
375
- },
376
- cnp: {
377
- url: 'party/v1/payment-types',
378
- method: exports.methods.GET,
379
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-payment-types",
380
- requestMapper: request => ({ mappedParams: request }),
381
- responseMapper: (response) => response.data,
382
- },
383
- },
384
- GET_BRANCHES: {
385
- cnp: {
386
- url: 'party/v1/branches',
387
- method: exports.methods.GET,
388
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-branches",
389
- requestMapper: request => ({ mappedParams: request }),
390
- responseMapper: (response) => response.data,
391
- },
392
- },
393
- GET_PARTIES: {
394
- default: {
395
- url: 'party/v1/{0}',
396
- method: exports.methods.GET,
397
- source: "https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1individuals/get",
398
- requestMapper: (request) => ({ mappedParams: request }),
399
- responseMapper: (response) => response.data,
400
- },
401
- cnp: {
402
- url: 'party/v1/parties',
403
- method: exports.methods.GET,
404
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-parties",
405
- requestMapper: request => ({ mappedParams: (0, party_1.partySearchParams)(request) }),
406
- responseMapper: (response) => (0, party_1.partySearch)(response.data),
407
- },
408
- },
409
- GET_PARTY_VALIDATION: {
410
- default: {
411
- url: 'party/v1/parties/{0}/{1}/validation',
412
- method: exports.methods.GET,
413
- source: "https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1parties~1%7Bidentification-type-code%7D~1%7Bidentification-value%7D~1validation/get",
414
- requestMapper: (request) => ({ mappedParams: request }),
415
- responseMapper: (response) => response.data,
416
- },
417
- },
418
- POST_PARTY_VALIDATION: {
419
- default: {
420
- url: 'party/v1/parties/{0}/{1}/validation',
421
- method: exports.methods.POST,
422
- source: "https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1parties~1%7Bidentification-type-code%7D~1%7Bidentification-value%7D~1validation/post",
423
- requestMapper: (request) => ({ mappedBody: request }),
424
- responseMapper: (response) => response.data,
425
- },
426
- },
427
- POST_AGE: {
428
- default: {
429
- url: '',
430
- method: exports.methods.POST,
431
- source: '',
432
- requestMapper: (params) => ({ mappedBody: params }),
433
- responseMapper: (response) => response,
434
- },
435
- cnp: {
436
- url: 'party/v1/age',
437
- method: exports.methods.POST,
438
- source: 'https://developers-test.cnp.com.ar/api-details#api=party-api&operation=post-v1-age',
439
- requestMapper: (params) => ({ mappedBody: params }),
440
- responseMapper: (response) => response,
441
- }
442
- },
443
- };
444
- // ============================================================================
445
- // PRODUCT MODULE
446
- // ============================================================================
447
- const productModule = {
448
- GET_COVERAGES: {
449
- default: {
450
- url: 'product/v1/products/{0}/coverages',
451
- method: exports.methods.GET,
452
- requestMapper: (request) => ({ mappedParams: request }),
453
- responseMapper: (response) => response.data,
454
- },
455
- cnp: {
456
- url: 'party/v1/products/{0}/coverages',
457
- method: exports.methods.GET,
458
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-products-code-coverages-currencycode-currencycode-smoker-smoker",
459
- requestMapper: request => ({ mappedParams: request }),
460
- responseMapper: (response) => (0, party_1.getCoverages)(response.data),
461
- },
462
- },
463
- GET_DISTRIBUTION_LIMITS: {
464
- cnp: {
465
- url: 'party/v1/products/{0}/savings-distribution',
466
- method: exports.methods.GET,
467
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-products-code-coverages-currencycode-currencycode-smoker-smoker",
468
- requestMapper: request => ({ mappedParams: request }),
469
- responseMapper: (response) => response.data,
470
- },
471
- },
472
- GET_PRODUCTS_BY_SUBSECTIONS: {
473
- default: {
474
- url: 'product/v1/products',
475
- method: exports.methods.GET,
476
- source: 'https://apidoc.sysone.com/product/v1/open-api.html#/paths/~1v1~1products/get',
477
- requestMapper: (request) => ({ mappedParams: request }),
478
- responseMapper: (response) => response.data,
479
- },
480
- cnp: {
481
- url: 'party/v1/subsections/{0}/products',
482
- method: exports.methods.GET,
483
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-subsections-code-products",
484
- requestMapper: request => ({ mappedParams: (0, party_1.getProductsBySubsections_Request)(request) }),
485
- responseMapper: (response) => (0, quotation_1.getProductsBySubsections)(response.data),
486
- },
487
- },
488
- GET_PRODUCT_PARAMETERS: {
489
- cnp: {
490
- url: `party/v1/products/{0}`,
491
- method: exports.methods.GET,
492
- requestMapper: request => ({ mappedParams: request }),
493
- responseMapper: (response) => (0, quotation_1.getProductParameters)(response.data),
494
- }
495
- },
496
- GET_MONETARY_GOALS: {
497
- cnp: {
498
- url: 'party/v1/products/{0}/monetary-goals',
499
- method: exports.methods.GET,
500
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-monetary-goals",
501
- requestMapper: request => ({ mappedParams: request }),
502
- responseMapper: (response) => response.data,
503
- },
504
- },
505
- GET_SAVINGS_DISTRIBUTION: {
506
- cnp: {
507
- url: 'party/v1/products/{0}/savings-distribution',
508
- method: exports.methods.GET,
509
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-products-code-savings-distribution-goalcode-goalcode-goalamount-goala",
510
- requestMapper: request => ({ mappedParams: request }),
511
- responseMapper: (response) => response.data,
512
- },
513
- },
514
- GET_QUOTATION_BENEFITS: {
515
- cnp: {
516
- url: 'party/v1/quotation-benefits',
517
- method: exports.methods.GET,
518
- source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-quotation-benefits",
519
- requestMapper: request => ({ mappedParams: request }),
520
- responseMapper: (response) => response.data,
521
- },
522
- },
523
- };
524
- // ============================================================================
525
- // POLICY MODULE
526
- // ============================================================================
527
- const policyModule = {
528
- GET_ENDORSEMENTS: {
529
- default: {
530
- url: 'policy/v1/policies/{0}/endorsements',
531
- method: exports.methods.GET,
532
- source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1endorsements/get',
533
- requestMapper: request => ({ mappedParams: request }),
534
- responseMapper: (response) => response.data,
535
- },
536
- cnp: {
537
- url: 'policy/v1/policy/{0}/{1}/endorsements',
538
- method: exports.methods.GET,
539
- source: 'https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-endorsements',
540
- requestMapper: request => ({ mappedParams: (0, policy_1.getEndorsements_Request)(request) }),
541
- responseMapper: (response) => (0, policy_1.getEndorsements_CNP)(response.data),
542
- },
543
- },
544
- GET_INSUREDS: {
545
- default: {
546
- url: '{0}/v1/policies/{1}/insureds',
547
- method: exports.methods.GET,
548
- source: 'https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/get',
549
- requestMapper: (request) => ({ mappedParams: request }),
550
- responseMapper: (response) => response.data,
551
- },
552
- cnp: {
553
- url: 'policy/v1/policy/{0}/{1}/policy-insured',
554
- method: exports.methods.GET,
555
- source: 'https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-insureds',
556
- requestMapper: request => ({ mappedParams: (0, policy_1.getInsureds_CNP_Request)(request) }),
557
- responseMapper: (response) => (0, policy_1.getInsureds_CNP)(response.data),
558
- },
559
- },
560
- GET_INSUREDS_BY_FILTERS: {
561
- default: {
562
- url: 'policy-life/v1/insureds',
563
- method: exports.methods.GET,
564
- source: 'https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1insureds/get',
565
- requestMapper: (request) => ({ mappedParams: request }),
566
- responseMapper: (response) => response.data,
567
- },
568
- },
569
- GET_POLICIES: {
570
- default: {
571
- url: 'policy/v1/policies',
572
- method: exports.methods.GET,
573
- source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies/get',
574
- requestMapper: (request) => ({ mappedParams: request }),
575
- responseMapper: (response) => response.data,
576
- },
577
- cnp: {
578
- url: 'policy/v1/policy',
579
- method: exports.methods.GET,
580
- source: "https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-pagenumber-pagenumber-sort-sort-ordertype-ordertype-pagesize-p",
581
- requestMapper: request => ({ mappedParams: (0, policy_1.getPolicies_CNP_Request)(request) }),
582
- responseMapper: (response) => (0, policy_1.getPolicies_CNP)(response.data),
583
- },
584
- },
585
- GET_POLICY_DETAIL: {
586
- default: {
587
- url: '/{0}/v1/policies/{1}/details',
588
- method: exports.methods.GET,
589
- source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies/get',
590
- requestMapper: (request) => ({ mappedParams: request }),
591
- responseMapper: (response) => response.data,
592
- },
593
- cnp: {
594
- url: 'policy/v1/policy-individual/{0}/{1}/detail',
595
- method: exports.methods.GET,
596
- requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyDetail_Request)(request) }),
597
- responseMapper: (response) => (0, policy_1.getPolicyDetail_CNP)(response.data)
598
- },
599
- },
600
- GET_COLLECTIONS: {
601
- default: {
602
- url: '/policy/v1/policies/{0}/collections',
603
- method: exports.methods.GET,
604
- requestMapper: (request) => ({ mappedParams: request }),
605
- responseMapper: (response) => response.data,
606
- },
607
- cnp: {
608
- url: 'policy/v1/policy-individual/{0}/{1}/detail',
609
- method: exports.methods.GET,
610
- requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyCollection_Request)(request) }),
611
- responseMapper: (response) => (0, policy_1.getPolicyCollection)(response.data)
612
- },
613
- },
614
- GET_COLLECTIONS: {
615
- default: {
616
- url: '/policy/v1/policies/{0}/collections',
617
- method: exports.methods.GET,
618
- requestMapper: (request) => ({ mappedParams: request }),
619
- responseMapper: (response) => response.data,
620
- },
621
- cnp: {
622
- url: 'policy/v1/policy-individual/{0}/{1}/detail',
623
- method: exports.methods.GET,
624
- requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyCollection_Request)(request) }),
625
- responseMapper: (response) => (0, policy_1.getPolicyCollection)(response.data)
626
- },
627
- },
628
- SEARCH_COLLECTIONS: {
629
- default: {
630
- url: 'collection/v1/collections',
631
- method: exports.methods.GET,
632
- requestMapper: (request) => ({ mappedParams: request }),
633
- responseMapper: (response) => response.data,
634
- },
635
- },
636
- GET_COLLECTION_STATUSES: {
637
- default: {
638
- url: "collection/v1/collection-statuses",
639
- method: exports.methods.GET,
640
- requestMapper: (request) => ({ mappedParams: request }),
641
- responseMapper: (response) => response.data,
642
- },
643
- },
644
- GET_POLICY_HOME_COLLECTIVE_DETAIL: {
645
- default: {
646
- url: 'policy-home/v1/policies/{0}/details',
647
- method: exports.methods.GET,
648
- source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',
649
- requestMapper: (request) => ({ mappedParams: request }),
650
- responseMapper: (response) => response.data,
651
- },
652
- cnp: {
653
- url: 'policy/v1/policy-individual/{0}/{1}/detail',
654
- method: exports.methods.GET,
655
- source: "https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",
656
- requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyCollectiveDetail_Request)(request) }),
657
- responseMapper: (response) => (0, policy_1.getPolicyCollectiveDetail_CNP)(response.data),
658
- },
659
- },
660
- GET_POLICY_HOME_INDIVIDUAL_DETAIL: {
661
- default: {
662
- url: 'policy-home/v1/policies/{0}/details',
663
- method: exports.methods.GET,
664
- source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',
665
- requestMapper: (request) => ({ mappedParams: request }),
666
- responseMapper: (response) => response.data,
667
- },
668
- cnp: {
669
- url: 'policy/v1/policy-individual/{0}/{1}/detail',
670
- method: exports.methods.GET,
671
- source: "https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",
672
- requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyIndividualDetail_Request)(request) }),
673
- responseMapper: (response) => (0, policy_1.getPolicyDetail_CNP)(response.data),
674
- },
675
- },
676
- GET_POLICY_LIFE_COLLECTIVE_DETAIL: {
677
- default: {
678
- url: 'policy-life/v1/policies/{0}/details',
679
- method: exports.methods.GET,
680
- source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',
681
- requestMapper: (request) => ({ mappedParams: request }),
682
- responseMapper: (response) => response.data,
683
- },
684
- cnp: {
685
- url: 'policy/v1/policy-individual/{0}/{1}/detail',
686
- method: exports.methods.GET,
687
- source: "https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",
688
- requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyCollectiveDetail_Request)(request) }),
689
- responseMapper: (response) => (0, policy_1.getPolicyCollectiveDetail_CNP)(response.data),
690
- },
691
- },
692
- GET_POLICY_LIFE_INDIVIDUAL_DETAIL: {
693
- default: {
694
- url: 'policy-life/v1/policies/{0}/details',
695
- method: exports.methods.GET,
696
- source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',
697
- requestMapper: (request) => ({ mappedParams: request }),
698
- responseMapper: (response) => response.data,
699
- },
700
- cnp: {
701
- url: 'policy/v1/policy-individual/{0}/{1}/detail',
702
- method: exports.methods.GET,
703
- source: "https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",
704
- requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyIndividualDetail_Request)(request) }),
705
- responseMapper: (response) => (0, policy_1.getPolicyDetail_CNP)(response.data),
706
- },
707
- },
708
- GET_POLICY_STATUSES: {
709
- default: {
710
- url: 'policy/v1/policy-statuses',
711
- method: exports.methods.GET,
712
- requestMapper: (request) => ({ mappedParams: request }),
713
- responseMapper: (response) => response.data,
714
- },
715
- },
716
- GET_BENEFICIRY_TYPES: {
717
- cnp: {
718
- url: 'policy/v1/beneficiary-types',
719
- method: exports.methods.GET,
720
- requestMapper: request => ({ mappedParams: request }),
721
- responseMapper: (response) => response.data,
722
- },
723
- },
724
- POST_INSURED_UPDATE: {
725
- default: {
726
- url: 'policy-life/v1/policies/{0}/insureds',
727
- method: exports.methods.POST,
728
- requestMapper: null,
729
- source: 'https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/post',
730
- responseMapper: (response) => response,
731
- },
732
- cnp: {
733
- url: 'v1/policy-collective/{0}/{1}/insureds',
734
- method: exports.methods.POST,
735
- requestMapper: null,
736
- source: 'https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=post-v1-policy-collective-policy-number-section-code-insureds',
737
- responseMapper: (response) => (0, policy_1.postInsureds_CNP)(response),
738
- },
739
- },
740
- GET_POLICY_CERTIFICATE: {
741
- default: {
742
- url: 'policy-{0}/v1/policies/{1}/certificate',
743
- method: exports.methods.GET,
744
- requestMapper: (request) => ({
745
- mappedParams: request,
746
- responseType: "arraybuffer",
747
- }),
748
- responseMapper: (response) => response.data,
749
- },
750
- }
751
- };
752
- // ============================================================================
753
- // CLAIM MODULE
754
- // ============================================================================
755
- const claimModule = {
756
- GET_CLAIMS: {
757
- default: {
758
- url: 'claim/v1/claims',
759
- method: exports.methods.GET,
760
- source: 'https://apidoc.sysone.com/claim/v1/open-api.html',
761
- requestMapper: (request) => ({ mappedParams: request }),
762
- responseMapper: (response) => response.data,
763
- },
764
- cnp: {
765
- url: 'claim/v1/claim',
766
- method: exports.methods.GET,
767
- source: "https://developers-test.cnp.com.ar/api-details#api=claim-api&operation=get-v1-claim-pagenumber-pagenumber-pagesize-pagesize",
768
- requestMapper: null,
769
- responseMapper: (response) => (0, claim_1.getClaims_CNP)(response.data),
770
- },
771
- },
772
- };
773
- // ============================================================================
774
- // QUOTATION MODULE
775
- // ============================================================================
776
- const quotationModule = {
777
- GET_QUOTATION_BY_CODE: {
778
- default: {
779
- url: 'quotation/v1/quotations/{0}',
780
- method: exports.methods.GET,
781
- source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations~1%7Bcode%7D/get',
782
- requestMapper: (request) => ({ mappedParams: request }),
783
- responseMapper: (response) => response.data
784
- },
785
- cnp: {
786
- url: 'quotation/v1/quotation/standard-plan/{0}',
787
- method: exports.methods.GET,
788
- source: 'https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-quotation-standard-plan-number',
789
- requestMapper: (request) => ({ mappedParams: (0, quotation_1.getQuotationByCode_Request)(request) }),
790
- responseMapper: (response) => (0, quotation_1.getQuotationByCode)(response.data)
791
- }
792
- },
793
- GET_QUOTATIONS: {
794
- default: {
795
- url: 'quotation/v1/quotations',
796
- method: exports.methods.GET,
797
- source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/get',
798
- requestMapper: (request) => ({ mappedParams: request }),
799
- responseMapper: (response) => response.data
800
- },
801
- cnp: {
802
- url: 'quotation/v1/quotations',
803
- method: exports.methods.GET,
804
- requestMapper: request => ({ mappedParams: (0, quotation_1.getQuotations_Request)(request) }),
805
- responseMapper: (response) => (0, quotation_1.getQuotationsList)(response.data)
806
- }
807
- },
808
- GET_QUOTATION_DETAILS: {
809
- default: {
810
- url: '{0}/v1/quotations/{1}',
811
- method: exports.methods.GET,
812
- requestMapper: (request) => ({ mappedParams: request }),
813
- responseMapper: (response) => response.data
814
- },
815
- cnp: {
816
- url: 'quotation/v1/quotations/{0}',
817
- method: exports.methods.GET,
818
- requestMapper: request => ({ mappedParams: request }),
819
- responseMapper: (response) => (0, quotation_1.getQuotationDetail)(response.data)
820
- }
821
- },
822
- GET_SWORN_STATEMENT: {
823
- cnp: {
824
- url: 'quotation/v1/quotations/{0}/questionnaires',
825
- method: exports.methods.GET,
826
- requestMapper: request => ({ mappedParams: request }),
827
- responseMapper: (response) => response.data
828
- }
829
- },
830
- GET_QUOTATION_REPORT: {
831
- default: {
832
- url: '{0}/v1/quotations/{1}/report',
833
- method: exports.methods.GET,
834
- requestMapper: (request) => ({
835
- mappedParams: request,
836
- responseType: "arraybuffer"
837
- }),
838
- responseMapper: (response) => response
839
- },
840
- cnp: {
841
- url: '/quotation/v1/quotations/{0}/report',
842
- method: exports.methods.GET,
843
- requestMapper: (request) => ({
844
- mappedParams: request,
845
- headers: {
846
- 'Accept': 'application/json',
847
- }
848
- }),
849
- responseMapper: (response) => response
850
- }
851
- },
852
- POST_CREATE_QUOTATION_STANDARD_PLAN: {
853
- default: {
854
- url: 'quotation/v1/quotations',
855
- method: exports.methods.POST,
856
- source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post',
857
- requestMapper: (params) => ({
858
- mappedBody: params
859
- }),
860
- responseMapper: (response) => response,
861
- },
862
- cnp: {
863
- url: 'quotation/v1/quotation/standard-plan',
864
- method: exports.methods.POST,
865
- source: 'https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-standard-plan',
866
- requestMapper: (params) => ({
867
- mappedBody: (0, quotation_1.quotationStandardPlanCreationMapped)(params)
868
- }),
869
- responseMapper: (response) => response,
870
- }
871
- },
872
- POST_CREATE_QUOTATION_VARIABLE_PLAN: {
873
- default: {
874
- url: 'quotation/v1/quotations',
875
- method: exports.methods.POST,
876
- source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post',
877
- requestMapper: (params) => ({
878
- mappedBody: params
879
- }),
880
- responseMapper: (response) => response,
881
- },
882
- cnp: {
883
- url: 'quotation/v1/quotation/variable-plan',
884
- method: exports.methods.POST,
885
- source: 'https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-variable-plan',
886
- requestMapper: (params) => ({
887
- mappedBody: (0, quotation_1.quotationVariablePlanCreationMapped)(params)
888
- }),
889
- responseMapper: (response) => response,
890
- }
891
- },
892
- POST_CALCULATE_LS: {
893
- cnp: {
894
- url: 'quotation/v1/quotations/calculate',
895
- method: exports.methods.POST,
896
- requestMapper: (params) => ({ mappedBody: params }),
897
- responseMapper: (response) => response,
898
- }
899
- },
900
- POST_CREATE_QUOTATION_LS: {
901
- cnp: {
902
- url: 'quotation/v1/quotations',
903
- method: exports.methods.POST,
904
- requestMapper: (params) => ({ mappedBody: params }),
905
- responseMapper: (response) => response,
906
- }
907
- },
908
- };
909
- // ============================================================================
910
- // REQUEST MODULE
911
- // ============================================================================
912
- const requestModule = {
913
- GET_REQUESTS_LOOKUP: {
914
- default: {
915
- url: 'request/v1/requests',
916
- method: exports.methods.GET,
917
- source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/get',
918
- requestMapper: (request) => ({ mappedParams: request }),
919
- responseMapper: (response) => response.data
920
- },
921
- cnp: {
922
- url: 'request/v1/request/savings',
923
- method: exports.methods.GET,
924
- requestMapper: request => ({ mappedParams: (0, request_1.getRequest_Params)(request) }),
925
- responseMapper: (response) => response.data
926
- }
927
- },
928
- GET_REQUEST_DETAIL: {
929
- default: {
930
- url: '{0}/v1/requests/{1}',
931
- method: exports.methods.GET,
932
- requestMapper: (request) => ({ mappedParams: request }),
933
- responseMapper: (response) => response.data
934
- },
935
- cnp: {
936
- url: '/request/v1/request/savings/{0}',
937
- method: exports.methods.GET,
938
- requestMapper: request => ({ mappedParams: request }),
939
- responseMapper: (response) => (0, request_1.getRequestDetail)(response.data)
940
- }
941
- },
942
- GET_REQUEST_REPORT: {
943
- default: {
944
- url: '{0}/v1/policies/{1}/certificate',
945
- method: exports.methods.GET,
946
- requestMapper: (request) => ({
947
- mappedParams: request,
948
- responseType: "arraybuffer"
949
- }),
950
- responseMapper: (response) => response
951
- },
952
- cnp: {
953
- url: '/request/v1/request/savings/{0}/report',
954
- method: exports.methods.GET,
955
- requestMapper: (request) => ({
956
- mappedParams: request,
957
- headers: {
958
- 'Accept': 'application/json',
959
- }
960
- }),
961
- responseMapper: (response) => response
962
- },
963
- },
964
- POST_REQUEST_SIGNATURE: {
965
- cnp: {
966
- url: '/request/v1/request/savings/{0}/signature',
967
- method: exports.methods.POST,
968
- requestMapper: (params) => ({ mappedBody: params }),
969
- responseMapper: (response) => response,
970
- }
971
- },
972
- POST_SEND_REQUEST: {
973
- cnp: {
974
- url: '/request/v1/request/savings',
975
- method: exports.methods.POST,
976
- requestMapper: (params) => ({ mappedBody: params }),
977
- responseMapper: (response) => response,
978
- }
979
- }
980
- };
981
- // ============================================================================
982
- // finance module
983
- // ============================================================================
984
- const financeModule = {
985
- GET_BANKS: {
986
- default: {
987
- url: 'finance/v1/banks',
988
- method: exports.methods.GET,
989
- requestMapper: (request) => ({ mappedParams: request }),
990
- responseMapper: (response) => response.data,
991
- },
992
- },
993
- GET_CREDIT_CARD_TYPES: {
994
- default: {
995
- url: "finance/v1/credit-card-types",
996
- method: exports.methods.GET,
997
- requestMapper: (request) => ({ mappedParams: request }),
998
- responseMapper: (response) => response.data,
999
- },
1000
- },
1001
- };
1002
- // ============================================================================
1003
- // MAIN CONFIGURATION EXPORT
1004
- // ============================================================================
1005
- exports.tenantsConfig = {
1006
- ...configurationModule,
1007
- ...intermediaryModule,
1008
- ...partyModule,
1009
- ...productModule,
1010
- ...policyModule,
1011
- ...claimModule,
1012
- ...quotationModule,
1013
- ...requestModule,
1014
- ...billingModule,
1015
- ...financeModule
1016
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tenantsConfig = exports.methods = void 0;
4
+ // Import modules organized by functionality
5
+ const billing_1 = require("./modules/billing");
6
+ const claim_1 = require("./modules/claim");
7
+ const general_1 = require("./modules/general");
8
+ const party_1 = require("./modules/party");
9
+ const policy_1 = require("./modules/policy");
10
+ const quotation_1 = require("./modules/quotation");
11
+ const request_1 = require("./modules/request");
12
+ exports.methods = {
13
+ GET: "GET",
14
+ POST: "POST",
15
+ PUT: "PUT",
16
+ DELETE: "DELETE",
17
+ };
18
+ // ============================================================================
19
+ // CONFIGURATION MODULE
20
+ // ============================================================================
21
+ const configurationModule = {
22
+ GET_MODULES: {
23
+ default: {
24
+ url: 'ui-configuration/v1/platforms/link-one/modules',
25
+ method: exports.methods.GET,
26
+ requestMapper: (request) => ({ mappedParams: request }),
27
+ responseMapper: (response) => response.data,
28
+ },
29
+ cnp: {
30
+ url: 'ui-configuration/v1/modules',
31
+ method: exports.methods.GET,
32
+ requestMapper: request => ({ mappedParams: (0, general_1.getModules_Request)(request) }),
33
+ responseMapper: (response) => response.data,
34
+ },
35
+ },
36
+ GET_POWERBI_TOKEN: {
37
+ cnp: {
38
+ url: 'ui-configuration/v1/embedded-reports',
39
+ method: exports.methods.GET,
40
+ requestMapper: request => ({ mappedParams: request }),
41
+ responseMapper: (response) => response.data,
42
+ },
43
+ }
44
+ };
45
+ // ============================================================================
46
+ // BILLING MODULE
47
+ // ============================================================================
48
+ const billingModule = {
49
+ GET_BILLINGS: {
50
+ default: {
51
+ url: 'billing/v1/billing',
52
+ method: exports.methods.GET,
53
+ requestMapper: (request) => ({ mappedParams: request }),
54
+ responseMapper: (response) => response.data,
55
+ },
56
+ cnp: {
57
+ url: 'policy/v1/policy/{0}/{1}/payments',
58
+ method: exports.methods.GET,
59
+ requestMapper: request => ({ mappedParams: (0, billing_1.getBillingsParams)(request) }),
60
+ responseMapper: (response) => (0, billing_1.getBillingsResponse)(response.data),
61
+ },
62
+ },
63
+ GET_POLICY_COLLECTIONS: {
64
+ default: {
65
+ url: '/collection/v1/collections',
66
+ method: exports.methods.GET,
67
+ requestMapper: (request) => ({ mappedParams: request }),
68
+ responseMapper: (response) => response.data,
69
+ },
70
+ cnp: {
71
+ url: 'policy/v1/policy/{0}/{1}/payments',
72
+ method: exports.methods.GET,
73
+ requestMapper: request => ({ mappedParams: (0, billing_1.getBillingsParams)(request) }),
74
+ responseMapper: (response) => (0, billing_1.getCollecionsResponse)(response.data),
75
+ },
76
+ },
77
+ GET_DEBTORS: {
78
+ default: {
79
+ url: 'billing/v1/billing',
80
+ method: exports.methods.GET,
81
+ requestMapper: (request) => ({ mappedParams: request }),
82
+ responseMapper: (response) => response.data,
83
+ },
84
+ cnp: {
85
+ url: 'policy/v1/policy/{0}/{1}/payments',
86
+ method: exports.methods.GET,
87
+ requestMapper: request => ({ mappedParams: (0, billing_1.getBillingsParams)(request) }),
88
+ responseMapper: (response) => (0, billing_1.getDebtorsResponse)(response.data),
89
+ },
90
+ },
91
+ GET_BILLING_TYPE: {
92
+ default: {
93
+ url: 'billing/v1/billing-types',
94
+ method: exports.methods.GET,
95
+ requestMapper: (request) => ({ mappedParams: request }),
96
+ responseMapper: (response) => response.data,
97
+ },
98
+ cnp: {
99
+ url: 'party/v1/genders',
100
+ method: exports.methods.GET,
101
+ requestMapper: request => ({ mappedParams: request }),
102
+ responseMapper: (response) => (0, billing_1.getBillingTypeResponse)(response.data),
103
+ },
104
+ },
105
+ BILLING_GET_BY_CODE: {
106
+ default: {
107
+ url: 'billing/v1/billing/{0}',
108
+ method: exports.methods.GET,
109
+ requestMapper: (request) => ({ mappedParams: request }),
110
+ responseMapper: (response) => response.data,
111
+ },
112
+ },
113
+ GET_BILLING_REPORT: {
114
+ default: {
115
+ url: 'billing/v1/billing/{0}/report',
116
+ method: exports.methods.GET,
117
+ requestMapper: (request) => ({
118
+ mappedParams: request,
119
+ responseType: "arraybuffer",
120
+ }),
121
+ responseMapper: (response) => response
122
+ },
123
+ },
124
+ GET_BILLING_PAYMENT_STATUS: {
125
+ default: {
126
+ url: 'billing/v1/billing-payment-status',
127
+ method: exports.methods.GET,
128
+ requestMapper: (request) => ({ mappedParams: request }),
129
+ responseMapper: (response) => response.data,
130
+ },
131
+ }
132
+ };
133
+ // ============================================================================
134
+ // INTERMEDIARY MODULE
135
+ // ============================================================================
136
+ const intermediaryModule = {
137
+ GET_INTERMEDIARY_STRUCTURE: {
138
+ default: {
139
+ url: 'intermediary/v1/intermediary/{0}/commercial-structures',
140
+ method: exports.methods.GET,
141
+ requestMapper: (request) => ({ mappedParams: request }),
142
+ responseMapper: (response) => response.data,
143
+ },
144
+ },
145
+ GET_INTERMEDIARY_BY_CODE: {
146
+ default: {
147
+ url: 'intermediary/v1/intermediary/{0}',
148
+ method: exports.methods.GET,
149
+ requestMapper: (request) => ({ mappedParams: request }),
150
+ responseMapper: (response) => response.data,
151
+ }
152
+ },
153
+ GET_COMMERCIAL_STRUCTURE: {
154
+ default: {
155
+ url: 'intermediary/v1/commercial-structures',
156
+ method: exports.methods.GET,
157
+ requestMapper: (request) => ({ mappedParams: request }),
158
+ responseMapper: (response) => response.data,
159
+ }
160
+ }
161
+ };
162
+ // ============================================================================
163
+ // PARTY MODULE
164
+ // ============================================================================
165
+ const partyModule = {
166
+ GET_INDIVIDUAL_DETAILS: {
167
+ default: {
168
+ url: 'party/v1/individuals/{0}',
169
+ method: exports.methods.GET,
170
+ source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1individuals~1%7Bcode%7D/get',
171
+ requestMapper: (request) => ({ mappedParams: request }),
172
+ responseMapper: (response) => response.data,
173
+ },
174
+ },
175
+ GET_ORGANISATION_DETAILS: {
176
+ default: {
177
+ url: 'party/v1/organisations/{0}',
178
+ method: exports.methods.GET,
179
+ source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1organisations~1%7Bcode%7D/get',
180
+ requestMapper: (request) => ({ mappedParams: request }),
181
+ responseMapper: (response) => response.data,
182
+ },
183
+ },
184
+ GET_CURRENCIES: {
185
+ default: {
186
+ url: 'finance/v1/currencies',
187
+ method: exports.methods.GET,
188
+ requestMapper: (request) => ({ mappedParams: request }),
189
+ responseMapper: (response) => response.data,
190
+ },
191
+ cnp: {
192
+ url: 'party/v1/currencies',
193
+ method: exports.methods.GET,
194
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-currencies",
195
+ requestMapper: request => ({ mappedParams: request }),
196
+ responseMapper: (response) => response.data,
197
+ },
198
+ },
199
+ GET_GENDERS: {
200
+ default: {
201
+ url: 'party/v1/genders',
202
+ method: exports.methods.GET,
203
+ source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1genders/get',
204
+ requestMapper: (request) => ({ mappedParams: request }),
205
+ responseMapper: (response) => response.data,
206
+ },
207
+ cnp: {
208
+ url: 'party/v1/genders',
209
+ method: exports.methods.GET,
210
+ requestMapper: request => ({ mappedParams: request }),
211
+ responseMapper: (response) => (0, party_1.getGenders)(response.data),
212
+ },
213
+ },
214
+ GET_IDENTIFICATION_TYPES: {
215
+ default: {
216
+ url: 'party/v1/identification-types',
217
+ method: exports.methods.GET,
218
+ source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1identification-types/get',
219
+ requestMapper: (request) => ({ mappedParams: request }),
220
+ responseMapper: (response) => response.data,
221
+ },
222
+ cnp: {
223
+ url: 'party/v1/identification-types',
224
+ method: exports.methods.GET,
225
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-identification-types",
226
+ requestMapper: request => ({ mappedParams: request }),
227
+ responseMapper: (response) => (0, party_1.getIdentificationTypes)(response.data),
228
+ },
229
+ },
230
+ GET_PAYMENT_METHODS_BY_PARTY_CODE: {
231
+ default: {
232
+ url: 'party/v1/parties/{0}/payment-methods',
233
+ method: exports.methods.GET,
234
+ source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1parties~1%7Bcode%7D~1payment-methods/get',
235
+ requestMapper: (request) => ({ mappedParams: request }),
236
+ responseMapper: (response) => response.data,
237
+ },
238
+ },
239
+ PUT_PAYMENT_METHODS_BY_PARTY_CODE: {
240
+ default: {
241
+ url: 'party/v1/parties/{0}/payment-methods',
242
+ method: exports.methods.PUT,
243
+ source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1parties~1%7Bcode%7D~1payment-methods/put',
244
+ requestMapper: (request) => ({
245
+ mappedParams: null,
246
+ mappedBody: request,
247
+ }),
248
+ responseMapper: (response) => response.data,
249
+ },
250
+ },
251
+ PUT_PERSON: {
252
+ default: {
253
+ url: 'party/v1/individuals/{0}',
254
+ method: exports.methods.PUT,
255
+ source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1individuals~1%7Bcode%7D/put',
256
+ requestMapper: (request) => ({
257
+ mappedParams: null,
258
+ mappedBody: request,
259
+ }),
260
+ responseMapper: (response) => response.data,
261
+ },
262
+ },
263
+ GET_COUNTRIES: {
264
+ default: {
265
+ url: 'location/v1/countries',
266
+ method: exports.methods.GET,
267
+ source: 'https://apidoc.sysone.com/location/v1/open-api.html#/paths/~1v1~1countries/get',
268
+ requestMapper: (request) => ({ mappedParams: request }),
269
+ responseMapper: (response) => response.data,
270
+ },
271
+ cnp: {
272
+ url: 'party/v1/countries',
273
+ method: exports.methods.GET,
274
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-countries",
275
+ requestMapper: request => ({ mappedParams: request }),
276
+ responseMapper: (response) => (0, party_1.getCountries)(response.data),
277
+ },
278
+ },
279
+ GET_PROVINCES: {
280
+ default: {
281
+ url: 'location/v1/countries/{0}/provinces',
282
+ method: exports.methods.GET,
283
+ source: 'https://apidoc.sysone.com/location/v1/open-api.html#/paths/~1v1~1countries/get',
284
+ requestMapper: (request) => ({ mappedParams: request }),
285
+ responseMapper: (response) => response.data,
286
+ },
287
+ cnp: {
288
+ url: 'party/v1/countries/{0}/provinces',
289
+ method: exports.methods.GET,
290
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-countries",
291
+ requestMapper: request => ({ mappedParams: request }),
292
+ responseMapper: (response) => (0, party_1.getProvinces)(response.data),
293
+ },
294
+ },
295
+ GET_CITIES: {
296
+ default: {
297
+ url: 'location/v1/provinces/{0}/cities',
298
+ method: exports.methods.GET,
299
+ source: 'https://apidoc.sysone.com/location/v1/open-api.html#/paths/~1v1~1provinces~1%7Bcode%7D~1cities/get',
300
+ requestMapper: (request) => ({ mappedParams: request }),
301
+ responseMapper: (response) => response.data,
302
+ },
303
+ },
304
+ GET_POSTAL_CODES: {
305
+ default: {
306
+ url: 'location/v1/cities/{0}/postal-codes',
307
+ method: exports.methods.GET,
308
+ source: 'https://apidoc.sysone.com/location/v1/open-api.html#/paths/~1v1~1cities~1%7Bcode%7D~1postal-codes/get',
309
+ requestMapper: (request) => ({ mappedParams: request }),
310
+ responseMapper: (response) => response.data,
311
+ },
312
+ },
313
+ GET_MARITAL_STATUS: {
314
+ default: {
315
+ url: 'party/v1/marital-statuses',
316
+ method: exports.methods.GET,
317
+ source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1marital-statuses/get',
318
+ requestMapper: (request) => ({ mappedParams: request }),
319
+ responseMapper: (response) => response.data,
320
+ },
321
+ cnp: {
322
+ url: 'party/v1/marital-statuses',
323
+ method: exports.methods.GET,
324
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-marital-statuses",
325
+ requestMapper: request => ({ mappedParams: request }),
326
+ responseMapper: (response) => (0, party_1.getMaritalStatuses)(response.data),
327
+ },
328
+ },
329
+ GET_ACTIVITY: {
330
+ default: {
331
+ url: 'party/v1/sectors',
332
+ method: exports.methods.GET,
333
+ source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1sectors/get',
334
+ requestMapper: (request) => ({ mappedParams: request }),
335
+ responseMapper: (response) => response.data,
336
+ },
337
+ cnp: {
338
+ url: 'party/v1/activities',
339
+ method: exports.methods.GET,
340
+ source: "https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-activity",
341
+ requestMapper: request => ({ mappedParams: request }),
342
+ responseMapper: (response) => (0, quotation_1.getActivityList)(response.data),
343
+ },
344
+ },
345
+ GET_BLOOD_PRESSURES: {
346
+ cnp: {
347
+ url: 'party/v1/blood-pressures',
348
+ method: exports.methods.GET,
349
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-blood-pressures",
350
+ requestMapper: request => ({ mappedParams: request }),
351
+ responseMapper: (response) => response.data
352
+ },
353
+ },
354
+ GET_PAYMENT_FRECUENCIES: {
355
+ default: {
356
+ url: 'quotation/v1/payment-frequencies',
357
+ method: exports.methods.GET,
358
+ requestMapper: (request) => ({ mappedParams: request }),
359
+ responseMapper: (response) => response.data,
360
+ },
361
+ cnp: {
362
+ url: 'party/v1/payment-frequencies',
363
+ method: exports.methods.GET,
364
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-payment-frequencies",
365
+ requestMapper: request => ({ mappedParams: request }),
366
+ responseMapper: (response) => (0, quotation_1.getPaymentFrecuencies)(response.data),
367
+ },
368
+ },
369
+ GET_PAYMENT_TYPES: {
370
+ default: {
371
+ url: 'collection/v1/payment-types',
372
+ method: exports.methods.GET,
373
+ requestMapper: (request) => ({ mappedParams: request }),
374
+ responseMapper: (response) => response.data,
375
+ },
376
+ cnp: {
377
+ url: 'party/v1/payment-types',
378
+ method: exports.methods.GET,
379
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-payment-types",
380
+ requestMapper: request => ({ mappedParams: request }),
381
+ responseMapper: (response) => response.data,
382
+ },
383
+ },
384
+ GET_BRANCHES: {
385
+ cnp: {
386
+ url: 'party/v1/branches',
387
+ method: exports.methods.GET,
388
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-branches",
389
+ requestMapper: request => ({ mappedParams: request }),
390
+ responseMapper: (response) => response.data,
391
+ },
392
+ },
393
+ GET_PARTIES: {
394
+ default: {
395
+ url: 'party/v1/{0}',
396
+ method: exports.methods.GET,
397
+ source: "https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1individuals/get",
398
+ requestMapper: (request) => ({ mappedParams: request }),
399
+ responseMapper: (response) => response.data,
400
+ },
401
+ cnp: {
402
+ url: 'party/v1/parties',
403
+ method: exports.methods.GET,
404
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-parties",
405
+ requestMapper: request => ({ mappedParams: (0, party_1.partySearchParams)(request) }),
406
+ responseMapper: (response) => (0, party_1.partySearch)(response.data),
407
+ },
408
+ },
409
+ GET_PARTY_VALIDATION: {
410
+ default: {
411
+ url: 'party/v1/parties/{0}/{1}/validation',
412
+ method: exports.methods.GET,
413
+ source: "https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1parties~1%7Bidentification-type-code%7D~1%7Bidentification-value%7D~1validation/get",
414
+ requestMapper: (request) => ({ mappedParams: request }),
415
+ responseMapper: (response) => response.data,
416
+ },
417
+ },
418
+ POST_PARTY_VALIDATION: {
419
+ default: {
420
+ url: 'party/v1/parties/{0}/{1}/validation',
421
+ method: exports.methods.POST,
422
+ source: "https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1parties~1%7Bidentification-type-code%7D~1%7Bidentification-value%7D~1validation/post",
423
+ requestMapper: (request) => ({ mappedBody: request }),
424
+ responseMapper: (response) => response.data,
425
+ },
426
+ },
427
+ GET_PARTY_ONBOARDING: {
428
+ default: {
429
+ url: 'party/v1/parties/{0}/{1}/onboarding',
430
+ method: exports.methods.GET,
431
+ source: "https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1parties~1%7Bidentification-type-code%7D~1%7Bidentification-value%7D~1onboarding/get",
432
+ requestMapper: (request) => ({ mappedParams: request }),
433
+ responseMapper: (response) => response.data,
434
+ },
435
+ },
436
+ POST_PARTY_ONBOARDING: {
437
+ default: {
438
+ url: 'party/v1/parties/{0}/{1}/onboarding',
439
+ method: exports.methods.POST,
440
+ source: "https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1parties~1%7Bidentification-type-code%7D~1%7Bidentification-value%7D~1onboarding/post",
441
+ requestMapper: (request) => ({ mappedBody: request }),
442
+ responseMapper: (response) => response.data,
443
+ },
444
+ },
445
+ POST_AGE: {
446
+ default: {
447
+ url: '',
448
+ method: exports.methods.POST,
449
+ source: '',
450
+ requestMapper: (params) => ({ mappedBody: params }),
451
+ responseMapper: (response) => response,
452
+ },
453
+ cnp: {
454
+ url: 'party/v1/age',
455
+ method: exports.methods.POST,
456
+ source: 'https://developers-test.cnp.com.ar/api-details#api=party-api&operation=post-v1-age',
457
+ requestMapper: (params) => ({ mappedBody: params }),
458
+ responseMapper: (response) => response,
459
+ }
460
+ },
461
+ };
462
+ // ============================================================================
463
+ // PRODUCT MODULE
464
+ // ============================================================================
465
+ const productModule = {
466
+ GET_COVERAGES: {
467
+ default: {
468
+ url: 'product/v1/products/{0}/coverages',
469
+ method: exports.methods.GET,
470
+ requestMapper: (request) => ({ mappedParams: request }),
471
+ responseMapper: (response) => response.data,
472
+ },
473
+ cnp: {
474
+ url: 'party/v1/products/{0}/coverages',
475
+ method: exports.methods.GET,
476
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-products-code-coverages-currencycode-currencycode-smoker-smoker",
477
+ requestMapper: request => ({ mappedParams: request }),
478
+ responseMapper: (response) => (0, party_1.getCoverages)(response.data),
479
+ },
480
+ },
481
+ GET_DISTRIBUTION_LIMITS: {
482
+ cnp: {
483
+ url: 'party/v1/products/{0}/savings-distribution',
484
+ method: exports.methods.GET,
485
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-products-code-coverages-currencycode-currencycode-smoker-smoker",
486
+ requestMapper: request => ({ mappedParams: request }),
487
+ responseMapper: (response) => response.data,
488
+ },
489
+ },
490
+ GET_PRODUCTS_BY_SUBSECTIONS: {
491
+ default: {
492
+ url: 'product/v1/products',
493
+ method: exports.methods.GET,
494
+ source: 'https://apidoc.sysone.com/product/v1/open-api.html#/paths/~1v1~1products/get',
495
+ requestMapper: (request) => ({ mappedParams: request }),
496
+ responseMapper: (response) => response.data,
497
+ },
498
+ cnp: {
499
+ url: 'party/v1/subsections/{0}/products',
500
+ method: exports.methods.GET,
501
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-subsections-code-products",
502
+ requestMapper: request => ({ mappedParams: (0, party_1.getProductsBySubsections_Request)(request) }),
503
+ responseMapper: (response) => (0, quotation_1.getProductsBySubsections)(response.data),
504
+ },
505
+ },
506
+ GET_PRODUCT_PARAMETERS: {
507
+ cnp: {
508
+ url: `party/v1/products/{0}`,
509
+ method: exports.methods.GET,
510
+ requestMapper: request => ({ mappedParams: request }),
511
+ responseMapper: (response) => (0, quotation_1.getProductParameters)(response.data),
512
+ }
513
+ },
514
+ GET_MONETARY_GOALS: {
515
+ cnp: {
516
+ url: 'party/v1/products/{0}/monetary-goals',
517
+ method: exports.methods.GET,
518
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-monetary-goals",
519
+ requestMapper: request => ({ mappedParams: request }),
520
+ responseMapper: (response) => response.data,
521
+ },
522
+ },
523
+ GET_SAVINGS_DISTRIBUTION: {
524
+ cnp: {
525
+ url: 'party/v1/products/{0}/savings-distribution',
526
+ method: exports.methods.GET,
527
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-products-code-savings-distribution-goalcode-goalcode-goalamount-goala",
528
+ requestMapper: request => ({ mappedParams: request }),
529
+ responseMapper: (response) => response.data,
530
+ },
531
+ },
532
+ GET_QUOTATION_BENEFITS: {
533
+ cnp: {
534
+ url: 'party/v1/quotation-benefits',
535
+ method: exports.methods.GET,
536
+ source: "https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-quotation-benefits",
537
+ requestMapper: request => ({ mappedParams: request }),
538
+ responseMapper: (response) => response.data,
539
+ },
540
+ },
541
+ };
542
+ // ============================================================================
543
+ // POLICY MODULE
544
+ // ============================================================================
545
+ const policyModule = {
546
+ GET_ENDORSEMENTS: {
547
+ default: {
548
+ url: 'policy/v1/policies/{0}/endorsements',
549
+ method: exports.methods.GET,
550
+ source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1endorsements/get',
551
+ requestMapper: request => ({ mappedParams: request }),
552
+ responseMapper: (response) => response.data,
553
+ },
554
+ cnp: {
555
+ url: 'policy/v1/policy/{0}/{1}/endorsements',
556
+ method: exports.methods.GET,
557
+ source: 'https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-endorsements',
558
+ requestMapper: request => ({ mappedParams: (0, policy_1.getEndorsements_Request)(request) }),
559
+ responseMapper: (response) => (0, policy_1.getEndorsements_CNP)(response.data),
560
+ },
561
+ },
562
+ GET_INSUREDS: {
563
+ default: {
564
+ url: '{0}/v1/policies/{1}/insureds',
565
+ method: exports.methods.GET,
566
+ source: 'https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/get',
567
+ requestMapper: (request) => ({ mappedParams: request }),
568
+ responseMapper: (response) => response.data,
569
+ },
570
+ cnp: {
571
+ url: 'policy/v1/policy/{0}/{1}/policy-insured',
572
+ method: exports.methods.GET,
573
+ source: 'https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-insureds',
574
+ requestMapper: request => ({ mappedParams: (0, policy_1.getInsureds_CNP_Request)(request) }),
575
+ responseMapper: (response) => (0, policy_1.getInsureds_CNP)(response.data),
576
+ },
577
+ },
578
+ GET_INSUREDS_BY_FILTERS: {
579
+ default: {
580
+ url: 'policy-life/v1/insureds',
581
+ method: exports.methods.GET,
582
+ source: 'https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1insureds/get',
583
+ requestMapper: (request) => ({ mappedParams: request }),
584
+ responseMapper: (response) => response.data,
585
+ },
586
+ },
587
+ GET_POLICIES: {
588
+ default: {
589
+ url: 'policy/v1/policies',
590
+ method: exports.methods.GET,
591
+ source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies/get',
592
+ requestMapper: (request) => ({ mappedParams: request }),
593
+ responseMapper: (response) => response.data,
594
+ },
595
+ cnp: {
596
+ url: 'policy/v1/policy',
597
+ method: exports.methods.GET,
598
+ source: "https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-pagenumber-pagenumber-sort-sort-ordertype-ordertype-pagesize-p",
599
+ requestMapper: request => ({ mappedParams: (0, policy_1.getPolicies_CNP_Request)(request) }),
600
+ responseMapper: (response) => (0, policy_1.getPolicies_CNP)(response.data),
601
+ },
602
+ },
603
+ GET_POLICY_DETAIL: {
604
+ default: {
605
+ url: '/{0}/v1/policies/{1}/details',
606
+ method: exports.methods.GET,
607
+ source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies/get',
608
+ requestMapper: (request) => ({ mappedParams: request }),
609
+ responseMapper: (response) => response.data,
610
+ },
611
+ cnp: {
612
+ url: 'policy/v1/policy-individual/{0}/{1}/detail',
613
+ method: exports.methods.GET,
614
+ requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyDetail_Request)(request) }),
615
+ responseMapper: (response) => (0, policy_1.getPolicyDetail_CNP)(response.data)
616
+ },
617
+ },
618
+ GET_COLLECTIONS: {
619
+ default: {
620
+ url: '/policy/v1/policies/{0}/collections',
621
+ method: exports.methods.GET,
622
+ requestMapper: (request) => ({ mappedParams: request }),
623
+ responseMapper: (response) => response.data,
624
+ },
625
+ cnp: {
626
+ url: 'policy/v1/policy-individual/{0}/{1}/detail',
627
+ method: exports.methods.GET,
628
+ requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyCollection_Request)(request) }),
629
+ responseMapper: (response) => (0, policy_1.getPolicyCollection)(response.data)
630
+ },
631
+ },
632
+ GET_COLLECTIONS: {
633
+ default: {
634
+ url: '/policy/v1/policies/{0}/collections',
635
+ method: exports.methods.GET,
636
+ requestMapper: (request) => ({ mappedParams: request }),
637
+ responseMapper: (response) => response.data,
638
+ },
639
+ cnp: {
640
+ url: 'policy/v1/policy-individual/{0}/{1}/detail',
641
+ method: exports.methods.GET,
642
+ requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyCollection_Request)(request) }),
643
+ responseMapper: (response) => (0, policy_1.getPolicyCollection)(response.data)
644
+ },
645
+ },
646
+ SEARCH_COLLECTIONS: {
647
+ default: {
648
+ url: 'collection/v1/collections',
649
+ method: exports.methods.GET,
650
+ requestMapper: (request) => ({ mappedParams: request }),
651
+ responseMapper: (response) => response.data,
652
+ },
653
+ },
654
+ GET_COLLECTION_STATUSES: {
655
+ default: {
656
+ url: "collection/v1/collection-statuses",
657
+ method: exports.methods.GET,
658
+ requestMapper: (request) => ({ mappedParams: request }),
659
+ responseMapper: (response) => response.data,
660
+ },
661
+ },
662
+ GET_POLICY_HOME_COLLECTIVE_DETAIL: {
663
+ default: {
664
+ url: 'policy-home/v1/policies/{0}/details',
665
+ method: exports.methods.GET,
666
+ source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',
667
+ requestMapper: (request) => ({ mappedParams: request }),
668
+ responseMapper: (response) => response.data,
669
+ },
670
+ cnp: {
671
+ url: 'policy/v1/policy-individual/{0}/{1}/detail',
672
+ method: exports.methods.GET,
673
+ source: "https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",
674
+ requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyCollectiveDetail_Request)(request) }),
675
+ responseMapper: (response) => (0, policy_1.getPolicyCollectiveDetail_CNP)(response.data),
676
+ },
677
+ },
678
+ GET_POLICY_HOME_INDIVIDUAL_DETAIL: {
679
+ default: {
680
+ url: 'policy-home/v1/policies/{0}/details',
681
+ method: exports.methods.GET,
682
+ source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',
683
+ requestMapper: (request) => ({ mappedParams: request }),
684
+ responseMapper: (response) => response.data,
685
+ },
686
+ cnp: {
687
+ url: 'policy/v1/policy-individual/{0}/{1}/detail',
688
+ method: exports.methods.GET,
689
+ source: "https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",
690
+ requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyIndividualDetail_Request)(request) }),
691
+ responseMapper: (response) => (0, policy_1.getPolicyDetail_CNP)(response.data),
692
+ },
693
+ },
694
+ GET_POLICY_LIFE_COLLECTIVE_DETAIL: {
695
+ default: {
696
+ url: 'policy-life/v1/policies/{0}/details',
697
+ method: exports.methods.GET,
698
+ source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',
699
+ requestMapper: (request) => ({ mappedParams: request }),
700
+ responseMapper: (response) => response.data,
701
+ },
702
+ cnp: {
703
+ url: 'policy/v1/policy-individual/{0}/{1}/detail',
704
+ method: exports.methods.GET,
705
+ source: "https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",
706
+ requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyCollectiveDetail_Request)(request) }),
707
+ responseMapper: (response) => (0, policy_1.getPolicyCollectiveDetail_CNP)(response.data),
708
+ },
709
+ },
710
+ GET_POLICY_LIFE_INDIVIDUAL_DETAIL: {
711
+ default: {
712
+ url: 'policy-life/v1/policies/{0}/details',
713
+ method: exports.methods.GET,
714
+ source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',
715
+ requestMapper: (request) => ({ mappedParams: request }),
716
+ responseMapper: (response) => response.data,
717
+ },
718
+ cnp: {
719
+ url: 'policy/v1/policy-individual/{0}/{1}/detail',
720
+ method: exports.methods.GET,
721
+ source: "https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",
722
+ requestMapper: request => ({ mappedParams: (0, policy_1.getPolicyIndividualDetail_Request)(request) }),
723
+ responseMapper: (response) => (0, policy_1.getPolicyDetail_CNP)(response.data),
724
+ },
725
+ },
726
+ GET_POLICY_STATUSES: {
727
+ default: {
728
+ url: 'policy/v1/policy-statuses',
729
+ method: exports.methods.GET,
730
+ requestMapper: (request) => ({ mappedParams: request }),
731
+ responseMapper: (response) => response.data,
732
+ },
733
+ },
734
+ GET_BENEFICIRY_TYPES: {
735
+ cnp: {
736
+ url: 'policy/v1/beneficiary-types',
737
+ method: exports.methods.GET,
738
+ requestMapper: request => ({ mappedParams: request }),
739
+ responseMapper: (response) => response.data,
740
+ },
741
+ },
742
+ POST_INSURED_UPDATE: {
743
+ default: {
744
+ url: 'policy-life/v1/policies/{0}/insureds',
745
+ method: exports.methods.POST,
746
+ requestMapper: null,
747
+ source: 'https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/post',
748
+ responseMapper: (response) => response,
749
+ },
750
+ cnp: {
751
+ url: 'v1/policy-collective/{0}/{1}/insureds',
752
+ method: exports.methods.POST,
753
+ requestMapper: null,
754
+ source: 'https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=post-v1-policy-collective-policy-number-section-code-insureds',
755
+ responseMapper: (response) => (0, policy_1.postInsureds_CNP)(response),
756
+ },
757
+ },
758
+ GET_POLICY_CERTIFICATE: {
759
+ default: {
760
+ url: 'policy-{0}/v1/policies/{1}/certificate',
761
+ method: exports.methods.GET,
762
+ requestMapper: (request) => ({
763
+ mappedParams: request,
764
+ responseType: "arraybuffer",
765
+ }),
766
+ responseMapper: (response) => response.data,
767
+ },
768
+ }
769
+ };
770
+ // ============================================================================
771
+ // CLAIM MODULE
772
+ // ============================================================================
773
+ const claimModule = {
774
+ GET_CLAIMS: {
775
+ default: {
776
+ url: 'claim/v1/claims',
777
+ method: exports.methods.GET,
778
+ source: 'https://apidoc.sysone.com/claim/v1/open-api.html',
779
+ requestMapper: (request) => ({ mappedParams: request }),
780
+ responseMapper: (response) => response.data,
781
+ },
782
+ cnp: {
783
+ url: 'claim/v1/claim',
784
+ method: exports.methods.GET,
785
+ source: "https://developers-test.cnp.com.ar/api-details#api=claim-api&operation=get-v1-claim-pagenumber-pagenumber-pagesize-pagesize",
786
+ requestMapper: null,
787
+ responseMapper: (response) => (0, claim_1.getClaims_CNP)(response.data),
788
+ },
789
+ },
790
+ };
791
+ // ============================================================================
792
+ // QUOTATION MODULE
793
+ // ============================================================================
794
+ const quotationModule = {
795
+ GET_QUOTATION_BY_CODE: {
796
+ default: {
797
+ url: 'quotation/v1/quotations/{0}',
798
+ method: exports.methods.GET,
799
+ source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations~1%7Bcode%7D/get',
800
+ requestMapper: (request) => ({ mappedParams: request }),
801
+ responseMapper: (response) => response.data
802
+ },
803
+ cnp: {
804
+ url: 'quotation/v1/quotation/standard-plan/{0}',
805
+ method: exports.methods.GET,
806
+ source: 'https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-quotation-standard-plan-number',
807
+ requestMapper: (request) => ({ mappedParams: (0, quotation_1.getQuotationByCode_Request)(request) }),
808
+ responseMapper: (response) => (0, quotation_1.getQuotationByCode)(response.data)
809
+ }
810
+ },
811
+ GET_QUOTATIONS: {
812
+ default: {
813
+ url: 'quotation/v1/quotations',
814
+ method: exports.methods.GET,
815
+ source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/get',
816
+ requestMapper: (request) => ({ mappedParams: request }),
817
+ responseMapper: (response) => response.data
818
+ },
819
+ cnp: {
820
+ url: 'quotation/v1/quotations',
821
+ method: exports.methods.GET,
822
+ requestMapper: request => ({ mappedParams: (0, quotation_1.getQuotations_Request)(request) }),
823
+ responseMapper: (response) => (0, quotation_1.getQuotationsList)(response.data)
824
+ }
825
+ },
826
+ GET_QUOTATION_DETAILS: {
827
+ default: {
828
+ url: '{0}/v1/quotations/{1}',
829
+ method: exports.methods.GET,
830
+ requestMapper: (request) => ({ mappedParams: request }),
831
+ responseMapper: (response) => response.data
832
+ },
833
+ cnp: {
834
+ url: 'quotation/v1/quotations/{0}',
835
+ method: exports.methods.GET,
836
+ requestMapper: request => ({ mappedParams: request }),
837
+ responseMapper: (response) => (0, quotation_1.getQuotationDetail)(response.data)
838
+ }
839
+ },
840
+ GET_SWORN_STATEMENT: {
841
+ cnp: {
842
+ url: 'quotation/v1/quotations/{0}/questionnaires',
843
+ method: exports.methods.GET,
844
+ requestMapper: request => ({ mappedParams: request }),
845
+ responseMapper: (response) => response.data
846
+ }
847
+ },
848
+ GET_QUOTATION_REPORT: {
849
+ default: {
850
+ url: '{0}/v1/quotations/{1}/report',
851
+ method: exports.methods.GET,
852
+ requestMapper: (request) => ({
853
+ mappedParams: request,
854
+ responseType: "arraybuffer"
855
+ }),
856
+ responseMapper: (response) => response
857
+ },
858
+ cnp: {
859
+ url: '/quotation/v1/quotations/{0}/report',
860
+ method: exports.methods.GET,
861
+ requestMapper: (request) => ({
862
+ mappedParams: request,
863
+ headers: {
864
+ 'Accept': 'application/json',
865
+ }
866
+ }),
867
+ responseMapper: (response) => response
868
+ }
869
+ },
870
+ POST_CREATE_QUOTATION_STANDARD_PLAN: {
871
+ default: {
872
+ url: 'quotation/v1/quotations',
873
+ method: exports.methods.POST,
874
+ source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post',
875
+ requestMapper: (params) => ({
876
+ mappedBody: params
877
+ }),
878
+ responseMapper: (response) => response,
879
+ },
880
+ cnp: {
881
+ url: 'quotation/v1/quotation/standard-plan',
882
+ method: exports.methods.POST,
883
+ source: 'https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-standard-plan',
884
+ requestMapper: (params) => ({
885
+ mappedBody: (0, quotation_1.quotationStandardPlanCreationMapped)(params)
886
+ }),
887
+ responseMapper: (response) => response,
888
+ }
889
+ },
890
+ POST_CREATE_QUOTATION_VARIABLE_PLAN: {
891
+ default: {
892
+ url: 'quotation/v1/quotations',
893
+ method: exports.methods.POST,
894
+ source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post',
895
+ requestMapper: (params) => ({
896
+ mappedBody: params
897
+ }),
898
+ responseMapper: (response) => response,
899
+ },
900
+ cnp: {
901
+ url: 'quotation/v1/quotation/variable-plan',
902
+ method: exports.methods.POST,
903
+ source: 'https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-variable-plan',
904
+ requestMapper: (params) => ({
905
+ mappedBody: (0, quotation_1.quotationVariablePlanCreationMapped)(params)
906
+ }),
907
+ responseMapper: (response) => response,
908
+ }
909
+ },
910
+ POST_CALCULATE_LS: {
911
+ cnp: {
912
+ url: 'quotation/v1/quotations/calculate',
913
+ method: exports.methods.POST,
914
+ requestMapper: (params) => ({ mappedBody: params }),
915
+ responseMapper: (response) => response,
916
+ }
917
+ },
918
+ POST_CREATE_QUOTATION_LS: {
919
+ cnp: {
920
+ url: 'quotation/v1/quotations',
921
+ method: exports.methods.POST,
922
+ requestMapper: (params) => ({ mappedBody: params }),
923
+ responseMapper: (response) => response,
924
+ }
925
+ },
926
+ };
927
+ // ============================================================================
928
+ // REQUEST MODULE
929
+ // ============================================================================
930
+ const requestModule = {
931
+ GET_REQUESTS_LOOKUP: {
932
+ default: {
933
+ url: 'request/v1/requests',
934
+ method: exports.methods.GET,
935
+ source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/get',
936
+ requestMapper: (request) => ({ mappedParams: request }),
937
+ responseMapper: (response) => response.data
938
+ },
939
+ cnp: {
940
+ url: 'request/v1/request/savings',
941
+ method: exports.methods.GET,
942
+ requestMapper: request => ({ mappedParams: (0, request_1.getRequest_Params)(request) }),
943
+ responseMapper: (response) => response.data
944
+ }
945
+ },
946
+ GET_REQUEST_DETAIL: {
947
+ default: {
948
+ url: '{0}/v1/requests/{1}',
949
+ method: exports.methods.GET,
950
+ requestMapper: (request) => ({ mappedParams: request }),
951
+ responseMapper: (response) => response.data
952
+ },
953
+ cnp: {
954
+ url: '/request/v1/request/savings/{0}',
955
+ method: exports.methods.GET,
956
+ requestMapper: request => ({ mappedParams: request }),
957
+ responseMapper: (response) => (0, request_1.getRequestDetail)(response.data)
958
+ }
959
+ },
960
+ GET_REQUEST_REPORT: {
961
+ default: {
962
+ url: '{0}/v1/policies/{1}/certificate',
963
+ method: exports.methods.GET,
964
+ requestMapper: (request) => ({
965
+ mappedParams: request,
966
+ responseType: "arraybuffer"
967
+ }),
968
+ responseMapper: (response) => response
969
+ },
970
+ cnp: {
971
+ url: '/request/v1/request/savings/{0}/report',
972
+ method: exports.methods.GET,
973
+ requestMapper: (request) => ({
974
+ mappedParams: request,
975
+ headers: {
976
+ 'Accept': 'application/json',
977
+ }
978
+ }),
979
+ responseMapper: (response) => response
980
+ },
981
+ },
982
+ POST_REQUEST_SIGNATURE: {
983
+ cnp: {
984
+ url: '/request/v1/request/savings/{0}/signature',
985
+ method: exports.methods.POST,
986
+ requestMapper: (params) => ({ mappedBody: params }),
987
+ responseMapper: (response) => response,
988
+ }
989
+ },
990
+ POST_SEND_REQUEST: {
991
+ cnp: {
992
+ url: '/request/v1/request/savings',
993
+ method: exports.methods.POST,
994
+ requestMapper: (params) => ({ mappedBody: params }),
995
+ responseMapper: (response) => response,
996
+ }
997
+ }
998
+ };
999
+ // ============================================================================
1000
+ // finance module
1001
+ // ============================================================================
1002
+ const financeModule = {
1003
+ GET_BANKS: {
1004
+ default: {
1005
+ url: 'finance/v1/banks',
1006
+ method: exports.methods.GET,
1007
+ requestMapper: (request) => ({ mappedParams: request }),
1008
+ responseMapper: (response) => response.data,
1009
+ },
1010
+ },
1011
+ GET_CREDIT_CARD_TYPES: {
1012
+ default: {
1013
+ url: "finance/v1/credit-card-types",
1014
+ method: exports.methods.GET,
1015
+ requestMapper: (request) => ({ mappedParams: request }),
1016
+ responseMapper: (response) => response.data,
1017
+ },
1018
+ },
1019
+ };
1020
+ // ============================================================================
1021
+ // MAIN CONFIGURATION EXPORT
1022
+ // ============================================================================
1023
+ exports.tenantsConfig = {
1024
+ ...configurationModule,
1025
+ ...intermediaryModule,
1026
+ ...partyModule,
1027
+ ...productModule,
1028
+ ...policyModule,
1029
+ ...claimModule,
1030
+ ...quotationModule,
1031
+ ...requestModule,
1032
+ ...billingModule,
1033
+ ...financeModule
1034
+ };