repzo 1.0.120 → 1.0.122
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.
- package/lib/index.d.ts +108 -0
- package/lib/index.js +213 -0
- package/lib/types/index.d.ts +725 -0
- package/package.json +1 -1
- package/src/index.ts +277 -0
- package/src/types/index.ts +700 -0
package/lib/index.d.ts
CHANGED
|
@@ -88,6 +88,11 @@ export default class Repzo {
|
|
|
88
88
|
readonly MAIL_UNSUBSCRIBE: "mail-unsubscribe";
|
|
89
89
|
readonly APPROVAL_REQUEST: "approval-request";
|
|
90
90
|
readonly SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter";
|
|
91
|
+
readonly CLIENT_LOCATION: "client-location";
|
|
92
|
+
readonly ASSET_TYPE: "asset-type";
|
|
93
|
+
readonly ASSET: "asset";
|
|
94
|
+
readonly ASSET_UNIT: "asset-unit";
|
|
95
|
+
readonly WORKORDER_PORTAL: "workorder-portal";
|
|
91
96
|
};
|
|
92
97
|
private _fetch;
|
|
93
98
|
private _create;
|
|
@@ -1367,4 +1372,107 @@ export default class Repzo {
|
|
|
1367
1372
|
body: Service.SafeInvoiceSerialCounter.Update.Body
|
|
1368
1373
|
) => Promise<Service.SafeInvoiceSerialCounter.Update.Result>;
|
|
1369
1374
|
};
|
|
1375
|
+
clientLocation: {
|
|
1376
|
+
_path: "client-location";
|
|
1377
|
+
find: (
|
|
1378
|
+
params?: Service.ClientLocation.Find.Params
|
|
1379
|
+
) => Promise<Service.ClientLocation.Find.Result>;
|
|
1380
|
+
get: (
|
|
1381
|
+
id: Service.ClientLocation.Get.ID,
|
|
1382
|
+
params?: Service.ClientLocation.Get.Params
|
|
1383
|
+
) => Promise<Service.ClientLocation.Get.Result>;
|
|
1384
|
+
create: (
|
|
1385
|
+
body: Service.ClientLocation.Create.Body
|
|
1386
|
+
) => Promise<Service.ClientLocation.Create.Result>;
|
|
1387
|
+
update: (
|
|
1388
|
+
id: Service.ClientLocation.Update.ID,
|
|
1389
|
+
body: Service.ClientLocation.Update.Body
|
|
1390
|
+
) => Promise<Service.ClientLocation.Update.Result>;
|
|
1391
|
+
remove: (
|
|
1392
|
+
id: Service.ClientLocation.Update.ID,
|
|
1393
|
+
params: Service.ClientLocation.Remove.Params
|
|
1394
|
+
) => Promise<Service.ClientLocation.Remove.Result>;
|
|
1395
|
+
};
|
|
1396
|
+
assetType: {
|
|
1397
|
+
_path: "asset-type";
|
|
1398
|
+
find: (
|
|
1399
|
+
params?: Service.AssetType.Find.Params
|
|
1400
|
+
) => Promise<Service.AssetType.Find.Result>;
|
|
1401
|
+
get: (
|
|
1402
|
+
id: Service.AssetType.Get.ID
|
|
1403
|
+
) => Promise<Service.AssetType.Get.Result>;
|
|
1404
|
+
create: (
|
|
1405
|
+
body: Service.AssetType.Create.Body
|
|
1406
|
+
) => Promise<Service.AssetType.Create.Result>;
|
|
1407
|
+
update: (
|
|
1408
|
+
id: Service.AssetType.Update.ID,
|
|
1409
|
+
body: Service.AssetType.Update.Body
|
|
1410
|
+
) => Promise<Service.AssetType.Update.Result>;
|
|
1411
|
+
remove: (
|
|
1412
|
+
id: Service.AssetType.Update.ID,
|
|
1413
|
+
params: Service.AssetType.Remove.Params
|
|
1414
|
+
) => Promise<Service.AssetType.Remove.Result>;
|
|
1415
|
+
};
|
|
1416
|
+
asset: {
|
|
1417
|
+
_path: "asset";
|
|
1418
|
+
find: (
|
|
1419
|
+
params?: Service.Asset.Find.Params
|
|
1420
|
+
) => Promise<Service.Asset.Find.Result>;
|
|
1421
|
+
get: (
|
|
1422
|
+
id: Service.Asset.Get.ID,
|
|
1423
|
+
params?: Service.Asset.Get.Params
|
|
1424
|
+
) => Promise<Service.Asset.Get.Result>;
|
|
1425
|
+
create: (
|
|
1426
|
+
body: Service.Asset.Create.Body
|
|
1427
|
+
) => Promise<Service.Asset.Create.Result>;
|
|
1428
|
+
update: (
|
|
1429
|
+
id: Service.Asset.Update.ID,
|
|
1430
|
+
body: Service.Asset.Update.Body
|
|
1431
|
+
) => Promise<Service.Asset.Update.Result>;
|
|
1432
|
+
remove: (
|
|
1433
|
+
id: Service.Asset.Update.ID,
|
|
1434
|
+
params: Service.Asset.Remove.Params
|
|
1435
|
+
) => Promise<Service.Asset.Remove.Result>;
|
|
1436
|
+
};
|
|
1437
|
+
assetUnit: {
|
|
1438
|
+
_path: "asset-unit";
|
|
1439
|
+
find: (
|
|
1440
|
+
params?: Service.AssetUnit.Find.Params
|
|
1441
|
+
) => Promise<Service.AssetUnit.Find.Result>;
|
|
1442
|
+
get: (
|
|
1443
|
+
id: Service.AssetUnit.Get.ID,
|
|
1444
|
+
params?: Service.AssetUnit.Get.Params
|
|
1445
|
+
) => Promise<Service.AssetUnit.Get.Result>;
|
|
1446
|
+
create: (
|
|
1447
|
+
body: Service.AssetUnit.Create.Body
|
|
1448
|
+
) => Promise<Service.AssetUnit.Create.Result>;
|
|
1449
|
+
update: (
|
|
1450
|
+
id: Service.AssetUnit.Update.ID,
|
|
1451
|
+
body: Service.AssetUnit.Update.Body
|
|
1452
|
+
) => Promise<Service.AssetUnit.Update.Result>;
|
|
1453
|
+
remove: (
|
|
1454
|
+
id: Service.AssetUnit.Update.ID,
|
|
1455
|
+
params: Service.AssetUnit.Remove.Params
|
|
1456
|
+
) => Promise<Service.AssetUnit.Remove.Result>;
|
|
1457
|
+
};
|
|
1458
|
+
workorderPortal: {
|
|
1459
|
+
_path: "workorder-portal";
|
|
1460
|
+
find: (
|
|
1461
|
+
params?: Service.WorkorderPortal.Find.Params
|
|
1462
|
+
) => Promise<Service.WorkorderPortal.Find.Result>;
|
|
1463
|
+
get: (
|
|
1464
|
+
id: Service.WorkorderPortal.Get.ID,
|
|
1465
|
+
params?: Service.WorkorderPortal.Get.Params
|
|
1466
|
+
) => Promise<Service.WorkorderPortal.Get.Result>;
|
|
1467
|
+
create: (
|
|
1468
|
+
body: Service.WorkorderPortal.Create.Body
|
|
1469
|
+
) => Promise<Service.WorkorderPortal.Create.Result>;
|
|
1470
|
+
update: (
|
|
1471
|
+
id: Service.WorkorderPortal.Update.ID,
|
|
1472
|
+
body: Service.WorkorderPortal.Update.Body
|
|
1473
|
+
) => Promise<Service.WorkorderPortal.Update.Result>;
|
|
1474
|
+
remove: (
|
|
1475
|
+
id: Service.WorkorderPortal.Update.ID
|
|
1476
|
+
) => Promise<Service.WorkorderPortal.Remove.Result>;
|
|
1477
|
+
};
|
|
1370
1478
|
}
|
package/lib/index.js
CHANGED
|
@@ -77,6 +77,11 @@ export default class Repzo {
|
|
|
77
77
|
MAIL_UNSUBSCRIBE: "mail-unsubscribe",
|
|
78
78
|
APPROVAL_REQUEST: "approval-request",
|
|
79
79
|
SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter",
|
|
80
|
+
CLIENT_LOCATION: "client-location",
|
|
81
|
+
ASSET_TYPE: "asset-type",
|
|
82
|
+
ASSET: "asset",
|
|
83
|
+
ASSET_UNIT: "asset-unit",
|
|
84
|
+
WORKORDER_PORTAL: "workorder-portal",
|
|
80
85
|
};
|
|
81
86
|
this.END_POINTS = this._end_points;
|
|
82
87
|
this.client = {
|
|
@@ -2521,6 +2526,214 @@ export default class Repzo {
|
|
|
2521
2526
|
return res;
|
|
2522
2527
|
},
|
|
2523
2528
|
};
|
|
2529
|
+
this.clientLocation = {
|
|
2530
|
+
_path: this._end_points.CLIENT_LOCATION,
|
|
2531
|
+
find: async (params) => {
|
|
2532
|
+
let res = await this._fetch(
|
|
2533
|
+
this.svAPIEndpoint,
|
|
2534
|
+
this.clientLocation._path,
|
|
2535
|
+
params
|
|
2536
|
+
);
|
|
2537
|
+
return res;
|
|
2538
|
+
},
|
|
2539
|
+
get: async (id, params) => {
|
|
2540
|
+
return await this._fetch(
|
|
2541
|
+
this.svAPIEndpoint,
|
|
2542
|
+
this.clientLocation._path + `/${id}`,
|
|
2543
|
+
params
|
|
2544
|
+
);
|
|
2545
|
+
},
|
|
2546
|
+
create: async (body) => {
|
|
2547
|
+
let res = await this._create(
|
|
2548
|
+
this.svAPIEndpoint,
|
|
2549
|
+
this.clientLocation._path,
|
|
2550
|
+
body
|
|
2551
|
+
);
|
|
2552
|
+
return res;
|
|
2553
|
+
},
|
|
2554
|
+
update: async (id, body) => {
|
|
2555
|
+
let res = await this._update(
|
|
2556
|
+
this.svAPIEndpoint,
|
|
2557
|
+
this.clientLocation._path + `/${id}`,
|
|
2558
|
+
body
|
|
2559
|
+
);
|
|
2560
|
+
return res;
|
|
2561
|
+
},
|
|
2562
|
+
remove: async (id, params) => {
|
|
2563
|
+
let res = await this._delete(
|
|
2564
|
+
this.svAPIEndpoint,
|
|
2565
|
+
this.clientLocation._path + `/${id}`,
|
|
2566
|
+
params
|
|
2567
|
+
);
|
|
2568
|
+
return res;
|
|
2569
|
+
},
|
|
2570
|
+
};
|
|
2571
|
+
this.assetType = {
|
|
2572
|
+
_path: this._end_points.ASSET_TYPE,
|
|
2573
|
+
find: async (params) => {
|
|
2574
|
+
let res = await this._fetch(
|
|
2575
|
+
this.svAPIEndpoint,
|
|
2576
|
+
this.assetType._path,
|
|
2577
|
+
params
|
|
2578
|
+
);
|
|
2579
|
+
return res;
|
|
2580
|
+
},
|
|
2581
|
+
get: async (id) => {
|
|
2582
|
+
return await this._fetch(
|
|
2583
|
+
this.svAPIEndpoint,
|
|
2584
|
+
this.assetType._path + `/${id}`
|
|
2585
|
+
);
|
|
2586
|
+
},
|
|
2587
|
+
create: async (body) => {
|
|
2588
|
+
let res = await this._create(
|
|
2589
|
+
this.svAPIEndpoint,
|
|
2590
|
+
this.assetType._path,
|
|
2591
|
+
body
|
|
2592
|
+
);
|
|
2593
|
+
return res;
|
|
2594
|
+
},
|
|
2595
|
+
update: async (id, body) => {
|
|
2596
|
+
let res = await this._update(
|
|
2597
|
+
this.svAPIEndpoint,
|
|
2598
|
+
this.assetType._path + `/${id}`,
|
|
2599
|
+
body
|
|
2600
|
+
);
|
|
2601
|
+
return res;
|
|
2602
|
+
},
|
|
2603
|
+
remove: async (id, params) => {
|
|
2604
|
+
let res = await this._delete(
|
|
2605
|
+
this.svAPIEndpoint,
|
|
2606
|
+
this.assetType._path + `/${id}`,
|
|
2607
|
+
params
|
|
2608
|
+
);
|
|
2609
|
+
return res;
|
|
2610
|
+
},
|
|
2611
|
+
};
|
|
2612
|
+
this.asset = {
|
|
2613
|
+
_path: this._end_points.ASSET,
|
|
2614
|
+
find: async (params) => {
|
|
2615
|
+
let res = await this._fetch(
|
|
2616
|
+
this.svAPIEndpoint,
|
|
2617
|
+
this.asset._path,
|
|
2618
|
+
params
|
|
2619
|
+
);
|
|
2620
|
+
return res;
|
|
2621
|
+
},
|
|
2622
|
+
get: async (id, params) => {
|
|
2623
|
+
return await this._fetch(
|
|
2624
|
+
this.svAPIEndpoint,
|
|
2625
|
+
this.asset._path + `/${id}`,
|
|
2626
|
+
params
|
|
2627
|
+
);
|
|
2628
|
+
},
|
|
2629
|
+
create: async (body) => {
|
|
2630
|
+
let res = await this._create(
|
|
2631
|
+
this.svAPIEndpoint,
|
|
2632
|
+
this.asset._path,
|
|
2633
|
+
body
|
|
2634
|
+
);
|
|
2635
|
+
return res;
|
|
2636
|
+
},
|
|
2637
|
+
update: async (id, body) => {
|
|
2638
|
+
let res = await this._update(
|
|
2639
|
+
this.svAPIEndpoint,
|
|
2640
|
+
this.asset._path + `/${id}`,
|
|
2641
|
+
body
|
|
2642
|
+
);
|
|
2643
|
+
return res;
|
|
2644
|
+
},
|
|
2645
|
+
remove: async (id, params) => {
|
|
2646
|
+
let res = await this._delete(
|
|
2647
|
+
this.svAPIEndpoint,
|
|
2648
|
+
this.asset._path + `/${id}`,
|
|
2649
|
+
params
|
|
2650
|
+
);
|
|
2651
|
+
return res;
|
|
2652
|
+
},
|
|
2653
|
+
};
|
|
2654
|
+
this.assetUnit = {
|
|
2655
|
+
_path: this._end_points.ASSET_UNIT,
|
|
2656
|
+
find: async (params) => {
|
|
2657
|
+
let res = await this._fetch(
|
|
2658
|
+
this.svAPIEndpoint,
|
|
2659
|
+
this.assetUnit._path,
|
|
2660
|
+
params
|
|
2661
|
+
);
|
|
2662
|
+
return res;
|
|
2663
|
+
},
|
|
2664
|
+
get: async (id, params) => {
|
|
2665
|
+
return await this._fetch(
|
|
2666
|
+
this.svAPIEndpoint,
|
|
2667
|
+
this.assetUnit._path + `/${id}`,
|
|
2668
|
+
params
|
|
2669
|
+
);
|
|
2670
|
+
},
|
|
2671
|
+
create: async (body) => {
|
|
2672
|
+
let res = await this._create(
|
|
2673
|
+
this.svAPIEndpoint,
|
|
2674
|
+
this.assetUnit._path,
|
|
2675
|
+
body
|
|
2676
|
+
);
|
|
2677
|
+
return res;
|
|
2678
|
+
},
|
|
2679
|
+
update: async (id, body) => {
|
|
2680
|
+
let res = await this._update(
|
|
2681
|
+
this.svAPIEndpoint,
|
|
2682
|
+
this.assetUnit._path + `/${id}`,
|
|
2683
|
+
body
|
|
2684
|
+
);
|
|
2685
|
+
return res;
|
|
2686
|
+
},
|
|
2687
|
+
remove: async (id, params) => {
|
|
2688
|
+
let res = await this._delete(
|
|
2689
|
+
this.svAPIEndpoint,
|
|
2690
|
+
this.assetUnit._path + `/${id}`,
|
|
2691
|
+
params
|
|
2692
|
+
);
|
|
2693
|
+
return res;
|
|
2694
|
+
},
|
|
2695
|
+
};
|
|
2696
|
+
this.workorderPortal = {
|
|
2697
|
+
_path: this._end_points.WORKORDER_PORTAL,
|
|
2698
|
+
find: async (params) => {
|
|
2699
|
+
let res = await this._fetch(
|
|
2700
|
+
this.svAPIEndpoint,
|
|
2701
|
+
this.workorderPortal._path,
|
|
2702
|
+
params
|
|
2703
|
+
);
|
|
2704
|
+
return res;
|
|
2705
|
+
},
|
|
2706
|
+
get: async (id, params) => {
|
|
2707
|
+
return await this._fetch(
|
|
2708
|
+
this.svAPIEndpoint,
|
|
2709
|
+
this.workorderPortal._path + `/${id}`,
|
|
2710
|
+
params
|
|
2711
|
+
);
|
|
2712
|
+
},
|
|
2713
|
+
create: async (body) => {
|
|
2714
|
+
let res = await this._create(
|
|
2715
|
+
this.svAPIEndpoint,
|
|
2716
|
+
this.workorderPortal._path,
|
|
2717
|
+
body
|
|
2718
|
+
);
|
|
2719
|
+
return res;
|
|
2720
|
+
},
|
|
2721
|
+
update: async (id, body) => {
|
|
2722
|
+
let res = await this._update(
|
|
2723
|
+
this.svAPIEndpoint,
|
|
2724
|
+
this.workorderPortal._path + `/${id}`,
|
|
2725
|
+
body
|
|
2726
|
+
);
|
|
2727
|
+
return res;
|
|
2728
|
+
},
|
|
2729
|
+
remove: async (id) => {
|
|
2730
|
+
let res = await this._delete(
|
|
2731
|
+
this.svAPIEndpoint,
|
|
2732
|
+
this.workorderPortal._path + `/${id}`
|
|
2733
|
+
);
|
|
2734
|
+
return res;
|
|
2735
|
+
},
|
|
2736
|
+
};
|
|
2524
2737
|
this.svAPIEndpoint =
|
|
2525
2738
|
!options?.env || options?.env == "production"
|
|
2526
2739
|
? "https://sv.api.repzo.me"
|