@dapex-tech/elite-online-services 0.0.6 → 0.0.8
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/.release.config.js +16 -15
- package/models/CreateServiceOrderDto.d.ts +46 -0
- package/models/CreateServiceOrderDto.js +2 -0
- package/models/CreateStreetPickupDto.d.ts +10 -0
- package/models/CreateStreetPickupDto.js +2 -0
- package/models/CreateUserLocationDto.d.ts +26 -0
- package/models/CreateUserLocationDto.js +2 -0
- package/models/DriverUpdateDto.d.ts +8 -0
- package/models/EmailPhoneLoginDto.d.ts +14 -0
- package/models/EmailPhoneLoginDto.js +2 -0
- package/models/GenerateResetCodeDto.d.ts +6 -0
- package/models/GenerateResetCodeDto.js +2 -0
- package/models/GenerateUserResetCodeDto.d.ts +6 -0
- package/models/GenerateUserResetCodeDto.js +2 -0
- package/models/GenerateUserVerificationCodeDto.d.ts +6 -0
- package/models/GenerateUserVerificationCodeDto.js +2 -0
- package/models/ResetDriverPasswordDto.d.ts +10 -0
- package/models/ResetDriverPasswordDto.js +2 -0
- package/models/ResetUserPasswordDto.d.ts +10 -0
- package/models/ResetUserPasswordDto.js +2 -0
- package/models/UpdateDriverStatusDto.d.ts +10 -0
- package/models/UpdateDriverStatusDto.js +2 -0
- package/models/UpdateDriverTripStatusDto.d.ts +14 -0
- package/models/UpdateDriverTripStatusDto.js +2 -0
- package/models/UpdateTripStatusDto.d.ts +10 -0
- package/models/UpdateTripStatusDto.js +2 -0
- package/models/UpdateUserLocationDto.d.ts +26 -0
- package/models/UpdateUserLocationDto.js +2 -0
- package/models/UserUpdatedDto.d.ts +0 -4
- package/models/ValidateDriverResetCodeDto.d.ts +10 -0
- package/models/ValidateDriverResetCodeDto.js +2 -0
- package/models/ValidateUserResetCodeDto.d.ts +10 -0
- package/models/ValidateUserResetCodeDto.js +2 -0
- package/models/VerifyUserAccountDto.d.ts +10 -0
- package/models/VerifyUserAccountDto.js +2 -0
- package/models/index.d.ts +16 -0
- package/models/index.js +16 -0
- package/package.json +18 -22
- package/services/AdminAuthService.d.ts +28 -0
- package/services/AdminAuthService.js +63 -0
- package/services/AdminService.d.ts +44 -0
- package/services/AdminService.js +100 -0
- package/services/CatalogsService.d.ts +67 -0
- package/services/CatalogsService.js +142 -0
- package/services/DriverAuthService.d.ts +53 -0
- package/services/{LoginsService.js → DriverAuthService.js} +54 -31
- package/services/DriversService.d.ts +36 -0
- package/services/DriversService.js +95 -0
- package/services/UserAuthService.d.ts +85 -0
- package/services/UserAuthService.js +188 -0
- package/services/UsersService.d.ts +38 -0
- package/services/UsersService.js +92 -0
- package/services/index.d.ts +4 -1
- package/services/index.js +4 -1
- package/services/LoginsService.d.ts +0 -43
package/services/AdminService.js
CHANGED
|
@@ -41,6 +41,34 @@ class AdminService {
|
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Reload service orders (IN_PROGRESS and COMPLETED)
|
|
46
|
+
* @returns any Service orders retrieved successfully.
|
|
47
|
+
* @throws ApiError
|
|
48
|
+
*/
|
|
49
|
+
static reloadServiceOrders() {
|
|
50
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
51
|
+
method: 'GET',
|
|
52
|
+
url: '/admins/service-orders/reload',
|
|
53
|
+
errors: {
|
|
54
|
+
401: `Unauthorized`,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Get taxi locations for all drivers
|
|
60
|
+
* @returns any Taxi locations retrieved successfully.
|
|
61
|
+
* @throws ApiError
|
|
62
|
+
*/
|
|
63
|
+
static getTaxiLocations() {
|
|
64
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
65
|
+
method: 'GET',
|
|
66
|
+
url: '/admins/taxi-locations',
|
|
67
|
+
errors: {
|
|
68
|
+
401: `Unauthorized`,
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
}
|
|
44
72
|
/**
|
|
45
73
|
* Get a single admin by ID
|
|
46
74
|
* @param id
|
|
@@ -101,5 +129,77 @@ class AdminService {
|
|
|
101
129
|
},
|
|
102
130
|
});
|
|
103
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Create a new driver
|
|
134
|
+
* @param requestBody
|
|
135
|
+
* @returns any Driver created successfully.
|
|
136
|
+
* @throws ApiError
|
|
137
|
+
*/
|
|
138
|
+
static createDriver(requestBody) {
|
|
139
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
140
|
+
method: 'POST',
|
|
141
|
+
url: '/admins/drivers',
|
|
142
|
+
body: requestBody,
|
|
143
|
+
mediaType: 'application/json',
|
|
144
|
+
errors: {
|
|
145
|
+
401: `Unauthorized`,
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Create a new trip/service order
|
|
151
|
+
* @param requestBody
|
|
152
|
+
* @returns any Trip created successfully.
|
|
153
|
+
* @throws ApiError
|
|
154
|
+
*/
|
|
155
|
+
static createTrip(requestBody) {
|
|
156
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
157
|
+
method: 'POST',
|
|
158
|
+
url: '/admins/trips',
|
|
159
|
+
body: requestBody,
|
|
160
|
+
mediaType: 'application/json',
|
|
161
|
+
errors: {
|
|
162
|
+
401: `Unauthorized`,
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Update trip status
|
|
168
|
+
* @param requestBody
|
|
169
|
+
* @returns any Trip status updated successfully.
|
|
170
|
+
* @throws ApiError
|
|
171
|
+
*/
|
|
172
|
+
static updateTripStatus(requestBody) {
|
|
173
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
174
|
+
method: 'PATCH',
|
|
175
|
+
url: '/admins/trips/status',
|
|
176
|
+
body: requestBody,
|
|
177
|
+
mediaType: 'application/json',
|
|
178
|
+
errors: {
|
|
179
|
+
400: `Invalid status`,
|
|
180
|
+
401: `Unauthorized`,
|
|
181
|
+
404: `Service order not found`,
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Update driver status (Taxi In/Out)
|
|
187
|
+
* @param requestBody
|
|
188
|
+
* @returns any Driver status updated successfully.
|
|
189
|
+
* @throws ApiError
|
|
190
|
+
*/
|
|
191
|
+
static updateDriverStatus(requestBody) {
|
|
192
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
193
|
+
method: 'PATCH',
|
|
194
|
+
url: '/admins/drivers/status',
|
|
195
|
+
body: requestBody,
|
|
196
|
+
mediaType: 'application/json',
|
|
197
|
+
errors: {
|
|
198
|
+
400: `Invalid status`,
|
|
199
|
+
401: `Unauthorized`,
|
|
200
|
+
404: `Driver not found`,
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
}
|
|
104
204
|
}
|
|
105
205
|
exports.AdminService = AdminService;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { OrderDto } from '../models/OrderDto';
|
|
2
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
3
|
+
export declare class CatalogsService {
|
|
4
|
+
/**
|
|
5
|
+
* Get all countries
|
|
6
|
+
* @param search Text to search for in country name
|
|
7
|
+
* @param order Sorting options
|
|
8
|
+
* @returns any List of countries
|
|
9
|
+
* @throws ApiError
|
|
10
|
+
*/
|
|
11
|
+
static getCountries(search?: string, order?: OrderDto): CancelablePromise<any>;
|
|
12
|
+
/**
|
|
13
|
+
* Get country by ID
|
|
14
|
+
* @param id
|
|
15
|
+
* @returns any Country found
|
|
16
|
+
* @throws ApiError
|
|
17
|
+
*/
|
|
18
|
+
static getCountryById(id: number): CancelablePromise<any>;
|
|
19
|
+
/**
|
|
20
|
+
* Get all states
|
|
21
|
+
* @param countryId Filter states by country ID
|
|
22
|
+
* @param search Text to search for in state name
|
|
23
|
+
* @param order Sorting options
|
|
24
|
+
* @returns any List of states
|
|
25
|
+
* @throws ApiError
|
|
26
|
+
*/
|
|
27
|
+
static getStates(countryId?: number, search?: string, order?: OrderDto): CancelablePromise<any>;
|
|
28
|
+
/**
|
|
29
|
+
* Get state by ID
|
|
30
|
+
* @param id
|
|
31
|
+
* @returns any State found
|
|
32
|
+
* @throws ApiError
|
|
33
|
+
*/
|
|
34
|
+
static getStateById(id: number): CancelablePromise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Get all counties (optionally filtered by state)
|
|
37
|
+
* @param stateId Filter counties by state ID
|
|
38
|
+
* @param search Text to search for in county name
|
|
39
|
+
* @param order Sorting options
|
|
40
|
+
* @returns any List of counties
|
|
41
|
+
* @throws ApiError
|
|
42
|
+
*/
|
|
43
|
+
static getCounties(stateId?: number, search?: string, order?: OrderDto): CancelablePromise<any>;
|
|
44
|
+
/**
|
|
45
|
+
* Get county by ID
|
|
46
|
+
* @param id
|
|
47
|
+
* @returns any County found
|
|
48
|
+
* @throws ApiError
|
|
49
|
+
*/
|
|
50
|
+
static getCountyById(id: number): CancelablePromise<any>;
|
|
51
|
+
/**
|
|
52
|
+
* Get all cities (optionally filtered by county)
|
|
53
|
+
* @param countyId Filter cities by county ID
|
|
54
|
+
* @param search Text to search for in city name
|
|
55
|
+
* @param order Sorting options
|
|
56
|
+
* @returns any List of cities
|
|
57
|
+
* @throws ApiError
|
|
58
|
+
*/
|
|
59
|
+
static getCities(countyId?: number, search?: string, order?: OrderDto): CancelablePromise<any>;
|
|
60
|
+
/**
|
|
61
|
+
* Get city by ID
|
|
62
|
+
* @param id
|
|
63
|
+
* @returns any City found
|
|
64
|
+
* @throws ApiError
|
|
65
|
+
*/
|
|
66
|
+
static getCityById(id: number): CancelablePromise<any>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CatalogsService = void 0;
|
|
4
|
+
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
|
+
const request_1 = require("../core/request");
|
|
6
|
+
class CatalogsService {
|
|
7
|
+
/**
|
|
8
|
+
* Get all countries
|
|
9
|
+
* @param search Text to search for in country name
|
|
10
|
+
* @param order Sorting options
|
|
11
|
+
* @returns any List of countries
|
|
12
|
+
* @throws ApiError
|
|
13
|
+
*/
|
|
14
|
+
static getCountries(search, order) {
|
|
15
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
16
|
+
method: 'GET',
|
|
17
|
+
url: '/catalogs/countries',
|
|
18
|
+
query: {
|
|
19
|
+
'search': search,
|
|
20
|
+
'order': order,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get country by ID
|
|
26
|
+
* @param id
|
|
27
|
+
* @returns any Country found
|
|
28
|
+
* @throws ApiError
|
|
29
|
+
*/
|
|
30
|
+
static getCountryById(id) {
|
|
31
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
32
|
+
method: 'GET',
|
|
33
|
+
url: '/catalogs/countries/{id}',
|
|
34
|
+
path: {
|
|
35
|
+
'id': id,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Get all states
|
|
41
|
+
* @param countryId Filter states by country ID
|
|
42
|
+
* @param search Text to search for in state name
|
|
43
|
+
* @param order Sorting options
|
|
44
|
+
* @returns any List of states
|
|
45
|
+
* @throws ApiError
|
|
46
|
+
*/
|
|
47
|
+
static getStates(countryId, search, order) {
|
|
48
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
49
|
+
method: 'GET',
|
|
50
|
+
url: '/catalogs/states',
|
|
51
|
+
query: {
|
|
52
|
+
'country_id': countryId,
|
|
53
|
+
'search': search,
|
|
54
|
+
'order': order,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Get state by ID
|
|
60
|
+
* @param id
|
|
61
|
+
* @returns any State found
|
|
62
|
+
* @throws ApiError
|
|
63
|
+
*/
|
|
64
|
+
static getStateById(id) {
|
|
65
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
66
|
+
method: 'GET',
|
|
67
|
+
url: '/catalogs/states/{id}',
|
|
68
|
+
path: {
|
|
69
|
+
'id': id,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Get all counties (optionally filtered by state)
|
|
75
|
+
* @param stateId Filter counties by state ID
|
|
76
|
+
* @param search Text to search for in county name
|
|
77
|
+
* @param order Sorting options
|
|
78
|
+
* @returns any List of counties
|
|
79
|
+
* @throws ApiError
|
|
80
|
+
*/
|
|
81
|
+
static getCounties(stateId, search, order) {
|
|
82
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
83
|
+
method: 'GET',
|
|
84
|
+
url: '/catalogs/counties',
|
|
85
|
+
query: {
|
|
86
|
+
'state_id': stateId,
|
|
87
|
+
'search': search,
|
|
88
|
+
'order': order,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Get county by ID
|
|
94
|
+
* @param id
|
|
95
|
+
* @returns any County found
|
|
96
|
+
* @throws ApiError
|
|
97
|
+
*/
|
|
98
|
+
static getCountyById(id) {
|
|
99
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
100
|
+
method: 'GET',
|
|
101
|
+
url: '/catalogs/counties/{id}',
|
|
102
|
+
path: {
|
|
103
|
+
'id': id,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get all cities (optionally filtered by county)
|
|
109
|
+
* @param countyId Filter cities by county ID
|
|
110
|
+
* @param search Text to search for in city name
|
|
111
|
+
* @param order Sorting options
|
|
112
|
+
* @returns any List of cities
|
|
113
|
+
* @throws ApiError
|
|
114
|
+
*/
|
|
115
|
+
static getCities(countyId, search, order) {
|
|
116
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
117
|
+
method: 'GET',
|
|
118
|
+
url: '/catalogs/cities',
|
|
119
|
+
query: {
|
|
120
|
+
'county_id': countyId,
|
|
121
|
+
'search': search,
|
|
122
|
+
'order': order,
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Get city by ID
|
|
128
|
+
* @param id
|
|
129
|
+
* @returns any City found
|
|
130
|
+
* @throws ApiError
|
|
131
|
+
*/
|
|
132
|
+
static getCityById(id) {
|
|
133
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
134
|
+
method: 'GET',
|
|
135
|
+
url: '/catalogs/cities/{id}',
|
|
136
|
+
path: {
|
|
137
|
+
'id': id,
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
exports.CatalogsService = CatalogsService;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { GenerateResetCodeDto } from '../models/GenerateResetCodeDto';
|
|
2
|
+
import type { LoginDto } from '../models/LoginDto';
|
|
3
|
+
import type { ResetDriverPasswordDto } from '../models/ResetDriverPasswordDto';
|
|
4
|
+
import type { ValidateDriverResetCodeDto } from '../models/ValidateDriverResetCodeDto';
|
|
5
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
6
|
+
export declare class DriverAuthService {
|
|
7
|
+
/**
|
|
8
|
+
* Driver Login
|
|
9
|
+
* @param requestBody
|
|
10
|
+
* @returns any Login successful
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
static login(requestBody: LoginDto): CancelablePromise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* Refresh Driver Token
|
|
16
|
+
* @returns any Token refreshed successfully
|
|
17
|
+
* @throws ApiError
|
|
18
|
+
*/
|
|
19
|
+
static refreshToken(): CancelablePromise<any>;
|
|
20
|
+
/**
|
|
21
|
+
* Get Current Driver
|
|
22
|
+
* @returns any Driver information retrieved
|
|
23
|
+
* @throws ApiError
|
|
24
|
+
*/
|
|
25
|
+
static me(): CancelablePromise<any>;
|
|
26
|
+
/**
|
|
27
|
+
* Driver Logout
|
|
28
|
+
* @returns any Logout successful
|
|
29
|
+
* @throws ApiError
|
|
30
|
+
*/
|
|
31
|
+
static logout(): CancelablePromise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* Generate Password Reset Code
|
|
34
|
+
* @param requestBody
|
|
35
|
+
* @returns any Reset code generated and sent successfully
|
|
36
|
+
* @throws ApiError
|
|
37
|
+
*/
|
|
38
|
+
static generateResetCode(requestBody: GenerateResetCodeDto): CancelablePromise<any>;
|
|
39
|
+
/**
|
|
40
|
+
* Validate Password Reset Code
|
|
41
|
+
* @param requestBody
|
|
42
|
+
* @returns any Reset code is valid
|
|
43
|
+
* @throws ApiError
|
|
44
|
+
*/
|
|
45
|
+
static validateResetCode(requestBody: ValidateDriverResetCodeDto): CancelablePromise<any>;
|
|
46
|
+
/**
|
|
47
|
+
* Reset Driver Password
|
|
48
|
+
* @param requestBody
|
|
49
|
+
* @returns any Password reset successfully
|
|
50
|
+
* @throws ApiError
|
|
51
|
+
*/
|
|
52
|
+
static resetPassword(requestBody: ResetDriverPasswordDto): CancelablePromise<any>;
|
|
53
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DriverAuthService = void 0;
|
|
4
4
|
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
5
|
const request_1 = require("../core/request");
|
|
6
|
-
class
|
|
6
|
+
class DriverAuthService {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Driver Login
|
|
9
9
|
* @param requestBody
|
|
10
10
|
* @returns any Login successful
|
|
11
11
|
* @throws ApiError
|
|
@@ -13,7 +13,7 @@ class LoginsService {
|
|
|
13
13
|
static login(requestBody) {
|
|
14
14
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
15
15
|
method: 'POST',
|
|
16
|
-
url: '/auth/
|
|
16
|
+
url: '/auth/drivers/login',
|
|
17
17
|
body: requestBody,
|
|
18
18
|
mediaType: 'application/json',
|
|
19
19
|
errors: {
|
|
@@ -22,75 +22,98 @@ class LoginsService {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @
|
|
27
|
-
* @returns any Registration successful
|
|
25
|
+
* Refresh Driver Token
|
|
26
|
+
* @returns any Token refreshed successfully
|
|
28
27
|
* @throws ApiError
|
|
29
28
|
*/
|
|
30
|
-
static
|
|
29
|
+
static refreshToken() {
|
|
31
30
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
32
|
-
method: '
|
|
33
|
-
url: '/auth/
|
|
34
|
-
body: requestBody,
|
|
35
|
-
mediaType: 'application/json',
|
|
31
|
+
method: 'GET',
|
|
32
|
+
url: '/auth/drivers/refresh-token',
|
|
36
33
|
errors: {
|
|
37
|
-
|
|
34
|
+
401: `Unauthorized`,
|
|
38
35
|
},
|
|
39
36
|
});
|
|
40
37
|
}
|
|
41
38
|
/**
|
|
42
|
-
*
|
|
39
|
+
* Get Current Driver
|
|
40
|
+
* @returns any Driver information retrieved
|
|
43
41
|
* @throws ApiError
|
|
44
42
|
*/
|
|
45
|
-
static
|
|
43
|
+
static me() {
|
|
46
44
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
47
45
|
method: 'GET',
|
|
48
|
-
url: '/auth/
|
|
46
|
+
url: '/auth/drivers/me',
|
|
47
|
+
errors: {
|
|
48
|
+
401: `Unauthorized`,
|
|
49
|
+
},
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
52
|
/**
|
|
52
|
-
*
|
|
53
|
+
* Driver Logout
|
|
54
|
+
* @returns any Logout successful
|
|
53
55
|
* @throws ApiError
|
|
54
56
|
*/
|
|
55
|
-
static
|
|
57
|
+
static logout() {
|
|
56
58
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
57
|
-
method: '
|
|
58
|
-
url: '/auth/
|
|
59
|
+
method: 'POST',
|
|
60
|
+
url: '/auth/drivers/logout',
|
|
61
|
+
errors: {
|
|
62
|
+
401: `Unauthorized`,
|
|
63
|
+
},
|
|
59
64
|
});
|
|
60
65
|
}
|
|
61
66
|
/**
|
|
62
|
-
*
|
|
67
|
+
* Generate Password Reset Code
|
|
63
68
|
* @param requestBody
|
|
64
|
-
* @returns any
|
|
69
|
+
* @returns any Reset code generated and sent successfully
|
|
65
70
|
* @throws ApiError
|
|
66
71
|
*/
|
|
67
|
-
static
|
|
72
|
+
static generateResetCode(requestBody) {
|
|
68
73
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
69
74
|
method: 'POST',
|
|
70
|
-
url: '/auth/
|
|
75
|
+
url: '/auth/drivers/forgot-password',
|
|
71
76
|
body: requestBody,
|
|
72
77
|
mediaType: 'application/json',
|
|
73
78
|
errors: {
|
|
74
|
-
401: `
|
|
79
|
+
401: `Driver not found`,
|
|
75
80
|
},
|
|
76
81
|
});
|
|
77
82
|
}
|
|
78
83
|
/**
|
|
79
|
-
*
|
|
84
|
+
* Validate Password Reset Code
|
|
80
85
|
* @param requestBody
|
|
81
|
-
* @returns any
|
|
86
|
+
* @returns any Reset code is valid
|
|
82
87
|
* @throws ApiError
|
|
83
88
|
*/
|
|
84
|
-
static
|
|
89
|
+
static validateResetCode(requestBody) {
|
|
85
90
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
86
91
|
method: 'POST',
|
|
87
|
-
url: '/auth/drivers/
|
|
92
|
+
url: '/auth/drivers/validate-reset-code',
|
|
88
93
|
body: requestBody,
|
|
89
94
|
mediaType: 'application/json',
|
|
90
95
|
errors: {
|
|
91
|
-
401: `
|
|
96
|
+
401: `Driver not found`,
|
|
97
|
+
403: `Invalid or expired reset code`,
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Reset Driver Password
|
|
103
|
+
* @param requestBody
|
|
104
|
+
* @returns any Password reset successfully
|
|
105
|
+
* @throws ApiError
|
|
106
|
+
*/
|
|
107
|
+
static resetPassword(requestBody) {
|
|
108
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
109
|
+
method: 'POST',
|
|
110
|
+
url: '/auth/drivers/reset-password',
|
|
111
|
+
body: requestBody,
|
|
112
|
+
mediaType: 'application/json',
|
|
113
|
+
errors: {
|
|
114
|
+
401: `Driver not found`,
|
|
92
115
|
},
|
|
93
116
|
});
|
|
94
117
|
}
|
|
95
118
|
}
|
|
96
|
-
exports.
|
|
119
|
+
exports.DriverAuthService = DriverAuthService;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DriverDto } from '../models/DriverDto';
|
|
2
2
|
import type { DriverUpdateDto } from '../models/DriverUpdateDto';
|
|
3
3
|
import type { OrderDto } from '../models/OrderDto';
|
|
4
|
+
import type { UpdateDriverTripStatusDto } from '../models/UpdateDriverTripStatusDto';
|
|
4
5
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
5
6
|
export declare class DriversService {
|
|
6
7
|
/**
|
|
@@ -18,6 +19,13 @@ export declare class DriversService {
|
|
|
18
19
|
* @throws ApiError
|
|
19
20
|
*/
|
|
20
21
|
static findAll(search?: string, order?: OrderDto): CancelablePromise<any>;
|
|
22
|
+
/**
|
|
23
|
+
* Get driver last location by ID
|
|
24
|
+
* @param id
|
|
25
|
+
* @returns any Driver last location retrieved successfully.
|
|
26
|
+
* @throws ApiError
|
|
27
|
+
*/
|
|
28
|
+
static getLastLocation(id: number): CancelablePromise<any>;
|
|
21
29
|
/**
|
|
22
30
|
* Get a single driver by ID
|
|
23
31
|
* @param id
|
|
@@ -40,4 +48,32 @@ export declare class DriversService {
|
|
|
40
48
|
* @throws ApiError
|
|
41
49
|
*/
|
|
42
50
|
static remove(id: number): CancelablePromise<any>;
|
|
51
|
+
/**
|
|
52
|
+
* Update a driver online status by ID
|
|
53
|
+
* @param id
|
|
54
|
+
* @returns any Driver online status updated successfully.
|
|
55
|
+
* @throws ApiError
|
|
56
|
+
*/
|
|
57
|
+
static updateOnlineStatus(id: number): CancelablePromise<any>;
|
|
58
|
+
/**
|
|
59
|
+
* Deactivate a driver account by ID
|
|
60
|
+
* @param id
|
|
61
|
+
* @returns any Driver account deactivated successfully.
|
|
62
|
+
* @throws ApiError
|
|
63
|
+
*/
|
|
64
|
+
static deactivateAccount(id: number): CancelablePromise<any>;
|
|
65
|
+
/**
|
|
66
|
+
* Update a driver account status by ID
|
|
67
|
+
* @param id
|
|
68
|
+
* @returns any Driver account status updated successfully.
|
|
69
|
+
* @throws ApiError
|
|
70
|
+
*/
|
|
71
|
+
static updateAccountStatus(id: number): CancelablePromise<any>;
|
|
72
|
+
/**
|
|
73
|
+
* Update trip status, drivers are only allowed to update the status to IN_PROGRESS or COMPLETED.
|
|
74
|
+
* @param requestBody
|
|
75
|
+
* @returns any Trip status updated successfully
|
|
76
|
+
* @throws ApiError
|
|
77
|
+
*/
|
|
78
|
+
static updateTripStatus(requestBody: UpdateDriverTripStatusDto): CancelablePromise<any>;
|
|
43
79
|
}
|
|
@@ -41,6 +41,25 @@ class DriversService {
|
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Get driver last location by ID
|
|
46
|
+
* @param id
|
|
47
|
+
* @returns any Driver last location retrieved successfully.
|
|
48
|
+
* @throws ApiError
|
|
49
|
+
*/
|
|
50
|
+
static getLastLocation(id) {
|
|
51
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
52
|
+
method: 'GET',
|
|
53
|
+
url: '/drivers/last-location/{id}',
|
|
54
|
+
path: {
|
|
55
|
+
'id': id,
|
|
56
|
+
},
|
|
57
|
+
errors: {
|
|
58
|
+
401: `Unauthorized`,
|
|
59
|
+
404: `Driver not found`,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
}
|
|
44
63
|
/**
|
|
45
64
|
* Get a single driver by ID
|
|
46
65
|
* @param id
|
|
@@ -101,5 +120,81 @@ class DriversService {
|
|
|
101
120
|
},
|
|
102
121
|
});
|
|
103
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Update a driver online status by ID
|
|
125
|
+
* @param id
|
|
126
|
+
* @returns any Driver online status updated successfully.
|
|
127
|
+
* @throws ApiError
|
|
128
|
+
*/
|
|
129
|
+
static updateOnlineStatus(id) {
|
|
130
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
131
|
+
method: 'PATCH',
|
|
132
|
+
url: '/drivers/online-status/{id}',
|
|
133
|
+
path: {
|
|
134
|
+
'id': id,
|
|
135
|
+
},
|
|
136
|
+
errors: {
|
|
137
|
+
401: `Unauthorized`,
|
|
138
|
+
404: `Driver not found`,
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Deactivate a driver account by ID
|
|
144
|
+
* @param id
|
|
145
|
+
* @returns any Driver account deactivated successfully.
|
|
146
|
+
* @throws ApiError
|
|
147
|
+
*/
|
|
148
|
+
static deactivateAccount(id) {
|
|
149
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
150
|
+
method: 'PATCH',
|
|
151
|
+
url: '/drivers/deactivate-account/{id}',
|
|
152
|
+
path: {
|
|
153
|
+
'id': id,
|
|
154
|
+
},
|
|
155
|
+
errors: {
|
|
156
|
+
401: `Unauthorized`,
|
|
157
|
+
404: `Driver not found`,
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Update a driver account status by ID
|
|
163
|
+
* @param id
|
|
164
|
+
* @returns any Driver account status updated successfully.
|
|
165
|
+
* @throws ApiError
|
|
166
|
+
*/
|
|
167
|
+
static updateAccountStatus(id) {
|
|
168
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
169
|
+
method: 'PATCH',
|
|
170
|
+
url: '/drivers/account-status/{id}',
|
|
171
|
+
path: {
|
|
172
|
+
'id': id,
|
|
173
|
+
},
|
|
174
|
+
errors: {
|
|
175
|
+
401: `Unauthorized`,
|
|
176
|
+
404: `Driver not found`,
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Update trip status, drivers are only allowed to update the status to IN_PROGRESS or COMPLETED.
|
|
182
|
+
* @param requestBody
|
|
183
|
+
* @returns any Trip status updated successfully
|
|
184
|
+
* @throws ApiError
|
|
185
|
+
*/
|
|
186
|
+
static updateTripStatus(requestBody) {
|
|
187
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
188
|
+
method: 'PATCH',
|
|
189
|
+
url: '/drivers/trips/status',
|
|
190
|
+
body: requestBody,
|
|
191
|
+
mediaType: 'application/json',
|
|
192
|
+
errors: {
|
|
193
|
+
400: `Bad Request`,
|
|
194
|
+
401: `Unauthorized`,
|
|
195
|
+
404: `Service order not found`,
|
|
196
|
+
},
|
|
197
|
+
});
|
|
198
|
+
}
|
|
104
199
|
}
|
|
105
200
|
exports.DriversService = DriversService;
|