@barumetric/contracts 1.2.10 → 1.2.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/ts/session.ts CHANGED
@@ -13,6 +13,7 @@ export const protobufPackage = "session.v1";
13
13
 
14
14
  export interface ListSessionsRequest {
15
15
  userId: string;
16
+ sessionToken: string;
16
17
  }
17
18
 
18
19
  export interface ListSessionsResponse {
@@ -22,16 +23,17 @@ export interface ListSessionsResponse {
22
23
  export interface GetSessionRequest {
23
24
  id?: string | undefined;
24
25
  userId: string;
25
- current: boolean;
26
+ sessionToken?: string | undefined;
26
27
  }
27
28
 
28
- export interface GetSessionsResponse {
29
- sessions: Session | undefined;
29
+ export interface GetSessionResponse {
30
+ session: Session | undefined;
30
31
  }
31
32
 
32
33
  export interface RevokeSessionRequest {
33
34
  id: string;
34
35
  userId: string;
36
+ sessionToken?: string | undefined;
35
37
  }
36
38
 
37
39
  export interface RevokeSessionResponse {
@@ -40,6 +42,7 @@ export interface RevokeSessionResponse {
40
42
 
41
43
  export interface RevokeAllOtherSessionsRequest {
42
44
  userId: string;
45
+ sessionToken?: string | undefined;
43
46
  }
44
47
 
45
48
  export interface RevokeAllOtherSessionsResponse {
@@ -61,11 +64,11 @@ export const SESSION_V1_PACKAGE_NAME = "session.v1";
61
64
  export interface SessionServiceClient {
62
65
  listSessions(request: ListSessionsRequest): Observable<ListSessionsResponse>;
63
66
 
64
- getSession(request: GetSessionRequest): Observable<GetSessionsResponse>;
65
-
66
67
  revokeSession(request: RevokeSessionRequest): Observable<RevokeSessionResponse>;
67
68
 
68
69
  revokeAllOtherSessions(request: RevokeAllOtherSessionsRequest): Observable<RevokeAllOtherSessionsResponse>;
70
+
71
+ getSession(request: GetSessionRequest): Observable<GetSessionResponse>;
69
72
  }
70
73
 
71
74
  export interface SessionServiceController {
@@ -73,10 +76,6 @@ export interface SessionServiceController {
73
76
  request: ListSessionsRequest,
74
77
  ): Promise<ListSessionsResponse> | Observable<ListSessionsResponse> | ListSessionsResponse;
75
78
 
76
- getSession(
77
- request: GetSessionRequest,
78
- ): Promise<GetSessionsResponse> | Observable<GetSessionsResponse> | GetSessionsResponse;
79
-
80
79
  revokeSession(
81
80
  request: RevokeSessionRequest,
82
81
  ): Promise<RevokeSessionResponse> | Observable<RevokeSessionResponse> | RevokeSessionResponse;
@@ -87,11 +86,15 @@ export interface SessionServiceController {
87
86
  | Promise<RevokeAllOtherSessionsResponse>
88
87
  | Observable<RevokeAllOtherSessionsResponse>
89
88
  | RevokeAllOtherSessionsResponse;
89
+
90
+ getSession(
91
+ request: GetSessionRequest,
92
+ ): Promise<GetSessionResponse> | Observable<GetSessionResponse> | GetSessionResponse;
90
93
  }
91
94
 
92
95
  export function SessionServiceControllerMethods() {
93
96
  return function (constructor: Function) {
94
- const grpcMethods: string[] = ["listSessions", "getSession", "revokeSession", "revokeAllOtherSessions"];
97
+ const grpcMethods: string[] = ["listSessions", "revokeSession", "revokeAllOtherSessions", "getSession"];
95
98
  for (const method of grpcMethods) {
96
99
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
97
100
  GrpcMethod("SessionService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barumetric/contracts",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -6,13 +6,15 @@ import "google/protobuf/timestamp.proto";
6
6
 
7
7
  service SessionService {
8
8
  rpc ListSessions (ListSessionsRequest) returns (ListSessionsResponse);
9
- rpc GetSession (GetSessionRequest) returns (GetSessionsResponse);
10
9
  rpc RevokeSession (RevokeSessionRequest) returns (RevokeSessionResponse);
11
10
  rpc RevokeAllOtherSessions (RevokeAllOtherSessionsRequest) returns (RevokeAllOtherSessionsResponse);
11
+
12
+ rpc GetSession (GetSessionRequest) returns (GetSessionResponse);
12
13
  }
13
14
 
14
15
  message ListSessionsRequest {
15
16
  string user_id = 1;
17
+ string session_token = 2;
16
18
  }
17
19
 
18
20
  message ListSessionsResponse {
@@ -22,16 +24,17 @@ message ListSessionsResponse {
22
24
  message GetSessionRequest {
23
25
  optional string id = 1;
24
26
  string user_id = 2;
25
- bool current = 3;
27
+ optional string session_token = 3;
26
28
  }
27
29
 
28
- message GetSessionsResponse {
29
- Session sessions = 1;
30
+ message GetSessionResponse {
31
+ Session session = 1;
30
32
  }
31
33
 
32
34
  message RevokeSessionRequest {
33
35
  string id = 1;
34
36
  string user_id = 2;
37
+ optional string session_token = 3;
35
38
  }
36
39
 
37
40
  message RevokeSessionResponse {
@@ -40,6 +43,7 @@ message RevokeSessionResponse {
40
43
 
41
44
  message RevokeAllOtherSessionsRequest {
42
45
  string user_id = 1;
46
+ optional string session_token = 2;
43
47
  }
44
48
 
45
49
  message RevokeAllOtherSessionsResponse {