@geenius/ai-workflow 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { WorkflowEngineOptions, WorkflowDefinition, WorkflowRun, WorkflowError, StepResult, WorkflowBuilderState, WorkflowStepDef, StepConnection, RunStatus, StepStatus, WorkflowTemplate, StepType } from '@geenius/ai-workflow-shared';
2
- export { RunStatus, StepConfig, StepResult, StepStatus, StepType, WORKFLOW_TEMPLATES, WorkflowBuilderState, WorkflowDefinition, WorkflowEngine, WorkflowRun, WorkflowStatus, WorkflowStepDef, validateWorkflow } from '@geenius/ai-workflow-shared';
2
+ export { RunStatus, StepConfig, StepResult, StepStatus, StepType, WORKFLOW_TEMPLATES, WorkflowBuilderState, WorkflowDefinition, WorkflowEngine, WorkflowRun, WorkflowStatus, WorkflowStepDef, getTemplate, getTemplatesByCategory, validateRun, validateWorkflow } from '@geenius/ai-workflow-shared';
3
3
  import { JSX, JSXElement } from 'solid-js';
4
4
 
5
5
  /**
@@ -12,6 +12,12 @@ import { JSX, JSXElement } from 'solid-js';
12
12
 
13
13
  /**
14
14
  * Runtime integrations accepted by the SolidJS workflow primitive.
15
+ *
16
+ * @property callLLM Optional LLM execution callback inherited from `WorkflowEngineOptions`.
17
+ * @property callWebhook Optional webhook execution callback inherited from `WorkflowEngineOptions`.
18
+ * @property onApprovalRequired Optional approval callback inherited from `WorkflowEngineOptions`.
19
+ * @property onStepComplete Optional per-step completion callback inherited from `WorkflowEngineOptions`.
20
+ * @property customHandlers Optional custom step-handler registry inherited from `WorkflowEngineOptions`.
15
21
  */
16
22
  interface CreateWorkflowOptions extends WorkflowEngineOptions {
17
23
  }
@@ -134,6 +140,12 @@ declare function createWorkflowStep(stepDef: WorkflowStepDef): {
134
140
  */
135
141
  /**
136
142
  * Pending approval request exposed to the UI layer.
143
+ *
144
+ * @property id Stable approval-request identifier.
145
+ * @property stepId Workflow step awaiting the operator decision.
146
+ * @property message Approval prompt shown to the operator.
147
+ * @property requestedAt Unix timestamp for when the approval was created.
148
+ * @property approvers Optional list of users or roles allowed to approve.
137
149
  */
138
150
  interface ApprovalRequest {
139
151
  id: string;
@@ -194,11 +206,16 @@ declare function createWorkflowTemplates(userId: string): {
194
206
  * @property definition Shared workflow definition to render.
195
207
  * @property selectedStepId Currently selected step identifier.
196
208
  * @property onSelectStep Callback used to change the selected step.
209
+ * @property onMoveStep Reserved callback for future drag interactions.
197
210
  */
198
211
  interface WorkflowCanvasProps {
199
212
  definition: WorkflowDefinition;
200
213
  selectedStepId: string | null;
201
214
  onSelectStep: (id: string | null) => void;
215
+ onMoveStep?: (stepId: string, pos: {
216
+ x: number;
217
+ y: number;
218
+ }) => void;
202
219
  }
203
220
  /**
204
221
  * Render a workflow canvas with connectors, nodes, and an empty state.
@@ -241,6 +258,11 @@ declare function StepNode(props: StepNodeProps): JSX.Element;
241
258
 
242
259
  /**
243
260
  * Props for a workflow step connector path.
261
+ *
262
+ * @property from Starting node position for the connector.
263
+ * @property to Ending node position for the connector.
264
+ * @property label Optional inline label rendered above the curve.
265
+ * @property isActive Whether the connector should use the emphasized active style.
244
266
  */
245
267
  interface StepConnectorProps {
246
268
  from: {
@@ -320,6 +342,11 @@ declare function WorkflowRunPanel(props: WorkflowRunPanelProps): JSX.Element;
320
342
 
321
343
  /**
322
344
  * Props for the SolidJS approval dialog.
345
+ *
346
+ * @property request Pending approval request to render, or `null` when idle.
347
+ * @property onApprove Callback that approves the active request by id.
348
+ * @property onReject Callback that rejects the active request by id.
349
+ * @property onDismiss Optional callback used for Escape-key and dismiss flows.
323
350
  */
324
351
  interface ApprovalModalProps {
325
352
  request: ApprovalRequest | null;
@@ -345,6 +372,19 @@ declare function ApprovalModal(props: ApprovalModalProps): JSX.Element;
345
372
 
346
373
  /**
347
374
  * Props for the workflow toolbar action surface.
375
+ *
376
+ * @property workflowName Human-readable workflow name shown in the title slot.
377
+ * @property isDirty Whether unsaved edits are currently present.
378
+ * @property isRunning Whether a run is currently active.
379
+ * @property canUndo Whether the undo action should be enabled.
380
+ * @property canRedo Whether the redo action should be enabled.
381
+ * @property onSave Callback that persists the current workflow definition.
382
+ * @property onRun Callback that starts a workflow run.
383
+ * @property onCancel Optional callback that stops an in-flight run.
384
+ * @property onUndo Callback that restores the previous builder snapshot.
385
+ * @property onRedo Callback that reapplies the next builder snapshot.
386
+ * @property onExport Optional callback that exports the workflow definition.
387
+ * @property class Optional class-name override for the toolbar container.
348
388
  */
349
389
  interface WorkflowToolbarProps {
350
390
  workflowName: string;
@@ -449,4 +489,4 @@ interface WorkflowRunsPageProps {
449
489
  */
450
490
  declare function WorkflowRunsPage(props: WorkflowRunsPageProps): JSX.Element;
451
491
 
452
- export { ApprovalModal, type ApprovalModalProps, type ApprovalRequest, StepConfigPanel, type StepConfigPanelProps, StepConnector, StepNode, type StepNodeProps, StepPalette, type StepPaletteProps, WorkflowBuilderPage, type WorkflowBuilderPageProps, WorkflowCanvas, WorkflowRunPanel, type WorkflowRunPanelProps, WorkflowRunsPage, type WorkflowRunsPageProps, WorkflowToolbar, createApprovalGate, createWorkflow, createWorkflowBuilder, createWorkflowRun, createWorkflowStep, createWorkflowTemplates };
492
+ export { ApprovalModal, type ApprovalModalProps, type ApprovalRequest, StepConfigPanel, type StepConfigPanelProps, StepConnector, type StepConnectorProps, StepNode, type StepNodeProps, StepPalette, type StepPaletteProps, WorkflowBuilderPage, type WorkflowBuilderPageProps, WorkflowCanvas, type WorkflowCanvasProps, WorkflowRunPanel, type WorkflowRunPanelProps, WorkflowRunsPage, type WorkflowRunsPageProps, WorkflowToolbar, type WorkflowToolbarProps, createApprovalGate, createWorkflow, createWorkflowBuilder, createWorkflowRun, createWorkflowStep, createWorkflowTemplates };