-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathISimulatorService.ts
More file actions
34 lines (30 loc) · 1.24 KB
/
ISimulatorService.ts
File metadata and controls
34 lines (30 loc) · 1.24 KB
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
import {AiProviders} from "../config/simulator";
export interface ISimulatorService {
setComposeOptions(headless: boolean): void;
getComposeOptions(): string;
checkInstallRequirements(): Promise<Record<string, boolean>>;
checkVersionRequirements(): Promise<Record<string, string>>;
runSimulator(): Promise<{stdout: string; stderr: string}>;
waitForSimulatorToBeReady(retries?: number): Promise<WaitForSimulatorToBeReadyResultType>;
createRandomValidators(numValidators: number, llmProviders: AiProviders[]): Promise<any>;
deleteAllValidators(): Promise<any>;
getAiProvidersOptions(withHint: boolean): Array<{name: string; value: string}>;
getFrontendUrl(): string;
openFrontend(): Promise<boolean>;
stopDockerContainers(): Promise<void>;
resetDockerContainers(): Promise<void>;
resetDockerImages(): Promise<void>;
checkCliVersion(): Promise<void>;
cleanDatabase(): Promise<boolean>;
addConfigToEnvFile(newConfig: Record<string, string>): void;
normalizeLocalnetVersion(version: string): string;
}
export type WaitForSimulatorToBeReadyResultType = {
initialized: boolean;
errorCode?: "TIMEOUT" | "ERROR";
errorMessage?: string;
};
export type InitializeDatabaseResultType = {
createResponse: any;
tablesResponse: any;
};