tods-competition-factory 2.2.0 → 2.2.1
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 +6 -6
- package/dist/tods-competition-factory.d.ts +3 -0
- package/dist/tods-competition-factory.development.cjs.js +20 -5
- 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
|
@@ -5689,6 +5689,7 @@ declare function allCompetitionMatchUps({ scheduleVisibilityFilters, afterRecove
|
|
|
5689
5689
|
type GetAllStructureMatchUps = {
|
|
5690
5690
|
scheduleVisibilityFilters?: ScheduleVisibilityFilters;
|
|
5691
5691
|
tournamentAppliedPolicies?: PolicyDefinitions;
|
|
5692
|
+
participantsProfile?: ParticipantsProfile;
|
|
5692
5693
|
tournamentParticipants?: Participant[];
|
|
5693
5694
|
policyDefinitions?: PolicyDefinitions;
|
|
5694
5695
|
seedAssignments?: SeedAssignment[];
|
|
@@ -5706,6 +5707,7 @@ type GetAllStructureMatchUps = {
|
|
|
5706
5707
|
contextProfile?: ContextProfile;
|
|
5707
5708
|
tournamentRecord?: Tournament;
|
|
5708
5709
|
afterRecoveryTimes?: boolean;
|
|
5710
|
+
useParticipantMap?: boolean;
|
|
5709
5711
|
usePublishState?: boolean;
|
|
5710
5712
|
exitProfiles?: ExitProfiles;
|
|
5711
5713
|
matchUpsMap?: MatchUpsMap;
|
|
@@ -7306,6 +7308,7 @@ type GetEventDataArgs = {
|
|
|
7306
7308
|
usePublishState?: boolean;
|
|
7307
7309
|
refreshResults?: boolean;
|
|
7308
7310
|
pressureRating?: boolean;
|
|
7311
|
+
contextProfile?: any;
|
|
7309
7312
|
eventId?: string;
|
|
7310
7313
|
status?: string;
|
|
7311
7314
|
event?: Event$1;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function factoryVersion() {
|
|
6
|
-
return '2.2.
|
|
6
|
+
return '2.2.1';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const SINGLES_MATCHUP = 'SINGLES';
|
|
@@ -10786,17 +10786,28 @@ function getAllStructureMatchUps(params) {
|
|
|
10786
10786
|
structureId,
|
|
10787
10787
|
}).drawPositionsRanges
|
|
10788
10788
|
: undefined;
|
|
10789
|
+
let tournamentParticipants = params.tournamentParticipants;
|
|
10790
|
+
let participantMap = params.participantMap;
|
|
10791
|
+
if (!tournamentParticipants?.length && !participantMap && tournamentRecord) {
|
|
10792
|
+
({ participants: tournamentParticipants = [], participantMap } = hydrateParticipants({
|
|
10793
|
+
participantsProfile: params.participantsProfile,
|
|
10794
|
+
useParticipantMap: params.useParticipantMap,
|
|
10795
|
+
policyDefinitions: params.policyDefinitions,
|
|
10796
|
+
tournamentRecord,
|
|
10797
|
+
contextProfile,
|
|
10798
|
+
inContext,
|
|
10799
|
+
}));
|
|
10800
|
+
}
|
|
10789
10801
|
matchUps = matchUps.map((matchUp) => {
|
|
10790
10802
|
return addMatchUpContext({
|
|
10791
|
-
tournamentParticipants: params.tournamentParticipants ?? tournamentRecord?.participants,
|
|
10792
10803
|
scheduleVisibilityFilters: params.scheduleVisibilityFilters,
|
|
10793
10804
|
hydrateParticipants: params.hydrateParticipants,
|
|
10794
10805
|
afterRecoveryTimes: params.afterRecoveryTimes,
|
|
10795
10806
|
usePublishState: params.usePublishState,
|
|
10796
|
-
participantMap: params.participantMap,
|
|
10797
10807
|
scheduleTiming: params.scheduleTiming,
|
|
10798
10808
|
publishStatus: params.publishStatus,
|
|
10799
10809
|
sourceDrawPositionRanges,
|
|
10810
|
+
tournamentParticipants,
|
|
10800
10811
|
positionAssignments,
|
|
10801
10812
|
drawPositionsRanges,
|
|
10802
10813
|
initialRoundOfPlay,
|
|
@@ -10805,6 +10816,7 @@ function getAllStructureMatchUps(params) {
|
|
|
10805
10816
|
appliedPolicies,
|
|
10806
10817
|
seedAssignments,
|
|
10807
10818
|
contextContent,
|
|
10819
|
+
participantMap,
|
|
10808
10820
|
contextProfile,
|
|
10809
10821
|
drawDefinition,
|
|
10810
10822
|
scoringActive,
|
|
@@ -34813,7 +34825,7 @@ const displayConstants = {
|
|
|
34813
34825
|
};
|
|
34814
34826
|
|
|
34815
34827
|
function getDrawData(params) {
|
|
34816
|
-
const { tournamentParticipants = [], includePositionAssignments, policyDefinitions, tournamentRecord, inContext = true, usePublishState, status = PUBLIC, pressureRating, refreshResults, drawDefinition, noDeepCopy, sortConfig, context, event, } = params;
|
|
34828
|
+
const { tournamentParticipants = [], includePositionAssignments, policyDefinitions, tournamentRecord, inContext = true, usePublishState, status = PUBLIC, pressureRating, refreshResults, contextProfile, drawDefinition, noDeepCopy, sortConfig, context, event, } = params;
|
|
34817
34829
|
if (!drawDefinition)
|
|
34818
34830
|
return { error: MISSING_DRAW_DEFINITION };
|
|
34819
34831
|
const drawInfo = (({ matchUpFormat, updatedAt, drawType, drawName, drawId }) => ({
|
|
@@ -34868,11 +34880,13 @@ function getDrawData(params) {
|
|
|
34868
34880
|
seedAssignments: !structure?.seedAssignments?.length ? seedAssignments : undefined,
|
|
34869
34881
|
context: { drawId: drawInfo.drawId, ...context },
|
|
34870
34882
|
hydrateParticipants: params.hydrateParticipants,
|
|
34883
|
+
participantsProfile: params.participantsProfile,
|
|
34871
34884
|
tournamentParticipants,
|
|
34872
34885
|
policyDefinitions,
|
|
34873
34886
|
tournamentRecord,
|
|
34874
34887
|
usePublishState,
|
|
34875
34888
|
publishStatus,
|
|
34889
|
+
contextProfile,
|
|
34876
34890
|
drawDefinition,
|
|
34877
34891
|
inContext,
|
|
34878
34892
|
structure,
|
|
@@ -34984,7 +34998,7 @@ function getDrawData(params) {
|
|
|
34984
34998
|
}
|
|
34985
34999
|
|
|
34986
35000
|
function getEventData(params) {
|
|
34987
|
-
const { includePositionAssignments, participantsProfile, policyDefinitions, usePublishState, status = PUBLIC, sortConfig, } = params;
|
|
35001
|
+
const { includePositionAssignments, participantsProfile, policyDefinitions, usePublishState, status = PUBLIC, contextProfile, sortConfig, } = params;
|
|
34988
35002
|
const paramsCheck = checkRequiredParameters(params, [
|
|
34989
35003
|
{ tournamentRecord: true },
|
|
34990
35004
|
{ [ANY_OF]: { event: false, eventId: false } },
|
|
@@ -35066,6 +35080,7 @@ function getEventData(params) {
|
|
|
35066
35080
|
policyDefinitions,
|
|
35067
35081
|
tournamentRecord,
|
|
35068
35082
|
usePublishState,
|
|
35083
|
+
contextProfile,
|
|
35069
35084
|
drawDefinition,
|
|
35070
35085
|
publishStatus,
|
|
35071
35086
|
sortConfig,
|