mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
⚡ Add message resource description stub
This commit is contained in:
parent
a21a2b0118
commit
053f43d649
|
@ -18,78 +18,262 @@ export const messageOperations = [
|
||||||
{
|
{
|
||||||
name: 'Create',
|
name: 'Create',
|
||||||
value: 'create',
|
value: 'create',
|
||||||
description: 'Create a message',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'WS',
|
name: 'Delete',
|
||||||
value: 'ws',
|
value: 'delete',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Update',
|
||||||
|
value: 'update',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Get',
|
||||||
|
value: 'get',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Get All',
|
||||||
|
value: 'getAll',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: 'create',
|
default: 'create',
|
||||||
description: 'The operation to perform.',
|
description: 'Operation to perform',
|
||||||
},
|
},
|
||||||
] as INodeProperties[];
|
] as INodeProperties[];
|
||||||
|
|
||||||
export const messageFields = [
|
export const messageFields = [
|
||||||
|
{
|
||||||
/* -------------------------------------------------------------------------- */
|
displayName: 'channelId',
|
||||||
/* message:create */
|
name: 'channelId',
|
||||||
/* -------------------------------------------------------------------------- */
|
description: '',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: [
|
||||||
|
'message',
|
||||||
|
],
|
||||||
|
operation: [
|
||||||
|
'create',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'channelId',
|
||||||
|
name: 'channelId',
|
||||||
|
description: '',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: [
|
||||||
|
'message',
|
||||||
|
],
|
||||||
|
operation: [
|
||||||
|
'delete',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'messageId',
|
||||||
|
name: 'messageId',
|
||||||
|
description: '',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: [
|
||||||
|
'message',
|
||||||
|
],
|
||||||
|
operation: [
|
||||||
|
'delete',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'channelId',
|
||||||
|
name: 'channelId',
|
||||||
|
description: '',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: [
|
||||||
|
'message',
|
||||||
|
],
|
||||||
|
operation: [
|
||||||
|
'update',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'messageId',
|
||||||
|
name: 'messageId',
|
||||||
|
description: '',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: [
|
||||||
|
'message',
|
||||||
|
],
|
||||||
|
operation: [
|
||||||
|
'update',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Content',
|
displayName: 'Content',
|
||||||
name: 'content',
|
name: 'content',
|
||||||
|
description: 'Content of the message to send.',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '',
|
|
||||||
required: true,
|
required: true,
|
||||||
|
default: '',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
resource: [
|
resource: [
|
||||||
'message',
|
'message',
|
||||||
],
|
],
|
||||||
operation: [
|
operation: [
|
||||||
'create',
|
'update',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Additional Fields',
|
displayName: 'Embed',
|
||||||
name: 'additionalFields',
|
name: 'embed',
|
||||||
type: 'collection',
|
description: 'Rich-content embed for the messsage.',
|
||||||
placeholder: 'Add Field',
|
type: 'object',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
resource: [
|
resource: [
|
||||||
'message',
|
'message',
|
||||||
],
|
],
|
||||||
operation: [
|
operation: [
|
||||||
'create',
|
'update',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
default: {},
|
},
|
||||||
options: [
|
|
||||||
{
|
{
|
||||||
displayName: 'Username',
|
displayName: 'channelId',
|
||||||
name: 'username',
|
name: 'channelId',
|
||||||
|
description: '',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
required: true,
|
||||||
default: '',
|
default: '',
|
||||||
description: '',
|
displayOptions: {
|
||||||
},
|
show: {
|
||||||
{
|
resource: [
|
||||||
displayName: 'Avatar URL',
|
'message',
|
||||||
name: 'avatar_url',
|
|
||||||
type: 'string',
|
|
||||||
default: '',
|
|
||||||
description: '',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayName: 'TTS',
|
|
||||||
name: 'tts',
|
|
||||||
type: 'boolean',
|
|
||||||
default: false,
|
|
||||||
description: '',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
|
operation: [
|
||||||
|
'get',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'messageId',
|
||||||
|
name: 'messageId',
|
||||||
|
description: '',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: [
|
||||||
|
'message',
|
||||||
|
],
|
||||||
|
operation: [
|
||||||
|
'get',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'channelId',
|
||||||
|
name: 'channelId',
|
||||||
|
description: '',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: [
|
||||||
|
'message',
|
||||||
|
],
|
||||||
|
operation: [
|
||||||
|
'getAll',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'After',
|
||||||
|
name: 'after',
|
||||||
|
description: 'ID of message to set as the first for the filter.',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: [
|
||||||
|
'message',
|
||||||
|
],
|
||||||
|
operation: [
|
||||||
|
'getAll',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Around',
|
||||||
|
name: 'around',
|
||||||
|
description: 'ID of message around which to retrieve messages.',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: [
|
||||||
|
'message',
|
||||||
|
],
|
||||||
|
operation: [
|
||||||
|
'getAll',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Before',
|
||||||
|
name: 'before',
|
||||||
|
description: 'ID of message to set as the last for the filter.',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: [
|
||||||
|
'message',
|
||||||
|
],
|
||||||
|
operation: [
|
||||||
|
'getAll',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
] as INodeProperties[];
|
] as INodeProperties[];
|
Loading…
Reference in a new issue