Enforce type checking in all node params (#2509)

This commit is contained in:
Iván Ovejero
2021-12-03 09:44:16 +01:00
committed by GitHub
parent ca761c88c8
commit a783288338
527 changed files with 2289 additions and 2259 deletions

View File

@@ -2,7 +2,7 @@ import {
INodeProperties,
} from 'n8n-workflow';
export const channelOperations = [
export const channelOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
@@ -104,9 +104,9 @@ export const channelOperations = [
default: 'create',
description: 'The operation to perform.',
},
] as INodeProperties[];
];
export const channelFields = [
export const channelFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* channel:archive */
@@ -1002,4 +1002,4 @@ export const channelFields = [
required: true,
description: 'The ID of the channel to unarchive.',
},
] as INodeProperties[];
];

View File

@@ -1,6 +1,6 @@
import { INodeProperties } from 'n8n-workflow';
export const fileOperations = [
export const fileOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
@@ -32,9 +32,9 @@ export const fileOperations = [
default: 'upload',
description: 'The operation to perform.',
},
] as INodeProperties[];
];
export const fileFields = [
export const fileFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* file:upload */
@@ -321,4 +321,4 @@ export const fileFields = [
},
default: '',
},
] as INodeProperties[];
];

View File

@@ -2,7 +2,7 @@ import {
INodeProperties,
} from 'n8n-workflow';
export const messageOperations = [
export const messageOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
@@ -44,9 +44,9 @@ export const messageOperations = [
default: 'post',
description: 'The operation to perform.',
},
] as INodeProperties[];
];
export const messageFields = [
export const messageFields: INodeProperties[] = [
/* ----------------------------------------------------------------------- */
/* message:getPermalink
@@ -1711,4 +1711,4 @@ export const messageFields = [
},
description: `Timestamp of the message to be deleted.`,
},
] as INodeProperties[];
];

View File

@@ -1,6 +1,6 @@
import { INodeProperties } from 'n8n-workflow';
export const reactionOperations = [
export const reactionOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
@@ -32,9 +32,9 @@ export const reactionOperations = [
default: 'add',
description: 'The operation to perform.',
},
] as INodeProperties[];
];
export const reactionFields = [
export const reactionFields: INodeProperties[] = [
{
displayName: 'Channel',
name: 'channelId',
@@ -98,4 +98,4 @@ export const reactionFields = [
},
description: `Timestamp of the message.`,
},
] as INodeProperties[];
];

View File

@@ -1,6 +1,6 @@
import { INodeProperties } from 'n8n-workflow';
export const starOperations = [
export const starOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
@@ -32,9 +32,9 @@ export const starOperations = [
default: 'add',
description: 'The operation to perform.',
},
] as INodeProperties[];
];
export const starFields = [
export const starFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* star:add */
@@ -190,4 +190,4 @@ export const starFields = [
default: 50,
description: 'How many results to return.',
},
] as INodeProperties[];
];

View File

@@ -2,7 +2,7 @@ import {
INodeProperties,
} from 'n8n-workflow';
export const userOperations = [
export const userOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
@@ -29,9 +29,9 @@ export const userOperations = [
default: 'info',
description: 'The operation to perform.',
},
] as INodeProperties[];
];
export const userFields = [
export const userFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* user:info */
@@ -82,4 +82,4 @@ export const userFields = [
required: true,
description: 'The ID of the user to get the online status of.',
},
] as INodeProperties[];
];

View File

@@ -2,7 +2,7 @@ import {
INodeProperties,
} from 'n8n-workflow';
export const userGroupOperations = [
export const userGroupOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
@@ -44,9 +44,9 @@ export const userGroupOperations = [
default: 'create',
description: 'The operation to perform.',
},
] as INodeProperties[];
];
export const userGroupFields = [
export const userGroupFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* userGroup:create */
@@ -375,4 +375,4 @@ export const userGroupFields = [
},
],
},
] as INodeProperties[];
];

View File

@@ -3,7 +3,7 @@ import {
} from 'n8n-workflow';
import { text } from 'express';
export const userProfileOperations = [
export const userProfileOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
@@ -30,9 +30,9 @@ export const userProfileOperations = [
default: 'get',
description: 'The operation to perform.',
},
] as INodeProperties[];
];
export const userProfileFields = [
export const userProfileFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* userProfile:update */
@@ -181,4 +181,4 @@ export const userProfileFields = [
},
],
},
] as INodeProperties[];
];