mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47:29 -08:00
docs: remove impertinent Jsdocs comments (no-changelog) (#4181)
* 🔥 Remove impertinent Jsdocs comments
* Lint fixes
This commit is contained in:
parent
64fffa0579
commit
8bd99e0600
|
@ -36,10 +36,6 @@ export class ActiveExecutions {
|
|||
/**
|
||||
* Add a new active execution
|
||||
*
|
||||
* @param {ChildProcess} process
|
||||
* @param {IWorkflowExecutionDataProcess} executionData
|
||||
* @returns {string}
|
||||
* @memberof ActiveExecutions
|
||||
*/
|
||||
async add(
|
||||
executionData: IWorkflowExecutionDataProcess,
|
||||
|
@ -103,9 +99,6 @@ export class ActiveExecutions {
|
|||
/**
|
||||
* Attaches an execution
|
||||
*
|
||||
* @param {string} executionId
|
||||
* @param {PCancelable<IRun>} workflowExecution
|
||||
* @memberof ActiveExecutions
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
attachWorkflowExecution(executionId: string, workflowExecution: PCancelable<IRun>) {
|
||||
|
@ -143,10 +136,6 @@ export class ActiveExecutions {
|
|||
/**
|
||||
* Remove an active execution
|
||||
*
|
||||
* @param {string} executionId
|
||||
* @param {IRun} fullRunData
|
||||
* @returns {void}
|
||||
* @memberof ActiveExecutions
|
||||
*/
|
||||
remove(executionId: string, fullRunData?: IRun): void {
|
||||
if (this.activeExecutions[executionId] === undefined) {
|
||||
|
@ -168,8 +157,6 @@ export class ActiveExecutions {
|
|||
*
|
||||
* @param {string} executionId The id of the execution to stop
|
||||
* @param {string} timeout String 'timeout' given if stop due to timeout
|
||||
* @returns {(Promise<IRun | undefined>)}
|
||||
* @memberof ActiveExecutions
|
||||
*/
|
||||
async stopExecution(executionId: string, timeout?: string): Promise<IRun | undefined> {
|
||||
if (this.activeExecutions[executionId] === undefined) {
|
||||
|
@ -204,8 +191,6 @@ export class ActiveExecutions {
|
|||
* with the given id
|
||||
*
|
||||
* @param {string} executionId The id of the execution to wait for
|
||||
* @returns {Promise<IRun>}
|
||||
* @memberof ActiveExecutions
|
||||
*/
|
||||
async getPostExecutePromise(executionId: string): Promise<IRun | undefined> {
|
||||
// Create the promise which will be resolved when the execution finished
|
||||
|
@ -224,8 +209,6 @@ export class ActiveExecutions {
|
|||
/**
|
||||
* Returns all the currently active executions
|
||||
*
|
||||
* @returns {IExecutionsCurrentSummary[]}
|
||||
* @memberof ActiveExecutions
|
||||
*/
|
||||
getActiveExecutions(): IExecutionsCurrentSummary[] {
|
||||
const returnData: IExecutionsCurrentSummary[] = [];
|
||||
|
|
|
@ -154,8 +154,6 @@ export class ActiveWorkflowRunner {
|
|||
/**
|
||||
* Removes all the currently active workflows
|
||||
*
|
||||
* @returns {Promise<void>}
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
async removeAll(): Promise<void> {
|
||||
let activeWorkflowIds: string[] = [];
|
||||
|
@ -185,12 +183,6 @@ export class ActiveWorkflowRunner {
|
|||
/**
|
||||
* Checks if a webhook for the given method and path exists and executes the workflow.
|
||||
*
|
||||
* @param {WebhookHttpMethod} httpMethod
|
||||
* @param {string} path
|
||||
* @param {express.Request} req
|
||||
* @param {express.Response} res
|
||||
* @returns {Promise<object>}
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
async executeWebhook(
|
||||
httpMethod: WebhookHttpMethod,
|
||||
|
@ -354,8 +346,6 @@ export class ActiveWorkflowRunner {
|
|||
* Gets all request methods associated with a single webhook
|
||||
*
|
||||
* @param {string} path webhook path
|
||||
* @returns {Promise<string[]>}
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
async getWebhookMethods(path: string): Promise<string[]> {
|
||||
const webhooks = await Db.collections.Webhook.find({ webhookPath: path });
|
||||
|
@ -368,8 +358,6 @@ export class ActiveWorkflowRunner {
|
|||
/**
|
||||
* Returns the ids of the currently active workflows
|
||||
*
|
||||
* @returns {string[]}
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
async getActiveWorkflows(user?: User): Promise<IWorkflowDb[]> {
|
||||
let activeWorkflows: WorkflowEntity[] = [];
|
||||
|
@ -401,8 +389,6 @@ export class ActiveWorkflowRunner {
|
|||
* Returns if the workflow is active
|
||||
*
|
||||
* @param {string} id The id of the workflow to check
|
||||
* @returns {boolean}
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
async isActive(id: string): Promise<boolean> {
|
||||
const workflow = await Db.collections.Workflow.findOne(id);
|
||||
|
@ -413,8 +399,6 @@ export class ActiveWorkflowRunner {
|
|||
* Return error if there was a problem activating the workflow
|
||||
*
|
||||
* @param {string} id The id of the workflow to return the error of
|
||||
* @returns {(IActivationError | undefined)}
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
getActivationError(id: string): IActivationError | undefined {
|
||||
if (this.activationErrors[id] === undefined) {
|
||||
|
@ -427,11 +411,6 @@ export class ActiveWorkflowRunner {
|
|||
/**
|
||||
* Adds all the webhooks of the workflow
|
||||
*
|
||||
* @param {Workflow} workflow
|
||||
* @param {IWorkflowExecuteAdditionalDataWorkflow} additionalData
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {Promise<void>}
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
async addWorkflowWebhooks(
|
||||
workflow: Workflow,
|
||||
|
@ -533,9 +512,6 @@ export class ActiveWorkflowRunner {
|
|||
/**
|
||||
* Remove all the webhooks of the workflow
|
||||
*
|
||||
* @param {string} workflowId
|
||||
* @returns
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
async removeWorkflowWebhooks(workflowId: string): Promise<void> {
|
||||
const workflowData = await Db.collections.Workflow.findOne(workflowId, {
|
||||
|
@ -588,13 +564,6 @@ export class ActiveWorkflowRunner {
|
|||
/**
|
||||
* Runs the given workflow
|
||||
*
|
||||
* @param {IWorkflowDb} workflowData
|
||||
* @param {INode} node
|
||||
* @param {INodeExecutionData[][]} data
|
||||
* @param {IWorkflowExecuteAdditionalDataWorkflow} additionalData
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
async runWorkflow(
|
||||
|
@ -644,11 +613,6 @@ export class ActiveWorkflowRunner {
|
|||
* Return poll function which gets the global functions from n8n-core
|
||||
* and overwrites the __emit to be able to start it in subprocess
|
||||
*
|
||||
* @param {IWorkflowDb} workflowData
|
||||
* @param {IWorkflowExecuteAdditionalDataWorkflow} additionalData
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {IGetExecutePollFunctions}
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
getExecutePollFunctions(
|
||||
workflowData: IWorkflowDb,
|
||||
|
@ -686,11 +650,6 @@ export class ActiveWorkflowRunner {
|
|||
* Return trigger function which gets the global functions from n8n-core
|
||||
* and overwrites the emit to be able to start it in subprocess
|
||||
*
|
||||
* @param {IWorkflowDb} workflowData
|
||||
* @param {IWorkflowExecuteAdditionalDataWorkflow} additionalData
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {IGetExecuteTriggerFunctions}
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
getExecuteTriggerFunctions(
|
||||
workflowData: IWorkflowDb,
|
||||
|
@ -795,8 +754,6 @@ export class ActiveWorkflowRunner {
|
|||
*
|
||||
* @param {string} workflowId The id of the workflow to activate
|
||||
* @param {IWorkflowDb} [workflowData] If workflowData is given it saves the DB query
|
||||
* @returns {Promise<void>}
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
async add(
|
||||
workflowId: string,
|
||||
|
@ -985,8 +942,6 @@ export class ActiveWorkflowRunner {
|
|||
* Makes a workflow inactive
|
||||
*
|
||||
* @param {string} workflowId The id of the workflow to deactivate
|
||||
* @returns {Promise<void>}
|
||||
* @memberof ActiveWorkflowRunner
|
||||
*/
|
||||
async remove(workflowId: string): Promise<void> {
|
||||
if (this.activeWorkflows !== null) {
|
||||
|
|
|
@ -250,8 +250,6 @@ export class CredentialsHelper extends ICredentialsHelper {
|
|||
*
|
||||
* @param {INodeCredentialsDetails} nodeCredential id and name to return instance of
|
||||
* @param {string} type Type of the credential to return instance of
|
||||
* @returns {Credentials}
|
||||
* @memberof CredentialsHelper
|
||||
*/
|
||||
async getCredentials(
|
||||
nodeCredential: INodeCredentialsDetails,
|
||||
|
@ -287,8 +285,6 @@ export class CredentialsHelper extends ICredentialsHelper {
|
|||
* Returns all the properties of the credentials with the given name
|
||||
*
|
||||
* @param {string} type The name of the type to return credentials off
|
||||
* @returns {INodeProperties[]}
|
||||
* @memberof CredentialsHelper
|
||||
*/
|
||||
getCredentialsProperties(type: string): INodeProperties[] {
|
||||
const credentialTypeData = this.credentialTypes.getByName(type);
|
||||
|
@ -319,8 +315,6 @@ export class CredentialsHelper extends ICredentialsHelper {
|
|||
* @param {INodeCredentialsDetails} nodeCredentials id and name to return instance of
|
||||
* @param {string} type Type of the credentials to return data of
|
||||
* @param {boolean} [raw] Return the data as supplied without defaults or overwrites
|
||||
* @returns {ICredentialDataDecryptedObject}
|
||||
* @memberof CredentialsHelper
|
||||
*/
|
||||
async getDecrypted(
|
||||
nodeCredentials: INodeCredentialsDetails,
|
||||
|
@ -351,8 +345,6 @@ export class CredentialsHelper extends ICredentialsHelper {
|
|||
*
|
||||
* @param {ICredentialDataDecryptedObject} decryptedDataOriginal The credential data to overwrite data on
|
||||
* @param {string} type Type of the credentials to overwrite data of
|
||||
* @returns {ICredentialDataDecryptedObject}
|
||||
* @memberof CredentialsHelper
|
||||
*/
|
||||
applyDefaultsAndOverwrites(
|
||||
decryptedDataOriginal: ICredentialDataDecryptedObject,
|
||||
|
@ -443,8 +435,6 @@ export class CredentialsHelper extends ICredentialsHelper {
|
|||
* @param {string} name Name of the credentials to set data of
|
||||
* @param {string} type Type of the credentials to set data of
|
||||
* @param {ICredentialDataDecryptedObject} data The data to set
|
||||
* @returns {Promise<void>}
|
||||
* @memberof CredentialsHelper
|
||||
*/
|
||||
async updateCredentials(
|
||||
nodeCredentials: INodeCredentialsDetails,
|
||||
|
|
|
@ -42,8 +42,6 @@ let versionCache: IPackageVersions | undefined;
|
|||
/**
|
||||
* Returns the base URL n8n is reachable from
|
||||
*
|
||||
* @export
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getBaseUrl(): string {
|
||||
const protocol = config.getEnv('protocol');
|
||||
|
@ -60,9 +58,6 @@ export function getBaseUrl(): string {
|
|||
/**
|
||||
* Returns the session id if one is set
|
||||
*
|
||||
* @export
|
||||
* @param {express.Request} req
|
||||
* @returns {(string | undefined)}
|
||||
*/
|
||||
export function getSessionId(req: express.Request): string | undefined {
|
||||
return req.headers.sessionid as string | undefined;
|
||||
|
@ -71,8 +66,6 @@ export function getSessionId(req: express.Request): string | undefined {
|
|||
/**
|
||||
* Returns information which version of the packages are installed
|
||||
*
|
||||
* @export
|
||||
* @returns {Promise<IPackageVersions>}
|
||||
*/
|
||||
export async function getVersions(): Promise<IPackageVersions> {
|
||||
if (versionCache !== undefined) {
|
||||
|
@ -94,9 +87,6 @@ export async function getVersions(): Promise<IPackageVersions> {
|
|||
/**
|
||||
* Extracts configuration schema for key
|
||||
*
|
||||
* @param {string} configKey
|
||||
* @param {IDataObject} configSchema
|
||||
* @returns {IDataObject} schema of the configKey
|
||||
*/
|
||||
function extractSchemaForKey(configKey: string, configSchema: IDataObject): IDataObject {
|
||||
const configKeyParts = configKey.split('.');
|
||||
|
@ -118,9 +108,7 @@ function extractSchemaForKey(configKey: string, configSchema: IDataObject): IDat
|
|||
/**
|
||||
* Gets value from config with support for "_FILE" environment variables
|
||||
*
|
||||
* @export
|
||||
* @param {string} configKey The key of the config data to get
|
||||
* @returns {(Promise<string | boolean | number | undefined>)}
|
||||
*/
|
||||
export async function getConfigValue(
|
||||
configKey: string,
|
||||
|
|
|
@ -163,8 +163,6 @@ class LoadNodesAndCredentialsClass {
|
|||
* Returns all the names of the packages which could
|
||||
* contain n8n nodes
|
||||
*
|
||||
* @returns {Promise<string[]>}
|
||||
* @memberof LoadNodesAndCredentialsClass
|
||||
*/
|
||||
async getN8nNodePackages(baseModulesPath: string): Promise<string[]> {
|
||||
const getN8nNodePackagesRecursive = async (relativePath: string): Promise<string[]> => {
|
||||
|
@ -196,7 +194,6 @@ class LoadNodesAndCredentialsClass {
|
|||
*
|
||||
* @param {string} credentialName The name of the credentials
|
||||
* @param {string} filePath The file to read credentials from
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
loadCredentialsFromFile(credentialName: string, filePath: string): void {
|
||||
let tempCredential: ICredentialType;
|
||||
|
@ -347,7 +344,6 @@ class LoadNodesAndCredentialsClass {
|
|||
* @param {string} packageName The package name to set for the found nodes
|
||||
* @param {string} nodeName Tha name of the node
|
||||
* @param {string} filePath The file to read node from
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
loadNodeFromFile(
|
||||
packageName: string,
|
||||
|
@ -433,7 +429,6 @@ class LoadNodesAndCredentialsClass {
|
|||
* alias (if defined) from the codex data for the node at the given file path.
|
||||
*
|
||||
* @param {string} filePath The file path to a `*.node.js` file
|
||||
* @returns {CodexData}
|
||||
*/
|
||||
getCodex(filePath: string): CodexData {
|
||||
// eslint-disable-next-line global-require, import/no-dynamic-require, @typescript-eslint/no-var-requires
|
||||
|
@ -454,11 +449,9 @@ class LoadNodesAndCredentialsClass {
|
|||
* Adds a node codex `categories` and `subcategories` (if defined)
|
||||
* to a node description `codex` property.
|
||||
*
|
||||
* @param {object} obj
|
||||
* @param obj.node Node to add categories to
|
||||
* @param obj.filePath Path to the built node
|
||||
* @param obj.isCustom Whether the node is custom
|
||||
* @returns {void}
|
||||
*/
|
||||
addCodex({
|
||||
node,
|
||||
|
@ -495,7 +488,6 @@ class LoadNodesAndCredentialsClass {
|
|||
*
|
||||
* @param {string} setPackageName The package name to set for the found nodes
|
||||
* @param {string} directory The directory to look in
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async loadDataFromDirectory(setPackageName: string, directory: string): Promise<void> {
|
||||
const files = await glob('**/*.@(node|credentials).js', {
|
||||
|
@ -524,7 +516,6 @@ class LoadNodesAndCredentialsClass {
|
|||
* Loads nodes and credentials from the package with the given name
|
||||
*
|
||||
* @param {string} packagePath The path to read data from
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async loadDataFromPackage(packagePath: string): Promise<INodeTypeNameVersion[]> {
|
||||
// Get the absolute path of the package
|
||||
|
|
|
@ -141,7 +141,6 @@ export function sanitizeCredentials(
|
|||
* to a JSON Schema (see https://json-schema.org/). With
|
||||
* the JSON Schema definition we can validate the credential's shape
|
||||
* @param properties - Credentials properties
|
||||
* @returns The credentials schema definition.
|
||||
*/
|
||||
export function toJsonSchema(properties: INodeProperties[]): IDataObject {
|
||||
const jsonSchema: IJsonSchema = {
|
||||
|
|
|
@ -53,7 +53,6 @@ export class Push {
|
|||
* @param {string} sessionId The id of the session
|
||||
* @param {express.Request} req The request
|
||||
* @param {express.Response} res The response
|
||||
* @memberof Push
|
||||
*/
|
||||
add(sessionId: string, req: express.Request, res: express.Response) {
|
||||
Logger.debug(`Add editor-UI session`, { sessionId });
|
||||
|
@ -74,8 +73,6 @@ export class Push {
|
|||
*
|
||||
* @param {string} sessionId The session id of client to send data to
|
||||
* @param {string} type Type of data to send
|
||||
* @param {*} data
|
||||
* @memberof Push
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
|
|
@ -19,7 +19,6 @@ import {
|
|||
/**
|
||||
* Special Error which allows to return also an error code and http status code
|
||||
*
|
||||
* @export
|
||||
* @class ResponseError
|
||||
* @extends {Error}
|
||||
*/
|
||||
|
@ -41,7 +40,6 @@ export class ResponseError extends Error {
|
|||
* @param {number} [errorCode] The error code which can be used by frontend to identify the actual error
|
||||
* @param {number} [httpStatusCode] The HTTP status code the response should have
|
||||
* @param {string} [hint] The error hint to provide a context (webhook related)
|
||||
* @memberof ResponseError
|
||||
*/
|
||||
constructor(message: string, errorCode?: number, httpStatusCode?: number, hint?: string) {
|
||||
super(message);
|
||||
|
@ -143,9 +141,7 @@ const isUniqueConstraintError = (error: Error) =>
|
|||
* all the responses have the same format
|
||||
*
|
||||
*
|
||||
* @export
|
||||
* @param {(req: Request, res: Response) => Promise<any>} processFunction The actual function to process the request
|
||||
* @returns
|
||||
*/
|
||||
|
||||
export function send<T, R extends Request, S extends Response>(
|
||||
|
@ -173,9 +169,7 @@ export function send<T, R extends Request, S extends Response>(
|
|||
* As it contains a lot of references which normally would be saved as duplicate data
|
||||
* with regular JSON.stringify it gets flattened which keeps the references in place.
|
||||
*
|
||||
* @export
|
||||
* @param {IExecutionDb} fullExecutionData The data to flatten
|
||||
* @returns {IExecutionFlatted}
|
||||
*/
|
||||
export function flattenExecutionData(fullExecutionData: IExecutionDb): IExecutionFlatted {
|
||||
// Flatten the data
|
||||
|
@ -210,9 +204,7 @@ export function flattenExecutionData(fullExecutionData: IExecutionDb): IExecutio
|
|||
/**
|
||||
* Unflattens the Execution data.
|
||||
*
|
||||
* @export
|
||||
* @param {IExecutionFlattedDb} fullExecutionData The data to unflatten
|
||||
* @returns {IExecutionResponse}
|
||||
*/
|
||||
export function unflattenExecutionData(fullExecutionData: IExecutionFlattedDb): IExecutionResponse {
|
||||
const returnData: IExecutionResponse = {
|
||||
|
|
|
@ -335,8 +335,6 @@ class App {
|
|||
/**
|
||||
* Returns the current epoch time
|
||||
*
|
||||
* @returns {number}
|
||||
* @memberof App
|
||||
*/
|
||||
getCurrentDate(): Date {
|
||||
return new Date();
|
||||
|
|
|
@ -40,12 +40,6 @@ export class TestWebhooks {
|
|||
* data gets additionally send to the UI. After the request got handled it
|
||||
* automatically remove the test-webhook.
|
||||
*
|
||||
* @param {WebhookHttpMethod} httpMethod
|
||||
* @param {string} path
|
||||
* @param {express.Request} request
|
||||
* @param {express.Response} response
|
||||
* @returns {Promise<object>}
|
||||
* @memberof TestWebhooks
|
||||
*/
|
||||
async callTestWebhook(
|
||||
httpMethod: WebhookHttpMethod,
|
||||
|
@ -193,10 +187,6 @@ export class TestWebhooks {
|
|||
* for it and resolves with the result of the workflow if not it simply resolves
|
||||
* with undefined
|
||||
*
|
||||
* @param {IWorkflowDb} workflowData
|
||||
* @param {Workflow} workflow
|
||||
* @returns {(Promise<IExecutionDb | undefined>)}
|
||||
* @memberof TestWebhooks
|
||||
*/
|
||||
async needsWebhookData(
|
||||
workflowData: IWorkflowDb,
|
||||
|
@ -263,9 +253,6 @@ export class TestWebhooks {
|
|||
/**
|
||||
* Removes a test webhook of the workflow with the given id
|
||||
*
|
||||
* @param {string} workflowId
|
||||
* @returns {boolean}
|
||||
* @memberof TestWebhooks
|
||||
*/
|
||||
cancelTestWebhook(workflowId: string): boolean {
|
||||
let foundWebhook = false;
|
||||
|
|
|
@ -66,10 +66,6 @@ export const WEBHOOK_METHODS = ['DELETE', 'GET', 'HEAD', 'PATCH', 'POST', 'PUT']
|
|||
/**
|
||||
* Returns all the webhooks which should be created for the give workflow
|
||||
*
|
||||
* @export
|
||||
* @param {string} workflowId
|
||||
* @param {Workflow} workflow
|
||||
* @returns {IWebhookData[]}
|
||||
*/
|
||||
export function getWorkflowWebhooks(
|
||||
workflow: Workflow,
|
||||
|
@ -137,16 +133,8 @@ export function encodeWebhookResponse(
|
|||
/**
|
||||
* Executes a webhook
|
||||
*
|
||||
* @export
|
||||
* @param {IWebhookData} webhookData
|
||||
* @param {IWorkflowDb} workflowData
|
||||
* @param {INode} workflowStartNode
|
||||
* @param {WorkflowExecuteMode} executionMode
|
||||
* @param {(string | undefined)} sessionId
|
||||
* @param {express.Request} req
|
||||
* @param {express.Response} res
|
||||
* @param {((error: Error | null, data: IResponseCallbackData) => void)} responseCallback
|
||||
* @returns {(Promise<string | undefined>)}
|
||||
*/
|
||||
export async function executeWebhook(
|
||||
workflow: Workflow,
|
||||
|
@ -694,8 +682,6 @@ export async function executeWebhook(
|
|||
/**
|
||||
* Returns the base URL of the webhooks
|
||||
*
|
||||
* @export
|
||||
* @returns
|
||||
*/
|
||||
export function getWebhookBaseUrl() {
|
||||
let urlBaseWebhook = GenericHelpers.getBaseUrl();
|
||||
|
|
|
@ -222,8 +222,6 @@ class App {
|
|||
/**
|
||||
* Returns the current epoch time
|
||||
*
|
||||
* @returns {number}
|
||||
* @memberof App
|
||||
*/
|
||||
getCurrentDate(): Date {
|
||||
return new Date();
|
||||
|
|
|
@ -235,7 +235,6 @@ function pruneExecutionData(this: WorkflowHooks): void {
|
|||
/**
|
||||
* Returns hook functions to push data to Editor-UI
|
||||
*
|
||||
* @returns {IWorkflowExecuteHooks}
|
||||
*/
|
||||
function hookFunctionsPush(): IWorkflowExecuteHooks {
|
||||
return {
|
||||
|
@ -473,7 +472,6 @@ export function hookFunctionsPreExecute(parentProcessMode?: string): IWorkflowEx
|
|||
/**
|
||||
* Returns hook functions to save workflow execution and call error workflow
|
||||
*
|
||||
* @returns {IWorkflowExecuteHooks}
|
||||
*/
|
||||
function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
|
||||
return {
|
||||
|
@ -655,7 +653,6 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
|
|||
* for running with queues. Manual executions should never run on queues as
|
||||
* they are always executed in the main process.
|
||||
*
|
||||
* @returns {IWorkflowExecuteHooks}
|
||||
*/
|
||||
function hookFunctionsSaveWorker(): IWorkflowExecuteHooks {
|
||||
return {
|
||||
|
@ -866,11 +863,7 @@ export async function getWorkflowData(
|
|||
/**
|
||||
* Executes the workflow with the given ID
|
||||
*
|
||||
* @export
|
||||
* @param {string} workflowId The id of the workflow to execute
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @param {INodeExecutionData[]} [inputData]
|
||||
* @returns {(Promise<Array<INodeExecutionData[] | null>>)}
|
||||
*/
|
||||
export async function executeWorkflow(
|
||||
workflowInfo: IExecuteWorkflowInfo,
|
||||
|
@ -1066,10 +1059,6 @@ export function sendMessageToUI(source: string, messages: any[]) {
|
|||
/**
|
||||
* Returns the base additional data without webhooks
|
||||
*
|
||||
* @export
|
||||
* @param {userId} string
|
||||
* @param {INodeParameters} currentNodeParameters
|
||||
* @returns {Promise<IWorkflowExecuteAdditionalData>}
|
||||
*/
|
||||
export async function getBase(
|
||||
userId: string,
|
||||
|
@ -1174,10 +1163,6 @@ export function getWorkflowHooksWorkerMain(
|
|||
/**
|
||||
* Returns WorkflowHooks instance for running the main workflow
|
||||
*
|
||||
* @export
|
||||
* @param {IWorkflowExecutionDataProcess} data
|
||||
* @param {string} executionId
|
||||
* @returns {WorkflowHooks}
|
||||
*/
|
||||
export function getWorkflowHooksMain(
|
||||
data: IWorkflowExecutionDataProcess,
|
||||
|
|
|
@ -49,9 +49,6 @@ const ERROR_TRIGGER_TYPE = config.getEnv('nodes.errorTriggerType');
|
|||
/**
|
||||
* Returns the data of the last executed node
|
||||
*
|
||||
* @export
|
||||
* @param {IRun} inputData
|
||||
* @returns {(ITaskData | undefined)}
|
||||
*/
|
||||
export function getDataLastExecutedNodeData(inputData: IRun): ITaskData | undefined {
|
||||
const { runData, pinData = {} } = inputData.data.resultData;
|
||||
|
@ -91,8 +88,6 @@ export function getDataLastExecutedNodeData(inputData: IRun): ITaskData | undefi
|
|||
* Returns if the given id is a valid workflow id
|
||||
*
|
||||
* @param {(string | null | undefined)} id The id to check
|
||||
* @returns {boolean}
|
||||
* @memberof App
|
||||
*/
|
||||
export function isWorkflowIdValid(id: string | null | undefined | number): boolean {
|
||||
if (typeof id === 'string') {
|
||||
|
@ -109,10 +104,8 @@ export function isWorkflowIdValid(id: string | null | undefined | number): boole
|
|||
/**
|
||||
* Executes the error workflow
|
||||
*
|
||||
* @export
|
||||
* @param {string} workflowId The id of the error workflow
|
||||
* @param {IWorkflowErrorData} workflowErrorData The error data
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
export async function executeErrorWorkflow(
|
||||
workflowId: string,
|
||||
|
@ -248,8 +241,6 @@ export async function executeErrorWorkflow(
|
|||
/**
|
||||
* Returns all the defined NodeTypes
|
||||
*
|
||||
* @export
|
||||
* @returns {ITransferNodeTypes}
|
||||
*/
|
||||
export function getAllNodeTypeData(): ITransferNodeTypes {
|
||||
const nodeTypes = NodeTypes();
|
||||
|
@ -274,8 +265,6 @@ export function getAllNodeTypeData(): ITransferNodeTypes {
|
|||
/**
|
||||
* Returns all the defined CredentialTypes
|
||||
*
|
||||
* @export
|
||||
* @returns {ICredentialsTypeData}
|
||||
*/
|
||||
export function getAllCredentalsTypeData(): ICredentialsTypeData {
|
||||
const credentialTypes = CredentialTypes();
|
||||
|
@ -301,9 +290,6 @@ export function getAllCredentalsTypeData(): ICredentialsTypeData {
|
|||
* Returns the data of the node types that are needed
|
||||
* to execute the given nodes
|
||||
*
|
||||
* @export
|
||||
* @param {INode[]} nodes
|
||||
* @returns {ITransferNodeTypes}
|
||||
*/
|
||||
export function getNodeTypeData(nodes: INode[]): ITransferNodeTypes {
|
||||
const nodeTypes = NodeTypes();
|
||||
|
@ -333,9 +319,7 @@ export function getNodeTypeData(nodes: INode[]): ITransferNodeTypes {
|
|||
* Returns the credentials data of the given type and its parent types
|
||||
* it extends
|
||||
*
|
||||
* @export
|
||||
* @param {string} type The credential type to return data off
|
||||
* @returns {ICredentialsTypeData}
|
||||
*/
|
||||
export function getCredentialsDataWithParents(type: string): ICredentialsTypeData {
|
||||
const credentialTypes = CredentialTypes();
|
||||
|
@ -370,9 +354,7 @@ export function getCredentialsDataWithParents(type: string): ICredentialsTypeDat
|
|||
* Returns all the credentialTypes which are needed to resolve
|
||||
* the given workflow credentials
|
||||
*
|
||||
* @export
|
||||
* @param {IWorkflowCredentials} credentials The credentials which have to be able to be resolved
|
||||
* @returns {ICredentialsTypeData}
|
||||
*/
|
||||
export function getCredentialsDataByNodes(nodes: INode[]): ICredentialsTypeData {
|
||||
const credentialTypeData: ICredentialsTypeData = {};
|
||||
|
@ -398,9 +380,6 @@ export function getCredentialsDataByNodes(nodes: INode[]): ICredentialsTypeData
|
|||
* Returns the names of the NodeTypes which are are needed
|
||||
* to execute the gives nodes
|
||||
*
|
||||
* @export
|
||||
* @param {INode[]} nodes
|
||||
* @returns {string[]}
|
||||
*/
|
||||
export function getNeededNodeTypes(nodes: INode[]): Array<{ type: string; version: number }> {
|
||||
// Check which node-types have to be loaded
|
||||
|
@ -417,9 +396,6 @@ export function getNeededNodeTypes(nodes: INode[]): Array<{ type: string; versio
|
|||
/**
|
||||
* Saves the static data if it changed
|
||||
*
|
||||
* @export
|
||||
* @param {Workflow} workflow
|
||||
* @returns {Promise <void>}
|
||||
*/
|
||||
export async function saveStaticData(workflow: Workflow): Promise<void> {
|
||||
if (workflow.staticData.__dataChanged === true) {
|
||||
|
@ -443,10 +419,8 @@ export async function saveStaticData(workflow: Workflow): Promise<void> {
|
|||
/**
|
||||
* Saves the given static data on workflow
|
||||
*
|
||||
* @export
|
||||
* @param {(string | number)} workflowId The id of the workflow to save data on
|
||||
* @param {IDataObject} newStaticData The static data to save
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
export async function saveStaticDataById(
|
||||
workflowId: string | number,
|
||||
|
@ -460,9 +434,7 @@ export async function saveStaticDataById(
|
|||
/**
|
||||
* Returns the static data of workflow
|
||||
*
|
||||
* @export
|
||||
* @param {(string | number)} workflowId The id of the workflow to get static data of
|
||||
* @returns
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export async function getStaticDataById(workflowId: string | number) {
|
||||
|
@ -481,7 +453,6 @@ export async function getStaticDataById(workflowId: string | number) {
|
|||
/**
|
||||
* Set node ids if not already set
|
||||
*
|
||||
* @param workflow
|
||||
*/
|
||||
export function addNodeIds(workflow: WorkflowEntity) {
|
||||
const { nodes } = workflow;
|
||||
|
|
|
@ -81,9 +81,6 @@ export class WorkflowRunner {
|
|||
/**
|
||||
* The process did send a hook message so execute the appropriate hook
|
||||
*
|
||||
* @param {WorkflowHooks} workflowHooks
|
||||
* @param {IProcessMessageDataHook} hookData
|
||||
* @memberof WorkflowRunner
|
||||
*/
|
||||
processHookMessage(workflowHooks: WorkflowHooks, hookData: IProcessMessageDataHook) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
|
@ -93,11 +90,6 @@ export class WorkflowRunner {
|
|||
/**
|
||||
* The process did error
|
||||
*
|
||||
* @param {ExecutionError} error
|
||||
* @param {Date} startedAt
|
||||
* @param {WorkflowExecuteMode} executionMode
|
||||
* @param {string} executionId
|
||||
* @memberof WorkflowRunner
|
||||
*/
|
||||
async processError(
|
||||
error: ExecutionError,
|
||||
|
@ -135,11 +127,8 @@ export class WorkflowRunner {
|
|||
/**
|
||||
* Run the workflow
|
||||
*
|
||||
* @param {IWorkflowExecutionDataProcess} data
|
||||
* @param {boolean} [loadStaticData] If set will the static data be loaded from
|
||||
* the workflow and added to input data
|
||||
* @returns {Promise<string>}
|
||||
* @memberof WorkflowRunner
|
||||
*/
|
||||
async run(
|
||||
data: IWorkflowExecutionDataProcess,
|
||||
|
@ -203,11 +192,8 @@ export class WorkflowRunner {
|
|||
/**
|
||||
* Run the workflow in current process
|
||||
*
|
||||
* @param {IWorkflowExecutionDataProcess} data
|
||||
* @param {boolean} [loadStaticData] If set will the static data be loaded from
|
||||
* the workflow and added to input data
|
||||
* @returns {Promise<string>}
|
||||
* @memberof WorkflowRunner
|
||||
*/
|
||||
async runMainProcess(
|
||||
data: IWorkflowExecutionDataProcess,
|
||||
|
@ -595,11 +581,8 @@ export class WorkflowRunner {
|
|||
/**
|
||||
* Run the workflow
|
||||
*
|
||||
* @param {IWorkflowExecutionDataProcess} data
|
||||
* @param {boolean} [loadStaticData] If set will the static data be loaded from
|
||||
* the workflow and added to input data
|
||||
* @returns {Promise<string>}
|
||||
* @memberof WorkflowRunner
|
||||
*/
|
||||
async runSubprocess(
|
||||
data: IWorkflowExecutionDataProcess,
|
||||
|
|
|
@ -392,9 +392,6 @@ export class WorkflowRunnerProcess {
|
|||
/**
|
||||
* Sends hook data to the parent process that it executes them
|
||||
*
|
||||
* @param {string} hook
|
||||
* @param {any[]} parameters
|
||||
* @memberof WorkflowRunnerProcess
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
||||
async sendHookToParentProcess(hook: string, parameters: any[]) {
|
||||
|
@ -413,7 +410,6 @@ export class WorkflowRunnerProcess {
|
|||
* the parent process where they then can be executed with access
|
||||
* to database and to PushService
|
||||
*
|
||||
* @returns
|
||||
*/
|
||||
getProcessForwardHooks(): WorkflowHooks {
|
||||
const hookFunctions: IWorkflowExecuteHooks = {
|
||||
|
@ -463,7 +459,6 @@ export class WorkflowRunnerProcess {
|
|||
*
|
||||
* @param {string} type The type of data to send
|
||||
* @param {*} data The data
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
async function sendToParentProcess(type: string, data: any): Promise<void> {
|
||||
|
|
|
@ -23,10 +23,6 @@ export class ActiveWebhooks {
|
|||
/**
|
||||
* Adds a new webhook
|
||||
*
|
||||
* @param {IWebhookData} webhookData
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {Promise<void>}
|
||||
* @memberof ActiveWebhooks
|
||||
*/
|
||||
async add(
|
||||
workflow: Workflow,
|
||||
|
@ -104,11 +100,7 @@ export class ActiveWebhooks {
|
|||
/**
|
||||
* Returns webhookData if a webhook with matches is currently registered
|
||||
*
|
||||
* @param {WebhookHttpMethod} httpMethod
|
||||
* @param {string} path
|
||||
* @param {(string | undefined)} webhookId
|
||||
* @returns {(IWebhookData | undefined)}
|
||||
* @memberof ActiveWebhooks
|
||||
*/
|
||||
get(httpMethod: WebhookHttpMethod, path: string, webhookId?: string): IWebhookData | undefined {
|
||||
const webhookKey = this.getWebhookKey(httpMethod, path, webhookId);
|
||||
|
@ -140,7 +132,6 @@ export class ActiveWebhooks {
|
|||
|
||||
/**
|
||||
* Gets all request methods associated with a single webhook
|
||||
* @param path
|
||||
*/
|
||||
getWebhookMethods(path: string): string[] {
|
||||
const methods: string[] = [];
|
||||
|
@ -158,8 +149,6 @@ export class ActiveWebhooks {
|
|||
/**
|
||||
* Returns the ids of all the workflows which have active webhooks
|
||||
*
|
||||
* @returns {string[]}
|
||||
* @memberof ActiveWebhooks
|
||||
*/
|
||||
getWorkflowIds(): string[] {
|
||||
return Object.keys(this.workflowWebhooks);
|
||||
|
@ -168,11 +157,7 @@ export class ActiveWebhooks {
|
|||
/**
|
||||
* Returns key to uniquely identify a webhook
|
||||
*
|
||||
* @param {WebhookHttpMethod} httpMethod
|
||||
* @param {string} path
|
||||
* @param {(string | undefined)} webhookId
|
||||
* @returns {string}
|
||||
* @memberof ActiveWebhooks
|
||||
*/
|
||||
getWebhookKey(httpMethod: WebhookHttpMethod, path: string, webhookId?: string): string {
|
||||
if (webhookId) {
|
||||
|
@ -189,9 +174,6 @@ export class ActiveWebhooks {
|
|||
/**
|
||||
* Removes all webhooks of a workflow
|
||||
*
|
||||
* @param {Workflow} workflow
|
||||
* @returns {boolean}
|
||||
* @memberof ActiveWebhooks
|
||||
*/
|
||||
async removeWorkflow(workflow: Workflow): Promise<boolean> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
|
|
|
@ -32,8 +32,6 @@ export class ActiveWorkflows {
|
|||
* Returns if the workflow is active
|
||||
*
|
||||
* @param {string} id The id of the workflow to check
|
||||
* @returns {boolean}
|
||||
* @memberof ActiveWorkflows
|
||||
*/
|
||||
isActive(id: string): boolean {
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
|
@ -43,8 +41,6 @@ export class ActiveWorkflows {
|
|||
/**
|
||||
* Returns the ids of the currently active workflows
|
||||
*
|
||||
* @returns {string[]}
|
||||
* @memberof ActiveWorkflows
|
||||
*/
|
||||
allActiveWorkflows(): string[] {
|
||||
return Object.keys(this.workflowData);
|
||||
|
@ -54,9 +50,6 @@ export class ActiveWorkflows {
|
|||
* Returns the Workflow data for the workflow with
|
||||
* the given id if it is currently active
|
||||
*
|
||||
* @param {string} id
|
||||
* @returns {(WorkflowData | undefined)}
|
||||
* @memberof ActiveWorkflows
|
||||
*/
|
||||
get(id: string): IWorkflowData | undefined {
|
||||
return this.workflowData[id];
|
||||
|
@ -68,8 +61,6 @@ export class ActiveWorkflows {
|
|||
* @param {string} id The id of the workflow to activate
|
||||
* @param {Workflow} workflow The workflow to activate
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData The additional data which is needed to run workflows
|
||||
* @returns {Promise<void>}
|
||||
* @memberof ActiveWorkflows
|
||||
*/
|
||||
async add(
|
||||
id: string,
|
||||
|
@ -142,12 +133,6 @@ export class ActiveWorkflows {
|
|||
/**
|
||||
* Activates polling for the given node
|
||||
*
|
||||
* @param {INode} node
|
||||
* @param {Workflow} workflow
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @param {IGetExecutePollFunctions} getPollFunctions
|
||||
* @returns {Promise<IPollResponse>}
|
||||
* @memberof ActiveWorkflows
|
||||
*/
|
||||
async activatePolling(
|
||||
node: INode,
|
||||
|
@ -225,8 +210,6 @@ export class ActiveWorkflows {
|
|||
* Makes a workflow inactive
|
||||
*
|
||||
* @param {string} id The id of the workflow to deactivate
|
||||
* @returns {Promise<void>}
|
||||
* @memberof ActiveWorkflows
|
||||
*/
|
||||
async remove(id: string): Promise<void> {
|
||||
if (!this.isActive(id)) {
|
||||
|
|
|
@ -84,8 +84,6 @@ export class LoadNodeParameterOptions {
|
|||
/**
|
||||
* Returns data of a fake workflow
|
||||
*
|
||||
* @returns
|
||||
* @memberof LoadNodeParameterOptions
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
getWorkflowData() {
|
||||
|
@ -103,9 +101,6 @@ export class LoadNodeParameterOptions {
|
|||
* Returns the available options via a predefined method
|
||||
*
|
||||
* @param {string} methodName The name of the method of which to get the data from
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @returns {Promise<INodePropertyOptions[]>}
|
||||
* @memberof LoadNodeParameterOptions
|
||||
*/
|
||||
async getOptionsViaMethodName(
|
||||
methodName: string,
|
||||
|
@ -140,9 +135,6 @@ export class LoadNodeParameterOptions {
|
|||
* Returns the available options via a load request information
|
||||
*
|
||||
* @param {ILoadOptions} loadOptions The load options which also contain the request information
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @returns {Promise<INodePropertyOptions[]>}
|
||||
* @memberof LoadNodeParameterOptions
|
||||
*/
|
||||
async getOptionsViaRequestProperty(
|
||||
loadOptions: ILoadOptions,
|
||||
|
|
|
@ -803,12 +803,6 @@ async function httpRequest(
|
|||
/**
|
||||
* Returns binary data buffer for given item index and property name.
|
||||
*
|
||||
* @export
|
||||
* @param {ITaskDataConnections} inputData
|
||||
* @param {number} itemIndex
|
||||
* @param {string} propertyName
|
||||
* @param {number} inputIndex
|
||||
* @returns {Promise<Buffer>}
|
||||
*/
|
||||
export async function getBinaryDataBuffer(
|
||||
inputData: ITaskDataConnections,
|
||||
|
@ -840,11 +834,6 @@ export async function setBinaryDataBuffer(
|
|||
* Takes a buffer and converts it into the format n8n uses. It encodes the binary data as
|
||||
* base64 and adds metadata.
|
||||
*
|
||||
* @export
|
||||
* @param {Buffer} binaryData
|
||||
* @param {string} [filePath]
|
||||
* @param {string} [mimeType]
|
||||
* @returns {Promise<IBinaryData>}
|
||||
*/
|
||||
export async function prepareBinaryData(
|
||||
binaryData: Buffer,
|
||||
|
@ -911,14 +900,8 @@ export async function prepareBinaryData(
|
|||
/**
|
||||
* Makes a request using OAuth data for authentication
|
||||
*
|
||||
* @export
|
||||
* @param {IAllExecuteFunctions} this
|
||||
* @param {string} credentialsType
|
||||
* @param {(OptionsWithUri | requestPromise.RequestPromiseOptions)} requestOptions
|
||||
* @param {INode} node
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
*
|
||||
* @returns
|
||||
*/
|
||||
export async function requestOAuth2(
|
||||
this: IAllExecuteFunctions,
|
||||
|
@ -1142,11 +1125,7 @@ export async function requestOAuth2(
|
|||
|
||||
/* Makes a request using OAuth1 data for authentication
|
||||
*
|
||||
* @export
|
||||
* @param {IAllExecuteFunctions} this
|
||||
* @param {string} credentialsType
|
||||
* @param {(OptionsWithUrl | requestPromise.RequestPromiseOptions)} requestOptions
|
||||
* @returns
|
||||
*/
|
||||
export async function requestOAuth1(
|
||||
this: IAllExecuteFunctions,
|
||||
|
@ -1321,9 +1300,7 @@ export async function httpRequestWithAuthentication(
|
|||
/**
|
||||
* Takes generic input data and brings it into the json format n8n uses.
|
||||
*
|
||||
* @export
|
||||
* @param {(IDataObject | IDataObject[])} jsonData
|
||||
* @returns {INodeExecutionData[]}
|
||||
*/
|
||||
export function returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[] {
|
||||
const returnData: INodeExecutionData[] = [];
|
||||
|
@ -1346,10 +1323,8 @@ export function returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExe
|
|||
|
||||
/**
|
||||
* Takes generic input data and brings it into the new json, pairedItem format n8n uses.
|
||||
* @export
|
||||
* @param {(IPairedItemData)} itemData
|
||||
* @param {(INodeExecutionData[])} inputData
|
||||
* @returns {(NodeExecutionWithMetadata[])}
|
||||
*/
|
||||
export function constructExecutionMetaData(
|
||||
inputData: INodeExecutionData[],
|
||||
|
@ -1366,9 +1341,7 @@ export function constructExecutionMetaData(
|
|||
* Automatically put the objects under a 'json' key and don't error,
|
||||
* if some objects contain json/binary keys and others don't, throws error 'Inconsistent item format'
|
||||
*
|
||||
* @export
|
||||
* @param {INodeExecutionData | INodeExecutionData[]} executionData
|
||||
* @returns {INodeExecutionData[]}
|
||||
*/
|
||||
export function normalizeItems(
|
||||
executionData: INodeExecutionData | INodeExecutionData[],
|
||||
|
@ -1511,9 +1484,6 @@ export async function requestWithAuthentication(
|
|||
/**
|
||||
* Returns the additional keys for Expressions and Function-Nodes
|
||||
*
|
||||
* @export
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @returns {(IWorkflowDataProxyAdditionalKeys)}
|
||||
*/
|
||||
export function getAdditionalKeys(
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
|
@ -1528,12 +1498,9 @@ export function getAdditionalKeys(
|
|||
/**
|
||||
* Returns the requested decrypted credentials if the node has access to them.
|
||||
*
|
||||
* @export
|
||||
* @param {Workflow} workflow Workflow which requests the data
|
||||
* @param {INode} node Node which request the data
|
||||
* @param {string} type The credential type to return
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @returns {(ICredentialDataDecryptedObject | undefined)}
|
||||
*/
|
||||
export async function getCredentials(
|
||||
workflow: Workflow,
|
||||
|
@ -1662,9 +1629,6 @@ export async function getCredentials(
|
|||
/**
|
||||
* Returns a copy of the node
|
||||
*
|
||||
* @export
|
||||
* @param {INode} node
|
||||
* @returns {INode}
|
||||
*/
|
||||
export function getNode(node: INode): INode {
|
||||
return JSON.parse(JSON.stringify(node));
|
||||
|
@ -1703,16 +1667,7 @@ function cleanupParameterData(inputData: NodeParameterValueType): NodeParameterV
|
|||
/**
|
||||
* Returns the requested resolved (all expressions replaced) node parameters.
|
||||
*
|
||||
* @export
|
||||
* @param {Workflow} workflow
|
||||
* @param {(IRunExecutionData | null)} runExecutionData
|
||||
* @param {number} runIndex
|
||||
* @param {INodeExecutionData[]} connectionInputData
|
||||
* @param {INode} node
|
||||
* @param {string} parameterName
|
||||
* @param {number} itemIndex
|
||||
* @param {*} [fallbackValue]
|
||||
* @returns {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | object)}
|
||||
*/
|
||||
export function getNodeParameter(
|
||||
workflow: Workflow,
|
||||
|
@ -1773,9 +1728,6 @@ export function getNodeParameter(
|
|||
/**
|
||||
* Returns if execution should be continued even if there was an error.
|
||||
*
|
||||
* @export
|
||||
* @param {INode} node
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function continueOnFail(node: INode): boolean {
|
||||
return get(node, 'continueOnFail', false);
|
||||
|
@ -1784,13 +1736,6 @@ export function continueOnFail(node: INode): boolean {
|
|||
/**
|
||||
* Returns the webhook URL of the webhook with the given name
|
||||
*
|
||||
* @export
|
||||
* @param {string} name
|
||||
* @param {Workflow} workflow
|
||||
* @param {INode} node
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @param {boolean} [isTest]
|
||||
* @returns {(string | undefined)}
|
||||
*/
|
||||
export function getNodeWebhookUrl(
|
||||
name: string,
|
||||
|
@ -1839,10 +1784,6 @@ export function getNodeWebhookUrl(
|
|||
/**
|
||||
* Returns the timezone for the workflow
|
||||
*
|
||||
* @export
|
||||
* @param {Workflow} workflow
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getTimezone(
|
||||
workflow: Workflow,
|
||||
|
@ -1858,11 +1799,6 @@ export function getTimezone(
|
|||
/**
|
||||
* Returns the full webhook description of the webhook with the given name
|
||||
*
|
||||
* @export
|
||||
* @param {string} name
|
||||
* @param {Workflow} workflow
|
||||
* @param {INode} node
|
||||
* @returns {(IWebhookDescription | undefined)}
|
||||
*/
|
||||
export function getWebhookDescription(
|
||||
name: string,
|
||||
|
@ -1889,9 +1825,6 @@ export function getWebhookDescription(
|
|||
/**
|
||||
* Returns the workflow metadata
|
||||
*
|
||||
* @export
|
||||
* @param {Workflow} workflow
|
||||
* @returns {IWorkflowMetadata}
|
||||
*/
|
||||
export function getWorkflowMetadata(workflow: Workflow): IWorkflowMetadata {
|
||||
return {
|
||||
|
@ -1904,12 +1837,6 @@ export function getWorkflowMetadata(workflow: Workflow): IWorkflowMetadata {
|
|||
/**
|
||||
* Returns the execute functions the poll nodes have access to.
|
||||
*
|
||||
* @export
|
||||
* @param {Workflow} workflow
|
||||
* @param {INode} node
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {ITriggerFunctions}
|
||||
*/
|
||||
// TODO: Check if I can get rid of: additionalData, and so then maybe also at ActiveWorkflowRunner.add
|
||||
export function getExecutePollFunctions(
|
||||
|
@ -2056,12 +1983,6 @@ export function getExecutePollFunctions(
|
|||
/**
|
||||
* Returns the execute functions the trigger nodes have access to.
|
||||
*
|
||||
* @export
|
||||
* @param {Workflow} workflow
|
||||
* @param {INode} node
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {ITriggerFunctions}
|
||||
*/
|
||||
// TODO: Check if I can get rid of: additionalData, and so then maybe also at ActiveWorkflowRunner.add
|
||||
export function getExecuteTriggerFunctions(
|
||||
|
@ -2211,16 +2132,6 @@ export function getExecuteTriggerFunctions(
|
|||
/**
|
||||
* Returns the execute functions regular nodes have access to.
|
||||
*
|
||||
* @export
|
||||
* @param {Workflow} workflow
|
||||
* @param {IRunExecutionData} runExecutionData
|
||||
* @param {number} runIndex
|
||||
* @param {INodeExecutionData[]} connectionInputData
|
||||
* @param {ITaskDataConnections} inputData
|
||||
* @param {INode} node
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {IExecuteFunctions}
|
||||
*/
|
||||
export function getExecuteFunctions(
|
||||
workflow: Workflow,
|
||||
|
@ -2480,17 +2391,6 @@ export function getExecuteFunctions(
|
|||
/**
|
||||
* Returns the execute functions regular nodes have access to when single-function is defined.
|
||||
*
|
||||
* @export
|
||||
* @param {Workflow} workflow
|
||||
* @param {IRunExecutionData} runExecutionData
|
||||
* @param {number} runIndex
|
||||
* @param {INodeExecutionData[]} connectionInputData
|
||||
* @param {ITaskDataConnections} inputData
|
||||
* @param {INode} node
|
||||
* @param {number} itemIndex
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {IExecuteSingleFunctions}
|
||||
*/
|
||||
export function getExecuteSingleFunctions(
|
||||
workflow: Workflow,
|
||||
|
@ -2721,11 +2621,6 @@ export function getCredentialTestFunctions(): ICredentialTestFunctions {
|
|||
/**
|
||||
* Returns the execute functions regular nodes have access to in load-options-function.
|
||||
*
|
||||
* @export
|
||||
* @param {Workflow} workflow
|
||||
* @param {INode} node
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @returns {ILoadOptionsFunctions}
|
||||
*/
|
||||
export function getLoadOptionsFunctions(
|
||||
workflow: Workflow,
|
||||
|
@ -2853,12 +2748,6 @@ export function getLoadOptionsFunctions(
|
|||
/**
|
||||
* Returns the execute functions regular nodes have access to in hook-function.
|
||||
*
|
||||
* @export
|
||||
* @param {Workflow} workflow
|
||||
* @param {INode} node
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {IHookFunctions}
|
||||
*/
|
||||
export function getExecuteHookFunctions(
|
||||
workflow: Workflow,
|
||||
|
@ -3005,13 +2894,6 @@ export function getExecuteHookFunctions(
|
|||
/**
|
||||
* Returns the execute functions regular nodes have access to when webhook-function is defined.
|
||||
*
|
||||
* @export
|
||||
* @param {Workflow} workflow
|
||||
* @param {IRunExecutionData} runExecutionData
|
||||
* @param {INode} node
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {IWebhookFunctions}
|
||||
*/
|
||||
export function getExecuteWebhookFunctions(
|
||||
workflow: Workflow,
|
||||
|
|
|
@ -30,7 +30,6 @@ let settingsCache: IUserSettings | undefined;
|
|||
/**
|
||||
* Creates the user settings if they do not exist yet
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export async function prepareUserSettings(): Promise<IUserSettings> {
|
||||
const settingsPath = getUserSettingsPath();
|
||||
|
@ -71,8 +70,6 @@ export async function prepareUserSettings(): Promise<IUserSettings> {
|
|||
* Returns the encryption key which is used to encrypt
|
||||
* the credentials.
|
||||
*
|
||||
* @export
|
||||
* @returns
|
||||
*/
|
||||
|
||||
export async function getEncryptionKey(): Promise<string> {
|
||||
|
@ -92,8 +89,6 @@ export async function getEncryptionKey(): Promise<string> {
|
|||
/**
|
||||
* Returns the instance ID
|
||||
*
|
||||
* @export
|
||||
* @returns
|
||||
*/
|
||||
export async function getInstanceId(): Promise<string> {
|
||||
const userSettings = await getUserSettings();
|
||||
|
@ -123,10 +118,8 @@ async function generateInstanceId(key?: string) {
|
|||
* Adds/Overwrite the given settings in the currently
|
||||
* saved user settings
|
||||
*
|
||||
* @export
|
||||
* @param {IUserSettings} addSettings The settings to add/overwrite
|
||||
* @param {string} [settingsPath] Optional settings file path
|
||||
* @returns {Promise<IUserSettings>}
|
||||
*/
|
||||
export async function addToUserSettings(
|
||||
addSettings: IUserSettings,
|
||||
|
@ -151,10 +144,8 @@ export async function addToUserSettings(
|
|||
/**
|
||||
* Writes a user settings file
|
||||
*
|
||||
* @export
|
||||
* @param {IUserSettings} userSettings The settings to write
|
||||
* @param {string} [settingsPath] Optional settings file path
|
||||
* @returns {Promise<IUserSettings>}
|
||||
*/
|
||||
export async function writeUserSettings(
|
||||
userSettings: IUserSettings,
|
||||
|
@ -190,8 +181,6 @@ export async function writeUserSettings(
|
|||
/**
|
||||
* Returns the content of the user settings
|
||||
*
|
||||
* @export
|
||||
* @returns {UserSettings}
|
||||
*/
|
||||
export async function getUserSettings(
|
||||
settingsPath?: string,
|
||||
|
@ -229,8 +218,6 @@ export async function getUserSettings(
|
|||
/**
|
||||
* Returns the path to the user settings
|
||||
*
|
||||
* @export
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getUserSettingsPath(): string {
|
||||
const n8nFolder = getUserN8nFolderPath();
|
||||
|
@ -242,8 +229,6 @@ export function getUserSettingsPath(): string {
|
|||
* Returns the path to the n8n folder in which all n8n
|
||||
* related data gets saved
|
||||
*
|
||||
* @export
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getUserN8nFolderPath(): string {
|
||||
let userFolder;
|
||||
|
@ -260,8 +245,6 @@ export function getUserN8nFolderPath(): string {
|
|||
* Returns the path to the n8n user folder with the custom
|
||||
* extensions like nodes and credentials
|
||||
*
|
||||
* @export
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getUserN8nFolderCustomExtensionPath(): string {
|
||||
return path.join(getUserN8nFolderPath(), EXTENSIONS_SUBDIRECTORY);
|
||||
|
@ -271,8 +254,6 @@ export function getUserN8nFolderCustomExtensionPath(): string {
|
|||
* Returns the path to the n8n user folder with the nodes that
|
||||
* have been downloaded
|
||||
*
|
||||
* @export
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getUserN8nFolderDowloadedNodesPath(): string {
|
||||
return path.join(getUserN8nFolderPath(), DOWNLOADED_NODES_SUBDIRECTORY);
|
||||
|
@ -283,8 +264,6 @@ export function getUserN8nFolderDowloadedNodesPath(): string {
|
|||
* none can be found it falls back to the current
|
||||
* working directory
|
||||
*
|
||||
* @export
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getUserHome(): string {
|
||||
let variableName = 'HOME';
|
||||
|
|
|
@ -77,8 +77,6 @@ export class WorkflowExecute {
|
|||
* @param {Workflow} workflow The workflow to execute
|
||||
* @param {INode[]} [startNodes] Node to start execution from
|
||||
* @param {string} [destinationNode] Node to stop execution at
|
||||
* @returns {(Promise<string>)}
|
||||
* @memberof WorkflowExecute
|
||||
*/
|
||||
// IMPORTANT: Do not add "async" to this function, it will then convert the
|
||||
// PCancelable to a regular Promise and does so not allow canceling
|
||||
|
@ -145,11 +143,8 @@ export class WorkflowExecute {
|
|||
* Executes the given workflow but only
|
||||
*
|
||||
* @param {Workflow} workflow The workflow to execute
|
||||
* @param {IRunData} runData
|
||||
* @param {string[]} startNodes Nodes to start execution from
|
||||
* @param {string} destinationNode Node to stop execution at
|
||||
* @returns {(Promise<string>)}
|
||||
* @memberof WorkflowExecute
|
||||
*/
|
||||
// IMPORTANT: Do not add "async" to this function, it will then convert the
|
||||
// PCancelable to a regular Promise and does so not allow canceling
|
||||
|
@ -289,10 +284,6 @@ export class WorkflowExecute {
|
|||
/**
|
||||
* Executes the hook with the given name
|
||||
*
|
||||
* @param {string} hookName
|
||||
* @param {any[]} parameters
|
||||
* @returns {Promise<IRun>}
|
||||
* @memberof WorkflowExecute
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
async executeHook(hookName: string, parameters: any[]): Promise<void> {
|
||||
|
@ -679,9 +670,6 @@ export class WorkflowExecute {
|
|||
/**
|
||||
* Runs the given execution data.
|
||||
*
|
||||
* @param {Workflow} workflow
|
||||
* @returns {Promise<string>}
|
||||
* @memberof WorkflowExecute
|
||||
*/
|
||||
// IMPORTANT: Do not add "async" to this function, it will then convert the
|
||||
// PCancelable to a regular Promise and does so not allow canceling
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* Math.random should be unique because of its seeding algorithm.
|
||||
* Convert it to base 36 (numbers + letters), and grab the first 9 characters after the decimal.
|
||||
*
|
||||
* @param baseId
|
||||
*/
|
||||
export function uid (baseId?: string): string {
|
||||
return `${baseId ? `${baseId}-` : ''}${Math.random().toString(36).substring(2, 11)}`;
|
||||
|
|
|
@ -18,7 +18,6 @@ class ResponseError extends Error {
|
|||
* @param {number} [errorCode] The error code which can be used by frontend to identify the actual error
|
||||
* @param {number} [httpStatusCode] The HTTP status code the response should have
|
||||
* @param {string} [stack] The stack trace
|
||||
* @memberof ResponseError
|
||||
*/
|
||||
constructor (message: string, options: {errorCode?: number, httpStatusCode?: number, stack?: string} = {}) {
|
||||
super(message);
|
||||
|
|
|
@ -260,9 +260,7 @@ export default mixins(
|
|||
* @param {string} [inputName='main'] The name of the input
|
||||
* @param {number} [outputIndex=0] The index of the output
|
||||
* @param {boolean} [useShort=false] Use short notation $json vs. $node[NodeName].json
|
||||
* @returns
|
||||
* @memberof Workflow
|
||||
*/
|
||||
*/
|
||||
getNodeRunDataOutput(nodeName: string, runData: IRunData, filterText: string, itemIndex = 0, runIndex = 0, inputName = 'main', outputIndex = 0, useShort = false): IVariableSelectorOption[] | null {
|
||||
if (!runData.hasOwnProperty(nodeName)) {
|
||||
// No data found for node
|
||||
|
@ -454,9 +452,7 @@ export default mixins(
|
|||
* @param {string} path The path to the node to pretend to key
|
||||
* @param {string} [skipParameter] Parameter to skip
|
||||
* @param {string} [filterText] Filter text for parameters
|
||||
* @returns
|
||||
* @memberof Workflow
|
||||
*/
|
||||
*/
|
||||
getNodeParameters (nodeName: string, path: string, skipParameter?: string, filterText?: string): IVariableSelectorOption[] | null {
|
||||
const node = this.workflow.getNode(nodeName);
|
||||
if (node === null) {
|
||||
|
|
|
@ -107,9 +107,6 @@ export const pushConnection = mixins(
|
|||
* is currently active. So internally resend the message
|
||||
* a few more times
|
||||
*
|
||||
* @param {Event} event
|
||||
* @param {number} retryAttempts
|
||||
* @returns
|
||||
*/
|
||||
queuePushMessage (event: Event, retryAttempts: number) {
|
||||
this.pushMessageQueue.push({ event, retriesLeft: retryAttempts });
|
||||
|
@ -156,7 +153,6 @@ export const pushConnection = mixins(
|
|||
*
|
||||
* @param {Event} event The event data with the message data
|
||||
* @param {boolean} [isRetry] If it is a retry
|
||||
* @returns {boolean} If message could be processed
|
||||
*/
|
||||
pushMessageReceived (event: Event, isRetry?: boolean): boolean {
|
||||
const retryAttempts = 5;
|
||||
|
|
|
@ -32,9 +32,7 @@ import { makeRestApiRequest } from '@/api/helpers';
|
|||
/**
|
||||
* Unflattens the Execution data.
|
||||
*
|
||||
* @export
|
||||
* @param {IExecutionFlattedResponse} fullExecutionData The data to unflatten
|
||||
* @returns {IExecutionResponse}
|
||||
*/
|
||||
function unflattenExecutionData (fullExecutionData: IExecutionFlattedResponse): IExecutionResponse {
|
||||
// Unflatten the data
|
||||
|
|
|
@ -49,9 +49,6 @@ export const PERMISSIONS: IUserPermissions = {
|
|||
/**
|
||||
* To be authorized, user must pass all deny rules and pass any of the allow rules.
|
||||
*
|
||||
* @param permissions
|
||||
* @param currentUser
|
||||
* @returns
|
||||
*/
|
||||
export const isAuthorized = (permissions: IPermissions, currentUser: IUser | null): boolean => {
|
||||
const loginStatus = currentUser ? LOGIN_STATUS.LoggedIn : LOGIN_STATUS.LoggedOut;
|
||||
|
|
|
@ -44,6 +44,8 @@ export async function createCustomTsconfig() {
|
|||
|
||||
/**
|
||||
* Builds and copies credentials and nodes
|
||||
*
|
||||
* @param {IBuildOptions} [options] Options to overwrite default behaviour
|
||||
*/
|
||||
export async function buildFiles({
|
||||
destinationFolder = UserSettings.getUserN8nFolderCustomExtensionPath(),
|
||||
|
|
|
@ -10,11 +10,9 @@ const fsCopyFile = promisify(fs.copyFile);
|
|||
/**
|
||||
* Creates a new credentials or node
|
||||
*
|
||||
* @export
|
||||
* @param {string} sourceFilePath The path to the source template file
|
||||
* @param {string} destinationFilePath The path the write the new file to
|
||||
* @param {object} replaceValues The values to replace in the template file
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
export async function createTemplate(
|
||||
sourceFilePath: string,
|
||||
|
|
|
@ -19,11 +19,6 @@ export interface IProduct {
|
|||
/**
|
||||
* Make an API request to ActiveCampaign
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function activeCampaignApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
@ -77,13 +72,7 @@ export async function activeCampaignApiRequest(
|
|||
* Make an API request to paginated ActiveCampaign endpoint
|
||||
* and return all results
|
||||
*
|
||||
* @export
|
||||
* @param {(IHookFunctions | IExecuteFunctions)} this
|
||||
* @param {string} method
|
||||
* @param {string} endpoint
|
||||
* @param {IDataObject} body
|
||||
* @param {IDataObject} [query]
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function activeCampaignApiRequestAllItems(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -25,11 +25,6 @@ export interface IRecord {
|
|||
/**
|
||||
* Make an API request to Airtable
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function apiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
|
||||
|
@ -79,13 +74,7 @@ export async function apiRequest(
|
|||
* Make an API request to paginated Airtable endpoint
|
||||
* and return all results
|
||||
*
|
||||
* @export
|
||||
* @param {(IExecuteFunctions | IExecuteFunctions)} this
|
||||
* @param {string} method
|
||||
* @param {string} endpoint
|
||||
* @param {IDataObject} body
|
||||
* @param {IDataObject} [query]
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function apiRequestAllItems(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
|
||||
|
|
|
@ -12,11 +12,6 @@ import { get } from 'lodash';
|
|||
/**
|
||||
* Make an API request to Asana
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function asanaApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -74,9 +74,6 @@ export async function copperApiRequest(
|
|||
/**
|
||||
* Creates a secret from the credentials
|
||||
*
|
||||
* @export
|
||||
* @param {ICredentialDataDecryptedObject} credentials
|
||||
* @returns
|
||||
*/
|
||||
export function getAutomaticSecret(credentials: ICredentialDataDecryptedObject) {
|
||||
const data = `${credentials.email},${credentials.apiKey}`;
|
||||
|
|
|
@ -7,11 +7,6 @@ import { IDataObject, NodeApiError } from 'n8n-workflow';
|
|||
/**
|
||||
* Make an API request to Dropbox
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function dropboxApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
|
|
@ -18,8 +18,6 @@ export interface IExecReturnData {
|
|||
/**
|
||||
* Promisifiy exec manually to also get the exit code
|
||||
*
|
||||
* @param {string} command
|
||||
* @returns {Promise<IExecReturnData>}
|
||||
*/
|
||||
function execPromise(command: string): Promise<IExecReturnData> {
|
||||
const returnData: IExecReturnData = {
|
||||
|
|
|
@ -27,9 +27,6 @@ interface ScriptObject {
|
|||
/**
|
||||
* Make an API request to ActiveCampaign
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function layoutsApiRequest(
|
||||
this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions,
|
||||
|
@ -79,7 +76,6 @@ function parseLayouts(layouts: LayoutObject[]): INodePropertyOptions[] {
|
|||
/**
|
||||
* Make an API request to ActiveCampaign
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function getFields(
|
||||
this: ILoadOptionsFunctions,
|
||||
|
@ -114,7 +110,6 @@ export async function getFields(
|
|||
/**
|
||||
* Make an API request to ActiveCampaign
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function getPortals(
|
||||
this: ILoadOptionsFunctions,
|
||||
|
@ -149,7 +144,6 @@ export async function getPortals(
|
|||
/**
|
||||
* Make an API request to ActiveCampaign
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function getScripts(
|
||||
this: ILoadOptionsFunctions,
|
||||
|
|
|
@ -11,7 +11,6 @@ interface IFormIoCredentials {
|
|||
|
||||
/**
|
||||
* Method has the logic to get jwt token from Form.io
|
||||
* @param this
|
||||
*/
|
||||
async function getToken(
|
||||
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions,
|
||||
|
@ -46,8 +45,6 @@ async function getToken(
|
|||
|
||||
/**
|
||||
* Method will call register or list webhooks based on the passed method in the parameter
|
||||
* @param this
|
||||
* @param method
|
||||
*/
|
||||
export async function formIoApiRequest(
|
||||
this: IHookFunctions | ILoadOptionsFunctions | IWebhookFunctions,
|
||||
|
|
|
@ -46,11 +46,6 @@ export enum FormstackFieldFormat {
|
|||
/**
|
||||
* Make an API request to Formstack
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function apiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
|
||||
|
@ -93,13 +88,7 @@ export async function apiRequest(
|
|||
* Make an API request to paginated Formstack endpoint
|
||||
* and return all results
|
||||
*
|
||||
* @export
|
||||
* @param {(IHookFunctions | IExecuteFunctions)} this
|
||||
* @param {string} method
|
||||
* @param {string} endpoint
|
||||
* @param {IDataObject} body
|
||||
* @param {IDataObject} [query]
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function apiRequestAllItems(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
|
||||
|
@ -139,9 +128,6 @@ export async function apiRequestAllItems(
|
|||
/**
|
||||
* Returns all the available forms
|
||||
*
|
||||
* @export
|
||||
* @param {ILoadOptionsFunctions} this
|
||||
* @returns {Promise<INodePropertyOptions[]>}
|
||||
*/
|
||||
export async function getForms(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const endpoint = 'form.json';
|
||||
|
@ -165,10 +151,6 @@ export async function getForms(this: ILoadOptionsFunctions): Promise<INodeProper
|
|||
/**
|
||||
* Returns all the fields of a form
|
||||
*
|
||||
* @export
|
||||
* @param {ILoadOptionsFunctions} this
|
||||
* @param {string} formID
|
||||
* @returns {Promise<IFormstackFieldDefinitionType[]>}
|
||||
*/
|
||||
export async function getFields(
|
||||
this: IWebhookFunctions,
|
||||
|
@ -194,10 +176,6 @@ export async function getFields(
|
|||
/**
|
||||
* Returns all the fields of a form
|
||||
*
|
||||
* @export
|
||||
* @param {ILoadOptionsFunctions} this
|
||||
* @param {string} uniqueId
|
||||
* @returns {Promise<IFormstackFieldDefinitionType[]>}
|
||||
*/
|
||||
export async function getSubmission(
|
||||
this: ILoadOptionsFunctions | IWebhookFunctions,
|
||||
|
|
|
@ -7,11 +7,6 @@ import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
|
|||
/**
|
||||
* Make an API request to Github
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function githubApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
@ -68,13 +63,7 @@ export async function githubApiRequest(
|
|||
/**
|
||||
* Returns the SHA of the given file
|
||||
*
|
||||
* @export
|
||||
* @param {(IHookFunctions | IExecuteFunctions)} this
|
||||
* @param {string} owner
|
||||
* @param {string} repository
|
||||
* @param {string} filePath
|
||||
* @param {string} [branch]
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function getFileSha(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
|
|
@ -6,11 +6,6 @@ import { OptionsWithUri } from 'request';
|
|||
/**
|
||||
* Make an API request to Gitlab
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function gitlabApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
|
|
@ -64,9 +64,6 @@ export class GoogleSheet {
|
|||
/**
|
||||
* Encodes the range that also none latin character work
|
||||
*
|
||||
* @param {string} range
|
||||
* @returns {string}
|
||||
* @memberof GoogleSheet
|
||||
*/
|
||||
encodeRange(range: string): string {
|
||||
if (range.includes('!')) {
|
||||
|
@ -79,9 +76,6 @@ export class GoogleSheet {
|
|||
/**
|
||||
* Clears values from a sheet
|
||||
*
|
||||
* @param {string} range
|
||||
* @returns {Promise<object>}
|
||||
* @memberof GoogleSheet
|
||||
*/
|
||||
async clearData(range: string): Promise<object> {
|
||||
const body = {
|
||||
|
@ -306,8 +300,6 @@ export class GoogleSheet {
|
|||
* @param {string} range The range to look for data
|
||||
* @param {number} keyRowIndex Index of the row which contains the keys
|
||||
* @param {number} dataStartRowIndex Index of the first row which contains data
|
||||
* @returns {Promise<string[][]>}
|
||||
* @memberof GoogleSheet
|
||||
*/
|
||||
async updateSheetData(
|
||||
inputData: IDataObject[],
|
||||
|
@ -478,8 +470,6 @@ export class GoogleSheet {
|
|||
* @param {number} dataStartRowIndex Index of the first row which contains data
|
||||
* @param {ILookupValues[]} lookupValues The lookup values which decide what data to return
|
||||
* @param {boolean} [returnAllMatches] Returns all the found matches instead of only the first one
|
||||
* @returns {Promise<IDataObject[]>}
|
||||
* @memberof GoogleSheet
|
||||
*/
|
||||
async lookupValues(
|
||||
inputData: string[][],
|
||||
|
|
|
@ -7,11 +7,6 @@ import { OptionsWithUri } from 'request';
|
|||
/**
|
||||
* Make an API request to HackerNews
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} endpoint
|
||||
* @param {IDataObject} qs
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function hackerNewsApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
@ -38,12 +33,7 @@ export async function hackerNewsApiRequest(
|
|||
* Make an API request to HackerNews
|
||||
* and return all results
|
||||
*
|
||||
* @export
|
||||
* @param {(IHookFunctions | IExecuteFunctions)} this
|
||||
* @param {string} method
|
||||
* @param {string} endpoint
|
||||
* @param {IDataObject} qs
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function hackerNewsApiRequestAllItems(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -7,11 +7,6 @@ import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
|
|||
/**
|
||||
* Make an API request to Message Bird
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function messageBirdApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
|
|
@ -7,7 +7,6 @@ import { ITables } from './TableInterface';
|
|||
*
|
||||
* @param {INodeExecutionData} item The item to copy
|
||||
* @param {string[]} properties The properties it should include
|
||||
* @returns
|
||||
*/
|
||||
export function copyInputItem(item: INodeExecutionData, properties: string[]): IDataObject {
|
||||
// Prepare the data to insert and copy it to be returned
|
||||
|
@ -27,7 +26,6 @@ export function copyInputItem(item: INodeExecutionData, properties: string[]): I
|
|||
*
|
||||
* @param {INodeExecutionData[]} items The items to extract the tables/columns for
|
||||
* @param {function} getNodeParam getter for the Node's Parameters
|
||||
* @returns {ITables} {tableName: {colNames: [items]}};
|
||||
*/
|
||||
export function createTableStruct(
|
||||
getNodeParam: Function,
|
||||
|
@ -60,7 +58,6 @@ export function createTableStruct(
|
|||
*
|
||||
* @param {ITables} tables The ITables to be processed.
|
||||
* @param {function} buildQueryQueue function that builds the queue of promises
|
||||
* @returns {Promise}
|
||||
*/
|
||||
// tslint:disable-next-line: no-any
|
||||
export function executeQueryQueue(tables: ITables, buildQueryQueue: Function): Promise<any[]> {
|
||||
|
@ -84,7 +81,6 @@ export function executeQueryQueue(tables: ITables, buildQueryQueue: Function): P
|
|||
* Extracts the values from the item for INSERT
|
||||
*
|
||||
* @param {IDataObject} item The item to extract
|
||||
* @returns {string} (Val1, Val2, ...)
|
||||
*/
|
||||
export function extractValues(item: IDataObject): string {
|
||||
return `(${Object.values(item as any) // tslint:disable-line:no-any
|
||||
|
@ -108,7 +104,6 @@ export function extractValues(item: IDataObject): string {
|
|||
*
|
||||
* @param {IDataObject} item The item to extract from
|
||||
* @param {string[]} columns The columns to update
|
||||
* @returns {string} col1 = val1, col2 = val2
|
||||
*/
|
||||
export function extractUpdateSet(item: IDataObject, columns: string[]): string {
|
||||
return columns
|
||||
|
@ -124,7 +119,6 @@ export function extractUpdateSet(item: IDataObject, columns: string[]): string {
|
|||
*
|
||||
* @param {IDataObject} item The item to extract from
|
||||
* @param {string} key The column name to build the condition with
|
||||
* @returns {string} id = '123'
|
||||
*/
|
||||
export function extractUpdateCondition(item: IDataObject, key: string): string {
|
||||
return `${key} = ${typeof item[key] === 'string' ? `'${item[key]}'` : item[key]}`;
|
||||
|
@ -135,7 +129,6 @@ export function extractUpdateCondition(item: IDataObject, key: string): string {
|
|||
*
|
||||
* @param {IDataObject[]} items The items to extract the values from
|
||||
* @param {string} key The column name to extract the value from for the delete condition
|
||||
* @returns {string} (Val1, Val2, ...)
|
||||
*/
|
||||
export function extractDeleteValues(items: IDataObject[], key: string): string {
|
||||
return `(${items
|
||||
|
|
|
@ -5,11 +5,6 @@ import { IDataObject, JsonObject, NodeApiError, NodeOperationError } from 'n8n-w
|
|||
/**
|
||||
* Make an API request to Twilio
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function moceanApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
|
|
@ -32,7 +32,6 @@ export function buildParameterizedConnString(credentials: IMongoParametricCreden
|
|||
* Build mongoDb connection string and resolve database name.
|
||||
* If a connection string override value is provided, that will be used in place of individual args
|
||||
*
|
||||
* @param {IExecuteFunctions} self
|
||||
* @param {ICredentialDataDecryptedObject} credentials raw/input MongoDB credentials to use
|
||||
*/
|
||||
export function buildMongoConnectionParams(
|
||||
|
@ -66,7 +65,6 @@ export function buildMongoConnectionParams(
|
|||
/**
|
||||
* Verify credentials. If ok, build mongoDb connection string and resolve database name.
|
||||
*
|
||||
* @param {IExecuteFunctions} self
|
||||
* @param {ICredentialDataDecryptedObject} credentials raw/input MongoDB credentials to use
|
||||
*/
|
||||
export function validateAndResolveMongoCredentials(
|
||||
|
|
|
@ -5,11 +5,6 @@ import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
|
|||
/**
|
||||
* Make an API request to MSG91
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function msg91ApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
|
|
@ -6,7 +6,6 @@ import { IDataObject, INodeExecutionData } from 'n8n-workflow';
|
|||
*
|
||||
* @param {INodeExecutionData[]} items The items to copy
|
||||
* @param {string[]} properties The properties it should include
|
||||
* @returns
|
||||
*/
|
||||
export function copyInputItems(items: INodeExecutionData[], properties: string[]): IDataObject[] {
|
||||
// Prepare the data to insert and copy it to be returned
|
||||
|
|
|
@ -7,11 +7,6 @@ import { OptionsWithUri } from 'request';
|
|||
/**
|
||||
* Make an API request to NextCloud
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function nextCloudApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
|
|
@ -21,11 +21,6 @@ interface IAttachment {
|
|||
/**
|
||||
* Make an API request to NocoDB
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function apiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
|
||||
|
@ -76,13 +71,7 @@ export async function apiRequest(
|
|||
* Make an API request to paginated NocoDB endpoint
|
||||
* and return all results
|
||||
*
|
||||
* @export
|
||||
* @param {(IHookFunctions | IExecuteFunctions)} this
|
||||
* @param {string} method
|
||||
* @param {string} endpoint
|
||||
* @param {IDataObject} body
|
||||
* @param {IDataObject} [query]
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function apiRequestAllItems(
|
||||
this: IHookFunctions | IExecuteFunctions | IPollFunctions,
|
||||
|
|
|
@ -86,7 +86,6 @@ export class Onfleet {
|
|||
* @param addressCity Destination city
|
||||
* @param addressCountry Destination country
|
||||
* @param additionalFields Destination additional fields
|
||||
* @returns
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -94,7 +93,6 @@ export class Onfleet {
|
|||
* @param item Current execution data
|
||||
* @param operation Current destination operation
|
||||
* @param shared Whether the collection is in other resource or not
|
||||
* @returns {OnfleetDestination} Destination information
|
||||
*/
|
||||
static getDestinationFields(
|
||||
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
@ -181,7 +179,6 @@ export class Onfleet {
|
|||
* Gets the properties of an administrator according to the operation chose
|
||||
* @param item Current execution data
|
||||
* @param operation Current administrator operation
|
||||
* @returns {OnfleetAdmins} Administrator information
|
||||
*/
|
||||
static getAdminFields(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -221,7 +218,6 @@ export class Onfleet {
|
|||
* Gets the properties of a hub according to the operation chose
|
||||
* @param item Current execution data
|
||||
* @param operation Current hub operation
|
||||
* @returns {OnfleetHubs|null} Hub information
|
||||
*/
|
||||
static getHubFields(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -273,7 +269,6 @@ export class Onfleet {
|
|||
* Gets the properties of a worker according to the operation chose
|
||||
* @param item Current execution data
|
||||
* @param operation Current worker operation
|
||||
* @returns {OnfleetWorker|OnfleetWorkerFilter|OnfleetWorkerSchedule|null} Worker information
|
||||
*/
|
||||
static getWorkerFields(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -379,7 +374,6 @@ export class Onfleet {
|
|||
* Gets the properties of a webhooks according to the operation chose
|
||||
* @param item Current execution data
|
||||
* @param operation Current webhooks operation
|
||||
* @returns {OnfleetWebhook} Webhooks information
|
||||
*/
|
||||
static getWebhookFields(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -409,7 +403,6 @@ export class Onfleet {
|
|||
* @param name Recipient name
|
||||
* @param phone Recipient phone
|
||||
* @param additionalFields Recipient additional fields
|
||||
* @returns
|
||||
*/
|
||||
static formatRecipient(
|
||||
name: string,
|
||||
|
@ -439,7 +432,6 @@ export class Onfleet {
|
|||
* @param item Current execution data
|
||||
* @param operation Current recipient operation
|
||||
* @param shared Whether the collection is in other resource or not
|
||||
* @returns {OnfleetRecipient} Recipient information
|
||||
*/
|
||||
static getRecipientFields(
|
||||
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
@ -509,7 +501,6 @@ export class Onfleet {
|
|||
* Gets the properties of a task according to the operation chose
|
||||
* @param item Current execution data
|
||||
* @param operation Current task operation
|
||||
* @returns {OnfleetListTaskFilters | OnfleetTask } Task information
|
||||
*/
|
||||
static getTaskFields(
|
||||
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
@ -647,7 +638,6 @@ export class Onfleet {
|
|||
* Gets the properties of a team according to the operation chose
|
||||
* @param item Current execution data
|
||||
* @param operation Current team operation
|
||||
* @returns {OnfleetTeams} Team information
|
||||
*/
|
||||
static getTeamFields(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -792,7 +782,6 @@ export class Onfleet {
|
|||
* @param resource Resource to be executed (Task)
|
||||
* @param operation Operation to be executed
|
||||
* @param items Number of items to process by the node
|
||||
* @returns Task information
|
||||
*/
|
||||
static async executeTaskOperations(
|
||||
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
@ -913,7 +902,6 @@ export class Onfleet {
|
|||
* @param resource Resource to be executed (Destination)
|
||||
* @param operation Operation to be executed
|
||||
* @param items Number of items to process by the node
|
||||
* @returns Destination information
|
||||
*/
|
||||
static async executeDestinationOperations(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -959,7 +947,6 @@ export class Onfleet {
|
|||
* @param resource Resource to be executed (Organization)
|
||||
* @param operation Operation to be executed
|
||||
* @param items Number of items to process by the node
|
||||
* @returns Organization information
|
||||
*/
|
||||
static async executeOrganizationOperations(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -1002,7 +989,6 @@ export class Onfleet {
|
|||
* @param resource Resource to be executed (Recipient)
|
||||
* @param operation Operation to be executed
|
||||
* @param items Number of items to process by the node
|
||||
* @returns Recipient information
|
||||
*/
|
||||
static async executeRecipientOperations(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -1060,7 +1046,6 @@ export class Onfleet {
|
|||
* @param resource Resource to be executed (Administrator)
|
||||
* @param operation Operation to be executed
|
||||
* @param items Number of items to process by the node
|
||||
* @returns Administrator information
|
||||
*/
|
||||
static async executeAdministratorOperations(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -1123,7 +1108,6 @@ export class Onfleet {
|
|||
* @param resource Resource to be executed (Hub)
|
||||
* @param operation Operation to be executed
|
||||
* @param items Number of items to process by the node
|
||||
* @returns Hub information
|
||||
*/
|
||||
static async executeHubOperations(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -1180,7 +1164,6 @@ export class Onfleet {
|
|||
* @param resource Resource to be executed (Worker)
|
||||
* @param operation Operation to be executed
|
||||
* @param items Number of items to process by the node
|
||||
* @returns Workers information
|
||||
*/
|
||||
static async executeWorkerOperations(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -1299,7 +1282,6 @@ export class Onfleet {
|
|||
* @param resource Resource to be executed (Webhook)
|
||||
* @param operation Operation to be executed
|
||||
* @param items Number of items to process by the node
|
||||
* @returns Webhook information
|
||||
*/
|
||||
static async executeWebhookOperations(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -1348,7 +1330,6 @@ export class Onfleet {
|
|||
* @param resource Resource to be executed (Container)
|
||||
* @param operation Operation to be executed
|
||||
* @param items Number of items to process by the node
|
||||
* @returns Container information
|
||||
*/
|
||||
static async executeContainerOperations(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -1407,7 +1388,6 @@ export class Onfleet {
|
|||
* @param resource Resource to be executed (Team)
|
||||
* @param operation Operation to be executed
|
||||
* @param items Number of items to process by the node
|
||||
* @returns Team information
|
||||
*/
|
||||
static async executeTeamOperations(
|
||||
this: IExecuteFunctions,
|
||||
|
|
|
@ -133,7 +133,6 @@ export class OnfleetTrigger implements INodeType {
|
|||
|
||||
/**
|
||||
* Triggered function when an Onfleet webhook is executed
|
||||
* @returns {Promise<IWebhookResponseData>} Response data
|
||||
*/
|
||||
async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> {
|
||||
const req = this.getRequestObject();
|
||||
|
|
|
@ -21,11 +21,6 @@ export interface ICustomProperties {
|
|||
/**
|
||||
* Make an API request to Pipedrive
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function pipedriveApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
@ -98,13 +93,7 @@ export async function pipedriveApiRequest(
|
|||
* Make an API request to paginated Pipedrive endpoint
|
||||
* and return all results
|
||||
*
|
||||
* @export
|
||||
* @param {(IHookFunctions | IExecuteFunctions)} this
|
||||
* @param {string} method
|
||||
* @param {string} endpoint
|
||||
* @param {IDataObject} body
|
||||
* @param {IDataObject} [query]
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function pipedriveApiRequestAllItems(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
@ -148,10 +137,7 @@ export async function pipedriveApiRequestAllItems(
|
|||
/**
|
||||
* Gets the custom properties from Pipedrive
|
||||
*
|
||||
* @export
|
||||
* @param {(IHookFunctions | IExecuteFunctions)} this
|
||||
* @param {string} resource
|
||||
* @returns {Promise<ICustomProperties>}
|
||||
*/
|
||||
export async function pipedriveGetCustomProperties(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
@ -197,9 +183,6 @@ export async function pipedriveGetCustomProperties(
|
|||
* Converts names and values of custom properties from their actual values to the
|
||||
* Pipedrive internal ones
|
||||
*
|
||||
* @export
|
||||
* @param {ICustomProperties} customProperties
|
||||
* @param {IDataObject} item
|
||||
*/
|
||||
export function pipedriveEncodeCustomProperties(
|
||||
customProperties: ICustomProperties,
|
||||
|
@ -243,9 +226,6 @@ export function pipedriveEncodeCustomProperties(
|
|||
/**
|
||||
* Converts names and values of custom properties to their actual values
|
||||
*
|
||||
* @export
|
||||
* @param {ICustomProperties} customProperties
|
||||
* @param {IDataObject} item
|
||||
*/
|
||||
export function pipedriveResolveCustomProperties(
|
||||
customProperties: ICustomProperties,
|
||||
|
|
|
@ -7,11 +7,6 @@ import { OptionsWithUri } from 'request';
|
|||
/**
|
||||
* Make an API request to Plivo.
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function plivoApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
|
|
@ -14,10 +14,6 @@ const BIN_ID_REGEX = /\b\d{13}-\d{13}\b/g;
|
|||
* This function makes sure binId is in the expected format by parsing it
|
||||
* from current node parameter value.
|
||||
*
|
||||
* @export
|
||||
* @param {IExecuteSingleFunctions} this
|
||||
* @param {IHttpRequestOptions} requestOptions
|
||||
* @returns {Promise<IHttpRequestOptions>} requestOptions
|
||||
*/
|
||||
export async function buildBinAPIURL(
|
||||
this: IExecuteSingleFunctions,
|
||||
|
@ -35,10 +31,6 @@ export async function buildBinAPIURL(
|
|||
* This function makes sure binId is in the expected format by parsing it
|
||||
* from current node parameter value.
|
||||
*
|
||||
* @export
|
||||
* @param {IExecuteSingleFunctions} this
|
||||
* @param {IHttpRequestOptions} requestOptions
|
||||
* @returns {Promise<IHttpRequestOptions>} requestOptions
|
||||
*/
|
||||
export async function buildBinTestURL(
|
||||
this: IExecuteSingleFunctions,
|
||||
|
@ -56,10 +48,6 @@ export async function buildBinTestURL(
|
|||
* This function makes sure binId is in the expected format by parsing it
|
||||
* from current node parameter value.
|
||||
*
|
||||
* @export
|
||||
* @param {IExecuteSingleFunctions} this
|
||||
* @param {IHttpRequestOptions} requestOptions
|
||||
* @returns {Promise<IHttpRequestOptions>} requestOptions
|
||||
*/
|
||||
export async function buildRequestURL(
|
||||
this: IExecuteSingleFunctions,
|
||||
|
@ -78,9 +66,6 @@ export async function buildRequestURL(
|
|||
* PostBin URL or from the string in the following format:
|
||||
* `Bin '<binId>'.`
|
||||
*
|
||||
* @param {IExecuteSingleFunctions} this
|
||||
* @param {IHttpRequestOptions} requestOptions
|
||||
* @returns {Promise<IHttpRequestOptions>} requestOptions
|
||||
*/
|
||||
function parseBinId(context: IExecuteSingleFunctions) {
|
||||
const binId = context.getNodeParameter('binId') as string;
|
||||
|
@ -108,10 +93,6 @@ function parseBinId(context: IExecuteSingleFunctions) {
|
|||
/**
|
||||
* Converts the bin response data and adds additional properties
|
||||
*
|
||||
* @param {IExecuteSingleFunctions} this
|
||||
* @param {INodeExecutionData} items[]
|
||||
* @param {IN8nHttpFullResponse} response
|
||||
* @returns {Promise<INodeExecutionData[]>}
|
||||
*/
|
||||
export async function transformBinReponse(
|
||||
this: IExecuteSingleFunctions,
|
||||
|
|
|
@ -9,7 +9,6 @@ import pg from 'pg-promise/typescript/pg-subset';
|
|||
*
|
||||
* @param {INodeExecutionData[]} items The items to copy
|
||||
* @param {string[]} properties The properties it should include
|
||||
* @returns
|
||||
*/
|
||||
export function getItemsCopy(
|
||||
items: INodeExecutionData[],
|
||||
|
@ -38,7 +37,6 @@ export function getItemsCopy(
|
|||
*
|
||||
* @param {INodeExecutionData} item The item to copy
|
||||
* @param {string[]} properties The properties it should include
|
||||
* @returns
|
||||
*/
|
||||
export function getItemCopy(
|
||||
item: INodeExecutionData,
|
||||
|
@ -62,7 +60,6 @@ export function getItemCopy(
|
|||
* Returns a returning clause from a comma separated string
|
||||
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
|
||||
* @param string returning The comma separated string
|
||||
* @returns string
|
||||
*/
|
||||
export function generateReturning(pgp: pgPromise.IMain<{}, pg.IClient>, returning: string): string {
|
||||
return (
|
||||
|
@ -81,7 +78,6 @@ export function generateReturning(pgp: pgPromise.IMain<{}, pg.IClient>, returnin
|
|||
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
|
||||
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
|
||||
* @param {input[]} input The Node's input data
|
||||
* @returns Promise<Array<IDataObject>>
|
||||
*/
|
||||
export async function pgQuery(
|
||||
getNodeParam: Function,
|
||||
|
@ -251,7 +247,6 @@ export async function pgQueryV2(
|
|||
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
|
||||
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
|
||||
* @param {INodeExecutionData[]} items The items to be inserted
|
||||
* @returns Promise<Array<IDataObject>>
|
||||
*/
|
||||
export async function pgInsert(
|
||||
getNodeParam: Function,
|
||||
|
@ -340,7 +335,6 @@ export async function pgInsert(
|
|||
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
|
||||
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
|
||||
* @param {INodeExecutionData[]} items The items to be inserted
|
||||
* @returns Promise<Array<IDataObject>>
|
||||
*/
|
||||
export async function pgInsertV2(
|
||||
this: IExecuteFunctions,
|
||||
|
@ -375,7 +369,8 @@ export async function pgInsertV2(
|
|||
const query =
|
||||
pgp.helpers.insert(getItemsCopy(items, columnNames, guardedColumns), cs) + returning;
|
||||
const queryResult = await db.any(query);
|
||||
return queryResult.map((result, i) => {
|
||||
return queryResult
|
||||
.map((result, i) => {
|
||||
return this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(result), {
|
||||
itemData: { item: i },
|
||||
});
|
||||
|
@ -446,7 +441,6 @@ export async function pgInsertV2(
|
|||
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
|
||||
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
|
||||
* @param {INodeExecutionData[]} items The items to be updated
|
||||
* @returns Promise<Array<IDataObject>>
|
||||
*/
|
||||
export async function pgUpdate(
|
||||
getNodeParam: Function,
|
||||
|
@ -569,7 +563,6 @@ export async function pgUpdate(
|
|||
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
|
||||
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
|
||||
* @param {INodeExecutionData[]} items The items to be updated
|
||||
* @returns Promise<Array<IDataObject>>
|
||||
*/
|
||||
export async function pgUpdateV2(
|
||||
this: IExecuteFunctions,
|
||||
|
|
|
@ -97,9 +97,6 @@ export async function salesforceApiRequestAllItems(
|
|||
/**
|
||||
* Sorts the given options alphabetically
|
||||
*
|
||||
* @export
|
||||
* @param {INodePropertyOptions[]} options
|
||||
* @returns {INodePropertyOptions[]}
|
||||
*/
|
||||
export function sortOptions(options: INodePropertyOptions[]): void {
|
||||
options.sort((a, b) => {
|
||||
|
|
|
@ -89,9 +89,6 @@ export function validateJSON(json: string | undefined): any {
|
|||
/**
|
||||
* Converts data from the Salesmate format into a simple object
|
||||
*
|
||||
* @export
|
||||
* @param {IDataObject[]} data
|
||||
* @returns {IDataObject}
|
||||
*/
|
||||
export function simplifySalesmateData(data: IDataObject[]): IDataObject {
|
||||
const returnData: IDataObject = {};
|
||||
|
|
|
@ -8,13 +8,6 @@ import { OptionsWithUri } from 'request';
|
|||
* Make an API request to SIGNL4
|
||||
*
|
||||
* @param {IHookFunctions | IExecuteFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} contentType
|
||||
* @param {string} body
|
||||
* @param {object} query
|
||||
* @param {string} teamSecret
|
||||
* @param {object} options
|
||||
* @returns {Promise<any>}
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -8,10 +8,7 @@ import { OptionsWithUri } from 'request';
|
|||
* Make an API request to Sms77
|
||||
*
|
||||
* @param {IHookFunctions | IExecuteFunctions} this
|
||||
* @param {string} method
|
||||
* @param {Endpoint} endpoint
|
||||
* @param {object | undefined} data
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function sms77ApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
|
|
@ -9,11 +9,6 @@ import { get } from 'lodash';
|
|||
/**
|
||||
* Make an API request to Spotify
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function spotifyApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
|
|
@ -22,7 +22,6 @@ import {
|
|||
* Flattens an object with deep data
|
||||
*
|
||||
* @param {IDataObject} data The object to flatten
|
||||
* @returns
|
||||
*/
|
||||
function flattenObject(data: IDataObject) {
|
||||
const returnData: IDataObject = {};
|
||||
|
|
|
@ -7,11 +7,6 @@ import { IDataObject, IPollFunctions, NodeApiError } from 'n8n-workflow';
|
|||
/**
|
||||
* Make an API request to Airtable
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function apiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
|
||||
|
@ -56,13 +51,7 @@ export async function apiRequest(
|
|||
* Make an API request to paginated Airtable endpoint
|
||||
* and return all results
|
||||
*
|
||||
* @export
|
||||
* @param {(IHookFunctions | IExecuteFunctions)} this
|
||||
* @param {string} method
|
||||
* @param {string} endpoint
|
||||
* @param {IDataObject} body
|
||||
* @param {IDataObject} [query]
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function apiRequestAllItems(
|
||||
this: IHookFunctions | IExecuteFunctions | IPollFunctions,
|
||||
|
|
|
@ -9,11 +9,6 @@ import { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-wo
|
|||
/**
|
||||
* Make an API request to Stripe
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function stripeApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -60,10 +60,8 @@ export interface IMarkupReplyKeyboardRemove {
|
|||
/**
|
||||
* Add the additional fields to the body
|
||||
*
|
||||
* @param {IExecuteFunctions} this
|
||||
* @param {IDataObject} body The body object to add fields to
|
||||
* @param {number} index The index of the item
|
||||
* @returns
|
||||
*/
|
||||
export function addAdditionalFields(this: IExecuteFunctions, body: IDataObject, index: number) {
|
||||
// Add the additional fields
|
||||
|
@ -140,11 +138,6 @@ export function addAdditionalFields(this: IExecuteFunctions, body: IDataObject,
|
|||
/**
|
||||
* Make an API request to Telegram
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function apiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
|
||||
|
|
|
@ -7,11 +7,6 @@ import { IDataObject, JsonObject, NodeApiError } from 'n8n-workflow';
|
|||
/**
|
||||
* Make an API request to Trello
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function apiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -6,11 +6,6 @@ import { OptionsWithUri } from 'request';
|
|||
/**
|
||||
* Make an API request to Twake
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function twakeApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -7,11 +7,6 @@ import { OptionsWithUri } from 'request';
|
|||
/**
|
||||
* Make an API request to Twilio
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function twilioApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
|
|
|
@ -32,11 +32,6 @@ export interface ITypeformAnswerField {
|
|||
/**
|
||||
* Make an API request to Typeform
|
||||
*
|
||||
* @param {IHookFunctions} this
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {object} body
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function apiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
@ -74,13 +69,7 @@ export async function apiRequest(
|
|||
* Make an API request to paginated Typeform endpoint
|
||||
* and return all results
|
||||
*
|
||||
* @export
|
||||
* @param {(IHookFunctions | IExecuteFunctions)} this
|
||||
* @param {string} method
|
||||
* @param {string} endpoint
|
||||
* @param {IDataObject} body
|
||||
* @param {IDataObject} [query]
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
export async function apiRequestAllItems(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
@ -118,9 +107,6 @@ export async function apiRequestAllItems(
|
|||
/**
|
||||
* Returns all the available forms
|
||||
*
|
||||
* @export
|
||||
* @param {ILoadOptionsFunctions} this
|
||||
* @returns {Promise<INodePropertyOptions[]>}
|
||||
*/
|
||||
export async function getForms(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const endpoint = 'forms';
|
||||
|
|
|
@ -95,9 +95,6 @@ export async function woocommerceApiRequestAllItems(
|
|||
/**
|
||||
* Creates a secret from the credentials
|
||||
*
|
||||
* @export
|
||||
* @param {ICredentialDataDecryptedObject} credentials
|
||||
* @returns
|
||||
*/
|
||||
export function getAutomaticSecret(credentials: ICredentialDataDecryptedObject) {
|
||||
const data = `${credentials.consumerKey},${credentials.consumerSecret}`;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
*
|
||||
* @param {Array} array The array to process.
|
||||
* @param {number} [size=1] The length of each chunk
|
||||
* @returns {Array} Returns the new array of chunks.
|
||||
* @example
|
||||
*
|
||||
* chunk(['a', 'b', 'c', 'd'], 2)
|
||||
|
@ -35,7 +34,6 @@ export function chunk(array: any[], size = 1) {
|
|||
* Takes a multidimensional array and converts it to a one-dimensional array.
|
||||
*
|
||||
* @param {Array} nestedArray The array to be flattened.
|
||||
* @returns {Array} Returns the new flattened array.
|
||||
* @example
|
||||
*
|
||||
* flatten([['a', 'b'], ['c', 'd']])
|
||||
|
|
|
@ -41,9 +41,6 @@ export class Expression {
|
|||
* Converts an object to a string in a way to make it clear that
|
||||
* the value comes from an object
|
||||
*
|
||||
* @param {object} value
|
||||
* @returns {string}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
convertObjectValueToString(value: object): string {
|
||||
const typeName = Array.isArray(value) ? 'Array' : 'Object';
|
||||
|
@ -54,15 +51,8 @@ export class Expression {
|
|||
* Resolves the parameter value. If it is an expression it will execute it and
|
||||
* return the result. For everything simply the supplied value will be returned.
|
||||
*
|
||||
* @param {NodeParameterValue} parameterValue
|
||||
* @param {(IRunExecutionData | null)} runExecutionData
|
||||
* @param {number} runIndex
|
||||
* @param {number} itemIndex
|
||||
* @param {string} activeNodeName
|
||||
* @param {INodeExecutionData[]} connectionInputData
|
||||
* @param {boolean} [returnObjectAsString=false]
|
||||
* @returns {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[])}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
resolveSimpleParameterValue(
|
||||
parameterValue: NodeParameterValue,
|
||||
|
@ -295,11 +285,7 @@ export class Expression {
|
|||
/**
|
||||
* Resolves value of parameter. But does not work for workflow-data.
|
||||
*
|
||||
* @param {INode} node
|
||||
* @param {(string | undefined)} parameterValue
|
||||
* @param {string} [defaultValue]
|
||||
* @returns {(string | undefined)}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getSimpleParameterValue(
|
||||
node: INode,
|
||||
|
@ -342,11 +328,8 @@ export class Expression {
|
|||
/**
|
||||
* Resolves value of complex parameter. But does not work for workflow-data.
|
||||
*
|
||||
* @param {INode} node
|
||||
* @param {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[])} parameterValue
|
||||
* @param {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | undefined)} [defaultValue]
|
||||
* @returns {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | undefined)}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getComplexParameterValue(
|
||||
node: INode,
|
||||
|
@ -413,13 +396,7 @@ export class Expression {
|
|||
*
|
||||
* @param {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[])} parameterValue
|
||||
* @param {(IRunExecutionData | null)} runExecutionData
|
||||
* @param {number} runIndex
|
||||
* @param {number} itemIndex
|
||||
* @param {string} activeNodeName
|
||||
* @param {INodeExecutionData[]} connectionInputData
|
||||
* @param {boolean} [returnObjectAsString=false]
|
||||
* @returns {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[])}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getParameterValue(
|
||||
parameterValue: NodeParameterValueType | INodeParameterResourceLocator,
|
||||
|
|
|
@ -116,10 +116,6 @@ abstract class NodeError extends ExecutionBaseError {
|
|||
* Otherwise, if all the paths have been exhausted and no value is eligible, `null` is
|
||||
* returned.
|
||||
*
|
||||
* @param {JsonObject} error
|
||||
* @param {string[]} potentialKeys
|
||||
* @param {string[]} traversalKeys
|
||||
* @returns {string | null}
|
||||
*/
|
||||
protected findProperty(
|
||||
error: JsonObject,
|
||||
|
@ -335,7 +331,6 @@ export class NodeApiError extends NodeError {
|
|||
/**
|
||||
* Set the error's message based on the HTTP status code.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
private setMessage() {
|
||||
if (!this.httpCode) {
|
||||
|
|
|
@ -232,9 +232,6 @@ export const cronNodeOptions: INodePropertyCollection[] = [
|
|||
* Gets special parameters which should be added to nodeTypes depending
|
||||
* on their type or configuration
|
||||
*
|
||||
* @export
|
||||
* @param {INodeType} nodeType
|
||||
* @returns
|
||||
*/
|
||||
export function getSpecialNodeParameters(nodeType: INodeType): INodeProperties[] {
|
||||
if (nodeType.description.polling === true) {
|
||||
|
@ -261,12 +258,10 @@ export function getSpecialNodeParameters(nodeType: INodeType): INodeProperties[]
|
|||
/**
|
||||
* Returns if the parameter should be displayed or not
|
||||
*
|
||||
* @export
|
||||
* @param {INodeParameters} nodeValues The data on the node which decides if the parameter
|
||||
* should be displayed
|
||||
* @param {(INodeProperties | INodeCredentialDescription)} parameter The parameter to check if it should be displayed
|
||||
* @param {INodeParameters} [nodeValuesRoot] The root node-parameter-data
|
||||
* @returns
|
||||
*/
|
||||
export function displayParameter(
|
||||
nodeValues: INodeParameters,
|
||||
|
@ -352,12 +347,10 @@ export function displayParameter(
|
|||
* Returns if the given parameter should be displayed or not considering the path
|
||||
* to the properties
|
||||
*
|
||||
* @export
|
||||
* @param {INodeParameters} nodeValues The data on the node which decides if the parameter
|
||||
* should be displayed
|
||||
* @param {(INodeProperties | INodeCredentialDescription)} parameter The parameter to check if it should be displayed
|
||||
* @param {string} path The path to the property
|
||||
* @returns
|
||||
*/
|
||||
export function displayParameterPath(
|
||||
nodeValues: INodeParameters,
|
||||
|
@ -382,11 +375,9 @@ export function displayParameterPath(
|
|||
/**
|
||||
* Returns the context data
|
||||
*
|
||||
* @export
|
||||
* @param {IRunExecutionData} runExecutionData The run execution data
|
||||
* @param {string} type The data type. "node"/"flow"
|
||||
* @param {INode} [node] If type "node" is set the node to return the context of has to be supplied
|
||||
* @returns {IContextObject}
|
||||
*/
|
||||
export function getContext(
|
||||
runExecutionData: IRunExecutionData,
|
||||
|
@ -421,9 +412,6 @@ export function getContext(
|
|||
/**
|
||||
* Returns which parameters are dependent on which
|
||||
*
|
||||
* @export
|
||||
* @param {INodeProperties[]} nodePropertiesArray
|
||||
* @returns {IParameterDependencies}
|
||||
*/
|
||||
export function getParamterDependencies(
|
||||
nodePropertiesArray: INodeProperties[],
|
||||
|
@ -462,10 +450,6 @@ export function getParamterDependencies(
|
|||
* Returns in which order the parameters should be resolved
|
||||
* to have the parameters available they depend on
|
||||
*
|
||||
* @export
|
||||
* @param {INodeProperties[]} nodePropertiesArray
|
||||
* @param {IParameterDependencies} parameterDependencies
|
||||
* @returns {number[]}
|
||||
*/
|
||||
export function getParamterResolveOrder(
|
||||
nodePropertiesArray: INodeProperties[],
|
||||
|
@ -533,7 +517,6 @@ export function getParamterResolveOrder(
|
|||
* Returns the node parameter values. Depending on the settings it either just returns the none
|
||||
* default values or it applies all the default values.
|
||||
*
|
||||
* @export
|
||||
* @param {INodeProperties[]} nodePropertiesArray The properties which exist and their settings
|
||||
* @param {INodeParameters} nodeValues The node parameter data
|
||||
* @param {boolean} returnDefaults If default values get added or only none default values returned
|
||||
|
@ -541,7 +524,6 @@ export function getParamterResolveOrder(
|
|||
* @param {boolean} [onlySimpleTypes=false] If only simple types should be resolved
|
||||
* @param {boolean} [dataIsResolved=false] If nodeValues are already fully resolved (so that all default values got added already)
|
||||
* @param {INodeParameters} [nodeValuesRoot] The root node-parameter-data
|
||||
* @returns {(INodeParameters | null)}
|
||||
*/
|
||||
export function getNodeParameters(
|
||||
nodePropertiesArray: INodeProperties[],
|
||||
|
@ -858,10 +840,7 @@ export function getNodeParameters(
|
|||
/**
|
||||
* Brings the output data in a format that can be returned from a node
|
||||
*
|
||||
* @export
|
||||
* @param {INodeExecutionData[]} outputData
|
||||
* @param {number} [outputIndex=0]
|
||||
* @returns {Promise<INodeExecutionData[][]>}
|
||||
*/
|
||||
export async function prepareOutputData(
|
||||
outputData: INodeExecutionData[],
|
||||
|
@ -882,10 +861,7 @@ export async function prepareOutputData(
|
|||
/**
|
||||
* Returns all the webhooks which should be created for the give node
|
||||
*
|
||||
* @export
|
||||
*
|
||||
* @param {INode} node
|
||||
* @returns {IWebhookData[]}
|
||||
*/
|
||||
export function getNodeWebhooks(
|
||||
workflow: Workflow,
|
||||
|
@ -998,11 +974,6 @@ export function getNodeWebhooks(
|
|||
/**
|
||||
* Returns the webhook path
|
||||
*
|
||||
* @export
|
||||
* @param {string} workflowId
|
||||
* @param {string} nodeTypeName
|
||||
* @param {string} path
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getNodeWebhookPath(
|
||||
workflowId: string,
|
||||
|
@ -1029,13 +1000,6 @@ export function getNodeWebhookPath(
|
|||
/**
|
||||
* Returns the webhook URL
|
||||
*
|
||||
* @export
|
||||
* @param {string} baseUrl
|
||||
* @param {string} workflowId
|
||||
* @param {string} nodeTypeName
|
||||
* @param {string} path
|
||||
* @param {boolean} isFullPath
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getNodeWebhookUrl(
|
||||
baseUrl: string,
|
||||
|
@ -1057,10 +1021,8 @@ export function getNodeWebhookUrl(
|
|||
/**
|
||||
* Returns all the parameter-issues of the node
|
||||
*
|
||||
* @export
|
||||
* @param {INodeProperties[]} nodePropertiesArray The properties of the node
|
||||
* @param {INode} node The data of the node
|
||||
* @returns {(INodeIssues | null)}
|
||||
*/
|
||||
export function getNodeParametersIssues(
|
||||
nodePropertiesArray: INodeProperties[],
|
||||
|
@ -1090,10 +1052,8 @@ export function getNodeParametersIssues(
|
|||
/**
|
||||
* Returns the issues of the node as string
|
||||
*
|
||||
* @export
|
||||
* @param {INodeIssues} issues The issues of the node
|
||||
* @param {INode} node The node
|
||||
* @returns {string[]}
|
||||
*/
|
||||
export function nodeIssuesToString(issues: INodeIssues, node?: INode): string[] {
|
||||
const nodeIssues = [];
|
||||
|
@ -1161,7 +1121,6 @@ export const validateResourceLocatorParameter = (
|
|||
/**
|
||||
* Adds an issue if the parameter is not defined
|
||||
*
|
||||
* @export
|
||||
* @param {INodeIssues} foundIssues The already found issues
|
||||
* @param {INodeProperties} nodeProperties The properties of the node
|
||||
* @param {NodeParameterValue} value The value of the parameter
|
||||
|
@ -1197,11 +1156,9 @@ export function addToIssuesIfMissing(
|
|||
/**
|
||||
* Returns the parameter value
|
||||
*
|
||||
* @export
|
||||
* @param {INodeParameters} nodeValues The values of the node
|
||||
* @param {string} parameterName The name of the parameter to return the value of
|
||||
* @param {string} path The path to the properties
|
||||
* @returns
|
||||
*/
|
||||
export function getParameterValueByPath(
|
||||
nodeValues: INodeParameters,
|
||||
|
@ -1218,11 +1175,9 @@ function isINodeParameterResourceLocator(value: unknown): value is INodeParamete
|
|||
/**
|
||||
* Returns all the issues with the given node-values
|
||||
*
|
||||
* @export
|
||||
* @param {INodeProperties} nodeProperties The properties of the node
|
||||
* @param {INodeParameters} nodeValues The values of the node
|
||||
* @param {string} path The path to the properties
|
||||
* @returns {INodeIssues}
|
||||
*/
|
||||
export function getParameterIssues(
|
||||
nodeProperties: INodeProperties,
|
||||
|
@ -1363,10 +1318,8 @@ export function getParameterIssues(
|
|||
/**
|
||||
* Merges multiple NodeIssues together
|
||||
*
|
||||
* @export
|
||||
* @param {INodeIssues} destination The issues to merge into
|
||||
* @param {(INodeIssues | null)} source The issues to merge
|
||||
* @returns
|
||||
*/
|
||||
export function mergeIssues(destination: INodeIssues, source: INodeIssues | null) {
|
||||
if (source === null) {
|
||||
|
@ -1409,9 +1362,6 @@ export function mergeIssues(destination: INodeIssues, source: INodeIssues | null
|
|||
/**
|
||||
* Merges the given node properties
|
||||
*
|
||||
* @export
|
||||
* @param {INodeProperties[]} mainProperties
|
||||
* @param {INodeProperties[]} addProperties
|
||||
*/
|
||||
export function mergeNodeProperties(
|
||||
mainProperties: INodeProperties[],
|
||||
|
|
|
@ -150,9 +150,6 @@ export class Workflow {
|
|||
* The default connections are by source node. This function rewrites them by destination nodes
|
||||
* to easily find parent nodes.
|
||||
*
|
||||
* @param {IConnections} connections
|
||||
* @returns {IConnections}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
__getConnectionsByDestination(connections: IConnections): IConnections {
|
||||
const returnConnection: IConnections = {};
|
||||
|
@ -202,8 +199,6 @@ export class Workflow {
|
|||
* or webhooks defined.
|
||||
*
|
||||
* @param {string[]} [ignoreNodeTypes] Node-types to ignore in the check
|
||||
* @returns {boolean}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
checkIfWorkflowCanBeActivated(ignoreNodeTypes?: string[]): boolean {
|
||||
let node: INode;
|
||||
|
@ -249,8 +244,6 @@ export class Workflow {
|
|||
* which have been found for the different nodes.
|
||||
* TODO: Does currently not check for credential issues!
|
||||
*
|
||||
* @returns {(IWorfklowIssues | null)}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
checkReadyForExecution(inputData: {
|
||||
startNode?: string;
|
||||
|
@ -317,8 +310,6 @@ export class Workflow {
|
|||
*
|
||||
* @param {string} type The type of data to return ("global"|"node")
|
||||
* @param {INode} [node] If type is set to "node" then the node has to be provided
|
||||
* @returns {IDataObject}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getStaticData(type: string, node?: INode): IDataObject {
|
||||
let key: string;
|
||||
|
@ -349,8 +340,6 @@ export class Workflow {
|
|||
/**
|
||||
* Returns all the trigger nodes in the workflow.
|
||||
*
|
||||
* @returns {INode[]}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getTriggerNodes(): INode[] {
|
||||
return this.queryNodes((nodeType: INodeType) => !!nodeType.trigger);
|
||||
|
@ -359,8 +348,6 @@ export class Workflow {
|
|||
/**
|
||||
* Returns all the poll nodes in the workflow
|
||||
*
|
||||
* @returns {INode[]}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getPollNodes(): INode[] {
|
||||
return this.queryNodes((nodeType: INodeType) => !!nodeType.poll);
|
||||
|
@ -371,8 +358,6 @@ export class Workflow {
|
|||
* checkFunction return true
|
||||
*
|
||||
* @param {(nodeType: INodeType) => boolean} checkFunction
|
||||
* @returns {INode[]}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
queryNodes(checkFunction: (nodeType: INodeType) => boolean): INode[] {
|
||||
const returnNodes: INode[] = [];
|
||||
|
@ -402,8 +387,6 @@ export class Workflow {
|
|||
* Returns the node with the given name if it exists else null
|
||||
*
|
||||
* @param {string} nodeName Name of the node to return
|
||||
* @returns {(INode | null)}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getNode(nodeName: string): INode | null {
|
||||
if (this.nodes.hasOwnProperty(nodeName)) {
|
||||
|
@ -417,8 +400,6 @@ export class Workflow {
|
|||
* Returns the pinData of the node with the given name if it exists
|
||||
*
|
||||
* @param {string} nodeName Name of the node to return the pinData of
|
||||
* @returns {(IDataObject[] | undefined)}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getPinDataOfNode(nodeName: string): IDataObject[] | undefined {
|
||||
return this.pinData ? this.pinData[nodeName] : undefined;
|
||||
|
@ -430,8 +411,6 @@ export class Workflow {
|
|||
* @param {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[])} parameterValue The parameters to check for expressions
|
||||
* @param {string} currentName The current name of the node
|
||||
* @param {string} newName The new name
|
||||
* @returns {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[])}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
renameNodeInExpressions(
|
||||
parameterValue: NodeParameterValueType,
|
||||
|
@ -514,7 +493,6 @@ export class Workflow {
|
|||
*
|
||||
* @param {string} currentName The current name of the node
|
||||
* @param {string} newName The new name
|
||||
* @memberof Workflow
|
||||
*/
|
||||
renameNode(currentName: string, newName: string) {
|
||||
// Rename the node itself
|
||||
|
@ -573,11 +551,7 @@ export class Workflow {
|
|||
/**
|
||||
* Finds the highest parent nodes of the node with the given name
|
||||
*
|
||||
* @param {string} nodeName
|
||||
* @param {string} [type='main']
|
||||
* @param {number} [nodeConnectionIndex]
|
||||
* @returns {string[]}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getHighestNode(
|
||||
nodeName: string,
|
||||
|
@ -656,11 +630,8 @@ export class Workflow {
|
|||
/**
|
||||
* Returns all the after the given one
|
||||
*
|
||||
* @param {string} nodeName
|
||||
* @param {string} [type='main']
|
||||
* @param {*} [depth=-1]
|
||||
* @returns {string[]}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getChildNodes(nodeName: string, type = 'main', depth = -1): string[] {
|
||||
return this.getConnectedNodes(this.connectionsBySourceNode, nodeName, type, depth);
|
||||
|
@ -669,11 +640,8 @@ export class Workflow {
|
|||
/**
|
||||
* Returns all the nodes before the given one
|
||||
*
|
||||
* @param {string} nodeName
|
||||
* @param {string} [type='main']
|
||||
* @param {*} [depth=-1]
|
||||
* @returns {string[]}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getParentNodes(nodeName: string, type = 'main', depth = -1): string[] {
|
||||
return this.getConnectedNodes(this.connectionsByDestinationNode, nodeName, type, depth);
|
||||
|
@ -683,13 +651,8 @@ export class Workflow {
|
|||
* Gets all the nodes which are connected nodes starting from
|
||||
* the given one
|
||||
*
|
||||
* @param {IConnections} connections
|
||||
* @param {string} nodeName
|
||||
* @param {string} [type='main']
|
||||
* @param {*} [depth=-1]
|
||||
* @param {string[]} [checkedNodes]
|
||||
* @returns {string[]}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getConnectedNodes(
|
||||
connections: IConnections,
|
||||
|
@ -770,10 +733,7 @@ export class Workflow {
|
|||
/**
|
||||
* Returns all the nodes before the given one
|
||||
*
|
||||
* @param {string} nodeName
|
||||
* @param {*} [maxDepth=-1]
|
||||
* @returns {string[]}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getParentNodesByDepth(nodeName: string, maxDepth = -1): IConnectedNode[] {
|
||||
return this.searchNodesBFS(this.connectionsByDestinationNode, nodeName, maxDepth);
|
||||
|
@ -784,11 +744,7 @@ export class Workflow {
|
|||
* the given one
|
||||
* Uses BFS traversal
|
||||
*
|
||||
* @param {IConnections} connections
|
||||
* @param {string} sourceNode
|
||||
* @param {*} [maxDepth=-1]
|
||||
* @returns {IConnectedNode[]}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
searchNodesBFS(connections: IConnections, sourceNode: string, maxDepth = -1): IConnectedNode[] {
|
||||
const returnConns: IConnectedNode[] = [];
|
||||
|
@ -855,9 +811,6 @@ export class Workflow {
|
|||
* @param {string} parentNodeName The parent node to get the output index of
|
||||
* @param {string} [type='main']
|
||||
* @param {*} [depth=-1]
|
||||
* @param {string[]} [checkedNodes]
|
||||
* @returns {(INodeConnection | undefined)}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getNodeConnectionIndexes(
|
||||
nodeName: string,
|
||||
|
@ -938,8 +891,6 @@ export class Workflow {
|
|||
* Returns from which of the given nodes the workflow should get started from
|
||||
*
|
||||
* @param {string[]} nodeNames The potential start nodes
|
||||
* @returns {(INode | undefined)}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
__getStartNode(nodeNames: string[]): INode | undefined {
|
||||
// Check if there are any trigger or poll nodes and then return the first one
|
||||
|
@ -973,9 +924,6 @@ export class Workflow {
|
|||
/**
|
||||
* Returns the start node to start the workflow from
|
||||
*
|
||||
* @param {string} [destinationNode]
|
||||
* @returns {(INode | undefined)}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
getStartNode(destinationNode?: string): INode | undefined {
|
||||
if (destinationNode) {
|
||||
|
@ -1006,11 +954,6 @@ export class Workflow {
|
|||
* Executes the Webhooks method of the node
|
||||
*
|
||||
* @param {WebhookSetupMethodNames} method The name of the method to execute
|
||||
* @param {IWebhookData} webhookData
|
||||
* @param {INodeExecuteFunctions} nodeExecuteFunctions
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {(Promise<boolean | undefined>)}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
async runWebhookMethod(
|
||||
method: WebhookSetupMethodNames,
|
||||
|
@ -1052,12 +995,6 @@ export class Workflow {
|
|||
* Runs the given trigger node so that it can trigger the workflow
|
||||
* when the node has data.
|
||||
*
|
||||
* @param {INode} node
|
||||
* @param {IGetExecuteTriggerFunctions} getTriggerFunctions
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {(Promise<ITriggerResponse | undefined>)}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
async runTrigger(
|
||||
node: INode,
|
||||
|
@ -1139,10 +1076,6 @@ export class Workflow {
|
|||
* Runs the given trigger node so that it can trigger the workflow
|
||||
* when the node has data.
|
||||
*
|
||||
* @param {INode} node
|
||||
* @param {IPollFunctions} pollFunctions
|
||||
* @returns
|
||||
* @memberof Workflow
|
||||
*/
|
||||
|
||||
async runPoll(
|
||||
|
@ -1168,12 +1101,6 @@ export class Workflow {
|
|||
* Executes the webhook data to see what it should return and if the
|
||||
* workflow should be started or not
|
||||
*
|
||||
* @param {INode} node
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @param {INodeExecuteFunctions} nodeExecuteFunctions
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {Promise<IWebhookResponseData>}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
async runWebhook(
|
||||
webhookData: IWebhookData,
|
||||
|
@ -1202,14 +1129,6 @@ export class Workflow {
|
|||
/**
|
||||
* Executes the given node.
|
||||
*
|
||||
* @param {IExecuteData} executionData
|
||||
* @param {IRunExecutionData} runExecutionData
|
||||
* @param {number} runIndex
|
||||
* @param {IWorkflowExecuteAdditionalData} additionalData
|
||||
* @param {INodeExecuteFunctions} nodeExecuteFunctions
|
||||
* @param {WorkflowExecuteMode} mode
|
||||
* @returns {(Promise<INodeExecutionData[][] | null>)}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
async runNode(
|
||||
executionData: IExecuteData,
|
||||
|
|
|
@ -101,8 +101,6 @@ export class WorkflowDataProxy {
|
|||
*
|
||||
* @private
|
||||
* @param {string} nodeName The name of the node to get the context from
|
||||
* @returns
|
||||
* @memberof WorkflowDataProxy
|
||||
*/
|
||||
private nodeContextGetter(nodeName: string) {
|
||||
const that = this;
|
||||
|
@ -164,8 +162,6 @@ export class WorkflowDataProxy {
|
|||
*
|
||||
* @private
|
||||
* @param {string} nodeName The name of the node to query data from
|
||||
* @returns
|
||||
* @memberof WorkflowDataGetter
|
||||
*/
|
||||
private nodeParameterGetter(nodeName: string) {
|
||||
const that = this;
|
||||
|
@ -243,8 +239,6 @@ export class WorkflowDataProxy {
|
|||
* @param {boolean} [shortSyntax=false] If short syntax got used
|
||||
* @param {number} [outputIndex] The index of the output, if not given the first one gets used
|
||||
* @param {number} [runIndex] The index of the run, if not given the current one does get used
|
||||
* @returns {INodeExecutionData[]}
|
||||
* @memberof WorkflowDataProxy
|
||||
*/
|
||||
private getNodeExecutionData(
|
||||
nodeName: string,
|
||||
|
@ -356,8 +350,6 @@ export class WorkflowDataProxy {
|
|||
* @private
|
||||
* @param {string} nodeName The name of the node query data from
|
||||
* @param {boolean} [shortSyntax=false] If short syntax got used
|
||||
* @returns
|
||||
* @memberof WorkflowDataGetter
|
||||
*/
|
||||
private nodeDataGetter(nodeName: string, shortSyntax = false) {
|
||||
const that = this;
|
||||
|
@ -436,8 +428,6 @@ export class WorkflowDataProxy {
|
|||
* Returns a proxy to query data from the environment
|
||||
*
|
||||
* @private
|
||||
* @returns
|
||||
* @memberof WorkflowDataGetter
|
||||
*/
|
||||
private envGetter() {
|
||||
const that = this;
|
||||
|
@ -464,8 +454,6 @@ export class WorkflowDataProxy {
|
|||
* Returns a proxy to query data from the workflow
|
||||
*
|
||||
* @private
|
||||
* @returns
|
||||
* @memberof WorkflowDataProxy
|
||||
*/
|
||||
private workflowGetter() {
|
||||
const allowedValues = ['active', 'id', 'name'];
|
||||
|
@ -498,8 +486,6 @@ export class WorkflowDataProxy {
|
|||
* Returns a proxy to query data of all nodes
|
||||
*
|
||||
* @private
|
||||
* @returns
|
||||
* @memberof WorkflowDataGetter
|
||||
*/
|
||||
private nodeGetter() {
|
||||
const that = this;
|
||||
|
@ -516,8 +502,6 @@ export class WorkflowDataProxy {
|
|||
/**
|
||||
* Returns the data proxy object which allows to query data from current run
|
||||
*
|
||||
* @returns
|
||||
* @memberof WorkflowDataGetter
|
||||
*/
|
||||
getDataProxy(): IWorkflowDataProxyData {
|
||||
const that = this;
|
||||
|
|
Loading…
Reference in a new issue