2020-02-03 14:11:35 -08:00
|
|
|
import {
|
2022-06-29 00:04:36 -07:00
|
|
|
IAuthenticateGeneric,
|
|
|
|
ICredentialTestRequest,
|
2020-02-03 14:11:35 -08:00
|
|
|
ICredentialType,
|
2021-06-12 09:39:55 -07:00
|
|
|
INodeProperties,
|
2020-02-03 14:11:35 -08:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class ClockifyApi implements ICredentialType {
|
|
|
|
name = 'clockifyApi';
|
|
|
|
displayName = 'Clockify API';
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'clockify';
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-02-03 14:11:35 -08:00
|
|
|
{
|
|
|
|
displayName: 'API Key',
|
|
|
|
name: 'apiKey',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-02-03 14:11:35 -08:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|
2022-06-29 00:04:36 -07:00
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
|
|
type: 'generic',
|
|
|
|
properties: {
|
|
|
|
headers: {
|
|
|
|
'X-Api-Key': '={{$credentials.apiKey}}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
test: ICredentialTestRequest = {
|
|
|
|
request: {
|
|
|
|
baseURL: 'https://api.clockify.me/api/v1',
|
|
|
|
url: '/workspaces',
|
|
|
|
},
|
|
|
|
};
|
2020-02-03 14:11:35 -08:00
|
|
|
}
|