Skip to content

[BUG] SendPayloadEvent type missing user property in types. #1610

Description

@dopry

Describe the bug
inngest.send() SendEventPayload typing does not include a "user" property per https://www.inngest.com/docs/reference/typescript/v4/events/send

Image

To Reproduce
Steps to reproduce the behavior:

  1. Create a function with
 const inngest = new Inngest({ id: 'example' });
 const result = await inngest.send({
      name: "eventName",
      data,
      user: {
        external_id: "sub",
        email: "email",
        name: "name",
      },
    });

Expected behavior
there are no TS errors for "user".

System info (please complete the following information):

  • npm package Version 4.5.1, sil applies to latest
  • Framework: Next.js
  • Platform local development

Additional context
Here is the type tree for reference

export interface MinimalEventPayload<TData = any> {
  id?: string;
  data?: TData;
  v?: string;
  meta?: EventMeta;
}
export interface EventPayload<TData = any> extends MinimalEventPayload<TData> {
  name: string;
  ts?: number;
}
export type SendEventPayload = SingleOrArray<PartialK<Omit<EventPayload, "v">, "ts">>;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions