n8n/packages/nodes-base/nodes/SendInBlue/SendInBlue.node.ts
Iván Ovejero b03e358a12
refactor: Integrate consistent-type-imports in nodes-base (no-changelog) (#5267)
* 👕 Enable `consistent-type-imports` for nodes-base

* 👕 Apply to nodes-base

*  Undo unrelated changes

* 🚚 Move to `.eslintrc.js` in nodes-base

*  Revert "Enable `consistent-type-imports` for nodes-base"

This reverts commit 529ad72b05.

* 👕 Fix severity
2023-01-27 12:22:44 +01:00

69 lines
1.6 KiB
TypeScript

/* eslint-disable n8n-nodes-base/node-filename-against-convention */
import type { INodeType, INodeTypeDescription } from 'n8n-workflow';
import { attributeFields, attributeOperations } from './AttributeDescription';
import { contactFields, contactOperations } from './ContactDescription';
import { emailFields, emailOperations } from './EmailDescription';
import { senderFields, senderOperations } from './SenderDescrition';
export class SendInBlue implements INodeType {
description: INodeTypeDescription = {
displayName: 'SendInBlue',
name: 'sendInBlue',
icon: 'file:sendinblue.svg',
group: ['transform'],
version: 1,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Consume Sendinblue API',
defaults: {
name: 'SendInBlue',
},
inputs: ['main'],
outputs: ['main'],
credentials: [
{
name: 'sendInBlueApi',
required: true,
},
],
requestDefaults: {
baseURL: 'https://api.sendinblue.com',
},
properties: [
{
displayName: 'Resource',
name: 'resource',
type: 'options',
noDataExpression: true,
options: [
{
name: 'Contact',
value: 'contact',
},
{
name: 'Contact Attribute',
value: 'attribute',
},
{
name: 'Email',
value: 'email',
},
{
name: 'Sender',
value: 'sender',
},
],
default: 'email',
},
...attributeOperations,
...attributeFields,
...senderOperations,
...senderFields,
...contactOperations,
...contactFields,
...emailOperations,
...emailFields,
],
};
}