Minor improvements to Contentful-Node

This commit is contained in:
Jan Oberhauser 2020-08-25 11:22:14 +02:00
parent 8496f788af
commit 2c9e589c72
6 changed files with 14 additions and 19 deletions

View file

@ -14,23 +14,21 @@ export class ContentfulApi implements ICredentialType {
type: 'string' as NodePropertyTypes,
default: '',
required: true,
description: 'The id for the Contentful space.'
description: 'The id for the Contentful space.',
},
{
displayName: 'Content Delivery API Access token',
name: 'ContentDeliveryaccessToken',
type: 'string' as NodePropertyTypes,
default: '',
required: true,
description: 'Access token that has access to the space'
description: 'Access token that has access to the space. Can be left empty if only Delivery API should be used.',
},
{
displayName: 'Content Preview API Access token',
name: 'ContentPreviewaccessToken',
type: 'string' as NodePropertyTypes,
default: '',
required: true,
description: 'Access token that has access to the space'
description: 'Access token that has access to the space. Can be left empty if only Preview API should be used.',
},
];
}

View file

@ -46,7 +46,7 @@ export class Contentful implements INodeType {
displayName: 'Source',
name: 'source',
type: 'options',
default: 'Delivery API',
default: 'deliveryApi',
description: 'Pick where your data comes from, delivery or preview API',
options: [
{
@ -71,7 +71,7 @@ export class Contentful implements INodeType {
LocaleDescription.resource,
SpaceDescription.resource,
],
default: '',
default: 'entry',
description: 'The resource to operate on.'
},

View file

@ -2,9 +2,6 @@ import {
INodeProperties,
INodePropertyOptions,
} from 'n8n-workflow';
import { type } from 'os';
import { notEqual } from 'assert';
import { exists } from 'fs';
export const resource = {
name: 'Entry',
@ -55,7 +52,7 @@ export const fields = [
},
},
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".'
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',

View file

@ -4,8 +4,8 @@ import {
} from 'n8n-workflow';
export const resource = {
name: 'Locale',
value: 'locale',
name: 'Locale',
value: 'locale',
} as INodePropertyOptions;
export const operations = [

View file

@ -8,7 +8,7 @@ export const fields = [
placeholder: 'Add parameter',
type: 'fixedCollection',
typeOptions: {
multipleValues: true
multipleValues: true,
},
default: {},
options: [
@ -29,9 +29,9 @@ export const fields = [
type: 'string',
default: '',
description: 'Value of the search parameter to set.'
}
]
}
]
},
],
},
],
}
] as INodeProperties[];

View file

@ -15,7 +15,7 @@ export const operations = [
displayOptions: {
show: {
resource: [
resource.value
resource.value,
],
},
},