@dapex-tech/elite-online-services 0.0.12 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/createClient.d.ts +1 -0
  2. package/models/AdminCreateDto.d.ts +26 -0
  3. package/models/AdminCreateDto.js +2 -0
  4. package/models/AdminDto.d.ts +0 -8
  5. package/models/AdminLoginResponseDto.d.ts +38 -0
  6. package/models/AdminLoginResponseDto.js +2 -0
  7. package/models/AdminUpdateDto.d.ts +2 -2
  8. package/models/CustomerDto.d.ts +2 -38
  9. package/models/CustomerLoginDto.d.ts +1 -1
  10. package/models/CustomerLoginResponseDto.d.ts +38 -0
  11. package/models/CustomerLoginResponseDto.js +2 -0
  12. package/models/CustomerRegisterDto.d.ts +26 -0
  13. package/models/CustomerRegisterDto.js +2 -0
  14. package/models/CustomerTripActions.d.ts +3 -0
  15. package/models/CustomerTripActions.js +11 -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 +10 -0
  32. package/models/index.js +10 -0
  33. package/package.json +1 -1
  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 +19 -17
  47. package/services/CustomerTripsService.js +12 -43
  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 +19 -45
  67. package/socketService.js +84 -57
  68. package/types/index.d.ts +1 -0
  69. package/types/index.js +1 -0
  70. package/types/realtime/driver-execute-trip-action.d.ts +5 -0
  71. package/types/realtime/driver-execute-trip-action.js +2 -0
  72. package/types/realtime/driver-status.d.ts +8 -0
  73. package/types/realtime/driver-status.js +2 -0
  74. package/types/realtime/index.d.ts +2 -0
  75. package/types/realtime/index.js +18 -0
@@ -7,7 +7,7 @@ class AdminAuthService {
7
7
  /**
8
8
  * Admin Login
9
9
  * @param requestBody
10
- * @returns any Login successful
10
+ * @returns AdminLoginResponseDto Login successful
11
11
  * @throws ApiError
12
12
  */
13
13
  static login(requestBody) {
@@ -16,57 +16,45 @@ class AdminAuthService {
16
16
  url: '/auth/admins/login',
17
17
  body: requestBody,
18
18
  mediaType: 'application/json',
19
- errors: {
20
- 401: `Invalid credentials`,
21
- },
22
19
  });
23
20
  }
24
21
  /**
25
- * Refresh Driver Token
26
- * @returns any Token refreshed successfully
22
+ * Refresh Admin Token
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/admins/refresh-token',
33
- errors: {
34
- 401: `Unauthorized`,
35
- },
36
30
  });
37
31
  }
38
32
  /**
39
- * Get admin profile
40
- * @returns any Admin profile retrieved successfully
33
+ * Get Admin Profile
34
+ * @returns AdminDto Admin profile retrieved successfully
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/admins/me',
47
- errors: {
48
- 401: `Unauthorized`,
49
- },
50
41
  });
51
42
  }
52
43
  /**
53
44
  * Admin 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/admins/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 AdminAuthService {
75
63
  url: '/auth/admins/forgot-password',
76
64
  body: requestBody,
77
65
  mediaType: 'application/json',
78
- errors: {
79
- 401: `Admin 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 AdminAuthService {
92
77
  url: '/auth/admins/validate-reset-code',
93
78
  body: requestBody,
94
79
  mediaType: 'application/json',
95
- errors: {
96
- 401: `Admin not found`,
97
- 403: `Invalid or expired reset code`,
98
- },
99
80
  });
100
81
  }
101
82
  /**
102
83
  * Reset Admin 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 AdminAuthService {
110
91
  url: '/auth/admins/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
  }
@@ -1,15 +1,17 @@
1
1
  import type { CustomerDto } from '../models/CustomerDto';
2
+ import type { CustomerRegisterDto } from '../models/CustomerRegisterDto';
2
3
  import type { CustomerUpdatedDto } from '../models/CustomerUpdatedDto';
4
+ import type { MessageResponseDto } from '../models/MessageResponseDto';
3
5
  import type { OrderDto } from '../models/OrderDto';
4
6
  import type { CancelablePromise } from '../core/CancelablePromise';
5
7
  export declare class AdminCustomerService {
6
8
  /**
7
9
  * Create a new customer
8
10
  * @param requestBody
9
- * @returns any Customer created successfully.
11
+ * @returns CustomerDto Customer created successfully.
10
12
  * @throws ApiError
11
13
  */
