[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-inngest-inngest-steps":3,"mdc--pffplf-key":41,"related-repo-inngest-inngest-steps":6950,"related-org-inngest-inngest-steps":7053},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":36,"sourceUrl":39,"mdContent":40},"inngest-steps","implement durable delays and human gates","Use when implementing delays that must survive process restarts (e.g., 24-hour cart abandonment, scheduled follow-ups), waiting for human approval or external events with timeouts (review gates, webhook callbacks, async API completion), polling external services without losing state on crashes, calling other functions and awaiting their results, memoizing expensive operations so they don't re-run on retry, or running async work in parallel inside a workflow. Covers Inngest step methods: step.run, step.sleep, step.waitForEvent, step.waitForSignal, step.sendEvent, step.invoke, step.ai, plus patterns for loops and parallel execution.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"inngest","Inngest","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Finngest.png",[12,16,17,20],{"name":13,"slug":14,"type":15},"Automation","automation","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Approvals","approvals",{"name":21,"slug":22,"type":15},"Workflow Automation","workflow-automation",26,"https:\u002F\u002Fgithub.com\u002Finngest\u002Finngest-skills","2026-07-12T07:36:43.253954",null,5,[29,30,31,32,33,34,35],"agent-skill-repository","agent-skills","agentic-skills","ai-agents","claude-code-skills","cursor-skills","openclaw-skills",{"repoUrl":24,"stars":23,"forks":27,"topics":37,"description":38},[29,30,31,32,33,34,35],"Agent Skills for building with Inngest","https:\u002F\u002Fgithub.com\u002Finngest\u002Finngest-skills\u002Ftree\u002FHEAD\u002Fskills\u002Finngest-steps","---\nname: inngest-steps\ndescription: \"Use when implementing delays that must survive process restarts (e.g., 24-hour cart abandonment, scheduled follow-ups), waiting for human approval or external events with timeouts (review gates, webhook callbacks, async API completion), polling external services without losing state on crashes, calling other functions and awaiting their results, memoizing expensive operations so they don't re-run on retry, or running async work in parallel inside a workflow. Covers Inngest step methods: step.run, step.sleep, step.waitForEvent, step.waitForSignal, step.sendEvent, step.invoke, step.ai, plus patterns for loops and parallel execution.\"\n---\n\n# Inngest Steps\n\nBuild robust, durable workflows with Inngest's step methods. Each step is a separate HTTP request that can be independently retried and monitored.\n\n> **These skills are focused on TypeScript.** For Python or Go, refer to the [Inngest documentation](https:\u002F\u002Fwww.inngest.com\u002Fllms.txt) for language-specific guidance. Core concepts apply across all languages.\n\n## Core Concept\n\n**🔄 Critical: Each step re-runs your function from the beginning.** Put ALL non-deterministic code (API calls, DB queries, randomness) inside steps, never outside.\n\n**📊 Step Limits:** Every function has a maximum of 1,000 steps and 4MB total step data.\n\n```typescript\n\u002F\u002F ❌ WRONG - will run 4 times\nexport default inngest.createFunction(\n  { id: \"bad-example\", triggers: [{ event: \"test\" }] },\n  async ({ step }) => {\n    console.log(\"This logs 4 times!\"); \u002F\u002F Outside step = bad\n    await step.run(\"a\", () => console.log(\"a\"));\n    await step.run(\"b\", () => console.log(\"b\"));\n    await step.run(\"c\", () => console.log(\"c\"));\n  }\n);\n\n\u002F\u002F ✅ CORRECT - logs once each\nexport default inngest.createFunction(\n  { id: \"good-example\", triggers: [{ event: \"test\" }] },\n  async ({ step }) => {\n    await step.run(\"log-hello\", () => console.log(\"hello\"));\n    await step.run(\"a\", () => console.log(\"a\"));\n    await step.run(\"b\", () => console.log(\"b\"));\n    await step.run(\"c\", () => console.log(\"c\"));\n  }\n);\n```\n\n## step.run()\n\nExecute retriable code as a step. **Each step ID can be reused** - Inngest automatically handles counters.\n\n```typescript\n\u002F\u002F Basic usage\nconst result = await step.run(\"fetch-user\", async () => {\n  const user = await db.user.findById(userId);\n  return user; \u002F\u002F Always return useful data\n});\n\n\u002F\u002F Synchronous code works too\nconst transformed = await step.run(\"transform-data\", () => {\n  return processData(result);\n});\n\n\u002F\u002F Side effects (no return needed)\nawait step.run(\"send-notification\", async () => {\n  await sendEmail(user.email, \"Welcome!\");\n});\n```\n\n**✅ DO:**\n\n- Put ALL non-deterministic logic inside steps\n- Return useful data for subsequent steps\n- Reuse step IDs in loops (counters handled automatically)\n\n**❌ DON'T:**\n\n- Put deterministic logic in steps unnecessarily\n- Forget that each step = separate HTTP request\n\n## step.sleep()\n\nPause execution without using compute time.\n\n```typescript\n\u002F\u002F Duration strings\nawait step.sleep(\"wait-24h\", \"24h\");\nawait step.sleep(\"short-delay\", \"30s\");\nawait step.sleep(\"weekly-pause\", \"7d\");\n\n\u002F\u002F Use in workflows\nawait step.run(\"send-welcome\", () => sendEmail(email));\nawait step.sleep(\"wait-for-engagement\", \"3d\");\nawait step.run(\"send-followup\", () => sendFollowupEmail(email));\n```\n\n## step.sleepUntil()\n\nSleep until a specific datetime.\n\n```typescript\nconst reminderDate = new Date(\"2024-12-25T09:00:00Z\");\nawait step.sleepUntil(\"wait-for-christmas\", reminderDate);\n\n\u002F\u002F From event data\nconst scheduledTime = new Date(event.data.remind_at);\nawait step.sleepUntil(\"wait-for-scheduled-time\", scheduledTime);\n```\n\n## step.waitForEvent()\n\n**🚨 CRITICAL: waitForEvent ONLY catches events sent AFTER this step executes.**\n\n- ❌ Event sent before waitForEvent runs → will NOT be caught\n- ✅ Event sent after waitForEvent runs → will be caught\n- Always check for `null` return (means timeout, event never arrived)\n\n```typescript\n\u002F\u002F Basic event waiting with timeout\nconst approval = await step.waitForEvent(\"wait-for-approval\", {\n  event: \"app\u002Finvoice.approved\",\n  timeout: \"7d\",\n  match: \"data.invoiceId\" \u002F\u002F Simple matching\n});\n\n\u002F\u002F Expression-based matching (CEL syntax)\nconst subscription = await step.waitForEvent(\"wait-for-subscription\", {\n  event: \"app\u002Fsubscription.created\",\n  timeout: \"30d\",\n  if: \"event.data.userId == async.data.userId && async.data.plan == 'pro'\"\n});\n\n\u002F\u002F Handle timeout\nif (!approval) {\n  await step.run(\"handle-timeout\", () => {\n    \u002F\u002F Approval never came\n    return notifyAccountingTeam();\n  });\n}\n```\n\n**✅ DO:**\n\n- Use unique IDs for matching (userId, sessionId, requestId)\n- Always set reasonable timeouts\n- Handle null return (timeout case)\n- Use with Realtime for human-in-the-loop flows\n\n**❌ DON'T:**\n\n- Expect events sent before this step to be handled\n- Use without timeouts in production\n\n### Expression Syntax\n\nIn expressions, `event` = the **original** triggering event, `async` = the **new** event being matched. See [Expression Syntax Reference](..\u002Freferences\u002Fexpressions.md) for full syntax, operators, and patterns.\n\n## step.waitForSignal()\n\nWait for unique signals (not events). Better for 1:1 matching.\n\n```typescript\nconst taskId = \"task-\" + crypto.randomUUID();\n\nconst signal = await step.waitForSignal(\"wait-for-task-completion\", {\n  signal: taskId,\n  timeout: \"1h\",\n  onConflict: \"replace\" \u002F\u002F Required: \"replace\" overwrites pending signal, \"fail\" throws an error\n});\n\n\u002F\u002F Send signal elsewhere via Inngest API or SDK\n\u002F\u002F POST \u002Fv1\u002Fevents with signal matching taskId\n```\n\n**When to use:**\n\n- **waitForEvent**: Multiple functions might handle the same event\n- **waitForSignal**: Exact 1:1 signal to specific function run\n\n## step.sendEvent()\n\nFan out to other functions without waiting for results.\n\n```typescript\n\u002F\u002F Trigger other functions\nawait step.sendEvent(\"notify-systems\", {\n  name: \"user\u002Fprofile.updated\",\n  data: { userId: user.id, changes: profileChanges }\n});\n\n\u002F\u002F Multiple events at once\nawait step.sendEvent(\"batch-notifications\", [\n  { name: \"billing\u002Finvoice.created\", data: { invoiceId } },\n  { name: \"email\u002Finvoice.send\", data: { email: user.email, invoiceId } }\n]);\n```\n\n**Use when:** You want to trigger other functions but don't need their results in the current function.\n\n## step.invoke()\n\nCall other functions and handle their results. Perfect for composition.\n\n```typescript\nconst computeSquare = inngest.createFunction(\n  { id: \"compute-square\", triggers: [{ event: \"calculate\u002Fsquare\" }] },\n  async ({ event }) => {\n    return { result: event.data.number * event.data.number };\n  }\n);\n\n\u002F\u002F Invoke and use result\nconst square = await step.invoke(\"get-square\", {\n  function: computeSquare,\n  data: { number: 4 }\n});\n\nconsole.log(square.result); \u002F\u002F 16, fully typed!\n\n\u002F\u002F For cross-app invocation (when you can't import the function directly):\nimport { referenceFunction } from \"inngest\";\n\nconst externalFn = referenceFunction({\n  appId: \"other-app\",\n  functionId: \"other-fn\"\n});\n\nconst result = await step.invoke(\"call-external\", {\n  function: externalFn,\n  data: { key: \"value\" }\n});\n```\n\n**Warning: v4 Breaking Change:** String function IDs (e.g., `function: \"my-app-other-fn\"`) are no longer supported in `step.invoke()`. Use an imported function reference or `referenceFunction()` for cross-app calls.\n\n**Great for:**\n\n- Breaking complex workflows into composable functions\n- Reusing logic across multiple workflows\n- Map-reduce patterns\n\n## Patterns\n\n### Loops with Steps\n\nReuse step IDs - Inngest handles counters automatically.\n\n```typescript\nconst allProducts = [];\nlet cursor = null;\nlet hasMore = true;\n\nwhile (hasMore) {\n  \u002F\u002F Same ID \"fetch-page\" reused - counters handled automatically\n  const page = await step.run(\"fetch-page\", async () => {\n    return shopify.products.list({ cursor, limit: 50 });\n  });\n\n  allProducts.push(...page.products);\n\n  if (page.products.length \u003C 50) {\n    hasMore = false;\n  } else {\n    cursor = page.products[49].id;\n  }\n}\n\nawait step.run(\"process-products\", () => {\n  return processAllProducts(allProducts);\n});\n```\n\n### Parallel Execution\n\nUse Promise.all for parallel steps. **In v4, parallel step execution is optimized by default**\n\n```typescript\n\u002F\u002F Create steps without awaiting\nconst sendEmail = step.run(\"send-email\", async () => {\n  return await sendWelcomeEmail(user.email);\n});\n\nconst updateCRM = step.run(\"update-crm\", async () => {\n  return await crmService.addUser(user);\n});\n\nconst createSubscription = step.run(\"create-subscription\", async () => {\n  return await subscriptionService.create(user.id);\n});\n\n\u002F\u002F Run all in parallel\nconst [emailId, crmRecord, subscription] = await Promise.all([\n  sendEmail,\n  updateCRM,\n  createSubscription\n]);\n\n\u002F\u002F Parallel steps are optimized by default in v4\nexport default inngest.createFunction(\n  {\n    id: \"parallel-heavy-function\",\n    triggers: [{ event: \"process\u002Fbatch\" }]\n  },\n  async ({ event, step }) => {\n    const results = await Promise.all(\n      event.data.items.map((item, i) =>\n        step.run(`process-item-${i}`, () => processItem(item))\n      )\n    );\n  }\n);\n\n\u002F\u002F ⚠️ Promise.race() behavior with v4's optimized parallelism:\n\u002F\u002F All promises settle before race resolves. Use group.parallel() for true race:\nconst winner = await group.parallel(async () => {\n  return Promise.race([\n    step.run(\"fast-service\", () => callFastService()),\n    step.run(\"slow-service\", () => callSlowService())\n  ]);\n});\n\n\u002F\u002F To disable optimized parallelism if needed:\n\u002F\u002F At the client level: new Inngest({ id: \"app\", optimizeParallelism: false })\n\u002F\u002F At the function level: { id: \"fn\", optimizeParallelism: false, triggers: [...] }\n```\n\nSee **inngest-flow-control** for concurrency and throttling options.\n\n### Chunking Jobs\n\nPerfect for batch processing with parallel steps.\n\n```typescript\nexport default inngest.createFunction(\n  { id: \"process-large-dataset\", triggers: [{ event: \"data\u002Fprocess.large\" }] },\n  async ({ event, step }) => {\n    const chunks = chunkArray(event.data.items, 10);\n\n    \u002F\u002F Process chunks in parallel\n    const results = await Promise.all(\n      chunks.map((chunk, index) =>\n        step.run(`process-chunk-${index}`, () => processChunk(chunk))\n      )\n    );\n\n    \u002F\u002F Combine results\n    await step.run(\"combine-results\", () => {\n      return aggregateResults(results);\n    });\n  }\n);\n```\n\n## Key Gotchas\n\n**🔄 Function Re-execution:** Code outside steps runs on every step execution\n**⏰ Event Timing:** waitForEvent only catches events sent AFTER the step runs\n**🔢 Step Limits:** Max 1,000 steps per function, 4MB per step output, 32MB per function run in total\n**📨 HTTP Requests:** Checkpointing is enabled by default in v4, reducing HTTP overhead. For serverless platforms, configure `maxRuntime` on the client\n**🔁 Step IDs:** Can be reused in loops - Inngest handles counters\n**⚡ Parallelism:** Use Promise.all for parallel steps (optimized by default in v4). Note that Promise.race() waits for all promises to settle — use `group.parallel()` for true race semantics\n\n## Common Use Cases\n\n- **Human-in-the-loop:** waitForEvent + Realtime UI\n- **Multi-step onboarding:** sleep between steps, waitForEvent for user actions\n- **Data processing:** Parallel steps for chunked work\n- **External integrations:** step.run for reliable API calls\n- **AI workflows:** step.ai for durable LLM orchestration\n- **Function composition:** step.invoke to build complex workflows\n\nRemember: Steps make your functions durable, observable, and debuggable. Embrace them!\n",{"data":42,"body":43},{"name":4,"description":6},{"type":44,"children":45},"root",[46,54,60,86,93,103,113,1153,1159,1171,1624,1632,1652,1660,1673,1679,1684,2081,2087,2092,2315,2321,2329,2355,2849,2856,2879,2886,2899,2906,2948,2954,2959,3204,3212,3233,3239,3244,3623,3633,3639,3644,4374,4407,4415,4433,4439,4445,4450,5035,5041,5051,6253,6265,6271,6276,6803,6809,6870,6876,6939,6944],{"type":47,"tag":48,"props":49,"children":50},"element","h1",{"id":4},[51],{"type":52,"value":53},"text","Inngest Steps",{"type":47,"tag":55,"props":56,"children":57},"p",{},[58],{"type":52,"value":59},"Build robust, durable workflows with Inngest's step methods. Each step is a separate HTTP request that can be independently retried and monitored.",{"type":47,"tag":61,"props":62,"children":63},"blockquote",{},[64],{"type":47,"tag":55,"props":65,"children":66},{},[67,73,75,84],{"type":47,"tag":68,"props":69,"children":70},"strong",{},[71],{"type":52,"value":72},"These skills are focused on TypeScript.",{"type":52,"value":74}," For Python or Go, refer to the ",{"type":47,"tag":76,"props":77,"children":81},"a",{"href":78,"rel":79},"https:\u002F\u002Fwww.inngest.com\u002Fllms.txt",[80],"nofollow",[82],{"type":52,"value":83},"Inngest documentation",{"type":52,"value":85}," for language-specific guidance. Core concepts apply across all languages.",{"type":47,"tag":87,"props":88,"children":90},"h2",{"id":89},"core-concept",[91],{"type":52,"value":92},"Core Concept",{"type":47,"tag":55,"props":94,"children":95},{},[96,101],{"type":47,"tag":68,"props":97,"children":98},{},[99],{"type":52,"value":100},"🔄 Critical: Each step re-runs your function from the beginning.",{"type":52,"value":102}," Put ALL non-deterministic code (API calls, DB queries, randomness) inside steps, never outside.",{"type":47,"tag":55,"props":104,"children":105},{},[106,111],{"type":47,"tag":68,"props":107,"children":108},{},[109],{"type":52,"value":110},"📊 Step Limits:",{"type":52,"value":112}," Every function has a maximum of 1,000 steps and 4MB total step data.",{"type":47,"tag":114,"props":115,"children":120},"pre",{"className":116,"code":117,"language":118,"meta":119,"style":119},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F ❌ WRONG - will run 4 times\nexport default inngest.createFunction(\n  { id: \"bad-example\", triggers: [{ event: \"test\" }] },\n  async ({ step }) => {\n    console.log(\"This logs 4 times!\"); \u002F\u002F Outside step = bad\n    await step.run(\"a\", () => console.log(\"a\"));\n    await step.run(\"b\", () => console.log(\"b\"));\n    await step.run(\"c\", () => console.log(\"c\"));\n  }\n);\n\n\u002F\u002F ✅ CORRECT - logs once each\nexport default inngest.createFunction(\n  { id: \"good-example\", triggers: [{ event: \"test\" }] },\n  async ({ step }) => {\n    await step.run(\"log-hello\", () => console.log(\"hello\"));\n    await step.run(\"a\", () => console.log(\"a\"));\n    await step.run(\"b\", () => console.log(\"b\"));\n    await step.run(\"c\", () => console.log(\"c\"));\n  }\n);\n","typescript","",[121],{"type":47,"tag":122,"props":123,"children":124},"code",{"__ignoreMap":119},[125,137,175,272,308,358,448,533,618,627,639,649,658,686,767,795,881,965,1049,1133,1141],{"type":47,"tag":126,"props":127,"children":130},"span",{"class":128,"line":129},"line",1,[131],{"type":47,"tag":126,"props":132,"children":134},{"style":133},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[135],{"type":52,"value":136},"\u002F\u002F ❌ WRONG - will run 4 times\n",{"type":47,"tag":126,"props":138,"children":140},{"class":128,"line":139},2,[141,147,152,158,164,170],{"type":47,"tag":126,"props":142,"children":144},{"style":143},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[145],{"type":52,"value":146},"export",{"type":47,"tag":126,"props":148,"children":149},{"style":143},[150],{"type":52,"value":151}," default",{"type":47,"tag":126,"props":153,"children":155},{"style":154},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[156],{"type":52,"value":157}," inngest",{"type":47,"tag":126,"props":159,"children":161},{"style":160},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[162],{"type":52,"value":163},".",{"type":47,"tag":126,"props":165,"children":167},{"style":166},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[168],{"type":52,"value":169},"createFunction",{"type":47,"tag":126,"props":171,"children":172},{"style":154},[173],{"type":52,"value":174},"(\n",{"type":47,"tag":126,"props":176,"children":178},{"class":128,"line":177},3,[179,184,190,195,200,206,211,216,221,225,230,235,240,244,248,253,257,262,267],{"type":47,"tag":126,"props":180,"children":181},{"style":160},[182],{"type":52,"value":183},"  {",{"type":47,"tag":126,"props":185,"children":187},{"style":186},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[188],{"type":52,"value":189}," id",{"type":47,"tag":126,"props":191,"children":192},{"style":160},[193],{"type":52,"value":194},":",{"type":47,"tag":126,"props":196,"children":197},{"style":160},[198],{"type":52,"value":199}," \"",{"type":47,"tag":126,"props":201,"children":203},{"style":202},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[204],{"type":52,"value":205},"bad-example",{"type":47,"tag":126,"props":207,"children":208},{"style":160},[209],{"type":52,"value":210},"\"",{"type":47,"tag":126,"props":212,"children":213},{"style":160},[214],{"type":52,"value":215},",",{"type":47,"tag":126,"props":217,"children":218},{"style":186},[219],{"type":52,"value":220}," triggers",{"type":47,"tag":126,"props":222,"children":223},{"style":160},[224],{"type":52,"value":194},{"type":47,"tag":126,"props":226,"children":227},{"style":154},[228],{"type":52,"value":229}," [",{"type":47,"tag":126,"props":231,"children":232},{"style":160},[233],{"type":52,"value":234},"{",{"type":47,"tag":126,"props":236,"children":237},{"style":186},[238],{"type":52,"value":239}," event",{"type":47,"tag":126,"props":241,"children":242},{"style":160},[243],{"type":52,"value":194},{"type":47,"tag":126,"props":245,"children":246},{"style":160},[247],{"type":52,"value":199},{"type":47,"tag":126,"props":249,"children":250},{"style":202},[251],{"type":52,"value":252},"test",{"type":47,"tag":126,"props":254,"children":255},{"style":160},[256],{"type":52,"value":210},{"type":47,"tag":126,"props":258,"children":259},{"style":160},[260],{"type":52,"value":261}," }",{"type":47,"tag":126,"props":263,"children":264},{"style":154},[265],{"type":52,"value":266},"] ",{"type":47,"tag":126,"props":268,"children":269},{"style":160},[270],{"type":52,"value":271},"},\n",{"type":47,"tag":126,"props":273,"children":275},{"class":128,"line":274},4,[276,282,287,293,298,303],{"type":47,"tag":126,"props":277,"children":279},{"style":278},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[280],{"type":52,"value":281},"  async",{"type":47,"tag":126,"props":283,"children":284},{"style":160},[285],{"type":52,"value":286}," ({",{"type":47,"tag":126,"props":288,"children":290},{"style":289},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[291],{"type":52,"value":292}," step",{"type":47,"tag":126,"props":294,"children":295},{"style":160},[296],{"type":52,"value":297}," })",{"type":47,"tag":126,"props":299,"children":300},{"style":278},[301],{"type":52,"value":302}," =>",{"type":47,"tag":126,"props":304,"children":305},{"style":160},[306],{"type":52,"value":307}," {\n",{"type":47,"tag":126,"props":309,"children":310},{"class":128,"line":27},[311,316,320,325,330,334,339,343,348,353],{"type":47,"tag":126,"props":312,"children":313},{"style":154},[314],{"type":52,"value":315},"    console",{"type":47,"tag":126,"props":317,"children":318},{"style":160},[319],{"type":52,"value":163},{"type":47,"tag":126,"props":321,"children":322},{"style":166},[323],{"type":52,"value":324},"log",{"type":47,"tag":126,"props":326,"children":327},{"style":186},[328],{"type":52,"value":329},"(",{"type":47,"tag":126,"props":331,"children":332},{"style":160},[333],{"type":52,"value":210},{"type":47,"tag":126,"props":335,"children":336},{"style":202},[337],{"type":52,"value":338},"This logs 4 times!",{"type":47,"tag":126,"props":340,"children":341},{"style":160},[342],{"type":52,"value":210},{"type":47,"tag":126,"props":344,"children":345},{"style":186},[346],{"type":52,"value":347},")",{"type":47,"tag":126,"props":349,"children":350},{"style":160},[351],{"type":52,"value":352},";",{"type":47,"tag":126,"props":354,"children":355},{"style":133},[356],{"type":52,"value":357}," \u002F\u002F Outside step = bad\n",{"type":47,"tag":126,"props":359,"children":361},{"class":128,"line":360},6,[362,367,371,375,380,384,388,392,396,400,405,409,414,418,422,426,430,434,438,443],{"type":47,"tag":126,"props":363,"children":364},{"style":143},[365],{"type":52,"value":366},"    await",{"type":47,"tag":126,"props":368,"children":369},{"style":154},[370],{"type":52,"value":292},{"type":47,"tag":126,"props":372,"children":373},{"style":160},[374],{"type":52,"value":163},{"type":47,"tag":126,"props":376,"children":377},{"style":166},[378],{"type":52,"value":379},"run",{"type":47,"tag":126,"props":381,"children":382},{"style":186},[383],{"type":52,"value":329},{"type":47,"tag":126,"props":385,"children":386},{"style":160},[387],{"type":52,"value":210},{"type":47,"tag":126,"props":389,"children":390},{"style":202},[391],{"type":52,"value":76},{"type":47,"tag":126,"props":393,"children":394},{"style":160},[395],{"type":52,"value":210},{"type":47,"tag":126,"props":397,"children":398},{"style":160},[399],{"type":52,"value":215},{"type":47,"tag":126,"props":401,"children":402},{"style":160},[403],{"type":52,"value":404}," ()",{"type":47,"tag":126,"props":406,"children":407},{"style":278},[408],{"type":52,"value":302},{"type":47,"tag":126,"props":410,"children":411},{"style":154},[412],{"type":52,"value":413}," console",{"type":47,"tag":126,"props":415,"children":416},{"style":160},[417],{"type":52,"value":163},{"type":47,"tag":126,"props":419,"children":420},{"style":166},[421],{"type":52,"value":324},{"type":47,"tag":126,"props":423,"children":424},{"style":186},[425],{"type":52,"value":329},{"type":47,"tag":126,"props":427,"children":428},{"style":160},[429],{"type":52,"value":210},{"type":47,"tag":126,"props":431,"children":432},{"style":202},[433],{"type":52,"value":76},{"type":47,"tag":126,"props":435,"children":436},{"style":160},[437],{"type":52,"value":210},{"type":47,"tag":126,"props":439,"children":440},{"style":186},[441],{"type":52,"value":442},"))",{"type":47,"tag":126,"props":444,"children":445},{"style":160},[446],{"type":52,"value":447},";\n",{"type":47,"tag":126,"props":449,"children":451},{"class":128,"line":450},7,[452,456,460,464,468,472,476,481,485,489,493,497,501,505,509,513,517,521,525,529],{"type":47,"tag":126,"props":453,"children":454},{"style":143},[455],{"type":52,"value":366},{"type":47,"tag":126,"props":457,"children":458},{"style":154},[459],{"type":52,"value":292},{"type":47,"tag":126,"props":461,"children":462},{"style":160},[463],{"type":52,"value":163},{"type":47,"tag":126,"props":465,"children":466},{"style":166},[467],{"type":52,"value":379},{"type":47,"tag":126,"props":469,"children":470},{"style":186},[471],{"type":52,"value":329},{"type":47,"tag":126,"props":473,"children":474},{"style":160},[475],{"type":52,"value":210},{"type":47,"tag":126,"props":477,"children":478},{"style":202},[479],{"type":52,"value":480},"b",{"type":47,"tag":126,"props":482,"children":483},{"style":160},[484],{"type":52,"value":210},{"type":47,"tag":126,"props":486,"children":487},{"style":160},[488],{"type":52,"value":215},{"type":47,"tag":126,"props":490,"children":491},{"style":160},[492],{"type":52,"value":404},{"type":47,"tag":126,"props":494,"children":495},{"style":278},[496],{"type":52,"value":302},{"type":47,"tag":126,"props":498,"children":499},{"style":154},[500],{"type":52,"value":413},{"type":47,"tag":126,"props":502,"children":503},{"style":160},[504],{"type":52,"value":163},{"type":47,"tag":126,"props":506,"children":507},{"style":166},[508],{"type":52,"value":324},{"type":47,"tag":126,"props":510,"children":511},{"style":186},[512],{"type":52,"value":329},{"type":47,"tag":126,"props":514,"children":515},{"style":160},[516],{"type":52,"value":210},{"type":47,"tag":126,"props":518,"children":519},{"style":202},[520],{"type":52,"value":480},{"type":47,"tag":126,"props":522,"children":523},{"style":160},[524],{"type":52,"value":210},{"type":47,"tag":126,"props":526,"children":527},{"style":186},[528],{"type":52,"value":442},{"type":47,"tag":126,"props":530,"children":531},{"style":160},[532],{"type":52,"value":447},{"type":47,"tag":126,"props":534,"children":536},{"class":128,"line":535},8,[537,541,545,549,553,557,561,566,570,574,578,582,586,590,594,598,602,606,610,614],{"type":47,"tag":126,"props":538,"children":539},{"style":143},[540],{"type":52,"value":366},{"type":47,"tag":126,"props":542,"children":543},{"style":154},[544],{"type":52,"value":292},{"type":47,"tag":126,"props":546,"children":547},{"style":160},[548],{"type":52,"value":163},{"type":47,"tag":126,"props":550,"children":551},{"style":166},[552],{"type":52,"value":379},{"type":47,"tag":126,"props":554,"children":555},{"style":186},[556],{"type":52,"value":329},{"type":47,"tag":126,"props":558,"children":559},{"style":160},[560],{"type":52,"value":210},{"type":47,"tag":126,"props":562,"children":563},{"style":202},[564],{"type":52,"value":565},"c",{"type":47,"tag":126,"props":567,"children":568},{"style":160},[569],{"type":52,"value":210},{"type":47,"tag":126,"props":571,"children":572},{"style":160},[573],{"type":52,"value":215},{"type":47,"tag":126,"props":575,"children":576},{"style":160},[577],{"type":52,"value":404},{"type":47,"tag":126,"props":579,"children":580},{"style":278},[581],{"type":52,"value":302},{"type":47,"tag":126,"props":583,"children":584},{"style":154},[585],{"type":52,"value":413},{"type":47,"tag":126,"props":587,"children":588},{"style":160},[589],{"type":52,"value":163},{"type":47,"tag":126,"props":591,"children":592},{"style":166},[593],{"type":52,"value":324},{"type":47,"tag":126,"props":595,"children":596},{"style":186},[597],{"type":52,"value":329},{"type":47,"tag":126,"props":599,"children":600},{"style":160},[601],{"type":52,"value":210},{"type":47,"tag":126,"props":603,"children":604},{"style":202},[605],{"type":52,"value":565},{"type":47,"tag":126,"props":607,"children":608},{"style":160},[609],{"type":52,"value":210},{"type":47,"tag":126,"props":611,"children":612},{"style":186},[613],{"type":52,"value":442},{"type":47,"tag":126,"props":615,"children":616},{"style":160},[617],{"type":52,"value":447},{"type":47,"tag":126,"props":619,"children":621},{"class":128,"line":620},9,[622],{"type":47,"tag":126,"props":623,"children":624},{"style":160},[625],{"type":52,"value":626},"  }\n",{"type":47,"tag":126,"props":628,"children":630},{"class":128,"line":629},10,[631,635],{"type":47,"tag":126,"props":632,"children":633},{"style":154},[634],{"type":52,"value":347},{"type":47,"tag":126,"props":636,"children":637},{"style":160},[638],{"type":52,"value":447},{"type":47,"tag":126,"props":640,"children":642},{"class":128,"line":641},11,[643],{"type":47,"tag":126,"props":644,"children":646},{"emptyLinePlaceholder":645},true,[647],{"type":52,"value":648},"\n",{"type":47,"tag":126,"props":650,"children":652},{"class":128,"line":651},12,[653],{"type":47,"tag":126,"props":654,"children":655},{"style":133},[656],{"type":52,"value":657},"\u002F\u002F ✅ CORRECT - logs once each\n",{"type":47,"tag":126,"props":659,"children":661},{"class":128,"line":660},13,[662,666,670,674,678,682],{"type":47,"tag":126,"props":663,"children":664},{"style":143},[665],{"type":52,"value":146},{"type":47,"tag":126,"props":667,"children":668},{"style":143},[669],{"type":52,"value":151},{"type":47,"tag":126,"props":671,"children":672},{"style":154},[673],{"type":52,"value":157},{"type":47,"tag":126,"props":675,"children":676},{"style":160},[677],{"type":52,"value":163},{"type":47,"tag":126,"props":679,"children":680},{"style":166},[681],{"type":52,"value":169},{"type":47,"tag":126,"props":683,"children":684},{"style":154},[685],{"type":52,"value":174},{"type":47,"tag":126,"props":687,"children":689},{"class":128,"line":688},14,[690,694,698,702,706,711,715,719,723,727,731,735,739,743,747,751,755,759,763],{"type":47,"tag":126,"props":691,"children":692},{"style":160},[693],{"type":52,"value":183},{"type":47,"tag":126,"props":695,"children":696},{"style":186},[697],{"type":52,"value":189},{"type":47,"tag":126,"props":699,"children":700},{"style":160},[701],{"type":52,"value":194},{"type":47,"tag":126,"props":703,"children":704},{"style":160},[705],{"type":52,"value":199},{"type":47,"tag":126,"props":707,"children":708},{"style":202},[709],{"type":52,"value":710},"good-example",{"type":47,"tag":126,"props":712,"children":713},{"style":160},[714],{"type":52,"value":210},{"type":47,"tag":126,"props":716,"children":717},{"style":160},[718],{"type":52,"value":215},{"type":47,"tag":126,"props":720,"children":721},{"style":186},[722],{"type":52,"value":220},{"type":47,"tag":126,"props":724,"children":725},{"style":160},[726],{"type":52,"value":194},{"type":47,"tag":126,"props":728,"children":729},{"style":154},[730],{"type":52,"value":229},{"type":47,"tag":126,"props":732,"children":733},{"style":160},[734],{"type":52,"value":234},{"type":47,"tag":126,"props":736,"children":737},{"style":186},[738],{"type":52,"value":239},{"type":47,"tag":126,"props":740,"children":741},{"style":160},[742],{"type":52,"value":194},{"type":47,"tag":126,"props":744,"children":745},{"style":160},[746],{"type":52,"value":199},{"type":47,"tag":126,"props":748,"children":749},{"style":202},[750],{"type":52,"value":252},{"type":47,"tag":126,"props":752,"children":753},{"style":160},[754],{"type":52,"value":210},{"type":47,"tag":126,"props":756,"children":757},{"style":160},[758],{"type":52,"value":261},{"type":47,"tag":126,"props":760,"children":761},{"style":154},[762],{"type":52,"value":266},{"type":47,"tag":126,"props":764,"children":765},{"style":160},[766],{"type":52,"value":271},{"type":47,"tag":126,"props":768,"children":770},{"class":128,"line":769},15,[771,775,779,783,787,791],{"type":47,"tag":126,"props":772,"children":773},{"style":278},[774],{"type":52,"value":281},{"type":47,"tag":126,"props":776,"children":777},{"style":160},[778],{"type":52,"value":286},{"type":47,"tag":126,"props":780,"children":781},{"style":289},[782],{"type":52,"value":292},{"type":47,"tag":126,"props":784,"children":785},{"style":160},[786],{"type":52,"value":297},{"type":47,"tag":126,"props":788,"children":789},{"style":278},[790],{"type":52,"value":302},{"type":47,"tag":126,"props":792,"children":793},{"style":160},[794],{"type":52,"value":307},{"type":47,"tag":126,"props":796,"children":798},{"class":128,"line":797},16,[799,803,807,811,815,819,823,828,832,836,840,844,848,852,856,860,864,869,873,877],{"type":47,"tag":126,"props":800,"children":801},{"style":143},[802],{"type":52,"value":366},{"type":47,"tag":126,"props":804,"children":805},{"style":154},[806],{"type":52,"value":292},{"type":47,"tag":126,"props":808,"children":809},{"style":160},[810],{"type":52,"value":163},{"type":47,"tag":126,"props":812,"children":813},{"style":166},[814],{"type":52,"value":379},{"type":47,"tag":126,"props":816,"children":817},{"style":186},[818],{"type":52,"value":329},{"type":47,"tag":126,"props":820,"children":821},{"style":160},[822],{"type":52,"value":210},{"type":47,"tag":126,"props":824,"children":825},{"style":202},[826],{"type":52,"value":827},"log-hello",{"type":47,"tag":126,"props":829,"children":830},{"style":160},[831],{"type":52,"value":210},{"type":47,"tag":126,"props":833,"children":834},{"style":160},[835],{"type":52,"value":215},{"type":47,"tag":126,"props":837,"children":838},{"style":160},[839],{"type":52,"value":404},{"type":47,"tag":126,"props":841,"children":842},{"style":278},[843],{"type":52,"value":302},{"type":47,"tag":126,"props":845,"children":846},{"style":154},[847],{"type":52,"value":413},{"type":47,"tag":126,"props":849,"children":850},{"style":160},[851],{"type":52,"value":163},{"type":47,"tag":126,"props":853,"children":854},{"style":166},[855],{"type":52,"value":324},{"type":47,"tag":126,"props":857,"children":858},{"style":186},[859],{"type":52,"value":329},{"type":47,"tag":126,"props":861,"children":862},{"style":160},[863],{"type":52,"value":210},{"type":47,"tag":126,"props":865,"children":866},{"style":202},[867],{"type":52,"value":868},"hello",{"type":47,"tag":126,"props":870,"children":871},{"style":160},[872],{"type":52,"value":210},{"type":47,"tag":126,"props":874,"children":875},{"style":186},[876],{"type":52,"value":442},{"type":47,"tag":126,"props":878,"children":879},{"style":160},[880],{"type":52,"value":447},{"type":47,"tag":126,"props":882,"children":884},{"class":128,"line":883},17,[885,889,893,897,901,905,909,913,917,921,925,929,933,937,941,945,949,953,957,961],{"type":47,"tag":126,"props":886,"children":887},{"style":143},[888],{"type":52,"value":366},{"type":47,"tag":126,"props":890,"children":891},{"style":154},[892],{"type":52,"value":292},{"type":47,"tag":126,"props":894,"children":895},{"style":160},[896],{"type":52,"value":163},{"type":47,"tag":126,"props":898,"children":899},{"style":166},[900],{"type":52,"value":379},{"type":47,"tag":126,"props":902,"children":903},{"style":186},[904],{"type":52,"value":329},{"type":47,"tag":126,"props":906,"children":907},{"style":160},[908],{"type":52,"value":210},{"type":47,"tag":126,"props":910,"children":911},{"style":202},[912],{"type":52,"value":76},{"type":47,"tag":126,"props":914,"children":915},{"style":160},[916],{"type":52,"value":210},{"type":47,"tag":126,"props":918,"children":919},{"style":160},[920],{"type":52,"value":215},{"type":47,"tag":126,"props":922,"children":923},{"style":160},[924],{"type":52,"value":404},{"type":47,"tag":126,"props":926,"children":927},{"style":278},[928],{"type":52,"value":302},{"type":47,"tag":126,"props":930,"children":931},{"style":154},[932],{"type":52,"value":413},{"type":47,"tag":126,"props":934,"children":935},{"style":160},[936],{"type":52,"value":163},{"type":47,"tag":126,"props":938,"children":939},{"style":166},[940],{"type":52,"value":324},{"type":47,"tag":126,"props":942,"children":943},{"style":186},[944],{"type":52,"value":329},{"type":47,"tag":126,"props":946,"children":947},{"style":160},[948],{"type":52,"value":210},{"type":47,"tag":126,"props":950,"children":951},{"style":202},[952],{"type":52,"value":76},{"type":47,"tag":126,"props":954,"children":955},{"style":160},[956],{"type":52,"value":210},{"type":47,"tag":126,"props":958,"children":959},{"style":186},[960],{"type":52,"value":442},{"type":47,"tag":126,"props":962,"children":963},{"style":160},[964],{"type":52,"value":447},{"type":47,"tag":126,"props":966,"children":968},{"class":128,"line":967},18,[969,973,977,981,985,989,993,997,1001,1005,1009,1013,1017,1021,1025,1029,1033,1037,1041,1045],{"type":47,"tag":126,"props":970,"children":971},{"style":143},[972],{"type":52,"value":366},{"type":47,"tag":126,"props":974,"children":975},{"style":154},[976],{"type":52,"value":292},{"type":47,"tag":126,"props":978,"children":979},{"style":160},[980],{"type":52,"value":163},{"type":47,"tag":126,"props":982,"children":983},{"style":166},[984],{"type":52,"value":379},{"type":47,"tag":126,"props":986,"children":987},{"style":186},[988],{"type":52,"value":329},{"type":47,"tag":126,"props":990,"children":991},{"style":160},[992],{"type":52,"value":210},{"type":47,"tag":126,"props":994,"children":995},{"style":202},[996],{"type":52,"value":480},{"type":47,"tag":126,"props":998,"children":999},{"style":160},[1000],{"type":52,"value":210},{"type":47,"tag":126,"props":1002,"children":1003},{"style":160},[1004],{"type":52,"value":215},{"type":47,"tag":126,"props":1006,"children":1007},{"style":160},[1008],{"type":52,"value":404},{"type":47,"tag":126,"props":1010,"children":1011},{"style":278},[1012],{"type":52,"value":302},{"type":47,"tag":126,"props":1014,"children":1015},{"style":154},[1016],{"type":52,"value":413},{"type":47,"tag":126,"props":1018,"children":1019},{"style":160},[1020],{"type":52,"value":163},{"type":47,"tag":126,"props":1022,"children":1023},{"style":166},[1024],{"type":52,"value":324},{"type":47,"tag":126,"props":1026,"children":1027},{"style":186},[1028],{"type":52,"value":329},{"type":47,"tag":126,"props":1030,"children":1031},{"style":160},[1032],{"type":52,"value":210},{"type":47,"tag":126,"props":1034,"children":1035},{"style":202},[1036],{"type":52,"value":480},{"type":47,"tag":126,"props":1038,"children":1039},{"style":160},[1040],{"type":52,"value":210},{"type":47,"tag":126,"props":1042,"children":1043},{"style":186},[1044],{"type":52,"value":442},{"type":47,"tag":126,"props":1046,"children":1047},{"style":160},[1048],{"type":52,"value":447},{"type":47,"tag":126,"props":1050,"children":1052},{"class":128,"line":1051},19,[1053,1057,1061,1065,1069,1073,1077,1081,1085,1089,1093,1097,1101,1105,1109,1113,1117,1121,1125,1129],{"type":47,"tag":126,"props":1054,"children":1055},{"style":143},[1056],{"type":52,"value":366},{"type":47,"tag":126,"props":1058,"children":1059},{"style":154},[1060],{"type":52,"value":292},{"type":47,"tag":126,"props":1062,"children":1063},{"style":160},[1064],{"type":52,"value":163},{"type":47,"tag":126,"props":1066,"children":1067},{"style":166},[1068],{"type":52,"value":379},{"type":47,"tag":126,"props":1070,"children":1071},{"style":186},[1072],{"type":52,"value":329},{"type":47,"tag":126,"props":1074,"children":1075},{"style":160},[1076],{"type":52,"value":210},{"type":47,"tag":126,"props":1078,"children":1079},{"style":202},[1080],{"type":52,"value":565},{"type":47,"tag":126,"props":1082,"children":1083},{"style":160},[1084],{"type":52,"value":210},{"type":47,"tag":126,"props":1086,"children":1087},{"style":160},[1088],{"type":52,"value":215},{"type":47,"tag":126,"props":1090,"children":1091},{"style":160},[1092],{"type":52,"value":404},{"type":47,"tag":126,"props":1094,"children":1095},{"style":278},[1096],{"type":52,"value":302},{"type":47,"tag":126,"props":1098,"children":1099},{"style":154},[1100],{"type":52,"value":413},{"type":47,"tag":126,"props":1102,"children":1103},{"style":160},[1104],{"type":52,"value":163},{"type":47,"tag":126,"props":1106,"children":1107},{"style":166},[1108],{"type":52,"value":324},{"type":47,"tag":126,"props":1110,"children":1111},{"style":186},[1112],{"type":52,"value":329},{"type":47,"tag":126,"props":1114,"children":1115},{"style":160},[1116],{"type":52,"value":210},{"type":47,"tag":126,"props":1118,"children":1119},{"style":202},[1120],{"type":52,"value":565},{"type":47,"tag":126,"props":1122,"children":1123},{"style":160},[1124],{"type":52,"value":210},{"type":47,"tag":126,"props":1126,"children":1127},{"style":186},[1128],{"type":52,"value":442},{"type":47,"tag":126,"props":1130,"children":1131},{"style":160},[1132],{"type":52,"value":447},{"type":47,"tag":126,"props":1134,"children":1136},{"class":128,"line":1135},20,[1137],{"type":47,"tag":126,"props":1138,"children":1139},{"style":160},[1140],{"type":52,"value":626},{"type":47,"tag":126,"props":1142,"children":1144},{"class":128,"line":1143},21,[1145,1149],{"type":47,"tag":126,"props":1146,"children":1147},{"style":154},[1148],{"type":52,"value":347},{"type":47,"tag":126,"props":1150,"children":1151},{"style":160},[1152],{"type":52,"value":447},{"type":47,"tag":87,"props":1154,"children":1156},{"id":1155},"steprun",[1157],{"type":52,"value":1158},"step.run()",{"type":47,"tag":55,"props":1160,"children":1161},{},[1162,1164,1169],{"type":52,"value":1163},"Execute retriable code as a step. ",{"type":47,"tag":68,"props":1165,"children":1166},{},[1167],{"type":52,"value":1168},"Each step ID can be reused",{"type":52,"value":1170}," - Inngest automatically handles counters.",{"type":47,"tag":114,"props":1172,"children":1174},{"className":116,"code":1173,"language":118,"meta":119,"style":119},"\u002F\u002F Basic usage\nconst result = await step.run(\"fetch-user\", async () => {\n  const user = await db.user.findById(userId);\n  return user; \u002F\u002F Always return useful data\n});\n\n\u002F\u002F Synchronous code works too\nconst transformed = await step.run(\"transform-data\", () => {\n  return processData(result);\n});\n\n\u002F\u002F Side effects (no return needed)\nawait step.run(\"send-notification\", async () => {\n  await sendEmail(user.email, \"Welcome!\");\n});\n",[1175],{"type":47,"tag":122,"props":1176,"children":1177},{"__ignoreMap":119},[1178,1186,1259,1321,1342,1358,1365,1373,1438,1467,1482,1489,1497,1554,1609],{"type":47,"tag":126,"props":1179,"children":1180},{"class":128,"line":129},[1181],{"type":47,"tag":126,"props":1182,"children":1183},{"style":133},[1184],{"type":52,"value":1185},"\u002F\u002F Basic usage\n",{"type":47,"tag":126,"props":1187,"children":1188},{"class":128,"line":139},[1189,1194,1199,1204,1209,1213,1217,1221,1225,1229,1234,1238,1242,1247,1251,1255],{"type":47,"tag":126,"props":1190,"children":1191},{"style":278},[1192],{"type":52,"value":1193},"const",{"type":47,"tag":126,"props":1195,"children":1196},{"style":154},[1197],{"type":52,"value":1198}," result ",{"type":47,"tag":126,"props":1200,"children":1201},{"style":160},[1202],{"type":52,"value":1203},"=",{"type":47,"tag":126,"props":1205,"children":1206},{"style":143},[1207],{"type":52,"value":1208}," await",{"type":47,"tag":126,"props":1210,"children":1211},{"style":154},[1212],{"type":52,"value":292},{"type":47,"tag":126,"props":1214,"children":1215},{"style":160},[1216],{"type":52,"value":163},{"type":47,"tag":126,"props":1218,"children":1219},{"style":166},[1220],{"type":52,"value":379},{"type":47,"tag":126,"props":1222,"children":1223},{"style":154},[1224],{"type":52,"value":329},{"type":47,"tag":126,"props":1226,"children":1227},{"style":160},[1228],{"type":52,"value":210},{"type":47,"tag":126,"props":1230,"children":1231},{"style":202},[1232],{"type":52,"value":1233},"fetch-user",{"type":47,"tag":126,"props":1235,"children":1236},{"style":160},[1237],{"type":52,"value":210},{"type":47,"tag":126,"props":1239,"children":1240},{"style":160},[1241],{"type":52,"value":215},{"type":47,"tag":126,"props":1243,"children":1244},{"style":278},[1245],{"type":52,"value":1246}," async",{"type":47,"tag":126,"props":1248,"children":1249},{"style":160},[1250],{"type":52,"value":404},{"type":47,"tag":126,"props":1252,"children":1253},{"style":278},[1254],{"type":52,"value":302},{"type":47,"tag":126,"props":1256,"children":1257},{"style":160},[1258],{"type":52,"value":307},{"type":47,"tag":126,"props":1260,"children":1261},{"class":128,"line":177},[1262,1267,1272,1277,1281,1286,1290,1295,1299,1304,1308,1313,1317],{"type":47,"tag":126,"props":1263,"children":1264},{"style":278},[1265],{"type":52,"value":1266},"  const",{"type":47,"tag":126,"props":1268,"children":1269},{"style":154},[1270],{"type":52,"value":1271}," user",{"type":47,"tag":126,"props":1273,"children":1274},{"style":160},[1275],{"type":52,"value":1276}," =",{"type":47,"tag":126,"props":1278,"children":1279},{"style":143},[1280],{"type":52,"value":1208},{"type":47,"tag":126,"props":1282,"children":1283},{"style":154},[1284],{"type":52,"value":1285}," db",{"type":47,"tag":126,"props":1287,"children":1288},{"style":160},[1289],{"type":52,"value":163},{"type":47,"tag":126,"props":1291,"children":1292},{"style":154},[1293],{"type":52,"value":1294},"user",{"type":47,"tag":126,"props":1296,"children":1297},{"style":160},[1298],{"type":52,"value":163},{"type":47,"tag":126,"props":1300,"children":1301},{"style":166},[1302],{"type":52,"value":1303},"findById",{"type":47,"tag":126,"props":1305,"children":1306},{"style":186},[1307],{"type":52,"value":329},{"type":47,"tag":126,"props":1309,"children":1310},{"style":154},[1311],{"type":52,"value":1312},"userId",{"type":47,"tag":126,"props":1314,"children":1315},{"style":186},[1316],{"type":52,"value":347},{"type":47,"tag":126,"props":1318,"children":1319},{"style":160},[1320],{"type":52,"value":447},{"type":47,"tag":126,"props":1322,"children":1323},{"class":128,"line":274},[1324,1329,1333,1337],{"type":47,"tag":126,"props":1325,"children":1326},{"style":143},[1327],{"type":52,"value":1328},"  return",{"type":47,"tag":126,"props":1330,"children":1331},{"style":154},[1332],{"type":52,"value":1271},{"type":47,"tag":126,"props":1334,"children":1335},{"style":160},[1336],{"type":52,"value":352},{"type":47,"tag":126,"props":1338,"children":1339},{"style":133},[1340],{"type":52,"value":1341}," \u002F\u002F Always return useful data\n",{"type":47,"tag":126,"props":1343,"children":1344},{"class":128,"line":27},[1345,1350,1354],{"type":47,"tag":126,"props":1346,"children":1347},{"style":160},[1348],{"type":52,"value":1349},"}",{"type":47,"tag":126,"props":1351,"children":1352},{"style":154},[1353],{"type":52,"value":347},{"type":47,"tag":126,"props":1355,"children":1356},{"style":160},[1357],{"type":52,"value":447},{"type":47,"tag":126,"props":1359,"children":1360},{"class":128,"line":360},[1361],{"type":47,"tag":126,"props":1362,"children":1363},{"emptyLinePlaceholder":645},[1364],{"type":52,"value":648},{"type":47,"tag":126,"props":1366,"children":1367},{"class":128,"line":450},[1368],{"type":47,"tag":126,"props":1369,"children":1370},{"style":133},[1371],{"type":52,"value":1372},"\u002F\u002F Synchronous code works too\n",{"type":47,"tag":126,"props":1374,"children":1375},{"class":128,"line":535},[1376,1380,1385,1389,1393,1397,1401,1405,1409,1413,1418,1422,1426,1430,1434],{"type":47,"tag":126,"props":1377,"children":1378},{"style":278},[1379],{"type":52,"value":1193},{"type":47,"tag":126,"props":1381,"children":1382},{"style":154},[1383],{"type":52,"value":1384}," transformed ",{"type":47,"tag":126,"props":1386,"children":1387},{"style":160},[1388],{"type":52,"value":1203},{"type":47,"tag":126,"props":1390,"children":1391},{"style":143},[1392],{"type":52,"value":1208},{"type":47,"tag":126,"props":1394,"children":1395},{"style":154},[1396],{"type":52,"value":292},{"type":47,"tag":126,"props":1398,"children":1399},{"style":160},[1400],{"type":52,"value":163},{"type":47,"tag":126,"props":1402,"children":1403},{"style":166},[1404],{"type":52,"value":379},{"type":47,"tag":126,"props":1406,"children":1407},{"style":154},[1408],{"type":52,"value":329},{"type":47,"tag":126,"props":1410,"children":1411},{"style":160},[1412],{"type":52,"value":210},{"type":47,"tag":126,"props":1414,"children":1415},{"style":202},[1416],{"type":52,"value":1417},"transform-data",{"type":47,"tag":126,"props":1419,"children":1420},{"style":160},[1421],{"type":52,"value":210},{"type":47,"tag":126,"props":1423,"children":1424},{"style":160},[1425],{"type":52,"value":215},{"type":47,"tag":126,"props":1427,"children":1428},{"style":160},[1429],{"type":52,"value":404},{"type":47,"tag":126,"props":1431,"children":1432},{"style":278},[1433],{"type":52,"value":302},{"type":47,"tag":126,"props":1435,"children":1436},{"style":160},[1437],{"type":52,"value":307},{"type":47,"tag":126,"props":1439,"children":1440},{"class":128,"line":620},[1441,1445,1450,1454,1459,1463],{"type":47,"tag":126,"props":1442,"children":1443},{"style":143},[1444],{"type":52,"value":1328},{"type":47,"tag":126,"props":1446,"children":1447},{"style":166},[1448],{"type":52,"value":1449}," processData",{"type":47,"tag":126,"props":1451,"children":1452},{"style":186},[1453],{"type":52,"value":329},{"type":47,"tag":126,"props":1455,"children":1456},{"style":154},[1457],{"type":52,"value":1458},"result",{"type":47,"tag":126,"props":1460,"children":1461},{"style":186},[1462],{"type":52,"value":347},{"type":47,"tag":126,"props":1464,"children":1465},{"style":160},[1466],{"type":52,"value":447},{"type":47,"tag":126,"props":1468,"children":1469},{"class":128,"line":629},[1470,1474,1478],{"type":47,"tag":126,"props":1471,"children":1472},{"style":160},[1473],{"type":52,"value":1349},{"type":47,"tag":126,"props":1475,"children":1476},{"style":154},[1477],{"type":52,"value":347},{"type":47,"tag":126,"props":1479,"children":1480},{"style":160},[1481],{"type":52,"value":447},{"type":47,"tag":126,"props":1483,"children":1484},{"class":128,"line":641},[1485],{"type":47,"tag":126,"props":1486,"children":1487},{"emptyLinePlaceholder":645},[1488],{"type":52,"value":648},{"type":47,"tag":126,"props":1490,"children":1491},{"class":128,"line":651},[1492],{"type":47,"tag":126,"props":1493,"children":1494},{"style":133},[1495],{"type":52,"value":1496},"\u002F\u002F Side effects (no return needed)\n",{"type":47,"tag":126,"props":1498,"children":1499},{"class":128,"line":660},[1500,1505,1509,1513,1517,1521,1525,1530,1534,1538,1542,1546,1550],{"type":47,"tag":126,"props":1501,"children":1502},{"style":143},[1503],{"type":52,"value":1504},"await",{"type":47,"tag":126,"props":1506,"children":1507},{"style":154},[1508],{"type":52,"value":292},{"type":47,"tag":126,"props":1510,"children":1511},{"style":160},[1512],{"type":52,"value":163},{"type":47,"tag":126,"props":1514,"children":1515},{"style":166},[1516],{"type":52,"value":379},{"type":47,"tag":126,"props":1518,"children":1519},{"style":154},[1520],{"type":52,"value":329},{"type":47,"tag":126,"props":1522,"children":1523},{"style":160},[1524],{"type":52,"value":210},{"type":47,"tag":126,"props":1526,"children":1527},{"style":202},[1528],{"type":52,"value":1529},"send-notification",{"type":47,"tag":126,"props":1531,"children":1532},{"style":160},[1533],{"type":52,"value":210},{"type":47,"tag":126,"props":1535,"children":1536},{"style":160},[1537],{"type":52,"value":215},{"type":47,"tag":126,"props":1539,"children":1540},{"style":278},[1541],{"type":52,"value":1246},{"type":47,"tag":126,"props":1543,"children":1544},{"style":160},[1545],{"type":52,"value":404},{"type":47,"tag":126,"props":1547,"children":1548},{"style":278},[1549],{"type":52,"value":302},{"type":47,"tag":126,"props":1551,"children":1552},{"style":160},[1553],{"type":52,"value":307},{"type":47,"tag":126,"props":1555,"children":1556},{"class":128,"line":688},[1557,1562,1567,1571,1575,1579,1584,1588,1592,1597,1601,1605],{"type":47,"tag":126,"props":1558,"children":1559},{"style":143},[1560],{"type":52,"value":1561},"  await",{"type":47,"tag":126,"props":1563,"children":1564},{"style":166},[1565],{"type":52,"value":1566}," sendEmail",{"type":47,"tag":126,"props":1568,"children":1569},{"style":186},[1570],{"type":52,"value":329},{"type":47,"tag":126,"props":1572,"children":1573},{"style":154},[1574],{"type":52,"value":1294},{"type":47,"tag":126,"props":1576,"children":1577},{"style":160},[1578],{"type":52,"value":163},{"type":47,"tag":126,"props":1580,"children":1581},{"style":154},[1582],{"type":52,"value":1583},"email",{"type":47,"tag":126,"props":1585,"children":1586},{"style":160},[1587],{"type":52,"value":215},{"type":47,"tag":126,"props":1589,"children":1590},{"style":160},[1591],{"type":52,"value":199},{"type":47,"tag":126,"props":1593,"children":1594},{"style":202},[1595],{"type":52,"value":1596},"Welcome!",{"type":47,"tag":126,"props":1598,"children":1599},{"style":160},[1600],{"type":52,"value":210},{"type":47,"tag":126,"props":1602,"children":1603},{"style":186},[1604],{"type":52,"value":347},{"type":47,"tag":126,"props":1606,"children":1607},{"style":160},[1608],{"type":52,"value":447},{"type":47,"tag":126,"props":1610,"children":1611},{"class":128,"line":769},[1612,1616,1620],{"type":47,"tag":126,"props":1613,"children":1614},{"style":160},[1615],{"type":52,"value":1349},{"type":47,"tag":126,"props":1617,"children":1618},{"style":154},[1619],{"type":52,"value":347},{"type":47,"tag":126,"props":1621,"children":1622},{"style":160},[1623],{"type":52,"value":447},{"type":47,"tag":55,"props":1625,"children":1626},{},[1627],{"type":47,"tag":68,"props":1628,"children":1629},{},[1630],{"type":52,"value":1631},"✅ DO:",{"type":47,"tag":1633,"props":1634,"children":1635},"ul",{},[1636,1642,1647],{"type":47,"tag":1637,"props":1638,"children":1639},"li",{},[1640],{"type":52,"value":1641},"Put ALL non-deterministic logic inside steps",{"type":47,"tag":1637,"props":1643,"children":1644},{},[1645],{"type":52,"value":1646},"Return useful data for subsequent steps",{"type":47,"tag":1637,"props":1648,"children":1649},{},[1650],{"type":52,"value":1651},"Reuse step IDs in loops (counters handled automatically)",{"type":47,"tag":55,"props":1653,"children":1654},{},[1655],{"type":47,"tag":68,"props":1656,"children":1657},{},[1658],{"type":52,"value":1659},"❌ DON'T:",{"type":47,"tag":1633,"props":1661,"children":1662},{},[1663,1668],{"type":47,"tag":1637,"props":1664,"children":1665},{},[1666],{"type":52,"value":1667},"Put deterministic logic in steps unnecessarily",{"type":47,"tag":1637,"props":1669,"children":1670},{},[1671],{"type":52,"value":1672},"Forget that each step = separate HTTP request",{"type":47,"tag":87,"props":1674,"children":1676},{"id":1675},"stepsleep",[1677],{"type":52,"value":1678},"step.sleep()",{"type":47,"tag":55,"props":1680,"children":1681},{},[1682],{"type":52,"value":1683},"Pause execution without using compute time.",{"type":47,"tag":114,"props":1685,"children":1687},{"className":116,"code":1686,"language":118,"meta":119,"style":119},"\u002F\u002F Duration strings\nawait step.sleep(\"wait-24h\", \"24h\");\nawait step.sleep(\"short-delay\", \"30s\");\nawait step.sleep(\"weekly-pause\", \"7d\");\n\n\u002F\u002F Use in workflows\nawait step.run(\"send-welcome\", () => sendEmail(email));\nawait step.sleep(\"wait-for-engagement\", \"3d\");\nawait step.run(\"send-followup\", () => sendFollowupEmail(email));\n",[1688],{"type":47,"tag":122,"props":1689,"children":1690},{"__ignoreMap":119},[1691,1699,1761,1822,1883,1890,1898,1959,2020],{"type":47,"tag":126,"props":1692,"children":1693},{"class":128,"line":129},[1694],{"type":47,"tag":126,"props":1695,"children":1696},{"style":133},[1697],{"type":52,"value":1698},"\u002F\u002F Duration strings\n",{"type":47,"tag":126,"props":1700,"children":1701},{"class":128,"line":139},[1702,1706,1710,1714,1719,1723,1727,1732,1736,1740,1744,1749,1753,1757],{"type":47,"tag":126,"props":1703,"children":1704},{"style":143},[1705],{"type":52,"value":1504},{"type":47,"tag":126,"props":1707,"children":1708},{"style":154},[1709],{"type":52,"value":292},{"type":47,"tag":126,"props":1711,"children":1712},{"style":160},[1713],{"type":52,"value":163},{"type":47,"tag":126,"props":1715,"children":1716},{"style":166},[1717],{"type":52,"value":1718},"sleep",{"type":47,"tag":126,"props":1720,"children":1721},{"style":154},[1722],{"type":52,"value":329},{"type":47,"tag":126,"props":1724,"children":1725},{"style":160},[1726],{"type":52,"value":210},{"type":47,"tag":126,"props":1728,"children":1729},{"style":202},[1730],{"type":52,"value":1731},"wait-24h",{"type":47,"tag":126,"props":1733,"children":1734},{"style":160},[1735],{"type":52,"value":210},{"type":47,"tag":126,"props":1737,"children":1738},{"style":160},[1739],{"type":52,"value":215},{"type":47,"tag":126,"props":1741,"children":1742},{"style":160},[1743],{"type":52,"value":199},{"type":47,"tag":126,"props":1745,"children":1746},{"style":202},[1747],{"type":52,"value":1748},"24h",{"type":47,"tag":126,"props":1750,"children":1751},{"style":160},[1752],{"type":52,"value":210},{"type":47,"tag":126,"props":1754,"children":1755},{"style":154},[1756],{"type":52,"value":347},{"type":47,"tag":126,"props":1758,"children":1759},{"style":160},[1760],{"type":52,"value":447},{"type":47,"tag":126,"props":1762,"children":1763},{"class":128,"line":177},[1764,1768,1772,1776,1780,1784,1788,1793,1797,1801,1805,1810,1814,1818],{"type":47,"tag":126,"props":1765,"children":1766},{"style":143},[1767],{"type":52,"value":1504},{"type":47,"tag":126,"props":1769,"children":1770},{"style":154},[1771],{"type":52,"value":292},{"type":47,"tag":126,"props":1773,"children":1774},{"style":160},[1775],{"type":52,"value":163},{"type":47,"tag":126,"props":1777,"children":1778},{"style":166},[1779],{"type":52,"value":1718},{"type":47,"tag":126,"props":1781,"children":1782},{"style":154},[1783],{"type":52,"value":329},{"type":47,"tag":126,"props":1785,"children":1786},{"style":160},[1787],{"type":52,"value":210},{"type":47,"tag":126,"props":1789,"children":1790},{"style":202},[1791],{"type":52,"value":1792},"short-delay",{"type":47,"tag":126,"props":1794,"children":1795},{"style":160},[1796],{"type":52,"value":210},{"type":47,"tag":126,"props":1798,"children":1799},{"style":160},[1800],{"type":52,"value":215},{"type":47,"tag":126,"props":1802,"children":1803},{"style":160},[1804],{"type":52,"value":199},{"type":47,"tag":126,"props":1806,"children":1807},{"style":202},[1808],{"type":52,"value":1809},"30s",{"type":47,"tag":126,"props":1811,"children":1812},{"style":160},[1813],{"type":52,"value":210},{"type":47,"tag":126,"props":1815,"children":1816},{"style":154},[1817],{"type":52,"value":347},{"type":47,"tag":126,"props":1819,"children":1820},{"style":160},[1821],{"type":52,"value":447},{"type":47,"tag":126,"props":1823,"children":1824},{"class":128,"line":274},[1825,1829,1833,1837,1841,1845,1849,1854,1858,1862,1866,1871,1875,1879],{"type":47,"tag":126,"props":1826,"children":1827},{"style":143},[1828],{"type":52,"value":1504},{"type":47,"tag":126,"props":1830,"children":1831},{"style":154},[1832],{"type":52,"value":292},{"type":47,"tag":126,"props":1834,"children":1835},{"style":160},[1836],{"type":52,"value":163},{"type":47,"tag":126,"props":1838,"children":1839},{"style":166},[1840],{"type":52,"value":1718},{"type":47,"tag":126,"props":1842,"children":1843},{"style":154},[1844],{"type":52,"value":329},{"type":47,"tag":126,"props":1846,"children":1847},{"style":160},[1848],{"type":52,"value":210},{"type":47,"tag":126,"props":1850,"children":1851},{"style":202},[1852],{"type":52,"value":1853},"weekly-pause",{"type":47,"tag":126,"props":1855,"children":1856},{"style":160},[1857],{"type":52,"value":210},{"type":47,"tag":126,"props":1859,"children":1860},{"style":160},[1861],{"type":52,"value":215},{"type":47,"tag":126,"props":1863,"children":1864},{"style":160},[1865],{"type":52,"value":199},{"type":47,"tag":126,"props":1867,"children":1868},{"style":202},[1869],{"type":52,"value":1870},"7d",{"type":47,"tag":126,"props":1872,"children":1873},{"style":160},[1874],{"type":52,"value":210},{"type":47,"tag":126,"props":1876,"children":1877},{"style":154},[1878],{"type":52,"value":347},{"type":47,"tag":126,"props":1880,"children":1881},{"style":160},[1882],{"type":52,"value":447},{"type":47,"tag":126,"props":1884,"children":1885},{"class":128,"line":27},[1886],{"type":47,"tag":126,"props":1887,"children":1888},{"emptyLinePlaceholder":645},[1889],{"type":52,"value":648},{"type":47,"tag":126,"props":1891,"children":1892},{"class":128,"line":360},[1893],{"type":47,"tag":126,"props":1894,"children":1895},{"style":133},[1896],{"type":52,"value":1897},"\u002F\u002F Use in workflows\n",{"type":47,"tag":126,"props":1899,"children":1900},{"class":128,"line":450},[1901,1905,1909,1913,1917,1921,1925,1930,1934,1938,1942,1946,1950,1955],{"type":47,"tag":126,"props":1902,"children":1903},{"style":143},[1904],{"type":52,"value":1504},{"type":47,"tag":126,"props":1906,"children":1907},{"style":154},[1908],{"type":52,"value":292},{"type":47,"tag":126,"props":1910,"children":1911},{"style":160},[1912],{"type":52,"value":163},{"type":47,"tag":126,"props":1914,"children":1915},{"style":166},[1916],{"type":52,"value":379},{"type":47,"tag":126,"props":1918,"children":1919},{"style":154},[1920],{"type":52,"value":329},{"type":47,"tag":126,"props":1922,"children":1923},{"style":160},[1924],{"type":52,"value":210},{"type":47,"tag":126,"props":1926,"children":1927},{"style":202},[1928],{"type":52,"value":1929},"send-welcome",{"type":47,"tag":126,"props":1931,"children":1932},{"style":160},[1933],{"type":52,"value":210},{"type":47,"tag":126,"props":1935,"children":1936},{"style":160},[1937],{"type":52,"value":215},{"type":47,"tag":126,"props":1939,"children":1940},{"style":160},[1941],{"type":52,"value":404},{"type":47,"tag":126,"props":1943,"children":1944},{"style":278},[1945],{"type":52,"value":302},{"type":47,"tag":126,"props":1947,"children":1948},{"style":166},[1949],{"type":52,"value":1566},{"type":47,"tag":126,"props":1951,"children":1952},{"style":154},[1953],{"type":52,"value":1954},"(email))",{"type":47,"tag":126,"props":1956,"children":1957},{"style":160},[1958],{"type":52,"value":447},{"type":47,"tag":126,"props":1960,"children":1961},{"class":128,"line":535},[1962,1966,1970,1974,1978,1982,1986,1991,1995,1999,2003,2008,2012,2016],{"type":47,"tag":126,"props":1963,"children":1964},{"style":143},[1965],{"type":52,"value":1504},{"type":47,"tag":126,"props":1967,"children":1968},{"style":154},[1969],{"type":52,"value":292},{"type":47,"tag":126,"props":1971,"children":1972},{"style":160},[1973],{"type":52,"value":163},{"type":47,"tag":126,"props":1975,"children":1976},{"style":166},[1977],{"type":52,"value":1718},{"type":47,"tag":126,"props":1979,"children":1980},{"style":154},[1981],{"type":52,"value":329},{"type":47,"tag":126,"props":1983,"children":1984},{"style":160},[1985],{"type":52,"value":210},{"type":47,"tag":126,"props":1987,"children":1988},{"style":202},[1989],{"type":52,"value":1990},"wait-for-engagement",{"type":47,"tag":126,"props":1992,"children":1993},{"style":160},[1994],{"type":52,"value":210},{"type":47,"tag":126,"props":1996,"children":1997},{"style":160},[1998],{"type":52,"value":215},{"type":47,"tag":126,"props":2000,"children":2001},{"style":160},[2002],{"type":52,"value":199},{"type":47,"tag":126,"props":2004,"children":2005},{"style":202},[2006],{"type":52,"value":2007},"3d",{"type":47,"tag":126,"props":2009,"children":2010},{"style":160},[2011],{"type":52,"value":210},{"type":47,"tag":126,"props":2013,"children":2014},{"style":154},[2015],{"type":52,"value":347},{"type":47,"tag":126,"props":2017,"children":2018},{"style":160},[2019],{"type":52,"value":447},{"type":47,"tag":126,"props":2021,"children":2022},{"class":128,"line":620},[2023,2027,2031,2035,2039,2043,2047,2052,2056,2060,2064,2068,2073,2077],{"type":47,"tag":126,"props":2024,"children":2025},{"style":143},[2026],{"type":52,"value":1504},{"type":47,"tag":126,"props":2028,"children":2029},{"style":154},[2030],{"type":52,"value":292},{"type":47,"tag":126,"props":2032,"children":2033},{"style":160},[2034],{"type":52,"value":163},{"type":47,"tag":126,"props":2036,"children":2037},{"style":166},[2038],{"type":52,"value":379},{"type":47,"tag":126,"props":2040,"children":2041},{"style":154},[2042],{"type":52,"value":329},{"type":47,"tag":126,"props":2044,"children":2045},{"style":160},[2046],{"type":52,"value":210},{"type":47,"tag":126,"props":2048,"children":2049},{"style":202},[2050],{"type":52,"value":2051},"send-followup",{"type":47,"tag":126,"props":2053,"children":2054},{"style":160},[2055],{"type":52,"value":210},{"type":47,"tag":126,"props":2057,"children":2058},{"style":160},[2059],{"type":52,"value":215},{"type":47,"tag":126,"props":2061,"children":2062},{"style":160},[2063],{"type":52,"value":404},{"type":47,"tag":126,"props":2065,"children":2066},{"style":278},[2067],{"type":52,"value":302},{"type":47,"tag":126,"props":2069,"children":2070},{"style":166},[2071],{"type":52,"value":2072}," sendFollowupEmail",{"type":47,"tag":126,"props":2074,"children":2075},{"style":154},[2076],{"type":52,"value":1954},{"type":47,"tag":126,"props":2078,"children":2079},{"style":160},[2080],{"type":52,"value":447},{"type":47,"tag":87,"props":2082,"children":2084},{"id":2083},"stepsleepuntil",[2085],{"type":52,"value":2086},"step.sleepUntil()",{"type":47,"tag":55,"props":2088,"children":2089},{},[2090],{"type":52,"value":2091},"Sleep until a specific datetime.",{"type":47,"tag":114,"props":2093,"children":2095},{"className":116,"code":2094,"language":118,"meta":119,"style":119},"const reminderDate = new Date(\"2024-12-25T09:00:00Z\");\nawait step.sleepUntil(\"wait-for-christmas\", reminderDate);\n\n\u002F\u002F From event data\nconst scheduledTime = new Date(event.data.remind_at);\nawait step.sleepUntil(\"wait-for-scheduled-time\", scheduledTime);\n",[2096],{"type":47,"tag":122,"props":2097,"children":2098},{"__ignoreMap":119},[2099,2150,2200,2207,2215,2266],{"type":47,"tag":126,"props":2100,"children":2101},{"class":128,"line":129},[2102,2106,2111,2115,2120,2125,2129,2133,2138,2142,2146],{"type":47,"tag":126,"props":2103,"children":2104},{"style":278},[2105],{"type":52,"value":1193},{"type":47,"tag":126,"props":2107,"children":2108},{"style":154},[2109],{"type":52,"value":2110}," reminderDate ",{"type":47,"tag":126,"props":2112,"children":2113},{"style":160},[2114],{"type":52,"value":1203},{"type":47,"tag":126,"props":2116,"children":2117},{"style":160},[2118],{"type":52,"value":2119}," new",{"type":47,"tag":126,"props":2121,"children":2122},{"style":166},[2123],{"type":52,"value":2124}," Date",{"type":47,"tag":126,"props":2126,"children":2127},{"style":154},[2128],{"type":52,"value":329},{"type":47,"tag":126,"props":2130,"children":2131},{"style":160},[2132],{"type":52,"value":210},{"type":47,"tag":126,"props":2134,"children":2135},{"style":202},[2136],{"type":52,"value":2137},"2024-12-25T09:00:00Z",{"type":47,"tag":126,"props":2139,"children":2140},{"style":160},[2141],{"type":52,"value":210},{"type":47,"tag":126,"props":2143,"children":2144},{"style":154},[2145],{"type":52,"value":347},{"type":47,"tag":126,"props":2147,"children":2148},{"style":160},[2149],{"type":52,"value":447},{"type":47,"tag":126,"props":2151,"children":2152},{"class":128,"line":139},[2153,2157,2161,2165,2170,2174,2178,2183,2187,2191,2196],{"type":47,"tag":126,"props":2154,"children":2155},{"style":143},[2156],{"type":52,"value":1504},{"type":47,"tag":126,"props":2158,"children":2159},{"style":154},[2160],{"type":52,"value":292},{"type":47,"tag":126,"props":2162,"children":2163},{"style":160},[2164],{"type":52,"value":163},{"type":47,"tag":126,"props":2166,"children":2167},{"style":166},[2168],{"type":52,"value":2169},"sleepUntil",{"type":47,"tag":126,"props":2171,"children":2172},{"style":154},[2173],{"type":52,"value":329},{"type":47,"tag":126,"props":2175,"children":2176},{"style":160},[2177],{"type":52,"value":210},{"type":47,"tag":126,"props":2179,"children":2180},{"style":202},[2181],{"type":52,"value":2182},"wait-for-christmas",{"type":47,"tag":126,"props":2184,"children":2185},{"style":160},[2186],{"type":52,"value":210},{"type":47,"tag":126,"props":2188,"children":2189},{"style":160},[2190],{"type":52,"value":215},{"type":47,"tag":126,"props":2192,"children":2193},{"style":154},[2194],{"type":52,"value":2195}," reminderDate)",{"type":47,"tag":126,"props":2197,"children":2198},{"style":160},[2199],{"type":52,"value":447},{"type":47,"tag":126,"props":2201,"children":2202},{"class":128,"line":177},[2203],{"type":47,"tag":126,"props":2204,"children":2205},{"emptyLinePlaceholder":645},[2206],{"type":52,"value":648},{"type":47,"tag":126,"props":2208,"children":2209},{"class":128,"line":274},[2210],{"type":47,"tag":126,"props":2211,"children":2212},{"style":133},[2213],{"type":52,"value":2214},"\u002F\u002F From event data\n",{"type":47,"tag":126,"props":2216,"children":2217},{"class":128,"line":27},[2218,2222,2227,2231,2235,2239,2244,2248,2253,2257,2262],{"type":47,"tag":126,"props":2219,"children":2220},{"style":278},[2221],{"type":52,"value":1193},{"type":47,"tag":126,"props":2223,"children":2224},{"style":154},[2225],{"type":52,"value":2226}," scheduledTime ",{"type":47,"tag":126,"props":2228,"children":2229},{"style":160},[2230],{"type":52,"value":1203},{"type":47,"tag":126,"props":2232,"children":2233},{"style":160},[2234],{"type":52,"value":2119},{"type":47,"tag":126,"props":2236,"children":2237},{"style":166},[2238],{"type":52,"value":2124},{"type":47,"tag":126,"props":2240,"children":2241},{"style":154},[2242],{"type":52,"value":2243},"(event",{"type":47,"tag":126,"props":2245,"children":2246},{"style":160},[2247],{"type":52,"value":163},{"type":47,"tag":126,"props":2249,"children":2250},{"style":154},[2251],{"type":52,"value":2252},"data",{"type":47,"tag":126,"props":2254,"children":2255},{"style":160},[2256],{"type":52,"value":163},{"type":47,"tag":126,"props":2258,"children":2259},{"style":154},[2260],{"type":52,"value":2261},"remind_at)",{"type":47,"tag":126,"props":2263,"children":2264},{"style":160},[2265],{"type":52,"value":447},{"type":47,"tag":126,"props":2267,"children":2268},{"class":128,"line":360},[2269,2273,2277,2281,2285,2289,2293,2298,2302,2306,2311],{"type":47,"tag":126,"props":2270,"children":2271},{"style":143},[2272],{"type":52,"value":1504},{"type":47,"tag":126,"props":2274,"children":2275},{"style":154},[2276],{"type":52,"value":292},{"type":47,"tag":126,"props":2278,"children":2279},{"style":160},[2280],{"type":52,"value":163},{"type":47,"tag":126,"props":2282,"children":2283},{"style":166},[2284],{"type":52,"value":2169},{"type":47,"tag":126,"props":2286,"children":2287},{"style":154},[2288],{"type":52,"value":329},{"type":47,"tag":126,"props":2290,"children":2291},{"style":160},[2292],{"type":52,"value":210},{"type":47,"tag":126,"props":2294,"children":2295},{"style":202},[2296],{"type":52,"value":2297},"wait-for-scheduled-time",{"type":47,"tag":126,"props":2299,"children":2300},{"style":160},[2301],{"type":52,"value":210},{"type":47,"tag":126,"props":2303,"children":2304},{"style":160},[2305],{"type":52,"value":215},{"type":47,"tag":126,"props":2307,"children":2308},{"style":154},[2309],{"type":52,"value":2310}," scheduledTime)",{"type":47,"tag":126,"props":2312,"children":2313},{"style":160},[2314],{"type":52,"value":447},{"type":47,"tag":87,"props":2316,"children":2318},{"id":2317},"stepwaitforevent",[2319],{"type":52,"value":2320},"step.waitForEvent()",{"type":47,"tag":55,"props":2322,"children":2323},{},[2324],{"type":47,"tag":68,"props":2325,"children":2326},{},[2327],{"type":52,"value":2328},"🚨 CRITICAL: waitForEvent ONLY catches events sent AFTER this step executes.",{"type":47,"tag":1633,"props":2330,"children":2331},{},[2332,2337,2342],{"type":47,"tag":1637,"props":2333,"children":2334},{},[2335],{"type":52,"value":2336},"❌ Event sent before waitForEvent runs → will NOT be caught",{"type":47,"tag":1637,"props":2338,"children":2339},{},[2340],{"type":52,"value":2341},"✅ Event sent after waitForEvent runs → will be caught",{"type":47,"tag":1637,"props":2343,"children":2344},{},[2345,2347,2353],{"type":52,"value":2346},"Always check for ",{"type":47,"tag":122,"props":2348,"children":2350},{"className":2349},[],[2351],{"type":52,"value":2352},"null",{"type":52,"value":2354}," return (means timeout, event never arrived)",{"type":47,"tag":114,"props":2356,"children":2358},{"className":116,"code":2357,"language":118,"meta":119,"style":119},"\u002F\u002F Basic event waiting with timeout\nconst approval = await step.waitForEvent(\"wait-for-approval\", {\n  event: \"app\u002Finvoice.approved\",\n  timeout: \"7d\",\n  match: \"data.invoiceId\" \u002F\u002F Simple matching\n});\n\n\u002F\u002F Expression-based matching (CEL syntax)\nconst subscription = await step.waitForEvent(\"wait-for-subscription\", {\n  event: \"app\u002Fsubscription.created\",\n  timeout: \"30d\",\n  if: \"event.data.userId == async.data.userId && async.data.plan == 'pro'\"\n});\n\n\u002F\u002F Handle timeout\nif (!approval) {\n  await step.run(\"handle-timeout\", () => {\n    \u002F\u002F Approval never came\n    return notifyAccountingTeam();\n  });\n}\n",[2359],{"type":47,"tag":122,"props":2360,"children":2361},{"__ignoreMap":119},[2362,2370,2428,2458,2486,2516,2531,2538,2546,2603,2631,2659,2685,2700,2707,2715,2743,2795,2803,2825,2841],{"type":47,"tag":126,"props":2363,"children":2364},{"class":128,"line":129},[2365],{"type":47,"tag":126,"props":2366,"children":2367},{"style":133},[2368],{"type":52,"value":2369},"\u002F\u002F Basic event waiting with timeout\n",{"type":47,"tag":126,"props":2371,"children":2372},{"class":128,"line":139},[2373,2377,2382,2386,2390,2394,2398,2403,2407,2411,2416,2420,2424],{"type":47,"tag":126,"props":2374,"children":2375},{"style":278},[2376],{"type":52,"value":1193},{"type":47,"tag":126,"props":2378,"children":2379},{"style":154},[2380],{"type":52,"value":2381}," approval ",{"type":47,"tag":126,"props":2383,"children":2384},{"style":160},[2385],{"type":52,"value":1203},{"type":47,"tag":126,"props":2387,"children":2388},{"style":143},[2389],{"type":52,"value":1208},{"type":47,"tag":126,"props":2391,"children":2392},{"style":154},[2393],{"type":52,"value":292},{"type":47,"tag":126,"props":2395,"children":2396},{"style":160},[2397],{"type":52,"value":163},{"type":47,"tag":126,"props":2399,"children":2400},{"style":166},[2401],{"type":52,"value":2402},"waitForEvent",{"type":47,"tag":126,"props":2404,"children":2405},{"style":154},[2406],{"type":52,"value":329},{"type":47,"tag":126,"props":2408,"children":2409},{"style":160},[2410],{"type":52,"value":210},{"type":47,"tag":126,"props":2412,"children":2413},{"style":202},[2414],{"type":52,"value":2415},"wait-for-approval",{"type":47,"tag":126,"props":2417,"children":2418},{"style":160},[2419],{"type":52,"value":210},{"type":47,"tag":126,"props":2421,"children":2422},{"style":160},[2423],{"type":52,"value":215},{"type":47,"tag":126,"props":2425,"children":2426},{"style":160},[2427],{"type":52,"value":307},{"type":47,"tag":126,"props":2429,"children":2430},{"class":128,"line":177},[2431,2436,2440,2444,2449,2453],{"type":47,"tag":126,"props":2432,"children":2433},{"style":186},[2434],{"type":52,"value":2435},"  event",{"type":47,"tag":126,"props":2437,"children":2438},{"style":160},[2439],{"type":52,"value":194},{"type":47,"tag":126,"props":2441,"children":2442},{"style":160},[2443],{"type":52,"value":199},{"type":47,"tag":126,"props":2445,"children":2446},{"style":202},[2447],{"type":52,"value":2448},"app\u002Finvoice.approved",{"type":47,"tag":126,"props":2450,"children":2451},{"style":160},[2452],{"type":52,"value":210},{"type":47,"tag":126,"props":2454,"children":2455},{"style":160},[2456],{"type":52,"value":2457},",\n",{"type":47,"tag":126,"props":2459,"children":2460},{"class":128,"line":274},[2461,2466,2470,2474,2478,2482],{"type":47,"tag":126,"props":2462,"children":2463},{"style":186},[2464],{"type":52,"value":2465},"  timeout",{"type":47,"tag":126,"props":2467,"children":2468},{"style":160},[2469],{"type":52,"value":194},{"type":47,"tag":126,"props":2471,"children":2472},{"style":160},[2473],{"type":52,"value":199},{"type":47,"tag":126,"props":2475,"children":2476},{"style":202},[2477],{"type":52,"value":1870},{"type":47,"tag":126,"props":2479,"children":2480},{"style":160},[2481],{"type":52,"value":210},{"type":47,"tag":126,"props":2483,"children":2484},{"style":160},[2485],{"type":52,"value":2457},{"type":47,"tag":126,"props":2487,"children":2488},{"class":128,"line":27},[2489,2494,2498,2502,2507,2511],{"type":47,"tag":126,"props":2490,"children":2491},{"style":186},[2492],{"type":52,"value":2493},"  match",{"type":47,"tag":126,"props":2495,"children":2496},{"style":160},[2497],{"type":52,"value":194},{"type":47,"tag":126,"props":2499,"children":2500},{"style":160},[2501],{"type":52,"value":199},{"type":47,"tag":126,"props":2503,"children":2504},{"style":202},[2505],{"type":52,"value":2506},"data.invoiceId",{"type":47,"tag":126,"props":2508,"children":2509},{"style":160},[2510],{"type":52,"value":210},{"type":47,"tag":126,"props":2512,"children":2513},{"style":133},[2514],{"type":52,"value":2515}," \u002F\u002F Simple matching\n",{"type":47,"tag":126,"props":2517,"children":2518},{"class":128,"line":360},[2519,2523,2527],{"type":47,"tag":126,"props":2520,"children":2521},{"style":160},[2522],{"type":52,"value":1349},{"type":47,"tag":126,"props":2524,"children":2525},{"style":154},[2526],{"type":52,"value":347},{"type":47,"tag":126,"props":2528,"children":2529},{"style":160},[2530],{"type":52,"value":447},{"type":47,"tag":126,"props":2532,"children":2533},{"class":128,"line":450},[2534],{"type":47,"tag":126,"props":2535,"children":2536},{"emptyLinePlaceholder":645},[2537],{"type":52,"value":648},{"type":47,"tag":126,"props":2539,"children":2540},{"class":128,"line":535},[2541],{"type":47,"tag":126,"props":2542,"children":2543},{"style":133},[2544],{"type":52,"value":2545},"\u002F\u002F Expression-based matching (CEL syntax)\n",{"type":47,"tag":126,"props":2547,"children":2548},{"class":128,"line":620},[2549,2553,2558,2562,2566,2570,2574,2578,2582,2586,2591,2595,2599],{"type":47,"tag":126,"props":2550,"children":2551},{"style":278},[2552],{"type":52,"value":1193},{"type":47,"tag":126,"props":2554,"children":2555},{"style":154},[2556],{"type":52,"value":2557}," subscription ",{"type":47,"tag":126,"props":2559,"children":2560},{"style":160},[2561],{"type":52,"value":1203},{"type":47,"tag":126,"props":2563,"children":2564},{"style":143},[2565],{"type":52,"value":1208},{"type":47,"tag":126,"props":2567,"children":2568},{"style":154},[2569],{"type":52,"value":292},{"type":47,"tag":126,"props":2571,"children":2572},{"style":160},[2573],{"type":52,"value":163},{"type":47,"tag":126,"props":2575,"children":2576},{"style":166},[2577],{"type":52,"value":2402},{"type":47,"tag":126,"props":2579,"children":2580},{"style":154},[2581],{"type":52,"value":329},{"type":47,"tag":126,"props":2583,"children":2584},{"style":160},[2585],{"type":52,"value":210},{"type":47,"tag":126,"props":2587,"children":2588},{"style":202},[2589],{"type":52,"value":2590},"wait-for-subscription",{"type":47,"tag":126,"props":2592,"children":2593},{"style":160},[2594],{"type":52,"value":210},{"type":47,"tag":126,"props":2596,"children":2597},{"style":160},[2598],{"type":52,"value":215},{"type":47,"tag":126,"props":2600,"children":2601},{"style":160},[2602],{"type":52,"value":307},{"type":47,"tag":126,"props":2604,"children":2605},{"class":128,"line":629},[2606,2610,2614,2618,2623,2627],{"type":47,"tag":126,"props":2607,"children":2608},{"style":186},[2609],{"type":52,"value":2435},{"type":47,"tag":126,"props":2611,"children":2612},{"style":160},[2613],{"type":52,"value":194},{"type":47,"tag":126,"props":2615,"children":2616},{"style":160},[2617],{"type":52,"value":199},{"type":47,"tag":126,"props":2619,"children":2620},{"style":202},[2621],{"type":52,"value":2622},"app\u002Fsubscription.created",{"type":47,"tag":126,"props":2624,"children":2625},{"style":160},[2626],{"type":52,"value":210},{"type":47,"tag":126,"props":2628,"children":2629},{"style":160},[2630],{"type":52,"value":2457},{"type":47,"tag":126,"props":2632,"children":2633},{"class":128,"line":641},[2634,2638,2642,2646,2651,2655],{"type":47,"tag":126,"props":2635,"children":2636},{"style":186},[2637],{"type":52,"value":2465},{"type":47,"tag":126,"props":2639,"children":2640},{"style":160},[2641],{"type":52,"value":194},{"type":47,"tag":126,"props":2643,"children":2644},{"style":160},[2645],{"type":52,"value":199},{"type":47,"tag":126,"props":2647,"children":2648},{"style":202},[2649],{"type":52,"value":2650},"30d",{"type":47,"tag":126,"props":2652,"children":2653},{"style":160},[2654],{"type":52,"value":210},{"type":47,"tag":126,"props":2656,"children":2657},{"style":160},[2658],{"type":52,"value":2457},{"type":47,"tag":126,"props":2660,"children":2661},{"class":128,"line":651},[2662,2667,2671,2675,2680],{"type":47,"tag":126,"props":2663,"children":2664},{"style":186},[2665],{"type":52,"value":2666},"  if",{"type":47,"tag":126,"props":2668,"children":2669},{"style":160},[2670],{"type":52,"value":194},{"type":47,"tag":126,"props":2672,"children":2673},{"style":160},[2674],{"type":52,"value":199},{"type":47,"tag":126,"props":2676,"children":2677},{"style":202},[2678],{"type":52,"value":2679},"event.data.userId == async.data.userId && async.data.plan == 'pro'",{"type":47,"tag":126,"props":2681,"children":2682},{"style":160},[2683],{"type":52,"value":2684},"\"\n",{"type":47,"tag":126,"props":2686,"children":2687},{"class":128,"line":660},[2688,2692,2696],{"type":47,"tag":126,"props":2689,"children":2690},{"style":160},[2691],{"type":52,"value":1349},{"type":47,"tag":126,"props":2693,"children":2694},{"style":154},[2695],{"type":52,"value":347},{"type":47,"tag":126,"props":2697,"children":2698},{"style":160},[2699],{"type":52,"value":447},{"type":47,"tag":126,"props":2701,"children":2702},{"class":128,"line":688},[2703],{"type":47,"tag":126,"props":2704,"children":2705},{"emptyLinePlaceholder":645},[2706],{"type":52,"value":648},{"type":47,"tag":126,"props":2708,"children":2709},{"class":128,"line":769},[2710],{"type":47,"tag":126,"props":2711,"children":2712},{"style":133},[2713],{"type":52,"value":2714},"\u002F\u002F Handle timeout\n",{"type":47,"tag":126,"props":2716,"children":2717},{"class":128,"line":797},[2718,2723,2728,2733,2738],{"type":47,"tag":126,"props":2719,"children":2720},{"style":143},[2721],{"type":52,"value":2722},"if",{"type":47,"tag":126,"props":2724,"children":2725},{"style":154},[2726],{"type":52,"value":2727}," (",{"type":47,"tag":126,"props":2729,"children":2730},{"style":160},[2731],{"type":52,"value":2732},"!",{"type":47,"tag":126,"props":2734,"children":2735},{"style":154},[2736],{"type":52,"value":2737},"approval) ",{"type":47,"tag":126,"props":2739,"children":2740},{"style":160},[2741],{"type":52,"value":2742},"{\n",{"type":47,"tag":126,"props":2744,"children":2745},{"class":128,"line":883},[2746,2750,2754,2758,2762,2766,2770,2775,2779,2783,2787,2791],{"type":47,"tag":126,"props":2747,"children":2748},{"style":143},[2749],{"type":52,"value":1561},{"type":47,"tag":126,"props":2751,"children":2752},{"style":154},[2753],{"type":52,"value":292},{"type":47,"tag":126,"props":2755,"children":2756},{"style":160},[2757],{"type":52,"value":163},{"type":47,"tag":126,"props":2759,"children":2760},{"style":166},[2761],{"type":52,"value":379},{"type":47,"tag":126,"props":2763,"children":2764},{"style":186},[2765],{"type":52,"value":329},{"type":47,"tag":126,"props":2767,"children":2768},{"style":160},[2769],{"type":52,"value":210},{"type":47,"tag":126,"props":2771,"children":2772},{"style":202},[2773],{"type":52,"value":2774},"handle-timeout",{"type":47,"tag":126,"props":2776,"children":2777},{"style":160},[2778],{"type":52,"value":210},{"type":47,"tag":126,"props":2780,"children":2781},{"style":160},[2782],{"type":52,"value":215},{"type":47,"tag":126,"props":2784,"children":2785},{"style":160},[2786],{"type":52,"value":404},{"type":47,"tag":126,"props":2788,"children":2789},{"style":278},[2790],{"type":52,"value":302},{"type":47,"tag":126,"props":2792,"children":2793},{"style":160},[2794],{"type":52,"value":307},{"type":47,"tag":126,"props":2796,"children":2797},{"class":128,"line":967},[2798],{"type":47,"tag":126,"props":2799,"children":2800},{"style":133},[2801],{"type":52,"value":2802},"    \u002F\u002F Approval never came\n",{"type":47,"tag":126,"props":2804,"children":2805},{"class":128,"line":1051},[2806,2811,2816,2821],{"type":47,"tag":126,"props":2807,"children":2808},{"style":143},[2809],{"type":52,"value":2810},"    return",{"type":47,"tag":126,"props":2812,"children":2813},{"style":166},[2814],{"type":52,"value":2815}," notifyAccountingTeam",{"type":47,"tag":126,"props":2817,"children":2818},{"style":186},[2819],{"type":52,"value":2820},"()",{"type":47,"tag":126,"props":2822,"children":2823},{"style":160},[2824],{"type":52,"value":447},{"type":47,"tag":126,"props":2826,"children":2827},{"class":128,"line":1135},[2828,2833,2837],{"type":47,"tag":126,"props":2829,"children":2830},{"style":160},[2831],{"type":52,"value":2832},"  }",{"type":47,"tag":126,"props":2834,"children":2835},{"style":186},[2836],{"type":52,"value":347},{"type":47,"tag":126,"props":2838,"children":2839},{"style":160},[2840],{"type":52,"value":447},{"type":47,"tag":126,"props":2842,"children":2843},{"class":128,"line":1143},[2844],{"type":47,"tag":126,"props":2845,"children":2846},{"style":160},[2847],{"type":52,"value":2848},"}\n",{"type":47,"tag":55,"props":2850,"children":2851},{},[2852],{"type":47,"tag":68,"props":2853,"children":2854},{},[2855],{"type":52,"value":1631},{"type":47,"tag":1633,"props":2857,"children":2858},{},[2859,2864,2869,2874],{"type":47,"tag":1637,"props":2860,"children":2861},{},[2862],{"type":52,"value":2863},"Use unique IDs for matching (userId, sessionId, requestId)",{"type":47,"tag":1637,"props":2865,"children":2866},{},[2867],{"type":52,"value":2868},"Always set reasonable timeouts",{"type":47,"tag":1637,"props":2870,"children":2871},{},[2872],{"type":52,"value":2873},"Handle null return (timeout case)",{"type":47,"tag":1637,"props":2875,"children":2876},{},[2877],{"type":52,"value":2878},"Use with Realtime for human-in-the-loop flows",{"type":47,"tag":55,"props":2880,"children":2881},{},[2882],{"type":47,"tag":68,"props":2883,"children":2884},{},[2885],{"type":52,"value":1659},{"type":47,"tag":1633,"props":2887,"children":2888},{},[2889,2894],{"type":47,"tag":1637,"props":2890,"children":2891},{},[2892],{"type":52,"value":2893},"Expect events sent before this step to be handled",{"type":47,"tag":1637,"props":2895,"children":2896},{},[2897],{"type":52,"value":2898},"Use without timeouts in production",{"type":47,"tag":2900,"props":2901,"children":2903},"h3",{"id":2902},"expression-syntax",[2904],{"type":52,"value":2905},"Expression Syntax",{"type":47,"tag":55,"props":2907,"children":2908},{},[2909,2911,2917,2919,2924,2926,2932,2933,2938,2940,2946],{"type":52,"value":2910},"In expressions, ",{"type":47,"tag":122,"props":2912,"children":2914},{"className":2913},[],[2915],{"type":52,"value":2916},"event",{"type":52,"value":2918}," = the ",{"type":47,"tag":68,"props":2920,"children":2921},{},[2922],{"type":52,"value":2923},"original",{"type":52,"value":2925}," triggering event, ",{"type":47,"tag":122,"props":2927,"children":2929},{"className":2928},[],[2930],{"type":52,"value":2931},"async",{"type":52,"value":2918},{"type":47,"tag":68,"props":2934,"children":2935},{},[2936],{"type":52,"value":2937},"new",{"type":52,"value":2939}," event being matched. See ",{"type":47,"tag":76,"props":2941,"children":2943},{"href":2942},"..\u002Freferences\u002Fexpressions.md",[2944],{"type":52,"value":2945},"Expression Syntax Reference",{"type":52,"value":2947}," for full syntax, operators, and patterns.",{"type":47,"tag":87,"props":2949,"children":2951},{"id":2950},"stepwaitforsignal",[2952],{"type":52,"value":2953},"step.waitForSignal()",{"type":47,"tag":55,"props":2955,"children":2956},{},[2957],{"type":52,"value":2958},"Wait for unique signals (not events). Better for 1:1 matching.",{"type":47,"tag":114,"props":2960,"children":2962},{"className":116,"code":2961,"language":118,"meta":119,"style":119},"const taskId = \"task-\" + crypto.randomUUID();\n\nconst signal = await step.waitForSignal(\"wait-for-task-completion\", {\n  signal: taskId,\n  timeout: \"1h\",\n  onConflict: \"replace\" \u002F\u002F Required: \"replace\" overwrites pending signal, \"fail\" throws an error\n});\n\n\u002F\u002F Send signal elsewhere via Inngest API or SDK\n\u002F\u002F POST \u002Fv1\u002Fevents with signal matching taskId\n",[2963],{"type":47,"tag":122,"props":2964,"children":2965},{"__ignoreMap":119},[2966,3022,3029,3087,3108,3136,3166,3181,3188,3196],{"type":47,"tag":126,"props":2967,"children":2968},{"class":128,"line":129},[2969,2973,2978,2982,2986,2991,2995,3000,3005,3009,3014,3018],{"type":47,"tag":126,"props":2970,"children":2971},{"style":278},[2972],{"type":52,"value":1193},{"type":47,"tag":126,"props":2974,"children":2975},{"style":154},[2976],{"type":52,"value":2977}," taskId ",{"type":47,"tag":126,"props":2979,"children":2980},{"style":160},[2981],{"type":52,"value":1203},{"type":47,"tag":126,"props":2983,"children":2984},{"style":160},[2985],{"type":52,"value":199},{"type":47,"tag":126,"props":2987,"children":2988},{"style":202},[2989],{"type":52,"value":2990},"task-",{"type":47,"tag":126,"props":2992,"children":2993},{"style":160},[2994],{"type":52,"value":210},{"type":47,"tag":126,"props":2996,"children":2997},{"style":160},[2998],{"type":52,"value":2999}," +",{"type":47,"tag":126,"props":3001,"children":3002},{"style":154},[3003],{"type":52,"value":3004}," crypto",{"type":47,"tag":126,"props":3006,"children":3007},{"style":160},[3008],{"type":52,"value":163},{"type":47,"tag":126,"props":3010,"children":3011},{"style":166},[3012],{"type":52,"value":3013},"randomUUID",{"type":47,"tag":126,"props":3015,"children":3016},{"style":154},[3017],{"type":52,"value":2820},{"type":47,"tag":126,"props":3019,"children":3020},{"style":160},[3021],{"type":52,"value":447},{"type":47,"tag":126,"props":3023,"children":3024},{"class":128,"line":139},[3025],{"type":47,"tag":126,"props":3026,"children":3027},{"emptyLinePlaceholder":645},[3028],{"type":52,"value":648},{"type":47,"tag":126,"props":3030,"children":3031},{"class":128,"line":177},[3032,3036,3041,3045,3049,3053,3057,3062,3066,3070,3075,3079,3083],{"type":47,"tag":126,"props":3033,"children":3034},{"style":278},[3035],{"type":52,"value":1193},{"type":47,"tag":126,"props":3037,"children":3038},{"style":154},[3039],{"type":52,"value":3040}," signal ",{"type":47,"tag":126,"props":3042,"children":3043},{"style":160},[3044],{"type":52,"value":1203},{"type":47,"tag":126,"props":3046,"children":3047},{"style":143},[3048],{"type":52,"value":1208},{"type":47,"tag":126,"props":3050,"children":3051},{"style":154},[3052],{"type":52,"value":292},{"type":47,"tag":126,"props":3054,"children":3055},{"style":160},[3056],{"type":52,"value":163},{"type":47,"tag":126,"props":3058,"children":3059},{"style":166},[3060],{"type":52,"value":3061},"waitForSignal",{"type":47,"tag":126,"props":3063,"children":3064},{"style":154},[3065],{"type":52,"value":329},{"type":47,"tag":126,"props":3067,"children":3068},{"style":160},[3069],{"type":52,"value":210},{"type":47,"tag":126,"props":3071,"children":3072},{"style":202},[3073],{"type":52,"value":3074},"wait-for-task-completion",{"type":47,"tag":126,"props":3076,"children":3077},{"style":160},[3078],{"type":52,"value":210},{"type":47,"tag":126,"props":3080,"children":3081},{"style":160},[3082],{"type":52,"value":215},{"type":47,"tag":126,"props":3084,"children":3085},{"style":160},[3086],{"type":52,"value":307},{"type":47,"tag":126,"props":3088,"children":3089},{"class":128,"line":274},[3090,3095,3099,3104],{"type":47,"tag":126,"props":3091,"children":3092},{"style":186},[3093],{"type":52,"value":3094},"  signal",{"type":47,"tag":126,"props":3096,"children":3097},{"style":160},[3098],{"type":52,"value":194},{"type":47,"tag":126,"props":3100,"children":3101},{"style":154},[3102],{"type":52,"value":3103}," taskId",{"type":47,"tag":126,"props":3105,"children":3106},{"style":160},[3107],{"type":52,"value":2457},{"type":47,"tag":126,"props":3109,"children":3110},{"class":128,"line":27},[3111,3115,3119,3123,3128,3132],{"type":47,"tag":126,"props":3112,"children":3113},{"style":186},[3114],{"type":52,"value":2465},{"type":47,"tag":126,"props":3116,"children":3117},{"style":160},[3118],{"type":52,"value":194},{"type":47,"tag":126,"props":3120,"children":3121},{"style":160},[3122],{"type":52,"value":199},{"type":47,"tag":126,"props":3124,"children":3125},{"style":202},[3126],{"type":52,"value":3127},"1h",{"type":47,"tag":126,"props":3129,"children":3130},{"style":160},[3131],{"type":52,"value":210},{"type":47,"tag":126,"props":3133,"children":3134},{"style":160},[3135],{"type":52,"value":2457},{"type":47,"tag":126,"props":3137,"children":3138},{"class":128,"line":360},[3139,3144,3148,3152,3157,3161],{"type":47,"tag":126,"props":3140,"children":3141},{"style":186},[3142],{"type":52,"value":3143},"  onConflict",{"type":47,"tag":126,"props":3145,"children":3146},{"style":160},[3147],{"type":52,"value":194},{"type":47,"tag":126,"props":3149,"children":3150},{"style":160},[3151],{"type":52,"value":199},{"type":47,"tag":126,"props":3153,"children":3154},{"style":202},[3155],{"type":52,"value":3156},"replace",{"type":47,"tag":126,"props":3158,"children":3159},{"style":160},[3160],{"type":52,"value":210},{"type":47,"tag":126,"props":3162,"children":3163},{"style":133},[3164],{"type":52,"value":3165}," \u002F\u002F Required: \"replace\" overwrites pending signal, \"fail\" throws an error\n",{"type":47,"tag":126,"props":3167,"children":3168},{"class":128,"line":450},[3169,3173,3177],{"type":47,"tag":126,"props":3170,"children":3171},{"style":160},[3172],{"type":52,"value":1349},{"type":47,"tag":126,"props":3174,"children":3175},{"style":154},[3176],{"type":52,"value":347},{"type":47,"tag":126,"props":3178,"children":3179},{"style":160},[3180],{"type":52,"value":447},{"type":47,"tag":126,"props":3182,"children":3183},{"class":128,"line":535},[3184],{"type":47,"tag":126,"props":3185,"children":3186},{"emptyLinePlaceholder":645},[3187],{"type":52,"value":648},{"type":47,"tag":126,"props":3189,"children":3190},{"class":128,"line":620},[3191],{"type":47,"tag":126,"props":3192,"children":3193},{"style":133},[3194],{"type":52,"value":3195},"\u002F\u002F Send signal elsewhere via Inngest API or SDK\n",{"type":47,"tag":126,"props":3197,"children":3198},{"class":128,"line":629},[3199],{"type":47,"tag":126,"props":3200,"children":3201},{"style":133},[3202],{"type":52,"value":3203},"\u002F\u002F POST \u002Fv1\u002Fevents with signal matching taskId\n",{"type":47,"tag":55,"props":3205,"children":3206},{},[3207],{"type":47,"tag":68,"props":3208,"children":3209},{},[3210],{"type":52,"value":3211},"When to use:",{"type":47,"tag":1633,"props":3213,"children":3214},{},[3215,3224],{"type":47,"tag":1637,"props":3216,"children":3217},{},[3218,3222],{"type":47,"tag":68,"props":3219,"children":3220},{},[3221],{"type":52,"value":2402},{"type":52,"value":3223},": Multiple functions might handle the same event",{"type":47,"tag":1637,"props":3225,"children":3226},{},[3227,3231],{"type":47,"tag":68,"props":3228,"children":3229},{},[3230],{"type":52,"value":3061},{"type":52,"value":3232},": Exact 1:1 signal to specific function run",{"type":47,"tag":87,"props":3234,"children":3236},{"id":3235},"stepsendevent",[3237],{"type":52,"value":3238},"step.sendEvent()",{"type":47,"tag":55,"props":3240,"children":3241},{},[3242],{"type":52,"value":3243},"Fan out to other functions without waiting for results.",{"type":47,"tag":114,"props":3245,"children":3247},{"className":116,"code":3246,"language":118,"meta":119,"style":119},"\u002F\u002F Trigger other functions\nawait step.sendEvent(\"notify-systems\", {\n  name: \"user\u002Fprofile.updated\",\n  data: { userId: user.id, changes: profileChanges }\n});\n\n\u002F\u002F Multiple events at once\nawait step.sendEvent(\"batch-notifications\", [\n  { name: \"billing\u002Finvoice.created\", data: { invoiceId } },\n  { name: \"email\u002Finvoice.send\", data: { email: user.email, invoiceId } }\n]);\n",[3248],{"type":47,"tag":122,"props":3249,"children":3250},{"__ignoreMap":119},[3251,3259,3304,3333,3394,3409,3416,3424,3469,3529,3611],{"type":47,"tag":126,"props":3252,"children":3253},{"class":128,"line":129},[3254],{"type":47,"tag":126,"props":3255,"children":3256},{"style":133},[3257],{"type":52,"value":3258},"\u002F\u002F Trigger other functions\n",{"type":47,"tag":126,"props":3260,"children":3261},{"class":128,"line":139},[3262,3266,3270,3274,3279,3283,3287,3292,3296,3300],{"type":47,"tag":126,"props":3263,"children":3264},{"style":143},[3265],{"type":52,"value":1504},{"type":47,"tag":126,"props":3267,"children":3268},{"style":154},[3269],{"type":52,"value":292},{"type":47,"tag":126,"props":3271,"children":3272},{"style":160},[3273],{"type":52,"value":163},{"type":47,"tag":126,"props":3275,"children":3276},{"style":166},[3277],{"type":52,"value":3278},"sendEvent",{"type":47,"tag":126,"props":3280,"children":3281},{"style":154},[3282],{"type":52,"value":329},{"type":47,"tag":126,"props":3284,"children":3285},{"style":160},[3286],{"type":52,"value":210},{"type":47,"tag":126,"props":3288,"children":3289},{"style":202},[3290],{"type":52,"value":3291},"notify-systems",{"type":47,"tag":126,"props":3293,"children":3294},{"style":160},[3295],{"type":52,"value":210},{"type":47,"tag":126,"props":3297,"children":3298},{"style":160},[3299],{"type":52,"value":215},{"type":47,"tag":126,"props":3301,"children":3302},{"style":160},[3303],{"type":52,"value":307},{"type":47,"tag":126,"props":3305,"children":3306},{"class":128,"line":177},[3307,3312,3316,3320,3325,3329],{"type":47,"tag":126,"props":3308,"children":3309},{"style":186},[3310],{"type":52,"value":3311},"  name",{"type":47,"tag":126,"props":3313,"children":3314},{"style":160},[3315],{"type":52,"value":194},{"type":47,"tag":126,"props":3317,"children":3318},{"style":160},[3319],{"type":52,"value":199},{"type":47,"tag":126,"props":3321,"children":3322},{"style":202},[3323],{"type":52,"value":3324},"user\u002Fprofile.updated",{"type":47,"tag":126,"props":3326,"children":3327},{"style":160},[3328],{"type":52,"value":210},{"type":47,"tag":126,"props":3330,"children":3331},{"style":160},[3332],{"type":52,"value":2457},{"type":47,"tag":126,"props":3334,"children":3335},{"class":128,"line":274},[3336,3341,3345,3350,3355,3359,3363,3367,3372,3376,3381,3385,3390],{"type":47,"tag":126,"props":3337,"children":3338},{"style":186},[3339],{"type":52,"value":3340},"  data",{"type":47,"tag":126,"props":3342,"children":3343},{"style":160},[3344],{"type":52,"value":194},{"type":47,"tag":126,"props":3346,"children":3347},{"style":160},[3348],{"type":52,"value":3349}," {",{"type":47,"tag":126,"props":3351,"children":3352},{"style":186},[3353],{"type":52,"value":3354}," userId",{"type":47,"tag":126,"props":3356,"children":3357},{"style":160},[3358],{"type":52,"value":194},{"type":47,"tag":126,"props":3360,"children":3361},{"style":154},[3362],{"type":52,"value":1271},{"type":47,"tag":126,"props":3364,"children":3365},{"style":160},[3366],{"type":52,"value":163},{"type":47,"tag":126,"props":3368,"children":3369},{"style":154},[3370],{"type":52,"value":3371},"id",{"type":47,"tag":126,"props":3373,"children":3374},{"style":160},[3375],{"type":52,"value":215},{"type":47,"tag":126,"props":3377,"children":3378},{"style":186},[3379],{"type":52,"value":3380}," changes",{"type":47,"tag":126,"props":3382,"children":3383},{"style":160},[3384],{"type":52,"value":194},{"type":47,"tag":126,"props":3386,"children":3387},{"style":154},[3388],{"type":52,"value":3389}," profileChanges ",{"type":47,"tag":126,"props":3391,"children":3392},{"style":160},[3393],{"type":52,"value":2848},{"type":47,"tag":126,"props":3395,"children":3396},{"class":128,"line":27},[3397,3401,3405],{"type":47,"tag":126,"props":3398,"children":3399},{"style":160},[3400],{"type":52,"value":1349},{"type":47,"tag":126,"props":3402,"children":3403},{"style":154},[3404],{"type":52,"value":347},{"type":47,"tag":126,"props":3406,"children":3407},{"style":160},[3408],{"type":52,"value":447},{"type":47,"tag":126,"props":3410,"children":3411},{"class":128,"line":360},[3412],{"type":47,"tag":126,"props":3413,"children":3414},{"emptyLinePlaceholder":645},[3415],{"type":52,"value":648},{"type":47,"tag":126,"props":3417,"children":3418},{"class":128,"line":450},[3419],{"type":47,"tag":126,"props":3420,"children":3421},{"style":133},[3422],{"type":52,"value":3423},"\u002F\u002F Multiple events at once\n",{"type":47,"tag":126,"props":3425,"children":3426},{"class":128,"line":535},[3427,3431,3435,3439,3443,3447,3451,3456,3460,3464],{"type":47,"tag":126,"props":3428,"children":3429},{"style":143},[3430],{"type":52,"value":1504},{"type":47,"tag":126,"props":3432,"children":3433},{"style":154},[3434],{"type":52,"value":292},{"type":47,"tag":126,"props":3436,"children":3437},{"style":160},[3438],{"type":52,"value":163},{"type":47,"tag":126,"props":3440,"children":3441},{"style":166},[3442],{"type":52,"value":3278},{"type":47,"tag":126,"props":3444,"children":3445},{"style":154},[3446],{"type":52,"value":329},{"type":47,"tag":126,"props":3448,"children":3449},{"style":160},[3450],{"type":52,"value":210},{"type":47,"tag":126,"props":3452,"children":3453},{"style":202},[3454],{"type":52,"value":3455},"batch-notifications",{"type":47,"tag":126,"props":3457,"children":3458},{"style":160},[3459],{"type":52,"value":210},{"type":47,"tag":126,"props":3461,"children":3462},{"style":160},[3463],{"type":52,"value":215},{"type":47,"tag":126,"props":3465,"children":3466},{"style":154},[3467],{"type":52,"value":3468}," [\n",{"type":47,"tag":126,"props":3470,"children":3471},{"class":128,"line":620},[3472,3476,3481,3485,3489,3494,3498,3502,3507,3511,3515,3520,3524],{"type":47,"tag":126,"props":3473,"children":3474},{"style":160},[3475],{"type":52,"value":183},{"type":47,"tag":126,"props":3477,"children":3478},{"style":186},[3479],{"type":52,"value":3480}," name",{"type":47,"tag":126,"props":3482,"children":3483},{"style":160},[3484],{"type":52,"value":194},{"type":47,"tag":126,"props":3486,"children":3487},{"style":160},[3488],{"type":52,"value":199},{"type":47,"tag":126,"props":3490,"children":3491},{"style":202},[3492],{"type":52,"value":3493},"billing\u002Finvoice.created",{"type":47,"tag":126,"props":3495,"children":3496},{"style":160},[3497],{"type":52,"value":210},{"type":47,"tag":126,"props":3499,"children":3500},{"style":160},[3501],{"type":52,"value":215},{"type":47,"tag":126,"props":3503,"children":3504},{"style":186},[3505],{"type":52,"value":3506}," data",{"type":47,"tag":126,"props":3508,"children":3509},{"style":160},[3510],{"type":52,"value":194},{"type":47,"tag":126,"props":3512,"children":3513},{"style":160},[3514],{"type":52,"value":3349},{"type":47,"tag":126,"props":3516,"children":3517},{"style":154},[3518],{"type":52,"value":3519}," invoiceId ",{"type":47,"tag":126,"props":3521,"children":3522},{"style":160},[3523],{"type":52,"value":1349},{"type":47,"tag":126,"props":3525,"children":3526},{"style":160},[3527],{"type":52,"value":3528}," },\n",{"type":47,"tag":126,"props":3530,"children":3531},{"class":128,"line":629},[3532,3536,3540,3544,3548,3553,3557,3561,3565,3569,3573,3578,3582,3586,3590,3594,3598,3602,3606],{"type":47,"tag":126,"props":3533,"children":3534},{"style":160},[3535],{"type":52,"value":183},{"type":47,"tag":126,"props":3537,"children":3538},{"style":186},[3539],{"type":52,"value":3480},{"type":47,"tag":126,"props":3541,"children":3542},{"style":160},[3543],{"type":52,"value":194},{"type":47,"tag":126,"props":3545,"children":3546},{"style":160},[3547],{"type":52,"value":199},{"type":47,"tag":126,"props":3549,"children":3550},{"style":202},[3551],{"type":52,"value":3552},"email\u002Finvoice.send",{"type":47,"tag":126,"props":3554,"children":3555},{"style":160},[3556],{"type":52,"value":210},{"type":47,"tag":126,"props":3558,"children":3559},{"style":160},[3560],{"type":52,"value":215},{"type":47,"tag":126,"props":3562,"children":3563},{"style":186},[3564],{"type":52,"value":3506},{"type":47,"tag":126,"props":3566,"children":3567},{"style":160},[3568],{"type":52,"value":194},{"type":47,"tag":126,"props":3570,"children":3571},{"style":160},[3572],{"type":52,"value":3349},{"type":47,"tag":126,"props":3574,"children":3575},{"style":186},[3576],{"type":52,"value":3577}," email",{"type":47,"tag":126,"props":3579,"children":3580},{"style":160},[3581],{"type":52,"value":194},{"type":47,"tag":126,"props":3583,"children":3584},{"style":154},[3585],{"type":52,"value":1271},{"type":47,"tag":126,"props":3587,"children":3588},{"style":160},[3589],{"type":52,"value":163},{"type":47,"tag":126,"props":3591,"children":3592},{"style":154},[3593],{"type":52,"value":1583},{"type":47,"tag":126,"props":3595,"children":3596},{"style":160},[3597],{"type":52,"value":215},{"type":47,"tag":126,"props":3599,"children":3600},{"style":154},[3601],{"type":52,"value":3519},{"type":47,"tag":126,"props":3603,"children":3604},{"style":160},[3605],{"type":52,"value":1349},{"type":47,"tag":126,"props":3607,"children":3608},{"style":160},[3609],{"type":52,"value":3610}," }\n",{"type":47,"tag":126,"props":3612,"children":3613},{"class":128,"line":641},[3614,3619],{"type":47,"tag":126,"props":3615,"children":3616},{"style":154},[3617],{"type":52,"value":3618},"])",{"type":47,"tag":126,"props":3620,"children":3621},{"style":160},[3622],{"type":52,"value":447},{"type":47,"tag":55,"props":3624,"children":3625},{},[3626,3631],{"type":47,"tag":68,"props":3627,"children":3628},{},[3629],{"type":52,"value":3630},"Use when:",{"type":52,"value":3632}," You want to trigger other functions but don't need their results in the current function.",{"type":47,"tag":87,"props":3634,"children":3636},{"id":3635},"stepinvoke",[3637],{"type":52,"value":3638},"step.invoke()",{"type":47,"tag":55,"props":3640,"children":3641},{},[3642],{"type":52,"value":3643},"Call other functions and handle their results. Perfect for composition.",{"type":47,"tag":114,"props":3645,"children":3647},{"className":116,"code":3646,"language":118,"meta":119,"style":119},"const computeSquare = inngest.createFunction(\n  { id: \"compute-square\", triggers: [{ event: \"calculate\u002Fsquare\" }] },\n  async ({ event }) => {\n    return { result: event.data.number * event.data.number };\n  }\n);\n\n\u002F\u002F Invoke and use result\nconst square = await step.invoke(\"get-square\", {\n  function: computeSquare,\n  data: { number: 4 }\n});\n\nconsole.log(square.result); \u002F\u002F 16, fully typed!\n\n\u002F\u002F For cross-app invocation (when you can't import the function directly):\nimport { referenceFunction } from \"inngest\";\n\nconst externalFn = referenceFunction({\n  appId: \"other-app\",\n  functionId: \"other-fn\"\n});\n\nconst result = await step.invoke(\"call-external\", {\n  function: externalFn,\n  data: { key: \"value\" }\n});\n",[3648],{"type":47,"tag":122,"props":3649,"children":3650},{"__ignoreMap":119},[3651,3683,3764,3791,3862,3869,3880,3887,3895,3953,3974,4008,4023,4030,4069,4076,4084,4126,4133,4161,4190,4215,4231,4239,4296,4317,4358],{"type":47,"tag":126,"props":3652,"children":3653},{"class":128,"line":129},[3654,3658,3663,3667,3671,3675,3679],{"type":47,"tag":126,"props":3655,"children":3656},{"style":278},[3657],{"type":52,"value":1193},{"type":47,"tag":126,"props":3659,"children":3660},{"style":154},[3661],{"type":52,"value":3662}," computeSquare ",{"type":47,"tag":126,"props":3664,"children":3665},{"style":160},[3666],{"type":52,"value":1203},{"type":47,"tag":126,"props":3668,"children":3669},{"style":154},[3670],{"type":52,"value":157},{"type":47,"tag":126,"props":3672,"children":3673},{"style":160},[3674],{"type":52,"value":163},{"type":47,"tag":126,"props":3676,"children":3677},{"style":166},[3678],{"type":52,"value":169},{"type":47,"tag":126,"props":3680,"children":3681},{"style":154},[3682],{"type":52,"value":174},{"type":47,"tag":126,"props":3684,"children":3685},{"class":128,"line":139},[3686,3690,3694,3698,3702,3707,3711,3715,3719,3723,3727,3731,3735,3739,3743,3748,3752,3756,3760],{"type":47,"tag":126,"props":3687,"children":3688},{"style":160},[3689],{"type":52,"value":183},{"type":47,"tag":126,"props":3691,"children":3692},{"style":186},[3693],{"type":52,"value":189},{"type":47,"tag":126,"props":3695,"children":3696},{"style":160},[3697],{"type":52,"value":194},{"type":47,"tag":126,"props":3699,"children":3700},{"style":160},[3701],{"type":52,"value":199},{"type":47,"tag":126,"props":3703,"children":3704},{"style":202},[3705],{"type":52,"value":3706},"compute-square",{"type":47,"tag":126,"props":3708,"children":3709},{"style":160},[3710],{"type":52,"value":210},{"type":47,"tag":126,"props":3712,"children":3713},{"style":160},[3714],{"type":52,"value":215},{"type":47,"tag":126,"props":3716,"children":3717},{"style":186},[3718],{"type":52,"value":220},{"type":47,"tag":126,"props":3720,"children":3721},{"style":160},[3722],{"type":52,"value":194},{"type":47,"tag":126,"props":3724,"children":3725},{"style":154},[3726],{"type":52,"value":229},{"type":47,"tag":126,"props":3728,"children":3729},{"style":160},[3730],{"type":52,"value":234},{"type":47,"tag":126,"props":3732,"children":3733},{"style":186},[3734],{"type":52,"value":239},{"type":47,"tag":126,"props":3736,"children":3737},{"style":160},[3738],{"type":52,"value":194},{"type":47,"tag":126,"props":3740,"children":3741},{"style":160},[3742],{"type":52,"value":199},{"type":47,"tag":126,"props":3744,"children":3745},{"style":202},[3746],{"type":52,"value":3747},"calculate\u002Fsquare",{"type":47,"tag":126,"props":3749,"children":3750},{"style":160},[3751],{"type":52,"value":210},{"type":47,"tag":126,"props":3753,"children":3754},{"style":160},[3755],{"type":52,"value":261},{"type":47,"tag":126,"props":3757,"children":3758},{"style":154},[3759],{"type":52,"value":266},{"type":47,"tag":126,"props":3761,"children":3762},{"style":160},[3763],{"type":52,"value":271},{"type":47,"tag":126,"props":3765,"children":3766},{"class":128,"line":177},[3767,3771,3775,3779,3783,3787],{"type":47,"tag":126,"props":3768,"children":3769},{"style":278},[3770],{"type":52,"value":281},{"type":47,"tag":126,"props":3772,"children":3773},{"style":160},[3774],{"type":52,"value":286},{"type":47,"tag":126,"props":3776,"children":3777},{"style":289},[3778],{"type":52,"value":239},{"type":47,"tag":126,"props":3780,"children":3781},{"style":160},[3782],{"type":52,"value":297},{"type":47,"tag":126,"props":3784,"children":3785},{"style":278},[3786],{"type":52,"value":302},{"type":47,"tag":126,"props":3788,"children":3789},{"style":160},[3790],{"type":52,"value":307},{"type":47,"tag":126,"props":3792,"children":3793},{"class":128,"line":274},[3794,3798,3802,3807,3811,3815,3819,3823,3827,3832,3837,3841,3845,3849,3853,3857],{"type":47,"tag":126,"props":3795,"children":3796},{"style":143},[3797],{"type":52,"value":2810},{"type":47,"tag":126,"props":3799,"children":3800},{"style":160},[3801],{"type":52,"value":3349},{"type":47,"tag":126,"props":3803,"children":3804},{"style":186},[3805],{"type":52,"value":3806}," result",{"type":47,"tag":126,"props":3808,"children":3809},{"style":160},[3810],{"type":52,"value":194},{"type":47,"tag":126,"props":3812,"children":3813},{"style":154},[3814],{"type":52,"value":239},{"type":47,"tag":126,"props":3816,"children":3817},{"style":160},[3818],{"type":52,"value":163},{"type":47,"tag":126,"props":3820,"children":3821},{"style":154},[3822],{"type":52,"value":2252},{"type":47,"tag":126,"props":3824,"children":3825},{"style":160},[3826],{"type":52,"value":163},{"type":47,"tag":126,"props":3828,"children":3829},{"style":154},[3830],{"type":52,"value":3831},"number",{"type":47,"tag":126,"props":3833,"children":3834},{"style":160},[3835],{"type":52,"value":3836}," *",{"type":47,"tag":126,"props":3838,"children":3839},{"style":154},[3840],{"type":52,"value":239},{"type":47,"tag":126,"props":3842,"children":3843},{"style":160},[3844],{"type":52,"value":163},{"type":47,"tag":126,"props":3846,"children":3847},{"style":154},[3848],{"type":52,"value":2252},{"type":47,"tag":126,"props":3850,"children":3851},{"style":160},[3852],{"type":52,"value":163},{"type":47,"tag":126,"props":3854,"children":3855},{"style":154},[3856],{"type":52,"value":3831},{"type":47,"tag":126,"props":3858,"children":3859},{"style":160},[3860],{"type":52,"value":3861}," };\n",{"type":47,"tag":126,"props":3863,"children":3864},{"class":128,"line":27},[3865],{"type":47,"tag":126,"props":3866,"children":3867},{"style":160},[3868],{"type":52,"value":626},{"type":47,"tag":126,"props":3870,"children":3871},{"class":128,"line":360},[3872,3876],{"type":47,"tag":126,"props":3873,"children":3874},{"style":154},[3875],{"type":52,"value":347},{"type":47,"tag":126,"props":3877,"children":3878},{"style":160},[3879],{"type":52,"value":447},{"type":47,"tag":126,"props":3881,"children":3882},{"class":128,"line":450},[3883],{"type":47,"tag":126,"props":3884,"children":3885},{"emptyLinePlaceholder":645},[3886],{"type":52,"value":648},{"type":47,"tag":126,"props":3888,"children":3889},{"class":128,"line":535},[3890],{"type":47,"tag":126,"props":3891,"children":3892},{"style":133},[3893],{"type":52,"value":3894},"\u002F\u002F Invoke and use result\n",{"type":47,"tag":126,"props":3896,"children":3897},{"class":128,"line":620},[3898,3902,3907,3911,3915,3919,3923,3928,3932,3936,3941,3945,3949],{"type":47,"tag":126,"props":3899,"children":3900},{"style":278},[3901],{"type":52,"value":1193},{"type":47,"tag":126,"props":3903,"children":3904},{"style":154},[3905],{"type":52,"value":3906}," square ",{"type":47,"tag":126,"props":3908,"children":3909},{"style":160},[3910],{"type":52,"value":1203},{"type":47,"tag":126,"props":3912,"children":3913},{"style":143},[3914],{"type":52,"value":1208},{"type":47,"tag":126,"props":3916,"children":3917},{"style":154},[3918],{"type":52,"value":292},{"type":47,"tag":126,"props":3920,"children":3921},{"style":160},[3922],{"type":52,"value":163},{"type":47,"tag":126,"props":3924,"children":3925},{"style":166},[3926],{"type":52,"value":3927},"invoke",{"type":47,"tag":126,"props":3929,"children":3930},{"style":154},[3931],{"type":52,"value":329},{"type":47,"tag":126,"props":3933,"children":3934},{"style":160},[3935],{"type":52,"value":210},{"type":47,"tag":126,"props":3937,"children":3938},{"style":202},[3939],{"type":52,"value":3940},"get-square",{"type":47,"tag":126,"props":3942,"children":3943},{"style":160},[3944],{"type":52,"value":210},{"type":47,"tag":126,"props":3946,"children":3947},{"style":160},[3948],{"type":52,"value":215},{"type":47,"tag":126,"props":3950,"children":3951},{"style":160},[3952],{"type":52,"value":307},{"type":47,"tag":126,"props":3954,"children":3955},{"class":128,"line":629},[3956,3961,3965,3970],{"type":47,"tag":126,"props":3957,"children":3958},{"style":186},[3959],{"type":52,"value":3960},"  function",{"type":47,"tag":126,"props":3962,"children":3963},{"style":160},[3964],{"type":52,"value":194},{"type":47,"tag":126,"props":3966,"children":3967},{"style":154},[3968],{"type":52,"value":3969}," computeSquare",{"type":47,"tag":126,"props":3971,"children":3972},{"style":160},[3973],{"type":52,"value":2457},{"type":47,"tag":126,"props":3975,"children":3976},{"class":128,"line":641},[3977,3981,3985,3989,3994,3998,4004],{"type":47,"tag":126,"props":3978,"children":3979},{"style":186},[3980],{"type":52,"value":3340},{"type":47,"tag":126,"props":3982,"children":3983},{"style":160},[3984],{"type":52,"value":194},{"type":47,"tag":126,"props":3986,"children":3987},{"style":160},[3988],{"type":52,"value":3349},{"type":47,"tag":126,"props":3990,"children":3991},{"style":186},[3992],{"type":52,"value":3993}," number",{"type":47,"tag":126,"props":3995,"children":3996},{"style":160},[3997],{"type":52,"value":194},{"type":47,"tag":126,"props":3999,"children":4001},{"style":4000},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[4002],{"type":52,"value":4003}," 4",{"type":47,"tag":126,"props":4005,"children":4006},{"style":160},[4007],{"type":52,"value":3610},{"type":47,"tag":126,"props":4009,"children":4010},{"class":128,"line":651},[4011,4015,4019],{"type":47,"tag":126,"props":4012,"children":4013},{"style":160},[4014],{"type":52,"value":1349},{"type":47,"tag":126,"props":4016,"children":4017},{"style":154},[4018],{"type":52,"value":347},{"type":47,"tag":126,"props":4020,"children":4021},{"style":160},[4022],{"type":52,"value":447},{"type":47,"tag":126,"props":4024,"children":4025},{"class":128,"line":660},[4026],{"type":47,"tag":126,"props":4027,"children":4028},{"emptyLinePlaceholder":645},[4029],{"type":52,"value":648},{"type":47,"tag":126,"props":4031,"children":4032},{"class":128,"line":688},[4033,4038,4042,4046,4051,4055,4060,4064],{"type":47,"tag":126,"props":4034,"children":4035},{"style":154},[4036],{"type":52,"value":4037},"console",{"type":47,"tag":126,"props":4039,"children":4040},{"style":160},[4041],{"type":52,"value":163},{"type":47,"tag":126,"props":4043,"children":4044},{"style":166},[4045],{"type":52,"value":324},{"type":47,"tag":126,"props":4047,"children":4048},{"style":154},[4049],{"type":52,"value":4050},"(square",{"type":47,"tag":126,"props":4052,"children":4053},{"style":160},[4054],{"type":52,"value":163},{"type":47,"tag":126,"props":4056,"children":4057},{"style":154},[4058],{"type":52,"value":4059},"result)",{"type":47,"tag":126,"props":4061,"children":4062},{"style":160},[4063],{"type":52,"value":352},{"type":47,"tag":126,"props":4065,"children":4066},{"style":133},[4067],{"type":52,"value":4068}," \u002F\u002F 16, fully typed!\n",{"type":47,"tag":126,"props":4070,"children":4071},{"class":128,"line":769},[4072],{"type":47,"tag":126,"props":4073,"children":4074},{"emptyLinePlaceholder":645},[4075],{"type":52,"value":648},{"type":47,"tag":126,"props":4077,"children":4078},{"class":128,"line":797},[4079],{"type":47,"tag":126,"props":4080,"children":4081},{"style":133},[4082],{"type":52,"value":4083},"\u002F\u002F For cross-app invocation (when you can't import the function directly):\n",{"type":47,"tag":126,"props":4085,"children":4086},{"class":128,"line":883},[4087,4092,4096,4101,4105,4110,4114,4118,4122],{"type":47,"tag":126,"props":4088,"children":4089},{"style":143},[4090],{"type":52,"value":4091},"import",{"type":47,"tag":126,"props":4093,"children":4094},{"style":160},[4095],{"type":52,"value":3349},{"type":47,"tag":126,"props":4097,"children":4098},{"style":154},[4099],{"type":52,"value":4100}," referenceFunction",{"type":47,"tag":126,"props":4102,"children":4103},{"style":160},[4104],{"type":52,"value":261},{"type":47,"tag":126,"props":4106,"children":4107},{"style":143},[4108],{"type":52,"value":4109}," from",{"type":47,"tag":126,"props":4111,"children":4112},{"style":160},[4113],{"type":52,"value":199},{"type":47,"tag":126,"props":4115,"children":4116},{"style":202},[4117],{"type":52,"value":8},{"type":47,"tag":126,"props":4119,"children":4120},{"style":160},[4121],{"type":52,"value":210},{"type":47,"tag":126,"props":4123,"children":4124},{"style":160},[4125],{"type":52,"value":447},{"type":47,"tag":126,"props":4127,"children":4128},{"class":128,"line":967},[4129],{"type":47,"tag":126,"props":4130,"children":4131},{"emptyLinePlaceholder":645},[4132],{"type":52,"value":648},{"type":47,"tag":126,"props":4134,"children":4135},{"class":128,"line":1051},[4136,4140,4145,4149,4153,4157],{"type":47,"tag":126,"props":4137,"children":4138},{"style":278},[4139],{"type":52,"value":1193},{"type":47,"tag":126,"props":4141,"children":4142},{"style":154},[4143],{"type":52,"value":4144}," externalFn ",{"type":47,"tag":126,"props":4146,"children":4147},{"style":160},[4148],{"type":52,"value":1203},{"type":47,"tag":126,"props":4150,"children":4151},{"style":166},[4152],{"type":52,"value":4100},{"type":47,"tag":126,"props":4154,"children":4155},{"style":154},[4156],{"type":52,"value":329},{"type":47,"tag":126,"props":4158,"children":4159},{"style":160},[4160],{"type":52,"value":2742},{"type":47,"tag":126,"props":4162,"children":4163},{"class":128,"line":1135},[4164,4169,4173,4177,4182,4186],{"type":47,"tag":126,"props":4165,"children":4166},{"style":186},[4167],{"type":52,"value":4168},"  appId",{"type":47,"tag":126,"props":4170,"children":4171},{"style":160},[4172],{"type":52,"value":194},{"type":47,"tag":126,"props":4174,"children":4175},{"style":160},[4176],{"type":52,"value":199},{"type":47,"tag":126,"props":4178,"children":4179},{"style":202},[4180],{"type":52,"value":4181},"other-app",{"type":47,"tag":126,"props":4183,"children":4184},{"style":160},[4185],{"type":52,"value":210},{"type":47,"tag":126,"props":4187,"children":4188},{"style":160},[4189],{"type":52,"value":2457},{"type":47,"tag":126,"props":4191,"children":4192},{"class":128,"line":1143},[4193,4198,4202,4206,4211],{"type":47,"tag":126,"props":4194,"children":4195},{"style":186},[4196],{"type":52,"value":4197},"  functionId",{"type":47,"tag":126,"props":4199,"children":4200},{"style":160},[4201],{"type":52,"value":194},{"type":47,"tag":126,"props":4203,"children":4204},{"style":160},[4205],{"type":52,"value":199},{"type":47,"tag":126,"props":4207,"children":4208},{"style":202},[4209],{"type":52,"value":4210},"other-fn",{"type":47,"tag":126,"props":4212,"children":4213},{"style":160},[4214],{"type":52,"value":2684},{"type":47,"tag":126,"props":4216,"children":4218},{"class":128,"line":4217},22,[4219,4223,4227],{"type":47,"tag":126,"props":4220,"children":4221},{"style":160},[4222],{"type":52,"value":1349},{"type":47,"tag":126,"props":4224,"children":4225},{"style":154},[4226],{"type":52,"value":347},{"type":47,"tag":126,"props":4228,"children":4229},{"style":160},[4230],{"type":52,"value":447},{"type":47,"tag":126,"props":4232,"children":4234},{"class":128,"line":4233},23,[4235],{"type":47,"tag":126,"props":4236,"children":4237},{"emptyLinePlaceholder":645},[4238],{"type":52,"value":648},{"type":47,"tag":126,"props":4240,"children":4242},{"class":128,"line":4241},24,[4243,4247,4251,4255,4259,4263,4267,4271,4275,4279,4284,4288,4292],{"type":47,"tag":126,"props":4244,"children":4245},{"style":278},[4246],{"type":52,"value":1193},{"type":47,"tag":126,"props":4248,"children":4249},{"style":154},[4250],{"type":52,"value":1198},{"type":47,"tag":126,"props":4252,"children":4253},{"style":160},[4254],{"type":52,"value":1203},{"type":47,"tag":126,"props":4256,"children":4257},{"style":143},[4258],{"type":52,"value":1208},{"type":47,"tag":126,"props":4260,"children":4261},{"style":154},[4262],{"type":52,"value":292},{"type":47,"tag":126,"props":4264,"children":4265},{"style":160},[4266],{"type":52,"value":163},{"type":47,"tag":126,"props":4268,"children":4269},{"style":166},[4270],{"type":52,"value":3927},{"type":47,"tag":126,"props":4272,"children":4273},{"style":154},[4274],{"type":52,"value":329},{"type":47,"tag":126,"props":4276,"children":4277},{"style":160},[4278],{"type":52,"value":210},{"type":47,"tag":126,"props":4280,"children":4281},{"style":202},[4282],{"type":52,"value":4283},"call-external",{"type":47,"tag":126,"props":4285,"children":4286},{"style":160},[4287],{"type":52,"value":210},{"type":47,"tag":126,"props":4289,"children":4290},{"style":160},[4291],{"type":52,"value":215},{"type":47,"tag":126,"props":4293,"children":4294},{"style":160},[4295],{"type":52,"value":307},{"type":47,"tag":126,"props":4297,"children":4299},{"class":128,"line":4298},25,[4300,4304,4308,4313],{"type":47,"tag":126,"props":4301,"children":4302},{"style":186},[4303],{"type":52,"value":3960},{"type":47,"tag":126,"props":4305,"children":4306},{"style":160},[4307],{"type":52,"value":194},{"type":47,"tag":126,"props":4309,"children":4310},{"style":154},[4311],{"type":52,"value":4312}," externalFn",{"type":47,"tag":126,"props":4314,"children":4315},{"style":160},[4316],{"type":52,"value":2457},{"type":47,"tag":126,"props":4318,"children":4319},{"class":128,"line":23},[4320,4324,4328,4332,4337,4341,4345,4350,4354],{"type":47,"tag":126,"props":4321,"children":4322},{"style":186},[4323],{"type":52,"value":3340},{"type":47,"tag":126,"props":4325,"children":4326},{"style":160},[4327],{"type":52,"value":194},{"type":47,"tag":126,"props":4329,"children":4330},{"style":160},[4331],{"type":52,"value":3349},{"type":47,"tag":126,"props":4333,"children":4334},{"style":186},[4335],{"type":52,"value":4336}," key",{"type":47,"tag":126,"props":4338,"children":4339},{"style":160},[4340],{"type":52,"value":194},{"type":47,"tag":126,"props":4342,"children":4343},{"style":160},[4344],{"type":52,"value":199},{"type":47,"tag":126,"props":4346,"children":4347},{"style":202},[4348],{"type":52,"value":4349},"value",{"type":47,"tag":126,"props":4351,"children":4352},{"style":160},[4353],{"type":52,"value":210},{"type":47,"tag":126,"props":4355,"children":4356},{"style":160},[4357],{"type":52,"value":3610},{"type":47,"tag":126,"props":4359,"children":4361},{"class":128,"line":4360},27,[4362,4366,4370],{"type":47,"tag":126,"props":4363,"children":4364},{"style":160},[4365],{"type":52,"value":1349},{"type":47,"tag":126,"props":4367,"children":4368},{"style":154},[4369],{"type":52,"value":347},{"type":47,"tag":126,"props":4371,"children":4372},{"style":160},[4373],{"type":52,"value":447},{"type":47,"tag":55,"props":4375,"children":4376},{},[4377,4382,4384,4390,4392,4397,4399,4405],{"type":47,"tag":68,"props":4378,"children":4379},{},[4380],{"type":52,"value":4381},"Warning: v4 Breaking Change:",{"type":52,"value":4383}," String function IDs (e.g., ",{"type":47,"tag":122,"props":4385,"children":4387},{"className":4386},[],[4388],{"type":52,"value":4389},"function: \"my-app-other-fn\"",{"type":52,"value":4391},") are no longer supported in ",{"type":47,"tag":122,"props":4393,"children":4395},{"className":4394},[],[4396],{"type":52,"value":3638},{"type":52,"value":4398},". Use an imported function reference or ",{"type":47,"tag":122,"props":4400,"children":4402},{"className":4401},[],[4403],{"type":52,"value":4404},"referenceFunction()",{"type":52,"value":4406}," for cross-app calls.",{"type":47,"tag":55,"props":4408,"children":4409},{},[4410],{"type":47,"tag":68,"props":4411,"children":4412},{},[4413],{"type":52,"value":4414},"Great for:",{"type":47,"tag":1633,"props":4416,"children":4417},{},[4418,4423,4428],{"type":47,"tag":1637,"props":4419,"children":4420},{},[4421],{"type":52,"value":4422},"Breaking complex workflows into composable functions",{"type":47,"tag":1637,"props":4424,"children":4425},{},[4426],{"type":52,"value":4427},"Reusing logic across multiple workflows",{"type":47,"tag":1637,"props":4429,"children":4430},{},[4431],{"type":52,"value":4432},"Map-reduce patterns",{"type":47,"tag":87,"props":4434,"children":4436},{"id":4435},"patterns",[4437],{"type":52,"value":4438},"Patterns",{"type":47,"tag":2900,"props":4440,"children":4442},{"id":4441},"loops-with-steps",[4443],{"type":52,"value":4444},"Loops with Steps",{"type":47,"tag":55,"props":4446,"children":4447},{},[4448],{"type":52,"value":4449},"Reuse step IDs - Inngest handles counters automatically.",{"type":47,"tag":114,"props":4451,"children":4453},{"className":116,"code":4452,"language":118,"meta":119,"style":119},"const allProducts = [];\nlet cursor = null;\nlet hasMore = true;\n\nwhile (hasMore) {\n  \u002F\u002F Same ID \"fetch-page\" reused - counters handled automatically\n  const page = await step.run(\"fetch-page\", async () => {\n    return shopify.products.list({ cursor, limit: 50 });\n  });\n\n  allProducts.push(...page.products);\n\n  if (page.products.length \u003C 50) {\n    hasMore = false;\n  } else {\n    cursor = page.products[49].id;\n  }\n}\n\nawait step.run(\"process-products\", () => {\n  return processAllProducts(allProducts);\n});\n",[4454],{"type":47,"tag":122,"props":4455,"children":4456},{"__ignoreMap":119},[4457,4482,4504,4530,4537,4554,4562,4631,4704,4719,4726,4773,4780,4830,4851,4867,4918,4925,4932,4939,4991,5020],{"type":47,"tag":126,"props":4458,"children":4459},{"class":128,"line":129},[4460,4464,4469,4473,4478],{"type":47,"tag":126,"props":4461,"children":4462},{"style":278},[4463],{"type":52,"value":1193},{"type":47,"tag":126,"props":4465,"children":4466},{"style":154},[4467],{"type":52,"value":4468}," allProducts ",{"type":47,"tag":126,"props":4470,"children":4471},{"style":160},[4472],{"type":52,"value":1203},{"type":47,"tag":126,"props":4474,"children":4475},{"style":154},[4476],{"type":52,"value":4477}," []",{"type":47,"tag":126,"props":4479,"children":4480},{"style":160},[4481],{"type":52,"value":447},{"type":47,"tag":126,"props":4483,"children":4484},{"class":128,"line":139},[4485,4490,4495,4499],{"type":47,"tag":126,"props":4486,"children":4487},{"style":278},[4488],{"type":52,"value":4489},"let",{"type":47,"tag":126,"props":4491,"children":4492},{"style":154},[4493],{"type":52,"value":4494}," cursor ",{"type":47,"tag":126,"props":4496,"children":4497},{"style":160},[4498],{"type":52,"value":1203},{"type":47,"tag":126,"props":4500,"children":4501},{"style":160},[4502],{"type":52,"value":4503}," null;\n",{"type":47,"tag":126,"props":4505,"children":4506},{"class":128,"line":177},[4507,4511,4516,4520,4526],{"type":47,"tag":126,"props":4508,"children":4509},{"style":278},[4510],{"type":52,"value":4489},{"type":47,"tag":126,"props":4512,"children":4513},{"style":154},[4514],{"type":52,"value":4515}," hasMore ",{"type":47,"tag":126,"props":4517,"children":4518},{"style":160},[4519],{"type":52,"value":1203},{"type":47,"tag":126,"props":4521,"children":4523},{"style":4522},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[4524],{"type":52,"value":4525}," true",{"type":47,"tag":126,"props":4527,"children":4528},{"style":160},[4529],{"type":52,"value":447},{"type":47,"tag":126,"props":4531,"children":4532},{"class":128,"line":274},[4533],{"type":47,"tag":126,"props":4534,"children":4535},{"emptyLinePlaceholder":645},[4536],{"type":52,"value":648},{"type":47,"tag":126,"props":4538,"children":4539},{"class":128,"line":27},[4540,4545,4550],{"type":47,"tag":126,"props":4541,"children":4542},{"style":143},[4543],{"type":52,"value":4544},"while",{"type":47,"tag":126,"props":4546,"children":4547},{"style":154},[4548],{"type":52,"value":4549}," (hasMore) ",{"type":47,"tag":126,"props":4551,"children":4552},{"style":160},[4553],{"type":52,"value":2742},{"type":47,"tag":126,"props":4555,"children":4556},{"class":128,"line":360},[4557],{"type":47,"tag":126,"props":4558,"children":4559},{"style":133},[4560],{"type":52,"value":4561},"  \u002F\u002F Same ID \"fetch-page\" reused - counters handled automatically\n",{"type":47,"tag":126,"props":4563,"children":4564},{"class":128,"line":450},[4565,4569,4574,4578,4582,4586,4590,4594,4598,4602,4607,4611,4615,4619,4623,4627],{"type":47,"tag":126,"props":4566,"children":4567},{"style":278},[4568],{"type":52,"value":1266},{"type":47,"tag":126,"props":4570,"children":4571},{"style":154},[4572],{"type":52,"value":4573}," page",{"type":47,"tag":126,"props":4575,"children":4576},{"style":160},[4577],{"type":52,"value":1276},{"type":47,"tag":126,"props":4579,"children":4580},{"style":143},[4581],{"type":52,"value":1208},{"type":47,"tag":126,"props":4583,"children":4584},{"style":154},[4585],{"type":52,"value":292},{"type":47,"tag":126,"props":4587,"children":4588},{"style":160},[4589],{"type":52,"value":163},{"type":47,"tag":126,"props":4591,"children":4592},{"style":166},[4593],{"type":52,"value":379},{"type":47,"tag":126,"props":4595,"children":4596},{"style":186},[4597],{"type":52,"value":329},{"type":47,"tag":126,"props":4599,"children":4600},{"style":160},[4601],{"type":52,"value":210},{"type":47,"tag":126,"props":4603,"children":4604},{"style":202},[4605],{"type":52,"value":4606},"fetch-page",{"type":47,"tag":126,"props":4608,"children":4609},{"style":160},[4610],{"type":52,"value":210},{"type":47,"tag":126,"props":4612,"children":4613},{"style":160},[4614],{"type":52,"value":215},{"type":47,"tag":126,"props":4616,"children":4617},{"style":278},[4618],{"type":52,"value":1246},{"type":47,"tag":126,"props":4620,"children":4621},{"style":160},[4622],{"type":52,"value":404},{"type":47,"tag":126,"props":4624,"children":4625},{"style":278},[4626],{"type":52,"value":302},{"type":47,"tag":126,"props":4628,"children":4629},{"style":160},[4630],{"type":52,"value":307},{"type":47,"tag":126,"props":4632,"children":4633},{"class":128,"line":535},[4634,4638,4643,4647,4652,4656,4661,4665,4669,4674,4678,4683,4687,4692,4696,4700],{"type":47,"tag":126,"props":4635,"children":4636},{"style":143},[4637],{"type":52,"value":2810},{"type":47,"tag":126,"props":4639,"children":4640},{"style":154},[4641],{"type":52,"value":4642}," shopify",{"type":47,"tag":126,"props":4644,"children":4645},{"style":160},[4646],{"type":52,"value":163},{"type":47,"tag":126,"props":4648,"children":4649},{"style":154},[4650],{"type":52,"value":4651},"products",{"type":47,"tag":126,"props":4653,"children":4654},{"style":160},[4655],{"type":52,"value":163},{"type":47,"tag":126,"props":4657,"children":4658},{"style":166},[4659],{"type":52,"value":4660},"list",{"type":47,"tag":126,"props":4662,"children":4663},{"style":186},[4664],{"type":52,"value":329},{"type":47,"tag":126,"props":4666,"children":4667},{"style":160},[4668],{"type":52,"value":234},{"type":47,"tag":126,"props":4670,"children":4671},{"style":154},[4672],{"type":52,"value":4673}," cursor",{"type":47,"tag":126,"props":4675,"children":4676},{"style":160},[4677],{"type":52,"value":215},{"type":47,"tag":126,"props":4679,"children":4680},{"style":186},[4681],{"type":52,"value":4682}," limit",{"type":47,"tag":126,"props":4684,"children":4685},{"style":160},[4686],{"type":52,"value":194},{"type":47,"tag":126,"props":4688,"children":4689},{"style":4000},[4690],{"type":52,"value":4691}," 50",{"type":47,"tag":126,"props":4693,"children":4694},{"style":160},[4695],{"type":52,"value":261},{"type":47,"tag":126,"props":4697,"children":4698},{"style":186},[4699],{"type":52,"value":347},{"type":47,"tag":126,"props":4701,"children":4702},{"style":160},[4703],{"type":52,"value":447},{"type":47,"tag":126,"props":4705,"children":4706},{"class":128,"line":620},[4707,4711,4715],{"type":47,"tag":126,"props":4708,"children":4709},{"style":160},[4710],{"type":52,"value":2832},{"type":47,"tag":126,"props":4712,"children":4713},{"style":186},[4714],{"type":52,"value":347},{"type":47,"tag":126,"props":4716,"children":4717},{"style":160},[4718],{"type":52,"value":447},{"type":47,"tag":126,"props":4720,"children":4721},{"class":128,"line":629},[4722],{"type":47,"tag":126,"props":4723,"children":4724},{"emptyLinePlaceholder":645},[4725],{"type":52,"value":648},{"type":47,"tag":126,"props":4727,"children":4728},{"class":128,"line":641},[4729,4734,4738,4743,4747,4752,4757,4761,4765,4769],{"type":47,"tag":126,"props":4730,"children":4731},{"style":154},[4732],{"type":52,"value":4733},"  allProducts",{"type":47,"tag":126,"props":4735,"children":4736},{"style":160},[4737],{"type":52,"value":163},{"type":47,"tag":126,"props":4739,"children":4740},{"style":166},[4741],{"type":52,"value":4742},"push",{"type":47,"tag":126,"props":4744,"children":4745},{"style":186},[4746],{"type":52,"value":329},{"type":47,"tag":126,"props":4748,"children":4749},{"style":160},[4750],{"type":52,"value":4751},"...",{"type":47,"tag":126,"props":4753,"children":4754},{"style":154},[4755],{"type":52,"value":4756},"page",{"type":47,"tag":126,"props":4758,"children":4759},{"style":160},[4760],{"type":52,"value":163},{"type":47,"tag":126,"props":4762,"children":4763},{"style":154},[4764],{"type":52,"value":4651},{"type":47,"tag":126,"props":4766,"children":4767},{"style":186},[4768],{"type":52,"value":347},{"type":47,"tag":126,"props":4770,"children":4771},{"style":160},[4772],{"type":52,"value":447},{"type":47,"tag":126,"props":4774,"children":4775},{"class":128,"line":651},[4776],{"type":47,"tag":126,"props":4777,"children":4778},{"emptyLinePlaceholder":645},[4779],{"type":52,"value":648},{"type":47,"tag":126,"props":4781,"children":4782},{"class":128,"line":660},[4783,4787,4791,4795,4799,4803,4807,4812,4817,4821,4826],{"type":47,"tag":126,"props":4784,"children":4785},{"style":143},[4786],{"type":52,"value":2666},{"type":47,"tag":126,"props":4788,"children":4789},{"style":186},[4790],{"type":52,"value":2727},{"type":47,"tag":126,"props":4792,"children":4793},{"style":154},[4794],{"type":52,"value":4756},{"type":47,"tag":126,"props":4796,"children":4797},{"style":160},[4798],{"type":52,"value":163},{"type":47,"tag":126,"props":4800,"children":4801},{"style":154},[4802],{"type":52,"value":4651},{"type":47,"tag":126,"props":4804,"children":4805},{"style":160},[4806],{"type":52,"value":163},{"type":47,"tag":126,"props":4808,"children":4809},{"style":154},[4810],{"type":52,"value":4811},"length",{"type":47,"tag":126,"props":4813,"children":4814},{"style":160},[4815],{"type":52,"value":4816}," \u003C",{"type":47,"tag":126,"props":4818,"children":4819},{"style":4000},[4820],{"type":52,"value":4691},{"type":47,"tag":126,"props":4822,"children":4823},{"style":186},[4824],{"type":52,"value":4825},") ",{"type":47,"tag":126,"props":4827,"children":4828},{"style":160},[4829],{"type":52,"value":2742},{"type":47,"tag":126,"props":4831,"children":4832},{"class":128,"line":688},[4833,4838,4842,4847],{"type":47,"tag":126,"props":4834,"children":4835},{"style":154},[4836],{"type":52,"value":4837},"    hasMore",{"type":47,"tag":126,"props":4839,"children":4840},{"style":160},[4841],{"type":52,"value":1276},{"type":47,"tag":126,"props":4843,"children":4844},{"style":4522},[4845],{"type":52,"value":4846}," false",{"type":47,"tag":126,"props":4848,"children":4849},{"style":160},[4850],{"type":52,"value":447},{"type":47,"tag":126,"props":4852,"children":4853},{"class":128,"line":769},[4854,4858,4863],{"type":47,"tag":126,"props":4855,"children":4856},{"style":160},[4857],{"type":52,"value":2832},{"type":47,"tag":126,"props":4859,"children":4860},{"style":143},[4861],{"type":52,"value":4862}," else",{"type":47,"tag":126,"props":4864,"children":4865},{"style":160},[4866],{"type":52,"value":307},{"type":47,"tag":126,"props":4868,"children":4869},{"class":128,"line":797},[4870,4875,4879,4883,4887,4891,4896,4901,4906,4910,4914],{"type":47,"tag":126,"props":4871,"children":4872},{"style":154},[4873],{"type":52,"value":4874},"    cursor",{"type":47,"tag":126,"props":4876,"children":4877},{"style":160},[4878],{"type":52,"value":1276},{"type":47,"tag":126,"props":4880,"children":4881},{"style":154},[4882],{"type":52,"value":4573},{"type":47,"tag":126,"props":4884,"children":4885},{"style":160},[4886],{"type":52,"value":163},{"type":47,"tag":126,"props":4888,"children":4889},{"style":154},[4890],{"type":52,"value":4651},{"type":47,"tag":126,"props":4892,"children":4893},{"style":186},[4894],{"type":52,"value":4895},"[",{"type":47,"tag":126,"props":4897,"children":4898},{"style":4000},[4899],{"type":52,"value":4900},"49",{"type":47,"tag":126,"props":4902,"children":4903},{"style":186},[4904],{"type":52,"value":4905},"]",{"type":47,"tag":126,"props":4907,"children":4908},{"style":160},[4909],{"type":52,"value":163},{"type":47,"tag":126,"props":4911,"children":4912},{"style":154},[4913],{"type":52,"value":3371},{"type":47,"tag":126,"props":4915,"children":4916},{"style":160},[4917],{"type":52,"value":447},{"type":47,"tag":126,"props":4919,"children":4920},{"class":128,"line":883},[4921],{"type":47,"tag":126,"props":4922,"children":4923},{"style":160},[4924],{"type":52,"value":626},{"type":47,"tag":126,"props":4926,"children":4927},{"class":128,"line":967},[4928],{"type":47,"tag":126,"props":4929,"children":4930},{"style":160},[4931],{"type":52,"value":2848},{"type":47,"tag":126,"props":4933,"children":4934},{"class":128,"line":1051},[4935],{"type":47,"tag":126,"props":4936,"children":4937},{"emptyLinePlaceholder":645},[4938],{"type":52,"value":648},{"type":47,"tag":126,"props":4940,"children":4941},{"class":128,"line":1135},[4942,4946,4950,4954,4958,4962,4966,4971,4975,4979,4983,4987],{"type":47,"tag":126,"props":4943,"children":4944},{"style":143},[4945],{"type":52,"value":1504},{"type":47,"tag":126,"props":4947,"children":4948},{"style":154},[4949],{"type":52,"value":292},{"type":47,"tag":126,"props":4951,"children":4952},{"style":160},[4953],{"type":52,"value":163},{"type":47,"tag":126,"props":4955,"children":4956},{"style":166},[4957],{"type":52,"value":379},{"type":47,"tag":126,"props":4959,"children":4960},{"style":154},[4961],{"type":52,"value":329},{"type":47,"tag":126,"props":4963,"children":4964},{"style":160},[4965],{"type":52,"value":210},{"type":47,"tag":126,"props":4967,"children":4968},{"style":202},[4969],{"type":52,"value":4970},"process-products",{"type":47,"tag":126,"props":4972,"children":4973},{"style":160},[4974],{"type":52,"value":210},{"type":47,"tag":126,"props":4976,"children":4977},{"style":160},[4978],{"type":52,"value":215},{"type":47,"tag":126,"props":4980,"children":4981},{"style":160},[4982],{"type":52,"value":404},{"type":47,"tag":126,"props":4984,"children":4985},{"style":278},[4986],{"type":52,"value":302},{"type":47,"tag":126,"props":4988,"children":4989},{"style":160},[4990],{"type":52,"value":307},{"type":47,"tag":126,"props":4992,"children":4993},{"class":128,"line":1143},[4994,4998,5003,5007,5012,5016],{"type":47,"tag":126,"props":4995,"children":4996},{"style":143},[4997],{"type":52,"value":1328},{"type":47,"tag":126,"props":4999,"children":5000},{"style":166},[5001],{"type":52,"value":5002}," processAllProducts",{"type":47,"tag":126,"props":5004,"children":5005},{"style":186},[5006],{"type":52,"value":329},{"type":47,"tag":126,"props":5008,"children":5009},{"style":154},[5010],{"type":52,"value":5011},"allProducts",{"type":47,"tag":126,"props":5013,"children":5014},{"style":186},[5015],{"type":52,"value":347},{"type":47,"tag":126,"props":5017,"children":5018},{"style":160},[5019],{"type":52,"value":447},{"type":47,"tag":126,"props":5021,"children":5022},{"class":128,"line":4217},[5023,5027,5031],{"type":47,"tag":126,"props":5024,"children":5025},{"style":160},[5026],{"type":52,"value":1349},{"type":47,"tag":126,"props":5028,"children":5029},{"style":154},[5030],{"type":52,"value":347},{"type":47,"tag":126,"props":5032,"children":5033},{"style":160},[5034],{"type":52,"value":447},{"type":47,"tag":2900,"props":5036,"children":5038},{"id":5037},"parallel-execution",[5039],{"type":52,"value":5040},"Parallel Execution",{"type":47,"tag":55,"props":5042,"children":5043},{},[5044,5046],{"type":52,"value":5045},"Use Promise.all for parallel steps. ",{"type":47,"tag":68,"props":5047,"children":5048},{},[5049],{"type":52,"value":5050},"In v4, parallel step execution is optimized by default",{"type":47,"tag":114,"props":5052,"children":5054},{"className":116,"code":5053,"language":118,"meta":119,"style":119},"\u002F\u002F Create steps without awaiting\nconst sendEmail = step.run(\"send-email\", async () => {\n  return await sendWelcomeEmail(user.email);\n});\n\nconst updateCRM = step.run(\"update-crm\", async () => {\n  return await crmService.addUser(user);\n});\n\nconst createSubscription = step.run(\"create-subscription\", async () => {\n  return await subscriptionService.create(user.id);\n});\n\n\u002F\u002F Run all in parallel\nconst [emailId, crmRecord, subscription] = await Promise.all([\n  sendEmail,\n  updateCRM,\n  createSubscription\n]);\n\n\u002F\u002F Parallel steps are optimized by default in v4\nexport default inngest.createFunction(\n  {\n    id: \"parallel-heavy-function\",\n    triggers: [{ event: \"process\u002Fbatch\" }]\n  },\n  async ({ event, step }) => {\n    const results = await Promise.all(\n      event.data.items.map((item, i) =>\n        step.run(`process-item-${i}`, () => processItem(item))\n      )\n    );\n  }\n);\n\n\u002F\u002F ⚠️ Promise.race() behavior with v4's optimized parallelism:\n\u002F\u002F All promises settle before race resolves. Use group.parallel() for true race:\nconst winner = await group.parallel(async () => {\n  return Promise.race([\n    step.run(\"fast-service\", () => callFastService()),\n    step.run(\"slow-service\", () => callSlowService())\n  ]);\n});\n\n\u002F\u002F To disable optimized parallelism if needed:\n\u002F\u002F At the client level: new Inngest({ id: \"app\", optimizeParallelism: false })\n\u002F\u002F At the function level: { id: \"fn\", optimizeParallelism: false, triggers: [...] }\n",[5055],{"type":47,"tag":122,"props":5056,"children":5057},{"__ignoreMap":119},[5058,5066,5131,5171,5186,5193,5258,5299,5314,5321,5386,5435,5450,5457,5465,5531,5543,5555,5563,5574,5581,5589,5616,5624,5653,5703,5711,5746,5784,5850,5926,5935,5948,5956,5968,5976,5985,5994,6049,6074,6134,6189,6202,6218,6226,6235,6244],{"type":47,"tag":126,"props":5059,"children":5060},{"class":128,"line":129},[5061],{"type":47,"tag":126,"props":5062,"children":5063},{"style":133},[5064],{"type":52,"value":5065},"\u002F\u002F Create steps without awaiting\n",{"type":47,"tag":126,"props":5067,"children":5068},{"class":128,"line":139},[5069,5073,5078,5082,5086,5090,5094,5098,5102,5107,5111,5115,5119,5123,5127],{"type":47,"tag":126,"props":5070,"children":5071},{"style":278},[5072],{"type":52,"value":1193},{"type":47,"tag":126,"props":5074,"children":5075},{"style":154},[5076],{"type":52,"value":5077}," sendEmail ",{"type":47,"tag":126,"props":5079,"children":5080},{"style":160},[5081],{"type":52,"value":1203},{"type":47,"tag":126,"props":5083,"children":5084},{"style":154},[5085],{"type":52,"value":292},{"type":47,"tag":126,"props":5087,"children":5088},{"style":160},[5089],{"type":52,"value":163},{"type":47,"tag":126,"props":5091,"children":5092},{"style":166},[5093],{"type":52,"value":379},{"type":47,"tag":126,"props":5095,"children":5096},{"style":154},[5097],{"type":52,"value":329},{"type":47,"tag":126,"props":5099,"children":5100},{"style":160},[5101],{"type":52,"value":210},{"type":47,"tag":126,"props":5103,"children":5104},{"style":202},[5105],{"type":52,"value":5106},"send-email",{"type":47,"tag":126,"props":5108,"children":5109},{"style":160},[5110],{"type":52,"value":210},{"type":47,"tag":126,"props":5112,"children":5113},{"style":160},[5114],{"type":52,"value":215},{"type":47,"tag":126,"props":5116,"children":5117},{"style":278},[5118],{"type":52,"value":1246},{"type":47,"tag":126,"props":5120,"children":5121},{"style":160},[5122],{"type":52,"value":404},{"type":47,"tag":126,"props":5124,"children":5125},{"style":278},[5126],{"type":52,"value":302},{"type":47,"tag":126,"props":5128,"children":5129},{"style":160},[5130],{"type":52,"value":307},{"type":47,"tag":126,"props":5132,"children":5133},{"class":128,"line":177},[5134,5138,5142,5147,5151,5155,5159,5163,5167],{"type":47,"tag":126,"props":5135,"children":5136},{"style":143},[5137],{"type":52,"value":1328},{"type":47,"tag":126,"props":5139,"children":5140},{"style":143},[5141],{"type":52,"value":1208},{"type":47,"tag":126,"props":5143,"children":5144},{"style":166},[5145],{"type":52,"value":5146}," sendWelcomeEmail",{"type":47,"tag":126,"props":5148,"children":5149},{"style":186},[5150],{"type":52,"value":329},{"type":47,"tag":126,"props":5152,"children":5153},{"style":154},[5154],{"type":52,"value":1294},{"type":47,"tag":126,"props":5156,"children":5157},{"style":160},[5158],{"type":52,"value":163},{"type":47,"tag":126,"props":5160,"children":5161},{"style":154},[5162],{"type":52,"value":1583},{"type":47,"tag":126,"props":5164,"children":5165},{"style":186},[5166],{"type":52,"value":347},{"type":47,"tag":126,"props":5168,"children":5169},{"style":160},[5170],{"type":52,"value":447},{"type":47,"tag":126,"props":5172,"children":5173},{"class":128,"line":274},[5174,5178,5182],{"type":47,"tag":126,"props":5175,"children":5176},{"style":160},[5177],{"type":52,"value":1349},{"type":47,"tag":126,"props":5179,"children":5180},{"style":154},[5181],{"type":52,"value":347},{"type":47,"tag":126,"props":5183,"children":5184},{"style":160},[5185],{"type":52,"value":447},{"type":47,"tag":126,"props":5187,"children":5188},{"class":128,"line":27},[5189],{"type":47,"tag":126,"props":5190,"children":5191},{"emptyLinePlaceholder":645},[5192],{"type":52,"value":648},{"type":47,"tag":126,"props":5194,"children":5195},{"class":128,"line":360},[5196,5200,5205,5209,5213,5217,5221,5225,5229,5234,5238,5242,5246,5250,5254],{"type":47,"tag":126,"props":5197,"children":5198},{"style":278},[5199],{"type":52,"value":1193},{"type":47,"tag":126,"props":5201,"children":5202},{"style":154},[5203],{"type":52,"value":5204}," updateCRM ",{"type":47,"tag":126,"props":5206,"children":5207},{"style":160},[5208],{"type":52,"value":1203},{"type":47,"tag":126,"props":5210,"children":5211},{"style":154},[5212],{"type":52,"value":292},{"type":47,"tag":126,"props":5214,"children":5215},{"style":160},[5216],{"type":52,"value":163},{"type":47,"tag":126,"props":5218,"children":5219},{"style":166},[5220],{"type":52,"value":379},{"type":47,"tag":126,"props":5222,"children":5223},{"style":154},[5224],{"type":52,"value":329},{"type":47,"tag":126,"props":5226,"children":5227},{"style":160},[5228],{"type":52,"value":210},{"type":47,"tag":126,"props":5230,"children":5231},{"style":202},[5232],{"type":52,"value":5233},"update-crm",{"type":47,"tag":126,"props":5235,"children":5236},{"style":160},[5237],{"type":52,"value":210},{"type":47,"tag":126,"props":5239,"children":5240},{"style":160},[5241],{"type":52,"value":215},{"type":47,"tag":126,"props":5243,"children":5244},{"style":278},[5245],{"type":52,"value":1246},{"type":47,"tag":126,"props":5247,"children":5248},{"style":160},[5249],{"type":52,"value":404},{"type":47,"tag":126,"props":5251,"children":5252},{"style":278},[5253],{"type":52,"value":302},{"type":47,"tag":126,"props":5255,"children":5256},{"style":160},[5257],{"type":52,"value":307},{"type":47,"tag":126,"props":5259,"children":5260},{"class":128,"line":450},[5261,5265,5269,5274,5278,5283,5287,5291,5295],{"type":47,"tag":126,"props":5262,"children":5263},{"style":143},[5264],{"type":52,"value":1328},{"type":47,"tag":126,"props":5266,"children":5267},{"style":143},[5268],{"type":52,"value":1208},{"type":47,"tag":126,"props":5270,"children":5271},{"style":154},[5272],{"type":52,"value":5273}," crmService",{"type":47,"tag":126,"props":5275,"children":5276},{"style":160},[5277],{"type":52,"value":163},{"type":47,"tag":126,"props":5279,"children":5280},{"style":166},[5281],{"type":52,"value":5282},"addUser",{"type":47,"tag":126,"props":5284,"children":5285},{"style":186},[5286],{"type":52,"value":329},{"type":47,"tag":126,"props":5288,"children":5289},{"style":154},[5290],{"type":52,"value":1294},{"type":47,"tag":126,"props":5292,"children":5293},{"style":186},[5294],{"type":52,"value":347},{"type":47,"tag":126,"props":5296,"children":5297},{"style":160},[5298],{"type":52,"value":447},{"type":47,"tag":126,"props":5300,"children":5301},{"class":128,"line":535},[5302,5306,5310],{"type":47,"tag":126,"props":5303,"children":5304},{"style":160},[5305],{"type":52,"value":1349},{"type":47,"tag":126,"props":5307,"children":5308},{"style":154},[5309],{"type":52,"value":347},{"type":47,"tag":126,"props":5311,"children":5312},{"style":160},[5313],{"type":52,"value":447},{"type":47,"tag":126,"props":5315,"children":5316},{"class":128,"line":620},[5317],{"type":47,"tag":126,"props":5318,"children":5319},{"emptyLinePlaceholder":645},[5320],{"type":52,"value":648},{"type":47,"tag":126,"props":5322,"children":5323},{"class":128,"line":629},[5324,5328,5333,5337,5341,5345,5349,5353,5357,5362,5366,5370,5374,5378,5382],{"type":47,"tag":126,"props":5325,"children":5326},{"style":278},[5327],{"type":52,"value":1193},{"type":47,"tag":126,"props":5329,"children":5330},{"style":154},[5331],{"type":52,"value":5332}," createSubscription ",{"type":47,"tag":126,"props":5334,"children":5335},{"style":160},[5336],{"type":52,"value":1203},{"type":47,"tag":126,"props":5338,"children":5339},{"style":154},[5340],{"type":52,"value":292},{"type":47,"tag":126,"props":5342,"children":5343},{"style":160},[5344],{"type":52,"value":163},{"type":47,"tag":126,"props":5346,"children":5347},{"style":166},[5348],{"type":52,"value":379},{"type":47,"tag":126,"props":5350,"children":5351},{"style":154},[5352],{"type":52,"value":329},{"type":47,"tag":126,"props":5354,"children":5355},{"style":160},[5356],{"type":52,"value":210},{"type":47,"tag":126,"props":5358,"children":5359},{"style":202},[5360],{"type":52,"value":5361},"create-subscription",{"type":47,"tag":126,"props":5363,"children":5364},{"style":160},[5365],{"type":52,"value":210},{"type":47,"tag":126,"props":5367,"children":5368},{"style":160},[5369],{"type":52,"value":215},{"type":47,"tag":126,"props":5371,"children":5372},{"style":278},[5373],{"type":52,"value":1246},{"type":47,"tag":126,"props":5375,"children":5376},{"style":160},[5377],{"type":52,"value":404},{"type":47,"tag":126,"props":5379,"children":5380},{"style":278},[5381],{"type":52,"value":302},{"type":47,"tag":126,"props":5383,"children":5384},{"style":160},[5385],{"type":52,"value":307},{"type":47,"tag":126,"props":5387,"children":5388},{"class":128,"line":641},[5389,5393,5397,5402,5406,5411,5415,5419,5423,5427,5431],{"type":47,"tag":126,"props":5390,"children":5391},{"style":143},[5392],{"type":52,"value":1328},{"type":47,"tag":126,"props":5394,"children":5395},{"style":143},[5396],{"type":52,"value":1208},{"type":47,"tag":126,"props":5398,"children":5399},{"style":154},[5400],{"type":52,"value":5401}," subscriptionService",{"type":47,"tag":126,"props":5403,"children":5404},{"style":160},[5405],{"type":52,"value":163},{"type":47,"tag":126,"props":5407,"children":5408},{"style":166},[5409],{"type":52,"value":5410},"create",{"type":47,"tag":126,"props":5412,"children":5413},{"style":186},[5414],{"type":52,"value":329},{"type":47,"tag":126,"props":5416,"children":5417},{"style":154},[5418],{"type":52,"value":1294},{"type":47,"tag":126,"props":5420,"children":5421},{"style":160},[5422],{"type":52,"value":163},{"type":47,"tag":126,"props":5424,"children":5425},{"style":154},[5426],{"type":52,"value":3371},{"type":47,"tag":126,"props":5428,"children":5429},{"style":186},[5430],{"type":52,"value":347},{"type":47,"tag":126,"props":5432,"children":5433},{"style":160},[5434],{"type":52,"value":447},{"type":47,"tag":126,"props":5436,"children":5437},{"class":128,"line":651},[5438,5442,5446],{"type":47,"tag":126,"props":5439,"children":5440},{"style":160},[5441],{"type":52,"value":1349},{"type":47,"tag":126,"props":5443,"children":5444},{"style":154},[5445],{"type":52,"value":347},{"type":47,"tag":126,"props":5447,"children":5448},{"style":160},[5449],{"type":52,"value":447},{"type":47,"tag":126,"props":5451,"children":5452},{"class":128,"line":660},[5453],{"type":47,"tag":126,"props":5454,"children":5455},{"emptyLinePlaceholder":645},[5456],{"type":52,"value":648},{"type":47,"tag":126,"props":5458,"children":5459},{"class":128,"line":688},[5460],{"type":47,"tag":126,"props":5461,"children":5462},{"style":133},[5463],{"type":52,"value":5464},"\u002F\u002F Run all in parallel\n",{"type":47,"tag":126,"props":5466,"children":5467},{"class":128,"line":769},[5468,5472,5476,5481,5485,5490,5494,5499,5503,5507,5511,5517,5521,5526],{"type":47,"tag":126,"props":5469,"children":5470},{"style":278},[5471],{"type":52,"value":1193},{"type":47,"tag":126,"props":5473,"children":5474},{"style":160},[5475],{"type":52,"value":229},{"type":47,"tag":126,"props":5477,"children":5478},{"style":154},[5479],{"type":52,"value":5480},"emailId",{"type":47,"tag":126,"props":5482,"children":5483},{"style":160},[5484],{"type":52,"value":215},{"type":47,"tag":126,"props":5486,"children":5487},{"style":154},[5488],{"type":52,"value":5489}," crmRecord",{"type":47,"tag":126,"props":5491,"children":5492},{"style":160},[5493],{"type":52,"value":215},{"type":47,"tag":126,"props":5495,"children":5496},{"style":154},[5497],{"type":52,"value":5498}," subscription",{"type":47,"tag":126,"props":5500,"children":5501},{"style":160},[5502],{"type":52,"value":4905},{"type":47,"tag":126,"props":5504,"children":5505},{"style":160},[5506],{"type":52,"value":1276},{"type":47,"tag":126,"props":5508,"children":5509},{"style":143},[5510],{"type":52,"value":1208},{"type":47,"tag":126,"props":5512,"children":5514},{"style":5513},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[5515],{"type":52,"value":5516}," Promise",{"type":47,"tag":126,"props":5518,"children":5519},{"style":160},[5520],{"type":52,"value":163},{"type":47,"tag":126,"props":5522,"children":5523},{"style":166},[5524],{"type":52,"value":5525},"all",{"type":47,"tag":126,"props":5527,"children":5528},{"style":154},[5529],{"type":52,"value":5530},"([\n",{"type":47,"tag":126,"props":5532,"children":5533},{"class":128,"line":797},[5534,5539],{"type":47,"tag":126,"props":5535,"children":5536},{"style":154},[5537],{"type":52,"value":5538},"  sendEmail",{"type":47,"tag":126,"props":5540,"children":5541},{"style":160},[5542],{"type":52,"value":2457},{"type":47,"tag":126,"props":5544,"children":5545},{"class":128,"line":883},[5546,5551],{"type":47,"tag":126,"props":5547,"children":5548},{"style":154},[5549],{"type":52,"value":5550},"  updateCRM",{"type":47,"tag":126,"props":5552,"children":5553},{"style":160},[5554],{"type":52,"value":2457},{"type":47,"tag":126,"props":5556,"children":5557},{"class":128,"line":967},[5558],{"type":47,"tag":126,"props":5559,"children":5560},{"style":154},[5561],{"type":52,"value":5562},"  createSubscription\n",{"type":47,"tag":126,"props":5564,"children":5565},{"class":128,"line":1051},[5566,5570],{"type":47,"tag":126,"props":5567,"children":5568},{"style":154},[5569],{"type":52,"value":3618},{"type":47,"tag":126,"props":5571,"children":5572},{"style":160},[5573],{"type":52,"value":447},{"type":47,"tag":126,"props":5575,"children":5576},{"class":128,"line":1135},[5577],{"type":47,"tag":126,"props":5578,"children":5579},{"emptyLinePlaceholder":645},[5580],{"type":52,"value":648},{"type":47,"tag":126,"props":5582,"children":5583},{"class":128,"line":1143},[5584],{"type":47,"tag":126,"props":5585,"children":5586},{"style":133},[5587],{"type":52,"value":5588},"\u002F\u002F Parallel steps are optimized by default in v4\n",{"type":47,"tag":126,"props":5590,"children":5591},{"class":128,"line":4217},[5592,5596,5600,5604,5608,5612],{"type":47,"tag":126,"props":5593,"children":5594},{"style":143},[5595],{"type":52,"value":146},{"type":47,"tag":126,"props":5597,"children":5598},{"style":143},[5599],{"type":52,"value":151},{"type":47,"tag":126,"props":5601,"children":5602},{"style":154},[5603],{"type":52,"value":157},{"type":47,"tag":126,"props":5605,"children":5606},{"style":160},[5607],{"type":52,"value":163},{"type":47,"tag":126,"props":5609,"children":5610},{"style":166},[5611],{"type":52,"value":169},{"type":47,"tag":126,"props":5613,"children":5614},{"style":154},[5615],{"type":52,"value":174},{"type":47,"tag":126,"props":5617,"children":5618},{"class":128,"line":4233},[5619],{"type":47,"tag":126,"props":5620,"children":5621},{"style":160},[5622],{"type":52,"value":5623},"  {\n",{"type":47,"tag":126,"props":5625,"children":5626},{"class":128,"line":4241},[5627,5632,5636,5640,5645,5649],{"type":47,"tag":126,"props":5628,"children":5629},{"style":186},[5630],{"type":52,"value":5631},"    id",{"type":47,"tag":126,"props":5633,"children":5634},{"style":160},[5635],{"type":52,"value":194},{"type":47,"tag":126,"props":5637,"children":5638},{"style":160},[5639],{"type":52,"value":199},{"type":47,"tag":126,"props":5641,"children":5642},{"style":202},[5643],{"type":52,"value":5644},"parallel-heavy-function",{"type":47,"tag":126,"props":5646,"children":5647},{"style":160},[5648],{"type":52,"value":210},{"type":47,"tag":126,"props":5650,"children":5651},{"style":160},[5652],{"type":52,"value":2457},{"type":47,"tag":126,"props":5654,"children":5655},{"class":128,"line":4298},[5656,5661,5665,5669,5673,5677,5681,5685,5690,5694,5698],{"type":47,"tag":126,"props":5657,"children":5658},{"style":186},[5659],{"type":52,"value":5660},"    triggers",{"type":47,"tag":126,"props":5662,"children":5663},{"style":160},[5664],{"type":52,"value":194},{"type":47,"tag":126,"props":5666,"children":5667},{"style":154},[5668],{"type":52,"value":229},{"type":47,"tag":126,"props":5670,"children":5671},{"style":160},[5672],{"type":52,"value":234},{"type":47,"tag":126,"props":5674,"children":5675},{"style":186},[5676],{"type":52,"value":239},{"type":47,"tag":126,"props":5678,"children":5679},{"style":160},[5680],{"type":52,"value":194},{"type":47,"tag":126,"props":5682,"children":5683},{"style":160},[5684],{"type":52,"value":199},{"type":47,"tag":126,"props":5686,"children":5687},{"style":202},[5688],{"type":52,"value":5689},"process\u002Fbatch",{"type":47,"tag":126,"props":5691,"children":5692},{"style":160},[5693],{"type":52,"value":210},{"type":47,"tag":126,"props":5695,"children":5696},{"style":160},[5697],{"type":52,"value":261},{"type":47,"tag":126,"props":5699,"children":5700},{"style":154},[5701],{"type":52,"value":5702},"]\n",{"type":47,"tag":126,"props":5704,"children":5705},{"class":128,"line":23},[5706],{"type":47,"tag":126,"props":5707,"children":5708},{"style":160},[5709],{"type":52,"value":5710},"  },\n",{"type":47,"tag":126,"props":5712,"children":5713},{"class":128,"line":4360},[5714,5718,5722,5726,5730,5734,5738,5742],{"type":47,"tag":126,"props":5715,"children":5716},{"style":278},[5717],{"type":52,"value":281},{"type":47,"tag":126,"props":5719,"children":5720},{"style":160},[5721],{"type":52,"value":286},{"type":47,"tag":126,"props":5723,"children":5724},{"style":289},[5725],{"type":52,"value":239},{"type":47,"tag":126,"props":5727,"children":5728},{"style":160},[5729],{"type":52,"value":215},{"type":47,"tag":126,"props":5731,"children":5732},{"style":289},[5733],{"type":52,"value":292},{"type":47,"tag":126,"props":5735,"children":5736},{"style":160},[5737],{"type":52,"value":297},{"type":47,"tag":126,"props":5739,"children":5740},{"style":278},[5741],{"type":52,"value":302},{"type":47,"tag":126,"props":5743,"children":5744},{"style":160},[5745],{"type":52,"value":307},{"type":47,"tag":126,"props":5747,"children":5749},{"class":128,"line":5748},28,[5750,5755,5760,5764,5768,5772,5776,5780],{"type":47,"tag":126,"props":5751,"children":5752},{"style":278},[5753],{"type":52,"value":5754},"    const",{"type":47,"tag":126,"props":5756,"children":5757},{"style":154},[5758],{"type":52,"value":5759}," results",{"type":47,"tag":126,"props":5761,"children":5762},{"style":160},[5763],{"type":52,"value":1276},{"type":47,"tag":126,"props":5765,"children":5766},{"style":143},[5767],{"type":52,"value":1208},{"type":47,"tag":126,"props":5769,"children":5770},{"style":5513},[5771],{"type":52,"value":5516},{"type":47,"tag":126,"props":5773,"children":5774},{"style":160},[5775],{"type":52,"value":163},{"type":47,"tag":126,"props":5777,"children":5778},{"style":166},[5779],{"type":52,"value":5525},{"type":47,"tag":126,"props":5781,"children":5782},{"style":186},[5783],{"type":52,"value":174},{"type":47,"tag":126,"props":5785,"children":5787},{"class":128,"line":5786},29,[5788,5793,5797,5801,5805,5810,5814,5819,5823,5827,5832,5836,5841,5845],{"type":47,"tag":126,"props":5789,"children":5790},{"style":154},[5791],{"type":52,"value":5792},"      event",{"type":47,"tag":126,"props":5794,"children":5795},{"style":160},[5796],{"type":52,"value":163},{"type":47,"tag":126,"props":5798,"children":5799},{"style":154},[5800],{"type":52,"value":2252},{"type":47,"tag":126,"props":5802,"children":5803},{"style":160},[5804],{"type":52,"value":163},{"type":47,"tag":126,"props":5806,"children":5807},{"style":154},[5808],{"type":52,"value":5809},"items",{"type":47,"tag":126,"props":5811,"children":5812},{"style":160},[5813],{"type":52,"value":163},{"type":47,"tag":126,"props":5815,"children":5816},{"style":166},[5817],{"type":52,"value":5818},"map",{"type":47,"tag":126,"props":5820,"children":5821},{"style":186},[5822],{"type":52,"value":329},{"type":47,"tag":126,"props":5824,"children":5825},{"style":160},[5826],{"type":52,"value":329},{"type":47,"tag":126,"props":5828,"children":5829},{"style":289},[5830],{"type":52,"value":5831},"item",{"type":47,"tag":126,"props":5833,"children":5834},{"style":160},[5835],{"type":52,"value":215},{"type":47,"tag":126,"props":5837,"children":5838},{"style":289},[5839],{"type":52,"value":5840}," i",{"type":47,"tag":126,"props":5842,"children":5843},{"style":160},[5844],{"type":52,"value":347},{"type":47,"tag":126,"props":5846,"children":5847},{"style":278},[5848],{"type":52,"value":5849}," =>\n",{"type":47,"tag":126,"props":5851,"children":5853},{"class":128,"line":5852},30,[5854,5859,5863,5867,5871,5876,5881,5886,5891,5896,5900,5904,5908,5913,5917,5921],{"type":47,"tag":126,"props":5855,"children":5856},{"style":154},[5857],{"type":52,"value":5858},"        step",{"type":47,"tag":126,"props":5860,"children":5861},{"style":160},[5862],{"type":52,"value":163},{"type":47,"tag":126,"props":5864,"children":5865},{"style":166},[5866],{"type":52,"value":379},{"type":47,"tag":126,"props":5868,"children":5869},{"style":186},[5870],{"type":52,"value":329},{"type":47,"tag":126,"props":5872,"children":5873},{"style":160},[5874],{"type":52,"value":5875},"`",{"type":47,"tag":126,"props":5877,"children":5878},{"style":202},[5879],{"type":52,"value":5880},"process-item-",{"type":47,"tag":126,"props":5882,"children":5883},{"style":160},[5884],{"type":52,"value":5885},"${",{"type":47,"tag":126,"props":5887,"children":5888},{"style":154},[5889],{"type":52,"value":5890},"i",{"type":47,"tag":126,"props":5892,"children":5893},{"style":160},[5894],{"type":52,"value":5895},"}`",{"type":47,"tag":126,"props":5897,"children":5898},{"style":160},[5899],{"type":52,"value":215},{"type":47,"tag":126,"props":5901,"children":5902},{"style":160},[5903],{"type":52,"value":404},{"type":47,"tag":126,"props":5905,"children":5906},{"style":278},[5907],{"type":52,"value":302},{"type":47,"tag":126,"props":5909,"children":5910},{"style":166},[5911],{"type":52,"value":5912}," processItem",{"type":47,"tag":126,"props":5914,"children":5915},{"style":186},[5916],{"type":52,"value":329},{"type":47,"tag":126,"props":5918,"children":5919},{"style":154},[5920],{"type":52,"value":5831},{"type":47,"tag":126,"props":5922,"children":5923},{"style":186},[5924],{"type":52,"value":5925},"))\n",{"type":47,"tag":126,"props":5927,"children":5929},{"class":128,"line":5928},31,[5930],{"type":47,"tag":126,"props":5931,"children":5932},{"style":186},[5933],{"type":52,"value":5934},"      )\n",{"type":47,"tag":126,"props":5936,"children":5938},{"class":128,"line":5937},32,[5939,5944],{"type":47,"tag":126,"props":5940,"children":5941},{"style":186},[5942],{"type":52,"value":5943},"    )",{"type":47,"tag":126,"props":5945,"children":5946},{"style":160},[5947],{"type":52,"value":447},{"type":47,"tag":126,"props":5949,"children":5951},{"class":128,"line":5950},33,[5952],{"type":47,"tag":126,"props":5953,"children":5954},{"style":160},[5955],{"type":52,"value":626},{"type":47,"tag":126,"props":5957,"children":5959},{"class":128,"line":5958},34,[5960,5964],{"type":47,"tag":126,"props":5961,"children":5962},{"style":154},[5963],{"type":52,"value":347},{"type":47,"tag":126,"props":5965,"children":5966},{"style":160},[5967],{"type":52,"value":447},{"type":47,"tag":126,"props":5969,"children":5971},{"class":128,"line":5970},35,[5972],{"type":47,"tag":126,"props":5973,"children":5974},{"emptyLinePlaceholder":645},[5975],{"type":52,"value":648},{"type":47,"tag":126,"props":5977,"children":5979},{"class":128,"line":5978},36,[5980],{"type":47,"tag":126,"props":5981,"children":5982},{"style":133},[5983],{"type":52,"value":5984},"\u002F\u002F ⚠️ Promise.race() behavior with v4's optimized parallelism:\n",{"type":47,"tag":126,"props":5986,"children":5988},{"class":128,"line":5987},37,[5989],{"type":47,"tag":126,"props":5990,"children":5991},{"style":133},[5992],{"type":52,"value":5993},"\u002F\u002F All promises settle before race resolves. Use group.parallel() for true race:\n",{"type":47,"tag":126,"props":5995,"children":5997},{"class":128,"line":5996},38,[5998,6002,6007,6011,6015,6020,6024,6029,6033,6037,6041,6045],{"type":47,"tag":126,"props":5999,"children":6000},{"style":278},[6001],{"type":52,"value":1193},{"type":47,"tag":126,"props":6003,"children":6004},{"style":154},[6005],{"type":52,"value":6006}," winner ",{"type":47,"tag":126,"props":6008,"children":6009},{"style":160},[6010],{"type":52,"value":1203},{"type":47,"tag":126,"props":6012,"children":6013},{"style":143},[6014],{"type":52,"value":1208},{"type":47,"tag":126,"props":6016,"children":6017},{"style":154},[6018],{"type":52,"value":6019}," group",{"type":47,"tag":126,"props":6021,"children":6022},{"style":160},[6023],{"type":52,"value":163},{"type":47,"tag":126,"props":6025,"children":6026},{"style":166},[6027],{"type":52,"value":6028},"parallel",{"type":47,"tag":126,"props":6030,"children":6031},{"style":154},[6032],{"type":52,"value":329},{"type":47,"tag":126,"props":6034,"children":6035},{"style":278},[6036],{"type":52,"value":2931},{"type":47,"tag":126,"props":6038,"children":6039},{"style":160},[6040],{"type":52,"value":404},{"type":47,"tag":126,"props":6042,"children":6043},{"style":278},[6044],{"type":52,"value":302},{"type":47,"tag":126,"props":6046,"children":6047},{"style":160},[6048],{"type":52,"value":307},{"type":47,"tag":126,"props":6050,"children":6052},{"class":128,"line":6051},39,[6053,6057,6061,6065,6070],{"type":47,"tag":126,"props":6054,"children":6055},{"style":143},[6056],{"type":52,"value":1328},{"type":47,"tag":126,"props":6058,"children":6059},{"style":5513},[6060],{"type":52,"value":5516},{"type":47,"tag":126,"props":6062,"children":6063},{"style":160},[6064],{"type":52,"value":163},{"type":47,"tag":126,"props":6066,"children":6067},{"style":166},[6068],{"type":52,"value":6069},"race",{"type":47,"tag":126,"props":6071,"children":6072},{"style":186},[6073],{"type":52,"value":5530},{"type":47,"tag":126,"props":6075,"children":6077},{"class":128,"line":6076},40,[6078,6083,6087,6091,6095,6099,6104,6108,6112,6116,6120,6125,6130],{"type":47,"tag":126,"props":6079,"children":6080},{"style":154},[6081],{"type":52,"value":6082},"    step",{"type":47,"tag":126,"props":6084,"children":6085},{"style":160},[6086],{"type":52,"value":163},{"type":47,"tag":126,"props":6088,"children":6089},{"style":166},[6090],{"type":52,"value":379},{"type":47,"tag":126,"props":6092,"children":6093},{"style":186},[6094],{"type":52,"value":329},{"type":47,"tag":126,"props":6096,"children":6097},{"style":160},[6098],{"type":52,"value":210},{"type":47,"tag":126,"props":6100,"children":6101},{"style":202},[6102],{"type":52,"value":6103},"fast-service",{"type":47,"tag":126,"props":6105,"children":6106},{"style":160},[6107],{"type":52,"value":210},{"type":47,"tag":126,"props":6109,"children":6110},{"style":160},[6111],{"type":52,"value":215},{"type":47,"tag":126,"props":6113,"children":6114},{"style":160},[6115],{"type":52,"value":404},{"type":47,"tag":126,"props":6117,"children":6118},{"style":278},[6119],{"type":52,"value":302},{"type":47,"tag":126,"props":6121,"children":6122},{"style":166},[6123],{"type":52,"value":6124}," callFastService",{"type":47,"tag":126,"props":6126,"children":6127},{"style":186},[6128],{"type":52,"value":6129},"())",{"type":47,"tag":126,"props":6131,"children":6132},{"style":160},[6133],{"type":52,"value":2457},{"type":47,"tag":126,"props":6135,"children":6137},{"class":128,"line":6136},41,[6138,6142,6146,6150,6154,6158,6163,6167,6171,6175,6179,6184],{"type":47,"tag":126,"props":6139,"children":6140},{"style":154},[6141],{"type":52,"value":6082},{"type":47,"tag":126,"props":6143,"children":6144},{"style":160},[6145],{"type":52,"value":163},{"type":47,"tag":126,"props":6147,"children":6148},{"style":166},[6149],{"type":52,"value":379},{"type":47,"tag":126,"props":6151,"children":6152},{"style":186},[6153],{"type":52,"value":329},{"type":47,"tag":126,"props":6155,"children":6156},{"style":160},[6157],{"type":52,"value":210},{"type":47,"tag":126,"props":6159,"children":6160},{"style":202},[6161],{"type":52,"value":6162},"slow-service",{"type":47,"tag":126,"props":6164,"children":6165},{"style":160},[6166],{"type":52,"value":210},{"type":47,"tag":126,"props":6168,"children":6169},{"style":160},[6170],{"type":52,"value":215},{"type":47,"tag":126,"props":6172,"children":6173},{"style":160},[6174],{"type":52,"value":404},{"type":47,"tag":126,"props":6176,"children":6177},{"style":278},[6178],{"type":52,"value":302},{"type":47,"tag":126,"props":6180,"children":6181},{"style":166},[6182],{"type":52,"value":6183}," callSlowService",{"type":47,"tag":126,"props":6185,"children":6186},{"style":186},[6187],{"type":52,"value":6188},"())\n",{"type":47,"tag":126,"props":6190,"children":6192},{"class":128,"line":6191},42,[6193,6198],{"type":47,"tag":126,"props":6194,"children":6195},{"style":186},[6196],{"type":52,"value":6197},"  ])",{"type":47,"tag":126,"props":6199,"children":6200},{"style":160},[6201],{"type":52,"value":447},{"type":47,"tag":126,"props":6203,"children":6205},{"class":128,"line":6204},43,[6206,6210,6214],{"type":47,"tag":126,"props":6207,"children":6208},{"style":160},[6209],{"type":52,"value":1349},{"type":47,"tag":126,"props":6211,"children":6212},{"style":154},[6213],{"type":52,"value":347},{"type":47,"tag":126,"props":6215,"children":6216},{"style":160},[6217],{"type":52,"value":447},{"type":47,"tag":126,"props":6219,"children":6221},{"class":128,"line":6220},44,[6222],{"type":47,"tag":126,"props":6223,"children":6224},{"emptyLinePlaceholder":645},[6225],{"type":52,"value":648},{"type":47,"tag":126,"props":6227,"children":6229},{"class":128,"line":6228},45,[6230],{"type":47,"tag":126,"props":6231,"children":6232},{"style":133},[6233],{"type":52,"value":6234},"\u002F\u002F To disable optimized parallelism if needed:\n",{"type":47,"tag":126,"props":6236,"children":6238},{"class":128,"line":6237},46,[6239],{"type":47,"tag":126,"props":6240,"children":6241},{"style":133},[6242],{"type":52,"value":6243},"\u002F\u002F At the client level: new Inngest({ id: \"app\", optimizeParallelism: false })\n",{"type":47,"tag":126,"props":6245,"children":6247},{"class":128,"line":6246},47,[6248],{"type":47,"tag":126,"props":6249,"children":6250},{"style":133},[6251],{"type":52,"value":6252},"\u002F\u002F At the function level: { id: \"fn\", optimizeParallelism: false, triggers: [...] }\n",{"type":47,"tag":55,"props":6254,"children":6255},{},[6256,6258,6263],{"type":52,"value":6257},"See ",{"type":47,"tag":68,"props":6259,"children":6260},{},[6261],{"type":52,"value":6262},"inngest-flow-control",{"type":52,"value":6264}," for concurrency and throttling options.",{"type":47,"tag":2900,"props":6266,"children":6268},{"id":6267},"chunking-jobs",[6269],{"type":52,"value":6270},"Chunking Jobs",{"type":47,"tag":55,"props":6272,"children":6273},{},[6274],{"type":52,"value":6275},"Perfect for batch processing with parallel steps.",{"type":47,"tag":114,"props":6277,"children":6279},{"className":116,"code":6278,"language":118,"meta":119,"style":119},"export default inngest.createFunction(\n  { id: \"process-large-dataset\", triggers: [{ event: \"data\u002Fprocess.large\" }] },\n  async ({ event, step }) => {\n    const chunks = chunkArray(event.data.items, 10);\n\n    \u002F\u002F Process chunks in parallel\n    const results = await Promise.all(\n      chunks.map((chunk, index) =>\n        step.run(`process-chunk-${index}`, () => processChunk(chunk))\n      )\n    );\n\n    \u002F\u002F Combine results\n    await step.run(\"combine-results\", () => {\n      return aggregateResults(results);\n    });\n  }\n);\n",[6280],{"type":47,"tag":122,"props":6281,"children":6282},{"__ignoreMap":119},[6283,6310,6391,6426,6488,6495,6503,6538,6584,6654,6661,6672,6679,6687,6739,6769,6785,6792],{"type":47,"tag":126,"props":6284,"children":6285},{"class":128,"line":129},[6286,6290,6294,6298,6302,6306],{"type":47,"tag":126,"props":6287,"children":6288},{"style":143},[6289],{"type":52,"value":146},{"type":47,"tag":126,"props":6291,"children":6292},{"style":143},[6293],{"type":52,"value":151},{"type":47,"tag":126,"props":6295,"children":6296},{"style":154},[6297],{"type":52,"value":157},{"type":47,"tag":126,"props":6299,"children":6300},{"style":160},[6301],{"type":52,"value":163},{"type":47,"tag":126,"props":6303,"children":6304},{"style":166},[6305],{"type":52,"value":169},{"type":47,"tag":126,"props":6307,"children":6308},{"style":154},[6309],{"type":52,"value":174},{"type":47,"tag":126,"props":6311,"children":6312},{"class":128,"line":139},[6313,6317,6321,6325,6329,6334,6338,6342,6346,6350,6354,6358,6362,6366,6370,6375,6379,6383,6387],{"type":47,"tag":126,"props":6314,"children":6315},{"style":160},[6316],{"type":52,"value":183},{"type":47,"tag":126,"props":6318,"children":6319},{"style":186},[6320],{"type":52,"value":189},{"type":47,"tag":126,"props":6322,"children":6323},{"style":160},[6324],{"type":52,"value":194},{"type":47,"tag":126,"props":6326,"children":6327},{"style":160},[6328],{"type":52,"value":199},{"type":47,"tag":126,"props":6330,"children":6331},{"style":202},[6332],{"type":52,"value":6333},"process-large-dataset",{"type":47,"tag":126,"props":6335,"children":6336},{"style":160},[6337],{"type":52,"value":210},{"type":47,"tag":126,"props":6339,"children":6340},{"style":160},[6341],{"type":52,"value":215},{"type":47,"tag":126,"props":6343,"children":6344},{"style":186},[6345],{"type":52,"value":220},{"type":47,"tag":126,"props":6347,"children":6348},{"style":160},[6349],{"type":52,"value":194},{"type":47,"tag":126,"props":6351,"children":6352},{"style":154},[6353],{"type":52,"value":229},{"type":47,"tag":126,"props":6355,"children":6356},{"style":160},[6357],{"type":52,"value":234},{"type":47,"tag":126,"props":6359,"children":6360},{"style":186},[6361],{"type":52,"value":239},{"type":47,"tag":126,"props":6363,"children":6364},{"style":160},[6365],{"type":52,"value":194},{"type":47,"tag":126,"props":6367,"children":6368},{"style":160},[6369],{"type":52,"value":199},{"type":47,"tag":126,"props":6371,"children":6372},{"style":202},[6373],{"type":52,"value":6374},"data\u002Fprocess.large",{"type":47,"tag":126,"props":6376,"children":6377},{"style":160},[6378],{"type":52,"value":210},{"type":47,"tag":126,"props":6380,"children":6381},{"style":160},[6382],{"type":52,"value":261},{"type":47,"tag":126,"props":6384,"children":6385},{"style":154},[6386],{"type":52,"value":266},{"type":47,"tag":126,"props":6388,"children":6389},{"style":160},[6390],{"type":52,"value":271},{"type":47,"tag":126,"props":6392,"children":6393},{"class":128,"line":177},[6394,6398,6402,6406,6410,6414,6418,6422],{"type":47,"tag":126,"props":6395,"children":6396},{"style":278},[6397],{"type":52,"value":281},{"type":47,"tag":126,"props":6399,"children":6400},{"style":160},[6401],{"type":52,"value":286},{"type":47,"tag":126,"props":6403,"children":6404},{"style":289},[6405],{"type":52,"value":239},{"type":47,"tag":126,"props":6407,"children":6408},{"style":160},[6409],{"type":52,"value":215},{"type":47,"tag":126,"props":6411,"children":6412},{"style":289},[6413],{"type":52,"value":292},{"type":47,"tag":126,"props":6415,"children":6416},{"style":160},[6417],{"type":52,"value":297},{"type":47,"tag":126,"props":6419,"children":6420},{"style":278},[6421],{"type":52,"value":302},{"type":47,"tag":126,"props":6423,"children":6424},{"style":160},[6425],{"type":52,"value":307},{"type":47,"tag":126,"props":6427,"children":6428},{"class":128,"line":274},[6429,6433,6438,6442,6447,6451,6455,6459,6463,6467,6471,6475,6480,6484],{"type":47,"tag":126,"props":6430,"children":6431},{"style":278},[6432],{"type":52,"value":5754},{"type":47,"tag":126,"props":6434,"children":6435},{"style":154},[6436],{"type":52,"value":6437}," chunks",{"type":47,"tag":126,"props":6439,"children":6440},{"style":160},[6441],{"type":52,"value":1276},{"type":47,"tag":126,"props":6443,"children":6444},{"style":166},[6445],{"type":52,"value":6446}," chunkArray",{"type":47,"tag":126,"props":6448,"children":6449},{"style":186},[6450],{"type":52,"value":329},{"type":47,"tag":126,"props":6452,"children":6453},{"style":154},[6454],{"type":52,"value":2916},{"type":47,"tag":126,"props":6456,"children":6457},{"style":160},[6458],{"type":52,"value":163},{"type":47,"tag":126,"props":6460,"children":6461},{"style":154},[6462],{"type":52,"value":2252},{"type":47,"tag":126,"props":6464,"children":6465},{"style":160},[6466],{"type":52,"value":163},{"type":47,"tag":126,"props":6468,"children":6469},{"style":154},[6470],{"type":52,"value":5809},{"type":47,"tag":126,"props":6472,"children":6473},{"style":160},[6474],{"type":52,"value":215},{"type":47,"tag":126,"props":6476,"children":6477},{"style":4000},[6478],{"type":52,"value":6479}," 10",{"type":47,"tag":126,"props":6481,"children":6482},{"style":186},[6483],{"type":52,"value":347},{"type":47,"tag":126,"props":6485,"children":6486},{"style":160},[6487],{"type":52,"value":447},{"type":47,"tag":126,"props":6489,"children":6490},{"class":128,"line":27},[6491],{"type":47,"tag":126,"props":6492,"children":6493},{"emptyLinePlaceholder":645},[6494],{"type":52,"value":648},{"type":47,"tag":126,"props":6496,"children":6497},{"class":128,"line":360},[6498],{"type":47,"tag":126,"props":6499,"children":6500},{"style":133},[6501],{"type":52,"value":6502},"    \u002F\u002F Process chunks in parallel\n",{"type":47,"tag":126,"props":6504,"children":6505},{"class":128,"line":450},[6506,6510,6514,6518,6522,6526,6530,6534],{"type":47,"tag":126,"props":6507,"children":6508},{"style":278},[6509],{"type":52,"value":5754},{"type":47,"tag":126,"props":6511,"children":6512},{"style":154},[6513],{"type":52,"value":5759},{"type":47,"tag":126,"props":6515,"children":6516},{"style":160},[6517],{"type":52,"value":1276},{"type":47,"tag":126,"props":6519,"children":6520},{"style":143},[6521],{"type":52,"value":1208},{"type":47,"tag":126,"props":6523,"children":6524},{"style":5513},[6525],{"type":52,"value":5516},{"type":47,"tag":126,"props":6527,"children":6528},{"style":160},[6529],{"type":52,"value":163},{"type":47,"tag":126,"props":6531,"children":6532},{"style":166},[6533],{"type":52,"value":5525},{"type":47,"tag":126,"props":6535,"children":6536},{"style":186},[6537],{"type":52,"value":174},{"type":47,"tag":126,"props":6539,"children":6540},{"class":128,"line":535},[6541,6546,6550,6554,6558,6562,6567,6571,6576,6580],{"type":47,"tag":126,"props":6542,"children":6543},{"style":154},[6544],{"type":52,"value":6545},"      chunks",{"type":47,"tag":126,"props":6547,"children":6548},{"style":160},[6549],{"type":52,"value":163},{"type":47,"tag":126,"props":6551,"children":6552},{"style":166},[6553],{"type":52,"value":5818},{"type":47,"tag":126,"props":6555,"children":6556},{"style":186},[6557],{"type":52,"value":329},{"type":47,"tag":126,"props":6559,"children":6560},{"style":160},[6561],{"type":52,"value":329},{"type":47,"tag":126,"props":6563,"children":6564},{"style":289},[6565],{"type":52,"value":6566},"chunk",{"type":47,"tag":126,"props":6568,"children":6569},{"style":160},[6570],{"type":52,"value":215},{"type":47,"tag":126,"props":6572,"children":6573},{"style":289},[6574],{"type":52,"value":6575}," index",{"type":47,"tag":126,"props":6577,"children":6578},{"style":160},[6579],{"type":52,"value":347},{"type":47,"tag":126,"props":6581,"children":6582},{"style":278},[6583],{"type":52,"value":5849},{"type":47,"tag":126,"props":6585,"children":6586},{"class":128,"line":620},[6587,6591,6595,6599,6603,6607,6612,6616,6621,6625,6629,6633,6637,6642,6646,6650],{"type":47,"tag":126,"props":6588,"children":6589},{"style":154},[6590],{"type":52,"value":5858},{"type":47,"tag":126,"props":6592,"children":6593},{"style":160},[6594],{"type":52,"value":163},{"type":47,"tag":126,"props":6596,"children":6597},{"style":166},[6598],{"type":52,"value":379},{"type":47,"tag":126,"props":6600,"children":6601},{"style":186},[6602],{"type":52,"value":329},{"type":47,"tag":126,"props":6604,"children":6605},{"style":160},[6606],{"type":52,"value":5875},{"type":47,"tag":126,"props":6608,"children":6609},{"style":202},[6610],{"type":52,"value":6611},"process-chunk-",{"type":47,"tag":126,"props":6613,"children":6614},{"style":160},[6615],{"type":52,"value":5885},{"type":47,"tag":126,"props":6617,"children":6618},{"style":154},[6619],{"type":52,"value":6620},"index",{"type":47,"tag":126,"props":6622,"children":6623},{"style":160},[6624],{"type":52,"value":5895},{"type":47,"tag":126,"props":6626,"children":6627},{"style":160},[6628],{"type":52,"value":215},{"type":47,"tag":126,"props":6630,"children":6631},{"style":160},[6632],{"type":52,"value":404},{"type":47,"tag":126,"props":6634,"children":6635},{"style":278},[6636],{"type":52,"value":302},{"type":47,"tag":126,"props":6638,"children":6639},{"style":166},[6640],{"type":52,"value":6641}," processChunk",{"type":47,"tag":126,"props":6643,"children":6644},{"style":186},[6645],{"type":52,"value":329},{"type":47,"tag":126,"props":6647,"children":6648},{"style":154},[6649],{"type":52,"value":6566},{"type":47,"tag":126,"props":6651,"children":6652},{"style":186},[6653],{"type":52,"value":5925},{"type":47,"tag":126,"props":6655,"children":6656},{"class":128,"line":629},[6657],{"type":47,"tag":126,"props":6658,"children":6659},{"style":186},[6660],{"type":52,"value":5934},{"type":47,"tag":126,"props":6662,"children":6663},{"class":128,"line":641},[6664,6668],{"type":47,"tag":126,"props":6665,"children":6666},{"style":186},[6667],{"type":52,"value":5943},{"type":47,"tag":126,"props":6669,"children":6670},{"style":160},[6671],{"type":52,"value":447},{"type":47,"tag":126,"props":6673,"children":6674},{"class":128,"line":651},[6675],{"type":47,"tag":126,"props":6676,"children":6677},{"emptyLinePlaceholder":645},[6678],{"type":52,"value":648},{"type":47,"tag":126,"props":6680,"children":6681},{"class":128,"line":660},[6682],{"type":47,"tag":126,"props":6683,"children":6684},{"style":133},[6685],{"type":52,"value":6686},"    \u002F\u002F Combine results\n",{"type":47,"tag":126,"props":6688,"children":6689},{"class":128,"line":688},[6690,6694,6698,6702,6706,6710,6714,6719,6723,6727,6731,6735],{"type":47,"tag":126,"props":6691,"children":6692},{"style":143},[6693],{"type":52,"value":366},{"type":47,"tag":126,"props":6695,"children":6696},{"style":154},[6697],{"type":52,"value":292},{"type":47,"tag":126,"props":6699,"children":6700},{"style":160},[6701],{"type":52,"value":163},{"type":47,"tag":126,"props":6703,"children":6704},{"style":166},[6705],{"type":52,"value":379},{"type":47,"tag":126,"props":6707,"children":6708},{"style":186},[6709],{"type":52,"value":329},{"type":47,"tag":126,"props":6711,"children":6712},{"style":160},[6713],{"type":52,"value":210},{"type":47,"tag":126,"props":6715,"children":6716},{"style":202},[6717],{"type":52,"value":6718},"combine-results",{"type":47,"tag":126,"props":6720,"children":6721},{"style":160},[6722],{"type":52,"value":210},{"type":47,"tag":126,"props":6724,"children":6725},{"style":160},[6726],{"type":52,"value":215},{"type":47,"tag":126,"props":6728,"children":6729},{"style":160},[6730],{"type":52,"value":404},{"type":47,"tag":126,"props":6732,"children":6733},{"style":278},[6734],{"type":52,"value":302},{"type":47,"tag":126,"props":6736,"children":6737},{"style":160},[6738],{"type":52,"value":307},{"type":47,"tag":126,"props":6740,"children":6741},{"class":128,"line":769},[6742,6747,6752,6756,6761,6765],{"type":47,"tag":126,"props":6743,"children":6744},{"style":143},[6745],{"type":52,"value":6746},"      return",{"type":47,"tag":126,"props":6748,"children":6749},{"style":166},[6750],{"type":52,"value":6751}," aggregateResults",{"type":47,"tag":126,"props":6753,"children":6754},{"style":186},[6755],{"type":52,"value":329},{"type":47,"tag":126,"props":6757,"children":6758},{"style":154},[6759],{"type":52,"value":6760},"results",{"type":47,"tag":126,"props":6762,"children":6763},{"style":186},[6764],{"type":52,"value":347},{"type":47,"tag":126,"props":6766,"children":6767},{"style":160},[6768],{"type":52,"value":447},{"type":47,"tag":126,"props":6770,"children":6771},{"class":128,"line":797},[6772,6777,6781],{"type":47,"tag":126,"props":6773,"children":6774},{"style":160},[6775],{"type":52,"value":6776},"    }",{"type":47,"tag":126,"props":6778,"children":6779},{"style":186},[6780],{"type":52,"value":347},{"type":47,"tag":126,"props":6782,"children":6783},{"style":160},[6784],{"type":52,"value":447},{"type":47,"tag":126,"props":6786,"children":6787},{"class":128,"line":883},[6788],{"type":47,"tag":126,"props":6789,"children":6790},{"style":160},[6791],{"type":52,"value":626},{"type":47,"tag":126,"props":6793,"children":6794},{"class":128,"line":967},[6795,6799],{"type":47,"tag":126,"props":6796,"children":6797},{"style":154},[6798],{"type":52,"value":347},{"type":47,"tag":126,"props":6800,"children":6801},{"style":160},[6802],{"type":52,"value":447},{"type":47,"tag":87,"props":6804,"children":6806},{"id":6805},"key-gotchas",[6807],{"type":52,"value":6808},"Key Gotchas",{"type":47,"tag":55,"props":6810,"children":6811},{},[6812,6817,6819,6824,6826,6831,6833,6838,6840,6846,6848,6853,6855,6860,6862,6868],{"type":47,"tag":68,"props":6813,"children":6814},{},[6815],{"type":52,"value":6816},"🔄 Function Re-execution:",{"type":52,"value":6818}," Code outside steps runs on every step execution\n",{"type":47,"tag":68,"props":6820,"children":6821},{},[6822],{"type":52,"value":6823},"⏰ Event Timing:",{"type":52,"value":6825}," waitForEvent only catches events sent AFTER the step runs\n",{"type":47,"tag":68,"props":6827,"children":6828},{},[6829],{"type":52,"value":6830},"🔢 Step Limits:",{"type":52,"value":6832}," Max 1,000 steps per function, 4MB per step output, 32MB per function run in total\n",{"type":47,"tag":68,"props":6834,"children":6835},{},[6836],{"type":52,"value":6837},"📨 HTTP Requests:",{"type":52,"value":6839}," Checkpointing is enabled by default in v4, reducing HTTP overhead. For serverless platforms, configure ",{"type":47,"tag":122,"props":6841,"children":6843},{"className":6842},[],[6844],{"type":52,"value":6845},"maxRuntime",{"type":52,"value":6847}," on the client\n",{"type":47,"tag":68,"props":6849,"children":6850},{},[6851],{"type":52,"value":6852},"🔁 Step IDs:",{"type":52,"value":6854}," Can be reused in loops - Inngest handles counters\n",{"type":47,"tag":68,"props":6856,"children":6857},{},[6858],{"type":52,"value":6859},"⚡ Parallelism:",{"type":52,"value":6861}," Use Promise.all for parallel steps (optimized by default in v4). Note that Promise.race() waits for all promises to settle — use ",{"type":47,"tag":122,"props":6863,"children":6865},{"className":6864},[],[6866],{"type":52,"value":6867},"group.parallel()",{"type":52,"value":6869}," for true race semantics",{"type":47,"tag":87,"props":6871,"children":6873},{"id":6872},"common-use-cases",[6874],{"type":52,"value":6875},"Common Use Cases",{"type":47,"tag":1633,"props":6877,"children":6878},{},[6879,6889,6899,6909,6919,6929],{"type":47,"tag":1637,"props":6880,"children":6881},{},[6882,6887],{"type":47,"tag":68,"props":6883,"children":6884},{},[6885],{"type":52,"value":6886},"Human-in-the-loop:",{"type":52,"value":6888}," waitForEvent + Realtime UI",{"type":47,"tag":1637,"props":6890,"children":6891},{},[6892,6897],{"type":47,"tag":68,"props":6893,"children":6894},{},[6895],{"type":52,"value":6896},"Multi-step onboarding:",{"type":52,"value":6898}," sleep between steps, waitForEvent for user actions",{"type":47,"tag":1637,"props":6900,"children":6901},{},[6902,6907],{"type":47,"tag":68,"props":6903,"children":6904},{},[6905],{"type":52,"value":6906},"Data processing:",{"type":52,"value":6908}," Parallel steps for chunked work",{"type":47,"tag":1637,"props":6910,"children":6911},{},[6912,6917],{"type":47,"tag":68,"props":6913,"children":6914},{},[6915],{"type":52,"value":6916},"External integrations:",{"type":52,"value":6918}," step.run for reliable API calls",{"type":47,"tag":1637,"props":6920,"children":6921},{},[6922,6927],{"type":47,"tag":68,"props":6923,"children":6924},{},[6925],{"type":52,"value":6926},"AI workflows:",{"type":52,"value":6928}," step.ai for durable LLM orchestration",{"type":47,"tag":1637,"props":6930,"children":6931},{},[6932,6937],{"type":47,"tag":68,"props":6933,"children":6934},{},[6935],{"type":52,"value":6936},"Function composition:",{"type":52,"value":6938}," step.invoke to build complex workflows",{"type":47,"tag":55,"props":6940,"children":6941},{},[6942],{"type":52,"value":6943},"Remember: Steps make your functions durable, observable, and debuggable. Embrace them!",{"type":47,"tag":6945,"props":6946,"children":6947},"style",{},[6948],{"type":52,"value":6949},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":6951,"total":688},[6952,6970,6983,6997,7010,7025,7040],{"slug":6953,"name":6953,"fn":6954,"description":6955,"org":6956,"tags":6957,"stars":23,"repoUrl":24,"updatedAt":6969},"inngest-agent-evals","build and debug Inngest agent evals","Use when building, migrating, or debugging Agent Evals on Inngest: scoring AI agent or workflow outcomes, deferred scorers, sessions, traces, step experiments, experiment variant attribution, Insights queries, or production eval loops for prompts, models, tools, providers, and agent behavior. Covers TypeScript SDK v4 scoring beta APIs, `scoreMiddleware`, `step.score`, `inngest.score`, `createScorer`, `defer`, `group.experiment`, `experimentRef`, `meta.sessions`, and when to use durable workflow primitives for outcome-based evaluation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6958,6961,6964,6965,6968],{"name":6959,"slug":6960,"type":15},"Agents","agents",{"name":6962,"slug":6963,"type":15},"Evals","evals",{"name":9,"slug":8,"type":15},{"name":6966,"slug":6967,"type":15},"Observability","observability",{"name":21,"slug":22,"type":15},"2026-07-12T07:36:51.711641",{"slug":6971,"name":6971,"fn":6972,"description":6973,"org":6974,"tags":6975,"stars":23,"repoUrl":24,"updatedAt":6982},"inngest-agents","build durable AI agent workflows","Use when building durable AI agents or agentic workflows with Inngest and AgentKit, including model calls, tool calls, multi-agent networks, human approval, realtime progress, provider rate limits, crash-safe execution, and Agent Evals handoff. Covers AgentKit, `step.ai`, `step.run`, `step.waitForEvent`, native realtime, and when to use lower-level Inngest primitives instead of an in-memory agent loop. Use `inngest-agent-evals` with this skill when the user wants scoring, sessions, experiments, deferred scorers, or outcome-based evaluation for the agent.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6976,6977,6978,6979],{"name":6959,"slug":6960,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"name":6980,"slug":6981,"type":15},"LLM","llm","2026-07-12T07:36:45.984181",{"slug":6984,"name":6984,"fn":6985,"description":6986,"org":6987,"tags":6988,"stars":23,"repoUrl":24,"updatedAt":6996},"inngest-api","interact with Inngest REST API","Use when the user explicitly asks for the Inngest REST API v2, raw HTTP, OpenAPI, API docs, API authentication, or an endpoint that the Inngest CLI does not expose. Covers api-docs.inngest.com, llms.txt, the OpenAPI v2 spec, Bearer authentication with API keys or signing keys, production and local base URLs, raw curl\u002Ffetch requests, request-shape discovery, pagination, secret redaction, and when to prefer the `inngest-api-cli` skill instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6989,6992,6995],{"name":6990,"slug":6991,"type":15},"API Development","api-development",{"name":6993,"slug":6994,"type":15},"REST API","rest-api",{"name":21,"slug":22,"type":15},"2026-07-12T07:36:39.364409",{"slug":6998,"name":6998,"fn":6999,"description":7000,"org":7001,"tags":7002,"stars":23,"repoUrl":24,"updatedAt":7009},"inngest-api-cli","operate Inngest API resources via CLI","Use when operating Inngest API resources from the terminal with `npx inngest-cli@latest api`: Cloud\u002Flocal run debugging, event-run lookup, function traces, function invocation, app syncs, webhooks, environments, keys, account checks, and Insights queries. Provides prescriptive command routing for agents: which CLI command to run for a run ID, event ID, app ID, function ID, Cloud environment, API key, missing ID, or potentially mutating operation. Use `inngest-cli` for dev server setup\u002Fgeneral CLI workflows and `inngest-api` only when raw REST API v2 docs or OpenAPI fallback are needed.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7003,7004,7005,7008],{"name":6990,"slug":6991,"type":15},{"name":13,"slug":14,"type":15},{"name":7006,"slug":7007,"type":15},"CLI","cli",{"name":9,"slug":8,"type":15},"2026-07-12T07:36:47.58183",{"slug":7011,"name":7011,"fn":7012,"description":7013,"org":7014,"tags":7015,"stars":23,"repoUrl":24,"updatedAt":7024},"inngest-brownfield-audit","audit codebases for Inngest integration","Use when analyzing an existing TypeScript or JavaScript codebase to decide where and how to introduce Inngest. Covers repository discovery, framework and package detection, finding durability gaps in HTTP handlers, webhooks, cron jobs, queues, long-running jobs, AI agents, Agent Evals, polling loops, eval loops, and side-effect-heavy code, then producing and implementing an incremental integration plan.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7016,7017,7020,7023],{"name":13,"slug":14,"type":15},{"name":7018,"slug":7019,"type":15},"Code Analysis","code-analysis",{"name":7021,"slug":7022,"type":15},"Engineering","engineering",{"name":9,"slug":8,"type":15},"2026-07-12T07:36:55.811247",{"slug":7026,"name":7026,"fn":7027,"description":7028,"org":7029,"tags":7030,"stars":23,"repoUrl":24,"updatedAt":7039},"inngest-cli","configure Inngest CLI and dev server","Use when installing or running the Inngest CLI and Dev Server for local development, local testing, serve endpoint debugging, Docker or Docker Compose setup, MCP configuration, self-hosted `inngest start`, or deployment workflow checks. Covers `inngest dev`, `inngest start`, auto-discovery, config files, environment variables, `@inngest\u002Ftest`, local event sending, platform gotchas, and production\u002Fself-hosted server flags.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7031,7032,7035,7036],{"name":7006,"slug":7007,"type":15},{"name":7033,"slug":7034,"type":15},"Docker","docker",{"name":9,"slug":8,"type":15},{"name":7037,"slug":7038,"type":15},"Local Development","local-development","2026-07-12T07:36:40.694652",{"slug":7041,"name":7041,"fn":7042,"description":7043,"org":7044,"tags":7045,"stars":23,"repoUrl":24,"updatedAt":7052},"inngest-durable-functions","build durable and retry-safe functions","Use when building functions that must survive process crashes, retry automatically on failure, run on a schedule, react to events, or maintain state across infrastructure failures — e.g., webhook handlers that drop events, flaky cron jobs, background jobs that fail mid-execution, or workflows that need to resume where they left off. Covers Inngest function configuration, triggers (events, cron, invoke), step execution and memoization, idempotency, cancellation, error handling, retries, logging, and observability.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7046,7047,7050,7051],{"name":13,"slug":14,"type":15},{"name":7048,"slug":7049,"type":15},"Backend","backend",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"2026-07-12T07:36:57.141023",{"items":7054,"total":688},[7055,7063,7070,7076,7083,7090,7097,7104,7116,7128,7144,7159],{"slug":6953,"name":6953,"fn":6954,"description":6955,"org":7056,"tags":7057,"stars":23,"repoUrl":24,"updatedAt":6969},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7058,7059,7060,7061,7062],{"name":6959,"slug":6960,"type":15},{"name":6962,"slug":6963,"type":15},{"name":9,"slug":8,"type":15},{"name":6966,"slug":6967,"type":15},{"name":21,"slug":22,"type":15},{"slug":6971,"name":6971,"fn":6972,"description":6973,"org":7064,"tags":7065,"stars":23,"repoUrl":24,"updatedAt":6982},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7066,7067,7068,7069],{"name":6959,"slug":6960,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"name":6980,"slug":6981,"type":15},{"slug":6984,"name":6984,"fn":6985,"description":6986,"org":7071,"tags":7072,"stars":23,"repoUrl":24,"updatedAt":6996},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7073,7074,7075],{"name":6990,"slug":6991,"type":15},{"name":6993,"slug":6994,"type":15},{"name":21,"slug":22,"type":15},{"slug":6998,"name":6998,"fn":6999,"description":7000,"org":7077,"tags":7078,"stars":23,"repoUrl":24,"updatedAt":7009},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7079,7080,7081,7082],{"name":6990,"slug":6991,"type":15},{"name":13,"slug":14,"type":15},{"name":7006,"slug":7007,"type":15},{"name":9,"slug":8,"type":15},{"slug":7011,"name":7011,"fn":7012,"description":7013,"org":7084,"tags":7085,"stars":23,"repoUrl":24,"updatedAt":7024},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7086,7087,7088,7089],{"name":13,"slug":14,"type":15},{"name":7018,"slug":7019,"type":15},{"name":7021,"slug":7022,"type":15},{"name":9,"slug":8,"type":15},{"slug":7026,"name":7026,"fn":7027,"description":7028,"org":7091,"tags":7092,"stars":23,"repoUrl":24,"updatedAt":7039},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7093,7094,7095,7096],{"name":7006,"slug":7007,"type":15},{"name":7033,"slug":7034,"type":15},{"name":9,"slug":8,"type":15},{"name":7037,"slug":7038,"type":15},{"slug":7041,"name":7041,"fn":7042,"description":7043,"org":7098,"tags":7099,"stars":23,"repoUrl":24,"updatedAt":7052},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7100,7101,7102,7103],{"name":13,"slug":14,"type":15},{"name":7048,"slug":7049,"type":15},{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},{"slug":7105,"name":7105,"fn":7106,"description":7107,"org":7108,"tags":7109,"stars":23,"repoUrl":24,"updatedAt":7115},"inngest-events","design event-driven workflows","Use when designing event-driven workflows, decoupling services, implementing fan-out patterns (one trigger, many downstream handlers), implementing idempotent event handling with IDs (24-hour dedupe window), or handling at-least-once delivery from external sources like Stripe webhooks. Covers Inngest event schema, payload format, naming conventions, IDs for idempotency, the ts param, fan-out patterns, and system events like inngest\u002Ffunction.failed.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7110,7113,7114],{"name":7111,"slug":7112,"type":15},"Data Pipeline","data-pipeline",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"2026-07-12T07:36:44.685364",{"slug":6262,"name":6262,"fn":7117,"description":7118,"org":7119,"tags":7120,"stars":23,"repoUrl":24,"updatedAt":7127},"manage API rate limits and load","Use when handling external API rate limits (e.g., OpenAI 429s, HubSpot or Stripe rate limits), preventing duplicate work from rapid event bursts (debouncing user actions), spreading load over time, ensuring per-tenant fairness, processing events in batches, limiting concurrent runs of the same operation, or assigning priority to important runs. Covers Inngest flow control: concurrency limits with keys, throttling, rate limiting, debounce, priority, singleton, and event batching.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7121,7122,7123,7124],{"name":6990,"slug":6991,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"name":7125,"slug":7126,"type":15},"Performance","performance","2026-07-12T07:36:52.987451",{"slug":7129,"name":7129,"fn":7130,"description":7131,"org":7132,"tags":7133,"stars":23,"repoUrl":24,"updatedAt":7143},"inngest-middleware","add middleware to Inngest durable functions","Use when adding cross-cutting concerns to durable functions — structured logging or tracing across all functions, error tracking with Sentry, payload encryption for sensitive data, dependency injection of clients (DB, Stripe, etc.) into function handlers, custom telemetry, or behavior that should apply uniformly across many functions. Covers Inngest middleware lifecycle, creating custom middleware, dependencyInjectionMiddleware, @inngest\u002Fmiddleware-encryption, @inngest\u002Fmiddleware-sentry, and custom middleware patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7134,7135,7136,7139,7140],{"name":7021,"slug":7022,"type":15},{"name":9,"slug":8,"type":15},{"name":7137,"slug":7138,"type":15},"Middleware","middleware",{"name":6966,"slug":6967,"type":15},{"name":7141,"slug":7142,"type":15},"Sentry","sentry","2026-07-12T07:36:50.127999",{"slug":7145,"name":7145,"fn":7146,"description":7147,"org":7148,"tags":7149,"stars":23,"repoUrl":24,"updatedAt":7158},"inngest-realtime","stream durable workflow updates to UI","Use when streaming durable workflow updates to a UI in real time — live order status pages that animate as steps complete, AI agent token streaming from a function to the browser, log tailing for long-running jobs, or human-in-the-loop approval flows that publish a prompt and wait for a user reply. Covers Inngest v4 native realtime: defining typed channels, publishing from inside step.run, minting subscription tokens via server actions, and consuming the stream from React\u002FNext.js client components.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7150,7151,7154,7155],{"name":13,"slug":14,"type":15},{"name":7152,"slug":7153,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},{"name":7156,"slug":7157,"type":15},"Real-time","real-time","2026-07-12T07:36:48.895092",{"slug":7160,"name":7160,"fn":7161,"description":7162,"org":7163,"tags":7164,"stars":23,"repoUrl":24,"updatedAt":7170},"inngest-setup","build durable TypeScript workflows","Use when adding durable execution to a TypeScript project — building retry-safe webhook handlers, background jobs that survive crashes, scheduled tasks, or long-running workflows that outlive a single request. Covers Inngest SDK installation, client config, environment variables, serve endpoints (Next.js, Express, Hono, Fastify), connect-as-worker mode, and the local dev server.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[7165,7166,7167,7168],{"name":13,"slug":14,"type":15},{"name":7048,"slug":7049,"type":15},{"name":9,"slug":8,"type":15},{"name":7169,"slug":118,"type":15},"TypeScript","2026-07-12T07:36:42.004122"]