@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.
Files changed (97) hide show
  1. package/createClient.d.ts +19 -0
  2. package/createClient.js +1 -2
  3. package/models/AdminDto.d.ts +18 -6
  4. package/models/{LoginDto.d.ts → AdminLoginDto.d.ts} +1 -1
  5. package/models/AdminUpdateDto.d.ts +0 -4
  6. package/models/CustomerDto.d.ts +66 -0
  7. package/models/{CreateUserLocationDto.d.ts → CustomerLocationCreateDto.d.ts} +2 -2
  8. package/models/CustomerLocationDto.d.ts +34 -0
  9. package/models/{UpdateUserLocationDto.d.ts → CustomerLocationUpdateDto.d.ts} +2 -2
  10. package/models/CustomerLoginDto.d.ts +18 -0
  11. package/models/{UserDto.d.ts → CustomerUpdatedDto.d.ts} +5 -5
  12. package/models/{VerifyUserAccountDto.d.ts → CustomerVerifyAccountDto.d.ts} +5 -1
  13. package/models/DriverDto.d.ts +16 -4
  14. package/models/{EmailPhoneLoginDto.d.ts → DriverLoginDto.d.ts} +2 -6
  15. package/models/DriverTripActions.d.ts +10 -0
  16. package/models/DriverTripActions.js +18 -0
  17. package/models/DriverUpdateDto.d.ts +6 -6
  18. package/models/GenerateResetCodeDto.d.ts +6 -2
  19. package/models/GenerateVerificationCodeDto.d.ts +10 -0
  20. package/models/PaymentDto.d.ts +18 -0
  21. package/models/ResetPasswordDto.d.ts +14 -0
  22. package/models/TripAssignDriverDto.d.ts +6 -0
  23. package/models/TripDto.d.ts +108 -0
  24. package/models/TripLocationPointDto.d.ts +26 -0
  25. package/models/TripUpdateDriverAssignmentModeDto.d.ts +6 -0
  26. package/models/TripUpdateDto.d.ts +38 -0
  27. package/models/TripUpdateTripsStatusDto.d.ts +6 -0
  28. package/models/ValidateResetCodeDto.d.ts +14 -0
  29. package/models/ValidateResetCodeDto.js +2 -0
  30. package/models/index.d.ts +20 -18
  31. package/models/index.js +20 -18
  32. package/package.json +1 -1
  33. package/services/AdminAuthService.d.ts +28 -3
  34. package/services/AdminAuthService.js +57 -1
  35. package/services/AdminCustomerService.d.ts +50 -0
  36. package/services/AdminCustomerService.js +119 -0
  37. package/services/AdminDriversService.d.ts +51 -0
  38. package/services/AdminDriversService.js +122 -0
  39. package/services/AdminService.d.ts +0 -44
  40. package/services/AdminService.js +0 -100
  41. package/services/AdminTripsService.d.ts +59 -0
  42. package/services/AdminTripsService.js +150 -0
  43. package/services/CustomerLocationsService.d.ts +41 -0
  44. package/services/CustomerLocationsService.js +93 -0
  45. package/services/CustomerTripsService.d.ts +63 -0
  46. package/services/CustomerTripsService.js +162 -0
  47. package/services/CustomersAuthService.d.ts +88 -0
  48. package/services/{UserAuthService.js → CustomersAuthService.js} +24 -21
  49. package/services/CustomersService.d.ts +17 -0
  50. package/services/CustomersService.js +41 -0
  51. package/services/DriverAuthService.d.ts +6 -6
  52. package/services/DriverAuthService.js +1 -1
  53. package/services/DriverTripsService.d.ts +49 -0
  54. package/services/DriverTripsService.js +121 -0
  55. package/services/DriversService.d.ts +9 -53
  56. package/services/DriversService.js +14 -132
  57. package/services/MainService.d.ts +5 -0
  58. package/services/MainService.js +10 -0
  59. package/services/index.d.ts +8 -3
  60. package/services/index.js +8 -3
  61. package/socketService.d.ts +54 -0
  62. package/socketService.js +91 -96
  63. package/models/CreateServiceOrderDto.d.ts +0 -46
  64. package/models/CreateStreetPickupDto.d.ts +0 -10
  65. package/models/GenerateUserResetCodeDto.d.ts +0 -6
  66. package/models/GenerateUserVerificationCodeDto.d.ts +0 -6
  67. package/models/ResetDriverPasswordDto.d.ts +0 -10
  68. package/models/ResetUserPasswordDto.d.ts +0 -10
  69. package/models/UpdateDriverStatusDto.d.ts +0 -10
  70. package/models/UpdateDriverTripStatusDto.d.ts +0 -14
  71. package/models/UpdateTripStatusDto.d.ts +0 -10
  72. package/models/UserUpdatedDto.d.ts +0 -18
  73. package/models/ValidateDriverResetCodeDto.d.ts +0 -10
  74. package/models/ValidateUserResetCodeDto.d.ts +0 -10
  75. package/services/CatalogsService.d.ts +0 -67
  76. package/services/CatalogsService.js +0 -142
  77. package/services/UserAuthService.d.ts +0 -85
  78. package/services/UsersService.d.ts +0 -81
  79. package/services/UsersService.js +0 -198
  80. /package/models/{CreateServiceOrderDto.js → AdminLoginDto.js} +0 -0
  81. /package/models/{CreateStreetPickupDto.js → CustomerDto.js} +0 -0
  82. /package/models/{CreateUserLocationDto.js → CustomerLocationCreateDto.js} +0 -0
  83. /package/models/{EmailPhoneLoginDto.js → CustomerLocationDto.js} +0 -0
  84. /package/models/{GenerateUserResetCodeDto.js → CustomerLocationUpdateDto.js} +0 -0
  85. /package/models/{GenerateUserVerificationCodeDto.js → CustomerLoginDto.js} +0 -0
  86. /package/models/{LoginDto.js → CustomerUpdatedDto.js} +0 -0
  87. /package/models/{ResetDriverPasswordDto.js → CustomerVerifyAccountDto.js} +0 -0
  88. /package/models/{ResetUserPasswordDto.js → DriverLoginDto.js} +0 -0
  89. /package/models/{UpdateDriverStatusDto.js → GenerateVerificationCodeDto.js} +0 -0
  90. /package/models/{UpdateDriverTripStatusDto.js → PaymentDto.js} +0 -0
  91. /package/models/{UpdateTripStatusDto.js → ResetPasswordDto.js} +0 -0
  92. /package/models/{UpdateUserLocationDto.js → TripAssignDriverDto.js} +0 -0
  93. /package/models/{UserDto.js → TripDto.js} +0 -0
  94. /package/models/{UserUpdatedDto.js → TripLocationPointDto.js} +0 -0
  95. /package/models/{ValidateDriverResetCodeDto.js → TripUpdateDriverAssignmentModeDto.js} +0 -0
  96. /package/models/{ValidateUserResetCodeDto.js → TripUpdateDto.js} +0 -0
  97. /package/models/{VerifyUserAccountDto.js → TripUpdateTripsStatusDto.js} +0 -0
