@funpay-pilot/contracts 0.1.73 → 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 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/gen/core.ts CHANGED
@@ -54,8 +54,6 @@ export interface Account {
54
54
  id: string;
55
55
  userId: string;
56
56
  funpayId?: number | undefined;
57
- phpsessid?: string | undefined;
58
- csrfToken?: string | undefined;
59
57
  username?: string | undefined;
60
58
  avatarUrl?: string | undefined;
61
59
  balance?: number | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funpay-pilot/contracts",
3
- "version": "0.1.73",
3
+ "version": "0.1.75",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
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
+ }
package/proto/core.proto CHANGED
@@ -47,15 +47,13 @@ message Account {
47
47
  string id = 1;
48
48
  string user_id = 2;
49
49
  optional int32 funpay_id = 3;
50
- optional string phpsessid = 5;
51
- optional string csrf_token = 6;
52
- optional string username = 7;
53
- optional string avatar_url = 8;
54
- optional float balance = 9;
55
- Status status = 10;
56
- optional string error = 11;
57
- string created_at = 12;
58
- string updated_at = 13;
50
+ optional string username = 4;
51
+ optional string avatar_url = 5;
52
+ optional float balance = 6;
53
+ Status status = 7;
54
+ optional string error = 8;
55
+ string created_at = 9;
56
+ string updated_at = 10;
59
57
  }
60
58
 
61
59
  enum Status {