@movalib/movalib-commons 1.5.0 → 1.7.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.
|
@@ -44,6 +44,7 @@ export default class Event {
|
|
|
44
44
|
quoteAmount?: number;
|
|
45
45
|
documents?: Document[];
|
|
46
46
|
customerReminders?: number;
|
|
47
|
-
|
|
47
|
+
vehicleAvailableNotified?: boolean;
|
|
48
|
+
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);
|
|
48
49
|
static getPrestationsList(event: Event): string[];
|
|
49
50
|
}
|
package/dist/src/models/Event.js
CHANGED
|
@@ -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) {
|
|
4
|
+
function Event(id, ownerId, type, title, garageName, garageId, state, garageAddress, start, end, prestations, operations, products, guestsId, vehicleId, quoteId, notes, vehicleAvailableNotified) {
|
|
5
5
|
this.id = id;
|
|
6
6
|
this.notes = notes;
|
|
7
7
|
this.ownerId = ownerId;
|
|
@@ -19,6 +19,7 @@ var Event = /** @class */ (function () {
|
|
|
19
19
|
this.guestsId = guestsId;
|
|
20
20
|
this.vehicleId = vehicleId;
|
|
21
21
|
this.quoteId = quoteId;
|
|
22
|
+
this.vehicleAvailableNotified = vehicleAvailableNotified;
|
|
22
23
|
}
|
|
23
24
|
Event.getPrestationsList = function (event) {
|
|
24
25
|
if (event && event.prestations) {
|
|
@@ -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 sendAppointmentVehicleAvailable(garageId: string, eventId: string): Promise<APIResponse<string>>;
|
|
5
6
|
static enableGaragePrestation(garageId: string, prestationId: string): Promise<APIResponse<string>>;
|
|
6
7
|
static disableGaragePrestation(garageId: string, prestationId: string): Promise<APIResponse<string>>;
|
|
7
8
|
static getEmployeeDetails(garageId: string, employeeId: string): Promise<APIResponse<Employee>>;
|
|
@@ -5,6 +5,13 @@ var Enums_1 = require("../helpers/Enums");
|
|
|
5
5
|
var GarageService = /** @class */ (function () {
|
|
6
6
|
function GarageService() {
|
|
7
7
|
}
|
|
8
|
+
GarageService.sendAppointmentVehicleAvailable = function (garageId, eventId) {
|
|
9
|
+
return (0, ApiHelper_1.request)({
|
|
10
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/vehicle-available"),
|
|
11
|
+
method: Enums_1.APIMethod.POST,
|
|
12
|
+
appType: Enums_1.MovaAppType.GARAGE
|
|
13
|
+
});
|
|
14
|
+
};
|
|
8
15
|
GarageService.enableGaragePrestation = function (garageId, prestationId) {
|
|
9
16
|
return (0, ApiHelper_1.request)({
|
|
10
17
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/prestations/").concat(prestationId, "/enable"),
|
package/package.json
CHANGED
package/src/models/Event.ts
CHANGED
|
@@ -47,10 +47,12 @@ export default class Event {
|
|
|
47
47
|
quoteAmount?: number;
|
|
48
48
|
documents?: Document[];
|
|
49
49
|
customerReminders?: number;
|
|
50
|
+
vehicleAvailableNotified?: boolean;
|
|
51
|
+
|
|
50
52
|
|
|
51
53
|
constructor(id: string, ownerId: number, type : EventType, title: string, garageName: string, garageId: number,
|
|
52
54
|
state: EventState, garageAddress?: Address, start?: Date, end?: Date, prestations?: Prestation[], operations?: Operation[], products?: Product[],
|
|
53
|
-
guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string)
|
|
55
|
+
guestsId?: string[], vehicleId?: number, quoteId?: number, notes?: string, vehicleAvailableNotified?: boolean)
|
|
54
56
|
{
|
|
55
57
|
this.id = id;
|
|
56
58
|
this.notes = notes;
|
|
@@ -69,6 +71,7 @@ export default class Event {
|
|
|
69
71
|
this.guestsId = guestsId;
|
|
70
72
|
this.vehicleId = vehicleId;
|
|
71
73
|
this.quoteId = quoteId;
|
|
74
|
+
this.vehicleAvailableNotified = vehicleAvailableNotified;
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
static getPrestationsList(event: Event) : string[] {
|
|
@@ -5,6 +5,14 @@ import Garage from "../models/Garage";
|
|
|
5
5
|
|
|
6
6
|
export default class GarageService {
|
|
7
7
|
|
|
8
|
+
static sendAppointmentVehicleAvailable(garageId: string, eventId: string): Promise<APIResponse<string>> {
|
|
9
|
+
return request({
|
|
10
|
+
url: `${API_BASE_URL}/garage/${garageId}/event/${eventId}/vehicle-available`,
|
|
11
|
+
method: APIMethod.POST,
|
|
12
|
+
appType: MovaAppType.GARAGE
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
8
16
|
static enableGaragePrestation(garageId: string, prestationId: string): Promise<APIResponse<string>> {
|
|
9
17
|
return request({
|
|
10
18
|
url: `${API_BASE_URL}/garage/${garageId}/prestations/${prestationId}/enable`,
|