feat: add WizPixelFlow credentials
This commit is contained in:
47
credentials/WizPixelFlowApi.credentials.ts
Normal file
47
credentials/WizPixelFlowApi.credentials.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class WizPixelFlowApi implements ICredentialType {
|
||||
name = 'wizPixelFlowApi';
|
||||
displayName = 'WizPixel Flow API';
|
||||
documentationUrl = 'https://flow.wizpixel.com/docs/api';
|
||||
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'API Key',
|
||||
name: 'apiKey',
|
||||
type: 'string',
|
||||
typeOptions: { password: true },
|
||||
default: '',
|
||||
required: true,
|
||||
description: 'Your WizPixel Flow API key. Generate one in your account settings.',
|
||||
},
|
||||
{
|
||||
displayName: 'API Base URL',
|
||||
name: 'baseUrl',
|
||||
type: 'string',
|
||||
default: 'https://api.wizpixel.com/v1',
|
||||
required: true,
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
headers: {
|
||||
'X-WPF-API-Key': '={{$credentials.apiKey}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: '={{$credentials.baseUrl}}',
|
||||
url: '/account',
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user