mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Improvements to Contenful-Node
This commit is contained in:
@@ -1,29 +1,94 @@
|
||||
import { INodeProperties, INodePropertyOptions } from "n8n-workflow";
|
||||
import {
|
||||
INodeProperties,
|
||||
INodePropertyOptions
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export const resource = {
|
||||
name: "Locale",
|
||||
value: "locale",
|
||||
name: 'Locale',
|
||||
value: 'locale',
|
||||
} as INodePropertyOptions;
|
||||
|
||||
export const operations = [
|
||||
{
|
||||
displayName: "Operation",
|
||||
name: "operation",
|
||||
type: "options",
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [resource.value],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: "Get Locales",
|
||||
value: "get_locales",
|
||||
},
|
||||
],
|
||||
default: "get_locales",
|
||||
description: "The operation to perform.",
|
||||
},
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
resource.value,
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get All',
|
||||
value: 'getAll',
|
||||
},
|
||||
],
|
||||
default: 'getAll',
|
||||
description: 'The operation to perform.',
|
||||
},
|
||||
] as INodeProperties[];
|
||||
|
||||
export const fields = [] as INodeProperties[];
|
||||
export const fields = [
|
||||
{
|
||||
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: '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[];
|
||||
|
||||
Reference in New Issue
Block a user