n8n-workflow
Advanced tools
Comparing version 0.74.0 to 0.75.0
import * as LoggerProxy from './LoggerProxy'; | ||
import * as NodeHelpers from './NodeHelpers'; | ||
import * as ObservableObject from './ObservableObject'; | ||
export * from './DeferredPromise'; | ||
export * from './Interfaces'; | ||
@@ -5,0 +6,0 @@ export * from './Expression'; |
@@ -20,2 +20,3 @@ "use strict"; | ||
exports.ObservableObject = ObservableObject; | ||
__exportStar(require("./DeferredPromise"), exports); | ||
__exportStar(require("./Interfaces"), exports); | ||
@@ -22,0 +23,0 @@ __exportStar(require("./Expression"), exports); |
@@ -5,2 +5,3 @@ /// <reference types="node" /> | ||
import { URLSearchParams } from 'url'; | ||
import { IDeferredPromise } from './DeferredPromise'; | ||
import { Workflow } from './Workflow'; | ||
@@ -123,2 +124,3 @@ import { WorkflowHooks } from './WorkflowHooks'; | ||
} | ||
export declare type IExecuteResponsePromiseData = IDataObject | IN8nHttpFullResponse; | ||
export interface INodeTypeNameVersion { | ||
@@ -183,3 +185,3 @@ name: string; | ||
} | ||
export declare type IN8nHttpResponse = IDataObject | Buffer | GenericValue | GenericValue[]; | ||
export declare type IN8nHttpResponse = IDataObject | Buffer | GenericValue | GenericValue[] | null; | ||
export interface IN8nHttpFullResponse { | ||
@@ -189,3 +191,3 @@ body: IN8nHttpResponse; | ||
statusCode: number; | ||
statusMessage: string; | ||
statusMessage?: string; | ||
} | ||
@@ -213,2 +215,3 @@ export interface IExecuteFunctions { | ||
sendMessageToUI(message: any): void; | ||
sendResponse(response: IExecuteResponsePromiseData): void; | ||
helpers: { | ||
@@ -294,3 +297,3 @@ httpRequest(requestOptions: IHttpRequestOptions): Promise<IN8nHttpResponse | IN8nHttpFullResponse>; | ||
export interface ITriggerFunctions { | ||
emit(data: INodeExecutionData[][]): void; | ||
emit(data: INodeExecutionData[][], responsePromise?: IDeferredPromise<IExecuteResponsePromiseData>): void; | ||
getCredentials(type: string): Promise<ICredentialDataDecryptedObject | undefined>; | ||
@@ -677,2 +680,3 @@ getMode(): WorkflowExecuteMode; | ||
workflowExecuteBefore?: Array<(workflow: Workflow, data: IRunExecutionData) => Promise<void>>; | ||
sendResponse?: Array<(response: IExecuteResponsePromiseData) => Promise<void>>; | ||
} | ||
@@ -679,0 +683,0 @@ export interface IWorkflowExecuteAdditionalData { |
@@ -427,4 +427,11 @@ "use strict"; | ||
triggerResponse.manualTriggerResponse = new Promise((resolve) => { | ||
triggerFunctions.emit = ((resolve) => (data) => { | ||
resolve(data); | ||
triggerFunctions.emit = ((resolveEmit) => (data, responsePromise) => { | ||
additionalData.hooks.hookFunctions.sendResponse = [ | ||
async (response) => { | ||
if (responsePromise) { | ||
responsePromise.resolve(response); | ||
} | ||
}, | ||
]; | ||
resolveEmit(data); | ||
})(resolve); | ||
@@ -431,0 +438,0 @@ }); |
{ | ||
"name": "n8n-workflow", | ||
"version": "0.74.0", | ||
"version": "0.75.0", | ||
"description": "Workflow base code of n8n", | ||
@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE.md", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
474262
54
7462