12
- static create(requestBody: CustomerDto): CancelablePromise<any>;
14
+ static create(requestBody: CustomerRegisterDto): CancelablePromise<CustomerDto>;
13
15
  /**
14
16
  * Get all customers
15
17
  * @param search Text to search for in name, surname, phone number or email
@@ -21,30 +23,30 @@ export declare class AdminCustomerService {
21
23
  * @param phone Filter by phone number
22
24
  * @param phoneCountryCode Filter by phone country code
23
25
  * @param isVerified Filter by verified status
24
- * @returns any List of customers
26
+ * @returns CustomerDto List of customers
25
27
  * @throws ApiError
26
28
  */
27
- static findAll(search?: string, order?: OrderDto, id?: number, firstName?: string, lastName?: string, email?: string, phone?: string, phoneCountryCode?: string, isVerified?: boolean): CancelablePromise<any>;
29
+ static findAll(search?: string, order?: OrderDto, id?: number, firstName?: string, lastName?: string, email?: string, phone?: string, phoneCountryCode?: string, isVerified?: boolean): CancelablePromise<Array<CustomerDto>>;
28
30
  /**
29
31
  * Get a single customer by ID
30
32
  * @param id
31
- * @returns any Customer found
33
+ * @returns CustomerDto Customer found
32
34
  * @throws ApiError
33
35
  */
34
- static findById(id: number): CancelablePromise<any>;
36
+ static findById(id: number): CancelablePromise<CustomerDto>;
35
37
  /**
36
38
  * Update a customer by ID
37
39
  * @param id
38
40
  * @param requestBody
39
- * @returns any Customer updated successfully.
41
+ * @returns CustomerDto Customer updated successfully.
40
42
  * @throws ApiError
41
43
  */
42
- static update(id: number, requestBody: CustomerUpdatedDto): CancelablePromise<any>;
44
+ static update(id: number, requestBody: CustomerUpdatedDto): CancelablePromise<CustomerDto>;
43
45
  /**
44
46
  * Delete a customer by ID
45
47
  * @param id
46
- * @returns any Customer deleted successfully.
48
+ * @returns MessageResponseDto Customer deleted successfully.
47
49
  * @throws ApiError
48
50
  */
49
- static remove(id: number): CancelablePromise<any>;
51
+ static remove(id: number): CancelablePromise<MessageResponseDto>;
50
52
  }
@@ -7,7 +7,7 @@ class AdminCustomerService {
7
7
  /**
8
8
  * Create a new customer
9
9
  * @param requestBody
10
- * @returns any Customer created successfully.
10
+ * @returns CustomerDto Customer created successfully.
11
11
  * @throws ApiError
12
12
  */
13
13
  static create(requestBody) {
@@ -16,9 +16,6 @@ class AdminCustomerService {
16
16
  url: '/admins/customers',
17
17
  body: requestBody,
18
18
  mediaType: 'application/json',
19
- errors: {
20
- 401: `Unauthorized`,
21
- },
22
19
  });
23
20
  }
24
21
  /**
@@ -32,7 +29,7 @@ class AdminCustomerService {
32
29
  * @param phone Filter by phone number
33
30
  * @param phoneCountryCode Filter by phone country code
34
31
  * @param isVerified Filter by verified status
35
- * @returns any List of customers
32
+ * @returns CustomerDto List of customers
36
33
  * @throws ApiError
37
34
  */
38
35
  static findAll(search, order, id, firstName, lastName, email, phone, phoneCountryCode, isVerified) {
@@ -50,15 +47,12 @@ class AdminCustomerService {
50
47
  'phoneCountryCode': phoneCountryCode,
51
48
  'isVerified': isVerified,
52
49
  },
53
- errors: {
54
- 401: `Unauthorized`,
55
- },
56
50
  });
57
51
  }
