@movalib/movalib-commons 1.59.5 → 1.59.6
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,5 +2,8 @@ export default class Supplier {
|
|
|
2
2
|
id: number;
|
|
3
3
|
name: string;
|
|
4
4
|
email: string;
|
|
5
|
-
|
|
5
|
+
phoneNumber: string;
|
|
6
|
+
customerId: string;
|
|
7
|
+
orderPortalUrl: string;
|
|
8
|
+
constructor(id: number, name: string, email: string, phoneNumber: string, customerId: string, orderPortalUrl: string);
|
|
6
9
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var Supplier = /** @class */ (function () {
|
|
4
|
-
function Supplier(id, name, email) {
|
|
4
|
+
function Supplier(id, name, email, phoneNumber, customerId, orderPortalUrl) {
|
|
5
5
|
this.id = id;
|
|
6
6
|
this.name = name;
|
|
7
7
|
this.email = email;
|
|
8
|
+
this.phoneNumber = phoneNumber;
|
|
9
|
+
this.customerId = customerId;
|
|
10
|
+
this.orderPortalUrl = orderPortalUrl;
|
|
8
11
|
}
|
|
9
12
|
return Supplier;
|
|
10
13
|
}());
|
|
@@ -37,6 +37,7 @@ export default class GarageService {
|
|
|
37
37
|
static sendSupplierRequest(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
|
|
38
38
|
static deleteGarageSupplier(garageId: string, supplierId: string): Promise<APIResponse<string>>;
|
|
39
39
|
static createGarageSupplier(garageId: string, req: any): Promise<APIResponse<string>>;
|
|
40
|
+
static updateGarageSupplier(garageId: string, supplierId: number, req: any): Promise<APIResponse<string>>;
|
|
40
41
|
static updateGarage(garageId: string, req: any): Promise<APIResponse<string>>;
|
|
41
42
|
static getAdministratedGarages(): Promise<APIResponse<Garage[]>>;
|
|
42
43
|
static sendGarageSupportRequest(garageId: string, req: {
|
|
@@ -271,6 +271,14 @@ var GarageService = /** @class */ (function () {
|
|
|
271
271
|
body: JSON.stringify(req)
|
|
272
272
|
});
|
|
273
273
|
};
|
|
274
|
+
GarageService.updateGarageSupplier = function (garageId, supplierId, req) {
|
|
275
|
+
return (0, ApiHelper_1.request)({
|
|
276
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/suppliers/").concat(supplierId),
|
|
277
|
+
method: Enums_1.APIMethod.PATCH,
|
|
278
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
279
|
+
body: JSON.stringify(req)
|
|
280
|
+
});
|
|
281
|
+
};
|
|
274
282
|
GarageService.updateGarage = function (garageId, req) {
|
|
275
283
|
return (0, ApiHelper_1.request)({
|
|
276
284
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId),
|
package/package.json
CHANGED
package/src/models/Supplier.ts
CHANGED
|
@@ -4,10 +4,15 @@ export default class Supplier {
|
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
6
|
email: string;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
phoneNumber: string;
|
|
8
|
+
customerId: string;
|
|
9
|
+
orderPortalUrl: string;
|
|
10
|
+
constructor(id:number, name: string, email:string, phoneNumber: string, customerId: string, orderPortalUrl: string) {
|
|
9
11
|
this.id = id;
|
|
10
12
|
this.name = name;
|
|
11
13
|
this.email = email;
|
|
14
|
+
this.phoneNumber = phoneNumber;
|
|
15
|
+
this.customerId = customerId;
|
|
16
|
+
this.orderPortalUrl = orderPortalUrl;
|
|
12
17
|
}
|
|
13
18
|
}
|
|
@@ -298,7 +298,15 @@ export default class GarageService {
|
|
|
298
298
|
body: JSON.stringify(req)
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
|
|
301
|
+
|
|
302
|
+
static updateGarageSupplier(garageId: string, supplierId: number ,req: any): Promise<APIResponse<string>> {
|
|
303
|
+
return request({
|
|
304
|
+
url: `${API_BASE_URL}/garage/${garageId}/suppliers/${supplierId}`,
|
|
305
|
+
method: APIMethod.PATCH,
|
|
306
|
+
appType: MovaAppType.GARAGE,
|
|
307
|
+
body: JSON.stringify(req)
|
|
308
|
+
});
|
|
309
|
+
}
|
|
302
310
|
static updateGarage(garageId: string, req: any): Promise<APIResponse<string>> {
|
|
303
311
|
return request({
|
|
304
312
|
url: `${API_BASE_URL}/garage/${garageId}`,
|