@fluxo-dev/api-client-base 26.2.4 → 26.2.5

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.
package/index.cjs.js CHANGED
@@ -5885,9 +5885,6 @@ exports.ActionInputTypeEnum = void 0;
5885
5885
  ActionInputTypeEnum[ActionInputTypeEnum["StepOutput"] = 2] = "StepOutput";
5886
5886
  ActionInputTypeEnum[ActionInputTypeEnum["Environment"] = 3] = "Environment"; // Variabile ambiente
5887
5887
  })(exports.ActionInputTypeEnum || (exports.ActionInputTypeEnum = {}));
5888
- // ============================================================================
5889
- // Workflow Execution Types
5890
- // ============================================================================
5891
5888
  exports.WorkflowStatus = void 0;
5892
5889
  (function (WorkflowStatus) {
5893
5890
  WorkflowStatus[WorkflowStatus["Runnable"] = 0] = "Runnable";
@@ -5984,18 +5981,14 @@ class WorkflowService {
5984
5981
  /**
5985
5982
  * Attiva un workflow
5986
5983
  */
5987
- activateWorkflow(id, updatedBy) {
5988
- return HttpClient$1.Instance().client.post(`workflow/workflows/${id}/activate`, {
5989
- updatedBy
5990
- });
5984
+ activateWorkflow(id) {
5985
+ return HttpClient$1.Instance().client.post(`workflow/workflows/${id}/activate`, {});
5991
5986
  }
5992
5987
  /**
5993
5988
  * Disattiva un workflow
5994
5989
  */
5995
- deactivateWorkflow(id, updatedBy) {
5996
- return HttpClient$1.Instance().client.post(`workflow/workflows/${id}/deactivate`, {
5997
- updatedBy
5998
- });
5990
+ deactivateWorkflow(id) {
5991
+ return HttpClient$1.Instance().client.post(`workflow/workflows/${id}/deactivate`, {});
5999
5992
  }
6000
5993
  /**
6001
5994
  * Avvia un workflow con un trigger specifico
@@ -6020,8 +6013,8 @@ class WorkflowService {
6020
6013
  /**
6021
6014
  * Clona un workflow
6022
6015
  */
6023
- cloneWorkflow(id, request) {
6024
- return HttpClient$1.Instance().client.post(`workflow/workflows/${id}/clone`, request);
6016
+ cloneWorkflow(id) {
6017
+ return HttpClient$1.Instance().client.post(`workflow/workflows/${id}/clone`, {});
6025
6018
  }
6026
6019
  // ============================================================================
6027
6020
  // Validation
@@ -6033,19 +6026,19 @@ class WorkflowService {
6033
6026
  return HttpClient$1.Instance().client.post('workflow/designer/validate', schema);
6034
6027
  }
6035
6028
  // ============================================================================
6036
- // Conversion (opzionale, per test/debug)
6029
+ // Workflow Debug
6037
6030
  // ============================================================================
6038
6031
  /**
6039
- * Converte uno schema ReactFlow in WorkflowCore JSON
6032
+ * Avvia una sessione di debug per il workflow corrente (schema non salvato)
6040
6033
  */
6041
- convertToWorkflowCore(schema) {
6042
- return HttpClient$1.Instance().client.post('workflow/designer/convert/to-workflowcore', schema);
6034
+ startDebugSession(request) {
6035
+ return HttpClient$1.Instance().client.post('workflow/workflow/debug/start', request);
6043
6036
  }
6044
6037
  /**
6045
- * Converte un WorkflowCore JSON in schema ReactFlow
6038
+ * Ferma una sessione di debug attiva
6046
6039
  */
6047
- convertToReactFlow(request) {
6048
- return HttpClient$1.Instance().client.post('workflow/designer/convert/to-reactflow', request);
6040
+ stopDebugSession(sessionId) {
6041
+ return HttpClient$1.Instance().client.post(`workflow/workflow/debug/${sessionId}/stop`, {});
6049
6042
  }
6050
6043
  // ============================================================================
6051
6044
  // Legacy (manteniamo per compatibilità)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluxo-dev/api-client-base",
3
- "version": "26.2.4",
3
+ "version": "26.2.5",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "react": "^18.3.1",
@@ -8,7 +8,7 @@
8
8
  "react-router-dom": "^6.11.2",
9
9
  "react-redux": "^8.0.5",
10
10
  "@reduxjs/toolkit": "^1.9.1",
11
- "@fluxo-dev/state": "^26.2.4"
11
+ "@fluxo-dev/state": "^26.2.5"
12
12
  },
13
13
  "main": "./index.cjs.js",
14
14
  "types": "./index.cjs.d.ts"
@@ -66,7 +66,6 @@ export interface WorkflowEdge {
66
66
  animated?: boolean;
67
67
  }
68
68
  export interface WorkflowMetadata {
69
- workflowId: string;
70
69
  version: number;
71
70
  description?: string;
72
71
  dataType?: string;
@@ -104,7 +103,6 @@ export interface WorkflowSummaryDto {
104
103
  updatedBy: string;
105
104
  }
106
105
  export interface CreateWorkflowRequest {
107
- workflowId?: string;
108
106
  name: string;
109
107
  description?: string;
110
108
  reactFlowSchema: WorkflowReactFlowSchema;
@@ -124,11 +122,6 @@ export interface UpdateWorkflowRequest {
124
122
  tags?: string[];
125
123
  updatedBy: string;
126
124
  }
127
- export interface CloneWorkflowRequest {
128
- newWorkflowId?: string;
129
- newName?: string;
130
- createdBy: string;
131
- }
132
125
  export interface WorkflowValidationResult {
133
126
  isValid: boolean;
134
127
  errors: WorkflowValidationError[];
@@ -242,13 +235,6 @@ export interface WorkflowTriggerDto {
242
235
  inputs: ActionInputDescriptor[];
243
236
  outputs: ActionOutputDescriptor[];
244
237
  }
245
- export interface ConvertToWorkflowCoreResponse {
246
- workflowCoreJson: string;
247
- }
248
- export interface ConvertToReactFlowRequest {
249
- workflowCoreJson: string;
250
- autoLayout?: boolean;
251
- }
252
238
  export interface Workflow {
253
239
  nodes: WorkflowNode[];
254
240
  edges: WorkflowEdge[];
@@ -261,6 +247,47 @@ export interface TriggerCategoryDefinition {
261
247
  name: string;
262
248
  triggers: WorkflowTriggerDto[];
263
249
  }
250
+ export interface DebugInputItem {
251
+ key: string;
252
+ value: unknown;
253
+ }
254
+ export interface DebugStartRequest {
255
+ reactFlowSchema: WorkflowReactFlowSchema;
256
+ inputs: DebugInputItem[];
257
+ }
258
+ export interface DebugSessionDto {
259
+ sessionId: string;
260
+ hubUrl: string;
261
+ }
262
+ export type NodeDebugEventType = 'NodeStarted' | 'NodeCompleted' | 'NodeFailed' | 'WorkflowCompleted' | 'WorkflowFailed';
263
+ export interface NodeStartedEvent {
264
+ sessionId: string;
265
+ nodeId: string;
266
+ stepName: string;
267
+ startTime: string;
268
+ }
269
+ export interface NodeCompletedEvent {
270
+ sessionId: string;
271
+ nodeId: string;
272
+ stepName: string;
273
+ endTime: string;
274
+ outputs?: Record<string, unknown>;
275
+ }
276
+ export interface NodeFailedEvent {
277
+ sessionId: string;
278
+ nodeId: string;
279
+ stepName: string;
280
+ endTime: string;
281
+ error: string;
282
+ }
283
+ export interface WorkflowCompletedEvent {
284
+ sessionId: string;
285
+ duration: number;
286
+ }
287
+ export interface WorkflowFailedEvent {
288
+ sessionId: string;
289
+ error: string;
290
+ }
264
291
  export declare enum WorkflowStatus {
265
292
  Runnable = 0,// In esecuzione o pronta per eseguire
266
293
  Suspended = 1,// Sospesa manualmente
@@ -1,4 +1,4 @@
1
- import { Workflow, WorkflowDto, WorkflowSummaryDto, CreateWorkflowRequest, UpdateWorkflowRequest, CloneWorkflowRequest, WorkflowValidationResult, WorkflowReactFlowSchema, ConvertToWorkflowCoreResponse, ConvertToReactFlowRequest, WorkflowActionCategoryDto, WorkflowTriggerCategoryDto, WorkflowExecutionSummaryDto, WorkflowExecutionDetailsDto, WorkflowExecutionStepDto, WorkflowExecutionErrorDto } from "./models";
1
+ import { Workflow, WorkflowDto, WorkflowSummaryDto, CreateWorkflowRequest, UpdateWorkflowRequest, WorkflowValidationResult, WorkflowReactFlowSchema, WorkflowActionCategoryDto, WorkflowTriggerCategoryDto, WorkflowExecutionSummaryDto, WorkflowExecutionDetailsDto, WorkflowExecutionStepDto, WorkflowExecutionErrorDto, DebugStartRequest, DebugSessionDto } from "./models";
2
2
  import { BlockDescriptor, BlocksByCategory, BlockPreviewRequest, BlockPreviewResponse, ExecutePipelineRequest, ExecuteSavedPipelineRequest, PipelineDetails, PipelineExecutionDetails, PipelineExecutionHistoryItem, PipelineListItem, PipelineResult, RunningExecutionItem, SavePipelineRequest, SavePipelineResponse, StopExecutionResponse, ValidatePipelineRequest, ValidationResult } from "./models/etl.models";
3
3
  export declare class WorkflowService {
4
4
  getEtlBlocks(): Promise<BlockDescriptor[]>;
@@ -43,11 +43,11 @@ export declare class WorkflowService {
43
43
  /**
44
44
  * Attiva un workflow
45
45
  */
46
- activateWorkflow(id: number, updatedBy: string): Promise<WorkflowDto>;
46
+ activateWorkflow(id: number): Promise<WorkflowDto>;
47
47
  /**
48
48
  * Disattiva un workflow
49
49
  */
50
- deactivateWorkflow(id: number, updatedBy: string): Promise<WorkflowDto>;
50
+ deactivateWorkflow(id: number): Promise<WorkflowDto>;
51
51
  /**
52
52
  * Avvia un workflow con un trigger specifico
53
53
  * @param workflowId - ID del workflow da avviare
@@ -60,19 +60,19 @@ export declare class WorkflowService {
60
60
  /**
61
61
  * Clona un workflow
62
62
  */
63
- cloneWorkflow(id: number, request: CloneWorkflowRequest): Promise<WorkflowDto>;
63
+ cloneWorkflow(id: number): Promise<WorkflowDto>;
64
64
  /**
65
65
  * Valida uno schema ReactFlow
66
66
  */
67
67
  validateWorkflow(schema: WorkflowReactFlowSchema): Promise<WorkflowValidationResult>;
68
68
  /**
69
- * Converte uno schema ReactFlow in WorkflowCore JSON
69
+ * Avvia una sessione di debug per il workflow corrente (schema non salvato)
70
70
  */
71
- convertToWorkflowCore(schema: WorkflowReactFlowSchema): Promise<ConvertToWorkflowCoreResponse>;
71
+ startDebugSession(request: DebugStartRequest): Promise<DebugSessionDto>;
72
72
  /**
73
- * Converte un WorkflowCore JSON in schema ReactFlow
73
+ * Ferma una sessione di debug attiva
74
74
  */
75
- convertToReactFlow(request: ConvertToReactFlowRequest): Promise<WorkflowReactFlowSchema>;
75
+ stopDebugSession(sessionId: string): Promise<void>;
76
76
  /**
77
77
  * @deprecated Use validateWorkflow instead
78
78
  */