@dapex-tech/elite-online-services 0.0.13 → 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.
- package/models/CustomerDto.d.ts +4 -0
- package/models/CustomerLoginResponseDto.d.ts +4 -0
- package/models/CustomerTripActions.d.ts +3 -0
- package/models/CustomerTripActions.js +11 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/package.json +1 -1
- package/services/CustomerTripsService.d.ts +4 -2
- package/services/CustomerTripsService.js +4 -2
- package/socketService.d.ts +4 -3
- package/socketService.js +2 -2
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/types/realtime/driver-execute-trip-action.d.ts +5 -0
- package/types/realtime/driver-execute-trip-action.js +2 -0
- package/types/realtime/driver-status.d.ts +8 -0
- package/types/realtime/driver-status.js +2 -0
- package/types/realtime/index.d.ts +2 -0
- package/types/realtime/index.js +18 -0
package/models/CustomerDto.d.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomerTripActions = void 0;
|
|
4
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
var CustomerTripActions;
|
|
9
|
+
(function (CustomerTripActions) {
|
|
10
|
+
CustomerTripActions["CANCEL"] = "cancel";
|
|
11
|
+
})(CustomerTripActions || (exports.CustomerTripActions = CustomerTripActions = {}));
|
package/models/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './CustomerLocationUpdateDto';
|
|
|
10
10
|
export * from './CustomerLoginDto';
|
|
11
11
|
export * from './CustomerLoginResponseDto';
|
|
12
12
|
export * from './CustomerRegisterDto';
|
|
13
|
+
export * from './CustomerTripActions';
|
|
13
14
|
export * from './CustomerUpdatedDto';
|
|
14
15
|
export * from './CustomerVerifyAccountDto';
|
|
15
16
|
export * from './DriverCreateDto';
|
package/models/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __exportStar(require("./CustomerLocationUpdateDto"), exports);
|
|
|
26
26
|
__exportStar(require("./CustomerLoginDto"), exports);
|
|
27
27
|
__exportStar(require("./CustomerLoginResponseDto"), exports);
|
|
28
28
|
__exportStar(require("./CustomerRegisterDto"), exports);
|
|
29
|
+
__exportStar(require("./CustomerTripActions"), exports);
|
|
29
30
|
__exportStar(require("./CustomerUpdatedDto"), exports);
|
|
30
31
|
__exportStar(require("./CustomerVerifyAccountDto"), exports);
|
|
31
32
|
__exportStar(require("./DriverCreateDto"), exports);
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CustomerTripActions } from '../models/CustomerTripActions';
|
|
1
2
|
import type { TripDto } from '../models/TripDto';
|
|
2
3
|
import type { TripUpdateDto } from '../models/TripUpdateDto';
|
|
3
4
|
import type { TripUpdateTripsStatusDto } from '../models/TripUpdateTripsStatusDto';
|
|
@@ -55,9 +56,10 @@ export declare class CustomerTripsService {
|
|
|
55
56
|
static cancelTrip(id: number): CancelablePromise<TripDto>;
|
|
56
57
|
/**
|
|
57
58
|
* Execute an action on a trip
|
|
58
|
-
* @param id
|
|
59
|
+
* @param id Trip ID
|
|
60
|
+
* @param action Action to be executed on the trip
|
|
59
61
|
* @returns TripDto Trip action executed successfully.
|
|
60
62
|
* @throws ApiError
|
|
61
63
|
*/
|
|
62
|
-
static executeTripAction(id: number): CancelablePromise<TripDto>;
|
|
64
|
+
static executeTripAction(id: number, action: CustomerTripActions): CancelablePromise<TripDto>;
|
|
63
65
|
}
|
|
@@ -112,16 +112,18 @@ class CustomerTripsService {
|
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
114
|
* Execute an action on a trip
|
|
115
|
-
* @param id
|
|
115
|
+
* @param id Trip ID
|
|
116
|
+
* @param action Action to be executed on the trip
|
|
116
117
|
* @returns TripDto Trip action executed successfully.
|
|
117
118
|
* @throws ApiError
|
|
118
119
|
*/
|
|
119
|
-
static executeTripAction(id) {
|
|
120
|
+
static executeTripAction(id, action) {
|
|
120
121
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
121
122
|
method: 'PATCH',
|
|
122
123
|
url: '/customers/trips/{id}/action/{action}',
|
|
123
124
|
path: {
|
|
124
125
|
'id': id,
|
|
126
|
+
'action': action,
|
|
125
127
|
},
|
|
126
128
|
});
|
|
127
129
|
}
|
package/socketService.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DriverStatus } from './types';
|
|
1
2
|
export declare class SocketService {
|
|
2
3
|
private socket;
|
|
3
4
|
private token;
|
|
@@ -19,9 +20,9 @@ export declare class SocketService {
|
|
|
19
20
|
offConnected(cb?: (data: any) => void): void;
|
|
20
21
|
onDisconnected(cb: (data: any) => void): void;
|
|
21
22
|
offDisconnected(cb?: (data: any) => void): void;
|
|
22
|
-
onDriverStatusUpdate(cb: (data:
|
|
23
|
-
offDriverStatusUpdate(cb?: (data:
|
|
23
|
+
onDriverStatusUpdate(cb: (data: DriverStatus) => void): void;
|
|
24
|
+
offDriverStatusUpdate(cb?: (data: DriverStatus) => void): void;
|
|
24
25
|
onTripUpdate(cb: (data: any) => void): void;
|
|
25
26
|
offTripUpdate(cb?: (data: any) => void): void;
|
|
26
|
-
|
|
27
|
+
emitDriverStatusUpdate(data: DriverStatus): void;
|
|
27
28
|
}
|
package/socketService.js
CHANGED
|
@@ -119,8 +119,8 @@ class SocketService {
|
|
|
119
119
|
this.socket.removeAllListeners('tripUpdate');
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
|
|
123
|
-
this.emit('
|
|
122
|
+
emitDriverStatusUpdate(data) {
|
|
123
|
+
this.emit('driverStatusUpdate', { ...data });
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
exports.SocketService = SocketService;
|
package/types/index.d.ts
CHANGED
package/types/index.js
CHANGED
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./driver-location.entity"), exports);
|
|
18
18
|
__exportStar(require("./user.entity"), exports);
|
|
19
|
+
__exportStar(require("./realtime"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./driver-execute-trip-action"), exports);
|
|
18
|
+
__exportStar(require("./driver-status"), exports);
|