mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
41 lines
808 B
TypeScript
41 lines
808 B
TypeScript
import { BlockConfig } from "@/blocks/types/block";
|
|
|
|
export interface SerializedWorkflow {
|
|
version: string;
|
|
blocks: SerializedBlock[];
|
|
connections: SerializedConnection[];
|
|
}
|
|
|
|
export interface SerializedConnection {
|
|
source: string;
|
|
target: string;
|
|
sourceHandle?: string;
|
|
targetHandle?: string;
|
|
}
|
|
|
|
export interface Position {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
|
|
export interface SerializedBlock {
|
|
id: string;
|
|
type: string;
|
|
position: Position;
|
|
config: {
|
|
inputs: Record<string, string>;
|
|
outputs: Record<string, string>;
|
|
[key: string]: any;
|
|
};
|
|
}
|
|
|
|
export interface SubBlockValue {
|
|
title: string;
|
|
type: 'long-input' | 'short-input' | 'dropdown' | 'slider' | 'code';
|
|
value: string | number | boolean;
|
|
}
|
|
|
|
export interface BlockValues {
|
|
[key: string]: string | number | boolean;
|
|
}
|