@dapex-tech/elite-online-services 0.0.11 → 0.0.13
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/core/request.d.ts +9 -5
- package/core/request.js +48 -47
- package/createClient.d.ts +1 -0
- package/models/AdminCreateDto.d.ts +26 -0
- package/models/AdminCreateDto.js +2 -0
- package/models/AdminDto.d.ts +0 -8
- package/models/AdminLoginResponseDto.d.ts +38 -0
- package/models/AdminLoginResponseDto.js +2 -0
- package/models/AdminUpdateDto.d.ts +2 -2
- package/models/CustomerDto.d.ts +2 -42
- package/models/CustomerLoginDto.d.ts +1 -1
- package/models/CustomerLoginResponseDto.d.ts +34 -0
- package/models/CustomerLoginResponseDto.js +2 -0
- package/models/CustomerRegisterDto.d.ts +26 -0
- package/models/CustomerRegisterDto.js +2 -0
- package/models/DriverCreateDto.d.ts +42 -0
- package/models/DriverCreateDto.js +2 -0
- package/models/DriverDto.d.ts +0 -4
- package/models/DriverLoginResponseDto.d.ts +58 -0
- package/models/DriverLoginResponseDto.js +2 -0
- package/models/DriverTripActions.d.ts +2 -1
- package/models/DriverTripActions.js +1 -0
- package/models/DriverUpdateDto.d.ts +0 -8
- package/models/MessageResponseDto.d.ts +6 -0
- package/models/MessageResponseDto.js +2 -0
- package/models/TokensDto.d.ts +10 -0
- package/models/TokensDto.js +2 -0
- package/models/TripDto.d.ts +6 -6
- package/models/UpdateFcmTokenDto.d.ts +6 -0
- package/models/UpdateFcmTokenDto.js +2 -0
- package/models/index.d.ts +9 -0
- package/models/index.js +9 -0
- package/package.json +3 -2
- package/services/AdminAuthService.d.ts +20 -16
- package/services/AdminAuthService.js +9 -31
- package/services/AdminCustomerService.d.ts +12 -10
- package/services/AdminCustomerService.js +5 -23
- package/services/AdminDriversService.d.ts +2 -2
- package/services/AdminDriversService.js +0 -18
- package/services/AdminService.d.ts +12 -10
- package/services/AdminService.js +5 -23
- package/services/AdminTripsService.d.ts +14 -14
- package/services/AdminTripsService.js +7 -36
- package/services/CustomerLocationsService.d.ts +3 -2
- package/services/CustomerLocationsService.js +1 -13
- package/services/CustomerTripsService.d.ts +16 -16
- package/services/CustomerTripsService.js +8 -41
- package/services/CustomersAuthService.d.ts +25 -23
- package/services/CustomersAuthService.js +10 -47
- package/services/CustomersService.d.ts +14 -4
- package/services/CustomersService.js +17 -7
- package/services/DriverAuthService.d.ts +18 -14
- package/services/DriverAuthService.js +7 -29
- package/services/DriverTripsService.d.ts +12 -12
- package/services/DriverTripsService.js +6 -29
- package/services/DriversService.d.ts +18 -8
- package/services/DriversService.js +19 -17
- package/services/HealthService.d.ts +23 -0
- package/services/HealthService.js +34 -0
- package/services/MainService.d.ts +6 -1
- package/services/MainService.js +12 -2
- package/services/index.d.ts +1 -0
- package/services/index.js +1 -0
- package/socketService.bak.d.ts +54 -0
- package/socketService.bak.js +99 -0
- package/socketService.d.ts +18 -45
- package/socketService.js +84 -57
package/services/AdminService.js
CHANGED
|
@@ -7,7 +7,7 @@ class AdminService {
|
|
|
7
7
|
/**
|
|
8
8
|
* Create a new admin
|
|
9
9
|
* @param requestBody
|
|
10
|
-
* @returns
|
|
10
|
+
* @returns AdminDto Admin created successfully.
|
|
11
11
|
* @throws ApiError
|
|
12
12
|
*/
|
|
13
13
|
static create(requestBody) {
|
|
@@ -16,16 +16,13 @@ class AdminService {
|
|
|
16
16
|
url: '/admins',
|
|
17
17
|
body: requestBody,
|
|
18
18
|
mediaType: 'application/json',
|
|
19
|
-
errors: {
|
|
20
|
-
401: `Unauthorized`,
|
|
21
|
-
},
|
|
22
19
|
});
|
|
23
20
|
}
|
|
24
21
|
/**
|
|
25
22
|
* Get all admins
|
|
26
23
|
* @param search Text to search for in name, surname, phone number or email
|
|
27
24
|
* @param order Sorting options
|
|
28
|
-
* @returns
|
|
25
|
+
* @returns AdminDto List of admins
|
|
29
26
|
* @throws ApiError
|
|
30
27
|
*/
|
|
31
28
|
static findAll(search, order) {
|
|
@@ -36,15 +33,12 @@ class AdminService {
|
|
|
36
33
|
'search': search,
|
|
37
34
|
'order': order,
|
|
38
35
|
},
|
|
39
|
-
errors: {
|
|
40
|
-
401: `Unauthorized`,
|
|
41
|
-
},
|
|
42
36
|
});
|
|
43
37
|
}
|
|
44
38
|
/**
|
|
45
39
|
* Get a single admin by ID
|
|
46
40
|
* @param id
|
|
47
|
-
* @returns
|
|
41
|
+
* @returns AdminDto Admin found
|
|
48
42
|
* @throws ApiError
|
|
49
43
|
*/
|
|
50
44
|
static findById(id) {
|
|
@@ -54,17 +48,13 @@ class AdminService {
|
|
|
54
48
|
path: {
|
|
55
49
|
'id': id,
|
|
56
50
|
},
|
|
57
|
-
errors: {
|
|
58
|
-
401: `Unauthorized`,
|
|
59
|
-
404: `Admin not found`,
|
|
60
|
-
},
|
|
61
51
|
});
|
|
62
52
|
}
|
|
63
53
|
/**
|
|
64
54
|
* Update an admin by ID
|
|
65
55
|
* @param id
|
|
66
56
|
* @param requestBody
|
|
67
|
-
* @returns
|
|
57
|
+
* @returns AdminDto Admin updated successfully.
|
|
68
58
|
* @throws ApiError
|
|
69
59
|
*/
|
|
70
60
|
static update(id, requestBody) {
|
|
@@ -76,16 +66,12 @@ class AdminService {
|
|
|
76
66
|
},
|
|
77
67
|
body: requestBody,
|
|
78
68
|
mediaType: 'application/json',
|
|
79
|
-
errors: {
|
|
80
|
-
401: `Unauthorized`,
|
|
81
|
-
404: `Admin not found`,
|
|
82
|
-
},
|
|
83
69
|
});
|
|
84
70
|
}
|
|
85
71
|
/**
|
|
86
72
|
* Delete an admin by ID
|
|
87
73
|
* @param id
|
|
88
|
-
* @returns
|
|
74
|
+
* @returns MessageResponseDto Admin deleted successfully.
|
|
89
75
|
* @throws ApiError
|
|
90
76
|
*/
|
|
91
77
|
static remove(id) {
|
|
@@ -95,10 +81,6 @@ class AdminService {
|
|
|
95
81
|
path: {
|
|
96
82
|
'id': id,
|
|
97
83
|
},
|
|
98
|
-
errors: {
|
|
99
|
-
401: `Unauthorized`,
|
|
100
|
-
404: `Admin not found`,
|
|
101
|
-
},
|
|
102
84
|
});
|
|
103
85
|
}
|
|
104
86
|
}
|
|
@@ -7,53 +7,53 @@ export declare class AdminTripsService {
|
|
|
7
7
|
/**
|
|
8
8
|
* Get all trips
|
|
9
9
|
* @param search
|
|
10
|
-
* @returns
|
|
10
|
+
* @returns TripDto List of trips
|
|
11
11
|
* @throws ApiError
|
|
12
12
|
*/
|
|
13
|
-
static findAll(search: string): CancelablePromise<
|
|
13
|
+
static findAll(search: string): CancelablePromise<Array<TripDto>>;
|
|
14
14
|
/**
|
|
15
15
|
* Create a new trip/service order
|
|
16
16
|
* @param requestBody
|
|
17
|
-
* @returns
|
|
17
|
+
* @returns TripDto Trip created successfully.
|
|
18
18
|
* @throws ApiError
|
|
19
19
|
*/
|
|
20
|
-
static create(requestBody: TripDto): CancelablePromise<
|
|
20
|
+
static create(requestBody: TripDto): CancelablePromise<TripDto>;
|
|
21
21
|
/**
|
|
22
22
|
* Get a single trip by ID
|
|
23
23
|
* @param id
|
|
24
|
-
* @returns
|
|
24
|
+
* @returns TripDto Trip found
|
|
25
25
|
* @throws ApiError
|
|
26
26
|
*/
|
|
27
|
-
static findById(id: number): CancelablePromise<
|
|
27
|
+
static findById(id: number): CancelablePromise<TripDto>;
|
|
28
28
|
/**
|
|
29
29
|
* Update a trip by ID
|
|
30
30
|
* @param id
|
|
31
31
|
* @param requestBody
|
|
32
|
-
* @returns
|
|
32
|
+
* @returns TripDto Trip updated successfully.
|
|
33
33
|
* @throws ApiError
|
|
34
34
|
*/
|
|
35
|
-
static update(id: number, requestBody: TripUpdateDto): CancelablePromise<
|
|
35
|
+
static update(id: number, requestBody: TripUpdateDto): CancelablePromise<TripDto>;
|
|
36
36
|
/**
|
|
37
37
|
* Update trip status
|
|
38
38
|
* @param id
|
|
39
|
-
* @returns
|
|
39
|
+
* @returns TripDto Trip status updated successfully.
|
|
40
40
|
* @throws ApiError
|
|
41
41
|
*/
|
|
42
|
-
static updateTripStatus(id: number): CancelablePromise<
|
|
42
|
+
static updateTripStatus(id: number): CancelablePromise<TripDto>;
|
|
43
43
|
/**
|
|
44
44
|
* Assign a driver to a trip
|
|
45
45
|
* @param id
|
|
46
46
|
* @param requestBody
|
|
47
|
-
* @returns
|
|
47
|
+
* @returns TripDto Driver assigned to trip successfully.
|
|
48
48
|
* @throws ApiError
|
|
49
49
|
*/
|
|
50
|
-
static assignDriver(id: number, requestBody: TripAssignDriverDto): CancelablePromise<
|
|
50
|
+
static assignDriver(id: number, requestBody: TripAssignDriverDto): CancelablePromise<TripDto>;
|
|
51
51
|
/**
|
|
52
52
|
* Update driver assignment mode for a trip
|
|
53
53
|
* @param id
|
|
54
54
|
* @param requestBody
|
|
55
|
-
* @returns
|
|
55
|
+
* @returns TripDto Driver assignment mode updated successfully.
|
|
56
56
|
* @throws ApiError
|
|
57
57
|
*/
|
|
58
|
-
static updateDriverAssignmentMode(id: number, requestBody: TripUpdateDriverAssignmentModeDto): CancelablePromise<
|
|
58
|
+
static updateDriverAssignmentMode(id: number, requestBody: TripUpdateDriverAssignmentModeDto): CancelablePromise<TripDto>;
|
|
59
59
|
}
|
|
@@ -7,7 +7,7 @@ class AdminTripsService {
|
|
|
7
7
|
/**
|
|
8
8
|
* Get all trips
|
|
9
9
|
* @param search
|
|
10
|
-
* @returns
|
|
10
|
+
* @returns TripDto List of trips
|
|
11
11
|
* @throws ApiError
|
|
12
12
|
*/
|
|
13
13
|
static findAll(search) {
|
|
@@ -17,15 +17,12 @@ class AdminTripsService {
|
|
|
17
17
|
query: {
|
|
18
18
|
'search': search,
|
|
19
19
|
},
|
|
20
|
-
errors: {
|
|
21
|
-
401: `Unauthorized`,
|
|
22
|
-
},
|
|
23
20
|
});
|
|
24
21
|
}
|
|
25
22
|
/**
|
|
26
23
|
* Create a new trip/service order
|
|
27
24
|
* @param requestBody
|
|
28
|
-
* @returns
|
|
25
|
+
* @returns TripDto Trip created successfully.
|
|
29
26
|
* @throws ApiError
|
|
30
27
|
*/
|
|
31
28
|
static create(requestBody) {
|
|
@@ -34,15 +31,12 @@ class AdminTripsService {
|
|
|
34
31
|
url: '/admins/trips',
|
|
35
32
|
body: requestBody,
|
|
36
33
|
mediaType: 'application/json',
|
|
37
|
-
errors: {
|
|
38
|
-
401: `Unauthorized`,
|
|
39
|
-
},
|
|
40
34
|
});
|
|
41
35
|
}
|
|
42
36
|
/**
|
|
43
37
|
* Get a single trip by ID
|
|
44
38
|
* @param id
|
|
45
|
-
* @returns
|
|
39
|
+
* @returns TripDto Trip found
|
|
46
40
|
* @throws ApiError
|
|
47
41
|
*/
|
|
48
42
|
static findById(id) {
|
|
@@ -52,17 +46,13 @@ class AdminTripsService {
|
|
|
52
46
|
path: {
|
|
53
47
|
'id': id,
|
|
54
48
|
},
|
|
55
|
-
errors: {
|
|
56
|
-
401: `Unauthorized`,
|
|
57
|
-
404: `Trip not found`,
|
|
58
|
-
},
|
|
59
49
|
});
|
|
60
50
|
}
|
|
61
51
|
/**
|
|
62
52
|
* Update a trip by ID
|
|
63
53
|
* @param id
|
|
64
54
|
* @param requestBody
|
|
65
|
-
* @returns
|
|
55
|
+
* @returns TripDto Trip updated successfully.
|
|
66
56
|
* @throws ApiError
|
|
67
57
|
*/
|
|
68
58
|
static update(id, requestBody) {
|
|
@@ -74,16 +64,12 @@ class AdminTripsService {
|
|
|
74
64
|
},
|
|
75
65
|
body: requestBody,
|
|
76
66
|
mediaType: 'application/json',
|
|
77
|
-
errors: {
|
|
78
|
-
401: `Unauthorized`,
|
|
79
|
-
404: `Trip not found`,
|
|
80
|
-
},
|
|
81
67
|
});
|
|
82
68
|
}
|
|
83
69
|
/**
|
|
84
70
|
* Update trip status
|
|
85
71
|
* @param id
|
|
86
|
-
* @returns
|
|
72
|
+
* @returns TripDto Trip status updated successfully.
|
|
87
73
|
* @throws ApiError
|
|
88
74
|
*/
|
|
89
75
|
static updateTripStatus(id) {
|
|
@@ -93,18 +79,13 @@ class AdminTripsService {
|
|
|
93
79
|
path: {
|
|
94
80
|
'id': id,
|
|
95
81
|
},
|
|
96
|
-
errors: {
|
|
97
|
-
400: `Invalid status`,
|
|
98
|
-
401: `Unauthorized`,
|
|
99
|
-
404: `Service order not found`,
|
|
100
|
-
},
|
|
101
82
|
});
|
|
102
83
|
}
|
|
103
84
|
/**
|
|
104
85
|
* Assign a driver to a trip
|
|
105
86
|
* @param id
|
|
106
87
|
* @param requestBody
|
|
107
|
-
* @returns
|
|
88
|
+
* @returns TripDto Driver assigned to trip successfully.
|
|
108
89
|
* @throws ApiError
|
|
109
90
|
*/
|
|
110
91
|
static assignDriver(id, requestBody) {
|
|
@@ -116,18 +97,13 @@ class AdminTripsService {
|
|
|
116
97
|
},
|
|
117
98
|
body: requestBody,
|
|
118
99
|
mediaType: 'application/json',
|
|
119
|
-
errors: {
|
|
120
|
-
400: `Trip status does not allow driver assignment`,
|
|
121
|
-
401: `Unauthorized`,
|
|
122
|
-
404: `Trip not found`,
|
|
123
|
-
},
|
|
124
100
|
});
|
|
125
101
|
}
|
|
126
102
|
/**
|
|
127
103
|
* Update driver assignment mode for a trip
|
|
128
104
|
* @param id
|
|
129
105
|
* @param requestBody
|
|
130
|
-
* @returns
|
|
106
|
+
* @returns TripDto Driver assignment mode updated successfully.
|
|
131
107
|
* @throws ApiError
|
|
132
108
|
*/
|
|
133
109
|
static updateDriverAssignmentMode(id, requestBody) {
|
|
@@ -139,11 +115,6 @@ class AdminTripsService {
|
|
|
139
115
|
},
|
|
140
116
|
body: requestBody,
|
|
141
117
|
mediaType: 'application/json',
|
|
142
|
-
errors: {
|
|
143
|
-
400: `Trip already has the specified driver assignment mode`,
|
|
144
|
-
401: `Unauthorized`,
|
|
145
|
-
404: `Trip not found`,
|
|
146
|
-
},
|
|
147
118
|
});
|
|
148
119
|
}
|
|
149
120
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CustomerLocationCreateDto } from '../models/CustomerLocationCreateDto';
|
|
2
2
|
import type { CustomerLocationDto } from '../models/CustomerLocationDto';
|
|
3
3
|
import type { CustomerLocationUpdateDto } from '../models/CustomerLocationUpdateDto';
|
|
4
|
+
import type { MessageResponseDto } from '../models/MessageResponseDto';
|
|
4
5
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
5
6
|
export declare class CustomerLocationsService {
|
|
6
7
|
/**
|
|
@@ -34,8 +35,8 @@ export declare class CustomerLocationsService {
|
|
|
34
35
|
/**
|
|
35
36
|
* Delete a user location
|
|
36
37
|
* @param locationId
|
|
37
|
-
* @returns
|
|
38
|
+
* @returns MessageResponseDto Location deleted successfully.
|
|
38
39
|
* @throws ApiError
|
|
39
40
|
*/
|
|
40
|
-
static deleteUserLocation(locationId: number): CancelablePromise<
|
|
41
|
+
static deleteUserLocation(locationId: number): CancelablePromise<MessageResponseDto>;
|
|
41
42
|
}
|
|
@@ -42,10 +42,6 @@ class CustomerLocationsService {
|
|
|
42
42
|
path: {
|
|
43
43
|
'locationId': locationId,
|
|
44
44
|
},
|
|
45
|
-
errors: {
|
|
46
|
-
401: `Unauthorized`,
|
|
47
|
-
404: `Location not found.`,
|
|
48
|
-
},
|
|
49
45
|
});
|
|
50
46
|
}
|
|
51
47
|
/**
|
|
@@ -64,16 +60,12 @@ class CustomerLocationsService {
|
|
|
64
60
|
},
|
|
65
61
|
body: requestBody,
|
|
66
62
|
mediaType: 'application/json',
|
|
67
|
-
errors: {
|
|
68
|
-
401: `Unauthorized`,
|
|
69
|
-
404: `Location not found.`,
|
|
70
|
-
},
|
|
71
63
|
});
|
|
72
64
|
}
|
|
73
65
|
/**
|
|
74
66
|
* Delete a user location
|
|
75
67
|
* @param locationId
|
|
76
|
-
* @returns
|
|
68
|
+
* @returns MessageResponseDto Location deleted successfully.
|
|
77
69
|
* @throws ApiError
|
|
78
70
|
*/
|
|
79
71
|
static deleteUserLocation(locationId) {
|
|
@@ -83,10 +75,6 @@ class CustomerLocationsService {
|
|
|
83
75
|
path: {
|
|
84
76
|
'locationId': locationId,
|
|
85
77
|
},
|
|
86
|
-
errors: {
|
|
87
|
-
401: `Unauthorized`,
|
|
88
|
-
404: `Location not found.`,
|
|
89
|
-
},
|
|
90
78
|
});
|
|
91
79
|
}
|
|
92
80
|
}
|
|
@@ -6,58 +6,58 @@ export declare class CustomerTripsService {
|
|
|
6
6
|
/**
|
|
7
7
|
* Request CUSTOMER APP trip
|
|
8
8
|
* @param requestBody
|
|
9
|
-
* @returns
|
|
9
|
+
* @returns TripDto Trip created successfully.
|
|
10
10
|
* @throws ApiError
|
|
11
11
|
*/
|
|
12
|
-
static create(requestBody: TripDto): CancelablePromise<
|
|
12
|
+
static create(requestBody: TripDto): CancelablePromise<TripDto>;
|
|
13
13
|
/**
|
|
14
14
|
* Get all trips for a customer
|
|
15
15
|
* @param search
|
|
16
|
-
* @returns
|
|
16
|
+
* @returns TripDto List of trips
|
|
17
17
|
* @throws ApiError
|
|
18
18
|
*/
|
|
19
|
-
static findAll(search: string): CancelablePromise<
|
|
19
|
+
static findAll(search: string): CancelablePromise<Array<TripDto>>;
|
|
20
20
|
/**
|
|
21
21
|
* Get active trip for a customer
|
|
22
|
-
* @returns
|
|
22
|
+
* @returns TripDto Active trip found
|
|
23
23
|
* @throws ApiError
|
|
24
24
|
*/
|
|
25
|
-
static getActiveTrip(): CancelablePromise<
|
|
25
|
+
static getActiveTrip(): CancelablePromise<TripDto>;
|
|
26
26
|
/**
|
|
27
27
|
* Get a single trip by ID
|
|
28
28
|
* @param id
|
|
29
|
-
* @returns
|
|
29
|
+
* @returns TripDto Trip found
|
|
30
30
|
* @throws ApiError
|
|
31
31
|
*/
|
|
32
|
-
static findById(id: number): CancelablePromise<
|
|
32
|
+
static findById(id: number): CancelablePromise<TripDto>;
|
|
33
33
|
/**
|
|
34
34
|
* Update a trip by ID
|
|
35
35
|
* @param id
|
|
36
36
|
* @param requestBody
|
|
37
|
-
* @returns
|
|
37
|
+
* @returns TripDto Trip updated successfully.
|
|
38
38
|
* @throws ApiError
|
|
39
39
|
*/
|
|
40
|
-
static update(id: number, requestBody: TripUpdateDto): CancelablePromise<
|
|
40
|
+
static update(id: number, requestBody: TripUpdateDto): CancelablePromise<TripDto>;
|
|
41
41
|
/**
|
|
42
42
|
* Update trip status
|
|
43
43
|
* @param id
|
|
44
44
|
* @param requestBody
|
|
45
|
-
* @returns
|
|
45
|
+
* @returns TripDto Trip status updated successfully.
|
|
46
46
|
* @throws ApiError
|
|
47
47
|
*/
|
|
48
|
-
static updateTripStatus(id: number, requestBody: TripUpdateTripsStatusDto): CancelablePromise<
|
|
48
|
+
static updateTripStatus(id: number, requestBody: TripUpdateTripsStatusDto): CancelablePromise<TripDto>;
|
|
49
49
|
/**
|
|
50
50
|
* Cancel a trip by ID (status must be CANCELED_PASSENGER)
|
|
51
51
|
* @param id
|
|
52
|
-
* @returns
|
|
52
|
+
* @returns TripDto Trip canceled successfully.
|
|
53
53
|
* @throws ApiError
|
|
54
54
|
*/
|
|
55
|
-
static cancelTrip(id: number): CancelablePromise<
|
|
55
|
+
static cancelTrip(id: number): CancelablePromise<TripDto>;
|
|
56
56
|
/**
|
|
57
57
|
* Execute an action on a trip
|
|
58
58
|
* @param id
|
|
59
|
-
* @returns
|
|
59
|
+
* @returns TripDto Trip action executed successfully.
|
|
60
60
|
* @throws ApiError
|
|
61
61
|
*/
|
|
62
|
-
static executeTripAction(id: number): CancelablePromise<
|
|
62
|
+
static executeTripAction(id: number): CancelablePromise<TripDto>;
|
|
63
63
|
}
|
|
@@ -7,7 +7,7 @@ class CustomerTripsService {
|
|
|
7
7
|
/**
|
|
8
8
|
* Request CUSTOMER APP trip
|
|
9
9
|
* @param requestBody
|
|
10
|
-
* @returns
|
|
10
|
+
* @returns TripDto Trip created successfully.
|
|
11
11
|
* @throws ApiError
|
|
12
12
|
*/
|
|
13
13
|
static create(requestBody) {
|
|
@@ -16,15 +16,12 @@ class CustomerTripsService {
|
|
|
16
16
|
url: '/customers/trips',
|
|
17
17
|
body: requestBody,
|
|
18
18
|
mediaType: 'application/json',
|
|
19
|
-
errors: {
|
|
20
|
-
401: `Unauthorized`,
|
|
21
|
-
},
|
|
22
19
|
});
|
|
23
20
|
}
|
|
24
21
|
/**
|
|
25
22
|
* Get all trips for a customer
|
|
26
23
|
* @param search
|
|
27
|
-
* @returns
|
|
24
|
+
* @returns TripDto List of trips
|
|
28
25
|
* @throws ApiError
|
|
29
26
|
*/
|
|
30
27
|
static findAll(search) {
|
|
@@ -34,30 +31,23 @@ class CustomerTripsService {
|
|
|
34
31
|
query: {
|
|
35
32
|
'search': search,
|
|
36
33
|
},
|
|
37
|
-
errors: {
|
|
38
|
-
401: `Unauthorized`,
|
|
39
|
-
},
|
|
40
34
|
});
|
|
41
35
|
}
|
|
42
36
|
/**
|
|
43
37
|
* Get active trip for a customer
|
|
44
|
-
* @returns
|
|
38
|
+
* @returns TripDto Active trip found
|
|
45
39
|
* @throws ApiError
|
|
46
40
|
*/
|
|
47
41
|
static getActiveTrip() {
|
|
48
42
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
49
43
|
method: 'GET',
|
|
50
44
|
url: '/customers/trips/active',
|
|
51
|
-
errors: {
|
|
52
|
-
401: `Unauthorized`,
|
|
53
|
-
404: `No active trip found`,
|
|
54
|
-
},
|
|
55
45
|
});
|
|
56
46
|
}
|
|
57
47
|
/**
|
|
58
48
|
* Get a single trip by ID
|
|
59
49
|
* @param id
|
|
60
|
-
* @returns
|
|
50
|
+
* @returns TripDto Trip found
|
|
61
51
|
* @throws ApiError
|
|
62
52
|
*/
|
|
63
53
|
static findById(id) {
|
|
@@ -67,17 +57,13 @@ class CustomerTripsService {
|
|
|
67
57
|
path: {
|
|
68
58
|
'id': id,
|
|
69
59
|
},
|
|
70
|
-
errors: {
|
|
71
|
-
401: `Unauthorized`,
|
|
72
|
-
404: `Trip not found`,
|
|
73
|
-
},
|
|
74
60
|
});
|
|
75
61
|
}
|
|
76
62
|
/**
|
|
77
63
|
* Update a trip by ID
|
|
78
64
|
* @param id
|
|
79
65
|
* @param requestBody
|
|
80
|
-
* @returns
|
|
66
|
+
* @returns TripDto Trip updated successfully.
|
|
81
67
|
* @throws ApiError
|
|
82
68
|
*/
|
|
83
69
|
static update(id, requestBody) {
|
|
@@ -89,17 +75,13 @@ class CustomerTripsService {
|
|
|
89
75
|
},
|
|
90
76
|
body: requestBody,
|
|
91
77
|
mediaType: 'application/json',
|
|
92
|
-
errors: {
|
|
93
|
-
401: `Unauthorized`,
|
|
94
|
-
404: `Trip not found`,
|
|
95
|
-
},
|
|
96
78
|
});
|
|
97
79
|
}
|
|
98
80
|
/**
|
|
99
81
|
* Update trip status
|
|
100
82
|
* @param id
|
|
101
83
|
* @param requestBody
|
|
102
|
-
* @returns
|
|
84
|
+
* @returns TripDto Trip status updated successfully.
|
|
103
85
|
* @throws ApiError
|
|
104
86
|
*/
|
|
105
87
|
static updateTripStatus(id, requestBody) {
|
|
@@ -111,17 +93,12 @@ class CustomerTripsService {
|
|
|
111
93
|
},
|
|
112
94
|
body: requestBody,
|
|
113
95
|
mediaType: 'application/json',
|
|
114
|
-
errors: {
|
|
115
|
-
400: `Invalid status`,
|
|
116
|
-
401: `Unauthorized`,
|
|
117
|
-
404: `Trip not found`,
|
|
118
|
-
},
|
|
119
96
|
});
|
|
120
97
|
}
|
|
121
98
|
/**
|
|
122
99
|
* Cancel a trip by ID (status must be CANCELED_PASSENGER)
|
|
123
100
|
* @param id
|
|
124
|
-
* @returns
|
|
101
|
+
* @returns TripDto Trip canceled successfully.
|
|
125
102
|
* @throws ApiError
|
|
126
103
|
*/
|
|
127
104
|
static cancelTrip(id) {
|
|
@@ -131,17 +108,12 @@ class CustomerTripsService {
|
|
|
131
108
|
path: {
|
|
132
109
|
'id': id,
|
|
133
110
|
},
|
|
134
|
-
errors: {
|
|
135
|
-
400: `Invalid status`,
|
|
136
|
-
401: `Unauthorized`,
|
|
137
|
-
404: `Trip not found`,
|
|
138
|
-
},
|
|
139
111
|
});
|
|
140
112
|
}
|
|
141
113
|
/**
|
|
142
114
|
* Execute an action on a trip
|
|
143
115
|
* @param id
|
|
144
|
-
* @returns
|
|
116
|
+
* @returns TripDto Trip action executed successfully.
|
|
145
117
|
* @throws ApiError
|
|
146
118
|
*/
|
|
147
119
|
static executeTripAction(id) {
|
|
@@ -151,11 +123,6 @@ class CustomerTripsService {
|
|
|
151
123
|
path: {
|
|
152
124
|
'id': id,
|
|
153
125
|
},
|
|
154
|
-
errors: {
|
|
155
|
-
400: `Invalid action`,
|
|
156
|
-
401: `Unauthorized`,
|
|
157
|
-
404: `Trip not found`,
|
|
158
|
-
},
|
|
159
126
|
});
|
|
160
127
|
}
|
|
161
128
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { CustomerDto } from '../models/CustomerDto';
|
|
2
2
|
import type { CustomerLoginDto } from '../models/CustomerLoginDto';
|
|
3
|
+
import type { CustomerLoginResponseDto } from '../models/CustomerLoginResponseDto';
|
|
4
|
+
import type { CustomerRegisterDto } from '../models/CustomerRegisterDto';
|
|
3
5
|
import type { CustomerUpdatedDto } from '../models/CustomerUpdatedDto';
|
|
4
6
|
import type { CustomerVerifyAccountDto } from '../models/CustomerVerifyAccountDto';
|
|
5
7
|
import type { GenerateResetCodeDto } from '../models/GenerateResetCodeDto';
|
|
6
8
|
import type { GenerateVerificationCodeDto } from '../models/GenerateVerificationCodeDto';
|
|
9
|
+
import type { MessageResponseDto } from '../models/MessageResponseDto';
|
|
7
10
|
import type { ResetPasswordDto } from '../models/ResetPasswordDto';
|
|
11
|
+
import type { TokensDto } from '../models/TokensDto';
|
|
8
12
|
import type { ValidateResetCodeDto } from '../models/ValidateResetCodeDto';
|
|
9
13
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
10
14
|
export declare class CustomersAuthService {
|
|
@@ -12,77 +16,75 @@ export declare class CustomersAuthService {
|
|
|
12
16
|
* Customer Login
|
|
13
17
|
* Login a customer using email or phone
|
|
14
18
|
* @param requestBody
|
|
15
|
-
* @returns
|
|
16
|
-
* @returns any Login successful
|
|
19
|
+
* @returns CustomerLoginResponseDto Login successful
|
|
17
20
|
* @throws ApiError
|
|
18
21
|
*/
|
|
19
|
-
static login(requestBody: CustomerLoginDto): CancelablePromise<
|
|
22
|
+
static login(requestBody: CustomerLoginDto): CancelablePromise<CustomerLoginResponseDto>;
|
|
20
23
|
/**
|
|
21
24
|
* Customer Register
|
|
22
25
|
* @param requestBody
|
|
23
26
|
* @returns CustomerDto Registration successful
|
|
24
|
-
* @returns any Registration successful
|
|
25
27
|
* @throws ApiError
|
|
26
28
|
*/
|
|
27
|
-
static register(requestBody:
|
|
29
|
+
static register(requestBody: CustomerRegisterDto): CancelablePromise<CustomerDto>;
|
|
28
30
|
/**
|
|
29
31
|
* Refresh Customer Token
|
|
30
|
-
* @returns
|
|
32
|
+
* @returns TokensDto Token refreshed successfully
|
|
31
33
|
* @throws ApiError
|
|
32
34
|
*/
|
|
33
|
-
static refreshToken(): CancelablePromise<
|
|
35
|
+
static refreshToken(): CancelablePromise<TokensDto>;
|
|
34
36
|
/**
|
|
35
37
|
* Get Current Customer
|
|
36
|
-
* @returns
|
|
38
|
+
* @returns CustomerDto User information retrieved
|
|
37
39
|
* @throws ApiError
|
|
38
40
|
*/
|
|
39
|
-
static me(): CancelablePromise<
|
|
41
|
+
static me(): CancelablePromise<CustomerDto>;
|
|
40
42
|
/**
|
|
41
43
|
* Update User Profile
|
|
42
44
|
* @param requestBody
|
|
43
|
-
* @returns
|
|
45
|
+
* @returns CustomerDto User profile updated successfully
|
|
44
46
|
* @throws ApiError
|
|
45
47
|
*/
|
|
46
|
-
static updateProfile(requestBody: CustomerUpdatedDto): CancelablePromise<
|
|
48
|
+
static updateProfile(requestBody: CustomerUpdatedDto): CancelablePromise<CustomerDto>;
|
|
47
49
|
/**
|
|
48
50
|
* User Logout
|
|
49
|
-
* @returns
|
|
51
|
+
* @returns MessageResponseDto Logout successful
|
|
50
52
|
* @throws ApiError
|
|
51
53
|
*/
|
|
52
|
-
static logout(): CancelablePromise<
|
|
54
|
+
static logout(): CancelablePromise<MessageResponseDto>;
|
|
53
55
|
/**
|
|
54
56
|
* Generate Password Reset Code
|
|
55
57
|
* @param requestBody
|
|
56
|
-
* @returns
|
|
58
|
+
* @returns MessageResponseDto Reset code generated and sent successfully
|
|
57
59
|
* @throws ApiError
|
|
58
60
|
*/
|
|
59
|
-
static generateResetCode(requestBody: GenerateResetCodeDto): CancelablePromise<
|
|
61
|
+
static generateResetCode(requestBody: GenerateResetCodeDto): CancelablePromise<MessageResponseDto>;
|
|
60
62
|
/**
|
|
61
63
|
* Validate Password Reset Code
|
|
62
64
|
* @param requestBody
|
|
63
|
-
* @returns
|
|
65
|
+
* @returns MessageResponseDto Reset code is valid
|
|
64
66
|
* @throws ApiError
|
|
65
67
|
*/
|
|
66
|
-
static validateResetCode(requestBody: ValidateResetCodeDto): CancelablePromise<
|
|
68
|
+
static validateResetCode(requestBody: ValidateResetCodeDto): CancelablePromise<MessageResponseDto>;
|
|
67
69
|
/**
|
|
68
70
|
* Reset Customer Password
|
|
69
71
|
* @param requestBody
|
|
70
|
-
* @returns
|
|
72
|
+
* @returns MessageResponseDto Password reset successfully
|
|
71
73
|
* @throws ApiError
|
|
72
74
|
*/
|
|
73
|
-
static resetPassword(requestBody: ResetPasswordDto): CancelablePromise<
|
|
75
|
+
static resetPassword(requestBody: ResetPasswordDto): CancelablePromise<MessageResponseDto>;
|
|
74
76
|
/**
|
|
75
77
|
* Generate Customer Verification Code
|
|
76
78
|
* @param requestBody
|
|
77
|
-
* @returns
|
|
79
|
+
* @returns MessageResponseDto Verification code generated and sent successfully
|
|
78
80
|
* @throws ApiError
|
|
79
81
|
*/
|
|
80
|
-
static generateVerificationCode(requestBody: GenerateVerificationCodeDto): CancelablePromise<
|
|
82
|
+
static generateVerificationCode(requestBody: GenerateVerificationCodeDto): CancelablePromise<MessageResponseDto>;
|
|
81
83
|
/**
|
|
82
84
|
* Verify Customer Account
|
|
83
85
|
* @param requestBody
|
|
84
|
-
* @returns
|
|
86
|
+
* @returns MessageResponseDto User verified successfully
|
|
85
87
|
* @throws ApiError
|
|
86
88
|
*/
|
|
87
|
-
static verifyAccount(requestBody: CustomerVerifyAccountDto): CancelablePromise<
|
|
89
|
+
static verifyAccount(requestBody: CustomerVerifyAccountDto): CancelablePromise<MessageResponseDto>;
|
|
88
90
|
}
|