@visactor/vmind
Version:
<div align="center"> <a href="https://github.com/VisActor#gh-light-mode-only" target="_blank"> <img alt="VisActor Logo" width="200" src="https://github.com/VisActor/.github/blob/main/profile/logo_500_200_light.svg"/> </a> <a href="https://githu
45 lines (44 loc) • 2.35 kB
TypeScript
import type { AtomName, BaseContext, DataExtractionCtx, DataCleanCtx, DataQueryCtx, ChartGeneratorCtx, ChartCommandCtx, DataInsightCtx, MultipleDataCleanCtx, MultipleChartCommandsCtx, ChartQAExtractionCtx, VChartSpecCtx, SpecInsightCtx, BaseOptions, DataExtractionOptions, DataCleanOptions, SpecInsightOptions, ChartCommandOptions, CustomPromptOptions } from './atom';
import type { ChartGeneratorOptions } from '../atom/chartGenerator/type';
import type { DataInsightOptions } from '../atom/dataInsight/type';
import type { ImageReaderCtx } from '../atom/imageReader/interface';
export interface Tasks {
shouldRun: boolean;
query: string;
}
export type TaskMapping = Partial<Record<AtomName, Tasks>>;
export type AtomTypeMap = {
[]: BaseContext;
[]: DataExtractionCtx;
[]: DataCleanCtx;
[]: MultipleDataCleanCtx;
[]: DataQueryCtx;
[]: DataInsightCtx;
[]: SpecInsightCtx;
[]: ChartCommandCtx;
[]: MultipleChartCommandsCtx;
[]: ChartGeneratorCtx;
[]: ChartQAExtractionCtx;
[]: any;
[]: VChartSpecCtx;
[]: ImageReaderCtx;
};
export type MapAtomTypes<T extends (keyof AtomTypeMap)[]> = {
[]: T[K] extends keyof AtomTypeMap ? AtomTypeMap[T[K]] : never;
};
export type CombineAll<T extends any[]> = T extends [infer First, ...infer Rest] ? First & CombineAll<Rest> : Record<string, unknown>;
export interface ScheduleOptions {
[]?: BaseOptions;
[]?: DataExtractionOptions;
[]?: DataCleanOptions;
[]?: DataCleanOptions;
[]?: BaseOptions;
[]?: DataInsightOptions;
[]?: SpecInsightOptions;
[]?: ChartGeneratorOptions;
[]?: ChartCommandOptions;
[]?: ChartCommandOptions;
[]?: BaseOptions;
[]?: CustomPromptOptions;
[]?: BaseOptions;
}