n8n/packages/nodes-base/nodes/Contentful/LocaleDescription.ts

95 lines
1.6 KiB
TypeScript
Raw Normal View History

2020-08-04 12:07:54 -07:00
import {
INodeProperties,
INodePropertyOptions
} from 'n8n-workflow';
2020-07-09 02:36:28 -07:00
export const resource = {
name: 'Locale',
value: 'locale',
2020-07-09 02:36:28 -07:00
} as INodePropertyOptions;
export const operations = [
2020-08-04 12:07:54 -07:00
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
resource.value,
],
},
},
options: [
{
name: 'Get All',
value: 'getAll',
},
],
default: 'getAll',
description: 'The operation to perform.',
},
2020-07-09 02:36:28 -07:00
] as INodeProperties[];
2020-08-04 12:07:54 -07:00
export const fields = [
{
displayName: 'Environment ID',
name: 'environmentId',
type: 'string',
displayOptions: {
show: {
resource: [
resource.value,
],
operation: [
'get',
'getAll',
],
},
},
default: 'master',
2020-10-22 06:46:03 -07:00
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".',
2020-08-04 12:07:54 -07:00
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
resource.value,
],
},
},
default: false,
description: 'If all results should be returned 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: 'How many results to return.',
},
] as INodeProperties[];