sysone-api-mapper 1.0.154 → 1.0.156
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.
|
@@ -16,6 +16,8 @@ export interface Api {
|
|
|
16
16
|
location: {
|
|
17
17
|
getCountries: () => Promise<any>;
|
|
18
18
|
getProvinces: (country: string) => Promise<any>;
|
|
19
|
+
getCities: (provinceCode: string) => Promise<any>;
|
|
20
|
+
getPostalCodes: (cityCode: string) => Promise<any>;
|
|
19
21
|
};
|
|
20
22
|
policy: {
|
|
21
23
|
getEndorsements: (policyCode: string, params?: Object) => Promise<any>;
|
|
@@ -5,5 +5,7 @@ const Mapper_1 = require("../mapper/Mapper");
|
|
|
5
5
|
const locationAdapter = (tenant) => ({
|
|
6
6
|
getCountries: () => (0, Mapper_1.apiMapper)("GET_COUNTRIES", tenant),
|
|
7
7
|
getProvinces: (countryCode) => (0, Mapper_1.apiMapper)("GET_PROVINCES", tenant, [countryCode]),
|
|
8
|
+
getCities: (provinceCode) => (0, Mapper_1.apiMapper)("GET_CITIES", tenant, [provinceCode]),
|
|
9
|
+
getPostalCodes: (cityCode) => (0, Mapper_1.apiMapper)("GET_POSTAL_CODES", tenant, [cityCode]),
|
|
8
10
|
});
|
|
9
11
|
exports.locationAdapter = locationAdapter;
|
|
@@ -2344,11 +2344,11 @@ export namespace tenantsConfig {
|
|
|
2344
2344
|
}
|
|
2345
2345
|
export { cnp_41 as cnp };
|
|
2346
2346
|
}
|
|
2347
|
-
namespace
|
|
2347
|
+
namespace GET_CITIES {
|
|
2348
2348
|
namespace _default_37 {
|
|
2349
2349
|
let url_79: string;
|
|
2350
2350
|
export { url_79 as url };
|
|
2351
|
-
|
|
2351
|
+
let method_79: any;
|
|
2352
2352
|
export { method_79 as method };
|
|
2353
2353
|
let source_45: string;
|
|
2354
2354
|
export { source_45 as source };
|
|
@@ -2360,10 +2360,12 @@ export namespace tenantsConfig {
|
|
|
2360
2360
|
export { responseMapper_79 as responseMapper };
|
|
2361
2361
|
}
|
|
2362
2362
|
export { _default_37 as default };
|
|
2363
|
-
|
|
2363
|
+
}
|
|
2364
|
+
namespace GET_POSTAL_CODES {
|
|
2365
|
+
namespace _default_38 {
|
|
2364
2366
|
let url_80: string;
|
|
2365
2367
|
export { url_80 as url };
|
|
2366
|
-
|
|
2368
|
+
let method_80: any;
|
|
2367
2369
|
export { method_80 as method };
|
|
2368
2370
|
let source_46: string;
|
|
2369
2371
|
export { source_46 as source };
|
|
@@ -2371,15 +2373,13 @@ export namespace tenantsConfig {
|
|
|
2371
2373
|
mappedParams: any;
|
|
2372
2374
|
};
|
|
2373
2375
|
export { requestMapper_80 as requestMapper };
|
|
2374
|
-
export function responseMapper_80(response: any):
|
|
2375
|
-
values: any;
|
|
2376
|
-
}>;
|
|
2376
|
+
export function responseMapper_80(response: any): any;
|
|
2377
2377
|
export { responseMapper_80 as responseMapper };
|
|
2378
2378
|
}
|
|
2379
|
-
export {
|
|
2379
|
+
export { _default_38 as default };
|
|
2380
2380
|
}
|
|
2381
|
-
namespace
|
|
2382
|
-
namespace
|
|
2381
|
+
namespace GET_MARITAL_STATUS {
|
|
2382
|
+
namespace _default_39 {
|
|
2383
2383
|
let url_81: string;
|
|
2384
2384
|
export { url_81 as url };
|
|
2385
2385
|
import method_81 = methods.GET;
|
|
@@ -2393,8 +2393,8 @@ export namespace tenantsConfig {
|
|
|
2393
2393
|
export function responseMapper_81(response: any): any;
|
|
2394
2394
|
export { responseMapper_81 as responseMapper };
|
|
2395
2395
|
}
|
|
2396
|
-
export {
|
|
2397
|
-
export namespace
|
|
2396
|
+
export { _default_39 as default };
|
|
2397
|
+
export namespace cnp_42 {
|
|
2398
2398
|
let url_82: string;
|
|
2399
2399
|
export { url_82 as url };
|
|
2400
2400
|
import method_82 = methods.GET;
|
|
@@ -2410,10 +2410,10 @@ export namespace tenantsConfig {
|
|
|
2410
2410
|
}>;
|
|
2411
2411
|
export { responseMapper_82 as responseMapper };
|
|
2412
2412
|
}
|
|
2413
|
-
export {
|
|
2413
|
+
export { cnp_42 as cnp };
|
|
2414
2414
|
}
|
|
2415
|
-
namespace
|
|
2416
|
-
|
|
2415
|
+
namespace GET_ACTIVITY {
|
|
2416
|
+
namespace _default_40 {
|
|
2417
2417
|
let url_83: string;
|
|
2418
2418
|
export { url_83 as url };
|
|
2419
2419
|
import method_83 = methods.GET;
|
|
@@ -2427,48 +2427,48 @@ export namespace tenantsConfig {
|
|
|
2427
2427
|
export function responseMapper_83(response: any): any;
|
|
2428
2428
|
export { responseMapper_83 as responseMapper };
|
|
2429
2429
|
}
|
|
2430
|
-
export {
|
|
2431
|
-
|
|
2432
|
-
namespace GET_PAYMENT_FRECUENCIES {
|
|
2433
|
-
namespace _default_39 {
|
|
2430
|
+
export { _default_40 as default };
|
|
2431
|
+
export namespace cnp_43 {
|
|
2434
2432
|
let url_84: string;
|
|
2435
2433
|
export { url_84 as url };
|
|
2436
2434
|
import method_84 = methods.GET;
|
|
2437
2435
|
export { method_84 as method };
|
|
2436
|
+
let source_50: string;
|
|
2437
|
+
export { source_50 as source };
|
|
2438
2438
|
export function requestMapper_84(request: any): {
|
|
2439
2439
|
mappedParams: any;
|
|
2440
2440
|
};
|
|
2441
2441
|
export { requestMapper_84 as requestMapper };
|
|
2442
|
-
export function responseMapper_84(response: any):
|
|
2442
|
+
export function responseMapper_84(response: any): Promise<{
|
|
2443
|
+
values: any;
|
|
2444
|
+
}>;
|
|
2443
2445
|
export { responseMapper_84 as responseMapper };
|
|
2444
2446
|
}
|
|
2445
|
-
export {
|
|
2446
|
-
|
|
2447
|
+
export { cnp_43 as cnp };
|
|
2448
|
+
}
|
|
2449
|
+
namespace GET_BLOOD_PRESSURES {
|
|
2450
|
+
export namespace cnp_44 {
|
|
2447
2451
|
let url_85: string;
|
|
2448
2452
|
export { url_85 as url };
|
|
2449
2453
|
import method_85 = methods.GET;
|
|
2450
2454
|
export { method_85 as method };
|
|
2451
|
-
let
|
|
2452
|
-
export {
|
|
2455
|
+
let source_51: string;
|
|
2456
|
+
export { source_51 as source };
|
|
2453
2457
|
export function requestMapper_85(request: any): {
|
|
2454
2458
|
mappedParams: any;
|
|
2455
2459
|
};
|
|
2456
2460
|
export { requestMapper_85 as requestMapper };
|
|
2457
|
-
export function responseMapper_85(response: any):
|
|
2458
|
-
frequencies: any;
|
|
2459
|
-
}>;
|
|
2461
|
+
export function responseMapper_85(response: any): any;
|
|
2460
2462
|
export { responseMapper_85 as responseMapper };
|
|
2461
2463
|
}
|
|
2462
|
-
export {
|
|
2464
|
+
export { cnp_44 as cnp };
|
|
2463
2465
|
}
|
|
2464
|
-
namespace
|
|
2465
|
-
|
|
2466
|
+
namespace GET_PAYMENT_FRECUENCIES {
|
|
2467
|
+
namespace _default_41 {
|
|
2466
2468
|
let url_86: string;
|
|
2467
2469
|
export { url_86 as url };
|
|
2468
2470
|
import method_86 = methods.GET;
|
|
2469
2471
|
export { method_86 as method };
|
|
2470
|
-
let source_51: string;
|
|
2471
|
-
export { source_51 as source };
|
|
2472
2472
|
export function requestMapper_86(request: any): {
|
|
2473
2473
|
mappedParams: any;
|
|
2474
2474
|
};
|
|
@@ -2476,10 +2476,8 @@ export namespace tenantsConfig {
|
|
|
2476
2476
|
export function responseMapper_86(response: any): any;
|
|
2477
2477
|
export { responseMapper_86 as responseMapper };
|
|
2478
2478
|
}
|
|
2479
|
-
export {
|
|
2480
|
-
|
|
2481
|
-
namespace GET_BRANCHES {
|
|
2482
|
-
export namespace cnp_47 {
|
|
2479
|
+
export { _default_41 as default };
|
|
2480
|
+
export namespace cnp_45 {
|
|
2483
2481
|
let url_87: string;
|
|
2484
2482
|
export { url_87 as url };
|
|
2485
2483
|
import method_87 = methods.GET;
|
|
@@ -2490,13 +2488,15 @@ export namespace tenantsConfig {
|
|
|
2490
2488
|
mappedParams: any;
|
|
2491
2489
|
};
|
|
2492
2490
|
export { requestMapper_87 as requestMapper };
|
|
2493
|
-
export function responseMapper_87(response: any):
|
|
2491
|
+
export function responseMapper_87(response: any): Promise<{
|
|
2492
|
+
frequencies: any;
|
|
2493
|
+
}>;
|
|
2494
2494
|
export { responseMapper_87 as responseMapper };
|
|
2495
2495
|
}
|
|
2496
|
-
export {
|
|
2496
|
+
export { cnp_45 as cnp };
|
|
2497
2497
|
}
|
|
2498
|
-
namespace
|
|
2499
|
-
namespace
|
|
2498
|
+
namespace GET_PAYMENT_TYPES {
|
|
2499
|
+
export namespace cnp_46 {
|
|
2500
2500
|
let url_88: string;
|
|
2501
2501
|
export { url_88 as url };
|
|
2502
2502
|
import method_88 = methods.GET;
|
|
@@ -2510,8 +2510,10 @@ export namespace tenantsConfig {
|
|
|
2510
2510
|
export function responseMapper_88(response: any): any;
|
|
2511
2511
|
export { responseMapper_88 as responseMapper };
|
|
2512
2512
|
}
|
|
2513
|
-
export {
|
|
2514
|
-
|
|
2513
|
+
export { cnp_46 as cnp };
|
|
2514
|
+
}
|
|
2515
|
+
namespace GET_BRANCHES {
|
|
2516
|
+
export namespace cnp_47 {
|
|
2515
2517
|
let url_89: string;
|
|
2516
2518
|
export { url_89 as url };
|
|
2517
2519
|
import method_89 = methods.GET;
|
|
@@ -2519,83 +2521,85 @@ export namespace tenantsConfig {
|
|
|
2519
2521
|
let source_54: string;
|
|
2520
2522
|
export { source_54 as source };
|
|
2521
2523
|
export function requestMapper_89(request: any): {
|
|
2522
|
-
mappedParams:
|
|
2523
|
-
firstName: any;
|
|
2524
|
-
lastName: any;
|
|
2525
|
-
identification: any;
|
|
2526
|
-
};
|
|
2524
|
+
mappedParams: any;
|
|
2527
2525
|
};
|
|
2528
2526
|
export { requestMapper_89 as requestMapper };
|
|
2529
|
-
export function responseMapper_89(response: any):
|
|
2530
|
-
values: any;
|
|
2531
|
-
};
|
|
2527
|
+
export function responseMapper_89(response: any): any;
|
|
2532
2528
|
export { responseMapper_89 as responseMapper };
|
|
2533
2529
|
}
|
|
2534
|
-
export {
|
|
2530
|
+
export { cnp_47 as cnp };
|
|
2535
2531
|
}
|
|
2536
|
-
namespace
|
|
2537
|
-
namespace
|
|
2532
|
+
namespace GET_PARTIES {
|
|
2533
|
+
namespace _default_42 {
|
|
2538
2534
|
let url_90: string;
|
|
2539
2535
|
export { url_90 as url };
|
|
2540
|
-
import method_90 = methods.
|
|
2536
|
+
import method_90 = methods.GET;
|
|
2541
2537
|
export { method_90 as method };
|
|
2542
2538
|
let source_55: string;
|
|
2543
2539
|
export { source_55 as source };
|
|
2544
|
-
export function requestMapper_90(
|
|
2545
|
-
|
|
2540
|
+
export function requestMapper_90(request: any): {
|
|
2541
|
+
mappedParams: any;
|
|
2546
2542
|
};
|
|
2547
2543
|
export { requestMapper_90 as requestMapper };
|
|
2548
2544
|
export function responseMapper_90(response: any): any;
|
|
2549
2545
|
export { responseMapper_90 as responseMapper };
|
|
2550
2546
|
}
|
|
2551
|
-
export {
|
|
2552
|
-
export namespace
|
|
2547
|
+
export { _default_42 as default };
|
|
2548
|
+
export namespace cnp_48 {
|
|
2553
2549
|
let url_91: string;
|
|
2554
2550
|
export { url_91 as url };
|
|
2555
|
-
import method_91 = methods.
|
|
2551
|
+
import method_91 = methods.GET;
|
|
2556
2552
|
export { method_91 as method };
|
|
2557
2553
|
let source_56: string;
|
|
2558
2554
|
export { source_56 as source };
|
|
2559
|
-
export function requestMapper_91(
|
|
2560
|
-
|
|
2555
|
+
export function requestMapper_91(request: any): {
|
|
2556
|
+
mappedParams: {
|
|
2557
|
+
firstName: any;
|
|
2558
|
+
lastName: any;
|
|
2559
|
+
identification: any;
|
|
2560
|
+
};
|
|
2561
2561
|
};
|
|
2562
2562
|
export { requestMapper_91 as requestMapper };
|
|
2563
|
-
export function responseMapper_91(response: any):
|
|
2563
|
+
export function responseMapper_91(response: any): {
|
|
2564
|
+
values: any;
|
|
2565
|
+
};
|
|
2564
2566
|
export { responseMapper_91 as responseMapper };
|
|
2565
2567
|
}
|
|
2566
|
-
export {
|
|
2568
|
+
export { cnp_48 as cnp };
|
|
2567
2569
|
}
|
|
2568
|
-
namespace
|
|
2569
|
-
namespace
|
|
2570
|
+
namespace POST_AGE {
|
|
2571
|
+
namespace _default_43 {
|
|
2570
2572
|
let url_92: string;
|
|
2571
2573
|
export { url_92 as url };
|
|
2572
|
-
import method_92 = methods.
|
|
2574
|
+
import method_92 = methods.POST;
|
|
2573
2575
|
export { method_92 as method };
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
+
let source_57: string;
|
|
2577
|
+
export { source_57 as source };
|
|
2578
|
+
export function requestMapper_92(params: any): {
|
|
2579
|
+
mappedBody: any;
|
|
2576
2580
|
};
|
|
2577
2581
|
export { requestMapper_92 as requestMapper };
|
|
2578
2582
|
export function responseMapper_92(response: any): any;
|
|
2579
2583
|
export { responseMapper_92 as responseMapper };
|
|
2580
2584
|
}
|
|
2581
|
-
export {
|
|
2582
|
-
|
|
2583
|
-
namespace GET_INTERMEDIARY_BY_CODE {
|
|
2584
|
-
namespace _default_43 {
|
|
2585
|
+
export { _default_43 as default };
|
|
2586
|
+
export namespace cnp_49 {
|
|
2585
2587
|
let url_93: string;
|
|
2586
2588
|
export { url_93 as url };
|
|
2587
|
-
import method_93 = methods.
|
|
2589
|
+
import method_93 = methods.POST;
|
|
2588
2590
|
export { method_93 as method };
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
+
let source_58: string;
|
|
2592
|
+
export { source_58 as source };
|
|
2593
|
+
export function requestMapper_93(params: any): {
|
|
2594
|
+
mappedBody: any;
|
|
2591
2595
|
};
|
|
2592
2596
|
export { requestMapper_93 as requestMapper };
|
|
2593
2597
|
export function responseMapper_93(response: any): any;
|
|
2594
2598
|
export { responseMapper_93 as responseMapper };
|
|
2595
2599
|
}
|
|
2596
|
-
export {
|
|
2600
|
+
export { cnp_49 as cnp };
|
|
2597
2601
|
}
|
|
2598
|
-
namespace
|
|
2602
|
+
namespace GET_INTERMEDIARY_STRUCTURE {
|
|
2599
2603
|
namespace _default_44 {
|
|
2600
2604
|
let url_94: string;
|
|
2601
2605
|
export { url_94 as url };
|
|
@@ -2610,7 +2614,7 @@ export namespace tenantsConfig {
|
|
|
2610
2614
|
}
|
|
2611
2615
|
export { _default_44 as default };
|
|
2612
2616
|
}
|
|
2613
|
-
namespace
|
|
2617
|
+
namespace GET_INTERMEDIARY_BY_CODE {
|
|
2614
2618
|
namespace _default_45 {
|
|
2615
2619
|
let url_95: string;
|
|
2616
2620
|
export { url_95 as url };
|
|
@@ -2624,24 +2628,24 @@ export namespace tenantsConfig {
|
|
|
2624
2628
|
export { responseMapper_95 as responseMapper };
|
|
2625
2629
|
}
|
|
2626
2630
|
export { _default_45 as default };
|
|
2627
|
-
|
|
2631
|
+
}
|
|
2632
|
+
namespace GET_COMMERCIAL_STRUCTURE {
|
|
2633
|
+
namespace _default_46 {
|
|
2628
2634
|
let url_96: string;
|
|
2629
2635
|
export { url_96 as url };
|
|
2630
2636
|
import method_96 = methods.GET;
|
|
2631
2637
|
export { method_96 as method };
|
|
2632
2638
|
export function requestMapper_96(request: any): {
|
|
2633
|
-
mappedParams:
|
|
2634
|
-
roles: any;
|
|
2635
|
-
};
|
|
2639
|
+
mappedParams: any;
|
|
2636
2640
|
};
|
|
2637
2641
|
export { requestMapper_96 as requestMapper };
|
|
2638
2642
|
export function responseMapper_96(response: any): any;
|
|
2639
2643
|
export { responseMapper_96 as responseMapper };
|
|
2640
2644
|
}
|
|
2641
|
-
export {
|
|
2645
|
+
export { _default_46 as default };
|
|
2642
2646
|
}
|
|
2643
|
-
namespace
|
|
2644
|
-
|
|
2647
|
+
namespace GET_MODULES {
|
|
2648
|
+
namespace _default_47 {
|
|
2645
2649
|
let url_97: string;
|
|
2646
2650
|
export { url_97 as url };
|
|
2647
2651
|
import method_97 = methods.GET;
|
|
@@ -2653,6 +2657,36 @@ export namespace tenantsConfig {
|
|
|
2653
2657
|
export function responseMapper_97(response: any): any;
|
|
2654
2658
|
export { responseMapper_97 as responseMapper };
|
|
2655
2659
|
}
|
|
2660
|
+
export { _default_47 as default };
|
|
2661
|
+
export namespace cnp_50 {
|
|
2662
|
+
let url_98: string;
|
|
2663
|
+
export { url_98 as url };
|
|
2664
|
+
import method_98 = methods.GET;
|
|
2665
|
+
export { method_98 as method };
|
|
2666
|
+
export function requestMapper_98(request: any): {
|
|
2667
|
+
mappedParams: {
|
|
2668
|
+
roles: any;
|
|
2669
|
+
};
|
|
2670
|
+
};
|
|
2671
|
+
export { requestMapper_98 as requestMapper };
|
|
2672
|
+
export function responseMapper_98(response: any): any;
|
|
2673
|
+
export { responseMapper_98 as responseMapper };
|
|
2674
|
+
}
|
|
2675
|
+
export { cnp_50 as cnp };
|
|
2676
|
+
}
|
|
2677
|
+
namespace GET_POWERBI_TOKEN {
|
|
2678
|
+
export namespace cnp_51 {
|
|
2679
|
+
let url_99: string;
|
|
2680
|
+
export { url_99 as url };
|
|
2681
|
+
import method_99 = methods.GET;
|
|
2682
|
+
export { method_99 as method };
|
|
2683
|
+
export function requestMapper_99(request: any): {
|
|
2684
|
+
mappedParams: any;
|
|
2685
|
+
};
|
|
2686
|
+
export { requestMapper_99 as requestMapper };
|
|
2687
|
+
export function responseMapper_99(response: any): any;
|
|
2688
|
+
export { responseMapper_99 as responseMapper };
|
|
2689
|
+
}
|
|
2656
2690
|
export { cnp_51 as cnp };
|
|
2657
2691
|
}
|
|
2658
2692
|
}
|
|
@@ -232,6 +232,24 @@ const partyModule = {
|
|
|
232
232
|
responseMapper: (response) => (0, party_1.getProvinces)(response.data),
|
|
233
233
|
},
|
|
234
234
|
},
|
|
235
|
+
GET_CITIES: {
|
|
236
|
+
default: {
|
|
237
|
+
url: 'location/v1/provinces/{0}/cities',
|
|
238
|
+
method: exports.methods.GET,
|
|
239
|
+
source: 'https://apidoc.sysone.com/location/v1/open-api.html#/paths/~1v1~1provinces~1%7Bcode%7D~1cities/get',
|
|
240
|
+
requestMapper: (request) => ({ mappedParams: request }),
|
|
241
|
+
responseMapper: (response) => response.data,
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
GET_POSTAL_CODES: {
|
|
245
|
+
default: {
|
|
246
|
+
url: 'location/v1/cities/{0}/postal-codes',
|
|
247
|
+
method: exports.methods.GET,
|
|
248
|
+
source: 'https://apidoc.sysone.com/location/v1/open-api.html#/paths/~1v1~1cities~1%7Bcode%7D~1postal-codes/get',
|
|
249
|
+
requestMapper: (request) => ({ mappedParams: request }),
|
|
250
|
+
responseMapper: (response) => response.data,
|
|
251
|
+
},
|
|
252
|
+
},
|
|
235
253
|
GET_MARITAL_STATUS: {
|
|
236
254
|
default: {
|
|
237
255
|
url: 'party/v1/marital-statuses',
|
|
@@ -816,7 +834,7 @@ const requestModule = {
|
|
|
816
834
|
}
|
|
817
835
|
}),
|
|
818
836
|
responseMapper: (response) => response
|
|
819
|
-
}
|
|
837
|
+
},
|
|
820
838
|
},
|
|
821
839
|
POST_REQUEST_SIGNATURE: {
|
|
822
840
|
cnp: {
|