sysone-api-mapper 1.0.172 → 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 -57
  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 -17
  22. package/dist/src/adapters/partyAdapter.js +22 -22
  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 -2918
  35. package/dist/src/mapper/endpointsConfig.js +1034 -1034
  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,1034 +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
- 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
- };
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
+ };