mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 00:24:07 -08:00
b03e358a12
* 👕 Enable `consistent-type-imports` for nodes-base
* 👕 Apply to nodes-base
* ⏪ Undo unrelated changes
* 🚚 Move to `.eslintrc.js` in nodes-base
* ⏪ Revert "Enable `consistent-type-imports` for nodes-base"
This reverts commit 529ad72b05
.
* 👕 Fix severity
76 lines
1.5 KiB
TypeScript
76 lines
1.5 KiB
TypeScript
import type { INodeProperties, INodePropertyOptions } from 'n8n-workflow';
|
|
|
|
export const resource = {
|
|
name: 'Locale',
|
|
value: 'locale',
|
|
} as INodePropertyOptions;
|
|
|
|
export const operations: INodeProperties[] = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
noDataExpression: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: [resource.value],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Get Many',
|
|
value: 'getAll',
|
|
},
|
|
],
|
|
default: 'getAll',
|
|
},
|
|
];
|
|
|
|
export const fields: INodeProperties[] = [
|
|
{
|
|
displayName: 'Environment ID',
|
|
name: 'environmentId',
|
|
type: 'string',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [resource.value],
|
|
operation: ['get', 'getAll'],
|
|
},
|
|
},
|
|
default: 'master',
|
|
description:
|
|
'The ID for the Contentful environment (e.g. master, staging, etc.). Depending on your plan, you might not have environments. In that case use "master".',
|
|
},
|
|
{
|
|
displayName: 'Return All',
|
|
name: 'returnAll',
|
|
type: 'boolean',
|
|
displayOptions: {
|
|
show: {
|
|
operation: ['getAll'],
|
|
resource: [resource.value],
|
|
},
|
|
},
|
|
default: false,
|
|
description: 'Whether to return all results or only up to a given limit',
|
|
},
|
|
{
|
|
displayName: 'Limit',
|
|
name: 'limit',
|
|
type: 'number',
|
|
displayOptions: {
|
|
show: {
|
|
operation: ['getAll'],
|
|
resource: [resource.value],
|
|
returnAll: [false],
|
|
},
|
|
},
|
|
typeOptions: {
|
|
minValue: 1,
|
|
maxValue: 500,
|
|
},
|
|
default: 100,
|
|
description: 'Max number of results to return',
|
|
},
|
|
];
|