mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 05:04:05 -08:00
3a9c7acb04
* 👕 Enable rule * ⬆️ Upgrade linter * 📦 Update `package-lock.json` * 👕 Apply rule * ✏️ Fix plurals * ✏️ More typos * ✏️ Final typos
85 lines
1.9 KiB
TypeScript
85 lines
1.9 KiB
TypeScript
import { INodeProperties } from 'n8n-workflow';
|
|
|
|
export const listOperations: INodeProperties[] = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
noDataExpression: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['list'],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Get',
|
|
value: 'get',
|
|
description: 'Get a list',
|
|
action: 'Get a list',
|
|
},
|
|
{
|
|
name: 'Get Many',
|
|
value: 'getAll',
|
|
description: 'Get many lists',
|
|
action: 'Get many lists',
|
|
},
|
|
],
|
|
default: 'get',
|
|
},
|
|
];
|
|
|
|
export const listFields: INodeProperties[] = [
|
|
/* -------------------------------------------------------------------------- */
|
|
/* list:get */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'List ID',
|
|
name: 'listId',
|
|
type: 'string',
|
|
required: true,
|
|
default: '',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['list'],
|
|
operation: ['get'],
|
|
},
|
|
},
|
|
description: 'The unique ID of the list object to be retrieved',
|
|
},
|
|
/* -------------------------------------------------------------------------- */
|
|
/* list:getAll */
|
|
/* -------------------------------------------------------------------------- */
|
|
{
|
|
displayName: 'Return All',
|
|
name: 'returnAll',
|
|
type: 'boolean',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['list'],
|
|
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: ['list'],
|
|
operation: ['getAll'],
|
|
returnAll: [false],
|
|
},
|
|
},
|
|
typeOptions: {
|
|
minValue: 1,
|
|
maxValue: 10,
|
|
},
|
|
default: 5,
|
|
description: 'Max number of results to return',
|
|
},
|
|
];
|