101 lines
3.0 KiB
TypeScript
101 lines
3.0 KiB
TypeScript
import type { ZombieGame } from './map-aliases.js';
|
|
|
|
export interface LaunchFileSummary {
|
|
name: string;
|
|
kind: 'script' | 'plugin' | 'config';
|
|
path: string;
|
|
versionId: number | null;
|
|
version: number | null;
|
|
sha256: string;
|
|
size: number;
|
|
}
|
|
|
|
export interface LaunchRecipeSummary {
|
|
native?: import('./hosts.js').NativePlacement;
|
|
game: ZombieGame;
|
|
mapSlug: string;
|
|
mapName: string;
|
|
expectedMap: string;
|
|
capturedAt: string;
|
|
image: string;
|
|
configFile: string;
|
|
configSource: string;
|
|
files: LaunchFileSummary[];
|
|
fingerprint: string;
|
|
}
|
|
|
|
export interface BlueprintSummary {
|
|
id: string;
|
|
name: string;
|
|
description: string;
|
|
createdAt: string;
|
|
entries: { count: number; game: ZombieGame; mapSlug: string; mapName: string }[];
|
|
totalServers: number;
|
|
}
|
|
|
|
export type CollectionMode = 'fill' | 'exact';
|
|
|
|
export interface LaunchAvailability {
|
|
updatedAt: string | null;
|
|
requested: number;
|
|
estimatedAvailable: number | null;
|
|
portsAvailable: number | null;
|
|
cpuCoresAvailable: number | null;
|
|
memoryBytesAvailable: number | null;
|
|
startupSlots: number | null;
|
|
startupLimit: number | null;
|
|
queued: number | null;
|
|
}
|
|
|
|
export interface CollectionPreview {
|
|
id: string;
|
|
expiresAt: string;
|
|
blueprintName: string;
|
|
launchConcurrency: number;
|
|
mode: CollectionMode;
|
|
retainedServers: string[];
|
|
removals: { name: string; reason: string }[];
|
|
entries: { count: number; existing: number; missing: number; existingServers: string[];
|
|
coverage: { name: string; health: string; href: string }[]; recipe: LaunchRecipeSummary }[];
|
|
servers: { native?: import('./hosts.js').NativePlacement; entryIndex: number; name: string | null; port: number | null; hasSavedKey: boolean }[];
|
|
blockers: string[];
|
|
warnings?: string[];
|
|
availability?: LaunchAvailability;
|
|
ready: boolean;
|
|
}
|
|
|
|
export interface CollectionSummary {
|
|
id: string;
|
|
name: string;
|
|
created_at: string;
|
|
total: number;
|
|
done: number;
|
|
failed: number;
|
|
active: number;
|
|
queued: number;
|
|
provisioning: number;
|
|
verifying: number;
|
|
mode: CollectionMode;
|
|
}
|
|
|
|
export interface CollectionDetail {
|
|
collection: CollectionSummary;
|
|
retainedServers: string[];
|
|
retainedServerDeletedAt?: Record<string, string>;
|
|
queue: { concurrency: number; active: { id: string; server: string; state: string; stage: string }[]; queued: number };
|
|
servers: { id: string; server: string; action: 'create' | 'destroy'; port: number | null; map_slug: string | null; state: string; stage: string;
|
|
started_at: string; finished_at: string | null; error: string | null; server_exists: number; server_deleted_at?: string | null; queuePosition: number | null }[];
|
|
}
|
|
|
|
export interface LaunchPreview {
|
|
id: string;
|
|
expiresAt: string;
|
|
name: string | null;
|
|
port: number | null;
|
|
hasSavedKey: boolean;
|
|
recipe: LaunchRecipeSummary;
|
|
blueprintName: string | null;
|
|
checks: { label: string; state: 'pass' | 'blocked' | 'info'; detail: string }[];
|
|
ready: boolean;
|
|
}
|