2022-08-17 08:50:24 -07:00
import { INodeProperties } from 'n8n-workflow' ;
2020-11-10 10:08:48 -08:00
2021-12-03 00:44:16 -08:00
export const notificationOperations : INodeProperties [ ] = [
2020-11-10 10:08:48 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2020-11-10 10:08:48 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'notification' ] ,
2020-11-10 10:08:48 -08:00
} ,
} ,
options : [
{
name : 'Send' ,
value : 'send' ,
description : 'Sends notifications to users or groups' ,
2022-07-10 13:50:51 -07:00
action : 'Send a notification' ,
2020-11-10 10:08:48 -08:00
} ,
] ,
default : 'send' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-11-10 10:08:48 -08:00
2021-12-03 00:44:16 -08:00
export const notificationFields : INodeProperties [ ] = [
2020-11-10 10:09:13 -08:00
/* -------------------------------------------------------------------------- */
/* notification:send */
/* -------------------------------------------------------------------------- */
2020-11-10 10:08:48 -08:00
{
displayName : 'Message' ,
name : 'message' ,
required : true ,
type : 'string' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'send' ] ,
resource : [ 'notification' ] ,
2020-11-10 10:08:48 -08:00
} ,
} ,
default : '' ,
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'send' ] ,
resource : [ 'notification' ] ,
2020-11-10 10:08:48 -08:00
} ,
} ,
options : [
{
displayName : 'Image' ,
name : 'imageUi' ,
placeholder : 'Add Image' ,
type : 'fixedCollection' ,
typeOptions : {
multipleValues : false ,
} ,
default : { } ,
options : [
{
name : 'imageValue' ,
2022-06-03 10:23:49 -07:00
displayName : 'Image' ,
2020-11-10 10:08:48 -08:00
values : [
{
displayName : 'Binary Data' ,
name : 'binaryData' ,
type : 'boolean' ,
default : false ,
} ,
{
displayName : 'Image Full Size' ,
name : 'imageFullsize' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
binaryData : [ false ] ,
2020-11-10 10:08:48 -08:00
} ,
} ,
2022-04-22 09:29:51 -07:00
description : 'HTTP/HTTPS URL. Maximum size of 2048× 2048px JPEG.' ,
2020-11-10 10:08:48 -08:00
} ,
{
displayName : 'Image Thumbnail' ,
name : 'imageThumbnail' ,
type : 'string' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
binaryData : [ false ] ,
2020-11-10 10:08:48 -08:00
} ,
} ,
default : '' ,
2022-04-22 09:29:51 -07:00
description : 'HTTP/HTTPS URL. Maximum size of 240× 240px JPEG.' ,
2020-11-10 10:08:48 -08:00
} ,
{
displayName : 'Binary Property' ,
name : 'binaryProperty' ,
type : 'string' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
binaryData : [ true ] ,
2020-11-10 10:08:48 -08:00
} ,
} ,
default : 'data' ,
2022-05-06 14:01:25 -07:00
description : 'Name of the property that holds the binary data' ,
2020-11-10 10:08:48 -08:00
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Notification Disabled' ,
name : 'notificationDisabled' ,
type : 'boolean' ,
default : false ,
2022-06-20 07:54:01 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
2022-08-17 08:50:24 -07:00
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>" ,
2020-11-10 10:08:48 -08:00
} ,
{
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' ,
} ,
] ,
} ,
] ,
} ,
] ,
} ,
2021-12-03 00:44:16 -08:00
] ;