feat: Webhook support for Managed Events (#17986)

* managed event webhooks

* more fixes

* fix types --WIP

* fix types

* fix test

* add test

* remove remnant comments

* address feedback

* fix test

* fix test

* fix tests

* change of plans \(00)/

* remove console log

* remove unnecessary comments

* revert tests

* list active webhooks in child event types

* add translations

* allow editing own event types

* add locked info for children

* secure create handler

* fix for isLocked check

---------

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
This commit is contained in:
Syed Ali ShahbazandCarinaWolli authored and GitHub committed 2024-12-05 23:20:34 +00:00
1 parent 4181b5988a
commit 4bf5e3cdf5
8 files changed
+257 -46

No files matched your search

@@ -1,6 +1,5 @@
"use client";
// eslint-disable-next-line @calcom/eslint/deprecated-imports-next-router
// eslint-disable-next-line @calcom/eslint/deprecated-imports-next-router
import type { TFunction } from "next-i18next";
import { useMemo } from "react";
@@ -114,8 +113,8 @@ export const useTabsNavigations = ({
}`,
});
}
const showWebhooks = !(isManagedEventType || isChildrenManagedEventType);
if (showWebhooks) {
const showInstant = !(isManagedEventType || isChildrenManagedEventType);
if (showInstant) {
if (team) {
navigation.push({
name: "instant_tab_title",
@@ -124,13 +123,13 @@ export const useTabsNavigations = ({
info: `instant_event_tab_description`,
});
}
navigation.push({
name: "webhooks",
href: `/event-types/${formMethods.getValues("id")}?tabName=webhooks`,
icon: "webhook",
info: `${activeWebhooksNumber} ${t("active")}`,
});
}
navigation.push({
name: "webhooks",
href: `/event-types/${formMethods.getValues("id")}?tabName=webhooks`,
icon: "webhook",
info: `${activeWebhooksNumber} ${t("active")}`,
});
const hidden = true; // hidden while in alpha trial. you can access it with tabName=ai
if (team && hidden) {
navigation.push({