tods-competition-factory 1.8.29 → 1.8.31

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.
@@ -1601,6 +1601,12 @@ type GetMatchUpsArgs = {
1601
1601
  inContext?: boolean;
1602
1602
  event?: Event;
1603
1603
  };
1604
+ type GroupInfo = {
1605
+ [key: string]: {
1606
+ participantName: string;
1607
+ participantId: string;
1608
+ };
1609
+ };
1604
1610
  type GroupsMatchUpsResult = {
1605
1611
  abandonedMatchUps?: HydratedMatchUp[];
1606
1612
  completedMatchUps?: HydratedMatchUp[];
@@ -1609,6 +1615,7 @@ type GroupsMatchUpsResult = {
1609
1615
  byeMatchUps?: HydratedMatchUp[];
1610
1616
  matchUpsMap?: MatchUpsMap;
1611
1617
  matchUpsCount?: number;
1618
+ groupInfo?: GroupInfo;
1612
1619
  success?: boolean;
1613
1620
  error?: ErrorType;
1614
1621
  };
@@ -2207,12 +2214,23 @@ declare function competitionMatchUps({ scheduleVisibilityFilters, participantsPr
2207
2214
  upcomingMatchUps?: HydratedMatchUp[];
2208
2215
  pendingMatchUps?: HydratedMatchUp[];
2209
2216
  byeMatchUps?: HydratedMatchUp[];
2217
+ groupInfo?: GroupInfo;
2210
2218
  };
2211
2219
 
2212
2220
  declare function allTournamentMatchUps(params?: GetMatchUpsArgs): ResultType & {
2213
2221
  matchUps?: HydratedMatchUp[];
2214
2222
  };
2215
- declare function allDrawMatchUps(params: GetMatchUpsArgs): ResultType & {
2223
+ declare function allDrawMatchUps(params: GetMatchUpsArgs): {
2224
+ groupInfo: any;
2225
+ context?: {
2226
+ [key: string]: any;
2227
+ } | undefined;
2228
+ stack?: string | string[] | undefined;
2229
+ error?: ErrorType | undefined;
2230
+ errors?: string[] | undefined;
2231
+ success?: boolean | undefined;
2232
+ valid?: boolean | undefined;
2233
+ info?: any;
2216
2234
  matchUps?: HydratedMatchUp[] | undefined;
2217
2235
  matchUpsMap?: MatchUpsMap | undefined;
2218
2236
  };
@@ -2222,12 +2240,25 @@ declare function allEventMatchUps(params: GetMatchUpsArgs): {
2222
2240
  code: string;
2223
2241
  };
2224
2242
  matchUps?: undefined;
2243
+ groupInfo?: undefined;
2225
2244
  } | {
2226
2245
  matchUps: HydratedMatchUp[];
2246
+ groupInfo: any;
2227
2247
  error?: undefined;
2228
2248
  };
2229
2249
  declare function tournamentMatchUps(params: GetMatchUpsArgs): GroupsMatchUpsResult;
2230
2250
  declare function eventMatchUps(params: GetMatchUpsArgs): GroupsMatchUpsResult;
2231
- declare function drawMatchUps({ participants: tournamentParticipants, tournamentAppliedPolicies, scheduleVisibilityFilters, participantsProfile, afterRecoveryTimes, policyDefinitions, useParticipantMap, tournamentRecord, contextFilters, contextProfile, contextContent, drawDefinition, matchUpFilters, participantMap, nextMatchUps, tournamentId, inContext, context, event, }: GetMatchUpsArgs): GroupsMatchUpsResult;
2251
+ declare function drawMatchUps({ participants: tournamentParticipants, tournamentAppliedPolicies, scheduleVisibilityFilters, participantsProfile, afterRecoveryTimes, policyDefinitions, useParticipantMap, tournamentRecord, contextFilters, contextProfile, contextContent, drawDefinition, matchUpFilters, participantMap, nextMatchUps, tournamentId, inContext, context, event, }: GetMatchUpsArgs): {
2252
+ groupInfo: any;
2253
+ abandonedMatchUps?: HydratedMatchUp[] | undefined;
2254
+ completedMatchUps?: HydratedMatchUp[] | undefined;
2255
+ upcomingMatchUps?: HydratedMatchUp[] | undefined;
2256
+ pendingMatchUps?: HydratedMatchUp[] | undefined;
2257
+ byeMatchUps?: HydratedMatchUp[] | undefined;
2258
+ matchUpsMap?: MatchUpsMap | undefined;
2259
+ matchUpsCount?: number | undefined;
2260
+ success?: boolean | undefined;
2261
+ error?: ErrorType | undefined;
2262
+ };
2232
2263
 
2233
2264
  export { allCompetitionMatchUps, allDrawMatchUps, allEventMatchUps, allTournamentMatchUps, matchUpActions$1 as competitionMatchUpActions, competitionMatchUps, competitionScheduleMatchUps, drawMatchUps, eventMatchUps, filterParticipants, findExtension, findMatchUp, publicFindParticipant as findParticipant, generateSeedingScaleItems, getAssignedParticipantIds, getCompetitionDateRange, getCompetitionParticipants, getCompetitionVenues, getVenuesAndCourts$1 as getCompetitionVenuesAndCourts, getEligibleVoluntaryConsolationParticipants, getEntriesAndSeedsCount, getEventData, getEventMatchUpFormatTiming, getFlightProfile, getMatchUpDailyLimits, getMatchUpDailyLimitsUpdate, getMatchUpFormatTimingUpdate, getOrderedDrawPositions, getParticipantEventDetails, getParticipantScaleItem, getPolicyDefinitions, getPositionAssignments, getProfileRounds, getRoundContextProfile, getRoundMatchUps, getRounds, getSeedsCount, getTimeItem, getVenuesAndCourts as getTournamentVenuesAndCourts, getValidGroupSizes, isValid as isValidMatchUpFormat, parse as parseMatchUpFormat, parseScoreString, participantScaleItem, positionActions, matchUpActions as tournamentMatchUpActions, tournamentMatchUps, validateScore };
@@ -1704,13 +1704,12 @@ const SIGNED_IN = "SIGNED_IN" /* SIGNED_IN */;
1704
1704
 
1705
1705
  function addParticipantGroupings({
1706
1706
  participantsProfile,
1707
- participants = []
1707
+ participants = [],
1708
+ deepCopy
1709
+ // will skip deepCopy only if false
1708
1710
  }) {
1709
- const participantsWithGroupings = makeDeepCopy(
1710
- participants,
1711
- participantsProfile?.convertExtensions,
1712
- true
1713
- );
1711
+ const groupMap = /* @__PURE__ */ new Map();
1712
+ const participantsWithGroupings = deepCopy !== false ? makeDeepCopy(participants, participantsProfile?.convertExtensions, true) : participants;
1714
1713
  const teamParticipants = participantsWithGroupings.filter(
1715
1714
  (participant) => participant.participantType === TEAM$2
1716
1715
  );
@@ -1733,6 +1732,11 @@ function addParticipantGroupings({
1733
1732
  (individualParticipantId) => {
1734
1733
  if (individualParticipantId === participantId && !participant.teamParticipantIds?.includes(team.participantId)) {
1735
1734
  participant.teamParticipantIds.push(team.participantId);
1735
+ if (!groupMap.get(team.participantId))
1736
+ groupMap.set(team.participantId, {
1737
+ participantName: team.participantName,
1738
+ participantId: team.participantId
1739
+ });
1736
1740
  participant.teams.push({
1737
1741
  participantRoleResponsibilities: team.participantRoleResponsibilities,
1738
1742
  participantOtherName: team.participantOtherName,
@@ -1770,7 +1774,7 @@ function addParticipantGroupings({
1770
1774
  });
1771
1775
  }
1772
1776
  });
1773
- return participantsWithGroupings;
1777
+ return { participantsWithGroupings, groupInfo: Object.fromEntries(groupMap) };
1774
1778
  }
1775
1779
 
1776
1780
  const countries = [
@@ -3797,11 +3801,13 @@ function hydrateParticipants({
3797
3801
  participants.forEach(
3798
3802
  (participant) => addNationalityCode({ participant, ...participantsProfile })
3799
3803
  );
3804
+ let groupInfo;
3800
3805
  if ((inContext || participantsProfile?.withGroupings) && participants?.length) {
3801
- participants = addParticipantGroupings({
3806
+ ({ participantsWithGroupings: participants, groupInfo } = addParticipantGroupings({
3802
3807
  participantsProfile,
3808
+ deepCopy: false,
3803
3809
  participants
3804
- });
3810
+ }));
3805
3811
  }
3806
3812
  if (participantsProfile?.withScaleValues && participants?.length) {
3807
3813
  for (const participant of participants) {
@@ -3810,7 +3816,7 @@ function hydrateParticipants({
3810
3816
  participant.ratings = ratings;
3811
3817
  }
3812
3818
  }
3813
- return { participants };
3819
+ return { participants, groupInfo };
3814
3820
  }
3815
3821
 
3816
3822
  const WALKOVER = "WALKOVER";
@@ -7598,13 +7604,14 @@ function getDrawMatchUps(params) {
7598
7604
  event
7599
7605
  });
7600
7606
  }
7607
+ let groupInfo;
7601
7608
  if (!tournamentParticipants?.length && tournamentRecord) {
7602
7609
  tournamentParticipants = tournamentRecord?.participants;
7603
7610
  if ((inContext || participantsProfile?.withGroupings) && tournamentParticipants?.length) {
7604
- tournamentParticipants = addParticipantGroupings({
7611
+ ({ participantsWithGroupings: tournamentParticipants, groupInfo } = addParticipantGroupings({
7605
7612
  participants: tournamentParticipants,
7606
7613
  participantsProfile
7607
- });
7614
+ }));
7608
7615
  }
7609
7616
  }
7610
7617
  const { structures } = getDrawStructures({ drawDefinition });
@@ -7665,14 +7672,15 @@ function getDrawMatchUps(params) {
7665
7672
  }
7666
7673
  return matchUps;
7667
7674
  };
7668
- const matchUpGroups = {
7675
+ const drawMatchUpsResult = {
7669
7676
  abandonedMatchUps: applyFilter(allAbandonedMatchUps),
7670
7677
  completedMatchUps: applyFilter(allCompletedMatchUps),
7671
7678
  upcomingMatchUps: applyFilter(allUpcomingMatchUps),
7672
7679
  pendingMatchUps: applyFilter(allPendingMatchUps),
7673
7680
  byeMatchUps: applyFilter(allByeMatchUps),
7674
7681
  matchUpsMap,
7675
- ...SUCCESS
7682
+ ...SUCCESS,
7683
+ groupInfo
7676
7684
  };
7677
7685
  if (nextMatchUps) {
7678
7686
  const nextFilter = typeof nextMatchUps === "object" || {
@@ -7695,7 +7703,7 @@ function getDrawMatchUps(params) {
7695
7703
  drawDefinition
7696
7704
  });
7697
7705
  }
7698
- return matchUpGroups;
7706
+ return drawMatchUpsResult;
7699
7707
  }
7700
7708
 
7701
7709
  function allTournamentMatchUps(params) {
@@ -7803,8 +7811,13 @@ function allDrawMatchUps(params) {
7803
7811
  surfaceCategory: event?.surfaceCategory ?? tournamentRecord?.surfaceCategory,
7804
7812
  endDate: event?.endDate
7805
7813
  };
7814
+ let groupInfo;
7806
7815
  if (!tournamentParticipants?.length && !participantMap && tournamentRecord) {
7807
- ({ participants: tournamentParticipants = [], participantMap } = hydrateParticipants({
7816
+ ({
7817
+ participants: tournamentParticipants = [],
7818
+ participantMap,
7819
+ groupInfo
7820
+ } = hydrateParticipants({
7808
7821
  participantsProfile,
7809
7822
  useParticipantMap,
7810
7823
  policyDefinitions,
@@ -7822,7 +7835,7 @@ function allDrawMatchUps(params) {
7822
7835
  event
7823
7836
  });
7824
7837
  }
7825
- return getAllDrawMatchUps({
7838
+ const allDrawMatchUpsResult = getAllDrawMatchUps({
7826
7839
  context: additionalContext,
7827
7840
  tournamentAppliedPolicies,
7828
7841
  scheduleVisibilityFilters,
@@ -7841,6 +7854,7 @@ function allDrawMatchUps(params) {
7841
7854
  inContext,
7842
7855
  event
7843
7856
  });
7857
+ return { ...allDrawMatchUpsResult, groupInfo };
7844
7858
  }
7845
7859
  function allEventMatchUps(params) {
7846
7860
  let { participants = [], contextContent, participantMap } = params;
@@ -7887,6 +7901,7 @@ function allEventMatchUps(params) {
7887
7901
  event
7888
7902
  });
7889
7903
  }
7904
+ let groupInfo;
7890
7905
  if (!participants?.length && !participantMap && tournamentRecord) {
7891
7906
  const hydratedParticipantResult = hydrateParticipants({
7892
7907
  participantsProfile,
@@ -7898,6 +7913,7 @@ function allEventMatchUps(params) {
7898
7913
  });
7899
7914
  participantMap = hydratedParticipantResult.participantMap;
7900
7915
  participants = hydratedParticipantResult.participants ?? [];
7916
+ groupInfo = hydratedParticipantResult.groupInfo;
7901
7917
  }
7902
7918
  const drawDefinitions = event.drawDefinitions ?? [];
7903
7919
  const scheduleTiming = getScheduleTiming({
@@ -7929,7 +7945,7 @@ function allEventMatchUps(params) {
7929
7945
  return matchUps2 ?? [];
7930
7946
  }
7931
7947
  );
7932
- return { matchUps };
7948
+ return { matchUps, groupInfo };
7933
7949
  }
7934
7950
  function tournamentMatchUps(params) {
7935
7951
  if (!params?.tournamentRecord)
@@ -7951,7 +7967,7 @@ function tournamentMatchUps(params) {
7951
7967
  } = params;
7952
7968
  const tournamentId = params.tournamentId ?? tournamentRecord.tournamentId;
7953
7969
  const events = tournamentRecord?.events ?? [];
7954
- const { participants, participantMap } = hydrateParticipants({
7970
+ const { participants, participantMap, groupInfo } = hydrateParticipants({
7955
7971
  participantsProfile,
7956
7972
  policyDefinitions,
7957
7973
  useParticipantMap,
@@ -7995,21 +8011,24 @@ function tournamentMatchUps(params) {
7995
8011
  event
7996
8012
  });
7997
8013
  });
7998
- return eventsDrawsMatchUps.reduce(
8014
+ const eventsDrawMatchUpsResult = eventsDrawsMatchUps.reduce(
7999
8015
  (matchUps, eventMatchUps2) => {
8000
8016
  const keys = eventMatchUps2 && Object.keys(eventMatchUps2).filter(
8001
8017
  (key) => !["success", "matchUpsMap"].includes(key)
8002
8018
  );
8003
8019
  keys?.forEach((key) => {
8004
- if (!matchUps[key])
8005
- matchUps[key] = [];
8006
- matchUps[key] = matchUps[key].concat(eventMatchUps2[key]);
8007
- matchUps.matchUpsCount += eventMatchUps2[key].length;
8020
+ if (Array.isArray(eventMatchUps2[key])) {
8021
+ if (!matchUps[key])
8022
+ matchUps[key] = [];
8023
+ matchUps[key] = matchUps[key].concat(eventMatchUps2[key]);
8024
+ matchUps.matchUpsCount += eventMatchUps2[key].length;
8025
+ }
8008
8026
  });
8009
8027
  return matchUps;
8010
8028
  },
8011
8029
  { matchUpsCount: 0 }
8012
8030
  );
8031
+ return { ...eventsDrawMatchUpsResult, groupInfo };
8013
8032
  }
8014
8033
  function eventMatchUps(params) {
8015
8034
  let {
@@ -8048,8 +8067,13 @@ function eventMatchUps(params) {
8048
8067
  surfaceCategory: event.surfaceCategory ?? tournamentRecord?.surfaceCategory
8049
8068
  })
8050
8069
  };
8070
+ let groupInfo;
8051
8071
  if (!tournamentParticipants && tournamentRecord) {
8052
- ({ participants: tournamentParticipants, participantMap } = hydrateParticipants({
8072
+ ({
8073
+ participants: tournamentParticipants,
8074
+ participantMap,
8075
+ groupInfo
8076
+ } = hydrateParticipants({
8053
8077
  participantsProfile,
8054
8078
  policyDefinitions,
8055
8079
  useParticipantMap,
@@ -8066,8 +8090,8 @@ function eventMatchUps(params) {
8066
8090
  event
8067
8091
  });
8068
8092
  const drawDefinitions = event.drawDefinitions ?? [];
8069
- return drawDefinitions.reduce((matchUps, drawDefinition) => {
8070
- const drawMatchUps2 = getDrawMatchUps({
8093
+ const eventResult = drawDefinitions.reduce((results, drawDefinition) => {
8094
+ const drawMatchUpsResult = getDrawMatchUps({
8071
8095
  context: additionalContext,
8072
8096
  tournamentAppliedPolicies,
8073
8097
  scheduleVisibilityFilters,
@@ -8086,14 +8110,17 @@ function eventMatchUps(params) {
8086
8110
  inContext,
8087
8111
  event
8088
8112
  });
8089
- const keys = Object.keys(drawMatchUps2);
8113
+ const keys = Object.keys(drawMatchUpsResult);
8090
8114
  keys?.forEach((key) => {
8091
- if (!matchUps[key])
8092
- matchUps[key] = [];
8093
- matchUps[key] = matchUps[key].concat(drawMatchUps2[key]);
8115
+ if (Array.isArray(drawMatchUpsResult[key])) {
8116
+ if (!results[key])
8117
+ results[key] = [];
8118
+ results[key] = results[key].concat(drawMatchUpsResult[key]);
8119
+ }
8094
8120
  });
8095
- return matchUps;
8121
+ return results;
8096
8122
  }, {});
8123
+ return { ...eventResult, ...SUCCESS, groupInfo };
8097
8124
  }
8098
8125
  function drawMatchUps({
8099
8126
  participants: tournamentParticipants,
@@ -8128,8 +8155,13 @@ function drawMatchUps({
8128
8155
  surfaceCategory: event?.surfaceCategory ?? tournamentRecord?.surfaceCategory
8129
8156
  })
8130
8157
  };
8158
+ let groupInfo;
8131
8159
  if (!tournamentParticipants?.length && tournamentRecord) {
8132
- ({ participants: tournamentParticipants, participantMap } = hydrateParticipants({
8160
+ ({
8161
+ participants: tournamentParticipants,
8162
+ participantMap,
8163
+ groupInfo
8164
+ } = hydrateParticipants({
8133
8165
  participantsProfile,
8134
8166
  policyDefinitions,
8135
8167
  useParticipantMap,
@@ -8146,7 +8178,7 @@ function drawMatchUps({
8146
8178
  drawDefinition,
8147
8179
  event
8148
8180
  });
8149
- return getDrawMatchUps({
8181
+ const drawMatchUpsResult = getDrawMatchUps({
8150
8182
  context: additionalContext,
8151
8183
  tournamentAppliedPolicies,
8152
8184
  scheduleVisibilityFilters,
@@ -8165,6 +8197,7 @@ function drawMatchUps({
8165
8197
  inContext,
8166
8198
  event
8167
8199
  });
8200
+ return { ...drawMatchUpsResult, groupInfo };
8168
8201
  }
8169
8202
 
8170
8203
  function getEligibleVoluntaryConsolationParticipants({
@@ -8490,10 +8523,10 @@ function findMatchUp({
8490
8523
  return { error: MISSING_TOURNAMENT_RECORD };
8491
8524
  if (typeof matchUpId !== "string")
8492
8525
  return { error: MISSING_MATCHUP_ID };
8493
- if (!drawDefinition || !event || nextMatchUps) {
8526
+ if (!drawDefinition || !event) {
8494
8527
  const matchUps = allTournamentMatchUps({ tournamentRecord, nextMatchUps }).matchUps ?? [];
8495
8528
  const inContextMatchUp = matchUps.find(
8496
- (matchUp2) => matchUp2.matchUpId === matchUpId
8529
+ (matchUp) => matchUp.matchUpId === matchUpId
8497
8530
  );
8498
8531
  if (!inContextMatchUp)
8499
8532
  return { error: MATCHUP_NOT_FOUND };
@@ -8522,18 +8555,41 @@ function findMatchUp({
8522
8555
  contextProfile,
8523
8556
  inContext
8524
8557
  });
8525
- const { matchUp, structure } = findDrawMatchUp({
8526
- context: inContext ? additionalContext : void 0,
8527
- tournamentParticipants,
8528
- afterRecoveryTimes,
8529
- contextContent,
8530
- drawDefinition,
8531
- contextProfile,
8532
- matchUpId,
8533
- inContext,
8534
- event
8535
- });
8536
- return { matchUp, structure, drawDefinition };
8558
+ if (nextMatchUps) {
8559
+ const matchUps = allDrawMatchUps({
8560
+ context: inContext ? additionalContext : void 0,
8561
+ participants: tournamentParticipants,
8562
+ afterRecoveryTimes,
8563
+ contextContent,
8564
+ contextProfile,
8565
+ drawDefinition,
8566
+ nextMatchUps,
8567
+ inContext,
8568
+ event
8569
+ }).matchUps ?? [];
8570
+ const inContextMatchUp = matchUps.find(
8571
+ (matchUp) => matchUp.matchUpId === matchUpId
8572
+ );
8573
+ if (!inContextMatchUp)
8574
+ return { error: MATCHUP_NOT_FOUND };
8575
+ const structure = drawDefinition?.structures?.find(
8576
+ (structure2) => structure2.structureId === inContextMatchUp.structureId
8577
+ );
8578
+ return { drawDefinition, structure, matchUp: inContextMatchUp };
8579
+ } else {
8580
+ const { matchUp, structure } = findDrawMatchUp({
8581
+ context: inContext ? additionalContext : void 0,
8582
+ tournamentParticipants,
8583
+ afterRecoveryTimes,
8584
+ contextContent,
8585
+ drawDefinition,
8586
+ contextProfile,
8587
+ matchUpId,
8588
+ inContext,
8589
+ event
8590
+ });
8591
+ return { matchUp, structure, drawDefinition };
8592
+ }
8537
8593
  }
8538
8594
 
8539
8595
  const getTiebreakComplement = (params) => {
@@ -10935,15 +10991,25 @@ function competitionMatchUps({
10935
10991
  inContext
10936
10992
  });
10937
10993
  });
10938
- return tournamentsMatchUps.reduce((groupings, matchUpGroupings) => {
10939
- const keys = Object.keys(matchUpGroupings);
10940
- keys.forEach((key) => {
10941
- if (!groupings[key])
10942
- groupings[key] = [];
10943
- groupings[key] = groupings[key].concat(matchUpGroupings[key]);
10944
- });
10945
- return groupings;
10946
- }, {});
10994
+ const groupInfo = {};
10995
+ const competitionMatchUpsResult = tournamentsMatchUps.reduce(
10996
+ (groupings, matchUpGroupings) => {
10997
+ const keys = Object.keys(matchUpGroupings);
10998
+ keys.forEach((key) => {
10999
+ if (Array.isArray(matchUpGroupings[key])) {
11000
+ if (!groupings[key])
11001
+ groupings[key] = [];
11002
+ groupings[key] = groupings[key].concat(matchUpGroupings[key]);
11003
+ }
11004
+ if (key === "groupInfo") {
11005
+ Object.assign(groupInfo, matchUpGroupings[key]);
11006
+ }
11007
+ });
11008
+ return groupings;
11009
+ },
11010
+ {}
11011
+ );
11012
+ return { ...competitionMatchUpsResult, groupInfo };
10947
11013
  }
10948
11014
 
10949
11015
  function competitionScheduleMatchUps(params) {
@@ -11038,7 +11104,7 @@ function competitionScheduleMatchUps(params) {
11038
11104
  params.matchUpFilters.excludeMatchUpStatuses = [COMPLETED];
11039
11105
  }
11040
11106
  }
11041
- const { completedMatchUps, upcomingMatchUps, pendingMatchUps } = competitionMatchUps({
11107
+ const { completedMatchUps, upcomingMatchUps, pendingMatchUps, groupInfo } = competitionMatchUps({
11042
11108
  ...params,
11043
11109
  matchUpFilters: params.matchUpFilters,
11044
11110
  contextFilters: params.contextFilters
@@ -11062,6 +11128,7 @@ function competitionScheduleMatchUps(params) {
11062
11128
  // completed matchUps for the filter date
11063
11129
  dateMatchUps,
11064
11130
  // all incomplete matchUps for the filter date
11131
+ groupInfo,
11065
11132
  venues
11066
11133
  };
11067
11134
  if (withCourtGridRows) {
@@ -11072,7 +11139,7 @@ function competitionScheduleMatchUps(params) {
11072
11139
  result.courtPrefix = courtPrefix;
11073
11140
  result.rows = rows;
11074
11141
  }
11075
- return result;
11142
+ return { ...result, ...SUCCESS };
11076
11143
  function getCourtMatchUps({ courtId }) {
11077
11144
  const matchUpsToConsider = courtCompletedMatchUps ? dateMatchUps.concat(completedMatchUps ?? []) : dateMatchUps;
11078
11145
  const courtMatchUps = matchUpsToConsider.filter(