mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-13 16:14:07 -08:00
4df69428f1
* 🔥 Remove useless tooltips * Slack change additional fields to Options in node * 🥅 Add error handeling for out of Scope request * ♻️ Refactor channel visibility * ♻️ refactor user ressource * Update user profile * 🔥 remove JSON parameter * 🔥 remove attchmant json and block json * 🎨 refactors message post * 🎨 refactor ts property into timestamps * 🎨 change action name for messages * ✨ add new operation to message ressouce * ✨ add search backend logic + channel RLC * 🎨 improve timestamp description and plaecholder * 🎨 change timestamp disaplay name * ✨ add RLC for channels * ✨ add versioning * 🐛 Fix imports for versioning * ✨ Add RLC for users when sending messages * ✨ RLC for user presence * ✨ Add json builder for slack blocks * 🐛 Fix option in search query * Add loadoption for search in channels * Fix indentation issue * ✨ Add more scopes to Oauth2 * 🐛 Fix lint issue * 🐛 oauth fix * ✨ Merge user and user profile * ✨ Improve reactions and star resource * ⚡️Merges ephemeral operation into one * ⚡️Merge image and emoji in profile picture * 🐛Fix bug for replying to messages * ⚡️Add username type to User Rlc * 🐛 Fix typo * 🎨 Improves tooltip and naming for ephemeral messages * 🎨 Improve display name and description * ⚡️Add the ability to delete within username channel * 🎨 Add informations on how to use the emojis and add doc * 🎨 Fix typos and improve display names * ✨ Improve FE validation for timestamp * 🎨 Change block description * 🚨 Fix linting * 🚨 More lint fixes * 🐛 Fix timestamps bug * 🐛 Fix timestamp not showing up * 🐛 More small fixes * 🐛 Fix logic error * Add searchable to slack rlc channels and users * Fix lint rules * ⚡️Message Search -> fix limit request using qs count * ⚡️Message Search -> sort by relevance use qs score * Fix messages by username rlc * 🐛 fix messages search all operation * Add error when using username with ephemeral message * 🎨 fix linting errors * 🎨 send message ephemeral error message improvement --------- Co-authored-by: Marcus <marcus@n8n.io>
178 lines
4.2 KiB
TypeScript
178 lines
4.2 KiB
TypeScript
import type { INodeProperties } from 'n8n-workflow';
|
|
|
|
export const starOperations: INodeProperties[] = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
noDataExpression: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['star'],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Add',
|
|
value: 'add',
|
|
description: 'Add a star to an item',
|
|
action: 'Add a star',
|
|
},
|
|
{
|
|
name: 'Delete',
|
|
value: 'delete',
|
|
description: 'Delete a star from an item',
|
|
action: 'Delete a star',
|
|
},
|
|
{
|
|
name: 'Get Many',
|
|
value: 'getAll',
|
|
description: 'Get many stars of autenticated user',
|
|
action: 'Get many stars',
|
|
},
|
|
],
|
|
default: 'add',
|
|
},
|
|
];
|
|
|
|
export const starFields: INodeProperties[] = [
|
|
/* -------------------------------------------------------------------------- */
|
|
/* star:add */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Options',
|
|
name: 'options',
|
|
type: 'collection',
|
|
displayOptions: {
|
|
show: {
|
|
operation: ['add'],
|
|
resource: ['star'],
|
|
},
|
|
},
|
|
default: {},
|
|
description: 'Options to set',
|
|
placeholder: 'Add options',
|
|
options: [
|
|
{
|
|
displayName: 'Channel Name or ID',
|
|
name: 'channelId',
|
|
type: 'options',
|
|
typeOptions: {
|
|
loadOptionsMethod: 'getChannels',
|
|
},
|
|
default: '',
|
|
description:
|
|
'Channel to add star to, or channel where the message to add star to was posted (used with timestamp). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
|
},
|
|
{
|
|
displayName: 'File Comment',
|
|
name: 'fileComment',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'File comment to add star to',
|
|
},
|
|
{
|
|
displayName: 'File ID',
|
|
name: 'fileId',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'File to add star to',
|
|
},
|
|
{
|
|
displayName: 'Timestamp',
|
|
name: 'timestamp',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Timestamp of the message to add star to',
|
|
},
|
|
],
|
|
},
|
|
|
|
/* ----------------------------------------------------------------------- */
|
|
/* star:delete */
|
|
/* ----------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Options',
|
|
name: 'options',
|
|
type: 'collection',
|
|
displayOptions: {
|
|
show: {
|
|
operation: ['delete'],
|
|
resource: ['star'],
|
|
},
|
|
},
|
|
default: {},
|
|
description: 'Options to set',
|
|
placeholder: 'Add options',
|
|
options: [
|
|
{
|
|
displayName: 'Channel Name or ID',
|
|
name: 'channelId',
|
|
type: 'options',
|
|
typeOptions: {
|
|
loadOptionsMethod: 'getChannels',
|
|
},
|
|
default: '',
|
|
description:
|
|
'Channel to add star to, or channel where the message to add star to was posted (used with timestamp). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
|
},
|
|
{
|
|
displayName: 'File ID',
|
|
name: 'fileId',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'File to add star to',
|
|
},
|
|
{
|
|
displayName: 'File Comment',
|
|
name: 'fileComment',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'File comment to add star to',
|
|
},
|
|
{
|
|
displayName: 'Timestamp',
|
|
name: 'timestamp',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'Timestamp of the message to add star to',
|
|
},
|
|
],
|
|
},
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
/* star:getAll */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Return All',
|
|
name: 'returnAll',
|
|
type: 'boolean',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['star'],
|
|
operation: ['getAll'],
|
|
},
|
|
},
|
|
default: false,
|
|
description: 'Whether to return all results or only up to a given limit',
|
|
},
|
|
{
|
|
displayName: 'Limit',
|
|
name: 'limit',
|
|
type: 'number',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['star'],
|
|
operation: ['getAll'],
|
|
returnAll: [false],
|
|
},
|
|
},
|
|
typeOptions: {
|
|
minValue: 1,
|
|
maxValue: 100,
|
|
},
|
|
default: 50,
|
|
description: 'Max number of results to return',
|
|
},
|
|
];
|