@dapex-tech/elite-online-services 0.0.6 → 0.0.8

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.
Files changed (55) hide show
  1. package/.release.config.js +16 -15
  2. package/models/CreateServiceOrderDto.d.ts +46 -0
  3. package/models/CreateServiceOrderDto.js +2 -0
  4. package/models/CreateStreetPickupDto.d.ts +10 -0
  5. package/models/CreateStreetPickupDto.js +2 -0
  6. package/models/CreateUserLocationDto.d.ts +26 -0
  7. package/models/CreateUserLocationDto.js +2 -0
  8. package/models/DriverUpdateDto.d.ts +8 -0
  9. package/models/EmailPhoneLoginDto.d.ts +14 -0
  10. package/models/EmailPhoneLoginDto.js +2 -0
  11. package/models/GenerateResetCodeDto.d.ts +6 -0
  12. package/models/GenerateResetCodeDto.js +2 -0
  13. package/models/GenerateUserResetCodeDto.d.ts +6 -0
  14. package/models/GenerateUserResetCodeDto.js +2 -0
  15. package/models/GenerateUserVerificationCodeDto.d.ts +6 -0
  16. package/models/GenerateUserVerificationCodeDto.js +2 -0
  17. package/models/ResetDriverPasswordDto.d.ts +10 -0
  18. package/models/ResetDriverPasswordDto.js +2 -0
  19. package/models/ResetUserPasswordDto.d.ts +10 -0
  20. package/models/ResetUserPasswordDto.js +2 -0
  21. package/models/UpdateDriverStatusDto.d.ts +10 -0
  22. package/models/UpdateDriverStatusDto.js +2 -0
  23. package/models/UpdateDriverTripStatusDto.d.ts +14 -0
  24. package/models/UpdateDriverTripStatusDto.js +2 -0
  25. package/models/UpdateTripStatusDto.d.ts +10 -0
  26. package/models/UpdateTripStatusDto.js +2 -0
  27. package/models/UpdateUserLocationDto.d.ts +26 -0
  28. package/models/UpdateUserLocationDto.js +2 -0
  29. package/models/UserUpdatedDto.d.ts +0 -4
  30. package/models/ValidateDriverResetCodeDto.d.ts +10 -0
  31. package/models/ValidateDriverResetCodeDto.js +2 -0
  32. package/models/ValidateUserResetCodeDto.d.ts +10 -0
  33. package/models/ValidateUserResetCodeDto.js +2 -0
  34. package/models/VerifyUserAccountDto.d.ts +10 -0
  35. package/models/VerifyUserAccountDto.js +2 -0
  36. package/models/index.d.ts +16 -0
  37. package/models/index.js +16 -0
  38. package/package.json +18 -22
  39. package/services/AdminAuthService.d.ts +28 -0
  40. package/services/AdminAuthService.js +63 -0
  41. package/services/AdminService.d.ts +44 -0
  42. package/services/AdminService.js +100 -0
  43. package/services/CatalogsService.d.ts +67 -0
  44. package/services/CatalogsService.js +142 -0
  45. package/services/DriverAuthService.d.ts +53 -0
  46. package/services/{LoginsService.js → DriverAuthService.js} +54 -31
  47. package/services/DriversService.d.ts +36 -0
  48. package/services/DriversService.js +95 -0
  49. package/services/UserAuthService.d.ts +85 -0
  50. package/services/UserAuthService.js +188 -0
  51. package/services/UsersService.d.ts +38 -0
  52. package/services/UsersService.js +92 -0
  53. package/services/index.d.ts +4 -1
  54. package/services/index.js +4 -1
  55. package/services/LoginsService.d.ts +0 -43
