@levrbet/shared 0.2.81 → 0.3.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/core/config/urls.js +4 -4
- package/dist/core/config/urls.js.map +1 -1
- package/dist/core/utils/game.utils.d.ts +2 -0
- package/dist/core/utils/game.utils.js +69 -1
- package/dist/core/utils/game.utils.js.map +1 -1
- package/dist/server/oracle/config/game-periods/providers/lsports.periods.js +3 -3
- package/dist/server/oracle/config/game-periods/providers/lsports.periods.js.map +1 -1
- package/dist/server/oracle/config/game-periods/providers/optic-odds.periods.d.ts +4 -27
- package/dist/server/oracle/config/game-periods/providers/optic-odds.periods.js +4 -27
- package/dist/server/oracle/config/game-periods/providers/optic-odds.periods.js.map +1 -1
- package/dist/server/oracle/config/game-periods/sports.config.js +8 -65
- package/dist/server/oracle/config/game-periods/sports.config.js.map +1 -1
- package/dist/server/oracle/config/game-periods/types.d.ts +2 -5
- package/dist/server/oracle/config/game-periods/types.js +0 -1
- package/dist/server/oracle/config/game-periods/types.js.map +1 -1
- package/dist/server/oracle/redis-cache-manager/cache.keys.utils.d.ts +45 -74
- package/dist/server/oracle/redis-cache-manager/cache.keys.utils.js +65 -120
- package/dist/server/oracle/redis-cache-manager/cache.keys.utils.js.map +1 -1
- package/dist/server/oracle/redis-cache-manager/game.query.engine.d.ts +90 -0
- package/dist/server/oracle/redis-cache-manager/game.query.engine.js +436 -0
- package/dist/server/oracle/redis-cache-manager/game.query.engine.js.map +1 -0
- package/dist/server/oracle/redis-cache-manager/index.d.ts +2 -3
- package/dist/server/oracle/redis-cache-manager/index.js +2 -3
- package/dist/server/oracle/redis-cache-manager/index.js.map +1 -1
- package/dist/server/oracle/redis-cache-manager/market.query.engine.d.ts +50 -97
- package/dist/server/oracle/redis-cache-manager/market.query.engine.js +310 -467
- package/dist/server/oracle/redis-cache-manager/market.query.engine.js.map +1 -1
- package/dist/server/oracle/types/providers/game-clock/index.d.ts +1 -1
- package/dist/server/oracle/types/providers/game-clock/index.js +1 -1
- package/dist/server/oracle/types/providers/game-clock/index.js.map +1 -1
- package/dist/server/{utils/game_progress → oracle/types/providers/game-clock}/parser.d.ts +7 -1
- package/dist/server/{utils/game_progress → oracle/types/providers/game-clock}/parser.js +13 -2
- package/dist/server/oracle/types/providers/game-clock/parser.js.map +1 -0
- package/dist/server/utils/index.d.ts +0 -1
- package/dist/server/utils/index.js +0 -1
- package/dist/server/utils/index.js.map +1 -1
- package/package.json +5 -4
- package/scripts/setup-prisma.js +0 -0
- package/dist/server/oracle/redis-cache-manager/game.cache.service.d.ts +0 -185
- package/dist/server/oracle/redis-cache-manager/game.cache.service.js +0 -712
- package/dist/server/oracle/redis-cache-manager/game.cache.service.js.map +0 -1
- package/dist/server/oracle/redis-cache-manager/game.progress.d.ts +0 -4
- package/dist/server/oracle/redis-cache-manager/game.progress.js +0 -27
- package/dist/server/oracle/redis-cache-manager/game.progress.js.map +0 -1
- package/dist/server/oracle/redis-cache-manager/market.cache.service.d.ts +0 -87
- package/dist/server/oracle/redis-cache-manager/market.cache.service.js +0 -139
- package/dist/server/oracle/redis-cache-manager/market.cache.service.js.map +0 -1
- package/dist/server/utils/game_progress/caclulate.game.progress.d.ts +0 -6
- package/dist/server/utils/game_progress/caclulate.game.progress.js +0 -96
- package/dist/server/utils/game_progress/caclulate.game.progress.js.map +0 -1
- package/dist/server/utils/game_progress/game.utils.d.ts +0 -2
- package/dist/server/utils/game_progress/game.utils.js +0 -65
- package/dist/server/utils/game_progress/game.utils.js.map +0 -1
- package/dist/server/utils/game_progress/index.d.ts +0 -5
- package/dist/server/utils/game_progress/index.js +0 -84
- package/dist/server/utils/game_progress/index.js.map +0 -1
- package/dist/server/utils/game_progress/parser.js.map +0 -1
package/dist/core/config/urls.js
CHANGED
|
@@ -9,7 +9,7 @@ exports.allUrls = {
|
|
|
9
9
|
auth: "https://auth-api.dev.levr.bet",
|
|
10
10
|
oracleCore: "https://oracle-core.dev.levr.bet",
|
|
11
11
|
oraclePeriphery: "https://oracle-periphery.dev.levr.bet",
|
|
12
|
-
oracleProcessors: "https://oracle-
|
|
12
|
+
oracleProcessors: "https://oracle-processors.dev.levr.bet",
|
|
13
13
|
relayer: "https://relayers.dev.levr.bet",
|
|
14
14
|
referrals: "https://referrals.dev.levr.bet",
|
|
15
15
|
liquidationEngine: "https://liquidation-engine.dev.levr.bet",
|
|
@@ -24,7 +24,7 @@ exports.allUrls = {
|
|
|
24
24
|
auth: "https://auth-api.dev.levr.bet",
|
|
25
25
|
oracleCore: "https://oracle-core.dev.levr.bet",
|
|
26
26
|
oraclePeriphery: "https://oracle-periphery.dev.levr.bet",
|
|
27
|
-
oracleProcessors: "https://oracle-
|
|
27
|
+
oracleProcessors: "https://oracle-processors.dev.levr.bet",
|
|
28
28
|
relayer: "https://relayers.dev.levr.bet", //http://levr-v1-openzeppeline-1018367603.ap-south-1.elb.amazonaws.com",
|
|
29
29
|
referrals: "https://referrals.dev.levr.bet",
|
|
30
30
|
liquidationEngine: "https://liquidation-engine.dev.levr.bet",
|
|
@@ -39,7 +39,7 @@ exports.allUrls = {
|
|
|
39
39
|
auth: "https://auth-api.staging.levr.bet/",
|
|
40
40
|
oracleCore: "https://oracle-core.staging.levr.bet",
|
|
41
41
|
oraclePeriphery: "https://oracle-periphery.staging.levr.bet",
|
|
42
|
-
oracleProcessors: "https://oracle-
|
|
42
|
+
oracleProcessors: "https://oracle-processors.staging.levr.bet",
|
|
43
43
|
relayer: "https://relayers.staging.levr.bet",
|
|
44
44
|
referrals: "https://referrals.staging.levr.bet",
|
|
45
45
|
liquidationEngine: "https://liquidation-engine.dev.levr.bet",
|
|
@@ -54,7 +54,7 @@ exports.allUrls = {
|
|
|
54
54
|
auth: "https://auth-api.levr.bet",
|
|
55
55
|
oracleCore: "https://oracle-core.levr.app",
|
|
56
56
|
oraclePeriphery: "https://oracle-periphery.levr.app",
|
|
57
|
-
oracleProcessors: "https://oracle-
|
|
57
|
+
oracleProcessors: "https://oracle-processors.levr.app",
|
|
58
58
|
relayer: "https://relayers.levr.app",
|
|
59
59
|
referrals: "https://referrals.levr.app",
|
|
60
60
|
liquidationEngine: "https://liquidation-engine.dev.levr.bet",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urls.js","sourceRoot":"","sources":["../../../src/core/config/urls.ts"],"names":[],"mappings":";;;AAAA,oCAA6C;AAC7C,4DAAqD;AAErD,sBAAsB;AAET,QAAA,OAAO,GAAG;IACnB,CAAC,eAAO,CAAC,KAAK,CAAC,EAAE;QACb,IAAI,EAAE,+BAA+B;QACrC,UAAU,EAAE,kCAAkC;QAC9C,eAAe,EAAE,uCAAuC;QACxD,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"urls.js","sourceRoot":"","sources":["../../../src/core/config/urls.ts"],"names":[],"mappings":";;;AAAA,oCAA6C;AAC7C,4DAAqD;AAErD,sBAAsB;AAET,QAAA,OAAO,GAAG;IACnB,CAAC,eAAO,CAAC,KAAK,CAAC,EAAE;QACb,IAAI,EAAE,+BAA+B;QACrC,UAAU,EAAE,kCAAkC;QAC9C,eAAe,EAAE,uCAAuC;QACxD,gBAAgB,EAAE,wCAAwC;QAC1D,OAAO,EAAE,+BAA+B;QACxC,SAAS,EAAE,gCAAgC;QAC3C,iBAAiB,EAAE,yCAAyC;QAC5D,QAAQ,EAAE;YACN,CAAC,iBAAS,CAAC,aAAa,CAAC,EAAE;gBACvB,EAAE,IAAI,EAAE,4BAAW,CAAC,KAAK,EAAE,GAAG,EAAE,uDAAuD,EAAE;gBACzF,EAAE,IAAI,EAAE,4BAAW,CAAC,QAAQ,EAAE,GAAG,EAAE,gEAAgE,EAAE;aACxG;SACJ;KACJ;IACD,CAAC,eAAO,CAAC,GAAG,CAAC,EAAE;QACX,IAAI,EAAE,+BAA+B;QACrC,UAAU,EAAE,kCAAkC;QAC9C,eAAe,EAAE,uCAAuC;QACxD,gBAAgB,EAAE,wCAAwC;QAC1D,OAAO,EAAE,+BAA+B,E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ClE;SACJ;KACJ;CACJ,CAAA"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
import { SportGroup } from "@prisma/client";
|
|
1
2
|
export declare const calculatePrice: (americanOdds: number, normalizationFactor: number) => number;
|
|
2
3
|
export declare const calculateAmericanOdds: (price: number, normalizationFactor?: number) => string;
|
|
4
|
+
export declare const getGameProgressBPS: (gameClock: string, totalPeriodDurationInSeconds: number, period: number, totalPeriods: number, sportGroup: SportGroup) => number | null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.calculateAmericanOdds = exports.calculatePrice = void 0;
|
|
3
|
+
exports.getGameProgressBPS = exports.calculateAmericanOdds = exports.calculatePrice = void 0;
|
|
4
|
+
const client_1 = require("@prisma/client");
|
|
4
5
|
const calculatePrice = (americanOdds, normalizationFactor) => {
|
|
5
6
|
const decimalOdds = americanOdds > 0 ? americanOdds / 100 + 1 : 100 / Math.abs(americanOdds) + 1;
|
|
6
7
|
return Number((normalizationFactor / decimalOdds).toFixed(4));
|
|
@@ -21,4 +22,71 @@ const calculateAmericanOdds = (price, normalizationFactor = 1) => {
|
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
24
|
exports.calculateAmericanOdds = calculateAmericanOdds;
|
|
25
|
+
// Game progress calculation utilities
|
|
26
|
+
const parseGameClockToSeconds = (gameClock) => {
|
|
27
|
+
const [rawMinutes, rawSeconds] = gameClock.split(":");
|
|
28
|
+
const minutes = Number(rawMinutes);
|
|
29
|
+
const seconds = Number(rawSeconds);
|
|
30
|
+
if (isNaN(minutes) || isNaN(seconds))
|
|
31
|
+
return null;
|
|
32
|
+
return minutes * 60 + seconds;
|
|
33
|
+
};
|
|
34
|
+
const calculateGameProgressBPSWithPeriodsOnly = (period, totalPeriods) => {
|
|
35
|
+
if (period > totalPeriods)
|
|
36
|
+
return 1e4;
|
|
37
|
+
const progress = period / totalPeriods;
|
|
38
|
+
return Math.round(progress * 1e4);
|
|
39
|
+
};
|
|
40
|
+
//{ totalPeriods: 2, totalPeriodDurationInSeconds: 45 * 60 },
|
|
41
|
+
// gameClock: '57:20',
|
|
42
|
+
//levr-v1-dev-oracle-core | gamePeriod: 20,
|
|
43
|
+
const calculateGameProgressBPS = (elapsedSeconds, totalPeriodDurationInSeconds, totalPeriods, period) => {
|
|
44
|
+
if (totalPeriodDurationInSeconds === 0)
|
|
45
|
+
return 0;
|
|
46
|
+
if (elapsedSeconds > totalPeriodDurationInSeconds)
|
|
47
|
+
elapsedSeconds = totalPeriodDurationInSeconds;
|
|
48
|
+
const progress = elapsedSeconds / totalPeriodDurationInSeconds;
|
|
49
|
+
const periodsPassed = period - 1;
|
|
50
|
+
const pastProgress = calculateGameProgressBPSWithPeriodsOnly(periodsPassed, totalPeriods);
|
|
51
|
+
const currentPeriodProgress = (progress * 1e4) / totalPeriods;
|
|
52
|
+
const value = Math.round(pastProgress + currentPeriodProgress);
|
|
53
|
+
//TODO: revise time tracking
|
|
54
|
+
if (value > 1e4 || value < 0)
|
|
55
|
+
return 5e3;
|
|
56
|
+
return value;
|
|
57
|
+
};
|
|
58
|
+
// Example: { totalPeriods: 2, totalPeriodDurationInSeconds: 45 * 60 }, gameClock: '57:20', period: 2
|
|
59
|
+
// gameClock is cumulative (57:20 = 57 mins into game, which is 12:20 into period 2)
|
|
60
|
+
// Expected: elapsedInPeriod = 3440 - 2700 = 740 seconds → ~63.7% game progress
|
|
61
|
+
const calculateGameProgressBPSWithGameClockCountUp = (gameClock, totalPeriodDurationInSeconds, totalPeriods, period) => {
|
|
62
|
+
const cumulativeElapsedSeconds = parseGameClockToSeconds(gameClock);
|
|
63
|
+
if (cumulativeElapsedSeconds === null)
|
|
64
|
+
return null;
|
|
65
|
+
// Subtract time from previous periods since gameClock is cumulative
|
|
66
|
+
const previousPeriodsSeconds = (period - 1) * totalPeriodDurationInSeconds;
|
|
67
|
+
const elapsedSecondsInCurrentPeriod = cumulativeElapsedSeconds - previousPeriodsSeconds;
|
|
68
|
+
return calculateGameProgressBPS(elapsedSecondsInCurrentPeriod, totalPeriodDurationInSeconds, totalPeriods, period);
|
|
69
|
+
};
|
|
70
|
+
const calculateGameProgressBPSWithGameClockCountDown = (gameClock, totalPeriodDurationInSeconds, totalPeriods, period) => {
|
|
71
|
+
const remainingSeconds = parseGameClockToSeconds(gameClock);
|
|
72
|
+
if (remainingSeconds === null)
|
|
73
|
+
return null;
|
|
74
|
+
const elapsedSeconds = totalPeriodDurationInSeconds - remainingSeconds;
|
|
75
|
+
return calculateGameProgressBPS(elapsedSeconds, totalPeriodDurationInSeconds, totalPeriods, period);
|
|
76
|
+
};
|
|
77
|
+
const getGameProgressBPS = (gameClock, totalPeriodDurationInSeconds, period, totalPeriods, sportGroup) => {
|
|
78
|
+
switch (sportGroup) {
|
|
79
|
+
case client_1.SportGroup.Soccer:
|
|
80
|
+
return calculateGameProgressBPSWithGameClockCountUp(gameClock, totalPeriodDurationInSeconds, totalPeriods, period);
|
|
81
|
+
case client_1.SportGroup.Basketball:
|
|
82
|
+
return calculateGameProgressBPSWithGameClockCountDown(gameClock, totalPeriodDurationInSeconds, totalPeriods, period);
|
|
83
|
+
case client_1.SportGroup.Football:
|
|
84
|
+
return calculateGameProgressBPSWithGameClockCountDown(gameClock, totalPeriodDurationInSeconds, totalPeriods, period);
|
|
85
|
+
case client_1.SportGroup.Baseball:
|
|
86
|
+
return calculateGameProgressBPSWithPeriodsOnly(period, totalPeriods);
|
|
87
|
+
default:
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
exports.getGameProgressBPS = getGameProgressBPS;
|
|
24
92
|
//# sourceMappingURL=game.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game.utils.js","sourceRoot":"","sources":["../../../src/core/utils/game.utils.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"game.utils.js","sourceRoot":"","sources":["../../../src/core/utils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SAAS,EAAE,4BAA4B,EAAE,YAAY,EAAE,MAAM,CAAC,CAAA;QACtH,KAAK,mBAAU,CAAC,UAAU;YACtB,OAAO,8CAA8C,CAAC,SAAS,EAAE,4BAA4B,EAAE,YAAY,EAAE,MAAM,CAAC,CAAA;QACxH,KAAK,mBAAU,CAAC,QAAQ;YACpB,OAAO,8CAA8C,CAAC,SAAS,EAAE,4BAA4B,EAAE,YAAY,EAAE,MAAM,CAAC,CAAA;QACxH,KAAK,mBAAU,CAAC,QAAQ;YACpB,OAAO,uCAAuC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;QACxE;YACI,OAAO,IAAI,CAAA;IACnB,CAAC;AACL,CAAC,CAAA;AAnBY,QAAA,kBAAkB,sBAmB9B"}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.LSPORTS_NCAA_PERIODS = exports.LSPORTS_AMERICAN_FOOTBALL_PERIODS = exports.LSPORTS_BASEBALL_PERIODS = exports.LSPORTS_BASKETBALL_PERIODS = exports.LSPORTS_SOCCER_PERIODS = void 0;
|
|
7
7
|
exports.LSPORTS_SOCCER_PERIODS = {
|
|
8
|
-
FIRST_HALF: 10, // regular
|
|
9
|
-
SECOND_HALF: 20, // regular
|
|
10
|
-
THIRD_HALF: 25, // extra time // how is this treated?
|
|
8
|
+
FIRST_HALF: 10, // regular
|
|
9
|
+
SECOND_HALF: 20, // regular
|
|
10
|
+
THIRD_HALF: 25, // extra time // how is this treated?
|
|
11
11
|
OVERTIME_FIRST_HALF: 30, // extra time is it a full cycle period?
|
|
12
12
|
OVERTIME_SECOND_HALF: 35, // extra time is it a full cycle period?
|
|
13
13
|
PENALTIES: 50, // full cycle, considered 100% or almost 100% game progress
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsports.periods.js","sourceRoot":"","sources":["../../../../../../src/server/oracle/config/game-periods/providers/lsports.periods.ts"],"names":[],"mappings":";AAAA;;GAEG;;;
|
|
1
|
+
{"version":3,"file":"lsports.periods.js","sourceRoot":"","sources":["../../../../../../src/server/oracle/config/game-periods/providers/lsports.periods.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEU,QAAA,sBAAsB,GAAG;IAClC,UAAU,EAAE,EAAE,EAAE,UAAU;IAC1B,WAAW,EAAE,EAAE,EAAE,UAAU;IAC3B,UAAU,EAAE,EAAE,EAAE,qCAAqC;IACrD,mBAAmB,EAAE,EAAE,EAAE,wCAAwC;IACjE,oBAAoB,EAAE,EAAE,EAAE,wCAAwC;IAClE,SAAS,EAAE,EAAE,EAAE,2DAA2D;IAC1E,IAAI,EAAE,EAAE,EAAE,wBAAwB;IAClC,SAAS,EAAE,GAAG,EAAE,2CAA2C;IAC3D,wBAAwB,EAAE,GAAG,EAAE,2CAA2C;IAC1E,yBAAyB,EAAE,GAAG,EAAE,2CAA2C;CACrE,CAAA;AAEG,QAAA,0BAA0B,GAAG;IACtC,aAAa,EAAE,CAAC,EAAE,UAAU;IAC5B,cAAc,EAAE,CAAC,EAAE,UAAU;IAC7B,aAAa,EAAE,CAAC,EAAE,UAAU;IAC5B,cAAc,EAAE,CAAC,EAAE,UAAU;IAC7B,QAAQ,EAAE,EAAE,EAAE,2DAA2D;IACzE,SAAS,EAAE,GAAG,EAAE,2CAA2C;IAC3D,wBAAwB,EAAE,GAAG,EAAE,2CAA2C;CACpE,CAAA;AAEG,QAAA,wBAAwB,GAAG;IACpC,YAAY,EAAE,CAAC;IACf,aAAa,EAAE,CAAC;IAChB,YAAY,EAAE,CAAC;IACf,aAAa,EAAE,CAAC;IAChB,YAAY,EAAE,CAAC;IACf,YAAY,EAAE,CAAC;IACf,cAAc,EAAE,CAAC;IACjB,aAAa,EAAE,CAAC;IAChB,YAAY,EAAE,CAAC;IACf,aAAa,EAAE,EAAE;IACjB,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,EAAE;IACR,SAAS,EAAE,GAAG,EAAE,2CAA2C;IAC3D,0BAA0B,EAAE,GAAG,EAAE,2CAA2C;CACtE,CAAA;AAEG,QAAA,iCAAiC,GAAG;IAC7C,aAAa,EAAE,CAAC;IAChB,cAAc,EAAE,CAAC;IACjB,aAAa,EAAE,CAAC;IAChB,cAAc,EAAE,CAAC;IACjB,QAAQ,EAAE,EAAE;IACZ,SAAS,EAAE,GAAG;IACd,wBAAwB,EAAE,GAAG;CACvB,CAAA;AAEV,sDAAsD;AACzC,QAAA,oBAAoB,GAAG;IAChC,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;IACf,SAAS,EAAE,GAAG;IACd,wBAAwB,EAAE,GAAG;IAC7B,QAAQ,EAAE,EAAE;CACN,CAAA"}
|
|
@@ -2,30 +2,7 @@
|
|
|
2
2
|
* OpticOdds provider period constants by sport
|
|
3
3
|
* TODO: Add period mappings when OpticOdds integration is complete
|
|
4
4
|
*/
|
|
5
|
-
export declare const OPTIC_ODDS_SOCCER_PERIODS: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
export declare const OPTIC_ODDS_BASKETBALL_PERIODS: {
|
|
10
|
-
readonly FIRST_QUARTER: 1;
|
|
11
|
-
readonly SECOND_QUARTER: 2;
|
|
12
|
-
readonly THIRD_QUARTER: 3;
|
|
13
|
-
readonly FOURTH_QUARTER: 4;
|
|
14
|
-
};
|
|
15
|
-
export declare const OPTIC_ODDS_BASEBALL_PERIODS: {
|
|
16
|
-
readonly FIRST_INNING: 1;
|
|
17
|
-
readonly SECOND_INNING: 2;
|
|
18
|
-
readonly THIRD_INNING: 3;
|
|
19
|
-
readonly FOURTH_INNING: 4;
|
|
20
|
-
readonly FIFTH_INNING: 5;
|
|
21
|
-
readonly SIXTH_INNING: 6;
|
|
22
|
-
readonly SEVENTH_INNING: 7;
|
|
23
|
-
readonly EIGHTH_INNING: 8;
|
|
24
|
-
readonly NINTH_INNING: 9;
|
|
25
|
-
};
|
|
26
|
-
export declare const OPTIC_ODDS_AMERICAN_FOOTBALL_PERIODS: {
|
|
27
|
-
readonly FIRST_QUARTER: 1;
|
|
28
|
-
readonly SECOND_QUARTER: 2;
|
|
29
|
-
readonly THIRD_QUARTER: 3;
|
|
30
|
-
readonly FOURTH_QUARTER: 4;
|
|
31
|
-
};
|
|
5
|
+
export declare const OPTIC_ODDS_SOCCER_PERIODS: {};
|
|
6
|
+
export declare const OPTIC_ODDS_BASKETBALL_PERIODS: {};
|
|
7
|
+
export declare const OPTIC_ODDS_BASEBALL_PERIODS: {};
|
|
8
|
+
export declare const OPTIC_ODDS_AMERICAN_FOOTBALL_PERIODS: {};
|
|
@@ -5,31 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.OPTIC_ODDS_AMERICAN_FOOTBALL_PERIODS = exports.OPTIC_ODDS_BASEBALL_PERIODS = exports.OPTIC_ODDS_BASKETBALL_PERIODS = exports.OPTIC_ODDS_SOCCER_PERIODS = void 0;
|
|
8
|
-
exports.OPTIC_ODDS_SOCCER_PERIODS = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
exports.OPTIC_ODDS_BASKETBALL_PERIODS = {
|
|
13
|
-
FIRST_QUARTER: 1,
|
|
14
|
-
SECOND_QUARTER: 2,
|
|
15
|
-
THIRD_QUARTER: 3,
|
|
16
|
-
FOURTH_QUARTER: 4,
|
|
17
|
-
};
|
|
18
|
-
exports.OPTIC_ODDS_BASEBALL_PERIODS = {
|
|
19
|
-
FIRST_INNING: 1,
|
|
20
|
-
SECOND_INNING: 2,
|
|
21
|
-
THIRD_INNING: 3,
|
|
22
|
-
FOURTH_INNING: 4,
|
|
23
|
-
FIFTH_INNING: 5,
|
|
24
|
-
SIXTH_INNING: 6,
|
|
25
|
-
SEVENTH_INNING: 7,
|
|
26
|
-
EIGHTH_INNING: 8,
|
|
27
|
-
NINTH_INNING: 9,
|
|
28
|
-
};
|
|
29
|
-
exports.OPTIC_ODDS_AMERICAN_FOOTBALL_PERIODS = {
|
|
30
|
-
FIRST_QUARTER: 1,
|
|
31
|
-
SECOND_QUARTER: 2,
|
|
32
|
-
THIRD_QUARTER: 3,
|
|
33
|
-
FOURTH_QUARTER: 4,
|
|
34
|
-
};
|
|
8
|
+
exports.OPTIC_ODDS_SOCCER_PERIODS = {};
|
|
9
|
+
exports.OPTIC_ODDS_BASKETBALL_PERIODS = {};
|
|
10
|
+
exports.OPTIC_ODDS_BASEBALL_PERIODS = {};
|
|
11
|
+
exports.OPTIC_ODDS_AMERICAN_FOOTBALL_PERIODS = {};
|
|
35
12
|
//# sourceMappingURL=optic-odds.periods.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optic-odds.periods.js","sourceRoot":"","sources":["../../../../../../src/server/oracle/config/game-periods/providers/optic-odds.periods.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEU,QAAA,yBAAyB,GAAG
|
|
1
|
+
{"version":3,"file":"optic-odds.periods.js","sourceRoot":"","sources":["../../../../../../src/server/oracle/config/game-periods/providers/optic-odds.periods.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEU,QAAA,yBAAyB,GAAG,EAAW,CAAA;AAEvC,QAAA,6BAA6B,GAAG,EAAW,CAAA;AAE3C,QAAA,2BAA2B,GAAG,EAAW,CAAA;AAEzC,QAAA,oCAAoC,GAAG,EAAW,CAAA"}
|
|
@@ -3,15 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SportsGamePeriodClockConfig = void 0;
|
|
4
4
|
const client_1 = require("@prisma/client");
|
|
5
5
|
const providers_1 = require("./providers");
|
|
6
|
-
const core_1 = require("../../../../core");
|
|
7
6
|
/**
|
|
8
7
|
* Main configuration for game periods and clock behavior by sport and provider
|
|
9
8
|
*/
|
|
10
9
|
exports.SportsGamePeriodClockConfig = {
|
|
11
10
|
[client_1.SportGroup.Basketball]: {
|
|
12
|
-
|
|
13
|
-
totalPeriods: 4,
|
|
14
|
-
[core_1.OddsServices.LSPORTS]: {
|
|
11
|
+
lsports: {
|
|
15
12
|
sportPeriods: {
|
|
16
13
|
regular: [
|
|
17
14
|
providers_1.LSPORTS_BASKETBALL_PERIODS.FIRST_QUARTER,
|
|
@@ -28,24 +25,10 @@ exports.SportsGamePeriodClockConfig = {
|
|
|
28
25
|
},
|
|
29
26
|
leaguePeriods: null,
|
|
30
27
|
},
|
|
31
|
-
|
|
32
|
-
sportPeriods: {
|
|
33
|
-
regular: [
|
|
34
|
-
providers_1.OPTIC_ODDS_BASKETBALL_PERIODS.FIRST_QUARTER,
|
|
35
|
-
providers_1.OPTIC_ODDS_BASKETBALL_PERIODS.SECOND_QUARTER,
|
|
36
|
-
providers_1.OPTIC_ODDS_BASKETBALL_PERIODS.THIRD_QUARTER,
|
|
37
|
-
providers_1.OPTIC_ODDS_BASKETBALL_PERIODS.FOURTH_QUARTER,
|
|
38
|
-
],
|
|
39
|
-
fullCycle: [],
|
|
40
|
-
extraTime: [],
|
|
41
|
-
},
|
|
42
|
-
leaguePeriods: null,
|
|
43
|
-
},
|
|
28
|
+
opticOdds: {},
|
|
44
29
|
},
|
|
45
30
|
[client_1.SportGroup.Soccer]: {
|
|
46
|
-
|
|
47
|
-
totalPeriods: 2,
|
|
48
|
-
[core_1.OddsServices.LSPORTS]: {
|
|
31
|
+
lsports: {
|
|
49
32
|
sportPeriods: {
|
|
50
33
|
regular: [providers_1.LSPORTS_SOCCER_PERIODS.FIRST_HALF, providers_1.LSPORTS_SOCCER_PERIODS.SECOND_HALF],
|
|
51
34
|
fullCycle: [
|
|
@@ -62,19 +45,10 @@ exports.SportsGamePeriodClockConfig = {
|
|
|
62
45
|
},
|
|
63
46
|
leaguePeriods: null,
|
|
64
47
|
},
|
|
65
|
-
|
|
66
|
-
sportPeriods: {
|
|
67
|
-
regular: [providers_1.OPTIC_ODDS_SOCCER_PERIODS.FIRST_HALF, providers_1.OPTIC_ODDS_SOCCER_PERIODS.SECOND_HALF],
|
|
68
|
-
fullCycle: [],
|
|
69
|
-
extraTime: [],
|
|
70
|
-
},
|
|
71
|
-
leaguePeriods: null,
|
|
72
|
-
},
|
|
48
|
+
opticOdds: {},
|
|
73
49
|
},
|
|
74
50
|
[client_1.SportGroup.Baseball]: {
|
|
75
|
-
|
|
76
|
-
totalPeriods: 9,
|
|
77
|
-
[core_1.OddsServices.LSPORTS]: {
|
|
51
|
+
lsports: {
|
|
78
52
|
sportPeriods: {
|
|
79
53
|
regular: [
|
|
80
54
|
providers_1.LSPORTS_BASEBALL_PERIODS.FIRST_INNING,
|
|
@@ -92,29 +66,10 @@ exports.SportsGamePeriodClockConfig = {
|
|
|
92
66
|
},
|
|
93
67
|
leaguePeriods: null,
|
|
94
68
|
},
|
|
95
|
-
|
|
96
|
-
sportPeriods: {
|
|
97
|
-
regular: [
|
|
98
|
-
providers_1.OPTIC_ODDS_BASEBALL_PERIODS.FIRST_INNING,
|
|
99
|
-
providers_1.OPTIC_ODDS_BASEBALL_PERIODS.SECOND_INNING,
|
|
100
|
-
providers_1.OPTIC_ODDS_BASEBALL_PERIODS.THIRD_INNING,
|
|
101
|
-
providers_1.OPTIC_ODDS_BASEBALL_PERIODS.FOURTH_INNING,
|
|
102
|
-
providers_1.OPTIC_ODDS_BASEBALL_PERIODS.FIFTH_INNING,
|
|
103
|
-
providers_1.OPTIC_ODDS_BASEBALL_PERIODS.SIXTH_INNING,
|
|
104
|
-
providers_1.OPTIC_ODDS_BASEBALL_PERIODS.SEVENTH_INNING,
|
|
105
|
-
providers_1.OPTIC_ODDS_BASEBALL_PERIODS.EIGHTH_INNING,
|
|
106
|
-
providers_1.OPTIC_ODDS_BASEBALL_PERIODS.NINTH_INNING,
|
|
107
|
-
],
|
|
108
|
-
fullCycle: [],
|
|
109
|
-
extraTime: [],
|
|
110
|
-
},
|
|
111
|
-
leaguePeriods: null,
|
|
112
|
-
},
|
|
69
|
+
opticOdds: {},
|
|
113
70
|
},
|
|
114
71
|
[client_1.SportGroup.Football]: {
|
|
115
|
-
|
|
116
|
-
totalPeriods: 4,
|
|
117
|
-
[core_1.OddsServices.LSPORTS]: {
|
|
72
|
+
lsports: {
|
|
118
73
|
sportPeriods: {
|
|
119
74
|
regular: [
|
|
120
75
|
providers_1.LSPORTS_AMERICAN_FOOTBALL_PERIODS.FIRST_QUARTER,
|
|
@@ -130,19 +85,7 @@ exports.SportsGamePeriodClockConfig = {
|
|
|
130
85
|
},
|
|
131
86
|
leaguePeriods: null,
|
|
132
87
|
},
|
|
133
|
-
|
|
134
|
-
sportPeriods: {
|
|
135
|
-
regular: [
|
|
136
|
-
providers_1.OPTIC_ODDS_AMERICAN_FOOTBALL_PERIODS.FIRST_QUARTER,
|
|
137
|
-
providers_1.OPTIC_ODDS_AMERICAN_FOOTBALL_PERIODS.SECOND_QUARTER,
|
|
138
|
-
providers_1.OPTIC_ODDS_AMERICAN_FOOTBALL_PERIODS.THIRD_QUARTER,
|
|
139
|
-
providers_1.OPTIC_ODDS_AMERICAN_FOOTBALL_PERIODS.FOURTH_QUARTER,
|
|
140
|
-
],
|
|
141
|
-
fullCycle: [],
|
|
142
|
-
extraTime: [],
|
|
143
|
-
},
|
|
144
|
-
leaguePeriods: null,
|
|
145
|
-
},
|
|
88
|
+
opticOdds: {},
|
|
146
89
|
},
|
|
147
90
|
};
|
|
148
91
|
//# sourceMappingURL=sports.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sports.config.js","sourceRoot":"","sources":["../../../../../src/server/oracle/config/game-periods/sports.config.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAE3C,
|
|
1
|
+
{"version":3,"file":"sports.config.js","sourceRoot":"","sources":["../../../../../src/server/oracle/config/game-periods/sports.config.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAE3C,2CAKoB;AAEpB;;GAEG;AACU,QAAA,2BAA2B,GAAoC;IACxE,CAAC,mBAAU,CAAC,UAAU,CAAC,EAAE;QACrB,OAAO,EAAE;YACL,YAAY,EAAE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,EAAE,oCAAwB,CAAC,0BAA0B,CAAC;gBACpG,SAAS,EAAE,CAAC,oCAAwB,CAAC,aAAa,CAAC;aACtD;YACD,aAAa,EAAE,IAAI;SACtB;QACD,SAAS,EAAE,EAAE;KAChB;IACD,CAAC,mBAAU,CAAC,QAAQ,CAAC,EAAE;QACnB,OAAO,EAAE;YACL,YAAY,EAAE;gBACV,OAAO,EAAE;oBACL,6CAAiC,CAAC,aAAa;oBAC/C,6CAAiC,CAAC,cAAc;oBAChD,6CAAiC,CAAC,aAAa;oBAC/C,6CAAiC,CAAC,cAAc;iBACnD;gBACD,SAAS,EAAE;oBACP,6CAAiC,CAAC,SAAS;oBAC3C,6CAAiC,CAAC,wBAAwB;iBAC7D;gBACD,SAAS,EAAE,CAAC,6CAAiC,CAAC,QAAQ,CAAC;aAC1D;YACD,aAAa,EAAE,IAAI;SACtB;QACD,SAAS,EAAE,EAAE;KAChB;CACJ,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SportGroup } from "@prisma/client";
|
|
2
|
-
import { OddsServices } from "../../../../core";
|
|
3
2
|
/**
|
|
4
3
|
* Period configuration for a specific sport or league
|
|
5
4
|
*/
|
|
@@ -26,10 +25,8 @@ export interface ProviderPeriodConfig {
|
|
|
26
25
|
* Complete period configuration for all providers
|
|
27
26
|
*/
|
|
28
27
|
export interface SportPeriodClockConfig {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
[OddsServices.LSPORTS]: ProviderPeriodConfig;
|
|
32
|
-
[OddsServices.OPTIC_ODDS]: ProviderPeriodConfig;
|
|
28
|
+
lsports: ProviderPeriodConfig;
|
|
29
|
+
opticOdds: Partial<ProviderPeriodConfig>;
|
|
33
30
|
}
|
|
34
31
|
/**
|
|
35
32
|
* Main configuration type mapping sport groups to their period configs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/server/oracle/config/game-periods/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/server/oracle/config/game-periods/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,92 +1,63 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @memberof RedisCacheKeysUtils
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare
|
|
11
|
-
activeGamesHash = "active_games_hash",
|
|
12
|
-
postGamesHash = "post_games_hash"
|
|
13
|
-
}
|
|
3
|
+
* Redis cache key constants and helper functions
|
|
4
|
+
*/
|
|
5
|
+
import type { MarketType } from "@prisma/client";
|
|
6
|
+
export declare const levrGamesHashKey = "levr:games:";
|
|
7
|
+
export declare const levrMarketsHashKey = "levr:markets:";
|
|
8
|
+
export declare const levrOddsListKey = "levr:odds:list:";
|
|
9
|
+
export declare const market_index_name = "levr:markets_idx";
|
|
10
|
+
export declare const game_index_name = "levr:games_idx";
|
|
14
11
|
export declare enum RedisNumStates {
|
|
15
12
|
success = 1,
|
|
16
13
|
failure = 0
|
|
17
14
|
}
|
|
18
|
-
export declare const schedulesHash = "schedules_hash";
|
|
19
|
-
export declare const gameIdsToLevrFixtureIdsMap = "game_ids_to_levr_ids";
|
|
20
|
-
/**
|
|
21
|
-
* @memberof RedisCacheKeysUtils
|
|
22
|
-
* @description Key for storing the mapping of levr ids to fixture ids in redis
|
|
23
|
-
*/
|
|
24
|
-
export declare const gameIdsToFixtureIds = "game_ids_to_fixture_ids";
|
|
25
15
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @
|
|
16
|
+
* Get the Redis key for a game score by gameObjectId
|
|
17
|
+
* @param gameObjectId - The game object ID
|
|
18
|
+
* @returns Redis key for the score
|
|
28
19
|
*/
|
|
29
|
-
export declare const
|
|
20
|
+
export declare const getScoreHashKey: (gameObjectId: string) => string;
|
|
30
21
|
/**
|
|
31
|
-
*
|
|
32
|
-
* @description stores the list of all levr games in cache
|
|
22
|
+
* Get the Redis hash key for a game by gameObjectId
|
|
33
23
|
*/
|
|
34
|
-
export declare const
|
|
35
|
-
export declare const gameToMarketOfOddsInCache = "game_to_market_ids_of_odds_in_cache_";
|
|
24
|
+
export declare const getGameHashKey: (gameObjectId: string) => string;
|
|
36
25
|
/**
|
|
37
|
-
*
|
|
38
|
-
* @
|
|
39
|
-
* @
|
|
40
|
-
* gameId: 1,
|
|
41
|
-
* period: 1,
|
|
42
|
-
* timeUpdated: 1714857600
|
|
43
|
-
* }
|
|
26
|
+
* Get the Redis LIST key for odds by gameMarketId
|
|
27
|
+
* @param gameMarketId - The game market identifier
|
|
28
|
+
* @returns Redis key for the odds list
|
|
44
29
|
*/
|
|
45
|
-
export declare const
|
|
30
|
+
export declare const getOddsListKey: (gameMarketId: string) => string;
|
|
46
31
|
/**
|
|
47
|
-
*
|
|
48
|
-
* @description stores the full time odds for the given gameId appended to it
|
|
49
|
-
* @example {
|
|
50
|
-
* gameId: 1,
|
|
51
|
-
* odds:
|
|
52
|
-
* }
|
|
32
|
+
* Get the Redis hash key for market by gameUniqueId and marketType
|
|
53
33
|
*/
|
|
34
|
+
export declare const getMarketKeyWithGameUniqueIdMarketType: (gameUniqueId: string, marketType: MarketType) => string;
|
|
35
|
+
/** @deprecated Not used after game.cache.service removal */
|
|
36
|
+
export declare const providerFixtureIdToLevrId = "provider_fixture_id_to_levrId";
|
|
37
|
+
/** @deprecated Not used after game.cache.service removal */
|
|
38
|
+
export declare const levrIdToProviderIds = "levr_id_to_provider_ids";
|
|
39
|
+
/** @deprecated Not used after game.cache.service removal */
|
|
40
|
+
export declare const queueBlockHashKey = "queue_block_key";
|
|
41
|
+
/** @deprecated Not used after game.cache.service removal */
|
|
42
|
+
export declare enum GameCollectionKeys {
|
|
43
|
+
activeGamesHash = "active_games_hash",
|
|
44
|
+
postGamesHash = "post_games_hash"
|
|
45
|
+
}
|
|
46
|
+
/** @deprecated Not used after game.cache.service removal */
|
|
47
|
+
export declare const gameIdsToLevrFixtureIdsMap = "game_ids_to_levr_ids";
|
|
48
|
+
/** @deprecated Not used after game.cache.service removal */
|
|
49
|
+
export declare const gameIdsToFixtureIds = "game_ids_to_fixture_ids";
|
|
50
|
+
/** @deprecated Not used after game.cache.service removal - replaced by getScoreHashKey */
|
|
51
|
+
export declare const getGameScoreByFixtureIdHash = "game_scores_by_fixture_id_hash";
|
|
52
|
+
/** @deprecated Not used after game.cache.service removal */
|
|
53
|
+
export declare const gameToMarketOfOddsInCache = "game_to_market_ids_of_odds_in_cache_";
|
|
54
|
+
/** @deprecated Not used after game.cache.service removal */
|
|
54
55
|
export declare const marketOddsKey = "market_odds";
|
|
55
|
-
|
|
56
|
-
export declare const marketByGameUniqueIdKeyAndMarketType = "market_by_game_unique_id_";
|
|
57
|
-
/**
|
|
58
|
-
* @memberof RedisCacheKeysUtils
|
|
59
|
-
* @description stores the time invalidation for the cache
|
|
60
|
-
*/
|
|
61
|
-
export declare const cacheTimeInvalidation = 60;
|
|
62
|
-
/** @audit levr fixture ids must be the same for games across all chains */
|
|
63
|
-
/**
|
|
64
|
-
* @memberof RedisCacheKeysUtils
|
|
65
|
-
* @param gameId
|
|
66
|
-
* @returns
|
|
67
|
-
*/
|
|
68
|
-
export declare const getMoneylineByGameIdKey: (gameId: number) => string;
|
|
69
|
-
/**
|
|
70
|
-
* @memberof RedisCacheKeysUtils
|
|
71
|
-
* @param gameId
|
|
72
|
-
* @returns
|
|
73
|
-
*/
|
|
74
|
-
export declare const getCacheLevrGameIdKey: (gameId: number) => string;
|
|
75
|
-
/**
|
|
76
|
-
* @memberof RedisCacheKeysUtils
|
|
77
|
-
* @param fixtureId
|
|
78
|
-
* @returns
|
|
79
|
-
*/
|
|
56
|
+
/** @deprecated Not used after game.cache.service removal */
|
|
80
57
|
export declare const getCachedLevrByFixtureIdKey: (fixtureId: string, chainId: number) => string;
|
|
58
|
+
/** @deprecated Not used after game.cache.service removal */
|
|
81
59
|
export declare const getMarketOddsField: (gameUniqueId: string, marketType: MarketType) => string;
|
|
82
|
-
|
|
83
|
-
export declare const
|
|
84
|
-
|
|
85
|
-
export declare const getMarketOddsByGameUniqueIdKeyAndMarketType: (gameUniqueId: string) => string;
|
|
86
|
-
export declare const getGameToMarketsOfOddsInCacheKey: (gameUniqueId: string) => string;
|
|
87
|
-
export declare const getCompletedMarketsKey: (marketType: MarketType) => string;
|
|
88
|
-
export declare const getCompletedMarketsField: (gameUniqueId: string, marketType: MarketType) => string;
|
|
60
|
+
/** @deprecated Not used after game.cache.service removal */
|
|
61
|
+
export declare const getMarketOddsListHashKey: (marketObjectId: string) => string;
|
|
62
|
+
/** @deprecated Not used after game.cache.service removal */
|
|
89
63
|
export declare const getGamesKeyByChainId: (gameCollectionKey: GameCollectionKeys, chainId: number) => string;
|
|
90
|
-
export declare const getRevokedApiKey: (keyId: string) => string;
|
|
91
|
-
export declare const getMarketKeyWithGameUniqueIdMarketType: (gameUniqueId: string, marketType: MarketType) => string;
|
|
92
|
-
export declare const market_index_name = "markets_unique_id_idx";
|