feat(Clockify Node): Add more resources and improvements (#3411)

*  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>
This commit is contained in:
agobrech
2022-06-29 09:04:36 +02:00
committed by GitHub
parent 6e595c7276
commit 447d19024c
8 changed files with 743 additions and 11 deletions

View File

@@ -1,4 +1,6 @@
import {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
@@ -9,9 +11,6 @@ export class ClockifyApi implements ICredentialType {
displayName = 'Clockify API';
documentationUrl = 'clockify';
properties: INodeProperties[] = [
// The credentials to get from user and save encrypted.
// Properties can be defined exactly in the same way
// as node properties.
{
displayName: 'API Key',
name: 'apiKey',
@@ -19,4 +18,18 @@ export class ClockifyApi implements ICredentialType {
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
'X-Api-Key': '={{$credentials.apiKey}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: 'https://api.clockify.me/api/v1',
url: '/workspaces',
},
};
}