@shipsync-software/contracts 1.0.9 → 1.0.10

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
@@ -39,6 +39,14 @@ export interface RefreshResponse {
39
39
  refreshToken: string;
40
40
  }
41
41
 
42
+ export interface LogoutRequest {
43
+ refreshToken: string;
44
+ }
45
+
46
+ export interface LogoutResponse {
47
+ ok: boolean;
48
+ }
49
+
42
50
  export const AUTH_V1_PACKAGE_NAME = "auth.v1";
43
51
 
44
52
  export interface AuthServiceClient {
@@ -47,6 +55,8 @@ export interface AuthServiceClient {
47
55
  verify(request: VerifyRequest): Observable<VerifyResponse>;
48
56
 
49
57
  refresh(request: RefreshRequest): Observable<RefreshResponse>;
58
+
59
+ logout(request: LogoutRequest): Observable<LogoutResponse>;
50
60
  }
51
61
 
52
62
  export interface AuthServiceController {
@@ -55,11 +65,13 @@ export interface AuthServiceController {
55
65
  verify(request: VerifyRequest): Promise<VerifyResponse> | Observable<VerifyResponse> | VerifyResponse;
56
66
 
57
67
  refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
68
+
69
+ logout(request: LogoutRequest): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
58
70
  }
59
71
 
60
72
  export function AuthServiceControllerMethods() {
61
73
  return function (constructor: Function) {
62
- const grpcMethods: string[] = ["login", "verify", "refresh"];
74
+ const grpcMethods: string[] = ["login", "verify", "refresh", "logout"];
63
75
  for (const method of grpcMethods) {
64
76
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
65
77
  GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipsync-software/contracts",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
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
@@ -6,6 +6,7 @@ service AuthService{
6
6
  rpc Login (LoginRequest) returns (LoginResponse);
7
7
  rpc Verify (VerifyRequest) returns (VerifyResponse);
8
8
  rpc Refresh (RefreshRequest) returns (RefreshResponse);
9
+ rpc Logout (LogoutRequest) returns (LogoutResponse);
9
10
  }
10
11
 
11
12
  message LoginRequest{
@@ -36,3 +37,12 @@ message RefreshResponse {
36
37
  string access_token = 1;
37
38
  string refresh_token = 2;
38
39
  }
40
+
41
+ message LogoutRequest {
42
+ string refresh_token = 1;
43
+ }
44
+
45
+
46
+ message LogoutResponse {
47
+ bool ok = 1;
48
+ }