@candesk/contracts 5.0.0 → 6.0.0
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/dist/gen/user.d.ts +6 -3
- package/dist/nest/user.d.ts +7 -4
- package/dist/nest/user.js +1 -1
- package/package.json +1 -1
- package/proto/user.proto +7 -4
package/dist/gen/user.d.ts
CHANGED
|
@@ -11,15 +11,17 @@ export interface CreateUserRequest {
|
|
|
11
11
|
lastName: string;
|
|
12
12
|
birthDate: string;
|
|
13
13
|
address: Address | undefined;
|
|
14
|
+
phone: string;
|
|
14
15
|
}
|
|
15
16
|
export interface CreateUserResponse {
|
|
16
17
|
user: User | undefined;
|
|
17
18
|
}
|
|
18
|
-
export interface
|
|
19
|
+
export interface UpdateUserRequest {
|
|
19
20
|
id: string;
|
|
20
21
|
address: Address | undefined;
|
|
22
|
+
phone?: string | undefined;
|
|
21
23
|
}
|
|
22
|
-
export interface
|
|
24
|
+
export interface UpdateUserResponse {
|
|
23
25
|
user: User | undefined;
|
|
24
26
|
}
|
|
25
27
|
export interface User {
|
|
@@ -28,6 +30,7 @@ export interface User {
|
|
|
28
30
|
lastName: string;
|
|
29
31
|
birthDate: string;
|
|
30
32
|
address: Address | undefined;
|
|
33
|
+
phone: string;
|
|
31
34
|
avatar?: string | undefined;
|
|
32
35
|
}
|
|
33
36
|
export interface Address {
|
|
@@ -39,5 +42,5 @@ export interface Address {
|
|
|
39
42
|
export interface UserService {
|
|
40
43
|
getUser(request: GetUserRequest): Promise<GetUserResponse>;
|
|
41
44
|
createUser(request: CreateUserRequest): Promise<CreateUserResponse>;
|
|
42
|
-
|
|
45
|
+
updateUser(request: UpdateUserRequest): Promise<UpdateUserResponse>;
|
|
43
46
|
}
|
package/dist/nest/user.d.ts
CHANGED
|
@@ -12,15 +12,17 @@ export interface CreateUserRequest {
|
|
|
12
12
|
lastName: string;
|
|
13
13
|
birthDate: string;
|
|
14
14
|
address: Address | undefined;
|
|
15
|
+
phone: string;
|
|
15
16
|
}
|
|
16
17
|
export interface CreateUserResponse {
|
|
17
18
|
user: User | undefined;
|
|
18
19
|
}
|
|
19
|
-
export interface
|
|
20
|
+
export interface UpdateUserRequest {
|
|
20
21
|
id: string;
|
|
21
22
|
address: Address | undefined;
|
|
23
|
+
phone?: string | undefined;
|
|
22
24
|
}
|
|
23
|
-
export interface
|
|
25
|
+
export interface UpdateUserResponse {
|
|
24
26
|
user: User | undefined;
|
|
25
27
|
}
|
|
26
28
|
export interface User {
|
|
@@ -29,6 +31,7 @@ export interface User {
|
|
|
29
31
|
lastName: string;
|
|
30
32
|
birthDate: string;
|
|
31
33
|
address: Address | undefined;
|
|
34
|
+
phone: string;
|
|
32
35
|
avatar?: string | undefined;
|
|
33
36
|
}
|
|
34
37
|
export interface Address {
|
|
@@ -41,12 +44,12 @@ export declare const USER_V1_PACKAGE_NAME = "user.v1";
|
|
|
41
44
|
export interface UserServiceClient {
|
|
42
45
|
getUser(request: GetUserRequest): Observable<GetUserResponse>;
|
|
43
46
|
createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
|
|
44
|
-
|
|
47
|
+
updateUser(request: UpdateUserRequest): Observable<UpdateUserResponse>;
|
|
45
48
|
}
|
|
46
49
|
export interface UserServiceController {
|
|
47
50
|
getUser(request: GetUserRequest): Promise<GetUserResponse> | Observable<GetUserResponse> | GetUserResponse;
|
|
48
51
|
createUser(request: CreateUserRequest): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
|
|
49
|
-
|
|
52
|
+
updateUser(request: UpdateUserRequest): Promise<UpdateUserResponse> | Observable<UpdateUserResponse> | UpdateUserResponse;
|
|
50
53
|
}
|
|
51
54
|
export declare function UserServiceControllerMethods(): (constructor: Function) => void;
|
|
52
55
|
export declare const USER_SERVICE_NAME = "UserService";
|
package/dist/nest/user.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.protobufPackage = "user.v1";
|
|
|
13
13
|
exports.USER_V1_PACKAGE_NAME = "user.v1";
|
|
14
14
|
function UserServiceControllerMethods() {
|
|
15
15
|
return function (constructor) {
|
|
16
|
-
const grpcMethods = ["getUser", "createUser", "
|
|
16
|
+
const grpcMethods = ["getUser", "createUser", "updateUser"];
|
|
17
17
|
for (const method of grpcMethods) {
|
|
18
18
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
19
|
(0, microservices_1.GrpcMethod)("UserService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/user.proto
CHANGED
|
@@ -5,7 +5,7 @@ package user.v1;
|
|
|
5
5
|
service UserService {
|
|
6
6
|
rpc GetUser (GetUserRequest) returns (GetUserResponse);
|
|
7
7
|
rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
|
|
8
|
-
rpc
|
|
8
|
+
rpc UpdateUser (UpdateUserRequest) returns (UpdateUserResponse);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
message GetUserRequest {
|
|
@@ -22,18 +22,20 @@ message CreateUserRequest {
|
|
|
22
22
|
string last_name = 3;
|
|
23
23
|
string birth_date = 4;
|
|
24
24
|
Address address = 5;
|
|
25
|
+
string phone = 6;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
message CreateUserResponse {
|
|
28
29
|
User user = 1;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
message
|
|
32
|
+
message UpdateUserRequest {
|
|
32
33
|
string id = 1;
|
|
33
34
|
Address address = 2;
|
|
35
|
+
optional string phone = 3;
|
|
34
36
|
}
|
|
35
37
|
|
|
36
|
-
message
|
|
38
|
+
message UpdateUserResponse {
|
|
37
39
|
User user = 1;
|
|
38
40
|
}
|
|
39
41
|
|
|
@@ -43,7 +45,8 @@ message User {
|
|
|
43
45
|
string last_name = 3;
|
|
44
46
|
string birth_date = 4;
|
|
45
47
|
Address address = 5;
|
|
46
|
-
|
|
48
|
+
string phone = 6;
|
|
49
|
+
optional string avatar = 7;
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
message Address {
|