@devline-smart-taxi/common 2.3.71 → 2.3.73

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.
@@ -5,10 +5,12 @@ const common_1 = require("@nestjs/common");
5
5
  exports.CurrentUser = (0, common_1.createParamDecorator)((data, context) => {
6
6
  // gRPC metadatasini olish
7
7
  const metadata = context.switchToRpc().getContext();
8
- // Metadatadan ma'lumotlarni ajratib olish
8
+ // Canonical keys are user-*.
9
+ const id = metadata.get('user-id')?.[0];
10
+ const role = metadata.get('user-role')?.[0];
9
11
  const user = {
10
- id: metadata.get('id')[0],
11
- role: metadata.get('role')[0],
12
+ id,
13
+ role,
12
14
  };
13
15
  return data ? user?.[data] : user;
14
16
  });
@@ -151,6 +151,9 @@ message TripListItem {
151
151
  // Vaqtlar
152
152
  optional string startedAt = 19;
153
153
  optional string endedAt = 20;
154
+ // Ownership ids (all roles)
155
+ optional string clientId = 23;
156
+ optional string driverId = 24;
154
157
  }
155
158
 
156
159
  message TripListResponse {
@@ -186,6 +189,9 @@ message TripDetailResponse {
186
189
  // Manzil nomlari
187
190
  optional string pickupAddress = 21;
188
191
  optional string destinationAddress = 22;
192
+ // Ownership ids (all roles)
193
+ optional string clientId = 23;
194
+ optional string driverId = 24;
189
195
  }
190
196
 
191
197
  message GetDriverTodayTripsCountRequest {
@@ -195,4 +201,4 @@ message GetDriverTodayTripsCountRequest {
195
201
  message GetDriverTodayTripsCountResponse {
196
202
  int32 count = 1;
197
203
  double totalEarnings = 2;
198
- }
204
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devline-smart-taxi/common",
3
- "version": "2.3.71",
3
+ "version": "2.3.73",
4
4
  "description": "Reusable NestJS common library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",