Files
n8n-enterprise-unlocked/packages/nodes-base/nodes/Aws/Cognito/descriptions/common.description.ts
Valentina Lilova f6e5efc2e0 feat(n8n AWS Cognito Node): New node (#11767)
Co-authored-by: Stamsy <stams_89@abv.bg>
Co-authored-by: Adina Totorean <adinatotorean99@gmail.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
Co-authored-by: AdinaTotorean <64439268+adina-hub@users.noreply.github.com>
Co-authored-by: Shireen Missi <94372015+ShireenMissi@users.noreply.github.com>
Co-authored-by: feelgood-interface <feelgood.interface@gmail.com>
2025-05-08 10:50:48 +01:00

133 lines
2.3 KiB
TypeScript

import type { INodeProperties } from 'n8n-workflow';
export const userPoolResourceLocator: INodeProperties = {
displayName: 'User Pool',
name: 'userPool',
required: true,
type: 'resourceLocator',
default: {
mode: 'list',
value: '',
},
routing: {
send: {
type: 'body',
property: 'UserPoolId',
},
},
modes: [
{
displayName: 'From list',
name: 'list',
type: 'list',
typeOptions: {
searchListMethod: 'searchUserPools',
searchable: true,
},
},
{
displayName: 'By ID',
name: 'id',
type: 'string',
validation: [
{
type: 'regex',
properties: {
regex: '^[\\w-]+_[0-9a-zA-Z]+$',
errorMessage: 'The ID must follow the pattern "xxxxxx_xxxxxxxxxxx"',
},
},
],
placeholder: 'e.g. eu-central-1_ab12cdefgh',
},
],
};
export const groupResourceLocator: INodeProperties = {
displayName: 'Group',
name: 'group',
default: {
mode: 'list',
value: '',
},
routing: {
send: {
type: 'body',
property: 'GroupName',
},
},
modes: [
{
displayName: 'From list',
name: 'list',
type: 'list',
typeOptions: {
searchListMethod: 'searchGroups',
searchable: true,
},
},
{
displayName: 'By Name',
name: 'groupName',
type: 'string',
hint: 'Enter the group name',
validation: [
{
type: 'regex',
properties: {
regex: '^[\\w+=,.@-]+$',
errorMessage: 'The group name must follow the allowed pattern.',
},
},
],
placeholder: 'e.g. Admins',
},
],
required: true,
type: 'resourceLocator',
};
export const userResourceLocator: INodeProperties = {
displayName: 'User',
name: 'user',
default: {
mode: 'list',
value: '',
},
modes: [
{
displayName: 'From List',
name: 'list',
type: 'list',
typeOptions: {
searchListMethod: 'searchUsers',
searchable: true,
},
},
{
displayName: 'By ID',
name: 'id',
type: 'string',
hint: 'Enter the user ID',
placeholder: 'e.g. 02bd9fd6-8f93-4758-87c3-1fb73740a315',
validation: [
{
type: 'regex',
properties: {
regex: '^[\\w-]+-[0-9a-zA-Z]+$',
errorMessage: 'The ID must follow the pattern "xxxxxx-xxxxxxxxxxx"',
},
},
],
},
],
routing: {
send: {
type: 'body',
property: 'Username',
},
},
required: true,
type: 'resourceLocator',
};