@devline-smart-taxi/common 2.3.83 → 2.3.85

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.
@@ -19,7 +19,6 @@ service BranchService {
19
19
  rpc UpdateBranch (UpdateBranchRequest) returns (common.SuccessResponseResult);
20
20
  rpc GetAllBranches (GetAllBranchesRequest) returns (BranchPaginationResponse);
21
21
  rpc GetBranchById (common.IdRequest) returns (BranchResponse);
22
- rpc GetMyBranches (common.NoParams) returns (MyBranchResponse);
23
22
  rpc DeleteBranch (common.IdRequest) returns (common.SuccessResponseResult);
24
23
  rpc DeactivateBranch (common.IdRequest) returns (common.SuccessResponseResult);
25
24
  rpc GetGlobalCommission (common.NoParams) returns (CommissionResponse);
@@ -91,12 +90,6 @@ message BranchData {
91
90
  optional double driverCommissionRate = 9;
92
91
  }
93
92
 
94
- message MyBranchResponse {
95
- int32 statusCode = 1;
96
- string message = 2;
97
- repeated BranchData data = 3;
98
- }
99
-
100
93
  message CommissionData {
101
94
  double driverCommissionRate = 1;
102
95
  }
@@ -32,6 +32,9 @@ service DriverService {
32
32
  // ID bo'yicha haydovchi ma'lumotlarini olish
33
33
  rpc GetDriverById (common.IdRequest) returns (DriverResponse);
34
34
 
35
+ // Ichki servislar uchun: branch bo'yicha haydovchilar ro'yxati
36
+ rpc GetDriversByBranch (GetDriversByBranchRequest) returns (DriversByBranchResponse);
37
+
35
38
  // Haydovchi profileni ko'rishi
36
39
  rpc GetDriverProfile (common.IdRequest) returns (DriverResponse);
37
40
 
@@ -144,6 +147,10 @@ message GetAllDriversRequest {
144
147
  optional string search = 3; // Qidiruv so'zi (phoneNumber bo'yicha)
145
148
  }
146
149
 
150
+ message GetDriversByBranchRequest {
151
+ string branchId = 1;
152
+ }
153
+
147
154
  message SaveDriverLicenseRequest {
148
155
  string phoneNumber = 1; // Haydovchi telefon raqami
149
156
  string licenseNumber = 2; // Haydovchilik guvohnomasi raqami
@@ -337,6 +344,12 @@ message DriverResponse {
337
344
  DriverData data = 3;
338
345
  }
339
346
 
347
+ message DriversByBranchResponse {
348
+ int32 statusCode = 1;
349
+ string message = 2;
350
+ repeated DriverBranchData data = 3;
351
+ }
352
+
340
353
  message PasswordResponse {
341
354
  string message = 1;
342
355
  int32 statusCode = 2;
@@ -444,6 +457,15 @@ message DriverCarData {
444
457
  optional string remark = 14;
445
458
  }
446
459
 
460
+ message DriverBranchData {
461
+ string id = 1;
462
+ string firstName = 2;
463
+ string lastName = 3;
464
+ string phoneNumber = 4;
465
+ bool isActive = 5;
466
+ string status = 6;
467
+ }
468
+
447
469
  // Rasm (UsersImage) ma'lumotlari (short format)
448
470
  message UsersImageData {
449
471
  string id = 1;
@@ -28,6 +28,7 @@ service WalletService {
28
28
  rpc GetAllDriverBalances (GetAllDriverBalancesRequest) returns (AllDriverBalancesResponse);
29
29
  rpc GetSettlementOverview (GetSettlementOverviewRequest) returns (SettlementOverviewResponse);
30
30
  rpc GetAdminDriverSettlement (GetAdminDriverSettlementRequest) returns (AdminDriverSettlementResponse);
31
+ rpc GetBranchDashboard (GetBranchDashboardRequest) returns (BranchDashboardResponse);
31
32
  }
32
33
 
33
34
  // ==========================================
@@ -120,6 +121,66 @@ message AdminDriverSettlementData {
120
121
  DriverSettlementLedgerData ledger = 2;
121
122
  }
122
123
 
124
+ message DashboardComparisonMetricData {
125
+ float current = 1;
126
+ float previous = 2;
127
+ float delta = 3;
128
+ float deltaPct = 4;
129
+ string trend = 5;
130
+ }
131
+
132
+ message BranchDashboardOverviewData {
133
+ float grossEarnings = 1;
134
+ float netAfterSettlement = 2;
135
+ float platformCommission = 3;
136
+ int32 totalTrips = 4;
137
+ int32 activeDrivers = 5;
138
+ float totalAvailableToWithdraw = 6;
139
+ float totalOutstandingDebt = 7;
140
+ }
141
+
142
+ message DashboardTimeSeriesPointData {
143
+ string label = 1;
144
+ float value = 2;
145
+ }
146
+
147
+ message TopDriverDashboardData {
148
+ string driverId = 1;
149
+ string fullName = 2;
150
+ int32 trips = 3;
151
+ float grossEarnings = 4;
152
+ float netAfterSettlement = 5;
153
+ float platformCommission = 6;
154
+ float outstandingDebt = 7;
155
+ float availableToWithdraw = 8;
156
+ }
157
+
158
+ message TopDebtorDashboardData {
159
+ string driverId = 1;
160
+ string fullName = 2;
161
+ float outstandingDebt = 3;
162
+ int32 cashTrips = 4;
163
+ float grossEarnings = 5;
164
+ float platformCommission = 6;
165
+ }
166
+
167
+ message BranchDashboardData {
168
+ string branchId = 1;
169
+ string period = 2;
170
+ string fromDate = 3;
171
+ string toDate = 4;
172
+ BranchDashboardOverviewData overview = 5;
173
+ DashboardComparisonMetricData grossEarningsComparison = 6;
174
+ DashboardComparisonMetricData netAfterSettlementComparison = 7;
175
+ DashboardComparisonMetricData platformCommissionComparison = 8;
176
+ DashboardComparisonMetricData totalTripsComparison = 9;
177
+ repeated DashboardTimeSeriesPointData grossEarningsSeries = 10;
178
+ repeated DashboardTimeSeriesPointData netAfterSettlementSeries = 11;
179
+ repeated DashboardTimeSeriesPointData platformCommissionSeries = 12;
180
+ repeated TopDriverDashboardData topDrivers = 13;
181
+ repeated TopDebtorDashboardData topDebtors = 14;
182
+ }
183
+
123
184
  // ==========================================
124
185
  // 3. REQUESTS
125
186
  // ==========================================
@@ -209,6 +270,13 @@ message GetAdminDriverSettlementRequest {
209
270
  optional string toDate = 6;
210
271
  }
211
272
 
273
+ message GetBranchDashboardRequest {
274
+ string branchId = 1;
275
+ string period = 2;
276
+ optional string referenceDate = 3;
277
+ optional int32 topLimit = 4;
278
+ }
279
+
212
280
  // ==========================================
213
281
  // 4. RESPONSES
214
282
  // ==========================================
@@ -338,3 +406,9 @@ message AdminDriverSettlementResponse {
338
406
  string message = 2;
339
407
  AdminDriverSettlementData data = 3;
340
408
  }
409
+
410
+ message BranchDashboardResponse {
411
+ int32 statusCode = 1;
412
+ string message = 2;
413
+ BranchDashboardData data = 3;
414
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devline-smart-taxi/common",
3
- "version": "2.3.83",
3
+ "version": "2.3.85",
4
4
  "description": "Reusable NestJS common library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",