58
52
  /**
59
53
  * Get a single customer by ID
60
54
  * @param id
61
- * @returns any Customer found
55
+ * @returns CustomerDto Customer found
62
56
  * @throws ApiError
63
57
  */
64
58
  static findById(id) {
@@ -68,17 +62,13 @@ class AdminCustomerService {
68
62
  path: {
69
63
  'id': id,
70
64
  },
71
- errors: {
72
- 401: `Unauthorized`,
73
- 404: `Customer not found`,
74
- },
75
65
  });
76
66
  }
77
67
  /**
78
68
  * Update a customer by ID
79
69
  * @param id
80
70
  * @param requestBody
81
- * @returns any Customer updated successfully.
71
+ * @returns CustomerDto Customer updated successfully.
82
72
  * @throws ApiError
83
73
  */
84
74
  static update(id, requestBody) {
@@ -90,16 +80,12 @@ class AdminCustomerService {
90
80
  },
91
81
  body: requestBody,
92
82
  mediaType: 'application/json',
93
- errors: {
94
- 401: `Unauthorized`,
95
- 404: `Customer not found`,
96
- },
97
83
  });
98
84
  }
99
85
  /**
100
86
  * Delete a customer by ID
101
87
  * @param id
102
- * @returns any Customer deleted successfully.
88
+ * @returns MessageResponseDto Customer deleted successfully.
103
89
  * @throws ApiError
104
90
  */
105
91
  static remove(id) {
@@ -109,10 +95,6 @@ class AdminCustomerService {
109
95
  path: {
110
96
  'id': id,
111
97
  },
112
- errors: {
113
- 401: `Unauthorized`,
114
- 404: `Customer not found`,
115
- },
116
98
  });
117
99
  }
118
100
  }
@@ -1,4 +1,4 @@
1
- import type { DriverDto } from '../models/DriverDto';
1
+ import type { DriverCreateDto } from '../models/DriverCreateDto';
2
2
  import type { OrderDto } from '../models/OrderDto';
3
3
  import type { CancelablePromise } from '../core/CancelablePromise';
