@dapex-tech/elite-online-services 0.0.8 → 0.0.10
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/createClient.d.ts +19 -0
- package/createClient.js +1 -2
- package/models/AdminDto.d.ts +18 -6
- package/models/{LoginDto.d.ts → AdminLoginDto.d.ts} +1 -1
- package/models/AdminUpdateDto.d.ts +0 -4
- package/models/CustomerDto.d.ts +66 -0
- package/models/{CreateUserLocationDto.d.ts → CustomerLocationCreateDto.d.ts} +2 -2
- package/models/CustomerLocationDto.d.ts +34 -0
- package/models/{UpdateUserLocationDto.d.ts → CustomerLocationUpdateDto.d.ts} +2 -2
- package/models/CustomerLoginDto.d.ts +18 -0
- package/models/{UserDto.d.ts → CustomerUpdatedDto.d.ts} +5 -5
- package/models/{VerifyUserAccountDto.d.ts → CustomerVerifyAccountDto.d.ts} +5 -1
- package/models/DriverDto.d.ts +16 -4
- package/models/{EmailPhoneLoginDto.d.ts → DriverLoginDto.d.ts} +2 -6
- package/models/DriverTripActions.d.ts +10 -0
- package/models/DriverTripActions.js +18 -0
- package/models/DriverUpdateDto.d.ts +6 -6
- package/models/GenerateResetCodeDto.d.ts +6 -2
- package/models/GenerateVerificationCodeDto.d.ts +10 -0
- package/models/PaymentDto.d.ts +18 -0
- package/models/ResetPasswordDto.d.ts +14 -0
- package/models/TripAssignDriverDto.d.ts +6 -0
- package/models/TripDto.d.ts +108 -0
- package/models/TripLocationPointDto.d.ts +26 -0
- package/models/TripUpdateDriverAssignmentModeDto.d.ts +6 -0
- package/models/TripUpdateDto.d.ts +38 -0
- package/models/TripUpdateTripsStatusDto.d.ts +6 -0
- package/models/ValidateResetCodeDto.d.ts +14 -0
- package/models/ValidateResetCodeDto.js +2 -0
- package/models/index.d.ts +20 -18
- package/models/index.js +20 -18
- package/package.json +1 -1
- package/services/AdminAuthService.d.ts +28 -3
- package/services/AdminAuthService.js +57 -1
- package/services/AdminCustomerService.d.ts +50 -0
- package/services/AdminCustomerService.js +119 -0
- package/services/AdminDriversService.d.ts +51 -0
- package/services/AdminDriversService.js +122 -0
- package/services/AdminService.d.ts +0 -44
- package/services/AdminService.js +0 -100
- package/services/AdminTripsService.d.ts +59 -0
- package/services/AdminTripsService.js +150 -0
- package/services/CustomerLocationsService.d.ts +41 -0
- package/services/CustomerLocationsService.js +93 -0
- package/services/CustomerTripsService.d.ts +63 -0
- package/services/CustomerTripsService.js +162 -0
- package/services/CustomersAuthService.d.ts +88 -0
- package/services/{UserAuthService.js → CustomersAuthService.js} +24 -21
- package/services/CustomersService.d.ts +17 -0
- package/services/CustomersService.js +41 -0
- package/services/DriverAuthService.d.ts +6 -6
- package/services/DriverAuthService.js +1 -1
- package/services/DriverTripsService.d.ts +49 -0
- package/services/DriverTripsService.js +121 -0
- package/services/DriversService.d.ts +9 -53
- package/services/DriversService.js +14 -132
- package/services/MainService.d.ts +5 -0
- package/services/MainService.js +10 -0
- package/services/index.d.ts +8 -3
- package/services/index.js +8 -3
- package/socketService.d.ts +54 -0
- package/socketService.js +91 -96
- package/models/CreateServiceOrderDto.d.ts +0 -46
- package/models/CreateStreetPickupDto.d.ts +0 -10
- package/models/GenerateUserResetCodeDto.d.ts +0 -6
- package/models/GenerateUserVerificationCodeDto.d.ts +0 -6
- package/models/ResetDriverPasswordDto.d.ts +0 -10
- package/models/ResetUserPasswordDto.d.ts +0 -10
- package/models/UpdateDriverStatusDto.d.ts +0 -10
- package/models/UpdateDriverTripStatusDto.d.ts +0 -14
- package/models/UpdateTripStatusDto.d.ts +0 -10
- package/models/UserUpdatedDto.d.ts +0 -18
- package/models/ValidateDriverResetCodeDto.d.ts +0 -10
- package/models/ValidateUserResetCodeDto.d.ts +0 -10
- package/services/CatalogsService.d.ts +0 -67
- package/services/CatalogsService.js +0 -142
- package/services/UserAuthService.d.ts +0 -85
- package/services/UsersService.d.ts +0 -81
- package/services/UsersService.js +0 -198
- /package/models/{CreateServiceOrderDto.js → AdminLoginDto.js} +0 -0
- /package/models/{CreateStreetPickupDto.js → CustomerDto.js} +0 -0
- /package/models/{CreateUserLocationDto.js → CustomerLocationCreateDto.js} +0 -0
- /package/models/{EmailPhoneLoginDto.js → CustomerLocationDto.js} +0 -0
- /package/models/{GenerateUserResetCodeDto.js → CustomerLocationUpdateDto.js} +0 -0
- /package/models/{GenerateUserVerificationCodeDto.js → CustomerLoginDto.js} +0 -0
- /package/models/{LoginDto.js → CustomerUpdatedDto.js} +0 -0
- /package/models/{ResetDriverPasswordDto.js → CustomerVerifyAccountDto.js} +0 -0
- /package/models/{ResetUserPasswordDto.js → DriverLoginDto.js} +0 -0
- /package/models/{UpdateDriverStatusDto.js → GenerateVerificationCodeDto.js} +0 -0
- /package/models/{UpdateDriverTripStatusDto.js → PaymentDto.js} +0 -0
- /package/models/{UpdateTripStatusDto.js → ResetPasswordDto.js} +0 -0
- /package/models/{UpdateUserLocationDto.js → TripAssignDriverDto.js} +0 -0
- /package/models/{UserDto.js → TripDto.js} +0 -0
- /package/models/{UserUpdatedDto.js → TripLocationPointDto.js} +0 -0
- /package/models/{ValidateDriverResetCodeDto.js → TripUpdateDriverAssignmentModeDto.js} +0 -0
- /package/models/{ValidateUserResetCodeDto.js → TripUpdateDto.js} +0 -0
- /package/models/{VerifyUserAccountDto.js → TripUpdateTripsStatusDto.js} +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { CustomerDto } from '../models/CustomerDto';
|
|
2
|
+
import type { CustomerLoginDto } from '../models/CustomerLoginDto';
|
|
3
|
+
import type { CustomerUpdatedDto } from '../models/CustomerUpdatedDto';
|
|
4
|
+
import type { CustomerVerifyAccountDto } from '../models/CustomerVerifyAccountDto';
|
|
5
|
+
import type { GenerateResetCodeDto } from '../models/GenerateResetCodeDto';
|
|
6
|
+
import type { GenerateVerificationCodeDto } from '../models/GenerateVerificationCodeDto';
|
|
7
|
+
import type { ResetPasswordDto } from '../models/ResetPasswordDto';
|
|
8
|
+
import type { ValidateResetCodeDto } from '../models/ValidateResetCodeDto';
|
|
9
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
10
|
+
export declare class CustomersAuthService {
|
|
11
|
+
/**
|
|
12
|
+
* Customer Login
|
|
13
|
+
* Login a customer using email or phone
|
|
14
|
+
* @param requestBody
|
|
15
|
+
* @returns CustomerDto Login successful
|
|
16
|
+
* @returns any Login successful
|
|
17
|
+
* @throws ApiError
|
|
18
|
+
*/
|
|
19
|
+
static login(requestBody: CustomerLoginDto): CancelablePromise<CustomerDto | any>;
|
|
20
|
+
/**
|
|
21
|
+
* Customer Register
|
|
22
|
+
* @param requestBody
|
|
23
|
+
* @returns CustomerDto Registration successful
|
|
24
|
+
* @returns any Registration successful
|
|
25
|
+
* @throws ApiError
|
|
26
|
+
*/
|
|
27
|
+
static register(requestBody: CustomerDto): CancelablePromise<CustomerDto | any>;
|
|
28
|
+
/**
|
|
29
|
+
* Refresh Customer Token
|
|
30
|
+
* @returns any Token refreshed successfully
|
|
31
|
+
* @throws ApiError
|
|
32
|
+
*/
|
|
33
|
+
static refreshToken(): CancelablePromise<any>;
|
|
34
|
+
/**
|
|
35
|
+
* Get Current Customer
|
|
36
|
+
* @returns any User information retrieved
|
|
37
|
+
* @throws ApiError
|
|
38
|
+
*/
|
|
39
|
+
static me(): CancelablePromise<any>;
|
|
40
|
+
/**
|
|
41
|
+
* Update User Profile
|
|
42
|
+
* @param requestBody
|
|
43
|
+
* @returns any User profile updated successfully
|
|
44
|
+
* @throws ApiError
|
|
45
|
+
*/
|
|
46
|
+
static updateProfile(requestBody: CustomerUpdatedDto): CancelablePromise<any>;
|
|
47
|
+
/**
|
|
48
|
+
* User Logout
|
|
49
|
+
* @returns any Logout successful
|
|
50
|
+
* @throws ApiError
|
|
51
|
+
*/
|
|
52
|
+
static logout(): CancelablePromise<any>;
|
|
53
|
+
/**
|
|
54
|
+
* Generate Password Reset Code
|
|
55
|
+
* @param requestBody
|
|
56
|
+
* @returns any Reset code generated and sent successfully
|
|
57
|
+
* @throws ApiError
|
|
58
|
+
*/
|
|
59
|
+
static generateResetCode(requestBody: GenerateResetCodeDto): CancelablePromise<any>;
|
|
60
|
+
/**
|
|
61
|
+
* Validate Password Reset Code
|
|
62
|
+
* @param requestBody
|
|
63
|
+
* @returns any Reset code is valid
|
|
64
|
+
* @throws ApiError
|
|
65
|
+
*/
|
|
66
|
+
static validateResetCode(requestBody: ValidateResetCodeDto): CancelablePromise<any>;
|
|
67
|
+
/**
|
|
68
|
+
* Reset Customer Password
|
|
69
|
+
* @param requestBody
|
|
70
|
+
* @returns any Password reset successfully
|
|
71
|
+
* @throws ApiError
|
|
72
|
+
*/
|
|
73
|
+
static resetPassword(requestBody: ResetPasswordDto): CancelablePromise<any>;
|
|
74
|
+
/**
|
|
75
|
+
* Generate Customer Verification Code
|
|
76
|
+
* @param requestBody
|
|
77
|
+
* @returns any Verification code generated and sent successfully
|
|
78
|
+
* @throws ApiError
|
|
79
|
+
*/
|
|
80
|
+
static generateVerificationCode(requestBody: GenerateVerificationCodeDto): CancelablePromise<any>;
|
|
81
|
+
/**
|
|
82
|
+
* Verify Customer Account
|
|
83
|
+
* @param requestBody
|
|
84
|
+
* @returns any User verified successfully
|
|
85
|
+
* @throws ApiError
|
|
86
|
+
*/
|
|
87
|
+
static verifyAccount(requestBody: CustomerVerifyAccountDto): CancelablePromise<any>;
|
|
88
|
+
}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CustomersAuthService = void 0;
|
|
4
4
|
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
5
|
const request_1 = require("../core/request");
|
|
6
|
-
class
|
|
6
|
+
class CustomersAuthService {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Customer Login
|
|
9
|
+
* Login a customer using email or phone
|
|
9
10
|
* @param requestBody
|
|
11
|
+
* @returns CustomerDto Login successful
|
|
10
12
|
* @returns any Login successful
|
|
11
13
|
* @throws ApiError
|
|
12
14
|
*/
|
|
13
15
|
static login(requestBody) {
|
|
14
16
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
15
17
|
method: 'POST',
|
|
16
|
-
url: '/auth/
|
|
18
|
+
url: '/auth/customers/login',
|
|
17
19
|
body: requestBody,
|
|
18
20
|
mediaType: 'application/json',
|
|
19
21
|
errors: {
|
|
@@ -22,15 +24,16 @@ class UserAuthService {
|
|
|
22
24
|
});
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
|
-
*
|
|
27
|
+
* Customer Register
|
|
26
28
|
* @param requestBody
|
|
29
|
+
* @returns CustomerDto Registration successful
|
|
27
30
|
* @returns any Registration successful
|
|
28
31
|
* @throws ApiError
|
|
29
32
|
*/
|
|
30
33
|
static register(requestBody) {
|
|
31
34
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
32
35
|
method: 'POST',
|
|
33
|
-
url: '/auth/
|
|
36
|
+
url: '/auth/customers/register',
|
|
34
37
|
body: requestBody,
|
|
35
38
|
mediaType: 'application/json',
|
|
36
39
|
errors: {
|
|
@@ -39,28 +42,28 @@ class UserAuthService {
|
|
|
39
42
|
});
|
|
40
43
|
}
|
|
41
44
|
/**
|
|
42
|
-
* Refresh
|
|
45
|
+
* Refresh Customer Token
|
|
43
46
|
* @returns any Token refreshed successfully
|
|
44
47
|
* @throws ApiError
|
|
45
48
|
*/
|
|
46
49
|
static refreshToken() {
|
|
47
50
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
48
51
|
method: 'GET',
|
|
49
|
-
url: '/auth/
|
|
52
|
+
url: '/auth/customers/refresh-token',
|
|
50
53
|
errors: {
|
|
51
54
|
401: `Unauthorized`,
|
|
52
55
|
},
|
|
53
56
|
});
|
|
54
57
|
}
|
|
55
58
|
/**
|
|
56
|
-
* Get Current
|
|
59
|
+
* Get Current Customer
|
|
57
60
|
* @returns any User information retrieved
|
|
58
61
|
* @throws ApiError
|
|
59
62
|
*/
|
|
60
63
|
static me() {
|
|
61
64
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
62
65
|
method: 'GET',
|
|
63
|
-
url: '/auth/
|
|
66
|
+
url: '/auth/customers/me',
|
|
64
67
|
errors: {
|
|
65
68
|
401: `Unauthorized`,
|
|
66
69
|
},
|
|
@@ -75,7 +78,7 @@ class UserAuthService {
|
|
|
75
78
|
static updateProfile(requestBody) {
|
|
76
79
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
77
80
|
method: 'PATCH',
|
|
78
|
-
url: '/auth/
|
|
81
|
+
url: '/auth/customers/update-profile',
|
|
79
82
|
body: requestBody,
|
|
80
83
|
mediaType: 'application/json',
|
|
81
84
|
errors: {
|
|
@@ -91,7 +94,7 @@ class UserAuthService {
|
|
|
91
94
|
static logout() {
|
|
92
95
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
93
96
|
method: 'POST',
|
|
94
|
-
url: '/auth/
|
|
97
|
+
url: '/auth/customers/logout',
|
|
95
98
|
errors: {
|
|
96
99
|
401: `Unauthorized`,
|
|
97
100
|
},
|
|
@@ -106,7 +109,7 @@ class UserAuthService {
|
|
|
106
109
|
static generateResetCode(requestBody) {
|
|
107
110
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
108
111
|
method: 'POST',
|
|
109
|
-
url: '/auth/
|
|
112
|
+
url: '/auth/customers/forgot-password',
|
|
110
113
|
body: requestBody,
|
|
111
114
|
mediaType: 'application/json',
|
|
112
115
|
errors: {
|
|
@@ -123,7 +126,7 @@ class UserAuthService {
|
|
|
123
126
|
static validateResetCode(requestBody) {
|
|
124
127
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
125
128
|
method: 'POST',
|
|
126
|
-
url: '/auth/
|
|
129
|
+
url: '/auth/customers/validate-reset-code',
|
|
127
130
|
body: requestBody,
|
|
128
131
|
mediaType: 'application/json',
|
|
129
132
|
errors: {
|
|
@@ -133,7 +136,7 @@ class UserAuthService {
|
|
|
133
136
|
});
|
|
134
137
|
}
|
|
135
138
|
/**
|
|
136
|
-
* Reset
|
|
139
|
+
* Reset Customer Password
|
|
137
140
|
* @param requestBody
|
|
138
141
|
* @returns any Password reset successfully
|
|
139
142
|
* @throws ApiError
|
|
@@ -141,7 +144,7 @@ class UserAuthService {
|
|
|
141
144
|
static resetPassword(requestBody) {
|
|
142
145
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
143
146
|
method: 'POST',
|
|
144
|
-
url: '/auth/
|
|
147
|
+
url: '/auth/customers/reset-password',
|
|
145
148
|
body: requestBody,
|
|
146
149
|
mediaType: 'application/json',
|
|
147
150
|
errors: {
|
|
@@ -150,7 +153,7 @@ class UserAuthService {
|
|
|
150
153
|
});
|
|
151
154
|
}
|
|
152
155
|
/**
|
|
153
|
-
* Generate
|
|
156
|
+
* Generate Customer Verification Code
|
|
154
157
|
* @param requestBody
|
|
155
158
|
* @returns any Verification code generated and sent successfully
|
|
156
159
|
* @throws ApiError
|
|
@@ -158,7 +161,7 @@ class UserAuthService {
|
|
|
158
161
|
static generateVerificationCode(requestBody) {
|
|
159
162
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
160
163
|
method: 'POST',
|
|
161
|
-
url: '/auth/
|
|
164
|
+
url: '/auth/customers/generate-verification-code',
|
|
162
165
|
body: requestBody,
|
|
163
166
|
mediaType: 'application/json',
|
|
164
167
|
errors: {
|
|
@@ -167,7 +170,7 @@ class UserAuthService {
|
|
|
167
170
|
});
|
|
168
171
|
}
|
|
169
172
|
/**
|
|
170
|
-
* Verify
|
|
173
|
+
* Verify Customer Account
|
|
171
174
|
* @param requestBody
|
|
172
175
|
* @returns any User verified successfully
|
|
173
176
|
* @throws ApiError
|
|
@@ -175,7 +178,7 @@ class UserAuthService {
|
|
|
175
178
|
static verifyAccount(requestBody) {
|
|
176
179
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
177
180
|
method: 'POST',
|
|
178
|
-
url: '/auth/
|
|
181
|
+
url: '/auth/customers/verify-account',
|
|
179
182
|
body: requestBody,
|
|
180
183
|
mediaType: 'application/json',
|
|
181
184
|
errors: {
|
|
@@ -185,4 +188,4 @@ class UserAuthService {
|
|
|
185
188
|
});
|
|
186
189
|
}
|
|
187
190
|
}
|
|
188
|
-
exports.
|
|
191
|
+
exports.CustomersAuthService = CustomersAuthService;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CustomerUpdatedDto } from '../models/CustomerUpdatedDto';
|
|
2
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
3
|
+
export declare class CustomersService {
|
|
4
|
+
/**
|
|
5
|
+
* Update a customer by ID
|
|
6
|
+
* @param requestBody
|
|
7
|
+
* @returns any Customer updated successfully.
|
|
8
|
+
* @throws ApiError
|
|
9
|
+
*/
|
|
10
|
+
static updateProfile(requestBody: CustomerUpdatedDto): CancelablePromise<any>;
|
|
11
|
+
/**
|
|
12
|
+
* Delete a customer by ID
|
|
13
|
+
* @returns any User deleted successfully.
|
|
14
|
+
* @throws ApiError
|
|
15
|
+
*/
|
|
16
|
+
static deleteAccount(): CancelablePromise<any>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomersService = void 0;
|
|
4
|
+
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
|
+
const request_1 = require("../core/request");
|
|
6
|
+
class CustomersService {
|
|
7
|
+
/**
|
|
8
|
+
* Update a customer by ID
|
|
9
|
+
* @param requestBody
|
|
10
|
+
* @returns any Customer updated successfully.
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
static updateProfile(requestBody) {
|
|
14
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
15
|
+
method: 'PATCH',
|
|
16
|
+
url: '/customers/update-profile',
|
|
17
|
+
body: requestBody,
|
|
18
|
+
mediaType: 'application/json',
|
|
19
|
+
errors: {
|
|
20
|
+
401: `Unauthorized`,
|
|
21
|
+
404: `Customer not found.`,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Delete a customer by ID
|
|
27
|
+
* @returns any User deleted successfully.
|
|
28
|
+
* @throws ApiError
|
|
29
|
+
*/
|
|
30
|
+
static deleteAccount() {
|
|
31
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
32
|
+
method: 'DELETE',
|
|
33
|
+
url: '/customers/delete-account',
|
|
34
|
+
errors: {
|
|
35
|
+
401: `Unauthorized`,
|
|
36
|
+
404: `User not found.`,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.CustomersService = CustomersService;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { DriverLoginDto } from '../models/DriverLoginDto';
|
|
1
2
|
import type { GenerateResetCodeDto } from '../models/GenerateResetCodeDto';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { ValidateDriverResetCodeDto } from '../models/ValidateDriverResetCodeDto';
|
|
3
|
+
import type { ResetPasswordDto } from '../models/ResetPasswordDto';
|
|
4
|
+
import type { ValidateResetCodeDto } from '../models/ValidateResetCodeDto';
|
|
5
5
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
6
6
|
export declare class DriverAuthService {
|
|
7
7
|
/**
|
|
@@ -10,7 +10,7 @@ export declare class DriverAuthService {
|
|
|
10
10
|
* @returns any Login successful
|
|
11
11
|
* @throws ApiError
|
|
12
12
|
*/
|
|
13
|
-
static login(requestBody:
|
|
13
|
+
static login(requestBody: DriverLoginDto): CancelablePromise<any>;
|
|
14
14
|
/**
|
|
15
15
|
* Refresh Driver Token
|
|
16
16
|
* @returns any Token refreshed successfully
|
|
@@ -42,12 +42,12 @@ export declare class DriverAuthService {
|
|
|
42
42
|
* @returns any Reset code is valid
|
|
43
43
|
* @throws ApiError
|
|
44
44
|
*/
|
|
45
|
-
static validateResetCode(requestBody:
|
|
45
|
+
static validateResetCode(requestBody: ValidateResetCodeDto): CancelablePromise<any>;
|
|
46
46
|
/**
|
|
47
47
|
* Reset Driver Password
|
|
48
48
|
* @param requestBody
|
|
49
49
|
* @returns any Password reset successfully
|
|
50
50
|
* @throws ApiError
|
|
51
51
|
*/
|
|
52
|
-
static resetPassword(requestBody:
|
|
52
|
+
static resetPassword(requestBody: ResetPasswordDto): CancelablePromise<any>;
|
|
53
53
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { DriverTripActions } from '../models/DriverTripActions';
|
|
2
|
+
import type { TripDto } from '../models/TripDto';
|
|
3
|
+
import type { TripUpdateDto } from '../models/TripUpdateDto';
|
|
4
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
5
|
+
export declare class DriverTripsService {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new STREET PICKUP trip
|
|
8
|
+
* @param requestBody
|
|
9
|
+
* @returns any Trip created successfully.
|
|
10
|
+
* @throws ApiError
|
|
11
|
+
*/
|
|
12
|
+
static create(requestBody: TripDto): CancelablePromise<any>;
|
|
13
|
+
/**
|
|
14
|
+
* Get all trips for a driver
|
|
15
|
+
* @param search
|
|
16
|
+
* @returns any List of trips
|
|
17
|
+
* @throws ApiError
|
|
18
|
+
*/
|
|
19
|
+
static findAll(search: string): CancelablePromise<any>;
|
|
20
|
+
/**
|
|
21
|
+
* Update a trip by ID
|
|
22
|
+
* @param id
|
|
23
|
+
* @param requestBody
|
|
24
|
+
* @returns any Trip updated successfully.
|
|
25
|
+
* @throws ApiError
|
|
26
|
+
*/
|
|
27
|
+
static update(id: number, requestBody: TripUpdateDto): CancelablePromise<any>;
|
|
28
|
+
/**
|
|
29
|
+
* Get a single trip by ID
|
|
30
|
+
* @param id
|
|
31
|
+
* @returns any Trip found
|
|
32
|
+
* @throws ApiError
|
|
33
|
+
*/
|
|
34
|
+
static findById(id: number): CancelablePromise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Get active trip for a driver
|
|
37
|
+
* @returns any Active trip found
|
|
38
|
+
* @throws ApiError
|
|
39
|
+
*/
|
|
40
|
+
static getActiveTrip(): CancelablePromise<any>;
|
|
41
|
+
/**
|
|
42
|
+
* Execute an action on a trip
|
|
43
|
+
* @param id Trip ID
|
|
44
|
+
* @param action Action to be executed on the trip
|
|
45
|
+
* @returns any Trip action executed successfully.
|
|
46
|
+
* @throws ApiError
|
|
47
|
+
*/
|
|
48
|
+
static executeTripAction(id: number, action: DriverTripActions): CancelablePromise<any>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DriverTripsService = void 0;
|
|
4
|
+
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
|
+
const request_1 = require("../core/request");
|
|
6
|
+
class DriverTripsService {
|
|
7
|
+
/**
|
|
8
|
+
* Create a new STREET PICKUP trip
|
|
9
|
+
* @param requestBody
|
|
10
|
+
* @returns any Trip created successfully.
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
static create(requestBody) {
|
|
14
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
15
|
+
method: 'POST',
|
|
16
|
+
url: '/drivers/trips',
|
|
17
|
+
body: requestBody,
|
|
18
|
+
mediaType: 'application/json',
|
|
19
|
+
errors: {
|
|
20
|
+
401: `Unauthorized`,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get all trips for a driver
|
|
26
|
+
* @param search
|
|
27
|
+
* @returns any List of trips
|
|
28
|
+
* @throws ApiError
|
|
29
|
+
*/
|
|
30
|
+
static findAll(search) {
|
|
31
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
32
|
+
method: 'GET',
|
|
33
|
+
url: '/drivers/trips',
|
|
34
|
+
query: {
|
|
35
|
+
'search': search,
|
|
36
|
+
},
|
|
37
|
+
errors: {
|
|
38
|
+
401: `Unauthorized`,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Update a trip by ID
|
|
44
|
+
* @param id
|
|
45
|
+
* @param requestBody
|
|
46
|
+
* @returns any Trip updated successfully.
|
|
47
|
+
* @throws ApiError
|
|
48
|
+
*/
|
|
49
|
+
static update(id, requestBody) {
|
|
50
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
51
|
+
method: 'PATCH',
|
|
52
|
+
url: '/drivers/trips/{id}',
|
|
53
|
+
path: {
|
|
54
|
+
'id': id,
|
|
55
|
+
},
|
|
56
|
+
body: requestBody,
|
|
57
|
+
mediaType: 'application/json',
|
|
58
|
+
errors: {
|
|
59
|
+
401: `Unauthorized`,
|
|
60
|
+
404: `Trip not found`,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get a single trip by ID
|
|
66
|
+
* @param id
|
|
67
|
+
* @returns any Trip found
|
|
68
|
+
* @throws ApiError
|
|
69
|
+
*/
|
|
70
|
+
static findById(id) {
|
|
71
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
72
|
+
method: 'GET',
|
|
73
|
+
url: '/drivers/trips/{id}',
|
|
74
|
+
path: {
|
|
75
|
+
'id': id,
|
|
76
|
+
},
|
|
77
|
+
errors: {
|
|
78
|
+
401: `Unauthorized`,
|
|
79
|
+
404: `Trip not found`,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get active trip for a driver
|
|
85
|
+
* @returns any Active trip found
|
|
86
|
+
* @throws ApiError
|
|
87
|
+
*/
|
|
88
|
+
static getActiveTrip() {
|
|
89
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
90
|
+
method: 'GET',
|
|
91
|
+
url: '/drivers/trips/active',
|
|
92
|
+
errors: {
|
|
93
|
+
401: `Unauthorized`,
|
|
94
|
+
404: `No active trip found`,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Execute an action on a trip
|
|
100
|
+
* @param id Trip ID
|
|
101
|
+
* @param action Action to be executed on the trip
|
|
102
|
+
* @returns any Trip action executed successfully.
|
|
103
|
+
* @throws ApiError
|
|
104
|
+
*/
|
|
105
|
+
static executeTripAction(id, action) {
|
|
106
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
107
|
+
method: 'PATCH',
|
|
108
|
+
url: '/drivers/trips/{id}/action/{action}',
|
|
109
|
+
path: {
|
|
110
|
+
'id': id,
|
|
111
|
+
'action': action,
|
|
112
|
+
},
|
|
113
|
+
errors: {
|
|
114
|
+
400: `Invalid action`,
|
|
115
|
+
401: `Unauthorized`,
|
|
116
|
+
404: `Trip not found`,
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.DriverTripsService = DriverTripsService;
|
|
@@ -1,79 +1,35 @@
|
|
|
1
|
-
import type { DriverDto } from '../models/DriverDto';
|
|
2
1
|
import type { DriverUpdateDto } from '../models/DriverUpdateDto';
|
|
3
|
-
import type { OrderDto } from '../models/OrderDto';
|
|
4
|
-
import type { UpdateDriverTripStatusDto } from '../models/UpdateDriverTripStatusDto';
|
|
5
2
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
6
3
|
export declare class DriversService {
|
|
7
4
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @param requestBody
|
|
10
|
-
* @returns any Driver created successfully.
|
|
11
|
-
* @throws ApiError
|
|
12
|
-
*/
|
|
13
|
-
static create(requestBody: DriverDto): CancelablePromise<any>;
|
|
14
|
-
/**
|
|
15
|
-
* Get all drivers
|
|
16
|
-
* @param search Text to search for in name, surname, phone number, license or type
|
|
17
|
-
* @param order Sorting options
|
|
18
|
-
* @returns any List of drivers
|
|
19
|
-
* @throws ApiError
|
|
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>;
|
|
29
|
-
/**
|
|
30
|
-
* Get a single driver by ID
|
|
31
|
-
* @param id
|
|
32
|
-
* @returns any Driver found
|
|
33
|
-
* @throws ApiError
|
|
34
|
-
*/
|
|
35
|
-
static findById(id: number): CancelablePromise<any>;
|
|
36
|
-
/**
|
|
37
|
-
* Update a driver by ID
|
|
38
|
-
* @param id
|
|
5
|
+
* Update the current driver
|
|
39
6
|
* @param requestBody
|
|
40
7
|
* @returns any Driver updated successfully.
|
|
41
8
|
* @throws ApiError
|
|
42
9
|
*/
|
|
43
|
-
static update(
|
|
10
|
+
static update(requestBody: DriverUpdateDto): CancelablePromise<any>;
|
|
44
11
|
/**
|
|
45
|
-
* Delete
|
|
46
|
-
* @param id
|
|
12
|
+
* Delete the current driver
|
|
47
13
|
* @returns any Driver deleted successfully.
|
|
48
14
|
* @throws ApiError
|
|
49
15
|
*/
|
|
50
|
-
static remove(
|
|
16
|
+
static remove(): CancelablePromise<any>;
|
|
51
17
|
/**
|
|
52
|
-
* Update
|
|
53
|
-
* @param id
|
|
18
|
+
* Update the current driver online status
|
|
54
19
|
* @returns any Driver online status updated successfully.
|
|
55
20
|
* @throws ApiError
|
|
56
21
|
*/
|
|
57
|
-
static updateOnlineStatus(
|
|
22
|
+
static updateOnlineStatus(): CancelablePromise<any>;
|
|
58
23
|
/**
|
|
59
|
-
* Deactivate
|
|
60
|
-
* @param id
|
|
24
|
+
* Deactivate the current driver account
|
|
61
25
|
* @returns any Driver account deactivated successfully.
|
|
62
26
|
* @throws ApiError
|
|
63
27
|
*/
|
|
64
|
-
static deactivateAccount(
|
|
28
|
+
static deactivateAccount(): CancelablePromise<any>;
|
|
65
29
|
/**
|
|
66
30
|
* Update a driver account status by ID
|
|
67
|
-
* @param id
|
|
68
31
|
* @returns any Driver account status updated successfully.
|
|
69
32
|
* @throws ApiError
|
|
70
33
|
*/
|
|
71
|
-
static updateAccountStatus(
|
|
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>;
|
|
34
|
+
static updateAccountStatus(): CancelablePromise<any>;
|
|
79
35
|
}
|