@requ1emz/contracts 1.0.38 → 1.0.40

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/family.ts CHANGED
@@ -17,11 +17,11 @@ export interface CreateFamilyRequest {
17
17
 
18
18
  export interface DeleteFamilyRequest {
19
19
  userId: string;
20
- familyId: string;
21
20
  }
22
21
 
23
22
  export interface DeleteFamilyResponse {
24
23
  status: boolean;
24
+ description: string;
25
25
  }
26
26
 
27
27
  export interface GetFamilyRequest {
@@ -30,12 +30,12 @@ export interface GetFamilyRequest {
30
30
 
31
31
  export interface InviteUserRequest {
32
32
  adminId: string;
33
- familyId: string;
34
- invitedUserId: string;
33
+ invitedUserEmail: string;
35
34
  }
36
35
 
37
36
  export interface InviteUserResponse {
38
37
  status: boolean;
38
+ description: string;
39
39
  }
40
40
 
41
41
  export interface FamilyResponse {
@@ -57,6 +57,7 @@ export interface AddMemberRequest {
57
57
 
58
58
  export interface AddMemberResponse {
59
59
  status: boolean;
60
+ description: string;
60
61
  }
61
62
 
62
63
  export interface RemoveMemberRequest {
package/gen/user.ts CHANGED
@@ -26,6 +26,17 @@ export interface SendCreateUserRequest {
26
26
  passwordHash: string;
27
27
  }
28
28
 
29
+ export interface UpdateUserRequest {
30
+ id: string;
31
+ email?: string | undefined;
32
+ username?: string | undefined;
33
+ passwordHash?: string | undefined;
34
+ }
35
+
36
+ export interface UpdateUserResponse {
37
+ status: boolean;
38
+ }
39
+
29
40
  export interface SendCreateUserResponse {
30
41
  id: string;
31
42
  }
@@ -61,6 +72,8 @@ export interface UserServiceClient {
61
72
  getUser(request: SendGetUserRequest): Observable<SendGetUserResponse>;
62
73
 
63
74
  deleteUser(request: SendDeleteUserRequest): Observable<SendDeleteUserResponse>;
75
+
76
+ updateUser(request: UpdateUserRequest): Observable<UpdateUserResponse>;
64
77
  }
65
78
 
66
79
  export interface UserServiceController {
@@ -79,11 +92,15 @@ export interface UserServiceController {
79
92
  deleteUser(
80
93
  request: SendDeleteUserRequest,
81
94
  ): Promise<SendDeleteUserResponse> | Observable<SendDeleteUserResponse> | SendDeleteUserResponse;
95
+
96
+ updateUser(
97
+ request: UpdateUserRequest,
98
+ ): Promise<UpdateUserResponse> | Observable<UpdateUserResponse> | UpdateUserResponse;
82
99
  }
83
100
 
84
101
  export function UserServiceControllerMethods() {
85
102
  return function (constructor: Function) {
86
- const grpcMethods: string[] = ["checkUserExists", "createUser", "getUser", "deleteUser"];
103
+ const grpcMethods: string[] = ["checkUserExists", "createUser", "getUser", "deleteUser", "updateUser"];
87
104
  for (const method of grpcMethods) {
88
105
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
89
106
  GrpcMethod("UserService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@requ1emz/contracts",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -18,11 +18,11 @@ message CreateFamilyRequest {
18
18
 
19
19
  message DeleteFamilyRequest {
20
20
  string user_id = 1;
21
- string family_id = 2;
22
21
  }
23
22
 
24
23
  message DeleteFamilyResponse {
25
24
  bool status = 1;
25
+ string description = 2;
26
26
  }
27
27
 
28
28
  message GetFamilyRequest {
@@ -31,12 +31,12 @@ message GetFamilyRequest {
31
31
 
32
32
  message InviteUserRequest {
33
33
  string admin_id = 1;
34
- string family_id = 2;
35
- string invited_user_id = 3;
34
+ string invited_user_email = 3;
36
35
  }
37
36
 
38
37
  message InviteUserResponse {
39
38
  bool status = 1;
39
+ string description = 2;
40
40
  }
41
41
 
42
42
  message FamilyResponse {
@@ -58,6 +58,7 @@ message AddMemberRequest {
58
58
 
59
59
  message AddMemberResponse {
60
60
  bool status = 1;
61
+ string description = 2;
61
62
  }
62
63
 
63
64
  message RemoveMemberRequest {
package/proto/user.proto CHANGED
@@ -7,6 +7,7 @@ service UserService {
7
7
  rpc CreateUser (SendCreateUserRequest) returns (SendCreateUserResponse);
8
8
  rpc GetUser (SendGetUserRequest) returns (SendGetUserResponse);
9
9
  rpc DeleteUser (SendDeleteUserRequest) returns (SendDeleteUserResponse);
10
+ rpc UpdateUser (UpdateUserRequest) returns (UpdateUserResponse);
10
11
  }
11
12
 
12
13
  message SendCheckUserExistsRequest {
@@ -25,6 +26,17 @@ message SendCreateUserRequest {
25
26
  string password_hash = 3;
26
27
  }
27
28
 
29
+ message UpdateUserRequest {
30
+ string id = 1;
31
+ optional string email = 2;
32
+ optional string username = 3;
33
+ optional string password_hash = 4;
34
+ }
35
+
36
+ message UpdateUserResponse {
37
+ bool status = 1;
38
+ }
39
+
28
40
  message SendCreateUserResponse {
29
41
  string id = 1;
30
42
  }