mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 00:24:07 -08:00
447d19024c
* ✨ Add more Clockify resources * Moved headers in credentials file and added testing * add address to additional fields * Add pagination to workflow * 🎨 Rename additional fields to filter * Remove non-required fields to additional fields * 🔥 Remove loading of client id * ⚡ Improvements * ⚡ Small change Co-authored-by: pemontto <pemontto@gmail.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
36 lines
663 B
TypeScript
36 lines
663 B
TypeScript
import {
|
|
IAuthenticateGeneric,
|
|
ICredentialTestRequest,
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
export class ClockifyApi implements ICredentialType {
|
|
name = 'clockifyApi';
|
|
displayName = 'Clockify API';
|
|
documentationUrl = 'clockify';
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'API Key',
|
|
name: 'apiKey',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
];
|
|
authenticate: IAuthenticateGeneric = {
|
|
type: 'generic',
|
|
properties: {
|
|
headers: {
|
|
'X-Api-Key': '={{$credentials.apiKey}}',
|
|
},
|
|
},
|
|
};
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: 'https://api.clockify.me/api/v1',
|
|
url: '/workspaces',
|
|
},
|
|
};
|
|
}
|