@levrbet/shared 0.2.74 → 0.2.75
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/server/oracle/config/game-periods/index.d.ts +3 -0
- package/dist/server/oracle/config/game-periods/index.js +20 -0
- package/dist/server/oracle/config/game-periods/index.js.map +1 -0
- package/dist/server/oracle/config/game-periods/providers/index.d.ts +2 -0
- package/dist/server/oracle/config/game-periods/providers/index.js +19 -0
- package/dist/server/oracle/config/game-periods/providers/index.js.map +1 -0
- package/dist/server/oracle/config/game-periods/providers/lsports.periods.d.ts +56 -0
- package/dist/server/oracle/config/game-periods/providers/lsports.periods.js +61 -0
- package/dist/server/oracle/config/game-periods/providers/lsports.periods.js.map +1 -0
- package/dist/server/oracle/config/game-periods/providers/optic-odds.periods.d.ts +8 -0
- package/dist/server/oracle/config/game-periods/providers/optic-odds.periods.js +12 -0
- package/dist/server/oracle/config/game-periods/providers/optic-odds.periods.js.map +1 -0
- package/dist/server/oracle/config/game-periods/sports.config.d.ts +5 -0
- package/dist/server/oracle/config/game-periods/sports.config.js +91 -0
- package/dist/server/oracle/config/game-periods/sports.config.js.map +1 -0
- package/dist/server/oracle/config/game-periods/types.d.ts +36 -0
- package/dist/server/oracle/config/game-periods/types.js +3 -0
- package/dist/server/oracle/config/game-periods/types.js.map +1 -0
- package/dist/server/oracle/index.d.ts +1 -0
- package/dist/server/oracle/index.js +1 -0
- package/dist/server/oracle/index.js.map +1 -1
- package/dist/server/oracle/types/providers/game-clock/index.d.ts +2 -0
- package/dist/server/oracle/types/providers/game-clock/index.js +19 -0
- package/dist/server/oracle/types/providers/game-clock/index.js.map +1 -0
- package/dist/server/oracle/types/providers/game-clock/parser.d.ts +20 -0
- package/dist/server/oracle/types/providers/game-clock/parser.js +104 -0
- package/dist/server/oracle/types/providers/game-clock/parser.js.map +1 -0
- package/dist/server/oracle/types/providers/game-clock/types.d.ts +18 -0
- package/dist/server/oracle/types/providers/game-clock/types.js +16 -0
- package/dist/server/oracle/types/providers/game-clock/types.js.map +1 -0
- package/dist/server/oracle/types/providers/index.d.ts +2 -1
- package/dist/server/oracle/types/providers/index.js +2 -1
- package/dist/server/oracle/types/providers/index.js.map +1 -1
- package/dist/server/oracle/types/providers/lsports/lsports.periods.d.ts +53 -0
- package/dist/server/oracle/types/providers/lsports/lsports.periods.js +58 -0
- package/dist/server/oracle/types/providers/lsports/lsports.periods.js.map +1 -0
- package/dist/server/oracle/types/providers/lsports/lsports.types.js.map +1 -0
- package/package.json +1 -1
- package/dist/server/oracle/types/providers/lsports.types.js.map +0 -1
- /package/dist/server/oracle/types/providers/{lsports.types.d.ts → lsports/lsports.types.d.ts} +0 -0
- /package/dist/server/oracle/types/providers/{lsports.types.js → lsports/lsports.types.js} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
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("./types"), exports);
|
|
18
|
+
__exportStar(require("./sports.config"), exports);
|
|
19
|
+
__exportStar(require("./providers"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/server/oracle/config/game-periods/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,kDAA+B;AAC/B,8CAA2B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./lsports.periods"), exports);
|
|
18
|
+
__exportStar(require("./optic-odds.periods"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/server/oracle/config/game-periods/providers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAiC;AACjC,uDAAoC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LSports provider period constants by sport
|
|
3
|
+
*/
|
|
4
|
+
export declare const LSPORTS_SOCCER_PERIODS: {
|
|
5
|
+
readonly FIRST_HALF: 10;
|
|
6
|
+
readonly SECOND_HALF: 20;
|
|
7
|
+
readonly THIRD_HALF: 25;
|
|
8
|
+
readonly OVERTIME_FIRST_HALF: 30;
|
|
9
|
+
readonly OVERTIME_SECOND_HALF: 35;
|
|
10
|
+
readonly PENALTIES: 50;
|
|
11
|
+
readonly NONE: 99;
|
|
12
|
+
readonly FULL_TIME: 100;
|
|
13
|
+
readonly FULL_TIME_AFTER_OVERTIME: 101;
|
|
14
|
+
readonly FULL_TIME_AFTER_PENALTIES: 102;
|
|
15
|
+
};
|
|
16
|
+
export declare const LSPORTS_BASKETBALL_PERIODS: {
|
|
17
|
+
readonly FIRST_QUARTER: 1;
|
|
18
|
+
readonly SECOND_QUARTER: 2;
|
|
19
|
+
readonly THIRD_QUARTER: 3;
|
|
20
|
+
readonly FOURTH_QUARTER: 4;
|
|
21
|
+
readonly OVERTIME: 40;
|
|
22
|
+
readonly FULL_TIME: 100;
|
|
23
|
+
readonly FULL_TIME_AFTER_OVERTIME: 101;
|
|
24
|
+
};
|
|
25
|
+
export declare const LSPORTS_BASEBALL_PERIODS: {
|
|
26
|
+
readonly FIRST_INNING: 1;
|
|
27
|
+
readonly SECOND_INNING: 2;
|
|
28
|
+
readonly THIRD_INNING: 3;
|
|
29
|
+
readonly FOURTH_INNING: 4;
|
|
30
|
+
readonly FIFTH_INNING: 5;
|
|
31
|
+
readonly SIXTH_INNING: 6;
|
|
32
|
+
readonly SEVENTH_INNING: 7;
|
|
33
|
+
readonly EIGHTH_INNING: 8;
|
|
34
|
+
readonly NINTH_INNING: 9;
|
|
35
|
+
readonly EXTRA_INNINGS: 40;
|
|
36
|
+
readonly ERROR: 62;
|
|
37
|
+
readonly NONE: 99;
|
|
38
|
+
readonly FULL_TIME: 100;
|
|
39
|
+
readonly FULL_TIME_AFTER_EXTRA_TIME: 101;
|
|
40
|
+
};
|
|
41
|
+
export declare const LSPORTS_AMERICAN_FOOTBALL_PERIODS: {
|
|
42
|
+
readonly FIRST_QUARTER: 1;
|
|
43
|
+
readonly SECOND_QUARTER: 2;
|
|
44
|
+
readonly THIRD_QUARTER: 3;
|
|
45
|
+
readonly FOURTH_QUARTER: 4;
|
|
46
|
+
readonly OVERTIME: 40;
|
|
47
|
+
readonly FULL_TIME: 100;
|
|
48
|
+
readonly FULL_TIME_AFTER_OVERTIME: 101;
|
|
49
|
+
};
|
|
50
|
+
export declare const LSPORTS_NCAA_PERIODS: {
|
|
51
|
+
readonly FIRST_HALF: 10;
|
|
52
|
+
readonly SECOND_HALF: 20;
|
|
53
|
+
readonly FULL_TIME: 100;
|
|
54
|
+
readonly FULL_TIME_AFTER_OVERTIME: 101;
|
|
55
|
+
readonly OVERTIME: 40;
|
|
56
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* LSports provider period constants by sport
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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
|
+
exports.LSPORTS_SOCCER_PERIODS = {
|
|
8
|
+
FIRST_HALF: 10, // regular
|
|
9
|
+
SECOND_HALF: 20, // regular
|
|
10
|
+
THIRD_HALF: 25, // extra time // how is this treated?
|
|
11
|
+
OVERTIME_FIRST_HALF: 30, // extra time is it a full cycle period?
|
|
12
|
+
OVERTIME_SECOND_HALF: 35, // extra time is it a full cycle period?
|
|
13
|
+
PENALTIES: 50, // full cycle, considered 100% or almost 100% game progress
|
|
14
|
+
NONE: 99, // no period defined yet
|
|
15
|
+
FULL_TIME: 100, // full cycle considered 100% game progress
|
|
16
|
+
FULL_TIME_AFTER_OVERTIME: 101, // full cycle considered 100% game progress
|
|
17
|
+
FULL_TIME_AFTER_PENALTIES: 102, // full cycle considered 100% game progress
|
|
18
|
+
};
|
|
19
|
+
exports.LSPORTS_BASKETBALL_PERIODS = {
|
|
20
|
+
FIRST_QUARTER: 1, // regular
|
|
21
|
+
SECOND_QUARTER: 2, // regular
|
|
22
|
+
THIRD_QUARTER: 3, // regular
|
|
23
|
+
FOURTH_QUARTER: 4, // regular
|
|
24
|
+
OVERTIME: 40, // full cycle, considered 100% or almost 100% game progress
|
|
25
|
+
FULL_TIME: 100, // full cycle considered 100% game progress
|
|
26
|
+
FULL_TIME_AFTER_OVERTIME: 101, // full cycle considered 100% game progress
|
|
27
|
+
};
|
|
28
|
+
exports.LSPORTS_BASEBALL_PERIODS = {
|
|
29
|
+
FIRST_INNING: 1,
|
|
30
|
+
SECOND_INNING: 2,
|
|
31
|
+
THIRD_INNING: 3,
|
|
32
|
+
FOURTH_INNING: 4,
|
|
33
|
+
FIFTH_INNING: 5,
|
|
34
|
+
SIXTH_INNING: 6,
|
|
35
|
+
SEVENTH_INNING: 7,
|
|
36
|
+
EIGHTH_INNING: 8,
|
|
37
|
+
NINTH_INNING: 9,
|
|
38
|
+
EXTRA_INNINGS: 40,
|
|
39
|
+
ERROR: 62,
|
|
40
|
+
NONE: 99,
|
|
41
|
+
FULL_TIME: 100, // full cycle considered 100% game progress
|
|
42
|
+
FULL_TIME_AFTER_EXTRA_TIME: 101, // full cycle considered 100% game progress
|
|
43
|
+
};
|
|
44
|
+
exports.LSPORTS_AMERICAN_FOOTBALL_PERIODS = {
|
|
45
|
+
FIRST_QUARTER: 1,
|
|
46
|
+
SECOND_QUARTER: 2,
|
|
47
|
+
THIRD_QUARTER: 3,
|
|
48
|
+
FOURTH_QUARTER: 4,
|
|
49
|
+
OVERTIME: 40,
|
|
50
|
+
FULL_TIME: 100,
|
|
51
|
+
FULL_TIME_AFTER_OVERTIME: 101,
|
|
52
|
+
};
|
|
53
|
+
// League specific periods can be added here as needed
|
|
54
|
+
exports.LSPORTS_NCAA_PERIODS = {
|
|
55
|
+
FIRST_HALF: 10,
|
|
56
|
+
SECOND_HALF: 20,
|
|
57
|
+
FULL_TIME: 100,
|
|
58
|
+
FULL_TIME_AFTER_OVERTIME: 101,
|
|
59
|
+
OVERTIME: 40,
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=lsports.periods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpticOdds provider period constants by sport
|
|
3
|
+
* TODO: Add period mappings when OpticOdds integration is complete
|
|
4
|
+
*/
|
|
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: {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* OpticOdds provider period constants by sport
|
|
4
|
+
* TODO: Add period mappings when OpticOdds integration is complete
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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
|
+
exports.OPTIC_ODDS_BASKETBALL_PERIODS = {};
|
|
10
|
+
exports.OPTIC_ODDS_BASEBALL_PERIODS = {};
|
|
11
|
+
exports.OPTIC_ODDS_AMERICAN_FOOTBALL_PERIODS = {};
|
|
12
|
+
//# sourceMappingURL=optic-odds.periods.js.map
|
|
@@ -0,0 +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,EAAW,CAAA;AAEvC,QAAA,6BAA6B,GAAG,EAAW,CAAA;AAE3C,QAAA,2BAA2B,GAAG,EAAW,CAAA;AAEzC,QAAA,oCAAoC,GAAG,EAAW,CAAA"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SportsGamePeriodClockConfig = void 0;
|
|
4
|
+
const client_1 = require("@prisma/client");
|
|
5
|
+
const providers_1 = require("./providers");
|
|
6
|
+
/**
|
|
7
|
+
* Main configuration for game periods and clock behavior by sport and provider
|
|
8
|
+
*/
|
|
9
|
+
exports.SportsGamePeriodClockConfig = {
|
|
10
|
+
[client_1.SportGroup.Basketball]: {
|
|
11
|
+
lsports: {
|
|
12
|
+
sportPeriods: {
|
|
13
|
+
regular: [
|
|
14
|
+
providers_1.LSPORTS_BASKETBALL_PERIODS.FIRST_QUARTER,
|
|
15
|
+
providers_1.LSPORTS_BASKETBALL_PERIODS.SECOND_QUARTER,
|
|
16
|
+
providers_1.LSPORTS_BASKETBALL_PERIODS.THIRD_QUARTER,
|
|
17
|
+
providers_1.LSPORTS_BASKETBALL_PERIODS.FOURTH_QUARTER,
|
|
18
|
+
],
|
|
19
|
+
fullCycle: [
|
|
20
|
+
providers_1.LSPORTS_BASKETBALL_PERIODS.OVERTIME,
|
|
21
|
+
providers_1.LSPORTS_BASKETBALL_PERIODS.FULL_TIME,
|
|
22
|
+
providers_1.LSPORTS_BASKETBALL_PERIODS.FULL_TIME_AFTER_OVERTIME,
|
|
23
|
+
],
|
|
24
|
+
extraTime: [providers_1.LSPORTS_BASKETBALL_PERIODS.OVERTIME],
|
|
25
|
+
},
|
|
26
|
+
leaguePeriods: null,
|
|
27
|
+
},
|
|
28
|
+
opticOdds: {},
|
|
29
|
+
},
|
|
30
|
+
[client_1.SportGroup.Soccer]: {
|
|
31
|
+
lsports: {
|
|
32
|
+
sportPeriods: {
|
|
33
|
+
regular: [providers_1.LSPORTS_SOCCER_PERIODS.FIRST_HALF, providers_1.LSPORTS_SOCCER_PERIODS.SECOND_HALF],
|
|
34
|
+
fullCycle: [
|
|
35
|
+
providers_1.LSPORTS_SOCCER_PERIODS.PENALTIES,
|
|
36
|
+
providers_1.LSPORTS_SOCCER_PERIODS.FULL_TIME,
|
|
37
|
+
providers_1.LSPORTS_SOCCER_PERIODS.FULL_TIME_AFTER_OVERTIME,
|
|
38
|
+
providers_1.LSPORTS_SOCCER_PERIODS.FULL_TIME_AFTER_PENALTIES,
|
|
39
|
+
],
|
|
40
|
+
extraTime: [
|
|
41
|
+
providers_1.LSPORTS_SOCCER_PERIODS.THIRD_HALF,
|
|
42
|
+
providers_1.LSPORTS_SOCCER_PERIODS.OVERTIME_FIRST_HALF,
|
|
43
|
+
providers_1.LSPORTS_SOCCER_PERIODS.OVERTIME_SECOND_HALF,
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
leaguePeriods: null,
|
|
47
|
+
},
|
|
48
|
+
opticOdds: {},
|
|
49
|
+
},
|
|
50
|
+
[client_1.SportGroup.Baseball]: {
|
|
51
|
+
lsports: {
|
|
52
|
+
sportPeriods: {
|
|
53
|
+
regular: [
|
|
54
|
+
providers_1.LSPORTS_BASEBALL_PERIODS.FIRST_INNING,
|
|
55
|
+
providers_1.LSPORTS_BASEBALL_PERIODS.SECOND_INNING,
|
|
56
|
+
providers_1.LSPORTS_BASEBALL_PERIODS.THIRD_INNING,
|
|
57
|
+
providers_1.LSPORTS_BASEBALL_PERIODS.FOURTH_INNING,
|
|
58
|
+
providers_1.LSPORTS_BASEBALL_PERIODS.FIFTH_INNING,
|
|
59
|
+
providers_1.LSPORTS_BASEBALL_PERIODS.SIXTH_INNING,
|
|
60
|
+
providers_1.LSPORTS_BASEBALL_PERIODS.SEVENTH_INNING,
|
|
61
|
+
providers_1.LSPORTS_BASEBALL_PERIODS.EIGHTH_INNING,
|
|
62
|
+
providers_1.LSPORTS_BASEBALL_PERIODS.NINTH_INNING,
|
|
63
|
+
],
|
|
64
|
+
fullCycle: [providers_1.LSPORTS_BASEBALL_PERIODS.FULL_TIME, providers_1.LSPORTS_BASEBALL_PERIODS.FULL_TIME_AFTER_EXTRA_TIME],
|
|
65
|
+
extraTime: [providers_1.LSPORTS_BASEBALL_PERIODS.EXTRA_INNINGS],
|
|
66
|
+
},
|
|
67
|
+
leaguePeriods: null,
|
|
68
|
+
},
|
|
69
|
+
opticOdds: {},
|
|
70
|
+
},
|
|
71
|
+
[client_1.SportGroup.Football]: {
|
|
72
|
+
lsports: {
|
|
73
|
+
sportPeriods: {
|
|
74
|
+
regular: [
|
|
75
|
+
providers_1.LSPORTS_AMERICAN_FOOTBALL_PERIODS.FIRST_QUARTER,
|
|
76
|
+
providers_1.LSPORTS_AMERICAN_FOOTBALL_PERIODS.SECOND_QUARTER,
|
|
77
|
+
providers_1.LSPORTS_AMERICAN_FOOTBALL_PERIODS.THIRD_QUARTER,
|
|
78
|
+
providers_1.LSPORTS_AMERICAN_FOOTBALL_PERIODS.FOURTH_QUARTER,
|
|
79
|
+
],
|
|
80
|
+
fullCycle: [
|
|
81
|
+
providers_1.LSPORTS_AMERICAN_FOOTBALL_PERIODS.FULL_TIME,
|
|
82
|
+
providers_1.LSPORTS_AMERICAN_FOOTBALL_PERIODS.FULL_TIME_AFTER_OVERTIME,
|
|
83
|
+
],
|
|
84
|
+
extraTime: [providers_1.LSPORTS_AMERICAN_FOOTBALL_PERIODS.OVERTIME],
|
|
85
|
+
},
|
|
86
|
+
leaguePeriods: null,
|
|
87
|
+
},
|
|
88
|
+
opticOdds: {},
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=sports.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;gBACV,OAAO,EAAE;oBACL,sCAA0B,CAAC,aAAa;oBACxC,sCAA0B,CAAC,cAAc;oBACzC,sCAA0B,CAAC,aAAa;oBACxC,sCAA0B,CAAC,cAAc;iBAC5C;gBACD,SAAS,EAAE;oBACP,sCAA0B,CAAC,QAAQ;oBACnC,sCAA0B,CAAC,SAAS;oBACpC,sCAA0B,CAAC,wBAAwB;iBACtD;gBACD,SAAS,EAAE,CAAC,sCAA0B,CAAC,QAAQ,CAAC;aACnD;YACD,aAAa,EAAE,IAAI;SACtB;QACD,SAAS,EAAE,EAAE;KAChB;IACD,CAAC,mBAAU,CAAC,MAAM,CAAC,EAAE;QACjB,OAAO,EAAE;YACL,YAAY,EAAE;gBACV,OAAO,EAAE,CAAC,kCAAsB,CAAC,UAAU,EAAE,kCAAsB,CAAC,WAAW,CAAC;gBAChF,SAAS,EAAE;oBACP,kCAAsB,CAAC,SAAS;oBAChC,kCAAsB,CAAC,SAAS;oBAChC,kCAAsB,CAAC,wBAAwB;oBAC/C,kCAAsB,CAAC,yBAAyB;iBACnD;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
|
3
|
+
* Period configuration for a specific sport or league
|
|
4
|
+
*/
|
|
5
|
+
export interface PeriodConfig {
|
|
6
|
+
/** Regular game periods (e.g., quarters, halves, innings) */
|
|
7
|
+
regular: number[];
|
|
8
|
+
/** Full cycle periods that mark game completion states */
|
|
9
|
+
fullCycle: number[];
|
|
10
|
+
/** Extra time / overtime periods */
|
|
11
|
+
extraTime: number[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Provider-specific period configuration
|
|
15
|
+
*/
|
|
16
|
+
export interface ProviderPeriodConfig {
|
|
17
|
+
/** Default sport-level period configuration */
|
|
18
|
+
sportPeriods: PeriodConfig;
|
|
19
|
+
/** Optional league-specific overrides keyed by league ID */
|
|
20
|
+
leaguePeriods: null | {
|
|
21
|
+
[leagueId: number]: PeriodConfig;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Complete period configuration for all providers
|
|
26
|
+
*/
|
|
27
|
+
export interface SportPeriodClockConfig {
|
|
28
|
+
lsports: ProviderPeriodConfig;
|
|
29
|
+
opticOdds: Partial<ProviderPeriodConfig>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Main configuration type mapping sport groups to their period configs
|
|
33
|
+
*/
|
|
34
|
+
export type SportsGamePeriodClockConfigType = {
|
|
35
|
+
[key in SportGroup]?: SportPeriodClockConfig;
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/server/oracle/config/game-periods/types.ts"],"names":[],"mappings":""}
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./config/game-periods"), exports);
|
|
17
18
|
__exportStar(require("./redis-cache-manager"), exports);
|
|
18
19
|
__exportStar(require("./rmq-manager"), exports);
|
|
19
20
|
__exportStar(require("./types"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/oracle/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC;AACrC,gDAA6B;AAC7B,0CAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/oracle/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC;AACrC,wDAAqC;AACrC,gDAA6B;AAC7B,0CAAuB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./types"), exports);
|
|
18
|
+
__exportStar(require("./parser"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/server/oracle/types/providers/game-clock/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,2CAAwB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GameClockPattern } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Detect the pattern of a game clock string
|
|
4
|
+
* @param gameClock - The game clock string to analyze
|
|
5
|
+
* @returns The detected pattern type
|
|
6
|
+
*/
|
|
7
|
+
export declare const detectGameClockPattern: (gameClock: string) => GameClockPattern;
|
|
8
|
+
/**
|
|
9
|
+
* Parse a game clock string to seconds
|
|
10
|
+
* Supports multiple formats: "2H", "2700", "45:00", "45:00.0", "45:00,0"
|
|
11
|
+
* @param gameClock - The game clock string to parse
|
|
12
|
+
* @returns Number of seconds, or null if invalid format
|
|
13
|
+
*/
|
|
14
|
+
export declare const parseGameClockToSeconds: (gameClock: string) => number | null;
|
|
15
|
+
/**
|
|
16
|
+
* Format seconds to a clock string (MM:SS)
|
|
17
|
+
* @param totalSeconds - Total seconds to format
|
|
18
|
+
* @returns Formatted clock string
|
|
19
|
+
*/
|
|
20
|
+
export declare const formatSecondsToGameClock: (totalSeconds: number) => string;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatSecondsToGameClock = exports.parseGameClockToSeconds = exports.detectGameClockPattern = void 0;
|
|
4
|
+
const types_1 = require("./types");
|
|
5
|
+
/**
|
|
6
|
+
* Regex patterns for different game clock formats
|
|
7
|
+
*/
|
|
8
|
+
const CLOCK_PATTERNS = {
|
|
9
|
+
hString: /^(\d+)H$/,
|
|
10
|
+
secondsInt: /^\d+$/,
|
|
11
|
+
minuteSeconds: /^(\d{1,2}):(\d{2})$/,
|
|
12
|
+
mmssDecimal: /^(\d{1,2}):(\d{2})\.(\d+)$/,
|
|
13
|
+
mmssDecimalComma: /^(\d{1,2}):(\d{2}),(\d+)$/,
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Detect the pattern of a game clock string
|
|
17
|
+
* @param gameClock - The game clock string to analyze
|
|
18
|
+
* @returns The detected pattern type
|
|
19
|
+
*/
|
|
20
|
+
const detectGameClockPattern = (gameClock) => {
|
|
21
|
+
if (CLOCK_PATTERNS.hString.test(gameClock)) {
|
|
22
|
+
return types_1.GameClockPattern.HStringPattern;
|
|
23
|
+
}
|
|
24
|
+
if (CLOCK_PATTERNS.secondsInt.test(gameClock)) {
|
|
25
|
+
return types_1.GameClockPattern.SecondsInt;
|
|
26
|
+
}
|
|
27
|
+
if (CLOCK_PATTERNS.minuteSeconds.test(gameClock)) {
|
|
28
|
+
return types_1.GameClockPattern.MinuteSecondsString;
|
|
29
|
+
}
|
|
30
|
+
if (CLOCK_PATTERNS.mmssDecimal.test(gameClock)) {
|
|
31
|
+
return types_1.GameClockPattern.MMSSWithDecimalString;
|
|
32
|
+
}
|
|
33
|
+
if (CLOCK_PATTERNS.mmssDecimalComma.test(gameClock)) {
|
|
34
|
+
return types_1.GameClockPattern.MMSSWithDecimalCommaString;
|
|
35
|
+
}
|
|
36
|
+
return types_1.GameClockPattern.Invalid;
|
|
37
|
+
};
|
|
38
|
+
exports.detectGameClockPattern = detectGameClockPattern;
|
|
39
|
+
/**
|
|
40
|
+
* Parse a game clock string to seconds
|
|
41
|
+
* Supports multiple formats: "2H", "2700", "45:00", "45:00.0", "45:00,0"
|
|
42
|
+
* @param gameClock - The game clock string to parse
|
|
43
|
+
* @returns Number of seconds, or null if invalid format
|
|
44
|
+
*/
|
|
45
|
+
const parseGameClockToSeconds = (gameClock) => {
|
|
46
|
+
const pattern = (0, exports.detectGameClockPattern)(gameClock);
|
|
47
|
+
switch (pattern) {
|
|
48
|
+
case types_1.GameClockPattern.HStringPattern: {
|
|
49
|
+
const match = gameClock.match(CLOCK_PATTERNS.hString);
|
|
50
|
+
if (match?.[1]) {
|
|
51
|
+
const hours = parseInt(match[1], 10);
|
|
52
|
+
return hours * 3600;
|
|
53
|
+
}
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
case types_1.GameClockPattern.SecondsInt: {
|
|
57
|
+
return parseInt(gameClock, 10);
|
|
58
|
+
}
|
|
59
|
+
case types_1.GameClockPattern.MinuteSecondsString: {
|
|
60
|
+
const match = gameClock.match(CLOCK_PATTERNS.minuteSeconds);
|
|
61
|
+
if (match?.[1] && match?.[2]) {
|
|
62
|
+
const minutes = parseInt(match[1], 10);
|
|
63
|
+
const seconds = parseInt(match[2], 10);
|
|
64
|
+
return minutes * 60 + seconds;
|
|
65
|
+
}
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
case types_1.GameClockPattern.MMSSWithDecimalString: {
|
|
69
|
+
const match = gameClock.match(CLOCK_PATTERNS.mmssDecimal);
|
|
70
|
+
if (match?.[1] && match?.[2]) {
|
|
71
|
+
const minutes = parseInt(match[1], 10);
|
|
72
|
+
const seconds = parseInt(match[2], 10);
|
|
73
|
+
return minutes * 60 + seconds;
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
case types_1.GameClockPattern.MMSSWithDecimalCommaString: {
|
|
78
|
+
const match = gameClock.match(CLOCK_PATTERNS.mmssDecimalComma);
|
|
79
|
+
if (match?.[1] && match?.[2]) {
|
|
80
|
+
const minutes = parseInt(match[1], 10);
|
|
81
|
+
const seconds = parseInt(match[2], 10);
|
|
82
|
+
return minutes * 60 + seconds;
|
|
83
|
+
}
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
case types_1.GameClockPattern.Invalid:
|
|
87
|
+
default:
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
};
|
|
92
|
+
exports.parseGameClockToSeconds = parseGameClockToSeconds;
|
|
93
|
+
/**
|
|
94
|
+
* Format seconds to a clock string (MM:SS)
|
|
95
|
+
* @param totalSeconds - Total seconds to format
|
|
96
|
+
* @returns Formatted clock string
|
|
97
|
+
*/
|
|
98
|
+
const formatSecondsToGameClock = (totalSeconds) => {
|
|
99
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
100
|
+
const seconds = totalSeconds % 60;
|
|
101
|
+
return `${minutes.toString().padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
|
|
102
|
+
};
|
|
103
|
+
exports.formatSecondsToGameClock = formatSecondsToGameClock;
|
|
104
|
+
//# sourceMappingURL=parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../../../src/server/oracle/types/providers/game-clock/parser.ts"],"names":[],"mappings":";;;AAAA,mCAA0C;AAE1C;;GAEG;AACH,MAAM,cAAc,GAAG;IACnB,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,OAAO;IACnB,aAAa,EAAE,qBAAqB;IACpC,WAAW,EAAE,4BAA4B;IACzC,gBAAgB,EAAE,2BAA2B;CACvC,CAAA;AAEV;;;;GAIG;AACI,MAAM,sBAAsB,GAAG,CAAC,SAAiB,EAAoB,EAAE;IAC1E,IAAI,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACzC,OAAO,wBAAgB,CAAC,cAAc,CAAA;IAC1C,CAAC;IACD,IAAI,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5C,OAAO,wBAAgB,CAAC,UAAU,CAAA;IACtC,CAAC;IACD,IAAI,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/C,OAAO,wBAAgB,CAAC,mBAAmB,CAAA;IAC/C,CAAC;IACD,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7C,OAAO,wBAAgB,CAAC,qBAAqB,CAAA;IACjD,CAAC;IACD,IAAI,cAAc,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAClD,OAAO,wBAAgB,CAAC,0BAA0B,C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AAM,OAAO,GAAG,YAAY,GAAG,EAAE,CAAA;IACjC,OAAO,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAA;AAC1F,CAAC,CAAA;AAJY,QAAA,wBAAwB,4BAIpC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Game clock pattern types for parsing different clock formats
|
|
3
|
+
*/
|
|
4
|
+
export declare enum GameClockPattern {
|
|
5
|
+
HStringPattern = "HStringPattern",// 2H
|
|
6
|
+
SecondsInt = "SecondsInt",// 2700
|
|
7
|
+
MinuteSecondsString = "MinuteSecondsString",// 45:00
|
|
8
|
+
MMSSWithDecimalString = "MMSSWithDecimalString",// 45:00.0
|
|
9
|
+
MMSSWithDecimalCommaString = "MMSSWithDecimalCommaString",// 45:00,0
|
|
10
|
+
Invalid = "Invalid"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Result of parsing a game clock string
|
|
14
|
+
*/
|
|
15
|
+
export interface ParsedGameClock {
|
|
16
|
+
pattern: GameClockPattern;
|
|
17
|
+
seconds: number | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GameClockPattern = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Game clock pattern types for parsing different clock formats
|
|
6
|
+
*/
|
|
7
|
+
var GameClockPattern;
|
|
8
|
+
(function (GameClockPattern) {
|
|
9
|
+
GameClockPattern["HStringPattern"] = "HStringPattern";
|
|
10
|
+
GameClockPattern["SecondsInt"] = "SecondsInt";
|
|
11
|
+
GameClockPattern["MinuteSecondsString"] = "MinuteSecondsString";
|
|
12
|
+
GameClockPattern["MMSSWithDecimalString"] = "MMSSWithDecimalString";
|
|
13
|
+
GameClockPattern["MMSSWithDecimalCommaString"] = "MMSSWithDecimalCommaString";
|
|
14
|
+
GameClockPattern["Invalid"] = "Invalid";
|
|
15
|
+
})(GameClockPattern || (exports.GameClockPattern = GameClockPattern = {}));
|
|
16
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/server/oracle/types/providers/game-clock/types.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IACxB,qDAAiC,CAAA;IACjC,6CAAyB,CAAA;IACzB,+DAA2C,CAAA;IAC3C,mEAA+C,CAAA;IAC/C,6EAAyD,CAAA;IACzD,uCAAmB,CAAA;AACvB,CAAC,EAPW,gBAAgB,gCAAhB,gBAAgB,QAO3B"}
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./lsports.types"), exports);
|
|
17
|
+
__exportStar(require("./lsports/lsports.types"), exports);
|
|
18
18
|
__exportStar(require("./optic_odds"), exports);
|
|
19
|
+
__exportStar(require("./game-clock"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/server/oracle/types/providers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/server/oracle/types/providers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC;AACvC,+CAA4B;AAC5B,+CAA4B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const LSPORTS_SOCCER_PERIODS: {
|
|
2
|
+
readonly FIRST_HALF: 10;
|
|
3
|
+
readonly SECOND_HALF: 20;
|
|
4
|
+
readonly THIRD_HALF: 25;
|
|
5
|
+
readonly OVERTIME_FIRST_HALF: 30;
|
|
6
|
+
readonly OVERTIME_SECOND_HALF: 35;
|
|
7
|
+
readonly PENALTIES: 50;
|
|
8
|
+
readonly NONE: 99;
|
|
9
|
+
readonly FULL_TIME: 100;
|
|
10
|
+
readonly FULL_TIME_AFTER_OVERTIME: 101;
|
|
11
|
+
readonly FULL_TIME_AFTER_PENALTIES: 102;
|
|
12
|
+
};
|
|
13
|
+
export declare const LSPORTS_BASKETBALL_PERIODS: {
|
|
14
|
+
readonly FIRST_QUARTER: 1;
|
|
15
|
+
readonly SECOND_QUARTER: 2;
|
|
16
|
+
readonly THIRD_QUARTER: 3;
|
|
17
|
+
readonly FOURTH_QUARTER: 4;
|
|
18
|
+
readonly OVERTIME: 40;
|
|
19
|
+
readonly FULL_TIME: 100;
|
|
20
|
+
readonly FULL_TIME_AFTER_OVERTIME: 101;
|
|
21
|
+
};
|
|
22
|
+
export declare const LSPORTS_BASEBALL_PERIODS: {
|
|
23
|
+
readonly FIRST_INNING: 1;
|
|
24
|
+
readonly SECOND_INNING: 2;
|
|
25
|
+
readonly THIRD_INNING: 3;
|
|
26
|
+
readonly FOURTH_INNING: 4;
|
|
27
|
+
readonly FIFTH_INNING: 5;
|
|
28
|
+
readonly SIXTH_INNING: 6;
|
|
29
|
+
readonly SEVENTH_INNING: 7;
|
|
30
|
+
readonly EIGHTH_INNING: 8;
|
|
31
|
+
readonly NINTH_INNING: 9;
|
|
32
|
+
readonly EXTRA_INNINGS: 40;
|
|
33
|
+
readonly ERROR: 62;
|
|
34
|
+
readonly NONE: 99;
|
|
35
|
+
readonly FULL_TIME: 100;
|
|
36
|
+
readonly FULL_TIME_AFTER_EXTRA_TIME: 101;
|
|
37
|
+
};
|
|
38
|
+
export declare const LSPORTS_AMERICAN_FOOTBALL_PERIODS: {
|
|
39
|
+
readonly FIRST_QUARTER: 1;
|
|
40
|
+
readonly SECOND_QUARTER: 2;
|
|
41
|
+
readonly THIRD_QUARTER: 3;
|
|
42
|
+
readonly FOURTH_QUARTER: 4;
|
|
43
|
+
readonly OVERTIME: 40;
|
|
44
|
+
readonly FULL_TIME: 100;
|
|
45
|
+
readonly FULL_TIME_AFTER_OVERTIME: 101;
|
|
46
|
+
};
|
|
47
|
+
export declare const LSPORTS_NCAA_PERIODS: {
|
|
48
|
+
readonly FIRST_HALF: 10;
|
|
49
|
+
readonly SECOND_HALF: 20;
|
|
50
|
+
readonly FULL_TIME: 100;
|
|
51
|
+
readonly FULL_TIME_AFTER_OVERTIME: 101;
|
|
52
|
+
readonly OVERTIME: 40;
|
|
53
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LSPORTS_NCAA_PERIODS = exports.LSPORTS_AMERICAN_FOOTBALL_PERIODS = exports.LSPORTS_BASEBALL_PERIODS = exports.LSPORTS_BASKETBALL_PERIODS = exports.LSPORTS_SOCCER_PERIODS = void 0;
|
|
4
|
+
exports.LSPORTS_SOCCER_PERIODS = {
|
|
5
|
+
FIRST_HALF: 10, // regular
|
|
6
|
+
SECOND_HALF: 20, // regular
|
|
7
|
+
THIRD_HALF: 25, // extra time // how is this treated?
|
|
8
|
+
OVERTIME_FIRST_HALF: 30, // extra time is it a full cycle period?
|
|
9
|
+
OVERTIME_SECOND_HALF: 35, // extra time is it a full cycle period?
|
|
10
|
+
PENALTIES: 50, // full cycle, considered 100% or almost 100% game progress
|
|
11
|
+
NONE: 99, // no period defined yet
|
|
12
|
+
FULL_TIME: 100, // full cycle considered 100% game progress
|
|
13
|
+
FULL_TIME_AFTER_OVERTIME: 101, // full cycle considered 100% game progress
|
|
14
|
+
FULL_TIME_AFTER_PENALTIES: 102, // full cycle considered 100% game progress
|
|
15
|
+
};
|
|
16
|
+
exports.LSPORTS_BASKETBALL_PERIODS = {
|
|
17
|
+
FIRST_QUARTER: 1, // regular
|
|
18
|
+
SECOND_QUARTER: 2, // regular
|
|
19
|
+
THIRD_QUARTER: 3, // regular
|
|
20
|
+
FOURTH_QUARTER: 4, // regular
|
|
21
|
+
OVERTIME: 40, // full cycle, considered 100% or almost 100% game progress
|
|
22
|
+
FULL_TIME: 100, // full cycle considered 100% game progress
|
|
23
|
+
FULL_TIME_AFTER_OVERTIME: 101, // full cycle considered 100% game progress
|
|
24
|
+
};
|
|
25
|
+
exports.LSPORTS_BASEBALL_PERIODS = {
|
|
26
|
+
FIRST_INNING: 1,
|
|
27
|
+
SECOND_INNING: 2,
|
|
28
|
+
THIRD_INNING: 3,
|
|
29
|
+
FOURTH_INNING: 4,
|
|
30
|
+
FIFTH_INNING: 5,
|
|
31
|
+
SIXTH_INNING: 6,
|
|
32
|
+
SEVENTH_INNING: 7,
|
|
33
|
+
EIGHTH_INNING: 8,
|
|
34
|
+
NINTH_INNING: 9,
|
|
35
|
+
EXTRA_INNINGS: 40,
|
|
36
|
+
ERROR: 62,
|
|
37
|
+
NONE: 99,
|
|
38
|
+
FULL_TIME: 100, // full cycle considered 100% game progress
|
|
39
|
+
FULL_TIME_AFTER_EXTRA_TIME: 101, // full cycle considered 100% game progress
|
|
40
|
+
};
|
|
41
|
+
exports.LSPORTS_AMERICAN_FOOTBALL_PERIODS = {
|
|
42
|
+
FIRST_QUARTER: 1,
|
|
43
|
+
SECOND_QUARTER: 2,
|
|
44
|
+
THIRD_QUARTER: 3,
|
|
45
|
+
FOURTH_QUARTER: 4,
|
|
46
|
+
OVERTIME: 40,
|
|
47
|
+
FULL_TIME: 100,
|
|
48
|
+
FULL_TIME_AFTER_OVERTIME: 101,
|
|
49
|
+
};
|
|
50
|
+
// League specific periods can be added here as needed
|
|
51
|
+
exports.LSPORTS_NCAA_PERIODS = {
|
|
52
|
+
FIRST_HALF: 10,
|
|
53
|
+
SECOND_HALF: 20,
|
|
54
|
+
FULL_TIME: 100,
|
|
55
|
+
FULL_TIME_AFTER_OVERTIME: 101,
|
|
56
|
+
OVERTIME: 40,
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=lsports.periods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lsports.periods.js","sourceRoot":"","sources":["../../../../../../src/server/oracle/types/providers/lsports/lsports.periods.ts"],"names":[],"mappings":";;;AAAa,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lsports.types.js","sourceRoot":"","sources":["../../../../../../src/server/oracle/types/providers/lsports/lsports.types.ts"],"names":[],"mappings":";;;AAkKA,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,2DAAc,CAAA;IACd,2DAAc,CAAA;AAClB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AASY,QAAA,gBAAgB,GAAG;IAC5B,oBAAoB,EAAE,KAAK;IAC3B,0BAA0B,EAAE,IAAI;IAChC,sBAAsB,EAAE,GAAG;CACrB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lsports.types.js","sourceRoot":"","sources":["../../../../../src/server/oracle/types/providers/lsports.types.ts"],"names":[],"mappings":";;;AAkKA,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,2DAAc,CAAA;IACd,2DAAc,CAAA;AAClB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AASY,QAAA,gBAAgB,GAAG;IAC5B,oBAAoB,EAAE,KAAK;IAC3B,0BAA0B,EAAE,IAAI;IAChC,sBAAsB,EAAE,GAAG;CACrB,CAAA"}
|
/package/dist/server/oracle/types/providers/{lsports.types.d.ts → lsports/lsports.types.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|