@dapex-tech/elite-online-services 0.0.7 → 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
@@ -5,115 +5,28 @@ const OpenAPI_1 = require("../core/OpenAPI");
5
5
  const request_1 = require("../core/request");
6
6
  class DriversService {
7
7
  /**
8
- * Create a new driver
9
- * @param requestBody
10
- * @returns any Driver 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',
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, license or type
27
- * @param order Sorting options
28
- * @returns any List of drivers
29
- * @throws ApiError
30
- */
31
- static findAll(search, order) {
32
- return (0, request_1.request)(OpenAPI_1.OpenAPI, {
33
- method: 'GET',
34
- url: '/drivers',
35
- query: {
36
- 'search': search,
37
- 'order': order,
38
- },
39
- errors: {
40
- 401: `Unauthorized`,
41
- },
42
- });
43
- }
44
- /**
45
- * Get driver last location by ID
46
- * @param id
47
- * @returns any Driver last location retrieved successfully.
48
- * @throws ApiError
49
- */
50
- static getLastLocation(id) {
51
- return (0, request_1.request)(OpenAPI_1.OpenAPI, {
52
- method: 'GET',
53
- url: '/drivers/last-location/{id}',
54
- path: {
55
- 'id': id,
56
- },
57
- errors: {
58
- 401: `Unauthorized`,
59
- 404: `Driver not found`,
60
- },
61
- });
62
- }
63
- /**
64
- * Get a single driver by ID
65
- * @param id
66
- * @returns any Driver found
67
- * @throws ApiError
68
- */
69
- static findById(id) {
70
- return (0, request_1.request)(OpenAPI_1.OpenAPI, {
71
- method: 'GET',
72
- url: '/drivers/{id}',
73
- path: {
74
- 'id': id,
75
- },
76
- errors: {
77
- 401: `Unauthorized`,
78
- 404: `Driver not found`,
79
- },
80
- });
81
- }
82
- /**
83
- * Update a driver by ID
84
- * @param id
8
+ * Update the current driver
85
9
  * @param requestBody
86
10
  * @returns any Driver updated successfully.
87
11
  * @throws ApiError
88
12
  */
89
- static update(id, requestBody) {
13
+ static update(requestBody) {
90
14
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
91
15
  method: 'PATCH',
92
- url: '/drivers/{id}',
93
- path: {
94
- 'id': id,
95
- },
16
+ url: '/drivers/me',
96
17
  body: requestBody,
97
18
  mediaType: 'application/json',
98
- errors: {
99
- 401: `Unauthorized`,
100
- 404: `Driver not found`,
101
- },
102
19
  });
103
20
  }
104
21
  /**
105
- * Delete a driver by ID
106
- * @param id
22
+ * Delete the current driver
107
23
  * @returns any Driver deleted successfully.
108
24
  * @throws ApiError
109
25
  */
