@candesk/contracts 1.0.12 → 1.3.0

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.
@@ -27,6 +27,7 @@ export interface ConfirmEmailChangeRequest {
27
27
  email: string;
28
28
  code: string;
29
29
  userId: string;
30
+ refreshToken: string;
30
31
  }
31
32
  export interface ConfirmEmailChangeResponse {
32
33
  ok: boolean;
@@ -42,6 +43,7 @@ export interface ConfirmPhoneChangeRequest {
42
43
  phone: string;
43
44
  code: string;
44
45
  userId: string;
46
+ refreshToken: string;
45
47
  }
46
48
  export interface ConfirmPhoneChangeResponse {
47
49
  ok: boolean;
@@ -23,16 +23,24 @@ export interface RefreshResponse {
23
23
  accessToken: string;
24
24
  refreshToken: string;
25
25
  }
26
+ export interface LogoutRequest {
27
+ refreshToken: string;
28
+ }
29
+ export interface LogoutResponse {
30
+ ok: boolean;
31
+ }
26
32
  export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
27
33
  export interface AuthServiceClient {
28
34
  sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
29
35
  verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
30
36
  refresh(request: RefreshRequest): Observable<RefreshResponse>;
37
+ logout(request: LogoutRequest): Observable<LogoutResponse>;
31
38
  }
32
39
  export interface AuthServiceController {
33
40
  sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
34
41
  verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
35
42
  refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
43
+ logout(request: LogoutRequest): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
36
44
  }
37
45
  export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
38
46
  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"];
16
+ const grpcMethods = ["sendOtp", "verifyOtp", "refresh", "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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "1.0.12",
3
+ "version": "1.3.0",
4
4
  "description": "Protobuf contracts for Candesk microservices",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -38,6 +38,7 @@ message ConfirmEmailChangeRequest {
38
38
  string email = 1;
39
39
  string code = 2;
40
40
  string user_id = 3;
41
+ string refresh_token = 4;
41
42
  }
42
43
 
43
44
  message ConfirmEmailChangeResponse {
@@ -57,6 +58,7 @@ message ConfirmPhoneChangeRequest {
57
58
  string phone = 1;
58
59
  string code = 2;
59
60
  string user_id = 3;
61
+ string refresh_token = 4;
60
62
  }
61
63
 
62
64
  message ConfirmPhoneChangeResponse {
package/proto/auth.proto CHANGED
@@ -6,6 +6,7 @@ service AuthService {
6
6
  rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
7
7
  rpc VerifyOtp (VerifyOtpRequest) returns (VerifyOtpResponse);
8
8
  rpc Refresh (RefreshRequest) returns (RefreshResponse);
9
+ rpc Logout (LogoutRequest) returns (LogoutResponse);
9
10
  }
10
11
 
11
12
  message SendOtpRequest {
@@ -36,3 +37,11 @@ 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
+ message LogoutResponse {
46
+ bool ok = 1;
47
+ }