tods-competition-factory 1.7.14 → 1.7.15

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.
@@ -1812,8 +1812,8 @@ type MatchUpActionsArgs$1 = TournamentRecordsArgs & {
1812
1812
  drawId: string;
1813
1813
  };
1814
1814
  declare function matchUpActions$1(params?: MatchUpActionsArgs$1): (ResultType & {
1815
- event: Event | undefined;
1816
- drawDefinition: DrawDefinition | undefined;
1815
+ event?: Event | undefined;
1816
+ drawDefinition?: DrawDefinition | undefined;
1817
1817
  }) | (ResultType & {
1818
1818
  structureIsComplete?: boolean | undefined;
1819
1819
  isDoubleExit?: boolean | undefined;
@@ -1124,7 +1124,7 @@ function addExtension$1(params) {
1124
1124
  });
1125
1125
  if (!params.element.extensions)
1126
1126
  params.element.extensions = [];
1127
- const creationTime = params.creationTime !== void 0 ? params.creationTime : true;
1127
+ const creationTime = params?.creationTime ?? true;
1128
1128
  if (creationTime) {
1129
1129
  const createdAt = (/* @__PURE__ */ new Date()).toISOString();
1130
1130
  Object.assign(params.extension, { createdAt });
@@ -5173,19 +5173,15 @@ function findEvent({
5173
5173
  }) {
5174
5174
  const stack = "findEvent";
5175
5175
  if (!tournamentRecord)
5176
- return {
5177
- event: void 0,
5178
- drawDefinition: void 0,
5179
- ...decorateResult({
5180
- result: { error: MISSING_TOURNAMENT_RECORD },
5181
- stack
5182
- })
5183
- };
5184
- const events = tournamentRecord?.events || [];
5176
+ return decorateResult({
5177
+ result: { error: MISSING_TOURNAMENT_RECORD },
5178
+ stack
5179
+ });
5180
+ const events = tournamentRecord?.events ?? [];
5185
5181
  if (drawId) {
5186
5182
  let drawDefinition;
5187
5183
  const event = events.find((event2) => {
5188
- const drawDefinitions = event2?.drawDefinitions || [];
5184
+ const drawDefinitions = event2?.drawDefinitions ?? [];
5189
5185
  const targetDrawDefinition = drawDefinitions.find(
5190
5186
  (drawDefinition2) => drawDefinition2.drawId === drawId
5191
5187
  );
@@ -5503,7 +5499,7 @@ function findCourt({
5503
5499
  } else if (tournamentRecords) {
5504
5500
  const linkedTournamentIds = getLinkedTournamentIds({
5505
5501
  tournamentRecords
5506
- }).linkedTournamentIds || [];
5502
+ }).linkedTournamentIds ?? [];
5507
5503
  const relevantIds = linkedTournamentIds[tournamentRecord.tournamentId];
5508
5504
  for (const tournamentId of relevantIds) {
5509
5505
  const record = tournamentRecords[tournamentId];
@@ -11470,8 +11466,8 @@ function getSeedGroups({
11470
11466
  return {
11471
11467
  seedGroups: void 0,
11472
11468
  ...decorateResult({
11473
- result: { error: INVALID_VALUES },
11474
11469
  context: { roundRobinGroupsCount },
11470
+ result: { error: INVALID_VALUES },
11475
11471
  stack
11476
11472
  })
11477
11473
  };