4
4
  export declare class AdminDriversService {
@@ -8,7 +8,7 @@ export declare class AdminDriversService {
8
8
  * @returns any Driver created successfully.
9
9
  * @throws ApiError
10
10
  */
11
- static createDriver(requestBody: DriverDto): CancelablePromise<any>;
11
+ static createDriver(requestBody: DriverCreateDto): CancelablePromise<any>;
12
12
  /**
13
13
  * Get all drivers
14
14
  * @param search Text to search for in name, surname, phone number or email
@@ -16,9 +16,6 @@ class AdminDriversService {
16
16
  url: '/admins/drivers',
17
17
  body: requestBody,
18
18
  mediaType: 'application/json',
19
- errors: {
20
- 401: `Unauthorized`,
21
- },
22
19
  });
23
20
  }
24
21
  /**
@@ -56,9 +53,6 @@ class AdminDriversService {
56
53
  'license': license,
57
54
  'type': type,
58
55
  },
59
- errors: {
60
- 401: `Unauthorized`,
61
- },
62
56
  });
63
57
  }
64
58
  /**
@@ -74,10 +68,6 @@ class AdminDriversService {
74
68
  path: {
75
69
  'id': id,
76
70
  },
77
- errors: {
78
- 401: `Unauthorized`,
79
- 404: `Driver not found`,
80
- },
81
71
  });
82
72
  }
83
73
  /**
@@ -93,10 +83,6 @@ class AdminDriversService {
93
83
  path: {
94
84
  'id': id,
95
85
  },
96
- errors: {
97
- 401: `Unauthorized`,
98
- 404: `Driver not found`,
99
- },
100
86
  });
101
87
  }
102
88
  /**
@@ -112,10 +98,6 @@ class AdminDriversService {
112
98
  path: {
113
99
  'id': id,
114
100
  },
115
- errors: {
116
- 401: `Unauthorized`,
117
- 404: `Driver not found`,
118
- },
119
101
  });
120
102
  }
121
103
  }
@@ -1,43 +1,45 @@
1
+ import type { AdminCreateDto } from '../models/AdminCreateDto';
1
2
  import type { AdminDto } from '../models/AdminDto';
2
3
  import type { AdminUpdateDto } from '../models/AdminUpdateDto';
4
+ import type { MessageResponseDto } from '../models/MessageResponseDto';
3
5
  import type { OrderDto } from '../models/OrderDto';
4
6
  import type { CancelablePromise } from '../core/CancelablePromise';
5
7
  export declare class AdminService {
6
8
  /**
7
9
  * Create a new admin
8
10
  * @param requestBody
9
- * @returns any Admin created successfully.
11
+ * @returns AdminDto Admin created successfully.
10
12
  * @throws ApiError
11
13
  */
12
- static create(requestBody: AdminDto): CancelablePromise<any>;
14
+ static create(requestBody: AdminCreateDto): CancelablePromise<AdminDto>;
13
15
  /**
14
16
  * Get all admins
15
17
  * @param search Text to search for in name, surname, phone number or email
16
18
  * @param order Sorting options
17
- * @returns any List of admins
19
+ * @returns AdminDto List of admins
18
20
  * @throws ApiError
19
21
  */
20
- static findAll(search?: string, order?: OrderDto): CancelablePromise<any>;
22
+ static findAll(search?: string, order?: OrderDto): CancelablePromise<Array<AdminDto>>;
21
23
  /**
22
24
  * Get a single admin by ID
23
25
  * @param id
24
- * @returns any Admin found
26
+ * @returns AdminDto Admin found
25
27
  * @throws ApiError
26
28
  */
27
- static findById(id: number): CancelablePromise<any>;
29
+ static findById(id: number): CancelablePromise<AdminDto>;
28
30
  /**
29
31
  * Update an admin by ID
30
32
  * @param id
31
33
  * @param requestBody
32
- * @returns any Admin updated successfully.
34
+ * @returns AdminDto Admin updated successfully.
33
35
  * @throws ApiError
34
36
  */
35
- static update(id: number, requestBody: AdminUpdateDto): CancelablePromise<any>;
37
+ static update(id: number, requestBody: AdminUpdateDto): CancelablePromise<AdminDto>;
36
38
  /**
37
39
  * Delete an admin by ID
38
40
  * @param id
39
- * @returns any Admin deleted successfully.
41
+ * @returns MessageResponseDto Admin deleted successfully.
40
42
  * @throws ApiError
41
43
  */
42
- static remove(id: number): CancelablePromise<any>;
44
+ static remove(id: number): CancelablePromise<MessageResponseDto>;
43
45
  }
@@ -7,7 +7,7 @@ class AdminService {
7
7
  /**
8
8
  * Create a new admin
9
9
  * @param requestBody
10
- * @returns any Admin created successfully.
10
+ * @returns AdminDto Admin created successfully.
11
11
  * @throws ApiError
12
12
  */
13
13
  static create(requestBody) {
@@ -16,16 +16,13 @@ class AdminService {
16
16
  url: '/admins',
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 admins
26
23
  * @param search Text to search for in name, surname, phone number or email
27
24
  * @param order Sorting options
28
- * @returns any List of admins
25
+ * @returns AdminDto List of admins
29
26
  * @throws ApiError
30
27
  */
31
28
  static findAll(search, order) {
@@ -36,15 +33,12 @@ class AdminService {
36
33
  'search': search,
37
34
  'order': order,
38
35
  },
39
- errors: {
40
- 401: `Unauthorized`,
41
- },
42
36
  });
43
37
  }
44
38
  /**
45
39
  * Get a single admin by ID
46
40
  * @param id
47
- * @returns any Admin found
41
+ * @returns AdminDto Admin found
48
42
  * @throws ApiError
49
43
  */
50
44
  static findById(id) {
@@ -54,17 +48,13 @@ class AdminService {
54
48
  path: {
55
49
  'id': id,
56
50
  },
57
- errors: {
58
- 401: `Unauthorized`,
59
- 404: `Admin not found`,
60
- },
61
51
  });
62
52
  }
63
53
  /**
64
54
  * Update an admin by ID
65
55
  * @param id
66
56
  * @param requestBody
67
- * @returns any Admin updated successfully.
57
+ * @returns AdminDto Admin updated successfully.
68
58
  * @throws ApiError
69
59
  */
70
60
  static update(id, requestBody) {
@@ -76,16 +66,12 @@ class AdminService {
76
66
  },
77
67
  body: requestBody,
78
68
  mediaType: 'application/json',
79
- errors: {
80
- 401: `Unauthorized`,
81
- 404: `Admin not found`,
82
- },
83
69
  });
