tods-competition-factory 1.6.27 → 1.6.28

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.
@@ -1382,6 +1382,7 @@ function findPolicy({
1382
1382
 
1383
1383
  const POLICY_TYPE_COMPETITIVE_BANDS = "competitiveBands";
1384
1384
  const POLICY_TYPE_ROUND_ROBIN_TALLY = "roundRobinTally";
1385
+ const POLICY_TYPE_MATCHUP_ACTIONS = "matchUpActions";
1385
1386
  const POLICY_TYPE_ROUND_NAMING = "roundNaming";
1386
1387
  const POLICY_TYPE_PARTICIPANT = "participant";
1387
1388
  const POLICY_TYPE_SCHEDULING = "scheduling";
@@ -22656,7 +22657,6 @@ function generateDrawDefinition(params) {
22656
22657
  ignoreStageSpace,
22657
22658
  tournamentRecord,
22658
22659
  qualifyingOnly,
22659
- enforceGender,
22660
22660
  tieFormatName,
22661
22661
  drawEntries,
22662
22662
  addToEvent,
@@ -22667,6 +22667,11 @@ function generateDrawDefinition(params) {
22667
22667
  tournamentRecord,
22668
22668
  inContext: true
22669
22669
  });
22670
+ const appliedPolicies = getAppliedPolicies({
22671
+ tournamentRecord,
22672
+ event
22673
+ }).appliedPolicies ?? {};
22674
+ const enforceGender = params.enforceGender ?? policyDefinitions?.[POLICY_TYPE_MATCHUP_ACTIONS]?.participants?.enforceGender ?? appliedPolicies?.[POLICY_TYPE_MATCHUP_ACTIONS]?.participants?.enforceGender;
22670
22675
  const validEntriesResult = event && participants && checkValidEntries({ event, participants, enforceGender });
22671
22676
  if (validEntriesResult?.error)
22672
22677
  return decorateResult({ result: validEntriesResult, stack });
@@ -22763,10 +22768,6 @@ function generateDrawDefinition(params) {
22763
22768
  drawDefinition.matchUpType = matchUpType;
22764
22769
  }
22765
22770
  }
22766
- const appliedPolicies = getAppliedPolicies({
22767
- tournamentRecord,
22768
- event
22769
- }).appliedPolicies ?? {};
22770
22771
  if (policyDefinitions) {
22771
22772
  if (typeof policyDefinitions !== "object") {
22772
22773
  return decorateResult({