2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
import {
|
2022-02-05 13:55:43 -08:00
|
|
|
GenericValue,
|
2019-06-23 03:35:23 -07:00
|
|
|
IConnections,
|
|
|
|
ICredentialsDecrypted,
|
|
|
|
ICredentialsEncrypted,
|
|
|
|
ICredentialType,
|
|
|
|
IDataObject,
|
2022-02-05 13:55:43 -08:00
|
|
|
ILoadOptions,
|
2019-06-23 03:35:23 -07:00
|
|
|
INode,
|
|
|
|
INodeCredentials,
|
|
|
|
INodeIssues,
|
2019-12-16 18:27:56 -08:00
|
|
|
INodeParameters,
|
2019-06-23 03:35:23 -07:00
|
|
|
INodePropertyOptions,
|
|
|
|
INodeTypeDescription,
|
2021-09-21 10:38:24 -07:00
|
|
|
INodeTypeNameVersion,
|
2019-06-23 03:35:23 -07:00
|
|
|
IRunExecutionData,
|
|
|
|
IRun,
|
|
|
|
IRunData,
|
|
|
|
ITaskData,
|
2021-10-18 20:57:49 -07:00
|
|
|
ITelemetrySettings,
|
2022-02-05 13:55:43 -08:00
|
|
|
IWorkflowSettings as IWorkflowSettingsWorkflow,
|
2019-06-23 03:35:23 -07:00
|
|
|
WorkflowExecuteMode,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
declare module 'jsplumb' {
|
2021-11-19 01:17:13 -08:00
|
|
|
interface PaintStyle {
|
|
|
|
stroke?: string;
|
|
|
|
fill?: string;
|
|
|
|
strokeWidth?: number;
|
|
|
|
outlineStroke?: string;
|
|
|
|
outlineWidth?: number;
|
|
|
|
}
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
interface Anchor {
|
|
|
|
lastReturnValue: number[];
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Connection {
|
2021-11-19 01:17:13 -08:00
|
|
|
__meta?: {
|
|
|
|
sourceNodeName: string,
|
|
|
|
sourceOutputIndex: number,
|
|
|
|
targetNodeName: string,
|
|
|
|
targetOutputIndex: number,
|
|
|
|
};
|
|
|
|
canvas?: HTMLElement;
|
|
|
|
connector?: {
|
|
|
|
setTargetEndpoint: (endpoint: Endpoint) => void;
|
|
|
|
resetTargetEndpoint: () => void;
|
|
|
|
bounds: {
|
|
|
|
minX: number;
|
|
|
|
maxX: number;
|
|
|
|
minY: number;
|
|
|
|
maxY: number;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
// bind(event: string, (connection: Connection): void;): void; // tslint:disable-line:no-any
|
2021-11-19 01:17:13 -08:00
|
|
|
bind(event: string, callback: Function): void;
|
2019-06-23 03:35:23 -07:00
|
|
|
removeOverlay(name: string): void;
|
2019-06-27 02:27:02 -07:00
|
|
|
removeOverlays(): void;
|
2019-06-23 03:35:23 -07:00
|
|
|
setParameter(name: string, value: any): void; // tslint:disable-line:no-any
|
|
|
|
setPaintStyle(arg0: PaintStyle): void;
|
|
|
|
addOverlay(arg0: any[]): void; // tslint:disable-line:no-any
|
|
|
|
setConnector(arg0: any[]): void; // tslint:disable-line:no-any
|
2021-11-19 01:17:13 -08:00
|
|
|
getUuids(): [string, string];
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2019-06-27 02:27:02 -07:00
|
|
|
interface Endpoint {
|
2021-12-03 09:53:55 -08:00
|
|
|
endpoint: any; // tslint:disable-line:no-any
|
|
|
|
elementId: string;
|
2021-11-19 01:17:13 -08:00
|
|
|
__meta?: {
|
|
|
|
nodeName: string,
|
2021-12-03 09:53:55 -08:00
|
|
|
nodeId: string,
|
2021-11-19 01:17:13 -08:00
|
|
|
index: number,
|
2021-12-03 09:53:55 -08:00
|
|
|
totalEndpoints: number;
|
2021-11-19 01:17:13 -08:00
|
|
|
};
|
2021-12-03 09:53:55 -08:00
|
|
|
getUuid(): string;
|
2019-06-27 02:27:02 -07:00
|
|
|
getOverlay(name: string): any; // tslint:disable-line:no-any
|
2021-12-03 09:53:55 -08:00
|
|
|
repaint(params?: object): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface N8nPlusEndpoint extends Endpoint {
|
|
|
|
setSuccessOutput(message: string): void;
|
|
|
|
clearSuccessOutput(): void;
|
2019-06-27 02:27:02 -07:00
|
|
|
}
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
interface Overlay {
|
|
|
|
setVisible(visible: boolean): void;
|
2021-11-19 01:17:13 -08:00
|
|
|
setLocation(location: number): void;
|
|
|
|
canvas?: HTMLElement;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
2019-08-02 08:06:06 -07:00
|
|
|
|
|
|
|
interface OnConnectionBindInfo {
|
|
|
|
originalSourceEndpoint: Endpoint;
|
|
|
|
originalTargetEndpoint: Endpoint;
|
2019-12-10 11:31:11 -08:00
|
|
|
getParameters(): { index: number };
|
2019-08-02 08:06:06 -07:00
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// EndpointOptions from jsplumb seems incomplete and wrong so we define an own one
|
|
|
|
export interface IEndpointOptions {
|
|
|
|
anchor?: any; // tslint:disable-line:no-any
|
|
|
|
createEndpoint?: boolean;
|
|
|
|
dragAllowedWhenFull?: boolean;
|
|
|
|
dropOptions?: any; // tslint:disable-line:no-any
|
|
|
|
dragProxy?: any; // tslint:disable-line:no-any
|
|
|
|
endpoint?: string;
|
|
|
|
endpointStyle?: object;
|
2021-11-19 01:17:13 -08:00
|
|
|
endpointHoverStyle?: object;
|
2019-06-23 03:35:23 -07:00
|
|
|
isSource?: boolean;
|
|
|
|
isTarget?: boolean;
|
|
|
|
maxConnections?: number;
|
|
|
|
overlays?: any; // tslint:disable-line:no-any
|
|
|
|
parameters?: any; // tslint:disable-line:no-any
|
|
|
|
uuid?: string;
|
2021-11-19 01:17:13 -08:00
|
|
|
enabled?: boolean;
|
2021-12-03 09:53:55 -08:00
|
|
|
cssClass?: string;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IUpdateInformation {
|
|
|
|
name: string;
|
|
|
|
key: string;
|
|
|
|
value: string | number; // with null makes problems in NodeSettings.vue
|
|
|
|
node?: string;
|
|
|
|
oldValue?: string | number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface INodeUpdatePropertiesInformation {
|
|
|
|
name: string; // Node-Name
|
|
|
|
properties: {
|
|
|
|
[key: string]: IDataObject;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-11-19 01:17:13 -08:00
|
|
|
export type XYPosition = [number, number];
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
export type MessageType = 'success' | 'warning' | 'info' | 'error';
|
|
|
|
|
|
|
|
export interface INodeUi extends INode {
|
2021-11-19 01:17:13 -08:00
|
|
|
position: XYPosition;
|
2019-06-23 03:35:23 -07:00
|
|
|
color?: string;
|
|
|
|
notes?: string;
|
|
|
|
issues?: INodeIssues;
|
2021-11-19 01:17:13 -08:00
|
|
|
name: string;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface INodeTypesMaxCount {
|
|
|
|
[key: string]: {
|
|
|
|
exist: number;
|
|
|
|
max: number;
|
|
|
|
nodeNames: string[];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-01-19 14:48:30 -08:00
|
|
|
export interface IExternalHooks {
|
|
|
|
run(eventName: string, metadata?: IDataObject): Promise<void>;
|
|
|
|
}
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
export interface IRestApi {
|
|
|
|
getActiveWorkflows(): Promise<string[]>;
|
|
|
|
getActivationError(id: string): Promise<IActivationError | undefined >;
|
|
|
|
getCurrentExecutions(filter: object): Promise<IExecutionsCurrentSummaryExtended[]>;
|
2021-02-09 14:32:40 -08:00
|
|
|
getPastExecutions(filter: object, limit: number, lastId?: string | number, firstId?: string | number): Promise<IExecutionsListResponse>;
|
2019-06-23 03:35:23 -07:00
|
|
|
stopCurrentExecution(executionId: string): Promise<IExecutionsStopData>;
|
|
|
|
makeRestApiRequest(method: string, endpoint: string, data?: any): Promise<any>; // tslint:disable-line:no-any
|
2022-01-07 13:02:21 -08:00
|
|
|
getCredentialTranslation(credentialType: string): Promise<object>;
|
2021-11-18 02:32:13 -08:00
|
|
|
getNodeTranslationHeaders(): Promise<INodeTranslationHeaders>;
|
2021-09-21 10:38:24 -07:00
|
|
|
getNodeTypes(onlyLatest?: boolean): Promise<INodeTypeDescription[]>;
|
|
|
|
getNodesInformation(nodeInfos: INodeTypeNameVersion[]): Promise<INodeTypeDescription[]>;
|
2022-02-05 13:55:43 -08:00
|
|
|
getNodeParameterOptions(sendData: { nodeTypeAndVersion: INodeTypeNameVersion, path: string, methodName?: string, loadOptions?: ILoadOptions, currentNodeParameters: INodeParameters, credentials?: INodeCredentials }): Promise<INodePropertyOptions[]> ;
|
2019-06-23 03:35:23 -07:00
|
|
|
removeTestWebhook(workflowId: string): Promise<boolean>;
|
|
|
|
runWorkflow(runData: IStartRunData): Promise<IExecutionPushResponse>;
|
2021-05-29 11:31:21 -07:00
|
|
|
createNewWorkflow(sendData: IWorkflowDataUpdate): Promise<IWorkflowDb>;
|
2019-06-23 03:35:23 -07:00
|
|
|
updateWorkflow(id: string, data: IWorkflowDataUpdate): Promise<IWorkflowDb>;
|
|
|
|
deleteWorkflow(name: string): Promise<void>;
|
|
|
|
getWorkflow(id: string): Promise<IWorkflowDb>;
|
|
|
|
getWorkflows(filter?: object): Promise<IWorkflowShortResponse[]>;
|
|
|
|
getWorkflowFromUrl(url: string): Promise<IWorkflowDb>;
|
|
|
|
getExecution(id: string): Promise<IExecutionResponse>;
|
|
|
|
deleteExecutions(sendData: IExecutionDeleteFilter): Promise<void>;
|
2019-12-12 16:12:38 -08:00
|
|
|
retryExecution(id: string, loadWorkflow?: boolean): Promise<boolean>;
|
2019-06-23 03:35:23 -07:00
|
|
|
getTimezones(): Promise<IDataObject>;
|
2021-12-23 13:29:04 -08:00
|
|
|
getBinaryBufferString(dataPath: string): Promise<string>;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2021-11-18 02:32:13 -08:00
|
|
|
export interface INodeTranslationHeaders {
|
|
|
|
data: {
|
|
|
|
[key: string]: {
|
|
|
|
displayName: string;
|
|
|
|
description: string;
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
export interface IBinaryDisplayData {
|
|
|
|
index: number;
|
|
|
|
key: string;
|
|
|
|
node: string;
|
|
|
|
outputIndex: number;
|
|
|
|
runIndex: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IStartRunData {
|
|
|
|
workflowData: IWorkflowData;
|
|
|
|
startNodes?: string[];
|
|
|
|
destinationNode?: string;
|
|
|
|
runData?: IRunData;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IRunDataUi {
|
|
|
|
node?: string;
|
|
|
|
workflowData: IWorkflowData;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ITableData {
|
|
|
|
columns: string[];
|
|
|
|
data: GenericValue[][];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IVariableItemSelected {
|
|
|
|
variable: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IVariableSelectorOption {
|
|
|
|
name: string;
|
|
|
|
key?: string;
|
|
|
|
value?: string;
|
|
|
|
options?: IVariableSelectorOption[] | null;
|
|
|
|
allowParentSelect?: boolean;
|
|
|
|
dataType?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Simple version of n8n-workflow.Workflow
|
|
|
|
export interface IWorkflowData {
|
2021-07-10 14:23:19 -07:00
|
|
|
id?: string | number;
|
2019-06-23 03:35:23 -07:00
|
|
|
name?: string;
|
|
|
|
active?: boolean;
|
|
|
|
nodes: INode[];
|
|
|
|
connections: IConnections;
|
|
|
|
settings?: IWorkflowSettings;
|
2021-05-29 11:31:21 -07:00
|
|
|
tags?: string[];
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IWorkflowDataUpdate {
|
2021-07-10 14:23:19 -07:00
|
|
|
id?: string | number;
|
2019-06-23 03:35:23 -07:00
|
|
|
name?: string;
|
|
|
|
nodes?: INode[];
|
|
|
|
connections?: IConnections;
|
|
|
|
settings?: IWorkflowSettings;
|
|
|
|
active?: boolean;
|
2021-05-29 11:31:21 -07:00
|
|
|
tags?: ITag[] | string[]; // string[] when store or requested, ITag[] from API response
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2021-06-22 10:33:07 -07:00
|
|
|
export interface IWorkflowTemplate {
|
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
workflow: {
|
|
|
|
nodes: INodeUi[];
|
|
|
|
connections: IConnections;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
// Almost identical to cli.Interfaces.ts
|
|
|
|
export interface IWorkflowDb {
|
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
active: boolean;
|
|
|
|
createdAt: number | string;
|
|
|
|
updatedAt: number | string;
|
|
|
|
nodes: INodeUi[];
|
|
|
|
connections: IConnections;
|
|
|
|
settings?: IWorkflowSettings;
|
2021-05-29 11:31:21 -07:00
|
|
|
tags?: ITag[] | string[]; // string[] when store or requested, ITag[] from API response
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// Identical to cli.Interfaces.ts
|
|
|
|
export interface IWorkflowShortResponse {
|
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
active: boolean;
|
|
|
|
createdAt: number | string;
|
|
|
|
updatedAt: number | string;
|
2021-05-29 11:31:21 -07:00
|
|
|
tags: ITag[];
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Identical or almost identical to cli.Interfaces.ts
|
|
|
|
|
|
|
|
export interface IActivationError {
|
|
|
|
time: number;
|
|
|
|
error: {
|
|
|
|
message: string;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICredentialsResponse extends ICredentialsEncrypted {
|
2021-10-13 15:21:00 -07:00
|
|
|
id: string;
|
2019-06-23 03:35:23 -07:00
|
|
|
createdAt: number | string;
|
|
|
|
updatedAt: number | string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICredentialsBase {
|
|
|
|
createdAt: number | string;
|
|
|
|
updatedAt: number | string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICredentialsDecryptedResponse extends ICredentialsBase, ICredentialsDecrypted{
|
|
|
|
id: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionBase {
|
|
|
|
id?: number | string;
|
|
|
|
finished: boolean;
|
|
|
|
mode: WorkflowExecuteMode;
|
|
|
|
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; // To be able to filter executions easily //
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionFlatted extends IExecutionBase {
|
|
|
|
data: string;
|
|
|
|
workflowData: IWorkflowDb;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionFlattedResponse extends IExecutionFlatted {
|
|
|
|
id: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionPushResponse {
|
|
|
|
executionId?: string;
|
|
|
|
waitingForWebhook?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionResponse extends IExecutionBase {
|
|
|
|
id: string;
|
|
|
|
data: IRunExecutionData;
|
|
|
|
workflowData: IWorkflowDb;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionShortResponse {
|
|
|
|
id: string;
|
|
|
|
workflowData: {
|
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
};
|
|
|
|
mode: WorkflowExecuteMode;
|
|
|
|
finished: boolean;
|
2019-07-22 11:29:06 -07:00
|
|
|
startedAt: Date;
|
|
|
|
stoppedAt: Date;
|
2019-06-23 03:35:23 -07:00
|
|
|
executionTime?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionsListResponse {
|
|
|
|
count: number;
|
|
|
|
results: IExecutionsSummary[];
|
2021-07-06 14:25:25 -07:00
|
|
|
estimated: boolean;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionsCurrentSummaryExtended {
|
2021-02-13 11:40:27 -08:00
|
|
|
id: string;
|
2019-06-23 03:35:23 -07:00
|
|
|
finished?: boolean;
|
|
|
|
mode: WorkflowExecuteMode;
|
2019-08-08 22:37:10 -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;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IExecutionsStopData {
|
|
|
|
finished?: boolean;
|
|
|
|
mode: WorkflowExecuteMode;
|
2019-07-22 11:29:06 -07:00
|
|
|
startedAt: Date;
|
|
|
|
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
|
|
|
mode: WorkflowExecuteMode;
|
|
|
|
finished?: boolean;
|
|
|
|
retryOf?: string;
|
|
|
|
retrySuccessId?: string;
|
2021-08-21 05:11:32 -07:00
|
|
|
waitTill?: Date;
|
2019-07-22 11:29:06 -07:00
|
|
|
startedAt: Date;
|
|
|
|
stoppedAt?: Date;
|
2019-06-23 03:35:23 -07:00
|
|
|
workflowId: string;
|
|
|
|
workflowName?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
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[];
|
|
|
|
}
|
|
|
|
|
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';
|
|
|
|
};
|
|
|
|
|
|
|
|
type PushDataExecuteBefore = {
|
|
|
|
data: IPushDataNodeExecuteBefore;
|
|
|
|
type: 'nodeExecuteBefore';
|
|
|
|
};
|
|
|
|
|
|
|
|
type PushDataConsoleMessage = {
|
|
|
|
data: IPushDataConsoleMessage;
|
|
|
|
type: 'sendConsoleMessage';
|
|
|
|
};
|
|
|
|
|
|
|
|
type PushDataTestWebhook = {
|
|
|
|
data: IPushDataTestWebhook;
|
|
|
|
type: 'testWebhookDeleted' | 'testWebhookReceived';
|
|
|
|
};
|
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 IPushDataExecutionFinished {
|
|
|
|
data: IRun;
|
2021-02-13 11:40:27 -08:00
|
|
|
executionId: string;
|
2019-08-08 22:37:10 -07:00
|
|
|
retryOf?: string;
|
2019-07-24 05:25:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IPushDataExecutionStarted {
|
2019-06-23 03:35:23 -07:00
|
|
|
executionId: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
2021-12-04 02:57:13 -08:00
|
|
|
messages: string[];
|
2021-05-29 11:41:25 -07:00
|
|
|
}
|
|
|
|
|
2021-07-22 01:22:17 -07:00
|
|
|
export interface IVersionNotificationSettings {
|
|
|
|
enabled: boolean;
|
|
|
|
endpoint: string;
|
|
|
|
infoUrl: string;
|
|
|
|
}
|
|
|
|
|
2021-12-03 04:19:23 -08:00
|
|
|
export type IPersonalizationSurveyKeys = 'codingSkill' | 'companyIndustry' | 'companySize' | 'otherCompanyIndustry' | 'otherWorkArea' | 'workArea';
|
2021-10-18 20:57:49 -07:00
|
|
|
|
|
|
|
export type IPersonalizationSurveyAnswers = {
|
2021-12-10 09:53:31 -08:00
|
|
|
codingSkill: string | null;
|
|
|
|
companyIndustry: string[];
|
|
|
|
companySize: string | null;
|
|
|
|
otherCompanyIndustry: string | null;
|
|
|
|
otherWorkArea: string | null;
|
|
|
|
workArea: string[] | string | null;
|
2021-10-18 20:57:49 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
export interface IPersonalizationSurvey {
|
|
|
|
answers?: IPersonalizationSurveyAnswers;
|
|
|
|
shouldShow: boolean;
|
|
|
|
}
|
|
|
|
|
:zap: Add Value Survey (#2499)
* N8N-2619 Value Survey Front-end
* N8N-2619 Added Contact Prompt Modal and logic
* N8N-2619 Added Link to Toast Message on Successful submitting ValueSurvey
* N8N-2619 Updated TypeForm URL in ValueSurvey Success Toast
* N8N-2619 Fixed Typo placeholder for ValueSurvey and ContactPrompt Modal
* N8N-2619 Fixed Toast not close automatically in ValueSurvey, Make part of the title bold, Changed Font-sizes on Value Survey
* N8N-2619 Fixed Close Button on ValueSurvey, Vertical Allignment for Questions in ValueSurvey Drawer
* N8N-2619 Make Value Survey with static height
* N8N-2619 Fixed Telemetry Events on closing ValueSurvey
* N8N-2619 Updated N8NPrompt Interface, Added Dynamic Title and Description on ContactPrompt Modal
* N8N-2619 Reversed Answers in ValueSurveyModal
* N8N-2619 Added Telemetry Event on user close ValueSurvey on second Question
* N8N-2619 Re-work, Optimized, Simplify the code after technical review
* N8N-2619 Fixed If else statement in openUserPromptsIfPossible
* N8N-2619 Change Text under Email Box - ValueSurvey, ContactPrompt, Added new Telemetary Event on ValueSurvey Open, Fixed Toast to close aftet 15s
* N8N-2619 Change ContactPrompt Modal to use Atoms like N8N-Heading and N8N-Text
* N8N-2619 Change Design & Logic on ValueSurvey - When to open
* N8N-2619 Updated Value Survey with new Telemetry Events (Refactor), Simplified functions, Added Atoms in ValueSurvey + ContactPrompt
* N8N-2619 Refactor in Interfaces, Updated/Refactor Getters and Vuex store props
* N8N-2619 Defined IN8nValueSurveyData interface
* N8N-2619 Disabled Keyboard shortcuts to be activated on typing in ValueSurvey Input field, Fire an event on Saving WF from Menu and with shorcut, Make Drawer keep-alive
* N8N-2619 Added Atoms in Value Survey Modal (buttons), Rework css
* N8N-2619 Added Responses on ValueSurvey Submit
* N8N-2619 Added Response for SubmittingContactInfo
* N8N-2619 Added loading state for buttons / ValueSurvey
* N8N-2619 Changed ValueSurvey and ContactPrompt to support enter key on submit, Simplifed closeDialog Function, Changed css for button in ValueSurvey, Prevent showing the Modals if Saving WF fails, Add Debouncing on showing prompt
* N8N-2619 Added IsTelemetryEnabled Getter in Vuex.store
* N8N-2619 Created/Added N8N-SquareButton to Design-system
* N8N-2619 Change Promise in MainSideBar with Async/Await function, Nitpick simpliefied
* N8N-2619 Update the text under the input fields
* N8N-2619 Update the text in ContactPrompt Modal
* N8N-2619 Allign Send button on ValueSurvey Modal
* N8N-2619 Fixed Input in ValueSurvey Modal
* N8N-2619 Check if the workflow is saving
* N8N-2619 Check if WF is saving to allowed performs fetchPromptsData
* N8N-2619 Hotfix
* N8N-2619 Fixed ValueSurvey, Updated onSaveButtonClick function, Created onSaveKeyboardShortcut function in NodeView
* N8N-2619 Rework css module classes for ValueSurvey, Simplified
* N8N-2619 Simplified N8N-SquareButton Component, removed dead code
* N8N-2619 Added Breakpoints for Mobile/Tablet View
* N8N-2619 Formatting fix
* N8N-2619 Update css for mobile/tablet, change promises to asyn/await functions in ContactPrompt and ValueSurvey, Added isActive prop to ValueSurvey
* N8N-2619 Update TEMPLATE_BASE_URL to production
2021-12-11 08:38:16 -08:00
|
|
|
export interface IN8nPrompts {
|
|
|
|
message: string;
|
|
|
|
title: string;
|
|
|
|
showContactPrompt: boolean;
|
|
|
|
showValueSurvey: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IN8nValueSurveyData {
|
|
|
|
[key: string]: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IN8nPromptResponse {
|
|
|
|
updated: boolean;
|
|
|
|
}
|
|
|
|
|
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;
|
2019-06-23 03:35:23 -07:00
|
|
|
timezone: string;
|
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
|
|
|
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;
|
2021-10-18 20:57:49 -07:00
|
|
|
personalizationSurvey?: IPersonalizationSurvey;
|
|
|
|
telemetry: ITelemetrySettings;
|
2021-11-09 00:59:48 -08:00
|
|
|
defaultLocale: string;
|
2022-02-03 14:24:01 -08:00
|
|
|
logLevel: ILogLevel;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IWorkflowSettings extends IWorkflowSettingsWorkflow {
|
|
|
|
errorWorkflow?: string;
|
2019-07-10 11:53:13 -07:00
|
|
|
saveDataErrorExecution?: string;
|
|
|
|
saveDataSuccessExecution?: string;
|
2019-07-10 09:06:26 -07:00
|
|
|
saveManualExecutions?: boolean;
|
2019-06-23 03:35:23 -07:00
|
|
|
timezone?: string;
|
2020-07-29 05:12:54 -07:00
|
|
|
executionTimeout?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ITimeoutHMS {
|
|
|
|
hours: number;
|
|
|
|
minutes: number;
|
|
|
|
seconds: number;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
2020-08-25 11:38:09 -07:00
|
|
|
|
|
|
|
export type WorkflowTitleStatus = 'EXECUTING' | 'IDLE' | 'ERROR';
|
2021-04-09 13:44:53 -07:00
|
|
|
|
|
|
|
export type MenuItemType = 'link';
|
|
|
|
export type MenuItemPosition = 'top' | 'bottom';
|
|
|
|
|
|
|
|
export interface IMenuItem {
|
|
|
|
id: string;
|
|
|
|
type: MenuItemType;
|
2021-05-04 08:55:39 -07:00
|
|
|
position?: MenuItemPosition;
|
2021-04-09 13:44:53 -07:00
|
|
|
properties: ILinkMenuItemProperties;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ILinkMenuItemProperties {
|
|
|
|
title: string;
|
|
|
|
icon: string;
|
|
|
|
href: string;
|
|
|
|
newWindow?: boolean;
|
2021-05-16 16:16:24 -07:00
|
|
|
}
|
2021-05-29 11:31:21 -07:00
|
|
|
|
2021-06-17 22:58:26 -07:00
|
|
|
export interface ISubcategoryItemProps {
|
|
|
|
subcategory: string;
|
|
|
|
description: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface INodeItemProps {
|
|
|
|
subcategory: string;
|
|
|
|
nodeType: INodeTypeDescription;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICategoryItemProps {
|
|
|
|
expanded: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface INodeCreateElement {
|
|
|
|
type: 'node' | 'category' | 'subcategory';
|
|
|
|
category: string;
|
|
|
|
key: string;
|
|
|
|
includedByTrigger?: boolean;
|
|
|
|
includedByRegular?: boolean;
|
|
|
|
properties: ISubcategoryItemProps | INodeItemProps | ICategoryItemProps;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICategoriesWithNodes {
|
|
|
|
[category: string]: {
|
|
|
|
[subcategory: string]: {
|
|
|
|
regularCount: number;
|
|
|
|
triggerCount: number;
|
|
|
|
nodes: INodeCreateElement[];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-05-29 11:31:21 -07:00
|
|
|
export interface ITag {
|
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
usageCount?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ITagRow {
|
|
|
|
tag?: ITag;
|
|
|
|
usage?: string;
|
|
|
|
create?: boolean;
|
|
|
|
disable?: boolean;
|
|
|
|
update?: boolean;
|
|
|
|
delete?: boolean;
|
|
|
|
}
|
|
|
|
|
2021-07-22 01:22:17 -07:00
|
|
|
export interface IVersion {
|
|
|
|
name: string;
|
|
|
|
nodes: IVersionNode[];
|
|
|
|
createdAt: string;
|
|
|
|
description: string;
|
|
|
|
documentationUrl: string;
|
|
|
|
hasBreakingChange: boolean;
|
|
|
|
hasSecurityFix: boolean;
|
|
|
|
hasSecurityIssue: boolean;
|
|
|
|
securityIssueFixVersion: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IVersionNode {
|
|
|
|
name: string;
|
|
|
|
displayName: string;
|
|
|
|
icon: string;
|
|
|
|
defaults: INodeParameters;
|
|
|
|
iconData: {
|
|
|
|
type: string;
|
|
|
|
icon?: string;
|
|
|
|
fileBuffer?: string;
|
|
|
|
};
|
|
|
|
}
|
2021-05-29 11:31:21 -07:00
|
|
|
export interface IRootState {
|
|
|
|
activeExecutions: IExecutionsCurrentSummaryExtended[];
|
|
|
|
activeWorkflows: string[];
|
|
|
|
activeActions: string[];
|
2022-01-07 13:02:21 -08:00
|
|
|
activeCredentialType: string | null;
|
2021-05-29 11:31:21 -07:00
|
|
|
activeNode: string | null;
|
|
|
|
baseUrl: string;
|
2021-11-09 00:59:48 -08:00
|
|
|
defaultLocale: string;
|
2021-05-29 11:31:21 -07:00
|
|
|
endpointWebhook: string;
|
|
|
|
endpointWebhookTest: string;
|
|
|
|
executionId: string | null;
|
|
|
|
executingNode: string | null;
|
|
|
|
executionWaitingForWebhook: boolean;
|
|
|
|
pushConnectionActive: boolean;
|
|
|
|
saveDataErrorExecution: string;
|
|
|
|
saveDataSuccessExecution: string;
|
2021-10-06 10:13:39 -07:00
|
|
|
saveManualExecutions: boolean;
|
2021-05-29 11:31:21 -07:00
|
|
|
timezone: string;
|
|
|
|
stateIsDirty: boolean;
|
|
|
|
executionTimeout: number;
|
|
|
|
maxExecutionTimeout: number;
|
|
|
|
versionCli: string;
|
|
|
|
oauthCallbackUrls: object;
|
|
|
|
n8nMetadata: object;
|
|
|
|
workflowExecutionData: IExecutionResponse | null;
|
|
|
|
lastSelectedNode: string | null;
|
|
|
|
lastSelectedNodeOutputIndex: number | null;
|
|
|
|
nodeIndex: Array<string | null>;
|
|
|
|
nodeTypes: INodeTypeDescription[];
|
2021-11-19 01:17:13 -08:00
|
|
|
nodeViewOffsetPosition: XYPosition;
|
2021-05-29 11:31:21 -07:00
|
|
|
nodeViewMoveInProgress: boolean;
|
|
|
|
selectedNodes: INodeUi[];
|
|
|
|
sessionId: string;
|
|
|
|
urlBaseWebhook: string;
|
|
|
|
workflow: IWorkflowDb;
|
|
|
|
sidebarMenuItems: IMenuItem[];
|
2021-07-22 01:22:17 -07:00
|
|
|
instanceId: string;
|
2021-05-29 11:31:21 -07:00
|
|
|
}
|
|
|
|
|
2021-09-11 01:15:36 -07:00
|
|
|
export interface ICredentialTypeMap {
|
|
|
|
[name: string]: ICredentialType;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICredentialMap {
|
|
|
|
[name: string]: ICredentialsResponse;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICredentialsState {
|
|
|
|
credentialTypes: ICredentialTypeMap;
|
|
|
|
credentials: ICredentialMap;
|
|
|
|
}
|
|
|
|
|
2021-05-29 11:31:21 -07:00
|
|
|
export interface ITagsState {
|
|
|
|
tags: { [id: string]: ITag };
|
|
|
|
isLoading: boolean;
|
|
|
|
fetchedAll: boolean;
|
|
|
|
fetchedUsageCount: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IModalState {
|
|
|
|
open: boolean;
|
2021-09-11 01:15:36 -07:00
|
|
|
mode?: string | null;
|
|
|
|
activeId?: string | null;
|
2021-05-29 11:31:21 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IUiState {
|
|
|
|
sidebarMenuCollapsed: boolean;
|
|
|
|
modalStack: string[];
|
|
|
|
modals: {
|
|
|
|
[key: string]: IModalState;
|
|
|
|
};
|
|
|
|
isPageLoading: boolean;
|
|
|
|
}
|
|
|
|
|
2022-02-03 14:24:01 -08:00
|
|
|
export type ILogLevel = 'info' | 'debug' | 'warn' | 'error' | 'verbose';
|
|
|
|
|
2021-10-18 20:57:49 -07:00
|
|
|
export interface ISettingsState {
|
|
|
|
settings: IN8nUISettings;
|
:zap: Add Value Survey (#2499)
* N8N-2619 Value Survey Front-end
* N8N-2619 Added Contact Prompt Modal and logic
* N8N-2619 Added Link to Toast Message on Successful submitting ValueSurvey
* N8N-2619 Updated TypeForm URL in ValueSurvey Success Toast
* N8N-2619 Fixed Typo placeholder for ValueSurvey and ContactPrompt Modal
* N8N-2619 Fixed Toast not close automatically in ValueSurvey, Make part of the title bold, Changed Font-sizes on Value Survey
* N8N-2619 Fixed Close Button on ValueSurvey, Vertical Allignment for Questions in ValueSurvey Drawer
* N8N-2619 Make Value Survey with static height
* N8N-2619 Fixed Telemetry Events on closing ValueSurvey
* N8N-2619 Updated N8NPrompt Interface, Added Dynamic Title and Description on ContactPrompt Modal
* N8N-2619 Reversed Answers in ValueSurveyModal
* N8N-2619 Added Telemetry Event on user close ValueSurvey on second Question
* N8N-2619 Re-work, Optimized, Simplify the code after technical review
* N8N-2619 Fixed If else statement in openUserPromptsIfPossible
* N8N-2619 Change Text under Email Box - ValueSurvey, ContactPrompt, Added new Telemetary Event on ValueSurvey Open, Fixed Toast to close aftet 15s
* N8N-2619 Change ContactPrompt Modal to use Atoms like N8N-Heading and N8N-Text
* N8N-2619 Change Design & Logic on ValueSurvey - When to open
* N8N-2619 Updated Value Survey with new Telemetry Events (Refactor), Simplified functions, Added Atoms in ValueSurvey + ContactPrompt
* N8N-2619 Refactor in Interfaces, Updated/Refactor Getters and Vuex store props
* N8N-2619 Defined IN8nValueSurveyData interface
* N8N-2619 Disabled Keyboard shortcuts to be activated on typing in ValueSurvey Input field, Fire an event on Saving WF from Menu and with shorcut, Make Drawer keep-alive
* N8N-2619 Added Atoms in Value Survey Modal (buttons), Rework css
* N8N-2619 Added Responses on ValueSurvey Submit
* N8N-2619 Added Response for SubmittingContactInfo
* N8N-2619 Added loading state for buttons / ValueSurvey
* N8N-2619 Changed ValueSurvey and ContactPrompt to support enter key on submit, Simplifed closeDialog Function, Changed css for button in ValueSurvey, Prevent showing the Modals if Saving WF fails, Add Debouncing on showing prompt
* N8N-2619 Added IsTelemetryEnabled Getter in Vuex.store
* N8N-2619 Created/Added N8N-SquareButton to Design-system
* N8N-2619 Change Promise in MainSideBar with Async/Await function, Nitpick simpliefied
* N8N-2619 Update the text under the input fields
* N8N-2619 Update the text in ContactPrompt Modal
* N8N-2619 Allign Send button on ValueSurvey Modal
* N8N-2619 Fixed Input in ValueSurvey Modal
* N8N-2619 Check if the workflow is saving
* N8N-2619 Check if WF is saving to allowed performs fetchPromptsData
* N8N-2619 Hotfix
* N8N-2619 Fixed ValueSurvey, Updated onSaveButtonClick function, Created onSaveKeyboardShortcut function in NodeView
* N8N-2619 Rework css module classes for ValueSurvey, Simplified
* N8N-2619 Simplified N8N-SquareButton Component, removed dead code
* N8N-2619 Added Breakpoints for Mobile/Tablet View
* N8N-2619 Formatting fix
* N8N-2619 Update css for mobile/tablet, change promises to asyn/await functions in ContactPrompt and ValueSurvey, Added isActive prop to ValueSurvey
* N8N-2619 Update TEMPLATE_BASE_URL to production
2021-12-11 08:38:16 -08:00
|
|
|
promptsData: IN8nPrompts;
|
2021-10-18 20:57:49 -07:00
|
|
|
}
|
|
|
|
|
2021-07-22 01:22:17 -07:00
|
|
|
export interface IVersionsState {
|
|
|
|
versionNotificationSettings: IVersionNotificationSettings;
|
|
|
|
nextVersions: IVersion[];
|
|
|
|
currentVersion: IVersion | undefined;
|
|
|
|
}
|
|
|
|
|
2021-05-29 11:31:21 -07:00
|
|
|
export interface IWorkflowsState {
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IRestApiContext {
|
|
|
|
baseUrl: string;
|
|
|
|
sessionId: string;
|
|
|
|
}
|
2021-06-23 03:49:34 -07:00
|
|
|
|
|
|
|
export interface IZoomConfig {
|
|
|
|
scale: number;
|
2021-11-19 01:17:13 -08:00
|
|
|
offset: XYPosition;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IBounds {
|
|
|
|
minX: number;
|
|
|
|
minY: number;
|
|
|
|
maxX: number;
|
|
|
|
maxY: number;
|
2021-06-23 03:49:34 -07:00
|
|
|
}
|