Skip to main content

TMX API Surface

This page documents all tods-competition-factory methods used by the TMX client and the competition-factory-server, organized by category. Each method links to its governor documentation page.


TMX Mutation Methods

These 70 methods are invoked via mutationRequest() on the client, sent through Socket.IO to the server's executionQueue, executed by the factory engine, then applied locally on acknowledgment.

Event Management

MethodGovernorContext
addEventEventCreate a new tournament event
deleteEventsEventRemove one or more events
modifyEventEventUpdate event properties

Draw Management

MethodGovernorContext
addDrawDefinitionEventAttach a draw definition to an event
deleteDrawDefinitionsEventRemove draw definitions
modifyDrawDefinitionDrawsUpdate draw definition properties
resetDrawDefinitionDrawsReset a draw to its initial state
removeStructureDrawsRemove a structure from a draw
renameStructuresDrawsRename structures within a draw
addPlayoffStructuresDrawsAdd playoff structures to a draw
automatedPlayoffPositioningDrawsAuto-position participants in playoff structures
attachQualifyingStructureDrawsLink a qualifying structure to a main draw

Draw Generation

MethodGovernorContext
generateDrawDefinitionGenerationGenerate a complete draw definition
generateFlightProfileGenerationGenerate flight profile for an event
attachFlightProfileEventAttach a flight profile to an event
deleteFlightAndFlightDrawEventRemove a flight and its associated draw
addFlightEventAdd a flight to an event's flight profile

Ad Hoc Draws

MethodGovernorContext
addAdHocMatchUpsDrawsAdd matchUps to an ad hoc draw
deleteAdHocMatchUpsDrawsRemove matchUps from an ad hoc draw
luckyDrawAdvancementDrawsAdvance participants in a lucky draw

Entry Management

MethodGovernorContext
addEventEntriesEntriesAdd participants to an event's entry list
addDrawEntriesEntriesAdd participants to a draw's entry list
addEventEntryPairsEntriesAdd doubles pairs to an event
modifyEntriesStatusEntriesChange entry status (e.g., ALTERNATE, WITHDRAWN)
destroyPairEntriesEntriesBreak apart doubles pair entries

Participant Management

MethodGovernorContext
addParticipantsParticipantAdd participants to a tournament
deleteParticipantsParticipantRemove participants from a tournament
modifyParticipantParticipantUpdate participant details
addIndividualParticipantIdsParticipantAdd individuals to a group/team participant
removeIndividualParticipantIdsParticipantRemove individuals from a group/team participant

Scoring

MethodGovernorContext
setMatchUpStatusMatchUpSet matchUp score and outcome
resetScorecardMatchUpClear a matchUp's score
setMatchUpFormatMatchUpSet scoring format for a matchUp

Positioning

MethodGovernorContext
setPositionAssignmentsDrawsAssign participants to draw positions
setSubOrderDrawsSet sub-ordering within a draw position

Scheduling

MethodGovernorContext
addMatchUpScheduleItemsScheduleAdd schedule details to a matchUp
bulkScheduleMatchUpsScheduleSchedule multiple matchUps at once
proAutoScheduleScheduleAutomated pro-level scheduling

Team / Tie Operations

MethodGovernorContext
modifyTieFormatEventModify a tie format definition
assignTieMatchUpParticipantIdMatchUpAssign a participant to a tie matchUp
removeTieMatchUpParticipantIdMatchUpRemove a participant from a tie matchUp
resetMatchUpLineUpsMatchUpReset lineUps for a team matchUp

Venue Management

MethodGovernorContext
addVenueVenueAdd a venue to a tournament
deleteVenuesVenueRemove venues
modifyVenueVenueUpdate venue properties
addCourtsVenueAdd courts to a venue
modifyCourtVenueUpdate court properties
modifyCourtAvailabilityVenueSet court availability windows

Publishing

MethodGovernorContext
publishEventPublishingPublish event data
unPublishEventPublishingUnpublish event data
publishEventSeedingPublishingPublish event seeding
unPublishEventSeedingPublishingUnpublish event seeding
publishOrderOfPlayPublishingPublish order of play
unPublishOrderOfPlayPublishingUnpublish order of play
publishParticipantsPublishingPublish participant data
unPublishParticipantsPublishingUnpublish participant data

Seeding / Ratings

MethodGovernorContext
generateSeedingScaleItemsGenerationGenerate seeding from scale items
setParticipantScaleItemsParticipantSet ranking/seeding scale items on participants
addDynamicRatingsParticipantAdd dynamic ratings to participants
addParticipantTimeItemParticipantAdd a time item to a participant

