@dapex-tech/elite-online-services 0.0.5 → 0.0.7
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/AdminDto.d.ts +1 -1
- package/models/AdminUpdateDto.d.ts +26 -0
- package/models/AdminUpdateDto.js +2 -0
- 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/DriverDto.d.ts +5 -5
- package/models/DriverUpdateDto.d.ts +50 -0
- package/models/DriverUpdateDto.js +2 -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/OrderDto.d.ts +19 -0
- package/models/OrderDto.js +14 -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/UserDto.d.ts +1 -1
- package/models/UserUpdatedDto.d.ts +18 -0
- package/models/UserUpdatedDto.js +2 -0
- 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 +20 -0
- package/models/index.js +20 -0
- package/package.json +18 -22
- package/services/{LoginsService.d.ts → AdminAuthService.d.ts} +13 -10
- package/services/{LoginsService.js → AdminAuthService.js} +26 -22
- package/services/AdminService.d.ts +51 -6
- package/services/AdminService.js +105 -7
- package/services/CatalogsService.d.ts +67 -0
- package/services/CatalogsService.js +142 -0
- package/services/DriverAuthService.d.ts +53 -0
- package/services/DriverAuthService.js +119 -0
- package/services/DriversService.d.ts +43 -6
- package/services/DriversService.js +100 -7
- package/services/UserAuthService.d.ts +85 -0
- package/services/UserAuthService.js +188 -0
- package/services/UsersService.d.ts +44 -5
- package/services/UsersService.js +96 -6
- package/services/index.d.ts +4 -1
- package/services/index.js +4 -1
- package/socketService.js +96 -91
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import type { LoginDto } from '../models/LoginDto';
|
|
2
2
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class AdminAuthService {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Admin Login
|
|
6
6
|
* @param requestBody
|
|
7
7
|
* @returns any Login successful
|
|
8
8
|
* @throws ApiError
|
|
9
9
|
*/
|
|
10
10
|
static login(requestBody: LoginDto): CancelablePromise<any>;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @
|
|
14
|
-
* @returns any Login successful
|
|
12
|
+
* Refresh Driver Token
|
|
13
|
+
* @returns any Token refreshed successfully
|
|
15
14
|
* @throws ApiError
|
|
16
15
|
*/
|
|
17
|
-
static
|
|
16
|
+
static refreshToken(): CancelablePromise<any>;
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
20
|
-
* @
|
|
21
|
-
|
|
18
|
+
* @returns any
|
|
19
|
+
* @throws ApiError
|
|
20
|
+
*/
|
|
21
|
+
static me(): CancelablePromise<any>;
|
|
22
|
+
/**
|
|
23
|
+
* Admin Logout
|
|
24
|
+
* @returns any Logout successful
|
|
22
25
|
* @throws ApiError
|
|
23
26
|
*/
|
|
24
|
-
static
|
|
27
|
+
static logout(): CancelablePromise<any>;
|
|
25
28
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AdminAuthService = void 0;
|
|
4
4
|
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
5
|
const request_1 = require("../core/request");
|
|
6
|
-
class
|
|
6
|
+
class AdminAuthService {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Admin 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/admins/login',
|
|
17
17
|
body: requestBody,
|
|
18
18
|
mediaType: 'application/json',
|
|
19
19
|
errors: {
|
|
@@ -22,38 +22,42 @@ class LoginsService {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @
|
|
27
|
-
* @returns any Login 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/admins/
|
|
34
|
-
body: requestBody,
|
|
35
|
-
mediaType: 'application/json',
|
|
31
|
+
method: 'GET',
|
|
32
|
+
url: '/auth/admins/refresh-token',
|
|
36
33
|
errors: {
|
|
37
|
-
401: `
|
|
34
|
+
401: `Unauthorized`,
|
|
38
35
|
},
|
|
39
36
|
});
|
|
40
37
|
}
|
|
41
38
|
/**
|
|
42
|
-
*
|
|
43
|
-
* @
|
|
44
|
-
|
|
39
|
+
* @returns any
|
|
40
|
+
* @throws ApiError
|
|
41
|
+
*/
|
|
42
|
+
static me() {
|
|
43
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
44
|
+
method: 'GET',
|
|
45
|
+
url: '/auth/admins/me',
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Admin Logout
|
|
50
|
+
* @returns any Logout successful
|
|
45
51
|
* @throws ApiError
|
|
46
52
|
*/
|
|
47
|
-
static
|
|
53
|
+
static logout() {
|
|
48
54
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
49
55
|
method: 'POST',
|
|
50
|
-
url: '/auth/
|
|
51
|
-
body: requestBody,
|
|
52
|
-
mediaType: 'application/json',
|
|
56
|
+
url: '/auth/admins/logout',
|
|
53
57
|
errors: {
|
|
54
|
-
401: `
|
|
58
|
+
401: `Unauthorized`,
|
|
55
59
|
},
|
|
56
60
|
});
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
|
-
exports.
|
|
63
|
+
exports.AdminAuthService = AdminAuthService;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { AdminDto } from '../models/AdminDto';
|
|
2
|
+
import type { AdminUpdateDto } from '../models/AdminUpdateDto';
|
|
3
|
+
import type { CreateServiceOrderDto } from '../models/CreateServiceOrderDto';
|
|
4
|
+
import type { DriverDto } from '../models/DriverDto';
|
|
5
|
+
import type { OrderDto } from '../models/OrderDto';
|
|
6
|
+
import type { UpdateDriverStatusDto } from '../models/UpdateDriverStatusDto';
|
|
7
|
+
import type { UpdateTripStatusDto } from '../models/UpdateTripStatusDto';
|
|
2
8
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
3
9
|
export declare class AdminService {
|
|
4
10
|
/**
|
|
@@ -10,20 +16,31 @@ export declare class AdminService {
|
|
|
10
16
|
static create(requestBody: AdminDto): CancelablePromise<any>;
|
|
11
17
|
/**
|
|
12
18
|
* Get all admins
|
|
13
|
-
* @param search
|
|
14
|
-
* @param
|
|
15
|
-
* @param order
|
|
19
|
+
* @param search Text to search for in name, surname, phone number or email
|
|
20
|
+
* @param order Sorting options
|
|
16
21
|
* @returns any List of admins
|
|
17
22
|
* @throws ApiError
|
|
18
23
|
*/
|
|
19
|
-
static findAll(search
|
|
24
|
+
static findAll(search?: string, order?: OrderDto): CancelablePromise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* Reload service orders (IN_PROGRESS and COMPLETED)
|
|
27
|
+
* @returns any Service orders retrieved successfully.
|
|
28
|
+
* @throws ApiError
|
|
29
|
+
*/
|
|
30
|
+
static reloadServiceOrders(): CancelablePromise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Get taxi locations for all drivers
|
|
33
|
+
* @returns any Taxi locations retrieved successfully.
|
|
34
|
+
* @throws ApiError
|
|
35
|
+
*/
|
|
36
|
+
static getTaxiLocations(): CancelablePromise<any>;
|
|
20
37
|
/**
|
|
21
38
|
* Get a single admin by ID
|
|
22
39
|
* @param id
|
|
23
40
|
* @returns any Admin found
|
|
24
41
|
* @throws ApiError
|
|
25
42
|
*/
|
|
26
|
-
static
|
|
43
|
+
static findById(id: number): CancelablePromise<any>;
|
|
27
44
|
/**
|
|
28
45
|
* Update an admin by ID
|
|
29
46
|
* @param id
|
|
@@ -31,7 +48,7 @@ export declare class AdminService {
|
|
|
31
48
|
* @returns any Admin updated successfully.
|
|
32
49
|
* @throws ApiError
|
|
33
50
|
*/
|
|
34
|
-
static update(id: number, requestBody:
|
|
51
|
+
static update(id: number, requestBody: AdminUpdateDto): CancelablePromise<any>;
|
|
35
52
|
/**
|
|
36
53
|
* Delete an admin by ID
|
|
37
54
|
* @param id
|
|
@@ -39,4 +56,32 @@ export declare class AdminService {
|
|
|
39
56
|
* @throws ApiError
|
|
40
57
|
*/
|
|
41
58
|
static remove(id: number): CancelablePromise<any>;
|
|
59
|
+
/**
|
|
60
|
+
* Create a new driver
|
|
61
|
+
* @param requestBody
|
|
62
|
+
* @returns any Driver created successfully.
|
|
63
|
+
* @throws ApiError
|
|
64
|
+
*/
|
|
65
|
+
static createDriver(requestBody: DriverDto): CancelablePromise<any>;
|
|
66
|
+
/**
|
|
67
|
+
* Create a new trip/service order
|
|
68
|
+
* @param requestBody
|
|
69
|
+
* @returns any Trip created successfully.
|
|
70
|
+
* @throws ApiError
|
|
71
|
+
*/
|
|
72
|
+
static createTrip(requestBody: CreateServiceOrderDto): CancelablePromise<any>;
|
|
73
|
+
/**
|
|
74
|
+
* Update trip status
|
|
75
|
+
* @param requestBody
|
|
76
|
+
* @returns any Trip status updated successfully.
|
|
77
|
+
* @throws ApiError
|
|
78
|
+
*/
|
|
79
|
+
static updateTripStatus(requestBody: UpdateTripStatusDto): CancelablePromise<any>;
|
|
80
|
+
/**
|
|
81
|
+
* Update driver status (Taxi In/Out)
|
|
82
|
+
* @param requestBody
|
|
83
|
+
* @returns any Driver status updated successfully.
|
|
84
|
+
* @throws ApiError
|
|
85
|
+
*/
|
|
86
|
+
static updateDriverStatus(requestBody: UpdateDriverStatusDto): CancelablePromise<any>;
|
|
42
87
|
}
|
package/services/AdminService.js
CHANGED
|
@@ -23,19 +23,17 @@ class AdminService {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Get all admins
|
|
26
|
-
* @param search
|
|
27
|
-
* @param
|
|
28
|
-
* @param order
|
|
26
|
+
* @param search Text to search for in name, surname, phone number or email
|
|
27
|
+
* @param order Sorting options
|
|
29
28
|
* @returns any List of admins
|
|
30
29
|
* @throws ApiError
|
|
31
30
|
*/
|
|
32
|
-
static findAll(search,
|
|
31
|
+
static findAll(search, order) {
|
|
33
32
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
34
33
|
method: 'GET',
|
|
35
34
|
url: '/admins',
|
|
36
35
|
query: {
|
|
37
36
|
'search': search,
|
|
38
|
-
'orderBy': orderBy,
|
|
39
37
|
'order': order,
|
|
40
38
|
},
|
|
41
39
|
errors: {
|
|
@@ -43,13 +41,41 @@ class AdminService {
|
|
|
43
41
|
},
|
|
44
42
|
});
|
|
45
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
|
+
}
|
|
46
72
|
/**
|
|
47
73
|
* Get a single admin by ID
|
|
48
74
|
* @param id
|
|
49
75
|
* @returns any Admin found
|
|
50
76
|
* @throws ApiError
|
|
51
77
|
*/
|
|
52
|
-
static
|
|
78
|
+
static findById(id) {
|
|
53
79
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
54
80
|
method: 'GET',
|
|
55
81
|
url: '/admins/{id}',
|
|
@@ -71,7 +97,7 @@ class AdminService {
|
|
|
71
97
|
*/
|
|
72
98
|
static update(id, requestBody) {
|
|
73
99
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
74
|
-
method: '
|
|
100
|
+
method: 'PATCH',
|
|
75
101
|
url: '/admins/{id}',
|
|
76
102
|
path: {
|
|
77
103
|
'id': id,
|
|
@@ -103,5 +129,77 @@ class AdminService {
|
|
|
103
129
|
},
|
|
104
130
|
});
|
|
105
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
|
+
}
|
|
106
204
|
}
|
|
107
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
|
+
}
|