mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
76f9ad8bae
* Add credential injection and testing to Lemlist, Uproc, Supabase, Segment, Phantombuster, Mailgun and Dropcontact
35 lines
704 B
TypeScript
35 lines
704 B
TypeScript
import {
|
|
IAuthenticateGeneric,
|
|
ICredentialTestRequest,
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export class PhantombusterApi implements ICredentialType {
|
|
name = 'phantombusterApi';
|
|
displayName = 'Phantombuster API';
|
|
documentationUrl = 'phantombuster';
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'API Key',
|
|
name: 'apiKey',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
];
|
|
authenticate: IAuthenticateGeneric = {
|
|
type: 'generic',
|
|
properties: {
|
|
headers: {
|
|
'X-Phantombuster-Key': '={{$credentials.apiKey}}',
|
|
},
|
|
},
|
|
};
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: 'https://api.phantombuster.com/api/v2',
|
|
url: '/agents/fetch-all',
|
|
},
|
|
};
|
|
}
|