@movalib/movalib-commons 1.59.26 → 1.59.27
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/package.json
CHANGED
package/src/models/Product.ts
CHANGED
|
@@ -7,6 +7,7 @@ export default class Product {
|
|
|
7
7
|
// Properties
|
|
8
8
|
id: string; //UUID
|
|
9
9
|
name: string;
|
|
10
|
+
code:string;
|
|
10
11
|
type: ProductType;
|
|
11
12
|
orderPreference?: OrderPreference;
|
|
12
13
|
originReferences?: string[];
|
|
@@ -22,6 +23,7 @@ export default class Product {
|
|
|
22
23
|
constructor(id:string, code: string, name:string, type: ProductType, orderPreference: OrderPreference, originReferences: string[]) {
|
|
23
24
|
this.id = id;
|
|
24
25
|
this.name = name;
|
|
26
|
+
this.code = code;
|
|
25
27
|
this.type = type;
|
|
26
28
|
this.orderPreference = orderPreference;
|
|
27
29
|
this.originReferences = originReferences;
|
|
@@ -2,6 +2,8 @@ import { APIResponse, API_BASE_URL, request } from "../helpers/ApiHelper";
|
|
|
2
2
|
import { APIMethod, MovaAppType } from "../helpers/Enums";
|
|
3
3
|
import Employee from "../models/Employee";
|
|
4
4
|
import Garage from "../models/Garage";
|
|
5
|
+
import Operation from "../models/Operation";
|
|
6
|
+
import Product from "../models/Product";
|
|
5
7
|
import {
|
|
6
8
|
AddCustomerVehicleParams,
|
|
7
9
|
DeleteCustomerVehicleParams,
|
|
@@ -633,4 +635,20 @@ export default class GarageService {
|
|
|
633
635
|
appType: MovaAppType.GARAGE,
|
|
634
636
|
});
|
|
635
637
|
}
|
|
638
|
+
|
|
639
|
+
static getAllOperations(garageId:string): Promise<APIResponse<Operation>> {
|
|
640
|
+
return request({
|
|
641
|
+
url: `${API_BASE_URL}/garage/${garageId}/operations/all`,
|
|
642
|
+
method: APIMethod.GET,
|
|
643
|
+
appType: MovaAppType.GARAGE,
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
static getAllProducts(garageId:string): Promise<APIResponse<Product>> {
|
|
648
|
+
return request({
|
|
649
|
+
url: `${API_BASE_URL}/garage/${garageId}/products/all`,
|
|
650
|
+
method: APIMethod.GET,
|
|
651
|
+
appType: MovaAppType.GARAGE,
|
|
652
|
+
});
|
|
653
|
+
}
|
|
636
654
|
}
|