@movalib/movalib-commons 1.59.4 → 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
- constructor(id: number, name: string, email: string);
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
  }());
@@ -8,6 +8,7 @@ export default class GarageService {
8
8
  static deleteEventEmployee(garageId: string, eventId: string): Promise<APIResponse<string>>;
9
9
  static updateEventEmployee(garageId: string, eventId: string, employeeId: string): Promise<APIResponse<string>>;
10
10
  static updateColorPrestationCategory(garageId: string, categoryCode: string, color: string): Promise<APIResponse<string>>;
11
+ static updateGarageEventColor(garageId: string, eventId: string, color: string): Promise<APIResponse<string>>;
11
12
  static updateVehicleGarageEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
12
13
  static sendGarageMandate(garageId: string): Promise<APIResponse<string>>;
13
14
  static getGarageAllData(garageId: string): Promise<APIResponse<Garage>>;
@@ -36,6 +37,7 @@ export default class GarageService {
36
37
  static sendSupplierRequest(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
37
38
  static deleteGarageSupplier(garageId: string, supplierId: string): Promise<APIResponse<string>>;
38
39
  static createGarageSupplier(garageId: string, req: any): Promise<APIResponse<string>>;
40
+ static updateGarageSupplier(garageId: string, supplierId: number, req: any): Promise<APIResponse<string>>;
39
41
  static updateGarage(garageId: string, req: any): Promise<APIResponse<string>>;
40
42
  static getAdministratedGarages(): Promise<APIResponse<Garage[]>>;
41
43
  static sendGarageSupportRequest(garageId: string, req: {
@@ -53,6 +53,14 @@ var GarageService = /** @class */ (function () {
53
53
  body: JSON.stringify({ color: color })
54
54
  });
55
55
  };
56
+ GarageService.updateGarageEventColor = function (garageId, eventId, color) {
57
+ return (0, ApiHelper_1.request)({
58
+ url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/color"),
59
+ method: Enums_1.APIMethod.PATCH,
60
+ appType: Enums_1.MovaAppType.GARAGE,
61
+ body: JSON.stringify({ color: color })
62
+ });
63
+ };
56
64
  GarageService.updateVehicleGarageEvent = function (garageId, eventId, req) {
57
65
  return (0, ApiHelper_1.request)({
58
66
  url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/vehicle"),
@@ -263,6 +271,14 @@ var GarageService = /** @class */ (function () {
263
271
  body: JSON.stringify(req)
264
272
  });
265
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
+ };
266
282
  GarageService.updateGarage = function (garageId, req) {
267
283
  return (0, ApiHelper_1.request)({
268
284
  url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.59.4",
3
+ "version": "1.59.6",
4
4
  "description": "Bibliothèque d'objets communs à l'ensemble des projets React de Movalib",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -4,10 +4,15 @@ export default class Supplier {
4
4
  id: number;
5
5
  name: string;
6
6
  email: string;
7
-
8
- constructor(id:number, name: string, email:string) {
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
  }
@@ -47,7 +47,14 @@ export default class GarageService {
47
47
  body: JSON.stringify({ color })
48
48
  });
49
49
  }
50
-
50
+ static updateGarageEventColor(garageId: string, eventId: string, color: string): Promise<APIResponse<string>> {
51
+ return request({
52
+ url: `${API_BASE_URL}/garage/${garageId}/event/${eventId}/color`,
53
+ method: APIMethod.PATCH,
54
+ appType: MovaAppType.GARAGE,
55
+ body: JSON.stringify({ color })
56
+ });
57
+ }
51
58
  static updateVehicleGarageEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>> {
52
59
 
53
60
  return request({
@@ -291,7 +298,15 @@ export default class GarageService {
291
298
  body: JSON.stringify(req)
292
299
  });
293
300
  }
294
-
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
+ }
295
310
  static updateGarage(garageId: string, req: any): Promise<APIResponse<string>> {
296
311
  return request({
297
312
  url: `${API_BASE_URL}/garage/${garageId}`,