@requ1emz/contracts 1.0.21 → 1.0.22

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.
@@ -37,12 +37,24 @@ export interface RespondResponse {
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
+
40
50
  export const NOTIFICATION_PACKAGE_NAME = "notification";
41
51
 
42
52
  export interface NotificationServiceClient {
43
53
  getNotifications(request: GetNotificationsRequest): Observable<GetNotificationsResponse>;
44
54
 
45
55
  respondToNotification(request: RespondRequest): Observable<RespondResponse>;
56
+
57
+ inviteUser(request: InviteUserRequest): Observable<InviteUserResponse>;
46
58
  }
47
59
 
48
60
  export interface NotificationServiceController {
@@ -53,11 +65,15 @@ export interface NotificationServiceController {
53
65
  respondToNotification(
54
66
  request: RespondRequest,
55
67
  ): Promise<RespondResponse> | Observable<RespondResponse> | RespondResponse;
68
+
69
+ inviteUser(
70
+ request: InviteUserRequest,
71
+ ): Promise<InviteUserResponse> | Observable<InviteUserResponse> | InviteUserResponse;
56
72
  }
57
73
 
58
74
  export function NotificationServiceControllerMethods() {
59
75
  return function (constructor: Function) {
60
- const grpcMethods: string[] = ["getNotifications", "respondToNotification"];
76
+ const grpcMethods: string[] = ["getNotifications", "respondToNotification", "inviteUser"];
61
77
  for (const method of grpcMethods) {
62
78
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
63
79
  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.21",
3
+ "version": "1.0.22",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -5,6 +5,7 @@ package notification;
5
5
  service NotificationService {
6
6
  rpc GetNotifications (GetNotificationsRequest) returns (GetNotificationsResponse);
7
7
  rpc RespondToNotification (RespondRequest) returns (RespondResponse);
8
+ rpc InviteUser (InviteUserRequest) returns (InviteUserResponse);
8
9
  }
9
10
 
10
11
  message GetNotificationsRequest {
@@ -32,4 +33,14 @@ message RespondRequest {
32
33
  message RespondResponse {
33
34
  bool success = 1;
34
35
  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;
35
46
  }