File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,23 @@ interface Searchable extends OptionalTeamAssignable, SortDir {
1212 sort ?: 'score' | 'timestamp' ;
1313}
1414
15+ interface SearchMessagesCursorPagination {
16+ /**
17+ * @description Paginate through collections of data by setting the `cursor` parameter to `*` for the first "page"
18+ * or a `next_cursor` attribute returned by a previous request's `response_metadata`.
19+ * Use the `count` parameter to set the number of items to return per page rather than `limit`.
20+ * @see {@link https://docs.slack.dev/apis/web-api/pagination pagination } for more detail.
21+ */
22+ cursor ?: string ;
23+ }
24+
1525// https://docs.slack.dev/reference/methods/search.all
1626export interface SearchAllArguments extends TokenOverridable , TraditionalPagingEnabled , Searchable { }
1727// https://docs.slack.dev/reference/methods/search.files
1828export interface SearchFilesArguments extends TokenOverridable , TraditionalPagingEnabled , Searchable { }
1929// https://docs.slack.dev/reference/methods/search.messages
20- export interface SearchMessagesArguments extends TokenOverridable , TraditionalPagingEnabled , Searchable { }
30+ export interface SearchMessagesArguments
31+ extends TokenOverridable ,
32+ TraditionalPagingEnabled ,
33+ Searchable ,
34+ SearchMessagesCursorPagination { }
Original file line number Diff line number Diff line change @@ -35,3 +35,10 @@ expectAssignable<Parameters<typeof web.search.messages>>([
3535 query : '1234' , // must specify query
3636 } ,
3737] ) ;
38+ expectAssignable < Parameters < typeof web . search . messages > > ( [
39+ {
40+ query : '1234' ,
41+ cursor : '*' , // optional: enable cursor pagination
42+ count : 30 , // optional: the number of results to return per page
43+ } ,
44+ ] ) ;
You can’t perform that action at this time.
0 commit comments