refactor(editor): Fix NodeView/Canvas related TS errors (#9581)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { faker } from '@faker-js/faker/locale/en';
|
||||
import type { ITemplatesWorkflowFull, IWorkflowTemplateNode } from '@/Interface';
|
||||
import { NodeConnectionType } from 'n8n-workflow';
|
||||
|
||||
export const newWorkflowTemplateNode = ({
|
||||
type,
|
||||
@@ -26,6 +27,7 @@ export const fullShopifyTelegramTwitterTemplate = {
|
||||
workflow: {
|
||||
nodes: [
|
||||
{
|
||||
id: 'd65f8060-0196-430a-923c-57f838991cc1',
|
||||
name: 'Twitter',
|
||||
type: 'n8n-nodes-base.twitter',
|
||||
position: [720, -220],
|
||||
@@ -39,6 +41,7 @@ export const fullShopifyTelegramTwitterTemplate = {
|
||||
typeVersion: 1,
|
||||
},
|
||||
{
|
||||
id: 'd65f8060-0196-430a-923c-57f838991dd3',
|
||||
name: 'Telegram',
|
||||
type: 'n8n-nodes-base.telegram',
|
||||
position: [720, -20],
|
||||
@@ -53,6 +56,7 @@ export const fullShopifyTelegramTwitterTemplate = {
|
||||
typeVersion: 1,
|
||||
},
|
||||
{
|
||||
id: 'd65f8060-0196-430a-923c-57f838991dd2',
|
||||
name: 'product created',
|
||||
type: 'n8n-nodes-base.shopifyTrigger',
|
||||
position: [540, -110],
|
||||
@@ -72,12 +76,12 @@ export const fullShopifyTelegramTwitterTemplate = {
|
||||
[
|
||||
{
|
||||
node: 'Twitter',
|
||||
type: 'main',
|
||||
type: NodeConnectionType.Main,
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
node: 'Telegram',
|
||||
type: 'main',
|
||||
type: NodeConnectionType.Main,
|
||||
index: 0,
|
||||
},
|
||||
],
|
||||
@@ -195,6 +199,7 @@ export const fullSaveEmailAttachmentsToNextCloudTemplate = {
|
||||
workflow: {
|
||||
nodes: [
|
||||
{
|
||||
id: 'd65f8060-0196-430a-923c-57f8389911f3',
|
||||
name: 'IMAP Email',
|
||||
type: 'n8n-nodes-base.emailReadImap',
|
||||
position: [240, 420],
|
||||
@@ -206,6 +211,7 @@ export const fullSaveEmailAttachmentsToNextCloudTemplate = {
|
||||
typeVersion: 1,
|
||||
},
|
||||
{
|
||||
id: 'd65f8060-0196-430a-923c-57f838991gg2',
|
||||
name: 'Nextcloud',
|
||||
type: 'n8n-nodes-base.nextCloud',
|
||||
position: [940, 420],
|
||||
@@ -217,6 +223,7 @@ export const fullSaveEmailAttachmentsToNextCloudTemplate = {
|
||||
typeVersion: 1,
|
||||
},
|
||||
{
|
||||
id: 'd65f8060-0196-430a-923c-57f838991ddh',
|
||||
name: 'Map each attachment',
|
||||
type: 'n8n-nodes-base.function',
|
||||
position: [620, 420],
|
||||
@@ -228,8 +235,12 @@ export const fullSaveEmailAttachmentsToNextCloudTemplate = {
|
||||
},
|
||||
],
|
||||
connections: {
|
||||
'IMAP Email': { main: [[{ node: 'Map each attachment', type: 'main', index: 0 }]] },
|
||||
'Map each attachment': { main: [[{ node: 'Nextcloud', type: 'main', index: 0 }]] },
|
||||
'IMAP Email': {
|
||||
main: [[{ node: 'Map each attachment', type: NodeConnectionType.Main, index: 0 }]],
|
||||
},
|
||||
'Map each attachment': {
|
||||
main: [[{ node: 'Nextcloud', type: NodeConnectionType.Main, index: 0 }]],
|
||||
},
|
||||
},
|
||||
},
|
||||
workflowInfo: {
|
||||
@@ -303,6 +314,7 @@ export const fullCreateApiEndpointTemplate = {
|
||||
workflow: {
|
||||
nodes: [
|
||||
{
|
||||
id: 'd65f8060-0196-430a-923c-57f838991dd1',
|
||||
name: 'Webhook',
|
||||
type: 'n8n-nodes-base.webhook',
|
||||
position: [375, 115],
|
||||
@@ -315,6 +327,7 @@ export const fullCreateApiEndpointTemplate = {
|
||||
typeVersion: 1,
|
||||
},
|
||||
{
|
||||
id: 'd65f8060-0196-430a-923c-57f838991dd9',
|
||||
name: 'Note1',
|
||||
type: 'n8n-nodes-base.stickyNote',
|
||||
position: [355, -25],
|
||||
@@ -327,6 +340,7 @@ export const fullCreateApiEndpointTemplate = {
|
||||
typeVersion: 1,
|
||||
},
|
||||
{
|
||||
id: 'd65f8060-0196-430a-923c-57f838991dd5',
|
||||
name: 'Respond to Webhook',
|
||||
type: 'n8n-nodes-base.respondToWebhook',
|
||||
position: [815, 115],
|
||||
@@ -339,6 +353,7 @@ export const fullCreateApiEndpointTemplate = {
|
||||
typeVersion: 1,
|
||||
},
|
||||
{
|
||||
id: 'd65f8060-0196-430a-923c-57f838991df1',
|
||||
name: 'Create URL string',
|
||||
type: 'n8n-nodes-base.set',
|
||||
position: [595, 115],
|
||||
@@ -358,6 +373,7 @@ export const fullCreateApiEndpointTemplate = {
|
||||
typeVersion: 1,
|
||||
},
|
||||
{
|
||||
id: 'd65f8060-0196-430a-923c-57f838991dbb',
|
||||
name: 'Note3',
|
||||
type: 'n8n-nodes-base.stickyNote',
|
||||
position: [355, 275],
|
||||
@@ -371,8 +387,10 @@ export const fullCreateApiEndpointTemplate = {
|
||||
},
|
||||
],
|
||||
connections: {
|
||||
Webhook: { main: [[{ node: 'Create URL string', type: 'main', index: 0 }]] },
|
||||
'Create URL string': { main: [[{ node: 'Respond to Webhook', type: 'main', index: 0 }]] },
|
||||
Webhook: { main: [[{ node: 'Create URL string', type: NodeConnectionType.Main, index: 0 }]] },
|
||||
'Create URL string': {
|
||||
main: [[{ node: 'Respond to Webhook', type: NodeConnectionType.Main, index: 0 }]],
|
||||
},
|
||||
},
|
||||
},
|
||||
lastUpdatedBy: 1,
|
||||
|
||||
Reference in New Issue
Block a user