@dapex-tech/elite-online-services 0.0.11 → 0.0.13

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