Sign-in

MethodGovernorContext
modifyParticipantsSignInStatusParticipantUpdate sign-in status for participants

Tournament Settings

MethodGovernorContext
setTournamentDatesTournamentSet tournament start/end dates
setTournamentNameTournamentSet tournament name
setTournamentNotesTournamentSet tournament notes

Extensions / Resources

MethodGovernorContext
addTournamentExtensionTournamentAdd an extension to the tournament record
addDrawDefinitionExtensionDrawsAdd an extension to a draw definition
addEventExtensionEventAdd an extension to an event
addTournamentTimeItemTournamentAdd a time item to the tournament
addOnlineResourceTournamentAdd an online resource (URL, image, etc.)

Policies

MethodGovernorContext
attachPoliciesPolicyAttach policy definitions to a tournament

TMX Query Methods

These ~51 methods are called directly on tournamentEngine for read-only operations.

Tournament State

MethodGovernorContext
getTournamentQueryGet the full tournament record
setStateEngineLoad a tournament record into the engine
resetEngineClear engine state
getTournamentInfoTournamentGet tournament summary info
getTournamentTimeItemTournamentGet a specific time item from the tournament
newTournamentRecordTournamentCreate a new empty tournament record
versionEngineGet factory version

Event Queries

MethodGovernorContext
getEventEventGet a single event by ID
getEventsEventGet all events in a tournament
getEventDataPublishingGet event data with draw and matchUp details

Draw Queries

MethodGovernorContext
findDrawDefinitionDrawsFind a draw definition by ID
isAdHocDrawsCheck if a draw is ad hoc type
isValidForQualifyingDrawsCheck if a structure can have qualifying
getAvailablePlayoffProfilesDrawsGet available playoff configurations
getValidGroupSizesDrawsGet valid group sizes for round robin

MatchUp Queries

MethodGovernorContext
findMatchUpMatchUpFind a matchUp by ID
allDrawMatchUpsMatchUpGet all matchUps in a draw
allEventMatchUpsMatchUpGet all matchUps in an event
allTournamentMatchUpsQueryGet all matchUps in a tournament
tournamentMatchUpsQueryGet matchUps grouped by status
matchUpActionsMatchUpGet available actions for a matchUp
positionActionsDrawsGet available actions for a draw position
getMatchUpFormatMatchUpGet the scoring format for a matchUp
calculateWinCriteriaMatchUpCalculate win criteria for a matchUp format
checkScoreHasValueScoreCheck if a score object has a value

Participant Queries

MethodGovernorContext
getParticipantsParticipantGet participants with optional filtering
getParticipantStatsQueryGet statistics for a participant
getPredictiveAccuracyMatchUpGet predictive accuracy metrics

Query Draw Generation

MethodGovernorContext
generateDrawDefinitionGenerationGenerate a draw (also used as query for preview)
generateAdHocMatchUpsGenerationGenerate matchUps for ad hoc draws
generateQualifyingStructureGenerationGenerate a qualifying structure
generateFlightProfileGenerationGenerate a flight profile
generateSeedingScaleItemsGenerationGenerate seeding scale items
drawMaticGenerationDrawMatic draw generation

Query Positioning

MethodGovernorContext
getPositionAssignmentsDrawsGet current position assignments
getEntriesAndSeedsCountEntriesGet entry count and seeds count
getSeedsCountDrawsGet the number of seeds
getLuckyDrawRoundStatusDrawsGet status of lucky draw rounds

Query Scheduling

MethodGovernorContext
getCompetitionDateRangeTournamentGet competition date range

Tie Format

MethodGovernorContext
getTieFormatQueryGet the tie format for an event or draw

Venue

MethodGovernorContext
findVenueVenueFind a venue by ID

Policy / Extensions

MethodGovernorContext
findPolicyPolicyFind a policy definition
getPolicyDefinitionsPolicyGet all policy definitions
findExtensionQueryFind an extension by name

Query Publishing

MethodGovernorContext
getPublishStatePublishingGet current publish state

Query Scoring

MethodGovernorContext
parseScoreStringScoreParse a score string into a score object
setMatchUpStatusMatchUpSet matchUp score (also used as query for validation)

Teams

MethodGovernorContext
createTeamsFromParticipantAttributesParticipantAuto-create team participants from attributes

Category

MethodGovernorContext
setTournamentCategoriesTournamentSet categories on the tournament record

Other Engine Calls

