@movalib/movalib-commons 1.0.86 → 1.0.88
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.
|
@@ -15,8 +15,12 @@ export declare enum ProductType {
|
|
|
15
15
|
CONSUMABLE = "CONSUMABLE"
|
|
16
16
|
}
|
|
17
17
|
export declare enum PartsApplicationType {
|
|
18
|
-
FRONT = "
|
|
19
|
-
REAR = "
|
|
18
|
+
FRONT = "FT",
|
|
19
|
+
REAR = "RR",
|
|
20
|
+
FRONT_REAR = "FTRR",
|
|
21
|
+
LEFT = "LT",
|
|
22
|
+
RIGHT = "RT",
|
|
23
|
+
LEFT_RIGHT = "LTRT"
|
|
20
24
|
}
|
|
21
25
|
export declare enum APIMethod {
|
|
22
26
|
GET = "GET",
|
|
@@ -22,8 +22,12 @@ var ProductType;
|
|
|
22
22
|
})(ProductType = exports.ProductType || (exports.ProductType = {}));
|
|
23
23
|
var PartsApplicationType;
|
|
24
24
|
(function (PartsApplicationType) {
|
|
25
|
-
PartsApplicationType["FRONT"] = "
|
|
26
|
-
PartsApplicationType["REAR"] = "
|
|
25
|
+
PartsApplicationType["FRONT"] = "FT";
|
|
26
|
+
PartsApplicationType["REAR"] = "RR";
|
|
27
|
+
PartsApplicationType["FRONT_REAR"] = "FTRR";
|
|
28
|
+
PartsApplicationType["LEFT"] = "LT";
|
|
29
|
+
PartsApplicationType["RIGHT"] = "RT";
|
|
30
|
+
PartsApplicationType["LEFT_RIGHT"] = "LTRT";
|
|
27
31
|
})(PartsApplicationType = exports.PartsApplicationType || (exports.PartsApplicationType = {}));
|
|
28
32
|
var APIMethod;
|
|
29
33
|
(function (APIMethod) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { APIResponse } from "../helpers/ApiHelper";
|
|
2
2
|
import Garage from "../models/Garage";
|
|
3
3
|
export default class GarageService {
|
|
4
|
+
static updateGarageEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
|
|
5
|
+
static sendSupplierRequest(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
|
|
4
6
|
static deleteGarageSupplier(garageId: string, supplierId: string): Promise<APIResponse<string>>;
|
|
5
7
|
static createGarageSupplier(garageId: string, req: any): Promise<APIResponse<string>>;
|
|
6
8
|
static updateGarage(garageId: 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.updateGarageEvent = function (garageId, eventId, req) {
|
|
9
|
+
return (0, ApiHelper_1.request)({
|
|
10
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId),
|
|
11
|
+
method: Enums_1.APIMethod.PATCH,
|
|
12
|
+
body: JSON.stringify(req)
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
GarageService.sendSupplierRequest = function (garageId, eventId, req) {
|
|
16
|
+
return (0, ApiHelper_1.request)({
|
|
17
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/events/").concat(eventId, "/supplierRequest"),
|
|
18
|
+
method: Enums_1.APIMethod.POST,
|
|
19
|
+
body: JSON.stringify(req)
|
|
20
|
+
});
|
|
21
|
+
};
|
|
8
22
|
GarageService.deleteGarageSupplier = function (garageId, supplierId) {
|
|
9
23
|
return (0, ApiHelper_1.request)({
|
|
10
24
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/suppliers/").concat(supplierId),
|
package/package.json
CHANGED
package/src/helpers/Enums.ts
CHANGED
|
@@ -18,8 +18,12 @@ export enum ProductType {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export enum PartsApplicationType {
|
|
21
|
-
FRONT = '
|
|
22
|
-
REAR = '
|
|
21
|
+
FRONT = 'FT',
|
|
22
|
+
REAR = 'RR',
|
|
23
|
+
FRONT_REAR = "FTRR",
|
|
24
|
+
LEFT = "LT",
|
|
25
|
+
RIGHT = "RT",
|
|
26
|
+
LEFT_RIGHT = "LTRT"
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
export enum APIMethod {
|
|
@@ -4,6 +4,23 @@ import Garage from "../models/Garage";
|
|
|
4
4
|
|
|
5
5
|
export default class GarageService {
|
|
6
6
|
|
|
7
|
+
static updateGarageEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>> {
|
|
8
|
+
|
|
9
|
+
return request({
|
|
10
|
+
url: `${API_BASE_URL}/garage/${garageId}/event/${eventId}`,
|
|
11
|
+
method: APIMethod.PATCH,
|
|
12
|
+
body: JSON.stringify(req)
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static sendSupplierRequest(garageId: string, eventId: string, req: any): Promise<APIResponse<string>> {
|
|
17
|
+
return request({
|
|
18
|
+
url: `${API_BASE_URL}/garage/${garageId}/events/${eventId}/supplierRequest`,
|
|
19
|
+
method: APIMethod.POST,
|
|
20
|
+
body: JSON.stringify(req)
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
7
24
|
static deleteGarageSupplier(garageId: string, supplierId: string): Promise<APIResponse<string>> {
|
|
8
25
|
return request({
|
|
9
26
|
url: `${API_BASE_URL}/garage/${garageId}/suppliers/${supplierId}`,
|