110
- static remove(id) {
26
+ static remove() {
111
27
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
112
28
  method: 'DELETE',
113
- url: '/drivers/{id}',
114
- path: {
115
- 'id': id,
116
- },
29
+ url: '/drivers/me',
117
30
  errors: {
118
31
  401: `Unauthorized`,
119
32
  404: `Driver not found`,
@@ -121,18 +34,14 @@ class DriversService {
121
34
  });
122
35
  }
123
36
  /**
124
- * Update a driver online status by ID
125
- * @param id
37
+ * Update the current driver online status
126
38
  * @returns any Driver online status updated successfully.
127
39
  * @throws ApiError
128
40
  */
129
- static updateOnlineStatus(id) {
41
+ static updateOnlineStatus() {
130
42
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
131
43
  method: 'PATCH',
132
- url: '/drivers/online-status/{id}',
133
- path: {
134
- 'id': id,
135
- },
44
+ url: '/drivers/online-status',
136
45
  errors: {
137
46
  401: `Unauthorized`,
138
47
  404: `Driver not found`,
@@ -140,18 +49,14 @@ class DriversService {
140
49
  });
141
50
  }
142
51
  /**
143
- * Deactivate a driver account by ID
144
- * @param id
52
+ * Deactivate the current driver account
145
53
  * @returns any Driver account deactivated successfully.
146
54
  * @throws ApiError
147
55
  */
148
- static deactivateAccount(id) {
56
+ static deactivateAccount() {
149
57
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
150
58
  method: 'PATCH',
151
- url: '/drivers/deactivate-account/{id}',
152
- path: {
153
- 'id': id,
154
- },
59
+ url: '/drivers/deactivate-account',
155
60
  errors: {
156
61
  401: `Unauthorized`,
157
62
  404: `Driver not found`,
@@ -160,41 +65,18 @@ class DriversService {
160
65
  }
161
66
  /**
162
67
  * Update a driver account status by ID
163
- * @param id
164
68
  * @returns any Driver account status updated successfully.
165
69
  * @throws ApiError
166
70
  */
167
- static updateAccountStatus(id) {
71
+ static updateAccountStatus() {
168
72
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
169
73
  method: 'PATCH',
170
- url: '/drivers/account-status/{id}',
171
- path: {
172
- 'id': id,
173
- },
74
+ url: '/drivers/account-status',
174
75
  errors: {
175
76
  401: `Unauthorized`,
176
77
  404: `Driver not found`,
177
78
  },
178
79
  });
179
80
  }
180
- /**
181
- * Update trip status, drivers are only allowed to update the status to IN_PROGRESS or COMPLETED.
182
- * @param requestBody
183
- * @returns any Trip status updated successfully
184
- * @throws ApiError
185
- */
186
- static updateTripStatus(requestBody) {
187
- return (0, request_1.request)(OpenAPI_1.OpenAPI, {
188
- method: 'PATCH',
189
- url: '/drivers/trips/status',
190
- body: requestBody,
191
- mediaType: 'application/json',
192
- errors: {
193
- 400: `Bad Request`,
194
- 401: `Unauthorized`,
195
- 404: `Service order not found`,
196
- },
197
- });
198
- }
199
81
  }
200
82
  exports.DriversService = DriversService;
@@ -5,4 +5,9 @@ export declare class MainService {
5
5
  * @throws ApiError
6
6
  */
7
7
  static getHello(): CancelablePromise<any>;
8
+ /**
9
+ * @returns any
10
+ * @throws ApiError
11
+ */
12
+ static healthCheck(): CancelablePromise<any>;
8
13
  }
@@ -14,5 +14,15 @@ class MainService {
14
14
  url: '/',
15
15
  });
16
16
  }
17
+ /**
18
+ * @returns any
19
+ * @throws ApiError
20
+ */
21
+ static healthCheck() {
22
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
23
+ method: 'GET',
24
+ url: '/health',
25
+ });
26
+ }
17
27
  }
18
28
  exports.MainService = MainService;
@@ -1,8 +1,13 @@
1
1
  export * from './AdminAuthService';
2
+ export * from './AdminCustomerService';
3
+ export * from './AdminDriversService';
2
4
  export * from './AdminService';
3
- export * from './CatalogsService';
5
+ export * from './AdminTripsService';
6
+ export * from './CustomerLocationsService';
7
+ export * from './CustomerTripsService';
8
+ export * from './CustomersAuthService';
9
+ export * from './CustomersService';
4
10
  export * from './DriverAuthService';
11
+ export * from './DriverTripsService';
5
12
  export * from './DriversService';
6
13
  export * from './MainService';
7
- export * from './UserAuthService';
8
- export * from './UsersService';
package/services/index.js CHANGED
@@ -15,10 +15,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./AdminAuthService"), exports);
18
+ __exportStar(require("./AdminCustomerService"), exports);
19
+ __exportStar(require("./AdminDriversService"), exports);
18
20
  __exportStar(require("./AdminService"), exports);
19
- __exportStar(require("./CatalogsService"), exports);
21
+ __exportStar(require("./AdminTripsService"), exports);
22
+ __exportStar(require("./CustomerLocationsService"), exports);
23
+ __exportStar(require("./CustomerTripsService"), exports);
24
+ __exportStar(require("./CustomersAuthService"), exports);
25
+ __exportStar(require("./CustomersService"), exports);
20
26
  __exportStar(require("./DriverAuthService"), exports);
27
+ __exportStar(require("./DriverTripsService"), exports);
21
28
  __exportStar(require("./DriversService"), exports);
22
29
  __exportStar(require("./MainService"), exports);
