@requ1emz/contracts 1.0.24 → 1.0.28
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 +14 -1
- package/gen/notification.ts +2 -2
- package/package.json +1 -1
- package/proto/family.proto +10 -0
- package/proto/notification.proto +1 -1
package/gen/family.ts
CHANGED
|
@@ -50,6 +50,15 @@ 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
|
+
|
|
53
62
|
export const FAMILY_V1_PACKAGE_NAME = "family.v1";
|
|
54
63
|
|
|
55
64
|
export interface FamilyServiceClient {
|
|
@@ -60,6 +69,8 @@ export interface FamilyServiceClient {
|
|
|
60
69
|
getFamily(request: GetFamilyRequest): Observable<FamilyResponse>;
|
|
61
70
|
|
|
62
71
|
inviteUser(request: InviteUserRequest): Observable<InviteUserResponse>;
|
|
72
|
+
|
|
73
|
+
addMember(request: AddMemberRequest): Observable<AddMemberResponse>;
|
|
63
74
|
}
|
|
64
75
|
|
|
65
76
|
export interface FamilyServiceController {
|
|
@@ -74,11 +85,13 @@ export interface FamilyServiceController {
|
|
|
74
85
|
inviteUser(
|
|
75
86
|
request: InviteUserRequest,
|
|
76
87
|
): Promise<InviteUserResponse> | Observable<InviteUserResponse> | InviteUserResponse;
|
|
88
|
+
|
|
89
|
+
addMember(request: AddMemberRequest): Promise<AddMemberResponse> | Observable<AddMemberResponse> | AddMemberResponse;
|
|
77
90
|
}
|
|
78
91
|
|
|
79
92
|
export function FamilyServiceControllerMethods() {
|
|
80
93
|
return function (constructor: Function) {
|
|
81
|
-
const grpcMethods: string[] = ["createFamily", "deleteFamily", "getFamily", "inviteUser"];
|
|
94
|
+
const grpcMethods: string[] = ["createFamily", "deleteFamily", "getFamily", "inviteUser", "addMember"];
|
|
82
95
|
for (const method of grpcMethods) {
|
|
83
96
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
84
97
|
GrpcMethod("FamilyService", method)(constructor.prototype[method], method, descriptor);
|
package/gen/notification.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
9
|
import { Observable } from "rxjs";
|
|
10
10
|
|
|
11
|
-
export const protobufPackage = "notification";
|
|
11
|
+
export const protobufPackage = "notification.v1";
|
|
12
12
|
|
|
13
13
|
export interface GetNotificationsRequest {
|
|
14
14
|
userId: string;
|
|
@@ -47,7 +47,7 @@ export interface InviteUserResponse {
|
|
|
47
47
|
status: boolean;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export const
|
|
50
|
+
export const NOTIFICATION_V1_PACKAGE_NAME = "notification.v1";
|
|
51
51
|
|
|
52
52
|
export interface NotificationServiceClient {
|
|
53
53
|
getNotifications(request: GetNotificationsRequest): Observable<GetNotificationsResponse>;
|
package/package.json
CHANGED
package/proto/family.proto
CHANGED
|
@@ -7,6 +7,7 @@ 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);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
message CreateFamilyRequest {
|
|
@@ -47,4 +48,13 @@ message FamilyResponse {
|
|
|
47
48
|
message FamilyMemberDto {
|
|
48
49
|
string user_id = 1;
|
|
49
50
|
string role = 2;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message AddMemberRequest {
|
|
54
|
+
string family_id = 1;
|
|
55
|
+
string user_id = 2;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message AddMemberResponse {
|
|
59
|
+
bool status = 1;
|
|
50
60
|
}
|