mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -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>
176 lines
3.6 KiB
TypeScript
176 lines
3.6 KiB
TypeScript
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,
|
||
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
|
||
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',
|
||
},
|
||
],
|
||
},
|
||
],
|
||
},
|
||
],
|
||
},
|
||
];
|