tods-competition-factory 2.0.5 → 2.0.7

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.
@@ -2113,73 +2113,6 @@ type MatchUpsMap = {
2113
2113
  drawMatchUps: MatchUp[];
2114
2114
  };
2115
2115
 
2116
- type GenerateDrawMaticRoundArgs = {
2117
- tournamentParticipants?: HydratedParticipant[];
2118
- adHocRatings?: {
2119
- [key: string]: number;
2120
- };
2121
- ignoreLastRoundNumber?: boolean;
2122
- restrictEntryStatus?: boolean;
2123
- drawDefinition: DrawDefinition;
2124
- generateMatchUps?: boolean;
2125
- eventType?: EventTypeUnion;
2126
- salted?: number | boolean;
2127
- participantIds?: string[];
2128
- encounterValue?: number;
2129
- sameTeamValue?: number;
2130
- maxIterations?: number;
2131
- matchUpIds?: string[];
2132
- structure?: Structure;
2133
- roundNumber?: number;
2134
- structureId?: string;
2135
- scaleName?: string;
2136
- idPrefix?: string;
2137
- isMock?: boolean;
2138
- drawId?: string;
2139
- event: Event$1;
2140
- };
2141
- type DrawMaticRoundResult = {
2142
- participantIdPairings?: string[][];
2143
- candidatesCount?: number;
2144
- roundNumber?: number;
2145
- matchUps?: MatchUp[];
2146
- iterations?: number;
2147
- success?: boolean;
2148
- maxDelta?: number;
2149
- maxDiff?: number;
2150
- };
2151
- declare function generateDrawMaticRound({ encounterValue, sameTeamValue, maxIterations, generateMatchUps, tournamentParticipants, ignoreLastRoundNumber, participantIds, drawDefinition, adHocRatings, salted, roundNumber, structureId, matchUpIds, eventType, structure, scaleName, idPrefix, isMock, event, }: GenerateDrawMaticRoundArgs): ResultType & DrawMaticRoundResult;
2152
-
2153
- type DrawMaticArgs = {
2154
- adHocRatings?: {
2155
- [key: string]: number;
2156
- };
2157
- restrictEntryStatus?: boolean;
2158
- tournamentRecord: Tournament;
2159
- drawDefinition: DrawDefinition;
2160
- enableDoubleRobin?: boolean;
2161
- generateMatchUps?: boolean;
2162
- eventType?: EventTypeUnion;
2163
- salted?: number | boolean;
2164
- participantIds?: string[];
2165
- encounterValue?: number;
2166
- sameTeamValue?: number;
2167
- maxIterations?: number;
2168
- matchUpIds?: string[];
2169
- structure?: Structure;
2170
- roundsCount?: number;
2171
- structureId?: string;
2172
- idPrefix?: string;
2173
- isMock?: boolean;
2174
- event: Event$1;
2175
- scaleAccessor?: string;
2176
- scaleName?: string;
2177
- };
2178
- declare function drawMatic(params: DrawMaticArgs): ResultType & {
2179
- matchUps?: MatchUp[];
2180
- roundResults?: DrawMaticRoundResult[];
2181
- };
2182
-
2183
2116
  type FactoryEngine = {
2184
2117
  [key: string]: any;
2185
2118
  };
