Flows and dashboards are created by POST under an issued or superuser-pinned id; PUT only updates; deleted flows leave a tombstone with their key; the controller stores by id and runs by key, hooks live under /hooks/<flow id>; a key with state or queued work behind it is refused until cleared

This commit is contained in:
2026-11-02 17:41:23 +01:00
parent fae85f5ecb
commit 08a6376836
63 changed files with 2832 additions and 936 deletions
+84
View File
@@ -668,6 +668,29 @@ chunk. A reference may carry a \`\`meta\`\` dict — sample rate, dimensions, a
sequence number — which nothing here interprets.`
} as const;
export const DashboardCreateSchema = {
properties: {
id: {
type: 'string',
title: 'Id',
default: ''
},
name: {
type: 'string',
title: 'Name'
},
title: {
type: 'string',
title: 'Title',
default: ''
}
},
type: 'object',
required: ['name'],
title: 'DashboardCreate',
description: 'A new dashboard: one empty grid under a key, filled in by saves after.'
} as const;
export const DashboardDef_InputSchema = {
properties: {
id: {
@@ -1504,6 +1527,67 @@ export const FlavorsPublicSchema = {
title: 'FlavorsPublic'
} as const;
export const FlowCreateSchema = {
properties: {
id: {
type: 'string',
title: 'Id',
default: ''
},
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'
},
mode: {
type: 'string',
enum: ['live', 'batch'],
title: 'Mode',
default: 'live'
},
outputs: {
items: {
type: 'string'
},
type: 'array',
title: 'Outputs'
},
origin: {
anyOf: [
{
'$ref': '#/components/schemas/FlowOrigin'
},
{
type: 'null'
}
]
}
},
type: 'object',
required: ['name'],
title: 'FlowCreate',
description: `A new flow as a client hands it over: a document but for what the
server owns. The fields mean what they do on \`FlowDef\`, but \`\`id\`\`.`
} as const;
export const FlowDef_InputSchema = {
properties: {
id: {
File diff suppressed because one or more lines are too long
+77 -42
View File
@@ -168,6 +168,15 @@ export type ControlWatch = {
node?: string;
};
/**
* A new dashboard: one empty grid under a key, filled in by saves after.
*/
export type DashboardCreate = {
id?: string;
name: string;
title?: string;
};
/**
* A dashboard as stored, and as the API hands it over.
*/
@@ -424,6 +433,23 @@ export type FlavorUpdate = {
description?: (string | null);
};
/**
* A new flow as a client hands it over: a document but for what the
* server owns. The fields mean what they do on `FlowDef`, but ``id``.
*/
export type FlowCreate = {
id?: string;
name: string;
title?: string;
nodes?: Array<NodeDef_Input>;
inputs?: Array<FlowInput_Input>;
mode?: 'live' | 'batch';
outputs?: Array<(string)>;
origin?: (FlowOrigin | null);
};
export type mode = 'live' | 'batch';
/**
* One atomic flow.
*/
@@ -448,11 +474,6 @@ export type FlowDef_Input = {
origin?: (FlowOrigin | null);
};
/**
* A live flow reacts to what arrives: its subscriptions, schedules and webhooks run until it is stopped. A batch flow only runs when a run asks it to, from its inputs to its outputs, and is never activated.
*/
export type mode = 'live' | 'batch';
/**
* One atomic flow.
*/
@@ -1846,55 +1867,59 @@ export type ConnectorsDeleteConnectorStateData = {
export type ConnectorsDeleteConnectorStateResponse = (Message);
export type DashboardsReadDashboardsResponse = (DashboardsPublic);
export type DashboardsReadDashboardData = {
draft?: boolean;
name: string;
export type DashboardsReadDashboardsData = {
name?: (string | null);
};
export type DashboardsReadDashboardResponse = (DashboardDef_Output);
export type DashboardsReadDashboardsResponse = (DashboardsPublic);
export type DashboardsCreateDashboardData = {
name: string;
requestBody: DashboardCreate;
};
export type DashboardsCreateDashboardResponse = (DashboardDef_Output);
export type DashboardsReadDashboardData = {
dashboardId: string;
draft?: boolean;
};
export type DashboardsReadDashboardResponse = (DashboardDef_Output);
export type DashboardsSaveDashboardData = {
name: string;
dashboardId: string;
requestBody: DashboardDef_Input;
};
export type DashboardsSaveDashboardResponse = (DashboardDef_Output);
export type DashboardsDeleteDashboardData = {
name: string;
dashboardId: string;
};
export type DashboardsDeleteDashboardResponse = (Message);
export type DashboardsGenerateResultsDashboardData = {
flow: string;
flowId: string;
};
export type DashboardsGenerateResultsDashboardResponse = (DashboardDef_Output);
export type DashboardsPublishDashboardData = {
name: string;
dashboardId: string;
requestBody: fluksio__api__routes__dashboards__PublishRequest;
};
export type DashboardsPublishDashboardResponse = (DashboardDef_Output);
export type DashboardsDiscardDashboardDraftData = {
name: string;
dashboardId: string;
};
export type DashboardsDiscardDashboardDraftResponse = (DashboardDef_Output);
export type DashboardsDuplicateDashboardData = {
name: string;
dashboardId: string;
};
export type DashboardsDuplicateDashboardResponse = (DashboardDef_Output);
@@ -1994,8 +2019,18 @@ export type FlavorsDeleteFlavorData = {
export type FlavorsDeleteFlavorResponse = (Message);
export type FlowsReadFlowsData = {
name?: (string | null);
};
export type FlowsReadFlowsResponse = (FlowsPublic);
export type FlowsCreateFlowData = {
requestBody: FlowCreate;
};
export type FlowsCreateFlowResponse = (FlowDetail);
export type FlowsReadNodeTypesResponse = (Array<NodeTypeInfo>);
export type FlowsReadGraphResponse = (BrainGraph);
@@ -2010,45 +2045,45 @@ export type FlowsDeleteSharedNodeData = {
export type FlowsDeleteSharedNodeResponse = (Message);
export type FlowsReadFlowData = {
name: string;
flowId: string;
};
export type FlowsReadFlowResponse = (FlowDetail);
export type FlowsSaveFlowData = {
name: string;
flowId: string;
requestBody: FlowDef_Input;
};
export type FlowsSaveFlowResponse = (FlowDetail);
export type FlowsDeleteFlowData = {
name: string;
flowId: string;
};
export type FlowsDeleteFlowResponse = (Message);
export type FlowsPublishFlowData = {
name: string;
flowId: string;
requestBody: fluksio__api__routes__flows__PublishRequest;
};
export type FlowsPublishFlowResponse = (FlowDetail);
export type FlowsDiscardDraftData = {
name: string;
flowId: string;
};
export type FlowsDiscardDraftResponse = (FlowDetail);
export type FlowsDuplicateFlowData = {
name: string;
flowId: string;
};
export type FlowsDuplicateFlowResponse = (FlowDetail);
export type FlowsReadNodeSourceData = {
name: string;
flowId: string;
nodeId: string;
};
@@ -2056,7 +2091,7 @@ export type FlowsReadNodeSourceResponse = (NodeSource);
export type FlowsSaveNodeSourceData = {
drop?: boolean;
name: string;
flowId: string;
nodeId: string;
requestBody: NodeSource;
};
@@ -2064,7 +2099,7 @@ export type FlowsSaveNodeSourceData = {
export type FlowsSaveNodeSourceResponse = (NodeSourceSaved);
export type FlowsShareNodeData = {
name: string;
flowId: string;
nodeId: string;
requestBody: ShareRequest;
};
@@ -2072,57 +2107,57 @@ export type FlowsShareNodeData = {
export type FlowsShareNodeResponse = (FlowDetail);
export type FlowsUnshareNodeData = {
name: string;
flowId: string;
nodeId: string;
};
export type FlowsUnshareNodeResponse = (FlowDetail);
export type FlowsStartFlowData = {
name: string;
flowId: string;
};
export type FlowsStartFlowResponse = (FlowDetail);
export type FlowsStopFlowData = {
name: string;
flowId: string;
};
export type FlowsStopFlowResponse = (FlowDetail);
export type FlowsPauseFlowData = {
name: string;
flowId: string;
};
export type FlowsPauseFlowResponse = (Message);
export type FlowsResumeFlowData = {
name: string;
flowId: string;
};
export type FlowsResumeFlowResponse = (Message);
export type FlowsStepFlowData = {
name: string;
flowId: string;
};
export type FlowsStepFlowResponse = (Message);
export type FlowsValidateFlowData = {
name: string;
flowId: string;
};
export type FlowsValidateFlowResponse = (ValidationResult);
export type FlowsRunFlowData = {
name: string;
flowId: string;
requestBody: RunRequest;
};
export type FlowsRunFlowResponse = (FlowStatePublic);
export type FlowsTriggerNodeData = {
name: string;
flowId: string;
nodeId: string;
requestBody: TriggerRequest;
};
@@ -2130,42 +2165,42 @@ export type FlowsTriggerNodeData = {
export type FlowsTriggerNodeResponse = (FlowStatePublic);
export type FlowsCancelNodeData = {
name: string;
flowId: string;
nodeId: string;
};
export type FlowsCancelNodeResponse = (Message);
export type FlowsAcknowledgeNodeErrorData = {
name: string;
flowId: string;
nodeId: string;
};
export type FlowsAcknowledgeNodeErrorResponse = (Message);
export type FlowsTrainNodeData = {
name: string;
flowId: string;
nodeId: string;
};
export type FlowsTrainNodeResponse = (Training);
export type FlowsReadTrainingData = {
name: string;
flowId: string;
nodeId: string;
};
export type FlowsReadTrainingResponse = ((Training | null));
export type FlowsReadFlowStateData = {
name: string;
flowId: string;
};
export type FlowsReadFlowStateResponse = (FlowStatePublic);
export type FlowsReadMessageHistoryData = {
flowId: string;
message: string;
name: string;
};
export type FlowsReadMessageHistoryResponse = (MessageHistory);