@requ1emz/contracts 1.0.28 → 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 +23 -1
- package/gen/notification.ts +1 -17
- package/package.json +1 -1
- package/proto/family.proto +10 -0
- package/proto/notification.proto +0 -11
package/gen/family.ts
CHANGED
|
@@ -59,6 +59,15 @@ export interface AddMemberResponse {
|
|
|
59
59
|
status: boolean;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
export interface RemoveMemberRequest {
|
|
63
|
+
memberId: string;
|
|
64
|
+
familyName: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface RemoveMemberResponse {
|
|
68
|
+
status: boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
62
71
|
export const FAMILY_V1_PACKAGE_NAME = "family.v1";
|
|
63
72
|
|
|
64
73
|
export interface FamilyServiceClient {
|
|
@@ -71,6 +80,8 @@ export interface FamilyServiceClient {
|
|
|
71
80
|
inviteUser(request: InviteUserRequest): Observable<InviteUserResponse>;
|
|
72
81
|
|
|
73
82
|
addMember(request: AddMemberRequest): Observable<AddMemberResponse>;
|
|
83
|
+
|
|
84
|
+
removeMember(request: RemoveMemberRequest): Observable<RemoveMemberResponse>;
|
|
74
85
|
}
|
|
75
86
|
|
|
76
87
|
export interface FamilyServiceController {
|
|
@@ -87,11 +98,22 @@ export interface FamilyServiceController {
|
|
|
87
98
|
): Promise<InviteUserResponse> | Observable<InviteUserResponse> | InviteUserResponse;
|
|
88
99
|
|
|
89
100
|
addMember(request: AddMemberRequest): Promise<AddMemberResponse> | Observable<AddMemberResponse> | AddMemberResponse;
|
|
101
|
+
|
|
102
|
+
removeMember(
|
|
103
|
+
request: RemoveMemberRequest,
|
|
104
|
+
): Promise<RemoveMemberResponse> | Observable<RemoveMemberResponse> | RemoveMemberResponse;
|
|
90
105
|
}
|
|
91
106
|
|
|
92
107
|
export function FamilyServiceControllerMethods() {
|
|
93
108
|
return function (constructor: Function) {
|
|
94
|
-
const grpcMethods: string[] = [
|
|
109
|
+
const grpcMethods: string[] = [
|
|
110
|
+
"createFamily",
|
|
111
|
+
"deleteFamily",
|
|
112
|
+
"getFamily",
|
|
113
|
+
"inviteUser",
|
|
114
|
+
"addMember",
|
|
115
|
+
"removeMember",
|
|
116
|
+
];
|
|
95
117
|
for (const method of grpcMethods) {
|
|
96
118
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
97
119
|
GrpcMethod("FamilyService", method)(constructor.prototype[method], method, descriptor);
|
package/gen/notification.ts
CHANGED
|
@@ -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"
|
|
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
package/proto/family.proto
CHANGED
|
@@ -8,6 +8,7 @@ service FamilyService {
|
|
|
8
8
|
rpc GetFamily (GetFamilyRequest) returns (FamilyResponse);
|
|
9
9
|
rpc InviteUser (InviteUserRequest) returns (InviteUserResponse);
|
|
10
10
|
rpc AddMember (AddMemberRequest) returns (AddMemberResponse);
|
|
11
|
+
rpc RemoveMember (RemoveMemberRequest) returns (RemoveMemberResponse);
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
message CreateFamilyRequest {
|
|
@@ -57,4 +58,13 @@ message AddMemberRequest {
|
|
|
57
58
|
|
|
58
59
|
message AddMemberResponse {
|
|
59
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;
|
|
60
70
|
}
|
package/proto/notification.proto
CHANGED
|
@@ -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
|
}
|