309 lines
7.2 KiB
TypeScript
309 lines
7.2 KiB
TypeScript
// <auto-generated />
|
|
// Generated by scripts/generate-rts-bindings.mjs from the RTS CultMesh surface contract.
|
|
|
|
import type {
|
|
CultMeshOperationReceipt,
|
|
CultMeshSurfaceCatalogDiagnostic,
|
|
CultMeshSurfaceCatalogIndexDiagnostic,
|
|
CultMeshViewportRequest,
|
|
} from "cultmesh-ts";
|
|
|
|
export type Viewport = CultMeshViewportRequest;
|
|
|
|
export type AetheriaRuntimeSetMoveVectorRequest = {
|
|
actorEntityKey: string;
|
|
directionX: number;
|
|
directionY: number;
|
|
scalar: number;
|
|
observedFrameId?: number;
|
|
};
|
|
|
|
export type AetheriaRuntimeSetTargetRequest = {
|
|
actorEntityKey: string;
|
|
targetEntityKey: string;
|
|
observedFrameId?: number;
|
|
};
|
|
|
|
export type AetheriaRuntimeDaemonCommandReceipt = CultMeshOperationReceipt & {
|
|
commandId: string;
|
|
};
|
|
|
|
export type AetheriaRuntimeSelectedObjectRequest = {
|
|
entityIndex: number;
|
|
};
|
|
|
|
export type AetheriaRuntimeViewportFeedRequest = {
|
|
viewport: Viewport;
|
|
selectedEntityIndex?: number;
|
|
};
|
|
|
|
export type AetheriaRuntimeViewportFeedSnapshot = {
|
|
viewport: ViewportResponse;
|
|
selectedObject: SelectedObjectProjection | null;
|
|
inventory: InventoryProjection | null;
|
|
daemonHealth: DaemonHealthProjection;
|
|
authorityStatus: AuthorityStatusProjection;
|
|
starbridgeSession: StarbridgeSessionProjection;
|
|
assetManifest: AssetManifestProjection;
|
|
receivedAtUtc: string;
|
|
sampleMs: number;
|
|
};
|
|
|
|
export type ViewportResponse = {
|
|
schema: string;
|
|
frameId: number;
|
|
publishedAtUtc: string;
|
|
simulationTimeSeconds: number;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
zoneName: string;
|
|
currentEntityKey: string;
|
|
viewport: Viewport;
|
|
controlledEntityIndices: number[];
|
|
objects: ViewObject[];
|
|
gravityInfluences: GravityInfluence[];
|
|
bodies: BodyView[];
|
|
};
|
|
|
|
export type ObjectsViewportResponse = {
|
|
schema: string;
|
|
frameId: number;
|
|
publishedAtUtc: string;
|
|
simulationTimeSeconds: number;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
zoneName: string;
|
|
currentEntityKey: string;
|
|
viewport: Viewport;
|
|
controlledEntityIndices: number[];
|
|
objects: ViewObject[];
|
|
};
|
|
|
|
export type GravityViewportResponse = {
|
|
schema: string;
|
|
frameId: number;
|
|
publishedAtUtc: string;
|
|
simulationTimeSeconds: number;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
zoneName: string;
|
|
viewport: Viewport;
|
|
gravityInfluences: GravityInfluence[];
|
|
bodies: BodyView[];
|
|
};
|
|
|
|
export type ViewObject = {
|
|
entityIndex: number;
|
|
entityKey: string;
|
|
displayName: string;
|
|
kind: string;
|
|
factionKey: string;
|
|
x: number;
|
|
y: number;
|
|
z: number;
|
|
directionX: number;
|
|
directionY: number;
|
|
velocityX: number;
|
|
velocityY: number;
|
|
controlled: boolean;
|
|
targetEntityIndex: number;
|
|
isActive: boolean;
|
|
visibility: number;
|
|
iconAsset: AssetRef;
|
|
status: EntityStatus;
|
|
inventory: InventoryItem[];
|
|
};
|
|
|
|
export type EntityStatus = {
|
|
hull: number;
|
|
shield: number;
|
|
heat: number;
|
|
};
|
|
|
|
export type InventoryItem = {
|
|
source: string;
|
|
itemKey: string;
|
|
quantity: number;
|
|
quality: number;
|
|
durability: number;
|
|
enabled: boolean;
|
|
iconAsset: AssetRef;
|
|
};
|
|
|
|
export type SelectedObjectProjection = {
|
|
schema: string;
|
|
frameId: number;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
entityIndex: number;
|
|
selected: ViewObject | null;
|
|
};
|
|
|
|
export type InventoryProjection = {
|
|
schema: string;
|
|
frameId: number;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
entityIndex: number;
|
|
entityKey: string;
|
|
items: InventoryItem[];
|
|
equipment: InventoryItem[];
|
|
cargo: InventoryItem[];
|
|
};
|
|
|
|
export type DaemonHealthProjection = {
|
|
schema: string;
|
|
daemonId: string;
|
|
verseId: string;
|
|
publishedAtUtc: string;
|
|
statePath: string;
|
|
frameId: number;
|
|
observedCommandCount: number;
|
|
appliedCommandCount: number;
|
|
rejectedCommandCount: number;
|
|
status: string;
|
|
publicationSource: string;
|
|
transport: string;
|
|
commandBoundaryPath: string;
|
|
};
|
|
|
|
export type AuthorityStatusProjection = {
|
|
schema: string;
|
|
verseId: string;
|
|
policyId: string;
|
|
ruleVersion: string;
|
|
hostRuntimeId: string;
|
|
defaultMode: string;
|
|
updatedAtUtc: string;
|
|
rules: AuthorityRuleProjection[];
|
|
};
|
|
|
|
export type AuthorityRuleProjection = {
|
|
ruleId: string;
|
|
subjectPrefix: string;
|
|
claimKinds: string[];
|
|
mode: string;
|
|
runtimeIds: string[];
|
|
leaseScope: string;
|
|
priority: number;
|
|
};
|
|
|
|
export type StarbridgeSessionProjection = {
|
|
schema: string;
|
|
frameId: number;
|
|
publishedAtUtc: string;
|
|
sessionId: string;
|
|
scenarioId: string;
|
|
scenarioName: string;
|
|
runId: string;
|
|
zoneIndex: number;
|
|
zoneName: string;
|
|
phase: string;
|
|
currentWaveIndex: number;
|
|
baseStatus: StarbridgeBaseStatusProjection;
|
|
stationStock: StarbridgeStationStockItemProjection[];
|
|
waveForecast: StarbridgeWaveForecastProjection[];
|
|
runtimeRoles: StarbridgeRuntimeRoleProjection[];
|
|
};
|
|
|
|
export type StarbridgeBaseStatusProjection = {
|
|
entityKey: string;
|
|
displayName: string;
|
|
hull: number;
|
|
shield: number;
|
|
heat: number;
|
|
isActive: boolean;
|
|
};
|
|
|
|
export type StarbridgeStationStockItemProjection = {
|
|
itemKey: string;
|
|
quantity: number;
|
|
quality: number;
|
|
durability: number;
|
|
source: string;
|
|
iconAsset: AssetRef;
|
|
};
|
|
|
|
export type AssetManifestProjection = {
|
|
schema: string;
|
|
publishedAtUtc: string;
|
|
runId: string;
|
|
baseUri: string;
|
|
assets: AssetManifestEntry[];
|
|
};
|
|
|
|
export type AssetManifestEntry = {
|
|
ref: AssetRef;
|
|
sizeBytes: number;
|
|
width: number;
|
|
height: number;
|
|
tags: string[];
|
|
};
|
|
|
|
export type AssetRef = {
|
|
assetKey: string;
|
|
kind: string;
|
|
uri: string;
|
|
transport: string;
|
|
contentHash: string;
|
|
mimeType: string;
|
|
metadata: Record<string, string>;
|
|
};
|
|
|
|
export type StarbridgeWaveForecastProjection = {
|
|
waveIndex: number;
|
|
displayName: string;
|
|
attackerKeys: string[];
|
|
bossKey: string;
|
|
recoveredTechnologyKeys: string[];
|
|
};
|
|
|
|
export type StarbridgeRuntimeRoleProjection = {
|
|
runtimeId: string;
|
|
role: string;
|
|
entityKey: string;
|
|
};
|
|
|
|
export type GravityInfluence = {
|
|
bodyKey: string;
|
|
orbitKey: string;
|
|
kind: string;
|
|
x: number;
|
|
y: number;
|
|
radius: number;
|
|
gravityDepth: number;
|
|
gravityDepthExponent: number;
|
|
waveRadius: number;
|
|
waveDepth: number;
|
|
waveSpeed: number;
|
|
};
|
|
|
|
export type BodyView = {
|
|
bodyKey: string;
|
|
orbitKey: string;
|
|
name: string;
|
|
kind: string;
|
|
x: number;
|
|
y: number;
|
|
radius: number;
|
|
isAsteroidBelt: boolean;
|
|
};
|
|
|
|
|
|
export type AetheriaRtsApi = {
|
|
mapViewport(request: Viewport): Promise<ViewportResponse>;
|
|
objectsViewport(request: Viewport): Promise<ObjectsViewportResponse>;
|
|
gravityViewport(request: Viewport): Promise<GravityViewportResponse>;
|
|
selectedObject(request: AetheriaRuntimeSelectedObjectRequest): Promise<SelectedObjectProjection>;
|
|
inventory(request: AetheriaRuntimeSelectedObjectRequest): Promise<InventoryProjection>;
|
|
daemonHealth(): Promise<DaemonHealthProjection>;
|
|
authorityStatus(): Promise<AuthorityStatusProjection>;
|
|
starbridgeSession(): Promise<StarbridgeSessionProjection>;
|
|
assetManifest(): Promise<AssetManifestProjection>;
|
|
watchViewportFeed(request: AetheriaRuntimeViewportFeedRequest, callback: (snapshot: AetheriaRuntimeViewportFeedSnapshot) => void): () => void;
|
|
setMoveVector(request: AetheriaRuntimeSetMoveVectorRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
|
|
setTarget(request: AetheriaRuntimeSetTargetRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
|
|
surfaceCatalog(): Promise<CultMeshSurfaceCatalogDiagnostic>;
|
|
surfaceCatalogIndex(): Promise<CultMeshSurfaceCatalogIndexDiagnostic>;
|
|
health(): Promise<unknown>;
|
|
};
|