@requ1emz/contracts 1.0.21 → 1.0.23

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.
@@ -26,23 +26,35 @@ export interface NotificationItem {
26
26
  createdAt: string;
27
27
  }
28
28
 
29
- export interface RespondRequest {
29
+ export interface RespondToNotificationRequest {
30
30
  notificationId: string;
31
31
  userId: string;
32
32
  action: string;
33
33
  }
34
34
 
35
- export interface RespondResponse {
35
+ export interface RespondToNotificationResponse {
36
36
  success: boolean;
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
- respondToNotification(request: RespondRequest): Observable<RespondResponse>;
55
+ respondToNotification(request: RespondToNotificationRequest): Observable<RespondToNotificationResponse>;
56
+
57
+ inviteUser(request: InviteUserRequest): Observable<InviteUserResponse>;
46
58
  }
47
59
 
48
60
  export interface NotificationServiceController {
@@ -51,13 +63,17 @@ export interface NotificationServiceController {
51
63
  ): Promise<GetNotificationsResponse> | Observable<GetNotificationsResponse> | GetNotificationsResponse;
52
64
 
53
65
  respondToNotification(
54
- request: RespondRequest,
55
- ): Promise<RespondResponse> | Observable<RespondResponse> | RespondResponse;
66
+ request: RespondToNotificationRequest,
67
+ ): Promise<RespondToNotificationResponse> | Observable<RespondToNotificationResponse> | RespondToNotificationResponse;
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.23",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -4,7 +4,8 @@ package notification;
4
4
 
5
5
  service NotificationService {
6
6
  rpc GetNotifications (GetNotificationsRequest) returns (GetNotificationsResponse);
7
- rpc RespondToNotification (RespondRequest) returns (RespondResponse);
7
+ rpc RespondToNotification (RespondToNotificationRequest) returns (RespondToNotificationResponse);
8
+ rpc InviteUser (InviteUserRequest) returns (InviteUserResponse);
8
9
  }
9
10
 
10
11
  message GetNotificationsRequest {
@@ -23,13 +24,23 @@ message NotificationItem {
23
24
  string created_at = 5;
24
25
  }
25
26
 
26
- message RespondRequest {
27
+ message RespondToNotificationRequest {
27
28
  string notification_id = 1;
28
29
  string user_id = 2;
29
30
  string action = 3;
30
31
  }
31
32
 
32
- message RespondResponse {
33
+ message RespondToNotificationResponse {
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
  }