n8n/packages/nodes-base/credentials/WebflowApi.credentials.ts

35 lines
672 B
TypeScript
Raw Normal View History

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