@ciganov/contracts 1.1.12 → 1.1.14

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.
@@ -28,18 +28,28 @@ export interface Session {
28
28
  export interface RefreshTokenRequest {
29
29
  token: string;
30
30
  }
31
+ export interface RevokeSessionRequest {
32
+ token: string;
33
+ }
34
+ export interface RevokeAllSessionsRequest {
35
+ userId: string;
36
+ }
31
37
  export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
32
38
  export interface AuthServiceClient {
33
39
  sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
34
40
  verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
35
41
  getSessionByToken(request: GetSessionByTokenRequest): Observable<GetSessionByTokenResponse>;
36
42
  refreshToken(request: RefreshTokenRequest): Observable<Empty>;
43
+ revokeSession(request: RevokeSessionRequest): Observable<Empty>;
44
+ revokeAllSessions(request: RevokeAllSessionsRequest): Observable<Empty>;
37
45
  }
38
46
  export interface AuthServiceController {
39
47
  sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
40
48
  verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
41
49
  getSessionByToken(request: GetSessionByTokenRequest): Promise<GetSessionByTokenResponse> | Observable<GetSessionByTokenResponse> | GetSessionByTokenResponse;
42
50
  refreshToken(request: RefreshTokenRequest): void | Promise<void>;
51
+ revokeSession(request: RevokeSessionRequest): void | Promise<void>;
52
+ revokeAllSessions(request: RevokeAllSessionsRequest): void | Promise<void>;
43
53
  }
44
54
  export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
45
55
  export declare const AUTH_SERVICE_NAME = "AuthService";
package/dist/gen/auth.js CHANGED
@@ -13,7 +13,14 @@ exports.protobufPackage = "auth.v1";
13
13
  exports.AUTH_V1_PACKAGE_NAME = "auth.v1";
14
14
  function AuthServiceControllerMethods() {
15
15
  return function (constructor) {
16
- const grpcMethods = ["sendOtp", "verifyOtp", "getSessionByToken", "refreshToken"];
16
+ const grpcMethods = [
17
+ "sendOtp",
18
+ "verifyOtp",
19
+ "getSessionByToken",
20
+ "refreshToken",
21
+ "revokeSession",
22
+ "revokeAllSessions",
23
+ ];
17
24
  for (const method of grpcMethods) {
18
25
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
26
  (0, microservices_1.GrpcMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
@@ -10,6 +10,8 @@ service AuthService {
10
10
 
11
11
  rpc GetSessionByToken(GetSessionByTokenRequest) returns(GetSessionByTokenResponse);
12
12
  rpc RefreshToken(RefreshTokenRequest) returns (google.protobuf.Empty);
13
+ rpc RevokeSession(RevokeSessionRequest) returns (google.protobuf.Empty);
14
+ rpc RevokeAllSessions(RevokeAllSessionsRequest) returns (google.protobuf.Empty);
13
15
  }
14
16
 
15
17
  message SendOtpRequest {
@@ -45,4 +47,12 @@ message Session {
45
47
 
46
48
  message RefreshTokenRequest {
47
49
  string token = 1;
50
+ }
51
+
52
+ message RevokeSessionRequest {
53
+ string token = 1;
54
+ }
55
+
56
+ message RevokeAllSessionsRequest {
57
+ string userId = 1;
48
58
  }
@@ -6,4 +6,5 @@ export declare const PROTO_PATHS: {
6
6
  readonly ODD: string;
7
7
  readonly BETTING: string;
8
8
  readonly BONUS: string;
9
+ readonly MEDIA: string;
9
10
  };
@@ -9,5 +9,6 @@ exports.PROTO_PATHS = {
9
9
  BALANCE: (0, node_path_1.join)(__dirname, './contracts/balance.proto'),
10
10
  ODD: (0, node_path_1.join)(__dirname, './contracts/odd.proto'),
11
11
  BETTING: (0, node_path_1.join)(__dirname, './contracts/betting.proto'),
12
- BONUS: (0, node_path_1.join)(__dirname, './contracts/bonus.proto')
12
+ BONUS: (0, node_path_1.join)(__dirname, './contracts/bonus.proto'),
13
+ MEDIA: (0, node_path_1.join)(__dirname, './contracts/media.proto'),
13
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ciganov/contracts",
3
- "version": "1.1.12",
3
+ "version": "1.1.14",
4
4
  "description": "Protobuf definitions and generated ts types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",