@readytomog/contracts 1.1.4 → 1.1.5
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/auth.ts +5 -14
- package/package.json +1 -1
- package/proto/auth.proto +2 -8
package/gen/auth.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
9
|
import { Observable } from "rxjs";
|
|
10
|
+
import { Empty } from "./google/protobuf/empty";
|
|
10
11
|
|
|
11
12
|
export const protobufPackage = "auth.v1";
|
|
12
13
|
|
|
@@ -31,18 +32,10 @@ export interface RegistrationResponse {
|
|
|
31
32
|
message: string;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
export interface LogoutRequest {
|
|
35
|
-
userId: number;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
35
|
export interface LogoutResponse {
|
|
39
36
|
ok: boolean;
|
|
40
37
|
}
|
|
41
38
|
|
|
42
|
-
export interface RefreshAuthRequest {
|
|
43
|
-
userId: number;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
39
|
export interface RefreshAuthResponse {
|
|
47
40
|
accessToken: string;
|
|
48
41
|
refreshToken: string;
|
|
@@ -55,9 +48,9 @@ export interface AuthServiceClient {
|
|
|
55
48
|
|
|
56
49
|
registration(request: RegistrationRequest): Observable<RegistrationResponse>;
|
|
57
50
|
|
|
58
|
-
logout(request:
|
|
51
|
+
logout(request: Empty): Observable<LogoutResponse>;
|
|
59
52
|
|
|
60
|
-
refreshAuth(request:
|
|
53
|
+
refreshAuth(request: Empty): Observable<RefreshAuthResponse>;
|
|
61
54
|
}
|
|
62
55
|
|
|
63
56
|
export interface AuthServiceController {
|
|
@@ -67,11 +60,9 @@ export interface AuthServiceController {
|
|
|
67
60
|
request: RegistrationRequest,
|
|
68
61
|
): Promise<RegistrationResponse> | Observable<RegistrationResponse> | RegistrationResponse;
|
|
69
62
|
|
|
70
|
-
logout(request:
|
|
63
|
+
logout(request: Empty): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
|
|
71
64
|
|
|
72
|
-
refreshAuth(
|
|
73
|
-
request: RefreshAuthRequest,
|
|
74
|
-
): Promise<RefreshAuthResponse> | Observable<RefreshAuthResponse> | RefreshAuthResponse;
|
|
65
|
+
refreshAuth(request: Empty): Promise<RefreshAuthResponse> | Observable<RefreshAuthResponse> | RefreshAuthResponse;
|
|
75
66
|
}
|
|
76
67
|
|
|
77
68
|
export function AuthServiceControllerMethods() {
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -7,8 +7,8 @@ import "google/protobuf/empty.proto";
|
|
|
7
7
|
service AuthService {
|
|
8
8
|
rpc Login (LoginRequest) returns (LoginResponse);
|
|
9
9
|
rpc Registration (RegistrationRequest) returns (RegistrationResponse);
|
|
10
|
-
rpc Logout (
|
|
11
|
-
rpc RefreshAuth (
|
|
10
|
+
rpc Logout (google.protobuf.Empty) returns (LogoutResponse);
|
|
11
|
+
rpc RefreshAuth (google.protobuf.Empty) returns (RefreshAuthResponse);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
message LoginRequest {
|
|
@@ -32,17 +32,11 @@ message RegistrationResponse {
|
|
|
32
32
|
string message = 1;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
message LogoutRequest {
|
|
36
|
-
int32 userId = 1;
|
|
37
|
-
}
|
|
38
35
|
|
|
39
36
|
message LogoutResponse {
|
|
40
37
|
bool ok = 1;
|
|
41
38
|
}
|
|
42
39
|
|
|
43
|
-
message RefreshAuthRequest {
|
|
44
|
-
int32 userId = 1;
|
|
45
|
-
}
|
|
46
40
|
|
|
47
41
|
message RefreshAuthResponse {
|
|
48
42
|
string accessToken = 1;
|