@ciganov/contracts 1.1.25 → 1.1.26

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 = "betting.v1";
3
+ export interface GetBetCountByEventRequest {
4
+ eventId: string;
5
+ }
6
+ export interface GetBetCountByEventResponse {
7
+ count: number;
8
+ }
3
9
  export interface PlaceBetRequest {
4
10
  userId: string;
5
11
  outcomeId: string;
@@ -12,9 +18,11 @@ export interface PlaceBetResponse {
12
18
  export declare const BETTING_V1_PACKAGE_NAME = "betting.v1";
13
19
  export interface BettingServiceClient {
14
20
  placeBet(request: PlaceBetRequest): Observable<PlaceBetResponse>;
21
+ getBetCountByEvent(request: GetBetCountByEventRequest): Observable<GetBetCountByEventResponse>;
15
22
  }
16
23
  export interface BettingServiceController {
17
24
  placeBet(request: PlaceBetRequest): Promise<PlaceBetResponse> | Observable<PlaceBetResponse> | PlaceBetResponse;
25
+ getBetCountByEvent(request: GetBetCountByEventRequest): Promise<GetBetCountByEventResponse> | Observable<GetBetCountByEventResponse> | GetBetCountByEventResponse;
18
26
  }
19
27
  export declare function BettingServiceControllerMethods(): (constructor: Function) => void;
20
28
  export declare const BETTING_SERVICE_NAME = "BettingService";
@@ -13,7 +13,7 @@ exports.protobufPackage = "betting.v1";
13
13
  exports.BETTING_V1_PACKAGE_NAME = "betting.v1";
14
14
  function BettingServiceControllerMethods() {
15
15
  return function (constructor) {
16
- const grpcMethods = ["placeBet"];
16
+ const grpcMethods = ["placeBet", "getBetCountByEvent"];
17
17
  for (const method of grpcMethods) {
18
18
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
19
  (0, microservices_1.GrpcMethod)("BettingService", method)(constructor.prototype[method], method, descriptor);
@@ -5,6 +5,15 @@ package betting.v1;
5
5
 
6
6
  service BettingService {
7
7
  rpc PlaceBet(PlaceBetRequest) returns (PlaceBetResponse);
8
+ rpc GetBetCountByEvent(GetBetCountByEventRequest) returns (GetBetCountByEventResponse);
9
+ }
10
+
11
+ message GetBetCountByEventRequest {
12
+ string event_id = 1;
13
+ }
14
+
15
+ message GetBetCountByEventResponse {
16
+ int32 count = 1;
8
17
  }
9
18
 
10
19
  message PlaceBetRequest {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ciganov/contracts",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
4
4
  "description": "Protobuf definitions and generated ts types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",