2020-12-13 01:47:52 -08:00
import { INodeProperties } from 'n8n-workflow' ;
2021-12-03 00:44:16 -08:00
export const reactionOperations : INodeProperties [ ] = [
2020-12-13 01:47:52 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2020-12-13 01:47:52 -08:00
displayOptions : {
show : {
resource : [
'reaction' ,
] ,
} ,
} ,
options : [
{
name : 'Add' ,
value : 'add' ,
description : 'Adds a reaction to a message' ,
2022-07-10 13:50:51 -07:00
action : 'Add a reaction' ,
2020-12-13 01:47:52 -08:00
} ,
{
name : 'Get' ,
value : 'get' ,
description : 'Get the reactions of a message' ,
2022-07-10 13:50:51 -07:00
action : 'Get a reaction' ,
2020-12-13 01:47:52 -08:00
} ,
{
name : 'Remove' ,
value : 'remove' ,
description : 'Remove a reaction of a message' ,
2022-07-10 13:50:51 -07:00
action : 'Remove a reaction' ,
2020-12-13 01:47:52 -08:00
} ,
] ,
default : 'add' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-12-13 01:47:52 -08:00
2021-12-03 00:44:16 -08:00
export const reactionFields : INodeProperties [ ] = [
2020-12-13 01:47:52 -08:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-12-13 01:47:52 -08:00
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'reaction' ,
] ,
operation : [
'add' ,
'get' ,
'remove' ,
] ,
} ,
} ,
2022-07-14 13:05:11 -07:00
description : 'Channel containing the message. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-12-13 01:47:52 -08:00
} ,
{
displayName : 'Emoji' ,
name : 'name' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'reaction' ,
] ,
operation : [
'add' ,
'remove' ,
] ,
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'Name of emoji' ,
2020-12-13 01:47:52 -08:00
placeholder : '+1' ,
} ,
{
displayName : 'Timestamp' ,
name : 'timestamp' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'reaction' ,
] ,
operation : [
'add' ,
'get' ,
'remove' ,
] ,
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'Timestamp of the message' ,
2020-12-13 01:47:52 -08:00
} ,
2021-12-03 00:44:16 -08:00
] ;