n8n/packages/nodes-base/nodes/Slack/ChannelDescription.ts

1006 lines
20 KiB
TypeScript
Raw Normal View History

import {
INodeProperties,
} from 'n8n-workflow';
2020-03-05 15:25:18 -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',
description: 'Archives a conversation',
2020-03-08 15:22:33 -07:00
},
{
name: 'Close',
value: 'close',
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',
description: 'Get information about a channel',
2020-03-08 15:22:33 -07:00
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all channels in a Slack team',
2020-03-08 15:22:33 -07:00
},
{
name: 'History',
value: 'history',
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',
description: 'Joins an existing conversation',
2020-03-08 15:22:33 -07:00
},
{
name: 'Kick',
value: 'kick',
description: 'Removes a user from a channel',
2020-03-08 15:22:33 -07:00
},
{
name: 'Leave',
value: 'leave',
description: 'Leaves a conversation',
2020-03-08 15:22:33 -07:00
},
{
name: 'Member',
value: 'member',
description: 'List members of a conversation',
},
2020-03-08 15:22:33 -07:00
{
name: 'Open',
value: 'open',
description: 'Opens or resumes a direct message or multi-person direct message',
2020-03-08 15:22:33 -07:00
},
{
name: 'Rename',
value: 'rename',
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',
description: 'Sets the purpose for a conversation',
2020-03-08 15:22:33 -07:00
},
{
name: 'Set Topic',
value: 'setTopic',
description: 'Sets the topic for a conversation',
2020-03-08 15:22:33 -07:00
},
{
name: 'Unarchive',
value: 'unarchive',
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.',
},
];
2020-03-05 15:25:18 -08:00
export const channelFields: INodeProperties[] = [
2020-03-05 15:25:18 -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,
description: 'The name of the channel to archive',
2020-03-08 15:22:33 -07: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,
description: 'The name of the channel to close',
2020-03-08 15:22:33 -07: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,
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
},
/* -------------------------------------------------------------------------- */
/* 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,
description: 'The ID of the channel to invite user to',
2020-03-05 15:25:18 -08:00
},
{
displayName: 'User IDs',
name: 'userIds',
type: 'multiOptions',
2020-03-15 07:51:49 -07:00
typeOptions: {
loadOptionsMethod: 'getUsers',
},
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
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,
description: 'The ID of the user to invite into channel',
2020-03-05 15:25:18 -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
},
/* -------------------------------------------------------------------------- */
/* 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,
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: '',
},
/* -------------------------------------------------------------------------- */
/* 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,
},
/* -------------------------------------------------------------------------- */
/* 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,
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,
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
},
/* -------------------------------------------------------------------------- */
/* 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,
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,
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,
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,
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: '',
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: '',
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
},
/* -------------------------------------------------------------------------- */
/* 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,
description: 'The name of the channel to leave',
2020-03-08 15:22:33 -07: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,
description: 'Whether to return all results or only up to a given limit',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
description: 'Max number of results to return',
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',
],
},
},
:zap: Remove unnessasry <br/> (#2340) * introduce analytics * add user survey backend * add user survey backend * set answers on survey submit Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> * change name to personalization * lint Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> * N8n 2495 add personalization modal (#2280) * update modals * add onboarding modal * implement questions * introduce analytics * simplify impl * implement survey handling * add personalized cateogry * update modal behavior * add thank you view * handle empty cases * rename modal * standarize modal names * update image, add tags to headings * remove unused file * remove unused interfaces * clean up footer spacing * introduce analytics * refactor to fix bug * update endpoint * set min height * update stories * update naming from questions to survey * remove spacing after core categories * fix bug in logic * sort nodes * rename types * merge with be * rename userSurvey * clean up rest api * use constants for keys * use survey keys * clean up types * move personalization to its own file Co-authored-by: ahsan-virani <ahsan.virani@gmail.com> * update parameter inputs to be multiline * update spacing * Survey new options (#2300) * split up options * fix quotes * remove unused import * refactor node credentials * add user created workflow event (#2301) * update multi params * simplify env vars * fix versionCli on FE * update personalization env * clean up node detail settings * fix event User opened Credentials panel * fix font sizes across modals * clean up input spacing * fix select modal spacing * increase spacing * fix input copy * fix webhook, tab spacing, retry button * fix button sizes * fix button size * add mini xlarge sizes * fix webhook spacing * fix nodes panel event * fix workflow id in workflow execute event * improve telemetry error logging * fix config and stop process events * add flush call on n8n stop * ready for release * fix input error highlighting * revert change * update toggle spacing * fix delete positioning * keep tooltip while focused * set strict size * increase left spacing * fix sort icons * remove unnessasry <br/> * remove unnessary break * remove unnessary margin * clean unused functionality * remove unnessary css * remove duplicate tracking * only show tooltip when hovering over label * remove extra space * add br * remove extra space * clean up commas * clean up commas * remove extra space * remove extra space * rewrite desc * add commas * add space * remove extra space * add space * add dot * update credentials section * use includes Co-authored-by: ahsan-virani <ahsan.virani@gmail.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
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.',
},
/* -------------------------------------------------------------------------- */
/* 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: '',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
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,
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: [],
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
},
/* -------------------------------------------------------------------------- */
/* 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,
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,
description: 'New name for conversation',
2020-03-08 15:22:33 -07: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,
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,
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,
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,
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,
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: '',
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: '',
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
},
/* -------------------------------------------------------------------------- */
/* 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',
},
/* -------------------------------------------------------------------------- */
/* 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.',
},
/* -------------------------------------------------------------------------- */
/* 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,
description: 'The ID of the channel to unarchive',
2020-03-08 15:22:33 -07:00
},
];