@voice-chat/contracts 1.0.10 → 1.0.11

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
@@ -10,15 +10,8 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "auth.v1";
12
12
 
13
- export enum TokenType {
14
- ACCESS = 0,
15
- REFRESH = 1,
16
- UNRECOGNIZED = -1,
17
- }
18
-
19
13
  export interface VerifyTokenRequest {
20
14
  token: string;
21
- tokenType: TokenType;
22
15
  }
23
16
 
24
17
  export interface VerifyTokenResponse {
@@ -58,50 +51,28 @@ export interface AuthServiceClient {
58
51
  }
59
52
 
60
53
  export interface AuthServiceController {
61
- login(
62
- request: LoginRequest,
63
- ): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
54
+ login(request: LoginRequest): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
64
55
 
65
56
  registration(
66
57
  request: RegistrationRequest,
67
- ):
68
- | Promise<RegistrationResponse>
69
- | Observable<RegistrationResponse>
70
- | RegistrationResponse;
58
+ ): Promise<RegistrationResponse> | Observable<RegistrationResponse> | RegistrationResponse;
71
59
 
72
60
  verifyToken(
73
61
  request: VerifyTokenRequest,
74
- ):
75
- | Promise<VerifyTokenResponse>
76
- | Observable<VerifyTokenResponse>
77
- | VerifyTokenResponse;
62
+ ): Promise<VerifyTokenResponse> | Observable<VerifyTokenResponse> | VerifyTokenResponse;
78
63
  }
79
64
 
80
65
  export function AuthServiceControllerMethods() {
81
66
  return function (constructor: Function) {
82
67
  const grpcMethods: string[] = ["login", "registration", "verifyToken"];
83
68
  for (const method of grpcMethods) {
84
- const descriptor: any = Reflect.getOwnPropertyDescriptor(
85
- constructor.prototype,
86
- method,
87
- );
88
- GrpcMethod("AuthService", method)(
89
- constructor.prototype[method],
90
- method,
91
- descriptor,
92
- );
69
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
70
+ GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
93
71
  }
94
72
  const grpcStreamMethods: string[] = [];
95
73
  for (const method of grpcStreamMethods) {
96
- const descriptor: any = Reflect.getOwnPropertyDescriptor(
97
- constructor.prototype,
98
- method,
99
- );
100
- GrpcStreamMethod("AuthService", method)(
101
- constructor.prototype[method],
102
- method,
103
- descriptor,
104
- );
74
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
75
+ GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
105
76
  }
106
77
  };
107
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voice-chat/contracts",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "api-contracts",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/proto/auth.proto CHANGED
@@ -8,14 +8,8 @@ service AuthService {
8
8
  rpc VerifyToken(VerifyTokenRequest) returns (VerifyTokenResponse);
9
9
  }
10
10
 
11
- enum TokenType {
12
- ACCESS = 0;
13
- REFRESH = 1;
14
- }
15
-
16
11
  message VerifyTokenRequest {
17
12
  string token = 1;
18
- TokenType token_type = 2;
19
13
  }
20
14
 
21
15
  message VerifyTokenResponse {