import { z } from 'zod'; const schema = z.object({ token: z.string(), team_id: z.string(), api_app_id: z.string(), challenge: z.string().optional(), event: z.object({ client_msg_id: z.string(), type: z.string(), text: z.string(), user: z.string(), ts: z.string(), blocks: z.array( z.object({ type: z.string(), block_id: z.string(), elements: z.array( z.object({ type: z.string(), elements: z.array( z.union([ z.object({ type: z.string(), user_id: z.string() }), z.object({ type: z.string(), text: z.string() }), ]), ), }), ), }), ), team: z.string(), channel: z.string(), event_ts: z.string(), }), type: z.string(), event_id: z.string(), event_time: z.number(), authorizations: z.array( z.object({ enterprise_id: z.null(), team_id: z.string(), user_id: z.string(), is_bot: z.boolean(), is_enterprise_install: z.boolean(), }), ), is_ext_shared_channel: z.boolean(), event_context: z.string(), }); export type SlackEvent = z.infer;