import type { GameModelAPI } from '../domains/gameModel.js'; import type { Scalars } from '../generated/graphql.js'; import type { EngineDetector } from './engine.js'; import { type RaceTimingEvent } from './wire.js'; /** Options for {@link RacingKit}. */ export interface RacingKitOptions { /** The racing engine module name. Defaults to `'racing'`. */ moduleName?: string; /** The possession (ball) engine module name. Defaults to `'possession'`. */ possessionModuleName?: string; /** The course container type. Defaults to `'Course'`. */ courseTypeName?: string; } /** Your live run as the engine reports it. */ export interface KitRaceRun { courseId: string; started: boolean; lap: number; nextGate: number; splitsMs: number[]; bestLapMs: number; finished: boolean; totalMs: number; } /** * Runtime helpers for the racing engine (Wave 3, G16) and its possession * sub-template (G17 sports-lite): server-timed gates/laps from the pose * stream (type-97 events), course records with ghost replays on the actor * lane (suffix `ghost:`, FLAG_RESERVED3), and the authoritative * ball (claim/steal/pass/shoot; lane suffix `ball`). * * Obtained via `client.kit(appId).racing`. */ export declare class RacingKit { private readonly appId; private readonly gameModel; private readonly engines; private readonly moduleName; private readonly possessionModuleName; private readonly courseTypeName; constructor(appId: Scalars['BigInt']['input'], gameModel: GameModelAPI, engines: EngineDetector, options?: RacingKitOptions); /** Is the racing engine deployed + enabled (cached per session)? */ engineAvailable(): Promise; /** Is the possession (ball) engine deployed + enabled? */ possessionAvailable(): Promise; /** STUDIO (admin) — create a course (`gates` = [[x, z, radius], ...]). */ defineCourse(input: { courseId: string; gates: Array<[number, number, number]>; laps?: number; displayName?: string; }): Promise<{ __typename?: "GmContainer"; containerId: string; appId: string; sessionId: string | null; typeName: string; displayName: string; description: string | null; ownerUserId: string | null; metadataJson: string; }>; /** Enter a course: your next pose through gate 0 starts the clock. */ enter(courseId: string): Promise>; /** Your live run (splits, lap, next gate). */ raceStatus(): Promise; /** The course record (holder, time, ghost length). */ best(courseId: string): Promise>; /** Replay the course-record ghost onto the actor lane. */ ghostPlay(courseId: string): Promise>; /** Parse a type-97 race-timing server event. */ parseRaceTiming(bytes: Uint8Array): RaceTimingEvent | null; /** Join the ball match (teams fill by join order). */ joinMatch(): Promise>; /** Claim the free ball (or steal after the protection window). */ claim(): Promise>; /** Pass along a direction (holder only). */ pass(dirX: number, dirZ: number): Promise>; /** Shoot at the opposing goal (holder only; the server aims). */ shoot(): Promise>; /** The live ball match (teams, ball, standings, summary). */ matchState(): Promise>; private invoke; } //# sourceMappingURL=racing.d.ts.map