import { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, } from "@automate.ax/api-contract/runtime" import * as z from "zod" export const AUTOMATION_INVOCATION_EVENT_TYPE = "automation.invoked" export const userInvocationEntrypointSchema = z .string() .trim() .min(1) .refine( (entrypoint) => !entrypoint.startsWith(AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX), `Invocation entrypoints beginning with ${AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX} are reserved by Automate.ax.`, ) .default(AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT)