@movalib/movalib-commons 1.58.0 → 1.59.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.
@@ -3,6 +3,7 @@ import Employee from "../models/Employee";
3
3
  import Garage from "../models/Garage";
4
4
  import { AddCustomerVehicleParams, DeleteCustomerVehicleParams } from "./GarageService.types";
5
5
  export default class GarageService {
6
+ static toogleEventVehicleReceived(garageId: string, eventId: string): Promise<APIResponse<string>>;
6
7
  static setOrderedEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
7
8
  static deleteEventEmployee(garageId: string, eventId: string): Promise<APIResponse<string>>;
8
9
  static updateEventEmployee(garageId: string, eventId: string, employeeId: string): Promise<APIResponse<string>>;
@@ -16,6 +16,13 @@ var Enums_1 = require("../helpers/Enums");
16
16
  var GarageService = /** @class */ (function () {
17
17
  function GarageService() {
18
18
  }
19
+ GarageService.toogleEventVehicleReceived = function (garageId, eventId) {
20
+ return (0, ApiHelper_1.request)({
21
+ url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/events/").concat(eventId, "/vehicle-received"),
22
+ method: Enums_1.APIMethod.PATCH,
23
+ appType: Enums_1.MovaAppType.GARAGE
24
+ });
25
+ };
19
26
  GarageService.setOrderedEvent = function (garageId, eventId, req) {
20
27
  return (0, ApiHelper_1.request)({
21
28
  url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/events/").concat(eventId, "/ordered"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.58.0",
3
+ "version": "1.59.0",
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",
@@ -6,6 +6,14 @@ import {AddCustomerVehicleParams, DeleteCustomerVehicleParams} from "./GarageSer
6
6
 
7
7
  export default class GarageService {
8
8
 
9
+ static toogleEventVehicleReceived(garageId: string, eventId: string): Promise<APIResponse<string>> {
10
+ return request({
11
+ url: `${API_BASE_URL}/garage/${garageId}/events/${eventId}/vehicle-received`,
12
+ method: APIMethod.PATCH,
13
+ appType: MovaAppType.GARAGE
14
+ });
15
+ }
16
+
9
17
  static setOrderedEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>> {
10
18
  return request({
11
19
  url: `${API_BASE_URL}/garage/${garageId}/events/${eventId}/ordered`,