@dapex-tech/elite-online-services 0.0.22 → 0.0.23
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/createClient.d.ts +2 -0
- package/models/AdminRedisActiveTripResponseDto.d.ts +29 -0
- package/models/AdminRedisDeleteResponseDto.d.ts +3 -0
- package/models/AdminRedisDeleteResponseDto.js +2 -0
- package/models/AdminRedisRuntimeResetResponseDto.d.ts +8 -0
- package/models/AdminRedisRuntimeResetResponseDto.js +2 -0
- package/models/AdminSearchCustomersResponseDto.d.ts +6 -6
- package/models/AdminSearchManualCustomersBucketDto.d.ts +14 -0
- package/models/AdminSearchManualCustomersBucketDto.js +2 -0
- package/models/AdminSearchRegisteredCustomersBucketDto.d.ts +14 -0
- package/models/AdminSearchRegisteredCustomersBucketDto.js +2 -0
- package/models/AdminSearchVouchersBucketDto.d.ts +14 -0
- package/models/AdminSearchVouchersBucketDto.js +2 -0
- package/models/CustomerLoginDto.d.ts +1 -1
- package/models/DriverCreateDto.d.ts +4 -0
- package/models/DriverDto.d.ts +13 -0
- package/models/DriverLocationUpdateDto.d.ts +10 -0
- package/models/DriverLocationUpdateDto.js +2 -0
- package/models/DriverLoginDto.d.ts +9 -1
- package/models/DriverLoginResponseDto.d.ts +13 -0
- package/models/DriverStatusResponseDto.d.ts +10 -0
- package/models/DriverStatusResponseDto.js +2 -0
- package/models/DriverUpdateDto.d.ts +4 -0
- package/models/ManualCustomerCreateDto.d.ts +1 -1
- package/models/ManualCustomerDto.d.ts +1 -1
- package/models/ManualCustomerUpdateDto.d.ts +1 -1
- package/models/PaginatedTripsDto.d.ts +16 -0
- package/models/PaginatedTripsDto.js +2 -0
- package/models/QueueSummaryDto.d.ts +1 -1
- package/models/ResetPasswordDto.d.ts +4 -0
- package/models/SendDriverPushDto.d.ts +8 -0
- package/models/SendDriverPushDto.js +2 -0
- package/models/TripAssignDriverDto.d.ts +2 -2
- package/models/TripDto.d.ts +2 -4
- package/models/TripLanguages.d.ts +4 -0
- package/models/TripLanguages.js +12 -0
- package/models/TripUpdateDto.d.ts +63 -2
- package/models/index.d.ts +11 -1
- package/models/index.js +11 -1
- package/package.json +1 -1
- package/services/AdminAuthService.d.ts +1 -8
- package/services/AdminAuthService.js +1 -14
- package/services/AdminDispatchService.d.ts +27 -0
- package/services/AdminDispatchService.js +54 -0
- package/services/AdminDriversService.d.ts +18 -1
- package/services/AdminDriversService.js +35 -1
- package/services/AdminQueuesService.d.ts +2 -2
- package/services/AdminRedisService.d.ts +46 -0
- package/services/AdminRedisService.js +89 -0
- package/services/AdminService.d.ts +6 -4
- package/services/AdminService.js +8 -4
- package/services/AdminTripsService.d.ts +14 -3
- package/services/AdminTripsService.js +22 -3
- package/services/CustomerTripsService.d.ts +14 -3
- package/services/CustomerTripsService.js +22 -3
- package/services/CustomersAuthService.d.ts +1 -8
- package/services/CustomersAuthService.js +1 -14
- package/services/DriverAuthService.d.ts +1 -8
- package/services/DriverAuthService.js +1 -14
- package/services/DriverTripsService.d.ts +22 -3
- package/services/DriverTripsService.js +38 -3
- package/services/DriversService.d.ts +21 -0
- package/services/DriversService.js +35 -0
- package/services/MainService.d.ts +8 -0
- package/services/MainService.js +19 -0
- package/services/index.d.ts +2 -0
- package/services/index.js +2 -0
- package/types/realtime/active-trip.d.ts +3 -2
- package/models/ValidateResetCodeDto.d.ts +0 -14
- /package/models/{ValidateResetCodeDto.js → AdminRedisActiveTripResponseDto.js} +0 -0
|
@@ -5,7 +5,6 @@ import type { GenerateResetCodeDto } from '../models/GenerateResetCodeDto';
|
|
|
5
5
|
import type { MessageResponseDto } from '../models/MessageResponseDto';
|
|
6
6
|
import type { ResetPasswordDto } from '../models/ResetPasswordDto';
|
|
7
7
|
import type { TokensDto } from '../models/TokensDto';
|
|
8
|
-
import type { ValidateResetCodeDto } from '../models/ValidateResetCodeDto';
|
|
9
8
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
10
9
|
export declare class DriverAuthService {
|
|
11
10
|
/**
|
|
@@ -40,15 +39,9 @@ export declare class DriverAuthService {
|
|
|
40
39
|
* @throws ApiError
|
|
41
40
|
*/
|
|
42
41
|
static generateResetCode(requestBody: GenerateResetCodeDto): CancelablePromise<MessageResponseDto>;
|
|
43
|
-
/**
|
|
44
|
-
* Validate Password Reset Code
|
|
45
|
-
* @param requestBody
|
|
46
|
-
* @returns MessageResponseDto Reset code is valid
|
|
47
|
-
* @throws ApiError
|
|
48
|
-
*/
|
|
49
|
-
static validateResetCode(requestBody: ValidateResetCodeDto): CancelablePromise<MessageResponseDto>;
|
|
50
42
|
/**
|
|
51
43
|
* Reset Driver Password
|
|
44
|
+
* Requires the SMS reset code from forgot-password together with the new password.
|
|
52
45
|
* @param requestBody
|
|
53
46
|
* @returns MessageResponseDto Password reset successfully
|
|
54
47
|
* @throws ApiError
|
|
@@ -65,22 +65,9 @@ class DriverAuthService {
|
|
|
65
65
|
mediaType: 'application/json',
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Validate Password Reset Code
|
|
70
|
-
* @param requestBody
|
|
71
|
-
* @returns MessageResponseDto Reset code is valid
|
|
72
|
-
* @throws ApiError
|
|
73
|
-
*/
|
|
74
|
-
static validateResetCode(requestBody) {
|
|
75
|
-
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
76
|
-
method: 'POST',
|
|
77
|
-
url: '/auth/drivers/validate-reset-code',
|
|
78
|
-
body: requestBody,
|
|
79
|
-
mediaType: 'application/json',
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
68
|
/**
|
|
83
69
|
* Reset Driver Password
|
|
70
|
+
* Requires the SMS reset code from forgot-password together with the new password.
|
|
84
71
|
* @param requestBody
|
|
85
72
|
* @returns MessageResponseDto Password reset successfully
|
|
86
73
|
* @throws ApiError
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { DriverTripActions } from '../models/DriverTripActions';
|
|
2
2
|
import type { EstimateTripCostDto } from '../models/EstimateTripCostDto';
|
|
3
3
|
import type { OrderDto } from '../models/OrderDto';
|
|
4
|
+
import type { PaginatedTripsDto } from '../models/PaginatedTripsDto';
|
|
4
5
|
import type { TripDto } from '../models/TripDto';
|
|
6
|
+
import type { TripLocationPointDto } from '../models/TripLocationPointDto';
|
|
5
7
|
import type { TripUpdateDto } from '../models/TripUpdateDto';
|
|
6
8
|
import type { VoucherDriverCreateDto } from '../models/VoucherDriverCreateDto';
|
|
7
9
|
import type { VoucherDto } from '../models/VoucherDto';
|
|
@@ -15,15 +17,17 @@ export declare class DriverTripsService {
|
|
|
15
17
|
*/
|
|
16
18
|
static create(requestBody: TripDto): CancelablePromise<TripDto>;
|
|
17
19
|
/**
|
|
18
|
-
* Get
|
|
20
|
+
* Get trips for a driver (paginated)
|
|
21
|
+
* @param page Page number
|
|
22
|
+
* @param pageSize Items per page
|
|
19
23
|
* @param q Text to search for in trip fields
|
|
20
24
|
* @param order Sorting options
|
|
21
25
|
* @param customerId Filter by customer ID (scope to customer)
|
|
22
26
|
* @param driverId Filter by driver ID (scope to driver)
|
|
23
|
-
* @returns
|
|
27
|
+
* @returns PaginatedTripsDto Paginated list of trips
|
|
24
28
|
* @throws ApiError
|
|
25
29
|
*/
|
|
26
|
-
static findAll(q?: string, order?: OrderDto, customerId?: number, driverId?: number): CancelablePromise<
|
|
30
|
+
static findAll(page?: number, pageSize?: number, q?: string, order?: OrderDto, customerId?: number, driverId?: number): CancelablePromise<PaginatedTripsDto>;
|
|
27
31
|
/**
|
|
28
32
|
* Estimate trip cost by origin and destination
|
|
29
33
|
* @param requestBody
|
|
@@ -52,6 +56,13 @@ export declare class DriverTripsService {
|
|
|
52
56
|
* @throws ApiError
|
|
53
57
|
*/
|
|
54
58
|
static getActiveTrip(): CancelablePromise<TripDto>;
|
|
59
|
+
/**
|
|
60
|
+
* Get trip location points
|
|
61
|
+
* @param id
|
|
62
|
+
* @returns TripLocationPointDto List of trip location points
|
|
63
|
+
* @throws ApiError
|
|
64
|
+
*/
|
|
65
|
+
static getTripLocationPoints(id: number): CancelablePromise<Array<TripLocationPointDto>>;
|
|
55
66
|
/**
|
|
56
67
|
* Create voucher for trip (new senior not yet reported by city)
|
|
57
68
|
* @param id Trip ID
|
|
@@ -68,4 +79,12 @@ export declare class DriverTripsService {
|
|
|
68
79
|
* @throws ApiError
|
|
69
80
|
*/
|
|
70
81
|
static executeTripAction(id: number, action: DriverTripActions): CancelablePromise<TripDto>;
|
|
82
|
+
/**
|
|
83
|
+
* Send pickup notification (voice call + SMS) to the customer
|
|
84
|
+
* Trip must be in DRIVER_ONWAY or DRIVER_AT_PICKUP status. Message language is determined by the trip language setting.
|
|
85
|
+
* @param id Trip ID
|
|
86
|
+
* @returns any Notifications dispatched.
|
|
87
|
+
* @throws ApiError
|
|
88
|
+
*/
|
|
89
|
+
static sendPickupNotification(id: number): CancelablePromise<any>;
|
|
71
90
|
}
|
|
@@ -19,19 +19,23 @@ class DriverTripsService {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Get
|
|
22
|
+
* Get trips for a driver (paginated)
|
|
23
|
+
* @param page Page number
|
|
24
|
+
* @param pageSize Items per page
|
|
23
25
|
* @param q Text to search for in trip fields
|
|
24
26
|
* @param order Sorting options
|
|
25
27
|
* @param customerId Filter by customer ID (scope to customer)
|
|
26
28
|
* @param driverId Filter by driver ID (scope to driver)
|
|
27
|
-
* @returns
|
|
29
|
+
* @returns PaginatedTripsDto Paginated list of trips
|
|
28
30
|
* @throws ApiError
|
|
29
31
|
*/
|
|
30
|
-
static findAll(q, order, customerId, driverId) {
|
|
32
|
+
static findAll(page = 1, pageSize = 12, q, order, customerId, driverId) {
|
|
31
33
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
32
34
|
method: 'GET',
|
|
33
35
|
url: '/drivers/trips',
|
|
34
36
|
query: {
|
|
37
|
+
'page': page,
|
|
38
|
+
'pageSize': pageSize,
|
|
35
39
|
'q': q,
|
|
36
40
|
'order': order,
|
|
37
41
|
'customerId': customerId,
|
|
@@ -97,6 +101,21 @@ class DriverTripsService {
|
|
|
97
101
|
url: '/drivers/trips/active',
|
|
98
102
|
});
|
|
99
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Get trip location points
|
|
106
|
+
* @param id
|
|
107
|
+
* @returns TripLocationPointDto List of trip location points
|
|
108
|
+
* @throws ApiError
|
|
109
|
+
*/
|
|
110
|
+
static getTripLocationPoints(id) {
|
|
111
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
112
|
+
method: 'GET',
|
|
113
|
+
url: '/drivers/trips/{id}/location-points',
|
|
114
|
+
path: {
|
|
115
|
+
'id': id,
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
}
|
|
100
119
|
/**
|
|
101
120
|
* Create voucher for trip (new senior not yet reported by city)
|
|
102
121
|
* @param id Trip ID
|
|
@@ -132,5 +151,21 @@ class DriverTripsService {
|
|
|
132
151
|
},
|
|
133
152
|
});
|
|
134
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Send pickup notification (voice call + SMS) to the customer
|
|
156
|
+
* Trip must be in DRIVER_ONWAY or DRIVER_AT_PICKUP status. Message language is determined by the trip language setting.
|
|
157
|
+
* @param id Trip ID
|
|
158
|
+
* @returns any Notifications dispatched.
|
|
159
|
+
* @throws ApiError
|
|
160
|
+
*/
|
|
161
|
+
static sendPickupNotification(id) {
|
|
162
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
163
|
+
method: 'POST',
|
|
164
|
+
url: '/drivers/trips/{id}/send-pickup-notification',
|
|
165
|
+
path: {
|
|
166
|
+
'id': id,
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
}
|
|
135
170
|
}
|
|
136
171
|
exports.DriverTripsService = DriverTripsService;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import type { AdminSearchCustomersResponseDto } from '../models/AdminSearchCustomersResponseDto';
|
|
1
2
|
import type { DriverDto } from '../models/DriverDto';
|
|
3
|
+
import type { DriverLocationUpdateDto } from '../models/DriverLocationUpdateDto';
|
|
4
|
+
import type { DriverStatusResponseDto } from '../models/DriverStatusResponseDto';
|
|
2
5
|
import type { DriverUpdateDto } from '../models/DriverUpdateDto';
|
|
3
6
|
import type { MessageResponseDto } from '../models/MessageResponseDto';
|
|
7
|
+
import type { OrderDto } from '../models/OrderDto';
|
|
4
8
|
import type { SeniorCenterDto } from '../models/SeniorCenterDto';
|
|
5
9
|
import type { TwilioTokenResponse } from '../models/TwilioTokenResponse';
|
|
6
10
|
import type { UpdateFcmTokenDto } from '../models/UpdateFcmTokenDto';
|
|
@@ -56,4 +60,21 @@ export declare class DriversService {
|
|
|
56
60
|
* @throws ApiError
|
|
57
61
|
*/
|
|
58
62
|
static findAllSeniorCenters(): CancelablePromise<Array<SeniorCenterDto>>;
|
|
63
|
+
/**
|
|
64
|
+
* Search customers (registered + manual + vouchers), paginated per bucket
|
|
65
|
+
* @param page Page number
|
|
66
|
+
* @param pageSize Items per page
|
|
67
|
+
* @param q Text to search for in customers (registered customers + manual customers + vouchers)
|
|
68
|
+
* @param order Sorting options (each bucket uses its own table default when omitted)
|
|
69
|
+
* @returns AdminSearchCustomersResponseDto Each of registeredCustomers, vouchers, and manualCustomers includes page, pageSize, total, and items
|
|
70
|
+
* @throws ApiError
|
|
71
|
+
*/
|
|
72
|
+
static searchCustomers(page?: number, pageSize?: number, q?: string, order?: OrderDto): CancelablePromise<AdminSearchCustomersResponseDto>;
|
|
73
|
+
/**
|
|
74
|
+
* Update driver live location
|
|
75
|
+
* @param requestBody
|
|
76
|
+
* @returns DriverStatusResponseDto Updated driver status snapshot stored in Redis
|
|
77
|
+
* @throws ApiError
|
|
78
|
+
*/
|
|
79
|
+
static updateDriverLocation(requestBody: DriverLocationUpdateDto): CancelablePromise<DriverStatusResponseDto>;
|
|
59
80
|
}
|
|
@@ -102,5 +102,40 @@ class DriversService {
|
|
|
102
102
|
url: '/drivers/senior-centers',
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Search customers (registered + manual + vouchers), paginated per bucket
|
|
107
|
+
* @param page Page number
|
|
108
|
+
* @param pageSize Items per page
|
|
109
|
+
* @param q Text to search for in customers (registered customers + manual customers + vouchers)
|
|
110
|
+
* @param order Sorting options (each bucket uses its own table default when omitted)
|
|
111
|
+
* @returns AdminSearchCustomersResponseDto Each of registeredCustomers, vouchers, and manualCustomers includes page, pageSize, total, and items
|
|
112
|
+
* @throws ApiError
|
|
113
|
+
*/
|
|
114
|
+
static searchCustomers(page = 1, pageSize = 12, q, order) {
|
|
115
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
116
|
+
method: 'GET',
|
|
117
|
+
url: '/drivers/search-customers',
|
|
118
|
+
query: {
|
|
119
|
+
'page': page,
|
|
120
|
+
'pageSize': pageSize,
|
|
121
|
+
'q': q,
|
|
122
|
+
'order': order,
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Update driver live location
|
|
128
|
+
* @param requestBody
|
|
129
|
+
* @returns DriverStatusResponseDto Updated driver status snapshot stored in Redis
|
|
130
|
+
* @throws ApiError
|
|
131
|
+
*/
|
|
132
|
+
static updateDriverLocation(requestBody) {
|
|
133
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
134
|
+
method: 'PATCH',
|
|
135
|
+
url: '/drivers/status',
|
|
136
|
+
body: requestBody,
|
|
137
|
+
mediaType: 'application/json',
|
|
138
|
+
});
|
|
139
|
+
}
|
|
105
140
|
}
|
|
106
141
|
exports.DriversService = DriversService;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SendDriverPushDto } from '../models/SendDriverPushDto';
|
|
1
2
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
2
3
|
export declare class MainService {
|
|
3
4
|
/**
|
|
@@ -5,6 +6,13 @@ export declare class MainService {
|
|
|
5
6
|
* @throws ApiError
|
|
6
7
|
*/
|
|
7
8
|
static getHello(): CancelablePromise<any>;
|
|
9
|
+
/**
|
|
10
|
+
* Send a push notification to a driver
|
|
11
|
+
* @param requestBody
|
|
12
|
+
* @returns any Notification sent successfully.
|
|
13
|
+
* @throws ApiError
|
|
14
|
+
*/
|
|
15
|
+
static sendDriverPushNotification(requestBody: SendDriverPushDto): CancelablePromise<any>;
|
|
8
16
|
/**
|
|
9
17
|
* @returns any
|
|
10
18
|
* @throws ApiError
|
package/services/MainService.js
CHANGED
|
@@ -14,6 +14,25 @@ class MainService {
|
|
|
14
14
|
url: '/',
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Send a push notification to a driver
|
|
19
|
+
* @param requestBody
|
|
20
|
+
* @returns any Notification sent successfully.
|
|
21
|
+
* @throws ApiError
|
|
22
|
+
*/
|
|
23
|
+
static sendDriverPushNotification(requestBody) {
|
|
24
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
url: '/drivers/push-notification',
|
|
27
|
+
body: requestBody,
|
|
28
|
+
mediaType: 'application/json',
|
|
29
|
+
errors: {
|
|
30
|
+
400: `Driver has no FCM token.`,
|
|
31
|
+
404: `Driver not found.`,
|
|
32
|
+
500: `FCM send failed.`,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
}
|
|
17
36
|
/**
|
|
18
37
|
* @returns any
|
|
19
38
|
* @throws ApiError
|
package/services/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './AdminAuthService';
|
|
2
2
|
export * from './AdminCustomerService';
|
|
3
|
+
export * from './AdminDispatchService';
|
|
3
4
|
export * from './AdminDriversService';
|
|
4
5
|
export * from './AdminPaymentsService';
|
|
5
6
|
export * from './AdminQueuesService';
|
|
7
|
+
export * from './AdminRedisService';
|
|
6
8
|
export * from './AdminSectionContentService';
|
|
7
9
|
export * from './AdminService';
|
|
8
10
|
export * from './AdminSettingsService';
|
package/services/index.js
CHANGED
|
@@ -16,9 +16,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./AdminAuthService"), exports);
|
|
18
18
|
__exportStar(require("./AdminCustomerService"), exports);
|
|
19
|
+
__exportStar(require("./AdminDispatchService"), exports);
|
|
19
20
|
__exportStar(require("./AdminDriversService"), exports);
|
|
20
21
|
__exportStar(require("./AdminPaymentsService"), exports);
|
|
21
22
|
__exportStar(require("./AdminQueuesService"), exports);
|
|
23
|
+
__exportStar(require("./AdminRedisService"), exports);
|
|
22
24
|
__exportStar(require("./AdminSectionContentService"), exports);
|
|
23
25
|
__exportStar(require("./AdminService"), exports);
|
|
24
26
|
__exportStar(require("./AdminSettingsService"), exports);
|
|
@@ -12,8 +12,9 @@ export interface ActiveTrip {
|
|
|
12
12
|
paymentType?: PaymentTypes;
|
|
13
13
|
status: TripStatuses;
|
|
14
14
|
driverAssignmentMode?: DriverAssignmentModes;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
/** Live driver position on the trip; null until known (not defaulted to 0,0). */
|
|
16
|
+
currentLatitude: number | null;
|
|
17
|
+
currentLongitude: number | null;
|
|
17
18
|
lastUpdate?: Date;
|
|
18
19
|
deltaDistanceMeters?: number;
|
|
19
20
|
deltaTotalMilliseconds?: number;
|
|
File without changes
|