@movalib/movalib-commons 1.2.30 → 1.4.0
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.
|
@@ -2,6 +2,8 @@ import { APIResponse } from "../helpers/ApiHelper";
|
|
|
2
2
|
import Employee from "../models/Employee";
|
|
3
3
|
import Garage from "../models/Garage";
|
|
4
4
|
export default class GarageService {
|
|
5
|
+
static enableGaragePrestation(garageId: string, prestationId: string): Promise<APIResponse<string>>;
|
|
6
|
+
static disableGaragePrestation(garageId: string, prestationId: string): Promise<APIResponse<string>>;
|
|
5
7
|
static getEmployeeDetails(garageId: string, employeeId: string): Promise<APIResponse<Employee>>;
|
|
6
8
|
static updateGaragePrestation(garageId: string, prestationId: string, req: any): Promise<APIResponse<string>>;
|
|
7
9
|
static deleteGarageEmployeePrestationType(garageId: string, employeeId: string, req: any): Promise<APIResponse<string>>;
|
|
@@ -5,6 +5,20 @@ var Enums_1 = require("../helpers/Enums");
|
|
|
5
5
|
var GarageService = /** @class */ (function () {
|
|
6
6
|
function GarageService() {
|
|
7
7
|
}
|
|
8
|
+
GarageService.enableGaragePrestation = function (garageId, prestationId) {
|
|
9
|
+
return (0, ApiHelper_1.request)({
|
|
10
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/prestations/").concat(prestationId, "/enable"),
|
|
11
|
+
method: Enums_1.APIMethod.PATCH,
|
|
12
|
+
appType: Enums_1.MovaAppType.GARAGE
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
GarageService.disableGaragePrestation = function (garageId, prestationId) {
|
|
16
|
+
return (0, ApiHelper_1.request)({
|
|
17
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/prestations/").concat(prestationId, "/disable"),
|
|
18
|
+
method: Enums_1.APIMethod.PATCH,
|
|
19
|
+
appType: Enums_1.MovaAppType.GARAGE
|
|
20
|
+
});
|
|
21
|
+
};
|
|
8
22
|
GarageService.getEmployeeDetails = function (garageId, employeeId) {
|
|
9
23
|
return (0, ApiHelper_1.request)({
|
|
10
24
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/employees/").concat(employeeId),
|
package/package.json
CHANGED
|
@@ -5,6 +5,22 @@ import Garage from "../models/Garage";
|
|
|
5
5
|
|
|
6
6
|
export default class GarageService {
|
|
7
7
|
|
|
8
|
+
static enableGaragePrestation(garageId: string, prestationId: string): Promise<APIResponse<string>> {
|
|
9
|
+
return request({
|
|
10
|
+
url: `${API_BASE_URL}/garage/${garageId}/prestations/${prestationId}/enable`,
|
|
11
|
+
method: APIMethod.PATCH,
|
|
12
|
+
appType: MovaAppType.GARAGE
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static disableGaragePrestation(garageId: string, prestationId: string): Promise<APIResponse<string>> {
|
|
17
|
+
return request({
|
|
18
|
+
url: `${API_BASE_URL}/garage/${garageId}/prestations/${prestationId}/disable`,
|
|
19
|
+
method: APIMethod.PATCH,
|
|
20
|
+
appType: MovaAppType.GARAGE
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
8
24
|
static getEmployeeDetails(garageId: string, employeeId: string): Promise<APIResponse<Employee>> {
|
|
9
25
|
return request({
|
|
10
26
|
url: `${API_BASE_URL}/garage/${garageId}/employees/${employeeId}`,
|