feat(editor): Add HTTP request nodes for credentials without a node (#7157)

Github issue / Community forum post (link here to close automatically):

---------

Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Elias Meire
2023-11-13 12:11:16 +01:00
committed by GitHub
parent 460ac85fda
commit 14035e1244
62 changed files with 665 additions and 146 deletions

View File

@@ -66,6 +66,7 @@ import { useWorkflowsStore } from '@/stores/workflows.store';
import { getSourceItems } from '@/utils';
import { v4 as uuid } from 'uuid';
import { useSettingsStore } from '@/stores/settings.store';
import { getCredentialTypeName, isCredentialOnlyNodeType } from '@/utils/credentialOnlyNodes';
export function getParentMainInputNode(workflow: Workflow, node: INode): INode {
const nodeType = useNodeTypesStore().getNodeType(node.type);
@@ -683,11 +684,18 @@ export const workflowHelpers = defineComponent({
const nodeType = this.nodeTypesStore.getNodeType(node.type, node.typeVersion);
if (nodeType !== null) {
const isCredentialOnly = isCredentialOnlyNodeType(nodeType.name);
if (isCredentialOnly) {
nodeData.type = HTTP_REQUEST_NODE_TYPE;
nodeData.extendsCredential = getCredentialTypeName(nodeType.name);
}
// Node-Type is known so we can save the parameters correctly
const nodeParameters = NodeHelpers.getNodeParameters(
nodeType.properties,
node.parameters,
false,
isCredentialOnly,
false,
node,
);