mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
⚡ Add resource stubs
This commit is contained in:
parent
9c097f47cc
commit
dacf719a24
|
@ -0,0 +1,91 @@
|
|||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export const messageOperations = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Create a message',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
description: 'The operation to perform.',
|
||||
},
|
||||
] as INodeProperties[];
|
||||
|
||||
export const messageFields = [
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* message:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Content',
|
||||
name: 'content',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Username',
|
||||
name: 'username',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Avatar URL',
|
||||
name: 'avatar_url',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: '',
|
||||
},
|
||||
{
|
||||
displayName: 'TTS',
|
||||
name: 'tts',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
] as INodeProperties[];
|
|
@ -0,0 +1,45 @@
|
|||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export const userOperations = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'user',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get Current User',
|
||||
value: 'getCurrentUser',
|
||||
description: 'Returns the user object of the requester\'s account.',
|
||||
},
|
||||
{
|
||||
name: 'Get Current User Guilds',
|
||||
value: 'getCurrentUserGuilds',
|
||||
description: 'Returns a list of partial guild objects the current user is a member of.',
|
||||
},
|
||||
{
|
||||
name: 'Get User Connections',
|
||||
value: 'getUserConnections',
|
||||
description: 'Returns a list of connection objects.',
|
||||
},
|
||||
],
|
||||
default: 'getCurrentUser',
|
||||
description: 'The operation to perform.',
|
||||
},
|
||||
] as INodeProperties[];
|
||||
|
||||
export const userFields = [
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* user:getUser */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
] as INodeProperties[];
|
2
packages/nodes-base/nodes/Discord/descriptions/index.ts
Normal file
2
packages/nodes-base/nodes/Discord/descriptions/index.ts
Normal file
|
@ -0,0 +1,2 @@
|
|||
export * from './MessageDescription';
|
||||
export * from './UserDescription';
|
Loading…
Reference in a new issue