obto
obto6d ago

Workflow typings not being generated

I just updated my convex and workflows package and now it seems none of my workflows have typings being built for them? They all show up in the convex dashboard so i know the code works just fine... Any ideas what is going on? Versions: @convex-dev/workflow: 0.2.6, convex: 1.26.2, In file leads/workflows.ts:
import { v } from "convex/values";
import { internal, components } from "../_generated/api";
import { WorkflowManager } from "@convex-dev/workflow";
import { internalMutation } from "../_generated/server";
const workflow = new WorkflowManager(components.workflow);

export const postProcessLead = workflow.define({
args: {
leadId: v.id("leads"),
},
handler: async (step, args): Promise<void> => {
// Get lead to determine organization
const lead = await step.runQuery(internal.leads.internal.getLeadById, {
leadId: args.leadId,
});

if (!lead) {
console.error(`Lead ${args.leadId} not found`);
return;
}

// Step 1: Enrich the lead with Apollo data
await step.runAction(internal.leads.enrich.run, {
leadId: args.leadId,
}, { retry: false });

// Step 2: Geocode the lead
await step.runAction(internal.leads.geocode.run, {
leadId: args.leadId,
}, { retry: true });

// Step 3: Score the lead using our AI
await step.runAction(internal.leads.score.generate, {
leadId: args.leadId,
}, { retry: true });

// Step 4: Send webhook notifications
await step.runAction(internal.notifications.tasks.sendWebhookNotification, {
organizationId: lead.organizationId,
leadId: args.leadId,
}, { retry: true });
}
});

export const startPostProcessingLead = internalMutation({
args: {
leadId: v.id("leads"),
},
handler: async (ctx, args) => {
await workflow.start(
ctx,
internal.leads.workflows.postProcessLead,
{ leadId: args.leadId },
{ startAsync: true }
);
},
});
import { v } from "convex/values";
import { internal, components } from "../_generated/api";
import { WorkflowManager } from "@convex-dev/workflow";
import { internalMutation } from "../_generated/server";
const workflow = new WorkflowManager(components.workflow);

export const postProcessLead = workflow.define({
args: {
leadId: v.id("leads"),
},
handler: async (step, args): Promise<void> => {
// Get lead to determine organization
const lead = await step.runQuery(internal.leads.internal.getLeadById, {
leadId: args.leadId,
});

if (!lead) {
console.error(`Lead ${args.leadId} not found`);
return;
}

// Step 1: Enrich the lead with Apollo data
await step.runAction(internal.leads.enrich.run, {
leadId: args.leadId,
}, { retry: false });

// Step 2: Geocode the lead
await step.runAction(internal.leads.geocode.run, {
leadId: args.leadId,
}, { retry: true });

// Step 3: Score the lead using our AI
await step.runAction(internal.leads.score.generate, {
leadId: args.leadId,
}, { retry: true });

// Step 4: Send webhook notifications
await step.runAction(internal.notifications.tasks.sendWebhookNotification, {
organizationId: lead.organizationId,
leadId: args.leadId,
}, { retry: true });
}
});

export const startPostProcessingLead = internalMutation({
args: {
leadId: v.id("leads"),
},
handler: async (ctx, args) => {
await workflow.start(
ctx,
internal.leads.workflows.postProcessLead,
{ leadId: args.leadId },
{ startAsync: true }
);
},
});
1 Reply
Convex Bot
Convex Bot6d ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!

Did you find this page helpful?