Extend Twist Node (#1721)

* Add get/getAll:messageConversation to Twist node

* Add delete:messageConversation to Twist node

* Add update:messageConversation to Twist node

* Add archive/unarchive/delete:channel to Twist node

* Add add/update/get/getAll/remove:Thread to Twist node

* Add add/update/get/getAll/remove:Comment to Twist node

* Lint fixes

* Fix operations's descriptions

* Enhance Twist node code

* Reorder attributes alphabetically

* Fix typos

* Fix the ouput of get:Comment operation

* Fix getAll:Comment & getAll:Thread operations outputs

* 🐛 Add missing scopes and remove not needed parameters

Co-authored-by: dali <servfrdali@yahoo.fr>
This commit is contained in:
Jan
2021-04-30 19:44:12 -05:00
committed by GitHub
parent fc54f7c82b
commit f79bc633c0
6 changed files with 1946 additions and 25 deletions

View File

@@ -15,11 +15,21 @@ export const channelOperations = [
},
},
options: [
{
name: 'Archive',
value: 'archive',
description: 'Archive a channel',
},
{
name: 'Create',
value: 'create',
description: 'Initiates a public or private channel-based conversation',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a channel',
},
{
name: 'Get',
value: 'get',
@@ -30,6 +40,11 @@ export const channelOperations = [
value: 'getAll',
description: 'Get all channels',
},
{
name: 'Unarchive',
value: 'unarchive',
description: 'Unarchive a channel',
},
{
name: 'Update',
value: 'update',
@@ -64,7 +79,7 @@ export const channelFields = [
},
},
required: true,
description: 'The id of the workspace.',
description: 'The ID of the workspace.',
},
{
displayName: 'Name',
@@ -156,28 +171,28 @@ export const channelFields = [
},
],
default: 0,
description: 'The color of the channel',
description: 'The color of the channel.',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
description: 'The description of the channel',
description: 'The description of the channel.',
},
{
displayName: 'Public',
name: 'public',
type: 'boolean',
default: false,
description: 'If enabled, the channel will be marked as public',
description: 'If enabled, the channel will be marked as public.',
},
{
displayName: 'Temp ID',
name: 'temp_id',
type: 'number',
default: -1,
description: 'The temporary id of the channel. It needs to be a negative number.',
description: 'The temporary ID of the channel. It needs to be a negative number.',
},
{
displayName: 'User IDs',
@@ -194,8 +209,9 @@ export const channelFields = [
},
],
},
/* -------------------------------------------------------------------------- */
/* channel:get */
/* channel:get/archive/unarchive/delete */
/* -------------------------------------------------------------------------- */
{
displayName: 'Channel ID',
@@ -205,7 +221,10 @@ export const channelFields = [
displayOptions: {
show: {
operation: [
'archive',
'delete',
'get',
'unarchive',
],
resource: [
'channel',
@@ -213,8 +232,9 @@ export const channelFields = [
},
},
required: true,
description: 'The ID of the channel',
description: 'The ID of the channel.',
},
/* -------------------------------------------------------------------------- */
/* channel:getAll */
/* -------------------------------------------------------------------------- */
@@ -302,7 +322,7 @@ export const channelFields = [
name: 'archived',
type: 'boolean',
default: false,
description: 'If enabled, only archived conversations are returned',
description: 'If enabled, only archived conversations are returned.',
},
],
},
@@ -400,28 +420,28 @@ export const channelFields = [
},
],
default: 0,
description: 'The color of the channel',
description: 'The color of the channel.',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
description: 'The description of the channel',
description: 'The description of the channel.',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
description: 'The name of the channel',
description: 'The name of the channel.',
},
{
displayName: 'Public',
name: 'public',
type: 'boolean',
default: false,
description: 'If enabled, the channel will be marked as public',
description: 'If enabled, the channel will be marked as public.',
},
],
},