tods-competition-factory 2.1.20 → 2.1.22

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.
@@ -7567,14 +7567,14 @@ type GetMatchUpsToScheduleArgs = {
7567
7567
  matchUpPotentialParticipantIds?: {
7568
7568
  [key: string]: string[];
7569
7569
  };
7570
- matchUpScheduleTimes: {
7570
+ matchUpScheduleTimes?: {
7571
7571
  [key: string]: string;
7572
7572
  };
7573
7573
  matchUpNotBeforeTimes?: {
7574
7574
  [key: string]: any;
7575
7575
  };
7576
7576
  scheduleCompletedMatchUps?: boolean;
7577
- dateScheduledMatchUpIds: string[];
7577
+ dateScheduledMatchUpIds?: string[];
7578
7578
  orderedMatchUpIds?: string[];
7579
7579
  clearDate?: boolean;
7580
7580
  matchUps: any[];
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function factoryVersion() {
6
- return '2.1.20';
6
+ return '2.1.22';
7
7
  }
8
8
 
9
9
  const SINGLES_MATCHUP = 'SINGLES';
@@ -35140,8 +35140,8 @@ function getMatchUpsToSchedule(params) {
35140
35140
  const paramsCheck = checkRequiredParameters(params, [{ [MATCHUPS]: true }]);
35141
35141
  if (paramsCheck.error)
35142
35142
  return paramsCheck;
35143
- const { matchUpPotentialParticipantIds, scheduleCompletedMatchUps, dateScheduledMatchUpIds, matchUpNotBeforeTimes, matchUpScheduleTimes, orderedMatchUpIds, clearDate, matchUps, } = params;
35144
- const alreadyScheduledMatchUpIds = Object.keys(matchUpScheduleTimes);
35143
+ const { matchUpPotentialParticipantIds, dateScheduledMatchUpIds = [], scheduleCompletedMatchUps, matchUpNotBeforeTimes, matchUpScheduleTimes, orderedMatchUpIds, clearDate, matchUps, } = params;
35144
+ const alreadyScheduledMatchUpIds = matchUpScheduleTimes ? Object.keys(matchUpScheduleTimes) : [];
35145
35145
  const matchUpsToSchedule = (orderedMatchUpIds ?? [])
35146
35146
  .map((matchUpId) => matchUps.find((matchUp) => matchUp.matchUpId === matchUpId))
35147
35147
  .filter(Boolean)
@@ -36658,7 +36658,7 @@ function competitionScheduleMatchUps(params) {
36658
36658
  if (detailsMap && Object.keys(detailsMap).length) {
36659
36659
  relevantMatchUps = relevantMatchUps.filter((matchUp) => {
36660
36660
  const { drawId, structureId, stage } = matchUp;
36661
- if (!detailsMap[drawId])
36661
+ if (!detailsMap?.[drawId]?.publishingDetail?.published)
36662
36662
  return false;
36663
36663
  if (detailsMap[drawId].stageDetails) {
36664
36664
  const stageKeys = Object.keys(detailsMap[drawId].stageDetails);
@@ -46726,10 +46726,9 @@ function getVenueSchedulingDetails({ matchUpPotentialParticipantIds, individualP
46726
46726
  garmanSinglePass: true,
46727
46727
  });
46728
46728
  let dateScheduledMatchUpIds;
46729
- let dateScheduledMatchUps;
46730
46729
  let scheduleTimes = [];
46731
46730
  if (useGarman) {
46732
- ({ scheduleTimes, dateScheduledMatchUpIds, dateScheduledMatchUps } = generateScheduleTimes({
46731
+ ({ scheduleTimes, dateScheduledMatchUpIds } = generateScheduleTimes({
46733
46732
  averageMatchUpMinutes: groupedRounds[0]?.averageMinutes,
46734
46733
  scheduleDate: extractDate(scheduleDate),
46735
46734
  venueIds: [venue.venueId],
@@ -46752,7 +46751,8 @@ function getVenueSchedulingDetails({ matchUpPotentialParticipantIds, individualP
46752
46751
  minutesMap,
46753
46752
  matchUps,
46754
46753
  });
46755
- ({ dateScheduledMatchUpIds, dateScheduledMatchUps } = processResult);
46754
+ ({ dateScheduledMatchUpIds } = processResult);
46755
+ const dateScheduledMatchUps = processResult;
46756
46756
  const { byeScheduledMatchUpDetails, clearDate } = processResult;
46757
46757
  if (byeScheduledMatchUpDetails?.length)
46758
46758
  allDateScheduledByeMatchUpDetails.push(...byeScheduledMatchUpDetails);