volleyballsimtypes 0.0.103 → 0.0.104

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.
@@ -13,7 +13,9 @@ function transformToAttributes(set, matchId) {
13
13
  is_tie_break: set.isTieBreak,
14
14
  home_score: set.getHomeScore(),
15
15
  away_score: set.getAwayScore(),
16
- setPositions: [...homeSetPositions, ...awaySetPositions]
16
+ setPositions: [...homeSetPositions, ...awaySetPositions],
17
+ MatchSetStats: set.stats != null ? set.stats.map(stats => (0, _1.transformFromMatchSetStats)(stats, set.id)) : undefined,
18
+ Rallies: set.rallies != null ? set.rallies.map(rally => (0, _1.transformFromRally)(rally, set.id)) : undefined
17
19
  };
18
20
  }
19
21
  exports.transformFromMatchSet = transformToAttributes;
@@ -1,5 +1,5 @@
1
1
  import { MatchSet } from '../../service';
2
- import { transformFromPlayerPosition, transformToAPIMatchSetStats, transformToAPIRally, transformToMatchSetStats, transformToPlayerPosition, transformToRally } from '.';
2
+ import { transformFromMatchSetStats, transformFromPlayerPosition, transformFromRally, transformToAPIMatchSetStats, transformToAPIRally, transformToMatchSetStats, transformToPlayerPosition, transformToRally } from '.';
3
3
  function transformToAttributes(set, matchId) {
4
4
  const homeSetPositions = set.homePlayerPosition.map(position => transformFromPlayerPosition(position, 'Home', set.id));
5
5
  const awaySetPositions = set.awayPlayerPosition.map(position => transformFromPlayerPosition(position, 'Away', set.id));
@@ -10,7 +10,9 @@ function transformToAttributes(set, matchId) {
10
10
  is_tie_break: set.isTieBreak,
11
11
  home_score: set.getHomeScore(),
12
12
  away_score: set.getAwayScore(),
13
- setPositions: [...homeSetPositions, ...awaySetPositions]
13
+ setPositions: [...homeSetPositions, ...awaySetPositions],
14
+ MatchSetStats: set.stats != null ? set.stats.map(stats => transformFromMatchSetStats(stats, set.id)) : undefined,
15
+ Rallies: set.rallies != null ? set.rallies.map(rally => transformFromRally(rally, set.id)) : undefined
14
16
  };
15
17
  }
16
18
  function transformToObject(model) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.103",
3
+ "version": "0.0.104",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",