mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -08:00
9a1e7b52f7
* WIP: Merge TriggerHelperPanel with MainPanel * WIP: Implement switching between views * Remove logging * WIP: Rework search * Fix category toggling and search results display * Fix node item description * Sort actions based on the root view * Adjust personalisation modal, make trigger canvas node round * Linting fixes * Fix filtering of API options * Fix types and no result state * Cleanup * Linting fixes * Adjust mode prop for node creator tracking * Fix merging of core nodes and filtering of single placeholder actions * Lint fixes * Implement actions override, fix node creator view item spacing and increase click radius of trigger node icon * Fix keyboard view navigation * WIP: E2E Tests * Address product review * Minor fixes & cleanup * Fix tests * Some more test fixes * Add specs to check actions and panels * Update personalisation survey snapshot
83 lines
1.6 KiB
TypeScript
83 lines
1.6 KiB
TypeScript
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
|
import type { IExecuteFunctions } from 'n8n-core';
|
|
|
|
import type {
|
|
INodeExecutionData,
|
|
INodeType,
|
|
INodeTypeBaseDescription,
|
|
INodeTypeDescription,
|
|
} from 'n8n-workflow';
|
|
|
|
import * as send from './send.operation';
|
|
|
|
// eslint-disable-next-line n8n-nodes-base/node-class-description-missing-subtitle
|
|
const versionDescription: INodeTypeDescription = {
|
|
displayName: 'Send Email',
|
|
name: 'emailSend',
|
|
icon: 'fa:envelope',
|
|
group: ['output'],
|
|
version: 2,
|
|
description: 'Sends an email using SMTP protocol',
|
|
defaults: {
|
|
name: 'Send Email',
|
|
color: '#00bb88',
|
|
},
|
|
inputs: ['main'],
|
|
outputs: ['main'],
|
|
credentials: [
|
|
{
|
|
name: 'smtp',
|
|
required: true,
|
|
},
|
|
],
|
|
properties: [
|
|
{
|
|
displayName: 'Resource',
|
|
name: 'resource',
|
|
type: 'hidden',
|
|
noDataExpression: true,
|
|
default: 'email',
|
|
options: [
|
|
{
|
|
name: 'Email',
|
|
value: 'email',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'hidden',
|
|
noDataExpression: true,
|
|
default: 'send',
|
|
options: [
|
|
{
|
|
name: 'Send',
|
|
value: 'send',
|
|
action: 'Send an Email',
|
|
},
|
|
],
|
|
},
|
|
...send.description,
|
|
],
|
|
};
|
|
|
|
export class EmailSendV2 implements INodeType {
|
|
description: INodeTypeDescription;
|
|
|
|
constructor(baseDescription: INodeTypeBaseDescription) {
|
|
this.description = {
|
|
...baseDescription,
|
|
...versionDescription,
|
|
};
|
|
}
|
|
|
|
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
|
let returnData: INodeExecutionData[][] = [];
|
|
|
|
returnData = await send.execute.call(this);
|
|
|
|
return returnData;
|
|
}
|
|
}
|