@dapex-tech/elite-online-services 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 -38
- package/models/CustomerLoginDto.d.ts +1 -1
- package/models/CustomerLoginResponseDto.d.ts +38 -0
- package/models/CustomerLoginResponseDto.js +2 -0
- package/models/CustomerRegisterDto.d.ts +26 -0
- package/models/CustomerRegisterDto.js +2 -0
- package/models/CustomerTripActions.d.ts +3 -0
- package/models/CustomerTripActions.js +11 -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 +10 -0
- package/models/index.js +10 -0
- package/package.json +1 -1
- 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 +19 -17
- package/services/CustomerTripsService.js +12 -43
- 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 +19 -45
- package/socketService.js +84 -57
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/types/realtime/driver-execute-trip-action.d.ts +5 -0
- package/types/realtime/driver-execute-trip-action.js +2 -0
- package/types/realtime/driver-status.d.ts +8 -0
- package/types/realtime/driver-status.js +2 -0
- package/types/realtime/index.d.ts +2 -0
- package/types/realtime/index.js +18 -0
|
@@ -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
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CustomerTripActions } from '../models/CustomerTripActions';
|
|
1
2
|
import type { TripDto } from '../models/TripDto';
|
|
2
3
|
import type { TripUpdateDto } from '../models/TripUpdateDto';
|
|
3
4
|
import type { TripUpdateTripsStatusDto } from '../models/TripUpdateTripsStatusDto';
|
|
@@ -6,58 +7,59 @@ export declare class CustomerTripsService {
|
|
|
6
7
|
/**
|
|
7
8
|
* Request CUSTOMER APP trip
|
|
8
9
|
* @param requestBody
|
|
9
|
-
* @returns
|
|
10
|
+
* @returns TripDto Trip created successfully.
|
|
10
11
|
* @throws ApiError
|
|
11
12
|
*/
|
|
12
|
-
static create(requestBody: TripDto): CancelablePromise<
|
|
13
|
+
static create(requestBody: TripDto): CancelablePromise<TripDto>;
|
|
13
14
|
/**
|
|
14
15
|
* Get all trips for a customer
|
|
15
16
|
* @param search
|
|
16
|
-
* @returns
|
|
17
|
+
* @returns TripDto List of trips
|
|
17
18
|
* @throws ApiError
|
|
18
19
|
*/
|
|
19
|
-
static findAll(search: string): CancelablePromise<
|
|
20
|
+
static findAll(search: string): CancelablePromise<Array<TripDto>>;
|
|
20
21
|
/**
|
|
21
22
|
* Get active trip for a customer
|
|
22
|
-
* @returns
|
|
23
|
+
* @returns TripDto Active trip found
|
|
23
24
|
* @throws ApiError
|
|
24
25
|
*/
|
|
25
|
-
static getActiveTrip(): CancelablePromise<
|
|
26
|
+
static getActiveTrip(): CancelablePromise<TripDto>;
|
|
26
27
|
/**
|
|
27
28
|
* Get a single trip by ID
|
|
28
29
|
* @param id
|
|
29
|
-
* @returns
|
|
30
|
+
* @returns TripDto Trip found
|
|
30
31
|
* @throws ApiError
|
|
31
32
|
*/
|
|
32
|
-
static findById(id: number): CancelablePromise<
|
|
33
|
+
static findById(id: number): CancelablePromise<TripDto>;
|
|
33
34
|
/**
|
|
34
35
|
* Update a trip by ID
|
|
35
36
|
* @param id
|
|
36
37
|
* @param requestBody
|
|
37
|
-
* @returns
|
|
38
|
+
* @returns TripDto Trip updated successfully.
|
|
38
39
|
* @throws ApiError
|
|
39
40
|
*/
|
|
40
|
-
static update(id: number, requestBody: TripUpdateDto): CancelablePromise<
|
|
41
|
+
static update(id: number, requestBody: TripUpdateDto): CancelablePromise<TripDto>;
|
|
41
42
|
/**
|
|
42
43
|
* Update trip status
|
|
43
44
|
* @param id
|
|
44
45
|
* @param requestBody
|
|
45
|
-
* @returns
|
|
46
|
+
* @returns TripDto Trip status updated successfully.
|
|
46
47
|
* @throws ApiError
|
|
47
48
|
*/
|
|
48
|
-
static updateTripStatus(id: number, requestBody: TripUpdateTripsStatusDto): CancelablePromise<
|
|
49
|
+
static updateTripStatus(id: number, requestBody: TripUpdateTripsStatusDto): CancelablePromise<TripDto>;
|
|
49
50
|
/**
|
|
50
51
|
* Cancel a trip by ID (status must be CANCELED_PASSENGER)
|
|
51
52
|
* @param id
|
|
52
|
-
* @returns
|
|
53
|
+
* @returns TripDto Trip canceled successfully.
|
|
53
54
|
* @throws ApiError
|
|
54
55
|
*/
|
|
55
|
-
static cancelTrip(id: number): CancelablePromise<
|
|
56
|
+
static cancelTrip(id: number): CancelablePromise<TripDto>;
|
|
56
57
|
/**
|
|
57
58
|
* Execute an action on a trip
|
|
58
|
-
* @param id
|
|
59
|
-
* @
|
|
59
|
+
* @param id Trip ID
|
|
60
|
+
* @param action Action to be executed on the trip
|
|
61
|
+
* @returns TripDto Trip action executed successfully.
|
|
60
62
|
* @throws ApiError
|
|
61
63
|
*/
|
|
62
|
-
static executeTripAction(id: number): CancelablePromise<
|
|
64
|
+
static executeTripAction(id: number, action: CustomerTripActions): CancelablePromise<TripDto>;
|
|
63
65
|
}
|
|
@@ -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,30 +108,22 @@ 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
|
-
* @param id
|
|
144
|
-
* @
|
|
115
|
+
* @param id Trip ID
|
|
116
|
+
* @param action Action to be executed on the trip
|
|
117
|
+
* @returns TripDto Trip action executed successfully.
|
|
145
118
|
* @throws ApiError
|
|
146
119
|
*/
|
|
147
|
-
static executeTripAction(id) {
|
|
120
|
+
static executeTripAction(id, action) {
|
|
148
121
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
149
122
|
method: 'PATCH',
|
|
150
123
|
url: '/customers/trips/{id}/action/{action}',
|
|
151
124
|
path: {
|
|
152
125
|
'id': id,
|
|
153
|
-
|
|
154
|
-
errors: {
|
|
155
|
-
400: `Invalid action`,
|
|
156
|
-
401: `Unauthorized`,
|
|
157
|
-
404: `Trip not found`,
|
|
126
|
+
'action': action,
|
|
158
127
|
},
|
|
159
128
|
});
|
|
160
129
|
}
|
|
@@ -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
|
}
|
|
@@ -8,8 +8,7 @@ class CustomersAuthService {
|
|
|
8
8
|
* Customer Login
|
|
9
9
|
* Login a customer using email or phone
|
|
10
10
|
* @param requestBody
|
|
11
|
-
* @returns
|
|
12
|
-
* @returns any Login successful
|
|
11
|
+
* @returns CustomerLoginResponseDto Login successful
|
|
13
12
|
* @throws ApiError
|
|
14
13
|
*/
|
|
15
14
|
static login(requestBody) {
|
|
@@ -18,16 +17,12 @@ class CustomersAuthService {
|
|
|
18
17
|
url: '/auth/customers/login',
|
|
19
18
|
body: requestBody,
|
|
20
19
|
mediaType: 'application/json',
|
|
21
|
-
errors: {
|
|
22
|
-
401: `Invalid credentials`,
|
|
23
|
-
},
|
|
24
20
|
});
|
|
25
21
|
}
|
|
26
22
|
/**
|
|
27
23
|
* Customer Register
|
|
28
24
|
* @param requestBody
|
|
29
25
|
* @returns CustomerDto Registration successful
|
|
30
|
-
* @returns any Registration successful
|
|
31
26
|
* @throws ApiError
|
|
32
27
|
*/
|
|
33
28
|
static register(requestBody) {
|
|
@@ -36,43 +31,34 @@ class CustomersAuthService {
|
|
|
36
31
|
url: '/auth/customers/register',
|
|
37
32
|
body: requestBody,
|
|
38
33
|
mediaType: 'application/json',
|
|
39
|
-
errors: {
|
|
40
|
-
400: `Bad Request`,
|
|
41
|
-
},
|
|
42
34
|
});
|
|
43
35
|
}
|
|
44
36
|
/**
|
|
45
37
|
* Refresh Customer Token
|
|
46
|
-
* @returns
|
|
38
|
+
* @returns TokensDto Token refreshed successfully
|
|
47
39
|
* @throws ApiError
|
|
48
40
|
*/
|
|
49
41
|
static refreshToken() {
|
|
50
42
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
51
43
|
method: 'GET',
|
|
52
44
|
url: '/auth/customers/refresh-token',
|
|
53
|
-
errors: {
|
|
54
|
-
401: `Unauthorized`,
|
|
55
|
-
},
|
|
56
45
|
});
|
|
57
46
|
}
|
|
58
47
|
/**
|
|
59
48
|
* Get Current Customer
|
|
60
|
-
* @returns
|
|
49
|
+
* @returns CustomerDto User information retrieved
|
|
61
50
|
* @throws ApiError
|
|
62
51
|
*/
|
|
63
52
|
static me() {
|
|
64
53
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
65
54
|
method: 'GET',
|
|
66
55
|
url: '/auth/customers/me',
|
|
67
|
-
errors: {
|
|
68
|
-
401: `Unauthorized`,
|
|
69
|
-
},
|
|
70
56
|
});
|
|
71
57
|
}
|
|
72
58
|
/**
|
|
73
59
|
* Update User Profile
|
|
74
60
|
* @param requestBody
|
|
75
|
-
* @returns
|
|
61
|
+
* @returns CustomerDto User profile updated successfully
|
|
76
62
|
* @throws ApiError
|
|
77
63
|
*/
|
|
78
64
|
static updateProfile(requestBody) {
|
|
@@ -81,29 +67,23 @@ class CustomersAuthService {
|
|
|
81
67
|
url: '/auth/customers/update-profile',
|
|
82
68
|
body: requestBody,
|
|
83
69
|
mediaType: 'application/json',
|
|
84
|
-
errors: {
|
|
85
|
-
401: `Unauthorized`,
|
|
86
|
-
},
|
|
87
70
|
});
|
|
88
71
|
}
|
|
89
72
|
/**
|
|
90
73
|
* User Logout
|
|
91
|
-
* @returns
|
|
74
|
+
* @returns MessageResponseDto Logout successful
|
|
92
75
|
* @throws ApiError
|
|
93
76
|
*/
|
|
94
77
|
static logout() {
|
|
95
78
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
96
79
|
method: 'POST',
|
|
97
80
|
url: '/auth/customers/logout',
|
|
98
|
-
errors: {
|
|
99
|
-
401: `Unauthorized`,
|
|
100
|
-
},
|
|
101
81
|
});
|
|
102
82
|
}
|
|
103
83
|
/**
|
|
104
84
|
* Generate Password Reset Code
|
|
105
85
|
* @param requestBody
|
|
106
|
-
* @returns
|
|
86
|
+
* @returns MessageResponseDto Reset code generated and sent successfully
|
|
107
87
|
* @throws ApiError
|
|
108
88
|
*/
|
|
109
89
|
static generateResetCode(requestBody) {
|
|
@@ -112,15 +92,12 @@ class CustomersAuthService {
|
|
|
112
92
|
url: '/auth/customers/forgot-password',
|
|
113
93
|
body: requestBody,
|
|
114
94
|
mediaType: 'application/json',
|
|
115
|
-
errors: {
|
|
116
|
-
401: `User not found`,
|
|
117
|
-
},
|
|
118
95
|
});
|
|
119
96
|
}
|
|
120
97
|
/**
|
|
121
98
|
* Validate Password Reset Code
|
|
122
99
|
* @param requestBody
|
|
123
|
-
* @returns
|
|
100
|
+
* @returns MessageResponseDto Reset code is valid
|
|
124
101
|
* @throws ApiError
|
|
125
102
|
*/
|
|
126
103
|
static validateResetCode(requestBody) {
|
|
@@ -129,16 +106,12 @@ class CustomersAuthService {
|
|
|
129
106
|
url: '/auth/customers/validate-reset-code',
|
|
130
107
|
body: requestBody,
|
|
131
108
|
mediaType: 'application/json',
|
|
132
|
-
errors: {
|
|
133
|
-
401: `User not found`,
|
|
134
|
-
403: `Invalid or expired reset code`,
|
|
135
|
-
},
|
|
136
109
|
});
|
|
137
110
|
}
|
|
138
111
|
/**
|
|
139
112
|
* Reset Customer Password
|
|
140
113
|
* @param requestBody
|
|
141
|
-
* @returns
|
|
114
|
+
* @returns MessageResponseDto Password reset successfully
|
|
142
115
|
* @throws ApiError
|
|
143
116
|
*/
|
|
144
117
|
static resetPassword(requestBody) {
|
|
@@ -147,15 +120,12 @@ class CustomersAuthService {
|
|
|
147
120
|
url: '/auth/customers/reset-password',
|
|
148
121
|
body: requestBody,
|
|
149
122
|
mediaType: 'application/json',
|
|
150
|
-
errors: {
|
|
151
|
-
401: `User not found`,
|
|
152
|
-
},
|
|
153
123
|
});
|
|
154
124
|
}
|
|
155
125
|
/**
|
|
156
126
|
* Generate Customer Verification Code
|
|
157
127
|
* @param requestBody
|
|
158
|
-
* @returns
|
|
128
|
+
* @returns MessageResponseDto Verification code generated and sent successfully
|
|
159
129
|
* @throws ApiError
|
|
160
130
|
*/
|
|
161
131
|
static generateVerificationCode(requestBody) {
|
|
@@ -164,15 +134,12 @@ class CustomersAuthService {
|
|
|
164
134
|
url: '/auth/customers/generate-verification-code',
|
|
165
135
|
body: requestBody,
|
|
166
136
|
mediaType: 'application/json',
|
|
167
|
-
errors: {
|
|
168
|
-
401: `User not found`,
|
|
169
|
-
},
|
|
170
137
|
});
|
|
171
138
|
}
|
|
172
139
|
/**
|
|
173
140
|
* Verify Customer Account
|
|
174
141
|
* @param requestBody
|
|
175
|
-
* @returns
|
|
142
|
+
* @returns MessageResponseDto User verified successfully
|
|
176
143
|
* @throws ApiError
|
|
177
144
|
*/
|
|
178
145
|
static verifyAccount(requestBody) {
|
|
@@ -181,10 +148,6 @@ class CustomersAuthService {
|
|
|
181
148
|
url: '/auth/customers/verify-account',
|
|
182
149
|
body: requestBody,
|
|
183
150
|
mediaType: 'application/json',
|
|
184
|
-
errors: {
|
|
185
|
-
401: `User not found`,
|
|
186
|
-
403: `Invalid or expired verification code`,
|
|
187
|
-
},
|
|
188
151
|
});
|
|
189
152
|
}
|
|
190
153
|
}
|
|
@@ -1,17 +1,27 @@
|
|
|
1
|
+
import type { CustomerDto } from '../models/CustomerDto';
|
|
1
2
|
import type { CustomerUpdatedDto } from '../models/CustomerUpdatedDto';
|
|
3
|
+
import type { MessageResponseDto } from '../models/MessageResponseDto';
|
|
4
|
+
import type { UpdateFcmTokenDto } from '../models/UpdateFcmTokenDto';
|
|
2
5
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
3
6
|
export declare class CustomersService {
|
|
4
7
|
/**
|
|
5
8
|
* Update a customer by ID
|
|
6
9
|
* @param requestBody
|
|
7
|
-
* @returns
|
|
10
|
+
* @returns CustomerDto Customer updated successfully.
|
|
8
11
|
* @throws ApiError
|
|
9
12
|
*/
|
|
10
|
-
static updateProfile(requestBody: CustomerUpdatedDto): CancelablePromise<
|
|
13
|
+
static updateProfile(requestBody: CustomerUpdatedDto): CancelablePromise<CustomerDto>;
|
|
11
14
|
/**
|
|
12
15
|
* Delete a customer by ID
|
|
13
|
-
* @returns
|
|
16
|
+
* @returns MessageResponseDto User deleted successfully.
|
|
14
17
|
* @throws ApiError
|
|
15
18
|
*/
|
|
16
|
-
static deleteAccount(): CancelablePromise<
|
|
19
|
+
static deleteAccount(): CancelablePromise<MessageResponseDto>;
|
|
20
|
+
/**
|
|
21
|
+
* Update a customer FCM token
|
|
22
|
+
* @param requestBody
|
|
23
|
+
* @returns MessageResponseDto FCM token updated successfully.
|
|
24
|
+
* @throws ApiError
|
|
25
|
+
*/
|
|
26
|
+
static updateCustomerFcmToken(requestBody: UpdateFcmTokenDto): CancelablePromise<MessageResponseDto>;
|
|
17
27
|
}
|
|
@@ -7,7 +7,7 @@ class CustomersService {
|
|
|
7
7
|
/**
|
|
8
8
|
* Update a customer by ID
|
|
9
9
|
* @param requestBody
|
|
10
|
-
* @returns
|
|
10
|
+
* @returns CustomerDto Customer updated successfully.
|
|
11
11
|
* @throws ApiError
|
|
12
12
|
*/
|
|
13
13
|
static updateProfile(requestBody) {
|
|
@@ -16,24 +16,34 @@ class CustomersService {
|
|
|
16
16
|
url: '/customers/update-profile',
|
|
17
17
|
body: requestBody,
|
|
18
18
|
mediaType: 'application/json',
|
|
19
|
-
errors: {
|
|
20
|
-
401: `Unauthorized`,
|
|
21
|
-
404: `Customer not found.`,
|
|
22
|
-
},
|
|
23
19
|
});
|
|
24
20
|
}
|
|
25
21
|
/**
|
|
26
22
|
* Delete a customer by ID
|
|
27
|
-
* @returns
|
|
23
|
+
* @returns MessageResponseDto User deleted successfully.
|
|
28
24
|
* @throws ApiError
|
|
29
25
|
*/
|
|
30
26
|
static deleteAccount() {
|
|
31
27
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
32
28
|
method: 'DELETE',
|
|
33
29
|
url: '/customers/delete-account',
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Update a customer FCM token
|
|
34
|
+
* @param requestBody
|
|
35
|
+
* @returns MessageResponseDto FCM token updated successfully.
|
|
36
|
+
* @throws ApiError
|
|
37
|
+
*/
|
|
38
|
+
static updateCustomerFcmToken(requestBody) {
|
|
39
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
40
|
+
method: 'PATCH',
|
|
41
|
+
url: '/customers/fcm-token',
|
|
42
|
+
body: requestBody,
|
|
43
|
+
mediaType: 'application/json',
|
|
34
44
|
errors: {
|
|
35
45
|
401: `Unauthorized`,
|
|
36
|
-
404: `
|
|
46
|
+
404: `Customer not found.`,
|
|
37
47
|
},
|
|
38
48
|
});
|
|
39
49
|
}
|