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