@devline-smart-taxi/common 2.3.80 → 2.3.82

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.
@@ -22,6 +22,12 @@ service BranchService {
22
22
  rpc GetMyBranches (common.NoParams) returns (MyBranchResponse);
23
23
  rpc DeleteBranch (common.IdRequest) returns (common.SuccessResponseResult);
24
24
  rpc DeactivateBranch (common.IdRequest) returns (common.SuccessResponseResult);
25
+ rpc GetGlobalCommission (common.NoParams) returns (CommissionResponse);
26
+ rpc UpdateGlobalCommission (UpdateGlobalCommissionRequest) returns (common.SuccessResponseResult);
27
+ rpc GetBranchCommission (common.IdRequest) returns (BranchCommissionResponse);
28
+ rpc UpdateBranchCommission (UpdateBranchCommissionRequest) returns (common.SuccessResponseResult);
29
+ rpc ClearBranchCommission (common.IdRequest) returns (common.SuccessResponseResult);
30
+ rpc GetDriverEffectiveCommission (GetDriverEffectiveCommissionRequest) returns (DriverEffectiveCommissionResponse);
25
31
  }
26
32
 
27
33
  // ==========================================
@@ -36,6 +42,7 @@ message UpdateBranchRequest {
36
42
  string id = 1;
37
43
  optional string name = 2;
38
44
  optional string region = 3;
45
+ optional double driverCommissionRate = 4;
39
46
  }
40
47
 
41
48
  message GetAllBranchesRequest {
@@ -44,6 +51,19 @@ message GetAllBranchesRequest {
44
51
  optional string search = 3;
45
52
  }
46
53
 
54
+ message UpdateGlobalCommissionRequest {
55
+ double driverCommissionRate = 1;
56
+ }
57
+
58
+ message UpdateBranchCommissionRequest {
59
+ string id = 1;
60
+ double driverCommissionRate = 2;
61
+ }
62
+
63
+ message GetDriverEffectiveCommissionRequest {
64
+ string driverId = 1;
65
+ }
66
+
47
67
  // ==========================================
48
68
  // 3. RESPONSE MESSAGES
49
69
  // ==========================================
@@ -75,6 +95,7 @@ message BranchData {
75
95
  string createdAt = 6;
76
96
  optional string updatedAt = 7;
77
97
  repeated string manager_ids = 8;
98
+ optional double driverCommissionRate = 9;
78
99
  }
79
100
 
80
101
  message MyBranchResponse {
@@ -82,3 +103,40 @@ message MyBranchResponse {
82
103
  string message = 2;
83
104
  repeated BranchData data = 3;
84
105
  }
106
+
107
+ message CommissionData {
108
+ double driverCommissionRate = 1;
109
+ }
110
+
111
+ message CommissionResponse {
112
+ int32 statusCode = 1;
113
+ string message = 2;
114
+ CommissionData data = 3;
115
+ }
116
+
117
+ message BranchCommissionData {
118
+ string branchId = 1;
119
+ optional double branchCommissionRate = 2;
120
+ double globalCommissionRate = 3;
121
+ double effectiveCommissionRate = 4;
122
+ }
123
+
124
+ message BranchCommissionResponse {
125
+ int32 statusCode = 1;
126
+ string message = 2;
127
+ BranchCommissionData data = 3;
128
+ }
129
+
130
+ message DriverEffectiveCommissionData {
131
+ string driverId = 1;
132
+ optional string branchId = 2;
133
+ optional double branchCommissionRate = 3;
134
+ double globalCommissionRate = 4;
135
+ double effectiveCommissionRate = 5;
136
+ }
137
+
138
+ message DriverEffectiveCommissionResponse {
139
+ int32 statusCode = 1;
140
+ string message = 2;
141
+ DriverEffectiveCommissionData data = 3;
142
+ }
@@ -65,6 +65,15 @@ service DriverService {
65
65
  // Mashina ma'lumotlarini yangilash
66
66
  rpc UpdateCarInfo (UpdateDriverCarInfoRequest) returns (common.SuccessResponseResult);
67
67
 
68
+ // Auth orqali qo'shimcha mashina qo'shish
69
+ rpc AddCar (CreateDriverCarRequest) returns (common.SuccessResponseResult);
70
+
71
+ // Qo'shimcha mashinani tasdiqlash
72
+ rpc ApproveCar (ApproveDriverCarRequest) returns (common.SuccessResponseResult);
73
+
74
+ // Qo'shimcha mashinani rad etish
75
+ rpc RejectCar (RejectDriverCarRequest) returns (common.SuccessResponseResult);
76
+
68
77
  // Haydovchilik guvohnomasini yangilash
69
78
  rpc UpdateDriverLicense (UpdateDriverLicenseRequest) returns (common.SuccessResponseResult);
70
79
 
@@ -239,6 +248,29 @@ message UpdateDriverCarInfoRequest {
239
248
  optional string carClassId = 9;
240
249
  }
241
250
 
251
+ message CreateDriverCarRequest {
252
+ string id = 1;
253
+ string carBrand = 2;
254
+ string carModel = 3;
255
+ string carNumber = 4;
256
+ string carColor = 5;
257
+ bool isOwner = 6;
258
+ string documentFrontId = 7;
259
+ string documentBackId = 8;
260
+ }
261
+
262
+ message ApproveDriverCarRequest {
263
+ string driverId = 1;
264
+ string carId = 2;
265
+ string carClassId = 3;
266
+ }
267
+
268
+ message RejectDriverCarRequest {
269
+ string driverId = 1;
270
+ string carId = 2;
271
+ string reason = 3;
272
+ }
273
+
242
274
  message UpdateDriverLicenseRequest {
243
275
  string id = 1;
244
276
  optional string licenseNumber = 2;
@@ -408,6 +440,8 @@ message DriverCarData {
408
440
  optional string carClassId = 10;
409
441
  optional string carClassName = 11;
410
442
  bool isActive = 12;
443
+ optional string approvalStatus = 13;
444
+ optional string remark = 14;
411
445
  }
412
446
 
413
447
  // Rasm (UsersImage) ma'lumotlari (short format)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devline-smart-taxi/common",
3
- "version": "2.3.80",
3
+ "version": "2.3.82",
4
4
  "description": "Reusable NestJS common library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",