@ciganov/contracts 1.1.8 → 1.1.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/dist/events/betting/index.d.ts +1 -0
- package/dist/events/betting/index.js +17 -0
- package/dist/events/betting/odd-finished.event.d.ts +5 -0
- package/dist/events/betting/odd-finished.event.js +2 -0
- package/dist/events/index.d.ts +1 -0
- package/dist/events/index.js +1 -0
- package/dist/gen/betting.d.ts +20 -0
- package/dist/gen/betting.js +28 -0
- package/dist/proto/contracts/betting.proto +21 -0
- package/dist/proto/paths.d.ts +1 -0
- package/dist/proto/paths.js +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './odd-finished.event';
|
|
@@ -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("./odd-finished.event"), exports);
|
package/dist/events/index.d.ts
CHANGED
package/dist/events/index.js
CHANGED
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./auth"), exports);
|
|
18
18
|
__exportStar(require("./account"), exports);
|
|
19
|
+
__exportStar(require("./betting"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export declare const protobufPackage = "betting.v1";
|
|
3
|
+
export interface PlaceBetRequest {
|
|
4
|
+
userId: string;
|
|
5
|
+
outcomeId: string;
|
|
6
|
+
amount: number;
|
|
7
|
+
coefficient: number;
|
|
8
|
+
}
|
|
9
|
+
export interface PlaceBetResponse {
|
|
10
|
+
ok: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const BETTING_V1_PACKAGE_NAME = "betting.v1";
|
|
13
|
+
export interface BettingServiceClient {
|
|
14
|
+
placeBet(request: PlaceBetRequest): Observable<PlaceBetResponse>;
|
|
15
|
+
}
|
|
16
|
+
export interface BettingServiceController {
|
|
17
|
+
placeBet(request: PlaceBetRequest): Promise<PlaceBetResponse> | Observable<PlaceBetResponse> | PlaceBetResponse;
|
|
18
|
+
}
|
|
19
|
+
export declare function BettingServiceControllerMethods(): (constructor: Function) => void;
|
|
20
|
+
export declare const BETTING_SERVICE_NAME = "BettingService";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.6
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: betting.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.BETTING_SERVICE_NAME = exports.BETTING_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.BettingServiceControllerMethods = BettingServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "betting.v1";
|
|
13
|
+
exports.BETTING_V1_PACKAGE_NAME = "betting.v1";
|
|
14
|
+
function BettingServiceControllerMethods() {
|
|
15
|
+
return function (constructor) {
|
|
16
|
+
const grpcMethods = ["placeBet"];
|
|
17
|
+
for (const method of grpcMethods) {
|
|
18
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
|
+
(0, microservices_1.GrpcMethod)("BettingService", method)(constructor.prototype[method], method, descriptor);
|
|
20
|
+
}
|
|
21
|
+
const grpcStreamMethods = [];
|
|
22
|
+
for (const method of grpcStreamMethods) {
|
|
23
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
24
|
+
(0, microservices_1.GrpcStreamMethod)("BettingService", method)(constructor.prototype[method], method, descriptor);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.BETTING_SERVICE_NAME = "BettingService";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package betting.v1;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
service BettingService {
|
|
7
|
+
rpc PlaceBet(PlaceBetRequest) returns (PlaceBetResponse);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
message PlaceBetRequest {
|
|
11
|
+
string userId = 1;
|
|
12
|
+
string outcomeId = 2;
|
|
13
|
+
float amount = 3;
|
|
14
|
+
float coefficient = 4;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
message PlaceBetResponse {
|
|
20
|
+
bool ok = 1;
|
|
21
|
+
}
|
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
|
@@ -7,5 +7,6 @@ exports.PROTO_PATHS = {
|
|
|
7
7
|
ACCOUNT: (0, node_path_1.join)(__dirname, './contracts/account.proto'),
|
|
8
8
|
USER: (0, node_path_1.join)(__dirname, './contracts/user.proto'),
|
|
9
9
|
BALANCE: (0, node_path_1.join)(__dirname, './contracts/balance.proto'),
|
|
10
|
-
ODD: (0, node_path_1.join)(__dirname, './contracts/odd.proto')
|
|
10
|
+
ODD: (0, node_path_1.join)(__dirname, './contracts/odd.proto'),
|
|
11
|
+
BETTING: (0, node_path_1.join)(__dirname, './contracts/betting.proto')
|
|
11
12
|
};
|