Skip to content

fix(types): narrow tag_color to supported color literals#2513

Open
kang8 wants to merge 1 commit intoslackapi:mainfrom
kang8:fix/tag-color-literal-type
Open

fix(types): narrow tag_color to supported color literals#2513
kang8 wants to merge 1 commit intoslackapi:mainfrom
kang8:fix/tag-color-literal-type

Conversation

@kang8
Copy link

@kang8 kang8 commented Feb 12, 2026

Summary

  • Narrow tag_color type from string to 'red' | 'yellow' | 'green' | 'gray' | 'blue' in EntityTypedField, EntityStringField, and EntityCustomField
  • Per Slack docs: can only be set when the type is string, allows the string to be highlighted in one of the supported colors
image

Replace `string` with `'red' | 'yellow' | 'green' | 'gray' | 'blue'`
for `tag_color` in EntityTypedField, EntityStringField, and
EntityCustomField to match the Slack API specification.

Per https://docs.slack.dev/messaging/work-objects/#supported-properties-for-a-field:
Can only be set when the type is string. Allows the string to be
highlighted in one of the following colors: red, yellow, green, gray,
blue. e.g., tag_color: "red".
@kang8 kang8 requested a review from a team as a code owner February 12, 2026 06:34
@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2026

⚠️ No Changeset found

Latest commit: 92ca60e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@salesforce-cla
Copy link

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

@zimeg zimeg added semver:patch pkg:types applies to `@slack/types` enhancement M-T: A feature request for new functionality labels Feb 18, 2026
@zimeg
Copy link
Member

zimeg commented Feb 18, 2026

Hey @kang8! 👋 Thanks so much for sending this in!

Before we make this change I'm checking with how the team wants to handle enum arguments over generic string. We've so far used generic strings to remain flexible to upstream changes, but I understand this can add effort to app development...

We'll share an update once alignment is reached 🪬

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

Labels

cla:signed enhancement M-T: A feature request for new functionality pkg:types applies to `@slack/types` semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants