mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 05:04:05 -08:00
94a02c6492
* ✨ Cloudflare node * ⚡ Add paired items * Added codex file for Cloudflare * ⚡ Improvements Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
36 lines
691 B
TypeScript
36 lines
691 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',
|
|
},
|
|
};
|
|
}
|