@wenlarge/communication 1.4.9 → 1.5.0

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.
@@ -86,6 +86,21 @@ export interface AddCompanyRequest {
86
86
  export interface UpdateCompanyRequest {
87
87
  name: string;
88
88
  }
89
+ export interface GetInviteRequest {
90
+ skip: number;
91
+ take: number;
92
+ }
93
+ export interface GetInviteResponse {
94
+ invites: Invite[];
95
+ total: number;
96
+ }
97
+ export interface Invite {
98
+ id: string;
99
+ companyId: string;
100
+ email: string;
101
+ status: string;
102
+ createdAt: string;
103
+ }
89
104
  export declare const AUTH_PACKAGE_NAME = "auth";
90
105
  export interface AuthServiceClient {
91
106
  login(request: LoginRequest, metadata?: Metadata): Observable<LoginResponse>;
@@ -102,6 +117,7 @@ export interface AuthServiceClient {
102
117
  addCompany(request: AddCompanyRequest, metadata?: Metadata): Observable<Empty>;
103
118
  updateCompany(request: UpdateCompanyRequest, metadata?: Metadata): Observable<Empty>;
104
119
  leaveCompany(request: Empty, metadata?: Metadata): Observable<Empty>;
120
+ getInvites(request: GetInviteRequest, metadata?: Metadata): Observable<GetInviteResponse>;
105
121
  }
106
122
  export interface AuthServiceController {
107
123
  login(request: LoginRequest, metadata?: Metadata): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
@@ -118,6 +134,7 @@ export interface AuthServiceController {
118
134
  addCompany(request: AddCompanyRequest, metadata?: Metadata): void;
119
135
  updateCompany(request: UpdateCompanyRequest, metadata?: Metadata): void;
120
136
  leaveCompany(request: Empty, metadata?: Metadata): void;
137
+ getInvites(request: GetInviteRequest, metadata?: Metadata): Promise<GetInviteResponse> | Observable<GetInviteResponse> | GetInviteResponse;
121
138
  }
122
139
  export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
123
140
  export declare const AUTH_SERVICE_NAME = "AuthService";
@@ -27,6 +27,7 @@ function AuthServiceControllerMethods() {
27
27
  "addCompany",
28
28
  "updateCompany",
29
29
  "leaveCompany",
30
+ "getInvites",
30
31
  ];
31
32
  for (const method of grpcMethods) {
32
33
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenlarge/communication",
3
- "version": "1.4.9",
3
+ "version": "1.5.0",
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",
package/proto/auth.proto CHANGED
@@ -19,6 +19,7 @@ service AuthService {
19
19
  rpc AddCompany (AddCompanyRequest) returns (google.protobuf.Empty);
20
20
  rpc UpdateCompany (UpdateCompanyRequest) returns (google.protobuf.Empty);
21
21
  rpc LeaveCompany (google.protobuf.Empty) returns (google.protobuf.Empty);
22
+ rpc GetInvites (GetInviteRequest) returns (GetInviteResponse);
22
23
  }
23
24
 
24
25
  message LoginRequest {
@@ -123,3 +124,21 @@ message AddCompanyRequest {
123
124
  message UpdateCompanyRequest {
124
125
  string name = 1;
125
126
  }
127
+
128
+ message GetInviteRequest {
129
+ int32 skip = 1;
130
+ int32 take = 2;
131
+ }
132
+
133
+ message GetInviteResponse {
134
+ repeated Invite invites = 1;
135
+ int32 total = 2;
136
+ }
137
+
138
+ message Invite {
139
+ string id = 1;
140
+ string companyId = 2;
141
+ string email = 3;
142
+ string status = 4;
143
+ string createdAt = 5;
144
+ }
@@ -115,6 +115,24 @@ export interface UpdateCompanyRequest {
115
115
  name: string;
116
116
  }
117
117
 
118
+ export interface GetInviteRequest {
119
+ skip: number;
120
+ take: number;
121
+ }
122
+
123
+ export interface GetInviteResponse {
124
+ invites: Invite[];
125
+ total: number;
126
+ }
127
+
128
+ export interface Invite {
129
+ id: string;
130
+ companyId: string;
131
+ email: string;
132
+ status: string;
133
+ createdAt: string;
134
+ }
135
+
118
136
  export const AUTH_PACKAGE_NAME = "auth";
119
137
 
120
138
  export interface AuthServiceClient {
@@ -145,6 +163,8 @@ export interface AuthServiceClient {
145
163
  updateCompany(request: UpdateCompanyRequest, metadata?: Metadata): Observable<Empty>;
146
164
 
147
165
  leaveCompany(request: Empty, metadata?: Metadata): Observable<Empty>;
166
+
167
+ getInvites(request: GetInviteRequest, metadata?: Metadata): Observable<GetInviteResponse>;
148
168
  }
149
169
 
150
170
  export interface AuthServiceController {
@@ -181,6 +201,11 @@ export interface AuthServiceController {
181
201
  updateCompany(request: UpdateCompanyRequest, metadata?: Metadata): void;
182
202
 
183
203
  leaveCompany(request: Empty, metadata?: Metadata): void;
204
+
205
+ getInvites(
206
+ request: GetInviteRequest,
207
+ metadata?: Metadata,
208
+ ): Promise<GetInviteResponse> | Observable<GetInviteResponse> | GetInviteResponse;
184
209
  }
185
210
 
186
211
  export function AuthServiceControllerMethods() {
@@ -200,6 +225,7 @@ export function AuthServiceControllerMethods() {
200
225
  "addCompany",
201
226
  "updateCompany",
202
227
  "leaveCompany",
228
+ "getInvites",
203
229
  ];
204
230
  for (const method of grpcMethods) {
205
231
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);