perf: Create 'heavy' eventTypes router (#23664)

* perf: Create 'heavy' eventTypes router

* Fixing type checks

* Fixing platform libraries imports
This commit is contained in:
Keith Williams authored and GitHub committed 2025-09-08 08:24:30 +00:00
1 parent 411a14dd3d
commit 86dcd6f0ff
33 files changed
+107 -75

No files matched your search

@@ -407,7 +407,7 @@ test.describe("Bookings", () => {
await page.goto(`/event-types/${teamEvent.id}?tabName=advanced`);
await page.getByTestId("requires-confirmation").click();
await page.getByTestId("update-eventtype").click();
await page.waitForResponse((response) => response.url().includes("/api/trpc/eventTypes/update"));
await page.waitForResponse((response) => response.url().includes("/api/trpc/eventTypes/heavy/update"));
await doOnOrgDomain(
{
@@ -783,7 +783,7 @@ const markPhoneNumberAsRequiredAndEmailAsOptional = async (page: Page, eventId:
const emailRequiredFiled = await page.locator('[data-testid="field-required"]').first();
await emailRequiredFiled.click();
await page.getByTestId("field-add-save").click();
await submitAndWaitForResponse(page, "/api/trpc/eventTypes/update?batch=1", {
await submitAndWaitForResponse(page, "/api/trpc/eventTypes/heavy/update?batch=1", {
action: () => page.locator("[data-testid=update-eventtype]").click(),
});
};
@@ -797,7 +797,7 @@ const markPhoneNumberAsRequiredField = async (page: Page, eventId: number) => {
const phoneRequiredFiled = await page.locator('[data-testid="field-required"]').first();
await phoneRequiredFiled.click();
await page.getByTestId("field-add-save").click();
await submitAndWaitForResponse(page, "/api/trpc/eventTypes/update?batch=1", {
await submitAndWaitForResponse(page, "/api/trpc/eventTypes/heavy/update?batch=1", {
action: () => page.locator("[data-testid=update-eventtype]").click(),
});
};
@@ -458,7 +458,7 @@ test.describe("Organization", () => {
await page.locator('[data-testid="fixed-hosts-select"]').click();
await page.locator(`text="${invitedUserEmail}"`).click();
await page.locator('[data-testid="update-eventtype"]').click();
await page.waitForResponse("/api/trpc/eventTypes/update?batch=1");
await page.waitForResponse("/api/trpc/eventTypes/heavy/update?batch=1");
await expectPageToBeNotFound({ page, url: `/team/${team.slug}/${teamEvent.slug}` });
await doOnOrgDomain(