mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 17:14:05 -08:00
46 lines
804 B
TypeScript
46 lines
804 B
TypeScript
import type {
|
|
IAuthenticateGeneric,
|
|
ICredentialTestRequest,
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export class DropcontactApi implements ICredentialType {
|
|
name = 'dropcontactApi';
|
|
|
|
displayName = 'Dropcontact API';
|
|
|
|
documentationUrl = 'dropcontact';
|
|
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'API Key',
|
|
name: 'apiKey',
|
|
type: 'string',
|
|
typeOptions: { password: true },
|
|
default: '',
|
|
},
|
|
];
|
|
|
|
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: '' }],
|
|
},
|
|
},
|
|
};
|
|
}
|