@movalib/movalib-commons 1.59.12 → 1.59.14
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.
- package/.env.development +2 -0
- package/dist/src/helpers/Enums.d.ts +4 -0
- package/dist/src/helpers/Enums.js +4 -0
- package/dist/src/models/Garage.d.ts +2 -0
- package/dist/src/services/GarageService.d.ts +6 -4
- package/dist/src/services/GarageService.js +63 -48
- package/package.json +1 -1
- package/src/helpers/Enums.ts +4 -0
- package/src/models/Garage.ts +2 -0
- package/src/services/GarageService.ts +589 -428
package/.env.development
CHANGED
|
@@ -151,6 +151,10 @@ export declare enum DigitalPassportIndex {
|
|
|
151
151
|
C = "C"
|
|
152
152
|
}
|
|
153
153
|
export declare enum EventState {
|
|
154
|
+
/**
|
|
155
|
+
* Demande d'empreinte bancaire (pour validation de la demande de RDV)
|
|
156
|
+
*/
|
|
157
|
+
REQUIRES_PAYMENT_AUTHORIZATION = "REQUIRES_PAYMENT_AUTHORIZATION",
|
|
154
158
|
/**
|
|
155
159
|
* Nouvelle demande de rendez-vous (origine client OU centre)
|
|
156
160
|
*/
|
|
@@ -173,6 +173,10 @@ var DigitalPassportIndex;
|
|
|
173
173
|
})(DigitalPassportIndex = exports.DigitalPassportIndex || (exports.DigitalPassportIndex = {}));
|
|
174
174
|
var EventState;
|
|
175
175
|
(function (EventState) {
|
|
176
|
+
/**
|
|
177
|
+
* Demande d'empreinte bancaire (pour validation de la demande de RDV)
|
|
178
|
+
*/
|
|
179
|
+
EventState["REQUIRES_PAYMENT_AUTHORIZATION"] = "REQUIRES_PAYMENT_AUTHORIZATION";
|
|
176
180
|
/**
|
|
177
181
|
* Nouvelle demande de rendez-vous (origine client OU centre)
|
|
178
182
|
*/
|
|
@@ -49,5 +49,7 @@ export default class Garage {
|
|
|
49
49
|
defaultView?: string;
|
|
50
50
|
loanerVehicleActive?: boolean;
|
|
51
51
|
loanerVehicleRequestActive?: boolean;
|
|
52
|
+
paymentAuthorizationActive?: boolean;
|
|
53
|
+
paymentAuthorizationMinDowntime?: number;
|
|
52
54
|
constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, prestationCategories: CategoryPrestation[], vehicles?: VehicleGarage[], contactEmail?: string, logo?: string, suppliers?: Supplier[], documents?: Document[], subscriptions?: Subscription[], loanerVehicleActive?: boolean, loanerVehicleRequestActive?: boolean, subscription?: Subscription, partialWorkforce?: number);
|
|
53
55
|
}
|
|
@@ -3,6 +3,8 @@ import Employee from "../models/Employee";
|
|
|
3
3
|
import Garage from "../models/Garage";
|
|
4
4
|
import { AddCustomerVehicleParams, DeleteCustomerVehicleParams } from "./GarageService.types";
|
|
5
5
|
export default class GarageService {
|
|
6
|
+
static updatePaymentAuthorization(garageId: string, req: any): Promise<APIResponse<string>>;
|
|
7
|
+
static toogleGaragePaymentAuthorization(garageId: string): Promise<APIResponse<string>>;
|
|
6
8
|
static toogleEventVehicleReceived(garageId: string, eventId: string): Promise<APIResponse<string>>;
|
|
7
9
|
static setOrderedEvent(garageId: string, eventId: string, req: any): Promise<APIResponse<string>>;
|
|
8
10
|
static deleteEventEmployee(garageId: string, eventId: string): Promise<APIResponse<string>>;
|
|
@@ -39,23 +41,23 @@ export default class GarageService {
|
|
|
39
41
|
static createGarageSupplier(garageId: string, req: any): Promise<APIResponse<string>>;
|
|
40
42
|
static updateGarageSupplier(garageId: string, supplierId: number, req: any): Promise<APIResponse<string>>;
|
|
41
43
|
static updateGarage(garageId: string, req: any): Promise<APIResponse<string>>;
|
|
42
|
-
static getAdministratedGarages({ garageId }: {
|
|
44
|
+
static getAdministratedGarages({ garageId, }: {
|
|
43
45
|
garageId: string;
|
|
44
46
|
}): Promise<APIResponse<Garage>>;
|
|
45
47
|
static sendGarageSupportRequest(garageId: string, req: {
|
|
46
48
|
message: string;
|
|
47
49
|
}): Promise<APIResponse<string>>;
|
|
48
50
|
static addCustomerVehicle({ garageId, customerId, ...payload }: AddCustomerVehicleParams): Promise<APIResponse<string>>;
|
|
49
|
-
static deleteCustomerVehicle({ garageId, customerId, vehicleId }: DeleteCustomerVehicleParams): Promise<APIResponse<string>>;
|
|
51
|
+
static deleteCustomerVehicle({ garageId, customerId, vehicleId, }: DeleteCustomerVehicleParams): Promise<APIResponse<string>>;
|
|
50
52
|
static toogleGarageLoanerVehicleRequest(garageId: string, req: any): Promise<APIResponse<string>>;
|
|
51
53
|
static toogleGarageLoanerVehicle(garageId: string): Promise<APIResponse<string>>;
|
|
52
|
-
static addGarageVehicle({ garageId, req }: {
|
|
54
|
+
static addGarageVehicle({ garageId, req, }: {
|
|
53
55
|
garageId: string;
|
|
54
56
|
req: {
|
|
55
57
|
plate: string;
|
|
56
58
|
};
|
|
57
59
|
}): Promise<APIResponse<string>>;
|
|
58
|
-
static deleteGarageVehicle({ garageId, vehicleId }: {
|
|
60
|
+
static deleteGarageVehicle({ garageId, vehicleId, }: {
|
|
59
61
|
garageId: string;
|
|
60
62
|
vehicleId: number;
|
|
61
63
|
}): Promise<APIResponse<string>>;
|
|
@@ -16,11 +16,26 @@ var Enums_1 = require("../helpers/Enums");
|
|
|
16
16
|
var GarageService = /** @class */ (function () {
|
|
17
17
|
function GarageService() {
|
|
18
18
|
}
|
|
19
|
+
GarageService.updatePaymentAuthorization = function (garageId, req) {
|
|
20
|
+
return (0, ApiHelper_1.request)({
|
|
21
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/settings/payment-authorization/update"),
|
|
22
|
+
method: Enums_1.APIMethod.PATCH,
|
|
23
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
24
|
+
body: JSON.stringify(req),
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
GarageService.toogleGaragePaymentAuthorization = function (garageId) {
|
|
28
|
+
return (0, ApiHelper_1.request)({
|
|
29
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/settings/payment-authorization"),
|
|
30
|
+
method: Enums_1.APIMethod.PATCH,
|
|
31
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
32
|
+
});
|
|
33
|
+
};
|
|
19
34
|
GarageService.toogleEventVehicleReceived = function (garageId, eventId) {
|
|
20
35
|
return (0, ApiHelper_1.request)({
|
|
21
36
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/events/").concat(eventId, "/vehicle-received"),
|
|
22
37
|
method: Enums_1.APIMethod.PATCH,
|
|
23
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
38
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
24
39
|
});
|
|
25
40
|
};
|
|
26
41
|
GarageService.setOrderedEvent = function (garageId, eventId, req) {
|
|
@@ -28,21 +43,21 @@ var GarageService = /** @class */ (function () {
|
|
|
28
43
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/events/").concat(eventId, "/ordered"),
|
|
29
44
|
method: Enums_1.APIMethod.POST,
|
|
30
45
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
31
|
-
body: JSON.stringify(req)
|
|
46
|
+
body: JSON.stringify(req),
|
|
32
47
|
});
|
|
33
48
|
};
|
|
34
49
|
GarageService.deleteEventEmployee = function (garageId, eventId) {
|
|
35
50
|
return (0, ApiHelper_1.request)({
|
|
36
51
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/employees"),
|
|
37
52
|
method: Enums_1.APIMethod.DELETE,
|
|
38
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
53
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
39
54
|
});
|
|
40
55
|
};
|
|
41
56
|
GarageService.updateEventEmployee = function (garageId, eventId, employeeId) {
|
|
42
57
|
return (0, ApiHelper_1.request)({
|
|
43
58
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/employees/").concat(employeeId),
|
|
44
59
|
method: Enums_1.APIMethod.PATCH,
|
|
45
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
60
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
46
61
|
});
|
|
47
62
|
};
|
|
48
63
|
GarageService.updateColorPrestationCategory = function (garageId, categoryCode, color) {
|
|
@@ -50,7 +65,7 @@ var GarageService = /** @class */ (function () {
|
|
|
50
65
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/prestation-category/").concat(categoryCode, "/color"),
|
|
51
66
|
method: Enums_1.APIMethod.PATCH,
|
|
52
67
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
53
|
-
body: JSON.stringify({ color: color })
|
|
68
|
+
body: JSON.stringify({ color: color }),
|
|
54
69
|
});
|
|
55
70
|
};
|
|
56
71
|
GarageService.updateGarageEventColor = function (garageId, eventId, color) {
|
|
@@ -58,7 +73,7 @@ var GarageService = /** @class */ (function () {
|
|
|
58
73
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/color"),
|
|
59
74
|
method: Enums_1.APIMethod.PATCH,
|
|
60
75
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
61
|
-
body: JSON.stringify({ color: color })
|
|
76
|
+
body: JSON.stringify({ color: color }),
|
|
62
77
|
});
|
|
63
78
|
};
|
|
64
79
|
GarageService.updateVehicleGarageEvent = function (garageId, eventId, req) {
|
|
@@ -66,21 +81,21 @@ var GarageService = /** @class */ (function () {
|
|
|
66
81
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/vehicle"),
|
|
67
82
|
method: Enums_1.APIMethod.PATCH,
|
|
68
83
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
69
|
-
body: JSON.stringify(req)
|
|
84
|
+
body: JSON.stringify(req),
|
|
70
85
|
});
|
|
71
86
|
};
|
|
72
87
|
GarageService.sendGarageMandate = function (garageId) {
|
|
73
88
|
return (0, ApiHelper_1.request)({
|
|
74
89
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/subscription-mandate"),
|
|
75
90
|
method: Enums_1.APIMethod.POST,
|
|
76
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
91
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
77
92
|
});
|
|
78
93
|
};
|
|
79
94
|
GarageService.getGarageAllData = function (garageId) {
|
|
80
95
|
return (0, ApiHelper_1.request)({
|
|
81
96
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/all-data"),
|
|
82
97
|
method: Enums_1.APIMethod.GET,
|
|
83
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
98
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
84
99
|
});
|
|
85
100
|
};
|
|
86
101
|
GarageService.createGaragePrestationRequest = function (garageId, req) {
|
|
@@ -88,14 +103,14 @@ var GarageService = /** @class */ (function () {
|
|
|
88
103
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/prestations/request"),
|
|
89
104
|
method: Enums_1.APIMethod.POST,
|
|
90
105
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
91
|
-
body: JSON.stringify(req)
|
|
106
|
+
body: JSON.stringify(req),
|
|
92
107
|
});
|
|
93
108
|
};
|
|
94
109
|
GarageService.getGarageSettings = function (garageId) {
|
|
95
110
|
return (0, ApiHelper_1.request)({
|
|
96
111
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/settings"),
|
|
97
112
|
method: Enums_1.APIMethod.GET,
|
|
98
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
113
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
99
114
|
});
|
|
100
115
|
};
|
|
101
116
|
GarageService.uploadLogo = function (garageId, formData) {
|
|
@@ -103,35 +118,35 @@ var GarageService = /** @class */ (function () {
|
|
|
103
118
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/logo"),
|
|
104
119
|
method: Enums_1.APIMethod.PATCH,
|
|
105
120
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
106
|
-
body: formData
|
|
121
|
+
body: formData,
|
|
107
122
|
});
|
|
108
123
|
};
|
|
109
124
|
GarageService.sendAppointmentVehicleAvailable = function (garageId, eventId) {
|
|
110
125
|
return (0, ApiHelper_1.request)({
|
|
111
126
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/vehicle-available"),
|
|
112
127
|
method: Enums_1.APIMethod.POST,
|
|
113
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
128
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
114
129
|
});
|
|
115
130
|
};
|
|
116
131
|
GarageService.enableGaragePrestation = function (garageId, prestationId) {
|
|
117
132
|
return (0, ApiHelper_1.request)({
|
|
118
133
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/prestations/").concat(prestationId, "/enable"),
|
|
119
134
|
method: Enums_1.APIMethod.PATCH,
|
|
120
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
135
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
121
136
|
});
|
|
122
137
|
};
|
|
123
138
|
GarageService.disableGaragePrestation = function (garageId, prestationId) {
|
|
124
139
|
return (0, ApiHelper_1.request)({
|
|
125
140
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/prestations/").concat(prestationId, "/disable"),
|
|
126
141
|
method: Enums_1.APIMethod.PATCH,
|
|
127
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
142
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
128
143
|
});
|
|
129
144
|
};
|
|
130
145
|
GarageService.getEmployeeDetails = function (garageId, employeeId) {
|
|
131
146
|
return (0, ApiHelper_1.request)({
|
|
132
147
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/employees/").concat(employeeId),
|
|
133
148
|
method: Enums_1.APIMethod.GET,
|
|
134
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
149
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
135
150
|
});
|
|
136
151
|
};
|
|
137
152
|
GarageService.updateGaragePrestation = function (garageId, prestationId, req) {
|
|
@@ -139,28 +154,28 @@ var GarageService = /** @class */ (function () {
|
|
|
139
154
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/prestations/").concat(prestationId),
|
|
140
155
|
method: Enums_1.APIMethod.PATCH,
|
|
141
156
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
142
|
-
body: JSON.stringify(req)
|
|
157
|
+
body: JSON.stringify(req),
|
|
143
158
|
});
|
|
144
159
|
};
|
|
145
160
|
GarageService.deleteGarageEmployeePrestation = function (garageId, employeeId, prestationId) {
|
|
146
161
|
return (0, ApiHelper_1.request)({
|
|
147
162
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/employees/").concat(employeeId, "/prestations/").concat(prestationId),
|
|
148
163
|
method: Enums_1.APIMethod.DELETE,
|
|
149
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
164
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
150
165
|
});
|
|
151
166
|
};
|
|
152
167
|
GarageService.createGarageEmployeePrestation = function (garageId, employeeId, prestationId) {
|
|
153
168
|
return (0, ApiHelper_1.request)({
|
|
154
169
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/employees/").concat(employeeId, "/prestations/").concat(prestationId),
|
|
155
170
|
method: Enums_1.APIMethod.POST,
|
|
156
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
171
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
157
172
|
});
|
|
158
173
|
};
|
|
159
174
|
GarageService.deleteGarageEmployeeAbsence = function (garageId, employeeId, absenceId) {
|
|
160
175
|
return (0, ApiHelper_1.request)({
|
|
161
176
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/employees/").concat(employeeId, "/absences/").concat(absenceId),
|
|
162
177
|
method: Enums_1.APIMethod.DELETE,
|
|
163
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
178
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
164
179
|
});
|
|
165
180
|
};
|
|
166
181
|
GarageService.createGarageEmployeeAbsence = function (garageId, employeeId, req) {
|
|
@@ -168,7 +183,7 @@ var GarageService = /** @class */ (function () {
|
|
|
168
183
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/employees/").concat(employeeId, "/absences"),
|
|
169
184
|
method: Enums_1.APIMethod.POST,
|
|
170
185
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
171
|
-
body: JSON.stringify(req)
|
|
186
|
+
body: JSON.stringify(req),
|
|
172
187
|
});
|
|
173
188
|
};
|
|
174
189
|
GarageService.updateGarageEmployee = function (garageId, employeeId, req) {
|
|
@@ -176,7 +191,7 @@ var GarageService = /** @class */ (function () {
|
|
|
176
191
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/employees/").concat(employeeId),
|
|
177
192
|
method: Enums_1.APIMethod.PATCH,
|
|
178
193
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
179
|
-
body: JSON.stringify(req)
|
|
194
|
+
body: JSON.stringify(req),
|
|
180
195
|
});
|
|
181
196
|
};
|
|
182
197
|
GarageService.updateGarageEmployeeSchedules = function (garageId, employeeId, req) {
|
|
@@ -184,14 +199,14 @@ var GarageService = /** @class */ (function () {
|
|
|
184
199
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/employees/").concat(employeeId, "/schedules"),
|
|
185
200
|
method: Enums_1.APIMethod.PATCH,
|
|
186
201
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
187
|
-
body: JSON.stringify(req)
|
|
202
|
+
body: JSON.stringify(req),
|
|
188
203
|
});
|
|
189
204
|
};
|
|
190
205
|
GarageService.deleteGarageEmployee = function (garageId, employeeId) {
|
|
191
206
|
return (0, ApiHelper_1.request)({
|
|
192
207
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/employees/").concat(employeeId),
|
|
193
208
|
method: Enums_1.APIMethod.DELETE,
|
|
194
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
209
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
195
210
|
});
|
|
196
211
|
};
|
|
197
212
|
GarageService.createGarageEmployee = function (garageId, req) {
|
|
@@ -199,21 +214,21 @@ var GarageService = /** @class */ (function () {
|
|
|
199
214
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/employees"),
|
|
200
215
|
method: Enums_1.APIMethod.POST,
|
|
201
216
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
202
|
-
body: JSON.stringify(req)
|
|
217
|
+
body: JSON.stringify(req),
|
|
203
218
|
});
|
|
204
219
|
};
|
|
205
220
|
GarageService.getEmployees = function (garageId) {
|
|
206
221
|
return (0, ApiHelper_1.request)({
|
|
207
222
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/employees"),
|
|
208
223
|
method: Enums_1.APIMethod.GET,
|
|
209
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
224
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
210
225
|
});
|
|
211
226
|
};
|
|
212
227
|
GarageService.activateGarage = function (garageId) {
|
|
213
228
|
return (0, ApiHelper_1.request)({
|
|
214
229
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/activate"),
|
|
215
230
|
method: Enums_1.APIMethod.PATCH,
|
|
216
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
231
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
217
232
|
});
|
|
218
233
|
};
|
|
219
234
|
GarageService.salesSignUp = function (formData) {
|
|
@@ -221,7 +236,7 @@ var GarageService = /** @class */ (function () {
|
|
|
221
236
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/sales-signup"),
|
|
222
237
|
method: Enums_1.APIMethod.POST,
|
|
223
238
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
224
|
-
body: formData
|
|
239
|
+
body: formData,
|
|
225
240
|
});
|
|
226
241
|
};
|
|
227
242
|
GarageService.sendNewEventQuote = function (garageId, eventId, formData) {
|
|
@@ -229,7 +244,7 @@ var GarageService = /** @class */ (function () {
|
|
|
229
244
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/quote"),
|
|
230
245
|
method: Enums_1.APIMethod.PATCH,
|
|
231
246
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
232
|
-
body: formData
|
|
247
|
+
body: formData,
|
|
233
248
|
});
|
|
234
249
|
};
|
|
235
250
|
GarageService.sendCustomerReminder = function (garageId, eventId, message) {
|
|
@@ -237,7 +252,7 @@ var GarageService = /** @class */ (function () {
|
|
|
237
252
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/customer-reminder"),
|
|
238
253
|
method: Enums_1.APIMethod.POST,
|
|
239
254
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
240
|
-
body: message
|
|
255
|
+
body: message,
|
|
241
256
|
});
|
|
242
257
|
};
|
|
243
258
|
GarageService.updateGarageEvent = function (garageId, eventId, req) {
|
|
@@ -245,7 +260,7 @@ var GarageService = /** @class */ (function () {
|
|
|
245
260
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId),
|
|
246
261
|
method: Enums_1.APIMethod.PATCH,
|
|
247
262
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
248
|
-
body: JSON.stringify(req)
|
|
263
|
+
body: JSON.stringify(req),
|
|
249
264
|
});
|
|
250
265
|
};
|
|
251
266
|
GarageService.sendSupplierRequest = function (garageId, eventId, req) {
|
|
@@ -253,14 +268,14 @@ var GarageService = /** @class */ (function () {
|
|
|
253
268
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/events/").concat(eventId, "/supplierRequest"),
|
|
254
269
|
method: Enums_1.APIMethod.POST,
|
|
255
270
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
256
|
-
body: JSON.stringify(req)
|
|
271
|
+
body: JSON.stringify(req),
|
|
257
272
|
});
|
|
258
273
|
};
|
|
259
274
|
GarageService.deleteGarageSupplier = function (garageId, supplierId) {
|
|
260
275
|
return (0, ApiHelper_1.request)({
|
|
261
276
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/suppliers/").concat(supplierId),
|
|
262
277
|
method: Enums_1.APIMethod.DELETE,
|
|
263
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
278
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
264
279
|
});
|
|
265
280
|
};
|
|
266
281
|
GarageService.createGarageSupplier = function (garageId, req) {
|
|
@@ -268,7 +283,7 @@ var GarageService = /** @class */ (function () {
|
|
|
268
283
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/suppliers"),
|
|
269
284
|
method: Enums_1.APIMethod.POST,
|
|
270
285
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
271
|
-
body: JSON.stringify(req)
|
|
286
|
+
body: JSON.stringify(req),
|
|
272
287
|
});
|
|
273
288
|
};
|
|
274
289
|
GarageService.updateGarageSupplier = function (garageId, supplierId, req) {
|
|
@@ -276,7 +291,7 @@ var GarageService = /** @class */ (function () {
|
|
|
276
291
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/suppliers/").concat(supplierId),
|
|
277
292
|
method: Enums_1.APIMethod.PATCH,
|
|
278
293
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
279
|
-
body: JSON.stringify(req)
|
|
294
|
+
body: JSON.stringify(req),
|
|
280
295
|
});
|
|
281
296
|
};
|
|
282
297
|
GarageService.updateGarage = function (garageId, req) {
|
|
@@ -284,7 +299,7 @@ var GarageService = /** @class */ (function () {
|
|
|
284
299
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId),
|
|
285
300
|
method: Enums_1.APIMethod.PATCH,
|
|
286
301
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
287
|
-
body: JSON.stringify(req)
|
|
302
|
+
body: JSON.stringify(req),
|
|
288
303
|
});
|
|
289
304
|
};
|
|
290
305
|
GarageService.getAdministratedGarages = function (_a) {
|
|
@@ -292,7 +307,7 @@ var GarageService = /** @class */ (function () {
|
|
|
292
307
|
return (0, ApiHelper_1.request)({
|
|
293
308
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/user/garage/").concat(garageId),
|
|
294
309
|
method: Enums_1.APIMethod.GET,
|
|
295
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
310
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
296
311
|
});
|
|
297
312
|
};
|
|
298
313
|
GarageService.sendGarageSupportRequest = function (garageId, req) {
|
|
@@ -300,7 +315,7 @@ var GarageService = /** @class */ (function () {
|
|
|
300
315
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/support-request"),
|
|
301
316
|
method: Enums_1.APIMethod.POST,
|
|
302
317
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
303
|
-
body: JSON.stringify(req)
|
|
318
|
+
body: JSON.stringify(req),
|
|
304
319
|
});
|
|
305
320
|
};
|
|
306
321
|
GarageService.addCustomerVehicle = function (_a) {
|
|
@@ -309,7 +324,7 @@ var GarageService = /** @class */ (function () {
|
|
|
309
324
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/customers/").concat(customerId, "/vehicles"),
|
|
310
325
|
method: Enums_1.APIMethod.POST,
|
|
311
326
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
312
|
-
body: JSON.stringify(payload)
|
|
327
|
+
body: JSON.stringify(payload),
|
|
313
328
|
});
|
|
314
329
|
};
|
|
315
330
|
GarageService.deleteCustomerVehicle = function (_a) {
|
|
@@ -325,7 +340,7 @@ var GarageService = /** @class */ (function () {
|
|
|
325
340
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/settings/loaner-vehicle-request"),
|
|
326
341
|
method: Enums_1.APIMethod.PATCH,
|
|
327
342
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
328
|
-
body: JSON.stringify(req)
|
|
343
|
+
body: JSON.stringify(req),
|
|
329
344
|
});
|
|
330
345
|
};
|
|
331
346
|
GarageService.toogleGarageLoanerVehicle = function (garageId) {
|
|
@@ -341,7 +356,7 @@ var GarageService = /** @class */ (function () {
|
|
|
341
356
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/vehicle"),
|
|
342
357
|
method: Enums_1.APIMethod.POST,
|
|
343
358
|
appType: Enums_1.MovaAppType.GARAGE,
|
|
344
|
-
body: JSON.stringify(req)
|
|
359
|
+
body: JSON.stringify(req),
|
|
345
360
|
});
|
|
346
361
|
};
|
|
347
362
|
GarageService.deleteGarageVehicle = function (_a) {
|
|
@@ -349,35 +364,35 @@ var GarageService = /** @class */ (function () {
|
|
|
349
364
|
return (0, ApiHelper_1.request)({
|
|
350
365
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/vehicle/").concat(vehicleId),
|
|
351
366
|
method: Enums_1.APIMethod.DELETE,
|
|
352
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
367
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
353
368
|
});
|
|
354
369
|
};
|
|
355
370
|
GarageService.getAllGarageVehicles = function (garageId) {
|
|
356
371
|
return (0, ApiHelper_1.request)({
|
|
357
372
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/vehicles"),
|
|
358
373
|
method: Enums_1.APIMethod.GET,
|
|
359
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
374
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
360
375
|
});
|
|
361
376
|
};
|
|
362
377
|
GarageService.getOneGarageVehicle = function (garageId, vehicleId) {
|
|
363
378
|
return (0, ApiHelper_1.request)({
|
|
364
379
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/vehicle/").concat(vehicleId),
|
|
365
380
|
method: Enums_1.APIMethod.GET,
|
|
366
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
381
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
367
382
|
});
|
|
368
383
|
};
|
|
369
384
|
GarageService.assignGarageVehicleEvent = function (garageId, eventId, vehicleId) {
|
|
370
385
|
return (0, ApiHelper_1.request)({
|
|
371
386
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/vehicles/").concat(vehicleId),
|
|
372
387
|
method: Enums_1.APIMethod.PATCH,
|
|
373
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
388
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
374
389
|
});
|
|
375
390
|
};
|
|
376
391
|
GarageService.deassignGarageVehicleEvent = function (garageId, eventId) {
|
|
377
392
|
return (0, ApiHelper_1.request)({
|
|
378
393
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/garage/").concat(garageId, "/event/").concat(eventId, "/vehicles"),
|
|
379
394
|
method: Enums_1.APIMethod.DELETE,
|
|
380
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
395
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
381
396
|
});
|
|
382
397
|
};
|
|
383
398
|
// CSM
|
|
@@ -385,14 +400,14 @@ var GarageService = /** @class */ (function () {
|
|
|
385
400
|
return (0, ApiHelper_1.request)({
|
|
386
401
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/csm/garages/list"),
|
|
387
402
|
method: Enums_1.APIMethod.GET,
|
|
388
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
403
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
389
404
|
});
|
|
390
405
|
};
|
|
391
406
|
GarageService.getOneGarageCsm = function (garageId) {
|
|
392
407
|
return (0, ApiHelper_1.request)({
|
|
393
408
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/csm/garage/").concat(garageId),
|
|
394
409
|
method: Enums_1.APIMethod.GET,
|
|
395
|
-
appType: Enums_1.MovaAppType.GARAGE
|
|
410
|
+
appType: Enums_1.MovaAppType.GARAGE,
|
|
396
411
|
});
|
|
397
412
|
};
|
|
398
413
|
return GarageService;
|
package/package.json
CHANGED
package/src/helpers/Enums.ts
CHANGED
|
@@ -171,6 +171,10 @@ export enum DigitalPassportIndex {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
export enum EventState {
|
|
174
|
+
/**
|
|
175
|
+
* Demande d'empreinte bancaire (pour validation de la demande de RDV)
|
|
176
|
+
*/
|
|
177
|
+
REQUIRES_PAYMENT_AUTHORIZATION = "REQUIRES_PAYMENT_AUTHORIZATION",
|
|
174
178
|
/**
|
|
175
179
|
* Nouvelle demande de rendez-vous (origine client OU centre)
|
|
176
180
|
*/
|
package/src/models/Garage.ts
CHANGED