@dapex-tech/elite-online-services 0.0.13 → 0.0.15
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 +1 -0
- package/models/CustomerDto.d.ts +4 -0
- package/models/CustomerLoginDto.d.ts +2 -2
- package/models/CustomerLoginResponseDto.d.ts +4 -0
- package/models/CustomerTripActions.d.ts +3 -0
- package/models/CustomerTripActions.js +11 -0
- package/models/TripDto.d.ts +59 -6
- package/models/TripDto.js +20 -0
- package/models/TripStatuses.d.ts +15 -0
- package/models/TripStatuses.js +23 -0
- package/models/TripUpdateTripsStatusDto.d.ts +21 -1
- package/models/TripUpdateTripsStatusDto.js +23 -0
- package/models/VoucherCreateDto.d.ts +54 -0
- package/models/VoucherCreateDto.js +2 -0
- package/models/VoucherDto.d.ts +62 -0
- package/models/VoucherDto.js +2 -0
- package/models/VoucherUpdateDto.d.ts +54 -0
- package/models/VoucherUpdateDto.js +2 -0
- package/models/index.d.ts +5 -0
- package/models/index.js +5 -0
- package/package.json +1 -1
- package/services/AdminCustomerService.d.ts +2 -2
- package/services/AdminCustomerService.js +3 -3
- package/services/AdminDriversService.d.ts +2 -2
- package/services/AdminDriversService.js +3 -3
- package/services/AdminService.d.ts +2 -2
- package/services/AdminService.js +3 -3
- package/services/AdminTripsService.d.ts +10 -4
- package/services/AdminTripsService.js +13 -5
- package/services/CustomerTripsService.d.ts +10 -4
- package/services/CustomerTripsService.js +13 -5
- package/services/DriverTripsService.d.ts +6 -2
- package/services/DriverTripsService.js +9 -3
- package/services/VoucherService.d.ts +61 -0
- package/services/VoucherService.js +116 -0
- package/services/index.d.ts +1 -0
- package/services/index.js +1 -0
- package/socketService.d.ts +6 -4
- package/socketService.js +6 -3
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/types/realtime/active-trip.d.ts +26 -0
- package/types/realtime/active-trip.js +2 -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 +9 -0
- package/types/realtime/driver-status.js +2 -0
- package/types/realtime/index.d.ts +3 -0
- package/types/realtime/index.js +19 -0
package/createClient.d.ts
CHANGED
package/models/CustomerDto.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export type CustomerLoginDto = {
|
|
|
2
2
|
/**
|
|
3
3
|
* Email must be valid
|
|
4
4
|
*/
|
|
5
|
-
email
|
|
5
|
+
email?: string;
|
|
6
6
|
/**
|
|
7
7
|
* Phone must be valid
|
|
8
8
|
*/
|
|
@@ -10,7 +10,7 @@ export type CustomerLoginDto = {
|
|
|
10
10
|
/**
|
|
11
11
|
* Phone country code
|
|
12
12
|
*/
|
|
13
|
-
phoneCountryCode
|
|
13
|
+
phoneCountryCode?: string;
|
|
14
14
|
/**
|
|
15
15
|
* Customer's Password, must be at least 6 characters long
|
|
16
16
|
*/
|
|
@@ -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/TripDto.d.ts
CHANGED
|
@@ -7,17 +7,17 @@ export type TripDto = {
|
|
|
7
7
|
/**
|
|
8
8
|
* Trip ID
|
|
9
9
|
*/
|
|
10
|
-
id
|
|
10
|
+
id?: number;
|
|
11
11
|
driverId?: Record<string, any> | null;
|
|
12
12
|
customerId?: Record<string, any> | null;
|
|
13
13
|
adminId?: Record<string, any> | null;
|
|
14
|
-
status
|
|
15
|
-
tripSource
|
|
16
|
-
driverAssignmentMode
|
|
14
|
+
status?: TripDto.status;
|
|
15
|
+
tripSource?: Record<string, any>;
|
|
16
|
+
driverAssignmentMode?: Record<string, any>;
|
|
17
17
|
/**
|
|
18
18
|
* Origin location type
|
|
19
19
|
*/
|
|
20
|
-
originLocationType
|
|
20
|
+
originLocationType?: number;
|
|
21
21
|
/**
|
|
22
22
|
* Origin latitude
|
|
23
23
|
*/
|
|
@@ -37,7 +37,7 @@ export type TripDto = {
|
|
|
37
37
|
/**
|
|
38
38
|
* Destination location type
|
|
39
39
|
*/
|
|
40
|
-
destinationLocationType
|
|
40
|
+
destinationLocationType?: number;
|
|
41
41
|
/**
|
|
42
42
|
* Destination latitude
|
|
43
43
|
*/
|
|
@@ -78,6 +78,42 @@ export type TripDto = {
|
|
|
78
78
|
* Customer phone
|
|
79
79
|
*/
|
|
80
80
|
customerPhone?: Record<string, any> | null;
|
|
81
|
+
/**
|
|
82
|
+
* Distance Meters
|
|
83
|
+
*/
|
|
84
|
+
distanceMeters?: Record<string, any> | null;
|
|
85
|
+
/**
|
|
86
|
+
* Total Milliseconds
|
|
87
|
+
*/
|
|
88
|
+
totalMilliseconds?: Record<string, any> | null;
|
|
89
|
+
/**
|
|
90
|
+
* Driving Milliseconds
|
|
91
|
+
*/
|
|
92
|
+
drivingMilliseconds?: Record<string, any> | null;
|
|
93
|
+
/**
|
|
94
|
+
* Paused Milliseconds
|
|
95
|
+
*/
|
|
96
|
+
pausedMilliseconds?: Record<string, any> | null;
|
|
97
|
+
/**
|
|
98
|
+
* Paused Traffic Milliseconds
|
|
99
|
+
*/
|
|
100
|
+
pausedTrafficMilliseconds?: Record<string, any> | null;
|
|
101
|
+
/**
|
|
102
|
+
* Pickup cost
|
|
103
|
+
*/
|
|
104
|
+
pickupCost?: Record<string, any> | null;
|
|
105
|
+
/**
|
|
106
|
+
* Distance cost
|
|
107
|
+
*/
|
|
108
|
+
distanceCost?: Record<string, any> | null;
|
|
109
|
+
/**
|
|
110
|
+
* Waiting cost
|
|
111
|
+
*/
|
|
112
|
+
waitingCost?: Record<string, any> | null;
|
|
113
|
+
/**
|
|
114
|
+
* Traffic delay cost
|
|
115
|
+
*/
|
|
116
|
+
trafficDelayCost?: Record<string, any> | null;
|
|
81
117
|
/**
|
|
82
118
|
* Total trip cost
|
|
83
119
|
*/
|
|
@@ -106,3 +142,20 @@ export type TripDto = {
|
|
|
106
142
|
*/
|
|
107
143
|
payments?: Array<PaymentDto> | null;
|
|
108
144
|
};
|
|
145
|
+
export declare namespace TripDto {
|
|
146
|
+
enum status {
|
|
147
|
+
REQUESTED = "REQUESTED",
|
|
148
|
+
DRIVER_SEARCHING = "DRIVER_SEARCHING",
|
|
149
|
+
DRIVER_ASSIGNED = "DRIVER_ASSIGNED",
|
|
150
|
+
DRIVER_ASSIGNED_PENDING = "DRIVER_ASSIGNED_PENDING",
|
|
151
|
+
DRIVER_ONWAY = "DRIVER_ONWAY",
|
|
152
|
+
DRIVER_AT_PICKUP = "DRIVER_AT_PICKUP",
|
|
153
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
154
|
+
PAUSED = "PAUSED",
|
|
155
|
+
PAUSED_TRAFFIC = "PAUSED_TRAFFIC",
|
|
156
|
+
COMPLETED = "COMPLETED",
|
|
157
|
+
CANCELED_PASSENGER = "CANCELED_PASSENGER",
|
|
158
|
+
CANCELED_DRIVER = "CANCELED_DRIVER",
|
|
159
|
+
CANCELED_ADMIN = "CANCELED_ADMIN"
|
|
160
|
+
}
|
|
161
|
+
}
|
package/models/TripDto.js
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TripDto = void 0;
|
|
4
|
+
var TripDto;
|
|
5
|
+
(function (TripDto) {
|
|
6
|
+
let status;
|
|
7
|
+
(function (status) {
|
|
8
|
+
status["REQUESTED"] = "REQUESTED";
|
|
9
|
+
status["DRIVER_SEARCHING"] = "DRIVER_SEARCHING";
|
|
10
|
+
status["DRIVER_ASSIGNED"] = "DRIVER_ASSIGNED";
|
|
11
|
+
status["DRIVER_ASSIGNED_PENDING"] = "DRIVER_ASSIGNED_PENDING";
|
|
12
|
+
status["DRIVER_ONWAY"] = "DRIVER_ONWAY";
|
|
13
|
+
status["DRIVER_AT_PICKUP"] = "DRIVER_AT_PICKUP";
|
|
14
|
+
status["IN_PROGRESS"] = "IN_PROGRESS";
|
|
15
|
+
status["PAUSED"] = "PAUSED";
|
|
16
|
+
status["PAUSED_TRAFFIC"] = "PAUSED_TRAFFIC";
|
|
17
|
+
status["COMPLETED"] = "COMPLETED";
|
|
18
|
+
status["CANCELED_PASSENGER"] = "CANCELED_PASSENGER";
|
|
19
|
+
status["CANCELED_DRIVER"] = "CANCELED_DRIVER";
|
|
20
|
+
status["CANCELED_ADMIN"] = "CANCELED_ADMIN";
|
|
21
|
+
})(status = TripDto.status || (TripDto.status = {}));
|
|
22
|
+
})(TripDto || (exports.TripDto = TripDto = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum TripStatuses {
|
|
2
|
+
REQUESTED = "REQUESTED",
|
|
3
|
+
DRIVER_SEARCHING = "DRIVER_SEARCHING",
|
|
4
|
+
DRIVER_ASSIGNED = "DRIVER_ASSIGNED",
|
|
5
|
+
DRIVER_ASSIGNED_PENDING = "DRIVER_ASSIGNED_PENDING",
|
|
6
|
+
DRIVER_ONWAY = "DRIVER_ONWAY",
|
|
7
|
+
DRIVER_AT_PICKUP = "DRIVER_AT_PICKUP",
|
|
8
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
9
|
+
PAUSED = "PAUSED",
|
|
10
|
+
PAUSED_TRAFFIC = "PAUSED_TRAFFIC",
|
|
11
|
+
COMPLETED = "COMPLETED",
|
|
12
|
+
CANCELED_PASSENGER = "CANCELED_PASSENGER",
|
|
13
|
+
CANCELED_DRIVER = "CANCELED_DRIVER",
|
|
14
|
+
CANCELED_ADMIN = "CANCELED_ADMIN"
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TripStatuses = void 0;
|
|
4
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
var TripStatuses;
|
|
9
|
+
(function (TripStatuses) {
|
|
10
|
+
TripStatuses["REQUESTED"] = "REQUESTED";
|
|
11
|
+
TripStatuses["DRIVER_SEARCHING"] = "DRIVER_SEARCHING";
|
|
12
|
+
TripStatuses["DRIVER_ASSIGNED"] = "DRIVER_ASSIGNED";
|
|
13
|
+
TripStatuses["DRIVER_ASSIGNED_PENDING"] = "DRIVER_ASSIGNED_PENDING";
|
|
14
|
+
TripStatuses["DRIVER_ONWAY"] = "DRIVER_ONWAY";
|
|
15
|
+
TripStatuses["DRIVER_AT_PICKUP"] = "DRIVER_AT_PICKUP";
|
|
16
|
+
TripStatuses["IN_PROGRESS"] = "IN_PROGRESS";
|
|
17
|
+
TripStatuses["PAUSED"] = "PAUSED";
|
|
18
|
+
TripStatuses["PAUSED_TRAFFIC"] = "PAUSED_TRAFFIC";
|
|
19
|
+
TripStatuses["COMPLETED"] = "COMPLETED";
|
|
20
|
+
TripStatuses["CANCELED_PASSENGER"] = "CANCELED_PASSENGER";
|
|
21
|
+
TripStatuses["CANCELED_DRIVER"] = "CANCELED_DRIVER";
|
|
22
|
+
TripStatuses["CANCELED_ADMIN"] = "CANCELED_ADMIN";
|
|
23
|
+
})(TripStatuses || (exports.TripStatuses = TripStatuses = {}));
|
|
@@ -2,5 +2,25 @@ export type TripUpdateTripsStatusDto = {
|
|
|
2
2
|
/**
|
|
3
3
|
* Status to update the trip to
|
|
4
4
|
*/
|
|
5
|
-
status:
|
|
5
|
+
status: TripUpdateTripsStatusDto.status;
|
|
6
6
|
};
|
|
7
|
+
export declare namespace TripUpdateTripsStatusDto {
|
|
8
|
+
/**
|
|
9
|
+
* Status to update the trip to
|
|
10
|
+
*/
|
|
11
|
+
enum status {
|
|
12
|
+
REQUESTED = "REQUESTED",
|
|
13
|
+
DRIVER_SEARCHING = "DRIVER_SEARCHING",
|
|
14
|
+
DRIVER_ASSIGNED = "DRIVER_ASSIGNED",
|
|
15
|
+
DRIVER_ASSIGNED_PENDING = "DRIVER_ASSIGNED_PENDING",
|
|
16
|
+
DRIVER_ONWAY = "DRIVER_ONWAY",
|
|
17
|
+
DRIVER_AT_PICKUP = "DRIVER_AT_PICKUP",
|
|
18
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
19
|
+
PAUSED = "PAUSED",
|
|
20
|
+
PAUSED_TRAFFIC = "PAUSED_TRAFFIC",
|
|
21
|
+
COMPLETED = "COMPLETED",
|
|
22
|
+
CANCELED_PASSENGER = "CANCELED_PASSENGER",
|
|
23
|
+
CANCELED_DRIVER = "CANCELED_DRIVER",
|
|
24
|
+
CANCELED_ADMIN = "CANCELED_ADMIN"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,2 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TripUpdateTripsStatusDto = void 0;
|
|
4
|
+
var TripUpdateTripsStatusDto;
|
|
5
|
+
(function (TripUpdateTripsStatusDto) {
|
|
6
|
+
/**
|
|
7
|
+
* Status to update the trip to
|
|
8
|
+
*/
|
|
9
|
+
let status;
|
|
10
|
+
(function (status) {
|
|
11
|
+
status["REQUESTED"] = "REQUESTED";
|
|
12
|
+
status["DRIVER_SEARCHING"] = "DRIVER_SEARCHING";
|
|
13
|
+
status["DRIVER_ASSIGNED"] = "DRIVER_ASSIGNED";
|
|
14
|
+
status["DRIVER_ASSIGNED_PENDING"] = "DRIVER_ASSIGNED_PENDING";
|
|
15
|
+
status["DRIVER_ONWAY"] = "DRIVER_ONWAY";
|
|
16
|
+
status["DRIVER_AT_PICKUP"] = "DRIVER_AT_PICKUP";
|
|
17
|
+
status["IN_PROGRESS"] = "IN_PROGRESS";
|
|
18
|
+
status["PAUSED"] = "PAUSED";
|
|
19
|
+
status["PAUSED_TRAFFIC"] = "PAUSED_TRAFFIC";
|
|
20
|
+
status["COMPLETED"] = "COMPLETED";
|
|
21
|
+
status["CANCELED_PASSENGER"] = "CANCELED_PASSENGER";
|
|
22
|
+
status["CANCELED_DRIVER"] = "CANCELED_DRIVER";
|
|
23
|
+
status["CANCELED_ADMIN"] = "CANCELED_ADMIN";
|
|
24
|
+
})(status = TripUpdateTripsStatusDto.status || (TripUpdateTripsStatusDto.status = {}));
|
|
25
|
+
})(TripUpdateTripsStatusDto || (exports.TripUpdateTripsStatusDto = TripUpdateTripsStatusDto = {}));
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type VoucherCreateDto = {
|
|
2
|
+
/**
|
|
3
|
+
* Card number
|
|
4
|
+
*/
|
|
5
|
+
cardNumber: string;
|
|
6
|
+
/**
|
|
7
|
+
* Voucher status
|
|
8
|
+
*/
|
|
9
|
+
status: string;
|
|
10
|
+
/**
|
|
11
|
+
* Program name
|
|
12
|
+
*/
|
|
13
|
+
program: string;
|
|
14
|
+
/**
|
|
15
|
+
* Senior center
|
|
16
|
+
*/
|
|
17
|
+
seniorCenter: string;
|
|
18
|
+
/**
|
|
19
|
+
* First name
|
|
20
|
+
*/
|
|
21
|
+
firstName: string;
|
|
22
|
+
/**
|
|
23
|
+
* Last name
|
|
24
|
+
*/
|
|
25
|
+
lastName: string;
|
|
26
|
+
/**
|
|
27
|
+
* Middle name
|
|
28
|
+
*/
|
|
29
|
+
middleName?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Address
|
|
32
|
+
*/
|
|
33
|
+
address: string;
|
|
34
|
+
/**
|
|
35
|
+
* Apartment number
|
|
36
|
+
*/
|
|
37
|
+
apartmentNumber?: string;
|
|
38
|
+
/**
|
|
39
|
+
* City
|
|
40
|
+
*/
|
|
41
|
+
city: string;
|
|
42
|
+
/**
|
|
43
|
+
* State
|
|
44
|
+
*/
|
|
45
|
+
state: string;
|
|
46
|
+
/**
|
|
47
|
+
* Zip code
|
|
48
|
+
*/
|
|
49
|
+
zipCode: string;
|
|
50
|
+
/**
|
|
51
|
+
* Rider phone
|
|
52
|
+
*/
|
|
53
|
+
riderPhone: string;
|
|
54
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export type VoucherDto = {
|
|
2
|
+
/**
|
|
3
|
+
* Voucher ID
|
|
4
|
+
*/
|
|
5
|
+
id: number;
|
|
6
|
+
/**
|
|
7
|
+
* Card number
|
|
8
|
+
*/
|
|
9
|
+
cardNumber: string;
|
|
10
|
+
/**
|
|
11
|
+
* Voucher status
|
|
12
|
+
*/
|
|
13
|
+
status: string;
|
|
14
|
+
/**
|
|
15
|
+
* Program name
|
|
16
|
+
*/
|
|
17
|
+
program: string;
|
|
18
|
+
/**
|
|
19
|
+
* Senior center
|
|
20
|
+
*/
|
|
21
|
+
seniorCenter: string;
|
|
22
|
+
/**
|
|
23
|
+
* First name
|
|
24
|
+
*/
|
|
25
|
+
firstName: string;
|
|
26
|
+
/**
|
|
27
|
+
* Last name
|
|
28
|
+
*/
|
|
29
|
+
lastName: string;
|
|
30
|
+
/**
|
|
31
|
+
* Middle name
|
|
32
|
+
*/
|
|
33
|
+
middleName?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Address
|
|
36
|
+
*/
|
|
37
|
+
address: string;
|
|
38
|
+
/**
|
|
39
|
+
* Apartment number
|
|
40
|
+
*/
|
|
41
|
+
apartmentNumber?: string;
|
|
42
|
+
/**
|
|
43
|
+
* City
|
|
44
|
+
*/
|
|
45
|
+
city: string;
|
|
46
|
+
/**
|
|
47
|
+
* State
|
|
48
|
+
*/
|
|
49
|
+
state: string;
|
|
50
|
+
/**
|
|
51
|
+
* Zip code
|
|
52
|
+
*/
|
|
53
|
+
zipCode: string;
|
|
54
|
+
/**
|
|
55
|
+
* Rider phone
|
|
56
|
+
*/
|
|
57
|
+
riderPhone: string;
|
|
58
|
+
/**
|
|
59
|
+
* Created at timestamp
|
|
60
|
+
*/
|
|
61
|
+
createdAt: string;
|
|
62
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type VoucherUpdateDto = {
|
|
2
|
+
/**
|
|
3
|
+
* Card number
|
|
4
|
+
*/
|
|
5
|
+
cardNumber?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Voucher status
|
|
8
|
+
*/
|
|
9
|
+
status?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Program name
|
|
12
|
+
*/
|
|
13
|
+
program?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Senior center
|
|
16
|
+
*/
|
|
17
|
+
seniorCenter?: string;
|
|
18
|
+
/**
|
|
19
|
+
* First name
|
|
20
|
+
*/
|
|
21
|
+
firstName?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Last name
|
|
24
|
+
*/
|
|
25
|
+
lastName?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Middle name
|
|
28
|
+
*/
|
|
29
|
+
middleName?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Address
|
|
32
|
+
*/
|
|
33
|
+
address?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Apartment number
|
|
36
|
+
*/
|
|
37
|
+
apartmentNumber?: string;
|
|
38
|
+
/**
|
|
39
|
+
* City
|
|
40
|
+
*/
|
|
41
|
+
city?: string;
|
|
42
|
+
/**
|
|
43
|
+
* State
|
|
44
|
+
*/
|
|
45
|
+
state?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Zip code
|
|
48
|
+
*/
|
|
49
|
+
zipCode?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Rider phone
|
|
52
|
+
*/
|
|
53
|
+
riderPhone?: string;
|
|
54
|
+
};
|
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';
|
|
@@ -28,8 +29,12 @@ export * from './TokensDto';
|
|
|
28
29
|
export * from './TripAssignDriverDto';
|
|
29
30
|
export * from './TripDto';
|
|
30
31
|
export * from './TripLocationPointDto';
|
|
32
|
+
export * from './TripStatuses';
|
|
31
33
|
export * from './TripUpdateDriverAssignmentModeDto';
|
|
32
34
|
export * from './TripUpdateDto';
|
|
33
35
|
export * from './TripUpdateTripsStatusDto';
|
|
34
36
|
export * from './UpdateFcmTokenDto';
|
|
35
37
|
export * from './ValidateResetCodeDto';
|
|
38
|
+
export * from './VoucherCreateDto';
|
|
39
|
+
export * from './VoucherDto';
|
|
40
|
+
export * from './VoucherUpdateDto';
|
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);
|
|
@@ -44,8 +45,12 @@ __exportStar(require("./TokensDto"), exports);
|
|
|
44
45
|
__exportStar(require("./TripAssignDriverDto"), exports);
|
|
45
46
|
__exportStar(require("./TripDto"), exports);
|
|
46
47
|
__exportStar(require("./TripLocationPointDto"), exports);
|
|
48
|
+
__exportStar(require("./TripStatuses"), exports);
|
|
47
49
|
__exportStar(require("./TripUpdateDriverAssignmentModeDto"), exports);
|
|
48
50
|
__exportStar(require("./TripUpdateDto"), exports);
|
|
49
51
|
__exportStar(require("./TripUpdateTripsStatusDto"), exports);
|
|
50
52
|
__exportStar(require("./UpdateFcmTokenDto"), exports);
|
|
51
53
|
__exportStar(require("./ValidateResetCodeDto"), exports);
|
|
54
|
+
__exportStar(require("./VoucherCreateDto"), exports);
|
|
55
|
+
__exportStar(require("./VoucherDto"), exports);
|
|
56
|
+
__exportStar(require("./VoucherUpdateDto"), exports);
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ export declare class AdminCustomerService {
|
|
|
14
14
|
static create(requestBody: CustomerRegisterDto): CancelablePromise<CustomerDto>;
|
|
15
15
|
/**
|
|
16
16
|
* Get all customers
|
|
17
|
-
* @param
|
|
17
|
+
* @param q Text to search for in name, surname, phone number or email
|
|
18
18
|
* @param order Sorting options
|
|
19
19
|
* @param id Filter by id
|
|
20
20
|
* @param firstName Filter by first name
|
|
@@ -26,7 +26,7 @@ export declare class AdminCustomerService {
|
|
|
26
26
|
* @returns CustomerDto List of customers
|
|
27
27
|
* @throws ApiError
|
|
28
28
|
*/
|
|
29
|
-
static findAll(
|
|
29
|
+
static findAll(q?: string, order?: OrderDto, id?: number, firstName?: string, lastName?: string, email?: string, phone?: string, phoneCountryCode?: string, isVerified?: boolean): CancelablePromise<Array<CustomerDto>>;
|
|
30
30
|
/**
|
|
31
31
|
* Get a single customer by ID
|
|
32
32
|
* @param id
|
|
@@ -20,7 +20,7 @@ class AdminCustomerService {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Get all customers
|
|
23
|
-
* @param
|
|
23
|
+
* @param q Text to search for in name, surname, phone number or email
|
|
24
24
|
* @param order Sorting options
|
|
25
25
|
* @param id Filter by id
|
|
26
26
|
* @param firstName Filter by first name
|
|
@@ -32,12 +32,12 @@ class AdminCustomerService {
|
|
|
32
32
|
* @returns CustomerDto List of customers
|
|
33
33
|
* @throws ApiError
|
|
34
34
|
*/
|
|
35
|
-
static findAll(
|
|
35
|
+
static findAll(q, order, id, firstName, lastName, email, phone, phoneCountryCode, isVerified) {
|
|
36
36
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
37
37
|
method: 'GET',
|
|
38
38
|
url: '/admins/customers',
|
|
39
39
|
query: {
|
|
40
|
-
'
|
|
40
|
+
'q': q,
|
|
41
41
|
'order': order,
|
|
42
42
|
'id': id,
|
|
43
43
|
'firstName': firstName,
|
|
@@ -11,7 +11,7 @@ export declare class AdminDriversService {
|
|
|
11
11
|
static createDriver(requestBody: DriverCreateDto): CancelablePromise<any>;
|
|
12
12
|
/**
|
|
13
13
|
* Get all drivers
|
|
14
|
-
* @param
|
|
14
|
+
* @param q Text to search for in name, surname, phone number or email
|
|
15
15
|
* @param order Sorting options
|
|
16
16
|
* @param id Filter by id
|
|
17
17
|
* @param firstName Filter by first name
|
|
@@ -26,7 +26,7 @@ export declare class AdminDriversService {
|
|
|
26
26
|
* @returns any List of drivers
|
|
27
27
|
* @throws ApiError
|
|
28
28
|
*/
|
|
29
|
-
static findAll(
|
|
29
|
+
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>;
|
|
30
30
|
/**
|
|
31
31
|
* Get a single driver by ID
|
|
32
32
|
* @param id
|
|
@@ -20,7 +20,7 @@ class AdminDriversService {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Get all drivers
|
|
23
|
-
* @param
|
|
23
|
+
* @param q Text to search for in name, surname, phone number or email
|
|
24
24
|
* @param order Sorting options
|
|
25
25
|
* @param id Filter by id
|
|
26
26
|
* @param firstName Filter by first name
|
|
@@ -35,12 +35,12 @@ class AdminDriversService {
|
|
|
35
35
|
* @returns any List of drivers
|
|
36
36
|
* @throws ApiError
|
|
37
37
|
*/
|
|
38
|
-
static findAll(
|
|
38
|
+
static findAll(q, order, id, firstName, lastName, email, phone, status, isOnline, isActive, license, type) {
|
|
39
39
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
40
40
|
method: 'GET',
|
|
41
41
|
url: '/admins/drivers',
|
|
42
42
|
query: {
|
|
43
|
-
'
|
|
43
|
+
'q': q,
|
|
44
44
|
'order': order,
|
|
45
45
|
'id': id,
|
|
46
46
|
'firstName': firstName,
|
|
@@ -14,12 +14,12 @@ export declare class AdminService {
|
|
|
14
14
|
static create(requestBody: AdminCreateDto): CancelablePromise<AdminDto>;
|
|
15
15
|
/**
|
|
16
16
|
* Get all admins
|
|
17
|
-
* @param
|
|
17
|
+
* @param q Text to search for in name, surname, phone number or email
|
|
18
18
|
* @param order Sorting options
|
|
19
19
|
* @returns AdminDto List of admins
|
|
20
20
|
* @throws ApiError
|
|
21
21
|
*/
|
|
22
|
-
static findAll(
|
|
22
|
+
static findAll(q?: string, order?: OrderDto): CancelablePromise<Array<AdminDto>>;
|
|
23
23
|
/**
|
|
24
24
|
* Get a single admin by ID
|
|
25
25
|
* @param id
|
package/services/AdminService.js
CHANGED
|
@@ -20,17 +20,17 @@ class AdminService {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Get all admins
|
|
23
|
-
* @param
|
|
23
|
+
* @param q Text to search for in name, surname, phone number or email
|
|
24
24
|
* @param order Sorting options
|
|
25
25
|
* @returns AdminDto List of admins
|
|
26
26
|
* @throws ApiError
|
|
27
27
|
*/
|
|
28
|
-
static findAll(
|
|
28
|
+
static findAll(q, order) {
|
|
29
29
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
30
30
|
method: 'GET',
|
|
31
31
|
url: '/admins',
|
|
32
32
|
query: {
|
|
33
|
-
'
|
|
33
|
+
'q': q,
|
|
34
34
|
'order': order,
|
|
35
35
|
},
|
|
36
36
|
});
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
import type { OrderDto } from '../models/OrderDto';
|
|
1
2
|
import type { TripAssignDriverDto } from '../models/TripAssignDriverDto';
|
|
2
3
|
import type { TripDto } from '../models/TripDto';
|
|
4
|
+
import type { TripStatuses } from '../models/TripStatuses';
|
|
3
5
|
import type { TripUpdateDriverAssignmentModeDto } from '../models/TripUpdateDriverAssignmentModeDto';
|
|
4
6
|
import type { TripUpdateDto } from '../models/TripUpdateDto';
|
|
5
7
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
6
8
|
export declare class AdminTripsService {
|
|
7
9
|
/**
|
|
8
10
|
* Get all trips
|
|
9
|
-
* @param search
|
|
11
|
+
* @param q Text to search for in trip fields
|
|
12
|
+
* @param order Sorting options
|
|
13
|
+
* @param customerId Filter by customer ID (scope to customer)
|
|
14
|
+
* @param driverId Filter by driver ID (scope to driver)
|
|
10
15
|
* @returns TripDto List of trips
|
|
11
16
|
* @throws ApiError
|
|
12
17
|
*/
|
|
13
|
-
static findAll(
|
|
18
|
+
static findAll(q?: string, order?: OrderDto, customerId?: number, driverId?: number): CancelablePromise<Array<TripDto>>;
|
|
14
19
|
/**
|
|
15
20
|
* Create a new trip/service order
|
|
16
21
|
* @param requestBody
|
|
@@ -35,11 +40,12 @@ export declare class AdminTripsService {
|
|
|
35
40
|
static update(id: number, requestBody: TripUpdateDto): CancelablePromise<TripDto>;
|
|
36
41
|
/**
|
|
37
42
|
* Update trip status
|
|
38
|
-
* @param id
|
|
43
|
+
* @param id Trip ID
|
|
44
|
+
* @param status Action to be executed on the trip
|
|
39
45
|
* @returns TripDto Trip status updated successfully.
|
|
40
46
|
* @throws ApiError
|
|
41
47
|
*/
|
|
42
|
-
static updateTripStatus(id: number): CancelablePromise<TripDto>;
|
|
48
|
+
static updateTripStatus(id: number, status: TripStatuses): CancelablePromise<TripDto>;
|
|
43
49
|
/**
|
|
44
50
|
* Assign a driver to a trip
|
|
45
51
|
* @param id
|
|
@@ -6,16 +6,22 @@ const request_1 = require("../core/request");
|
|
|
6
6
|
class AdminTripsService {
|
|
7
7
|
/**
|
|
8
8
|
* Get all trips
|
|
9
|
-
* @param search
|
|
9
|
+
* @param q Text to search for in trip fields
|
|
10
|
+
* @param order Sorting options
|
|
11
|
+
* @param customerId Filter by customer ID (scope to customer)
|
|
12
|
+
* @param driverId Filter by driver ID (scope to driver)
|
|
10
13
|
* @returns TripDto List of trips
|
|
11
14
|
* @throws ApiError
|
|
12
15
|
*/
|
|
13
|
-
static findAll(
|
|
16
|
+
static findAll(q, order, customerId, driverId) {
|
|
14
17
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
15
18
|
method: 'GET',
|
|
16
19
|
url: '/admins/trips',
|
|
17
20
|
query: {
|
|
18
|
-
'
|
|
21
|
+
'q': q,
|
|
22
|
+
'order': order,
|
|
23
|
+
'customerId': customerId,
|
|
24
|
+
'driverId': driverId,
|
|
19
25
|
},
|
|
20
26
|
});
|
|
21
27
|
}
|
|
@@ -68,16 +74,18 @@ class AdminTripsService {
|
|
|
68
74
|
}
|
|
69
75
|
/**
|
|
70
76
|
* Update trip status
|
|
71
|
-
* @param id
|
|
77
|
+
* @param id Trip ID
|
|
78
|
+
* @param status Action to be executed on the trip
|
|
72
79
|
* @returns TripDto Trip status updated successfully.
|
|
73
80
|
* @throws ApiError
|
|
74
81
|
*/
|
|
75
|
-
static updateTripStatus(id) {
|
|
82
|
+
static updateTripStatus(id, status) {
|
|
76
83
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
77
84
|
method: 'PATCH',
|
|
78
85
|
url: '/admins/trips/{id}/status/{status}',
|
|
79
86
|
path: {
|
|
80
87
|
'id': id,
|
|
88
|
+
'status': status,
|
|
81
89
|
},
|
|
82
90
|
});
|
|
83
91
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { CustomerTripActions } from '../models/CustomerTripActions';
|
|
2
|
+
import type { OrderDto } from '../models/OrderDto';
|
|
1
3
|
import type { TripDto } from '../models/TripDto';
|
|
2
4
|
import type { TripUpdateDto } from '../models/TripUpdateDto';
|
|
3
5
|
import type { TripUpdateTripsStatusDto } from '../models/TripUpdateTripsStatusDto';
|
|
@@ -12,11 +14,14 @@ export declare class CustomerTripsService {
|
|
|
12
14
|
static create(requestBody: TripDto): CancelablePromise<TripDto>;
|
|
13
15
|
/**
|
|
14
16
|
* Get all trips for a customer
|
|
15
|
-
* @param search
|
|
17
|
+
* @param q Text to search for in trip fields
|
|
18
|
+
* @param order Sorting options
|
|
19
|
+
* @param customerId Filter by customer ID (scope to customer)
|
|
20
|
+
* @param driverId Filter by driver ID (scope to driver)
|
|
16
21
|
* @returns TripDto List of trips
|
|
17
22
|
* @throws ApiError
|
|
18
23
|
*/
|
|
19
|
-
static findAll(
|
|
24
|
+
static findAll(q?: string, order?: OrderDto, customerId?: number, driverId?: number): CancelablePromise<Array<TripDto>>;
|
|
20
25
|
/**
|
|
21
26
|
* Get active trip for a customer
|
|
22
27
|
* @returns TripDto Active trip found
|
|
@@ -55,9 +60,10 @@ export declare class CustomerTripsService {
|
|
|
55
60
|
static cancelTrip(id: number): CancelablePromise<TripDto>;
|
|
56
61
|
/**
|
|
57
62
|
* Execute an action on a trip
|
|
58
|
-
* @param id
|
|
63
|
+
* @param id Trip ID
|
|
64
|
+
* @param action Action to be executed on the trip
|
|
59
65
|
* @returns TripDto Trip action executed successfully.
|
|
60
66
|
* @throws ApiError
|
|
61
67
|
*/
|
|
62
|
-
static executeTripAction(id: number): CancelablePromise<TripDto>;
|
|
68
|
+
static executeTripAction(id: number, action: CustomerTripActions): CancelablePromise<TripDto>;
|
|
63
69
|
}
|
|
@@ -20,16 +20,22 @@ class CustomerTripsService {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Get all trips for a customer
|
|
23
|
-
* @param search
|
|
23
|
+
* @param q Text to search for in trip fields
|
|
24
|
+
* @param order Sorting options
|
|
25
|
+
* @param customerId Filter by customer ID (scope to customer)
|
|
26
|
+
* @param driverId Filter by driver ID (scope to driver)
|
|
24
27
|
* @returns TripDto List of trips
|
|
25
28
|
* @throws ApiError
|
|
26
29
|
*/
|
|
27
|
-
static findAll(
|
|
30
|
+
static findAll(q, order, customerId, driverId) {
|
|
28
31
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
29
32
|
method: 'GET',
|
|
30
33
|
url: '/customers/trips',
|
|
31
34
|
query: {
|
|
32
|
-
'
|
|
35
|
+
'q': q,
|
|
36
|
+
'order': order,
|
|
37
|
+
'customerId': customerId,
|
|
38
|
+
'driverId': driverId,
|
|
33
39
|
},
|
|
34
40
|
});
|
|
35
41
|
}
|
|
@@ -112,16 +118,18 @@ class CustomerTripsService {
|
|
|
112
118
|
}
|
|
113
119
|
/**
|
|
114
120
|
* Execute an action on a trip
|
|
115
|
-
* @param id
|
|
121
|
+
* @param id Trip ID
|
|
122
|
+
* @param action Action to be executed on the trip
|
|
116
123
|
* @returns TripDto Trip action executed successfully.
|
|
117
124
|
* @throws ApiError
|
|
118
125
|
*/
|
|
119
|
-
static executeTripAction(id) {
|
|
126
|
+
static executeTripAction(id, action) {
|
|
120
127
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
121
128
|
method: 'PATCH',
|
|
122
129
|
url: '/customers/trips/{id}/action/{action}',
|
|
123
130
|
path: {
|
|
124
131
|
'id': id,
|
|
132
|
+
'action': action,
|
|
125
133
|
},
|
|
126
134
|
});
|
|
127
135
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DriverTripActions } from '../models/DriverTripActions';
|
|
2
|
+
import type { OrderDto } from '../models/OrderDto';
|
|
2
3
|
import type { TripDto } from '../models/TripDto';
|
|
3
4
|
import type { TripUpdateDto } from '../models/TripUpdateDto';
|
|
4
5
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
@@ -12,11 +13,14 @@ export declare class DriverTripsService {
|
|
|
12
13
|
static create(requestBody: TripDto): CancelablePromise<TripDto>;
|
|
13
14
|
/**
|
|
14
15
|
* Get all trips for a driver
|
|
15
|
-
* @param search
|
|
16
|
+
* @param q Text to search for in trip fields
|
|
17
|
+
* @param order Sorting options
|
|
18
|
+
* @param customerId Filter by customer ID (scope to customer)
|
|
19
|
+
* @param driverId Filter by driver ID (scope to driver)
|
|
16
20
|
* @returns TripDto List of trips
|
|
17
21
|
* @throws ApiError
|
|
18
22
|
*/
|
|
19
|
-
static findAll(
|
|
23
|
+
static findAll(q?: string, order?: OrderDto, customerId?: number, driverId?: number): CancelablePromise<Array<TripDto>>;
|
|
20
24
|
/**
|
|
21
25
|
* Update a trip by ID
|
|
22
26
|
* @param id
|
|
@@ -20,16 +20,22 @@ class DriverTripsService {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Get all trips for a driver
|
|
23
|
-
* @param search
|
|
23
|
+
* @param q Text to search for in trip fields
|
|
24
|
+
* @param order Sorting options
|
|
25
|
+
* @param customerId Filter by customer ID (scope to customer)
|
|
26
|
+
* @param driverId Filter by driver ID (scope to driver)
|
|
24
27
|
* @returns TripDto List of trips
|
|
25
28
|
* @throws ApiError
|
|
26
29
|
*/
|
|
27
|
-
static findAll(
|
|
30
|
+
static findAll(q, order, customerId, driverId) {
|
|
28
31
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
29
32
|
method: 'GET',
|
|
30
33
|
url: '/drivers/trips',
|
|
31
34
|
query: {
|
|
32
|
-
'
|
|
35
|
+
'q': q,
|
|
36
|
+
'order': order,
|
|
37
|
+
'customerId': customerId,
|
|
38
|
+
'driverId': driverId,
|
|
33
39
|
},
|
|
34
40
|
});
|
|
35
41
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { MessageResponseDto } from '../models/MessageResponseDto';
|
|
2
|
+
import type { OrderDto } from '../models/OrderDto';
|
|
3
|
+
import type { VoucherCreateDto } from '../models/VoucherCreateDto';
|
|
4
|
+
import type { VoucherDto } from '../models/VoucherDto';
|
|
5
|
+
import type { VoucherUpdateDto } from '../models/VoucherUpdateDto';
|
|
6
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
7
|
+
export declare class VoucherService {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new voucher
|
|
10
|
+
* @param requestBody
|
|
11
|
+
* @returns VoucherDto Voucher created successfully.
|
|
12
|
+
* @throws ApiError
|
|
13
|
+
*/
|
|
14
|
+
static create(requestBody: VoucherCreateDto): CancelablePromise<VoucherDto>;
|
|
15
|
+
/**
|
|
16
|
+
* Get all vouchers
|
|
17
|
+
* @param q Text to search for in card number, name, senior center, program or status
|
|
18
|
+
* @param order Sorting options
|
|
19
|
+
* @returns VoucherDto List of vouchers
|
|
20
|
+
* @throws ApiError
|
|
21
|
+
*/
|
|
22
|
+
static findAll(q?: string, order?: OrderDto): CancelablePromise<Array<VoucherDto>>;
|
|
23
|
+
/**
|
|
24
|
+
* Import vouchers from Excel file
|
|
25
|
+
* @param formData
|
|
26
|
+
* @returns any Parsed Excel data (first sheet as array of rows).
|
|
27
|
+
* @throws ApiError
|
|
28
|
+
*/
|
|
29
|
+
static importExcel(formData: {
|
|
30
|
+
file?: Blob;
|
|
31
|
+
}): CancelablePromise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* Get a single voucher by ID
|
|
34
|
+
* @param id
|
|
35
|
+
* @returns VoucherDto Voucher found
|
|
36
|
+
* @throws ApiError
|
|
37
|
+
*/
|
|
38
|
+
static findById(id: number): CancelablePromise<VoucherDto>;
|
|
39
|
+
/**
|
|
40
|
+
* Update a voucher by ID
|
|
41
|
+
* @param id
|
|
42
|
+
* @param requestBody
|
|
43
|
+
* @returns VoucherDto Voucher updated successfully.
|
|
44
|
+
* @throws ApiError
|
|
45
|
+
*/
|
|
46
|
+
static update(id: number, requestBody: VoucherUpdateDto): CancelablePromise<VoucherDto>;
|
|
47
|
+
/**
|
|
48
|
+
* Delete a voucher by ID
|
|
49
|
+
* @param id
|
|
50
|
+
* @returns MessageResponseDto Voucher deleted successfully.
|
|
51
|
+
* @throws ApiError
|
|
52
|
+
*/
|
|
53
|
+
static remove(id: number): CancelablePromise<MessageResponseDto>;
|
|
54
|
+
/**
|
|
55
|
+
* Get a single voucher by card number
|
|
56
|
+
* @param cardNumber
|
|
57
|
+
* @returns VoucherDto Voucher found
|
|
58
|
+
* @throws ApiError
|
|
59
|
+
*/
|
|
60
|
+
static findByCardNumber(cardNumber: string): CancelablePromise<VoucherDto>;
|
|
61
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VoucherService = void 0;
|
|
4
|
+
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
|
+
const request_1 = require("../core/request");
|
|
6
|
+
class VoucherService {
|
|
7
|
+
/**
|
|
8
|
+
* Create a new voucher
|
|
9
|
+
* @param requestBody
|
|
10
|
+
* @returns VoucherDto Voucher created successfully.
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
static create(requestBody) {
|
|
14
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
15
|
+
method: 'POST',
|
|
16
|
+
url: '/vouchers',
|
|
17
|
+
body: requestBody,
|
|
18
|
+
mediaType: 'application/json',
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get all vouchers
|
|
23
|
+
* @param q Text to search for in card number, name, senior center, program or status
|
|
24
|
+
* @param order Sorting options
|
|
25
|
+
* @returns VoucherDto List of vouchers
|
|
26
|
+
* @throws ApiError
|
|
27
|
+
*/
|
|
28
|
+
static findAll(q, order) {
|
|
29
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
30
|
+
method: 'GET',
|
|
31
|
+
url: '/vouchers',
|
|
32
|
+
query: {
|
|
33
|
+
'q': q,
|
|
34
|
+
'order': order,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Import vouchers from Excel file
|
|
40
|
+
* @param formData
|
|
41
|
+
* @returns any Parsed Excel data (first sheet as array of rows).
|
|
42
|
+
* @throws ApiError
|
|
43
|
+
*/
|
|
44
|
+
static importExcel(formData) {
|
|
45
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
46
|
+
method: 'POST',
|
|
47
|
+
url: '/vouchers/import',
|
|
48
|
+
formData: formData,
|
|
49
|
+
mediaType: 'multipart/form-data',
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Get a single voucher by ID
|
|
54
|
+
* @param id
|
|
55
|
+
* @returns VoucherDto Voucher found
|
|
56
|
+
* @throws ApiError
|
|
57
|
+
*/
|
|
58
|
+
static findById(id) {
|
|
59
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
60
|
+
method: 'GET',
|
|
61
|
+
url: '/vouchers/{id}',
|
|
62
|
+
path: {
|
|
63
|
+
'id': id,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Update a voucher by ID
|
|
69
|
+
* @param id
|
|
70
|
+
* @param requestBody
|
|
71
|
+
* @returns VoucherDto Voucher updated successfully.
|
|
72
|
+
* @throws ApiError
|
|
73
|
+
*/
|
|
74
|
+
static update(id, requestBody) {
|
|
75
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
76
|
+
method: 'PATCH',
|
|
77
|
+
url: '/vouchers/{id}',
|
|
78
|
+
path: {
|
|
79
|
+
'id': id,
|
|
80
|
+
},
|
|
81
|
+
body: requestBody,
|
|
82
|
+
mediaType: 'application/json',
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Delete a voucher by ID
|
|
87
|
+
* @param id
|
|
88
|
+
* @returns MessageResponseDto Voucher deleted successfully.
|
|
89
|
+
* @throws ApiError
|
|
90
|
+
*/
|
|
91
|
+
static remove(id) {
|
|
92
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
93
|
+
method: 'DELETE',
|
|
94
|
+
url: '/vouchers/{id}',
|
|
95
|
+
path: {
|
|
96
|
+
'id': id,
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Get a single voucher by card number
|
|
102
|
+
* @param cardNumber
|
|
103
|
+
* @returns VoucherDto Voucher found
|
|
104
|
+
* @throws ApiError
|
|
105
|
+
*/
|
|
106
|
+
static findByCardNumber(cardNumber) {
|
|
107
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
108
|
+
method: 'GET',
|
|
109
|
+
url: '/vouchers/card-number/{cardNumber}',
|
|
110
|
+
path: {
|
|
111
|
+
'cardNumber': cardNumber,
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
exports.VoucherService = VoucherService;
|
package/services/index.d.ts
CHANGED
package/services/index.js
CHANGED
|
@@ -28,3 +28,4 @@ __exportStar(require("./DriverTripsService"), exports);
|
|
|
28
28
|
__exportStar(require("./DriversService"), exports);
|
|
29
29
|
__exportStar(require("./HealthService"), exports);
|
|
30
30
|
__exportStar(require("./MainService"), exports);
|
|
31
|
+
__exportStar(require("./VoucherService"), exports);
|
package/socketService.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DriverStatus, DriverExecuteTripAction } from './types';
|
|
1
2
|
export declare class SocketService {
|
|
2
3
|
private socket;
|
|
3
4
|
private token;
|
|
@@ -6,7 +7,7 @@ export declare class SocketService {
|
|
|
6
7
|
url: string;
|
|
7
8
|
path: string;
|
|
8
9
|
};
|
|
9
|
-
static getInstance():
|
|
10
|
+
static getInstance(): SocketService;
|
|
10
11
|
setToken(token: string): void;
|
|
11
12
|
clearToken(): void;
|
|
12
13
|
connect(): void;
|
|
@@ -19,9 +20,10 @@ 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;
|
|
28
|
+
emitTripActionUpdate(data: DriverExecuteTripAction): void;
|
|
27
29
|
}
|
package/socketService.js
CHANGED
|
@@ -28,7 +28,7 @@ class SocketService {
|
|
|
28
28
|
path: baseUrl,
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
static
|
|
31
|
+
static getInstance() {
|
|
32
32
|
if (!instance) {
|
|
33
33
|
const url = `${OpenAPI_1.OpenAPI.BASE}/realtime`;
|
|
34
34
|
instance = new SocketService(url);
|
|
@@ -119,8 +119,11 @@ 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
|
+
}
|
|
125
|
+
emitTripActionUpdate(data) {
|
|
126
|
+
this.emit('tripActionUpdate', { ...data });
|
|
124
127
|
}
|
|
125
128
|
}
|
|
126
129
|
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,26 @@
|
|
|
1
|
+
import { TripStatuses } from '../..';
|
|
2
|
+
export interface ActiveTrip {
|
|
3
|
+
id: number;
|
|
4
|
+
driverId: number | null;
|
|
5
|
+
customerId: number | null;
|
|
6
|
+
originAddress?: string | null;
|
|
7
|
+
originLatitude: number | null;
|
|
8
|
+
originLongitude: number | null;
|
|
9
|
+
destinationAddress: string | null;
|
|
10
|
+
destinationLatitude: number | null;
|
|
11
|
+
destinationLongitude: number | null;
|
|
12
|
+
status: TripStatuses;
|
|
13
|
+
currentLatitude: number;
|
|
14
|
+
currentLongitude: number;
|
|
15
|
+
lastUpdate?: Date;
|
|
16
|
+
deltaDistanceMeters?: number;
|
|
17
|
+
deltaTotalMilliseconds?: number;
|
|
18
|
+
deltaDrivingMilliseconds?: number;
|
|
19
|
+
deltaPausedMilliseconds?: number;
|
|
20
|
+
deltaPausedTrafficMilliseconds?: number;
|
|
21
|
+
deltaPickupCost?: number;
|
|
22
|
+
deltaDistanceCost?: number;
|
|
23
|
+
deltaWaitingCost?: number;
|
|
24
|
+
deltaTrafficDelayCost?: number;
|
|
25
|
+
deltaTotalCost?: number;
|
|
26
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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);
|
|
19
|
+
__exportStar(require("./active-trip"), exports);
|