tods-competition-factory 1.8.27 → 1.8.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.
@@ -2929,7 +2929,7 @@ var matchUpFormatCode = {
2929
2929
  };
2930
2930
 
2931
2931
  function factoryVersion() {
2932
- return '1.8.27';
2932
+ return '1.8.28';
2933
2933
  }
2934
2934
 
2935
2935
  function getObjectTieFormat(obj) {
@@ -3599,9 +3599,10 @@ function genderValidityCheck(_a) {
3599
3599
  stack: stack,
3600
3600
  });
3601
3601
  }
3602
- if (matchUpType === TypeEnum.Singles && referenceGender === MIXED)
3602
+ if (referenceGender === MIXED &&
3603
+ (gender !== MIXED || matchUpType === TypeEnum.Singles))
3603
3604
  return decorateResult({
3604
- info: 'matchUpType SINGLES is invalid for gender MIXED',
3605
+ info: 'MIXED events can only contain MIXED doubles collections',
3605
3606
  result: { error: INVALID_GENDER, valid: false },
3606
3607
  stack: stack,
3607
3608
  });
@@ -31625,13 +31626,13 @@ function modifyCollectionDefinition$1(_a) {
31625
31626
 
31626
31627
  function resolveTournamentRecord(params) {
31627
31628
  var method = params.method, tournamentRecords = params.tournamentRecords, args = __rest(params, ["method", "tournamentRecords"]);
31629
+ if (!method)
31630
+ return { error: MISSING_VALUE };
31628
31631
  // find tournamentId by brute force if not provided
31629
- var tournamentId = params.tournamentId || findTournamentId(args);
31632
+ var tournamentId = params.tournamentId || findTournamentId(__assign({ tournamentRecords: tournamentRecords }, args));
31630
31633
  if (typeof tournamentId !== 'string')
31631
31634
  return { error: MISSING_TOURNAMENT_ID };
31632
31635
  var tournamentRecord = tournamentRecords[tournamentId];
31633
- if (!tournamentRecord)
31634
- return { error: MISSING_TOURNAMENT_RECORD };
31635
31636
  return method(__assign(__assign({}, args), { tournamentRecord: tournamentRecord }));
31636
31637
  }
31637
31638
 
@@ -32873,13 +32874,13 @@ function publicFindMatchUp(params) {
32873
32874
  function findMatchUp(_a) {
32874
32875
  var _b;
32875
32876
  var _c, _d, _e, _f;
32876
- var participantsProfile = _a.participantsProfile, afterRecoveryTimes = _a.afterRecoveryTimes, tournamentRecord = _a.tournamentRecord, contextContent = _a.contextContent, contextProfile = _a.contextProfile, drawDefinition = _a.drawDefinition, matchUpId = _a.matchUpId, inContext = _a.inContext, eventId = _a.eventId, drawId = _a.drawId, event = _a.event;
32877
+ var participantsProfile = _a.participantsProfile, afterRecoveryTimes = _a.afterRecoveryTimes, tournamentRecord = _a.tournamentRecord, contextContent = _a.contextContent, contextProfile = _a.contextProfile, drawDefinition = _a.drawDefinition, nextMatchUps = _a.nextMatchUps, matchUpId = _a.matchUpId, inContext = _a.inContext, eventId = _a.eventId, drawId = _a.drawId, event = _a.event;
32877
32878
  if (!tournamentRecord)
32878
32879
  return { error: MISSING_TOURNAMENT_RECORD };
32879
32880
  if (typeof matchUpId !== 'string')
32880
32881
  return { error: MISSING_MATCHUP_ID };
32881
- if (!drawDefinition || !event) {
32882
- var matchUps = (_c = allTournamentMatchUps({ tournamentRecord: tournamentRecord }).matchUps) !== null && _c !== void 0 ? _c : [];
32882
+ if (!drawDefinition || !event || nextMatchUps) {
32883
+ var matchUps = (_c = allTournamentMatchUps({ tournamentRecord: tournamentRecord, nextMatchUps: nextMatchUps }).matchUps) !== null && _c !== void 0 ? _c : [];
32883
32884
  var inContextMatchUp = matchUps.find(function (matchUp) { return matchUp.matchUpId === matchUpId; });
32884
32885
  if (!inContextMatchUp)
32885
32886
  return { error: MATCHUP_NOT_FOUND };
@@ -39109,7 +39110,7 @@ function getSchedulingProfileIssues(params) {
39109
39110
  }
39110
39111
 
39111
39112
  function credits() {
39112
- return "\n This project would not have been possible without the generous input and patience\n of tournament organizers and directors who worked with early versions of CourtHive/TMX.\n\n Thanks to Pavel, Ivan, Mladen, Zdenko, Antoina, Jakov, Kreso, Barry, Jeff, Bobby... to name just a few. \n\n The project would not have even begun without the support of Miro, or the introduction by Sretchko.\n The project would not have succeeded without the enthusiasm of Randy and Bruce.\n Thanks to serendipity and Luca and the ensuing TODS conversations with ITF.\n Thanks to Scott and Jake for sanity checks, suggestions, and camaraderie.\n Thanks to Zoran for inspiring the async support and getting into the weeds with subscriptions.\n Thanks to Dave for backing the conversion of TMX 1.x source into the factory repository.\n Thanks to Vuk and Pavle and Rich and Chris and Deepa for the direct engagement with the APIs.\n Thanks to Joe for repeatedly challenging me and the many pointers to useful tooling.\n Thanks to Shannon for the validation of the approach from his deep domain experience.\n Thanks to Nikola for the ongoing camaraderie and explorations of what we can do with TODS.\n\n And a special thanks to my family for putting up with the long days and weeks and months of coding\n and conversations at all hours.\n ";
39113
+ return "\n This project would not have been possible without the generous input and patience\n of tournament organizers and directors who worked with early versions of CourtHive/TMX.\n\n Thanks to Pavel, Ivan, Mladen, Zdenko, Antonia, Jakov, Kreso, Barry, Jeff, Bobby... to name just a few. \n\n The project would not have even begun without the support of Miro, or the introduction by Sretchko.\n The project would not have succeeded without the enthusiasm of Randy and Bruce.\n Thanks to serendipity and Luca and the ensuing TODS conversations with ITF.\n Thanks to Scott and Jake for sanity checks, suggestions, and camaraderie.\n Thanks to Zoran for inspiring the async support and getting into the weeds with subscriptions.\n Thanks to Dave for backing the conversion of TMX 1.x source into the factory repository.\n Thanks to Vuk and Pavle and Rich and Chris and Deepa for the direct engagement with the APIs.\n Thanks to Joe for repeatedly challenging me and the many pointers to useful tooling.\n Thanks to Shannon for the validation of the approach from his deep domain experience.\n Thanks to Nikola for the ongoing camaraderie and explorations of what we can do with TODS.\n\n And a special thanks to my family for putting up with the long days and weeks and months of coding\n and conversations at all hours.\n ";
39113
39114
  }
39114
39115
 
39115
39116
  function getValidAlternatesAction(_a) {
@@ -59602,8 +59603,7 @@ function getParticipantStats(_a) {
59602
59603
  return { error: INVALID_MATCHUP };
59603
59604
  var participantsProfile = withScaleValues ? { withScaleValues: withScaleValues } : undefined;
59604
59605
  matchUps =
59605
- matchUps ||
59606
- allTournamentMatchUps({ tournamentRecord: tournamentRecord, participantsProfile: participantsProfile }).matchUps;
59606
+ matchUps !== null && matchUps !== void 0 ? matchUps : allTournamentMatchUps({ tournamentRecord: tournamentRecord, participantsProfile: participantsProfile }).matchUps;
59607
59607
  if (!(matchUps === null || matchUps === void 0 ? void 0 : matchUps.length))
59608
59608
  return { error: MISSING_MATCHUPS };
59609
59609
  var teamParticipantIds = [];
@@ -59682,6 +59682,9 @@ function getParticipantStats(_a) {
59682
59682
  participantName: participant.participantName,
59683
59683
  ratings: participant.ratings,
59684
59684
  });
59685
+ var stats = participantStats.get(participant.participantId);
59686
+ if (stats)
59687
+ stats.participantName = participant.participantName;
59685
59688
  }
59686
59689
  }
59687
59690
  }
@@ -67576,6 +67579,7 @@ var lastNames = [
67576
67579
  "Dallas",
67577
67580
  "Diamond",
67578
67581
  "Deckard",
67582
+ "Drazic",
67579
67583
  "Dunbar",
67580
67584
  "Earhart",
67581
67585
  "Eisenstein",
@@ -67656,7 +67660,7 @@ var firstFemale = [
67656
67660
  "Amelie",
67657
67661
  "America",
67658
67662
  "Anne",
67659
- "Antoina",
67663
+ "Antonia",
67660
67664
  "Aravis",
67661
67665
  "Astrid",
67662
67666
  "Beatrice",