Skip to content

Commit ec6733e

Browse files
zimegClaude
andcommitted
feat(block-kit): add rawText / rawNumber BlockCompositions helpers
Add BlockCompositions.rawText(...) and rawNumber(...) factory helpers for the raw table cell objects, mirroring the plainText / markdownText DSL (configurator overload plus a convenience overload). Gives callers an ergonomic way to build data_table / table cells without the raw builder. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent 36396ef commit ec6733e

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎slack-api-model/src/main/java/com/slack/api/model/block/composition/BlockCompositions.java‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,26 @@ public static MarkdownTextObject markdownText(String text) {
5454
return MarkdownTextObject.builder().text(text).build();
5555
}
5656

57+
// RawNumberObject
58+
59+
public static RawNumberObject rawNumber(ModelConfigurator<RawNumberObject.RawNumberObjectBuilder> configurator) {
60+
return configurator.configure(RawNumberObject.builder()).build();
61+
}
62+
63+
public static RawNumberObject rawNumber(double value, String text) {
64+
return RawNumberObject.builder().value(value).text(text).build();
65+
}
66+
67+
// RawTextObject
68+
69+
public static RawTextObject rawText(ModelConfigurator<RawTextObject.RawTextObjectBuilder> configurator) {
70+
return configurator.configure(RawTextObject.builder()).build();
71+
}
72+
73+
public static RawTextObject rawText(String text) {
74+
return RawTextObject.builder().text(text).build();
75+
}
76+
5777
// OptionGroupObject
5878

5979
public static OptionGroupObject optionGroup(ModelConfigurator<OptionGroupObject.OptionGroupObjectBuilder> configurator) {

0 commit comments

Comments
 (0)