mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 17:14:05 -08:00
60d66426ff
* 🔥 Remove Prettier exceptions * 👕 Start linting on formatting * ⚡ Update `format` command * 🎨 Apply formatting
36 lines
689 B
TypeScript
36 lines
689 B
TypeScript
import {
|
|
IAuthenticateGeneric,
|
|
ICredentialTestRequest,
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export class CloudflareApi implements ICredentialType {
|
|
name = 'cloudflareApi';
|
|
displayName = 'Cloudflare API';
|
|
documentationUrl = 'cloudflare';
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'API Token',
|
|
name: 'apiToken',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
];
|
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
type: 'generic',
|
|
properties: {
|
|
headers: {
|
|
Authorization: '=Bearer {{$credentials.apiToken}}',
|
|
},
|
|
},
|
|
};
|
|
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: 'https://api.cloudflare.com/client/v4/user/tokens/verify',
|
|
},
|
|
};
|
|
}
|