@mamindom/contracts 1.0.150 → 1.0.152

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.
@@ -1,5 +1,11 @@
1
1
  import { Observable } from "rxjs";
2
2
  export declare const protobufPackage = "auth.v1";
3
+ export interface LogoutRequest {
4
+ refreshToken: string;
5
+ }
6
+ export interface LogoutResponse {
7
+ ok: boolean;
8
+ }
3
9
  export interface SendOtpRequest {
4
10
  identifier: string;
5
11
  type: string;
@@ -41,6 +47,7 @@ export interface AuthServiceClient {
41
47
  refresh(request: RefreshRequest): Observable<RefreshResponse>;
42
48
  login(request: LoginRequest): Observable<AuthResponse>;
43
49
  register(request: RegisterRequest): Observable<AuthResponse>;
50
+ logout(request: LogoutRequest): Observable<LogoutResponse>;
44
51
  }
45
52
  export interface AuthServiceController {
46
53
  sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
@@ -48,6 +55,7 @@ export interface AuthServiceController {
48
55
  refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
49
56
  login(request: LoginRequest): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
50
57
  register(request: RegisterRequest): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
58
+ logout(request: LogoutRequest): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
51
59
  }
52
60
  export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
53
61
  export declare const AUTH_SERVICE_NAME = "AuthService";
package/dist/gen/auth.js CHANGED
@@ -13,7 +13,7 @@ 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", "refresh", "login", "register"];
16
+ const grpcMethods = ["sendOtp", "verifyOtp", "refresh", "login", "register", "logout"];
17
17
  for (const method of grpcMethods) {
18
18
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
19
  (0, microservices_1.GrpcMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
@@ -9,6 +9,15 @@ service AuthService {
9
9
  rpc Refresh (RefreshRequest) returns (RefreshResponse);
10
10
  rpc Login (LoginRequest) returns (AuthResponse);
11
11
  rpc Register (RegisterRequest) returns (AuthResponse);
12
+ rpc Logout (LogoutRequest) returns (LogoutResponse);
13
+ }
14
+
15
+ message LogoutRequest {
16
+ string refresh_token = 1;
17
+ }
18
+
19
+ message LogoutResponse {
20
+ bool ok = 1;
12
21
  }
13
22
 
14
23
 
package/gen/auth.ts CHANGED
@@ -10,6 +10,14 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "auth.v1";
12
12
 
13
+ export interface LogoutRequest {
14
+ refreshToken: string;
15
+ }
16
+
17
+ export interface LogoutResponse {
18
+ ok: boolean;
19
+ }
20
+
13
21
  export interface SendOtpRequest {
14
22
  identifier: string;
15
23
  type: string;
@@ -64,6 +72,8 @@ export interface AuthServiceClient {
64
72
  login(request: LoginRequest): Observable<AuthResponse>;
65
73
 
66
74
  register(request: RegisterRequest): Observable<AuthResponse>;
75
+
76
+ logout(request: LogoutRequest): Observable<LogoutResponse>;
67
77
  }
68
78
 
69
79
  export interface AuthServiceController {
@@ -76,11 +86,13 @@ export interface AuthServiceController {
76
86
  login(request: LoginRequest): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
77
87
 
78
88
  register(request: RegisterRequest): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
89
+
90
+ logout(request: LogoutRequest): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
79
91
  }
80
92
 
81
93
  export function AuthServiceControllerMethods() {
82
94
  return function (constructor: Function) {
83
- const grpcMethods: string[] = ["sendOtp", "verifyOtp", "refresh", "login", "register"];
95
+ const grpcMethods: string[] = ["sendOtp", "verifyOtp", "refresh", "login", "register", "logout"];
84
96
  for (const method of grpcMethods) {
85
97
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
86
98
  GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.150",
4
+ "version": "1.0.152",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
package/proto/auth.proto CHANGED
@@ -9,6 +9,15 @@ service AuthService {
9
9
  rpc Refresh (RefreshRequest) returns (RefreshResponse);
10
10
  rpc Login (LoginRequest) returns (AuthResponse);
11
11
  rpc Register (RegisterRequest) returns (AuthResponse);
12
+ rpc Logout (LogoutRequest) returns (LogoutResponse);
13
+ }
14
+
15
+ message LogoutRequest {
16
+ string refresh_token = 1;
17
+ }
18
+
19
+ message LogoutResponse {
20
+ bool ok = 1;
12
21
  }
13
22
 
14
23