File size: 1,251 Bytes
1a343cd 616ae7b 1a343cd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | import type { BusInbox, BusReceipt } from './bus';
import type { CrossPrediction, DeckSummary, GameState, LabPayload, SeedProfile } from './types';
export type ErrorResponse = {
status: 'error';
message: string;
};
export type InitResponse = {
status: 'ok';
postId: string;
username: string;
state: GameState;
deck: DeckSummary;
};
export type InventoryResponse = {
seeds: SeedProfile[];
};
export type SelectionResponse = {
ids: string[];
};
export type SelectionRequest = {
ids: string[];
};
export type CrossRequest = {
parent1_id: string;
parent2_id: string;
n?: number;
summary_only?: boolean;
};
export type BreedRequest = {
parent1_id: string;
parent2_id: string;
};
export type BreedResponse = {
ok: true;
offspring_id: string;
};
export type CloneRequest = {
seed_id: string;
};
export type CloneResponse = {
ok: true;
clone_id: string;
};
export type LabResponse = LabPayload;
export type PredictCrossResponse = CrossPrediction;
export type DeckSummaryResponse = DeckSummary;
export type BusSignalsResponse = {
available: boolean;
count: number;
task_list: BusInbox['task_list'];
signals: BusInbox['signals'];
};
export type BusReceiptsResponse = {
receipts: BusReceipt[];
};
|