Add the flow editor: canvas, node panel and live values

The browser half of M3. Flows open on a full-bleed canvas with their chrome
floating over it: flow tabs top, dock bottom, node settings in a panel on the
right that leaves the graph visible and running behind it.

- Connections are derived, not stored. A node declares the messages it reads
  and publishes; every matching pair draws an edge, so two producers of one
  message converge on their consumer. Dragging output to input is shorthand
  for pointing that input at the producer's message, and asks before it
  replaces an existing one.
- Values land on the edges as they flow, over a websocket that feeds a store
  outside React, so a value arriving re-renders its own chip and nothing else.
  Clicking an edge shows the last payload and when it arrived.
- Node source is edited in Monaco, loaded only when a panel opens and themed
  from the design tokens.
- Edits autosave; identical documents are skipped server-side, so a quiet
  canvas writes nothing.
- Validation from the API shows on the node it belongs to and is summarised in
  the dock, where each entry pans to its node.
- Works on a phone: touch-connect, 44px dock targets, and the node panel
  becomes a full-screen sheet.

Two new tokens (--status-success, --font-mono) are mirrored in the website repo
and recorded in DESIGN-GUIDELINES.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WzrvW7rjQbynnhF6pxh6i
This commit is contained in:
Melvin Strobl
2026-08-15 18:10:50 +02:00
co-authored by Claude Fable 5
parent 06a4506767
commit 8c82549cf6
40 changed files with 5027 additions and 66 deletions
+596
View File
@@ -57,6 +57,227 @@ export const Body_login_login_access_tokenSchema = {
title: 'Body_login-login_access_token'
} as const;
export const DTypeSchema = {
type: 'string',
enum: ['float', 'int', 'str', 'bool', 'json'],
title: 'DType',
description: `Serializable payload types.
Binary payloads (tensors, images) will arrive later as explicitly declared
codec fields; until then everything on the wire is JSON.`
} as const;
export const FlowDef_InputSchema = {
properties: {
name: {
type: 'string',
title: 'Name'
},
title: {
type: 'string',
title: 'Title',
default: ''
},
nodes: {
items: {
'$ref': '#/components/schemas/NodeDef-Input'
},
type: 'array',
title: 'Nodes'
},
inputs: {
items: {
'$ref': '#/components/schemas/FlowInput-Input'
},
type: 'array',
title: 'Inputs'
},
version: {
type: 'integer',
title: 'Version',
default: 1
}
},
type: 'object',
required: ['name'],
title: 'FlowDef',
description: 'One atomic flow.'
} as const;
export const FlowDef_OutputSchema = {
properties: {
name: {
type: 'string',
title: 'Name'
},
title: {
type: 'string',
title: 'Title',
default: ''
},
nodes: {
items: {
'$ref': '#/components/schemas/NodeDef-Output'
},
type: 'array',
title: 'Nodes'
},
inputs: {
items: {
'$ref': '#/components/schemas/FlowInput-Output'
},
type: 'array',
title: 'Inputs'
},
version: {
type: 'integer',
title: 'Version',
default: 1
}
},
type: 'object',
required: ['name'],
title: 'FlowDef',
description: 'One atomic flow.'
} as const;
export const FlowDetailSchema = {
properties: {
definition: {
'$ref': '#/components/schemas/FlowDef-Output'
},
nodes: {
items: {
'$ref': '#/components/schemas/NodeStatusPublic'
},
type: 'array',
title: 'Nodes',
default: []
},
issues: {
items: {
'$ref': '#/components/schemas/ValidationIssue'
},
type: 'array',
title: 'Issues',
default: []
}
},
type: 'object',
required: ['definition'],
title: 'FlowDetail',
description: 'A flow plus how it is currently doing.'
} as const;
export const FlowInput_InputSchema = {
properties: {
spec: {
'$ref': '#/components/schemas/MessageSpec'
},
initial: {
anyOf: [
{},
{
type: 'null'
}
],
title: 'Initial'
}
},
type: 'object',
required: ['spec'],
title: 'FlowInput',
description: 'A message the flow starts with rather than computes.'
} as const;
export const FlowInput_OutputSchema = {
properties: {
spec: {
'$ref': '#/components/schemas/MessageSpec'
},
initial: {
anyOf: [
{},
{
type: 'null'
}
],
title: 'Initial'
}
},
type: 'object',
required: ['spec'],
title: 'FlowInput',
description: 'A message the flow starts with rather than computes.'
} as const;
export const FlowStatePublicSchema = {
properties: {
values: {
additionalProperties: {
'$ref': '#/components/schemas/MessageValue'
},
type: 'object',
title: 'Values'
},
nodes: {
items: {
'$ref': '#/components/schemas/NodeStatusPublic'
},
type: 'array',
title: 'Nodes'
}
},
type: 'object',
title: 'FlowStatePublic'
} as const;
export const FlowSummarySchema = {
properties: {
name: {
type: 'string',
title: 'Name'
},
title: {
type: 'string',
title: 'Title',
default: ''
},
node_count: {
type: 'integer',
title: 'Node Count',
default: 0
},
error_count: {
type: 'integer',
title: 'Error Count',
default: 0
}
},
type: 'object',
required: ['name'],
title: 'FlowSummary'
} as const;
export const FlowsPublicSchema = {
properties: {
data: {
items: {
'$ref': '#/components/schemas/FlowSummary'
},
type: 'array',
title: 'Data'
},
count: {
type: 'integer',
title: 'Count'
}
},
type: 'object',
required: ['data', 'count'],
title: 'FlowsPublic'
} as const;
export const HTTPValidationErrorSchema = {
properties: {
detail: {
@@ -208,6 +429,56 @@ export const MessageSchema = {
title: 'Message'
} as const;
export const MessageSpecSchema = {
properties: {
name: {
type: 'string',
title: 'Name',
default: ''
},
port: {
type: 'string',
title: 'Port',
default: ''
},
dtype: {
'$ref': '#/components/schemas/DType',
default: 'float'
}
},
type: 'object',
title: 'MessageSpec',
description: `A single port of a node, and the message it is bound to.
:param name: The message this port binds to. Bare names are qualified with
the flow name at load time; empty means the port is unbound.
:param port: The identifier the node function sees. Defaults to the last
segment of \`\`name\`\`, so unqualified flows read naturally.
:param dtype: Payload type, validated on every message that passes through.`
} as const;
export const MessageValueSchema = {
properties: {
value: {
title: 'Value'
},
ts: {
anyOf: [
{
type: 'number'
},
{
type: 'null'
}
],
title: 'Ts'
}
},
type: 'object',
title: 'MessageValue',
description: 'The last payload seen on a message.'
} as const;
export const NewPasswordSchema = {
properties: {
token: {
@@ -226,6 +497,195 @@ export const NewPasswordSchema = {
title: 'NewPassword'
} as const;
export const NodeDef_InputSchema = {
properties: {
id: {
type: 'string',
title: 'Id'
},
type: {
type: 'string',
title: 'Type',
default: 'python'
},
title: {
type: 'string',
title: 'Title',
default: ''
},
position: {
'$ref': '#/components/schemas/Position',
default: {
x: 0,
y: 0
}
},
params: {
additionalProperties: true,
type: 'object',
title: 'Params'
},
requires: {
items: {
'$ref': '#/components/schemas/MessageSpec'
},
type: 'array',
title: 'Requires'
},
provides: {
items: {
'$ref': '#/components/schemas/MessageSpec'
},
type: 'array',
title: 'Provides'
}
},
type: 'object',
required: ['id'],
title: 'NodeDef',
description: 'A node as stored: identity, placement, configuration and ports.'
} as const;
export const NodeDef_OutputSchema = {
properties: {
id: {
type: 'string',
title: 'Id'
},
type: {
type: 'string',
title: 'Type',
default: 'python'
},
title: {
type: 'string',
title: 'Title',
default: ''
},
position: {
'$ref': '#/components/schemas/Position',
default: {
x: 0,
y: 0
}
},
params: {
additionalProperties: true,
type: 'object',
title: 'Params'
},
requires: {
items: {
'$ref': '#/components/schemas/MessageSpec'
},
type: 'array',
title: 'Requires'
},
provides: {
items: {
'$ref': '#/components/schemas/MessageSpec'
},
type: 'array',
title: 'Provides'
}
},
type: 'object',
required: ['id'],
title: 'NodeDef',
description: 'A node as stored: identity, placement, configuration and ports.'
} as const;
export const NodeSourceSchema = {
properties: {
code: {
type: 'string',
title: 'Code'
}
},
type: 'object',
required: ['code'],
title: 'NodeSource',
description: 'The Python source of a node.'
} as const;
export const NodeStatusPublicSchema = {
properties: {
id: {
type: 'string',
title: 'Id'
},
status: {
type: 'string',
title: 'Status',
default: 'active'
},
error: {
anyOf: [
{
type: 'string'
},
{
type: 'null'
}
],
title: 'Error'
}
},
type: 'object',
required: ['id'],
title: 'NodeStatusPublic',
description: 'Whether a node loaded, and why not.'
} as const;
export const NodeTypeInfoSchema = {
properties: {
type: {
type: 'string',
title: 'Type'
},
title: {
type: 'string',
title: 'Title'
},
description: {
type: 'string',
title: 'Description'
},
params_schema: {
additionalProperties: true,
type: 'object',
title: 'Params Schema'
},
has_source: {
type: 'boolean',
title: 'Has Source',
default: false
}
},
type: 'object',
required: ['type', 'title', 'description'],
title: 'NodeTypeInfo',
description: 'A node type the editor can offer, with its parameter schema.'
} as const;
export const PositionSchema = {
properties: {
x: {
type: 'number',
title: 'X',
default: 0
},
y: {
type: 'number',
title: 'Y',
default: 0
}
},
type: 'object',
title: 'Position',
description: 'Where a node sits on the canvas.'
} as const;
export const PrivateUserCreateSchema = {
properties: {
email: {
@@ -251,6 +711,50 @@ export const PrivateUserCreateSchema = {
title: 'PrivateUserCreate'
} as const;
export const RunRequestSchema = {
properties: {
inputs: {
additionalProperties: true,
type: 'object',
title: 'Inputs',
default: {}
}
},
type: 'object',
title: 'RunRequest'
} as const;
export const SecretNamesSchema = {
properties: {
data: {
items: {
type: 'string'
},
type: 'array',
title: 'Data'
},
count: {
type: 'integer',
title: 'Count'
}
},
type: 'object',
required: ['data', 'count'],
title: 'SecretNames'
} as const;
export const SecretValueSchema = {
properties: {
value: {
type: 'string',
title: 'Value'
}
},
type: 'object',
required: ['value'],
title: 'SecretValue'
} as const;
export const TokenSchema = {
properties: {
access_token: {
@@ -268,6 +772,19 @@ export const TokenSchema = {
title: 'Token'
} as const;
export const TriggerRequestSchema = {
properties: {
values: {
additionalProperties: true,
type: 'object',
title: 'Values',
default: {}
}
},
type: 'object',
title: 'TriggerRequest'
} as const;
export const UpdatePasswordSchema = {
properties: {
current_password: {
@@ -549,4 +1066,83 @@ export const ValidationErrorSchema = {
type: 'object',
required: ['loc', 'msg', 'type'],
title: 'ValidationError'
} as const;
export const ValidationIssueSchema = {
properties: {
code: {
type: 'string',
enum: ['cycle', 'unconnected_input', 'missing_initial_value', 'node_error'],
title: 'Code'
},
message: {
type: 'string',
title: 'Message'
},
flow: {
type: 'string',
title: 'Flow',
default: ''
},
nodes: {
items: {
type: 'string'
},
type: 'array',
title: 'Nodes',
default: []
},
node: {
anyOf: [
{
type: 'string'
},
{
type: 'null'
}
],
title: 'Node'
},
port: {
anyOf: [
{
type: 'string'
},
{
type: 'null'
}
],
title: 'Port'
},
message_name: {
anyOf: [
{
type: 'string'
},
{
type: 'null'
}
],
title: 'Message Name'
}
},
type: 'object',
required: ['code', 'message'],
title: 'ValidationIssue',
description: 'A problem that keeps a flow from running correctly.'
} as const;
export const ValidationResultSchema = {
properties: {
issues: {
items: {
'$ref': '#/components/schemas/ValidationIssue'
},
type: 'array',
title: 'Issues',
default: []
}
},
type: 'object',
title: 'ValidationResult'
} as const;
+296 -1
View File
@@ -3,7 +3,242 @@
import type { CancelablePromise } from './core/CancelablePromise';
import { OpenAPI } from './core/OpenAPI';
import { request as __request } from './core/request';
import type { ItemsReadItemsData, ItemsReadItemsResponse, ItemsCreateItemData, ItemsCreateItemResponse, ItemsReadItemData, ItemsReadItemResponse, ItemsUpdateItemData, ItemsUpdateItemResponse, ItemsDeleteItemData, ItemsDeleteItemResponse, LoginLoginAccessTokenData, LoginLoginAccessTokenResponse, LoginTestTokenResponse, LoginRecoverPasswordData, LoginRecoverPasswordResponse, LoginResetPasswordData, LoginResetPasswordResponse, LoginRecoverPasswordHtmlContentData, LoginRecoverPasswordHtmlContentResponse, PrivateCreateUserData, PrivateCreateUserResponse, UsersReadUsersData, UsersReadUsersResponse, UsersCreateUserData, UsersCreateUserResponse, UsersReadUserMeResponse, UsersDeleteUserMeResponse, UsersUpdateUserMeData, UsersUpdateUserMeResponse, UsersUpdatePasswordMeData, UsersUpdatePasswordMeResponse, UsersRegisterUserData, UsersRegisterUserResponse, UsersReadUserByIdData, UsersReadUserByIdResponse, UsersUpdateUserData, UsersUpdateUserResponse, UsersDeleteUserData, UsersDeleteUserResponse, UtilsTestEmailData, UtilsTestEmailResponse, UtilsHealthCheckResponse } from './types.gen';
import type { FlowsReadFlowsResponse, FlowsReadNodeTypesResponse, FlowsReadFlowData, FlowsReadFlowResponse, FlowsSaveFlowData, FlowsSaveFlowResponse, FlowsDeleteFlowData, FlowsDeleteFlowResponse, FlowsReadNodeSourceData, FlowsReadNodeSourceResponse, FlowsSaveNodeSourceData, FlowsSaveNodeSourceResponse, FlowsValidateFlowData, FlowsValidateFlowResponse, FlowsRunFlowData, FlowsRunFlowResponse, FlowsTriggerNodeData, FlowsTriggerNodeResponse, FlowsReadFlowStateData, FlowsReadFlowStateResponse, ItemsReadItemsData, ItemsReadItemsResponse, ItemsCreateItemData, ItemsCreateItemResponse, ItemsReadItemData, ItemsReadItemResponse, ItemsUpdateItemData, ItemsUpdateItemResponse, ItemsDeleteItemData, ItemsDeleteItemResponse, LoginLoginAccessTokenData, LoginLoginAccessTokenResponse, LoginTestTokenResponse, LoginRecoverPasswordData, LoginRecoverPasswordResponse, LoginResetPasswordData, LoginResetPasswordResponse, LoginRecoverPasswordHtmlContentData, LoginRecoverPasswordHtmlContentResponse, PrivateCreateUserData, PrivateCreateUserResponse, SecretsReadSecretsResponse, SecretsSaveSecretData, SecretsSaveSecretResponse, SecretsDeleteSecretData, SecretsDeleteSecretResponse, UsersReadUsersData, UsersReadUsersResponse, UsersCreateUserData, UsersCreateUserResponse, UsersReadUserMeResponse, UsersDeleteUserMeResponse, UsersUpdateUserMeData, UsersUpdateUserMeResponse, UsersUpdatePasswordMeData, UsersUpdatePasswordMeResponse, UsersRegisterUserData, UsersRegisterUserResponse, UsersReadUserByIdData, UsersReadUserByIdResponse, UsersUpdateUserData, UsersUpdateUserResponse, UsersDeleteUserData, UsersDeleteUserResponse, UtilsTestEmailData, UtilsTestEmailResponse, UtilsHealthCheckResponse } from './types.gen';
export class FlowsService {
/**
* Read Flows
* List every flow.
* @returns FlowsPublic Successful Response
* @throws ApiError
*/
public static readFlows(): CancelablePromise<FlowsReadFlowsResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/flows/'
});
}
/**
* Read Node Types
* The node types that can be placed on a canvas.
* @returns NodeTypeInfo Successful Response
* @throws ApiError
*/
public static readNodeTypes(): CancelablePromise<FlowsReadNodeTypesResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/flows/node-types'
});
}
/**
* Read Flow
* Read one flow, with the state of its nodes.
* @param data The data for the request.
* @param data.name
* @returns FlowDetail Successful Response
* @throws ApiError
*/
public static readFlow(data: FlowsReadFlowData): CancelablePromise<FlowsReadFlowResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/flows/{name}',
path: {
name: data.name
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Save Flow
* Create or replace a flow. Saving the same content again changes nothing.
* @param data The data for the request.
* @param data.name
* @param data.requestBody
* @returns FlowDetail Successful Response
* @throws ApiError
*/
public static saveFlow(data: FlowsSaveFlowData): CancelablePromise<FlowsSaveFlowResponse> {
return __request(OpenAPI, {
method: 'PUT',
url: '/api/v1/flows/{name}',
path: {
name: data.name
},
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Delete Flow
* Delete a flow and everything in it.
* @param data The data for the request.
* @param data.name
* @returns Message Successful Response
* @throws ApiError
*/
public static deleteFlow(data: FlowsDeleteFlowData): CancelablePromise<FlowsDeleteFlowResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/flows/{name}',
path: {
name: data.name
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Node Source
* Read a node's Python source.
* @param data The data for the request.
* @param data.name
* @param data.nodeId
* @returns NodeSource Successful Response
* @throws ApiError
*/
public static readNodeSource(data: FlowsReadNodeSourceData): CancelablePromise<FlowsReadNodeSourceResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/flows/{name}/nodes/{node_id}/source',
path: {
name: data.name,
node_id: data.nodeId
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Save Node Source
* Save a node's source and report whether it loads.
* @param data The data for the request.
* @param data.name
* @param data.nodeId
* @param data.requestBody
* @returns NodeStatusPublic Successful Response
* @throws ApiError
*/
public static saveNodeSource(data: FlowsSaveNodeSourceData): CancelablePromise<FlowsSaveNodeSourceResponse> {
return __request(OpenAPI, {
method: 'PUT',
url: '/api/v1/flows/{name}/nodes/{node_id}/source',
path: {
name: data.name,
node_id: data.nodeId
},
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Validate Flow
* Report what would keep this flow from running.
* @param data The data for the request.
* @param data.name
* @returns ValidationResult Successful Response
* @throws ApiError
*/
public static validateFlow(data: FlowsValidateFlowData): CancelablePromise<FlowsValidateFlowResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/flows/{name}/validate',
path: {
name: data.name
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Run Flow
* Run every node of a flow once.
* @param data The data for the request.
* @param data.name
* @param data.requestBody
* @returns FlowStatePublic Successful Response
* @throws ApiError
*/
public static runFlow(data: FlowsRunFlowData): CancelablePromise<FlowsRunFlowResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/flows/{name}/run',
path: {
name: data.name
},
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Trigger Node
* Feed values into a single node.
* @param data The data for the request.
* @param data.name
* @param data.nodeId
* @param data.requestBody
* @returns FlowStatePublic Successful Response
* @throws ApiError
*/
public static triggerNode(data: FlowsTriggerNodeData): CancelablePromise<FlowsTriggerNodeResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/flows/{name}/nodes/{node_id}/trigger',
path: {
name: data.name,
node_id: data.nodeId
},
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Flow State
* The last value seen on every message of this flow.
* @param data The data for the request.
* @param data.name
* @returns FlowStatePublic Successful Response
* @throws ApiError
*/
public static readFlowState(data: FlowsReadFlowStateData): CancelablePromise<FlowsReadFlowStateResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/flows/{name}/state',
path: {
name: data.name
},
errors: {
422: 'Validation Error'
}
});
}
}
export class ItemsService {
/**
@@ -235,6 +470,66 @@ export class PrivateService {
}
}
export class SecretsService {
/**
* Read Secrets
* List the names of stored secrets.
* @returns SecretNames Successful Response
* @throws ApiError
*/
public static readSecrets(): CancelablePromise<SecretsReadSecretsResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/secrets/'
});
}
/**
* Save Secret
* Store a secret under a name that nodes can reference.
* @param data The data for the request.
* @param data.name
* @param data.requestBody
* @returns Message Successful Response
* @throws ApiError
*/
public static saveSecret(data: SecretsSaveSecretData): CancelablePromise<SecretsSaveSecretResponse> {
return __request(OpenAPI, {
method: 'PUT',
url: '/api/v1/secrets/{name}',
path: {
name: data.name
},
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Delete Secret
* Delete a secret.
* @param data The data for the request.
* @param data.name
* @returns Message Successful Response
* @throws ApiError
*/
public static deleteSecret(data: SecretsDeleteSecretData): CancelablePromise<SecretsDeleteSecretResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/secrets/{name}',
path: {
name: data.name
},
errors: {
422: 'Validation Error'
}
});
}
}
export class UsersService {
/**
* Read Users
+284
View File
@@ -9,6 +9,80 @@ export type Body_login_login_access_token = {
client_secret?: (string | null);
};
/**
* Serializable payload types.
*
* Binary payloads (tensors, images) will arrive later as explicitly declared
* codec fields; until then everything on the wire is JSON.
*/
export type DType = 'float' | 'int' | 'str' | 'bool' | 'json';
/**
* One atomic flow.
*/
export type FlowDef_Input = {
name: string;
title?: string;
nodes?: Array<NodeDef_Input>;
inputs?: Array<FlowInput_Input>;
version?: number;
};
/**
* One atomic flow.
*/
export type FlowDef_Output = {
name: string;
title?: string;
nodes?: Array<NodeDef_Output>;
inputs?: Array<FlowInput_Output>;
version?: number;
};
/**
* A flow plus how it is currently doing.
*/
export type FlowDetail = {
definition: FlowDef_Output;
nodes?: Array<NodeStatusPublic>;
issues?: Array<ValidationIssue>;
};
/**
* A message the flow starts with rather than computes.
*/
export type FlowInput_Input = {
spec: MessageSpec;
initial?: (unknown | null);
};
/**
* A message the flow starts with rather than computes.
*/
export type FlowInput_Output = {
spec: MessageSpec;
initial?: (unknown | null);
};
export type FlowsPublic = {
data: Array<FlowSummary>;
count: number;
};
export type FlowStatePublic = {
values?: {
[key: string]: MessageValue;
};
nodes?: Array<NodeStatusPublic>;
};
export type FlowSummary = {
name: string;
title?: string;
node_count?: number;
error_count?: number;
};
export type HTTPValidationError = {
detail?: Array<ValidationError>;
};
@@ -40,11 +114,101 @@ export type Message = {
message: string;
};
/**
* A single port of a node, and the message it is bound to.
*
* :param name: The message this port binds to. Bare names are qualified with
* the flow name at load time; empty means the port is unbound.
* :param port: The identifier the node function sees. Defaults to the last
* segment of ``name``, so unqualified flows read naturally.
* :param dtype: Payload type, validated on every message that passes through.
*/
export type MessageSpec = {
name?: string;
port?: string;
dtype?: DType;
};
/**
* The last payload seen on a message.
*/
export type MessageValue = {
value?: unknown;
ts?: (number | null);
};
export type NewPassword = {
token: string;
new_password: string;
};
/**
* A node as stored: identity, placement, configuration and ports.
*/
export type NodeDef_Input = {
id: string;
type?: string;
title?: string;
position?: Position;
params?: {
[key: string]: unknown;
};
requires?: Array<MessageSpec>;
provides?: Array<MessageSpec>;
};
/**
* A node as stored: identity, placement, configuration and ports.
*/
export type NodeDef_Output = {
id: string;
type?: string;
title?: string;
position?: Position;
params?: {
[key: string]: unknown;
};
requires?: Array<MessageSpec>;
provides?: Array<MessageSpec>;
};
/**
* The Python source of a node.
*/
export type NodeSource = {
code: string;
};
/**
* Whether a node loaded, and why not.
*/
export type NodeStatusPublic = {
id: string;
status?: string;
error?: (string | null);
};
/**
* A node type the editor can offer, with its parameter schema.
*/
export type NodeTypeInfo = {
type: string;
title: string;
description: string;
params_schema?: {
[key: string]: unknown;
};
has_source?: boolean;
};
/**
* Where a node sits on the canvas.
*/
export type Position = {
x?: number;
y?: number;
};
export type PrivateUserCreate = {
email: string;
password: string;
@@ -52,11 +216,32 @@ export type PrivateUserCreate = {
is_verified?: boolean;
};
export type RunRequest = {
inputs?: {
[key: string]: unknown;
};
};
export type SecretNames = {
data: Array<(string)>;
count: number;
};
export type SecretValue = {
value: string;
};
export type Token = {
access_token: string;
token_type?: string;
};
export type TriggerRequest = {
values?: {
[key: string]: unknown;
};
};
export type UpdatePassword = {
current_password: string;
new_password: string;
@@ -109,6 +294,90 @@ export type ValidationError = {
type: string;
};
/**
* A problem that keeps a flow from running correctly.
*/
export type ValidationIssue = {
code: 'cycle' | 'unconnected_input' | 'missing_initial_value' | 'node_error';
message: string;
flow?: string;
nodes?: Array<(string)>;
node?: (string | null);
port?: (string | null);
message_name?: (string | null);
};
export type code = 'cycle' | 'unconnected_input' | 'missing_initial_value' | 'node_error';
export type ValidationResult = {
issues?: Array<ValidationIssue>;
};
export type FlowsReadFlowsResponse = (FlowsPublic);
export type FlowsReadNodeTypesResponse = (Array<NodeTypeInfo>);
export type FlowsReadFlowData = {
name: string;
};
export type FlowsReadFlowResponse = (FlowDetail);
export type FlowsSaveFlowData = {
name: string;
requestBody: FlowDef_Input;
};
export type FlowsSaveFlowResponse = (FlowDetail);
export type FlowsDeleteFlowData = {
name: string;
};
export type FlowsDeleteFlowResponse = (Message);
export type FlowsReadNodeSourceData = {
name: string;
nodeId: string;
};
export type FlowsReadNodeSourceResponse = (NodeSource);
export type FlowsSaveNodeSourceData = {
name: string;
nodeId: string;
requestBody: NodeSource;
};
export type FlowsSaveNodeSourceResponse = (NodeStatusPublic);
export type FlowsValidateFlowData = {
name: string;
};
export type FlowsValidateFlowResponse = (ValidationResult);
export type FlowsRunFlowData = {
name: string;
requestBody: RunRequest;
};
export type FlowsRunFlowResponse = (FlowStatePublic);
export type FlowsTriggerNodeData = {
name: string;
nodeId: string;
requestBody: TriggerRequest;
};
export type FlowsTriggerNodeResponse = (FlowStatePublic);
export type FlowsReadFlowStateData = {
name: string;
};
export type FlowsReadFlowStateResponse = (FlowStatePublic);
export type ItemsReadItemsData = {
limit?: number;
skip?: number;
@@ -173,6 +442,21 @@ export type PrivateCreateUserData = {
export type PrivateCreateUserResponse = (UserPublic);
export type SecretsReadSecretsResponse = (SecretNames);
export type SecretsSaveSecretData = {
name: string;
requestBody: SecretValue;
};
export type SecretsSaveSecretResponse = (Message);
export type SecretsDeleteSecretData = {
name: string;
};
export type SecretsDeleteSecretResponse = (Message);
export type UsersReadUsersData = {
limit?: number;
skip?: number;