package/models/index.d.ts CHANGED
@@ -1,24 +1,26 @@
1
1
  export * from './AdminDto';
2
+ export * from './AdminLoginDto';
2
3
  export * from './AdminUpdateDto';
3
- export * from './CreateServiceOrderDto';
4
- export * from './CreateStreetPickupDto';
5
- export * from './CreateUserLocationDto';
4
+ export * from './CustomerDto';
5
+ export * from './CustomerLocationCreateDto';
6
+ export * from './CustomerLocationDto';
7
+ export * from './CustomerLocationUpdateDto';
8
+ export * from './CustomerLoginDto';
9
+ export * from './CustomerUpdatedDto';
10
+ export * from './CustomerVerifyAccountDto';
6
11
  export * from './DriverDto';
12
+ export * from './DriverLoginDto';
13
+ export * from './DriverTripActions';
7
14
  export * from './DriverUpdateDto';
8
- export * from './EmailPhoneLoginDto';
9
15
  export * from './GenerateResetCodeDto';
10
- export * from './GenerateUserResetCodeDto';
11
- export * from './GenerateUserVerificationCodeDto';
12
- export * from './LoginDto';
16
+ export * from './GenerateVerificationCodeDto';
13
17
  export * from './OrderDto';
14
- export * from './ResetDriverPasswordDto';
15
- export * from './ResetUserPasswordDto';
16
- export * from './UpdateDriverStatusDto';
17
- export * from './UpdateDriverTripStatusDto';
18
- export * from './UpdateTripStatusDto';
19
- export * from './UpdateUserLocationDto';
20
- export * from './UserDto';
21
- export * from './UserUpdatedDto';
22
- export * from './ValidateDriverResetCodeDto';
23
- export * from './ValidateUserResetCodeDto';
24
- export * from './VerifyUserAccountDto';
18
+ export * from './PaymentDto';
19
+ export * from './ResetPasswordDto';
20
+ export * from './TripAssignDriverDto';
21
+ export * from './TripDto';
22
+ export * from './TripLocationPointDto';
23
+ export * from './TripUpdateDriverAssignmentModeDto';
24
+ export * from './TripUpdateDto';
25
+ export * from './TripUpdateTripsStatusDto';
26
+ export * from './ValidateResetCodeDto';
package/models/index.js CHANGED
@@ -15,26 +15,28 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./AdminDto"), exports);
18
+ __exportStar(require("./AdminLoginDto"), exports);
18
19
  __exportStar(require("./AdminUpdateDto"), exports);
