n8n/packages/nodes-base/nodes/Line/NotificationDescription.ts
Iván Ovejero 70ae90fa3c
refactor: Apply more eslint-plugin-n8n-nodes-base autofixable rules (#3432)
*  Update `lintfix` script

* 👕 Remove unneeded lint exceptions

* 👕 Run baseline `lintfix`

* 👕 Apply `node-param-description-miscased-url` (#3441)

* 👕 Apply `rule node-param-placeholder-miscased-id` (#3443)

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Apply `node-param-option-name-wrong-for-upsert` (#3446)

* 👕 Apply `node-param-min-value-wrong-for-limit` (#3442)

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* Apply `node-param-display-name-wrong-for-dynamic-options` (#3454)

* 🔨 fix

*  Fix `Assigned To` fields

Co-authored-by: Michael Kret <michael.k@radency.com>

* 👕 Apply `rule node-param-default-wrong-for-number` (#3453)

* 👕 Apply `node-param-default-wrong-for-string` (#3452)

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* Apply `node-param-display-name-miscased` (#3449)

* 🔨 fix

* 🔨 exceptions

*  review fixes

* 👕 Apply `node-param-description-lowercase-first-char` (#3451)

*  fix

*  review fixes

*  fix

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Apply `node-param-description-wrong-for-dynamic-options` (#3456)

* Rule working as intended

* Add rule

* 🔥 Remove repetitions

* 👕 Add exceptions

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Small fix for `node-param-description-wrong-for-dynamic-options`

* 👕 Apply `node-param-default-wrong-for-fixed-collection` (#3460)

* 👕 Apply `node-param-description-line-break-html-tag` (#3462)

* 👕 Run baseline `lintfix`

* 👕 Apply `node-param-options-type-unsorted-items` (#3459)

*  fix

* 🔨 exceptions

* Add exception for Salesmate and Zoom

Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

*  Restore `lintfix` command

Co-authored-by: Omar Ajoue <krynble@gmail.com>
Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com>
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com>
2022-06-03 19:23:49 +02:00

175 lines
3.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {
INodeProperties,
} from 'n8n-workflow';
export const notificationOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: [
'notification',
],
},
},
options: [
{
name: 'Send',
value: 'send',
description: 'Sends notifications to users or groups',
},
],
default: 'send',
},
];
export const notificationFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* notification:send */
/* -------------------------------------------------------------------------- */
{
displayName: 'Message',
name: 'message',
required: true,
type: 'string',
displayOptions: {
show: {
operation: [
'send',
],
resource: [
'notification',
],
},
},
default: '',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
operation: [
'send',
],
resource: [
'notification',
],
},
},
options: [
{
displayName: 'Image',
name: 'imageUi',
placeholder: 'Add Image',
type: 'fixedCollection',
typeOptions: {
multipleValues: false,
},
default: {},
options: [
{
name: 'imageValue',
displayName: 'Image',
values: [
{
displayName: 'Binary Data',
name: 'binaryData',
type: 'boolean',
default: false,
},
{
displayName: 'Image Full Size',
name: 'imageFullsize',
type: 'string',
default: '',
displayOptions: {
show: {
binaryData: [
false,
],
},
},
description: 'HTTP/HTTPS URL. Maximum size of 2048×2048px JPEG.',
},
{
displayName: 'Image Thumbnail',
name: 'imageThumbnail',
type: 'string',
displayOptions: {
show: {
binaryData: [
false,
],
},
},
default: '',
description: 'HTTP/HTTPS URL. Maximum size of 240×240px JPEG.',
},
{
displayName: 'Binary Property',
name: 'binaryProperty',
type: 'string',
displayOptions: {
show: {
binaryData: [
true,
],
},
},
default: 'data',
description: 'Name of the property that holds the binary data',
},
],
},
],
},
{
displayName: 'Notification Disabled',
name: 'notificationDisabled',
type: 'boolean',
default: false,
description: '<p>true: The user doesn\'t receive a push notification when the message is sent.</p><p>false: The user receives a push notification when the message is sent</p>',
},
{
displayName: 'Sticker',
name: 'stickerUi',
placeholder: 'Add Sticker',
type: 'fixedCollection',
typeOptions: {
multipleValues: false,
},
default: {},
options: [
{
name: 'stickerValue',
displayName: 'Sticker',
values: [
{
displayName: 'Sticker ID',
name: 'stickerId',
type: 'number',
default: '',
},
{
displayName: 'Sticker Package ID',
name: 'stickerPackageId',
type: 'number',
default: '',
description: 'Package ID',
},
],
},
],
},
],
},
];