TODO: check Zapier trigger records work as expected --------- Co-authored-by: Weiko <corentin@twenty.com>
11 lines
331 B
TypeScript
11 lines
331 B
TypeScript
import { WebhookOperationType } from '~/pages/settings/developers/webhooks/types/WebhookOperationsType';
|
|
|
|
export const parseOperationsFromStrings = (
|
|
operations: string[],
|
|
): WebhookOperationType[] => {
|
|
return operations.map((op: string) => {
|
|
const [object, action] = op.split('.');
|
|
return { object, action };
|
|
});
|
|
};
|