@my-swu/simulator-client
@my-swu/simulator-client
Example:
ts
import { createSimulatorClient } from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
baseUrl: 'http://127.0.0.1:4000',
})
// Health is a low-cost way to verify the server is reachable.
const health = await simulatorClient.system.health()
console.log(health.status)Classes
Interfaces
- AbandonMatchRequest
- AbandonMatchResponse
- AbilityCardChoiceTargetView
- ActionAbilityView
- ActiveAiMatchRecoveryEntry
- ActiveEffectView
- AddLobbyAiPlayerRequest
- AdminMatchDebugBundle
- AdminMatchListResponse
- AdminMatchReplayResponse
- AdminMatchSummary
- AdminResource
- AiDecisionDiagnostic
- AiGameFeedback
- AiOpponentConfig
- AiSearchDiagnostic
- AiSeatStatusPayload
- AiStatusPayload
- ApiErrorResponse
- AspectCount
- AttackChoiceView
- AvailableAttackView
- BecomeLobbySpectatorRequest
- CapturedUnitView
- CaptureOptionsView
- CaptureSelection
- CardCatalogRefreshResponse
- CardChoiceResourcePaymentOptionView
- CardIdResolutionView
- CardInstanceView
- CardInteractionCue
- CardInteractionCueRequest
- CardInteractionDragOffset
- CardMetadataView
- CardReferenceMatchView
- CardsResource
- CardsResponse
- CardTextRef
- CloseTournamentRoomRequest
- CreateLimitedEventRequest
- CreateLobbyRequest
- CreateMatchHistoryReplayShareRequest
- CreateMatchHistoryReplayShareResponse
- CreateMatchRequest
- CreateMetaWindowRequest
- CreatePlaygroundShareResponse
- CreateTournamentRoomRequest
- CreateTournamentTableRequest
- CurrentAttackView
- DeckArchetype
- DeckArchetypeMatchup
- DeckEndReasonCount
- DeckFormatStats
- DeckJson
- DeckJsonCard
- DeckOpponentStats
- DeckRegistrationView
- DeckStats
- DelayedEffectOrderChoiceView
- DelayedEffectOrderOptionView
- DelayedEffectView
- DistributionAssignment
- DistributionTargetView
- DraftLobbyTimerSettings
- DraftRoundConfig
- EffectResolutionDraftView
- EffectSequenceView
- EffectSourceView
- EffectTextRefsView
- EngineHttpErrorOptions
- EngineRequestAbortedErrorOptions
- EngineWebSocket
- ErrorPayload
- EventPlayInputProvenance
- EventPlayTargetInputProvenance
- ExploitOptionsView
- FormatEventRequest
- FormatEventResponse
- FormatSeatView
- GameState
- GameTimerActiveClockView
- GameTimerReserveView
- GameTimerStateView
- GetMatchResponse
- HealthResponse
- InitiativeState
- InstructedAttackView
- JoinLimitedEventRequest
- JoinLobbyRequest
- JoinMatchRequest
- JoinTournamentRoomRequest
- JoinTournamentTableRequest
- KickLobbyPlayerRequest
- KickLobbySpectatorRequest
- LeaderActionView
- LeaderDeployActionView
- LeaderDeployCostView
- LeaderStateView
- LeaveLimitedEventRequest
- LeaveLobbyRequest
- LeaveMatchRequest
- LeaveMatchResponse
- LeaveTournamentRoomRequest
- LimitedDeckSourceView
- LimitedEventAccessInput
- LimitedEventAccessResponse
- LimitedEventCommandRequest
- LimitedEventPhaseView
- LimitedEventPreflightResponse
- LimitedEventReference
- LimitedEventResponse
- LimitedEventSeatView
- LimitedEventSession
- LimitedEventSessionEvents
- LimitedEventSessionState
- LimitedEventsResource
- LimitedEventView
- LimitedEventViewerView
- LimitedLobbyTimerSettings
- LimitedPackCardView
- LimitedSideboardPoolView
- LimitedTournamentConfig
- LimitedTournamentPairingView
- LimitedTournamentResult
- LimitedTournamentRoundView
- LimitedTournamentStandingView
- LimitedTournamentView
- ListActiveAiMatchesRequest
- ListActiveAiMatchesResponse
- LobbiesResource
- LobbyAccessInput
- LobbyAccessResponse
- LobbyChatMessage
- LobbyChatRequest
- LobbyChatResponse
- LobbyClosedPayload
- LobbyDeckPreview
- LobbyDeckSetPreview
- LobbyGameTimerSettings
- LobbyKickedPayload
- LobbyListResponse
- LobbyListSession
- LobbyListSessionEvents
- LobbyListSessionOptions
- LobbyListSessionState
- LobbyMatchmakingDecisionRequest
- LobbyMatchmakingRequest
- LobbyPlayerView
- LobbyPrivateAiPlayerView
- LobbyPrivateView
- LobbyResponse
- LobbySession
- LobbySessionEvents
- LobbySnapshot
- LobbySpectatorView
- LobbySyncRequest
- LobbyTimerSettings
- LobbyWelcomePayload
- MaintenanceStatus
- MatchAccessInput
- MatchAccessRecoveryRequest
- MatchAccessResponse
- MatchChatLookupResponse
- MatchChatMessage
- MatchesResource
- MatchHistoryDeckStatsRequest
- MatchHistoryDeckStatsResponse
- MatchHistoryDeckSummary
- MatchHistoryEntry
- MatchHistoryListRequest
- MatchHistoryListResponse
- MatchHistoryPlayerSummary
- MatchHistoryReplayArchive
- MatchHistoryReplayInput
- MatchHistoryReplayRequest
- MatchHistoryReplayResponse
- MatchHistoryResource
- MatchHistoryRestoreInput
- MatchHistoryRestoreRequest
- MatchHistorySnapshot
- MatchRecoveryRequest
- MatchReference
- MatchResult
- MatchSavePayload
- MatchSaveSeat
- MatchSeriesView
- MatchSession
- MatchSessionAutoReconnectPolicy
- MatchSessionConnectOptions
- MatchSessionEvents
- MatchSessionHeartbeatPolicy
- MatchSessionOptions
- MatchSessionState
- MatchSessionWaitOptions
- MatchSpectatorAccessInput
- MatchSpectatorAccessResponse
- MctsConfigOverride
- MetaWindow
- MetaWindowsResponse
- ModeChoiceView
- PendingAbilityAspectChoiceView
- PendingAbilityAttackChoiceView
- PendingAbilityCardChoiceView
- PendingAbilityModeChoiceView
- PendingAbilityNameChoiceView
- PendingAbilityOrderAbilityView
- PendingAbilityOrderChoiceView
- PendingAbilityOrderGroupView
- PendingAbilityView
- PendingDistributionView
- PendingUndoRequest
- PlayActionView
- PlayCardSourceView
- PlaygroundActionAbilityView
- PlaygroundExportPayload
- PongPayload
- PrepareLobbyLimitedAiDecksRequest
- PromptProvenanceView
- PublicLobbySummary
- PublicTournamentRoomSummary
- RankedAdminStatus
- RankedLeaderboardEntry
- RankedLeaderboardQuery
- RankedLeaderboardResponse
- RankedMatchmakingView
- RankedProfileRequest
- RankedProfileResponse
- RejectedPlayView
- RematchMatchRequest
- ResolveCardIdsRequest
- ResolveCardIdsResponse
- ResourceCardView
- ResourcePaymentOptionView
- RestoreHistoryResponse
- RestoreMatchSaveRequest
- RestoreMatchSaveResponse
- ReturnLobbyMatchRequest
- ReturnTournamentMatchRequest
- RoomPlayerPresenceEvent
- SaveMatchRequest
- SchemaTypeMap
- SchemaValidator
- SeatState
- SeriesGameRecord
- SeriesResultView
- SessionResource
- SetAiPausedRequest
- SetPlaygroundAiSeatRequest
- SetRankedAdmissionRequest
- SetSimulatorMaintenanceRequest
- SharedCounterState
- SharedMatchHistoryReplayResponse
- SimulatorAdminAuth
- SimulatorAdminStatusResponse
- SimulatorAvailabilityResponse
- SimulatorClient
- SimulatorClientOptions
- SimulatorReportListResponse
- SimulatorReportResponse
- SimulatorReportSummary
- SimulatorRequestOptions
- SimulatorRuntimeStats
- SmuggleActionView
- SpectateLobbyRequest
- SpectateMatchRequest
- StartLobbyLimitedMatchRequest
- StartLobbyRequest
- StartTournamentEventRequest
- SubmitAiGameFeedbackInput
- SubmitAiGameFeedbackRequest
- SubmitAiGameFeedbackResponse
- SubmitLobbyLimitedDeckRequest
- SubmitMatchDeckRequest
- SubmitMatchDeckResponse
- SubmitTournamentDeckRequest
- SystemResource
- TargetSelectionGroup
- TargetSelectionPlanView
- TournamentEventCommandRequest
- TournamentRoomAccessInput
- TournamentRoomAccessResponse
- TournamentRoomChatRequest
- TournamentRoomChatResponse
- TournamentRoomListResponse
- TournamentRoomMatchReadyPayload
- TournamentRoomPlayerView
- TournamentRoomPrivateView
- TournamentRoomResponse
- TournamentRoomSession
- TournamentRoomSessionEvents
- TournamentRoomSnapshot
- TournamentRoomsResource
- TournamentRoomSyncRequest
- TournamentRoomWelcomePayload
- TournamentTableView
- TwinSunsCountersView
- UndoMatchRequest
- UndoMatchResponse
- UndoRespondMatchRequest
- UnitCopiedCardEntry
- UnitStateView
- UpdateLobbyAiPlayerRequest
- UpdateLobbyPlayerRequest
- UpdateLobbySettingsRequest
- UpdateTournamentRoomPlayerRequest
- UpdateTournamentRoomSettingsRequest
- UpgradeStateView
- WebSocketCloseInfo
- WelcomePayload
- WinLossDrawRecord
Type Aliases
- AbilityCardChoiceTarget
- AbilityTarget
- AbilityWindow
- ActionAbilitySource
- ActiveAiMatchLimitScope
- ActiveEffectDescriptionView
- AiDecisionSearchMode
- AiDifficulty
- AiGameFeedbackRating
- AiTrilogyFormatMode
- AttachHostSchema
- AttachmentMode
- AttackTarget
- CardArena
- CardDrawSource
- CardIdResolution
- CardInteractionCueKind
- CardInteractionCueState
- CardMetadata
- CardReferenceInput
- CardReferenceType
- CardType
- ClientMessage
- CloseTournamentRoomActiveMatches
- ConnectionState
- ConstructedFormat
- CurrentAttackStateView
- DeckInput
- DeckPlacement
- DeckStatsArchetype
- DeckStatsOpponentKind
- DelayedEffectDescriptionView
- DelayedEffectTimingView
- DistributionDamageKindView
- DistributionItemView
- DistributionTokenKindView
- EffectCardScopeView
- EffectDurationView
- EffectResolutionDraftStepView
- EffectRestrictionView
- EffectSequenceOrder
- EffectTargetView
- EngineRequestAbortKind
- FetchLike
- FormatEventCommand
- FormatSetupInput
- GameCommand
- GameEvent
- HiddenCardChoiceMode
- HiddenZoneKind
- HistoryIdentityInput
- HistoryRestoreEligibility
- HistoryRestoreUnavailableReason
- HistorySection
- HistoryStatus
- InitiativeChoiceReason
- LeaderDeployMode
- LeaderDeployThresholdBonus
- LimitedCardSlot
- LimitedCardTreatment
- LimitedEventAccess
- LimitedEventCommand
- LimitedEventKind
- LimitedEventPreflight
- LimitedEventPreflightIssue
- LimitedEventServerMessage
- LimitedEventSnapshot
- LimitedTournamentPhase
- LimitedTournamentResultSource
- LimitedTournamentStage
- LimitedTournamentStructure
- LimitedTournamentTableStatus
- LobbyClosedReason
- LobbyConfig
- LobbyErrorCode
- LobbyListAutoReconnect
- LobbyListServerMessage
- LobbyMatchmakingConfig
- LobbyMatchmakingKind
- LobbyMatchmakingView
- LobbyMatchmakingView1
- LobbyParticipantRole
- LobbyPlayerController
- LobbyRemovalReason
- LobbyServerMessage
- LobbyStartedAccess
- LobbyStatus
- LobbyVisibility
- MatchAccess
- MatchAccessRecoveryResponse
- MatchConnectionAccessInput
- MatchConnectionRole
- MatchEndReason
- MatchFormat
- MatchHistoryFeedEntry
- MatchHistoryFeedEntry1
- MatchPhase
- MatchQuickPhrase
- MatchRecoveryInput
- MatchRecoveryResponse
- MatchScenarioInput
- MatchSeat
- MatchSessionAccess
- MatchSessionAutoReconnectOptions
- MatchSessionHeartbeatOptions
- MatchSessionReconnectState
- MatchSessionSnapshotPredicate
- MatchSessionTerminalCause
- MatchSpectatorAccess
- MatchStatus
- NamedCardEffectDescriptionView
- NullableDistributionTokenKindView
- NullableSeatView
- PendingAbilityCardChoiceInputKind
- PendingAbilityFamily
- PendingAbilityModeChoiceInputKind
- PendingAbilityNameChoiceDomain
- PendingChoiceView
- PlayAttachment
- PlayCardZone
- PlayerPresenceStatus
- PlaygroundCardStateChange
- PlaygroundCommand
- PlaygroundDamageTarget
- PlaygroundDefeatTarget
- PromptShape
- PromptState
- RankedLeaderboardOptions
- RankedQueue
- RelationFilter
- RematchMatchResponse
- RequiredNullableMaintenanceMessage
- Seat
- SeatOfferIntent
- SeriesEndReason
- ServerMessage
- SimulatorMessage
- SimulatorSocketErrorKind
- SmuggleKind
- TargetGroupPurpose
- TargetingActionView
- TournamentRoomServerMessage
- TournamentRoomStatus
- TournamentTableStatus
- TriggerWindowView
- TurnPassSource
- TwinSunsCounter
- UndoCancelReason
- UndoRequestReason
- UnitAbilitySuppressionView
- UnitDefeatCause
- WebSocketFactory
Variables
Functions
- aiFormatEventMessage
- canDeployAnyLeader
- chatMessage
- commandMessage
- createSchemaValidator
- createSimulatorClient
- flattenTargetGroups
- formatEventMessage
- getDeployableLeaderIndices
- getLeaderDeployCommands
- interactionCueMessage
- isSingleTargetPlan
- isStaleLobbySnapshot
- leaderDeployCommand
- lobbyServerClockOffsetMs
- parseSchema
- pingMessage
- readyMessage
- setAiPausedMessage
- syncRequestMessage
- targetGroupsOf
- undoMessage
- undoResponseMessage
