@funpay-pilot/contracts 0.1.74 → 0.1.75
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 +16 -1
- package/package.json +1 -1
- package/proto/auth.proto +12 -0
package/gen/auth.ts
CHANGED
|
@@ -49,6 +49,17 @@ export interface ValidateResponse {
|
|
|
49
49
|
userId: string;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
export interface GetUserRequest {
|
|
53
|
+
accessToken: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface GetUserResponse {
|
|
57
|
+
userId: string;
|
|
58
|
+
email: string;
|
|
59
|
+
username: string;
|
|
60
|
+
createdAt: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
52
63
|
export const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
53
64
|
|
|
54
65
|
export interface AuthServiceClient {
|
|
@@ -59,6 +70,8 @@ export interface AuthServiceClient {
|
|
|
59
70
|
refresh(request: RefreshRequest): Observable<RefreshResponse>;
|
|
60
71
|
|
|
61
72
|
validate(request: ValidateRequest): Observable<ValidateResponse>;
|
|
73
|
+
|
|
74
|
+
getUser(request: GetUserRequest): Observable<GetUserResponse>;
|
|
62
75
|
}
|
|
63
76
|
|
|
64
77
|
export interface AuthServiceController {
|
|
@@ -69,11 +82,13 @@ export interface AuthServiceController {
|
|
|
69
82
|
refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
|
|
70
83
|
|
|
71
84
|
validate(request: ValidateRequest): Promise<ValidateResponse> | Observable<ValidateResponse> | ValidateResponse;
|
|
85
|
+
|
|
86
|
+
getUser(request: GetUserRequest): Promise<GetUserResponse> | Observable<GetUserResponse> | GetUserResponse;
|
|
72
87
|
}
|
|
73
88
|
|
|
74
89
|
export function AuthServiceControllerMethods() {
|
|
75
90
|
return function (constructor: Function) {
|
|
76
|
-
const grpcMethods: string[] = ["register", "login", "refresh", "validate"];
|
|
91
|
+
const grpcMethods: string[] = ["register", "login", "refresh", "validate", "getUser"];
|
|
77
92
|
for (const method of grpcMethods) {
|
|
78
93
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
79
94
|
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -7,6 +7,7 @@ service AuthService {
|
|
|
7
7
|
rpc Login(LoginRequest) returns (LoginResponse);
|
|
8
8
|
rpc Refresh(RefreshRequest) returns (RefreshResponse);
|
|
9
9
|
rpc Validate(ValidateRequest) returns (ValidateResponse);
|
|
10
|
+
rpc GetUser(GetUserRequest) returns (GetUserResponse);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
message RegisterRequest {
|
|
@@ -47,3 +48,14 @@ message ValidateResponse {
|
|
|
47
48
|
bool valid = 1;
|
|
48
49
|
string user_id = 2;
|
|
49
50
|
}
|
|
51
|
+
|
|
52
|
+
message GetUserRequest {
|
|
53
|
+
string access_token = 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message GetUserResponse {
|
|
57
|
+
string user_id = 1;
|
|
58
|
+
string email = 2;
|
|
59
|
+
string username = 3;
|
|
60
|
+
string created_at = 4;
|
|
61
|
+
}
|