From 5a7af8697cccc6bd3b7f4e39b8d9eb42e8860403 Mon Sep 17 00:00:00 2001 From: Emelie-Dev Date: Tue, 30 Jun 2026 21:38:19 +0100 Subject: [PATCH] Add Zapier and Make automation support --- src/components/dashboard/Webhooks.tsx | 45 +++- .../__tests__/automationIntegrations.test.ts | 90 ++++++++ src/lib/automationIntegrations.ts | 211 ++++++++++++++++++ src/lib/transactionNotifications.ts | 17 ++ src/lib/webhooks.ts | 7 +- 5 files changed, 368 insertions(+), 2 deletions(-) create mode 100644 src/lib/__tests__/automationIntegrations.test.ts create mode 100644 src/lib/automationIntegrations.ts diff --git a/src/components/dashboard/Webhooks.tsx b/src/components/dashboard/Webhooks.tsx index 781deede..3ae5e3fa 100644 --- a/src/components/dashboard/Webhooks.tsx +++ b/src/components/dashboard/Webhooks.tsx @@ -10,6 +10,7 @@ import { WebhookEndpoint, WebhookEvent, WebhookEventType, + WebhookProvider, } from '../../lib/webhooks'; export const Webhooks: React.FC = () => { @@ -234,6 +235,19 @@ const EndpointCard: React.FC<{ {endpoint.url}
+ {endpoint.provider && endpoint.provider !== 'custom' && ( + + {endpoint.provider === 'zapier' ? 'Zapier' : 'Make.com'} + + )} {endpoint.events.map((event) => ( void; }> = ({ onClose, onSuccess }) => { const [url, setUrl] = useState(''); + const [provider, setProvider] = useState('custom'); const [selectedEvents, setSelectedEvents] = useState(['all']); const [submitting, setSubmitting] = useState(false); @@ -393,7 +408,12 @@ const CreateEndpointModal: React.FC<{ setSubmitting(true); try { - await webhookManager.createEndpoint(url, selectedEvents); + await webhookManager.createEndpoint( + url, + selectedEvents, + provider === 'custom' ? undefined : { integration: provider }, + provider, + ); onSuccess(); } catch (error) { alert('Failed to create endpoint: ' + (error instanceof Error ? error.message : 'Unknown error')); @@ -467,6 +487,29 @@ const CreateEndpointModal: React.FC<{ />
+
+ + +
+