@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 AdminAuthService {
|
|
11
10
|
/**
|
|
@@ -40,15 +39,9 @@ export declare class AdminAuthService {
|
|
|
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 Admin 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 AdminAuthService {
|
|
|
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/admins/validate-reset-code',
|
|
78
|
-
body: requestBody,
|
|
79
|
-
mediaType: 'application/json',
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
68
|
/**
|
|
83
69
|
* Reset Admin 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
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
2
|
+
export declare class AdminDispatchService {
|
|
3
|
+
/**
|
|
4
|
+
* List auto-dispatch log files across all trips
|
|
5
|
+
* Returns every auto-dispatch log file found under LOGS_DIR/auto-dispatch/{tripId}/ folders.
|
|
6
|
+
* @returns any All auto-dispatch log files with their trip ids
|
|
7
|
+
* @throws ApiError
|
|
8
|
+
*/
|
|
9
|
+
static listAllAutoDispatchLogFiles(): CancelablePromise<any>;
|
|
10
|
+
/**
|
|
11
|
+
* List auto-dispatch log file names for a trip (newest day first)
|
|
12
|
+
* Files live under LOGS_DIR/auto-dispatch/{tripId}/ as trip{tripId}-YYYY-MM-DD.jsonl (e.g. trip99-2026-03-22.jsonl).
|
|
13
|
+
* @param tripId
|
|
14
|
+
* @returns any File names for that trip
|
|
15
|
+
* @throws ApiError
|
|
16
|
+
*/
|
|
17
|
+
static listAutoDispatchLogFiles(tripId: number): CancelablePromise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* Get parsed auto-dispatch log rows for a file
|
|
20
|
+
* fileName must match trip{tripId}-YYYY-MM-DD.jsonl for this trip (e.g. trip99-2026-03-22.jsonl).
|
|
21
|
+
* @param tripId
|
|
22
|
+
* @param fileName
|
|
23
|
+
* @returns any JSON array of log row objects
|
|
24
|
+
* @throws ApiError
|
|
25
|
+
*/
|
|
26
|
+
static getAutoDispatchLogFile(tripId: number, fileName: string): CancelablePromise<any>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminDispatchService = void 0;
|
|
4
|
+
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
|
+
const request_1 = require("../core/request");
|
|
6
|
+
class AdminDispatchService {
|
|
7
|
+
/**
|
|
8
|
+
* List auto-dispatch log files across all trips
|
|
9
|
+
* Returns every auto-dispatch log file found under LOGS_DIR/auto-dispatch/{tripId}/ folders.
|
|
10
|
+
* @returns any All auto-dispatch log files with their trip ids
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
static listAllAutoDispatchLogFiles() {
|
|
14
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
15
|
+
method: 'GET',
|
|
16
|
+
url: '/admins/dispatch/trips/log-files',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* List auto-dispatch log file names for a trip (newest day first)
|
|
21
|
+
* Files live under LOGS_DIR/auto-dispatch/{tripId}/ as trip{tripId}-YYYY-MM-DD.jsonl (e.g. trip99-2026-03-22.jsonl).
|
|
22
|
+
* @param tripId
|
|
23
|
+
* @returns any File names for that trip
|
|
24
|
+
* @throws ApiError
|
|
25
|
+
*/
|
|
26
|
+
static listAutoDispatchLogFiles(tripId) {
|
|
27
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
28
|
+
method: 'GET',
|
|
29
|
+
url: '/admins/dispatch/trips/{tripId}/log-files',
|
|
30
|
+
path: {
|
|
31
|
+
'tripId': tripId,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get parsed auto-dispatch log rows for a file
|
|
37
|
+
* fileName must match trip{tripId}-YYYY-MM-DD.jsonl for this trip (e.g. trip99-2026-03-22.jsonl).
|
|
38
|
+
* @param tripId
|
|
39
|
+
* @param fileName
|
|
40
|
+
* @returns any JSON array of log row objects
|
|
41
|
+
* @throws ApiError
|
|
42
|
+
*/
|
|
43
|
+
static getAutoDispatchLogFile(tripId, fileName) {
|
|
44
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
45
|
+
method: 'GET',
|
|
46
|
+
url: '/admins/dispatch/trips/{tripId}/log-files/{fileName}',
|
|
47
|
+
path: {
|
|
48
|
+
'tripId': tripId,
|
|
49
|
+
'fileName': fileName,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.AdminDispatchService = AdminDispatchService;
|
|
@@ -5,7 +5,7 @@ import type { CancelablePromise } from '../core/CancelablePromise';
|
|
|
5
5
|
export declare class AdminDriversService {
|
|
6
6
|
/**
|
|
7
7
|
* Sync all drivers with location to Redis GEO index
|
|
8
|
-
* Reads driver statuses from Redis (
|
|
8
|
+
* Reads driver statuses from Redis (EOS:DriversStatus hash), and adds every driver that has latitude/longitude to the EOS:DriversGeo sorted set for dispatch radius queries.
|
|
9
9
|
* @returns any Number of drivers added to Redis GEO index.
|
|
10
10
|
* @throws ApiError
|
|
11
11
|
*/
|
|
@@ -35,6 +35,23 @@ export declare class AdminDriversService {
|
|
|
35
35
|
* @throws ApiError
|
|
36
36
|
*/
|
|
37
37
|
static findAll(q?: 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>;
|
|
38
|
+
/**
|
|
39
|
+
* List driver location log file names for a driver (newest day first)
|
|
40
|
+
* Files live under LOGS_DIR/driver-location/{driverId}/ as driver{driverId}-YYYY-MM-DD.jsonl (e.g. driver42-2026-03-22.jsonl).
|
|
41
|
+
* @param driverId
|
|
42
|
+
* @returns any File names for that driver
|
|
43
|
+
* @throws ApiError
|
|
44
|
+
*/
|
|
45
|
+
static listDriverLocationLogFiles(driverId: number): CancelablePromise<any>;
|
|
46
|
+
/**
|
|
47
|
+
* Get parsed driver location log rows for a file
|
|
48
|
+
* fileName must match driver{driverId}-YYYY-MM-DD.jsonl for this driver (e.g. driver42-2026-03-22.jsonl).
|
|
49
|
+
* @param driverId
|
|
50
|
+
* @param fileName
|
|
51
|
+
* @returns any JSON array of log row objects
|
|
52
|
+
* @throws ApiError
|
|
53
|
+
*/
|
|
54
|
+
static getDriverLocationLogFile(driverId: number, fileName: string): CancelablePromise<any>;
|
|
38
55
|
/**
|
|
39
56
|
* Get a single driver by ID
|
|
40
57
|
* @param id
|
|
@@ -6,7 +6,7 @@ const request_1 = require("../core/request");
|
|
|
6
6
|
class AdminDriversService {
|
|
7
7
|
/**
|
|
8
8
|
* Sync all drivers with location to Redis GEO index
|
|
9
|
-
* Reads driver statuses from Redis (
|
|
9
|
+
* Reads driver statuses from Redis (EOS:DriversStatus hash), and adds every driver that has latitude/longitude to the EOS:DriversGeo sorted set for dispatch radius queries.
|
|
10
10
|
* @returns any Number of drivers added to Redis GEO index.
|
|
11
11
|
* @throws ApiError
|
|
12
12
|
*/
|
|
@@ -67,6 +67,40 @@ class AdminDriversService {
|
|
|
67
67
|
},
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* List driver location log file names for a driver (newest day first)
|
|
72
|
+
* Files live under LOGS_DIR/driver-location/{driverId}/ as driver{driverId}-YYYY-MM-DD.jsonl (e.g. driver42-2026-03-22.jsonl).
|
|
73
|
+
* @param driverId
|
|
74
|
+
* @returns any File names for that driver
|
|
75
|
+
* @throws ApiError
|
|
76
|
+
*/
|
|
77
|
+
static listDriverLocationLogFiles(driverId) {
|
|
78
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
79
|
+
method: 'GET',
|
|
80
|
+
url: '/admins/drivers/{driverId}/location-log-files',
|
|
81
|
+
path: {
|
|
82
|
+
'driverId': driverId,
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Get parsed driver location log rows for a file
|
|
88
|
+
* fileName must match driver{driverId}-YYYY-MM-DD.jsonl for this driver (e.g. driver42-2026-03-22.jsonl).
|
|
89
|
+
* @param driverId
|
|
90
|
+
* @param fileName
|
|
91
|
+
* @returns any JSON array of log row objects
|
|
92
|
+
* @throws ApiError
|
|
93
|
+
*/
|
|
94
|
+
static getDriverLocationLogFile(driverId, fileName) {
|
|
95
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
96
|
+
method: 'GET',
|
|
97
|
+
url: '/admins/drivers/{driverId}/location-log-files/{fileName}',
|
|
98
|
+
path: {
|
|
99
|
+
'driverId': driverId,
|
|
100
|
+
'fileName': fileName,
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
}
|
|
70
104
|
/**
|
|
71
105
|
* Get a single driver by ID
|
|
72
106
|
* @param id
|
|
@@ -18,7 +18,7 @@ export declare class AdminQueuesService {
|
|
|
18
18
|
* @returns JobsListResponseDto List of jobs in the queue
|
|
19
19
|
* @throws ApiError
|
|
20
20
|
*/
|
|
21
|
-
static getJobs(queueName: 'dispatch-queue' | 'trip-queue', start?: number, end?: number, state?: Array<'waiting' | 'active' | 'completed' | 'failed' | 'delayed' | 'paused'>): CancelablePromise<JobsListResponseDto>;
|
|
21
|
+
static getJobs(queueName: 'EOS-dispatch-queue' | 'EOS-trip-queue', start?: number, end?: number, state?: Array<'waiting' | 'active' | 'completed' | 'failed' | 'delayed' | 'paused'>): CancelablePromise<JobsListResponseDto>;
|
|
22
22
|
/**
|
|
23
23
|
* Get a single BullMQ job by ID
|
|
24
24
|
* @param queueName Queue name
|
|
@@ -26,5 +26,5 @@ export declare class AdminQueuesService {
|
|
|
26
26
|
* @returns JobSummaryDto Job details
|
|
27
27
|
* @throws ApiError
|
|
28
28
|
*/
|
|
29
|
-
static getJob(queueName: 'dispatch-queue' | 'trip-queue', jobId: string): CancelablePromise<JobSummaryDto>;
|
|
29
|
+
static getJob(queueName: 'EOS-dispatch-queue' | 'EOS-trip-queue', jobId: string): CancelablePromise<JobSummaryDto>;
|
|
30
30
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { AdminRedisActiveTripResponseDto } from '../models/AdminRedisActiveTripResponseDto';
|
|
2
|
+
import type { AdminRedisDeleteResponseDto } from '../models/AdminRedisDeleteResponseDto';
|
|
3
|
+
import type { AdminRedisRuntimeResetResponseDto } from '../models/AdminRedisRuntimeResetResponseDto';
|
|
4
|
+
import type { DriverStatusResponseDto } from '../models/DriverStatusResponseDto';
|
|
5
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
6
|
+
export declare class AdminRedisService {
|
|
7
|
+
/**
|
|
8
|
+
* Get active drivers from Redis state
|
|
9
|
+
* @returns DriverStatusResponseDto List of active drivers in Redis
|
|
10
|
+
* @throws ApiError
|
|
11
|
+
*/
|
|
12
|
+
static getActiveDrivers(): CancelablePromise<Array<DriverStatusResponseDto>>;
|
|
13
|
+
/**
|
|
14
|
+
* Get active trips from Redis state
|
|
15
|
+
* @returns AdminRedisActiveTripResponseDto List of active trips in Redis
|
|
16
|
+
* @throws ApiError
|
|
17
|
+
*/
|
|
18
|
+
static getActiveTrips(): CancelablePromise<Array<AdminRedisActiveTripResponseDto>>;
|
|
19
|
+
/**
|
|
20
|
+
* Get active trip for a driver from Redis state
|
|
21
|
+
* @param driverId
|
|
22
|
+
* @returns AdminRedisActiveTripResponseDto Active trip found in Redis
|
|
23
|
+
* @throws ApiError
|
|
24
|
+
*/
|
|
25
|
+
static getActiveTripByDriverId(driverId: number): CancelablePromise<AdminRedisActiveTripResponseDto>;
|
|
26
|
+
/**
|
|
27
|
+
* Clear runtime Redis state for restart
|
|
28
|
+
* @returns AdminRedisRuntimeResetResponseDto Counts of deleted runtime Redis keys and collections
|
|
29
|
+
* @throws ApiError
|
|
30
|
+
*/
|
|
31
|
+
static clearRuntimeState(): CancelablePromise<AdminRedisRuntimeResetResponseDto>;
|
|
32
|
+
/**
|
|
33
|
+
* Delete active driver from Redis state
|
|
34
|
+
* @param driverId
|
|
35
|
+
* @returns AdminRedisDeleteResponseDto Driver Redis state deleted
|
|
36
|
+
* @throws ApiError
|
|
37
|
+
*/
|
|
38
|
+
static deleteActiveDriver(driverId: number): CancelablePromise<AdminRedisDeleteResponseDto>;
|
|
39
|
+
/**
|
|
40
|
+
* Delete active trip from Redis state
|
|
41
|
+
* @param tripId
|
|
42
|
+
* @returns AdminRedisDeleteResponseDto Trip Redis state deleted
|
|
43
|
+
* @throws ApiError
|
|
44
|
+
*/
|
|
45
|
+
static deleteActiveTrip(tripId: number): CancelablePromise<AdminRedisDeleteResponseDto>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminRedisService = void 0;
|
|
4
|
+
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
|
+
const request_1 = require("../core/request");
|
|
6
|
+
class AdminRedisService {
|
|
7
|
+
/**
|
|
8
|
+
* Get active drivers from Redis state
|
|
9
|
+
* @returns DriverStatusResponseDto List of active drivers in Redis
|
|
10
|
+
* @throws ApiError
|
|
11
|
+
*/
|
|
12
|
+
static getActiveDrivers() {
|
|
13
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
14
|
+
method: 'GET',
|
|
15
|
+
url: '/admins/redis/active-drivers',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Get active trips from Redis state
|
|
20
|
+
* @returns AdminRedisActiveTripResponseDto List of active trips in Redis
|
|
21
|
+
* @throws ApiError
|
|
22
|
+
*/
|
|
23
|
+
static getActiveTrips() {
|
|
24
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
25
|
+
method: 'GET',
|
|
26
|
+
url: '/admins/redis/active-trips',
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get active trip for a driver from Redis state
|
|
31
|
+
* @param driverId
|
|
32
|
+
* @returns AdminRedisActiveTripResponseDto Active trip found in Redis
|
|
33
|
+
* @throws ApiError
|
|
34
|
+
*/
|
|
35
|
+
static getActiveTripByDriverId(driverId) {
|
|
36
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
37
|
+
method: 'GET',
|
|
38
|
+
url: '/admins/redis/active-trips/driver/{driverId}',
|
|
39
|
+
path: {
|
|
40
|
+
'driverId': driverId,
|
|
41
|
+
},
|
|
42
|
+
errors: {
|
|
43
|
+
404: `No active trip found for driver in Redis`,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Clear runtime Redis state for restart
|
|
49
|
+
* @returns AdminRedisRuntimeResetResponseDto Counts of deleted runtime Redis keys and collections
|
|
50
|
+
* @throws ApiError
|
|
51
|
+
*/
|
|
52
|
+
static clearRuntimeState() {
|
|
53
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
54
|
+
method: 'DELETE',
|
|
55
|
+
url: '/admins/redis/reset',
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Delete active driver from Redis state
|
|
60
|
+
* @param driverId
|
|
61
|
+
* @returns AdminRedisDeleteResponseDto Driver Redis state deleted
|
|
62
|
+
* @throws ApiError
|
|
63
|
+
*/
|
|
64
|
+
static deleteActiveDriver(driverId) {
|
|
65
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
66
|
+
method: 'DELETE',
|
|
67
|
+
url: '/admins/redis/active-drivers/{driverId}',
|
|
68
|
+
path: {
|
|
69
|
+
'driverId': driverId,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Delete active trip from Redis state
|
|
75
|
+
* @param tripId
|
|
76
|
+
* @returns AdminRedisDeleteResponseDto Trip Redis state deleted
|
|
77
|
+
* @throws ApiError
|
|
78
|
+
*/
|
|
79
|
+
static deleteActiveTrip(tripId) {
|
|
80
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
81
|
+
method: 'DELETE',
|
|
82
|
+
url: '/admins/redis/active-trips/{tripId}',
|
|
83
|
+
path: {
|
|
84
|
+
'tripId': tripId,
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.AdminRedisService = AdminRedisService;
|
|
@@ -36,13 +36,15 @@ export declare class AdminService {
|
|
|
36
36
|
*/
|
|
37
37
|
static findAll(q?: string, order?: OrderDto): CancelablePromise<Array<AdminDto>>;
|
|
38
38
|
/**
|
|
39
|
-
* Search customers (registered
|
|
39
|
+
* Search customers (registered + manual + vouchers), paginated per bucket
|
|
40
|
+
* @param page Page number
|
|
41
|
+
* @param pageSize Items per page
|
|
40
42
|
* @param q Text to search for in customers (registered customers + manual customers + vouchers)
|
|
41
|
-
* @param order Sorting options (
|
|
42
|
-
* @returns AdminSearchCustomersResponseDto
|
|
43
|
+
* @param order Sorting options (each bucket uses its own table default when omitted)
|
|
44
|
+
* @returns AdminSearchCustomersResponseDto Each of registeredCustomers, vouchers, and manualCustomers includes page, pageSize, total, and items
|
|
43
45
|
* @throws ApiError
|
|
44
46
|
*/
|
|
45
|
-
static searchCustomers(q?: string, order?: OrderDto): CancelablePromise<AdminSearchCustomersResponseDto>;
|
|
47
|
+
static searchCustomers(page?: number, pageSize?: number, q?: string, order?: OrderDto): CancelablePromise<AdminSearchCustomersResponseDto>;
|
|
46
48
|
/**
|
|
47
49
|
* Get a single admin by ID
|
|
48
50
|
* @param id
|
package/services/AdminService.js
CHANGED
|
@@ -58,17 +58,21 @@ class AdminService {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* Search customers (registered
|
|
61
|
+
* Search customers (registered + manual + vouchers), paginated per bucket
|
|
62
|
+
* @param page Page number
|
|
63
|
+
* @param pageSize Items per page
|
|
62
64
|
* @param q Text to search for in customers (registered customers + manual customers + vouchers)
|
|
63
|
-
* @param order Sorting options (
|
|
64
|
-
* @returns AdminSearchCustomersResponseDto
|
|
65
|
+
* @param order Sorting options (each bucket uses its own table default when omitted)
|
|
66
|
+
* @returns AdminSearchCustomersResponseDto Each of registeredCustomers, vouchers, and manualCustomers includes page, pageSize, total, and items
|
|
65
67
|
* @throws ApiError
|
|
66
68
|
*/
|
|
67
|
-
static searchCustomers(q, order) {
|
|
69
|
+
static searchCustomers(page = 1, pageSize = 12, q, order) {
|
|
68
70
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
69
71
|
method: 'GET',
|
|
70
72
|
url: '/admins/search-customers',
|
|
71
73
|
query: {
|
|
74
|
+
'page': page,
|
|
75
|
+
'pageSize': pageSize,
|
|
72
76
|
'q': q,
|
|
73
77
|
'order': order,
|
|
74
78
|
},
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import type { EstimateTripCostDto } from '../models/EstimateTripCostDto';
|
|
2
2
|
import type { OrderDto } from '../models/OrderDto';
|
|
3
|
+
import type { PaginatedTripsDto } from '../models/PaginatedTripsDto';
|
|
3
4
|
import type { TripAssignDriverDto } from '../models/TripAssignDriverDto';
|
|
4
5
|
import type { TripDto } from '../models/TripDto';
|
|
6
|
+
import type { TripLocationPointDto } from '../models/TripLocationPointDto';
|
|
5
7
|
import type { TripStatuses } from '../models/TripStatuses';
|
|
6
8
|
import type { TripUpdateDriverAssignmentModeDto } from '../models/TripUpdateDriverAssignmentModeDto';
|
|
7
9
|
import type { TripUpdateDto } from '../models/TripUpdateDto';
|
|
8
10
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
9
11
|
export declare class AdminTripsService {
|
|
10
12
|
/**
|
|
11
|
-
* Get
|
|
13
|
+
* Get trips (paginated)
|
|
14
|
+
* @param page Page number
|
|
15
|
+
* @param pageSize Items per page
|
|
12
16
|
* @param q Text to search for in trip fields
|
|
13
17
|
* @param order Sorting options
|
|
14
18
|
* @param customerId Filter by customer ID (scope to customer)
|
|
15
19
|
* @param driverId Filter by driver ID (scope to driver)
|
|
16
|
-
* @returns
|
|
20
|
+
* @returns PaginatedTripsDto Paginated list of trips
|
|
17
21
|
* @throws ApiError
|
|
18
22
|
*/
|
|
19
|
-
static findAll(q?: string, order?: OrderDto, customerId?: number, driverId?: number): CancelablePromise<
|
|
23
|
+
static findAll(page?: number, pageSize?: number, q?: string, order?: OrderDto, customerId?: number, driverId?: number): CancelablePromise<PaginatedTripsDto>;
|
|
20
24
|
/**
|
|
21
25
|
* Create a new trip/service order
|
|
22
26
|
* @param requestBody
|
|
@@ -24,6 +28,13 @@ export declare class AdminTripsService {
|
|
|
24
28
|
* @throws ApiError
|
|
25
29
|
*/
|
|
26
30
|
static create(requestBody: TripDto): CancelablePromise<TripDto>;
|
|
31
|
+
/**
|
|
32
|
+
* Get trip location points
|
|
33
|
+
* @param id
|
|
34
|
+
* @returns TripLocationPointDto List of trip location points
|
|
35
|
+
* @throws ApiError
|
|
36
|
+
*/
|
|
37
|
+
static getTripLocationPoints(id: number): CancelablePromise<Array<TripLocationPointDto>>;
|
|
27
38
|
/**
|
|
28
39
|
* Estimate trip cost by origin and destination
|
|
29
40
|
* @param requestBody
|
|
@@ -5,19 +5,23 @@ const OpenAPI_1 = require("../core/OpenAPI");
|
|
|
5
5
|
const request_1 = require("../core/request");
|
|
6
6
|
class AdminTripsService {
|
|
7
7
|
/**
|
|
8
|
-
* Get
|
|
8
|
+
* Get trips (paginated)
|
|
9
|
+
* @param page Page number
|
|
10
|
+
* @param pageSize Items per page
|
|
9
11
|
* @param q Text to search for in trip fields
|
|
10
12
|
* @param order Sorting options
|
|
11
13
|
* @param customerId Filter by customer ID (scope to customer)
|
|
12
14
|
* @param driverId Filter by driver ID (scope to driver)
|
|
13
|
-
* @returns
|
|
15
|
+
* @returns PaginatedTripsDto Paginated list of trips
|
|
14
16
|
* @throws ApiError
|
|
15
17
|
*/
|
|
16
|
-
static findAll(q, order, customerId, driverId) {
|
|
18
|
+
static findAll(page = 1, pageSize = 12, q, order, customerId, driverId) {
|
|
17
19
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
18
20
|
method: 'GET',
|
|
19
21
|
url: '/admins/trips',
|
|
20
22
|
query: {
|
|
23
|
+
'page': page,
|
|
24
|
+
'pageSize': pageSize,
|
|
21
25
|
'q': q,
|
|
22
26
|
'order': order,
|
|
23
27
|
'customerId': customerId,
|
|
@@ -39,6 +43,21 @@ class AdminTripsService {
|
|
|
39
43
|
mediaType: 'application/json',
|
|
40
44
|
});
|
|
41
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Get trip location points
|
|
48
|
+
* @param id
|
|
49
|
+
* @returns TripLocationPointDto List of trip location points
|
|
50
|
+
* @throws ApiError
|
|
51
|
+
*/
|
|
52
|
+
static getTripLocationPoints(id) {
|
|
53
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
54
|
+
method: 'GET',
|
|
55
|
+
url: '/admins/trips/{id}/location-points',
|
|
56
|
+
path: {
|
|
57
|
+
'id': id,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
}
|
|
42
61
|
/**
|
|
43
62
|
* Estimate trip cost by origin and destination
|
|
44
63
|
* @param requestBody
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { CustomerTripActions } from '../models/CustomerTripActions';
|
|
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 { TripUpdateTripsStatusDto } from '../models/TripUpdateTripsStatusDto';
|
|
7
9
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
@@ -14,15 +16,17 @@ export declare class CustomerTripsService {
|
|
|
14
16
|
*/
|
|
15
17
|
static create(requestBody: TripDto): CancelablePromise<TripDto>;
|
|
16
18
|
/**
|
|
17
|
-
* Get
|
|
19
|
+
* Get trips for a customer (paginated)
|
|
20
|
+
* @param page Page number
|
|
21
|
+
* @param pageSize Items per page
|
|
18
22
|
* @param q Text to search for in trip fields
|
|
19
23
|
* @param order Sorting options
|
|
20
24
|
* @param customerId Filter by customer ID (scope to customer)
|
|
21
25
|
* @param driverId Filter by driver ID (scope to driver)
|
|
22
|
-
* @returns
|
|
26
|
+
* @returns PaginatedTripsDto Paginated list of trips
|
|
23
27
|
* @throws ApiError
|
|
24
28
|
*/
|
|
25
|
-
static findAll(q?: string, order?: OrderDto, customerId?: number, driverId?: number): CancelablePromise<
|
|
29
|
+
static findAll(page?: number, pageSize?: number, q?: string, order?: OrderDto, customerId?: number, driverId?: number): CancelablePromise<PaginatedTripsDto>;
|
|
26
30
|
/**
|
|
27
31
|
* Estimate trip cost by origin and destination
|
|
28
32
|
* @param requestBody
|
|
@@ -36,6 +40,13 @@ export declare class CustomerTripsService {
|
|
|
36
40
|
* @throws ApiError
|
|
37
41
|
*/
|
|
38
42
|
static getActiveTrip(): CancelablePromise<TripDto>;
|
|
43
|
+
/**
|
|
44
|
+
* Get trip location points
|
|
45
|
+
* @param id
|
|
46
|
+
* @returns TripLocationPointDto List of trip location points
|
|
47
|
+
* @throws ApiError
|
|
48
|
+
*/
|
|
49
|
+
static getTripLocationPoints(id: number): CancelablePromise<Array<TripLocationPointDto>>;
|
|
39
50
|
/**
|
|
40
51
|
* Get a single trip by ID
|
|
41
52
|
* @param id
|
|
@@ -19,19 +19,23 @@ class CustomerTripsService {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Get
|
|
22
|
+
* Get trips for a customer (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: '/customers/trips',
|
|
34
36
|
query: {
|
|
37
|
+
'page': page,
|
|
38
|
+
'pageSize': pageSize,
|
|
35
39
|
'q': q,
|
|
36
40
|
'order': order,
|
|
37
41
|
'customerId': customerId,
|
|
@@ -64,6 +68,21 @@ class CustomerTripsService {
|
|
|
64
68
|
url: '/customers/trips/active',
|
|
65
69
|
});
|
|
66
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Get trip location points
|
|
73
|
+
* @param id
|
|
74
|
+
* @returns TripLocationPointDto List of trip location points
|
|
75
|
+
* @throws ApiError
|
|
76
|
+
*/
|
|
77
|
+
static getTripLocationPoints(id) {
|
|
78
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
79
|
+
method: 'GET',
|
|
80
|
+
url: '/customers/trips/{id}/location-points',
|
|
81
|
+
path: {
|
|
82
|
+
'id': id,
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
}
|
|
67
86
|
/**
|
|
68
87
|
* Get a single trip by ID
|
|
69
88
|
* @param id
|
|
@@ -9,7 +9,6 @@ import type { GenerateVerificationCodeDto } from '../models/GenerateVerification
|
|
|
9
9
|
import type { MessageResponseDto } from '../models/MessageResponseDto';
|
|
10
10
|
import type { ResetPasswordDto } from '../models/ResetPasswordDto';
|
|
11
11
|
import type { TokensDto } from '../models/TokensDto';
|
|
12
|
-
import type { ValidateResetCodeDto } from '../models/ValidateResetCodeDto';
|
|
13
12
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
14
13
|
export declare class CustomersAuthService {
|
|
15
14
|
/**
|
|
@@ -59,15 +58,9 @@ export declare class CustomersAuthService {
|
|
|
59
58
|
* @throws ApiError
|
|
60
59
|
*/
|
|
61
60
|
static generateResetCode(requestBody: GenerateResetCodeDto): CancelablePromise<MessageResponseDto>;
|
|
62
|
-
/**
|
|
63
|
-
* Validate Password Reset Code
|
|
64
|
-
* @param requestBody
|
|
65
|
-
* @returns MessageResponseDto Reset code is valid
|
|
66
|
-
* @throws ApiError
|
|
67
|
-
*/
|
|
68
|
-
static validateResetCode(requestBody: ValidateResetCodeDto): CancelablePromise<MessageResponseDto>;
|
|
69
61
|
/**
|
|
70
62
|
* Reset Customer Password
|
|
63
|
+
* Requires the SMS reset code from forgot-password together with the new password.
|
|
71
64
|
* @param requestBody
|
|
72
65
|
* @returns MessageResponseDto Password reset successfully
|
|
73
66
|
* @throws ApiError
|
|
@@ -94,22 +94,9 @@ class CustomersAuthService {
|
|
|
94
94
|
mediaType: 'application/json',
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
/**
|
|
98
|
-
* Validate Password Reset Code
|
|
99
|
-
* @param requestBody
|
|
100
|
-
* @returns MessageResponseDto Reset code is valid
|
|
101
|
-
* @throws ApiError
|
|
102
|
-
*/
|
|
103
|
-
static validateResetCode(requestBody) {
|
|
104
|
-
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
105
|
-
method: 'POST',
|
|
106
|
-
url: '/auth/customers/validate-reset-code',
|
|
107
|
-
body: requestBody,
|
|
108
|
-
mediaType: 'application/json',
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
97
|
/**
|
|
112
98
|
* Reset Customer Password
|
|
99
|
+
* Requires the SMS reset code from forgot-password together with the new password.
|
|
113
100
|
* @param requestBody
|
|
114
101
|
* @returns MessageResponseDto Password reset successfully
|
|
115
102
|
* @throws ApiError
|