84
70
  }
85
71
  /**
86
72
  * Delete an admin by ID
87
73
  * @param id
88
- * @returns any Admin deleted successfully.
74
+ * @returns MessageResponseDto Admin deleted successfully.
89
75
  * @throws ApiError
90
76
  */
91
77
  static remove(id) {
@@ -95,10 +81,6 @@ class AdminService {
95
81
  path: {
96
82
  'id': id,
97
83
  },
98
- errors: {
99
- 401: `Unauthorized`,
100
- 404: `Admin not found`,
101
- },
102
84
  });
103
85
  }
104
86
  }
@@ -7,53 +7,53 @@ export declare class AdminTripsService {
7
7
  /**
8
8
  * Get all trips
9
9
  * @param search
10
- * @returns any List of trips
10
+ * @returns TripDto List of trips
11
11
  * @throws ApiError
12
12
  */
13
- static findAll(search: string): CancelablePromise<any>;
13
+ static findAll(search: string): CancelablePromise<Array<TripDto>>;
14
14
  /**
15
15
  * Create a new trip/service order
16
16
  * @param requestBody
17
- * @returns any Trip created successfully.
17
+ * @returns TripDto Trip created successfully.
18
18
  * @throws ApiError
19
19
  */
20
- static create(requestBody: TripDto): CancelablePromise<any>;
20
+ static create(requestBody: TripDto): CancelablePromise<TripDto>;
21
21
  /**
22
22
  * Get a single trip by ID
23
23
  * @param id
24
- * @returns any Trip found
24
+ * @returns TripDto Trip found
25
25
  * @throws ApiError
26
26
  */
27
- static findById(id: number): CancelablePromise<any>;
27
+ static findById(id: number): CancelablePromise<TripDto>;
28
28
  /**
29
29
  * Update a trip by ID
30
30
  * @param id
31
31
  * @param requestBody
32
- * @returns any Trip updated successfully.
32
+ * @returns TripDto Trip updated successfully.
33
33
  * @throws ApiError
34
34
  */
35
- static update(id: number, requestBody: TripUpdateDto): CancelablePromise<any>;
35
+ static update(id: number, requestBody: TripUpdateDto): CancelablePromise<TripDto>;
36
36
  /**
37
37
  * Update trip status
38
38
  * @param id
39
- * @returns any Trip status updated successfully.
39
+ * @returns TripDto Trip status updated successfully.
40
40
  * @throws ApiError
41
41
  */
42
- static updateTripStatus(id: number): CancelablePromise<any>;
42
+ static updateTripStatus(id: number): CancelablePromise<TripDto>;
43
43
  /**
44
44
  * Assign a driver to a trip
45
45
  * @param id
46
46
  * @param requestBody
47
- * @returns any Driver assigned to trip successfully.
47
+ * @returns TripDto Driver assigned to trip successfully.
48
48
  * @throws ApiError
49
49
  */
50
- static assignDriver(id: number, requestBody: TripAssignDriverDto): CancelablePromise<any>;
50
+ static assignDriver(id: number, requestBody: TripAssignDriverDto): CancelablePromise<TripDto>;
51
51
  /**
52
52
  * Update driver assignment mode for a trip
53
53
  * @param id
54
54
  * @param requestBody
55
- * @returns any Driver assignment mode updated successfully.
55
+ * @returns TripDto Driver assignment mode updated successfully.
56
56
  * @throws ApiError
57
57
  */
58
- static updateDriverAssignmentMode(id: number, requestBody: TripUpdateDriverAssignmentModeDto): CancelablePromise<any>;
58
+ static updateDriverAssignmentMode(id: number, requestBody: TripUpdateDriverAssignmentModeDto): CancelablePromise<TripDto>;
59
59
  }
