tods-competition-factory 2.0.2 → 2.0.5
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 +126 -140
- package/dist/tods-competition-factory.development.cjs.js +28402 -28341
- 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 +2 -2
|
@@ -2113,6 +2113,73 @@ 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
|
+
|
|
2116
2183
|
type FactoryEngine = {
|
|
2117
2184
|
[key: string]: any;
|
|
2118
2185
|
};
|
|
@@ -2485,6 +2552,49 @@ type MatchUpFilters = {
|
|
|
2485
2552
|
filterMatchUpTypes?: boolean;
|
|
2486
2553
|
filterMatchUpIds?: boolean;
|
|
2487
2554
|
};
|
|
2555
|
+
type GenerateDrawDefinitionArgs = {
|
|
2556
|
+
automated?: boolean | {
|
|
2557
|
+
seedsOnly: boolean;
|
|
2558
|
+
};
|
|
2559
|
+
playoffAttributes?: PlayoffAttributes;
|
|
2560
|
+
policyDefinitions?: PolicyDefinitions;
|
|
2561
|
+
voluntaryConsolation?: {
|
|
2562
|
+
structureAbbreviation?: string;
|
|
2563
|
+
structureName?: string;
|
|
2564
|
+
structureId?: string;
|
|
2565
|
+
};
|
|
2566
|
+
enforceMinimumDrawSize?: boolean;
|
|
2567
|
+
ignoreAllowedDrawTypes?: boolean;
|
|
2568
|
+
qualifyingPlaceholder?: boolean;
|
|
2569
|
+
considerEventEntries?: boolean;
|
|
2570
|
+
seedingProfile?: SeedingProfile;
|
|
2571
|
+
hydrateCollections?: boolean;
|
|
2572
|
+
tournamentRecord: Tournament;
|
|
2573
|
+
drawTypeCoercion?: boolean;
|
|
2574
|
+
ignoreStageSpace?: boolean;
|
|
2575
|
+
qualifyingProfiles?: any[];
|
|
2576
|
+
drawMatic?: DrawMaticArgs;
|
|
2577
|
+
qualifyingOnly?: boolean;
|
|
2578
|
+
drawType?: DrawTypeUnion;
|
|
2579
|
+
enforceGender?: boolean;
|
|
2580
|
+
processCodes?: string[];
|
|
2581
|
+
matchUpFormat?: string;
|
|
2582
|
+
matchUpType?: EventTypeUnion;
|
|
2583
|
+
structureName?: string;
|
|
2584
|
+
tieFormatName?: string;
|
|
2585
|
+
tieFormat?: TieFormat;
|
|
2586
|
+
drawEntries?: Entry[];
|
|
2587
|
+
roundsCount?: number;
|
|
2588
|
+
seedsCount?: number;
|
|
2589
|
+
placeByes?: boolean;
|
|
2590
|
+
drawName?: string;
|
|
2591
|
+
drawSize?: number;
|
|
2592
|
+
idPrefix?: string;
|
|
2593
|
+
isMock?: boolean;
|
|
2594
|
+
uuids?: string[];
|
|
2595
|
+
drawId?: string;
|
|
2596
|
+
event: Event$1;
|
|
2597
|
+
};
|
|
2488
2598
|
|
|
2489
2599
|
/**
|
|
2490
2600
|
* Links all tournaments which are currently loaded into competitionEngine state
|
|
@@ -2939,13 +3049,15 @@ declare function updateTeamLineUp({ drawDefinition, participantId, tieFormat, li
|
|
|
2939
3049
|
error?: ErrorType;
|
|
2940
3050
|
};
|
|
2941
3051
|
|
|
2942
|
-
|
|
3052
|
+
type AddAdHocMatchUpsParams = {
|
|
3053
|
+
suppressNotifications?: boolean;
|
|
2943
3054
|
tournamentRecord: any;
|
|
3055
|
+
structureId?: string;
|
|
2944
3056
|
drawDefinition: any;
|
|
2945
|
-
|
|
2946
|
-
matchUps: any;
|
|
3057
|
+
matchUps: any[];
|
|
2947
3058
|
event: any;
|
|
2948
|
-
}
|
|
3059
|
+
};
|
|
3060
|
+
declare function addAdHocMatchUps(params: AddAdHocMatchUpsParams): ResultType;
|
|
2949
3061
|
|
|
2950
3062
|
type ModifyDrawNameArgs = {
|
|
2951
3063
|
tournamentRecord: Tournament;
|
|
@@ -2974,36 +3086,20 @@ type SetSubOrderArgs = {
|
|
|
2974
3086
|
};
|
|
2975
3087
|
declare function setSubOrder({ tournamentRecord, drawDefinition, drawPosition, structureId, subOrder, event, }: SetSubOrderArgs): ResultType;
|
|
2976
3088
|
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
* @param {string} eventId - resolved by tournamentEngine to the event object
|
|
2981
|
-
*
|
|
2982
|
-
* @param {object} policyDefinitions - seeding policyDefinitions determines the # of seeds for given participantsCount/drawSize
|
|
2983
|
-
* @param {object} scaleAttributes -
|
|
2984
|
-
* @param {string} scaleName - OPTIONAL - defaults to scaleAttributes.scaleName
|
|
2985
|
-
* @param {number} drawSize - OPTIONAL - defaults to calculation based on # of entries
|
|
2986
|
-
* @param {string} drawId - OPTIONAL - will use flight.drawEntries or drawDefinition.entries rather than event.entries
|
|
2987
|
-
* @param {string} stage - OPTIONAL - filters entries by specified stage
|
|
2988
|
-
*
|
|
2989
|
-
* @param {boolean} sortDescending - OPTIONAL - defaults to false
|
|
2990
|
-
* @param {function} scaleSortMethod - OPTIONAL - user defined sorting method
|
|
2991
|
-
*
|
|
2992
|
-
* @returns {object} - { success: true } or { error }
|
|
2993
|
-
*/
|
|
2994
|
-
declare function autoSeeding({ tournamentRecord, drawDefinition, policyDefinitions, scaleAttributes, scaleName, drawSize, drawId, event, stage, sortDescending, scaleSortMethod, }: {
|
|
3089
|
+
type AutoSeedingParams = {
|
|
3090
|
+
sortDescending: boolean;
|
|
3091
|
+
stage: StageTypeUnion;
|
|
2995
3092
|
tournamentRecord: any;
|
|
2996
|
-
drawDefinition: any;
|
|
2997
3093
|
policyDefinitions: any;
|
|
2998
3094
|
scaleAttributes: any;
|
|
2999
|
-
scaleName: any;
|
|
3000
|
-
drawSize: any;
|
|
3001
|
-
drawId: any;
|
|
3002
|
-
event: any;
|
|
3003
|
-
stage: any;
|
|
3004
|
-
sortDescending: any;
|
|
3005
3095
|
scaleSortMethod: any;
|
|
3006
|
-
|
|
3096
|
+
drawDefinition: any;
|
|
3097
|
+
scaleName: string;
|
|
3098
|
+
drawSize: number;
|
|
3099
|
+
drawId: string;
|
|
3100
|
+
event: any;
|
|
3101
|
+
};
|
|
3102
|
+
declare function autoSeeding({ tournamentRecord, drawDefinition, policyDefinitions, scaleAttributes, scaleName, drawSize, drawId, event, stage, sortDescending, scaleSortMethod, }: AutoSeedingParams): {
|
|
3007
3103
|
stageEntries?: Entry[] | undefined;
|
|
3008
3104
|
seedsCount?: number | undefined;
|
|
3009
3105
|
entries?: Entry[] | undefined;
|
|
@@ -3643,116 +3739,6 @@ type GenerateDrawStructuresAndLinksArgs = {
|
|
|
3643
3739
|
};
|
|
3644
3740
|
declare function generateDrawStructuresAndLinks(params: GenerateDrawStructuresAndLinksArgs): any;
|
|
3645
3741
|
|
|
3646
|
-
type GenerateDrawMaticRoundArgs = {
|
|
3647
|
-
tournamentParticipants?: HydratedParticipant[];
|
|
3648
|
-
adHocRatings?: {
|
|
3649
|
-
[key: string]: number;
|
|
3650
|
-
};
|
|
3651
|
-
ignoreLastRoundNumber?: boolean;
|
|
3652
|
-
restrictEntryStatus?: boolean;
|
|
3653
|
-
drawDefinition: DrawDefinition;
|
|
3654
|
-
generateMatchUps?: boolean;
|
|
3655
|
-
eventType?: EventTypeUnion;
|
|
3656
|
-
salted?: number | boolean;
|
|
3657
|
-
participantIds?: string[];
|
|
3658
|
-
encounterValue?: number;
|
|
3659
|
-
sameTeamValue?: number;
|
|
3660
|
-
maxIterations?: number;
|
|
3661
|
-
matchUpIds?: string[];
|
|
3662
|
-
structure?: Structure;
|
|
3663
|
-
roundNumber?: number;
|
|
3664
|
-
structureId?: string;
|
|
3665
|
-
scaleName?: string;
|
|
3666
|
-
idPrefix?: string;
|
|
3667
|
-
isMock?: boolean;
|
|
3668
|
-
drawId?: string;
|
|
3669
|
-
event: Event$1;
|
|
3670
|
-
};
|
|
3671
|
-
type DrawMaticRoundResult = {
|
|
3672
|
-
participantIdPairings?: string[][];
|
|
3673
|
-
candidatesCount?: number;
|
|
3674
|
-
roundNumber?: number;
|
|
3675
|
-
matchUps?: MatchUp[];
|
|
3676
|
-
iterations?: number;
|
|
3677
|
-
success?: boolean;
|
|
3678
|
-
maxDelta?: number;
|
|
3679
|
-
maxDiff?: number;
|
|
3680
|
-
};
|
|
3681
|
-
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;
|
|
3682
|
-
|
|
3683
|
-
type DrawMaticArgs = {
|
|
3684
|
-
adHocRatings?: {
|
|
3685
|
-
[key: string]: number;
|
|
3686
|
-
};
|
|
3687
|
-
restrictEntryStatus?: boolean;
|
|
3688
|
-
tournamentRecord: Tournament;
|
|
3689
|
-
drawDefinition: DrawDefinition;
|
|
3690
|
-
enableDoubleRobin?: boolean;
|
|
3691
|
-
generateMatchUps?: boolean;
|
|
3692
|
-
eventType?: EventTypeUnion;
|
|
3693
|
-
salted?: number | boolean;
|
|
3694
|
-
participantIds?: string[];
|
|
3695
|
-
encounterValue?: number;
|
|
3696
|
-
sameTeamValue?: number;
|
|
3697
|
-
maxIterations?: number;
|
|
3698
|
-
matchUpIds?: string[];
|
|
3699
|
-
structure?: Structure;
|
|
3700
|
-
roundsCount?: number;
|
|
3701
|
-
structureId?: string;
|
|
3702
|
-
idPrefix?: string;
|
|
3703
|
-
isMock?: boolean;
|
|
3704
|
-
event: Event$1;
|
|
3705
|
-
scaleAccessor?: string;
|
|
3706
|
-
scaleName?: string;
|
|
3707
|
-
};
|
|
3708
|
-
declare function drawMatic(params: DrawMaticArgs): ResultType & {
|
|
3709
|
-
matchUps?: MatchUp[];
|
|
3710
|
-
roundResults?: DrawMaticRoundResult[];
|
|
3711
|
-
};
|
|
3712
|
-
|
|
3713
|
-
type GenerateDrawDefinitionArgs = {
|
|
3714
|
-
automated?: boolean | {
|
|
3715
|
-
seedsOnly: boolean;
|
|
3716
|
-
};
|
|
3717
|
-
playoffAttributes?: PlayoffAttributes;
|
|
3718
|
-
policyDefinitions?: PolicyDefinitions;
|
|
3719
|
-
voluntaryConsolation?: {
|
|
3720
|
-
structureAbbreviation?: string;
|
|
3721
|
-
structureName?: string;
|
|
3722
|
-
structureId?: string;
|
|
3723
|
-
};
|
|
3724
|
-
enforceMinimumDrawSize?: boolean;
|
|
3725
|
-
ignoreAllowedDrawTypes?: boolean;
|
|
3726
|
-
qualifyingPlaceholder?: boolean;
|
|
3727
|
-
considerEventEntries?: boolean;
|
|
3728
|
-
seedingProfile?: SeedingProfile;
|
|
3729
|
-
hydrateCollections?: boolean;
|
|
3730
|
-
tournamentRecord: Tournament;
|
|
3731
|
-
drawTypeCoercion?: boolean;
|
|
3732
|
-
ignoreStageSpace?: boolean;
|
|
3733
|
-
qualifyingProfiles?: any[];
|
|
3734
|
-
drawMatic?: DrawMaticArgs;
|
|
3735
|
-
qualifyingOnly?: boolean;
|
|
3736
|
-
drawType?: DrawTypeUnion;
|
|
3737
|
-
enforceGender?: boolean;
|
|
3738
|
-
processCodes?: string[];
|
|
3739
|
-
matchUpFormat?: string;
|
|
3740
|
-
matchUpType?: EventTypeUnion;
|
|
3741
|
-
structureName?: string;
|
|
3742
|
-
tieFormatName?: string;
|
|
3743
|
-
tieFormat?: TieFormat;
|
|
3744
|
-
drawEntries?: Entry[];
|
|
3745
|
-
roundsCount?: number;
|
|
3746
|
-
seedsCount?: number;
|
|
3747
|
-
placeByes?: boolean;
|
|
3748
|
-
drawName?: string;
|
|
3749
|
-
drawSize?: number;
|
|
3750
|
-
idPrefix?: string;
|
|
3751
|
-
isMock?: boolean;
|
|
3752
|
-
uuids?: string[];
|
|
3753
|
-
drawId?: string;
|
|
3754
|
-
event: Event$1;
|
|
3755
|
-
};
|
|
3756
3742
|
declare function generateDrawDefinition(params: GenerateDrawDefinitionArgs): ResultType & {
|
|
3757
3743
|
existingDrawDefinition?: boolean;
|
|
3758
3744
|
qualifyingConflicts?: any[];
|