Skip to content

Variable: activityRequestSchema

const activityRequestSchema: ZodObject<{ activity: ZodObject<{ attachments: ZodOptional<ZodArray<ZodObject<{ content: ZodObject<{ $schema: ZodString; actions: ZodOptional<…>; body: ZodArray<…>; type: ZodLiteral<…>; version: ZodString; }, $strip>; contentType: ZodLiteral<"application/vnd.microsoft.card.adaptive">; }, $strip>>>; conversation: ZodOptional<ZodObject<{ id: ZodString; }, $strip>>; from: ZodOptional<ZodObject<{ id: ZodString; name: ZodOptional<ZodString>; }, $strip>>; id: ZodOptional<ZodString>; recipient: ZodOptional<ZodObject<{ id: ZodString; name: ZodOptional<ZodString>; }, $strip>>; text: ZodOptional<ZodString>; timestamp: ZodOptional<ZodString>; type: ZodEnum<{ conversationUpdate: "conversationUpdate"; message: "message"; typing: "typing"; }>; }, $loose>; agentId: ZodOptional<ZodString>; model: ZodOptional<ZodString>; }, $strip>

The request body the conversation endpoint accepts: an inbound activity plus optional routing hints that are NOT part of the Bot Framework envelope (which agent to run, which serving model to use). Keeping them as siblings of activity leaves the protocol payload untouched.