23
- __exportStar(require("./UserAuthService"), exports);
24
- __exportStar(require("./UsersService"), exports);
@@ -0,0 +1,54 @@
1
+ import { DriverLocationMap, DriverLocationWithClientID } from './types';
2
+ export declare class SocketService {
3
+ private socket;
4
+ constructor(baseUrl: string, token?: string);
5
+ connect(): void;
6
+ disconnect(): void;
7
+ isConnected(): boolean;
8
+ isActive(): boolean;
9
+ on<T = any>(event: string, cb: (data: T) => void): void;
10
+ off(event: string, cb?: (...args: any[]) => void): void;
11
+ emit<T = any>(event: string, data: T): void;
12
+ sendMessage(message: string): void;
13
+ onMessageReceived(cb: (data: {
14
+ text: string;
15
+ }) => void): void;
16
+ offMessageReceived(cb: (data: {
17
+ text: string;
18
+ }) => void): void;
19
+ updateLocation(data: DriverLocationWithClientID): void;
20
+ onLocationUpdated(cb: (data: DriverLocationMap) => void): void;
21
+ offLocationUpdated(cb: (data: DriverLocationMap) => void): void;
22
+ onAllLocations(cb: (data: DriverLocationMap) => void): void;
23
+ offAllLocations(cb: (data: DriverLocationMap) => void): void;
24
+ sendHeartbeat(clientID: string): void;
25
+ onHeartbeatReceived(cb: (data: {
26
+ clientID: string;
27
+ timestamp: number;
28
+ }) => void): void;
29
+ offHeartbeatReceived(cb: (data: {
30
+ clientID: string;
31
+ timestamp: number;
32
+ }) => void): void;
33
+ onAllHeartbeats(cb: (data: {
34
+ [clientID: string]: number;
35
+ }) => void): void;
36
+ offAllHeartbeats(cb: (data: {
37
+ [clientID: string]: number;
38
+ }) => void): void;
39
+ updateServiceOrderStatus(orderID: string, status: number): void;
40
+ onServiceOrderStatusUpdated(callback: (data: {
41
+ orderID: string;
42
+ status: number;
43
+ }) => void): void;
44
+ offServiceOrderStatusUpdated(callback: (data: {
45
+ orderID: string;
46
+ status: number;
47
+ }) => void): void;
48
+ onAllServiceOrderStatuses(callback: (statuses: {
49
+ [orderID: string]: number;
50
+ }) => void): void;
51
+ offAllServiceOrderStatuses(callback: (statuses: {
52
+ [orderID: string]: number;
53
+ }) => void): void;
54
+ }
package/socketService.js CHANGED
@@ -1,104 +1,99 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SocketService = void 0;
4
- const socket_io_client_1 = require('socket.io-client');
4
+ const socket_io_client_1 = require("socket.io-client");
5
5
  class SocketService {
6
- /*
6
+ /*
7
7
  constructor(baseUrl: string) {
8
8
  this.socket = io(baseUrl, { transports: ['websocket'] });
9
9
  }
10
10
  */
11
- constructor(baseUrl, token) {
12
- this.socket = (0, socket_io_client_1.io)(baseUrl, {
13
- transports: ['websocket'],
14
- auth: token ? { token } : undefined, // ✅ send token if available
15
- });
16
- }
17
- connect() {
18
- this.socket.connect();
19
- }
20
- disconnect() {
21
- this.socket.disconnect();
22
- }
23
- isConnected() {
24
- return this.socket.connected;
25
- }
26
- isActive() {
27
- return this.socket.active;
28
- }
29
- on(event, cb) {
30
- this.socket.on(event, cb);
31
- }
32
- off(event, cb) {
33
- if (cb) {
34
- this.socket.off(event, cb);
35
- } else {
36
- this.socket.removeAllListeners(event);
37
- }
38
- }
39
- emit(event, data) {
40
- this.socket.emit(event, data);
41
- }
42
- // Custom methods
43
- sendMessage(message) {
44
- this.emit('message', { text: message });
45
- }
46
- onMessageReceived(cb) {
47
- this.on('messageReceived', cb);
48
- }
49
- offMessageReceived(cb) {
50
- this.off('messageReceived', cb);
51
- }
52
- updateLocation(data) {
53
- this.emit('updateLocation', { ...data });
54
- }
55
- onLocationUpdated(cb) {
56
- this.on('locationUpdated', cb);
57
- }
58
- offLocationUpdated(cb) {
59
- this.off('locationUpdated', cb);
60
- }
61
- onAllLocations(cb) {
62
- this.on('allLocations', cb);
63
- }
64
- offAllLocations(cb) {
65
- this.off('allLocations', cb);
66
- }
67
- sendHeartbeat(clientID) {
68
- this.emit('heartbeat', { clientID });
69
- }
70
- onHeartbeatReceived(cb) {
71
- this.on('heartbeatReceived', cb);
72
- }
73
- offHeartbeatReceived(cb) {
74
- this.off('heartbeatReceived', cb);
75
- }
76
- onAllHeartbeats(cb) {
77
- this.on('allHeartbeats', cb);
78
- }
79
- offAllHeartbeats(cb) {
80
- this.off('allHeartbeats', cb);
81
- }
82
- updateServiceOrderStatus(orderID, status) {
83
- this.emit('serviceOrderStatusUpdate', { orderID, status });
84
- }
85
- onServiceOrderStatusUpdated(callback) {
86
- this.on('serviceOrderStatusUpdated', callback);
87
- }
88
- offServiceOrderStatusUpdated(callback) {
89
- this.off('serviceOrderStatusUpdated', callback);
90
- }
91
- onAllServiceOrderStatuses(callback) {
92
- this.on('allServiceOrderStatuses', callback);
93
- }
94
- offAllServiceOrderStatuses(callback) {
95
- this.off('allServiceOrderStatuses', callback);
96
- }
97
- onConnected(callback) {
98
- this.on('connected', callback);
99
- }
100
- offConnected(callback) {
101
- this.off('connected', callback);
102
- }
11
+ constructor(baseUrl, token) {
12
+ this.socket = (0, socket_io_client_1.io)(baseUrl, {
13
+ transports: ['websocket'],
14
+ auth: token ? { token } : undefined, // ✅ send token if available
15
+ });
16
+ }
17
+ connect() {
18
+ this.socket.connect();
19
+ }
20
+ disconnect() {
21
+ this.socket.disconnect();
22
+ }
23
+ isConnected() {
24
+ return this.socket.connected;
25
+ }
26
+ isActive() {
27
+ return this.socket.active;
28
+ }
29
+ on(event, cb) {
30
+ this.socket.on(event, cb);
31
+ }
32
+ off(event, cb) {
33
+ if (cb) {
34
+ this.socket.off(event, cb);
35
+ }
36
+ else {
37
+ this.socket.removeAllListeners(event);
38
+ }
39
+ }
40
+ emit(event, data) {
41
+ this.socket.emit(event, data);
42
+ }
43
+ // Custom methods
44
+ sendMessage(message) {
45
+ this.emit('message', { text: message });
46
+ }
47
+ onMessageReceived(cb) {
48
+ this.on('messageReceived', cb);
49
+ }
50
+ offMessageReceived(cb) {
51
+ this.off('messageReceived', cb);
52
+ }
53
+ updateLocation(data) {
54
+ this.emit('updateLocation', { ...data });
55
+ }
56
+ onLocationUpdated(cb) {
57
+ this.on('locationUpdated', cb);
58
+ }
59
+ offLocationUpdated(cb) {
60
+ this.off('locationUpdated', cb);
61
+ }
62
+ onAllLocations(cb) {
63
+ this.on('allLocations', cb);
64
+ }
65
+ offAllLocations(cb) {
66
+ this.off('allLocations', cb);
67
+ }
68
+ sendHeartbeat(clientID) {
69
+ this.emit('heartbeat', { clientID });
70
+ }
71
+ onHeartbeatReceived(cb) {
72
+ this.on('heartbeatReceived', cb);
73
+ }
74
+ offHeartbeatReceived(cb) {
75
+ this.off('heartbeatReceived', cb);
76
+ }
77
+ onAllHeartbeats(cb) {
78
+ this.on('allHeartbeats', cb);
79
+ }
80
+ offAllHeartbeats(cb) {
81
+ this.off('allHeartbeats', cb);
82
+ }
83
+ updateServiceOrderStatus(orderID, status) {
84
+ this.emit('serviceOrderStatusUpdate', { orderID, status });
85
+ }
86
+ onServiceOrderStatusUpdated(callback) {
87
+ this.on('serviceOrderStatusUpdated', callback);
88
+ }
89
+ offServiceOrderStatusUpdated(callback) {
90
+ this.off('serviceOrderStatusUpdated', callback);
91
+ }
92
+ onAllServiceOrderStatuses(callback) {
93
+ this.on('allServiceOrderStatuses', callback);
94
+ }
95
+ offAllServiceOrderStatuses(callback) {
96
+ this.off('allServiceOrderStatuses', callback);
97
+ }
103
98
  }
