repzo 1.0.120 → 1.0.121
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 +87 -0
- package/lib/index.js +171 -0
- package/lib/types/index.d.ts +504 -0
- package/package.json +1 -1
- package/src/index.ts +222 -0
- package/src/types/index.ts +482 -0
package/lib/index.d.ts
CHANGED
|
@@ -88,6 +88,10 @@ 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";
|
|
91
95
|
};
|
|
92
96
|
private _fetch;
|
|
93
97
|
private _create;
|
|
@@ -1367,4 +1371,87 @@ export default class Repzo {
|
|
|
1367
1371
|
body: Service.SafeInvoiceSerialCounter.Update.Body
|
|
1368
1372
|
) => Promise<Service.SafeInvoiceSerialCounter.Update.Result>;
|
|
1369
1373
|
};
|
|
1374
|
+
clientLocation: {
|
|
1375
|
+
_path: "client-location";
|
|
1376
|
+
find: (
|
|
1377
|
+
params?: Service.ClientLocation.Find.Params
|
|
1378
|
+
) => Promise<Service.ClientLocation.Find.Result>;
|
|
1379
|
+
get: (
|
|
1380
|
+
id: Service.ClientLocation.Get.ID,
|
|
1381
|
+
params?: Service.ClientLocation.Get.Params
|
|
1382
|
+
) => Promise<Service.ClientLocation.Get.Result>;
|
|
1383
|
+
create: (
|
|
1384
|
+
body: Service.ClientLocation.Create.Body
|
|
1385
|
+
) => Promise<Service.ClientLocation.Create.Result>;
|
|
1386
|
+
update: (
|
|
1387
|
+
id: Service.ClientLocation.Update.ID,
|
|
1388
|
+
body: Service.ClientLocation.Update.Body
|
|
1389
|
+
) => Promise<Service.ClientLocation.Update.Result>;
|
|
1390
|
+
remove: (
|
|
1391
|
+
id: Service.ClientLocation.Update.ID,
|
|
1392
|
+
params: Service.ClientLocation.Remove.Params
|
|
1393
|
+
) => Promise<Service.ClientLocation.Remove.Result>;
|
|
1394
|
+
};
|
|
1395
|
+
assetType: {
|
|
1396
|
+
_path: "asset-type";
|
|
1397
|
+
find: (
|
|
1398
|
+
params?: Service.AssetType.Find.Params
|
|
1399
|
+
) => Promise<Service.AssetType.Find.Result>;
|
|
1400
|
+
get: (
|
|
1401
|
+
id: Service.AssetType.Get.ID
|
|
1402
|
+
) => Promise<Service.AssetType.Get.Result>;
|
|
1403
|
+
create: (
|
|
1404
|
+
body: Service.AssetType.Create.Body
|
|
1405
|
+
) => Promise<Service.AssetType.Create.Result>;
|
|
1406
|
+
update: (
|
|
1407
|
+
id: Service.AssetType.Update.ID,
|
|
1408
|
+
body: Service.AssetType.Update.Body
|
|
1409
|
+
) => Promise<Service.AssetType.Update.Result>;
|
|
1410
|
+
remove: (
|
|
1411
|
+
id: Service.AssetType.Update.ID,
|
|
1412
|
+
params: Service.AssetType.Remove.Params
|
|
1413
|
+
) => Promise<Service.AssetType.Remove.Result>;
|
|
1414
|
+
};
|
|
1415
|
+
asset: {
|
|
1416
|
+
_path: "asset";
|
|
1417
|
+
find: (
|
|
1418
|
+
params?: Service.Asset.Find.Params
|
|
1419
|
+
) => Promise<Service.Asset.Find.Result>;
|
|
1420
|
+
get: (
|
|
1421
|
+
id: Service.Asset.Get.ID,
|
|
1422
|
+
params?: Service.Asset.Get.Params
|
|
1423
|
+
) => Promise<Service.Asset.Get.Result>;
|
|
1424
|
+
create: (
|
|
1425
|
+
body: Service.Asset.Create.Body
|
|
1426
|
+
) => Promise<Service.Asset.Create.Result>;
|
|
1427
|
+
update: (
|
|
1428
|
+
id: Service.Asset.Update.ID,
|
|
1429
|
+
body: Service.Asset.Update.Body
|
|
1430
|
+
) => Promise<Service.Asset.Update.Result>;
|
|
1431
|
+
remove: (
|
|
1432
|
+
id: Service.Asset.Update.ID,
|
|
1433
|
+
params: Service.Asset.Remove.Params
|
|
1434
|
+
) => Promise<Service.Asset.Remove.Result>;
|
|
1435
|
+
};
|
|
1436
|
+
assetUnit: {
|
|
1437
|
+
_path: "asset-unit";
|
|
1438
|
+
find: (
|
|
1439
|
+
params?: Service.AssetUnit.Find.Params
|
|
1440
|
+
) => Promise<Service.AssetUnit.Find.Result>;
|
|
1441
|
+
get: (
|
|
1442
|
+
id: Service.AssetUnit.Get.ID,
|
|
1443
|
+
params?: Service.AssetUnit.Get.Params
|
|
1444
|
+
) => Promise<Service.AssetUnit.Get.Result>;
|
|
1445
|
+
create: (
|
|
1446
|
+
body: Service.AssetUnit.Create.Body
|
|
1447
|
+
) => Promise<Service.AssetUnit.Create.Result>;
|
|
1448
|
+
update: (
|
|
1449
|
+
id: Service.AssetUnit.Update.ID,
|
|
1450
|
+
body: Service.AssetUnit.Update.Body
|
|
1451
|
+
) => Promise<Service.AssetUnit.Update.Result>;
|
|
1452
|
+
remove: (
|
|
1453
|
+
id: Service.AssetUnit.Update.ID,
|
|
1454
|
+
params: Service.AssetUnit.Remove.Params
|
|
1455
|
+
) => Promise<Service.AssetUnit.Remove.Result>;
|
|
1456
|
+
};
|
|
1370
1457
|
}
|
package/lib/index.js
CHANGED
|
@@ -77,6 +77,10 @@ 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",
|
|
80
84
|
};
|
|
81
85
|
this.END_POINTS = this._end_points;
|
|
82
86
|
this.client = {
|
|
@@ -2521,6 +2525,173 @@ export default class Repzo {
|
|
|
2521
2525
|
return res;
|
|
2522
2526
|
},
|
|
2523
2527
|
};
|
|
2528
|
+
this.clientLocation = {
|
|
2529
|
+
_path: this._end_points.CLIENT_LOCATION,
|
|
2530
|
+
find: async (params) => {
|
|
2531
|
+
let res = await this._fetch(
|
|
2532
|
+
this.svAPIEndpoint,
|
|
2533
|
+
this.clientLocation._path,
|
|
2534
|
+
params
|
|
2535
|
+
);
|
|
2536
|
+
return res;
|
|
2537
|
+
},
|
|
2538
|
+
get: async (id, params) => {
|
|
2539
|
+
return await this._fetch(
|
|
2540
|
+
this.svAPIEndpoint,
|
|
2541
|
+
this.clientLocation._path + `/${id}`,
|
|
2542
|
+
params
|
|
2543
|
+
);
|
|
2544
|
+
},
|
|
2545
|
+
create: async (body) => {
|
|
2546
|
+
let res = await this._create(
|
|
2547
|
+
this.svAPIEndpoint,
|
|
2548
|
+
this.clientLocation._path,
|
|
2549
|
+
body
|
|
2550
|
+
);
|
|
2551
|
+
return res;
|
|
2552
|
+
},
|
|
2553
|
+
update: async (id, body) => {
|
|
2554
|
+
let res = await this._update(
|
|
2555
|
+
this.svAPIEndpoint,
|
|
2556
|
+
this.clientLocation._path + `/${id}`,
|
|
2557
|
+
body
|
|
2558
|
+
);
|
|
2559
|
+
return res;
|
|
2560
|
+
},
|
|
2561
|
+
remove: async (id, params) => {
|
|
2562
|
+
let res = await this._delete(
|
|
2563
|
+
this.svAPIEndpoint,
|
|
2564
|
+
this.clientLocation._path + `/${id}`,
|
|
2565
|
+
params
|
|
2566
|
+
);
|
|
2567
|
+
return res;
|
|
2568
|
+
},
|
|
2569
|
+
};
|
|
2570
|
+
this.assetType = {
|
|
2571
|
+
_path: this._end_points.ASSET_TYPE,
|
|
2572
|
+
find: async (params) => {
|
|
2573
|
+
let res = await this._fetch(
|
|
2574
|
+
this.svAPIEndpoint,
|
|
2575
|
+
this.assetType._path,
|
|
2576
|
+
params
|
|
2577
|
+
);
|
|
2578
|
+
return res;
|
|
2579
|
+
},
|
|
2580
|
+
get: async (id) => {
|
|
2581
|
+
return await this._fetch(
|
|
2582
|
+
this.svAPIEndpoint,
|
|
2583
|
+
this.assetType._path + `/${id}`
|
|
2584
|
+
);
|
|
2585
|
+
},
|
|
2586
|
+
create: async (body) => {
|
|
2587
|
+
let res = await this._create(
|
|
2588
|
+
this.svAPIEndpoint,
|
|
2589
|
+
this.assetType._path,
|
|
2590
|
+
body
|
|
2591
|
+
);
|
|
2592
|
+
return res;
|
|
2593
|
+
},
|
|
2594
|
+
update: async (id, body) => {
|
|
2595
|
+
let res = await this._update(
|
|
2596
|
+
this.svAPIEndpoint,
|
|
2597
|
+
this.assetType._path + `/${id}`,
|
|
2598
|
+
body
|
|
2599
|
+
);
|
|
2600
|
+
return res;
|
|
2601
|
+
},
|
|
2602
|
+
remove: async (id, params) => {
|
|
2603
|
+
let res = await this._delete(
|
|
2604
|
+
this.svAPIEndpoint,
|
|
2605
|
+
this.assetType._path + `/${id}`,
|
|
2606
|
+
params
|
|
2607
|
+
);
|
|
2608
|
+
return res;
|
|
2609
|
+
},
|
|
2610
|
+
};
|
|
2611
|
+
this.asset = {
|
|
2612
|
+
_path: this._end_points.ASSET,
|
|
2613
|
+
find: async (params) => {
|
|
2614
|
+
let res = await this._fetch(
|
|
2615
|
+
this.svAPIEndpoint,
|
|
2616
|
+
this.asset._path,
|
|
2617
|
+
params
|
|
2618
|
+
);
|
|
2619
|
+
return res;
|
|
2620
|
+
},
|
|
2621
|
+
get: async (id, params) => {
|
|
2622
|
+
return await this._fetch(
|
|
2623
|
+
this.svAPIEndpoint,
|
|
2624
|
+
this.asset._path + `/${id}`,
|
|
2625
|
+
params
|
|
2626
|
+
);
|
|
2627
|
+
},
|
|
2628
|
+
create: async (body) => {
|
|
2629
|
+
let res = await this._create(
|
|
2630
|
+
this.svAPIEndpoint,
|
|
2631
|
+
this.asset._path,
|
|
2632
|
+
body
|
|
2633
|
+
);
|
|
2634
|
+
return res;
|
|
2635
|
+
},
|
|
2636
|
+
update: async (id, body) => {
|
|
2637
|
+
let res = await this._update(
|
|
2638
|
+
this.svAPIEndpoint,
|
|
2639
|
+
this.asset._path + `/${id}`,
|
|
2640
|
+
body
|
|
2641
|
+
);
|
|
2642
|
+
return res;
|
|
2643
|
+
},
|
|
2644
|
+
remove: async (id, params) => {
|
|
2645
|
+
let res = await this._delete(
|
|
2646
|
+
this.svAPIEndpoint,
|
|
2647
|
+
this.asset._path + `/${id}`,
|
|
2648
|
+
params
|
|
2649
|
+
);
|
|
2650
|
+
return res;
|
|
2651
|
+
},
|
|
2652
|
+
};
|
|
2653
|
+
this.assetUnit = {
|
|
2654
|
+
_path: this._end_points.ASSET_UNIT,
|
|
2655
|
+
find: async (params) => {
|
|
2656
|
+
let res = await this._fetch(
|
|
2657
|
+
this.svAPIEndpoint,
|
|
2658
|
+
this.assetUnit._path,
|
|
2659
|
+
params
|
|
2660
|
+
);
|
|
2661
|
+
return res;
|
|
2662
|
+
},
|
|
2663
|
+
get: async (id, params) => {
|
|
2664
|
+
return await this._fetch(
|
|
2665
|
+
this.svAPIEndpoint,
|
|
2666
|
+
this.assetUnit._path + `/${id}`,
|
|
2667
|
+
params
|
|
2668
|
+
);
|
|
2669
|
+
},
|
|
2670
|
+
create: async (body) => {
|
|
2671
|
+
let res = await this._create(
|
|
2672
|
+
this.svAPIEndpoint,
|
|
2673
|
+
this.assetUnit._path,
|
|
2674
|
+
body
|
|
2675
|
+
);
|
|
2676
|
+
return res;
|
|
2677
|
+
},
|
|
2678
|
+
update: async (id, body) => {
|
|
2679
|
+
let res = await this._update(
|
|
2680
|
+
this.svAPIEndpoint,
|
|
2681
|
+
this.assetUnit._path + `/${id}`,
|
|
2682
|
+
body
|
|
2683
|
+
);
|
|
2684
|
+
return res;
|
|
2685
|
+
},
|
|
2686
|
+
remove: async (id, params) => {
|
|
2687
|
+
let res = await this._delete(
|
|
2688
|
+
this.svAPIEndpoint,
|
|
2689
|
+
this.assetUnit._path + `/${id}`,
|
|
2690
|
+
params
|
|
2691
|
+
);
|
|
2692
|
+
return res;
|
|
2693
|
+
},
|
|
2694
|
+
};
|
|
2524
2695
|
this.svAPIEndpoint =
|
|
2525
2696
|
!options?.env || options?.env == "production"
|
|
2526
2697
|
? "https://sv.api.repzo.me"
|