n8n/packages/nodes-base/credentials/WebflowApi.credentials.ts
Michael Kret 224e008fb6
feat(Webflow Trigger Node): Reduce chance of webhook duplication and add credential test (#3594)
* upstream merge

*  additional check for webhook, credentials update

* 🔥 Remove unnecessary condition

*  Change credential injection to generic type

* 👕 Fix linting issue

Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
2022-07-04 10:44:26 +02:00

35 lines
672 B
TypeScript

import {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class WebflowApi implements ICredentialType {
name = 'webflowApi';
displayName = 'Webflow API';
documentationUrl = 'webflow';
properties: INodeProperties[] = [
{
displayName: 'Access Token',
name: 'accessToken',
type: 'string',
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
'Authorization': '=Bearer {{$credentials.accessToken}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: 'https://api.webflow.com',
url: '/sites',
},
};
}