Api keys and webhook migration to core (#13011)

TODO: check Zapier trigger records work as expected

---------

Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
nitin
2025-07-09 20:33:54 +05:30
committed by GitHub
parent 18792f9f74
commit 484c267aa6
113 changed files with 4563 additions and 1060 deletions

View File

@ -0,0 +1,28 @@
import { WebhookFormValues } from '@/settings/developers/validation-schemas/webhookFormSchema';
import { cleanAndFormatOperations } from './cleanAndFormatOperations';
export const createWebhookCreateInput = (formValues: WebhookFormValues) => {
const cleanedOperations = cleanAndFormatOperations(formValues.operations);
return {
targetUrl: formValues.targetUrl.trim(),
operations: cleanedOperations,
description: formValues.description,
secret: formValues.secret,
};
};
export const createWebhookUpdateInput = (
formValues: WebhookFormValues,
webhookId: string,
) => {
const cleanedOperations = cleanAndFormatOperations(formValues.operations);
return {
id: webhookId,
targetUrl: formValues.targetUrl.trim(),
operations: cleanedOperations,
description: formValues.description,
secret: formValues.secret,
};
};