@movalib/movalib-commons 1.59.27 → 1.59.28

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.
@@ -4,6 +4,7 @@ import Supplier from "./Supplier";
4
4
  export default class Product {
5
5
  id: string;
6
6
  name: string;
7
+ code: string;
7
8
  type: ProductType;
8
9
  orderPreference?: OrderPreference;
9
10
  originReferences?: string[];
@@ -4,6 +4,7 @@ var Product = /** @class */ (function () {
4
4
  function Product(id, code, name, type, orderPreference, originReferences) {
5
5
  this.id = id;
6
6
  this.name = name;
7
+ this.code = code;
7
8
  this.type = type;
8
9
  this.orderPreference = orderPreference;
9
10
  this.originReferences = originReferences;
@@ -1,6 +1,8 @@
1
1
  import { APIResponse } from "../helpers/ApiHelper";
2
2
  import Employee from "../models/Employee";
3
3
  import Garage from "../models/Garage";
4
+ import Operation from "../models/Operation";
5
+ import Product from "../models/Product";
4
6
  import { AddCustomerVehicleParams, DeleteCustomerVehicleParams } from "./GarageService.types";
5
7
  export default class GarageService {
6
8
  static updatePaymentAuthorization(garageId: string, req: any): Promise<APIResponse<string>>;
@@ -74,4 +76,6 @@ export default class GarageService {
74
76
  static deassignGarageVehicleEvent(garageId: string, eventId: string): Promise<APIResponse<string>>;
75
77
  static getGaragesCsm(): Promise<APIResponse<Garage[]>>;
76
78
  static getOneGarageCsm(garageId: string): Promise<APIResponse<Garage[]>>;
79
+ static getAllOperations(garageId: string): Promise<APIResponse<Operation>>;
80
+ static getAllProducts(garageId: string): Promise<APIResponse<Product>>;
77
81
  }
@@ -448,6 +448,20 @@ var GarageService = /** @class */ (function () {
448
448
  appType: Enums_1.MovaAppType.GARAGE,
449
449
  });
450
450
  };
451
+ GarageService.getAllOperations = function (garageId) {
452
+ return (0, ApiHelper_1.request)({
453
+ url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/operations/all"),
454
+ method: Enums_1.APIMethod.GET,
455
+ appType: Enums_1.MovaAppType.GARAGE,
456
+ });
457
+ };
458
+ GarageService.getAllProducts = function (garageId) {
459
+ return (0, ApiHelper_1.request)({
460
+ url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/products/all"),
461
+ method: Enums_1.APIMethod.GET,
462
+ appType: Enums_1.MovaAppType.GARAGE,
463
+ });
464
+ };
451
465
  return GarageService;
452
466
  }());
453
467
  exports.default = GarageService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.59.27",
3
+ "version": "1.59.28",
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",