@fluxo-dev/api-client-base 26.2.3 → 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
@@ -4720,13 +4720,25 @@ class BaseCommonService {
4720
4720
  return HttpClient$1.Instance().client.post(`/${this._baseApiPath}`, entity);
4721
4721
  }
4722
4722
  update(id, entity) {
4723
- return HttpClient$1.Instance().client.put(`/${this._baseApiPath}/${encodeURIComponent(id)}`, entity);
4723
+ return HttpClient$1.Instance().client.put(`/${this._baseApiPath}/${encodeURIComponent(id)}`, entity, {
4724
+ headers: {
4725
+ 'korebi-decode-path-params': 'all'
4726
+ }
4727
+ });
4724
4728
  }
4725
4729
  delete(entityId) {
4726
- return HttpClient$1.Instance().client.delete(`/${this._baseApiPath}/${encodeURIComponent(entityId)}`);
4730
+ return HttpClient$1.Instance().client.delete(`/${this._baseApiPath}/${encodeURIComponent(entityId)}`, {
4731
+ headers: {
4732
+ 'korebi-decode-path-params': 'all'
4733
+ }
4734
+ });
4727
4735
  }
4728
4736
  get(id, include) {
4729
- return HttpClient$1.Instance().client.get(`/${this._baseApiPath}/${encodeURIComponent(id)}${include ? `?includes=${encodeURIComponent(include)}` : ''}`);
4737
+ return HttpClient$1.Instance().client.get(`/${this._baseApiPath}/${encodeURIComponent(id)}${include ? `?includes=${encodeURIComponent(include)}` : ''}`, {
4738
+ headers: {
4739
+ 'korebi-decode-path-params': 'all'
4740
+ }
4741
+ });
4730
4742
  }
4731
4743
  }
4732
4744
 
@@ -5873,9 +5885,6 @@ exports.ActionInputTypeEnum = void 0;
5873
5885
  ActionInputTypeEnum[ActionInputTypeEnum["StepOutput"] = 2] = "StepOutput";
5874
5886
  ActionInputTypeEnum[ActionInputTypeEnum["Environment"] = 3] = "Environment"; // Variabile ambiente
5875
5887
  })(exports.ActionInputTypeEnum || (exports.ActionInputTypeEnum = {}));
5876
- // ============================================================================
5877
- // Workflow Execution Types
5878
- // ============================================================================
5879
5888
  exports.WorkflowStatus = void 0;
5880
5889
  (function (WorkflowStatus) {
5881
5890
  WorkflowStatus[WorkflowStatus["Runnable"] = 0] = "Runnable";
@@ -5972,18 +5981,14 @@ class WorkflowService {
5972
5981
  /**
5973
5982
  * Attiva un workflow
5974
5983
  */
5975
- activateWorkflow(id, updatedBy) {
5976
- return HttpClient$1.Instance().client.post(`workflow/workflows/${id}/activate`, {
5977
- updatedBy
5978
- });
5984
+ activateWorkflow(id) {
5985
+ return HttpClient$1.Instance().client.post(`workflow/workflows/${id}/activate`, {});
5979
5986
  }
5980
5987
  /**
5981
5988
  * Disattiva un workflow
5982
5989
  */
5983
- deactivateWorkflow(id, updatedBy) {
5984
- return HttpClient$1.Instance().client.post(`workflow/workflows/${id}/deactivate`, {
5985
- updatedBy
5986
- });
5990
+ deactivateWorkflow(id) {
5991
+ return HttpClient$1.Instance().client.post(`workflow/workflows/${id}/deactivate`, {});
5987
5992
  }
5988
5993
  /**
5989
5994
  * Avvia un workflow con un trigger specifico
@@ -6008,8 +6013,8 @@ class WorkflowService {
6008
6013
  /**
6009
6014
  * Clona un workflow
6010
6015
  */
6011
- cloneWorkflow(id, request) {
6012
- 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`, {});
6013
6018
  }
6014
6019
  // ============================================================================
6015
6020
  // Validation
@@ -6021,19 +6026,19 @@ class WorkflowService {
6021
6026
  return HttpClient$1.Instance().client.post('workflow/designer/validate', schema);
6022
6027
  }
6023
6028
  // ============================================================================
6024
- // Conversion (opzionale, per test/debug)
6029
+ // Workflow Debug
6025
6030
  // ============================================================================
6026
6031
  /**
6027
- * Converte uno schema ReactFlow in WorkflowCore JSON
6032
+ * Avvia una sessione di debug per il workflow corrente (schema non salvato)
6028
6033
  */
6029
- convertToWorkflowCore(schema) {
6030
- 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);
6031
6036
  }
6032
6037
  /**
6033
- * Converte un WorkflowCore JSON in schema ReactFlow
6038
+ * Ferma una sessione di debug attiva
6034
6039
  */
6035
- convertToReactFlow(request) {
6036
- 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`, {});
6037
6042
  }
6038
6043
  // ============================================================================
6039
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.3",
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.3"
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
  */