@transai/connector-runner-file-copy 0.61.2 → 0.61.3

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,3 +1,3 @@
1
- import { WorkflowDefinitionStep, ConditionalJob, ActionJob, ValidationJob, ActionStep, PlaceholderJob, WorkflowTitleJob, ActionInterface, IterationJob, JsonataJob } from '@xip-online-data/types';
1
+ import { WorkflowDefinitionStep, ConditionalJob, ActionJob, ValidationJob, ActionStep, PlaceholderJob, WorkflowTitleJob, ActionInterface, IterationJob, JsonataJob, EndJob } from '@xip-online-data/types';
2
2
  export declare const createActionJob: (step: ActionStep, action: ActionInterface, testRun?: boolean) => Omit<ActionJob, "run">;
3
- export declare const createJobFromSteps: (step: WorkflowDefinitionStep, testRun?: boolean) => Omit<ConditionalJob | JsonataJob | ValidationJob | PlaceholderJob | WorkflowTitleJob | IterationJob, "run"> | undefined;
3
+ export declare const createJobFromSteps: (step: WorkflowDefinitionStep, testRun?: boolean) => Omit<ConditionalJob | JsonataJob | ValidationJob | PlaceholderJob | WorkflowTitleJob | IterationJob | EndJob, "run"> | undefined;
@@ -0,0 +1,4 @@
1
+ export declare enum EndNodeStatus {
2
+ SUCCESS = "SUCCESS",
3
+ FAILED = "FAILED"
4
+ }
@@ -1,3 +1,5 @@
1
1
  export * from './node-types.enum';
2
2
  export * from './trigger-types.enum';
3
3
  export * from './workflow-status.enum';
4
+ export * from './end-node-status.enum';
5
+ export * from './workflow-run-outcome-status.enum';
@@ -0,0 +1,5 @@
1
+ export declare enum WorkflowRunOutcomeStatus {
2
+ SUCCESS = "SUCCESS",
3
+ FAILED = "FAILED",
4
+ SKIPPED = "SKIPPED"
5
+ }
@@ -4,6 +4,7 @@ export * from './auto-retry';
4
4
  export * from './offset.interface';
5
5
  export * from './workflow-definition.interface';
6
6
  export * from './workflow-run.interface';
7
+ export * from './workflow-run-outcome';
7
8
  export * from './workflow-finished-state';
8
9
  export * from './workflow-drawing.interface';
9
10
  export * from './parameter-mapper.interface';
@@ -1,7 +1,7 @@
1
1
  import { AutoRetrySettings } from './auto-retry';
2
2
  import { NodeTypes, TriggerType } from './enums';
3
3
  import { ConditionMapper, JsonataMapper, NodeMapper, ValidationMapper, WorkflowTitleMapper } from './parameter-mapper.interface';
