mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 17:14:05 -08:00
26f1af397b
Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com> Co-authored-by: Shireen Missi <94372015+ShireenMissi@users.noreply.github.com>
51 lines
1,013 B
TypeScript
51 lines
1,013 B
TypeScript
import type {
|
|
IAuthenticateGeneric,
|
|
ICredentialTestRequest,
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export class FilescanApi implements ICredentialType {
|
|
name = 'filescanApi';
|
|
|
|
displayName = 'Filescan API';
|
|
|
|
documentationUrl = 'filescan';
|
|
|
|
icon = { light: 'file:icons/Filescan.svg', dark: 'file:icons/Filescan.svg' } as const;
|
|
|
|
httpRequestNode = {
|
|
name: 'Filescan',
|
|
docsUrl: 'https://www.filescan.io/api/docs',
|
|
apiBaseUrlPlaceholder: 'https://www.filescan.io/api/system/do-healthcheck',
|
|
};
|
|
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'API Key',
|
|
name: 'apiKey',
|
|
required: true,
|
|
type: 'string',
|
|
typeOptions: { password: true },
|
|
default: '',
|
|
},
|
|
];
|
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
type: 'generic',
|
|
properties: {
|
|
headers: {
|
|
'X-Api-Key': '={{$credentials.apiKey}}',
|
|
},
|
|
},
|
|
};
|
|
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: 'https://www.filescan.io/api',
|
|
url: '/system/do-healthcheck',
|
|
method: 'GET',
|
|
},
|
|
};
|
|
}
|