volleyballsimtypes 0.0.51 → 0.0.52

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.
@@ -36,7 +36,7 @@ function transformToAPIObject(match, league, tournament) {
36
36
  homeTeam: (0, _1.transformToAPITeam)(match.homeTeam),
37
37
  awayTeam: (0, _1.transformToAPITeam)(match.awayTeam),
38
38
  scheduledDate: new Date(match.scheduled_date),
39
- sets: sets,
39
+ sets,
40
40
  league: league != null ? (0, _1.transformToAPILeague)(league) : undefined,
41
41
  tournament: tournament != null ? (0, _1.transformToAPITournament)(tournament) : undefined
42
42
  };
@@ -45,14 +45,16 @@ function transformToAttributes(rally, setId) {
45
45
  }
46
46
  exports.transformFromRally = transformToAttributes;
47
47
  function transformToObject(model) {
48
- const liberoReplacements = model.LiberoReplacements.map(_1.transformToLiberoReplacement);
49
- const substitutions = model.Substitutions.map(_1.transformToSubstitution);
50
- const serves = model.Serves.map(_1.transformToServe);
51
- const receptions = model.Receptions.map(_1.transformToReception);
52
- const sets = model.Sets.map(_1.transformToSet);
53
- const spikes = model.Spikes.map(_1.transformToSpike);
54
- const blocks = model.Blocks.map(_1.transformToBlock);
55
- const scores = model.Scores.map(_1.transformToScore);
48
+ const liberoReplacements = model.LiberoReplacements != null ?
49
+ model.LiberoReplacements.map(_1.transformToLiberoReplacement) : [];
50
+ const substitutions = model.Substitutions != null ?
51
+ model.Substitutions.map(_1.transformToSubstitution) : [];
52
+ const serves = model.Serves != null ? model.Serves.map(_1.transformToServe) : [];
53
+ const receptions = model.Receptions != null ? model.Receptions.map(_1.transformToReception) : [];
54
+ const sets = model.Sets != null ? model.Sets.map(_1.transformToSet) : [];
55
+ const spikes = model.Spikes != null ? model.Spikes.map(_1.transformToSpike) : [];
56
+ const blocks = model.Blocks != null ? model.Blocks.map(_1.transformToBlock) : [];
57
+ const scores = model.Scores != null ? model.Scores.map(_1.transformToScore) : [];
56
58
  const events = [...liberoReplacements, ...substitutions, ...serves, ...receptions, ...sets, ...spikes, ...blocks, ...scores]
57
59
  .sort((e1, e2) => e1.order - e2.order);
58
60
  return new service_1.Rally({
@@ -68,14 +70,16 @@ function transformToObject(model) {
68
70
  }
69
71
  exports.transformToRally = transformToObject;
70
72
  function transformToAPIObject(model) {
71
- const liberoReplacements = model.LiberoReplacements.map(_1.transformToAPILiberoReplacement);
72
- const substitutions = model.Substitutions.map(_1.transformToAPISubstitution);
73
- const serves = model.Serves.map(_1.transformToAPIServe);
74
- const receptions = model.Receptions.map(_1.transformToAPIReception);
75
- const sets = model.Sets.map(_1.transformToAPISet);
76
- const spikes = model.Spikes.map(_1.transformToAPISpike);
77
- const blocks = model.Blocks.map(_1.transformToAPIBlock);
78
- const scores = model.Scores.map(_1.transformToAPIScore);
73
+ const liberoReplacements = model.LiberoReplacements != null ?
74
+ model.LiberoReplacements.map(_1.transformToAPILiberoReplacement) : [];
75
+ const substitutions = model.Substitutions != null ?
76
+ model.Substitutions.map(_1.transformToAPISubstitution) : [];
77
+ const serves = model.Serves != null ? model.Serves.map(_1.transformToAPIServe) : [];
78
+ const receptions = model.Receptions != null ? model.Receptions.map(_1.transformToAPIReception) : [];
79
+ const sets = model.Sets != null ? model.Sets.map(_1.transformToAPISet) : [];
80
+ const spikes = model.Spikes != null ? model.Spikes.map(_1.transformToAPISpike) : [];
81
+ const blocks = model.Blocks != null ? model.Blocks.map(_1.transformToAPIBlock) : [];
82
+ const scores = model.Scores != null ? model.Scores.map(_1.transformToAPIScore) : [];
79
83
  const events = [...liberoReplacements, ...substitutions, ...serves, ...receptions, ...sets, ...spikes, ...blocks, ...scores]
80
84
  .sort((e1, e2) => e1.order - e2.order);
81
85
  return {
@@ -31,7 +31,7 @@ function transformToAPIObject(match, league, tournament) {
31
31
  homeTeam: transformToAPITeam(match.homeTeam),
32
32
  awayTeam: transformToAPITeam(match.awayTeam),
33
33
  scheduledDate: new Date(match.scheduled_date),
34
- sets: sets,
34
+ sets,
35
35
  league: league != null ? transformToAPILeague(league) : undefined,
36
36
  tournament: tournament != null ? transformToAPITournament(tournament) : undefined
37
37
  };
@@ -41,14 +41,16 @@ function transformToAttributes(rally, setId) {
41
41
  };
42
42
  }
43
43
  function transformToObject(model) {
44
- const liberoReplacements = model.LiberoReplacements.map(transformToLiberoReplacement);
45
- const substitutions = model.Substitutions.map(transformToSubstitution);
46
- const serves = model.Serves.map(transformToServe);
47
- const receptions = model.Receptions.map(transformToReception);
48
- const sets = model.Sets.map(transformToSet);
49
- const spikes = model.Spikes.map(transformToSpike);
50
- const blocks = model.Blocks.map(transformToBlock);
51
- const scores = model.Scores.map(transformToScore);
44
+ const liberoReplacements = model.LiberoReplacements != null ?
45
+ model.LiberoReplacements.map(transformToLiberoReplacement) : [];
46
+ const substitutions = model.Substitutions != null ?
47
+ model.Substitutions.map(transformToSubstitution) : [];
48
+ const serves = model.Serves != null ? model.Serves.map(transformToServe) : [];
49
+ const receptions = model.Receptions != null ? model.Receptions.map(transformToReception) : [];
50
+ const sets = model.Sets != null ? model.Sets.map(transformToSet) : [];
51
+ const spikes = model.Spikes != null ? model.Spikes.map(transformToSpike) : [];
52
+ const blocks = model.Blocks != null ? model.Blocks.map(transformToBlock) : [];
53
+ const scores = model.Scores != null ? model.Scores.map(transformToScore) : [];
52
54
  const events = [...liberoReplacements, ...substitutions, ...serves, ...receptions, ...sets, ...spikes, ...blocks, ...scores]
53
55
  .sort((e1, e2) => e1.order - e2.order);
54
56
  return new Rally({
@@ -63,14 +65,16 @@ function transformToObject(model) {
63
65
  });
64
66
  }
65
67
  function transformToAPIObject(model) {
66
- const liberoReplacements = model.LiberoReplacements.map(transformToAPILiberoReplacement);
67
- const substitutions = model.Substitutions.map(transformToAPISubstitution);
68
- const serves = model.Serves.map(transformToAPIServe);
69
- const receptions = model.Receptions.map(transformToAPIReception);
70
- const sets = model.Sets.map(transformToAPISet);
71
- const spikes = model.Spikes.map(transformToAPISpike);
72
- const blocks = model.Blocks.map(transformToAPIBlock);
73
- const scores = model.Scores.map(transformToAPIScore);
68
+ const liberoReplacements = model.LiberoReplacements != null ?
69
+ model.LiberoReplacements.map(transformToAPILiberoReplacement) : [];
70
+ const substitutions = model.Substitutions != null ?
71
+ model.Substitutions.map(transformToAPISubstitution) : [];
72
+ const serves = model.Serves != null ? model.Serves.map(transformToAPIServe) : [];
73
+ const receptions = model.Receptions != null ? model.Receptions.map(transformToAPIReception) : [];
74
+ const sets = model.Sets != null ? model.Sets.map(transformToAPISet) : [];
75
+ const spikes = model.Spikes != null ? model.Spikes.map(transformToAPISpike) : [];
76
+ const blocks = model.Blocks != null ? model.Blocks.map(transformToAPIBlock) : [];
77
+ const scores = model.Scores != null ? model.Scores.map(transformToAPIScore) : [];
74
78
  const events = [...liberoReplacements, ...substitutions, ...serves, ...receptions, ...sets, ...spikes, ...blocks, ...scores]
75
79
  .sort((e1, e2) => e1.order - e2.order);
76
80
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.51",
3
+ "version": "0.0.52",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",