19
- __exportStar(require("./CreateServiceOrderDto"), exports);
20
- __exportStar(require("./CreateStreetPickupDto"), exports);
21
- __exportStar(require("./CreateUserLocationDto"), exports);
20
+ __exportStar(require("./CustomerDto"), exports);
21
+ __exportStar(require("./CustomerLocationCreateDto"), exports);
22
+ __exportStar(require("./CustomerLocationDto"), exports);
23
+ __exportStar(require("./CustomerLocationUpdateDto"), exports);
24
+ __exportStar(require("./CustomerLoginDto"), exports);
25
+ __exportStar(require("./CustomerUpdatedDto"), exports);
26
+ __exportStar(require("./CustomerVerifyAccountDto"), exports);
22
27
  __exportStar(require("./DriverDto"), exports);
28
+ __exportStar(require("./DriverLoginDto"), exports);
29
+ __exportStar(require("./DriverTripActions"), exports);
23
30
  __exportStar(require("./DriverUpdateDto"), exports);
24
- __exportStar(require("./EmailPhoneLoginDto"), exports);
25
31
  __exportStar(require("./GenerateResetCodeDto"), exports);
26
- __exportStar(require("./GenerateUserResetCodeDto"), exports);
27
- __exportStar(require("./GenerateUserVerificationCodeDto"), exports);
28
- __exportStar(require("./LoginDto"), exports);
32
+ __exportStar(require("./GenerateVerificationCodeDto"), exports);
29
33
  __exportStar(require("./OrderDto"), exports);
