@wenlarge/communication 1.0.3 → 1.0.4
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/dist/generated/auth.d.ts +22 -0
- package/dist/generated/auth.js +1 -1
- package/package.json +5 -5
- package/proto/auth.proto +24 -0
- package/src/generated/auth.ts +37 -1
package/dist/generated/auth.d.ts
CHANGED
|
@@ -27,6 +27,24 @@ export interface Company {
|
|
|
27
27
|
export interface CompanyUser {
|
|
28
28
|
company?: Company | undefined;
|
|
29
29
|
}
|
|
30
|
+
export interface InviteToCompanyRequest {
|
|
31
|
+
companyId: string;
|
|
32
|
+
email: string;
|
|
33
|
+
}
|
|
34
|
+
export interface InviteToCompanyResponse {
|
|
35
|
+
id: string;
|
|
36
|
+
companyId: string;
|
|
37
|
+
email: string;
|
|
38
|
+
}
|
|
39
|
+
export interface UpdateInviteStatusRequest {
|
|
40
|
+
inviteId: string;
|
|
41
|
+
userId: string;
|
|
42
|
+
status: string;
|
|
43
|
+
}
|
|
44
|
+
export interface UpdateInviteStatusResponse {
|
|
45
|
+
id: string;
|
|
46
|
+
status: string;
|
|
47
|
+
}
|
|
30
48
|
export interface GetMeResponse {
|
|
31
49
|
id: string;
|
|
32
50
|
name: string;
|
|
@@ -40,11 +58,15 @@ export interface AuthServiceClient {
|
|
|
40
58
|
login(request: LoginRequest, metadata?: Metadata): Observable<LoginResponse>;
|
|
41
59
|
register(request: RegisterRequest, metadata?: Metadata): Observable<Empty>;
|
|
42
60
|
getMe(request: GetMeRequest, metadata?: Metadata): Observable<GetMeResponse>;
|
|
61
|
+
inviteToCompany(request: InviteToCompanyRequest, metadata?: Metadata): Observable<InviteToCompanyResponse>;
|
|
62
|
+
updateInviteStatus(request: UpdateInviteStatusRequest, metadata?: Metadata): Observable<UpdateInviteStatusResponse>;
|
|
43
63
|
}
|
|
44
64
|
export interface AuthServiceController {
|
|
45
65
|
login(request: LoginRequest, metadata?: Metadata): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
|
|
46
66
|
register(request: RegisterRequest, metadata?: Metadata): void;
|
|
47
67
|
getMe(request: GetMeRequest, metadata?: Metadata): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
|
|
68
|
+
inviteToCompany(request: InviteToCompanyRequest, metadata?: Metadata): Promise<InviteToCompanyResponse> | Observable<InviteToCompanyResponse> | InviteToCompanyResponse;
|
|
69
|
+
updateInviteStatus(request: UpdateInviteStatusRequest, metadata?: Metadata): Promise<UpdateInviteStatusResponse> | Observable<UpdateInviteStatusResponse> | UpdateInviteStatusResponse;
|
|
48
70
|
}
|
|
49
71
|
export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
|
|
50
72
|
export declare const AUTH_SERVICE_NAME = "AuthService";
|
package/dist/generated/auth.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.protobufPackage = "auth";
|
|
|
12
12
|
exports.AUTH_PACKAGE_NAME = "auth";
|
|
13
13
|
function AuthServiceControllerMethods() {
|
|
14
14
|
return function (constructor) {
|
|
15
|
-
const grpcMethods = ["login", "register", "getMe"];
|
|
15
|
+
const grpcMethods = ["login", "register", "getMe", "inviteToCompany", "updateInviteStatus"];
|
|
16
16
|
for (const method of grpcMethods) {
|
|
17
17
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
18
18
|
(0, microservices_1.GrpcMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wenlarge/communication",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Shared gRPC proto interfaces and generated clients for Wenlarge microservices.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@grpc/grpc-js": "^1.13.3",
|
|
37
|
-
"@grpc/proto-loader": "^0.
|
|
38
|
-
"rxjs": "^7.8.
|
|
37
|
+
"@grpc/proto-loader": "^0.7.15",
|
|
38
|
+
"rxjs": "^7.8.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@nestjs/microservices": "^
|
|
41
|
+
"@nestjs/microservices": "^10.4.20",
|
|
42
42
|
"@types/node": "^24.9.1",
|
|
43
43
|
"ts-proto": "^1.152.2",
|
|
44
|
-
"typescript": "^5.
|
|
44
|
+
"typescript": "^5.3.3"
|
|
45
45
|
}
|
|
46
46
|
}
|
package/proto/auth.proto
CHANGED
|
@@ -8,6 +8,8 @@ service AuthService {
|
|
|
8
8
|
rpc Login (LoginRequest) returns (LoginResponse);
|
|
9
9
|
rpc Register (RegisterRequest) returns (google.protobuf.Empty);
|
|
10
10
|
rpc GetMe (GetMeRequest) returns (GetMeResponse);
|
|
11
|
+
rpc InviteToCompany (InviteToCompanyRequest) returns (InviteToCompanyResponse);
|
|
12
|
+
rpc UpdateInviteStatus (UpdateInviteStatusRequest) returns (UpdateInviteStatusResponse);
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
message LoginRequest {
|
|
@@ -41,6 +43,28 @@ message CompanyUser {
|
|
|
41
43
|
Company company = 1;
|
|
42
44
|
}
|
|
43
45
|
|
|
46
|
+
message InviteToCompanyRequest {
|
|
47
|
+
string companyId = 1;
|
|
48
|
+
string email = 2;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
message InviteToCompanyResponse{
|
|
52
|
+
string id = 1;
|
|
53
|
+
string companyId = 2;
|
|
54
|
+
string email = 3;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message UpdateInviteStatusRequest{
|
|
58
|
+
string inviteId = 1;
|
|
59
|
+
string userId =2;
|
|
60
|
+
string status = 3;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
message UpdateInviteStatusResponse{
|
|
64
|
+
string id = 1 ;
|
|
65
|
+
string status = 2;
|
|
66
|
+
}
|
|
67
|
+
|
|
44
68
|
message GetMeResponse {
|
|
45
69
|
string id = 1;
|
|
46
70
|
string name = 2;
|
package/src/generated/auth.ts
CHANGED
|
@@ -43,6 +43,28 @@ export interface CompanyUser {
|
|
|
43
43
|
company?: Company | undefined;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
export interface InviteToCompanyRequest {
|
|
47
|
+
companyId: string;
|
|
48
|
+
email: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface InviteToCompanyResponse {
|
|
52
|
+
id: string;
|
|
53
|
+
companyId: string;
|
|
54
|
+
email: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface UpdateInviteStatusRequest {
|
|
58
|
+
inviteId: string;
|
|
59
|
+
userId: string;
|
|
60
|
+
status: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface UpdateInviteStatusResponse {
|
|
64
|
+
id: string;
|
|
65
|
+
status: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
46
68
|
export interface GetMeResponse {
|
|
47
69
|
id: string;
|
|
48
70
|
name: string;
|
|
@@ -60,6 +82,10 @@ export interface AuthServiceClient {
|
|
|
60
82
|
register(request: RegisterRequest, metadata?: Metadata): Observable<Empty>;
|
|
61
83
|
|
|
62
84
|
getMe(request: GetMeRequest, metadata?: Metadata): Observable<GetMeResponse>;
|
|
85
|
+
|
|
86
|
+
inviteToCompany(request: InviteToCompanyRequest, metadata?: Metadata): Observable<InviteToCompanyResponse>;
|
|
87
|
+
|
|
88
|
+
updateInviteStatus(request: UpdateInviteStatusRequest, metadata?: Metadata): Observable<UpdateInviteStatusResponse>;
|
|
63
89
|
}
|
|
64
90
|
|
|
65
91
|
export interface AuthServiceController {
|
|
@@ -68,11 +94,21 @@ export interface AuthServiceController {
|
|
|
68
94
|
register(request: RegisterRequest, metadata?: Metadata): void;
|
|
69
95
|
|
|
70
96
|
getMe(request: GetMeRequest, metadata?: Metadata): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
|
|
97
|
+
|
|
98
|
+
inviteToCompany(
|
|
99
|
+
request: InviteToCompanyRequest,
|
|
100
|
+
metadata?: Metadata,
|
|
101
|
+
): Promise<InviteToCompanyResponse> | Observable<InviteToCompanyResponse> | InviteToCompanyResponse;
|
|
102
|
+
|
|
103
|
+
updateInviteStatus(
|
|
104
|
+
request: UpdateInviteStatusRequest,
|
|
105
|
+
metadata?: Metadata,
|
|
106
|
+
): Promise<UpdateInviteStatusResponse> | Observable<UpdateInviteStatusResponse> | UpdateInviteStatusResponse;
|
|
71
107
|
}
|
|
72
108
|
|
|
73
109
|
export function AuthServiceControllerMethods() {
|
|
74
110
|
return function (constructor: Function) {
|
|
75
|
-
const grpcMethods: string[] = ["login", "register", "getMe"];
|
|
111
|
+
const grpcMethods: string[] = ["login", "register", "getMe", "inviteToCompany", "updateInviteStatus"];
|
|
76
112
|
for (const method of grpcMethods) {
|
|
77
113
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
78
114
|
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|