2023-01-27 03:22:44 -08:00
|
|
|
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2020-08-04 12:07:54 -07:00
|
|
|
|
|
|
|
//https://www.contentful.com/developers/docs/references/authentication/
|
|
|
|
export class ContentfulApi implements ICredentialType {
|
|
|
|
name = 'contentfulApi';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2023-07-19 01:41:50 -07:00
|
|
|
displayName = 'Contentful API';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-09-10 00:48:02 -07:00
|
|
|
documentationUrl = 'contentful';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-08-04 12:07:54 -07:00
|
|
|
{
|
|
|
|
displayName: 'Space ID',
|
|
|
|
name: 'spaceId',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-08-04 12:07:54 -07:00
|
|
|
default: '',
|
|
|
|
required: true,
|
2022-04-13 23:32:27 -07:00
|
|
|
description: 'The ID for the Contentful space',
|
2020-08-04 12:07:54 -07:00
|
|
|
},
|
|
|
|
{
|
2022-04-13 23:32:27 -07:00
|
|
|
displayName: 'Content Delivery API Access Token',
|
2020-08-04 12:07:54 -07:00
|
|
|
name: 'ContentDeliveryaccessToken',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-08-04 12:07:54 -07:00
|
|
|
default: '',
|
2022-07-24 08:36:17 -07:00
|
|
|
description:
|
|
|
|
'Access token that has access to the space. Can be left empty if only Delivery API should be used.',
|
2020-08-04 12:07:54 -07:00
|
|
|
},
|
|
|
|
{
|
2022-04-13 23:32:27 -07:00
|
|
|
displayName: 'Content Preview API Access Token',
|
2020-08-04 12:07:54 -07:00
|
|
|
name: 'ContentPreviewaccessToken',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-08-04 12:07:54 -07:00
|
|
|
default: '',
|
2022-07-24 08:36:17 -07:00
|
|
|
description:
|
|
|
|
'Access token that has access to the space. Can be left empty if only Preview API should be used.',
|
2020-08-04 12:07:54 -07:00
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|