2020-12-13 01:47:52 -08:00
import {
INodeProperties ,
} from 'n8n-workflow' ;
2020-03-05 15:25:18 -08:00
2021-12-03 00:44:16 -08:00
export const channelOperations : INodeProperties [ ] = [
2020-03-05 15:25:18 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
} ,
} ,
options : [
2020-03-08 15:22:33 -07:00
{
name : 'Archive' ,
value : 'archive' ,
2022-05-06 14:01:25 -07:00
description : 'Archives a conversation' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Close' ,
value : 'close' ,
2022-05-06 14:01:25 -07:00
description : 'Closes a direct message or multi-person direct message' ,
2020-03-08 15:22:33 -07:00
} ,
2020-03-05 15:25:18 -08:00
{
name : 'Create' ,
value : 'create' ,
description : 'Initiates a public or private channel-based conversation' ,
} ,
2020-03-08 15:22:33 -07:00
{
name : 'Get' ,
value : 'get' ,
2022-05-06 14:01:25 -07:00
description : 'Get information about a channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Get All' ,
value : 'getAll' ,
2022-05-06 14:01:25 -07:00
description : 'Get all channels in a Slack team' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'History' ,
value : 'history' ,
2022-05-06 14:01:25 -07:00
description : 'Get a conversation\'s history of messages and events' ,
2020-03-08 15:22:33 -07:00
} ,
2020-03-05 15:25:18 -08:00
{
name : 'Invite' ,
value : 'invite' ,
description : 'Invite a user to a channel' ,
} ,
2020-03-08 15:22:33 -07:00
{
name : 'Join' ,
value : 'join' ,
2022-05-06 14:01:25 -07:00
description : 'Joins an existing conversation' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Kick' ,
value : 'kick' ,
2022-05-06 14:01:25 -07:00
description : 'Removes a user from a channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Leave' ,
value : 'leave' ,
2022-05-06 14:01:25 -07:00
description : 'Leaves a conversation' ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
{
name : 'Member' ,
value : 'member' ,
2022-05-06 14:01:25 -07:00
description : 'List members of a conversation' ,
2020-12-13 01:47:52 -08:00
} ,
2020-03-08 15:22:33 -07:00
{
name : 'Open' ,
value : 'open' ,
2022-05-06 14:01:25 -07:00
description : 'Opens or resumes a direct message or multi-person direct message' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Rename' ,
value : 'rename' ,
2022-05-06 14:01:25 -07:00
description : 'Renames a conversation' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Replies' ,
value : 'replies' ,
description : 'Get a thread of messages posted to a channel' ,
} ,
{
name : 'Set Purpose' ,
value : 'setPurpose' ,
2022-05-06 14:01:25 -07:00
description : 'Sets the purpose for a conversation' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Set Topic' ,
value : 'setTopic' ,
2022-05-06 14:01:25 -07:00
description : 'Sets the topic for a conversation' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Unarchive' ,
value : 'unarchive' ,
2022-05-06 14:01:25 -07:00
description : 'Unarchives a conversation' ,
2020-03-08 15:22:33 -07:00
} ,
2020-03-05 15:25:18 -08:00
] ,
default : 'create' ,
description : 'The operation to perform.' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-03-05 15:25:18 -08:00
2021-12-03 00:44:16 -08:00
export const channelFields : INodeProperties [ ] = [
2020-03-05 15:25:18 -08:00
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:archive */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'archive' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
default : '' ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The name of the channel to archive' ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:close */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'close' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
default : '' ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The name of the channel to close' ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:create */
/* -------------------------------------------------------------------------- */
2020-03-05 15:25:18 -08:00
{
2020-03-08 15:22:33 -07:00
displayName : 'Channel' ,
name : 'channelId' ,
2020-03-05 15:25:18 -08:00
type : 'string' ,
default : '' ,
placeholder : 'Channel name' ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'create' ,
2020-03-05 15:25:18 -08:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The name of the channel to create' ,
2020-03-05 15:25:18 -08:00
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'create' ,
] ,
} ,
} ,
options : [
{
displayName : 'Is Private' ,
name : 'isPrivate' ,
type : 'boolean' ,
default : false ,
2020-03-08 15:22:33 -07:00
description : 'Create a private channel instead of a public one' ,
2020-03-05 15:25:18 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-03-05 15:25:18 -08:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:invite */
/* -------------------------------------------------------------------------- */
2020-03-05 15:25:18 -08:00
{
2020-03-08 15:22:33 -07:00
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
2020-03-05 15:25:18 -08:00
default : '' ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'invite' ,
2020-03-05 15:25:18 -08:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The ID of the channel to invite user to' ,
2020-03-05 15:25:18 -08:00
} ,
{
2020-11-24 00:09:00 -08:00
displayName : 'User IDs' ,
name : 'userIds' ,
type : 'multiOptions' ,
2020-03-15 07:51:49 -07:00
typeOptions : {
loadOptionsMethod : 'getUsers' ,
} ,
2022-04-22 09:29:51 -07:00
default : [ ] ,
2020-03-05 15:25:18 -08:00
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'invite' ,
2020-03-05 15:25:18 -08:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The ID of the user to invite into channel' ,
2020-03-05 15:25:18 -08:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:get */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'get' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
required : true ,
description : 'Channel ID to learn more about' ,
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'get' ,
] ,
} ,
} ,
options : [
{
displayName : 'Include Num of Members' ,
name : 'includeNumMembers' ,
type : 'boolean' ,
default : false ,
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:kick */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
default : '' ,
placeholder : 'Channel name' ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'kick' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The name of the channel to create' ,
2020-03-08 15:22:33 -07:00
} ,
{
2020-03-15 07:51:49 -07:00
displayName : 'User' ,
2020-03-08 15:22:33 -07:00
name : 'userId' ,
2020-03-15 07:51:49 -07:00
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getUsers' ,
} ,
2020-03-08 15:22:33 -07:00
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'kick' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
default : '' ,
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:join */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
default : '' ,
placeholder : 'Channel name' ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'join' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
required : true ,
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:getAll */
/* -------------------------------------------------------------------------- */
2020-03-05 15:25:18 -08:00
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-03-05 15:25:18 -08:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'getAll' ,
] ,
returnAll : [
false ,
] ,
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 100 ,
} ,
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-03-05 15:25:18 -08:00
} ,
{
2020-03-08 15:22:33 -07:00
displayName : 'Filters' ,
name : 'filters' ,
2020-03-05 15:25:18 -08:00
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
options : [
{
2020-03-08 15:22:33 -07:00
displayName : 'Exclude Archived' ,
name : 'excludeArchived' ,
type : 'boolean' ,
default : false ,
description : 'Set to true to exclude archived channels from the list' ,
} ,
{
displayName : 'Types' ,
name : 'types' ,
type : 'multiOptions' ,
options : [
{
name : 'Public Channel' ,
2020-10-22 06:46:03 -07:00
value : 'public_channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Private Channel' ,
2020-10-22 06:46:03 -07:00
value : 'private_channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'mpim' ,
2020-10-22 06:46:03 -07:00
value : 'mpim' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'im' ,
2020-10-22 06:46:03 -07:00
value : 'im' ,
2020-03-08 15:22:33 -07:00
} ,
] ,
default : [ 'public_channel' ] ,
description : 'Mix and match channel types' ,
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:history */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
default : '' ,
placeholder : 'Channel name' ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'history' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The name of the channel to create' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'history' ,
] ,
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'history' ,
] ,
returnAll : [
false ,
] ,
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 100 ,
} ,
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Filters' ,
name : 'filters' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'history' ,
] ,
} ,
} ,
options : [
{
displayName : 'Inclusive' ,
name : 'inclusive' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Include messages with latest or oldest timestamp in results only when either timestamp is specified' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Latest' ,
name : 'latest' ,
type : 'dateTime' ,
2020-03-05 15:25:18 -08:00
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'End of time range of messages to include in results' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Oldest' ,
name : 'oldest' ,
type : 'dateTime' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Start of time range of messages to include in results' ,
2020-03-05 15:25:18 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-03-05 15:25:18 -08:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:leave */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'leave' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
default : '' ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The name of the channel to leave' ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:member */
/* -------------------------------------------------------------------------- */
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
default : '' ,
displayOptions : {
show : {
operation : [
'member' ,
] ,
resource : [
'channel' ,
] ,
} ,
} ,
required : true ,
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'member' ,
] ,
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-12-13 01:47:52 -08:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-12-13 01:47:52 -08:00
default : 100 ,
placeholder : 'Limit' ,
displayOptions : {
show : {
operation : [
'member' ,
] ,
resource : [
'channel' ,
] ,
returnAll : [
false ,
] ,
} ,
} ,
} ,
{
displayName : 'Resolve Data' ,
name : 'resolveData' ,
type : 'boolean' ,
default : false ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'member' ,
] ,
} ,
} ,
2021-10-27 13:00:13 -07:00
description : 'By default the response only contain the ID to resource. If this option gets activated, it will resolve the data automatically.' ,
2020-12-13 01:47:52 -08:00
} ,
/* -------------------------------------------------------------------------- */
/* channel:open */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'open' ,
] ,
} ,
} ,
options : [
{
displayName : 'Channel ID' ,
name : 'channelId' ,
type : 'string' ,
default : '' ,
2022-04-22 09:29:51 -07:00
description : 'Resume a conversation by supplying an im or mpim\'s ID. Or provide the users field instead.' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Return IM' ,
name : 'returnIm' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Boolean, indicates you want the full IM channel definition in the response' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Users' ,
name : 'users' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getUsers' ,
} ,
default : [ ] ,
2022-05-06 14:01:25 -07:00
description : 'If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a channel when not supplying users.' ,
2020-03-08 15:22:33 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:rename */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'rename' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
default : '' ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The name of the channel to rename' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Name' ,
name : 'name' ,
type : 'string' ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'rename' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
default : '' ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'New name for conversation' ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:replies */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
default : '' ,
placeholder : 'Channel name' ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'replies' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The name of the channel to create' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'TS' ,
name : 'ts' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'replies' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'Unique identifier of a thread\'s parent message' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'replies' ,
] ,
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'replies' ,
] ,
returnAll : [
false ,
] ,
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 100 ,
} ,
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Filters' ,
name : 'filters' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'channel' ,
] ,
operation : [
'replies' ,
] ,
} ,
} ,
options : [
{
displayName : 'Inclusive' ,
name : 'inclusive' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Include messages with latest or oldest timestamp in results only when either timestamp is specified' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Latest' ,
name : 'latest' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'End of time range of messages to include in results' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Oldest' ,
name : 'oldest' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Start of time range of messages to include in results' ,
2020-03-08 15:22:33 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:setPurpose */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'setPurpose' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
default : '' ,
required : true ,
description : 'Conversation to set the purpose of' ,
} ,
{
displayName : 'Purpose' ,
name : 'purpose' ,
type : 'string' ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'setPurpose' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
default : '' ,
required : true ,
description : 'A new, specialer purpose' ,
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:setTopic */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'setTopic' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
default : '' ,
required : true ,
description : 'Conversation to set the topic of' ,
} ,
{
displayName : 'Topic' ,
name : 'topic' ,
type : 'string' ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'setTopic' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
default : '' ,
required : true ,
description : 'The new topic string. Does not support formatting or linkification.' ,
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:unarchive */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
operation : [
2020-10-22 06:46:03 -07:00
'unarchive' ,
2020-03-08 15:22:33 -07:00
] ,
resource : [
'channel' ,
] ,
} ,
} ,
default : '' ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The ID of the channel to unarchive' ,
2020-03-08 15:22:33 -07:00
} ,
2021-12-03 00:44:16 -08:00
] ;