104
99
  exports.SocketService = SocketService;
@@ -1,46 +0,0 @@
1
- export type CreateServiceOrderDto = {
2
- /**
3
- * Driver ID
4
- */
5
- driver_id?: number;
6
- /**
7
- * User ID
8
- */
9
- user_id?: number;
10
- /**
11
- * Admin ID
12
- */
13
- admin_id?: number;
14
- /**
15
- * Service order status
16
- */
17
- status: string;
18
- /**
19
- * Trip source
20
- */
21
- trip_source: string;
22
- /**
23
- * Driver assignment mode
24
- */
25
- driver_assignment_mode: string;
26
- /**
27
- * Origin location
28
- */
29
- origin?: string;
30
- /**
31
- * Destination location
32
- */
33
- destination?: string;
34
- /**
35
- * Started at timestamp
36
- */
37
- started_at?: string;
38
- /**
39
- * Completed at timestamp
40
- */
41
- completed_at?: string;
42
- /**
43
- * Total amount
44
- */
45
- total?: number;
46
- };
@@ -1,10 +0,0 @@
1
- export type CreateStreetPickupDto = {
2
- /**
3
- * Origin location (pickup location)
4
- */
5
- origin: string;
6
- /**
7
- * Destination location
8
- */
9
- destination?: string;
10
- };
@@ -1,6 +0,0 @@
1
- export type GenerateUserResetCodeDto = {
2
- /**
3
- * User Email
4
- */
5
- email: string;
6
- };
@@ -1,6 +0,0 @@
1
- export type GenerateUserVerificationCodeDto = {
2
- /**
3
- * User Phone Number
4
- */
5
- phone: string;
6
- };
@@ -1,10 +0,0 @@
1
- export type ResetDriverPasswordDto = {
2
- /**
3
- * Driver Email
4
- */
5
- email: string;
6
- /**
7
- * New Password (minimum 6 characters)
8
- */
9
- newPassword: string;
10
- };
@@ -1,10 +0,0 @@
1
- export type ResetUserPasswordDto = {
2
- /**
3
- * User Email
4
- */
5
- email: string;
6
- /**
7
- * New Password (minimum 6 characters)
8
- */
9
- newPassword: string;
10
- };
@@ -1,10 +0,0 @@
1
- export type UpdateDriverStatusDto = {
2
- /**
3
- * Driver ID
4
- */
5
- driverId: number;
6
- /**
7
- * Driver status (true for Taxi In, false for Taxi Out)
8
- */
9
- status: boolean;
10
- };
@@ -1,14 +0,0 @@
1
- export type UpdateDriverTripStatusDto = {
2
- /**
3
- * Service Order ID
4
- */
5
- serviceOrderId: number;
6
- /**
7
- * Driver ID
8
- */
9
- driverId: number;
10
- /**
11
- * Status ID to update the service order to
12
- */
13
- status: string;
14
- };
@@ -1,10 +0,0 @@
1
- export type UpdateTripStatusDto = {
2
- /**
3
- * Service Order ID
4
- */
5
- serviceOrderId: number;
6
- /**
7
- * Status ID to update the service order to
8
- */
9
- status: string;
10
- };
@@ -1,18 +0,0 @@
1
- export type UserUpdatedDto = {
2
- /**
3
- * User First Name
4
- */
5
- first_name: string;
6
- /**
7
- * User Last Name
8
- */
9
- last_name: string;
10
- /**
11
- * User Email
12
- */
13
- email: string;
14
- /**
15
- * User Phone Number
16
- */
17
- phone?: string;
18
- };