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 contactOperations = [
export const contactOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
@@ -39,9 +39,9 @@ export const contactOperations = [
default: 'upsert',
description: 'The operation to perform.',
},
] as INodeProperties[];
];
export const contactFields = [
export const contactFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* contact:getAll */
/* -------------------------------------------------------------------------- */
@@ -295,6 +295,7 @@ export const contactFields = [
displayName: 'Contact IDs',
name: 'ids',
type: 'string',
default: '',
displayOptions: {
show: {
resource: [
@@ -401,4 +402,4 @@ export const contactFields = [
default: '',
description: 'Email of the contact.',
},
] as INodeProperties[];
];

View File

@@ -2,7 +2,7 @@ import {
INodeProperties,
} from 'n8n-workflow';
export const listOperations = [
export const listOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
@@ -44,9 +44,9 @@ export const listOperations = [
default: 'create',
description: 'The operation to perform.',
},
] as INodeProperties[];
];
export const listFields = [
export const listFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* list:getAll */
/* -------------------------------------------------------------------------- */
@@ -230,4 +230,4 @@ export const listFields = [
default: '',
description: 'Name of the list.',
},
] as INodeProperties[];
];

View File

@@ -2,7 +2,7 @@ import {
INodeProperties,
} from 'n8n-workflow';
export const mailOperations = [
export const mailOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
@@ -24,9 +24,9 @@ export const mailOperations = [
default: 'send',
description: 'Operation to perform.',
},
] as INodeProperties[];
];
export const mailFields = [
export const mailFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* mail:send */
/* -------------------------------------------------------------------------- */
@@ -343,7 +343,7 @@ export const mailFields = [
},
],
},
] as INodeProperties[];
];
export type SendMailBody = {
personalizations: Array<{