File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @slack/web-api " : minor
3+ ---
4+
5+ Add the optional ` include_slackbot_availability ` argument and ` team.slackbot_availability ` response field to ` team.info ` .
Original file line number Diff line number Diff line change @@ -68,6 +68,12 @@ export type TeamInfoArguments = OptionalArgument<
6868 * This also expects the domain to belong to a team and not the enterprise itself.
6969 */
7070 domain ?: string ; // available only for Enterprise Grid
71+ /**
72+ * @description Include advisory Slackbot availability for the caller's own workspace or organization.
73+ * Defaults to false. Requires the existing `team:read` scope.
74+ * @see {@link https://docs.slack.dev/reference/methods/team.info `team.info` API reference }.
75+ */
76+ include_slackbot_availability ?: boolean ;
7177 /** @description Team to get info about; if omitted, will return information about the current team. */
7278 team ?: string ;
7379 }
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export interface Team {
3333 locale ?: string ;
3434 name ?: string ;
3535 pay_prod_cur ?: string ;
36+ slackbot_availability ?: string ;
3637 sso_provider ?: SsoProvider ;
3738 url ?: string ;
3839}
Original file line number Diff line number Diff line change 1- import { expectAssignable , expectError } from 'tsd' ;
1+ import { expectAssignable , expectError , expectType } from 'tsd' ;
22
33import { WebClient } from '../../../src/WebClient' ;
44
@@ -39,9 +39,16 @@ expectAssignable<Parameters<typeof web.team.externalTeams.list>>([{}]); // all o
3939
4040// team.info
4141// -- sad path
42+ expectError ( web . team . info ( { include_slackbot_availability : 'true' } ) ) ;
4243// -- happy path
4344expectAssignable < Parameters < typeof web . team . info > > ( [ { } ] ) ; // all optional arguments
4445expectAssignable < Parameters < typeof web . team . info > > ( [ ] ) ; // no arg is fine
46+ expectAssignable < Parameters < typeof web . team . info > > ( [ { include_slackbot_availability : true } ] ) ;
47+ expectAssignable < Parameters < typeof web . team . info > > ( [ { team : 'T1234' , include_slackbot_availability : false } ] ) ;
48+ expectAssignable < Parameters < typeof web . team . info > > ( [ { domain : 'example' , include_slackbot_availability : true } ] ) ;
49+ web . team . info ( { include_slackbot_availability : true } ) . then ( ( response ) => {
50+ expectType < string | undefined > ( response . team ?. slackbot_availability ) ;
51+ } ) ;
4552
4653// team.integrationLogs
4754// -- sad path
You can’t perform that action at this time.
0 commit comments