@@ -0,0 +1,85 @@
1
+ import type { EmailPhoneLoginDto } from '../models/EmailPhoneLoginDto';
2
+ import type { GenerateUserResetCodeDto } from '../models/GenerateUserResetCodeDto';
3
+ import type { GenerateUserVerificationCodeDto } from '../models/GenerateUserVerificationCodeDto';
4
+ import type { ResetUserPasswordDto } from '../models/ResetUserPasswordDto';
5
+ import type { UserDto } from '../models/UserDto';
6
+ import type { UserUpdatedDto } from '../models/UserUpdatedDto';
7
+ import type { ValidateUserResetCodeDto } from '../models/ValidateUserResetCodeDto';
8
+ import type { VerifyUserAccountDto } from '../models/VerifyUserAccountDto';
9
+ import type { CancelablePromise } from '../core/CancelablePromise';
10
+ export declare class UserAuthService {
11
+ /**
12
+ * User Login
13
+ * @param requestBody
14
+ * @returns any Login successful
15
+ * @throws ApiError
16
+ */
17
+ static login(requestBody: EmailPhoneLoginDto): CancelablePromise<any>;
18
+ /**
19
+ * User Register
20
+ * @param requestBody
21
+ * @returns any Registration successful
22
+ * @throws ApiError
23
+ */
24
+ static register(requestBody: UserDto): CancelablePromise<any>;
25
+ /**
26
+ * Refresh User Token
27
+ * @returns any Token refreshed successfully
28
+ * @throws ApiError
29
+ */
30
+ static refreshToken(): CancelablePromise<any>;
31
+ /**
32
+ * Get Current User
33
+ * @returns any User information retrieved
34
+ * @throws ApiError
35
+ */
36
+ static me(): CancelablePromise<any>;
37
+ /**
38
+ * Update User Profile
39
+ * @param requestBody
40
+ * @returns any User profile updated successfully
41
+ * @throws ApiError
42
+ */
43
+ static updateProfile(requestBody: UserUpdatedDto): CancelablePromise<any>;
44
+ /**
45
+ * User Logout
46
+ * @returns any Logout successful
47
+ * @throws ApiError
48
+ */
49
+ static logout(): CancelablePromise<any>;
50
+ /**
51
+ * Generate Password Reset Code
52
+ * @param requestBody
53
+ * @returns any Reset code generated and sent successfully
54
+ * @throws ApiError
55
+ */
56
+ static generateResetCode(requestBody: GenerateUserResetCodeDto): CancelablePromise<any>;
57
+ /**
58
+ * Validate Password Reset Code
59
+ * @param requestBody
60
+ * @returns any Reset code is valid
61
+ * @throws ApiError
62
+ */
63
+ static validateResetCode(requestBody: ValidateUserResetCodeDto): CancelablePromise<any>;
64
+ /**
65
+ * Reset User Password
66
+ * @param requestBody
67
+ * @returns any Password reset successfully
68
+ * @throws ApiError
69
+ */
70
+ static resetPassword(requestBody: ResetUserPasswordDto): CancelablePromise<any>;
71
+ /**
72
+ * Generate User Verification Code
73
+ * @param requestBody
74
+ * @returns any Verification code generated and sent successfully
75
+ * @throws ApiError
76
+ */
77
+ static generateVerificationCode(requestBody: GenerateUserVerificationCodeDto): CancelablePromise<any>;
78
+ /**
79
+ * Verify User Account
80
+ * @param requestBody
81
+ * @returns any User verified successfully
82
+ * @throws ApiError
83
+ */
84
+ static verifyAccount(requestBody: VerifyUserAccountDto): CancelablePromise<any>;
85
+ }
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserAuthService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class UserAuthService {
7
+ /**
8
+ * User Login
9
+ * @param requestBody
10
+ * @returns any Login successful
11
+ * @throws ApiError
12
+ */
13
+ static login(requestBody) {
14
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
15
+ method: 'POST',
16
+ url: '/auth/users/login',
17
+ body: requestBody,
18
+ mediaType: 'application/json',
19
+ errors: {
20
+ 401: `Invalid credentials`,
21
+ },
22
+ });
23
+ }
24
+ /**
25
+ * User Register
26
+ * @param requestBody
27
+ * @returns any Registration successful
28
+ * @throws ApiError
29
+ */
30
+ static register(requestBody) {
31
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
32
+ method: 'POST',
33
+ url: '/auth/users/register',
34
+ body: requestBody,
35
+ mediaType: 'application/json',
36
+ errors: {
37
+ 400: `Bad Request`,
38
+ },
39
+ });
40
+ }
41
+ /**
42
+ * Refresh User Token
43
+ * @returns any Token refreshed successfully
44
+ * @throws ApiError
45
+ */
46
+ static refreshToken() {
47
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
48
+ method: 'GET',
49
+ url: '/auth/users/refresh-token',
50
+ errors: {
51
+ 401: `Unauthorized`,
52
+ },
53
+ });
54
+ }
55
+ /**
56
+ * Get Current User
57
+ * @returns any User information retrieved
58
+ * @throws ApiError
59
+ */
60
+ static me() {
61
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
62
+ method: 'GET',
63
+ url: '/auth/users/me',
64
+ errors: {
65
+ 401: `Unauthorized`,
66
+ },
67
+ });
68
+ }
69
+ /**
70
+ * Update User Profile
71
+ * @param requestBody
72
+ * @returns any User profile updated successfully
73
+ * @throws ApiError
74
+ */
75
+ static updateProfile(requestBody) {
76
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
77
+ method: 'PATCH',
78
+ url: '/auth/users/update-profile',
79
+ body: requestBody,
80
+ mediaType: 'application/json',
81
+ errors: {
82
+ 401: `Unauthorized`,
83
+ },
84
+ });
85
+ }
86
+ /**
87
+ * User Logout
88
+ * @returns any Logout successful
89
+ * @throws ApiError
90
+ */
91
+ static logout() {
92
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
93
+ method: 'POST',
94
+ url: '/auth/users/logout',
95
+ errors: {
96
+ 401: `Unauthorized`,
97
+ },
98
+ });
99
+ }
100
+ /**
101
+ * Generate Password Reset Code
102
+ * @param requestBody
103
+ * @returns any Reset code generated and sent successfully
104
+ * @throws ApiError
105
+ */
106
+ static generateResetCode(requestBody) {
107
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
108
+ method: 'POST',
109
+ url: '/auth/users/forgot-password',
110
+ body: requestBody,
111
+ mediaType: 'application/json',
112
+ errors: {
113
+ 401: `User not found`,
114
+ },
115
+ });
116
+ }
117
+ /**
118
+ * Validate Password Reset Code
119
+ * @param requestBody
120
+ * @returns any Reset code is valid
121
+ * @throws ApiError
122
+ */
123
+ static validateResetCode(requestBody) {
124
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
125
+ method: 'POST',
126
+ url: '/auth/users/validate-reset-code',
127
+ body: requestBody,
128
+ mediaType: 'application/json',
129
+ errors: {
130
+ 401: `User not found`,
131
+ 403: `Invalid or expired reset code`,
132
+ },
133
+ });
134
+ }
135
+ /**
136
+ * Reset User Password
137
+ * @param requestBody
138
+ * @returns any Password reset successfully
139
+ * @throws ApiError
140
+ */
141
+ static resetPassword(requestBody) {
142
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
143
+ method: 'POST',
144
+ url: '/auth/users/reset-password',
145
+ body: requestBody,
146
+ mediaType: 'application/json',
147
+ errors: {
148
+ 401: `User not found`,
149
+ },
150
+ });
151
+ }
152
+ /**
153
+ * Generate User Verification Code
154
+ * @param requestBody
155
+ * @returns any Verification code generated and sent successfully
156
+ * @throws ApiError
157
+ */
158
+ static generateVerificationCode(requestBody) {
159
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
160
+ method: 'POST',
161
+ url: '/auth/users/generate-verification-code',
162
+ body: requestBody,
163
+ mediaType: 'application/json',
164
+ errors: {
165
+ 401: `User not found`,
166
+ },
167
+ });
168
+ }
169
+ /**
170
+ * Verify User Account
171
+ * @param requestBody
172
+ * @returns any User verified successfully
173
+ * @throws ApiError
174
+ */
175
+ static verifyAccount(requestBody) {
176
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
177
+ method: 'POST',
178
+ url: '/auth/users/verify-account',
179
+ body: requestBody,
180
+ mediaType: 'application/json',
181
+ errors: {
182
+ 401: `User not found`,
183
+ 403: `Invalid or expired verification code`,
184
+ },
185
+ });
186
+ }
187
+ }
188
+ exports.UserAuthService = UserAuthService;
@@ -1,4 +1,7 @@
1
+ import type { CreateStreetPickupDto } from '../models/CreateStreetPickupDto';
2
+ import type { CreateUserLocationDto } from '../models/CreateUserLocationDto';
1
3
  import type { OrderDto } from '../models/OrderDto';
