@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/models/TripDto.d.ts
CHANGED
|
@@ -17,15 +17,15 @@ export type TripDto = {
|
|
|
17
17
|
/**
|
|
18
18
|
* Origin location type
|
|
19
19
|
*/
|
|
20
|
-
originLocationType
|
|
20
|
+
originLocationType: number;
|
|
21
21
|
/**
|
|
22
22
|
* Origin latitude
|
|
23
23
|
*/
|
|
24
|
-
originLatitude
|
|
24
|
+
originLatitude: string;
|
|
25
25
|
/**
|
|
26
26
|
* Origin longitude
|
|
27
27
|
*/
|
|
28
|
-
originLongitude
|
|
28
|
+
originLongitude: string;
|
|
29
29
|
/**
|
|
30
30
|
* Origin address
|
|
31
31
|
*/
|
|
@@ -37,15 +37,15 @@ 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
|
*/
|
|
44
|
-
destinationLatitude
|
|
44
|
+
destinationLatitude: string;
|
|
45
45
|
/**
|
|
46
46
|
* Destination longitude
|
|
47
47
|
*/
|
|
48
|
-
destinationLongitude
|
|
48
|
+
destinationLongitude: string;
|
|
49
49
|
/**
|
|
50
50
|
* Destination address
|
|
51
51
|
*/
|
package/models/index.d.ts
CHANGED
|
@@ -1,26 +1,35 @@
|
|
|
1
|
+
export * from './AdminCreateDto';
|
|
1
2
|
export * from './AdminDto';
|
|
2
3
|
export * from './AdminLoginDto';
|
|
4
|
+
export * from './AdminLoginResponseDto';
|
|
3
5
|
export * from './AdminUpdateDto';
|
|
4
6
|
export * from './CustomerDto';
|
|
5
7
|
export * from './CustomerLocationCreateDto';
|
|
6
8
|
export * from './CustomerLocationDto';
|
|
7
9
|
export * from './CustomerLocationUpdateDto';
|
|
8
10
|
export * from './CustomerLoginDto';
|
|
11
|
+
export * from './CustomerLoginResponseDto';
|
|
12
|
+
export * from './CustomerRegisterDto';
|
|
9
13
|
export * from './CustomerUpdatedDto';
|
|
10
14
|
export * from './CustomerVerifyAccountDto';
|
|
15
|
+
export * from './DriverCreateDto';
|
|
11
16
|
export * from './DriverDto';
|
|
12
17
|
export * from './DriverLoginDto';
|
|
18
|
+
export * from './DriverLoginResponseDto';
|
|
13
19
|
export * from './DriverTripActions';
|
|
14
20
|
export * from './DriverUpdateDto';
|
|
15
21
|
export * from './GenerateResetCodeDto';
|
|
16
22
|
export * from './GenerateVerificationCodeDto';
|
|
23
|
+
export * from './MessageResponseDto';
|
|
17
24
|
export * from './OrderDto';
|
|
18
25
|
export * from './PaymentDto';
|
|
19
26
|
export * from './ResetPasswordDto';
|
|
27
|
+
export * from './TokensDto';
|
|
20
28
|
export * from './TripAssignDriverDto';
|
|
21
29
|
export * from './TripDto';
|
|
22
30
|
export * from './TripLocationPointDto';
|
|
23
31
|
export * from './TripUpdateDriverAssignmentModeDto';
|
|
24
32
|
export * from './TripUpdateDto';
|
|
25
33
|
export * from './TripUpdateTripsStatusDto';
|
|
34
|
+
export * from './UpdateFcmTokenDto';
|
|
26
35
|
export * from './ValidateResetCodeDto';
|
package/models/index.js
CHANGED
|
@@ -14,29 +14,38 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AdminCreateDto"), exports);
|
|
17
18
|
__exportStar(require("./AdminDto"), exports);
|
|
18
19
|
__exportStar(require("./AdminLoginDto"), exports);
|
|
20
|
+
__exportStar(require("./AdminLoginResponseDto"), exports);
|
|
19
21
|
__exportStar(require("./AdminUpdateDto"), exports);
|
|
20
22
|
__exportStar(require("./CustomerDto"), exports);
|
|
21
23
|
__exportStar(require("./CustomerLocationCreateDto"), exports);
|
|
22
24
|
__exportStar(require("./CustomerLocationDto"), exports);
|
|
23
25
|
__exportStar(require("./CustomerLocationUpdateDto"), exports);
|
|
24
26
|
__exportStar(require("./CustomerLoginDto"), exports);
|
|
27
|
+
__exportStar(require("./CustomerLoginResponseDto"), exports);
|
|
28
|
+
__exportStar(require("./CustomerRegisterDto"), exports);
|
|
25
29
|
__exportStar(require("./CustomerUpdatedDto"), exports);
|
|
26
30
|
__exportStar(require("./CustomerVerifyAccountDto"), exports);
|
|
31
|
+
__exportStar(require("./DriverCreateDto"), exports);
|
|
27
32
|
__exportStar(require("./DriverDto"), exports);
|
|
28
33
|
__exportStar(require("./DriverLoginDto"), exports);
|
|
34
|
+
__exportStar(require("./DriverLoginResponseDto"), exports);
|
|
29
35
|
__exportStar(require("./DriverTripActions"), exports);
|
|
30
36
|
__exportStar(require("./DriverUpdateDto"), exports);
|
|
31
37
|
__exportStar(require("./GenerateResetCodeDto"), exports);
|
|
32
38
|
__exportStar(require("./GenerateVerificationCodeDto"), exports);
|
|
39
|
+
__exportStar(require("./MessageResponseDto"), exports);
|
|
33
40
|
__exportStar(require("./OrderDto"), exports);
|
|
34
41
|
__exportStar(require("./PaymentDto"), exports);
|
|
35
42
|
__exportStar(require("./ResetPasswordDto"), exports);
|
|
43
|
+
__exportStar(require("./TokensDto"), exports);
|
|
36
44
|
__exportStar(require("./TripAssignDriverDto"), exports);
|
|
37
45
|
__exportStar(require("./TripDto"), exports);
|
|
38
46
|
__exportStar(require("./TripLocationPointDto"), exports);
|
|
39
47
|
__exportStar(require("./TripUpdateDriverAssignmentModeDto"), exports);
|
|
40
48
|
__exportStar(require("./TripUpdateDto"), exports);
|
|
41
49
|
__exportStar(require("./TripUpdateTripsStatusDto"), exports);
|
|
50
|
+
__exportStar(require("./UpdateFcmTokenDto"), exports);
|
|
42
51
|
__exportStar(require("./ValidateResetCodeDto"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dapex-tech/elite-online-services",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"private": false,
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"*"
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"socket.io-client": "^4.8.1"
|
|
14
|
+
"socket.io-client": "^4.8.1",
|
|
15
|
+
"axios": "^1.13.2"
|
|
15
16
|
},
|
|
16
17
|
"devDependencies": {
|
|
17
18
|
"@types/socket.io-client": "^3.0.0",
|
|
@@ -1,53 +1,57 @@
|
|
|
1
|
+
import type { AdminDto } from '../models/AdminDto';
|
|
1
2
|
import type { AdminLoginDto } from '../models/AdminLoginDto';
|
|
3
|
+
import type { AdminLoginResponseDto } from '../models/AdminLoginResponseDto';
|
|
2
4
|
import type { GenerateResetCodeDto } from '../models/GenerateResetCodeDto';
|
|
5
|
+
import type { MessageResponseDto } from '../models/MessageResponseDto';
|
|
3
6
|
import type { ResetPasswordDto } from '../models/ResetPasswordDto';
|
|
7
|
+
import type { TokensDto } from '../models/TokensDto';
|
|
4
8
|
import type { ValidateResetCodeDto } from '../models/ValidateResetCodeDto';
|
|
5
9
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
6
10
|
export declare class AdminAuthService {
|
|
7
11
|
/**
|
|
8
12
|
* Admin Login
|
|
9
13
|
* @param requestBody
|
|
10
|
-
* @returns
|
|
14
|
+
* @returns AdminLoginResponseDto Login successful
|
|
11
15
|
* @throws ApiError
|
|
12
16
|
*/
|
|
13
|
-
static login(requestBody: AdminLoginDto): CancelablePromise<
|
|
17
|
+
static login(requestBody: AdminLoginDto): CancelablePromise<AdminLoginResponseDto>;
|
|
14
18
|
/**
|
|
15
|
-
* Refresh
|
|
16
|
-
* @returns
|
|
19
|
+
* Refresh Admin Token
|
|
20
|
+
* @returns TokensDto Token refreshed successfully
|
|
17
21
|
* @throws ApiError
|
|
18
22
|
*/
|
|
19
|
-
static refreshToken(): CancelablePromise<
|
|
23
|
+
static refreshToken(): CancelablePromise<TokensDto>;
|
|
20
24
|
/**
|
|
21
|
-
* Get
|
|
22
|
-
* @returns
|
|
25
|
+
* Get Admin Profile
|
|
26
|
+
* @returns AdminDto Admin profile retrieved successfully
|
|
23
27
|
* @throws ApiError
|
|
24
28
|
*/
|
|
25
|
-
static me(): CancelablePromise<
|
|
29
|
+
static me(): CancelablePromise<AdminDto>;
|
|
26
30
|
/**
|
|
27
31
|
* Admin Logout
|
|
28
|
-
* @returns
|
|
32
|
+
* @returns MessageResponseDto Logout successful
|
|
29
33
|
* @throws ApiError
|
|
30
34
|
*/
|
|
31
|
-
static logout(): CancelablePromise<
|
|
35
|
+
static logout(): CancelablePromise<MessageResponseDto>;
|
|
32
36
|
/**
|
|
33
37
|
* Generate Password Reset Code
|
|
34
38
|
* @param requestBody
|
|
35
|
-
* @returns
|
|
39
|
+
* @returns MessageResponseDto Reset code generated and sent successfully
|
|
36
40
|
* @throws ApiError
|
|
37
41
|
*/
|
|
38
|
-
static generateResetCode(requestBody: GenerateResetCodeDto): CancelablePromise<
|
|
42
|
+
static generateResetCode(requestBody: GenerateResetCodeDto): CancelablePromise<MessageResponseDto>;
|
|
39
43
|
/**
|
|
40
44
|
* Validate Password Reset Code
|
|
41
45
|
* @param requestBody
|
|
42
|
-
* @returns
|
|
46
|
+
* @returns MessageResponseDto Reset code is valid
|
|
43
47
|
* @throws ApiError
|
|
44
48
|
*/
|
|
45
|
-
static validateResetCode(requestBody: ValidateResetCodeDto): CancelablePromise<
|
|
49
|
+
static validateResetCode(requestBody: ValidateResetCodeDto): CancelablePromise<MessageResponseDto>;
|
|
46
50
|
/**
|
|
47
51
|
* Reset Admin Password
|
|
48
52
|
* @param requestBody
|
|
49
|
-
* @returns
|
|
53
|
+
* @returns MessageResponseDto Password reset successfully
|
|
50
54
|
* @throws ApiError
|
|
51
55
|
*/
|
|
52
|
-
static resetPassword(requestBody: ResetPasswordDto): CancelablePromise<
|
|
56
|
+
static resetPassword(requestBody: ResetPasswordDto): CancelablePromise<MessageResponseDto>;
|
|
53
57
|
}
|
|
@@ -7,7 +7,7 @@ class AdminAuthService {
|
|
|
7
7
|
/**
|
|
8
8
|
* Admin Login
|
|
9
9
|
* @param requestBody
|
|
10
|
-
* @returns
|
|
10
|
+
* @returns AdminLoginResponseDto Login successful
|
|
11
11
|
* @throws ApiError
|
|
12
12
|
*/
|
|
13
13
|
static login(requestBody) {
|
|
@@ -16,57 +16,45 @@ class AdminAuthService {
|
|
|
16
16
|
url: '/auth/admins/login',
|
|
17
17
|
body: requestBody,
|
|
18
18
|
mediaType: 'application/json',
|
|
19
|
-
errors: {
|
|
20
|
-
401: `Invalid credentials`,
|
|
21
|
-
},
|
|
22
19
|
});
|
|
23
20
|
}
|
|
24
21
|
/**
|
|
25
|
-
* Refresh
|
|
26
|
-
* @returns
|
|
22
|
+
* Refresh Admin Token
|
|
23
|
+
* @returns TokensDto Token refreshed successfully
|
|
27
24
|
* @throws ApiError
|
|
28
25
|
*/
|
|
29
26
|
static refreshToken() {
|
|
30
27
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
31
28
|
method: 'GET',
|
|
32
29
|
url: '/auth/admins/refresh-token',
|
|
33
|
-
errors: {
|
|
34
|
-
401: `Unauthorized`,
|
|
35
|
-
},
|
|
36
30
|
});
|
|
37
31
|
}
|
|
38
32
|
/**
|
|
39
|
-
* Get
|
|
40
|
-
* @returns
|
|
33
|
+
* Get Admin Profile
|
|
34
|
+
* @returns AdminDto Admin profile retrieved successfully
|
|
41
35
|
* @throws ApiError
|
|
42
36
|
*/
|
|
43
37
|
static me() {
|
|
44
38
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
45
39
|
method: 'GET',
|
|
46
40
|
url: '/auth/admins/me',
|
|
47
|
-
errors: {
|
|
48
|
-
401: `Unauthorized`,
|
|
49
|
-
},
|
|
50
41
|
});
|
|
51
42
|
}
|
|
52
43
|
/**
|
|
53
44
|
* Admin Logout
|
|
54
|
-
* @returns
|
|
45
|
+
* @returns MessageResponseDto Logout successful
|
|
55
46
|
* @throws ApiError
|
|
56
47
|
*/
|
|
57
48
|
static logout() {
|
|
58
49
|
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
59
50
|
method: 'POST',
|
|
60
51
|
url: '/auth/admins/logout',
|
|
61
|
-
errors: {
|
|
62
|
-
401: `Unauthorized`,
|
|
63
|
-
},
|
|
64
52
|
});
|
|
65
53
|
}
|
|
66
54
|
/**
|
|
67
55
|
* Generate Password Reset Code
|
|
68
56
|
* @param requestBody
|
|
69
|
-
* @returns
|
|
57
|
+
* @returns MessageResponseDto Reset code generated and sent successfully
|
|
70
58
|
* @throws ApiError
|
|
71
59
|
*/
|
|
72
60
|
static generateResetCode(requestBody) {
|
|
@@ -75,15 +63,12 @@ class AdminAuthService {
|
|
|
75
63
|
url: '/auth/admins/forgot-password',
|
|
76
64
|
body: requestBody,
|
|
77
65
|
mediaType: 'application/json',
|
|
78
|
-
errors: {
|
|
79
|
-
401: `Admin not found`,
|
|
80
|
-
},
|
|
81
66
|
});
|
|
82
67
|
}
|
|
83
68
|
/**
|
|
84
69
|
* Validate Password Reset Code
|
|
85
70
|
* @param requestBody
|
|
86
|
-
* @returns
|
|
71
|
+
* @returns MessageResponseDto Reset code is valid
|
|
87
72
|
* @throws ApiError
|
|
88
73
|
*/
|
|
89
74
|
static validateResetCode(requestBody) {
|
|
@@ -92,16 +77,12 @@ class AdminAuthService {
|
|
|
92
77
|
url: '/auth/admins/validate-reset-code',
|
|
93
78
|
body: requestBody,
|
|
94
79
|
mediaType: 'application/json',
|
|
95
|
-
errors: {
|
|
96
|
-
401: `Admin not found`,
|
|
97
|
-
403: `Invalid or expired reset code`,
|
|
98
|
-
},
|
|
99
80
|
});
|
|
100
81
|
}
|
|
101
82
|
/**
|
|
102
83
|
* Reset Admin Password
|
|
103
84
|
* @param requestBody
|
|
104
|
-
* @returns
|
|
85
|
+
* @returns MessageResponseDto Password reset successfully
|
|
105
86
|
* @throws ApiError
|
|
106
87
|
*/
|
|
107
88
|
static resetPassword(requestBody) {
|
|
@@ -110,9 +91,6 @@ class AdminAuthService {
|
|
|
110
91
|
url: '/auth/admins/reset-password',
|
|
111
92
|
body: requestBody,
|
|
112
93
|
mediaType: 'application/json',
|
|
113
|
-
errors: {
|
|
114
|
-
401: `User not found`,
|
|
115
|
-
},
|
|
116
94
|
});
|
|
117
95
|
}
|
|
118
96
|
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import type { CustomerDto } from '../models/CustomerDto';
|
|
2
|
+
import type { CustomerRegisterDto } from '../models/CustomerRegisterDto';
|
|
2
3
|
import type { CustomerUpdatedDto } from '../models/CustomerUpdatedDto';
|
|
4
|
+
import type { MessageResponseDto } from '../models/MessageResponseDto';
|
|
3
5
|
import type { OrderDto } from '../models/OrderDto';
|
|
4
6
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
5
7
|
export declare class AdminCustomerService {
|
|
6
8
|
/**
|
|
7
9
|
* Create a new customer
|
|
8
10
|
* @param requestBody
|
|
9
|
-
* @returns
|
|
11
|
+
* @returns CustomerDto Customer created successfully.
|
|
10
12
|
* @throws ApiError
|
|
11
13
|
*/
|
|
12
|
-
static create(requestBody:
|
|
14
|
+
static create(requestBody: CustomerRegisterDto): CancelablePromise<CustomerDto>;
|
|
13
15
|
/**
|
|
14
16
|
* Get all customers
|
|
15
17
|
* @param search Text to search for in name, surname, phone number or email
|
|
@@ -21,30 +23,30 @@ export declare class AdminCustomerService {
|
|
|
21
23
|
* @param phone Filter by phone number
|
|
22
24
|
* @param phoneCountryCode Filter by phone country code
|
|
23
25
|
* @param isVerified Filter by verified status
|
|
24
|
-
* @returns
|
|
26
|
+
* @returns CustomerDto List of customers
|
|
25
27
|
* @throws ApiError
|
|
26
28
|
*/
|
|
27
|
-
static findAll(search?: string, order?: OrderDto, id?: number, firstName?: string, lastName?: string, email?: string, phone?: string, phoneCountryCode?: string, isVerified?: boolean): CancelablePromise<
|
|
29
|
+
static findAll(search?: string, order?: OrderDto, id?: number, firstName?: string, lastName?: string, email?: string, phone?: string, phoneCountryCode?: string, isVerified?: boolean): CancelablePromise<Array<CustomerDto>>;
|
|
28
30
|
/**
|
|
29
31
|
* Get a single customer by ID
|
|
30
32
|
* @param id
|
|
31
|
-
* @returns
|
|
33
|
+
* @returns CustomerDto Customer found
|
|
32
34
|
* @throws ApiError
|
|
33
35
|
*/
|
|
34
|
-
static findById(id: number): CancelablePromise<
|
|
36
|
+
static findById(id: number): CancelablePromise<CustomerDto>;
|
|
35
37
|
/**
|
|
36
38
|
* Update a customer by ID
|
|
37
39
|
* @param id
|
|
38
40
|
* @param requestBody
|
|
39
|
-
* @returns
|
|
41
|
+
* @returns CustomerDto Customer updated successfully.
|
|
40
42
|
* @throws ApiError
|
|
41
43
|
*/
|
|
42
|
-
static update(id: number, requestBody: CustomerUpdatedDto): CancelablePromise<
|
|
44
|
+
static update(id: number, requestBody: CustomerUpdatedDto): CancelablePromise<CustomerDto>;
|
|
43
45
|
/**
|
|
44
46
|
* Delete a customer by ID
|
|
45
47
|
* @param id
|
|
46
|
-
* @returns
|
|
48
|
+
* @returns MessageResponseDto Customer deleted successfully.
|
|
47
49
|
* @throws ApiError
|
|
48
50
|
*/
|
|
49
|
-
static remove(id: number): CancelablePromise<
|
|
51
|
+
static remove(id: number): CancelablePromise<MessageResponseDto>;
|
|
50
52
|
}
|
|
@@ -7,7 +7,7 @@ class AdminCustomerService {
|
|
|
7
7
|
/**
|
|
8
8
|
* Create a new customer
|
|
9
9
|
* @param requestBody
|
|
10
|
-
* @returns
|
|
10
|
+
* @returns CustomerDto Customer created successfully.
|
|
11
11
|
* @throws ApiError
|
|
12
12
|
*/
|
|
13
13
|
static create(requestBody) {
|
|
@@ -16,9 +16,6 @@ class AdminCustomerService {
|
|
|
16
16
|
url: '/admins/customers',
|
|
17
17
|
body: requestBody,
|
|
18
18
|
mediaType: 'application/json',
|
|
19
|
-
errors: {
|
|
20
|
-
401: `Unauthorized`,
|
|
21
|
-
},
|
|
22
19
|
});
|
|
23
20
|
}
|
|
24
21
|
/**
|
|
@@ -32,7 +29,7 @@ class AdminCustomerService {
|
|
|
32
29
|
* @param phone Filter by phone number
|
|
33
30
|
* @param phoneCountryCode Filter by phone country code
|
|
34
31
|
* @param isVerified Filter by verified status
|
|
35
|
-
* @returns
|
|
32
|
+
* @returns CustomerDto List of customers
|
|
36
33
|
* @throws ApiError
|
|
37
34
|
*/
|
|
38
35
|
static findAll(search, order, id, firstName, lastName, email, phone, phoneCountryCode, isVerified) {
|
|
@@ -50,15 +47,12 @@ class AdminCustomerService {
|
|
|
50
47
|
'phoneCountryCode': phoneCountryCode,
|
|
51
48
|
'isVerified': isVerified,
|
|
52
49
|
},
|
|
53
|
-
errors: {
|
|
54
|
-
401: `Unauthorized`,
|
|
55
|
-
},
|
|
56
50
|
});
|
|
57
51
|
}
|
|
58
52
|
/**
|
|
59
53
|
* Get a single customer by ID
|
|
60
54
|
* @param id
|
|
61
|
-
* @returns
|
|
55
|
+
* @returns CustomerDto Customer found
|
|
62
56
|
* @throws ApiError
|
|
63
57
|
*/
|
|
64
58
|
static findById(id) {
|
|
@@ -68,17 +62,13 @@ class AdminCustomerService {
|
|
|
68
62
|
path: {
|
|
69
63
|
'id': id,
|
|
70
64
|
},
|
|
71
|
-
errors: {
|
|
72
|
-
401: `Unauthorized`,
|
|
73
|
-
404: `Customer not found`,
|
|
74
|
-
},
|
|
75
65
|
});
|
|
76
66
|
}
|
|
77
67
|
/**
|
|
78
68
|
* Update a customer by ID
|
|
79
69
|
* @param id
|
|
80
70
|
* @param requestBody
|
|
81
|
-
* @returns
|
|
71
|
+
* @returns CustomerDto Customer updated successfully.
|
|
82
72
|
* @throws ApiError
|
|
83
73
|
*/
|
|
84
74
|
static update(id, requestBody) {
|
|
@@ -90,16 +80,12 @@ class AdminCustomerService {
|
|
|
90
80
|
},
|
|
91
81
|
body: requestBody,
|
|
92
82
|
mediaType: 'application/json',
|
|
93
|
-
errors: {
|
|
94
|
-
401: `Unauthorized`,
|
|
95
|
-
404: `Customer not found`,
|
|
96
|
-
},
|
|
97
83
|
});
|
|
98
84
|
}
|
|
99
85
|
/**
|
|
100
86
|
* Delete a customer by ID
|
|
101
87
|
* @param id
|
|
102
|
-
* @returns
|
|
88
|
+
* @returns MessageResponseDto Customer deleted successfully.
|
|
103
89
|
* @throws ApiError
|
|
104
90
|
*/
|
|
105
91
|
static remove(id) {
|
|
@@ -109,10 +95,6 @@ class AdminCustomerService {
|
|
|
109
95
|
path: {
|
|
110
96
|
'id': id,
|
|
111
97
|
},
|
|
112
|
-
errors: {
|
|
113
|
-
401: `Unauthorized`,
|
|
114
|
-
404: `Customer not found`,
|
|
115
|
-
},
|
|
116
98
|
});
|
|
117
99
|
}
|
|
118
100
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DriverCreateDto } from '../models/DriverCreateDto';
|
|
2
2
|
import type { OrderDto } from '../models/OrderDto';
|
|
3
3
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
4
4
|
export declare class AdminDriversService {
|
|
@@ -8,7 +8,7 @@ export declare class AdminDriversService {
|
|
|
8
8
|
* @returns any Driver created successfully.
|
|
9
9
|
* @throws ApiError
|
|
10
10
|
*/
|
|
11
|
-
static createDriver(requestBody:
|
|
11
|
+
static createDriver(requestBody: DriverCreateDto): CancelablePromise<any>;
|
|
12
12
|
/**
|
|
13
13
|
* Get all drivers
|
|
14
14
|
* @param search Text to search for in name, surname, phone number or email
|
|
@@ -16,9 +16,6 @@ class AdminDriversService {
|
|
|
16
16
|
url: '/admins/drivers',
|
|
17
17
|
body: requestBody,
|
|
18
18
|
mediaType: 'application/json',
|
|
19
|
-
errors: {
|
|
20
|
-
401: `Unauthorized`,
|
|
21
|
-
},
|
|
22
19
|
});
|
|
23
20
|
}
|
|
24
21
|
/**
|
|
@@ -56,9 +53,6 @@ class AdminDriversService {
|
|
|
56
53
|
'license': license,
|
|
57
54
|
'type': type,
|
|
58
55
|
},
|
|
59
|
-
errors: {
|
|
60
|
-
401: `Unauthorized`,
|
|
61
|
-
},
|
|
62
56
|
});
|
|
63
57
|
}
|
|
64
58
|
/**
|
|
@@ -74,10 +68,6 @@ class AdminDriversService {
|
|
|
74
68
|
path: {
|
|
75
69
|
'id': id,
|
|
76
70
|
},
|
|
77
|
-
errors: {
|
|
78
|
-
401: `Unauthorized`,
|
|
79
|
-
404: `Driver not found`,
|
|
80
|
-
},
|
|
81
71
|
});
|
|
82
72
|
}
|
|
83
73
|
/**
|
|
@@ -93,10 +83,6 @@ class AdminDriversService {
|
|
|
93
83
|
path: {
|
|
94
84
|
'id': id,
|
|
95
85
|
},
|
|
96
|
-
errors: {
|
|
97
|
-
401: `Unauthorized`,
|
|
98
|
-
404: `Driver not found`,
|
|
99
|
-
},
|
|
100
86
|
});
|
|
101
87
|
}
|
|
102
88
|
/**
|
|
@@ -112,10 +98,6 @@ class AdminDriversService {
|
|
|
112
98
|
path: {
|
|
113
99
|
'id': id,
|
|
114
100
|
},
|
|
115
|
-
errors: {
|
|
116
|
-
401: `Unauthorized`,
|
|
117
|
-
404: `Driver not found`,
|
|
118
|
-
},
|
|
119
101
|
});
|
|
120
102
|
}
|
|
121
103
|
}
|
|
@@ -1,43 +1,45 @@
|
|
|
1
|
+
import type { AdminCreateDto } from '../models/AdminCreateDto';
|
|
1
2
|
import type { AdminDto } from '../models/AdminDto';
|
|
2
3
|
import type { AdminUpdateDto } from '../models/AdminUpdateDto';
|
|
4
|
+
import type { MessageResponseDto } from '../models/MessageResponseDto';
|
|
3
5
|
import type { OrderDto } from '../models/OrderDto';
|
|
4
6
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
5
7
|
export declare class AdminService {
|
|
6
8
|
/**
|
|
7
9
|
* Create a new admin
|
|
8
10
|
* @param requestBody
|
|
9
|
-
* @returns
|
|
11
|
+
* @returns AdminDto Admin created successfully.
|
|
10
12
|
* @throws ApiError
|
|
11
13
|
*/
|
|
12
|
-
static create(requestBody:
|
|
14
|
+
static create(requestBody: AdminCreateDto): CancelablePromise<AdminDto>;
|
|
13
15
|
/**
|
|
14
16
|
* Get all admins
|
|
15
17
|
* @param search Text to search for in name, surname, phone number or email
|
|
16
18
|
* @param order Sorting options
|
|
17
|
-
* @returns
|
|
19
|
+
* @returns AdminDto List of admins
|
|
18
20
|
* @throws ApiError
|
|
19
21
|
*/
|
|
20
|
-
static findAll(search?: string, order?: OrderDto): CancelablePromise<
|
|
22
|
+
static findAll(search?: string, order?: OrderDto): CancelablePromise<Array<AdminDto>>;
|
|
21
23
|
/**
|
|
22
24
|
* Get a single admin by ID
|
|
23
25
|
* @param id
|
|
24
|
-
* @returns
|
|
26
|
+
* @returns AdminDto Admin found
|
|
25
27
|
* @throws ApiError
|
|
26
28
|
*/
|
|
27
|
-
static findById(id: number): CancelablePromise<
|
|
29
|
+
static findById(id: number): CancelablePromise<AdminDto>;
|
|
28
30
|
/**
|
|
29
31
|
* Update an admin by ID
|
|
30
32
|
* @param id
|
|
31
33
|
* @param requestBody
|
|
32
|
-
* @returns
|
|
34
|
+
* @returns AdminDto Admin updated successfully.
|
|
33
35
|
* @throws ApiError
|
|
34
36
|
*/
|
|
35
|
-
static update(id: number, requestBody: AdminUpdateDto): CancelablePromise<
|
|
37
|
+
static update(id: number, requestBody: AdminUpdateDto): CancelablePromise<AdminDto>;
|
|
36
38
|
/**
|
|
37
39
|
* Delete an admin by ID
|
|
38
40
|
* @param id
|
|
39
|
-
* @returns
|
|
41
|
+
* @returns MessageResponseDto Admin deleted successfully.
|
|
40
42
|
* @throws ApiError
|
|
41
43
|
*/
|
|
42
|
-
static remove(id: number): CancelablePromise<
|
|
44
|
+
static remove(id: number): CancelablePromise<MessageResponseDto>;
|
|
43
45
|
}
|