30
- __exportStar(require("./ResetDriverPasswordDto"), exports);
31
- __exportStar(require("./ResetUserPasswordDto"), exports);
32
- __exportStar(require("./UpdateDriverStatusDto"), exports);
33
- __exportStar(require("./UpdateDriverTripStatusDto"), exports);
34
- __exportStar(require("./UpdateTripStatusDto"), exports);
35
- __exportStar(require("./UpdateUserLocationDto"), exports);
36
- __exportStar(require("./UserDto"), exports);
37
- __exportStar(require("./UserUpdatedDto"), exports);
38
- __exportStar(require("./ValidateDriverResetCodeDto"), exports);
39
- __exportStar(require("./ValidateUserResetCodeDto"), exports);
40
- __exportStar(require("./VerifyUserAccountDto"), exports);
34
+ __exportStar(require("./PaymentDto"), exports);
35
+ __exportStar(require("./ResetPasswordDto"), exports);
36
+ __exportStar(require("./TripAssignDriverDto"), exports);
37
+ __exportStar(require("./TripDto"), exports);
38
+ __exportStar(require("./TripLocationPointDto"), exports);
39
+ __exportStar(require("./TripUpdateDriverAssignmentModeDto"), exports);
40
+ __exportStar(require("./TripUpdateDto"), exports);
41
+ __exportStar(require("./TripUpdateTripsStatusDto"), exports);
42
+ __exportStar(require("./ValidateResetCodeDto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dapex-tech/elite-online-services",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "private": false,
@@ -1,4 +1,7 @@
1
- import type { LoginDto } from '../models/LoginDto';
1
+ import type { AdminLoginDto } from '../models/AdminLoginDto';
2
+ import type { GenerateResetCodeDto } from '../models/GenerateResetCodeDto';
3
+ import type { ResetPasswordDto } from '../models/ResetPasswordDto';
4
+ import type { ValidateResetCodeDto } from '../models/ValidateResetCodeDto';
2
5
  import type { CancelablePromise } from '../core/CancelablePromise';
3
6
  export declare class AdminAuthService {
4
7
  /**
@@ -7,7 +10,7 @@ export declare class AdminAuthService {
7
10
  * @returns any Login successful
8
11
  * @throws ApiError
9
12
  */
10
- static login(requestBody: LoginDto): CancelablePromise<any>;
13
+ static login(requestBody: AdminLoginDto): CancelablePromise<any>;
11
14
  /**
12
15
  * Refresh Driver Token
13
16
  * @returns any Token refreshed successfully
@@ -15,7 +18,8 @@ export declare class AdminAuthService {
15
18
  */
16
19
  static refreshToken(): CancelablePromise<any>;
17
20
  /**
18
- * @returns any
21
+ * Get admin profile
22
+ * @returns any Admin profile retrieved successfully
19
23
  * @throws ApiError
20
24
  */
21
25
  static me(): CancelablePromise<any>;
@@ -25,4 +29,25 @@ export declare class AdminAuthService {
25
29
  * @throws ApiError
26
30
  */
27
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: ValidateResetCodeDto): CancelablePromise<any>;
46
+ /**
47
+ * Reset Admin Password
48
+ * @param requestBody
49
+ * @returns any Password reset successfully
50
+ * @throws ApiError
51
+ */
52
+ static resetPassword(requestBody: ResetPasswordDto): CancelablePromise<any>;
28
53
  }
@@ -36,13 +36,17 @@ class AdminAuthService {
36
36
  });
37
37
  }
38
38
  /**
39
- * @returns any
39
+ * Get admin profile
40
+ * @returns any Admin profile retrieved successfully
40
41
  * @throws ApiError
41
42
  */
42
43
  static me() {
43
44
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
44
45
  method: 'GET',
45
46
  url: '/auth/admins/me',
47
+ errors: {
48
+ 401: `Unauthorized`,
49
+ },
46
50
  });
47
51
  }
48
52
  /**
@@ -59,5 +63,57 @@ class AdminAuthService {
59
63
  },
60
64
  });
61
65
  }
66
+ /**
67
+ * Generate Password Reset Code
68
+ * @param requestBody
69
+ * @returns any Reset code generated and sent successfully
70
+ * @throws ApiError
71
+ */
72
+ static generateResetCode(requestBody) {
73
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
74
+ method: 'POST',
75
+ url: '/auth/admins/forgot-password',
76
+ body: requestBody,
77
+ mediaType: 'application/json',
78
+ errors: {
79
+ 401: `Admin not found`,
80
+ },
81
+ });
82
+ }
83
+ /**
84
+ * Validate Password Reset Code
85
+ * @param requestBody
86
+ * @returns any Reset code is valid
87
+ * @throws ApiError
88
+ */
89
+ static validateResetCode(requestBody) {
90
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
91
+ method: 'POST',
92
+ url: '/auth/admins/validate-reset-code',
93
+ body: requestBody,
94
+ mediaType: 'application/json',
95
+ errors: {
96
+ 401: `Admin not found`,
97
+ 403: `Invalid or expired reset code`,
98
+ },
99
+ });
100
+ }
101
+ /**
102
+ * Reset Admin Password
103
+ * @param requestBody
104
+ * @returns any Password reset successfully
105
+ * @throws ApiError
106
+ */
107
+ static resetPassword(requestBody) {
108
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
109
+ method: 'POST',
110
+ url: '/auth/admins/reset-password',
111
+ body: requestBody,
112
+ mediaType: 'application/json',
113
+ errors: {
114
+ 401: `User not found`,
115
+ },
116
+ });
117
+ }
62
118
  }
