You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: Export RunStatus type from @trigger.dev/sdk #4051
Is your feature request related to a problem? Please describe.
I may be missing an existing exported type, so please feel free to redirect me if there is already a recommended way to type this.
Feature Request
It would be useful if @trigger.dev/sdk exported the public run status type, for example:
import type { RunStatus } from "@trigger.dev/sdk";
Use case example
I am building operational tooling around Trigger. In that context, I need to list runs by status and type status-based logic around runs.list(...) and runs.retrieve(...).
These workarounds are usable, but they are less discoverable and couple application code to SDK method signatures rather than to an explicit public SDK type.
Describe the solution you'd like to see
Suggested API
import type { RunStatus } from "@trigger.dev/sdk";
Describe alternate solutions
Optionally, if the list filter type is intentionally different from the run object status type:
import type { RunListStatusFilter } from "@trigger.dev/sdk";
Additional information
Why this would help
This would improve TypeScript ergonomics for operational tooling such as run monitoring, ledgers, dashboards, queue inspection, backfills/replays, alerting and guardrails.
It's a small DX improvement but it would make the SDK easier to use for typed operational workflow.
I'd lean toward the derived version for your generator — it's tied to what runs.retrieve actually returns, so it can't drift from the SDK, whereas the core import reaches past the public API and could break without it counting as a breaking change.
Both verified against 4.5.13. The request still seems worth doing though: runs.list({ status }) takes the type as input, so needing an internal package to name it is awkward.
Activity
itzzdev09 commentedon Aug 28, 2026
Still not exported as of
@trigger.dev/sdk@4.5.13:The type does exist — it's declared in
@trigger.dev/core(v3/schemas/api.d.ts) asz.infer<typeof RunStatus>, just not re-exported from the SDK's root.Two things that compile today, if you need to unblock without waiting:
or derive it from the SDK's own surface, which avoids the second import entirely and stays correct if the union changes:
I'd lean toward the derived version for your generator — it's tied to what
runs.retrieveactually returns, so it can't drift from the SDK, whereas thecoreimport reaches past the public API and could break without it counting as a breaking change.Both verified against 4.5.13. The request still seems worth doing though:
runs.list({ status })takes the type as input, so needing an internal package to name it is awkward.