@movalib/movalib-commons 1.34.0 → 1.36.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.
@@ -49,7 +49,11 @@ export declare enum SubscriptionPaymentInterval {
49
49
  /**
50
50
  * Paiement Annuel
51
51
  */
52
- YEAR = "YEAR"
52
+ YEAR = "YEAR",
53
+ /**
54
+ * Paiement 24 Mois
55
+ */
56
+ TWO_YEARS = "TWO_YEARS"
53
57
  }
54
58
  export declare enum RegistrationState {
55
59
  /**
@@ -59,6 +59,10 @@ var SubscriptionPaymentInterval;
59
59
  * Paiement Annuel
60
60
  */
61
61
  SubscriptionPaymentInterval["YEAR"] = "YEAR";
62
+ /**
63
+ * Paiement 24 Mois
64
+ */
65
+ SubscriptionPaymentInterval["TWO_YEARS"] = "TWO_YEARS";
62
66
  })(SubscriptionPaymentInterval = exports.SubscriptionPaymentInterval || (exports.SubscriptionPaymentInterval = {}));
63
67
  var RegistrationState;
64
68
  (function (RegistrationState) {
@@ -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 updateVehicleGarageEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
5
6
  static sendGarageMandate(garageId: string): Promise<APIResponse<string>>;
6
7
  static getGarageAllData(garageId: string): Promise<APIResponse<Garage>>;
7
8
  static createGaragePrestationRequest(garageId: string, req: any): Promise<APIResponse<string>>;
@@ -5,6 +5,14 @@ var Enums_1 = require("../helpers/Enums");
5
5
  var GarageService = /** @class */ (function () {
6
6
  function GarageService() {
7
7
  }
8
+ GarageService.updateVehicleGarageEvent = function (garageId, eventId, req) {
9
+ return (0, ApiHelper_1.request)({
10
+ url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/vehicle"),
11
+ method: Enums_1.APIMethod.PATCH,
12
+ appType: Enums_1.MovaAppType.GARAGE,
13
+ body: JSON.stringify(req)
14
+ });
15
+ };
8
16
  GarageService.sendGarageMandate = function (garageId) {
9
17
  return (0, ApiHelper_1.request)({
10
18
  url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/subscription-mandate"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.34.0",
3
+ "version": "1.36.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",
@@ -56,7 +56,11 @@ export enum SubscriptionPaymentInterval {
56
56
  /**
57
57
  * Paiement Annuel
58
58
  */
59
- YEAR = "YEAR"
59
+ YEAR = "YEAR",
60
+ /**
61
+ * Paiement 24 Mois
62
+ */
63
+ TWO_YEARS = "TWO_YEARS"
60
64
  }
61
65
 
62
66
 
@@ -6,6 +6,16 @@ import Subscription from "../models/Subscription";
6
6
 
7
7
  export default class GarageService {
8
8
 
9
+ static updateVehicleGarageEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>> {
10
+
11
+ return request({
12
+ url: `${API_BASE_URL}/garage/${garageId}/event/${eventId}/vehicle`,
13
+ method: APIMethod.PATCH,
14
+ appType: MovaAppType.GARAGE,
15
+ body: JSON.stringify(req)
16
+ });
17
+ }
18
+
9
19
  static sendGarageMandate(garageId: string): Promise<APIResponse<string>> {
10
20
 
11
21
  return request({