mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-27 13:39:44 -08:00
88dea330b9
* ⚡ Update `lintfix` script * ⚡ Run baseline `lintfix` * 🔥 Remove unneeded exceptions (#3538) * 🔥 Remove exceptions for `node-param-default-wrong-for-simplify` * 🔥 Remove exceptions for `node-param-placeholder-miscased-id` * ⚡ Update version * 👕 Apply `node-param-placeholder-missing` (#3542) * 👕 Apply `filesystem-wrong-cred-filename` (#3543) * 👕 Apply `node-param-description-missing-from-dynamic-options` (#3545) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Apply `node-class-description-empty-string` (#3546) * 👕 Apply `node-class-description-icon-not-svg` (#3548) * 👕 Apply `filesystem-wrong-node-filename` (#3549) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Expand lintings to credentials (#3550) * 👕 Apply `node-param-multi-options-type-unsorted-items` (#3552) * ⚡ fix * ⚡ Minor fixes Co-authored-by: Michael Kret <michael.k@radency.com> * 👕 Apply `node-param-description-wrong-for-dynamic-multi-options` (#3541) * ⚡ Add new lint rule, node-param-description-wrong-for-dynamic-multi-options * ⚡ Fix with updated linting rules * ⚡ Minor fixes Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Apply `node-param-description-boolean-without-whether` (#3553) * ⚡ fix * Update packages/nodes-base/nodes/Clockify/ProjectDescription.ts Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Apply node-param-display-name-wrong-for-dynamic-multi-options (#3537) * 👕 Add exceptions * 👕 Add exception * ✏️ Alphabetize rules * ⚡ Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
294 lines
6.7 KiB
TypeScript
294 lines
6.7 KiB
TypeScript
import {
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export const subscriberOperations: INodeProperties[] = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
noDataExpression: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'subscriber',
|
|
],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Add',
|
|
value: 'add',
|
|
description: 'Add a subscriber to a list',
|
|
},
|
|
{
|
|
name: 'Count',
|
|
value: 'count',
|
|
description: 'Count subscribers',
|
|
},
|
|
{
|
|
name: 'Delete',
|
|
value: 'delete',
|
|
description: 'Delete a subscriber from a list',
|
|
},
|
|
{
|
|
name: 'Remove',
|
|
value: 'remove',
|
|
description: 'Unsubscribe user from a list',
|
|
},
|
|
{
|
|
name: 'Status',
|
|
value: 'status',
|
|
description: 'Get the status of subscriber',
|
|
},
|
|
],
|
|
default: 'add',
|
|
},
|
|
];
|
|
|
|
export const subscriberFields: INodeProperties[] = [
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
/* subscriber:add */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Email',
|
|
name: 'email',
|
|
type: 'string',
|
|
placeholder: 'name@email.com',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'subscriber',
|
|
],
|
|
operation: [
|
|
'add',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'Email address of the subscriber',
|
|
},
|
|
{
|
|
displayName: 'List ID',
|
|
name: 'listId',
|
|
type: 'string',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'subscriber',
|
|
],
|
|
operation: [
|
|
'add',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'The list ID you want to subscribe a user to. This encrypted & hashed ID can be found under View all lists section named ID.',
|
|
},
|
|
{
|
|
displayName: 'Additional Fields',
|
|
name: 'additionalFields',
|
|
type: 'collection',
|
|
placeholder: 'Add Field',
|
|
default: {},
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'subscriber',
|
|
],
|
|
operation: [
|
|
'add',
|
|
],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
displayName: 'Country',
|
|
name: 'country',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'User\'s 2 letter country code',
|
|
},
|
|
{
|
|
displayName: 'GDPR',
|
|
name: 'gdpr',
|
|
type: 'boolean',
|
|
default: false,
|
|
description: 'Whether you\'re signing up EU users in a GDPR compliant manner',
|
|
},
|
|
{
|
|
displayName: 'Honeypot',
|
|
name: 'hp',
|
|
type: 'boolean',
|
|
default: false,
|
|
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
|
|
description: 'Include this \'honeypot\' field to prevent spambots from signing up via this API call. When spambots fills in this field, this API call will exit, preventing them from signing up fake addresses to your form. This parameter is only supported in Sendy 3.0 onwards.',
|
|
},
|
|
{
|
|
displayName: 'IP Address',
|
|
name: 'ipaddress',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'User\'s IP address',
|
|
},
|
|
{
|
|
displayName: 'Name',
|
|
name: 'name',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'User\'s name',
|
|
},
|
|
{
|
|
displayName: 'Referrer',
|
|
name: 'referrer',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'The URL where the user signed up from',
|
|
},
|
|
{
|
|
displayName: 'Silent',
|
|
name: 'silent',
|
|
type: 'boolean',
|
|
default: false,
|
|
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
|
|
description: 'Set to "true" if your list is \'Double opt-in\' but you want to bypass that and signup the user to the list as \'Single Opt-in instead\' (optional)',
|
|
},
|
|
],
|
|
},
|
|
/* -------------------------------------------------------------------------- */
|
|
/* subscriber:count */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'List ID',
|
|
name: 'listId',
|
|
type: 'string',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'subscriber',
|
|
],
|
|
operation: [
|
|
'count',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'The list ID you want to subscribe a user to. This encrypted & hashed ID can be found under View all lists section named ID.',
|
|
},
|
|
/* -------------------------------------------------------------------------- */
|
|
/* subscriber:delete */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Email',
|
|
name: 'email',
|
|
type: 'string',
|
|
placeholder: 'name@email.com',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'subscriber',
|
|
],
|
|
operation: [
|
|
'delete',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'Email address of the subscriber',
|
|
},
|
|
{
|
|
displayName: 'List ID',
|
|
name: 'listId',
|
|
type: 'string',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'subscriber',
|
|
],
|
|
operation: [
|
|
'delete',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'The list ID you want to subscribe a user to. This encrypted & hashed ID can be found under View all lists section named ID.',
|
|
},
|
|
/* -------------------------------------------------------------------------- */
|
|
/* subscriber:remove */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Email',
|
|
name: 'email',
|
|
type: 'string',
|
|
placeholder: 'name@email.com',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'subscriber',
|
|
],
|
|
operation: [
|
|
'remove',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'Email address of the subscriber',
|
|
},
|
|
{
|
|
displayName: 'List ID',
|
|
name: 'listId',
|
|
type: 'string',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'subscriber',
|
|
],
|
|
operation: [
|
|
'remove',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'The list ID you want to subscribe a user to. This encrypted & hashed ID can be found under View all lists section named ID.',
|
|
},
|
|
/* -------------------------------------------------------------------------- */
|
|
/* subscriber:status */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Email',
|
|
name: 'email',
|
|
type: 'string',
|
|
placeholder: 'name@email.com',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'subscriber',
|
|
],
|
|
operation: [
|
|
'status',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'Email address of the subscriber',
|
|
},
|
|
{
|
|
displayName: 'List ID',
|
|
name: 'listId',
|
|
type: 'string',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'subscriber',
|
|
],
|
|
operation: [
|
|
'status',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'The list ID you want to subscribe a user to. This encrypted & hashed ID can be found under View all lists section named ID.',
|
|
},
|
|
];
|