tods-competition-factory 2.2.29 → 2.2.30

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.
@@ -4619,11 +4619,11 @@ declare function deleteFlightProfileAndFlightDraws({ autoPublish, tournamentReco
4619
4619
  event: any;
4620
4620
  force: any;
4621
4621
  }): {
4622
+ error: any;
4623
+ } | {
4622
4624
  success?: boolean;
4623
4625
  error?: ErrorType;
4624
4626
  info?: any;
4625
- } | {
4626
- error: any;
4627
4627
  };
4628
4628
 
4629
4629
  type ModifyEventMatchUpFormatTimingArgs = {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function factoryVersion() {
6
- return '2.2.29';
6
+ return '2.2.30';
7
7
  }
8
8
 
9
9
  const SINGLES_MATCHUP = 'SINGLES';
@@ -14673,13 +14673,14 @@ function addDrawEntry(params) {
14673
14673
  function addDrawEntries$1(params) {
14674
14674
  const stack = 'addDrawEntries';
14675
14675
  const { suppressDuplicateEntries = true, entryStatus = DIRECT_ACCEPTANCE, autoEntryPositions = true, ignoreStageSpace, participantIds, drawDefinition, stageSequence, stage = MAIN, roundTarget, extension, event, } = params;
14676
+ const isAdHocDraw = drawDefinition.drawType === AD_HOC;
14676
14677
  if (!stage)
14677
14678
  return { error: MISSING_STAGE };
14678
14679
  if (!drawDefinition)
14679
14680
  return { error: MISSING_DRAW_DEFINITION };
14680
14681
  if (!Array.isArray(participantIds))
14681
14682
  return { error: INVALID_PARTICIPANT_IDS };
14682
- if (!getValidStage({ stage, drawDefinition })) {
14683
+ if (!isAdHocDraw && !getValidStage({ stage, drawDefinition })) {
14683
14684
  return { error: INVALID_STAGE };
14684
14685
  }
14685
14686
  if (extension && !isValidExtension({ extension })) {
@@ -14696,11 +14697,14 @@ function addDrawEntries$1(params) {
14696
14697
  entryStatus,
14697
14698
  stage,
14698
14699
  });
14699
- if (!ignoreStageSpace && !spaceAvailable.success) {
14700
+ if (!ignoreStageSpace && !spaceAvailable.success && !isAdHocDraw) {
14700
14701
  return { error: spaceAvailable.error };
14701
14702
  }
14702
14703
  const positionsAvailable = spaceAvailable.positionsAvailable ?? 0;
14703
- if (!ignoreStageSpace && stage !== VOLUNTARY_CONSOLATION && positionsAvailable < participantIds.length)
14704
+ if (!ignoreStageSpace &&
14705
+ !isAdHocDraw &&
14706
+ stage !== VOLUNTARY_CONSOLATION &&
14707
+ positionsAvailable < participantIds.length)
14704
14708
  return { error: PARTICIPANT_COUNT_EXCEEDS_DRAW_SIZE };
14705
14709
  const duplicateEntries = [];
14706
14710
  const drawId = drawDefinition.drawId;
@@ -46972,7 +46976,7 @@ function getGroupedRounds({ scheduledRoundsDetails, greatestAverageMinutes, garm
46972
46976
  if (roundDetails.hash === lastHash || garmanSinglePass) {
46973
46977
  groupedMatchUpIds = groupedMatchUpIds.concat(roundDetails.matchUpIds);
46974
46978
  }
46975
- if (roundDetails.hash !== lastHash && false) ;
46979
+ if (roundDetails.hash !== lastHash && !garmanSinglePass) ;
46976
46980
  averageMinutes = greatestAverageMinutes ;
46977
46981
  recoveryMinutes = roundDetails.recoveryMinutes;
46978
46982
  roundPeriodLength = roundDetails.roundPeriodLength;