@requ1emz/contracts 1.0.25 → 1.0.29

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
@@ -50,6 +50,24 @@ export interface FamilyMemberDto {
50
50
  role: string;
51
51
  }
52
52
 
53
+ export interface AddMemberRequest {
54
+ familyId: string;
55
+ userId: string;
56
+ }
57
+
58
+ export interface AddMemberResponse {
59
+ status: boolean;
60
+ }
61
+
62
+ export interface RemoveMemberRequest {
63
+ memberId: string;
64
+ familyName: string;
65
+ }
66
+
67
+ export interface RemoveMemberResponse {
68
+ status: boolean;
69
+ }
70
+
53
71
  export const FAMILY_V1_PACKAGE_NAME = "family.v1";
54
72
 
55
73
  export interface FamilyServiceClient {
@@ -60,6 +78,10 @@ export interface FamilyServiceClient {
60
78
  getFamily(request: GetFamilyRequest): Observable<FamilyResponse>;
61
79
 
62
80
  inviteUser(request: InviteUserRequest): Observable<InviteUserResponse>;
81
+
82
+ addMember(request: AddMemberRequest): Observable<AddMemberResponse>;
83
+
84
+ removeMember(request: RemoveMemberRequest): Observable<RemoveMemberResponse>;
63
85
  }
64
86
 
65
87
  export interface FamilyServiceController {
@@ -74,11 +96,24 @@ export interface FamilyServiceController {
74
96
  inviteUser(
75
97
  request: InviteUserRequest,
76
98
  ): Promise<InviteUserResponse> | Observable<InviteUserResponse> | InviteUserResponse;
99
+
100
+ addMember(request: AddMemberRequest): Promise<AddMemberResponse> | Observable<AddMemberResponse> | AddMemberResponse;
101
+
102
+ removeMember(
103
+ request: RemoveMemberRequest,
104
+ ): Promise<RemoveMemberResponse> | Observable<RemoveMemberResponse> | RemoveMemberResponse;
77
105
  }
78
106
 
79
107
  export function FamilyServiceControllerMethods() {
80
108
  return function (constructor: Function) {
81
- const grpcMethods: string[] = ["createFamily", "deleteFamily", "getFamily", "inviteUser"];
109
+ const grpcMethods: string[] = [
110
+ "createFamily",
111
+ "deleteFamily",
112
+ "getFamily",
113
+ "inviteUser",
114
+ "addMember",
115
+ "removeMember",
116
+ ];
82
117
  for (const method of grpcMethods) {
83
118
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
84
119
  GrpcMethod("FamilyService", method)(constructor.prototype[method], method, descriptor);
@@ -37,24 +37,12 @@ export interface RespondToNotificationResponse {
37
37
  status: string;
38
38
  }
39
39
 
40
- export interface InviteUserRequest {
41
- invitedUserId: string;
42
- familyId: string;
43
- invitedByUserId: string;
44
- }
45
-
46
- export interface InviteUserResponse {
47
- status: boolean;
48
- }
49
-
50
40
  export const NOTIFICATION_V1_PACKAGE_NAME = "notification.v1";
51
41
 
52
42
  export interface NotificationServiceClient {
53
43
  getNotifications(request: GetNotificationsRequest): Observable<GetNotificationsResponse>;
54
44
 
55
45
  respondToNotification(request: RespondToNotificationRequest): Observable<RespondToNotificationResponse>;
56
-
57
- inviteUser(request: InviteUserRequest): Observable<InviteUserResponse>;
58
46
  }
59
47
 
60
48
  export interface NotificationServiceController {
@@ -65,15 +53,11 @@ export interface NotificationServiceController {
65
53
  respondToNotification(
66
54
  request: RespondToNotificationRequest,
67
55
  ): Promise<RespondToNotificationResponse> | Observable<RespondToNotificationResponse> | RespondToNotificationResponse;
68
-
69
- inviteUser(
70
- request: InviteUserRequest,
71
- ): Promise<InviteUserResponse> | Observable<InviteUserResponse> | InviteUserResponse;
72
56
  }
73
57
 
74
58
  export function NotificationServiceControllerMethods() {
75
59
  return function (constructor: Function) {
76
- const grpcMethods: string[] = ["getNotifications", "respondToNotification", "inviteUser"];
60
+ const grpcMethods: string[] = ["getNotifications", "respondToNotification"];
77
61
  for (const method of grpcMethods) {
78
62
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
79
63
  GrpcMethod("NotificationService", 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.25",
3
+ "version": "1.0.29",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -7,6 +7,8 @@ service FamilyService {
7
7
  rpc DeleteFamily (DeleteFamilyRequest) returns (DeleteFamilyResponse);
8
8
  rpc GetFamily (GetFamilyRequest) returns (FamilyResponse);
9
9
  rpc InviteUser (InviteUserRequest) returns (InviteUserResponse);
10
+ rpc AddMember (AddMemberRequest) returns (AddMemberResponse);
11
+ rpc RemoveMember (RemoveMemberRequest) returns (RemoveMemberResponse);
10
12
  }
11
13
 
12
14
  message CreateFamilyRequest {
@@ -47,4 +49,22 @@ message FamilyResponse {
47
49
  message FamilyMemberDto {
48
50
  string user_id = 1;
49
51
  string role = 2;
52
+ }
53
+
54
+ message AddMemberRequest {
55
+ string family_id = 1;
56
+ string user_id = 2;
57
+ }
58
+
59
+ message AddMemberResponse {
60
+ bool status = 1;
61
+ }
62
+
63
+ message RemoveMemberRequest {
64
+ string member_id = 1;
65
+ string family_name = 2;
66
+ }
67
+
68
+ message RemoveMemberResponse {
69
+ bool status = 1;
50
70
  }
@@ -5,7 +5,6 @@ package notification.v1;
5
5
  service NotificationService {
6
6
  rpc GetNotifications (GetNotificationsRequest) returns (GetNotificationsResponse);
7
7
  rpc RespondToNotification (RespondToNotificationRequest) returns (RespondToNotificationResponse);
8
- rpc InviteUser (InviteUserRequest) returns (InviteUserResponse);
9
8
  }
10
9
 
11
10
  message GetNotificationsRequest {
@@ -33,14 +32,4 @@ message RespondToNotificationRequest {
33
32
  message RespondToNotificationResponse {
34
33
  bool success = 1;
35
34
  string status = 2;
36
- }
37
-
38
- message InviteUserRequest {
39
- string invited_user_id = 1;
40
- string family_id = 2;
41
- string invited_by_user_id = 3;
42
- }
43
-
44
- message InviteUserResponse {
45
- bool status = 1;
46
35
  }