* ⚡ introduce versioned nodes * Export versioned nodes for separate process run * Add bse node for versioned nodes * fix node name for versioned nodes * extend node from nodeVersionedType * improve nodes base and flow to FE * revert lib es2019 to es2017 * include version in key to prevent duplicate key * handle type versions on FE * clean up * cleanup nodes base * add type versions in getNodeParameterOptions * cleanup * code review * code review + add default version to node type description * remove node default types from store * 💄 cleanups * Draft for migrated Mattermost node * First version of Mattermost node versioned according to node standards * Correcting deactivate operations name to match currently used one * ✨ Create utility types * ⚡ Simplify Mattermost types * ⚡ Rename exports for consistency * ⚡ Type channel properties * ⚡ Type message properties * ⚡ Type reaction properties * ⚡ Type user properties * ⚡ Add type import to router * 🐛 Add missing key * 🔨 Adjust typo in operation name * 🔨 Inline exports for channel properties * 🔨 Inline exports for message properties * 🔨 Inline exports for reaction properties * 🔨 Inline exports for user properties * 🔨 Inline exports for load options * 👕 Fix lint issue * 🔨 Inline export for description * 🔨 Rename descriptions for clarity * 🔨 Refactor imports/exports for methods * 🔨 Refactor latest version retrieval * 🔥 Remove unneeded else clause When the string literal union is exhausted, the resource key becomes never, so TS disallows wrong key usage. * ✨ Add overloads to getNodeParameter * ⚡ Improve overload * 🔥 Remove superfluous INodeVersions type * 🔨 Relocate pre-existing interface * 🔥 Remove JSDoc arg descriptions * ⚡ Minor reformatting in transport file * ⚡ Fix API call function type * Created first draft for Axios requests * Working version of mattermost node with Axios * Work in progress for replacing request library * Improvements to request translations * Fixed sending files via multipart / form-data * Fixing translation from request to axios and loading node parameter options * Improved typing for new http helper * Added ignore any for specific lines for linting * Fixed follow redirects changes on http request node and manual execution of previously existing workflow with older node versions * Adding default headers according to body on httpRequest helper * Spec error handling and fixed workflows with older node versions * Showcase how to export errors in a standard format * Merging master * Refactored mattermost node to keep files in a uniform structure. Also fix bugs with merges * Reverting changes to http request node * Changed nullish comparison and removed repeated code from nodes * Renamed queryString back to qs and simplified node output * Simplified some comparisons * Changed header names to be uc first * Added default user agent to requests and patch http method support * Fixed indentation, remove unnecessary file and console log * Fixed mattermost node name * Fixed lint issues * Further fix linting issues * Further fix lint issues * Fixed http request helper's return type Co-authored-by: ahsan-virani <ahsan.virani@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
271 lines
5.0 KiB
TypeScript
271 lines
5.0 KiB
TypeScript
import {
|
|
UserProperties,
|
|
} from '../../Interfaces';
|
|
|
|
export const userCreateDescription: UserProperties = [
|
|
{
|
|
displayName: 'Username',
|
|
name: 'username',
|
|
type: 'string',
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'user',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Auth Service',
|
|
name: 'authService',
|
|
type: 'options',
|
|
options: [
|
|
{
|
|
name: 'Email',
|
|
value: 'email',
|
|
},
|
|
{
|
|
name: 'Gitlab',
|
|
value: 'gitlab',
|
|
},
|
|
{
|
|
name: 'Google',
|
|
value: 'google',
|
|
},
|
|
{
|
|
name: 'LDAP',
|
|
value: 'ldap',
|
|
},
|
|
{
|
|
name: 'Office365',
|
|
value: 'office365',
|
|
},
|
|
{
|
|
name: 'SAML',
|
|
value: 'saml',
|
|
},
|
|
],
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'user',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Auth Data',
|
|
name: 'authData',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'user',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
},
|
|
hide: {
|
|
authService: [
|
|
'email',
|
|
],
|
|
},
|
|
},
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Email',
|
|
name: 'email',
|
|
type: 'string',
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'user',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
authService: [
|
|
'email',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Password',
|
|
name: 'password',
|
|
type: 'string',
|
|
typeOptions: {
|
|
password: true,
|
|
},
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'user',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
authService: [
|
|
'email',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'The password used for email authentication.',
|
|
},
|
|
{
|
|
displayName: 'Additional Fields',
|
|
name: 'additionalFields',
|
|
type: 'collection',
|
|
placeholder: 'Add Field',
|
|
displayOptions: {
|
|
show: {
|
|
operation: [
|
|
'create',
|
|
],
|
|
resource: [
|
|
'user',
|
|
],
|
|
},
|
|
},
|
|
default: {},
|
|
options: [
|
|
{
|
|
displayName: 'First Name',
|
|
name: 'first_name',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Last Name',
|
|
name: 'last_name',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Locale',
|
|
name: 'locale',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Nickname',
|
|
name: 'nickname',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Notification Settings',
|
|
name: 'notificationUi',
|
|
type: 'fixedCollection',
|
|
placeholder: 'Add Notification Setting',
|
|
default: {},
|
|
typeOptions: {
|
|
multipleValues: false,
|
|
},
|
|
options: [
|
|
{
|
|
displayName: 'Notify',
|
|
name: 'notificationValues',
|
|
values: [
|
|
{
|
|
displayName: 'Channel',
|
|
name: 'channel',
|
|
type: 'boolean',
|
|
default: true,
|
|
description: `Set to "true" to enable channel-wide notifications (@channel, @all, etc.), "false" to disable. Defaults to "true".`,
|
|
},
|
|
{
|
|
displayName: 'Desktop',
|
|
name: 'desktop',
|
|
type: 'options',
|
|
options: [
|
|
{
|
|
name: 'All',
|
|
value: 'all',
|
|
description: 'Notifications for all activity',
|
|
},
|
|
{
|
|
name: 'Mention',
|
|
value: 'mention',
|
|
description: 'Mentions and direct messages only',
|
|
},
|
|
{
|
|
name: 'None',
|
|
value: 'none',
|
|
description: 'Mentions and direct messages only',
|
|
},
|
|
],
|
|
default: 'all',
|
|
},
|
|
{
|
|
displayName: 'Desktop Sound',
|
|
name: 'desktop_sound',
|
|
type: 'boolean',
|
|
default: true,
|
|
description: `Set to "true" to enable sound on desktop notifications, "false" to disable. Defaults to "true".`,
|
|
},
|
|
{
|
|
displayName: 'Email',
|
|
name: 'email',
|
|
type: 'boolean',
|
|
default: false,
|
|
description: `Set to "true" to enable email notifications, "false" to disable. Defaults to "true".`,
|
|
},
|
|
{
|
|
displayName: 'First Name',
|
|
name: 'first_name',
|
|
type: 'boolean',
|
|
default: false,
|
|
description: `Set to "true" to enable mentions for first name. Defaults to "true" if a first name is set, "false" otherwise.`,
|
|
},
|
|
{
|
|
displayName: 'Mention Keys',
|
|
name: 'mention_keys',
|
|
type: 'string',
|
|
default: '',
|
|
description: `A comma-separated list of words to count as mentions. Defaults to username and @username.`,
|
|
},
|
|
{
|
|
displayName: 'Push',
|
|
name: 'push',
|
|
type: 'options',
|
|
options: [
|
|
{
|
|
name: 'All',
|
|
value: 'all',
|
|
description: 'Notifications for all activity',
|
|
},
|
|
{
|
|
name: 'Mention',
|
|
value: 'mention',
|
|
description: 'Mentions and direct messages only',
|
|
},
|
|
{
|
|
name: 'None',
|
|
value: 'none',
|
|
description: 'Mentions and direct messages only',
|
|
},
|
|
],
|
|
default: 'mention',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
];
|