4
+ import type { UpdateUserLocationDto } from '../models/UpdateUserLocationDto';
2
5
  import type { UserDto } from '../models/UserDto';
3
6
  import type { UserUpdatedDto } from '../models/UserUpdatedDto';
4
7
  import type { CancelablePromise } from '../core/CancelablePromise';
@@ -18,6 +21,41 @@ export declare class UsersService {
18
21
  * @throws ApiError
19
22
  */
20
23
  static findAll(search?: string, order?: OrderDto): CancelablePromise<any>;
24
+ /**
25
+ * Create a new street pickup/service order
26
+ * @param requestBody
27
+ * @returns any Street pickup created successfully.
28
+ * @throws ApiError
29
+ */
30
+ static createStreetPickup(requestBody: CreateStreetPickupDto): CancelablePromise<any>;
31
+ /**
32
+ * Get all locations for the authenticated user
33
+ * @returns any List of user locations.
34
+ * @throws ApiError
35
+ */
36
+ static getUserLocations(): CancelablePromise<any>;
37
+ /**
38
+ * Create a new location for the authenticated user
39
+ * @param requestBody
40
+ * @returns any Location created successfully.
41
+ * @throws ApiError
42
+ */
43
+ static createUserLocation(requestBody: CreateUserLocationDto): CancelablePromise<any>;
44
+ /**
45
+ * Update a user location
46
+ * @param locationId
47
+ * @param requestBody
48
+ * @returns any Location updated successfully.
49
+ * @throws ApiError
50
+ */
51
+ static updateUserLocation(locationId: number, requestBody: UpdateUserLocationDto): CancelablePromise<any>;
52
+ /**
53
+ * Delete a user location
54
+ * @param locationId
55
+ * @returns any Location deleted successfully.
56
+ * @throws ApiError
57
+ */
58
+ static deleteUserLocation(locationId: number): CancelablePromise<any>;
21
59
  /**
22
60
  * Get a user by ID
23
61
  * @param id
@@ -42,6 +42,98 @@ class UsersService {
42
42
  },
43
43
  });
44
44
  }
45
+ /**
46
+ * Create a new street pickup/service order
47
+ * @param requestBody
48
+ * @returns any Street pickup created successfully.
49
+ * @throws ApiError
50
+ */
51
+ static createStreetPickup(requestBody) {
52
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
53
+ method: 'POST',
54
+ url: '/users/street-pickup',
55
+ body: requestBody,
56
+ mediaType: 'application/json',
57
+ errors: {
58
+ 401: `Unauthorized`,
59
+ },
60
+ });
61
+ }
62
+ /**
63
+ * Get all locations for the authenticated user
64
+ * @returns any List of user locations.
65
+ * @throws ApiError
66
+ */
67
+ static getUserLocations() {
68
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
69
+ method: 'GET',
70
+ url: '/users/locations',
71
+ errors: {
72
+ 401: `Unauthorized`,
73
+ 404: `User not found.`,
74
+ },
75
+ });
76
+ }
77
+ /**
78
+ * Create a new location for the authenticated user
79
+ * @param requestBody
80
+ * @returns any Location created successfully.
81
+ * @throws ApiError
82
+ */
83
+ static createUserLocation(requestBody) {
84
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
85
+ method: 'POST',
86
+ url: '/users/locations',
87
+ body: requestBody,
88
+ mediaType: 'application/json',
89
+ errors: {
90
+ 400: `Invalid data.`,
91
+ 401: `Unauthorized`,
92
+ 404: `User not found.`,
93
+ },
94
+ });
95
+ }
96
+ /**
97
+ * Update a user location
98
+ * @param locationId
99
+ * @param requestBody
100
+ * @returns any Location updated successfully.
101
+ * @throws ApiError
102
+ */
103
+ static updateUserLocation(locationId, requestBody) {
104
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
105
+ method: 'PATCH',
106
+ url: '/users/locations/{locationId}',
107
+ path: {
108
+ 'locationId': locationId,
109
+ },
110
+ body: requestBody,
111
+ mediaType: 'application/json',
112
+ errors: {
113
+ 401: `Unauthorized`,
114
+ 404: `Location not found.`,
115
+ },
116
+ });
117
+ }
118
+ /**
119
+ * Delete a user location
120
+ * @param locationId
121
+ * @returns any Location deleted successfully.
122
+ * @throws ApiError
123
+ */
124
+ static deleteUserLocation(locationId) {
125
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
126
+ method: 'DELETE',
127
+ url: '/users/locations/{locationId}',
128
+ path: {
129
+ 'locationId': locationId,
130
+ },
131
+ errors: {
132
+ 401: `Unauthorized`,
133
+ 404: `Location not found.`,
134
+ },
135
+ });
136
+ }
45
137
  /**
46
138
  * Get a user by ID
47
139
  * @param id
@@ -1,5 +1,8 @@
1
+ export * from './AdminAuthService';
1
2
  export * from './AdminService';
3
+ export * from './CatalogsService';
4
+ export * from './DriverAuthService';
2
5
  export * from './DriversService';
3
- export * from './LoginsService';
4
6
  export * from './MainService';
7
+ export * from './UserAuthService';
5
8
  export * from './UsersService';
package/services/index.js CHANGED
@@ -14,8 +14,11 @@ 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("./AdminAuthService"), exports);
17
18
  __exportStar(require("./AdminService"), exports);
19
+ __exportStar(require("./CatalogsService"), exports);
20
+ __exportStar(require("./DriverAuthService"), exports);
18
21
  __exportStar(require("./DriversService"), exports);
19
- __exportStar(require("./LoginsService"), exports);
20
22
  __exportStar(require("./MainService"), exports);
23
+ __exportStar(require("./UserAuthService"), exports);
21
24
  __exportStar(require("./UsersService"), exports);
@@ -1,43 +0,0 @@
1
- import type { LoginDto } from '../models/LoginDto';
2
- import type { UserDto } from '../models/UserDto';
3
- import type { CancelablePromise } from '../core/CancelablePromise';
4
- export declare class LoginsService {
5
- /**
6
- * User Login
7
- * @param requestBody
8
- * @returns any Login successful
9
- * @throws ApiError
10
- */
11
- static login(requestBody: LoginDto): CancelablePromise<any>;
12
- /**
13
- * User Register
14
- * @param requestBody
15
- * @returns any Registration successful
16
- * @throws ApiError
17
- */
18
- static register(requestBody: UserDto): CancelablePromise<any>;
19
- /**
20
- * @returns any
21
- * @throws ApiError
22
- */
23
- static refreshToken(): CancelablePromise<any>;
24
- /**
25
- * @returns any
26
- * @throws ApiError
27
- */
28
- static me(): CancelablePromise<any>;
29
- /**
30
- * Admin Login
31
- * @param requestBody
32
- * @returns any Login successful
33
- * @throws ApiError
34
- */
35
- static login1(requestBody: LoginDto): CancelablePromise<any>;
36
- /**
37
- * Driver Login
38
- * @param requestBody
39
- * @returns any Login successful
40
- * @throws ApiError
41
- */
42
- static login2(requestBody: LoginDto): CancelablePromise<any>;
43
- }