2020-01-17 09:34:36 -08:00
|
|
|
import {
|
2022-07-04 01:44:26 -07:00
|
|
|
IAuthenticateGeneric,
|
|
|
|
ICredentialTestRequest,
|
2020-01-17 09:34:36 -08:00
|
|
|
ICredentialType,
|
2021-06-12 09:39:55 -07:00
|
|
|
INodeProperties,
|
2020-01-17 09:34:36 -08:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class WebflowApi implements ICredentialType {
|
|
|
|
name = 'webflowApi';
|
|
|
|
displayName = 'Webflow API';
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'webflow';
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-01-17 09:34:36 -08:00
|
|
|
{
|
|
|
|
displayName: 'Access Token',
|
|
|
|
name: 'accessToken',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-01-17 09:34:36 -08:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|
2022-07-04 01:44:26 -07:00
|
|
|
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
|
|
|
}
|