@barumetric/contracts 1.4.13 → 1.4.15
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/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
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
|
|