mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-30 06:59:41 -08:00
d2b97c0713
* 👕 Enable rule `node-class-description-non-core-color-present` * 👕 Apply rule to remove deprecated `color` * ✏️ Fix unrelated typos * ✏️ Fix another unrelated typo Co-authored-by: Michael Kret <michael.k@radency.com>
69 lines
1.6 KiB
TypeScript
69 lines
1.6 KiB
TypeScript
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
|
import { 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,
|
|
],
|
|
};
|
|
}
|