2024-06-06 04:34:30 -07:00
|
|
|
import type { IAuthenticateGeneric, ICredentialType, INodeProperties, Icon } from 'n8n-workflow';
|
2023-07-31 01:26:38 -07:00
|
|
|
|
|
|
|
export class SekoiaApi implements ICredentialType {
|
|
|
|
name = 'sekoiaApi';
|
|
|
|
|
|
|
|
displayName = 'Sekoia API';
|
|
|
|
|
2024-06-06 04:34:30 -07:00
|
|
|
icon: Icon = 'file:icons/Sekoia.svg';
|
2023-07-31 01:26:38 -07:00
|
|
|
|
|
|
|
documentationUrl = 'sekoia';
|
|
|
|
|
2023-11-13 03:11:16 -08:00
|
|
|
httpRequestNode = {
|
|
|
|
name: 'Sekoia',
|
|
|
|
docsUrl: 'https://docs.sekoia.io/cti/features/integrations/api/',
|
|
|
|
apiBaseUrl: 'https://api.sekoia.io/',
|
|
|
|
};
|
|
|
|
|
2023-07-31 01:26:38 -07:00
|
|
|
properties: INodeProperties[] = [
|
|
|
|
{
|
|
|
|
displayName: 'API Key',
|
|
|
|
name: 'apiKey',
|
|
|
|
type: 'string',
|
|
|
|
typeOptions: { password: true },
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
|
|
type: 'generic',
|
|
|
|
properties: {
|
|
|
|
headers: {
|
|
|
|
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|