@devline-smart-taxi/common 2.3.98 → 2.3.100

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/README.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  Bu `package` ga bir martadan ortiq service da qo'llaniladigan class/interface/enum kabi code bloklari joylanadi.
6
6
 
7
+ ## Driver readiness docs
8
+
9
+ - [Driver Photo Inspection Contract](./docs/driver-photo-inspection-contract.md)
10
+
7
11
  ## O'rnatish
8
12
 
9
13
  ```bash
@@ -64,4 +68,4 @@ src/
64
68
  ├── enums/ # Umumiy enumlar (roles, trip status, payment, va h.k.)
65
69
  ├── prompt/ # Error prompt utilitylari
66
70
  └── proto/ # Protobuf definitionlar va path helperlar
67
- ```
71
+ ```
@@ -17,9 +17,6 @@ service DriverService {
17
17
  // OTP kodini tasdiqlash va autentifikatsiya
18
18
  rpc VerifyOtpAndAuth (VerifyOtpRequest) returns (VerifyOtpResponse);
19
19
 
20
- // Passwordni kiritadi
21
- rpc Password (PasswordRequest) returns (PasswordResponse);
22
-
23
20
  // Registration Step 2: Shaxsiy ma'lumotlar va ID karta
24
21
  rpc SavePersonalInfo (SavePersonalRequest) returns (SavePersonalInfoResponse);
25
22
 
@@ -59,6 +56,21 @@ service DriverService {
59
56
  // Haydovchini qayta faollashtirish
60
57
  rpc ReactivateDriver (ReactivateDriverRequest) returns (common.SuccessResponseResult);
61
58
 
59
+ // Haydovchining operational readiness holatini olish
60
+ rpc GetDriverReadinessSummary (common.IdRequest) returns (DriverReadinessResponse);
61
+
62
+ // Haydovchining photo inspection holatini itemlar kesimida olish
63
+ rpc GetDriverPhotoInspection (common.IdRequest) returns (DriverPhotoInspectionResponse);
64
+
65
+ // Haydovchi tomonidan photo inspection ma'lumotlarini yuborish
66
+ rpc SubmitDriverPhotoInspection (SubmitDriverPhotoInspectionRequest) returns (DriverPhotoInspectionResponse);
67
+
68
+ // Photo inspection itemini tasdiqlash
69
+ rpc ApproveDriverPhotoInspectionItem (ReviewDriverPhotoInspectionItemRequest) returns (common.SuccessResponseResult);
70
+
71
+ // Photo inspection itemini rad etish
72
+ rpc RejectDriverPhotoInspectionItem (ReviewDriverPhotoInspectionItemRequest) returns (common.SuccessResponseResult);
73
+
62
74
  // Shaxsiy ma'lumotlarni yangilash
63
75
  rpc UpdatePersonalInfo (UpdateDriverPersonalInfoRequest) returns (common.SuccessResponseResult);
64
76
 
@@ -89,12 +101,6 @@ service DriverService {
89
101
  // Haydovchi avatarini yangilash
90
102
  rpc UpdateAvatar (UpdateAvatarRequest) returns (common.SuccessResponseResult);
91
103
 
92
- // Ro'yxatdan o'tish holatini tekshirish (auth talab qilinmaydi)
93
- rpc GetRegistrationStatusAndToken (GetRegistrationStatusAndTokenRequest) returns (GetRegistrationStatusAndTokenResponse);
94
-
95
- // Rad etilgan arizani qayta yuborish (REJECTED -> PERSONAL_INFO_ADDED)
96
- rpc ResendApplication (ResendApplicationRequest) returns (ResendApplicationResponse);
97
-
98
104
  // Refresh token orqali yangi access token olish
99
105
  rpc RefreshToken (RefreshTokenRequest) returns (RefreshTokenResponse);
100
106
 
@@ -196,12 +202,6 @@ message SaveDriverLicenseRequest {
196
202
  string secretOtp = 7; // Oldingi stepdan kelgan maxfiy OTP
197
203
  }
198
204
 
199
- message PasswordRequest{
200
- string password = 1;
201
- string phoneNumber = 2;
202
- string secretOtp = 3; // Oldingi stepdan kelgan maxfiy OTP
203
- }
204
-
205
205
  message BlockDriverRequest {
206
206
  string id = 1;
207
207
  optional string reason = 2; // Bloklash sababi
@@ -229,6 +229,33 @@ message ReactivateDriverRequest {
229
229
  optional string reason = 2;
230
230
  }
231
231
 
232
+ message SubmitDriverPhotoInspectionRequest {
233
+ string id = 1;
234
+ optional string pinfl = 2;
235
+ optional string licenseNumber = 3;
236
+ optional string expiryDate = 4;
237
+ optional int32 experience = 5;
238
+ optional string cardFrontId = 6;
239
+ optional string cardBackId = 7;
240
+ optional string selfieWithCardId = 8;
241
+ optional string licenseFrontId = 9;
242
+ optional string licenseBackId = 10;
243
+ optional string documentFrontId = 11;
244
+ optional string documentBackId = 12;
245
+ optional string carFrontStateId = 13;
246
+ optional string carBackStateId = 14;
247
+ optional string carLeftStateId = 15;
248
+ optional string carRightStateId = 16;
249
+ optional string carInteriorFrontSeatStateId = 17;
250
+ optional string carInteriorBackSeatStateId = 18;
251
+ }
252
+
253
+ message ReviewDriverPhotoInspectionItemRequest {
254
+ string driverId = 1;
255
+ string itemCode = 2;
256
+ optional string reason = 3;
257
+ }
258
+
232
259
  message UpdateDriverRatingRequest {
233
260
  string driverId = 1;
234
261
  float rating = 2;
@@ -249,16 +276,6 @@ message UpdateAvatarRequest {
249
276
  string avatarId = 2; // UsersImage ID (UUID)
250
277
  }
251
278
 
252
- message GetRegistrationStatusAndTokenRequest {
253
- string phoneNumber = 1;
254
- string secretOtp = 2;
255
- }
256
-
257
- message ResendApplicationRequest {
258
- string phoneNumber = 1;
259
- string secretOtp = 2;
260
- }
261
-
262
279
  message RefreshTokenRequest {
263
280
  string refreshToken = 1;
264
281
  }
@@ -382,16 +399,22 @@ message DriverResponse {
382
399
  DriverData data = 3;
383
400
  }
384
401
 
385
- message DriversByBranchResponse {
402
+ message DriverReadinessResponse {
386
403
  int32 statusCode = 1;
387
404
  string message = 2;
388
- repeated DriverBranchData data = 3;
405
+ DriverReadinessData data = 3;
389
406
  }
390
407
 
391
- message PasswordResponse {
392
- string message = 1;
393
- int32 statusCode = 2;
394
- PasswordData data = 3;
408
+ message DriverPhotoInspectionResponse {
409
+ int32 statusCode = 1;
410
+ string message = 2;
411
+ DriverPhotoInspectionData data = 3;
412
+ }
413
+
414
+ message DriversByBranchResponse {
415
+ int32 statusCode = 1;
416
+ string message = 2;
417
+ repeated DriverBranchData data = 3;
395
418
  }
396
419
 
397
420
  // ==========================================
@@ -421,7 +444,7 @@ message OtpData {
421
444
  // VerifyOtpResponse uchun ma'lumotlar strukturasi
422
445
  message VerifyOtpData {
423
446
  string phoneNumber = 1;
424
- optional string step = 2;
447
+ optional string status = 2;
425
448
  optional string secretOtp = 3; // Keyingi step uchun maxfiy OTP
426
449
  optional string accessToken = 4; // Faqat ACTIVE haydovchi uchun
427
450
  optional string refreshToken = 5; // Faqat ACTIVE haydovchi uchun
@@ -431,7 +454,7 @@ message VerifyOtpData {
431
454
 
432
455
  // SavePersonalInfo va SaveCarInfo response uchun umumiy ma'lumotlar strukturasi
433
456
  message StepResponseData {
434
- string step = 1;
457
+ string status = 1;
435
458
  string phoneNumber = 2;
436
459
  optional string secretOtp = 3; // Keyingi step uchun maxfiy OTP (oxirgi stepda bo'lmaydi)
437
460
  }
@@ -514,31 +537,40 @@ message UsersImageData {
514
537
  string name = 5;
515
538
  }
516
539
 
517
- message GetRegistrationStatusAndTokenResponse {
518
- int32 statusCode = 1;
519
- string message = 2;
520
- RegistrationStatusData data = 3;
540
+ message DriverReadinessBlockingItemData {
541
+ string code = 1;
542
+ string category = 2;
543
+ string status = 3;
544
+ bool isRecurring = 4;
545
+ optional string reason = 5;
546
+ optional string expiresAt = 6;
521
547
  }
522
548
 
523
- message RegistrationStatusData {
524
- optional string step = 1;
525
- optional string reason = 2;
526
- optional string phoneNumber = 3;
527
- optional bool isRegistered = 4;
528
- optional string accessToken = 5;
529
- optional string refreshToken = 6;
549
+ message DriverReadinessData {
550
+ bool canGoOnline = 1;
551
+ string readinessStatus = 2;
552
+ bool forceOfflineAfterTrip = 3;
553
+ repeated DriverReadinessBlockingItemData blockingItems = 4;
554
+ optional string recurringInspectionExpiresAt = 5;
530
555
  }
531
556
 
532
- message ResendApplicationResponse {
533
- int32 statusCode = 1;
534
- string message = 2;
535
- ResendApplicationData data = 3;
557
+ message DriverPhotoInspectionItemData {
558
+ string code = 1;
559
+ string category = 2;
560
+ string status = 3;
561
+ bool isRequired = 4;
562
+ bool isRecurring = 5;
563
+ optional string reason = 6;
564
+ optional string submittedAt = 7;
565
+ optional string reviewedAt = 8;
566
+ optional string approvedAt = 9;
567
+ optional string expiresAt = 10;
568
+ optional UsersImageData file = 11;
536
569
  }
537
570
 
538
- message ResendApplicationData {
539
- string step = 1;
540
- string phoneNumber = 2;
541
- string secretOtp = 3;
571
+ message DriverPhotoInspectionData {
572
+ DriverReadinessData readiness = 1;
573
+ repeated DriverPhotoInspectionItemData items = 2;
542
574
  }
543
575
 
544
576
  message RefreshTokenResponse {
@@ -553,10 +585,4 @@ message RefreshTokenData {
553
585
  string id = 3;
554
586
  }
555
587
 
556
- // Registratsiyadan o'tadish uchun
557
- message PasswordData {
558
- bool success = 1;
559
- string step = 2;
560
- string phoneNumber = 3;
561
- string secretOtp = 4; // Keyingi step uchun maxfiy OTP
562
- }
588
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devline-smart-taxi/common",
3
- "version": "2.3.98",
3
+ "version": "2.3.100",
4
4
  "description": "Reusable NestJS common library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",