Skip to content

MemberJoinedChannelEvent interface doesn't contain "enterprise" field #2139

@valkirilov

Description

@valkirilov

I’ve been playing with the member_joined_channel event and have noticed that the corresponding interface for this event might be outdated. Examining the payload of the event I received, I found the enterprise field, which contains the ID of the Slack organization, but it’s absent from the interface itself.

 event: {
    type: 'member_joined_channel',
    user: '***',
    channel: '***',
    channel_type: 'C',
    team: '***',
    inviter: '***',
    enterprise: '***',
    event_ts: '1736863796.000500'
  }

Is this intentional, or was it added at some point later by the web API, but the interface definition was not updated accordingly?

Packages:

Select all that apply:

  • @slack/web-api
  • @slack/rtm-api
  • @slack/webhooks
  • @slack/oauth
  • @slack/socket-mode
  • @slack/types
  • I don't know

Reproducible in:

The Slack SDK version

"slack/bolt": "^4.2.0",
"slack-block-builder": "^2.8.0",

Node.js runtime version

v20.9.0

OS info

ProductName: macOS
ProductVersion: 15.2
BuildVersion: 24C101
Darwin Kernel Version 24.2.0: Fri Dec 6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000

Steps to reproduce:

  1. Simply, setup an Event Listener with Bolt:
app.event('member_joined_channel', memberJoinedChannelCallback);

const memberJoinedChannelCallback = async ({
  client,
  event,
}: {
  client: WebClient;
  event: MemberJoinedChannelEvent;
}) => {
  console.log('Member Joined Channel event');
  console.log({ event });
});

Result:

 event: {
    type: 'member_joined_channel',
    user: '***',
    channel: '***',
    channel_type: 'C',
    team: '***',
    inviter: '***',
    enterprise: '***',
    event_ts: '1736863796.000500'
  }

Expected result:

Add the enterprise field to the interface, so it will correspond to the actual payloads that we receive.

Actual result:

Currently, the enterprise field is missing in the interface definition:

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:typescriptissues that specifically impact using the package from typescript projectsbugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedpkg:typesapplies to `@slack/types`

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions