Skip to content

Fix Slack Lists message field response types#2600

Open
akmhatey-ai wants to merge 2 commits into
slackapi:mainfrom
akmhatey-ai:codex/slacklists-message-field-2598
Open

Fix Slack Lists message field response types#2600
akmhatey-ai wants to merge 2 commits into
slackapi:mainfrom
akmhatey-ai:codex/slacklists-message-field-2598

Conversation

@akmhatey-ai
Copy link
Copy Markdown

Summary

Fixes #2598.

Slack Lists response items reuse the same field type family as request fields. Request message fields should keep accepting message URL strings, but response items can expose message as either a single Slack message object or an array of message objects.

This change adds a response-specific Slack Lists field union so SlackListsItem.fields accepts both response shapes while SlackListsItemsCreateArguments.initial_fields still rejects message objects for request input.

Added tsd coverage for:

  • request message fields accepting message URL strings
  • request message fields rejecting message objects
  • SlackListsItemsListResponse accepting a single message object
  • SlackListsItemsListResponse accepting an array of message objects

Validation:

  • npx @biomejs/biome check packages/web-api/src/types/request/slackLists.ts packages/web-api/test/types/methods/slacklists.test-d.ts
  • npm run build --workspace=packages/web-api
  • npm run test:types --workspace=packages/web-api
  • node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts from packages/web-api under Windows Node: 154 tests passed
  • git diff --check passed with local CRLF warnings only
  • gitleaks detect --pipe --redact --verbose --no-color on the staged diff: no leaks found

Limitation:

  • npm test --workspace=packages/web-api builds successfully, then fails in this Windows checkout because the script's bash -c invocation runs under WSL/Linux Node against Windows-installed esbuild binaries. I ran the equivalent package node tests directly under Windows Node instead.

Requirements

@akmhatey-ai akmhatey-ai requested a review from a team as a code owner May 16, 2026 12:28
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 16, 2026

🦋 Changeset detected

Latest commit: 693b837

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@slack/web-api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@salesforce-cla
Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @akmhatey-ai to sign the Salesforce Inc. Contributor License Agreement.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SlackListsItem FieldMessage.message type does not match API response shape

1 participant