@t-cinema/contracts 1.1.2 → 1.1.3
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/user.ts +10 -1
- package/package.json +1 -1
- package/proto/user.proto +7 -0
package/gen/user.ts
CHANGED
|
@@ -23,6 +23,11 @@ export interface CreateUserRequest {
|
|
|
23
23
|
id: string;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
export interface PatchUserRequest {
|
|
27
|
+
userId: string;
|
|
28
|
+
name?: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
|
|
26
31
|
export interface User {
|
|
27
32
|
id: string;
|
|
28
33
|
name?: string | undefined;
|
|
@@ -37,6 +42,8 @@ export interface UserServiceClient {
|
|
|
37
42
|
getProfile(request: GetProfileRequest): Observable<GetProfileResponse>;
|
|
38
43
|
|
|
39
44
|
createUser(request: CreateUserRequest): Observable<Empty>;
|
|
45
|
+
|
|
46
|
+
patchUser(request: PatchUserRequest): Observable<Empty>;
|
|
40
47
|
}
|
|
41
48
|
|
|
42
49
|
export interface UserServiceController {
|
|
@@ -45,11 +52,13 @@ export interface UserServiceController {
|
|
|
45
52
|
): Promise<GetProfileResponse> | Observable<GetProfileResponse> | GetProfileResponse;
|
|
46
53
|
|
|
47
54
|
createUser(request: CreateUserRequest): void;
|
|
55
|
+
|
|
56
|
+
patchUser(request: PatchUserRequest): void;
|
|
48
57
|
}
|
|
49
58
|
|
|
50
59
|
export function UserServiceControllerMethods() {
|
|
51
60
|
return function (constructor: Function) {
|
|
52
|
-
const grpcMethods: string[] = ["getProfile", "createUser"];
|
|
61
|
+
const grpcMethods: string[] = ["getProfile", "createUser", "patchUser"];
|
|
53
62
|
for (const method of grpcMethods) {
|
|
54
63
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
55
64
|
GrpcMethod("UserService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/user.proto
CHANGED
|
@@ -8,6 +8,7 @@ service UserService {
|
|
|
8
8
|
rpc GetProfile (GetProfileRequest) returns (GetProfileResponse);
|
|
9
9
|
|
|
10
10
|
rpc CreateUser (CreateUserRequest) returns (google.protobuf.Empty);
|
|
11
|
+
rpc PatchUser (PatchUserRequest) returns (google.protobuf.Empty);
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
message GetProfileRequest {
|
|
@@ -21,6 +22,12 @@ message CreateUserRequest {
|
|
|
21
22
|
string id = 1;
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
message PatchUserRequest {
|
|
26
|
+
string user_id = 1;
|
|
27
|
+
|
|
28
|
+
optional string name = 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
24
31
|
message User {
|
|
25
32
|
string id = 1;
|
|
26
33
|
optional string name = 2;
|