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
77 changed files with 6 additions and 888 deletions

View File

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

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
* returned.
*
* @param {JsonObject} error
* @param {string[]} potentialKeys
* @param {string[]} traversalKeys
* @returns {string | null}
*/
protected findProperty(
error: JsonObject,
@@ -335,7 +331,6 @@ export class NodeApiError extends NodeError {
/**
* Set the error's message based on the HTTP status code.
*
* @returns {void}
*/
private setMessage() {
if (!this.httpCode) {

View File

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

View File

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

View File

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