@requ1emz/contracts 1.0.20 → 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.
- package/gen/family.ts +17 -1
- package/gen/notification.ts +17 -1
- package/package.json +1 -1
- package/proto/family.proto +11 -0
- package/proto/notification.proto +11 -0
package/gen/family.ts
CHANGED
|
@@ -28,6 +28,16 @@ export interface GetFamilyRequest {
|
|
|
28
28
|
userId: string;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
export interface InviteUserRequest {
|
|
32
|
+
adminId: string;
|
|
33
|
+
familyId: string;
|
|
34
|
+
invitedUserId: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface InviteUserResponse {
|
|
38
|
+
status: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
31
41
|
export interface FamilyResponse {
|
|
32
42
|
id: string;
|
|
33
43
|
name: string;
|
|
@@ -48,6 +58,8 @@ export interface FamilyServiceClient {
|
|
|
48
58
|
deleteFamily(request: DeleteFamilyRequest): Observable<DeleteFamilyResponse>;
|
|
49
59
|
|
|
50
60
|
getFamily(request: GetFamilyRequest): Observable<FamilyResponse>;
|
|
61
|
+
|
|
62
|
+
inviteUser(request: InviteUserRequest): Observable<InviteUserResponse>;
|
|
51
63
|
}
|
|
52
64
|
|
|
53
65
|
export interface FamilyServiceController {
|
|
@@ -58,11 +70,15 @@ export interface FamilyServiceController {
|
|
|
58
70
|
): Promise<DeleteFamilyResponse> | Observable<DeleteFamilyResponse> | DeleteFamilyResponse;
|
|
59
71
|
|
|
60
72
|
getFamily(request: GetFamilyRequest): Promise<FamilyResponse> | Observable<FamilyResponse> | FamilyResponse;
|
|
73
|
+
|
|
74
|
+
inviteUser(
|
|
75
|
+
request: InviteUserRequest,
|
|
76
|
+
): Promise<InviteUserResponse> | Observable<InviteUserResponse> | InviteUserResponse;
|
|
61
77
|
}
|
|
62
78
|
|
|
63
79
|
export function FamilyServiceControllerMethods() {
|
|
64
80
|
return function (constructor: Function) {
|
|
65
|
-
const grpcMethods: string[] = ["createFamily", "deleteFamily", "getFamily"];
|
|
81
|
+
const grpcMethods: string[] = ["createFamily", "deleteFamily", "getFamily", "inviteUser"];
|
|
66
82
|
for (const method of grpcMethods) {
|
|
67
83
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
68
84
|
GrpcMethod("FamilyService", method)(constructor.prototype[method], method, descriptor);
|
package/gen/notification.ts
CHANGED
|
@@ -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
package/proto/family.proto
CHANGED
|
@@ -6,6 +6,7 @@ service FamilyService {
|
|
|
6
6
|
rpc CreateFamily (CreateFamilyRequest) returns (FamilyResponse);
|
|
7
7
|
rpc DeleteFamily (DeleteFamilyRequest) returns (DeleteFamilyResponse);
|
|
8
8
|
rpc GetFamily (GetFamilyRequest) returns (FamilyResponse);
|
|
9
|
+
rpc InviteUser (InviteUserRequest) returns (InviteUserResponse);
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
message CreateFamilyRequest {
|
|
@@ -26,6 +27,16 @@ message GetFamilyRequest {
|
|
|
26
27
|
string user_id = 1;
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
message InviteUserRequest {
|
|
31
|
+
string admin_id = 1;
|
|
32
|
+
string family_id = 2;
|
|
33
|
+
string invited_user_id = 3;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message InviteUserResponse {
|
|
37
|
+
bool status = 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
29
40
|
message FamilyResponse {
|
|
30
41
|
string id = 1;
|
|
31
42
|
string name = 2;
|
package/proto/notification.proto
CHANGED
|
@@ -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
|
}
|