mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
532503b69f
* Added reaction method to message * Increased limit for channels on getChannels, removed unused fields in the code * Using own operation for reactions * Registering reaction fields and operations * Added Operation "Reaction" to Slack.node.ts * Fixing variable name for emoji * now removing reaction on "remove" instead of "add" * Using GET for reactions.get and passing arguments as query * Added members operation * Fixed typo in timestamp * Added user.info and user.getPresence * Fixed: wrong operation name * ⚡ Improvements to #1238 * ⚡ Add field resolve data when retrieving channel members * ⚡ Minor improvements to Slack-Node Co-authored-by: Andreas Scherren <ascherren@brightfuture.de> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
194 lines
4 KiB
TypeScript
194 lines
4 KiB
TypeScript
import { INodeProperties } from 'n8n-workflow';
|
|
|
|
export const starOperations = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'star',
|
|
],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Add',
|
|
value: 'add',
|
|
description: 'Add a star to an item.',
|
|
},
|
|
{
|
|
name: 'Delete',
|
|
value: 'delete',
|
|
description: 'Delete a star from an item.',
|
|
},
|
|
{
|
|
name: 'Get All',
|
|
value: 'getAll',
|
|
description: 'Get all stars of autenticated user.',
|
|
},
|
|
],
|
|
default: 'add',
|
|
description: 'The operation to perform.',
|
|
},
|
|
] as INodeProperties[];
|
|
|
|
export const starFields = [
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
/* star:add */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Options',
|
|
name: 'options',
|
|
type: 'collection',
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'add',
|
|
],
|
|
resource: [
|
|
'star',
|
|
],
|
|
},
|
|
},
|
|
default: {},
|
|
description: 'Options to set',
|
|
placeholder: 'Add options',
|
|
options: [
|
|
{
|
|
displayName: 'Channel ID',
|
|
name: 'channelId',
|
|
type: 'options',
|
|
typeOptions: {
|
|
loadOptionsMethod: 'getChannels',
|
|
},
|
|
default: '',
|
|
description: 'Channel to add star to, or channel where the message to add star to was posted (used with timestamp).',
|
|
},
|
|
{
|
|
displayName: 'File Comment',
|
|
name: 'fileComment',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'File comment to add star to.',
|
|
},
|
|
{
|
|
displayName: 'File ID',
|
|
name: 'fileId',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'File to add star to.',
|
|
},
|
|
{
|
|
displayName: 'Timestamp',
|
|
name: 'timestamp',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Timestamp of the message to add star to.',
|
|
},
|
|
],
|
|
},
|
|
|
|
/* ----------------------------------------------------------------------- */
|
|
/* star:delete */
|
|
/* ----------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Options',
|
|
name: 'options',
|
|
type: 'collection',
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'delete',
|
|
],
|
|
resource: [
|
|
'star',
|
|
],
|
|
},
|
|
},
|
|
default: {},
|
|
description: 'Options to set',
|
|
placeholder: 'Add options',
|
|
options: [
|
|
{
|
|
displayName: 'Channel ID',
|
|
name: 'channelId',
|
|
type: 'options',
|
|
typeOptions: {
|
|
loadOptionsMethod: 'getChannels',
|
|
},
|
|
default: '',
|
|
description: 'Channel to add star to, or channel where the message to add star to was posted (used with timestamp).',
|
|
},
|
|
{
|
|
displayName: 'File ID',
|
|
name: 'fileId',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'File to add star to.',
|
|
},
|
|
{
|
|
displayName: 'File Comment',
|
|
name: 'fileComment',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'File comment to add star to.',
|
|
},
|
|
{
|
|
displayName: 'Timestamp',
|
|
name: 'timestamp',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Timestamp of the message to add star to.',
|
|
},
|
|
],
|
|
},
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
/* star:getAll */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Return All',
|
|
name: 'returnAll',
|
|
type: 'boolean',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'star',
|
|
],
|
|
operation: [
|
|
'getAll',
|
|
],
|
|
},
|
|
},
|
|
default: false,
|
|
description: 'If all results should be returned or only up to a given limit.',
|
|
},
|
|
{
|
|
displayName: 'Limit',
|
|
name: 'limit',
|
|
type: 'number',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'star',
|
|
],
|
|
operation: [
|
|
'getAll',
|
|
],
|
|
returnAll: [
|
|
false,
|
|
],
|
|
},
|
|
},
|
|
typeOptions: {
|
|
minValue: 1,
|
|
maxValue: 100,
|
|
},
|
|
default: 50,
|
|
description: 'How many results to return.',
|
|
},
|
|
] as INodeProperties[];
|