tods-competition-factory 2.0.6 → 2.0.8
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.
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.d.ts +58 -3
- package/dist/tods-competition-factory.development.cjs.js +77 -24
- package/dist/tods-competition-factory.development.cjs.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +3 -3
|
@@ -2923,6 +2923,18 @@ type ModifyDrawArgs = {
|
|
|
2923
2923
|
};
|
|
2924
2924
|
declare function modifyDrawDefinition({ tournamentRecord, drawDefinition, drawUpdates, drawId, event, }: ModifyDrawArgs): ResultType;
|
|
2925
2925
|
|
|
2926
|
+
type AddFinishingRoundsArgs = {
|
|
2927
|
+
finishingPositionOffset?: number;
|
|
2928
|
+
finishingPositionLimit?: number;
|
|
2929
|
+
positionsFed?: number;
|
|
2930
|
+
roundsCount?: number;
|
|
2931
|
+
roundLimit?: number;
|
|
2932
|
+
matchUps: MatchUp[];
|
|
2933
|
+
lucky?: boolean;
|
|
2934
|
+
fmlc?: boolean;
|
|
2935
|
+
};
|
|
2936
|
+
declare function addFinishingRounds({ finishingPositionOffset, finishingPositionLimit, positionsFed, roundsCount, roundLimit, matchUps, lucky, fmlc, }: AddFinishingRoundsArgs): MatchUp[];
|
|
2937
|
+
|
|
2926
2938
|
declare function resetDrawDefinition({ tournamentRecord, removeScheduling, drawDefinition, }: {
|
|
2927
2939
|
tournamentRecord: any;
|
|
2928
2940
|
removeScheduling: any;
|
|
@@ -2995,6 +3007,27 @@ declare function removeRoundMatchUps({ removeCompletedMatchUps, tournamentRecord
|
|
|
2995
3007
|
roundRemoved?: boolean;
|
|
2996
3008
|
};
|
|
2997
3009
|
|
|
3010
|
+
type AddGoesToArgs = {
|
|
3011
|
+
inContextDrawMatchUps?: HydratedMatchUp[];
|
|
3012
|
+
drawDefinition: DrawDefinition;
|
|
3013
|
+
matchUpsMap?: MatchUpsMap;
|
|
3014
|
+
};
|
|
3015
|
+
declare function addGoesTo({ inContextDrawMatchUps, drawDefinition, matchUpsMap, }: AddGoesToArgs): {
|
|
3016
|
+
error: {
|
|
3017
|
+
message: string;
|
|
3018
|
+
code: string;
|
|
3019
|
+
};
|
|
3020
|
+
inContextDrawMatchUps?: undefined;
|
|
3021
|
+
goesToMap?: undefined;
|
|
3022
|
+
} | {
|
|
3023
|
+
inContextDrawMatchUps: HydratedMatchUp[] | undefined;
|
|
3024
|
+
goesToMap: {
|
|
3025
|
+
loserMatchUpIds: {};
|
|
3026
|
+
winnerMatchUpIds: {};
|
|
3027
|
+
};
|
|
3028
|
+
error?: undefined;
|
|
3029
|
+
};
|
|
3030
|
+
|
|
2998
3031
|
type UpdateTeamLineUpArgs = {
|
|
2999
3032
|
drawDefinition: DrawDefinition;
|
|
3000
3033
|
participantId: string;
|
|
@@ -3097,6 +3130,8 @@ declare function attachStructures({ itemType, matchUpModifications, tournamentRe
|
|
|
3097
3130
|
|
|
3098
3131
|
declare const mutate$b_addAdHocMatchUps: typeof addAdHocMatchUps;
|
|
3099
3132
|
declare const mutate$b_addDrawDefinitionTimeItem: typeof addDrawDefinitionTimeItem;
|
|
3133
|
+
declare const mutate$b_addFinishingRounds: typeof addFinishingRounds;
|
|
3134
|
+
declare const mutate$b_addGoesTo: typeof addGoesTo;
|
|
3100
3135
|
declare const mutate$b_addPlayoffStructures: typeof addPlayoffStructures;
|
|
3101
3136
|
declare const mutate$b_addQualifyingStructure: typeof addQualifyingStructure;
|
|
3102
3137
|
declare const mutate$b_addVoluntaryConsolationStage: typeof addVoluntaryConsolationStage;
|
|
@@ -3133,7 +3168,7 @@ declare const mutate$b_swapDrawPositionAssignments: typeof swapDrawPositionAssig
|
|
|
3133
3168
|
declare const mutate$b_updateTeamLineUp: typeof updateTeamLineUp;
|
|
3134
3169
|
declare const mutate$b_withdrawParticipantAtDrawPosition: typeof withdrawParticipantAtDrawPosition;
|
|
3135
3170
|
declare namespace mutate$b {
|
|
3136
|
-
export { mutate$b_addAdHocMatchUps as addAdHocMatchUps, mutate$b_addDrawDefinitionTimeItem as addDrawDefinitionTimeItem, mutate$b_addPlayoffStructures as addPlayoffStructures, mutate$b_addQualifyingStructure as addQualifyingStructure, mutate$b_addVoluntaryConsolationStage as addVoluntaryConsolationStage, mutate$b_addVoluntaryConsolationStructure as addVoluntaryConsolationStructure, mutate$b_alternateDrawPositionAssignment as alternateDrawPositionAssignment, mutate$b_assignDrawPosition as assignDrawPosition, mutate$b_assignDrawPositionBye as assignDrawPositionBye, mutate$b_attachConsolationStructures as attachConsolationStructures, mutate$b_attachPlayoffStructures as attachPlayoffStructures, mutate$b_attachQualifyingStructure as attachQualifyingStructure, mutate$b_attachStructures as attachStructures, mutate$b_autoSeeding as autoSeeding, mutate$b_automatedPlayoffPositioning as automatedPlayoffPositioning, mutate$b_automatedPositioning as automatedPositioning, mutate$b_deleteAdHocMatchUps as deleteAdHocMatchUps, mutate$b_luckyLoserDrawPositionAssignment as luckyLoserDrawPositionAssignment, mutate$b_modifyDrawDefinition as modifyDrawDefinition, mutate$b_modifyDrawName as modifyDrawName, mutate$b_modifySeedAssignment as modifySeedAssignment, mutate$b_pruneDrawDefinition as pruneDrawDefinition, mutate$b_qualifierDrawPositionAssignment as qualifierDrawPositionAssignment, mutate$b_removeDrawPositionAssignment as removeDrawPositionAssignment, mutate$b_removeRoundMatchUps as removeRoundMatchUps, mutate$b_removeSeededParticipant as removeSeededParticipant, mutate$b_removeStructure as removeStructure, mutate$b_renameStructures as renameStructures, mutate$b_resetDrawDefinition as resetDrawDefinition, mutate$b_resetVoluntaryConsolationStructure as resetVoluntaryConsolationStructure, mutate$b_setDrawParticipantRepresentativeIds as setDrawParticipantRepresentativeIds, mutate$b_setPositionAssignments as setPositionAssignments, mutate$b_setStructureOrder as setStructureOrder, mutate$b_setSubOrder as setSubOrder, mutate$b_swapDrawPositionAssignments as swapDrawPositionAssignments, mutate$b_updateTeamLineUp as updateTeamLineUp, mutate$b_withdrawParticipantAtDrawPosition as withdrawParticipantAtDrawPosition };
|
|
3171
|
+
export { mutate$b_addAdHocMatchUps as addAdHocMatchUps, mutate$b_addDrawDefinitionTimeItem as addDrawDefinitionTimeItem, mutate$b_addFinishingRounds as addFinishingRounds, mutate$b_addGoesTo as addGoesTo, mutate$b_addPlayoffStructures as addPlayoffStructures, mutate$b_addQualifyingStructure as addQualifyingStructure, mutate$b_addVoluntaryConsolationStage as addVoluntaryConsolationStage, mutate$b_addVoluntaryConsolationStructure as addVoluntaryConsolationStructure, mutate$b_alternateDrawPositionAssignment as alternateDrawPositionAssignment, mutate$b_assignDrawPosition as assignDrawPosition, mutate$b_assignDrawPositionBye as assignDrawPositionBye, mutate$b_attachConsolationStructures as attachConsolationStructures, mutate$b_attachPlayoffStructures as attachPlayoffStructures, mutate$b_attachQualifyingStructure as attachQualifyingStructure, mutate$b_attachStructures as attachStructures, mutate$b_autoSeeding as autoSeeding, mutate$b_automatedPlayoffPositioning as automatedPlayoffPositioning, mutate$b_automatedPositioning as automatedPositioning, mutate$b_deleteAdHocMatchUps as deleteAdHocMatchUps, mutate$b_luckyLoserDrawPositionAssignment as luckyLoserDrawPositionAssignment, mutate$b_modifyDrawDefinition as modifyDrawDefinition, mutate$b_modifyDrawName as modifyDrawName, mutate$b_modifySeedAssignment as modifySeedAssignment, mutate$b_pruneDrawDefinition as pruneDrawDefinition, mutate$b_qualifierDrawPositionAssignment as qualifierDrawPositionAssignment, mutate$b_removeDrawPositionAssignment as removeDrawPositionAssignment, mutate$b_removeRoundMatchUps as removeRoundMatchUps, mutate$b_removeSeededParticipant as removeSeededParticipant, mutate$b_removeStructure as removeStructure, mutate$b_renameStructures as renameStructures, mutate$b_resetDrawDefinition as resetDrawDefinition, mutate$b_resetVoluntaryConsolationStructure as resetVoluntaryConsolationStructure, mutate$b_setDrawParticipantRepresentativeIds as setDrawParticipantRepresentativeIds, mutate$b_setPositionAssignments as setPositionAssignments, mutate$b_setStructureOrder as setStructureOrder, mutate$b_setSubOrder as setSubOrder, mutate$b_swapDrawPositionAssignments as swapDrawPositionAssignments, mutate$b_updateTeamLineUp as updateTeamLineUp, mutate$b_withdrawParticipantAtDrawPosition as withdrawParticipantAtDrawPosition };
|
|
3137
3172
|
}
|
|
3138
3173
|
|
|
3139
3174
|
type GetEligibleVoluntaryConsolationParticipantsArgs = {
|
|
@@ -3771,6 +3806,22 @@ declare function generateAdHocMatchUps(params: GenerateAdHocMatchUpsArgs): {
|
|
|
3771
3806
|
info?: any;
|
|
3772
3807
|
};
|
|
3773
3808
|
|
|
3809
|
+
type GenerateAdHocRoundsArgs = {
|
|
3810
|
+
drawDefinition: DrawDefinition;
|
|
3811
|
+
matchUpsCount?: number;
|
|
3812
|
+
matchUpIds?: string[];
|
|
3813
|
+
roundNumber?: number;
|
|
3814
|
+
structureId?: string;
|
|
3815
|
+
roundsCount: number;
|
|
3816
|
+
newRound?: boolean;
|
|
3817
|
+
idPrefix?: string;
|
|
3818
|
+
isMock?: boolean;
|
|
3819
|
+
event: Event$1;
|
|
3820
|
+
};
|
|
3821
|
+
declare function generateAdHocRounds({ roundsCount, drawDefinition, matchUpsCount, structureId, idPrefix, isMock, event, }: GenerateAdHocRoundsArgs): ResultType & {
|
|
3822
|
+
matchUps?: MatchUp[];
|
|
3823
|
+
};
|
|
3824
|
+
|
|
3774
3825
|
declare function drawMatic(params: DrawMaticArgs): ResultType & {
|
|
3775
3826
|
matchUps?: MatchUp[];
|
|
3776
3827
|
roundResults?: DrawMaticRoundResult[];
|
|
@@ -3778,6 +3829,8 @@ declare function drawMatic(params: DrawMaticArgs): ResultType & {
|
|
|
3778
3829
|
|
|
3779
3830
|
declare const index$j_addAdHocMatchUps: typeof addAdHocMatchUps;
|
|
3780
3831
|
declare const index$j_addDrawDefinitionTimeItem: typeof addDrawDefinitionTimeItem;
|
|
3832
|
+
declare const index$j_addFinishingRounds: typeof addFinishingRounds;
|
|
3833
|
+
declare const index$j_addGoesTo: typeof addGoesTo;
|
|
3781
3834
|
declare const index$j_addPlayoffStructures: typeof addPlayoffStructures;
|
|
3782
3835
|
declare const index$j_addQualifyingStructure: typeof addQualifyingStructure;
|
|
3783
3836
|
declare const index$j_addVoluntaryConsolationStage: typeof addVoluntaryConsolationStage;
|
|
@@ -3797,6 +3850,7 @@ declare const index$j_checkValidEntries: typeof checkValidEntries;
|
|
|
3797
3850
|
declare const index$j_deleteAdHocMatchUps: typeof deleteAdHocMatchUps;
|
|
3798
3851
|
declare const index$j_drawMatic: typeof drawMatic;
|
|
3799
3852
|
declare const index$j_generateAdHocMatchUps: typeof generateAdHocMatchUps;
|
|
3853
|
+
declare const index$j_generateAdHocRounds: typeof generateAdHocRounds;
|
|
3800
3854
|
declare const index$j_generateAndPopulatePlayoffStructures: typeof generateAndPopulatePlayoffStructures;
|
|
3801
3855
|
declare const index$j_generateDrawDefinition: typeof generateDrawDefinition;
|
|
3802
3856
|
declare const index$j_generateDrawMaticRound: typeof generateDrawMaticRound;
|
|
@@ -3843,7 +3897,7 @@ declare const index$j_swapDrawPositionAssignments: typeof swapDrawPositionAssign
|
|
|
3843
3897
|
declare const index$j_updateTeamLineUp: typeof updateTeamLineUp;
|
|
3844
3898
|
declare const index$j_withdrawParticipantAtDrawPosition: typeof withdrawParticipantAtDrawPosition;
|
|
3845
3899
|
declare namespace index$j {
|
|
3846
|
-
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 };
|
|
3900
|
+
export { index$j_addAdHocMatchUps as addAdHocMatchUps, index$j_addDrawDefinitionTimeItem as addDrawDefinitionTimeItem, index$j_addFinishingRounds as addFinishingRounds, index$j_addGoesTo as addGoesTo, 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 };
|
|
3847
3901
|
}
|
|
3848
3902
|
|
|
3849
3903
|
/**
|
|
@@ -5055,6 +5109,7 @@ declare namespace garman$1 {
|
|
|
5055
5109
|
|
|
5056
5110
|
declare const index$g_drawMatic: typeof drawMatic;
|
|
5057
5111
|
declare const index$g_generateAdHocMatchUps: typeof generateAdHocMatchUps;
|
|
5112
|
+
declare const index$g_generateAdHocRounds: typeof generateAdHocRounds;
|
|
5058
5113
|
declare const index$g_generateAndPopulatePlayoffStructures: typeof generateAndPopulatePlayoffStructures;
|
|
5059
5114
|
declare const index$g_generateCourts: typeof generateCourts;
|
|
5060
5115
|
declare const index$g_generateDrawDefinition: typeof generateDrawDefinition;
|
|
@@ -5068,7 +5123,7 @@ declare const index$g_generateSeedingScaleItems: typeof generateSeedingScaleItem
|
|
|
5068
5123
|
declare const index$g_generateVoluntaryConsolation: typeof generateVoluntaryConsolation;
|
|
5069
5124
|
declare const index$g_roundRobinGroups: typeof roundRobinGroups;
|
|
5070
5125
|
declare namespace index$g {
|
|
5071
|
-
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 };
|
|
5126
|
+
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 };
|
|
5072
5127
|
}
|
|
5073
5128
|
|
|
5074
5129
|
declare function isValidMatchUpFormat({ matchUpFormat }: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function factoryVersion() {
|
|
6
|
-
return '2.0.
|
|
6
|
+
return '2.0.8';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
/******************************************************************************
|
|
@@ -11204,7 +11204,7 @@ function allDrawMatchUps(params) {
|
|
|
11204
11204
|
var _a, _b;
|
|
11205
11205
|
var _c, _d;
|
|
11206
11206
|
var tournamentParticipants = params.participants, participantMap = params.participantMap, contextContent = params.contextContent;
|
|
11207
|
-
var scheduleVisibilityFilters = params.scheduleVisibilityFilters, tournamentAppliedPolicies = params.tournamentAppliedPolicies, participantsProfile = params.participantsProfile, afterRecoveryTimes = params.afterRecoveryTimes, policyDefinitions = params.policyDefinitions, useParticipantMap = params.useParticipantMap, tournamentRecord = params.tournamentRecord,
|
|
11207
|
+
var scheduleVisibilityFilters = params.scheduleVisibilityFilters, tournamentAppliedPolicies = params.tournamentAppliedPolicies, participantsProfile = params.participantsProfile, afterRecoveryTimes = params.afterRecoveryTimes, policyDefinitions = params.policyDefinitions, useParticipantMap = params.useParticipantMap, tournamentRecord = params.tournamentRecord, matchUpFilters = params.matchUpFilters, contextFilters = params.contextFilters, contextProfile = params.contextProfile, drawDefinition = params.drawDefinition, nextMatchUps = params.nextMatchUps, inContext = params.inContext, context = params.context, event = params.event;
|
|
11208
11208
|
var _e = event !== null && event !== void 0 ? event : {}, eventId = _e.eventId, eventName = _e.eventName, eventType = _e.eventType, category = _e.category, gender = _e.gender, matchUpFormat = _e.matchUpFormat;
|
|
11209
11209
|
var additionalContext = __assign(__assign({}, context), { eventId: eventId, eventType: eventType, eventName: eventName, category: category, gender: gender, matchUpFormat: matchUpFormat, indoorOutDoor: (_c = event === null || event === void 0 ? void 0 : event.indoorOutdoor) !== null && _c !== void 0 ? _c : tournamentRecord === null || tournamentRecord === void 0 ? void 0 : tournamentRecord.indoorOutdoor, surfaceCategory: (_d = event === null || event === void 0 ? void 0 : event.surfaceCategory) !== null && _d !== void 0 ? _d : tournamentRecord === null || tournamentRecord === void 0 ? void 0 : tournamentRecord.surfaceCategory, endDate: event === null || event === void 0 ? void 0 : event.endDate });
|
|
11210
11210
|
var groupInfo;
|
|
@@ -24860,9 +24860,7 @@ function generateTieMatchUpScore(params) {
|
|
|
24860
24860
|
}
|
|
24861
24861
|
else if (aggregateValue) {
|
|
24862
24862
|
var allTieMatchUpsCompleted = tieMatchUps.every(function (matchUp) {
|
|
24863
|
-
return (matchUp.matchUpStatus &&
|
|
24864
|
-
completedMatchUpStatuses.includes(matchUp.matchUpStatus)) ||
|
|
24865
|
-
matchUp.winningSide;
|
|
24863
|
+
return (matchUp.matchUpStatus && completedMatchUpStatuses.includes(matchUp.matchUpStatus)) || matchUp.winningSide;
|
|
24866
24864
|
});
|
|
24867
24865
|
if (allTieMatchUpsCompleted && sideScores[0] !== sideScores[1]) {
|
|
24868
24866
|
winningSide = sideScores[0] > sideScores[1] ? 1 : 2;
|
|
@@ -27031,6 +27029,8 @@ var mutate$b = {
|
|
|
27031
27029
|
__proto__: null,
|
|
27032
27030
|
addAdHocMatchUps: addAdHocMatchUps,
|
|
27033
27031
|
addDrawDefinitionTimeItem: addDrawDefinitionTimeItem,
|
|
27032
|
+
addFinishingRounds: addFinishingRounds,
|
|
27033
|
+
addGoesTo: addGoesTo,
|
|
27034
27034
|
addPlayoffStructures: addPlayoffStructures,
|
|
27035
27035
|
addQualifyingStructure: addQualifyingStructure,
|
|
27036
27036
|
addVoluntaryConsolationStage: addVoluntaryConsolationStage,
|
|
@@ -36062,6 +36062,45 @@ function processQualifyingDetails(_a) {
|
|
|
36062
36062
|
return { error: undefined };
|
|
36063
36063
|
}
|
|
36064
36064
|
|
|
36065
|
+
function generateAdHocRounds(_a) {
|
|
36066
|
+
var e_1, _b;
|
|
36067
|
+
var _c, _d;
|
|
36068
|
+
var _e = _a.roundsCount, roundsCount = _e === void 0 ? 1 : _e, drawDefinition = _a.drawDefinition, matchUpsCount = _a.matchUpsCount, structureId = _a.structureId, idPrefix = _a.idPrefix, isMock = _a.isMock, event = _a.event;
|
|
36069
|
+
var matchUps = [];
|
|
36070
|
+
var roundNumber;
|
|
36071
|
+
try {
|
|
36072
|
+
for (var _f = __values(generateRange(1, roundsCount + 1)), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
36073
|
+
var iteration = _g.value;
|
|
36074
|
+
// on the first iteration roundNumber is undefined and generateAdHocMatchUps will infer the roundNumber from existing matchUps
|
|
36075
|
+
// on subsequent iterations roundNumber will be incremented and ignoreLastRoundNumber will be true to avoid inference error
|
|
36076
|
+
var genResult = generateAdHocMatchUps({
|
|
36077
|
+
ignoreLastRoundNumber: !!roundNumber,
|
|
36078
|
+
newRound: !roundNumber,
|
|
36079
|
+
drawDefinition: drawDefinition,
|
|
36080
|
+
matchUpsCount: matchUpsCount,
|
|
36081
|
+
structureId: structureId,
|
|
36082
|
+
roundNumber: roundNumber,
|
|
36083
|
+
idPrefix: idPrefix,
|
|
36084
|
+
isMock: isMock,
|
|
36085
|
+
event: event,
|
|
36086
|
+
});
|
|
36087
|
+
if (genResult.error)
|
|
36088
|
+
return decorateResult({ result: genResult, info: { iteration: iteration } });
|
|
36089
|
+
if ((_c = genResult.matchUps) === null || _c === void 0 ? void 0 : _c.length)
|
|
36090
|
+
matchUps.push.apply(matchUps, __spreadArray([], __read(genResult.matchUps), false));
|
|
36091
|
+
roundNumber = ((_d = genResult === null || genResult === void 0 ? void 0 : genResult.roundNumber) !== null && _d !== void 0 ? _d : 1) + 1;
|
|
36092
|
+
}
|
|
36093
|
+
}
|
|
36094
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
36095
|
+
finally {
|
|
36096
|
+
try {
|
|
36097
|
+
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
|
|
36098
|
+
}
|
|
36099
|
+
finally { if (e_1) throw e_1.error; }
|
|
36100
|
+
}
|
|
36101
|
+
return { matchUps: matchUps };
|
|
36102
|
+
}
|
|
36103
|
+
|
|
36065
36104
|
function drawMatic(params) {
|
|
36066
36105
|
var e_1, _a;
|
|
36067
36106
|
var _b, _c, _d, _e, _f, _g;
|
|
@@ -36226,7 +36265,7 @@ function checkParams(params) {
|
|
|
36226
36265
|
}
|
|
36227
36266
|
|
|
36228
36267
|
function generateAdHoc(params) {
|
|
36229
|
-
var _a;
|
|
36268
|
+
var _a, _b;
|
|
36230
36269
|
var tournamentRecord = params.tournamentRecord, drawDefinition = params.drawDefinition, structureId = params.structureId, idPrefix = params.idPrefix, isMock = params.isMock, event = params.event;
|
|
36231
36270
|
var entries = (_a = event === null || event === void 0 ? void 0 : event.entries) === null || _a === void 0 ? void 0 : _a.filter(function (_a) {
|
|
36232
36271
|
var entryStage = _a.entryStage, entryStatus = _a.entryStatus;
|
|
@@ -36235,34 +36274,38 @@ function generateAdHoc(params) {
|
|
|
36235
36274
|
var participantIds = entries === null || entries === void 0 ? void 0 : entries.map(getParticipantId);
|
|
36236
36275
|
var matchUpsCount = entries ? Math.floor(entries.length / 2) : 0;
|
|
36237
36276
|
if (params.automated) {
|
|
36238
|
-
automateAdHoc(__assign(__assign({}, params), { participantIds: participantIds }));
|
|
36277
|
+
return automateAdHoc(__assign(__assign({}, params), { participantIds: participantIds }));
|
|
36239
36278
|
}
|
|
36240
36279
|
else {
|
|
36241
|
-
|
|
36242
|
-
|
|
36243
|
-
|
|
36280
|
+
var genResult = generateAdHocRounds({
|
|
36281
|
+
roundsCount: params.roundsCount,
|
|
36282
|
+
drawDefinition: drawDefinition,
|
|
36283
|
+
matchUpsCount: matchUpsCount,
|
|
36284
|
+
idPrefix: idPrefix,
|
|
36285
|
+
isMock: isMock,
|
|
36286
|
+
event: event,
|
|
36287
|
+
});
|
|
36288
|
+
if (genResult.error)
|
|
36289
|
+
return genResult;
|
|
36290
|
+
if ((_b = genResult.matchUps) === null || _b === void 0 ? void 0 : _b.length) {
|
|
36291
|
+
addAdHocMatchUps({
|
|
36292
|
+
matchUps: genResult.matchUps,
|
|
36293
|
+
suppressNotifications: true,
|
|
36294
|
+
tournamentRecord: tournamentRecord,
|
|
36244
36295
|
drawDefinition: drawDefinition,
|
|
36245
|
-
|
|
36246
|
-
idPrefix: idPrefix,
|
|
36247
|
-
isMock: isMock,
|
|
36296
|
+
structureId: structureId,
|
|
36248
36297
|
event: event,
|
|
36249
|
-
})
|
|
36250
|
-
|
|
36251
|
-
addAdHocMatchUps({
|
|
36252
|
-
suppressNotifications: true,
|
|
36253
|
-
tournamentRecord: tournamentRecord,
|
|
36254
|
-
drawDefinition: drawDefinition,
|
|
36255
|
-
structureId: structureId,
|
|
36256
|
-
matchUps: matchUps,
|
|
36257
|
-
event: event,
|
|
36258
|
-
});
|
|
36259
|
-
});
|
|
36298
|
+
});
|
|
36299
|
+
}
|
|
36260
36300
|
}
|
|
36301
|
+
return __assign({}, SUCCESS);
|
|
36261
36302
|
}
|
|
36262
36303
|
function automateAdHoc(params) {
|
|
36263
36304
|
var _a, _b, _c, _d;
|
|
36264
36305
|
var _e = (_a = params.drawMatic) !== null && _a !== void 0 ? _a : {}, restrictEntryStatus = _e.restrictEntryStatus, generateMatchUps = _e.generateMatchUps, structureId = _e.structureId, matchUpIds = _e.matchUpIds, scaleName = _e.scaleName;
|
|
36265
36306
|
var result = drawMatic(__assign(__assign({}, params), { eventType: (_c = (_b = params.drawMatic) === null || _b === void 0 ? void 0 : _b.eventType) !== null && _c !== void 0 ? _c : params.matchUpType, generateMatchUps: generateMatchUps !== null && generateMatchUps !== void 0 ? generateMatchUps : true, participantIds: params.participantIds, roundsCount: params.roundsCount, restrictEntryStatus: restrictEntryStatus, structureId: structureId, matchUpIds: matchUpIds, scaleName: scaleName }));
|
|
36307
|
+
if (result.error)
|
|
36308
|
+
return result;
|
|
36266
36309
|
((_d = result === null || result === void 0 ? void 0 : result.matchUps) === null || _d === void 0 ? void 0 : _d.length) &&
|
|
36267
36310
|
addAdHocMatchUps({
|
|
36268
36311
|
tournamentRecord: params.tournamentRecord,
|
|
@@ -36272,6 +36315,7 @@ function automateAdHoc(params) {
|
|
|
36272
36315
|
event: params.event,
|
|
36273
36316
|
structureId: structureId,
|
|
36274
36317
|
});
|
|
36318
|
+
return __assign({}, SUCCESS);
|
|
36275
36319
|
}
|
|
36276
36320
|
|
|
36277
36321
|
function initializeStructureSeedAssignments(_a) {
|
|
@@ -41910,6 +41954,8 @@ var index$d = {
|
|
|
41910
41954
|
__proto__: null,
|
|
41911
41955
|
addAdHocMatchUps: addAdHocMatchUps,
|
|
41912
41956
|
addDrawDefinitionTimeItem: addDrawDefinitionTimeItem,
|
|
41957
|
+
addFinishingRounds: addFinishingRounds,
|
|
41958
|
+
addGoesTo: addGoesTo,
|
|
41913
41959
|
addPlayoffStructures: addPlayoffStructures,
|
|
41914
41960
|
addQualifyingStructure: addQualifyingStructure,
|
|
41915
41961
|
addVoluntaryConsolationStage: addVoluntaryConsolationStage,
|
|
@@ -41930,6 +41976,7 @@ var index$d = {
|
|
|
41930
41976
|
drawMatic: drawMatic,
|
|
41931
41977
|
findDrawDefinition: publicFindDrawDefinition,
|
|
41932
41978
|
generateAdHocMatchUps: generateAdHocMatchUps,
|
|
41979
|
+
generateAdHocRounds: generateAdHocRounds,
|
|
41933
41980
|
generateAndPopulatePlayoffStructures: generateAndPopulatePlayoffStructures,
|
|
41934
41981
|
generateDrawDefinition: generateDrawDefinition,
|
|
41935
41982
|
generateDrawMaticRound: generateDrawMaticRound,
|
|
@@ -45601,6 +45648,7 @@ var index$a = {
|
|
|
45601
45648
|
drawMatic: drawMatic,
|
|
45602
45649
|
garman: garman$1,
|
|
45603
45650
|
generateAdHocMatchUps: generateAdHocMatchUps,
|
|
45651
|
+
generateAdHocRounds: generateAdHocRounds,
|
|
45604
45652
|
generateAndPopulatePlayoffStructures: generateAndPopulatePlayoffStructures,
|
|
45605
45653
|
generateCourts: generateCourts,
|
|
45606
45654
|
generateDrawDefinition: generateDrawDefinition,
|
|
@@ -56733,6 +56781,7 @@ function anonymizeTournamentRecord(_a) {
|
|
|
56733
56781
|
tournamentRecord.tournamentId = newTournamentId;
|
|
56734
56782
|
tournamentRecord.createdAt = new Date().toISOString();
|
|
56735
56783
|
tournamentRecord.tournamentName = tournamentName || "Anonymized: ".concat(formatDate(new Date()));
|
|
56784
|
+
tournamentRecord.isMock = true;
|
|
56736
56785
|
delete tournamentRecord.parentOrganisation;
|
|
56737
56786
|
try {
|
|
56738
56787
|
for (var _x = __values(tournamentRecord.participants || []), _y = _x.next(); !_y.done; _y = _x.next()) {
|
|
@@ -56774,6 +56823,7 @@ function anonymizeTournamentRecord(_a) {
|
|
|
56774
56823
|
venue.venueAbbreviation = "V".concat(venueIndex);
|
|
56775
56824
|
var newVenueId = UUID();
|
|
56776
56825
|
idMap[venue.venueId] = newVenueId;
|
|
56826
|
+
venue.isMock = true;
|
|
56777
56827
|
venueIndex += 1;
|
|
56778
56828
|
// venue.eventId = UUID(); eventIds can't be anonymized without updating schedulingProfiles
|
|
56779
56829
|
}
|
|
@@ -56790,6 +56840,7 @@ function anonymizeTournamentRecord(_a) {
|
|
|
56790
56840
|
for (var _3 = __values(tournamentRecord.events || []), _4 = _3.next(); !_4.done; _4 = _3.next()) {
|
|
56791
56841
|
var event_1 = _4.value;
|
|
56792
56842
|
event_1.extensions = filterExtensions(event_1);
|
|
56843
|
+
event_1.isMock = true;
|
|
56793
56844
|
var newEventId = UUID();
|
|
56794
56845
|
idMap[event_1.eventId] = newEventId;
|
|
56795
56846
|
event_1.eventId = newEventId;
|
|
@@ -56818,6 +56869,7 @@ function anonymizeTournamentRecord(_a) {
|
|
|
56818
56869
|
var newDrawId = UUID();
|
|
56819
56870
|
idMap[drawDefinition.drawId] = newDrawId;
|
|
56820
56871
|
drawDefinition.drawId = newDrawId;
|
|
56872
|
+
drawDefinition.isMock = true;
|
|
56821
56873
|
// update all drawDefinition entries
|
|
56822
56874
|
if (Array.isArray(drawDefinition.entries)) {
|
|
56823
56875
|
try {
|
|
@@ -56874,6 +56926,7 @@ function anonymizeTournamentRecord(_a) {
|
|
|
56874
56926
|
// update lineUps in each matchUp
|
|
56875
56927
|
for (var _j = (e_13 = void 0, __values(structure.matchUps || [])), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
56876
56928
|
var matchUp = _k.value;
|
|
56929
|
+
matchUp.isMock = true;
|
|
56877
56930
|
try {
|
|
56878
56931
|
for (var _l = (e_14 = void 0, __values(matchUp.sides || [])), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
56879
56932
|
var side = _m.value;
|