competitionEngine

MethodGovernorContext
competitionScheduleMatchUpsMatchUpGet scheduled matchUps across tournaments
getCompetitionDateRangeTournamentGet the date range of the competition
getTournamentInfoTournamentGet tournament info via competition engine
getVenuesAndCourtsVenueGet all venues and courts
proConflictsScheduleGet scheduling conflicts for pro events

scaleEngine

MethodGovernorContext
generateDynamicRatingsParticipantGenerate dynamic ratings across events
setStateEngineLoad state into scale engine

mocksEngine

MethodGovernorContext
generateTournamentRecordMocksGenerate a mock tournament record

scoreGovernor (direct calls)

MethodGovernorContext
checkScoreHasValueScoreCheck if a score has a value
generateScoreStringScoreGenerate a display score string
keyValueScoreScoreKey-value based score entry

queryGovernor (direct calls)

MethodGovernorContext
allTournamentMatchUpsQueryGet all tournament matchUps
compareTieFormatsQueryCompare two tie format definitions

publishingGovernor (direct calls)

MethodGovernorContext
getPublishStatePublishingGet publish state directly from governor

globalState

MethodDocumentationContext
getDevContextGlobal StateGet development context flag
setDevContextGlobal StateSet development context flag
setSubscriptionsSubscriptionsRegister topic subscription handlers

tools

MethodDocumentationContext
createMapToolsCreate a keyed map from an array
dateTimeToolsDate/time utilities
definedAttributesToolsFilter out undefined attributes
extractAttributesToolsExtract specific attributes from objects
generateDateRangeToolsGenerate an array of dates in a range
generateRangeToolsGenerate a numeric range array
intersectionToolsArray intersection
isConvertableIntegerToolsCheck if a value can be converted to integer
isNumericToolsCheck if a value is numeric
JSONToolsJSON utilities
makeDeepCopyToolsDeep copy with circular reference handling
matchUpScheduleSortToolsSort matchUps by schedule
nextPowerOfToolsGet next power of 2
structureSortToolsSort structures by stage/order
uniqueToolsDeduplicate an array
UUIDToolsGenerate a UUID
UUIDSToolsGenerate multiple UUIDs

Competition Factory Server Methods

The server uses a focused subset of factory methods for mutation execution and query serving.

Engines

MethodDocumentationContext
asyncEngineMutation EnginesCreate async mutation engine (per-request isolation)
askEngineState EnginesQuery engine with importMethods support

Mutation Engine

MethodDocumentationContext
setStateState EnginesLoad tournament records into engine
executionQueueMutation EnginesExecute a batch of mutations atomically
getStateState EnginesRetrieve current engine state

Query Methods (via askEngine)

MethodGovernorContext
getTournamentInfoTournamentGet tournament summary for responses
getEventDataPublishingGet event data for publishing
getParticipantsParticipantGet participants for responses
getTournamentPublishStatusPublishingGet full publish status
competitionScheduleMatchUpsMatchUpGet scheduled matchUps

Governors (direct usage)

MethodGovernorContext
generateTournamentRecordMocksGenerate mock tournaments for testing
reportGovernor methodsReportMerged into query engine

Server globalState

MethodDocumentationContext
setStateMethodsGlobal StateSet custom state methods
setStateProviderGlobal StateSet state provider for async isolation
setGlobalSubscriptionsSubscriptionsRegister global subscriptions
setSubscriptionsSubscriptionsRegister topic subscriptions

Server tools

MethodDocumentationContext
uniqueToolsDeduplicate arrays
UUIDToolsGenerate UUIDs

Constants

ConstantModuleValues
MISSING_TOURNAMENT_RECORDfactoryConstants / errorConditionConstantsError condition for missing tournament
SINGLESeventConstantsEvent type constant
PUBLISH_EVENT, UNPUBLISH_EVENTtopicConstantsPublish/unpublish event topics
PUBLISH_ORDER_OF_PLAY, UNPUBLISH_ORDER_OF_PLAYtopicConstantsOrder of play topics
PUBLISH_PARTICIPANTS, UNPUBLISH_PARTICIPANTStopicConstantsParticipant publishing topics
UNPUBLISH_TOURNAMENTtopicConstantsTournament unpublish topic
MODIFY_TOURNAMENT_DETAILtopicConstantsTournament detail modification topic

Fixtures

FixturePathContext
POLICY_PRIVACY_DEFAULTfixtures.policiesDefault privacy policy for participant data

Types

TypeContext
TournamentTypeScript type for tournament record