mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
🎨 Set up linting and formatting (#2120)
* ⬆️ Upgrade TS to 4.3.5 * 👕 Add ESLint configs * 🎨 Add Prettier config * 📦 Add deps and commands * ⚡ Adjust global .editorconfig to new ruleset * 🔥 Remove unneeded local .editorconfig * 📦 Update deps in editor-ui * 🔨 Limit Prettier to only TS files * ⚡ Add recommended VSCode extensions * 👕 Fix build * 🔥 Remove Vue setting from global config * ⚡ Disable prefer-default-export per feedback * ✏️ Add forgotten divider * 👕 Disable no-plusplus * 👕 Disable class-methods-use-this * ✏️ Alphabetize overrides * 👕 Add one-var consecutive override * ⏪ Revert one-var consecutive override This reverts commit b9252cf935659ba6d76727ad484a1d3c00008fcc. * 🎨 👕 Lint and format workflow package (#2121) * 🎨 Format /workflow package * 👕 Lint /workflow package * 🎨 Re-format /workflow package * 👕 Re-lint /workflow package * ✏️ Fix typo * ⚡ Consolidate if-checks * 🔥 Remove prefer-default-export exceptions * 🔥 Remove no-plusplus exceptions * 🔥 Remove class-methods-use-this exceptions * 🎨 👕 Lint and format node-dev package (#2122) * 🎨 Format /node-dev package * ⚡ Exclude templates from ESLint config This keeps the templates consistent with the codebase while preventing lint exceptions from being made part of the templates. * 👕 Lint /node-dev package * 🔥 Remove prefer-default-export exceptions * 🔥 Remove no-plusplus exceptions * 🎨 👕 Lint and format core package (#2123) * 🎨 Format /core package * 👕 Lint /core package * 🎨 Re-format /core package * 👕 Re-lint /core package * 🔥 Remove prefer-default-export exceptions * 🔥 Remove no-plusplus exceptions * 🔥 Remove class-methods-use-this exceptions * 🎨 👕 Lint and format cli package (#2124) * 🎨 Format /cli package * 👕 Exclude migrations from linting * 👕 Lint /cli package * 🎨 Re-format /cli package * 👕 Re-lint /cli package * 👕 Fix build * 🔥 Remove prefer-default-export exceptions * ⚡ Update exceptions in ActiveExecutions * 🔥 Remove no-plusplus exceptions * 🔥 Remove class-methods-use-this exceptions * 👕 fix lint issues * 🔧 use package specific linter, remove tslint command * 🔨 resolve build issue, sync dependencies * 🔧 change lint command Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com>
This commit is contained in:
@@ -1,10 +1,22 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
/* eslint-disable import/no-cycle */
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
// eslint-disable-next-line max-classes-per-file
|
||||
import * as express from 'express';
|
||||
import { Workflow } from './Workflow';
|
||||
import { WorkflowHooks } from './WorkflowHooks';
|
||||
import { WorkflowOperationError } from './WorkflowErrors';
|
||||
import { NodeApiError, NodeOperationError } from './NodeErrors';
|
||||
import * as express from 'express';
|
||||
|
||||
export type IAllExecuteFunctions = IExecuteFunctions | IExecuteSingleFunctions | IHookFunctions | ILoadOptionsFunctions | IPollFunctions | ITriggerFunctions | IWebhookFunctions;
|
||||
export type IAllExecuteFunctions =
|
||||
| IExecuteFunctions
|
||||
| IExecuteSingleFunctions
|
||||
| IHookFunctions
|
||||
| ILoadOptionsFunctions
|
||||
| IPollFunctions
|
||||
| ITriggerFunctions
|
||||
| IWebhookFunctions;
|
||||
|
||||
export interface IBinaryData {
|
||||
[key: string]: string | undefined;
|
||||
@@ -43,8 +55,11 @@ export interface IGetCredentials {
|
||||
|
||||
export abstract class ICredentials {
|
||||
name: string;
|
||||
|
||||
type: string;
|
||||
|
||||
data: string | undefined;
|
||||
|
||||
nodesAccess: ICredentialNodeAccess[];
|
||||
|
||||
constructor(name: string, type: string, nodesAccess: ICredentialNodeAccess[], data?: string) {
|
||||
@@ -55,10 +70,15 @@ export abstract class ICredentials {
|
||||
}
|
||||
|
||||
abstract getData(encryptionKey: string, nodeType?: string): ICredentialDataDecryptedObject;
|
||||
|
||||
abstract getDataKey(key: string, encryptionKey: string, nodeType?: string): CredentialInformation;
|
||||
|
||||
abstract getDataToSave(): ICredentialsEncrypted;
|
||||
|
||||
abstract hasNodeAccess(nodeType: string): boolean;
|
||||
|
||||
abstract setData(data: ICredentialDataDecryptedObject, encryptionKey: string): void;
|
||||
|
||||
abstract setDataKey(key: string, data: CredentialInformation, encryptionKey: string): void;
|
||||
}
|
||||
|
||||
@@ -101,8 +121,20 @@ export abstract class ICredentialsHelper {
|
||||
}
|
||||
|
||||
abstract getCredentials(name: string, type: string): Promise<ICredentials>;
|
||||
abstract getDecrypted(name: string, type: string, mode: WorkflowExecuteMode, raw?: boolean, expressionResolveValues?: ICredentialsExpressionResolveValues): Promise<ICredentialDataDecryptedObject>;
|
||||
abstract updateCredentials(name: string, type: string, data: ICredentialDataDecryptedObject): Promise<void>;
|
||||
|
||||
abstract getDecrypted(
|
||||
name: string,
|
||||
type: string,
|
||||
mode: WorkflowExecuteMode,
|
||||
raw?: boolean,
|
||||
expressionResolveValues?: ICredentialsExpressionResolveValues,
|
||||
): Promise<ICredentialDataDecryptedObject>;
|
||||
|
||||
abstract updateCredentials(
|
||||
name: string,
|
||||
type: string,
|
||||
data: ICredentialDataDecryptedObject,
|
||||
): Promise<void>;
|
||||
}
|
||||
|
||||
export interface ICredentialType {
|
||||
@@ -116,7 +148,7 @@ export interface ICredentialType {
|
||||
|
||||
export interface ICredentialTypes {
|
||||
credentialTypes?: {
|
||||
[key: string]: ICredentialType
|
||||
[key: string]: ICredentialType;
|
||||
};
|
||||
init(credentialTypes?: { [key: string]: ICredentialType }): Promise<void>;
|
||||
getAll(): ICredentialType[];
|
||||
@@ -133,7 +165,6 @@ export interface ICredentialData {
|
||||
// The encrypted credentials which the nodes can access
|
||||
export type CredentialInformation = string | number | boolean | IDataObject;
|
||||
|
||||
|
||||
// The encrypted credentials which the nodes can access
|
||||
export interface ICredentialDataDecryptedObject {
|
||||
[key: string]: CredentialInformation;
|
||||
@@ -159,92 +190,150 @@ export interface IDataObject {
|
||||
[key: string]: GenericValue | IDataObject | GenericValue[] | IDataObject[];
|
||||
}
|
||||
|
||||
|
||||
export interface IGetExecutePollFunctions {
|
||||
(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode): IPollFunctions;
|
||||
(
|
||||
workflow: Workflow,
|
||||
node: INode,
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
mode: WorkflowExecuteMode,
|
||||
activation: WorkflowActivateMode,
|
||||
): IPollFunctions;
|
||||
}
|
||||
|
||||
export interface IGetExecuteTriggerFunctions {
|
||||
(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode): ITriggerFunctions;
|
||||
(
|
||||
workflow: Workflow,
|
||||
node: INode,
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
mode: WorkflowExecuteMode,
|
||||
activation: WorkflowActivateMode,
|
||||
): ITriggerFunctions;
|
||||
}
|
||||
|
||||
|
||||
export interface IGetExecuteFunctions {
|
||||
(workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode): IExecuteFunctions;
|
||||
(
|
||||
workflow: Workflow,
|
||||
runExecutionData: IRunExecutionData,
|
||||
runIndex: number,
|
||||
connectionInputData: INodeExecutionData[],
|
||||
inputData: ITaskDataConnections,
|
||||
node: INode,
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
mode: WorkflowExecuteMode,
|
||||
): IExecuteFunctions;
|
||||
}
|
||||
|
||||
|
||||
export interface IGetExecuteSingleFunctions {
|
||||
(workflow: Workflow, runExecutionData: IRunExecutionData, runIndex: number, connectionInputData: INodeExecutionData[], inputData: ITaskDataConnections, node: INode, itemIndex: number, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode): IExecuteSingleFunctions;
|
||||
(
|
||||
workflow: Workflow,
|
||||
runExecutionData: IRunExecutionData,
|
||||
runIndex: number,
|
||||
connectionInputData: INodeExecutionData[],
|
||||
inputData: ITaskDataConnections,
|
||||
node: INode,
|
||||
itemIndex: number,
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
mode: WorkflowExecuteMode,
|
||||
): IExecuteSingleFunctions;
|
||||
}
|
||||
|
||||
|
||||
export interface IGetExecuteHookFunctions {
|
||||
(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode, isTest?: boolean, webhookData?: IWebhookData): IHookFunctions;
|
||||
(
|
||||
workflow: Workflow,
|
||||
node: INode,
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
mode: WorkflowExecuteMode,
|
||||
activation: WorkflowActivateMode,
|
||||
isTest?: boolean,
|
||||
webhookData?: IWebhookData,
|
||||
): IHookFunctions;
|
||||
}
|
||||
|
||||
|
||||
export interface IGetExecuteWebhookFunctions {
|
||||
(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, webhookData: IWebhookData): IWebhookFunctions;
|
||||
(
|
||||
workflow: Workflow,
|
||||
node: INode,
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
mode: WorkflowExecuteMode,
|
||||
webhookData: IWebhookData,
|
||||
): IWebhookFunctions;
|
||||
}
|
||||
|
||||
|
||||
export interface IExecuteData {
|
||||
data: ITaskDataConnections;
|
||||
node: INode;
|
||||
}
|
||||
|
||||
export type IContextObject = {
|
||||
[key: string]: any; // tslint:disable-line:no-any
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
|
||||
export interface IExecuteContextData {
|
||||
// Keys are: "flow" | "node:<NODE_NAME>"
|
||||
[key: string]: IContextObject;
|
||||
}
|
||||
|
||||
|
||||
export interface IExecuteFunctions {
|
||||
continueOnFail(): boolean;
|
||||
evaluateExpression(expression: string, itemIndex: number): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
|
||||
executeWorkflow(workflowInfo: IExecuteWorkflowInfo, inputData?: INodeExecutionData[]): Promise<any>; // tslint:disable-line:no-any
|
||||
evaluateExpression(
|
||||
expression: string,
|
||||
itemIndex: number,
|
||||
): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
|
||||
executeWorkflow(
|
||||
workflowInfo: IExecuteWorkflowInfo,
|
||||
inputData?: INodeExecutionData[],
|
||||
): Promise<any>;
|
||||
getContext(type: string): IContextObject;
|
||||
getCredentials(type: string, itemIndex?: number): Promise<ICredentialDataDecryptedObject | undefined>;
|
||||
getCredentials(
|
||||
type: string,
|
||||
itemIndex?: number,
|
||||
): Promise<ICredentialDataDecryptedObject | undefined>;
|
||||
getInputData(inputIndex?: number, inputName?: string): INodeExecutionData[];
|
||||
getMode(): WorkflowExecuteMode;
|
||||
getNode(): INode;
|
||||
getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?: any): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object; //tslint:disable-line:no-any
|
||||
getNodeParameter(
|
||||
parameterName: string,
|
||||
itemIndex: number,
|
||||
fallbackValue?: any,
|
||||
): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
||||
getWorkflowDataProxy(itemIndex: number): IWorkflowDataProxyData;
|
||||
getWorkflowStaticData(type: string): IDataObject;
|
||||
getRestApiUrl(): string;
|
||||
getTimezone(): string;
|
||||
getWorkflow(): IWorkflowMetadata;
|
||||
prepareOutputData(outputData: INodeExecutionData[], outputIndex?: number): Promise<INodeExecutionData[][]>;
|
||||
prepareOutputData(
|
||||
outputData: INodeExecutionData[],
|
||||
outputIndex?: number,
|
||||
): Promise<INodeExecutionData[][]>;
|
||||
putExecutionToWait(waitTill: Date): Promise<void>;
|
||||
sendMessageToUI(message: any): void; // tslint:disable-line:no-any
|
||||
helpers: {
|
||||
[key: string]: (...args: any[]) => any //tslint:disable-line:no-any
|
||||
[key: string]: (...args: any[]) => any;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
export interface IExecuteSingleFunctions {
|
||||
continueOnFail(): boolean;
|
||||
evaluateExpression(expression: string, itemIndex: number | undefined): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
|
||||
evaluateExpression(
|
||||
expression: string,
|
||||
itemIndex: number | undefined,
|
||||
): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
|
||||
getContext(type: string): IContextObject;
|
||||
getCredentials(type: string): Promise<ICredentialDataDecryptedObject | undefined>;
|
||||
getInputData(inputIndex?: number, inputName?: string): INodeExecutionData;
|
||||
getMode(): WorkflowExecuteMode;
|
||||
getNode(): INode;
|
||||
getNodeParameter(parameterName: string, fallbackValue?: any): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object; //tslint:disable-line:no-any
|
||||
getNodeParameter(
|
||||
parameterName: string,
|
||||
fallbackValue?: any,
|
||||
): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
||||
getRestApiUrl(): string;
|
||||
getTimezone(): string;
|
||||
getWorkflow(): IWorkflowMetadata;
|
||||
getWorkflowDataProxy(): IWorkflowDataProxyData;
|
||||
getWorkflowStaticData(type: string): IDataObject;
|
||||
helpers: {
|
||||
[key: string]: (...args: any[]) => any //tslint:disable-line:no-any
|
||||
[key: string]: (...args: any[]) => any;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -256,13 +345,24 @@ export interface IExecuteWorkflowInfo {
|
||||
export interface ILoadOptionsFunctions {
|
||||
getCredentials(type: string): Promise<ICredentialDataDecryptedObject | undefined>;
|
||||
getNode(): INode;
|
||||
getNodeParameter(parameterName: string, fallbackValue?: any): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object; //tslint:disable-line:no-any
|
||||
getCurrentNodeParameter(parameterName: string): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object | undefined;
|
||||
getNodeParameter(
|
||||
parameterName: string,
|
||||
fallbackValue?: any,
|
||||
): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
||||
getCurrentNodeParameter(
|
||||
parameterName: string,
|
||||
):
|
||||
| NodeParameterValue
|
||||
| INodeParameters
|
||||
| NodeParameterValue[]
|
||||
| INodeParameters[]
|
||||
| object
|
||||
| undefined;
|
||||
getCurrentNodeParameters(): INodeParameters | undefined;
|
||||
getTimezone(): string;
|
||||
getRestApiUrl(): string;
|
||||
helpers: {
|
||||
[key: string]: ((...args: any[]) => any) | undefined; //tslint:disable-line:no-any
|
||||
[key: string]: ((...args: any[]) => any) | undefined;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -272,14 +372,17 @@ export interface IHookFunctions {
|
||||
getActivationMode(): WorkflowActivateMode;
|
||||
getNode(): INode;
|
||||
getNodeWebhookUrl: (name: string) => string | undefined;
|
||||
getNodeParameter(parameterName: string, fallbackValue?: any): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object; //tslint:disable-line:no-any
|
||||
getNodeParameter(
|
||||
parameterName: string,
|
||||
fallbackValue?: any,
|
||||
): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
||||
getTimezone(): string;
|
||||
getWebhookDescription(name: string): IWebhookDescription | undefined;
|
||||
getWebhookName(): string;
|
||||
getWorkflow(): IWorkflowMetadata;
|
||||
getWorkflowStaticData(type: string): IDataObject;
|
||||
helpers: {
|
||||
[key: string]: (...args: any[]) => any //tslint:disable-line:no-any
|
||||
[key: string]: (...args: any[]) => any;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -289,13 +392,16 @@ export interface IPollFunctions {
|
||||
getMode(): WorkflowExecuteMode;
|
||||
getActivationMode(): WorkflowActivateMode;
|
||||
getNode(): INode;
|
||||
getNodeParameter(parameterName: string, fallbackValue?: any): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object; //tslint:disable-line:no-any
|
||||
getNodeParameter(
|
||||
parameterName: string,
|
||||
fallbackValue?: any,
|
||||
): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
||||
getRestApiUrl(): string;
|
||||
getTimezone(): string;
|
||||
getWorkflow(): IWorkflowMetadata;
|
||||
getWorkflowStaticData(type: string): IDataObject;
|
||||
helpers: {
|
||||
[key: string]: (...args: any[]) => any //tslint:disable-line:no-any
|
||||
[key: string]: (...args: any[]) => any;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -305,13 +411,16 @@ export interface ITriggerFunctions {
|
||||
getMode(): WorkflowExecuteMode;
|
||||
getActivationMode(): WorkflowActivateMode;
|
||||
getNode(): INode;
|
||||
getNodeParameter(parameterName: string, fallbackValue?: any): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object; //tslint:disable-line:no-any
|
||||
getNodeParameter(
|
||||
parameterName: string,
|
||||
fallbackValue?: any,
|
||||
): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
||||
getRestApiUrl(): string;
|
||||
getTimezone(): string;
|
||||
getWorkflow(): IWorkflowMetadata;
|
||||
getWorkflowStaticData(type: string): IDataObject;
|
||||
helpers: {
|
||||
[key: string]: (...args: any[]) => any //tslint:disable-line:no-any
|
||||
[key: string]: (...args: any[]) => any;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -321,7 +430,10 @@ export interface IWebhookFunctions {
|
||||
getHeaderData(): object;
|
||||
getMode(): WorkflowExecuteMode;
|
||||
getNode(): INode;
|
||||
getNodeParameter(parameterName: string, fallbackValue?: any): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object; //tslint:disable-line:no-any
|
||||
getNodeParameter(
|
||||
parameterName: string,
|
||||
fallbackValue?: any,
|
||||
): NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object;
|
||||
getNodeWebhookUrl: (name: string) => string | undefined;
|
||||
getParamsData(): object;
|
||||
getQueryData(): object;
|
||||
@@ -331,9 +443,12 @@ export interface IWebhookFunctions {
|
||||
getWebhookName(): string;
|
||||
getWorkflowStaticData(type: string): IDataObject;
|
||||
getWorkflow(): IWorkflowMetadata;
|
||||
prepareOutputData(outputData: INodeExecutionData[], outputIndex?: number): Promise<INodeExecutionData[][]>;
|
||||
prepareOutputData(
|
||||
outputData: INodeExecutionData[],
|
||||
outputIndex?: number,
|
||||
): Promise<INodeExecutionData[][]>;
|
||||
helpers: {
|
||||
[key: string]: (...args: any[]) => any //tslint:disable-line:no-any
|
||||
[key: string]: (...args: any[]) => any;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -360,18 +475,15 @@ export interface INode {
|
||||
webhookId?: string;
|
||||
}
|
||||
|
||||
|
||||
export interface INodes {
|
||||
[key: string]: INode;
|
||||
}
|
||||
|
||||
|
||||
export interface IObservableObject {
|
||||
[key: string]: any; // tslint:disable-line:no-any
|
||||
[key: string]: any;
|
||||
__dataChanged: boolean;
|
||||
}
|
||||
|
||||
|
||||
export interface IBinaryKeyData {
|
||||
[key: string]: IBinaryData;
|
||||
}
|
||||
@@ -385,7 +497,6 @@ export interface INodeExecutionData {
|
||||
binary?: IBinaryKeyData;
|
||||
}
|
||||
|
||||
|
||||
export interface INodeExecuteFunctions {
|
||||
getExecutePollFunctions: IGetExecutePollFunctions;
|
||||
getExecuteTriggerFunctions: IGetExecuteTriggerFunctions;
|
||||
@@ -395,7 +506,6 @@ export interface INodeExecuteFunctions {
|
||||
getExecuteWebhookFunctions: IGetExecuteWebhookFunctions;
|
||||
}
|
||||
|
||||
|
||||
// The values a node property can have
|
||||
export type NodeParameterValue = string | number | boolean | undefined | null;
|
||||
|
||||
@@ -404,25 +514,37 @@ export interface INodeParameters {
|
||||
[key: string]: NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[];
|
||||
}
|
||||
|
||||
export type NodePropertyTypes = 'boolean' | 'collection' | 'color' | 'dateTime' | 'fixedCollection' | 'hidden' | 'json' | 'notice' | 'multiOptions' | 'number' | 'options' | 'string';
|
||||
export type NodePropertyTypes =
|
||||
| 'boolean'
|
||||
| 'collection'
|
||||
| 'color'
|
||||
| 'dateTime'
|
||||
| 'fixedCollection'
|
||||
| 'hidden'
|
||||
| 'json'
|
||||
| 'notice'
|
||||
| 'multiOptions'
|
||||
| 'number'
|
||||
| 'options'
|
||||
| 'string';
|
||||
|
||||
export type EditorTypes = 'code';
|
||||
|
||||
export interface INodePropertyTypeOptions {
|
||||
alwaysOpenEditWindow?: boolean; // Supported by: string
|
||||
editor?: EditorTypes; // Supported by: string
|
||||
loadOptionsDependsOn?: string[]; // Supported by: options
|
||||
loadOptionsMethod?: string; // Supported by: options
|
||||
maxValue?: number; // Supported by: number
|
||||
minValue?: number; // Supported by: number
|
||||
multipleValues?: boolean; // Supported by: <All>
|
||||
multipleValueButtonText?: string; // Supported when "multipleValues" set to true
|
||||
numberPrecision?: number; // Supported by: number
|
||||
numberStepSize?: number; // Supported by: number
|
||||
password?: boolean; // Supported by: string
|
||||
rows?: number; // Supported by: string
|
||||
showAlpha?: boolean; // Supported by: color
|
||||
sortable?: boolean; // Supported when "multipleValues" set to true
|
||||
editor?: EditorTypes; // Supported by: string
|
||||
loadOptionsDependsOn?: string[]; // Supported by: options
|
||||
loadOptionsMethod?: string; // Supported by: options
|
||||
maxValue?: number; // Supported by: number
|
||||
minValue?: number; // Supported by: number
|
||||
multipleValues?: boolean; // Supported by: <All>
|
||||
multipleValueButtonText?: string; // Supported when "multipleValues" set to true
|
||||
numberPrecision?: number; // Supported by: number
|
||||
numberStepSize?: number; // Supported by: number
|
||||
password?: boolean; // Supported by: string
|
||||
rows?: number; // Supported by: string
|
||||
showAlpha?: boolean; // Supported by: color
|
||||
sortable?: boolean; // Supported when "multipleValues" set to true
|
||||
[key: string]: boolean | number | string | EditorTypes | undefined | string[];
|
||||
}
|
||||
|
||||
@@ -435,7 +557,6 @@ export interface IDisplayOptions {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
export interface INodeProperties {
|
||||
displayName: string;
|
||||
name: string;
|
||||
@@ -492,7 +613,7 @@ export interface INodeType {
|
||||
methods?: {
|
||||
loadOptions?: {
|
||||
[key: string]: (this: ILoadOptionsFunctions) => Promise<INodePropertyOptions[]>;
|
||||
}
|
||||
};
|
||||
};
|
||||
webhookMethods?: {
|
||||
[key: string]: IWebhookSetupMethods;
|
||||
@@ -501,7 +622,6 @@ export interface INodeType {
|
||||
|
||||
export type WebhookSetupMethodNames = 'checkExists' | 'create' | 'delete';
|
||||
|
||||
|
||||
export interface IWebhookSetupMethods {
|
||||
[key: string]: ((this: IHookFunctions) => Promise<boolean>) | undefined;
|
||||
checkExists?: (this: IHookFunctions) => Promise<boolean>;
|
||||
@@ -509,7 +629,6 @@ export interface IWebhookSetupMethods {
|
||||
delete?: (this: IHookFunctions) => Promise<boolean>;
|
||||
}
|
||||
|
||||
|
||||
export interface INodeCredentialDescription {
|
||||
name: string;
|
||||
required?: boolean;
|
||||
@@ -596,17 +715,17 @@ export interface IWebhookDescription {
|
||||
}
|
||||
|
||||
export interface IWorkflowDataProxyData {
|
||||
$binary: any; // tslint:disable-line:no-any
|
||||
$data: any; // tslint:disable-line:no-any
|
||||
$env: any; // tslint:disable-line:no-any
|
||||
$evaluateExpression: any; // tslint:disable-line:no-any
|
||||
$item: any; // tslint:disable-line:no-any
|
||||
$items: any; // tslint:disable-line:no-any
|
||||
$json: any; // tslint:disable-line:no-any
|
||||
$node: any; // tslint:disable-line:no-any
|
||||
$parameter: any; // tslint:disable-line:no-any
|
||||
$position: any; // tslint:disable-line:no-any
|
||||
$workflow: any; // tslint:disable-line:no-any
|
||||
$binary: any;
|
||||
$data: any;
|
||||
$env: any;
|
||||
$evaluateExpression: any;
|
||||
$item: any;
|
||||
$items: any;
|
||||
$json: any;
|
||||
$node: any;
|
||||
$parameter: any;
|
||||
$position: any;
|
||||
$workflow: any;
|
||||
}
|
||||
|
||||
export interface IWorkflowDataProxyAdditionalKeys {
|
||||
@@ -623,7 +742,7 @@ export type WebhookHttpMethod = 'GET' | 'POST' | 'HEAD' | 'OPTIONS';
|
||||
|
||||
export interface IWebhookResponseData {
|
||||
workflowData?: INodeExecutionData[][];
|
||||
webhookResponse?: any; // tslint:disable-line:no-any
|
||||
webhookResponse?: any;
|
||||
noWebhookResponse?: boolean;
|
||||
}
|
||||
|
||||
@@ -637,7 +756,6 @@ export interface INodeTypes {
|
||||
getByName(nodeType: string): INodeType | undefined;
|
||||
}
|
||||
|
||||
|
||||
export interface INodeTypeData {
|
||||
[key: string]: {
|
||||
type: INodeType;
|
||||
@@ -654,7 +772,6 @@ export interface IRun {
|
||||
stoppedAt?: Date;
|
||||
}
|
||||
|
||||
|
||||
// Contains all the data which is needed to execute a workflow and so also to
|
||||
// start restart it again after it did fail.
|
||||
// The RunData, ExecuteData and WaitForExecution contain often the same data.
|
||||
@@ -676,13 +793,11 @@ export interface IRunExecutionData {
|
||||
waitTill?: Date;
|
||||
}
|
||||
|
||||
|
||||
export interface IRunData {
|
||||
// node-name: result-data
|
||||
[key: string]: ITaskData[];
|
||||
}
|
||||
|
||||
|
||||
// The data that gets returned when a node runs
|
||||
export interface ITaskData {
|
||||
startTime: number;
|
||||
@@ -691,7 +806,6 @@ export interface ITaskData {
|
||||
error?: ExecutionError;
|
||||
}
|
||||
|
||||
|
||||
// The data for al the different kind of connectons (like main) and all the indexes
|
||||
export interface ITaskDataConnections {
|
||||
// Key for each input type and because there can be multiple inputs of the same type it is an array
|
||||
@@ -700,20 +814,17 @@ export interface ITaskDataConnections {
|
||||
[key: string]: Array<INodeExecutionData[] | null>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Keeps data while workflow gets executed and allows when provided to restart execution
|
||||
export interface IWaitingForExecution {
|
||||
// Node name
|
||||
[key: string]: {
|
||||
// Run index
|
||||
[key: number]: ITaskDataConnections
|
||||
[key: number]: ITaskDataConnections;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
export interface IWorkflowBase {
|
||||
id?: number | string | any; // tslint:disable-line:no-any
|
||||
id?: number | string | any;
|
||||
name: string;
|
||||
active: boolean;
|
||||
createdAt: Date;
|
||||
@@ -732,26 +843,34 @@ export interface IWorkflowCredentials {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
export interface IWorkflowExecuteHooks {
|
||||
[key: string]: Array<((...args: any[]) => Promise<void>)> | undefined; // tslint:disable-line:no-any
|
||||
nodeExecuteAfter?: Array<((nodeName: string, data: ITaskData, executionData: IRunExecutionData) => Promise<void>)>;
|
||||
nodeExecuteBefore?: Array<((nodeName: string) => Promise<void>)>;
|
||||
workflowExecuteAfter?: Array<((data: IRun, newStaticData: IDataObject) => Promise<void>)>;
|
||||
workflowExecuteBefore?: Array<((workflow: Workflow, data: IRunExecutionData) => Promise<void>)>;
|
||||
[key: string]: Array<(...args: any[]) => Promise<void>> | undefined;
|
||||
nodeExecuteAfter?: Array<
|
||||
(nodeName: string, data: ITaskData, executionData: IRunExecutionData) => Promise<void>
|
||||
>;
|
||||
nodeExecuteBefore?: Array<(nodeName: string) => Promise<void>>;
|
||||
workflowExecuteAfter?: Array<(data: IRun, newStaticData: IDataObject) => Promise<void>>;
|
||||
workflowExecuteBefore?: Array<(workflow: Workflow, data: IRunExecutionData) => Promise<void>>;
|
||||
}
|
||||
|
||||
export interface IWorkflowExecuteAdditionalData {
|
||||
credentialsHelper: ICredentialsHelper;
|
||||
encryptionKey: string;
|
||||
executeWorkflow: (workflowInfo: IExecuteWorkflowInfo, additionalData: IWorkflowExecuteAdditionalData, inputData?: INodeExecutionData[], parentExecutionId?: string, loadedWorkflowData?: IWorkflowBase, loadedRunData?: any) => Promise<any>; // tslint:disable-line:no-any
|
||||
executeWorkflow: (
|
||||
workflowInfo: IExecuteWorkflowInfo,
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
inputData?: INodeExecutionData[],
|
||||
parentExecutionId?: string,
|
||||
loadedWorkflowData?: IWorkflowBase,
|
||||
loadedRunData?: any,
|
||||
) => Promise<any>;
|
||||
// hooks?: IWorkflowExecuteHooks;
|
||||
executionId?: string;
|
||||
hooks?: WorkflowHooks;
|
||||
httpResponse?: express.Response;
|
||||
httpRequest?: express.Request;
|
||||
restApiUrl: string;
|
||||
sendMessageToUI?: (source: string, message: any) => void; // tslint:disable-line:no-any
|
||||
sendMessageToUI?: (source: string, message: any) => void;
|
||||
timezone: string;
|
||||
webhookBaseUrl: string;
|
||||
webhookWaitingBaseUrl: string;
|
||||
@@ -760,7 +879,15 @@ export interface IWorkflowExecuteAdditionalData {
|
||||
executionTimeoutTimestamp?: number;
|
||||
}
|
||||
|
||||
export type WorkflowExecuteMode = 'cli' | 'error' | 'integrated' | 'internal' | 'manual' | 'retry' | 'trigger' | 'webhook';
|
||||
export type WorkflowExecuteMode =
|
||||
| 'cli'
|
||||
| 'error'
|
||||
| 'integrated'
|
||||
| 'internal'
|
||||
| 'manual'
|
||||
| 'retry'
|
||||
| 'trigger'
|
||||
| 'webhook';
|
||||
export type WorkflowActivateMode = 'init' | 'create' | 'update' | 'activate' | 'manual';
|
||||
|
||||
export interface IWorkflowHooksOptionalParameters {
|
||||
@@ -790,7 +917,7 @@ export interface IStatusCodeMessages {
|
||||
|
||||
export type CodexData = {
|
||||
categories?: string[];
|
||||
subcategories?: {[category: string]: string[]};
|
||||
subcategories?: { [category: string]: string[] };
|
||||
alias?: string[];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user