@movalib/movalib-commons 1.51.6 → 1.52.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.
@@ -54,6 +54,6 @@ export default class Event {
54
54
  /** Eventuels opérateurs associés à l'event */
55
55
  employees?: Employee[];
56
56
  resourceId?: number;
57
- constructor(id: string, ownerId: number, type: EventType, title: string, garageName: string, garageId: number, state: EventState, garageAddress?: Address, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[], guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string, vehicleAvailableNotified?: boolean, editable?: boolean);
57
+ constructor(id: string, ownerId: number, type: EventType, title: string, garageName: string, garageId: number, state: EventState, garageAddress?: Address, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[], guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string, vehicleAvailableNotified?: boolean, editable?: boolean, resourceId?: number);
58
58
  static getPrestationsList(event: Event): string[];
59
59
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var Event = /** @class */ (function () {
4
- function Event(id, ownerId, type, title, garageName, garageId, state, garageAddress, start, end, prestations, operations, products, guestsId, vehicleId, quoteId, notes, vehicleAvailableNotified, editable) {
4
+ function Event(id, ownerId, type, title, garageName, garageId, state, garageAddress, start, end, prestations, operations, products, guestsId, vehicleId, quoteId, notes, vehicleAvailableNotified, editable, resourceId) {
5
5
  this.id = id;
6
6
  this.notes = notes;
7
7
  this.ownerId = ownerId;
@@ -21,6 +21,7 @@ var Event = /** @class */ (function () {
21
21
  this.quoteId = quoteId;
22
22
  this.vehicleAvailableNotified = vehicleAvailableNotified;
23
23
  this.editable = editable;
24
+ this.resourceId = resourceId;
24
25
  }
25
26
  Event.getPrestationsList = function (event) {
26
27
  if (event && event.prestations) {
@@ -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 deleteEventEmployee(garageId: string, eventId: string): Promise<APIResponse<string>>;
6
7
  static updateEventEmployee(garageId: string, eventId: string, employeeId: string): Promise<APIResponse<string>>;
7
8
  static updateVehicleGarageEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
8
9
  static sendGarageMandate(garageId: 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.deleteEventEmployee = function (garageId, eventId) {
20
+ return (0, ApiHelper_1.request)({
21
+ url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/employees"),
22
+ method: Enums_1.APIMethod.DELETE,
23
+ appType: Enums_1.MovaAppType.GARAGE
24
+ });
25
+ };
19
26
  GarageService.updateEventEmployee = function (garageId, eventId, employeeId) {
20
27
  return (0, ApiHelper_1.request)({
21
28
  url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/employees/").concat(employeeId),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.51.6",
3
+ "version": "1.52.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",
@@ -62,7 +62,7 @@ export default class Event {
62
62
 
63
63
  constructor(id: string, ownerId: number, type : EventType, title: string, garageName: string, garageId: number,
64
64
  state: EventState, garageAddress?: Address, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[],
65
- guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string, vehicleAvailableNotified?: boolean, editable?: boolean)
65
+ guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string, vehicleAvailableNotified?: boolean, editable?: boolean, resourceId?: number)
66
66
  {
67
67
  this.id = id;
68
68
  this.notes = notes;
@@ -83,6 +83,7 @@ export default class Event {
83
83
  this.quoteId = quoteId;
84
84
  this.vehicleAvailableNotified = vehicleAvailableNotified;
85
85
  this.editable = editable;
86
+ this.resourceId = resourceId;
86
87
  }
87
88
 
88
89
  static getPrestationsList(event: Event) : string[] {
@@ -6,6 +6,14 @@ import {AddCustomerVehicleParams, DeleteCustomerVehicleParams} from "./GarageSer
6
6
 
7
7
  export default class GarageService {
8
8
 
9
+ static deleteEventEmployee(garageId: string, eventId: string): Promise<APIResponse<string>> {
10
+ return request({
11
+ url: `${API_BASE_URL}/garage/${garageId}/event/${eventId}/employees`,
12
+ method: APIMethod.DELETE,
13
+ appType: MovaAppType.GARAGE
14
+ });
15
+ }
16
+
9
17
  static updateEventEmployee(garageId: string, eventId: string, employeeId: string): Promise<APIResponse<string>> {
10
18
  return request({
11
19
  url: `${API_BASE_URL}/garage/${garageId}/event/${eventId}/employees/${employeeId}`,