tods-competition-factory 2.0.58 → 2.0.60

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.
@@ -2420,6 +2420,7 @@ type AddScheduleAttributeArgs = {
2420
2420
  type MatchUpFilters = {
2421
2421
  matchUpStatuses?: MatchUpStatusUnion[];
2422
2422
  excludeMatchUpStatuses?: string[];
2423
+ hasParticipantsCount?: number;
2423
2424
  isCollectionMatchUp?: boolean;
2424
2425
  matchUpFormats?: string[];
2425
2426
  roundPositions?: number[];
@@ -3140,7 +3141,7 @@ type GetValidGroupSizesArgs = {
3140
3141
  groupSizeLimit?: number;
3141
3142
  drawSize: number;
3142
3143
  };
3143
- declare function getValidGroupSizes({ drawSize, groupSizeLimit, }: GetValidGroupSizesArgs): ResultType & {
3144
+ declare function getValidGroupSizes(params: GetValidGroupSizesArgs): ResultType & {
3144
3145
  validGroupSizes?: number[];
3145
3146
  };
3146
3147
 
@@ -6036,6 +6037,11 @@ declare function drawMatchUps({ participants: tournamentParticipants, tournament
6036
6037
  error?: ErrorType | undefined;
6037
6038
  };
6038
6039
 
6040
+ type FilterMatchUpsArgs = MatchUpFilters & {
6041
+ matchUps: HydratedMatchUp[];
6042
+ };
6043
+ declare function filterMatchUps(params: FilterMatchUpsArgs): HydratedMatchUp[];
6044
+
6039
6045
  declare const query$8_allCompetitionMatchUps: typeof allCompetitionMatchUps;
6040
6046
  declare const query$8_allDrawMatchUps: typeof allDrawMatchUps;
6041
6047
  declare const query$8_allEventMatchUps: typeof allEventMatchUps;
@@ -6046,6 +6052,7 @@ declare const query$8_checkMatchUpIsComplete: typeof checkMatchUpIsComplete;
6046
6052
  declare const query$8_competitionScheduleMatchUps: typeof competitionScheduleMatchUps;
6047
6053
  declare const query$8_drawMatchUps: typeof drawMatchUps;
6048
6054
  declare const query$8_eventMatchUps: typeof eventMatchUps;
6055
+ declare const query$8_filterMatchUps: typeof filterMatchUps;
6049
6056
  declare const query$8_getAllDrawMatchUps: typeof getAllDrawMatchUps;
6050
6057
  declare const query$8_getAllStructureMatchUps: typeof getAllStructureMatchUps;
6051
6058
  declare const query$8_getCheckedInParticipantIds: typeof getCheckedInParticipantIds;
@@ -6076,7 +6083,7 @@ declare const query$8_tournamentMatchUps: typeof tournamentMatchUps;
6076
6083
  declare const query$8_validMatchUp: typeof validMatchUp;
6077
6084
  declare const query$8_validMatchUps: typeof validMatchUps;
6078
6085
  declare namespace query$8 {
6079
- export { query$8_allCompetitionMatchUps as allCompetitionMatchUps, query$8_allDrawMatchUps as allDrawMatchUps, query$8_allEventMatchUps as allEventMatchUps, query$8_allTournamentMatchUps as allTournamentMatchUps, query$8_analyzeMatchUp as analyzeMatchUp, query$8_calculateWinCriteria as calculateWinCriteria, query$8_checkMatchUpIsComplete as checkMatchUpIsComplete, query$8_competitionScheduleMatchUps as competitionScheduleMatchUps, query$8_drawMatchUps as drawMatchUps, query$8_eventMatchUps as eventMatchUps, query$8_getAllDrawMatchUps as getAllDrawMatchUps, query$8_getAllStructureMatchUps as getAllStructureMatchUps, query$8_getCheckedInParticipantIds as getCheckedInParticipantIds, query$8_getCompetitionMatchUps as getCompetitionMatchUps, query$8_getEventMatchUpFormatTiming as getEventMatchUpFormatTiming, query$8_getHomeParticipantId as getHomeParticipantId, query$8_getMatchUpCompetitiveProfile as getMatchUpCompetitiveProfile, query$8_getMatchUpContextIds as getMatchUpContextIds, query$8_getMatchUpDailyLimits as getMatchUpDailyLimits, query$8_getMatchUpDailyLimitsUpdate as getMatchUpDailyLimitsUpdate, query$8_getMatchUpDependencies as getMatchUpDependencies, query$8_getMatchUpFormat as getMatchUpFormat, query$8_getMatchUpFormatTiming as getMatchUpFormatTiming, query$8_getMatchUpFormatTimingUpdate as getMatchUpFormatTimingUpdate, query$8_getMatchUpScheduleDetails as getMatchUpScheduleDetails, query$8_getMatchUpType as getMatchUpType, query$8_getMatchUpsStats as getMatchUpsStats, query$8_getModifiedMatchUpFormatTiming as getModifiedMatchUpFormatTiming, query$8_getParticipantResults as getParticipantResults, query$8_getPredictiveAccuracy as getPredictiveAccuracy, query$8_getRoundMatchUps as getRoundMatchUps, query$8_getRounds as getRounds, query$8_isValidMatchUpFormat as isValidMatchUpFormat, query$8_matchUpActions as matchUpActions, query$8_participantScheduledMatchUps as participantScheduledMatchUps, query$8_tallyParticipantResults as tallyParticipantResults, query$8_tournamentMatchUps as tournamentMatchUps, query$8_validMatchUp as validMatchUp, query$8_validMatchUps as validMatchUps };
6086
+ export { query$8_allCompetitionMatchUps as allCompetitionMatchUps, query$8_allDrawMatchUps as allDrawMatchUps, query$8_allEventMatchUps as allEventMatchUps, query$8_allTournamentMatchUps as allTournamentMatchUps, query$8_analyzeMatchUp as analyzeMatchUp, query$8_calculateWinCriteria as calculateWinCriteria, query$8_checkMatchUpIsComplete as checkMatchUpIsComplete, query$8_competitionScheduleMatchUps as competitionScheduleMatchUps, query$8_drawMatchUps as drawMatchUps, query$8_eventMatchUps as eventMatchUps, query$8_filterMatchUps as filterMatchUps, query$8_getAllDrawMatchUps as getAllDrawMatchUps, query$8_getAllStructureMatchUps as getAllStructureMatchUps, query$8_getCheckedInParticipantIds as getCheckedInParticipantIds, query$8_getCompetitionMatchUps as getCompetitionMatchUps, query$8_getEventMatchUpFormatTiming as getEventMatchUpFormatTiming, query$8_getHomeParticipantId as getHomeParticipantId, query$8_getMatchUpCompetitiveProfile as getMatchUpCompetitiveProfile, query$8_getMatchUpContextIds as getMatchUpContextIds, query$8_getMatchUpDailyLimits as getMatchUpDailyLimits, query$8_getMatchUpDailyLimitsUpdate as getMatchUpDailyLimitsUpdate, query$8_getMatchUpDependencies as getMatchUpDependencies, query$8_getMatchUpFormat as getMatchUpFormat, query$8_getMatchUpFormatTiming as getMatchUpFormatTiming, query$8_getMatchUpFormatTimingUpdate as getMatchUpFormatTimingUpdate, query$8_getMatchUpScheduleDetails as getMatchUpScheduleDetails, query$8_getMatchUpType as getMatchUpType, query$8_getMatchUpsStats as getMatchUpsStats, query$8_getModifiedMatchUpFormatTiming as getModifiedMatchUpFormatTiming, query$8_getParticipantResults as getParticipantResults, query$8_getPredictiveAccuracy as getPredictiveAccuracy, query$8_getRoundMatchUps as getRoundMatchUps, query$8_getRounds as getRounds, query$8_isValidMatchUpFormat as isValidMatchUpFormat, query$8_matchUpActions as matchUpActions, query$8_participantScheduledMatchUps as participantScheduledMatchUps, query$8_tallyParticipantResults as tallyParticipantResults, query$8_tournamentMatchUps as tournamentMatchUps, query$8_validMatchUp as validMatchUp, query$8_validMatchUps as validMatchUps };
6080
6087
  }
6081
6088
 
6082
6089
  declare const index$e_allCompetitionMatchUps: typeof allCompetitionMatchUps;
@@ -6097,6 +6104,7 @@ declare const index$e_disableTieAutoCalc: typeof disableTieAutoCalc;
6097
6104
  declare const index$e_drawMatchUps: typeof drawMatchUps;
6098
6105
  declare const index$e_enableTieAutoCalc: typeof enableTieAutoCalc;
6099
6106
  declare const index$e_eventMatchUps: typeof eventMatchUps;
6107
+ declare const index$e_filterMatchUps: typeof filterMatchUps;
6100
6108
  declare const index$e_getAllDrawMatchUps: typeof getAllDrawMatchUps;
6101
6109
  declare const index$e_getAllStructureMatchUps: typeof getAllStructureMatchUps;
6102
6110
  declare const index$e_getCheckedInParticipantIds: typeof getCheckedInParticipantIds;
@@ -6142,7 +6150,7 @@ declare const index$e_updateTieMatchUpScore: typeof updateTieMatchUpScore;
6142
6150
  declare const index$e_validMatchUp: typeof validMatchUp;
6143
6151
  declare const index$e_validMatchUps: typeof validMatchUps;
6144
6152
  declare namespace index$e {
6145
- export { index$e_allCompetitionMatchUps as allCompetitionMatchUps, index$e_allDrawMatchUps as allDrawMatchUps, index$e_allEventMatchUps as allEventMatchUps, index$e_allTournamentMatchUps as allTournamentMatchUps, index$e_analyzeMatchUp as analyzeMatchUp, index$e_applyLineUps as applyLineUps, index$e_assignMatchUpSideParticipant as assignMatchUpSideParticipant, index$e_assignTieMatchUpParticipantId as assignTieMatchUpParticipantId, index$e_bulkMatchUpStatusUpdate as bulkMatchUpStatusUpdate, index$e_calculateWinCriteria as calculateWinCriteria, index$e_checkInParticipant as checkInParticipant, index$e_checkMatchUpIsComplete as checkMatchUpIsComplete, index$e_checkOutParticipant as checkOutParticipant, index$e_competitionScheduleMatchUps as competitionScheduleMatchUps, index$e_disableTieAutoCalc as disableTieAutoCalc, index$e_drawMatchUps as drawMatchUps, index$e_enableTieAutoCalc as enableTieAutoCalc, index$e_eventMatchUps as eventMatchUps, publicFindMatchUp as findMatchUp, index$e_getAllDrawMatchUps as getAllDrawMatchUps, index$e_getAllStructureMatchUps as getAllStructureMatchUps, index$e_getCheckedInParticipantIds as getCheckedInParticipantIds, index$e_getCompetitionMatchUps as getCompetitionMatchUps, index$e_getEventMatchUpFormatTiming as getEventMatchUpFormatTiming, index$e_getHomeParticipantId as getHomeParticipantId, index$e_getMatchUpCompetitiveProfile as getMatchUpCompetitiveProfile, index$e_getMatchUpContextIds as getMatchUpContextIds, index$e_getMatchUpDailyLimits as getMatchUpDailyLimits, index$e_getMatchUpDailyLimitsUpdate as getMatchUpDailyLimitsUpdate, index$e_getMatchUpDependencies as getMatchUpDependencies, index$e_getMatchUpFormat as getMatchUpFormat, index$e_getMatchUpFormatTiming as getMatchUpFormatTiming, index$e_getMatchUpFormatTimingUpdate as getMatchUpFormatTimingUpdate, index$e_getMatchUpScheduleDetails as getMatchUpScheduleDetails, index$e_getMatchUpType as getMatchUpType, index$e_getMatchUpsStats as getMatchUpsStats, index$e_getModifiedMatchUpFormatTiming as getModifiedMatchUpFormatTiming, index$e_getParticipantResults as getParticipantResults, index$e_getPredictiveAccuracy as getPredictiveAccuracy, index$e_getRoundMatchUps as getRoundMatchUps, index$e_getRounds as getRounds, index$e_isValidMatchUpFormat as isValidMatchUpFormat, index$e_matchUpActions as matchUpActions, mutate$9 as mutate, index$e_participantScheduledMatchUps as participantScheduledMatchUps, query$8 as query, index$e_removeDelegatedOutcome as removeDelegatedOutcome, index$e_removeMatchUpSideParticipant as removeMatchUpSideParticipant, index$e_removeTieMatchUpParticipantId as removeTieMatchUpParticipantId, index$e_replaceTieMatchUpParticipantId as replaceTieMatchUpParticipantId, index$e_resetAdHocMatchUps as resetAdHocMatchUps, index$e_resetMatchUpLineUps as resetMatchUpLineUps, index$e_resetScorecard as resetScorecard, index$e_resetTieFormat as resetTieFormat, index$e_setDelegatedOutcome as setDelegatedOutcome, index$e_setMatchUpFormat as setMatchUpFormat, index$e_setMatchUpStatus as setMatchUpStatus, index$e_setOrderOfFinish as setOrderOfFinish, index$e_substituteParticipant as substituteParticipant, index$e_tallyParticipantResults as tallyParticipantResults, index$e_toggleParticipantCheckInState as toggleParticipantCheckInState, index$e_tournamentMatchUps as tournamentMatchUps, index$e_updateTieMatchUpScore as updateTieMatchUpScore, index$e_validMatchUp as validMatchUp, index$e_validMatchUps as validMatchUps };
6153
+ export { index$e_allCompetitionMatchUps as allCompetitionMatchUps, index$e_allDrawMatchUps as allDrawMatchUps, index$e_allEventMatchUps as allEventMatchUps, index$e_allTournamentMatchUps as allTournamentMatchUps, index$e_analyzeMatchUp as analyzeMatchUp, index$e_applyLineUps as applyLineUps, index$e_assignMatchUpSideParticipant as assignMatchUpSideParticipant, index$e_assignTieMatchUpParticipantId as assignTieMatchUpParticipantId, index$e_bulkMatchUpStatusUpdate as bulkMatchUpStatusUpdate, index$e_calculateWinCriteria as calculateWinCriteria, index$e_checkInParticipant as checkInParticipant, index$e_checkMatchUpIsComplete as checkMatchUpIsComplete, index$e_checkOutParticipant as checkOutParticipant, index$e_competitionScheduleMatchUps as competitionScheduleMatchUps, index$e_disableTieAutoCalc as disableTieAutoCalc, index$e_drawMatchUps as drawMatchUps, index$e_enableTieAutoCalc as enableTieAutoCalc, index$e_eventMatchUps as eventMatchUps, index$e_filterMatchUps as filterMatchUps, publicFindMatchUp as findMatchUp, index$e_getAllDrawMatchUps as getAllDrawMatchUps, index$e_getAllStructureMatchUps as getAllStructureMatchUps, index$e_getCheckedInParticipantIds as getCheckedInParticipantIds, index$e_getCompetitionMatchUps as getCompetitionMatchUps, index$e_getEventMatchUpFormatTiming as getEventMatchUpFormatTiming, index$e_getHomeParticipantId as getHomeParticipantId, index$e_getMatchUpCompetitiveProfile as getMatchUpCompetitiveProfile, index$e_getMatchUpContextIds as getMatchUpContextIds, index$e_getMatchUpDailyLimits as getMatchUpDailyLimits, index$e_getMatchUpDailyLimitsUpdate as getMatchUpDailyLimitsUpdate, index$e_getMatchUpDependencies as getMatchUpDependencies, index$e_getMatchUpFormat as getMatchUpFormat, index$e_getMatchUpFormatTiming as getMatchUpFormatTiming, index$e_getMatchUpFormatTimingUpdate as getMatchUpFormatTimingUpdate, index$e_getMatchUpScheduleDetails as getMatchUpScheduleDetails, index$e_getMatchUpType as getMatchUpType, index$e_getMatchUpsStats as getMatchUpsStats, index$e_getModifiedMatchUpFormatTiming as getModifiedMatchUpFormatTiming, index$e_getParticipantResults as getParticipantResults, index$e_getPredictiveAccuracy as getPredictiveAccuracy, index$e_getRoundMatchUps as getRoundMatchUps, index$e_getRounds as getRounds, index$e_isValidMatchUpFormat as isValidMatchUpFormat, index$e_matchUpActions as matchUpActions, mutate$9 as mutate, index$e_participantScheduledMatchUps as participantScheduledMatchUps, query$8 as query, index$e_removeDelegatedOutcome as removeDelegatedOutcome, index$e_removeMatchUpSideParticipant as removeMatchUpSideParticipant, index$e_removeTieMatchUpParticipantId as removeTieMatchUpParticipantId, index$e_replaceTieMatchUpParticipantId as replaceTieMatchUpParticipantId, index$e_resetAdHocMatchUps as resetAdHocMatchUps, index$e_resetMatchUpLineUps as resetMatchUpLineUps, index$e_resetScorecard as resetScorecard, index$e_resetTieFormat as resetTieFormat, index$e_setDelegatedOutcome as setDelegatedOutcome, index$e_setMatchUpFormat as setMatchUpFormat, index$e_setMatchUpStatus as setMatchUpStatus, index$e_setOrderOfFinish as setOrderOfFinish, index$e_substituteParticipant as substituteParticipant, index$e_tallyParticipantResults as tallyParticipantResults, index$e_toggleParticipantCheckInState as toggleParticipantCheckInState, index$e_tournamentMatchUps as tournamentMatchUps, index$e_updateTieMatchUpScore as updateTieMatchUpScore, index$e_validMatchUp as validMatchUp, index$e_validMatchUps as validMatchUps };
6146
6154
  }
6147
6155
 
6148
6156
  declare function generateOutcomeFromScoreString(params: any): any;
@@ -7642,6 +7650,7 @@ declare const index$9_competitionScheduleMatchUps: typeof competitionScheduleMat
7642
7650
  declare const index$9_credits: typeof credits;
7643
7651
  declare const index$9_drawMatchUps: typeof drawMatchUps;
7644
7652
  declare const index$9_eventMatchUps: typeof eventMatchUps;
7653
+ declare const index$9_filterMatchUps: typeof filterMatchUps;
7645
7654
  declare const index$9_filterParticipants: typeof filterParticipants;
7646
7655
  declare const index$9_findExtension: typeof findExtension;
7647
7656
  declare const index$9_getAllDrawMatchUps: typeof getAllDrawMatchUps;
@@ -7750,7 +7759,7 @@ declare const index$9_validMatchUps: typeof validMatchUps;
7750
7759
  declare const index$9_validateCollectionDefinition: typeof validateCollectionDefinition;
7751
7760
  declare const index$9_validateLineUp: typeof validateLineUp;
7752
7761
  declare namespace index$9 {
7753
- export { index$9_addGoesTo as addGoesTo, index$9_allCompetitionMatchUps as allCompetitionMatchUps, index$9_allDrawMatchUps as allDrawMatchUps, index$9_allEventMatchUps as allEventMatchUps, index$9_allPlayoffPositionsFilled as allPlayoffPositionsFilled, index$9_allTournamentMatchUps as allTournamentMatchUps, index$9_analyzeDraws as analyzeDraws, index$9_analyzeMatchUp as analyzeMatchUp, index$9_analyzeTournament as analyzeTournament, index$9_bulkUpdatePublishedEventIds as bulkUpdatePublishedEventIds, index$9_calculateWinCriteria as calculateWinCriteria, index$9_categoryCanContain as categoryCanContain, index$9_checkMatchUpIsComplete as checkMatchUpIsComplete, index$9_checkValidEntries as checkValidEntries, index$9_compareTieFormats as compareTieFormats, index$9_competitionScheduleMatchUps as competitionScheduleMatchUps, index$9_credits as credits, index$9_drawMatchUps as drawMatchUps, index$9_eventMatchUps as eventMatchUps, index$9_filterParticipants as filterParticipants, publicFindDrawDefinition as findDrawDefinition, index$9_findExtension as findExtension, index$9_getAllDrawMatchUps as getAllDrawMatchUps, index$9_getAllEventData as getAllEventData, index$9_getAllStructureMatchUps as getAllStructureMatchUps, index$9_getAllowedDrawTypes as getAllowedDrawTypes, index$9_getAllowedMatchUpFormats as getAllowedMatchUpFormats, index$9_getAppliedPolicies as getAppliedPolicies, index$9_getAssignedParticipantIds as getAssignedParticipantIds, index$9_getAvailableMatchUpsCount as getAvailableMatchUpsCount, index$9_getAvailablePlayoffProfiles as getAvailablePlayoffProfiles, index$9_getCategoryAgeDetails as getCategoryAgeDetails, index$9_getCheckedInParticipantIds as getCheckedInParticipantIds, index$9_getCompetitionDateRange as getCompetitionDateRange, index$9_getCompetitionMatchUps as getCompetitionMatchUps, index$9_getCompetitionParticipants as getCompetitionParticipants, index$9_getCompetitionPenalties as getCompetitionPenalties, index$9_getCompetitionVenues as getCompetitionVenues, index$9_getCourtInfo as getCourtInfo, index$9_getCourts as getCourts, index$9_getDrawData as getDrawData, index$9_getDrawDefinitionTimeItem as getDrawDefinitionTimeItem, index$9_getDrawParticipantRepresentativeIds as getDrawParticipantRepresentativeIds, index$9_getDrawStructures as getDrawStructures, index$9_getDrawTypeCoercion as getDrawTypeCoercion, index$9_getEligibleVoluntaryConsolationParticipants as getEligibleVoluntaryConsolationParticipants, index$9_getEntriesAndSeedsCount as getEntriesAndSeedsCount, index$9_getEvent as getEvent, index$9_getEventData as getEventData, index$9_getEventMatchUpFormatTiming as getEventMatchUpFormatTiming, index$9_getEventProperties as getEventProperties, index$9_getEventPublishStatus as getEventPublishStatus, index$9_getEventStructures as getEventStructures, index$9_getEventTimeItem as getEventTimeItem, index$9_getEvents as getEvents, index$9_getFlightProfile as getFlightProfile, index$9_getHomeParticipantId as getHomeParticipantId, index$9_getLinkedTournamentIds as getLinkedTournamentIds, index$9_getMatchUpCompetitiveProfile as getMatchUpCompetitiveProfile, index$9_getMatchUpContextIds as getMatchUpContextIds, index$9_getMatchUpDailyLimits as getMatchUpDailyLimits, index$9_getMatchUpDailyLimitsUpdate as getMatchUpDailyLimitsUpdate, index$9_getMatchUpDependencies as getMatchUpDependencies, index$9_getMatchUpFormat as getMatchUpFormat, index$9_getMatchUpFormatTiming as getMatchUpFormatTiming, index$9_getMatchUpFormatTimingUpdate as getMatchUpFormatTimingUpdate, index$9_getMatchUpScheduleDetails as getMatchUpScheduleDetails, index$9_getMatchUpType as getMatchUpType, index$9_getMatchUpsMap as getMatchUpsMap, index$9_getMatchUpsStats as getMatchUpsStats, index$9_getMaxEntryPosition as getMaxEntryPosition, index$9_getModifiedMatchUpFormatTiming as getModifiedMatchUpFormatTiming, index$9_getPairedParticipant as getPairedParticipant, index$9_getParticipantEventDetails as getParticipantEventDetails, index$9_getParticipantIdFinishingPositions as getParticipantIdFinishingPositions, index$9_getParticipantMembership as getParticipantMembership, index$9_getParticipantResults as getParticipantResults, index$9_getParticipantScaleItem as getParticipantScaleItem, index$9_getParticipantSchedules as getParticipantSchedules, index$9_getParticipantSignInStatus as getParticipantSignInStatus, index$9_getParticipantTimeItem as getParticipantTimeItem, index$9_getParticipants as getParticipants, index$9_getPersonRequests as getPersonRequests, index$9_getPolicyDefinitions as getPolicyDefinitions, index$9_getPositionAssignments as getPositionAssignments, index$9_getPositionsPlayedOff as getPositionsPlayedOff, index$9_getPredictiveAccuracy as getPredictiveAccuracy, index$9_getProfileRounds as getProfileRounds, index$9_getPublishState as getPublishState, index$9_getRoundMatchUps as getRoundMatchUps, index$9_getRounds as getRounds, index$9_getScaleValues as getScaleValues, index$9_getScaledEntries as getScaledEntries, index$9_getScheduledRoundsDetails as getScheduledRoundsDetails, index$9_getSchedulingProfile as getSchedulingProfile, index$9_getSchedulingProfileIssues as getSchedulingProfileIssues, index$9_getSeedingThresholds as getSeedingThresholds, index$9_getSeedsCount as getSeedsCount, index$9_getStructureSeedAssignments as getStructureSeedAssignments, index$9_getTeamLineUp as getTeamLineUp, index$9_getTieFormat as getTieFormat, index$9_getTimeItem as getTimeItem, index$9_getTournamentIds as getTournamentIds, index$9_getTournamentInfo as getTournamentInfo, index$9_getTournamentPenalties as getTournamentPenalties, index$9_getTournamentPersons as getTournamentPersons, index$9_getTournamentStructures as getTournamentStructures, index$9_getTournamentTimeItem as getTournamentTimeItem, index$9_getValidGroupSizes as getValidGroupSizes, index$9_getVenueData as getVenueData, index$9_getVenuesAndCourts as getVenuesAndCourts, index$9_isAdHoc as isAdHoc, index$9_isCompletedStructure as isCompletedStructure, index$9_isValidForQualifying as isValidForQualifying, index$9_isValidMatchUpFormat as isValidMatchUpFormat, index$9_matchUpActions as matchUpActions, index$9_participantScaleItem as participantScaleItem, index$9_participantScheduledMatchUps as participantScheduledMatchUps, index$9_positionActions as positionActions, index$9_publicFindVenue as publicFindVenue, index$9_tallyParticipantResults as tallyParticipantResults, index$9_tieFormatGenderValidityCheck as tieFormatGenderValidityCheck, index$9_tournamentMatchUps as tournamentMatchUps, index$9_validMatchUp as validMatchUp, index$9_validMatchUps as validMatchUps, index$9_validateCollectionDefinition as validateCollectionDefinition, index$9_validateLineUp as validateLineUp };
7762
+ export { index$9_addGoesTo as addGoesTo, index$9_allCompetitionMatchUps as allCompetitionMatchUps, index$9_allDrawMatchUps as allDrawMatchUps, index$9_allEventMatchUps as allEventMatchUps, index$9_allPlayoffPositionsFilled as allPlayoffPositionsFilled, index$9_allTournamentMatchUps as allTournamentMatchUps, index$9_analyzeDraws as analyzeDraws, index$9_analyzeMatchUp as analyzeMatchUp, index$9_analyzeTournament as analyzeTournament, index$9_bulkUpdatePublishedEventIds as bulkUpdatePublishedEventIds, index$9_calculateWinCriteria as calculateWinCriteria, index$9_categoryCanContain as categoryCanContain, index$9_checkMatchUpIsComplete as checkMatchUpIsComplete, index$9_checkValidEntries as checkValidEntries, index$9_compareTieFormats as compareTieFormats, index$9_competitionScheduleMatchUps as competitionScheduleMatchUps, index$9_credits as credits, index$9_drawMatchUps as drawMatchUps, index$9_eventMatchUps as eventMatchUps, index$9_filterMatchUps as filterMatchUps, index$9_filterParticipants as filterParticipants, publicFindDrawDefinition as findDrawDefinition, index$9_findExtension as findExtension, index$9_getAllDrawMatchUps as getAllDrawMatchUps, index$9_getAllEventData as getAllEventData, index$9_getAllStructureMatchUps as getAllStructureMatchUps, index$9_getAllowedDrawTypes as getAllowedDrawTypes, index$9_getAllowedMatchUpFormats as getAllowedMatchUpFormats, index$9_getAppliedPolicies as getAppliedPolicies, index$9_getAssignedParticipantIds as getAssignedParticipantIds, index$9_getAvailableMatchUpsCount as getAvailableMatchUpsCount, index$9_getAvailablePlayoffProfiles as getAvailablePlayoffProfiles, index$9_getCategoryAgeDetails as getCategoryAgeDetails, index$9_getCheckedInParticipantIds as getCheckedInParticipantIds, index$9_getCompetitionDateRange as getCompetitionDateRange, index$9_getCompetitionMatchUps as getCompetitionMatchUps, index$9_getCompetitionParticipants as getCompetitionParticipants, index$9_getCompetitionPenalties as getCompetitionPenalties, index$9_getCompetitionVenues as getCompetitionVenues, index$9_getCourtInfo as getCourtInfo, index$9_getCourts as getCourts, index$9_getDrawData as getDrawData, index$9_getDrawDefinitionTimeItem as getDrawDefinitionTimeItem, index$9_getDrawParticipantRepresentativeIds as getDrawParticipantRepresentativeIds, index$9_getDrawStructures as getDrawStructures, index$9_getDrawTypeCoercion as getDrawTypeCoercion, index$9_getEligibleVoluntaryConsolationParticipants as getEligibleVoluntaryConsolationParticipants, index$9_getEntriesAndSeedsCount as getEntriesAndSeedsCount, index$9_getEvent as getEvent, index$9_getEventData as getEventData, index$9_getEventMatchUpFormatTiming as getEventMatchUpFormatTiming, index$9_getEventProperties as getEventProperties, index$9_getEventPublishStatus as getEventPublishStatus, index$9_getEventStructures as getEventStructures, index$9_getEventTimeItem as getEventTimeItem, index$9_getEvents as getEvents, index$9_getFlightProfile as getFlightProfile, index$9_getHomeParticipantId as getHomeParticipantId, index$9_getLinkedTournamentIds as getLinkedTournamentIds, index$9_getMatchUpCompetitiveProfile as getMatchUpCompetitiveProfile, index$9_getMatchUpContextIds as getMatchUpContextIds, index$9_getMatchUpDailyLimits as getMatchUpDailyLimits, index$9_getMatchUpDailyLimitsUpdate as getMatchUpDailyLimitsUpdate, index$9_getMatchUpDependencies as getMatchUpDependencies, index$9_getMatchUpFormat as getMatchUpFormat, index$9_getMatchUpFormatTiming as getMatchUpFormatTiming, index$9_getMatchUpFormatTimingUpdate as getMatchUpFormatTimingUpdate, index$9_getMatchUpScheduleDetails as getMatchUpScheduleDetails, index$9_getMatchUpType as getMatchUpType, index$9_getMatchUpsMap as getMatchUpsMap, index$9_getMatchUpsStats as getMatchUpsStats, index$9_getMaxEntryPosition as getMaxEntryPosition, index$9_getModifiedMatchUpFormatTiming as getModifiedMatchUpFormatTiming, index$9_getPairedParticipant as getPairedParticipant, index$9_getParticipantEventDetails as getParticipantEventDetails, index$9_getParticipantIdFinishingPositions as getParticipantIdFinishingPositions, index$9_getParticipantMembership as getParticipantMembership, index$9_getParticipantResults as getParticipantResults, index$9_getParticipantScaleItem as getParticipantScaleItem, index$9_getParticipantSchedules as getParticipantSchedules, index$9_getParticipantSignInStatus as getParticipantSignInStatus, index$9_getParticipantTimeItem as getParticipantTimeItem, index$9_getParticipants as getParticipants, index$9_getPersonRequests as getPersonRequests, index$9_getPolicyDefinitions as getPolicyDefinitions, index$9_getPositionAssignments as getPositionAssignments, index$9_getPositionsPlayedOff as getPositionsPlayedOff, index$9_getPredictiveAccuracy as getPredictiveAccuracy, index$9_getProfileRounds as getProfileRounds, index$9_getPublishState as getPublishState, index$9_getRoundMatchUps as getRoundMatchUps, index$9_getRounds as getRounds, index$9_getScaleValues as getScaleValues, index$9_getScaledEntries as getScaledEntries, index$9_getScheduledRoundsDetails as getScheduledRoundsDetails, index$9_getSchedulingProfile as getSchedulingProfile, index$9_getSchedulingProfileIssues as getSchedulingProfileIssues, index$9_getSeedingThresholds as getSeedingThresholds, index$9_getSeedsCount as getSeedsCount, index$9_getStructureSeedAssignments as getStructureSeedAssignments, index$9_getTeamLineUp as getTeamLineUp, index$9_getTieFormat as getTieFormat, index$9_getTimeItem as getTimeItem, index$9_getTournamentIds as getTournamentIds, index$9_getTournamentInfo as getTournamentInfo, index$9_getTournamentPenalties as getTournamentPenalties, index$9_getTournamentPersons as getTournamentPersons, index$9_getTournamentStructures as getTournamentStructures, index$9_getTournamentTimeItem as getTournamentTimeItem, index$9_getValidGroupSizes as getValidGroupSizes, index$9_getVenueData as getVenueData, index$9_getVenuesAndCourts as getVenuesAndCourts, index$9_isAdHoc as isAdHoc, index$9_isCompletedStructure as isCompletedStructure, index$9_isValidForQualifying as isValidForQualifying, index$9_isValidMatchUpFormat as isValidMatchUpFormat, index$9_matchUpActions as matchUpActions, index$9_participantScaleItem as participantScaleItem, index$9_participantScheduledMatchUps as participantScheduledMatchUps, index$9_positionActions as positionActions, index$9_publicFindVenue as publicFindVenue, index$9_tallyParticipantResults as tallyParticipantResults, index$9_tieFormatGenderValidityCheck as tieFormatGenderValidityCheck, index$9_tournamentMatchUps as tournamentMatchUps, index$9_validMatchUp as validMatchUp, index$9_validMatchUps as validMatchUps, index$9_validateCollectionDefinition as validateCollectionDefinition, index$9_validateLineUp as validateLineUp };
7754
7763
  }
7755
7764
 
7756
7765
  type StatCounters = {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function factoryVersion() {
6
- return '2.0.58';
6
+ return '2.0.60';
7
7
  }
8
8
 
9
9
  function isFunction(obj) {
@@ -46,7 +46,7 @@ const hasAttributeValues = (a) => (o) => Object.keys(a).every((key) => o[key] ==
46
46
  function undefinedToNull(obj, shallow) {
47
47
  if (obj === undefined)
48
48
  return null;
49
- if (typeof obj !== 'object' || obj === null)
49
+ if (!isObject(obj) || obj === null)
50
50
  return obj;
51
51
  const definedKeys = Object.keys(obj);
52
52
  const notNull = (value) => (value === undefined ? null : value);
@@ -62,7 +62,7 @@ function countKeys(o) {
62
62
  if (Array.isArray(o)) {
63
63
  return o.length + o.map(countKeys).reduce((a, b) => a + b, 0);
64
64
  }
65
- else if (typeof o === 'object' && o !== null) {
65
+ else if (isObject(o) && o !== null) {
66
66
  return (Object.keys(o).length +
67
67
  Object.keys(o)
68
68
  .map((k) => countKeys(o[k]))
@@ -8342,7 +8342,9 @@ function includesMatchUpEventType(types, matchUpEventType) {
8342
8342
  }
8343
8343
 
8344
8344
  function filterMatchUps(params) {
8345
- const { matchUps, isCollectionMatchUp, excludeMatchUpStatuses, matchUpStatuses, hasWinningSide, matchUpFormats, roundPositions, matchUpFormat, collectionIds, isMatchUpTie, roundNumbers, matchUpIds, roundNames, stageSequences, scheduledDates, scheduledDate, participantIds, processContext, tournamentIds, matchUpTypes, structureIds, readyToScore, courtIds, eventIds, venueIds, drawIds, stages, filterMatchUpIds = true, filterMatchUpTypes = true, } = params;
8345
+ if (!Array.isArray(params.matchUps))
8346
+ return [];
8347
+ const { matchUps, excludeMatchUpStatuses, hasParticipantsCount, isCollectionMatchUp, matchUpStatuses, hasWinningSide, matchUpFormats, roundPositions, matchUpFormat, collectionIds, isMatchUpTie, roundNumbers, matchUpIds, roundNames, filterMatchUpTypes = true, filterMatchUpIds = true, stageSequences, scheduledDates, scheduledDate, participantIds, processContext, tournamentIds, matchUpTypes, structureIds, readyToScore, courtIds, eventIds, venueIds, drawIds, stages, } = params;
8346
8348
  const targetParticipantIds = Array.isArray(participantIds) ? participantIds.filter(Boolean) : [];
8347
8349
  const targetMatchUpStatuses = Array.isArray(matchUpStatuses) ? matchUpStatuses.filter(Boolean) : [];
8348
8350
  const excludeTargetMatchUpStatuses = Array.isArray(excludeMatchUpStatuses)
@@ -8463,8 +8465,11 @@ function filterMatchUps(params) {
8463
8465
  if (targetStructureIds.length && !targetStructureIds.includes(matchUp.structureId)) {
8464
8466
  return false;
8465
8467
  }
8468
+ const matchUpParticipantIds = matchUp.sides?.map(({ participantId }) => participantId).filter(Boolean) ?? [];
8469
+ if (hasParticipantsCount && matchUpParticipantIds.length < hasParticipantsCount) {
8470
+ return false;
8471
+ }
8466
8472
  if (targetParticipantIds.length) {
8467
- const matchUpParticipantIds = matchUp.sides?.map(({ participantId }) => participantId).filter(Boolean) ?? [];
8468
8473
  const containsTargetedParticipantId = targetParticipantIds.some((participantId) => matchUpParticipantIds.includes(participantId));
8469
8474
  if (!containsTargetedParticipantId)
8470
8475
  return false;
@@ -13907,7 +13912,8 @@ function deriveGroups({ appliedPolicies, structureOptions, drawSize }) {
13907
13912
  const groupCount = Math.ceil(drawSize / groupSize);
13908
13913
  return { groupSize, groupCount };
13909
13914
  }
13910
- function getValidGroupSizes({ drawSize, groupSizeLimit = 10, }) {
13915
+ function getValidGroupSizes(params) {
13916
+ const { groupSizeLimit = 10, drawSize = 0 } = params ?? {};
13911
13917
  const validGroupSizes = generateRange(3, groupSizeLimit + 1).filter((groupSize) => {
13912
13918
  const groupsCount = Math.ceil(drawSize / groupSize);
13913
13919
  const byesCount = groupsCount * groupSize - drawSize;
@@ -20607,12 +20613,12 @@ const headToHeadTallyDirectives = [
20607
20613
  const GEMScoreValueMap = {
20608
20614
  matchUpsPct: 20,
20609
20615
  tieMatchUpsPct: 16,
20610
- setsPct: 12,
20611
- gamesPct: 8,
20612
20616
  pointsPct: 4,
20617
+ gamesPct: 8,
20618
+ setsPct: 12,
20613
20619
  };
20614
20620
  function getGroupOrder(params) {
20615
- const { requireCompletion = true, participantResults, subOrderMap, tallyPolicy } = params;
20621
+ const { requireCompletion = true, participantResults, subOrderMap, tallyPolicy, } = params;
20616
20622
  const report = [];
20617
20623
  if (requireCompletion && !isComplete(params)) {
20618
20624
  return {};
@@ -20637,16 +20643,20 @@ function getGroupOrder(params) {
20637
20643
  attribute,
20638
20644
  });
20639
20645
  report.push({ attribute, groups: orderedTallyGroups });
20640
- const groupOrder = Object.keys(orderedTallyGroups)
20646
+ const sortedTallyGroups = Object.keys(orderedTallyGroups)
20641
20647
  .map((key) => parseFloat(key))
20642
20648
  .sort((a, b) => b - a)
20643
- .map((key) => orderedTallyGroups[key])
20644
- .map((participantIds) => {
20649
+ .map((key) => orderedTallyGroups[key]);
20650
+ const sortedOrder = sortedTallyGroups.map((participantIds) => {
20645
20651
  const result = groupSubSort({ participantIds, ...params });
20646
20652
  report.push(...(result.report ?? []));
20647
20653
  return result.order;
20648
- })
20649
- .flat(Infinity);
20654
+ });
20655
+ const groupOrder = sortedOrder
20656
+ .map((order, oi) => order.map((o) => (o.resolved ? o : { ...o, subGroup: [oi].concat(...(o.subGroup ?? [])) })))
20657
+ .flat();
20658
+ let lastSubGroup;
20659
+ let subGroupCount = 0;
20650
20660
  let groupPosition = 1;
20651
20661
  let priorPositionResolution;
20652
20662
  groupOrder.forEach((finishingPosition, index) => {
@@ -20656,13 +20666,20 @@ function getGroupOrder(params) {
20656
20666
  groupPosition += 1;
20657
20667
  }
20658
20668
  priorPositionResolution = finishingPosition.resolved;
20669
+ const subGroup = parseInt(finishingPosition.subGroup?.join('') || 0);
20659
20670
  if (finishingPosition.resolved) {
20660
20671
  finishingPosition.position = index + 1;
20661
20672
  groupPosition = finishingPosition.position;
20662
20673
  }
20663
20674
  else {
20675
+ if (lastSubGroup && subGroup > lastSubGroup) {
20676
+ groupPosition += subGroupCount;
20677
+ subGroupCount = 0;
20678
+ }
20664
20679
  finishingPosition.position = groupPosition;
20680
+ subGroupCount += 1;
20665
20681
  }
20682
+ lastSubGroup = subGroup;
20666
20683
  });
20667
20684
  const positions = groupOrder.map(({ position }) => position);
20668
20685
  const positionsCount = instanceCount(positions);
@@ -20711,11 +20728,11 @@ function processAttribute({ disableHeadToHead, participantIds, matchUpFormat, ta
20711
20728
  const report = [{ attribute, reversed, groups, idsFilter }];
20712
20729
  let order;
20713
20730
  if (Object.keys(groups).length > 1 && participantIds.length) {
20714
- order = Object.keys(groups)
20731
+ const sortedTallyGroups = Object.keys(groups)
20715
20732
  .map((key) => parseFloat(key))
20716
20733
  .sort((a, b) => (reversed ? a - b : b - a))
20717
- .map((key) => groups[key])
20718
- .map((participantIds) => {
20734
+ .map((key) => groups[key]);
20735
+ const sortedOrder = sortedTallyGroups.map((participantIds) => {
20719
20736
  const result = groupSubSort({
20720
20737
  participantResults,
20721
20738
  disableHeadToHead,
@@ -20726,8 +20743,10 @@ function processAttribute({ disableHeadToHead, participantIds, matchUpFormat, ta
20726
20743
  });
20727
20744
  report.push(...(result.report ?? []));
20728
20745
  return result.order;
20729
- })
20730
- .flat(Infinity);
20746
+ });
20747
+ order = sortedOrder
20748
+ .map((order, oi) => order.map((o) => (o.resolved ? o : { ...o, subGroup: [oi].concat(...(o.subGroup ?? [])) })))
20749
+ .flat();
20731
20750
  }
20732
20751
  return { order, report };
20733
20752
  }
@@ -20743,11 +20762,11 @@ function groupSubSort({ participantResults, disableHeadToHead, participantIds, m
20743
20762
  }
20744
20763
  if (participantIds?.length === 2 &&
20745
20764
  (!tallyPolicy?.headToHead || (!tallyPolicy.headToHead.disabled && !disableHeadToHead))) {
20746
- const result = headToHeadWinner({ participantIds, participantResults });
20765
+ const result = getHeadToHeadWinner({ participantIds, participantResults });
20747
20766
  if (result) {
20748
20767
  const headToHeadWinner = result[0].participantId;
20749
20768
  report.push({ attribute: 'head2Head', participantIds, headToHeadWinner });
20750
- return { order: [result], headToHeadWinner, report };
20769
+ return { order: result, headToHeadWinner, report };
20751
20770
  }
20752
20771
  }
20753
20772
  const directives = tallyPolicy?.tallyDirectives || headToHeadTallyDirectives;
@@ -20780,7 +20799,7 @@ function groupSubSort({ participantResults, disableHeadToHead, participantIds, m
20780
20799
  report,
20781
20800
  };
20782
20801
  }
20783
- function headToHeadWinner({ participantIds, participantResults }) {
20802
+ function getHeadToHeadWinner({ participantIds, participantResults }) {
20784
20803
  if (!participantIds)
20785
20804
  return;
20786
20805
  if (participantResults[participantIds[0]].victories.includes(participantIds[1])) {
@@ -20992,16 +21011,13 @@ function getMatchUp$1({ matchUps, matchUpId }) {
20992
21011
  return { matchUp };
20993
21012
  }
20994
21013
 
20995
- function findDrawMatchUp({ tournamentParticipants, afterRecoveryTimes, contextContent, contextProfile, drawDefinition, matchUpsMap, matchUpId, inContext, context, event, }) {
20996
- if (!drawDefinition)
20997
- return { error: MISSING_DRAW_DEFINITION };
20998
- if (!matchUpId)
20999
- return { error: MISSING_MATCHUP_ID };
21000
- if (typeof matchUpId !== 'string')
21001
- return { error: INVALID_VALUES };
21014
+ function findDrawMatchUp(params) {
21015
+ const paramsCheck = checkRequiredParameters(params, [{ [DRAW_DEFINITION]: true, [MATCHUP_ID]: true }]);
21016
+ if (paramsCheck.error)
21017
+ return paramsCheck;
21018
+ const { tournamentParticipants, afterRecoveryTimes, contextProfile, drawDefinition, matchUpsMap, matchUpId, inContext, context, event, } = params;
21002
21019
  const { structures = [] } = getDrawStructures({ drawDefinition });
21003
- if (contextProfile && !contextContent)
21004
- contextContent = getContextContent({ contextProfile, drawDefinition });
21020
+ const contextContent = params.contextContent || (contextProfile && getContextContent({ contextProfile, drawDefinition }));
21005
21021
  for (const structure of structures) {
21006
21022
  const { matchUps } = getAllStructureMatchUps({
21007
21023
  tournamentParticipants,
@@ -30541,13 +30557,13 @@ function validateScore({ existingMatchUpStatus, matchUpFormat, matchUpStatus, wi
30541
30557
  [side1TiebreakScore, side2TiebreakScore],
30542
30558
  [side1PointScore, side2PointScore],
30543
30559
  ]
30544
- .filter((pair) => pair.some((value) => value !== undefined))
30560
+ .filter((pair) => pair.some((value) => ![undefined, null].includes(value)))
30545
30561
  .every((pair) => pair.every((numericValue) => isConvertableInteger(numericValue)));
30546
30562
  if (!numericValuePairs) {
30547
30563
  return { error: INVALID_VALUES, info: 'non-numeric values' };
30548
30564
  }
30549
30565
  const numericValues = [setNumber, winningSide]
30550
- .filter((value) => value !== undefined)
30566
+ .filter((value) => ![undefined, null].includes(value))
30551
30567
  .every((numericValue) => isConvertableInteger(numericValue));
30552
30568
  if (!numericValues) {
30553
30569
  return { error: INVALID_VALUES, info: 'non-numeric values' };
@@ -36915,6 +36931,7 @@ var query$2 = {
36915
36931
  competitionScheduleMatchUps: competitionScheduleMatchUps,
36916
36932
  drawMatchUps: drawMatchUps,
36917
36933
  eventMatchUps: eventMatchUps,
36934
+ filterMatchUps: filterMatchUps,
36918
36935
  getAllDrawMatchUps: getAllDrawMatchUps,
36919
36936
  getAllStructureMatchUps: getAllStructureMatchUps,
36920
36937
  getCheckedInParticipantIds: getCheckedInParticipantIds,
@@ -37240,6 +37257,7 @@ var index$f = {
37240
37257
  credits: credits,
37241
37258
  drawMatchUps: drawMatchUps,
37242
37259
  eventMatchUps: eventMatchUps,
37260
+ filterMatchUps: filterMatchUps,
37243
37261
  filterParticipants: filterParticipants,
37244
37262
  findDrawDefinition: publicFindDrawDefinition,
37245
37263
  findExtension: findExtension,
@@ -45094,6 +45112,7 @@ var index$9 = {
45094
45112
  drawMatchUps: drawMatchUps,
45095
45113
  enableTieAutoCalc: enableTieAutoCalc,
45096
45114
  eventMatchUps: eventMatchUps,
45115
+ filterMatchUps: filterMatchUps,
45097
45116
  findMatchUp: publicFindMatchUp,
45098
45117
  getAllDrawMatchUps: getAllDrawMatchUps,
45099
45118
  getAllStructureMatchUps: getAllStructureMatchUps,
@@ -46673,7 +46692,7 @@ function v2Scheduler({ schedulingProfileModifications, checkPotentialRequestConf
46673
46692
  }
46674
46693
 
46675
46694
  function clearScheduledMatchUps(params) {
46676
- const { scheduleAttributes = ['scheduledDate', 'scheduledTime'], ignoreMatchUpStatuses = completedMatchUpStatuses, scheduledDates, venueIds, } = params;
46695
+ const { scheduleAttributes = ['scheduledDate', 'scheduledTime', 'courtOrder'], ignoreMatchUpStatuses = completedMatchUpStatuses, scheduledDates, venueIds, } = params;
46677
46696
  const tournamentRecords = resolveTournamentRecords(params);
46678
46697
  const tournamentIds = isObject(tournamentRecords)
46679
46698
  ? Object.values(tournamentRecords)
@@ -46698,7 +46717,7 @@ function clearScheduledMatchUps(params) {
46698
46717
  }
46699
46718
  return { ...SUCCESS, clearedScheduleCount };
46700
46719
  }
46701
- function clearSchedules({ scheduleAttributes = ['scheduledDate', 'scheduledTime'], ignoreMatchUpStatuses = completedMatchUpStatuses, tournamentRecord, scheduledDates, venueIds = [], }) {
46720
+ function clearSchedules({ scheduleAttributes = ['scheduledDate', 'scheduledTime', 'courtOrder'], ignoreMatchUpStatuses = completedMatchUpStatuses, tournamentRecord, scheduledDates, venueIds = [], }) {
46702
46721
  if (typeof tournamentRecord !== 'object')
46703
46722
  return { error: MISSING_TOURNAMENT_RECORD };
46704
46723
  if (!Array.isArray(ignoreMatchUpStatuses) || !Array.isArray(venueIds)) {
@@ -46729,7 +46748,7 @@ function clearSchedules({ scheduleAttributes = ['scheduledDate', 'scheduledTime'
46729
46748
  let modified = false;
46730
46749
  matchUp.timeItems = (matchUp.timeItems ?? []).filter((timeItem) => {
46731
46750
  const preserve = timeItem?.itemType &&
46732
- ![ALLOCATE_COURTS, ASSIGN_COURT, ASSIGN_VENUE, SCHEDULED_DATE, SCHEDULED_TIME].includes(timeItem?.itemType);
46751
+ ![ALLOCATE_COURTS, ASSIGN_COURT, ASSIGN_VENUE, COURT_ORDER, SCHEDULED_DATE, SCHEDULED_TIME].includes(timeItem?.itemType);
46733
46752
  if (!preserve)
46734
46753
  modified = true;
46735
46754
  return preserve;