63
119
  exports.AdminAuthService = AdminAuthService;
@@ -0,0 +1,50 @@
1
+ import type { CustomerDto } from '../models/CustomerDto';
2
+ import type { CustomerUpdatedDto } from '../models/CustomerUpdatedDto';
3
+ import type { OrderDto } from '../models/OrderDto';
4
+ import type { CancelablePromise } from '../core/CancelablePromise';
5
+ export declare class AdminCustomerService {
6
+ /**
7
+ * Create a new customer
8
+ * @param requestBody
9
+ * @returns any Customer created successfully.
10
+ * @throws ApiError
11
+ */
12
+ static create(requestBody: CustomerDto): CancelablePromise<any>;
13
+ /**
14
+ * Get all customers
15
+ * @param search Text to search for in name, surname, phone number or email
16
+ * @param order Sorting options
17
+ * @param id Filter by id
18
+ * @param firstName Filter by first name
19
+ * @param lastName Filter by last name
20
+ * @param email Filter by email
21
+ * @param phone Filter by phone number
22
+ * @param phoneCountryCode Filter by phone country code
23
+ * @param isVerified Filter by verified status
24
+ * @returns any List of customers
25
+ * @throws ApiError
26
+ */
27
+ static findAll(search?: string, order?: OrderDto, id?: number, firstName?: string, lastName?: string, email?: string, phone?: string, phoneCountryCode?: string, isVerified?: boolean): CancelablePromise<any>;
28
+ /**
29
+ * Get a single customer by ID
30
+ * @param id
31
+ * @returns any Customer found
32
+ * @throws ApiError
33
+ */
34
+ static findById(id: number): CancelablePromise<any>;
35
+ /**
36
+ * Update a customer by ID
37
+ * @param id
38
+ * @param requestBody
39
+ * @returns any Customer updated successfully.
40
+ * @throws ApiError
41
+ */
42
+ static update(id: number, requestBody: CustomerUpdatedDto): CancelablePromise<any>;
43
+ /**
44
+ * Delete a customer by ID
45
+ * @param id
46
+ * @returns any Customer deleted successfully.
47
+ * @throws ApiError
48
+ */
49
+ static remove(id: number): CancelablePromise<any>;
50
+ }
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminCustomerService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class AdminCustomerService {
7
+ /**
8
+ * Create a new customer
9
+ * @param requestBody
10
+ * @returns any Customer created successfully.
11
+ * @throws ApiError
12
+ */
13
+ static create(requestBody) {
14
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
15
+ method: 'POST',
16
+ url: '/admins/customers',
17
+ body: requestBody,
18
+ mediaType: 'application/json',
19
+ errors: {
20
+ 401: `Unauthorized`,
21
+ },
22
+ });
23
+ }
24
+ /**
25
+ * Get all customers
26
+ * @param search Text to search for in name, surname, phone number or email
27
+ * @param order Sorting options
28
+ * @param id Filter by id
29
+ * @param firstName Filter by first name
30
+ * @param lastName Filter by last name
31
+ * @param email Filter by email
32
+ * @param phone Filter by phone number
33
+ * @param phoneCountryCode Filter by phone country code
34
+ * @param isVerified Filter by verified status
35
+ * @returns any List of customers
36
+ * @throws ApiError
37
+ */
38
+ static findAll(search, order, id, firstName, lastName, email, phone, phoneCountryCode, isVerified) {
39
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
40
+ method: 'GET',
41
+ url: '/admins/customers',
42
+ query: {
43
+ 'search': search,
44
+ 'order': order,
45
+ 'id': id,
46
+ 'firstName': firstName,
47
+ 'lastName': lastName,
48
+ 'email': email,
49
+ 'phone': phone,
50
+ 'phoneCountryCode': phoneCountryCode,
51
+ 'isVerified': isVerified,
52
+ },
53
+ errors: {
54
+ 401: `Unauthorized`,
55
+ },
56
+ });
57
+ }
58
+ /**
59
+ * Get a single customer by ID
60
+ * @param id
61
+ * @returns any Customer found
62
+ * @throws ApiError
63
+ */
64
+ static findById(id) {
65
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
66
+ method: 'GET',
67
+ url: '/admins/customers/{id}',
68
+ path: {
69
+ 'id': id,
70
+ },
71
+ errors: {
72
+ 401: `Unauthorized`,
73
+ 404: `Customer not found`,
74
+ },
75
+ });
76
+ }
77
+ /**
78
+ * Update a customer by ID
79
+ * @param id
80
+ * @param requestBody
81
+ * @returns any Customer updated successfully.
82
+ * @throws ApiError
83
+ */
84
+ static update(id, requestBody) {
85
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
86
+ method: 'PATCH',
87
+ url: '/admins/customers/{id}',
88
+ path: {
89
+ 'id': id,
90
+ },
91
+ body: requestBody,
92
+ mediaType: 'application/json',
93
+ errors: {
94
+ 401: `Unauthorized`,
95
+ 404: `Customer not found`,
96
+ },
97
+ });
98
+ }
99
+ /**
100
+ * Delete a customer by ID
101
+ * @param id
102
+ * @returns any Customer deleted successfully.
103
+ * @throws ApiError
104
+ */
105
+ static remove(id) {
106
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
107
+ method: 'DELETE',
108
+ url: '/admins/customers/{id}',
109
+ path: {
110
+ 'id': id,
111
+ },
112
+ errors: {
113
+ 401: `Unauthorized`,
114
+ 404: `Customer not found`,
115
+ },
116
+ });
117
+ }
118
+ }
119
+ exports.AdminCustomerService = AdminCustomerService;
@@ -0,0 +1,51 @@
1
+ import type { DriverDto } from '../models/DriverDto';
2
+ import type { OrderDto } from '../models/OrderDto';
3
+ import type { CancelablePromise } from '../core/CancelablePromise';
4
+ export declare class AdminDriversService {
5
+ /**
6
+ * Create a new driver
7
+ * @param requestBody
8
+ * @returns any Driver created successfully.
9
+ * @throws ApiError
10
+ */
11
+ static createDriver(requestBody: DriverDto): CancelablePromise<any>;
12
+ /**
13
+ * Get all drivers
14
+ * @param search Text to search for in name, surname, phone number or email
15
+ * @param order Sorting options
16
+ * @param id Filter by id
17
+ * @param firstName Filter by first name
18
+ * @param lastName Filter by last name
19
+ * @param email Filter by email
20
+ * @param phone Filter by phone number
21
+ * @param status Filter by status
22
+ * @param isOnline Filter by online status
23
+ * @param isActive Filter by active status
24
+ * @param license Filter by license
25
+ * @param type Filter by type
26
+ * @returns any List of drivers
27
+ * @throws ApiError
28
+ */
29
+ static findAll(search?: string, order?: OrderDto, id?: number, firstName?: string, lastName?: string, email?: string, phone?: string, status?: boolean, isOnline?: boolean, isActive?: boolean, license?: string, type?: string): CancelablePromise<any>;
30
+ /**
31
+ * Get a single driver by ID
32
+ * @param id
33
+ * @returns any Driver found
34
+ * @throws ApiError
35
+ */
36
+ static findById(id: number): CancelablePromise<any>;
37
+ /**
38
+ * Update a driver by ID
39
+ * @param id
40
+ * @returns any Driver updated successfully.
41
+ * @throws ApiError
42
+ */
43
+ static update(id: number): CancelablePromise<any>;
44
+ /**
45
+ * Delete a driver by ID
46
+ * @param id
47
+ * @returns any Driver deleted successfully.
48
+ * @throws ApiError
49
+ */
50
+ static remove(id: number): CancelablePromise<any>;
51
+ }
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminDriversService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class AdminDriversService {
7
+ /**
8
+ * Create a new driver
9
+ * @param requestBody
10
+ * @returns any Driver created successfully.
11
+ * @throws ApiError
12
+ */
13
+ static createDriver(requestBody) {
14
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
15
+ method: 'POST',
16
+ url: '/admins/drivers',
17
+ body: requestBody,
18
+ mediaType: 'application/json',
19
+ errors: {
20
+ 401: `Unauthorized`,
21
+ },
22
+ });
23
+ }
24
+ /**
25
+ * Get all drivers
26
+ * @param search Text to search for in name, surname, phone number or email
27
+ * @param order Sorting options
28
+ * @param id Filter by id
29
+ * @param firstName Filter by first name
30
+ * @param lastName Filter by last name
31
+ * @param email Filter by email
32
+ * @param phone Filter by phone number
33
+ * @param status Filter by status
34
+ * @param isOnline Filter by online status
35
+ * @param isActive Filter by active status
36
+ * @param license Filter by license
37
+ * @param type Filter by type
38
+ * @returns any List of drivers
39
+ * @throws ApiError
40
+ */
41
+ static findAll(search, order, id, firstName, lastName, email, phone, status, isOnline, isActive, license, type) {
42
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
43
+ method: 'GET',
44
+ url: '/admins/drivers',
45
+ query: {
46
+ 'search': search,
47
+ 'order': order,
48
+ 'id': id,
49
+ 'firstName': firstName,
50
+ 'lastName': lastName,
51
+ 'email': email,
52
+ 'phone': phone,
53
+ 'status': status,
54
+ 'isOnline': isOnline,
55
+ 'isActive': isActive,
56
+ 'license': license,
57
+ 'type': type,
58
+ },
59
+ errors: {
60
+ 401: `Unauthorized`,
61
+ },
62
+ });
63
+ }
64
+ /**
65
+ * Get a single driver by ID
66
+ * @param id
67
+ * @returns any Driver found
68
+ * @throws ApiError
69
+ */
70
+ static findById(id) {
71
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
72
+ method: 'GET',
73
+ url: '/admins/drivers/{id}',
74
+ path: {
75
+ 'id': id,
76
+ },
77
+ errors: {
78
+ 401: `Unauthorized`,
79
+ 404: `Driver not found`,
80
+ },
81
+ });
82
+ }
83
+ /**
84
+ * Update a driver by ID
85
+ * @param id
86
+ * @returns any Driver updated successfully.
87
+ * @throws ApiError
88
+ */
89
+ static update(id) {
90
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
91
+ method: 'PATCH',
92
+ url: '/admins/drivers/{id}',
93
+ path: {
94
+ 'id': id,
95
+ },
96
+ errors: {
97
+ 401: `Unauthorized`,
98
+ 404: `Driver not found`,
99
+ },
100
+ });
101
+ }
102
+ /**
103
+ * Delete a driver by ID
104
+ * @param id
105
+ * @returns any Driver deleted successfully.
106
+ * @throws ApiError
107
+ */
108
+ static remove(id) {
109
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
110
+ method: 'DELETE',
111
+ url: '/admins/drivers/{id}',
112
+ path: {
113
+ 'id': id,
114
+ },
115
+ errors: {
116
+ 401: `Unauthorized`,
117
+ 404: `Driver not found`,
118
+ },
119
+ });
120
+ }
121
+ }
122
+ exports.AdminDriversService = AdminDriversService;
@@ -1,10 +1,6 @@
1
1
  import type { AdminDto } from '../models/AdminDto';
2
2
  import type { AdminUpdateDto } from '../models/AdminUpdateDto';
3
- import type { CreateServiceOrderDto } from '../models/CreateServiceOrderDto';
4
- import type { DriverDto } from '../models/DriverDto';
5
3
  import type { OrderDto } from '../models/OrderDto';
6
- import type { UpdateDriverStatusDto } from '../models/UpdateDriverStatusDto';
7
- import type { UpdateTripStatusDto } from '../models/UpdateTripStatusDto';
8
4
  import type { CancelablePromise } from '../core/CancelablePromise';
9
5
  export declare class AdminService {
10
6
  /**
@@ -22,18 +18,6 @@ export declare class AdminService {
22
18
  * @throws ApiError
23
19
  */
24
20
  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>;
37
21
  /**
38
22
  * Get a single admin by ID
39
23
  * @param id
@@ -56,32 +40,4 @@ export declare class AdminService {
56
40
  * @throws ApiError
57
41
  */
58
42
  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>;
87
43
  }