@movalib/movalib-commons 1.38.0 → 1.39.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.
@@ -31,4 +31,7 @@ export default class GarageService {
31
31
  static createGarageSupplier(garageId: string, req: any): Promise<APIResponse<string>>;
32
32
  static updateGarage(garageId: string, req: any): Promise<APIResponse<string>>;
33
33
  static getAdministratedGarages(): Promise<APIResponse<Garage[]>>;
34
+ static sendGarageSupportRequest(garageId: string, req: {
35
+ message: string;
36
+ }): Promise<APIResponse<string>>;
34
37
  }
@@ -226,6 +226,14 @@ var GarageService = /** @class */ (function () {
226
226
  appType: Enums_1.MovaAppType.GARAGE
227
227
  });
228
228
  };
229
+ GarageService.sendGarageSupportRequest = function (garageId, req) {
230
+ return (0, ApiHelper_1.request)({
231
+ url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/support-request"),
232
+ method: Enums_1.APIMethod.POST,
233
+ appType: Enums_1.MovaAppType.GARAGE,
234
+ body: JSON.stringify(req)
235
+ });
236
+ };
229
237
  return GarageService;
230
238
  }());
231
239
  exports.default = GarageService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.38.0",
3
+ "version": "1.39.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",
@@ -2,7 +2,6 @@ import { APIResponse, API_BASE_URL, request } from "../helpers/ApiHelper";
2
2
  import { APIMethod, MovaAppType } from "../helpers/Enums";
3
3
  import Employee from "../models/Employee";
4
4
  import Garage from "../models/Garage";
5
- import Subscription from "../models/Subscription";
6
5
 
7
6
  export default class GarageService {
8
7
 
@@ -262,4 +261,13 @@ export default class GarageService {
262
261
  });
263
262
  }
264
263
 
265
- }
264
+ static sendGarageSupportRequest(garageId: string, req: { message: string }): Promise<APIResponse<string>> {
265
+ return request({
266
+ url: `${API_BASE_URL}/garage/${garageId}/support-request`,
267
+ method: APIMethod.POST,
268
+ appType: MovaAppType.GARAGE,
269
+ body: JSON.stringify(req)
270
+ });
271
+ }
272
+
273
+ }