@movalib/movalib-commons 1.26.0 → 1.27.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.
@@ -2,6 +2,7 @@ import { APIResponse } from "../helpers/ApiHelper";
2
2
  import Employee from "../models/Employee";
3
3
  import Garage from "../models/Garage";
4
4
  export default class GarageService {
5
+ static sendGarageMandate(garageId: string): Promise<APIResponse<string>>;
5
6
  static getGarageAllData(garageId: string): Promise<APIResponse<Garage>>;
6
7
  static createGaragePrestationRequest(garageId: string, req: any): Promise<APIResponse<string>>;
7
8
  static getGarageSettings(garageId: string): Promise<APIResponse<Garage>>;
@@ -5,6 +5,12 @@ var Enums_1 = require("../helpers/Enums");
5
5
  var GarageService = /** @class */ (function () {
6
6
  function GarageService() {
7
7
  }
8
+ GarageService.sendGarageMandate = function (garageId) {
9
+ return (0, ApiHelper_1.request)({
10
+ url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/subscription-mandate"),
11
+ method: Enums_1.APIMethod.POST,
12
+ });
13
+ };
8
14
  GarageService.getGarageAllData = function (garageId) {
9
15
  return (0, ApiHelper_1.request)({
10
16
  url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/all-data"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.26.0",
3
+ "version": "1.27.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,9 +2,18 @@ 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";
5
6
 
6
7
  export default class GarageService {
7
8
 
9
+ static sendGarageMandate(garageId: string): Promise<APIResponse<string>> {
10
+
11
+ return request({
12
+ url: `${API_BASE_URL}/garage/${garageId}/subscription-mandate`,
13
+ method: APIMethod.POST,
14
+ });
15
+ }
16
+
8
17
  static getGarageAllData(garageId: string): Promise<APIResponse<Garage>> {
9
18
  return request({
10
19
  url: `${API_BASE_URL}/garage/${garageId}/all-data`,