mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-16 01:24:05 -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>
115 lines
2.7 KiB
TypeScript
115 lines
2.7 KiB
TypeScript
import type { INodeProperties } from 'n8n-workflow';
|
|
|
|
export const userOperations: INodeProperties[] = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
noDataExpression: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['user'],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Info',
|
|
value: 'info',
|
|
description: 'Get information about a user',
|
|
action: 'Get information about a user',
|
|
},
|
|
{
|
|
name: 'Get Many',
|
|
value: 'getAll',
|
|
description: 'Get a list of many users',
|
|
action: 'Get many users',
|
|
},
|
|
{
|
|
name: 'Get Presence',
|
|
value: 'getPresence',
|
|
description: 'Get online status of a user',
|
|
action: "Get a user's presence status",
|
|
},
|
|
],
|
|
default: 'info',
|
|
},
|
|
];
|
|
|
|
export const userFields: INodeProperties[] = [
|
|
/* -------------------------------------------------------------------------- */
|
|
/* user:info */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'User ID',
|
|
name: 'user',
|
|
type: 'string',
|
|
typeOptions: {
|
|
loadOptionsMethod: 'getUsers',
|
|
},
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
operation: ['info'],
|
|
resource: ['user'],
|
|
},
|
|
},
|
|
required: true,
|
|
description: 'The ID of the user to get information about',
|
|
},
|
|
/* -------------------------------------------------------------------------- */
|
|
/* user:getAll */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Return All',
|
|
name: 'returnAll',
|
|
type: 'boolean',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['user'],
|
|
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: ['user'],
|
|
operation: ['getAll'],
|
|
returnAll: [false],
|
|
},
|
|
},
|
|
typeOptions: {
|
|
minValue: 1,
|
|
maxValue: 100,
|
|
},
|
|
default: 50,
|
|
description: 'Max number of results to return',
|
|
},
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
/* user:getPresence */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'User ID',
|
|
name: 'user',
|
|
type: 'string',
|
|
typeOptions: {
|
|
loadOptionsMethod: 'getUsers',
|
|
},
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
operation: ['getPresence'],
|
|
resource: ['user'],
|
|
},
|
|
},
|
|
required: true,
|
|
description: 'The ID of the user to get the online status of',
|
|
},
|
|
];
|