2023-04-04 12:23:11 +00:00
|
|
|
import { z } from "zod";
|
|
|
|
|
|
|
|
import { eventTypeAppCardZod } from "@calcom/app-store/eventTypeAppCardZod";
|
|
|
|
|
|
|
|
export const appDataSchema = eventTypeAppCardZod.merge(
|
|
|
|
z.object({
|
2023-05-30 03:30:02 +00:00
|
|
|
trackingId: z.string().transform((val) => {
|
|
|
|
let trackingId = val.trim();
|
|
|
|
// Ensure that trackingId is transformed if needed to begin with "GTM-" always
|
|
|
|
trackingId = !trackingId.startsWith("GTM-") ? `GTM-${trackingId}` : trackingId;
|
|
|
|
return trackingId;
|
|
|
|
}),
|
2023-04-04 12:23:11 +00:00
|
|
|
})
|
|
|
|
);
|
|
|
|
|
|
|
|
export const appKeysSchema = z.object({});
|