Skip to content

Commit d1a5fb2

Browse files
committed
fix: model full ListView shape (order, sorts, info_column_filters, calculations, options)
Detection surfaced order (an array of {select:[...]}) on grouping, then sorts, then info_column_filters on ListView. Rather than peel one field per run, typed the complete view shape from the list_view.json output schema: - Grouping.order -> List<GroupingOrder> ({select: List<String>}) - sorts -> List<Sort> ({key, ascending, column_id}) - info_column_filters -> List<InfoColumnFilter> (distinct from filters: no column_id) - calculations -> List<Calculation> ({key, operator, column_id}) - options -> Options ({cover_field, cover_fit, calendar_field}) - is_template_initial_view, row_height Verified locally: files_Test#describe parses clean against live list data.
1 parent 0436f6b commit d1a5fb2

1 file changed

Lines changed: 57 additions & 1 deletion

File tree

  • slack-api-model/src/main/java/com/slack/api/model/list

‎slack-api-model/src/main/java/com/slack/api/model/list/ListView.java‎

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ public class ListView {
2929
private Boolean showCompletedItems;
3030
private Grouping grouping;
3131
private List<Filter> filters;
32+
private List<Sort> sorts;
33+
private List<InfoColumnFilter> infoColumnFilters;
34+
private List<Calculation> calculations;
35+
private Options options;
36+
private Boolean isTemplateInitialView;
37+
private Integer rowHeight;
3238

3339
@Data
3440
@Builder
@@ -37,7 +43,26 @@ public class ListView {
3743
public static class Grouping {
3844
private String groupBy;
3945
private String groupByColumnId;
40-
private String order;
46+
// Ordered group values; each entry carries the typed value(s) for its group.
47+
private List<GroupingOrder> order;
48+
}
49+
50+
@Data
51+
@Builder
52+
@NoArgsConstructor
53+
@AllArgsConstructor
54+
public static class GroupingOrder {
55+
private List<String> select;
56+
}
57+
58+
@Data
59+
@Builder
60+
@NoArgsConstructor
61+
@AllArgsConstructor
62+
public static class Sort {
63+
private String key;
64+
private Boolean ascending;
65+
private String columnId;
4166
}
4267

4368
@Data
@@ -52,6 +77,37 @@ public static class Filter {
5277
private String columnId;
5378
}
5479

80+
@Data
81+
@Builder
82+
@NoArgsConstructor
83+
@AllArgsConstructor
84+
public static class InfoColumnFilter {
85+
private String key;
86+
private String operator;
87+
private List<String> values;
88+
private List<TypedValue> typedValues;
89+
}
90+
91+
@Data
92+
@Builder
93+
@NoArgsConstructor
94+
@AllArgsConstructor
95+
public static class Calculation {
96+
private String key;
97+
private String operator;
98+
private String columnId;
99+
}
100+
101+
@Data
102+
@Builder
103+
@NoArgsConstructor
104+
@AllArgsConstructor
105+
public static class Options {
106+
private String coverField;
107+
private String coverFit;
108+
private String calendarField;
109+
}
110+
55111
@Data
56112
public static class TypedValue {
57113
// TODO: Add publicly available properties here

0 commit comments

Comments
 (0)