@@ -2570,6 +2503,7 @@ type GenerateDrawDefinitionArgs = {
2570
2503
  seedingProfile?: SeedingProfile;
2571
2504
  hydrateCollections?: boolean;
2572
2505
  tournamentRecord: Tournament;
2506
+ matchUpType?: EventTypeUnion;
2573
2507
  drawTypeCoercion?: boolean;
2574
2508
  ignoreStageSpace?: boolean;
2575
2509
  qualifyingProfiles?: any[];
@@ -2579,7 +2513,6 @@ type GenerateDrawDefinitionArgs = {
2579
2513
  enforceGender?: boolean;
2580
2514
  processCodes?: string[];
2581
2515
  matchUpFormat?: string;
2582
- matchUpType?: EventTypeUnion;
2583
2516
  structureName?: string;
2584
2517
  tieFormatName?: string;
2585
2518
  tieFormat?: TieFormat;
@@ -2595,6 +2528,31 @@ type GenerateDrawDefinitionArgs = {
2595
2528
  drawId?: string;
2596
2529
  event: Event$1;
2597
2530
  };
2531
+ type DrawMaticArgs = {
2532
+ adHocRatings?: {
2533
+ [key: string]: number;
2534
+ };
2535
+ restrictEntryStatus?: boolean;
2536
+ tournamentRecord: Tournament;
2537
+ drawDefinition: DrawDefinition;
2538
+ enableDoubleRobin?: boolean;
2539
+ generateMatchUps?: boolean;
2540
+ eventType?: EventTypeUnion;
2541
+ salted?: number | boolean;
2542
+ participantIds?: string[];
2543
+ encounterValue?: number;
2544
+ sameTeamValue?: number;
2545
+ maxIterations?: number;
2546
+ matchUpIds?: string[];
2547
+ structure?: Structure;
2548
+ roundsCount?: number;
2549
+ structureId?: string;
2550
+ idPrefix?: string;
2551
+ isMock?: boolean;
2552
+ event: Event$1;
2553
+ scaleAccessor?: string;
2554
+ scaleName?: string;
2555
+ };
2598
2556
 
2599
2557
  /**
2600
2558
  * Links all tournaments which are currently loaded into competitionEngine state
@@ -3739,11 +3697,50 @@ type GenerateDrawStructuresAndLinksArgs = {
3739
3697
  };
3740
3698
  declare function generateDrawStructuresAndLinks(params: GenerateDrawStructuresAndLinksArgs): any;
3741
3699
 
3700
+ type GenerateDrawMaticRoundArgs = {
3701
+ adHocRatings?: {
3702
+ [key: string]: number;
3703
+ };
3704
+ ignoreLastRoundNumber?: boolean;
3705
+ restrictEntryStatus?: boolean;
3706
+ iterationMatchUps?: MatchUp[];
3707
+ drawDefinition: DrawDefinition;
3708
+ tournamentRecord: Tournament;
3709
+ generateMatchUps?: boolean;
3710
+ eventType?: EventTypeUnion;
3711
+ salted?: number | boolean;
3712
+ participantIds?: string[];
3713
+ encounterValue?: number;
3714
+ sameTeamValue?: number;
3715
+ maxIterations?: number;
3716
+ matchUpIds?: string[];
3717
+ structure?: Structure;
3718
+ roundNumber?: number;
3719
+ structureId?: string;
3720
+ scaleName?: string;
3721
+ idPrefix?: string;
3722
+ isMock?: boolean;
3723
+ drawId?: string;
3724
+ event: Event$1;
3725
+ };
3726
+ type DrawMaticRoundResult = {
3727
+ participantIdPairings?: string[][];
3728
+ candidatesCount?: number;
3729
+ roundNumber?: number;
3730
+ matchUps?: MatchUp[];
3731
+ iterations?: number;
3732
+ success?: boolean;
3733
+ maxDelta?: number;
3734
+ maxDiff?: number;
3735
+ };
3736
+ declare function generateDrawMaticRound({ encounterValue, sameTeamValue, maxIterations, generateMatchUps, ignoreLastRoundNumber, iterationMatchUps, // necessary when called iteratively and matchUps are not yet added to structure
3737
+ tournamentRecord, participantIds, drawDefinition, adHocRatings, salted, roundNumber, structureId, matchUpIds, eventType, structure, scaleName, idPrefix, isMock, event, }: GenerateDrawMaticRoundArgs): ResultType & DrawMaticRoundResult;
3738
+
3742
3739
  declare function generateDrawDefinition(params: GenerateDrawDefinitionArgs): ResultType & {
3743
3740
  existingDrawDefinition?: boolean;
3741
+ drawDefinition?: DrawDefinition;
3744
3742
  qualifyingConflicts?: any[];
3745
3743
  positioningReports?: any[];
3746
- drawDefinition?: DrawDefinition;
3747
3744
  structureId?: string;
3748
3745
  success?: boolean;
3749
3746
  error?: ErrorType;
@@ -3774,6 +3771,27 @@ declare function generateAdHocMatchUps(params: GenerateAdHocMatchUpsArgs): {
3774
3771
  info?: any;
3775
3772
  };
3776
3773
 
3774
+ type GenerateAdHocRoundsArgs = {
3775
+ drawDefinition: DrawDefinition;
3776
+ matchUpsCount?: number;
3777
+ matchUpIds?: string[];
3778
+ roundNumber?: number;
3779
+ structureId?: string;
3780
+ roundsCount: number;
3781
+ newRound?: boolean;
3782
+ idPrefix?: string;
3783
+ isMock?: boolean;
3784
+ event: Event$1;
3785
+ };
3786
+ declare function generateAdHocRounds({ roundsCount, drawDefinition, matchUpsCount, structureId, idPrefix, isMock, event, }: GenerateAdHocRoundsArgs): ResultType & {
3787
+ matchUps?: MatchUp[];
3788
+ };
3789
+
3790
+ declare function drawMatic(params: DrawMaticArgs): ResultType & {
3791
+ matchUps?: MatchUp[];
3792
+ roundResults?: DrawMaticRoundResult[];
3793
+ };
3794
+
3777
3795
  declare const index$j_addAdHocMatchUps: typeof addAdHocMatchUps;
3778
3796
  declare const index$j_addDrawDefinitionTimeItem: typeof addDrawDefinitionTimeItem;
3779
3797
  declare const index$j_addPlayoffStructures: typeof addPlayoffStructures;
@@ -3795,6 +3813,7 @@ declare const index$j_checkValidEntries: typeof checkValidEntries;
3795
3813
  declare const index$j_deleteAdHocMatchUps: typeof deleteAdHocMatchUps;
3796
3814
  declare const index$j_drawMatic: typeof drawMatic;
3797
3815
  declare const index$j_generateAdHocMatchUps: typeof generateAdHocMatchUps;
3816
+ declare const index$j_generateAdHocRounds: typeof generateAdHocRounds;
3798
3817
  declare const index$j_generateAndPopulatePlayoffStructures: typeof generateAndPopulatePlayoffStructures;
3799
3818
  declare const index$j_generateDrawDefinition: typeof generateDrawDefinition;
3800
3819
  declare const index$j_generateDrawMaticRound: typeof generateDrawMaticRound;
@@ -3841,7 +3860,7 @@ declare const index$j_swapDrawPositionAssignments: typeof swapDrawPositionAssign
3841
3860
  declare const index$j_updateTeamLineUp: typeof updateTeamLineUp;
3842
3861
  declare const index$j_withdrawParticipantAtDrawPosition: typeof withdrawParticipantAtDrawPosition;
3843
3862
  declare namespace index$j {
3844
- export { index$j_addAdHocMatchUps as addAdHocMatchUps, index$j_addDrawDefinitionTimeItem as addDrawDefinitionTimeItem, index$j_addPlayoffStructures as addPlayoffStructures, index$j_addQualifyingStructure as addQualifyingStructure, index$j_addVoluntaryConsolationStage as addVoluntaryConsolationStage, index$j_addVoluntaryConsolationStructure as addVoluntaryConsolationStructure, index$j_allPlayoffPositionsFilled as allPlayoffPositionsFilled, index$j_alternateDrawPositionAssignment as alternateDrawPositionAssignment, index$j_assignDrawPosition as assignDrawPosition, index$j_assignDrawPositionBye as assignDrawPositionBye, index$j_attachConsolationStructures as attachConsolationStructures, index$j_attachPlayoffStructures as attachPlayoffStructures, index$j_attachQualifyingStructure as attachQualifyingStructure, index$j_attachStructures as attachStructures, index$j_autoSeeding as autoSeeding, index$j_automatedPlayoffPositioning as automatedPlayoffPositioning, index$j_automatedPositioning as automatedPositioning, index$j_checkValidEntries as checkValidEntries, index$j_deleteAdHocMatchUps as deleteAdHocMatchUps, index$j_drawMatic as drawMatic, publicFindDrawDefinition as findDrawDefinition, index$j_generateAdHocMatchUps as generateAdHocMatchUps, index$j_generateAndPopulatePlayoffStructures as generateAndPopulatePlayoffStructures, index$j_generateDrawDefinition as generateDrawDefinition, index$j_generateDrawMaticRound as generateDrawMaticRound, index$j_generateDrawStructuresAndLinks as generateDrawStructuresAndLinks, index$j_generateDrawTypeAndModifyDrawDefinition as generateDrawTypeAndModifyDrawDefinition, index$j_generateQualifyingStructure as generateQualifyingStructure, index$j_generateVoluntaryConsolation as generateVoluntaryConsolation, index$j_getAssignedParticipantIds as getAssignedParticipantIds, index$j_getAvailablePlayoffProfiles as getAvailablePlayoffProfiles, index$j_getDrawDefinitionTimeItem as getDrawDefinitionTimeItem, index$j_getDrawParticipantRepresentativeIds as getDrawParticipantRepresentativeIds, index$j_getDrawTypeCoercion as getDrawTypeCoercion, index$j_getEligibleVoluntaryConsolationParticipants as getEligibleVoluntaryConsolationParticipants, index$j_getParticipantIdFinishingPositions as getParticipantIdFinishingPositions, index$j_getPositionAssignments as getPositionAssignments, index$j_getPositionsPlayedOff as getPositionsPlayedOff, index$j_getSeedingThresholds as getSeedingThresholds, index$j_getSeedsCount as getSeedsCount, index$j_getStructureSeedAssignments as getStructureSeedAssignments, index$j_getTeamLineUp as getTeamLineUp, index$j_getValidGroupSizes as getValidGroupSizes, index$j_isAdHoc as isAdHoc, index$j_isCompletedStructure as isCompletedStructure, index$j_isValidForQualifying as isValidForQualifying, index$j_luckyLoserDrawPositionAssignment as luckyLoserDrawPositionAssignment, index$j_modifyDrawDefinition as modifyDrawDefinition, index$j_modifyDrawName as modifyDrawName, index$j_modifySeedAssignment as modifySeedAssignment, mutate$b as mutate, index$j_positionActions as positionActions, index$j_pruneDrawDefinition as pruneDrawDefinition, index$j_qualifierDrawPositionAssignment as qualifierDrawPositionAssignment, query$a as query, index$j_removeDrawPositionAssignment as removeDrawPositionAssignment, index$j_removeRoundMatchUps as removeRoundMatchUps, index$j_removeSeededParticipant as removeSeededParticipant, index$j_removeStructure as removeStructure, index$j_renameStructures as renameStructures, index$j_resetDrawDefinition as resetDrawDefinition, index$j_resetVoluntaryConsolationStructure as resetVoluntaryConsolationStructure, index$j_setDrawParticipantRepresentativeIds as setDrawParticipantRepresentativeIds, index$j_setPositionAssignments as setPositionAssignments, index$j_setStructureOrder as setStructureOrder, index$j_setSubOrder as setSubOrder, index$j_swapDrawPositionAssignments as swapDrawPositionAssignments, index$j_updateTeamLineUp as updateTeamLineUp, index$j_withdrawParticipantAtDrawPosition as withdrawParticipantAtDrawPosition };
3863
+ export { index$j_addAdHocMatchUps as addAdHocMatchUps, index$j_addDrawDefinitionTimeItem as addDrawDefinitionTimeItem, index$j_addPlayoffStructures as addPlayoffStructures, index$j_addQualifyingStructure as addQualifyingStructure, index$j_addVoluntaryConsolationStage as addVoluntaryConsolationStage, index$j_addVoluntaryConsolationStructure as addVoluntaryConsolationStructure, index$j_allPlayoffPositionsFilled as allPlayoffPositionsFilled, index$j_alternateDrawPositionAssignment as alternateDrawPositionAssignment, index$j_assignDrawPosition as assignDrawPosition, index$j_assignDrawPositionBye as assignDrawPositionBye, index$j_attachConsolationStructures as attachConsolationStructures, index$j_attachPlayoffStructures as attachPlayoffStructures, index$j_attachQualifyingStructure as attachQualifyingStructure, index$j_attachStructures as attachStructures, index$j_autoSeeding as autoSeeding, index$j_automatedPlayoffPositioning as automatedPlayoffPositioning, index$j_automatedPositioning as automatedPositioning, index$j_checkValidEntries as checkValidEntries, index$j_deleteAdHocMatchUps as deleteAdHocMatchUps, index$j_drawMatic as drawMatic, publicFindDrawDefinition as findDrawDefinition, index$j_generateAdHocMatchUps as generateAdHocMatchUps, index$j_generateAdHocRounds as generateAdHocRounds, index$j_generateAndPopulatePlayoffStructures as generateAndPopulatePlayoffStructures, index$j_generateDrawDefinition as generateDrawDefinition, index$j_generateDrawMaticRound as generateDrawMaticRound, index$j_generateDrawStructuresAndLinks as generateDrawStructuresAndLinks, index$j_generateDrawTypeAndModifyDrawDefinition as generateDrawTypeAndModifyDrawDefinition, index$j_generateQualifyingStructure as generateQualifyingStructure, index$j_generateVoluntaryConsolation as generateVoluntaryConsolation, index$j_getAssignedParticipantIds as getAssignedParticipantIds, index$j_getAvailablePlayoffProfiles as getAvailablePlayoffProfiles, index$j_getDrawDefinitionTimeItem as getDrawDefinitionTimeItem, index$j_getDrawParticipantRepresentativeIds as getDrawParticipantRepresentativeIds, index$j_getDrawTypeCoercion as getDrawTypeCoercion, index$j_getEligibleVoluntaryConsolationParticipants as getEligibleVoluntaryConsolationParticipants, index$j_getParticipantIdFinishingPositions as getParticipantIdFinishingPositions, index$j_getPositionAssignments as getPositionAssignments, index$j_getPositionsPlayedOff as getPositionsPlayedOff, index$j_getSeedingThresholds as getSeedingThresholds, index$j_getSeedsCount as getSeedsCount, index$j_getStructureSeedAssignments as getStructureSeedAssignments, index$j_getTeamLineUp as getTeamLineUp, index$j_getValidGroupSizes as getValidGroupSizes, index$j_isAdHoc as isAdHoc, index$j_isCompletedStructure as isCompletedStructure, index$j_isValidForQualifying as isValidForQualifying, index$j_luckyLoserDrawPositionAssignment as luckyLoserDrawPositionAssignment, index$j_modifyDrawDefinition as modifyDrawDefinition, index$j_modifyDrawName as modifyDrawName, index$j_modifySeedAssignment as modifySeedAssignment, mutate$b as mutate, index$j_positionActions as positionActions, index$j_pruneDrawDefinition as pruneDrawDefinition, index$j_qualifierDrawPositionAssignment as qualifierDrawPositionAssignment, query$a as query, index$j_removeDrawPositionAssignment as removeDrawPositionAssignment, index$j_removeRoundMatchUps as removeRoundMatchUps, index$j_removeSeededParticipant as removeSeededParticipant, index$j_removeStructure as removeStructure, index$j_renameStructures as renameStructures, index$j_resetDrawDefinition as resetDrawDefinition, index$j_resetVoluntaryConsolationStructure as resetVoluntaryConsolationStructure, index$j_setDrawParticipantRepresentativeIds as setDrawParticipantRepresentativeIds, index$j_setPositionAssignments as setPositionAssignments, index$j_setStructureOrder as setStructureOrder, index$j_setSubOrder as setSubOrder, index$j_swapDrawPositionAssignments as swapDrawPositionAssignments, index$j_updateTeamLineUp as updateTeamLineUp, index$j_withdrawParticipantAtDrawPosition as withdrawParticipantAtDrawPosition };
3845
3864
  }
3846
3865
 
3847
3866
  /**
@@ -5053,6 +5072,7 @@ declare namespace garman$1 {
5053
5072
 
5054
5073
  declare const index$g_drawMatic: typeof drawMatic;
5055
5074
  declare const index$g_generateAdHocMatchUps: typeof generateAdHocMatchUps;
5075
+ declare const index$g_generateAdHocRounds: typeof generateAdHocRounds;
5056
5076
  declare const index$g_generateAndPopulatePlayoffStructures: typeof generateAndPopulatePlayoffStructures;
5057
5077
  declare const index$g_generateCourts: typeof generateCourts;
5058
5078
  declare const index$g_generateDrawDefinition: typeof generateDrawDefinition;
@@ -5066,7 +5086,7 @@ declare const index$g_generateSeedingScaleItems: typeof generateSeedingScaleItem
5066
5086
  declare const index$g_generateVoluntaryConsolation: typeof generateVoluntaryConsolation;
5067
5087
  declare const index$g_roundRobinGroups: typeof roundRobinGroups;
5068
5088
  declare namespace index$g {
5069
- export { index$g_drawMatic as drawMatic, garman$1 as garman, index$g_generateAdHocMatchUps as generateAdHocMatchUps, index$g_generateAndPopulatePlayoffStructures as generateAndPopulatePlayoffStructures, index$g_generateCourts as generateCourts, index$g_generateDrawDefinition as generateDrawDefinition, index$g_generateDrawMaticRound as generateDrawMaticRound, index$g_generateDrawStructuresAndLinks as generateDrawStructuresAndLinks, index$g_generateDrawTypeAndModifyDrawDefinition as generateDrawTypeAndModifyDrawDefinition, index$g_generateFlightProfile as generateFlightProfile, index$g_generateLineUps as generateLineUps, index$g_generateQualifyingStructure as generateQualifyingStructure, index$g_generateSeedingScaleItems as generateSeedingScaleItems, index$g_generateVoluntaryConsolation as generateVoluntaryConsolation, index$g_roundRobinGroups as roundRobinGroups };
5089
+ export { index$g_drawMatic as drawMatic, garman$1 as garman, index$g_generateAdHocMatchUps as generateAdHocMatchUps, index$g_generateAdHocRounds as generateAdHocRounds, index$g_generateAndPopulatePlayoffStructures as generateAndPopulatePlayoffStructures, index$g_generateCourts as generateCourts, index$g_generateDrawDefinition as generateDrawDefinition, index$g_generateDrawMaticRound as generateDrawMaticRound, index$g_generateDrawStructuresAndLinks as generateDrawStructuresAndLinks, index$g_generateDrawTypeAndModifyDrawDefinition as generateDrawTypeAndModifyDrawDefinition, index$g_generateFlightProfile as generateFlightProfile, index$g_generateLineUps as generateLineUps, index$g_generateQualifyingStructure as generateQualifyingStructure, index$g_generateSeedingScaleItems as generateSeedingScaleItems, index$g_generateVoluntaryConsolation as generateVoluntaryConsolation, index$g_roundRobinGroups as roundRobinGroups };
5070
5090
  }
5071
5091
 
5072
5092
  declare function isValidMatchUpFormat({ matchUpFormat }: {