default: {
    add: (
        project: { id: string },
        simulation: { name: string; scheme: object },
    ) => Promise<IFrontNewSimulation>;
    copy: (simulation: { id: string }) => Promise<IFrontNewSimulation>;
    del: (simulation: { id: string }) => Promise<void>;
    log: (simulation: { id: string }, file: string) => Promise<{ log: Buffer }>;
    run: (simulation: { id: string }, keepMesh?: boolean) => Promise<void>;
    stop: (simulation: { id: string }) => Promise<void>;
    tasks: (simulation: { id: string }) => Promise<IFrontSimulationTask[]>;
    update: (simulation: { id: string }, data: any[]) => Promise<void>;
    useSimulation: (
        id?: string,
        refresh?: number,
    ) => [
        DefaultData
        | IFrontSimulation,
        {
            errorSimulation: Error;
            loadingSimulation: boolean;
            mutateSimulation: (simulation: IFrontMutateSimulation) => Promise<void>;
        },
    ];
    useSimulations: (
        ids?: string[],
    ) => [
        IFrontSimulations,
        {
            addOneSimulation: (simulation: IFrontNewSimulation) => Promise<void>;
            delOneSimulation: (
                simulation: IFrontMutateSimulationsItem,
            ) => Promise<void>;
            errorSimulations: Error;
            loadingSimulations: boolean;
            mutateOneSimulation: (
                simulation: IFrontMutateSimulationsItem,
                revalidate?: boolean,
            ) => Promise<void>;
        },
    ];
} = ...

Type declaration

  • add: (
        project: { id: string },
        simulation: { name: string; scheme: object },
    ) => Promise<IFrontNewSimulation>
  • copy: (simulation: { id: string }) => Promise<IFrontNewSimulation>
  • del: (simulation: { id: string }) => Promise<void>
  • log: (simulation: { id: string }, file: string) => Promise<{ log: Buffer }>
  • run: (simulation: { id: string }, keepMesh?: boolean) => Promise<void>
  • stop: (simulation: { id: string }) => Promise<void>
  • tasks: (simulation: { id: string }) => Promise<IFrontSimulationTask[]>
  • update: (simulation: { id: string }, data: any[]) => Promise<void>
  • useSimulation: (
        id?: string,
        refresh?: number,
    ) => [
        DefaultData
        | IFrontSimulation,
        {
            errorSimulation: Error;
            loadingSimulation: boolean;
            mutateSimulation: (simulation: IFrontMutateSimulation) => Promise<void>;
        },
    ]
  • useSimulations: (
        ids?: string[],
    ) => [
        IFrontSimulations,
        {
            addOneSimulation: (simulation: IFrontNewSimulation) => Promise<void>;
            delOneSimulation: (
                simulation: IFrontMutateSimulationsItem,
            ) => Promise<void>;
            errorSimulations: Error;
            loadingSimulations: boolean;
            mutateOneSimulation: (
                simulation: IFrontMutateSimulationsItem,
                revalidate?: boolean,
            ) => Promise<void>;
        },
    ]