mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 22:54:05 -08:00
224e008fb6
* 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>
35 lines
672 B
TypeScript
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',
|
|
},
|
|
};
|
|
}
|