Skip to content

docs(v4): remove event.user from the v4 TypeScript reference - #1809

Open
dirnalafeinte wants to merge 2 commits into
inngest:mainfrom
dirnalafeinte:docs-v4-send-remove-event-user
Open

docs(v4): remove event.user from the v4 TypeScript reference#1809
dirnalafeinte wants to merge 2 commits into
inngest:mainfrom
dirnalafeinte:docs-v4-send-remove-event-user

Conversation

@dirnalafeinte

@dirnalafeinte dirnalafeinte commented Jul 25, 2026

Copy link
Copy Markdown

Summary

The v4 migration guide says event.user was removed in v4:

Remove event.user

The deprecated event.user field has been removed. If you previously sent user information on the top-level user field or read it from event.user inside a function, move the data your function needs into event.data instead.

Several v4 reference pages still document and use it. Following them produces a TypeScript error, which is what was reported in inngest/inngest-js#1610:

await inngest.send({
  name: "eventName",
  data,
  user: { external_id: "sub", email: "email", name: "name" },
});
// Object literal may only specify known properties,
// and 'user' does not exist in type ...

On that issue a maintainer confirmed the removal was intentional and noted the migration guide had missed it. #1738 fixed the migration guide; the reference pages were left behind, so the v4 docs now contradict each other.

Changes

v4/events/send.mdx — the page documented user as a first-class payload property:

  • Remove the user property from the eventPayload reference table
  • Remove user from the three code samples that set it
  • Remove the "User data encryption 🔐" section, which documents only the user object and its replay caveat

v4/functions/{create,debounce,rate-limit,singleton}.mdx — the CEL key-expression examples for idempotency, rateLimit, debounce, batchEvents and singleton all read event.user.email:

  • 'event.data.account_id + "-" + event.user.email''event.data.account_id + "-" + event.data.email'
  • In the rate-limit example payload, move email into data and read event.data.email instead of event.user.email

The v3 reference pages are deliberately untouched — user is still valid there.

Verification

  • No event.user or external_id references remain on any v4 page (the migration guide keeps its intentional mentions)
  • MDX component tags stay balanced on send.mdx (Properties 3/3, Property 8/8, Row 1/1, Col 2/2, Callout 1/1)
  • Callout is still used on send.mdx, so its import stays valid
  • Diffs are minimal: send.mdx is purely subtractive (33 lines removed); the other four are one-line substitutions plus the payload move

Closes inngest/inngest-js#1610

The v4 migration guide states that event.user was removed in v4, but the
v4 inngest.send() reference still documents it as a payload property, in
three code samples and a dedicated encryption section. Following it
produces a TypeScript error, as reported in inngest/inngest-js#1610.

Drop the user property, the samples that set it, and the user data
encryption section from the v4 page. The v3 reference is unchanged.
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

@dirnalafeinte is attempting to deploy a commit to the Inngest Team on Vercel.

A member of the Team first needs to authorize it.

@gester-bot gester-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, consistent removal — the user field is documented as removed in v4 (see v3-to-v4 migration doc), and no other pages link to the deleted "User data encryption" anchor in this file. No issues found.


Re-review (2026-07-25): New commits correctly propagate the event.user removal to the remaining v4 docs (create, debounce, rate-limit, singleton), replacing event.user.email with event.data.email consistently, including the example payload in rate-limit.mdx. No issues found.

The key expression examples for idempotency, rateLimit, debounce,
batchEvents and singleton use event.user.email, and the rateLimit example
payload sets a top-level user object and reads event.user.email. Both are
invalid in v4 since event.user was removed. Move the address into
event.data and read it from there.
@dirnalafeinte dirnalafeinte changed the title docs(v4): remove event.user from the send reference docs(v4): remove event.user from the v4 TypeScript reference Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] SendPayloadEvent type missing user property in types.

1 participant