black-diamond-shared 1.0.22 → 1.0.24

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.mts CHANGED
@@ -1,7 +1,13 @@
1
1
  import * as mongoose from 'mongoose';
2
- import mongoose__default, { Document, Schema } from 'mongoose';
2
+ import mongoose__default, { Schema } from 'mongoose';
3
3
 
4
- interface League$1 extends Document {
4
+ interface MongoDocument {
5
+ _id: string;
6
+ createdAt: Date;
7
+ updatedAt: Date;
8
+ }
9
+
10
+ interface League$1 extends MongoDocument {
5
11
  id: number;
6
12
  name?: string;
7
13
  logo?: string;
@@ -59,18 +65,18 @@ interface League$1 extends Document {
59
65
  }
60
66
 
61
67
  declare const leagueSchema: Schema<League$1, mongoose.Model<League$1, any, any, any, mongoose.Document<unknown, any, League$1> & League$1 & Required<{
62
- _id: unknown;
68
+ _id: string;
63
69
  }> & {
64
70
  __v: number;
65
71
  }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, League$1, mongoose.Document<unknown, {}, mongoose.FlatRecord<League$1>> & mongoose.FlatRecord<League$1> & Required<{
66
- _id: unknown;
72
+ _id: string;
67
73
  }> & {
68
74
  __v: number;
69
75
  }>;
70
76
 
71
77
  declare const LEAGUE_ID_LIST: number[];
72
78
 
73
- interface Team$1 extends Document {
79
+ interface Team$1 extends MongoDocument {
74
80
  id: number;
75
81
  name: string;
76
82
  logo: string;
@@ -121,7 +127,7 @@ declare const teamSchema: Schema<any, mongoose.Model<any, any, any, any, any, an
121
127
  __v: number;
122
128
  }>;
123
129
 
124
- interface TeamStat extends Document {
130
+ interface TeamStat extends MongoDocument {
125
131
  team: {
126
132
  id: number;
127
133
  name: string;
@@ -1441,7 +1447,7 @@ interface Odds {
1441
1447
  };
1442
1448
  };
1443
1449
  }
1444
- interface Fixture extends Document {
1450
+ interface Fixture extends MongoDocument {
1445
1451
  fixture: FixtureFixture;
1446
1452
  league: League;
1447
1453
  teams: Teams;
@@ -1452,6 +1458,233 @@ interface Fixture extends Document {
1452
1458
  home: TeamStat;
1453
1459
  away: TeamStat;
1454
1460
  };
1461
+ apiPredictions?: ApiPredictions;
1462
+ }
1463
+ interface TeamLast5 {
1464
+ played: number;
1465
+ form: string;
1466
+ att: string;
1467
+ def: string;
1468
+ goals: {
1469
+ for: {
1470
+ total: number;
1471
+ average: string;
1472
+ };
1473
+ against: {
1474
+ total: number;
1475
+ average: string;
1476
+ };
1477
+ };
1478
+ }
1479
+ interface TeamLeague {
1480
+ form: string;
1481
+ fixtures: {
1482
+ played: {
1483
+ home: number;
1484
+ away: number;
1485
+ total: number;
1486
+ };
1487
+ wins: {
1488
+ home: number;
1489
+ away: number;
1490
+ total: number;
1491
+ };
1492
+ draws: {
1493
+ home: number;
1494
+ away: number;
1495
+ total: number;
1496
+ };
1497
+ loses: {
1498
+ home: number;
1499
+ away: number;
1500
+ total: number;
1501
+ };
1502
+ };
1503
+ goals: {
1504
+ for: {
1505
+ total: {
1506
+ home: number;
1507
+ away: number;
1508
+ total: number;
1509
+ };
1510
+ average: {
1511
+ home: string;
1512
+ away: string;
1513
+ total: string;
1514
+ };
1515
+ minute: {
1516
+ [key: string]: {
1517
+ total: number | null;
1518
+ percentage: string | null;
1519
+ };
1520
+ };
1521
+ under_over: {
1522
+ [key: string]: {
1523
+ over: number;
1524
+ under: number;
1525
+ };
1526
+ };
1527
+ };
1528
+ against: {
1529
+ total: {
1530
+ home: number;
1531
+ away: number;
1532
+ total: number;
1533
+ };
1534
+ average: {
1535
+ home: string;
1536
+ away: string;
1537
+ total: string;
1538
+ };
1539
+ minute: {
1540
+ [key: string]: {
1541
+ total: number | null;
1542
+ percentage: string | null;
1543
+ };
1544
+ };
1545
+ under_over: {
1546
+ [key: string]: {
1547
+ over: number;
1548
+ under: number;
1549
+ };
1550
+ };
1551
+ };
1552
+ };
1553
+ biggest: {
1554
+ streak: {
1555
+ wins: number;
1556
+ draws: number;
1557
+ loses: number;
1558
+ };
1559
+ wins: {
1560
+ home: string;
1561
+ away: string;
1562
+ };
1563
+ loses: {
1564
+ home: string;
1565
+ away: string;
1566
+ };
1567
+ goals: {
1568
+ for: {
1569
+ home: number;
1570
+ away: number;
1571
+ };
1572
+ against: {
1573
+ home: number;
1574
+ away: number;
1575
+ };
1576
+ };
1577
+ };
1578
+ clean_sheet: {
1579
+ home: number;
1580
+ away: number;
1581
+ total: number;
1582
+ };
1583
+ failed_to_score: {
1584
+ home: number;
1585
+ away: number;
1586
+ total: number;
1587
+ };
1588
+ penalty: {
1589
+ scored: {
1590
+ total: number;
1591
+ percentage: string;
1592
+ };
1593
+ missed: {
1594
+ total: number;
1595
+ percentage: string;
1596
+ };
1597
+ total: number;
1598
+ };
1599
+ lineups: {
1600
+ formation: string;
1601
+ played: number;
1602
+ }[];
1603
+ cards: {
1604
+ yellow: {
1605
+ [key: string]: {
1606
+ total: number | null;
1607
+ percentage: string | null;
1608
+ };
1609
+ };
1610
+ red: {
1611
+ [key: string]: {
1612
+ total: number | null;
1613
+ percentage: string | null;
1614
+ };
1615
+ };
1616
+ };
1617
+ }
1618
+ interface TeamData {
1619
+ id: number;
1620
+ name: string;
1621
+ logo: string;
1622
+ last_5: TeamLast5;
1623
+ league: TeamLeague;
1624
+ }
1625
+ interface Comparison {
1626
+ form: {
1627
+ home: string;
1628
+ away: string;
1629
+ };
1630
+ att: {
1631
+ home: string;
1632
+ away: string;
1633
+ };
1634
+ def: {
1635
+ home: string;
1636
+ away: string;
1637
+ };
1638
+ poisson_distribution: {
1639
+ home: string;
1640
+ away: string;
1641
+ };
1642
+ h2h: {
1643
+ home: string;
1644
+ away: string;
1645
+ };
1646
+ goals: {
1647
+ home: string;
1648
+ away: string;
1649
+ };
1650
+ total: {
1651
+ home: string;
1652
+ away: string;
1653
+ };
1654
+ }
1655
+ interface H2HFixture {
1656
+ fixture: FixtureFixture;
1657
+ league: League;
1658
+ teams: Teams;
1659
+ goals: Goals;
1660
+ score: Score;
1661
+ }
1662
+ interface ApiPredictions {
1663
+ predictions: {
1664
+ winner: {
1665
+ id: number;
1666
+ name: string;
1667
+ comment: string;
1668
+ };
1669
+ win_or_draw: boolean;
1670
+ under_over: string;
1671
+ goals: {
1672
+ home: string;
1673
+ away: string;
1674
+ };
1675
+ advice: string;
1676
+ percent: {
1677
+ home: string;
1678
+ draw: string;
1679
+ away: string;
1680
+ };
1681
+ };
1682
+ teams: {
1683
+ home: TeamData;
1684
+ away: TeamData;
1685
+ };
1686
+ comparison: Comparison;
1687
+ h2h: H2HFixture[];
1455
1688
  }
1456
1689
 
1457
1690
  declare const fixtureSchema: Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
@@ -1498,7 +1731,7 @@ declare const fixtureSchema: Schema<any, mongoose.Model<any, any, any, any, any,
1498
1731
  __v: number;
1499
1732
  }>;
1500
1733
 
1501
- interface Bet extends Document {
1734
+ interface Bet extends MongoDocument {
1502
1735
  selections: {
1503
1736
  betName: string;
1504
1737
  fixture: Schema.Types.ObjectId;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,13 @@
1
1
  import * as mongoose from 'mongoose';
2
- import mongoose__default, { Document, Schema } from 'mongoose';
2
+ import mongoose__default, { Schema } from 'mongoose';
3
3
 
4
- interface League$1 extends Document {
4
+ interface MongoDocument {
5
+ _id: string;
6
+ createdAt: Date;
7
+ updatedAt: Date;
8
+ }
9
+
10
+ interface League$1 extends MongoDocument {
5
11
  id: number;
6
12
  name?: string;
7
13
  logo?: string;
@@ -59,18 +65,18 @@ interface League$1 extends Document {
59
65
  }
60
66
 
61
67
  declare const leagueSchema: Schema<League$1, mongoose.Model<League$1, any, any, any, mongoose.Document<unknown, any, League$1> & League$1 & Required<{
62
- _id: unknown;
68
+ _id: string;
63
69
  }> & {
64
70
  __v: number;
65
71
  }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, League$1, mongoose.Document<unknown, {}, mongoose.FlatRecord<League$1>> & mongoose.FlatRecord<League$1> & Required<{
66
- _id: unknown;
72
+ _id: string;
67
73
  }> & {
68
74
  __v: number;
69
75
  }>;
70
76
 
71
77
  declare const LEAGUE_ID_LIST: number[];
72
78
 
73
- interface Team$1 extends Document {
79
+ interface Team$1 extends MongoDocument {
74
80
  id: number;
75
81
  name: string;
76
82
  logo: string;
@@ -121,7 +127,7 @@ declare const teamSchema: Schema<any, mongoose.Model<any, any, any, any, any, an
121
127
  __v: number;
122
128
  }>;
123
129
 
124
- interface TeamStat extends Document {
130
+ interface TeamStat extends MongoDocument {
125
131
  team: {
126
132
  id: number;
127
133
  name: string;
@@ -1441,7 +1447,7 @@ interface Odds {
1441
1447
  };
1442
1448
  };
1443
1449
  }
1444
- interface Fixture extends Document {
1450
+ interface Fixture extends MongoDocument {
1445
1451
  fixture: FixtureFixture;
1446
1452
  league: League;
1447
1453
  teams: Teams;
@@ -1452,6 +1458,233 @@ interface Fixture extends Document {
1452
1458
  home: TeamStat;
1453
1459
  away: TeamStat;
1454
1460
  };
1461
+ apiPredictions?: ApiPredictions;
1462
+ }
1463
+ interface TeamLast5 {
1464
+ played: number;
1465
+ form: string;
1466
+ att: string;
1467
+ def: string;
1468
+ goals: {
1469
+ for: {
1470
+ total: number;
1471
+ average: string;
1472
+ };
1473
+ against: {
1474
+ total: number;
1475
+ average: string;
1476
+ };
1477
+ };
1478
+ }
1479
+ interface TeamLeague {
1480
+ form: string;
1481
+ fixtures: {
1482
+ played: {
1483
+ home: number;
1484
+ away: number;
1485
+ total: number;
1486
+ };
1487
+ wins: {
1488
+ home: number;
1489
+ away: number;
1490
+ total: number;
1491
+ };
1492
+ draws: {
1493
+ home: number;
1494
+ away: number;
1495
+ total: number;
1496
+ };
1497
+ loses: {
1498
+ home: number;
1499
+ away: number;
1500
+ total: number;
1501
+ };
1502
+ };
1503
+ goals: {
1504
+ for: {
1505
+ total: {
1506
+ home: number;
1507
+ away: number;
1508
+ total: number;
1509
+ };
1510
+ average: {
1511
+ home: string;
1512
+ away: string;
1513
+ total: string;
1514
+ };
1515
+ minute: {
1516
+ [key: string]: {
1517
+ total: number | null;
1518
+ percentage: string | null;
1519
+ };
1520
+ };
1521
+ under_over: {
1522
+ [key: string]: {
1523
+ over: number;
1524
+ under: number;
1525
+ };
1526
+ };
1527
+ };
1528
+ against: {
1529
+ total: {
1530
+ home: number;
1531
+ away: number;
1532
+ total: number;
1533
+ };
1534
+ average: {
1535
+ home: string;
1536
+ away: string;
1537
+ total: string;
1538
+ };
1539
+ minute: {
1540
+ [key: string]: {
1541
+ total: number | null;
1542
+ percentage: string | null;
1543
+ };
1544
+ };
1545
+ under_over: {
1546
+ [key: string]: {
1547
+ over: number;
1548
+ under: number;
1549
+ };
1550
+ };
1551
+ };
1552
+ };
1553
+ biggest: {
1554
+ streak: {
1555
+ wins: number;
1556
+ draws: number;
1557
+ loses: number;
1558
+ };
1559
+ wins: {
1560
+ home: string;
1561
+ away: string;
1562
+ };
1563
+ loses: {
1564
+ home: string;
1565
+ away: string;
1566
+ };
1567
+ goals: {
1568
+ for: {
1569
+ home: number;
1570
+ away: number;
1571
+ };
1572
+ against: {
1573
+ home: number;
1574
+ away: number;
1575
+ };
1576
+ };
1577
+ };
1578
+ clean_sheet: {
1579
+ home: number;
1580
+ away: number;
1581
+ total: number;
1582
+ };
1583
+ failed_to_score: {
1584
+ home: number;
1585
+ away: number;
1586
+ total: number;
1587
+ };
1588
+ penalty: {
1589
+ scored: {
1590
+ total: number;
1591
+ percentage: string;
1592
+ };
1593
+ missed: {
1594
+ total: number;
1595
+ percentage: string;
1596
+ };
1597
+ total: number;
1598
+ };
1599
+ lineups: {
1600
+ formation: string;
1601
+ played: number;
1602
+ }[];
1603
+ cards: {
1604
+ yellow: {
1605
+ [key: string]: {
1606
+ total: number | null;
1607
+ percentage: string | null;
1608
+ };
1609
+ };
1610
+ red: {
1611
+ [key: string]: {
1612
+ total: number | null;
1613
+ percentage: string | null;
1614
+ };
1615
+ };
1616
+ };
1617
+ }
1618
+ interface TeamData {
1619
+ id: number;
1620
+ name: string;
1621
+ logo: string;
1622
+ last_5: TeamLast5;
1623
+ league: TeamLeague;
1624
+ }
1625
+ interface Comparison {
1626
+ form: {
1627
+ home: string;
1628
+ away: string;
1629
+ };
1630
+ att: {
1631
+ home: string;
1632
+ away: string;
1633
+ };
1634
+ def: {
1635
+ home: string;
1636
+ away: string;
1637
+ };
1638
+ poisson_distribution: {
1639
+ home: string;
1640
+ away: string;
1641
+ };
1642
+ h2h: {
1643
+ home: string;
1644
+ away: string;
1645
+ };
1646
+ goals: {
1647
+ home: string;
1648
+ away: string;
1649
+ };
1650
+ total: {
1651
+ home: string;
1652
+ away: string;
1653
+ };
1654
+ }
1655
+ interface H2HFixture {
1656
+ fixture: FixtureFixture;
1657
+ league: League;
1658
+ teams: Teams;
1659
+ goals: Goals;
1660
+ score: Score;
1661
+ }
1662
+ interface ApiPredictions {
1663
+ predictions: {
1664
+ winner: {
1665
+ id: number;
1666
+ name: string;
1667
+ comment: string;
1668
+ };
1669
+ win_or_draw: boolean;
1670
+ under_over: string;
1671
+ goals: {
1672
+ home: string;
1673
+ away: string;
1674
+ };
1675
+ advice: string;
1676
+ percent: {
1677
+ home: string;
1678
+ draw: string;
1679
+ away: string;
1680
+ };
1681
+ };
1682
+ teams: {
1683
+ home: TeamData;
1684
+ away: TeamData;
1685
+ };
1686
+ comparison: Comparison;
1687
+ h2h: H2HFixture[];
1455
1688
  }
1456
1689
 
1457
1690
  declare const fixtureSchema: Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
@@ -1498,7 +1731,7 @@ declare const fixtureSchema: Schema<any, mongoose.Model<any, any, any, any, any,
1498
1731
  __v: number;
1499
1732
  }>;
1500
1733
 
1501
- interface Bet extends Document {
1734
+ interface Bet extends MongoDocument {
1502
1735
  selections: {
1503
1736
  betName: string;
1504
1737
  fixture: Schema.Types.ObjectId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "black-diamond-shared",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "Shared code between Black Diamond repositories",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",