@barumetric/contracts 1.4.14 → 1.4.16

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.
@@ -114,8 +114,7 @@ export interface Conversation {
114
114
  lastMessageAt?: Timestamp | undefined;
115
115
  lastMessageId?: string | undefined;
116
116
  lastMessagePreview?: string | undefined;
117
- unreadForSeller: number;
118
- unreadForBuyer: number;
117
+ unreadCount: number;
119
118
  createdAt: Timestamp | undefined;
120
119
  }
121
120
 
package/gen/ts/users.ts CHANGED
@@ -107,6 +107,21 @@ export interface PatchUserLocationResponse {
107
107
  ok: boolean;
108
108
  }
109
109
 
110
+ export interface GetUsersByIdsLiteRequest {
111
+ ids: string[];
112
+ }
113
+
114
+ export interface GetUsersByIdsLiteResponse {
115
+ users: UserLite[];
116
+ }
117
+
118
+ export interface UserLite {
119
+ id: string;
120
+ /** Базовые поля */
121
+ name?: string | undefined;
122
+ avatar?: string | undefined;
123
+ }
124
+
110
125
  export interface User {
111
126
  id: string;
112
127
  /** Базовые поля */
@@ -222,6 +237,8 @@ export interface UsersServiceClient {
222
237
  patchUser(request: PatchUserRequest): Observable<PatchUserResponse>;
223
238
 
224
239
  patchUserLocation(request: PatchUserLocationRequest): Observable<PatchUserLocationResponse>;
240
+
241
+ getUsersByIdsLite(request: GetUsersByIdsLiteRequest): Observable<GetUsersByIdsLiteResponse>;
225
242
  }
226
243
 
227
244
  export interface UsersServiceController {
@@ -236,11 +253,15 @@ export interface UsersServiceController {
236
253
  patchUserLocation(
237
254
  request: PatchUserLocationRequest,
238
255
  ): Promise<PatchUserLocationResponse> | Observable<PatchUserLocationResponse> | PatchUserLocationResponse;
256
+
257
+ getUsersByIdsLite(
258
+ request: GetUsersByIdsLiteRequest,
259
+ ): Promise<GetUsersByIdsLiteResponse> | Observable<GetUsersByIdsLiteResponse> | GetUsersByIdsLiteResponse;
239
260
  }
240
261
 
241
262
  export function UsersServiceControllerMethods() {
242
263
  return function (constructor: Function) {
243
- const grpcMethods: string[] = ["getMe", "createUser", "patchUser", "patchUserLocation"];
264
+ const grpcMethods: string[] = ["getMe", "createUser", "patchUser", "patchUserLocation", "getUsersByIdsLite"];
244
265
  for (const method of grpcMethods) {
245
266
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
246
267
  GrpcMethod("UsersService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barumetric/contracts",
3
- "version": "1.4.14",
3
+ "version": "1.4.16",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -113,10 +113,9 @@ message Conversation {
113
113
  optional string last_message_id = 6;
114
114
  optional string last_message_preview = 7;
115
115
 
116
- int32 unread_for_seller = 8;
117
- int32 unread_for_buyer = 9;
116
+ int32 unread_count = 8;
118
117
 
119
- google.protobuf.Timestamp created_at = 10;
118
+ google.protobuf.Timestamp created_at = 9;
120
119
  }
121
120
 
122
121
  message Message {
package/proto/users.proto CHANGED
@@ -10,6 +10,8 @@ service UsersService {
10
10
  rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
11
11
  rpc PatchUser (PatchUserRequest) returns (PatchUserResponse);
12
12
  rpc PatchUserLocation (PatchUserLocationRequest) returns (PatchUserLocationResponse);
13
+
14
+ rpc GetUsersByIdsLite (GetUsersByIdsLiteRequest) returns (GetUsersByIdsLiteResponse);
13
15
  }
14
16
 
15
17
  message GetMeRequest {
@@ -68,6 +70,22 @@ message PatchUserLocationResponse {
68
70
  bool ok = 1;
69
71
  }
70
72
 
73
+ message GetUsersByIdsLiteRequest {
74
+ repeated string ids = 1;
75
+ }
76
+
77
+ message GetUsersByIdsLiteResponse {
78
+ repeated UserLite users = 1;
79
+ }
80
+
81
+ message UserLite {
82
+ string id = 1;
83
+
84
+ // Базовые поля
85
+ optional string name = 2;
86
+ optional string avatar = 3;
87
+ }
88
+
71
89
  message User {
72
90
  string id = 1;
73
91