From 9b54a8bb01b93ac6ae2c650e9941af4708e2dac8 Mon Sep 17 00:00:00 2001 From: Niko Date: Sun, 8 Mar 2026 14:27:12 +0000 Subject: [PATCH] feat: add WizPixelFlow credentials --- credentials/WizPixelFlowApi.credentials.ts | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 credentials/WizPixelFlowApi.credentials.ts diff --git a/credentials/WizPixelFlowApi.credentials.ts b/credentials/WizPixelFlowApi.credentials.ts new file mode 100644 index 0000000..1d1dbff --- /dev/null +++ b/credentials/WizPixelFlowApi.credentials.ts @@ -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', + }, + }; +}