4
- import { IterationConfig, IterationInput, NodeSelectors, WorkflowDrawing } from './workflow-drawing.interface';
4
+ import { IterationConfig, EndNodeConfig, IterationInput, NodeSelectors, WorkflowDrawing } from './workflow-drawing.interface';
5
5
  export interface StoredInterface {
6
6
  id: string;
7
7
  createdAt: Date;
@@ -55,7 +55,12 @@ export interface IterationStep extends WorkflowDefinitionStepBase {
55
55
  with: IterationInput;
56
56
  iteration: IterationConfig;
57
57
  }
58
- export type WorkflowDefinitionStep = ActionStep | ConditionalStep | JsonataStep | ValidationStep | PlaceholderStep | WorkflowTitleStep | IterationStep;
58
+ export interface EndStep extends WorkflowDefinitionStepBase {
59
+ type: NodeTypes.END;
60
+ operationIdentifier: 'END';
61
+ with: EndNodeConfig;
62
+ }
63
+ export type WorkflowDefinitionStep = ActionStep | ConditionalStep | JsonataStep | ValidationStep | PlaceholderStep | WorkflowTitleStep | IterationStep | EndStep;
59
64
  export interface CreateWorkflowDefinition {
60
65
  identifier: string;
61
66
  name: string;
@@ -1,6 +1,6 @@
1
1
  import { ChartInterface } from '../chart.interface';
2
2
  import { AutoRetrySettings } from './auto-retry';
3
- import { ConditionalTypes, NodeTypes, TriggerType, WorkflowRunStatusStatus } from './enums';
3
+ import { ConditionalTypes, EndNodeStatus, NodeTypes, TriggerType, WorkflowRunStatusStatus } from './enums';
4
4
  import { ArrayMapper, ConditionMapper, MessageMapper, SimpleArrayMapper, ValidationMapper, WorkflowTitleMapper } from './parameter-mapper.interface';
5
5
  export interface Conditional {
6
6
  type: ConditionalTypes;
@@ -55,8 +55,13 @@ export interface ValidationNode extends Node {
55
55
  export interface AnnotationNode extends Node {
56
56
  type: NodeTypes.ANNOTATION;
57
57
  }
58
+ export interface EndNodeConfig {
59
+ status: EndNodeStatus;
60
+ message?: string;
61
+ }
58
62
  export interface EndNode extends Node {
59
63
  type: NodeTypes.END;
64
+ with?: EndNodeConfig;
60
65
  }
61
66
  export interface PlaceholderNode extends Node {
62
67
  type: NodeTypes.PLACEHOLDER;
@@ -0,0 +1,7 @@
1
+ import { WorkflowRunOutcome, WorkflowRunStatusInfo } from './workflow-run.interface';
2
+ /** Derived outcome messages (failure log, abort or skip reason) are capped at this length. */
3
+ export declare const MAX_OUTCOME_MESSAGE_LENGTH = 1000;
4
+ /** Cuts a derived outcome message to the limit and marks the cut with an ellipsis. */
5
+ export declare const truncateOutcomeMessage: (message: string) => string;
6
+ /** The outcome of an aborted run: SKIPPED, with the abort reason as its message. */
7
+ export declare const buildAbortedOutcome: (statusInfo?: WorkflowRunStatusInfo | null) => WorkflowRunOutcome;
@@ -1,8 +1,8 @@
1
1
  import { EventInterface } from '../event-origin.interface';
2
- import { WorkflowRunStatusStatus, WorkflowJobStatusStatus, NodeTypes } from './enums';
2
+ import { WorkflowRunStatusStatus, WorkflowJobStatusStatus, NodeTypes, WorkflowRunOutcomeStatus } from './enums';
3
3
  import { ConditionMapper, MessageMapper, JsonataMapper, NodeMapper, ValidationMapper, WorkflowTitleMapper } from './parameter-mapper.interface';
4
4
  import { WorkflowDefinition, WorkflowDefinitionStep } from './workflow-definition.interface';
5
- import { WorkflowDrawing } from './workflow-drawing.interface';
5
+ import { EndNodeConfig, WorkflowDrawing } from './workflow-drawing.interface';
6
6
  export interface IterationScopeEntry {
7
7
  nodeId: string;
8
8
  item: unknown;
@@ -79,14 +79,27 @@ export interface PlaceholderJob extends BaseWorkflowJobInterface {
79
79
  type: NodeTypes.PLACEHOLDER;
80
80
  with: object;
81
81
  }
82
+ export interface EndJob extends BaseWorkflowJobInterface {
83
+ type: NodeTypes.END;
84
+ with: EndNodeConfig;
85
+ }
82
86
  export interface IterationJob extends BaseWorkflowJobInterface {
83
87
  type: NodeTypes.ITERATION;
84
88
  }
85
- export type WorkflowJobInterface = ActionJob | ConditionalJob | JsonataJob | ValidationJob | PlaceholderJob | WorkflowTitleJob | IterationJob;
89
+ export type WorkflowJobInterface = ActionJob | ConditionalJob | JsonataJob | ValidationJob | PlaceholderJob | WorkflowTitleJob | IterationJob | EndJob;
86
90
  export interface WorkflowRunStatusInfo {
87
91
  resultCode: string;
88
92
  resultMessage?: string;
89
93
  }
94
+ export declare const FINISHED_FAILED_RESULT_CODE = "FINISHED_FAILED";
95
+ /** The summary of a finished run, set on every run that ends SUCCESS, FAILED or ABORTED. */
96
+ export interface WorkflowRunOutcome {
97
+ status: WorkflowRunOutcomeStatus;
98
+ message?: string;
99
+ endNodeId?: string;
100
+ nodeId?: string;
101
+ iterationItem?: number;
102
+ }
90
103
  export interface WorkflowRunInterface {
91
104
  id: string;
92
105
  tenantIdentifier: string;
@@ -94,6 +107,7 @@ export interface WorkflowRunInterface {
94
107
  displayName?: string;
95
108
  status: WorkflowRunStatusStatus;
96
109
  statusInfo?: WorkflowRunStatusInfo | null;
110
+ outcome?: WorkflowRunOutcome | null;
97
111
  ttl: number;
98
112
  workflow: WorkflowDefinition;
99
113
  drawing?: WorkflowDrawing;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transai/connector-runner-file-copy",
3
- "version": "0.61.2",
3
+ "version": "0.61.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },