2019-06-23 03:35:23 -07:00
|
|
|
import {
|
2021-04-16 09:33:36 -07:00
|
|
|
ExecutionError,
|
2020-01-25 23:48:38 -08:00
|
|
|
ICredentialDataDecryptedObject,
|
2019-06-23 03:35:23 -07:00
|
|
|
ICredentialsDecrypted,
|
|
|
|
ICredentialsEncrypted,
|
2020-05-14 05:27:19 -07:00
|
|
|
ICredentialType,
|
2019-06-23 03:35:23 -07:00
|
|
|
IDataObject,
|
|
|
|
IRun,
|
2019-08-08 11:38:25 -07:00
|
|
|
IRunData,
|
2019-06-23 03:35:23 -07:00
|
|
|
IRunExecutionData,
|
|
|
|
ITaskData,
|
2019-12-19 14:07:55 -08:00
|
|
|
IWorkflowBase as IWorkflowBaseWorkflow,
|
2019-08-08 11:38:25 -07:00
|
|
|
IWorkflowCredentials,
|
2021-04-17 07:44:07 -07:00
|
|
|
Workflow,
|
2019-06-23 03:35:23 -07:00
|
|
|
WorkflowExecuteMode,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
2019-08-08 11:38:25 -07:00
|
|
|
import {
|
2021-04-17 07:44:07 -07:00
|
|
|
IDeferredPromise, WorkflowExecute,
|
2019-08-08 11:38:25 -07:00
|
|
|
} from 'n8n-core';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2020-01-17 17:34:31 -08:00
|
|
|
import * as PCancelable from 'p-cancelable';
|
2021-05-29 11:31:21 -07:00
|
|
|
import { Repository } from 'typeorm';
|
2019-08-08 11:38:25 -07:00
|
|
|
|
|
|
|
import { ChildProcess } from 'child_process';
|
2019-06-23 03:35:23 -07:00
|
|
|
import { Url } from 'url';
|
|
|
|
import { Request } from 'express';
|
2021-05-29 11:31:21 -07:00
|
|
|
import { WorkflowEntity } from './databases/entities/WorkflowEntity';
|
|
|
|
import { TagEntity } from './databases/entities/TagEntity';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
export interface IActivationError {
|
|
|
|
time: number;
|
|
|
|
error: {
|
|
|
|
message: string;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-02-08 23:59:32 -08:00
|
|
|
export interface IBullJobData {
|
|
|
|
executionId: string;
|
|
|
|
loadStaticData: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IBullJobResponse {
|
|
|
|
success: boolean;
|
|
|
|
}
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
export interface ICustomRequest extends Request {
|
|
|
|
parsedUrl: Url | undefined;
|
|
|
|
}
|
|
|
|
|
2020-05-14 05:27:19 -07:00
|
|
|
export interface ICredentialsTypeData {
|
|
|
|
[key: string]: ICredentialType;
|
|
|
|
}
|
|
|
|
|
2020-01-25 23:48:38 -08:00
|
|
|
export interface ICredentialsOverwrite {
|
|
|
|
[key: string]: ICredentialDataDecryptedObject;
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
export interface IDatabaseCollections {
|
|
|
|
Credentials: Repository<ICredentialsDb> | null;
|
|
|
|
Execution: Repository<IExecutionFlattedDb> | null;
|
2021-05-29 11:31:21 -07:00
|
|
|
Workflow: Repository<WorkflowEntity> | null;
|
2020-05-27 16:32:49 -07:00
|
|
|
Webhook: Repository<IWebhookDb> | null;
|
2021-05-29 11:31:21 -07:00
|
|
|
Tag: Repository<TagEntity> | null;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2020-05-27 16:32:49 -07:00
|
|
|
export interface IWebhookDb {
|
2021-05-29 11:31:21 -07:00
|
|
|
workflowId: number | string;
|
2020-05-27 16:32:49 -07:00
|
|
|
webhookPath: string;
|
|
|
|
method: string;
|
|
|
|
node: string;
|
2021-01-23 11:00:32 -08:00
|
|
|
webhookId?: string;
|
|
|
|
pathLength?: number;
|
2020-05-27 16:32:49 -07:00
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2021-05-29 11:31:21 -07:00
|
|
|
// ----------------------------------
|
|
|
|
// tags
|
|
|
|
// ----------------------------------
|
2019-12-19 14:07:55 -08:00
|
|
|
|
2021-05-29 11:31:21 -07:00
|
|
|
export interface ITagDb {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
createdAt: Date;
|
|
|
|
updatedAt: Date;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2021-05-29 11:31:21 -07:00
|
|
|
export type UsageCount = {
|
|
|
|
usageCount: number
|
|
|
|
};
|
|
|
|
|
|
|
|
export type ITagWithCountDb = ITagDb & UsageCount;
|
|
|
|
|
|
|
|
// ----------------------------------
|
|
|
|
// workflows
|
|
|
|
// ----------------------------------
|
|
|
|
|
|
|
|
export interface IWorkflowBase extends IWorkflowBaseWorkflow {
|
|
|
|
id?: number | string;
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
// Almost identical to editor-ui.Interfaces.ts
|
|
|
|
export interface IWorkflowDb extends IWorkflowBase {
|
2021-05-29 11:31:21 -07:00
|
|
|
id: number | string;
|
|
|
|
tags: ITagDb[];
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IWorkflowResponse extends IWorkflowBase {
|
|
|
|
id: string;
|
|
|
|
}
|
|
|
|
|
2021-05-29 11:31:21 -07:00
|
|
|
// ----------------------------------
|
|
|
|
// credentials
|
|
|
|
// ----------------------------------
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
export interface ICredentialsBase {
|
2019-07-22 11:29:06 -07:00
|
|
|
createdAt: Date;
|
|
|
|
updatedAt: Date;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2020-01-13 18:46:58 -08:00
|
|
|
export interface ICredentialsDb extends ICredentialsBase, ICredentialsEncrypted {
|
2021-05-29 11:31:21 -07:00
|
|
|
id: number | string;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICredentialsResponse extends ICredentialsDb {
|
|
|
|
id: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICredentialsDecryptedDb extends ICredentialsBase, ICredentialsDecrypted {
|
2021-05-29 11:31:21 -07:00
|
|
|
id: number | string;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICredentialsDecryptedResponse extends ICredentialsDecryptedDb {
|
|
|
|
id: string;
|
|
|
|
}
|
|
|
|
|
2021-01-23 11:35:38 -08:00
|
|
|
export type DatabaseType = 'mariadb' | 'postgresdb' | 'mysqldb' | 'sqlite';
|
2019-07-21 10:47:41 -07:00
|
|
|
export type SaveExecutionDataType = 'all' | 'none';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
export interface IExecutionBase {
|
2021-05-29 11:31:21 -07:00
|
|
|
id?: number | string;
|
2019-06-23 03:35:23 -07:00
|
|
|
mode: WorkflowExecuteMode;
|
2019-07-22 11:29:06 -07:00
|
|
|
startedAt: Date;
|
2021-02-08 23:59:32 -08:00
|
|
|
stoppedAt?: Date; // empty value means execution is still running
|
2019-06-23 03:35:23 -07:00
|
|
|
workflowId?: string; // To be able to filter executions easily //
|
|
|
|
finished: boolean;
|
2021-05-29 11:31:21 -07:00
|
|
|
retryOf?: number | string; // If it is a retry, the id of the execution it is a retry of.
|
|
|
|
retrySuccessId?: number | string; // If it failed and a retry did succeed. The id of the successful retry.
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// Data in regular format with references
|
|
|
|
export interface IExecutionDb extends IExecutionBase {
|
|
|
|
data: IRunExecutionData;
|
|
|
|
workflowData?: IWorkflowBase;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionPushResponse {
|
|
|
|
executionId?: string;
|
|
|
|
waitingForWebhook?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionResponse extends IExecutionBase {
|
|
|
|
id: string;
|
|
|
|
data: IRunExecutionData;
|
|
|
|
retryOf?: string;
|
|
|
|
retrySuccessId?: string;
|
|
|
|
workflowData: IWorkflowBase;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Flatted data to save memory when saving in database or transfering
|
|
|
|
// via REST API
|
|
|
|
export interface IExecutionFlatted extends IExecutionBase {
|
|
|
|
data: string;
|
|
|
|
workflowData: IWorkflowBase;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionFlattedDb extends IExecutionBase {
|
2021-05-29 11:31:21 -07:00
|
|
|
id: number | string;
|
2019-06-23 03:35:23 -07:00
|
|
|
data: string;
|
|
|
|
workflowData: IWorkflowBase;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionFlattedResponse extends IExecutionFlatted {
|
|
|
|
id: string;
|
|
|
|
retryOf?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionsListResponse {
|
|
|
|
count: number;
|
|
|
|
// results: IExecutionShortResponse[];
|
|
|
|
results: IExecutionsSummary[];
|
2021-07-06 14:25:25 -07:00
|
|
|
estimated: boolean;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionsStopData {
|
|
|
|
finished?: boolean;
|
|
|
|
mode: WorkflowExecuteMode;
|
2019-07-22 11:29:06 -07:00
|
|
|
startedAt: Date;
|
2021-02-08 23:59:32 -08:00
|
|
|
stoppedAt?: Date;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionsSummary {
|
2021-02-13 11:40:27 -08:00
|
|
|
id: string;
|
2019-06-23 03:35:23 -07:00
|
|
|
finished?: boolean;
|
2019-08-08 22:37:10 -07:00
|
|
|
mode: WorkflowExecuteMode;
|
2019-06-23 03:35:23 -07:00
|
|
|
retryOf?: string;
|
|
|
|
retrySuccessId?: string;
|
2019-07-22 11:29:06 -07:00
|
|
|
startedAt: Date;
|
|
|
|
stoppedAt?: Date;
|
2019-06-23 03:35:23 -07:00
|
|
|
workflowId: string;
|
|
|
|
workflowName?: string;
|
|
|
|
}
|
|
|
|
|
2019-08-08 22:37:10 -07:00
|
|
|
|
|
|
|
export interface IExecutionsCurrentSummary {
|
|
|
|
id: string;
|
|
|
|
retryOf?: string;
|
|
|
|
startedAt: Date;
|
|
|
|
mode: WorkflowExecuteMode;
|
|
|
|
workflowId: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
export interface IExecutionDeleteFilter {
|
2019-07-22 11:29:06 -07:00
|
|
|
deleteBefore?: Date;
|
2019-06-23 03:35:23 -07:00
|
|
|
filters?: IDataObject;
|
|
|
|
ids?: string[];
|
|
|
|
}
|
|
|
|
|
2019-08-08 11:38:25 -07:00
|
|
|
export interface IExecutingWorkflowData {
|
|
|
|
executionData: IWorkflowExecutionDataProcess;
|
2020-01-17 17:34:31 -08:00
|
|
|
process?: ChildProcess;
|
2019-08-08 11:38:25 -07:00
|
|
|
startedAt: Date;
|
|
|
|
postExecutePromises: Array<IDeferredPromise<IRun | undefined>>;
|
2020-01-17 17:34:31 -08:00
|
|
|
workflowExecution?: PCancelable<IRun>;
|
2019-08-08 11:38:25 -07:00
|
|
|
}
|
|
|
|
|
2020-05-05 15:59:58 -07:00
|
|
|
export interface IExternalHooks {
|
|
|
|
credentials?: {
|
|
|
|
create?: Array<{ (this: IExternalHooksFunctions, credentialsData: ICredentialsEncrypted): Promise<void>; }>
|
|
|
|
delete?: Array<{ (this: IExternalHooksFunctions, credentialId: string): Promise<void>; }>
|
|
|
|
update?: Array<{ (this: IExternalHooksFunctions, credentialsData: ICredentialsDb): Promise<void>; }>
|
|
|
|
};
|
|
|
|
workflow?: {
|
|
|
|
activate?: Array<{ (this: IExternalHooksFunctions, workflowData: IWorkflowDb): Promise<void>; }>
|
|
|
|
create?: Array<{ (this: IExternalHooksFunctions, workflowData: IWorkflowBase): Promise<void>; }>
|
|
|
|
delete?: Array<{ (this: IExternalHooksFunctions, workflowId: string): Promise<void>; }>
|
|
|
|
execute?: Array<{ (this: IExternalHooksFunctions, workflowData: IWorkflowDb, mode: WorkflowExecuteMode): Promise<void>; }>
|
|
|
|
update?: Array<{ (this: IExternalHooksFunctions, workflowData: IWorkflowDb): Promise<void>; }>
|
|
|
|
};
|
2020-05-04 16:23:54 -07:00
|
|
|
}
|
|
|
|
|
2020-12-30 02:45:29 -08:00
|
|
|
export interface IExternalHooksFileData {
|
|
|
|
[key: string]: {
|
|
|
|
[key: string]: Array<(...args: any[]) => Promise<void>>; //tslint:disable-line:no-any
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-05-05 15:59:58 -07:00
|
|
|
export interface IExternalHooksFunctions {
|
|
|
|
dbCollections: IDatabaseCollections;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExternalHooksClass {
|
2020-05-03 23:56:01 -07:00
|
|
|
init(): Promise<void>;
|
2020-05-04 16:23:54 -07:00
|
|
|
run(hookName: string, hookParameters?: any[]): Promise<void>; // tslint:disable-line:no-any
|
2020-05-03 23:56:01 -07:00
|
|
|
}
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
export interface IN8nConfig {
|
|
|
|
database: IN8nConfigDatabase;
|
2019-07-21 10:47:41 -07:00
|
|
|
endpoints: IN8nConfigEndpoints;
|
|
|
|
executions: IN8nConfigExecutions;
|
|
|
|
generic: IN8nConfigGeneric;
|
|
|
|
host: string;
|
|
|
|
nodes: IN8nConfigNodes;
|
|
|
|
port: number;
|
|
|
|
protocol: 'http' | 'https';
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IN8nConfigDatabase {
|
|
|
|
type: DatabaseType;
|
2019-07-22 11:29:06 -07:00
|
|
|
postgresdb: {
|
|
|
|
host: string;
|
|
|
|
password: string;
|
|
|
|
port: number;
|
|
|
|
user: string;
|
|
|
|
};
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2019-07-21 10:47:41 -07:00
|
|
|
export interface IN8nConfigEndpoints {
|
|
|
|
rest: string;
|
|
|
|
webhook: string;
|
|
|
|
webhookTest: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IN8nConfigExecutions {
|
|
|
|
saveDataOnError: SaveExecutionDataType;
|
|
|
|
saveDataOnSuccess: SaveExecutionDataType;
|
|
|
|
saveDataManualExecutions: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IN8nConfigExecutions {
|
|
|
|
saveDataOnError: SaveExecutionDataType;
|
|
|
|
saveDataOnSuccess: SaveExecutionDataType;
|
|
|
|
saveDataManualExecutions: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IN8nConfigGeneric {
|
|
|
|
timezone: string;
|
|
|
|
}
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
export interface IN8nConfigNodes {
|
2019-07-21 10:47:41 -07:00
|
|
|
errorTriggerType: string;
|
|
|
|
exclude: string[];
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2021-07-22 01:22:17 -07:00
|
|
|
export interface IVersionNotificationSettings {
|
|
|
|
enabled: boolean;
|
|
|
|
endpoint: string;
|
|
|
|
infoUrl: string;
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
export interface IN8nUISettings {
|
|
|
|
endpointWebhook: string;
|
|
|
|
endpointWebhookTest: string;
|
2019-07-10 11:53:13 -07:00
|
|
|
saveDataErrorExecution: string;
|
|
|
|
saveDataSuccessExecution: string;
|
2019-07-10 09:06:26 -07:00
|
|
|
saveManualExecutions: boolean;
|
2020-07-29 05:12:54 -07:00
|
|
|
executionTimeout: number;
|
|
|
|
maxExecutionTimeout: number;
|
2020-09-30 06:50:43 -07:00
|
|
|
oauthCallbackUrls: {
|
|
|
|
oauth1: string;
|
|
|
|
oauth2: string;
|
|
|
|
};
|
2019-06-23 03:35:23 -07:00
|
|
|
timezone: string;
|
|
|
|
urlBaseWebhook: string;
|
2019-09-11 09:40:22 -07:00
|
|
|
versionCli: string;
|
2021-01-19 14:48:30 -08:00
|
|
|
n8nMetadata?: {
|
|
|
|
[key: string]: string | number | undefined;
|
|
|
|
};
|
2021-07-22 01:22:17 -07:00
|
|
|
versionNotifications: IVersionNotificationSettings;
|
|
|
|
instanceId: string;
|
2019-09-19 04:21:10 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IPackageVersions {
|
|
|
|
cli: string;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2021-06-03 16:17:18 -07:00
|
|
|
export type IPushDataType = IPushData['type'];
|
|
|
|
|
|
|
|
export type IPushData =
|
|
|
|
| PushDataExecutionFinished
|
|
|
|
| PushDataExecutionStarted
|
|
|
|
| PushDataExecuteAfter
|
|
|
|
| PushDataExecuteBefore
|
|
|
|
| PushDataConsoleMessage
|
|
|
|
| PushDataTestWebhook;
|
|
|
|
|
|
|
|
type PushDataExecutionFinished = {
|
|
|
|
data: IPushDataExecutionFinished;
|
|
|
|
type: 'executionFinished';
|
|
|
|
};
|
|
|
|
|
|
|
|
type PushDataExecutionStarted = {
|
|
|
|
data: IPushDataExecutionStarted;
|
|
|
|
type: 'executionStarted';
|
|
|
|
};
|
|
|
|
|
|
|
|
type PushDataExecuteAfter = {
|
|
|
|
data: IPushDataNodeExecuteAfter;
|
|
|
|
type: 'nodeExecuteAfter';
|
|
|
|
};
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2021-06-03 16:17:18 -07:00
|
|
|
type PushDataExecuteBefore = {
|
|
|
|
data: IPushDataNodeExecuteBefore;
|
|
|
|
type: 'nodeExecuteBefore';
|
|
|
|
};
|
|
|
|
|
|
|
|
type PushDataConsoleMessage = {
|
|
|
|
data: IPushDataConsoleMessage;
|
|
|
|
type: 'sendConsoleMessage';
|
|
|
|
};
|
|
|
|
|
|
|
|
type PushDataTestWebhook = {
|
|
|
|
data: IPushDataTestWebhook;
|
|
|
|
type: 'testWebhookDeleted' | 'testWebhookReceived';
|
|
|
|
};
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
export interface IPushDataExecutionFinished {
|
|
|
|
data: IRun;
|
2021-02-13 11:40:27 -08:00
|
|
|
executionId: string;
|
2019-08-08 22:37:10 -07:00
|
|
|
retryOf?: string;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2019-07-24 05:25:30 -07:00
|
|
|
export interface IPushDataExecutionStarted {
|
|
|
|
executionId: string;
|
|
|
|
mode: WorkflowExecuteMode;
|
|
|
|
startedAt: Date;
|
|
|
|
retryOf?: string;
|
|
|
|
workflowId: string;
|
|
|
|
workflowName?: string;
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
export interface IPushDataNodeExecuteAfter {
|
|
|
|
data: ITaskData;
|
|
|
|
executionId: string;
|
|
|
|
nodeName: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface IPushDataNodeExecuteBefore {
|
|
|
|
executionId: string;
|
|
|
|
nodeName: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface IPushDataTestWebhook {
|
2019-07-26 05:17:00 -07:00
|
|
|
executionId: string;
|
2019-06-23 03:35:23 -07:00
|
|
|
workflowId: string;
|
|
|
|
}
|
|
|
|
|
2021-05-29 11:41:25 -07:00
|
|
|
export interface IPushDataConsoleMessage {
|
|
|
|
source: string;
|
|
|
|
message: string;
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
export interface IResponseCallbackData {
|
|
|
|
data?: IDataObject | IDataObject[];
|
|
|
|
noWebhookResponse?: boolean;
|
2019-08-28 08:03:35 -07:00
|
|
|
responseCode?: number;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-08-08 11:38:25 -07:00
|
|
|
export interface ITransferNodeTypes {
|
|
|
|
[key: string]: {
|
|
|
|
className: string;
|
|
|
|
sourcePath: string;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
export interface IWorkflowErrorData {
|
2021-04-16 09:33:36 -07:00
|
|
|
[key: string]: IDataObject | string | number | ExecutionError;
|
2019-06-23 03:35:23 -07:00
|
|
|
execution: {
|
|
|
|
id?: string;
|
2021-04-16 09:33:36 -07:00
|
|
|
error: ExecutionError;
|
2019-06-23 03:35:23 -07:00
|
|
|
lastNodeExecuted: string;
|
|
|
|
mode: WorkflowExecuteMode;
|
|
|
|
};
|
|
|
|
workflow: {
|
|
|
|
id?: string;
|
|
|
|
name: string;
|
|
|
|
};
|
|
|
|
}
|
2019-08-08 11:38:25 -07:00
|
|
|
|
|
|
|
export interface IProcessMessageDataHook {
|
|
|
|
hook: string;
|
|
|
|
parameters: any[]; // tslint:disable-line:no-any
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IWorkflowExecutionDataProcess {
|
|
|
|
credentials: IWorkflowCredentials;
|
|
|
|
destinationNode?: string;
|
|
|
|
executionMode: WorkflowExecuteMode;
|
|
|
|
executionData?: IRunExecutionData;
|
|
|
|
runData?: IRunData;
|
2021-05-29 11:31:21 -07:00
|
|
|
retryOf?: number | string;
|
2019-08-08 11:38:25 -07:00
|
|
|
sessionId?: string;
|
|
|
|
startNodes?: string[];
|
|
|
|
workflowData: IWorkflowBase;
|
|
|
|
}
|
|
|
|
|
2020-05-14 05:27:19 -07:00
|
|
|
|
2019-08-08 11:38:25 -07:00
|
|
|
export interface IWorkflowExecutionDataProcessWithExecution extends IWorkflowExecutionDataProcess {
|
2020-05-14 05:27:19 -07:00
|
|
|
credentialsOverwrite: ICredentialsOverwrite;
|
|
|
|
credentialsTypeData: ICredentialsTypeData;
|
2019-08-08 11:38:25 -07:00
|
|
|
executionId: string;
|
|
|
|
nodeTypeData: ITransferNodeTypes;
|
|
|
|
}
|
2021-04-17 07:44:07 -07:00
|
|
|
|
|
|
|
export interface IWorkflowExecuteProcess {
|
2021-04-17 08:23:48 -07:00
|
|
|
startedAt: Date;
|
2021-04-17 07:44:07 -07:00
|
|
|
workflow: Workflow;
|
|
|
|
workflowExecute: WorkflowExecute;
|
|
|
|
}
|