Files
calendar/packages/trpc/server/routers/publicViewer/event.schema.ts
T
Hariom BalharaandGitHub 65df5ac0e4 fix: Allow unpublished org to serve redirected links plus other org onboarding fixes (#14337)
* fix: Allow unpublished org to serve redirected links

* fix: Fix team event link for unpublished org

* fixes

* Rename variable

* Add minimum teams requirement for upgrade

* Fixes

* PR Feedback addressed
2024-04-09 10:33:39 +01:00

16 lines
625 B
TypeScript

import z from "zod";
export const ZEventInputSchema = z.object({
username: z.string(),
eventSlug: z.string(),
isTeamEvent: z.boolean().optional(),
org: z.string().nullable(),
/**
* Informs that the event request has been sent from a page that was reached by a redirect from non-org link(i.e. app.cal.com/username redirected to acme.cal.com/username)
* Based on this decision like whether to allow unpublished organization's event to be served or not can be made.
*/
fromRedirectOfNonOrgLink: z.boolean().optional().default(false),
});
export type TEventInputSchema = z.infer<typeof ZEventInputSchema>;