@@ -7,7 +7,7 @@ class AdminTripsService {
7
7
  /**
8
8
  * Get all trips
9
9
  * @param search
10
- * @returns any List of trips
10
+ * @returns TripDto List of trips
11
11
  * @throws ApiError
12
12
  */
13
13
  static findAll(search) {
@@ -17,15 +17,12 @@ class AdminTripsService {
17
17
  query: {
18
18
  'search': search,
19
19
  },
20
- errors: {
21
- 401: `Unauthorized`,
22
- },
23
20
  });
24
21
  }
25
22
  /**
26
23
  * Create a new trip/service order
27
24
  * @param requestBody
28
- * @returns any Trip created successfully.
25
+ * @returns TripDto Trip created successfully.
29
26
  * @throws ApiError
30
27
  */
31
28
  static create(requestBody) {
@@ -34,15 +31,12 @@ class AdminTripsService {
34
31
  url: '/admins/trips',
35
32
  body: requestBody,
36
33
  mediaType: 'application/json',
37
- errors: {
38
- 401: `Unauthorized`,
39
- },
40
34
  });
41
35
  }
42
36
  /**
43
37
  * Get a single trip by ID
44
38
  * @param id
45
- * @returns any Trip found
39
+ * @returns TripDto Trip found
46
40
  * @throws ApiError
47
41
  */
48
42
  static findById(id) {
@@ -52,17 +46,13 @@ class AdminTripsService {
52
46
  path: {
53
47
  'id': id,
54
48
  },
55
- errors: {
56
- 401: `Unauthorized`,
57
- 404: `Trip not found`,
58
- },
59
49
  });
60
50
  }
61
51
  /**
62
52
  * Update a trip by ID
63
53
  * @param id
64
54
  * @param requestBody
65
- * @returns any Trip updated successfully.
55
+ * @returns TripDto Trip updated successfully.
66
56
  * @throws ApiError
67
57
  */
68
58
  static update(id, requestBody) {
@@ -74,16 +64,12 @@ class AdminTripsService {
74
64
  },
75
65
  body: requestBody,
76
66
  mediaType: 'application/json',
77
- errors: {
78
- 401: `Unauthorized`,
79
- 404: `Trip not found`,
80
- },
81
67
  });
82
68
  }
83
69
  /**
84
70
  * Update trip status
85
71
  * @param id
86
- * @returns any Trip status updated successfully.
72
+ * @returns TripDto Trip status updated successfully.
87
73
  * @throws ApiError
88
74
  */
89
75
  static updateTripStatus(id) {
@@ -93,18 +79,13 @@ class AdminTripsService {
93
79
  path: {
94
80
  'id': id,
95
81
  },
96
- errors: {
97
- 400: `Invalid status`,
98
- 401: `Unauthorized`,
99
- 404: `Service order not found`,
100
- },
101
82
  });
102
83
  }
103
84
  /**
104
85
  * Assign a driver to a trip
105
86
  * @param id
106
87
  * @param requestBody
107
- * @returns any Driver assigned to trip successfully.
88
+ * @returns TripDto Driver assigned to trip successfully.
108
89
  * @throws ApiError
109
90
  */
110
91
  static assignDriver(id, requestBody) {
@@ -116,18 +97,13 @@ class AdminTripsService {
116
97
  },
117
98
  body: requestBody,
118
99
  mediaType: 'application/json',
119
- errors: {
120
- 400: `Trip status does not allow driver assignment`,
121
- 401: `Unauthorized`,
122
- 404: `Trip not found`,
123
- },
124
100
  });
125
101
  }
126
102
  /**
127
103
  * Update driver assignment mode for a trip
128
104
  * @param id
129
105
  * @param requestBody
130
- * @returns any Driver assignment mode updated successfully.
106
+ * @returns TripDto Driver assignment mode updated successfully.
131
107
  * @throws ApiError
132
108
  */
133
109
  static updateDriverAssignmentMode(id, requestBody) {
@@ -139,11 +115,6 @@ class AdminTripsService {
139
115
  },
140
116
  body: requestBody,
141
117
  mediaType: 'application/json',
142
- errors: {
143
- 400: `Trip already has the specified driver assignment mode`,
144
- 401: `Unauthorized`,
145
- 404: `Trip not found`,
146
- },
147
118
  });
148
119
  }
149
120
  }