docs: remove impertinent Jsdocs comments (no-changelog) (#4181)

* 🔥 Remove impertinent Jsdocs comments

* Lint fixes
This commit is contained in:
agobrech 2022-09-29 14:37:56 +02:00 committed by GitHub
parent 64fffa0579
commit 8bd99e0600
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 6 additions and 888 deletions

View file

@ -36,10 +36,6 @@ export class ActiveExecutions {
/** /**
* Add a new active execution * Add a new active execution
* *
* @param {ChildProcess} process
* @param {IWorkflowExecutionDataProcess} executionData
* @returns {string}
* @memberof ActiveExecutions
*/ */
async add( async add(
executionData: IWorkflowExecutionDataProcess, executionData: IWorkflowExecutionDataProcess,
@ -103,9 +99,6 @@ export class ActiveExecutions {
/** /**
* Attaches an execution * Attaches an execution
* *
* @param {string} executionId
* @param {PCancelable<IRun>} workflowExecution
* @memberof ActiveExecutions
*/ */
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
attachWorkflowExecution(executionId: string, workflowExecution: PCancelable<IRun>) { attachWorkflowExecution(executionId: string, workflowExecution: PCancelable<IRun>) {
@ -143,10 +136,6 @@ export class ActiveExecutions {
/** /**
* Remove an active execution * Remove an active execution
* *
* @param {string} executionId
* @param {IRun} fullRunData
* @returns {void}
* @memberof ActiveExecutions
*/ */
remove(executionId: string, fullRunData?: IRun): void { remove(executionId: string, fullRunData?: IRun): void {
if (this.activeExecutions[executionId] === undefined) { if (this.activeExecutions[executionId] === undefined) {
@ -168,8 +157,6 @@ export class ActiveExecutions {
* *
* @param {string} executionId The id of the execution to stop * @param {string} executionId The id of the execution to stop
* @param {string} timeout String 'timeout' given if stop due to timeout * @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> { async stopExecution(executionId: string, timeout?: string): Promise<IRun | undefined> {
if (this.activeExecutions[executionId] === undefined) { if (this.activeExecutions[executionId] === undefined) {
@ -204,8 +191,6 @@ export class ActiveExecutions {
* with the given id * with the given id
* *
* @param {string} executionId The id of the execution to wait for * @param {string} executionId The id of the execution to wait for
* @returns {Promise<IRun>}
* @memberof ActiveExecutions
*/ */
async getPostExecutePromise(executionId: string): Promise<IRun | undefined> { async getPostExecutePromise(executionId: string): Promise<IRun | undefined> {
// Create the promise which will be resolved when the execution finished // 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 all the currently active executions
* *
* @returns {IExecutionsCurrentSummary[]}
* @memberof ActiveExecutions
*/ */
getActiveExecutions(): IExecutionsCurrentSummary[] { getActiveExecutions(): IExecutionsCurrentSummary[] {
const returnData: IExecutionsCurrentSummary[] = []; const returnData: IExecutionsCurrentSummary[] = [];

View file

@ -154,8 +154,6 @@ export class ActiveWorkflowRunner {
/** /**
* Removes all the currently active workflows * Removes all the currently active workflows
* *
* @returns {Promise<void>}
* @memberof ActiveWorkflowRunner
*/ */
async removeAll(): Promise<void> { async removeAll(): Promise<void> {
let activeWorkflowIds: string[] = []; 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. * 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( async executeWebhook(
httpMethod: WebhookHttpMethod, httpMethod: WebhookHttpMethod,
@ -354,8 +346,6 @@ export class ActiveWorkflowRunner {
* Gets all request methods associated with a single webhook * Gets all request methods associated with a single webhook
* *
* @param {string} path webhook path * @param {string} path webhook path
* @returns {Promise<string[]>}
* @memberof ActiveWorkflowRunner
*/ */
async getWebhookMethods(path: string): Promise<string[]> { async getWebhookMethods(path: string): Promise<string[]> {
const webhooks = await Db.collections.Webhook.find({ webhookPath: path }); 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 the ids of the currently active workflows
* *
* @returns {string[]}
* @memberof ActiveWorkflowRunner
*/ */
async getActiveWorkflows(user?: User): Promise<IWorkflowDb[]> { async getActiveWorkflows(user?: User): Promise<IWorkflowDb[]> {
let activeWorkflows: WorkflowEntity[] = []; let activeWorkflows: WorkflowEntity[] = [];
@ -401,8 +389,6 @@ export class ActiveWorkflowRunner {
* Returns if the workflow is active * Returns if the workflow is active
* *
* @param {string} id The id of the workflow to check * @param {string} id The id of the workflow to check
* @returns {boolean}
* @memberof ActiveWorkflowRunner
*/ */
async isActive(id: string): Promise<boolean> { async isActive(id: string): Promise<boolean> {
const workflow = await Db.collections.Workflow.findOne(id); 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 * Return error if there was a problem activating the workflow
* *
* @param {string} id The id of the workflow to return the error of * @param {string} id The id of the workflow to return the error of
* @returns {(IActivationError | undefined)}
* @memberof ActiveWorkflowRunner
*/ */
getActivationError(id: string): IActivationError | undefined { getActivationError(id: string): IActivationError | undefined {
if (this.activationErrors[id] === undefined) { if (this.activationErrors[id] === undefined) {
@ -427,11 +411,6 @@ export class ActiveWorkflowRunner {
/** /**
* Adds all the webhooks of the workflow * Adds all the webhooks of the workflow
* *
* @param {Workflow} workflow
* @param {IWorkflowExecuteAdditionalDataWorkflow} additionalData
* @param {WorkflowExecuteMode} mode
* @returns {Promise<void>}
* @memberof ActiveWorkflowRunner
*/ */
async addWorkflowWebhooks( async addWorkflowWebhooks(
workflow: Workflow, workflow: Workflow,
@ -533,9 +512,6 @@ export class ActiveWorkflowRunner {
/** /**
* Remove all the webhooks of the workflow * Remove all the webhooks of the workflow
* *
* @param {string} workflowId
* @returns
* @memberof ActiveWorkflowRunner
*/ */
async removeWorkflowWebhooks(workflowId: string): Promise<void> { async removeWorkflowWebhooks(workflowId: string): Promise<void> {
const workflowData = await Db.collections.Workflow.findOne(workflowId, { const workflowData = await Db.collections.Workflow.findOne(workflowId, {
@ -588,13 +564,6 @@ export class ActiveWorkflowRunner {
/** /**
* Runs the given workflow * 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 // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
async runWorkflow( async runWorkflow(
@ -644,11 +613,6 @@ export class ActiveWorkflowRunner {
* Return poll function which gets the global functions from n8n-core * Return poll function which gets the global functions from n8n-core
* and overwrites the __emit to be able to start it in subprocess * 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( getExecutePollFunctions(
workflowData: IWorkflowDb, workflowData: IWorkflowDb,
@ -686,11 +650,6 @@ export class ActiveWorkflowRunner {
* Return trigger function which gets the global functions from n8n-core * Return trigger function which gets the global functions from n8n-core
* and overwrites the emit to be able to start it in subprocess * 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( getExecuteTriggerFunctions(
workflowData: IWorkflowDb, workflowData: IWorkflowDb,
@ -795,8 +754,6 @@ export class ActiveWorkflowRunner {
* *
* @param {string} workflowId The id of the workflow to activate * @param {string} workflowId The id of the workflow to activate
* @param {IWorkflowDb} [workflowData] If workflowData is given it saves the DB query * @param {IWorkflowDb} [workflowData] If workflowData is given it saves the DB query
* @returns {Promise<void>}
* @memberof ActiveWorkflowRunner
*/ */
async add( async add(
workflowId: string, workflowId: string,
@ -985,8 +942,6 @@ export class ActiveWorkflowRunner {
* Makes a workflow inactive * Makes a workflow inactive
* *
* @param {string} workflowId The id of the workflow to deactivate * @param {string} workflowId The id of the workflow to deactivate
* @returns {Promise<void>}
* @memberof ActiveWorkflowRunner
*/ */
async remove(workflowId: string): Promise<void> { async remove(workflowId: string): Promise<void> {
if (this.activeWorkflows !== null) { if (this.activeWorkflows !== null) {

View file

@ -250,8 +250,6 @@ export class CredentialsHelper extends ICredentialsHelper {
* *
* @param {INodeCredentialsDetails} nodeCredential id and name to return instance of * @param {INodeCredentialsDetails} nodeCredential id and name to return instance of
* @param {string} type Type of the credential to return instance of * @param {string} type Type of the credential to return instance of
* @returns {Credentials}
* @memberof CredentialsHelper
*/ */
async getCredentials( async getCredentials(
nodeCredential: INodeCredentialsDetails, nodeCredential: INodeCredentialsDetails,
@ -287,8 +285,6 @@ export class CredentialsHelper extends ICredentialsHelper {
* Returns all the properties of the credentials with the given name * Returns all the properties of the credentials with the given name
* *
* @param {string} type The name of the type to return credentials off * @param {string} type The name of the type to return credentials off
* @returns {INodeProperties[]}
* @memberof CredentialsHelper
*/ */
getCredentialsProperties(type: string): INodeProperties[] { getCredentialsProperties(type: string): INodeProperties[] {
const credentialTypeData = this.credentialTypes.getByName(type); 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 {INodeCredentialsDetails} nodeCredentials id and name to return instance of
* @param {string} type Type of the credentials to return data of * @param {string} type Type of the credentials to return data of
* @param {boolean} [raw] Return the data as supplied without defaults or overwrites * @param {boolean} [raw] Return the data as supplied without defaults or overwrites
* @returns {ICredentialDataDecryptedObject}
* @memberof CredentialsHelper
*/ */
async getDecrypted( async getDecrypted(
nodeCredentials: INodeCredentialsDetails, nodeCredentials: INodeCredentialsDetails,
@ -351,8 +345,6 @@ export class CredentialsHelper extends ICredentialsHelper {
* *
* @param {ICredentialDataDecryptedObject} decryptedDataOriginal The credential data to overwrite data on * @param {ICredentialDataDecryptedObject} decryptedDataOriginal The credential data to overwrite data on
* @param {string} type Type of the credentials to overwrite data of * @param {string} type Type of the credentials to overwrite data of
* @returns {ICredentialDataDecryptedObject}
* @memberof CredentialsHelper
*/ */
applyDefaultsAndOverwrites( applyDefaultsAndOverwrites(
decryptedDataOriginal: ICredentialDataDecryptedObject, decryptedDataOriginal: ICredentialDataDecryptedObject,
@ -443,8 +435,6 @@ export class CredentialsHelper extends ICredentialsHelper {
* @param {string} name Name of the credentials to set data of * @param {string} name Name of the credentials to set data of
* @param {string} type Type 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 * @param {ICredentialDataDecryptedObject} data The data to set
* @returns {Promise<void>}
* @memberof CredentialsHelper
*/ */
async updateCredentials( async updateCredentials(
nodeCredentials: INodeCredentialsDetails, nodeCredentials: INodeCredentialsDetails,

View file

@ -42,8 +42,6 @@ let versionCache: IPackageVersions | undefined;
/** /**
* Returns the base URL n8n is reachable from * Returns the base URL n8n is reachable from
* *
* @export
* @returns {string}
*/ */
export function getBaseUrl(): string { export function getBaseUrl(): string {
const protocol = config.getEnv('protocol'); const protocol = config.getEnv('protocol');
@ -60,9 +58,6 @@ export function getBaseUrl(): string {
/** /**
* Returns the session id if one is set * Returns the session id if one is set
* *
* @export
* @param {express.Request} req
* @returns {(string | undefined)}
*/ */
export function getSessionId(req: express.Request): string | undefined { export function getSessionId(req: express.Request): string | undefined {
return req.headers.sessionid as 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 * Returns information which version of the packages are installed
* *
* @export
* @returns {Promise<IPackageVersions>}
*/ */
export async function getVersions(): Promise<IPackageVersions> { export async function getVersions(): Promise<IPackageVersions> {
if (versionCache !== undefined) { if (versionCache !== undefined) {
@ -94,9 +87,6 @@ export async function getVersions(): Promise<IPackageVersions> {
/** /**
* Extracts configuration schema for key * Extracts configuration schema for key
* *
* @param {string} configKey
* @param {IDataObject} configSchema
* @returns {IDataObject} schema of the configKey
*/ */
function extractSchemaForKey(configKey: string, configSchema: IDataObject): IDataObject { function extractSchemaForKey(configKey: string, configSchema: IDataObject): IDataObject {
const configKeyParts = configKey.split('.'); 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 * Gets value from config with support for "_FILE" environment variables
* *
* @export
* @param {string} configKey The key of the config data to get * @param {string} configKey The key of the config data to get
* @returns {(Promise<string | boolean | number | undefined>)}
*/ */
export async function getConfigValue( export async function getConfigValue(
configKey: string, configKey: string,

View file

@ -163,8 +163,6 @@ class LoadNodesAndCredentialsClass {
* Returns all the names of the packages which could * Returns all the names of the packages which could
* contain n8n nodes * contain n8n nodes
* *
* @returns {Promise<string[]>}
* @memberof LoadNodesAndCredentialsClass
*/ */
async getN8nNodePackages(baseModulesPath: string): Promise<string[]> { async getN8nNodePackages(baseModulesPath: string): Promise<string[]> {
const getN8nNodePackagesRecursive = async (relativePath: 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} credentialName The name of the credentials
* @param {string} filePath The file to read credentials from * @param {string} filePath The file to read credentials from
* @returns {Promise<void>}
*/ */
loadCredentialsFromFile(credentialName: string, filePath: string): void { loadCredentialsFromFile(credentialName: string, filePath: string): void {
let tempCredential: ICredentialType; let tempCredential: ICredentialType;
@ -347,7 +344,6 @@ class LoadNodesAndCredentialsClass {
* @param {string} packageName The package name to set for the found nodes * @param {string} packageName The package name to set for the found nodes
* @param {string} nodeName Tha name of the node * @param {string} nodeName Tha name of the node
* @param {string} filePath The file to read node from * @param {string} filePath The file to read node from
* @returns {Promise<void>}
*/ */
loadNodeFromFile( loadNodeFromFile(
packageName: string, packageName: string,
@ -433,7 +429,6 @@ class LoadNodesAndCredentialsClass {
* alias (if defined) from the codex data for the node at the given file path. * 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 * @param {string} filePath The file path to a `*.node.js` file
* @returns {CodexData}
*/ */
getCodex(filePath: string): CodexData { getCodex(filePath: string): CodexData {
// eslint-disable-next-line global-require, import/no-dynamic-require, @typescript-eslint/no-var-requires // 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) * Adds a node codex `categories` and `subcategories` (if defined)
* to a node description `codex` property. * to a node description `codex` property.
* *
* @param {object} obj
* @param obj.node Node to add categories to * @param obj.node Node to add categories to
* @param obj.filePath Path to the built node * @param obj.filePath Path to the built node
* @param obj.isCustom Whether the node is custom * @param obj.isCustom Whether the node is custom
* @returns {void}
*/ */
addCodex({ addCodex({
node, node,
@ -495,7 +488,6 @@ class LoadNodesAndCredentialsClass {
* *
* @param {string} setPackageName The package name to set for the found nodes * @param {string} setPackageName The package name to set for the found nodes
* @param {string} directory The directory to look in * @param {string} directory The directory to look in
* @returns {Promise<void>}
*/ */
async loadDataFromDirectory(setPackageName: string, directory: string): Promise<void> { async loadDataFromDirectory(setPackageName: string, directory: string): Promise<void> {
const files = await glob('**/*.@(node|credentials).js', { const files = await glob('**/*.@(node|credentials).js', {
@ -524,7 +516,6 @@ class LoadNodesAndCredentialsClass {
* Loads nodes and credentials from the package with the given name * Loads nodes and credentials from the package with the given name
* *
* @param {string} packagePath The path to read data from * @param {string} packagePath The path to read data from
* @returns {Promise<void>}
*/ */
async loadDataFromPackage(packagePath: string): Promise<INodeTypeNameVersion[]> { async loadDataFromPackage(packagePath: string): Promise<INodeTypeNameVersion[]> {
// Get the absolute path of the package // Get the absolute path of the package

View file

@ -141,7 +141,6 @@ export function sanitizeCredentials(
* to a JSON Schema (see https://json-schema.org/). With * to a JSON Schema (see https://json-schema.org/). With
* the JSON Schema definition we can validate the credential's shape * the JSON Schema definition we can validate the credential's shape
* @param properties - Credentials properties * @param properties - Credentials properties
* @returns The credentials schema definition.
*/ */
export function toJsonSchema(properties: INodeProperties[]): IDataObject { export function toJsonSchema(properties: INodeProperties[]): IDataObject {
const jsonSchema: IJsonSchema = { const jsonSchema: IJsonSchema = {

View file

@ -53,7 +53,6 @@ export class Push {
* @param {string} sessionId The id of the session * @param {string} sessionId The id of the session
* @param {express.Request} req The request * @param {express.Request} req The request
* @param {express.Response} res The response * @param {express.Response} res The response
* @memberof Push
*/ */
add(sessionId: string, req: express.Request, res: express.Response) { add(sessionId: string, req: express.Request, res: express.Response) {
Logger.debug(`Add editor-UI session`, { sessionId }); 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} sessionId The session id of client to send data to
* @param {string} type Type of data to send * @param {string} type Type of data to send
* @param {*} data
* @memberof Push
*/ */
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any

View file

@ -19,7 +19,6 @@ import {
/** /**
* Special Error which allows to return also an error code and http status code * Special Error which allows to return also an error code and http status code
* *
* @export
* @class ResponseError * @class ResponseError
* @extends {Error} * @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} [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 {number} [httpStatusCode] The HTTP status code the response should have
* @param {string} [hint] The error hint to provide a context (webhook related) * @param {string} [hint] The error hint to provide a context (webhook related)
* @memberof ResponseError
*/ */
constructor(message: string, errorCode?: number, httpStatusCode?: number, hint?: string) { constructor(message: string, errorCode?: number, httpStatusCode?: number, hint?: string) {
super(message); super(message);
@ -143,9 +141,7 @@ const isUniqueConstraintError = (error: Error) =>
* all the responses have the same format * all the responses have the same format
* *
* *
* @export
* @param {(req: Request, res: Response) => Promise<any>} processFunction The actual function to process the request * @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>( 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 * 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. * with regular JSON.stringify it gets flattened which keeps the references in place.
* *
* @export
* @param {IExecutionDb} fullExecutionData The data to flatten * @param {IExecutionDb} fullExecutionData The data to flatten
* @returns {IExecutionFlatted}
*/ */
export function flattenExecutionData(fullExecutionData: IExecutionDb): IExecutionFlatted { export function flattenExecutionData(fullExecutionData: IExecutionDb): IExecutionFlatted {
// Flatten the data // Flatten the data
@ -210,9 +204,7 @@ export function flattenExecutionData(fullExecutionData: IExecutionDb): IExecutio
/** /**
* Unflattens the Execution data. * Unflattens the Execution data.
* *
* @export
* @param {IExecutionFlattedDb} fullExecutionData The data to unflatten * @param {IExecutionFlattedDb} fullExecutionData The data to unflatten
* @returns {IExecutionResponse}
*/ */
export function unflattenExecutionData(fullExecutionData: IExecutionFlattedDb): IExecutionResponse { export function unflattenExecutionData(fullExecutionData: IExecutionFlattedDb): IExecutionResponse {
const returnData: IExecutionResponse = { const returnData: IExecutionResponse = {

View file

@ -335,8 +335,6 @@ class App {
/** /**
* Returns the current epoch time * Returns the current epoch time
* *
* @returns {number}
* @memberof App
*/ */
getCurrentDate(): Date { getCurrentDate(): Date {
return new Date(); return new Date();

View file

@ -40,12 +40,6 @@ export class TestWebhooks {
* data gets additionally send to the UI. After the request got handled it * data gets additionally send to the UI. After the request got handled it
* automatically remove the test-webhook. * 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( async callTestWebhook(
httpMethod: WebhookHttpMethod, httpMethod: WebhookHttpMethod,
@ -193,10 +187,6 @@ export class TestWebhooks {
* for it and resolves with the result of the workflow if not it simply resolves * for it and resolves with the result of the workflow if not it simply resolves
* with undefined * with undefined
* *
* @param {IWorkflowDb} workflowData
* @param {Workflow} workflow
* @returns {(Promise<IExecutionDb | undefined>)}
* @memberof TestWebhooks
*/ */
async needsWebhookData( async needsWebhookData(
workflowData: IWorkflowDb, workflowData: IWorkflowDb,
@ -263,9 +253,6 @@ export class TestWebhooks {
/** /**
* Removes a test webhook of the workflow with the given id * Removes a test webhook of the workflow with the given id
* *
* @param {string} workflowId
* @returns {boolean}
* @memberof TestWebhooks
*/ */
cancelTestWebhook(workflowId: string): boolean { cancelTestWebhook(workflowId: string): boolean {
let foundWebhook = false; let foundWebhook = false;

View file

@ -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 * Returns all the webhooks which should be created for the give workflow
* *
* @export
* @param {string} workflowId
* @param {Workflow} workflow
* @returns {IWebhookData[]}
*/ */
export function getWorkflowWebhooks( export function getWorkflowWebhooks(
workflow: Workflow, workflow: Workflow,
@ -137,16 +133,8 @@ export function encodeWebhookResponse(
/** /**
* Executes a webhook * Executes a webhook
* *
* @export
* @param {IWebhookData} webhookData
* @param {IWorkflowDb} workflowData
* @param {INode} workflowStartNode
* @param {WorkflowExecuteMode} executionMode
* @param {(string | undefined)} sessionId * @param {(string | undefined)} sessionId
* @param {express.Request} req
* @param {express.Response} res
* @param {((error: Error | null, data: IResponseCallbackData) => void)} responseCallback * @param {((error: Error | null, data: IResponseCallbackData) => void)} responseCallback
* @returns {(Promise<string | undefined>)}
*/ */
export async function executeWebhook( export async function executeWebhook(
workflow: Workflow, workflow: Workflow,
@ -694,8 +682,6 @@ export async function executeWebhook(
/** /**
* Returns the base URL of the webhooks * Returns the base URL of the webhooks
* *
* @export
* @returns
*/ */
export function getWebhookBaseUrl() { export function getWebhookBaseUrl() {
let urlBaseWebhook = GenericHelpers.getBaseUrl(); let urlBaseWebhook = GenericHelpers.getBaseUrl();

View file

@ -222,8 +222,6 @@ class App {
/** /**
* Returns the current epoch time * Returns the current epoch time
* *
* @returns {number}
* @memberof App
*/ */
getCurrentDate(): Date { getCurrentDate(): Date {
return new Date(); return new Date();

View file

@ -235,7 +235,6 @@ function pruneExecutionData(this: WorkflowHooks): void {
/** /**
* Returns hook functions to push data to Editor-UI * Returns hook functions to push data to Editor-UI
* *
* @returns {IWorkflowExecuteHooks}
*/ */
function hookFunctionsPush(): IWorkflowExecuteHooks { function hookFunctionsPush(): IWorkflowExecuteHooks {
return { return {
@ -473,7 +472,6 @@ export function hookFunctionsPreExecute(parentProcessMode?: string): IWorkflowEx
/** /**
* Returns hook functions to save workflow execution and call error workflow * Returns hook functions to save workflow execution and call error workflow
* *
* @returns {IWorkflowExecuteHooks}
*/ */
function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks { function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
return { return {
@ -655,7 +653,6 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
* for running with queues. Manual executions should never run on queues as * for running with queues. Manual executions should never run on queues as
* they are always executed in the main process. * they are always executed in the main process.
* *
* @returns {IWorkflowExecuteHooks}
*/ */
function hookFunctionsSaveWorker(): IWorkflowExecuteHooks { function hookFunctionsSaveWorker(): IWorkflowExecuteHooks {
return { return {
@ -866,11 +863,7 @@ export async function getWorkflowData(
/** /**
* Executes the workflow with the given ID * Executes the workflow with the given ID
* *
* @export
* @param {string} workflowId The id of the workflow to execute * @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( export async function executeWorkflow(
workflowInfo: IExecuteWorkflowInfo, workflowInfo: IExecuteWorkflowInfo,
@ -1066,10 +1059,6 @@ export function sendMessageToUI(source: string, messages: any[]) {
/** /**
* Returns the base additional data without webhooks * Returns the base additional data without webhooks
* *
* @export
* @param {userId} string
* @param {INodeParameters} currentNodeParameters
* @returns {Promise<IWorkflowExecuteAdditionalData>}
*/ */
export async function getBase( export async function getBase(
userId: string, userId: string,
@ -1174,10 +1163,6 @@ export function getWorkflowHooksWorkerMain(
/** /**
* Returns WorkflowHooks instance for running the main workflow * Returns WorkflowHooks instance for running the main workflow
* *
* @export
* @param {IWorkflowExecutionDataProcess} data
* @param {string} executionId
* @returns {WorkflowHooks}
*/ */
export function getWorkflowHooksMain( export function getWorkflowHooksMain(
data: IWorkflowExecutionDataProcess, data: IWorkflowExecutionDataProcess,

View file

@ -49,9 +49,6 @@ const ERROR_TRIGGER_TYPE = config.getEnv('nodes.errorTriggerType');
/** /**
* Returns the data of the last executed node * Returns the data of the last executed node
* *
* @export
* @param {IRun} inputData
* @returns {(ITaskData | undefined)}
*/ */
export function getDataLastExecutedNodeData(inputData: IRun): ITaskData | undefined { export function getDataLastExecutedNodeData(inputData: IRun): ITaskData | undefined {
const { runData, pinData = {} } = inputData.data.resultData; 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 * Returns if the given id is a valid workflow id
* *
* @param {(string | null | undefined)} id The id to check * @param {(string | null | undefined)} id The id to check
* @returns {boolean}
* @memberof App
*/ */
export function isWorkflowIdValid(id: string | null | undefined | number): boolean { export function isWorkflowIdValid(id: string | null | undefined | number): boolean {
if (typeof id === 'string') { if (typeof id === 'string') {
@ -109,10 +104,8 @@ export function isWorkflowIdValid(id: string | null | undefined | number): boole
/** /**
* Executes the error workflow * Executes the error workflow
* *
* @export
* @param {string} workflowId The id of the error workflow * @param {string} workflowId The id of the error workflow
* @param {IWorkflowErrorData} workflowErrorData The error data * @param {IWorkflowErrorData} workflowErrorData The error data
* @returns {Promise<void>}
*/ */
export async function executeErrorWorkflow( export async function executeErrorWorkflow(
workflowId: string, workflowId: string,
@ -248,8 +241,6 @@ export async function executeErrorWorkflow(
/** /**
* Returns all the defined NodeTypes * Returns all the defined NodeTypes
* *
* @export
* @returns {ITransferNodeTypes}
*/ */
export function getAllNodeTypeData(): ITransferNodeTypes { export function getAllNodeTypeData(): ITransferNodeTypes {
const nodeTypes = NodeTypes(); const nodeTypes = NodeTypes();
@ -274,8 +265,6 @@ export function getAllNodeTypeData(): ITransferNodeTypes {
/** /**
* Returns all the defined CredentialTypes * Returns all the defined CredentialTypes
* *
* @export
* @returns {ICredentialsTypeData}
*/ */
export function getAllCredentalsTypeData(): ICredentialsTypeData { export function getAllCredentalsTypeData(): ICredentialsTypeData {
const credentialTypes = CredentialTypes(); const credentialTypes = CredentialTypes();
@ -301,9 +290,6 @@ export function getAllCredentalsTypeData(): ICredentialsTypeData {
* Returns the data of the node types that are needed * Returns the data of the node types that are needed
* to execute the given nodes * to execute the given nodes
* *
* @export
* @param {INode[]} nodes
* @returns {ITransferNodeTypes}
*/ */
export function getNodeTypeData(nodes: INode[]): ITransferNodeTypes { export function getNodeTypeData(nodes: INode[]): ITransferNodeTypes {
const nodeTypes = NodeTypes(); 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 * Returns the credentials data of the given type and its parent types
* it extends * it extends
* *
* @export
* @param {string} type The credential type to return data off * @param {string} type The credential type to return data off
* @returns {ICredentialsTypeData}
*/ */
export function getCredentialsDataWithParents(type: string): ICredentialsTypeData { export function getCredentialsDataWithParents(type: string): ICredentialsTypeData {
const credentialTypes = CredentialTypes(); const credentialTypes = CredentialTypes();
@ -370,9 +354,7 @@ export function getCredentialsDataWithParents(type: string): ICredentialsTypeDat
* Returns all the credentialTypes which are needed to resolve * Returns all the credentialTypes which are needed to resolve
* the given workflow credentials * the given workflow credentials
* *
* @export
* @param {IWorkflowCredentials} credentials The credentials which have to be able to be resolved * @param {IWorkflowCredentials} credentials The credentials which have to be able to be resolved
* @returns {ICredentialsTypeData}
*/ */
export function getCredentialsDataByNodes(nodes: INode[]): ICredentialsTypeData { export function getCredentialsDataByNodes(nodes: INode[]): ICredentialsTypeData {
const credentialTypeData: ICredentialsTypeData = {}; const credentialTypeData: ICredentialsTypeData = {};
@ -398,9 +380,6 @@ export function getCredentialsDataByNodes(nodes: INode[]): ICredentialsTypeData
* Returns the names of the NodeTypes which are are needed * Returns the names of the NodeTypes which are are needed
* to execute the gives nodes * to execute the gives nodes
* *
* @export
* @param {INode[]} nodes
* @returns {string[]}
*/ */
export function getNeededNodeTypes(nodes: INode[]): Array<{ type: string; version: number }> { export function getNeededNodeTypes(nodes: INode[]): Array<{ type: string; version: number }> {
// Check which node-types have to be loaded // 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 * Saves the static data if it changed
* *
* @export
* @param {Workflow} workflow
* @returns {Promise <void>}
*/ */
export async function saveStaticData(workflow: Workflow): Promise<void> { export async function saveStaticData(workflow: Workflow): Promise<void> {
if (workflow.staticData.__dataChanged === true) { if (workflow.staticData.__dataChanged === true) {
@ -443,10 +419,8 @@ export async function saveStaticData(workflow: Workflow): Promise<void> {
/** /**
* Saves the given static data on workflow * Saves the given static data on workflow
* *
* @export
* @param {(string | number)} workflowId The id of the workflow to save data on * @param {(string | number)} workflowId The id of the workflow to save data on
* @param {IDataObject} newStaticData The static data to save * @param {IDataObject} newStaticData The static data to save
* @returns {Promise<void>}
*/ */
export async function saveStaticDataById( export async function saveStaticDataById(
workflowId: string | number, workflowId: string | number,
@ -460,9 +434,7 @@ export async function saveStaticDataById(
/** /**
* Returns the static data of workflow * Returns the static data of workflow
* *
* @export
* @param {(string | number)} workflowId The id of the workflow to get static data of * @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 // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export async function getStaticDataById(workflowId: string | number) { 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 * Set node ids if not already set
* *
* @param workflow
*/ */
export function addNodeIds(workflow: WorkflowEntity) { export function addNodeIds(workflow: WorkflowEntity) {
const { nodes } = workflow; const { nodes } = workflow;

View file

@ -81,9 +81,6 @@ export class WorkflowRunner {
/** /**
* The process did send a hook message so execute the appropriate hook * 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) { processHookMessage(workflowHooks: WorkflowHooks, hookData: IProcessMessageDataHook) {
// eslint-disable-next-line @typescript-eslint/no-floating-promises // eslint-disable-next-line @typescript-eslint/no-floating-promises
@ -93,11 +90,6 @@ export class WorkflowRunner {
/** /**
* The process did error * The process did error
* *
* @param {ExecutionError} error
* @param {Date} startedAt
* @param {WorkflowExecuteMode} executionMode
* @param {string} executionId
* @memberof WorkflowRunner
*/ */
async processError( async processError(
error: ExecutionError, error: ExecutionError,
@ -135,11 +127,8 @@ export class WorkflowRunner {
/** /**
* Run the workflow * Run the workflow
* *
* @param {IWorkflowExecutionDataProcess} data
* @param {boolean} [loadStaticData] If set will the static data be loaded from * @param {boolean} [loadStaticData] If set will the static data be loaded from
* the workflow and added to input data * the workflow and added to input data
* @returns {Promise<string>}
* @memberof WorkflowRunner
*/ */
async run( async run(
data: IWorkflowExecutionDataProcess, data: IWorkflowExecutionDataProcess,
@ -203,11 +192,8 @@ export class WorkflowRunner {
/** /**
* Run the workflow in current process * Run the workflow in current process
* *
* @param {IWorkflowExecutionDataProcess} data
* @param {boolean} [loadStaticData] If set will the static data be loaded from * @param {boolean} [loadStaticData] If set will the static data be loaded from
* the workflow and added to input data * the workflow and added to input data
* @returns {Promise<string>}
* @memberof WorkflowRunner
*/ */
async runMainProcess( async runMainProcess(
data: IWorkflowExecutionDataProcess, data: IWorkflowExecutionDataProcess,
@ -595,11 +581,8 @@ export class WorkflowRunner {
/** /**
* Run the workflow * Run the workflow
* *
* @param {IWorkflowExecutionDataProcess} data
* @param {boolean} [loadStaticData] If set will the static data be loaded from * @param {boolean} [loadStaticData] If set will the static data be loaded from
* the workflow and added to input data * the workflow and added to input data
* @returns {Promise<string>}
* @memberof WorkflowRunner
*/ */
async runSubprocess( async runSubprocess(
data: IWorkflowExecutionDataProcess, data: IWorkflowExecutionDataProcess,

View file

@ -392,9 +392,6 @@ export class WorkflowRunnerProcess {
/** /**
* Sends hook data to the parent process that it executes them * 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 // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
async sendHookToParentProcess(hook: string, parameters: 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 * the parent process where they then can be executed with access
* to database and to PushService * to database and to PushService
* *
* @returns
*/ */
getProcessForwardHooks(): WorkflowHooks { getProcessForwardHooks(): WorkflowHooks {
const hookFunctions: IWorkflowExecuteHooks = { const hookFunctions: IWorkflowExecuteHooks = {
@ -463,7 +459,6 @@ export class WorkflowRunnerProcess {
* *
* @param {string} type The type of data to send * @param {string} type The type of data to send
* @param {*} data The data * @param {*} data The data
* @returns {Promise<void>}
*/ */
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
async function sendToParentProcess(type: string, data: any): Promise<void> { async function sendToParentProcess(type: string, data: any): Promise<void> {

View file

@ -23,10 +23,6 @@ export class ActiveWebhooks {
/** /**
* Adds a new webhook * Adds a new webhook
* *
* @param {IWebhookData} webhookData
* @param {WorkflowExecuteMode} mode
* @returns {Promise<void>}
* @memberof ActiveWebhooks
*/ */
async add( async add(
workflow: Workflow, workflow: Workflow,
@ -104,11 +100,7 @@ export class ActiveWebhooks {
/** /**
* Returns webhookData if a webhook with matches is currently registered * Returns webhookData if a webhook with matches is currently registered
* *
* @param {WebhookHttpMethod} httpMethod
* @param {string} path
* @param {(string | undefined)} webhookId * @param {(string | undefined)} webhookId
* @returns {(IWebhookData | undefined)}
* @memberof ActiveWebhooks
*/ */
get(httpMethod: WebhookHttpMethod, path: string, webhookId?: string): IWebhookData | undefined { get(httpMethod: WebhookHttpMethod, path: string, webhookId?: string): IWebhookData | undefined {
const webhookKey = this.getWebhookKey(httpMethod, path, webhookId); const webhookKey = this.getWebhookKey(httpMethod, path, webhookId);
@ -140,7 +132,6 @@ export class ActiveWebhooks {
/** /**
* Gets all request methods associated with a single webhook * Gets all request methods associated with a single webhook
* @param path
*/ */
getWebhookMethods(path: string): string[] { getWebhookMethods(path: string): string[] {
const methods: string[] = []; const methods: string[] = [];
@ -158,8 +149,6 @@ export class ActiveWebhooks {
/** /**
* Returns the ids of all the workflows which have active webhooks * Returns the ids of all the workflows which have active webhooks
* *
* @returns {string[]}
* @memberof ActiveWebhooks
*/ */
getWorkflowIds(): string[] { getWorkflowIds(): string[] {
return Object.keys(this.workflowWebhooks); return Object.keys(this.workflowWebhooks);
@ -168,11 +157,7 @@ export class ActiveWebhooks {
/** /**
* Returns key to uniquely identify a webhook * Returns key to uniquely identify a webhook
* *
* @param {WebhookHttpMethod} httpMethod
* @param {string} path
* @param {(string | undefined)} webhookId * @param {(string | undefined)} webhookId
* @returns {string}
* @memberof ActiveWebhooks
*/ */
getWebhookKey(httpMethod: WebhookHttpMethod, path: string, webhookId?: string): string { getWebhookKey(httpMethod: WebhookHttpMethod, path: string, webhookId?: string): string {
if (webhookId) { if (webhookId) {
@ -189,9 +174,6 @@ export class ActiveWebhooks {
/** /**
* Removes all webhooks of a workflow * Removes all webhooks of a workflow
* *
* @param {Workflow} workflow
* @returns {boolean}
* @memberof ActiveWebhooks
*/ */
async removeWorkflow(workflow: Workflow): Promise<boolean> { async removeWorkflow(workflow: Workflow): Promise<boolean> {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion // eslint-disable-next-line @typescript-eslint/no-non-null-assertion

View file

@ -32,8 +32,6 @@ export class ActiveWorkflows {
* Returns if the workflow is active * Returns if the workflow is active
* *
* @param {string} id The id of the workflow to check * @param {string} id The id of the workflow to check
* @returns {boolean}
* @memberof ActiveWorkflows
*/ */
isActive(id: string): boolean { isActive(id: string): boolean {
// eslint-disable-next-line no-prototype-builtins // eslint-disable-next-line no-prototype-builtins
@ -43,8 +41,6 @@ export class ActiveWorkflows {
/** /**
* Returns the ids of the currently active workflows * Returns the ids of the currently active workflows
* *
* @returns {string[]}
* @memberof ActiveWorkflows
*/ */
allActiveWorkflows(): string[] { allActiveWorkflows(): string[] {
return Object.keys(this.workflowData); return Object.keys(this.workflowData);
@ -54,9 +50,6 @@ export class ActiveWorkflows {
* Returns the Workflow data for the workflow with * Returns the Workflow data for the workflow with
* the given id if it is currently active * the given id if it is currently active
* *
* @param {string} id
* @returns {(WorkflowData | undefined)}
* @memberof ActiveWorkflows
*/ */
get(id: string): IWorkflowData | undefined { get(id: string): IWorkflowData | undefined {
return this.workflowData[id]; return this.workflowData[id];
@ -68,8 +61,6 @@ export class ActiveWorkflows {
* @param {string} id The id of the workflow to activate * @param {string} id The id of the workflow to activate
* @param {Workflow} workflow The workflow to activate * @param {Workflow} workflow The workflow to activate
* @param {IWorkflowExecuteAdditionalData} additionalData The additional data which is needed to run workflows * @param {IWorkflowExecuteAdditionalData} additionalData The additional data which is needed to run workflows
* @returns {Promise<void>}
* @memberof ActiveWorkflows
*/ */
async add( async add(
id: string, id: string,
@ -142,12 +133,6 @@ export class ActiveWorkflows {
/** /**
* Activates polling for the given node * 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( async activatePolling(
node: INode, node: INode,
@ -225,8 +210,6 @@ export class ActiveWorkflows {
* Makes a workflow inactive * Makes a workflow inactive
* *
* @param {string} id The id of the workflow to deactivate * @param {string} id The id of the workflow to deactivate
* @returns {Promise<void>}
* @memberof ActiveWorkflows
*/ */
async remove(id: string): Promise<void> { async remove(id: string): Promise<void> {
if (!this.isActive(id)) { if (!this.isActive(id)) {

View file

@ -84,8 +84,6 @@ export class LoadNodeParameterOptions {
/** /**
* Returns data of a fake workflow * Returns data of a fake workflow
* *
* @returns
* @memberof LoadNodeParameterOptions
*/ */
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
getWorkflowData() { getWorkflowData() {
@ -103,9 +101,6 @@ export class LoadNodeParameterOptions {
* Returns the available options via a predefined method * Returns the available options via a predefined method
* *
* @param {string} methodName The name of the method of which to get the data from * @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( async getOptionsViaMethodName(
methodName: string, methodName: string,
@ -140,9 +135,6 @@ export class LoadNodeParameterOptions {
* Returns the available options via a load request information * Returns the available options via a load request information
* *
* @param {ILoadOptions} loadOptions The load options which also contain the request information * @param {ILoadOptions} loadOptions The load options which also contain the request information
* @param {IWorkflowExecuteAdditionalData} additionalData
* @returns {Promise<INodePropertyOptions[]>}
* @memberof LoadNodeParameterOptions
*/ */
async getOptionsViaRequestProperty( async getOptionsViaRequestProperty(
loadOptions: ILoadOptions, loadOptions: ILoadOptions,

View file

@ -803,12 +803,6 @@ async function httpRequest(
/** /**
* Returns binary data buffer for given item index and property name. * 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( export async function getBinaryDataBuffer(
inputData: ITaskDataConnections, 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 * Takes a buffer and converts it into the format n8n uses. It encodes the binary data as
* base64 and adds metadata. * base64 and adds metadata.
* *
* @export
* @param {Buffer} binaryData
* @param {string} [filePath]
* @param {string} [mimeType]
* @returns {Promise<IBinaryData>}
*/ */
export async function prepareBinaryData( export async function prepareBinaryData(
binaryData: Buffer, binaryData: Buffer,
@ -911,14 +900,8 @@ export async function prepareBinaryData(
/** /**
* Makes a request using OAuth data for authentication * Makes a request using OAuth data for authentication
* *
* @export
* @param {IAllExecuteFunctions} this
* @param {string} credentialsType
* @param {(OptionsWithUri | requestPromise.RequestPromiseOptions)} requestOptions * @param {(OptionsWithUri | requestPromise.RequestPromiseOptions)} requestOptions
* @param {INode} node
* @param {IWorkflowExecuteAdditionalData} additionalData
* *
* @returns
*/ */
export async function requestOAuth2( export async function requestOAuth2(
this: IAllExecuteFunctions, this: IAllExecuteFunctions,
@ -1142,11 +1125,7 @@ export async function requestOAuth2(
/* Makes a request using OAuth1 data for authentication /* Makes a request using OAuth1 data for authentication
* *
* @export
* @param {IAllExecuteFunctions} this
* @param {string} credentialsType
* @param {(OptionsWithUrl | requestPromise.RequestPromiseOptions)} requestOptions * @param {(OptionsWithUrl | requestPromise.RequestPromiseOptions)} requestOptions
* @returns
*/ */
export async function requestOAuth1( export async function requestOAuth1(
this: IAllExecuteFunctions, this: IAllExecuteFunctions,
@ -1321,9 +1300,7 @@ export async function httpRequestWithAuthentication(
/** /**
* Takes generic input data and brings it into the json format n8n uses. * Takes generic input data and brings it into the json format n8n uses.
* *
* @export
* @param {(IDataObject | IDataObject[])} jsonData * @param {(IDataObject | IDataObject[])} jsonData
* @returns {INodeExecutionData[]}
*/ */
export function returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[] { export function returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[] {
const returnData: 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. * Takes generic input data and brings it into the new json, pairedItem format n8n uses.
* @export
* @param {(IPairedItemData)} itemData * @param {(IPairedItemData)} itemData
* @param {(INodeExecutionData[])} inputData * @param {(INodeExecutionData[])} inputData
* @returns {(NodeExecutionWithMetadata[])}
*/ */
export function constructExecutionMetaData( export function constructExecutionMetaData(
inputData: INodeExecutionData[], inputData: INodeExecutionData[],
@ -1366,9 +1341,7 @@ export function constructExecutionMetaData(
* Automatically put the objects under a 'json' key and don't error, * 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' * if some objects contain json/binary keys and others don't, throws error 'Inconsistent item format'
* *
* @export
* @param {INodeExecutionData | INodeExecutionData[]} executionData * @param {INodeExecutionData | INodeExecutionData[]} executionData
* @returns {INodeExecutionData[]}
*/ */
export function normalizeItems( export function normalizeItems(
executionData: INodeExecutionData | INodeExecutionData[], executionData: INodeExecutionData | INodeExecutionData[],
@ -1511,9 +1484,6 @@ export async function requestWithAuthentication(
/** /**
* Returns the additional keys for Expressions and Function-Nodes * Returns the additional keys for Expressions and Function-Nodes
* *
* @export
* @param {IWorkflowExecuteAdditionalData} additionalData
* @returns {(IWorkflowDataProxyAdditionalKeys)}
*/ */
export function getAdditionalKeys( export function getAdditionalKeys(
additionalData: IWorkflowExecuteAdditionalData, additionalData: IWorkflowExecuteAdditionalData,
@ -1528,12 +1498,9 @@ export function getAdditionalKeys(
/** /**
* Returns the requested decrypted credentials if the node has access to them. * Returns the requested decrypted credentials if the node has access to them.
* *
* @export
* @param {Workflow} workflow Workflow which requests the data * @param {Workflow} workflow Workflow which requests the data
* @param {INode} node Node which request the data * @param {INode} node Node which request the data
* @param {string} type The credential type to return * @param {string} type The credential type to return
* @param {IWorkflowExecuteAdditionalData} additionalData
* @returns {(ICredentialDataDecryptedObject | undefined)}
*/ */
export async function getCredentials( export async function getCredentials(
workflow: Workflow, workflow: Workflow,
@ -1662,9 +1629,6 @@ export async function getCredentials(
/** /**
* Returns a copy of the node * Returns a copy of the node
* *
* @export
* @param {INode} node
* @returns {INode}
*/ */
export function getNode(node: INode): INode { export function getNode(node: INode): INode {
return JSON.parse(JSON.stringify(node)); return JSON.parse(JSON.stringify(node));
@ -1703,16 +1667,7 @@ function cleanupParameterData(inputData: NodeParameterValueType): NodeParameterV
/** /**
* Returns the requested resolved (all expressions replaced) node parameters. * Returns the requested resolved (all expressions replaced) node parameters.
* *
* @export
* @param {Workflow} workflow
* @param {(IRunExecutionData | null)} runExecutionData * @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( export function getNodeParameter(
workflow: Workflow, workflow: Workflow,
@ -1773,9 +1728,6 @@ export function getNodeParameter(
/** /**
* Returns if execution should be continued even if there was an error. * Returns if execution should be continued even if there was an error.
* *
* @export
* @param {INode} node
* @returns {boolean}
*/ */
export function continueOnFail(node: INode): boolean { export function continueOnFail(node: INode): boolean {
return get(node, 'continueOnFail', false); 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 * 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( export function getNodeWebhookUrl(
name: string, name: string,
@ -1839,10 +1784,6 @@ export function getNodeWebhookUrl(
/** /**
* Returns the timezone for the workflow * Returns the timezone for the workflow
* *
* @export
* @param {Workflow} workflow
* @param {IWorkflowExecuteAdditionalData} additionalData
* @returns {string}
*/ */
export function getTimezone( export function getTimezone(
workflow: Workflow, workflow: Workflow,
@ -1858,11 +1799,6 @@ export function getTimezone(
/** /**
* Returns the full webhook description of the webhook with the given name * 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( export function getWebhookDescription(
name: string, name: string,
@ -1889,9 +1825,6 @@ export function getWebhookDescription(
/** /**
* Returns the workflow metadata * Returns the workflow metadata
* *
* @export
* @param {Workflow} workflow
* @returns {IWorkflowMetadata}
*/ */
export function getWorkflowMetadata(workflow: Workflow): IWorkflowMetadata { export function getWorkflowMetadata(workflow: Workflow): IWorkflowMetadata {
return { return {
@ -1904,12 +1837,6 @@ export function getWorkflowMetadata(workflow: Workflow): IWorkflowMetadata {
/** /**
* Returns the execute functions the poll nodes have access to. * 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 // TODO: Check if I can get rid of: additionalData, and so then maybe also at ActiveWorkflowRunner.add
export function getExecutePollFunctions( export function getExecutePollFunctions(
@ -2056,12 +1983,6 @@ export function getExecutePollFunctions(
/** /**
* Returns the execute functions the trigger nodes have access to. * 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 // TODO: Check if I can get rid of: additionalData, and so then maybe also at ActiveWorkflowRunner.add
export function getExecuteTriggerFunctions( export function getExecuteTriggerFunctions(
@ -2211,16 +2132,6 @@ export function getExecuteTriggerFunctions(
/** /**
* Returns the execute functions regular nodes have access to. * 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( export function getExecuteFunctions(
workflow: Workflow, workflow: Workflow,
@ -2480,17 +2391,6 @@ export function getExecuteFunctions(
/** /**
* Returns the execute functions regular nodes have access to when single-function is defined. * 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( export function getExecuteSingleFunctions(
workflow: Workflow, workflow: Workflow,
@ -2721,11 +2621,6 @@ export function getCredentialTestFunctions(): ICredentialTestFunctions {
/** /**
* Returns the execute functions regular nodes have access to in load-options-function. * 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( export function getLoadOptionsFunctions(
workflow: Workflow, workflow: Workflow,
@ -2853,12 +2748,6 @@ export function getLoadOptionsFunctions(
/** /**
* Returns the execute functions regular nodes have access to in hook-function. * 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( export function getExecuteHookFunctions(
workflow: Workflow, workflow: Workflow,
@ -3005,13 +2894,6 @@ export function getExecuteHookFunctions(
/** /**
* Returns the execute functions regular nodes have access to when webhook-function is defined. * 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( export function getExecuteWebhookFunctions(
workflow: Workflow, workflow: Workflow,

View file

@ -30,7 +30,6 @@ let settingsCache: IUserSettings | undefined;
/** /**
* Creates the user settings if they do not exist yet * Creates the user settings if they do not exist yet
* *
* @export
*/ */
export async function prepareUserSettings(): Promise<IUserSettings> { export async function prepareUserSettings(): Promise<IUserSettings> {
const settingsPath = getUserSettingsPath(); const settingsPath = getUserSettingsPath();
@ -71,8 +70,6 @@ export async function prepareUserSettings(): Promise<IUserSettings> {
* Returns the encryption key which is used to encrypt * Returns the encryption key which is used to encrypt
* the credentials. * the credentials.
* *
* @export
* @returns
*/ */
export async function getEncryptionKey(): Promise<string> { export async function getEncryptionKey(): Promise<string> {
@ -92,8 +89,6 @@ export async function getEncryptionKey(): Promise<string> {
/** /**
* Returns the instance ID * Returns the instance ID
* *
* @export
* @returns
*/ */
export async function getInstanceId(): Promise<string> { export async function getInstanceId(): Promise<string> {
const userSettings = await getUserSettings(); const userSettings = await getUserSettings();
@ -123,10 +118,8 @@ async function generateInstanceId(key?: string) {
* Adds/Overwrite the given settings in the currently * Adds/Overwrite the given settings in the currently
* saved user settings * saved user settings
* *
* @export
* @param {IUserSettings} addSettings The settings to add/overwrite * @param {IUserSettings} addSettings The settings to add/overwrite
* @param {string} [settingsPath] Optional settings file path * @param {string} [settingsPath] Optional settings file path
* @returns {Promise<IUserSettings>}
*/ */
export async function addToUserSettings( export async function addToUserSettings(
addSettings: IUserSettings, addSettings: IUserSettings,
@ -151,10 +144,8 @@ export async function addToUserSettings(
/** /**
* Writes a user settings file * Writes a user settings file
* *
* @export
* @param {IUserSettings} userSettings The settings to write * @param {IUserSettings} userSettings The settings to write
* @param {string} [settingsPath] Optional settings file path * @param {string} [settingsPath] Optional settings file path
* @returns {Promise<IUserSettings>}
*/ */
export async function writeUserSettings( export async function writeUserSettings(
userSettings: IUserSettings, userSettings: IUserSettings,
@ -190,8 +181,6 @@ export async function writeUserSettings(
/** /**
* Returns the content of the user settings * Returns the content of the user settings
* *
* @export
* @returns {UserSettings}
*/ */
export async function getUserSettings( export async function getUserSettings(
settingsPath?: string, settingsPath?: string,
@ -229,8 +218,6 @@ export async function getUserSettings(
/** /**
* Returns the path to the user settings * Returns the path to the user settings
* *
* @export
* @returns {string}
*/ */
export function getUserSettingsPath(): string { export function getUserSettingsPath(): string {
const n8nFolder = getUserN8nFolderPath(); const n8nFolder = getUserN8nFolderPath();
@ -242,8 +229,6 @@ export function getUserSettingsPath(): string {
* Returns the path to the n8n folder in which all n8n * Returns the path to the n8n folder in which all n8n
* related data gets saved * related data gets saved
* *
* @export
* @returns {string}
*/ */
export function getUserN8nFolderPath(): string { export function getUserN8nFolderPath(): string {
let userFolder; let userFolder;
@ -260,8 +245,6 @@ export function getUserN8nFolderPath(): string {
* Returns the path to the n8n user folder with the custom * Returns the path to the n8n user folder with the custom
* extensions like nodes and credentials * extensions like nodes and credentials
* *
* @export
* @returns {string}
*/ */
export function getUserN8nFolderCustomExtensionPath(): string { export function getUserN8nFolderCustomExtensionPath(): string {
return path.join(getUserN8nFolderPath(), EXTENSIONS_SUBDIRECTORY); 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 * Returns the path to the n8n user folder with the nodes that
* have been downloaded * have been downloaded
* *
* @export
* @returns {string}
*/ */
export function getUserN8nFolderDowloadedNodesPath(): string { export function getUserN8nFolderDowloadedNodesPath(): string {
return path.join(getUserN8nFolderPath(), DOWNLOADED_NODES_SUBDIRECTORY); 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 * none can be found it falls back to the current
* working directory * working directory
* *
* @export
* @returns {string}
*/ */
export function getUserHome(): string { export function getUserHome(): string {
let variableName = 'HOME'; let variableName = 'HOME';

View file

@ -77,8 +77,6 @@ export class WorkflowExecute {
* @param {Workflow} workflow The workflow to execute * @param {Workflow} workflow The workflow to execute
* @param {INode[]} [startNodes] Node to start execution from * @param {INode[]} [startNodes] Node to start execution from
* @param {string} [destinationNode] Node to stop execution at * @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 // IMPORTANT: Do not add "async" to this function, it will then convert the
// PCancelable to a regular Promise and does so not allow canceling // PCancelable to a regular Promise and does so not allow canceling
@ -145,11 +143,8 @@ export class WorkflowExecute {
* Executes the given workflow but only * Executes the given workflow but only
* *
* @param {Workflow} workflow The workflow to execute * @param {Workflow} workflow The workflow to execute
* @param {IRunData} runData
* @param {string[]} startNodes Nodes to start execution from * @param {string[]} startNodes Nodes to start execution from
* @param {string} destinationNode Node to stop execution at * @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 // IMPORTANT: Do not add "async" to this function, it will then convert the
// PCancelable to a regular Promise and does so not allow canceling // 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 * 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 // eslint-disable-next-line @typescript-eslint/no-explicit-any
async executeHook(hookName: string, parameters: any[]): Promise<void> { async executeHook(hookName: string, parameters: any[]): Promise<void> {
@ -679,9 +670,6 @@ export class WorkflowExecute {
/** /**
* Runs the given execution data. * 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 // IMPORTANT: Do not add "async" to this function, it will then convert the
// PCancelable to a regular Promise and does so not allow canceling // PCancelable to a regular Promise and does so not allow canceling

View file

@ -2,7 +2,6 @@
* Math.random should be unique because of its seeding algorithm. * 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. * Convert it to base 36 (numbers + letters), and grab the first 9 characters after the decimal.
* *
* @param baseId
*/ */
export function uid (baseId?: string): string { export function uid (baseId?: string): string {
return `${baseId ? `${baseId}-` : ''}${Math.random().toString(36).substring(2, 11)}`; return `${baseId ? `${baseId}-` : ''}${Math.random().toString(36).substring(2, 11)}`;

View file

@ -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} [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 {number} [httpStatusCode] The HTTP status code the response should have
* @param {string} [stack] The stack trace * @param {string} [stack] The stack trace
* @memberof ResponseError
*/ */
constructor (message: string, options: {errorCode?: number, httpStatusCode?: number, stack?: string} = {}) { constructor (message: string, options: {errorCode?: number, httpStatusCode?: number, stack?: string} = {}) {
super(message); super(message);

View file

@ -260,9 +260,7 @@ export default mixins(
* @param {string} [inputName='main'] The name of the input * @param {string} [inputName='main'] The name of the input
* @param {number} [outputIndex=0] The index of the output * @param {number} [outputIndex=0] The index of the output
* @param {boolean} [useShort=false] Use short notation $json vs. $node[NodeName].json * @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 { getNodeRunDataOutput(nodeName: string, runData: IRunData, filterText: string, itemIndex = 0, runIndex = 0, inputName = 'main', outputIndex = 0, useShort = false): IVariableSelectorOption[] | null {
if (!runData.hasOwnProperty(nodeName)) { if (!runData.hasOwnProperty(nodeName)) {
// No data found for node // 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} path The path to the node to pretend to key
* @param {string} [skipParameter] Parameter to skip * @param {string} [skipParameter] Parameter to skip
* @param {string} [filterText] Filter text for parameters * @param {string} [filterText] Filter text for parameters
* @returns */
* @memberof Workflow
*/
getNodeParameters (nodeName: string, path: string, skipParameter?: string, filterText?: string): IVariableSelectorOption[] | null { getNodeParameters (nodeName: string, path: string, skipParameter?: string, filterText?: string): IVariableSelectorOption[] | null {
const node = this.workflow.getNode(nodeName); const node = this.workflow.getNode(nodeName);
if (node === null) { if (node === null) {

View file

@ -107,9 +107,6 @@ export const pushConnection = mixins(
* is currently active. So internally resend the message * is currently active. So internally resend the message
* a few more times * a few more times
* *
* @param {Event} event
* @param {number} retryAttempts
* @returns
*/ */
queuePushMessage (event: Event, retryAttempts: number) { queuePushMessage (event: Event, retryAttempts: number) {
this.pushMessageQueue.push({ event, retriesLeft: retryAttempts }); 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 {Event} event The event data with the message data
* @param {boolean} [isRetry] If it is a retry * @param {boolean} [isRetry] If it is a retry
* @returns {boolean} If message could be processed
*/ */
pushMessageReceived (event: Event, isRetry?: boolean): boolean { pushMessageReceived (event: Event, isRetry?: boolean): boolean {
const retryAttempts = 5; const retryAttempts = 5;

View file

@ -32,9 +32,7 @@ import { makeRestApiRequest } from '@/api/helpers';
/** /**
* Unflattens the Execution data. * Unflattens the Execution data.
* *
* @export
* @param {IExecutionFlattedResponse} fullExecutionData The data to unflatten * @param {IExecutionFlattedResponse} fullExecutionData The data to unflatten
* @returns {IExecutionResponse}
*/ */
function unflattenExecutionData (fullExecutionData: IExecutionFlattedResponse): IExecutionResponse { function unflattenExecutionData (fullExecutionData: IExecutionFlattedResponse): IExecutionResponse {
// Unflatten the data // Unflatten the data

View file

@ -49,9 +49,6 @@ export const PERMISSIONS: IUserPermissions = {
/** /**
* To be authorized, user must pass all deny rules and pass any of the allow rules. * 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 => { export const isAuthorized = (permissions: IPermissions, currentUser: IUser | null): boolean => {
const loginStatus = currentUser ? LOGIN_STATUS.LoggedIn : LOGIN_STATUS.LoggedOut; const loginStatus = currentUser ? LOGIN_STATUS.LoggedIn : LOGIN_STATUS.LoggedOut;

View file

@ -44,6 +44,8 @@ export async function createCustomTsconfig() {
/** /**
* Builds and copies credentials and nodes * Builds and copies credentials and nodes
*
* @param {IBuildOptions} [options] Options to overwrite default behaviour
*/ */
export async function buildFiles({ export async function buildFiles({
destinationFolder = UserSettings.getUserN8nFolderCustomExtensionPath(), destinationFolder = UserSettings.getUserN8nFolderCustomExtensionPath(),

View file

@ -10,11 +10,9 @@ const fsCopyFile = promisify(fs.copyFile);
/** /**
* Creates a new credentials or node * Creates a new credentials or node
* *
* @export
* @param {string} sourceFilePath The path to the source template file * @param {string} sourceFilePath The path to the source template file
* @param {string} destinationFilePath The path the write the new file to * @param {string} destinationFilePath The path the write the new file to
* @param {object} replaceValues The values to replace in the template file * @param {object} replaceValues The values to replace in the template file
* @returns {Promise<void>}
*/ */
export async function createTemplate( export async function createTemplate(
sourceFilePath: string, sourceFilePath: string,

View file

@ -19,11 +19,6 @@ export interface IProduct {
/** /**
* Make an API request to ActiveCampaign * 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( export async function activeCampaignApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@ -77,13 +72,7 @@ export async function activeCampaignApiRequest(
* Make an API request to paginated ActiveCampaign endpoint * Make an API request to paginated ActiveCampaign endpoint
* and return all results * and return all results
* *
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this * @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/ */
export async function activeCampaignApiRequestAllItems( export async function activeCampaignApiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,

View file

@ -25,11 +25,6 @@ export interface IRecord {
/** /**
* Make an API request to Airtable * 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( export async function apiRequest(
this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions, this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
@ -79,13 +74,7 @@ export async function apiRequest(
* Make an API request to paginated Airtable endpoint * Make an API request to paginated Airtable endpoint
* and return all results * and return all results
* *
* @export
* @param {(IExecuteFunctions | IExecuteFunctions)} this * @param {(IExecuteFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/ */
export async function apiRequestAllItems( export async function apiRequestAllItems(
this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions, this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,

View file

@ -12,11 +12,6 @@ import { get } from 'lodash';
/** /**
* Make an API request to Asana * 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( export async function asanaApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,

View file

@ -74,9 +74,6 @@ export async function copperApiRequest(
/** /**
* Creates a secret from the credentials * Creates a secret from the credentials
* *
* @export
* @param {ICredentialDataDecryptedObject} credentials
* @returns
*/ */
export function getAutomaticSecret(credentials: ICredentialDataDecryptedObject) { export function getAutomaticSecret(credentials: ICredentialDataDecryptedObject) {
const data = `${credentials.email},${credentials.apiKey}`; const data = `${credentials.email},${credentials.apiKey}`;

View file

@ -7,11 +7,6 @@ import { IDataObject, NodeApiError } from 'n8n-workflow';
/** /**
* Make an API request to Dropbox * 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( export async function dropboxApiRequest(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,

View file

@ -18,8 +18,6 @@ export interface IExecReturnData {
/** /**
* Promisifiy exec manually to also get the exit code * Promisifiy exec manually to also get the exit code
* *
* @param {string} command
* @returns {Promise<IExecReturnData>}
*/ */
function execPromise(command: string): Promise<IExecReturnData> { function execPromise(command: string): Promise<IExecReturnData> {
const returnData: IExecReturnData = { const returnData: IExecReturnData = {

View file

@ -27,9 +27,6 @@ interface ScriptObject {
/** /**
* Make an API request to ActiveCampaign * Make an API request to ActiveCampaign
* *
* @param {IHookFunctions} this
* @param {string} method
* @returns {Promise<any>}
*/ */
export async function layoutsApiRequest( export async function layoutsApiRequest(
this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions, this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions,
@ -79,7 +76,6 @@ function parseLayouts(layouts: LayoutObject[]): INodePropertyOptions[] {
/** /**
* Make an API request to ActiveCampaign * Make an API request to ActiveCampaign
* *
* @returns {Promise<any>}
*/ */
export async function getFields( export async function getFields(
this: ILoadOptionsFunctions, this: ILoadOptionsFunctions,
@ -114,7 +110,6 @@ export async function getFields(
/** /**
* Make an API request to ActiveCampaign * Make an API request to ActiveCampaign
* *
* @returns {Promise<any>}
*/ */
export async function getPortals( export async function getPortals(
this: ILoadOptionsFunctions, this: ILoadOptionsFunctions,
@ -149,7 +144,6 @@ export async function getPortals(
/** /**
* Make an API request to ActiveCampaign * Make an API request to ActiveCampaign
* *
* @returns {Promise<any>}
*/ */
export async function getScripts( export async function getScripts(
this: ILoadOptionsFunctions, this: ILoadOptionsFunctions,

View file

@ -11,7 +11,6 @@ interface IFormIoCredentials {
/** /**
* Method has the logic to get jwt token from Form.io * Method has the logic to get jwt token from Form.io
* @param this
*/ */
async function getToken( async function getToken(
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, 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 * Method will call register or list webhooks based on the passed method in the parameter
* @param this
* @param method
*/ */
export async function formIoApiRequest( export async function formIoApiRequest(
this: IHookFunctions | ILoadOptionsFunctions | IWebhookFunctions, this: IHookFunctions | ILoadOptionsFunctions | IWebhookFunctions,

View file

@ -46,11 +46,6 @@ export enum FormstackFieldFormat {
/** /**
* Make an API request to Formstack * 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( export async function apiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
@ -93,13 +88,7 @@ export async function apiRequest(
* Make an API request to paginated Formstack endpoint * Make an API request to paginated Formstack endpoint
* and return all results * and return all results
* *
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this * @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/ */
export async function apiRequestAllItems( export async function apiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
@ -139,9 +128,6 @@ export async function apiRequestAllItems(
/** /**
* Returns all the available forms * Returns all the available forms
* *
* @export
* @param {ILoadOptionsFunctions} this
* @returns {Promise<INodePropertyOptions[]>}
*/ */
export async function getForms(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> { export async function getForms(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const endpoint = 'form.json'; const endpoint = 'form.json';
@ -165,10 +151,6 @@ export async function getForms(this: ILoadOptionsFunctions): Promise<INodeProper
/** /**
* Returns all the fields of a form * Returns all the fields of a form
* *
* @export
* @param {ILoadOptionsFunctions} this
* @param {string} formID
* @returns {Promise<IFormstackFieldDefinitionType[]>}
*/ */
export async function getFields( export async function getFields(
this: IWebhookFunctions, this: IWebhookFunctions,
@ -194,10 +176,6 @@ export async function getFields(
/** /**
* Returns all the fields of a form * Returns all the fields of a form
* *
* @export
* @param {ILoadOptionsFunctions} this
* @param {string} uniqueId
* @returns {Promise<IFormstackFieldDefinitionType[]>}
*/ */
export async function getSubmission( export async function getSubmission(
this: ILoadOptionsFunctions | IWebhookFunctions, this: ILoadOptionsFunctions | IWebhookFunctions,

View file

@ -7,11 +7,6 @@ import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
/** /**
* Make an API request to Github * 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( export async function githubApiRequest(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,
@ -68,13 +63,7 @@ export async function githubApiRequest(
/** /**
* Returns the SHA of the given file * Returns the SHA of the given file
* *
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this * @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} owner
* @param {string} repository
* @param {string} filePath
* @param {string} [branch]
* @returns {Promise<any>}
*/ */
export async function getFileSha( export async function getFileSha(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,

View file

@ -6,11 +6,6 @@ import { OptionsWithUri } from 'request';
/** /**
* Make an API request to Gitlab * 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( export async function gitlabApiRequest(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,

View file

@ -64,9 +64,6 @@ export class GoogleSheet {
/** /**
* Encodes the range that also none latin character work * Encodes the range that also none latin character work
* *
* @param {string} range
* @returns {string}
* @memberof GoogleSheet
*/ */
encodeRange(range: string): string { encodeRange(range: string): string {
if (range.includes('!')) { if (range.includes('!')) {
@ -79,9 +76,6 @@ export class GoogleSheet {
/** /**
* Clears values from a sheet * Clears values from a sheet
* *
* @param {string} range
* @returns {Promise<object>}
* @memberof GoogleSheet
*/ */
async clearData(range: string): Promise<object> { async clearData(range: string): Promise<object> {
const body = { const body = {
@ -306,8 +300,6 @@ export class GoogleSheet {
* @param {string} range The range to look for data * @param {string} range The range to look for data
* @param {number} keyRowIndex Index of the row which contains the keys * @param {number} keyRowIndex Index of the row which contains the keys
* @param {number} dataStartRowIndex Index of the first row which contains data * @param {number} dataStartRowIndex Index of the first row which contains data
* @returns {Promise<string[][]>}
* @memberof GoogleSheet
*/ */
async updateSheetData( async updateSheetData(
inputData: IDataObject[], inputData: IDataObject[],
@ -478,8 +470,6 @@ export class GoogleSheet {
* @param {number} dataStartRowIndex Index of the first row which contains data * @param {number} dataStartRowIndex Index of the first row which contains data
* @param {ILookupValues[]} lookupValues The lookup values which decide what data to return * @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 * @param {boolean} [returnAllMatches] Returns all the found matches instead of only the first one
* @returns {Promise<IDataObject[]>}
* @memberof GoogleSheet
*/ */
async lookupValues( async lookupValues(
inputData: string[][], inputData: string[][],

View file

@ -7,11 +7,6 @@ import { OptionsWithUri } from 'request';
/** /**
* Make an API request to HackerNews * 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( export async function hackerNewsApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@ -38,12 +33,7 @@ export async function hackerNewsApiRequest(
* Make an API request to HackerNews * Make an API request to HackerNews
* and return all results * and return all results
* *
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this * @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} qs
* @returns {Promise<any>}
*/ */
export async function hackerNewsApiRequestAllItems( export async function hackerNewsApiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,

View file

@ -7,11 +7,6 @@ import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
/** /**
* Make an API request to Message Bird * 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( export async function messageBirdApiRequest(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,

View file

@ -7,7 +7,6 @@ import { ITables } from './TableInterface';
* *
* @param {INodeExecutionData} item The item to copy * @param {INodeExecutionData} item The item to copy
* @param {string[]} properties The properties it should include * @param {string[]} properties The properties it should include
* @returns
*/ */
export function copyInputItem(item: INodeExecutionData, properties: string[]): IDataObject { export function copyInputItem(item: INodeExecutionData, properties: string[]): IDataObject {
// Prepare the data to insert and copy it to be returned // 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 {INodeExecutionData[]} items The items to extract the tables/columns for
* @param {function} getNodeParam getter for the Node's Parameters * @param {function} getNodeParam getter for the Node's Parameters
* @returns {ITables} {tableName: {colNames: [items]}};
*/ */
export function createTableStruct( export function createTableStruct(
getNodeParam: Function, getNodeParam: Function,
@ -60,7 +58,6 @@ export function createTableStruct(
* *
* @param {ITables} tables The ITables to be processed. * @param {ITables} tables The ITables to be processed.
* @param {function} buildQueryQueue function that builds the queue of promises * @param {function} buildQueryQueue function that builds the queue of promises
* @returns {Promise}
*/ */
// tslint:disable-next-line: no-any // tslint:disable-next-line: no-any
export function executeQueryQueue(tables: ITables, buildQueryQueue: Function): Promise<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 * Extracts the values from the item for INSERT
* *
* @param {IDataObject} item The item to extract * @param {IDataObject} item The item to extract
* @returns {string} (Val1, Val2, ...)
*/ */
export function extractValues(item: IDataObject): string { export function extractValues(item: IDataObject): string {
return `(${Object.values(item as any) // tslint:disable-line:no-any 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 {IDataObject} item The item to extract from
* @param {string[]} columns The columns to update * @param {string[]} columns The columns to update
* @returns {string} col1 = val1, col2 = val2
*/ */
export function extractUpdateSet(item: IDataObject, columns: string[]): string { export function extractUpdateSet(item: IDataObject, columns: string[]): string {
return columns return columns
@ -124,7 +119,6 @@ export function extractUpdateSet(item: IDataObject, columns: string[]): string {
* *
* @param {IDataObject} item The item to extract from * @param {IDataObject} item The item to extract from
* @param {string} key The column name to build the condition with * @param {string} key The column name to build the condition with
* @returns {string} id = '123'
*/ */
export function extractUpdateCondition(item: IDataObject, key: string): string { export function extractUpdateCondition(item: IDataObject, key: string): string {
return `${key} = ${typeof item[key] === 'string' ? `'${item[key]}'` : item[key]}`; 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 {IDataObject[]} items The items to extract the values from
* @param {string} key The column name to extract the value from for the delete condition * @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 { export function extractDeleteValues(items: IDataObject[], key: string): string {
return `(${items return `(${items

View file

@ -5,11 +5,6 @@ import { IDataObject, JsonObject, NodeApiError, NodeOperationError } from 'n8n-w
/** /**
* Make an API request to Twilio * 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( export async function moceanApiRequest(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,

View file

@ -32,7 +32,6 @@ export function buildParameterizedConnString(credentials: IMongoParametricCreden
* Build mongoDb connection string and resolve database name. * 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 * 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 * @param {ICredentialDataDecryptedObject} credentials raw/input MongoDB credentials to use
*/ */
export function buildMongoConnectionParams( export function buildMongoConnectionParams(
@ -66,7 +65,6 @@ export function buildMongoConnectionParams(
/** /**
* Verify credentials. If ok, build mongoDb connection string and resolve database name. * Verify credentials. If ok, build mongoDb connection string and resolve database name.
* *
* @param {IExecuteFunctions} self
* @param {ICredentialDataDecryptedObject} credentials raw/input MongoDB credentials to use * @param {ICredentialDataDecryptedObject} credentials raw/input MongoDB credentials to use
*/ */
export function validateAndResolveMongoCredentials( export function validateAndResolveMongoCredentials(

View file

@ -5,11 +5,6 @@ import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
/** /**
* Make an API request to MSG91 * 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( export async function msg91ApiRequest(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,

View file

@ -6,7 +6,6 @@ import { IDataObject, INodeExecutionData } from 'n8n-workflow';
* *
* @param {INodeExecutionData[]} items The items to copy * @param {INodeExecutionData[]} items The items to copy
* @param {string[]} properties The properties it should include * @param {string[]} properties The properties it should include
* @returns
*/ */
export function copyInputItems(items: INodeExecutionData[], properties: string[]): IDataObject[] { export function copyInputItems(items: INodeExecutionData[], properties: string[]): IDataObject[] {
// Prepare the data to insert and copy it to be returned // Prepare the data to insert and copy it to be returned

View file

@ -7,11 +7,6 @@ import { OptionsWithUri } from 'request';
/** /**
* Make an API request to NextCloud * 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( export async function nextCloudApiRequest(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,

View file

@ -21,11 +21,6 @@ interface IAttachment {
/** /**
* Make an API request to NocoDB * 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( export async function apiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
@ -76,13 +71,7 @@ export async function apiRequest(
* Make an API request to paginated NocoDB endpoint * Make an API request to paginated NocoDB endpoint
* and return all results * and return all results
* *
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this * @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/ */
export async function apiRequestAllItems( export async function apiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | IPollFunctions, this: IHookFunctions | IExecuteFunctions | IPollFunctions,

View file

@ -86,7 +86,6 @@ export class Onfleet {
* @param addressCity Destination city * @param addressCity Destination city
* @param addressCountry Destination country * @param addressCountry Destination country
* @param additionalFields Destination additional fields * @param additionalFields Destination additional fields
* @returns
*/ */
/** /**
@ -94,7 +93,6 @@ export class Onfleet {
* @param item Current execution data * @param item Current execution data
* @param operation Current destination operation * @param operation Current destination operation
* @param shared Whether the collection is in other resource or not * @param shared Whether the collection is in other resource or not
* @returns {OnfleetDestination} Destination information
*/ */
static getDestinationFields( static getDestinationFields(
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@ -181,7 +179,6 @@ export class Onfleet {
* Gets the properties of an administrator according to the operation chose * Gets the properties of an administrator according to the operation chose
* @param item Current execution data * @param item Current execution data
* @param operation Current administrator operation * @param operation Current administrator operation
* @returns {OnfleetAdmins} Administrator information
*/ */
static getAdminFields( static getAdminFields(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -221,7 +218,6 @@ export class Onfleet {
* Gets the properties of a hub according to the operation chose * Gets the properties of a hub according to the operation chose
* @param item Current execution data * @param item Current execution data
* @param operation Current hub operation * @param operation Current hub operation
* @returns {OnfleetHubs|null} Hub information
*/ */
static getHubFields( static getHubFields(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -273,7 +269,6 @@ export class Onfleet {
* Gets the properties of a worker according to the operation chose * Gets the properties of a worker according to the operation chose
* @param item Current execution data * @param item Current execution data
* @param operation Current worker operation * @param operation Current worker operation
* @returns {OnfleetWorker|OnfleetWorkerFilter|OnfleetWorkerSchedule|null} Worker information
*/ */
static getWorkerFields( static getWorkerFields(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -379,7 +374,6 @@ export class Onfleet {
* Gets the properties of a webhooks according to the operation chose * Gets the properties of a webhooks according to the operation chose
* @param item Current execution data * @param item Current execution data
* @param operation Current webhooks operation * @param operation Current webhooks operation
* @returns {OnfleetWebhook} Webhooks information
*/ */
static getWebhookFields( static getWebhookFields(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -409,7 +403,6 @@ export class Onfleet {
* @param name Recipient name * @param name Recipient name
* @param phone Recipient phone * @param phone Recipient phone
* @param additionalFields Recipient additional fields * @param additionalFields Recipient additional fields
* @returns
*/ */
static formatRecipient( static formatRecipient(
name: string, name: string,
@ -439,7 +432,6 @@ export class Onfleet {
* @param item Current execution data * @param item Current execution data
* @param operation Current recipient operation * @param operation Current recipient operation
* @param shared Whether the collection is in other resource or not * @param shared Whether the collection is in other resource or not
* @returns {OnfleetRecipient} Recipient information
*/ */
static getRecipientFields( static getRecipientFields(
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@ -509,7 +501,6 @@ export class Onfleet {
* Gets the properties of a task according to the operation chose * Gets the properties of a task according to the operation chose
* @param item Current execution data * @param item Current execution data
* @param operation Current task operation * @param operation Current task operation
* @returns {OnfleetListTaskFilters | OnfleetTask } Task information
*/ */
static getTaskFields( static getTaskFields(
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@ -647,7 +638,6 @@ export class Onfleet {
* Gets the properties of a team according to the operation chose * Gets the properties of a team according to the operation chose
* @param item Current execution data * @param item Current execution data
* @param operation Current team operation * @param operation Current team operation
* @returns {OnfleetTeams} Team information
*/ */
static getTeamFields( static getTeamFields(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -792,7 +782,6 @@ export class Onfleet {
* @param resource Resource to be executed (Task) * @param resource Resource to be executed (Task)
* @param operation Operation to be executed * @param operation Operation to be executed
* @param items Number of items to process by the node * @param items Number of items to process by the node
* @returns Task information
*/ */
static async executeTaskOperations( static async executeTaskOperations(
this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@ -913,7 +902,6 @@ export class Onfleet {
* @param resource Resource to be executed (Destination) * @param resource Resource to be executed (Destination)
* @param operation Operation to be executed * @param operation Operation to be executed
* @param items Number of items to process by the node * @param items Number of items to process by the node
* @returns Destination information
*/ */
static async executeDestinationOperations( static async executeDestinationOperations(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -959,7 +947,6 @@ export class Onfleet {
* @param resource Resource to be executed (Organization) * @param resource Resource to be executed (Organization)
* @param operation Operation to be executed * @param operation Operation to be executed
* @param items Number of items to process by the node * @param items Number of items to process by the node
* @returns Organization information
*/ */
static async executeOrganizationOperations( static async executeOrganizationOperations(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -1002,7 +989,6 @@ export class Onfleet {
* @param resource Resource to be executed (Recipient) * @param resource Resource to be executed (Recipient)
* @param operation Operation to be executed * @param operation Operation to be executed
* @param items Number of items to process by the node * @param items Number of items to process by the node
* @returns Recipient information
*/ */
static async executeRecipientOperations( static async executeRecipientOperations(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -1060,7 +1046,6 @@ export class Onfleet {
* @param resource Resource to be executed (Administrator) * @param resource Resource to be executed (Administrator)
* @param operation Operation to be executed * @param operation Operation to be executed
* @param items Number of items to process by the node * @param items Number of items to process by the node
* @returns Administrator information
*/ */
static async executeAdministratorOperations( static async executeAdministratorOperations(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -1123,7 +1108,6 @@ export class Onfleet {
* @param resource Resource to be executed (Hub) * @param resource Resource to be executed (Hub)
* @param operation Operation to be executed * @param operation Operation to be executed
* @param items Number of items to process by the node * @param items Number of items to process by the node
* @returns Hub information
*/ */
static async executeHubOperations( static async executeHubOperations(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -1180,7 +1164,6 @@ export class Onfleet {
* @param resource Resource to be executed (Worker) * @param resource Resource to be executed (Worker)
* @param operation Operation to be executed * @param operation Operation to be executed
* @param items Number of items to process by the node * @param items Number of items to process by the node
* @returns Workers information
*/ */
static async executeWorkerOperations( static async executeWorkerOperations(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -1299,7 +1282,6 @@ export class Onfleet {
* @param resource Resource to be executed (Webhook) * @param resource Resource to be executed (Webhook)
* @param operation Operation to be executed * @param operation Operation to be executed
* @param items Number of items to process by the node * @param items Number of items to process by the node
* @returns Webhook information
*/ */
static async executeWebhookOperations( static async executeWebhookOperations(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -1348,7 +1330,6 @@ export class Onfleet {
* @param resource Resource to be executed (Container) * @param resource Resource to be executed (Container)
* @param operation Operation to be executed * @param operation Operation to be executed
* @param items Number of items to process by the node * @param items Number of items to process by the node
* @returns Container information
*/ */
static async executeContainerOperations( static async executeContainerOperations(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -1407,7 +1388,6 @@ export class Onfleet {
* @param resource Resource to be executed (Team) * @param resource Resource to be executed (Team)
* @param operation Operation to be executed * @param operation Operation to be executed
* @param items Number of items to process by the node * @param items Number of items to process by the node
* @returns Team information
*/ */
static async executeTeamOperations( static async executeTeamOperations(
this: IExecuteFunctions, this: IExecuteFunctions,

View file

@ -133,7 +133,6 @@ export class OnfleetTrigger implements INodeType {
/** /**
* Triggered function when an Onfleet webhook is executed * Triggered function when an Onfleet webhook is executed
* @returns {Promise<IWebhookResponseData>} Response data
*/ */
async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> { async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> {
const req = this.getRequestObject(); const req = this.getRequestObject();

View file

@ -21,11 +21,6 @@ export interface ICustomProperties {
/** /**
* Make an API request to Pipedrive * 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( export async function pipedriveApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@ -98,13 +93,7 @@ export async function pipedriveApiRequest(
* Make an API request to paginated Pipedrive endpoint * Make an API request to paginated Pipedrive endpoint
* and return all results * and return all results
* *
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this * @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/ */
export async function pipedriveApiRequestAllItems( export async function pipedriveApiRequestAllItems(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,
@ -148,10 +137,7 @@ export async function pipedriveApiRequestAllItems(
/** /**
* Gets the custom properties from Pipedrive * Gets the custom properties from Pipedrive
* *
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this * @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} resource
* @returns {Promise<ICustomProperties>}
*/ */
export async function pipedriveGetCustomProperties( export async function pipedriveGetCustomProperties(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,
@ -197,9 +183,6 @@ export async function pipedriveGetCustomProperties(
* Converts names and values of custom properties from their actual values to the * Converts names and values of custom properties from their actual values to the
* Pipedrive internal ones * Pipedrive internal ones
* *
* @export
* @param {ICustomProperties} customProperties
* @param {IDataObject} item
*/ */
export function pipedriveEncodeCustomProperties( export function pipedriveEncodeCustomProperties(
customProperties: ICustomProperties, customProperties: ICustomProperties,
@ -243,9 +226,6 @@ export function pipedriveEncodeCustomProperties(
/** /**
* Converts names and values of custom properties to their actual values * Converts names and values of custom properties to their actual values
* *
* @export
* @param {ICustomProperties} customProperties
* @param {IDataObject} item
*/ */
export function pipedriveResolveCustomProperties( export function pipedriveResolveCustomProperties(
customProperties: ICustomProperties, customProperties: ICustomProperties,

View file

@ -7,11 +7,6 @@ import { OptionsWithUri } from 'request';
/** /**
* Make an API request to Plivo. * 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( export async function plivoApiRequest(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,

View file

@ -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 * This function makes sure binId is in the expected format by parsing it
* from current node parameter value. * from current node parameter value.
* *
* @export
* @param {IExecuteSingleFunctions} this
* @param {IHttpRequestOptions} requestOptions
* @returns {Promise<IHttpRequestOptions>} requestOptions
*/ */
export async function buildBinAPIURL( export async function buildBinAPIURL(
this: IExecuteSingleFunctions, this: IExecuteSingleFunctions,
@ -35,10 +31,6 @@ export async function buildBinAPIURL(
* This function makes sure binId is in the expected format by parsing it * This function makes sure binId is in the expected format by parsing it
* from current node parameter value. * from current node parameter value.
* *
* @export
* @param {IExecuteSingleFunctions} this
* @param {IHttpRequestOptions} requestOptions
* @returns {Promise<IHttpRequestOptions>} requestOptions
*/ */
export async function buildBinTestURL( export async function buildBinTestURL(
this: IExecuteSingleFunctions, this: IExecuteSingleFunctions,
@ -56,10 +48,6 @@ export async function buildBinTestURL(
* This function makes sure binId is in the expected format by parsing it * This function makes sure binId is in the expected format by parsing it
* from current node parameter value. * from current node parameter value.
* *
* @export
* @param {IExecuteSingleFunctions} this
* @param {IHttpRequestOptions} requestOptions
* @returns {Promise<IHttpRequestOptions>} requestOptions
*/ */
export async function buildRequestURL( export async function buildRequestURL(
this: IExecuteSingleFunctions, this: IExecuteSingleFunctions,
@ -78,9 +66,6 @@ export async function buildRequestURL(
* PostBin URL or from the string in the following format: * PostBin URL or from the string in the following format:
* `Bin '<binId>'.` * `Bin '<binId>'.`
* *
* @param {IExecuteSingleFunctions} this
* @param {IHttpRequestOptions} requestOptions
* @returns {Promise<IHttpRequestOptions>} requestOptions
*/ */
function parseBinId(context: IExecuteSingleFunctions) { function parseBinId(context: IExecuteSingleFunctions) {
const binId = context.getNodeParameter('binId') as string; const binId = context.getNodeParameter('binId') as string;
@ -108,10 +93,6 @@ function parseBinId(context: IExecuteSingleFunctions) {
/** /**
* Converts the bin response data and adds additional properties * 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( export async function transformBinReponse(
this: IExecuteSingleFunctions, this: IExecuteSingleFunctions,

View file

@ -9,7 +9,6 @@ import pg from 'pg-promise/typescript/pg-subset';
* *
* @param {INodeExecutionData[]} items The items to copy * @param {INodeExecutionData[]} items The items to copy
* @param {string[]} properties The properties it should include * @param {string[]} properties The properties it should include
* @returns
*/ */
export function getItemsCopy( export function getItemsCopy(
items: INodeExecutionData[], items: INodeExecutionData[],
@ -38,7 +37,6 @@ export function getItemsCopy(
* *
* @param {INodeExecutionData} item The item to copy * @param {INodeExecutionData} item The item to copy
* @param {string[]} properties The properties it should include * @param {string[]} properties The properties it should include
* @returns
*/ */
export function getItemCopy( export function getItemCopy(
item: INodeExecutionData, item: INodeExecutionData,
@ -62,7 +60,6 @@ export function getItemCopy(
* Returns a returning clause from a comma separated string * Returns a returning clause from a comma separated string
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance * @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
* @param string returning The comma separated string * @param string returning The comma separated string
* @returns string
*/ */
export function generateReturning(pgp: pgPromise.IMain<{}, pg.IClient>, returning: string): string { export function generateReturning(pgp: pgPromise.IMain<{}, pg.IClient>, returning: string): string {
return ( 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.IMain<{}, pg.IClient>} pgp The pgPromise instance
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection * @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
* @param {input[]} input The Node's input data * @param {input[]} input The Node's input data
* @returns Promise<Array<IDataObject>>
*/ */
export async function pgQuery( export async function pgQuery(
getNodeParam: Function, getNodeParam: Function,
@ -251,7 +247,6 @@ export async function pgQueryV2(
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance * @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection * @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
* @param {INodeExecutionData[]} items The items to be inserted * @param {INodeExecutionData[]} items The items to be inserted
* @returns Promise<Array<IDataObject>>
*/ */
export async function pgInsert( export async function pgInsert(
getNodeParam: Function, getNodeParam: Function,
@ -340,7 +335,6 @@ export async function pgInsert(
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance * @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection * @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
* @param {INodeExecutionData[]} items The items to be inserted * @param {INodeExecutionData[]} items The items to be inserted
* @returns Promise<Array<IDataObject>>
*/ */
export async function pgInsertV2( export async function pgInsertV2(
this: IExecuteFunctions, this: IExecuteFunctions,
@ -375,7 +369,8 @@ export async function pgInsertV2(
const query = const query =
pgp.helpers.insert(getItemsCopy(items, columnNames, guardedColumns), cs) + returning; pgp.helpers.insert(getItemsCopy(items, columnNames, guardedColumns), cs) + returning;
const queryResult = await db.any(query); const queryResult = await db.any(query);
return queryResult.map((result, i) => { return queryResult
.map((result, i) => {
return this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(result), { return this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(result), {
itemData: { item: i }, itemData: { item: i },
}); });
@ -446,7 +441,6 @@ export async function pgInsertV2(
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance * @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection * @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
* @param {INodeExecutionData[]} items The items to be updated * @param {INodeExecutionData[]} items The items to be updated
* @returns Promise<Array<IDataObject>>
*/ */
export async function pgUpdate( export async function pgUpdate(
getNodeParam: Function, getNodeParam: Function,
@ -569,7 +563,6 @@ export async function pgUpdate(
* @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance * @param {pgPromise.IMain<{}, pg.IClient>} pgp The pgPromise instance
* @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection * @param {pgPromise.IDatabase<{}, pg.IClient>} db The pgPromise database connection
* @param {INodeExecutionData[]} items The items to be updated * @param {INodeExecutionData[]} items The items to be updated
* @returns Promise<Array<IDataObject>>
*/ */
export async function pgUpdateV2( export async function pgUpdateV2(
this: IExecuteFunctions, this: IExecuteFunctions,

View file

@ -97,9 +97,6 @@ export async function salesforceApiRequestAllItems(
/** /**
* Sorts the given options alphabetically * Sorts the given options alphabetically
* *
* @export
* @param {INodePropertyOptions[]} options
* @returns {INodePropertyOptions[]}
*/ */
export function sortOptions(options: INodePropertyOptions[]): void { export function sortOptions(options: INodePropertyOptions[]): void {
options.sort((a, b) => { options.sort((a, b) => {

View file

@ -89,9 +89,6 @@ export function validateJSON(json: string | undefined): any {
/** /**
* Converts data from the Salesmate format into a simple object * Converts data from the Salesmate format into a simple object
* *
* @export
* @param {IDataObject[]} data
* @returns {IDataObject}
*/ */
export function simplifySalesmateData(data: IDataObject[]): IDataObject { export function simplifySalesmateData(data: IDataObject[]): IDataObject {
const returnData: IDataObject = {}; const returnData: IDataObject = {};

View file

@ -8,13 +8,6 @@ import { OptionsWithUri } from 'request';
* Make an API request to SIGNL4 * Make an API request to SIGNL4
* *
* @param {IHookFunctions | IExecuteFunctions} this * @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>}
* *
*/ */

View file

@ -8,10 +8,7 @@ import { OptionsWithUri } from 'request';
* Make an API request to Sms77 * Make an API request to Sms77
* *
* @param {IHookFunctions | IExecuteFunctions} this * @param {IHookFunctions | IExecuteFunctions} this
* @param {string} method
* @param {Endpoint} endpoint
* @param {object | undefined} data * @param {object | undefined} data
* @returns {Promise<any>}
*/ */
export async function sms77ApiRequest( export async function sms77ApiRequest(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,

View file

@ -9,11 +9,6 @@ import { get } from 'lodash';
/** /**
* Make an API request to Spotify * 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( export async function spotifyApiRequest(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,

View file

@ -22,7 +22,6 @@ import {
* Flattens an object with deep data * Flattens an object with deep data
* *
* @param {IDataObject} data The object to flatten * @param {IDataObject} data The object to flatten
* @returns
*/ */
function flattenObject(data: IDataObject) { function flattenObject(data: IDataObject) {
const returnData: IDataObject = {}; const returnData: IDataObject = {};

View file

@ -7,11 +7,6 @@ import { IDataObject, IPollFunctions, NodeApiError } from 'n8n-workflow';
/** /**
* Make an API request to Airtable * 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( export async function apiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
@ -56,13 +51,7 @@ export async function apiRequest(
* Make an API request to paginated Airtable endpoint * Make an API request to paginated Airtable endpoint
* and return all results * and return all results
* *
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this * @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/ */
export async function apiRequestAllItems( export async function apiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | IPollFunctions, this: IHookFunctions | IExecuteFunctions | IPollFunctions,

View file

@ -9,11 +9,6 @@ import { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-wo
/** /**
* Make an API request to Stripe * 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( export async function stripeApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,

View file

@ -60,10 +60,8 @@ export interface IMarkupReplyKeyboardRemove {
/** /**
* Add the additional fields to the body * Add the additional fields to the body
* *
* @param {IExecuteFunctions} this
* @param {IDataObject} body The body object to add fields to * @param {IDataObject} body The body object to add fields to
* @param {number} index The index of the item * @param {number} index The index of the item
* @returns
*/ */
export function addAdditionalFields(this: IExecuteFunctions, body: IDataObject, index: number) { export function addAdditionalFields(this: IExecuteFunctions, body: IDataObject, index: number) {
// Add the additional fields // Add the additional fields
@ -140,11 +138,6 @@ export function addAdditionalFields(this: IExecuteFunctions, body: IDataObject,
/** /**
* Make an API request to Telegram * 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( export async function apiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,

View file

@ -7,11 +7,6 @@ import { IDataObject, JsonObject, NodeApiError } from 'n8n-workflow';
/** /**
* Make an API request to Trello * 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( export async function apiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,

View file

@ -6,11 +6,6 @@ import { OptionsWithUri } from 'request';
/** /**
* Make an API request to Twake * 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( export async function twakeApiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,

View file

@ -7,11 +7,6 @@ import { OptionsWithUri } from 'request';
/** /**
* Make an API request to Twilio * 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( export async function twilioApiRequest(
this: IHookFunctions | IExecuteFunctions, this: IHookFunctions | IExecuteFunctions,

View file

@ -32,11 +32,6 @@ export interface ITypeformAnswerField {
/** /**
* Make an API request to Typeform * 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( export async function apiRequest(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@ -74,13 +69,7 @@ export async function apiRequest(
* Make an API request to paginated Typeform endpoint * Make an API request to paginated Typeform endpoint
* and return all results * and return all results
* *
* @export
* @param {(IHookFunctions | IExecuteFunctions)} this * @param {(IHookFunctions | IExecuteFunctions)} this
* @param {string} method
* @param {string} endpoint
* @param {IDataObject} body
* @param {IDataObject} [query]
* @returns {Promise<any>}
*/ */
export async function apiRequestAllItems( export async function apiRequestAllItems(
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
@ -118,9 +107,6 @@ export async function apiRequestAllItems(
/** /**
* Returns all the available forms * Returns all the available forms
* *
* @export
* @param {ILoadOptionsFunctions} this
* @returns {Promise<INodePropertyOptions[]>}
*/ */
export async function getForms(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> { export async function getForms(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const endpoint = 'forms'; const endpoint = 'forms';

View file

@ -95,9 +95,6 @@ export async function woocommerceApiRequestAllItems(
/** /**
* Creates a secret from the credentials * Creates a secret from the credentials
* *
* @export
* @param {ICredentialDataDecryptedObject} credentials
* @returns
*/ */
export function getAutomaticSecret(credentials: ICredentialDataDecryptedObject) { export function getAutomaticSecret(credentials: ICredentialDataDecryptedObject) {
const data = `${credentials.consumerKey},${credentials.consumerSecret}`; const data = `${credentials.consumerKey},${credentials.consumerSecret}`;

View file

@ -5,7 +5,6 @@
* *
* @param {Array} array The array to process. * @param {Array} array The array to process.
* @param {number} [size=1] The length of each chunk * @param {number} [size=1] The length of each chunk
* @returns {Array} Returns the new array of chunks.
* @example * @example
* *
* chunk(['a', 'b', 'c', 'd'], 2) * 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. * Takes a multidimensional array and converts it to a one-dimensional array.
* *
* @param {Array} nestedArray The array to be flattened. * @param {Array} nestedArray The array to be flattened.
* @returns {Array} Returns the new flattened array.
* @example * @example
* *
* flatten([['a', 'b'], ['c', 'd']]) * flatten([['a', 'b'], ['c', 'd']])

View file

@ -41,9 +41,6 @@ export class Expression {
* Converts an object to a string in a way to make it clear that * Converts an object to a string in a way to make it clear that
* the value comes from an object * the value comes from an object
* *
* @param {object} value
* @returns {string}
* @memberof Workflow
*/ */
convertObjectValueToString(value: object): string { convertObjectValueToString(value: object): string {
const typeName = Array.isArray(value) ? 'Array' : 'Object'; 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 * 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. * return the result. For everything simply the supplied value will be returned.
* *
* @param {NodeParameterValue} parameterValue
* @param {(IRunExecutionData | null)} runExecutionData * @param {(IRunExecutionData | null)} runExecutionData
* @param {number} runIndex
* @param {number} itemIndex
* @param {string} activeNodeName
* @param {INodeExecutionData[]} connectionInputData
* @param {boolean} [returnObjectAsString=false] * @param {boolean} [returnObjectAsString=false]
* @returns {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[])}
* @memberof Workflow
*/ */
resolveSimpleParameterValue( resolveSimpleParameterValue(
parameterValue: NodeParameterValue, parameterValue: NodeParameterValue,
@ -295,11 +285,7 @@ export class Expression {
/** /**
* Resolves value of parameter. But does not work for workflow-data. * Resolves value of parameter. But does not work for workflow-data.
* *
* @param {INode} node
* @param {(string | undefined)} parameterValue * @param {(string | undefined)} parameterValue
* @param {string} [defaultValue]
* @returns {(string | undefined)}
* @memberof Workflow
*/ */
getSimpleParameterValue( getSimpleParameterValue(
node: INode, node: INode,
@ -342,11 +328,8 @@ export class Expression {
/** /**
* Resolves value of complex parameter. But does not work for workflow-data. * 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[])} parameterValue
* @param {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | undefined)} [defaultValue] * @param {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | undefined)} [defaultValue]
* @returns {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[] | undefined)}
* @memberof Workflow
*/ */
getComplexParameterValue( getComplexParameterValue(
node: INode, node: INode,
@ -413,13 +396,7 @@ export class Expression {
* *
* @param {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[])} parameterValue * @param {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[])} parameterValue
* @param {(IRunExecutionData | null)} runExecutionData * @param {(IRunExecutionData | null)} runExecutionData
* @param {number} runIndex
* @param {number} itemIndex
* @param {string} activeNodeName
* @param {INodeExecutionData[]} connectionInputData
* @param {boolean} [returnObjectAsString=false] * @param {boolean} [returnObjectAsString=false]
* @returns {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[])}
* @memberof Workflow
*/ */
getParameterValue( getParameterValue(
parameterValue: NodeParameterValueType | INodeParameterResourceLocator, parameterValue: NodeParameterValueType | INodeParameterResourceLocator,

View file

@ -116,10 +116,6 @@ abstract class NodeError extends ExecutionBaseError {
* Otherwise, if all the paths have been exhausted and no value is eligible, `null` is * Otherwise, if all the paths have been exhausted and no value is eligible, `null` is
* returned. * returned.
* *
* @param {JsonObject} error
* @param {string[]} potentialKeys
* @param {string[]} traversalKeys
* @returns {string | null}
*/ */
protected findProperty( protected findProperty(
error: JsonObject, error: JsonObject,
@ -335,7 +331,6 @@ export class NodeApiError extends NodeError {
/** /**
* Set the error's message based on the HTTP status code. * Set the error's message based on the HTTP status code.
* *
* @returns {void}
*/ */
private setMessage() { private setMessage() {
if (!this.httpCode) { if (!this.httpCode) {

View file

@ -232,9 +232,6 @@ export const cronNodeOptions: INodePropertyCollection[] = [
* Gets special parameters which should be added to nodeTypes depending * Gets special parameters which should be added to nodeTypes depending
* on their type or configuration * on their type or configuration
* *
* @export
* @param {INodeType} nodeType
* @returns
*/ */
export function getSpecialNodeParameters(nodeType: INodeType): INodeProperties[] { export function getSpecialNodeParameters(nodeType: INodeType): INodeProperties[] {
if (nodeType.description.polling === true) { if (nodeType.description.polling === true) {
@ -261,12 +258,10 @@ export function getSpecialNodeParameters(nodeType: INodeType): INodeProperties[]
/** /**
* Returns if the parameter should be displayed or not * Returns if the parameter should be displayed or not
* *
* @export
* @param {INodeParameters} nodeValues The data on the node which decides if the parameter * @param {INodeParameters} nodeValues The data on the node which decides if the parameter
* should be displayed * should be displayed
* @param {(INodeProperties | INodeCredentialDescription)} parameter The parameter to check if it should be displayed * @param {(INodeProperties | INodeCredentialDescription)} parameter The parameter to check if it should be displayed
* @param {INodeParameters} [nodeValuesRoot] The root node-parameter-data * @param {INodeParameters} [nodeValuesRoot] The root node-parameter-data
* @returns
*/ */
export function displayParameter( export function displayParameter(
nodeValues: INodeParameters, nodeValues: INodeParameters,
@ -352,12 +347,10 @@ export function displayParameter(
* Returns if the given parameter should be displayed or not considering the path * Returns if the given parameter should be displayed or not considering the path
* to the properties * to the properties
* *
* @export
* @param {INodeParameters} nodeValues The data on the node which decides if the parameter * @param {INodeParameters} nodeValues The data on the node which decides if the parameter
* should be displayed * should be displayed
* @param {(INodeProperties | INodeCredentialDescription)} parameter The parameter to check if it should be displayed * @param {(INodeProperties | INodeCredentialDescription)} parameter The parameter to check if it should be displayed
* @param {string} path The path to the property * @param {string} path The path to the property
* @returns
*/ */
export function displayParameterPath( export function displayParameterPath(
nodeValues: INodeParameters, nodeValues: INodeParameters,
@ -382,11 +375,9 @@ export function displayParameterPath(
/** /**
* Returns the context data * Returns the context data
* *
* @export
* @param {IRunExecutionData} runExecutionData The run execution data * @param {IRunExecutionData} runExecutionData The run execution data
* @param {string} type The data type. "node"/"flow" * @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 * @param {INode} [node] If type "node" is set the node to return the context of has to be supplied
* @returns {IContextObject}
*/ */
export function getContext( export function getContext(
runExecutionData: IRunExecutionData, runExecutionData: IRunExecutionData,
@ -421,9 +412,6 @@ export function getContext(
/** /**
* Returns which parameters are dependent on which * Returns which parameters are dependent on which
* *
* @export
* @param {INodeProperties[]} nodePropertiesArray
* @returns {IParameterDependencies}
*/ */
export function getParamterDependencies( export function getParamterDependencies(
nodePropertiesArray: INodeProperties[], nodePropertiesArray: INodeProperties[],
@ -462,10 +450,6 @@ export function getParamterDependencies(
* Returns in which order the parameters should be resolved * Returns in which order the parameters should be resolved
* to have the parameters available they depend on * to have the parameters available they depend on
* *
* @export
* @param {INodeProperties[]} nodePropertiesArray
* @param {IParameterDependencies} parameterDependencies
* @returns {number[]}
*/ */
export function getParamterResolveOrder( export function getParamterResolveOrder(
nodePropertiesArray: INodeProperties[], nodePropertiesArray: INodeProperties[],
@ -533,7 +517,6 @@ export function getParamterResolveOrder(
* Returns the node parameter values. Depending on the settings it either just returns the none * Returns the node parameter values. Depending on the settings it either just returns the none
* default values or it applies all the default values. * default values or it applies all the default values.
* *
* @export
* @param {INodeProperties[]} nodePropertiesArray The properties which exist and their settings * @param {INodeProperties[]} nodePropertiesArray The properties which exist and their settings
* @param {INodeParameters} nodeValues The node parameter data * @param {INodeParameters} nodeValues The node parameter data
* @param {boolean} returnDefaults If default values get added or only none default values returned * @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} [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 {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 * @param {INodeParameters} [nodeValuesRoot] The root node-parameter-data
* @returns {(INodeParameters | null)}
*/ */
export function getNodeParameters( export function getNodeParameters(
nodePropertiesArray: INodeProperties[], nodePropertiesArray: INodeProperties[],
@ -858,10 +840,7 @@ export function getNodeParameters(
/** /**
* Brings the output data in a format that can be returned from a node * Brings the output data in a format that can be returned from a node
* *
* @export
* @param {INodeExecutionData[]} outputData
* @param {number} [outputIndex=0] * @param {number} [outputIndex=0]
* @returns {Promise<INodeExecutionData[][]>}
*/ */
export async function prepareOutputData( export async function prepareOutputData(
outputData: INodeExecutionData[], outputData: INodeExecutionData[],
@ -882,10 +861,7 @@ export async function prepareOutputData(
/** /**
* Returns all the webhooks which should be created for the give node * Returns all the webhooks which should be created for the give node
* *
* @export
* *
* @param {INode} node
* @returns {IWebhookData[]}
*/ */
export function getNodeWebhooks( export function getNodeWebhooks(
workflow: Workflow, workflow: Workflow,
@ -998,11 +974,6 @@ export function getNodeWebhooks(
/** /**
* Returns the webhook path * Returns the webhook path
* *
* @export
* @param {string} workflowId
* @param {string} nodeTypeName
* @param {string} path
* @returns {string}
*/ */
export function getNodeWebhookPath( export function getNodeWebhookPath(
workflowId: string, workflowId: string,
@ -1029,13 +1000,6 @@ export function getNodeWebhookPath(
/** /**
* Returns the webhook URL * 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( export function getNodeWebhookUrl(
baseUrl: string, baseUrl: string,
@ -1057,10 +1021,8 @@ export function getNodeWebhookUrl(
/** /**
* Returns all the parameter-issues of the node * Returns all the parameter-issues of the node
* *
* @export
* @param {INodeProperties[]} nodePropertiesArray The properties of the node * @param {INodeProperties[]} nodePropertiesArray The properties of the node
* @param {INode} node The data of the node * @param {INode} node The data of the node
* @returns {(INodeIssues | null)}
*/ */
export function getNodeParametersIssues( export function getNodeParametersIssues(
nodePropertiesArray: INodeProperties[], nodePropertiesArray: INodeProperties[],
@ -1090,10 +1052,8 @@ export function getNodeParametersIssues(
/** /**
* Returns the issues of the node as string * Returns the issues of the node as string
* *
* @export
* @param {INodeIssues} issues The issues of the node * @param {INodeIssues} issues The issues of the node
* @param {INode} node The node * @param {INode} node The node
* @returns {string[]}
*/ */
export function nodeIssuesToString(issues: INodeIssues, node?: INode): string[] { export function nodeIssuesToString(issues: INodeIssues, node?: INode): string[] {
const nodeIssues = []; const nodeIssues = [];
@ -1161,7 +1121,6 @@ export const validateResourceLocatorParameter = (
/** /**
* Adds an issue if the parameter is not defined * Adds an issue if the parameter is not defined
* *
* @export
* @param {INodeIssues} foundIssues The already found issues * @param {INodeIssues} foundIssues The already found issues
* @param {INodeProperties} nodeProperties The properties of the node * @param {INodeProperties} nodeProperties The properties of the node
* @param {NodeParameterValue} value The value of the parameter * @param {NodeParameterValue} value The value of the parameter
@ -1197,11 +1156,9 @@ export function addToIssuesIfMissing(
/** /**
* Returns the parameter value * Returns the parameter value
* *
* @export
* @param {INodeParameters} nodeValues The values of the node * @param {INodeParameters} nodeValues The values of the node
* @param {string} parameterName The name of the parameter to return the value of * @param {string} parameterName The name of the parameter to return the value of
* @param {string} path The path to the properties * @param {string} path The path to the properties
* @returns
*/ */
export function getParameterValueByPath( export function getParameterValueByPath(
nodeValues: INodeParameters, nodeValues: INodeParameters,
@ -1218,11 +1175,9 @@ function isINodeParameterResourceLocator(value: unknown): value is INodeParamete
/** /**
* Returns all the issues with the given node-values * Returns all the issues with the given node-values
* *
* @export
* @param {INodeProperties} nodeProperties The properties of the node * @param {INodeProperties} nodeProperties The properties of the node
* @param {INodeParameters} nodeValues The values of the node * @param {INodeParameters} nodeValues The values of the node
* @param {string} path The path to the properties * @param {string} path The path to the properties
* @returns {INodeIssues}
*/ */
export function getParameterIssues( export function getParameterIssues(
nodeProperties: INodeProperties, nodeProperties: INodeProperties,
@ -1363,10 +1318,8 @@ export function getParameterIssues(
/** /**
* Merges multiple NodeIssues together * Merges multiple NodeIssues together
* *
* @export
* @param {INodeIssues} destination The issues to merge into * @param {INodeIssues} destination The issues to merge into
* @param {(INodeIssues | null)} source The issues to merge * @param {(INodeIssues | null)} source The issues to merge
* @returns
*/ */
export function mergeIssues(destination: INodeIssues, source: INodeIssues | null) { export function mergeIssues(destination: INodeIssues, source: INodeIssues | null) {
if (source === null) { if (source === null) {
@ -1409,9 +1362,6 @@ export function mergeIssues(destination: INodeIssues, source: INodeIssues | null
/** /**
* Merges the given node properties * Merges the given node properties
* *
* @export
* @param {INodeProperties[]} mainProperties
* @param {INodeProperties[]} addProperties
*/ */
export function mergeNodeProperties( export function mergeNodeProperties(
mainProperties: INodeProperties[], mainProperties: INodeProperties[],

View file

@ -150,9 +150,6 @@ export class Workflow {
* The default connections are by source node. This function rewrites them by destination nodes * The default connections are by source node. This function rewrites them by destination nodes
* to easily find parent nodes. * to easily find parent nodes.
* *
* @param {IConnections} connections
* @returns {IConnections}
* @memberof Workflow
*/ */
__getConnectionsByDestination(connections: IConnections): IConnections { __getConnectionsByDestination(connections: IConnections): IConnections {
const returnConnection: IConnections = {}; const returnConnection: IConnections = {};
@ -202,8 +199,6 @@ export class Workflow {
* or webhooks defined. * or webhooks defined.
* *
* @param {string[]} [ignoreNodeTypes] Node-types to ignore in the check * @param {string[]} [ignoreNodeTypes] Node-types to ignore in the check
* @returns {boolean}
* @memberof Workflow
*/ */
checkIfWorkflowCanBeActivated(ignoreNodeTypes?: string[]): boolean { checkIfWorkflowCanBeActivated(ignoreNodeTypes?: string[]): boolean {
let node: INode; let node: INode;
@ -249,8 +244,6 @@ export class Workflow {
* which have been found for the different nodes. * which have been found for the different nodes.
* TODO: Does currently not check for credential issues! * TODO: Does currently not check for credential issues!
* *
* @returns {(IWorfklowIssues | null)}
* @memberof Workflow
*/ */
checkReadyForExecution(inputData: { checkReadyForExecution(inputData: {
startNode?: string; startNode?: string;
@ -317,8 +310,6 @@ export class Workflow {
* *
* @param {string} type The type of data to return ("global"|"node") * @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 * @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 { getStaticData(type: string, node?: INode): IDataObject {
let key: string; let key: string;
@ -349,8 +340,6 @@ export class Workflow {
/** /**
* Returns all the trigger nodes in the workflow. * Returns all the trigger nodes in the workflow.
* *
* @returns {INode[]}
* @memberof Workflow
*/ */
getTriggerNodes(): INode[] { getTriggerNodes(): INode[] {
return this.queryNodes((nodeType: INodeType) => !!nodeType.trigger); return this.queryNodes((nodeType: INodeType) => !!nodeType.trigger);
@ -359,8 +348,6 @@ export class Workflow {
/** /**
* Returns all the poll nodes in the workflow * Returns all the poll nodes in the workflow
* *
* @returns {INode[]}
* @memberof Workflow
*/ */
getPollNodes(): INode[] { getPollNodes(): INode[] {
return this.queryNodes((nodeType: INodeType) => !!nodeType.poll); return this.queryNodes((nodeType: INodeType) => !!nodeType.poll);
@ -371,8 +358,6 @@ export class Workflow {
* checkFunction return true * checkFunction return true
* *
* @param {(nodeType: INodeType) => boolean} checkFunction * @param {(nodeType: INodeType) => boolean} checkFunction
* @returns {INode[]}
* @memberof Workflow
*/ */
queryNodes(checkFunction: (nodeType: INodeType) => boolean): INode[] { queryNodes(checkFunction: (nodeType: INodeType) => boolean): INode[] {
const returnNodes: INode[] = []; const returnNodes: INode[] = [];
@ -402,8 +387,6 @@ export class Workflow {
* Returns the node with the given name if it exists else null * Returns the node with the given name if it exists else null
* *
* @param {string} nodeName Name of the node to return * @param {string} nodeName Name of the node to return
* @returns {(INode | null)}
* @memberof Workflow
*/ */
getNode(nodeName: string): INode | null { getNode(nodeName: string): INode | null {
if (this.nodes.hasOwnProperty(nodeName)) { 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 * 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 * @param {string} nodeName Name of the node to return the pinData of
* @returns {(IDataObject[] | undefined)}
* @memberof Workflow
*/ */
getPinDataOfNode(nodeName: string): IDataObject[] | undefined { getPinDataOfNode(nodeName: string): IDataObject[] | undefined {
return this.pinData ? this.pinData[nodeName] : 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 {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[])} parameterValue The parameters to check for expressions
* @param {string} currentName The current name of the node * @param {string} currentName The current name of the node
* @param {string} newName The new name * @param {string} newName The new name
* @returns {(NodeParameterValue | INodeParameters | NodeParameterValue[] | INodeParameters[])}
* @memberof Workflow
*/ */
renameNodeInExpressions( renameNodeInExpressions(
parameterValue: NodeParameterValueType, parameterValue: NodeParameterValueType,
@ -514,7 +493,6 @@ export class Workflow {
* *
* @param {string} currentName The current name of the node * @param {string} currentName The current name of the node
* @param {string} newName The new name * @param {string} newName The new name
* @memberof Workflow
*/ */
renameNode(currentName: string, newName: string) { renameNode(currentName: string, newName: string) {
// Rename the node itself // Rename the node itself
@ -573,11 +551,7 @@ export class Workflow {
/** /**
* Finds the highest parent nodes of the node with the given name * Finds the highest parent nodes of the node with the given name
* *
* @param {string} nodeName
* @param {string} [type='main'] * @param {string} [type='main']
* @param {number} [nodeConnectionIndex]
* @returns {string[]}
* @memberof Workflow
*/ */
getHighestNode( getHighestNode(
nodeName: string, nodeName: string,
@ -656,11 +630,8 @@ export class Workflow {
/** /**
* Returns all the after the given one * Returns all the after the given one
* *
* @param {string} nodeName
* @param {string} [type='main'] * @param {string} [type='main']
* @param {*} [depth=-1] * @param {*} [depth=-1]
* @returns {string[]}
* @memberof Workflow
*/ */
getChildNodes(nodeName: string, type = 'main', depth = -1): string[] { getChildNodes(nodeName: string, type = 'main', depth = -1): string[] {
return this.getConnectedNodes(this.connectionsBySourceNode, nodeName, type, depth); return this.getConnectedNodes(this.connectionsBySourceNode, nodeName, type, depth);
@ -669,11 +640,8 @@ export class Workflow {
/** /**
* Returns all the nodes before the given one * Returns all the nodes before the given one
* *
* @param {string} nodeName
* @param {string} [type='main'] * @param {string} [type='main']
* @param {*} [depth=-1] * @param {*} [depth=-1]
* @returns {string[]}
* @memberof Workflow
*/ */
getParentNodes(nodeName: string, type = 'main', depth = -1): string[] { getParentNodes(nodeName: string, type = 'main', depth = -1): string[] {
return this.getConnectedNodes(this.connectionsByDestinationNode, nodeName, type, depth); 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 * Gets all the nodes which are connected nodes starting from
* the given one * the given one
* *
* @param {IConnections} connections
* @param {string} nodeName
* @param {string} [type='main'] * @param {string} [type='main']
* @param {*} [depth=-1] * @param {*} [depth=-1]
* @param {string[]} [checkedNodes]
* @returns {string[]}
* @memberof Workflow
*/ */
getConnectedNodes( getConnectedNodes(
connections: IConnections, connections: IConnections,
@ -770,10 +733,7 @@ export class Workflow {
/** /**
* Returns all the nodes before the given one * Returns all the nodes before the given one
* *
* @param {string} nodeName
* @param {*} [maxDepth=-1] * @param {*} [maxDepth=-1]
* @returns {string[]}
* @memberof Workflow
*/ */
getParentNodesByDepth(nodeName: string, maxDepth = -1): IConnectedNode[] { getParentNodesByDepth(nodeName: string, maxDepth = -1): IConnectedNode[] {
return this.searchNodesBFS(this.connectionsByDestinationNode, nodeName, maxDepth); return this.searchNodesBFS(this.connectionsByDestinationNode, nodeName, maxDepth);
@ -784,11 +744,7 @@ export class Workflow {
* the given one * the given one
* Uses BFS traversal * Uses BFS traversal
* *
* @param {IConnections} connections
* @param {string} sourceNode
* @param {*} [maxDepth=-1] * @param {*} [maxDepth=-1]
* @returns {IConnectedNode[]}
* @memberof Workflow
*/ */
searchNodesBFS(connections: IConnections, sourceNode: string, maxDepth = -1): IConnectedNode[] { searchNodesBFS(connections: IConnections, sourceNode: string, maxDepth = -1): IConnectedNode[] {
const returnConns: 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} parentNodeName The parent node to get the output index of
* @param {string} [type='main'] * @param {string} [type='main']
* @param {*} [depth=-1] * @param {*} [depth=-1]
* @param {string[]} [checkedNodes]
* @returns {(INodeConnection | undefined)}
* @memberof Workflow
*/ */
getNodeConnectionIndexes( getNodeConnectionIndexes(
nodeName: string, nodeName: string,
@ -938,8 +891,6 @@ export class Workflow {
* Returns from which of the given nodes the workflow should get started from * Returns from which of the given nodes the workflow should get started from
* *
* @param {string[]} nodeNames The potential start nodes * @param {string[]} nodeNames The potential start nodes
* @returns {(INode | undefined)}
* @memberof Workflow
*/ */
__getStartNode(nodeNames: string[]): INode | undefined { __getStartNode(nodeNames: string[]): INode | undefined {
// Check if there are any trigger or poll nodes and then return the first one // 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 * Returns the start node to start the workflow from
* *
* @param {string} [destinationNode]
* @returns {(INode | undefined)}
* @memberof Workflow
*/ */
getStartNode(destinationNode?: string): INode | undefined { getStartNode(destinationNode?: string): INode | undefined {
if (destinationNode) { if (destinationNode) {
@ -1006,11 +954,6 @@ export class Workflow {
* Executes the Webhooks method of the node * Executes the Webhooks method of the node
* *
* @param {WebhookSetupMethodNames} method The name of the method to execute * @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( async runWebhookMethod(
method: WebhookSetupMethodNames, method: WebhookSetupMethodNames,
@ -1052,12 +995,6 @@ export class Workflow {
* Runs the given trigger node so that it can trigger the workflow * Runs the given trigger node so that it can trigger the workflow
* when the node has data. * 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( async runTrigger(
node: INode, node: INode,
@ -1139,10 +1076,6 @@ export class Workflow {
* Runs the given trigger node so that it can trigger the workflow * Runs the given trigger node so that it can trigger the workflow
* when the node has data. * when the node has data.
* *
* @param {INode} node
* @param {IPollFunctions} pollFunctions
* @returns
* @memberof Workflow
*/ */
async runPoll( async runPoll(
@ -1168,12 +1101,6 @@ export class Workflow {
* Executes the webhook data to see what it should return and if the * Executes the webhook data to see what it should return and if the
* workflow should be started or not * 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( async runWebhook(
webhookData: IWebhookData, webhookData: IWebhookData,
@ -1202,14 +1129,6 @@ export class Workflow {
/** /**
* Executes the given node. * 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( async runNode(
executionData: IExecuteData, executionData: IExecuteData,

View file

@ -101,8 +101,6 @@ export class WorkflowDataProxy {
* *
* @private * @private
* @param {string} nodeName The name of the node to get the context from * @param {string} nodeName The name of the node to get the context from
* @returns
* @memberof WorkflowDataProxy
*/ */
private nodeContextGetter(nodeName: string) { private nodeContextGetter(nodeName: string) {
const that = this; const that = this;
@ -164,8 +162,6 @@ export class WorkflowDataProxy {
* *
* @private * @private
* @param {string} nodeName The name of the node to query data from * @param {string} nodeName The name of the node to query data from
* @returns
* @memberof WorkflowDataGetter
*/ */
private nodeParameterGetter(nodeName: string) { private nodeParameterGetter(nodeName: string) {
const that = this; const that = this;
@ -243,8 +239,6 @@ export class WorkflowDataProxy {
* @param {boolean} [shortSyntax=false] If short syntax got used * @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} [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 * @param {number} [runIndex] The index of the run, if not given the current one does get used
* @returns {INodeExecutionData[]}
* @memberof WorkflowDataProxy
*/ */
private getNodeExecutionData( private getNodeExecutionData(
nodeName: string, nodeName: string,
@ -356,8 +350,6 @@ export class WorkflowDataProxy {
* @private * @private
* @param {string} nodeName The name of the node query data from * @param {string} nodeName The name of the node query data from
* @param {boolean} [shortSyntax=false] If short syntax got used * @param {boolean} [shortSyntax=false] If short syntax got used
* @returns
* @memberof WorkflowDataGetter
*/ */
private nodeDataGetter(nodeName: string, shortSyntax = false) { private nodeDataGetter(nodeName: string, shortSyntax = false) {
const that = this; const that = this;
@ -436,8 +428,6 @@ export class WorkflowDataProxy {
* Returns a proxy to query data from the environment * Returns a proxy to query data from the environment
* *
* @private * @private
* @returns
* @memberof WorkflowDataGetter
*/ */
private envGetter() { private envGetter() {
const that = this; const that = this;
@ -464,8 +454,6 @@ export class WorkflowDataProxy {
* Returns a proxy to query data from the workflow * Returns a proxy to query data from the workflow
* *
* @private * @private
* @returns
* @memberof WorkflowDataProxy
*/ */
private workflowGetter() { private workflowGetter() {
const allowedValues = ['active', 'id', 'name']; const allowedValues = ['active', 'id', 'name'];
@ -498,8 +486,6 @@ export class WorkflowDataProxy {
* Returns a proxy to query data of all nodes * Returns a proxy to query data of all nodes
* *
* @private * @private
* @returns
* @memberof WorkflowDataGetter
*/ */
private nodeGetter() { private nodeGetter() {
const that = this; const that = this;
@ -516,8 +502,6 @@ export class WorkflowDataProxy {
/** /**
* Returns the data proxy object which allows to query data from current run * Returns the data proxy object which allows to query data from current run
* *
* @returns
* @memberof WorkflowDataGetter
*/ */
getDataProxy(): IWorkflowDataProxyData { getDataProxy(): IWorkflowDataProxyData {
const that = this; const that = this;