2022-08-24 01:26:48 -07:00
|
|
|
import {
|
|
|
|
IAuthenticateGeneric,
|
|
|
|
ICredentialTestRequest,
|
|
|
|
ICredentialType,
|
|
|
|
NodePropertyTypes,
|
|
|
|
} from 'n8n-workflow';
|
2021-11-05 10:37:50 -07:00
|
|
|
|
|
|
|
export class DropcontactApi implements ICredentialType {
|
|
|
|
name = 'dropcontactApi';
|
|
|
|
displayName = 'Dropcontact API';
|
|
|
|
documentationUrl = 'dropcontact';
|
|
|
|
properties = [
|
|
|
|
{
|
|
|
|
displayName: 'API Key',
|
|
|
|
name: 'apiKey',
|
|
|
|
type: 'string' as NodePropertyTypes,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|
2022-08-24 01:26:48 -07:00
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
|
|
type: 'generic',
|
|
|
|
properties: {
|
|
|
|
headers: {
|
|
|
|
'user-agent': 'n8n',
|
|
|
|
'X-Access-Token': '={{$credentials.apiKey}}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
test: ICredentialTestRequest = {
|
|
|
|
request: {
|
|
|
|
baseURL: 'https://api.dropcontact.io',
|
|
|
|
url: '/batch',
|
|
|
|
method: 'POST',
|
|
|
|
body: {
|
|
|
|
data: [{ email: '' }],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2021-11-05 10:37:50 -07:00
|
|
|
}
|