const schema = z.array(
z.object({
name: z.string(),
description: z.string(),
})
);
export const sendMessageToWebhook = async (question: string) => {
return await itzam.generateObject({
input: question,
workflowSlug: "marvel-movies",
schema,
type: "event",
callback: {
url: "https://yoursite.com/webhook",
headers: {
Authorization: "your_secret_key",
},
customProperties: {
user_id: "user_123",
},
},
});
};