@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
@@ -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
  }
@@ -7,7 +7,7 @@ class DriversService {
7
7
  /**
8
8
  * Update the current driver
9
9
  * @param requestBody
10
- * @returns any Driver updated successfully.
10
+ * @returns DriverDto Driver updated successfully.
11
11
  * @throws ApiError
12
12
  */
13
13
  static update(requestBody) {
@@ -27,54 +27,56 @@ class DriversService {
27
27
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
28
28
  method: 'DELETE',
29
29
  url: '/drivers/me',
30
- errors: {
31
- 401: `Unauthorized`,
32
- 404: `Driver not found`,
33
- },
34
30
  });
35
31
  }
36
32
  /**
37
33
  * Update the current driver online status
38
- * @returns any Driver online status updated successfully.
34
+ * @returns DriverDto Driver online status updated successfully.
39
35
  * @throws ApiError
40
36
  */
41
37
  static updateOnlineStatus() {
42
38
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
43
39
  method: 'PATCH',
44
40
  url: '/drivers/online-status',
45
- errors: {
46
- 401: `Unauthorized`,
47
- 404: `Driver not found`,
48
- },
49
41
  });
50
42
  }
51
43
  /**
52
44
  * Deactivate the current driver account
53
- * @returns any Driver account deactivated successfully.
45
+ * @returns DriverDto Driver account deactivated successfully.
54
46
  * @throws ApiError
55
47
  */
56
48
  static deactivateAccount() {
57
49
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
58
50
  method: 'PATCH',
59
51
  url: '/drivers/deactivate-account',
60
- errors: {
61
- 401: `Unauthorized`,
62
- 404: `Driver not found`,
63
- },
64
52
  });
65
53
  }
66
54
  /**
67
55
  * Update a driver account status by ID
68
- * @returns any Driver account status updated successfully.
56
+ * @returns DriverDto Driver account status updated successfully.
69
57
  * @throws ApiError
70
58
  */
71
59
  static updateAccountStatus() {
72
60
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
73
61
  method: 'PATCH',
74
62
  url: '/drivers/account-status',
63
+ });
64
+ }
65
+ /**
66
+ * Update a driver FCM token
67
+ * @param requestBody
68
+ * @returns MessageResponseDto FCM token updated successfully.
69
+ * @throws ApiError
70
+ */
71
+ static updateDriverFcmToken(requestBody) {
72
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
73
+ method: 'PATCH',
74
+ url: '/drivers/fcm-token',
75
+ body: requestBody,
76
+ mediaType: 'application/json',
75
77
  errors: {
76
78
  401: `Unauthorized`,
77
- 404: `Driver not found`,
79
+ 404: `Driver not found.`,
78
80
  },
79
81
  });
80
82
  }
@@ -0,0 +1,23 @@
1
+ import type { CancelablePromise } from '../core/CancelablePromise';
2
+ export declare class HealthService {
3
+ /**
4
+ * @returns any The Health Check is successful
5
+ * @throws ApiError
6
+ */
7
+ static liveness(): CancelablePromise<{
8
+ status?: string;
9
+ info?: Record<string, Record<string, any>> | null;
10
+ error?: Record<string, Record<string, any>> | null;
11
+ details?: Record<string, Record<string, any>>;
12
+ }>;
13
+ /**
14
+ * @returns any The Health Check is successful
15
+ * @throws ApiError
16
+ */
17
+ static readiness(): CancelablePromise<{
18
+ status?: string;
19
+ info?: Record<string, Record<string, any>> | null;
20
+ error?: Record<string, Record<string, any>> | null;
21
+ details?: Record<string, Record<string, any>>;
22
+ }>;
23
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HealthService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class HealthService {
7
+ /**
8
+ * @returns any The Health Check is successful
9
+ * @throws ApiError
10
+ */
11
+ static liveness() {
12
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
13
+ method: 'GET',
14
+ url: '/health/live',
15
+ errors: {
16
+ 503: `The Health Check is not successful`,
17
+ },
18
+ });
19
+ }
20
+ /**
21
+ * @returns any The Health Check is successful
22
+ * @throws ApiError
23
+ */
24
+ static readiness() {
25
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
26
+ method: 'GET',
27
+ url: '/health/ready',
28
+ errors: {
29
+ 503: `The Health Check is not successful`,
30
+ },
31
+ });
32
+ }
33
+ }
34
+ exports.HealthService = HealthService;
@@ -9,5 +9,10 @@ export declare class MainService {
9
9
  * @returns any
10
10
  * @throws ApiError
11
11
  */
12
- static healthCheck(): CancelablePromise<any>;
12
+ static emitTripUpdate(): CancelablePromise<any>;
13
+ /**
14
+ * @returns any
15
+ * @throws ApiError
16
+ */
17
+ static emitDriverUpdate(): CancelablePromise<any>;
13
18
  }
@@ -18,10 +18,20 @@ class MainService {
18
18
  * @returns any
19
19
  * @throws ApiError
20
20
  */
21
- static healthCheck() {
21
+ static emitTripUpdate() {
22
22
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
23
23
  method: 'GET',
24
- url: '/health',
24
+ url: '/emit-trip-update',
25
+ });
26
+ }
27
+ /**
28
+ * @returns any
29
+ * @throws ApiError
30
+ */
31
+ static emitDriverUpdate() {
32
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
33
+ method: 'GET',
34
+ url: '/emit-driver-update',
25
35
  });
26
36
  }
27
37
  }
@@ -10,4 +10,5 @@ export * from './CustomersService';
10
10
  export * from './DriverAuthService';
11
11
  export * from './DriverTripsService';
12
12
  export * from './DriversService';
13
+ export * from './HealthService';
13
14
  export * from './MainService';
package/services/index.js CHANGED
@@ -26,4 +26,5 @@ __exportStar(require("./CustomersService"), exports);
26
26
  __exportStar(require("./DriverAuthService"), exports);
27
27
  __exportStar(require("./DriverTripsService"), exports);
28
28
  __exportStar(require("./DriversService"), exports);
29
+ __exportStar(require("./HealthService"), exports);
29
30
  __exportStar(require("./MainService"), exports);
@@ -0,0 +1,54 @@
1
+ import { DriverLocationMap, DriverLocationWithClientID } from './types';
2
+ export declare class SocketServiceBak {
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
+ }