@sakura-skytree/leaf-eats-contracts 1.0.9 → 1.1.1
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/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/messages/create-user.message.d.ts +3 -0
- package/dist/messages/create-user.message.js +2 -0
- package/dist/messages/index.d.ts +1 -0
- package/dist/messages/index.js +17 -0
- package/gen/auth.ts +5 -0
- package/gen/session.ts +16 -1
- package/package.json +1 -1
- package/proto/auth.proto +5 -0
- package/proto/session.proto +12 -0
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './create-user.message';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./create-user.message"), exports);
|
package/gen/auth.ts
CHANGED
package/gen/session.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
9
|
import { Observable } from "rxjs";
|
|
10
|
+
import { Account } from "./auth";
|
|
10
11
|
|
|
11
12
|
export const protobufPackage = "session.v1";
|
|
12
13
|
|
|
@@ -35,6 +36,14 @@ export interface DestroySessionResponse {
|
|
|
35
36
|
ok: boolean;
|
|
36
37
|
}
|
|
37
38
|
|
|
39
|
+
export interface GetAccountBySessionRequest {
|
|
40
|
+
sessionId: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface GetAccountBySessionResponse {
|
|
44
|
+
account: Account | undefined;
|
|
45
|
+
}
|
|
46
|
+
|
|
38
47
|
export interface Session {
|
|
39
48
|
id: string;
|
|
40
49
|
}
|
|
@@ -47,6 +56,8 @@ export interface SessionServiceClient {
|
|
|
47
56
|
getUserSessions(request: GetUserSessionsRequest): Observable<GetUserSessionsResponse>;
|
|
48
57
|
|
|
49
58
|
destroySession(request: DestroySessionRequest): Observable<DestroySessionResponse>;
|
|
59
|
+
|
|
60
|
+
getAccountBySession(request: GetAccountBySessionRequest): Observable<GetAccountBySessionResponse>;
|
|
50
61
|
}
|
|
51
62
|
|
|
52
63
|
export interface SessionServiceController {
|
|
@@ -61,11 +72,15 @@ export interface SessionServiceController {
|
|
|
61
72
|
destroySession(
|
|
62
73
|
request: DestroySessionRequest,
|
|
63
74
|
): Promise<DestroySessionResponse> | Observable<DestroySessionResponse> | DestroySessionResponse;
|
|
75
|
+
|
|
76
|
+
getAccountBySession(
|
|
77
|
+
request: GetAccountBySessionRequest,
|
|
78
|
+
): Promise<GetAccountBySessionResponse> | Observable<GetAccountBySessionResponse> | GetAccountBySessionResponse;
|
|
64
79
|
}
|
|
65
80
|
|
|
66
81
|
export function SessionServiceControllerMethods() {
|
|
67
82
|
return function (constructor: Function) {
|
|
68
|
-
const grpcMethods: string[] = ["createSession", "getUserSessions", "destroySession"];
|
|
83
|
+
const grpcMethods: string[] = ["createSession", "getUserSessions", "destroySession", "getAccountBySession"];
|
|
69
84
|
for (const method of grpcMethods) {
|
|
70
85
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
71
86
|
GrpcMethod("SessionService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
package/proto/session.proto
CHANGED
|
@@ -2,10 +2,14 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package session.v1;
|
|
4
4
|
|
|
5
|
+
import "auth.proto";
|
|
6
|
+
|
|
5
7
|
service SessionService {
|
|
6
8
|
rpc CreateSession(CreateSessionRequest) returns(CreateSessionResponse);
|
|
7
9
|
rpc GetUserSessions(GetUserSessionsRequest) returns(GetUserSessionsResponse);
|
|
8
10
|
rpc DestroySession(DestroySessionRequest) returns(DestroySessionResponse);
|
|
11
|
+
|
|
12
|
+
rpc GetAccountBySession(GetAccountBySessionRequest) returns(GetAccountBySessionResponse);
|
|
9
13
|
}
|
|
10
14
|
|
|
11
15
|
message CreateSessionRequest {
|
|
@@ -33,6 +37,14 @@ message DestroySessionResponse {
|
|
|
33
37
|
bool ok = 1;
|
|
34
38
|
}
|
|
35
39
|
|
|
40
|
+
message GetAccountBySessionRequest{
|
|
41
|
+
string session_id = 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message GetAccountBySessionResponse{
|
|
45
|
+
auth.v1.Account account = 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
36
48
|
message Session {
|
|
37
49
|
string id = 1;
|
|
38
50
|
}
|